commit 5c7239f6016b223d33d2a9786f7a1226cfbaa861 Author: WolverinDEV Date: Tue Feb 27 17:20:49 2018 +0100 Initial commit diff --git a/asm/CMakeLists.txt b/asm/CMakeLists.txt new file mode 100644 index 00000000..6966b222 --- /dev/null +++ b/asm/CMakeLists.txt @@ -0,0 +1,18 @@ +project(TeaWeb-Native) + +set(CMAKE_CXX_COMPILER "emcc") +set(CMAKE_C_COMPILER "emcc") +set(CMAKE_C_LINK_EXECUTABLE "emcc") +#set(CMAKE_CXX_FLAGS "-s WASM=1") +set(CMAKE_VERBOSE_MAKEFILE ON) +set(CMAKE_EXE_LINKER_FLAGS "-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") # + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/generated/") +add_executable(TeaWeb-Native.js src/WebASMTest.cpp) +target_link_libraries(TeaWeb-Native.js ${CMAKE_CURRENT_SOURCE_DIR}/libs/opus/.libs/libopus.a) +#Adding directories to PATH: +#PATH += /home/wolverindev/wgit/emscripten-sdk + +#Setting environment variables: +#EMSDK = /home/wolverindev/wgit/emscripten-sdk +#EM_CONFIG = /home/wolverindev/.emscripten diff --git a/asm/generated/TeaWeb-Native.js b/asm/generated/TeaWeb-Native.js new file mode 100644 index 00000000..38589384 --- /dev/null +++ b/asm/generated/TeaWeb-Native.js @@ -0,0 +1,50845 @@ +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module !== 'undefined' ? Module : {}; + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) +// {{PRE_JSES}} + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = {}; +var key; +for (key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +Module['arguments'] = []; +Module['thisProgram'] = './this.program'; +Module['quit'] = function(status, toThrow) { + throw toThrow; +}; +Module['preRun'] = []; +Module['postRun'] = []; + +// The environment setup code below is customized to use Module. +// *** Environment setup code *** +var ENVIRONMENT_IS_WEB = false; +var ENVIRONMENT_IS_WORKER = false; +var ENVIRONMENT_IS_NODE = false; +var ENVIRONMENT_IS_SHELL = false; + +// Three configurations we can be running in: +// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) +// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) +// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) + +if (Module['ENVIRONMENT']) { + if (Module['ENVIRONMENT'] === 'WEB') { + ENVIRONMENT_IS_WEB = true; + } else if (Module['ENVIRONMENT'] === 'WORKER') { + ENVIRONMENT_IS_WORKER = true; + } else if (Module['ENVIRONMENT'] === 'NODE') { + ENVIRONMENT_IS_NODE = true; + } else if (Module['ENVIRONMENT'] === 'SHELL') { + ENVIRONMENT_IS_SHELL = true; + } else { + throw new Error('Module[\'ENVIRONMENT\'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.'); + } +} else { + ENVIRONMENT_IS_WEB = typeof window === 'object'; + ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; + ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function' && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER; + ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; +} + + +if (ENVIRONMENT_IS_NODE) { + // Expose functionality in the same simple way that the shells work + // Note that we pollute the global namespace here, otherwise we break in node + var nodeFS; + var nodePath; + + Module['read'] = function shell_read(filename, binary) { + var ret; + ret = tryParseAsDataURI(filename); + if (!ret) { + if (!nodeFS) nodeFS = require('fs'); + if (!nodePath) nodePath = require('path'); + filename = nodePath['normalize'](filename); + ret = nodeFS['readFileSync'](filename); + } + return binary ? ret : ret.toString(); + }; + + Module['readBinary'] = function readBinary(filename) { + var ret = Module['read'](filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; + + if (process['argv'].length > 1) { + Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); + } + + Module['arguments'] = process['argv'].slice(2); + + if (typeof module !== 'undefined') { + module['exports'] = Module; + } + + process['on']('uncaughtException', function(ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + // Currently node will swallow unhandled rejections, but this behavior is + // deprecated, and in the future it will exit with error status. + process['on']('unhandledRejection', function(reason, p) { + Module['printErr']('node.js exiting due to unhandled promise rejection'); + process['exit'](1); + }); + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; +} +else if (ENVIRONMENT_IS_SHELL) { + if (typeof read != 'undefined') { + Module['read'] = function shell_read(f) { + var data = tryParseAsDataURI(f); + if (data) { + return intArrayToString(data); + } + return read(f); + }; + } + + Module['readBinary'] = function readBinary(f) { + var data; + data = tryParseAsDataURI(f); + if (data) { + return data; + } + if (typeof readbuffer === 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data === 'object'); + return data; + }; + + if (typeof scriptArgs != 'undefined') { + Module['arguments'] = scriptArgs; + } else if (typeof arguments != 'undefined') { + Module['arguments'] = arguments; + } + + if (typeof quit === 'function') { + Module['quit'] = function(status, toThrow) { + quit(status); + } + } +} +else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + Module['read'] = function shell_read(url) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + } catch (err) { + var data = tryParseAsDataURI(url); + if (data) { + return intArrayToString(data); + } + throw err; + } + }; + + if (ENVIRONMENT_IS_WORKER) { + Module['readBinary'] = function readBinary(url) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(xhr.response); + } catch (err) { + var data = tryParseAsDataURI(url); + if (data) { + return data; + } + throw err; + } + }; + } + + Module['readAsync'] = function readAsync(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = function xhr_onload() { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + var data = tryParseAsDataURI(url); + if (data) { + onload(data.buffer); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + + if (typeof arguments != 'undefined') { + Module['arguments'] = arguments; + } + + Module['setWindowTitle'] = function(title) { document.title = title }; +} +else { + // Unreachable because SHELL is dependent on the others + throw new Error('unknown runtime environment'); +} + +// console.log is checked first, as 'print' on the web will open a print dialogue +// printErr is preferable to console.warn (works better in shells) +// bind(console) is necessary to fix IE/Edge closed dev tools panel behavior. +Module['print'] = typeof console !== 'undefined' ? console.log.bind(console) : (typeof print !== 'undefined' ? print : null); +Module['printErr'] = typeof printErr !== 'undefined' ? printErr : ((typeof console !== 'undefined' && console.warn.bind(console)) || Module['print']); + +// *** Environment setup code *** + +// Closure helpers +Module.print = Module['print']; +Module.printErr = Module['printErr']; + +// Merge back in the overrides +for (key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = undefined; + + + +// {{PREAMBLE_ADDITIONS}} + +var STACK_ALIGN = 16; + +// stack management, and other functionality that is provided by the compiled code, +// should not be used before it is ready +stackSave = stackRestore = stackAlloc = setTempRet0 = getTempRet0 = function() { + abort('cannot use the stack before compiled code is ready to run, and has provided stack access'); +}; + +function staticAlloc(size) { + assert(!staticSealed); + var ret = STATICTOP; + STATICTOP = (STATICTOP + size + 15) & -16; + return ret; +} + +function dynamicAlloc(size) { + assert(DYNAMICTOP_PTR); + var ret = HEAP32[DYNAMICTOP_PTR>>2]; + var end = (ret + size + 15) & -16; + HEAP32[DYNAMICTOP_PTR>>2] = end; + if (end >= TOTAL_MEMORY) { + var success = enlargeMemory(); + if (!success) { + HEAP32[DYNAMICTOP_PTR>>2] = ret; + return 0; + } + } + return ret; +} + +function alignMemory(size, factor) { + if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default + var ret = size = Math.ceil(size / factor) * factor; + return ret; +} + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': return 1; + case 'i16': return 2; + case 'i32': return 4; + case 'i64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length-1] === '*') { + return 4; // A pointer + } else if (type[0] === 'i') { + var bits = parseInt(type.substr(1)); + assert(bits % 8 === 0); + return bits / 8; + } else { + return 0; + } + } + } +} + +function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + Module.printErr(text); + } +} + + + +var jsCallStartIndex = 1; +var functionPointers = new Array(0); + +// 'sig' parameter is only used on LLVM wasm backend +function addFunction(func, sig) { + if (typeof sig === 'undefined') { + Module.printErr('Warning: addFunction: Provide a wasm function signature ' + + 'string as a second argument'); + } + var base = 0; + for (var i = base; i < base + 0; i++) { + if (!functionPointers[i]) { + functionPointers[i] = func; + return jsCallStartIndex + i; + } + } + throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; +} + +function removeFunction(index) { + functionPointers[index-jsCallStartIndex] = null; +} + +var funcWrappers = {}; + +function getFuncWrapper(func, sig) { + if (!func) return; // on null pointer, return undefined + assert(sig); + if (!funcWrappers[sig]) { + funcWrappers[sig] = {}; + } + var sigCache = funcWrappers[sig]; + if (!sigCache[func]) { + // optimize away arguments usage in common cases + if (sig.length === 1) { + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func); + }; + } else if (sig.length === 2) { + sigCache[func] = function dynCall_wrapper(arg) { + return dynCall(sig, func, [arg]); + }; + } else { + // general case + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func, Array.prototype.slice.call(arguments)); + }; + } + } + return sigCache[func]; +} + + +function makeBigInt(low, high, unsigned) { + return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0)); +} + +function dynCall(sig, ptr, args) { + if (args && args.length) { + assert(args.length == sig.length-1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); + } else { + assert(sig.length == 1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].call(null, ptr); + } +} + + +function getCompilerSetting(name) { + throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for getCompilerSetting or emscripten_get_compiler_setting to work'; +} + +var Runtime = { + // FIXME backwards compatibility layer for ports. Support some Runtime.* + // for now, fix it there, then remove it from here. That way we + // can minimize any period of breakage. + dynCall: dynCall, // for SDL2 port + // helpful errors + getTempRet0: function() { abort('getTempRet0() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + staticAlloc: function() { abort('staticAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + stackAlloc: function() { abort('stackAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, +}; + +// The address globals begin at. Very low in memory, for code size and optimization opportunities. +// Above 0 is static memory, starting with globals. +// Then the stack. +// Then 'dynamic' memory for sbrk. +var GLOBAL_BASE = 8; + + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + + + +//======================================== +// Runtime essentials +//======================================== + +var ABORT = 0; // whether we are quitting the application. no code should run after this. set in exit() and abort() +var EXITSTATUS = 0; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +var globalScope = this; + +// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) +function getCFunc(ident) { + var func = Module['_' + ident]; // closure exported function + assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); + return func; +} + +var JSfuncs = { + // Helpers for cwrap -- it can't refer to Runtime directly because it might + // be renamed by closure, instead it calls JSfuncs['stackSave'].body to find + // out what the minified function name is. + 'stackSave': function() { + stackSave() + }, + 'stackRestore': function() { + stackRestore() + }, + // type conversion from js to c + 'arrayToC' : function(arr) { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + }, + 'stringToC' : function(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { // null string + // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' + var len = (str.length << 2) + 1; + ret = stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + } +}; +// For fast lookup of conversion functions +var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']}; + +// C calling interface. +function ccall (ident, returnType, argTypes, args, opts) { + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + assert(returnType !== 'array', 'Return type should not be "array".'); + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + if (returnType === 'string') ret = Pointer_stringify(ret); + if (stack !== 0) { + stackRestore(stack); + } + return ret; +} + +function cwrap (ident, returnType, argTypes) { + argTypes = argTypes || []; + var cfunc = getCFunc(ident); + // When the function takes numbers and returns a number, we can just return + // the original function + var numericArgs = argTypes.every(function(type){ return type === 'number'}); + var numericRet = returnType !== 'string'; + if (numericRet && numericArgs) { + return cfunc; + } + return function() { + return ccall(ident, returnType, argTypes, arguments); + } +} + +/** @type {function(number, number, string, boolean=)} */ +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': HEAP8[((ptr)>>0)]=value; break; + case 'i8': HEAP8[((ptr)>>0)]=value; break; + case 'i16': HEAP16[((ptr)>>1)]=value; break; + case 'i32': HEAP32[((ptr)>>2)]=value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)]=value; break; + case 'double': HEAPF64[((ptr)>>3)]=value; break; + default: abort('invalid type for setValue: ' + type); + } +} + +/** @type {function(number, string, boolean=)} */ +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + default: abort('invalid type for getValue: ' + type); + } + return null; +} + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_STATIC = 2; // Cannot be freed +var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk +var ALLOC_NONE = 4; // Do not allocate + +// allocate(): This is for internal use. You can use it yourself as well, but the interface +// is a little tricky (see docs right below). The reason is that it is optimized +// for multiple syntaxes to save space in generated code. So you should +// normally not use allocate(), and instead allocate memory using _malloc(), +// initialize it with setValue(), and so forth. +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block. This only matters if there +// is initial data - if @slab is a number, then this does not matter at all and is +// ignored. +// @allocator: How to allocate memory, see ALLOC_* +/** @type {function((TypedArray|Array|number), string, number, number=)} */ +function allocate(slab, types, allocator, ptr) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret; + if (allocator == ALLOC_NONE) { + ret = ptr; + } else { + ret = [typeof _malloc === 'function' ? _malloc : staticAlloc, stackAlloc, staticAlloc, dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length)); + } + + if (zeroinit) { + var stop; + ptr = ret; + assert((ret & 3) == 0); + stop = ret + (size & ~3); + for (; ptr < stop; ptr += 4) { + HEAP32[((ptr)>>2)]=0; + } + stop = ret + size; + while (ptr < stop) { + HEAP8[((ptr++)>>0)]=0; + } + return ret; + } + + if (singleType === 'i8') { + if (slab.subarray || slab.slice) { + HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; + } + + var i = 0, type, typeSize, previousType; + while (i < size) { + var curr = slab[i]; + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + assert(type, 'Must know what type to store in allocate!'); + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret+i, curr, type); + + // no need to look up size unless type changes, so cache it + if (previousType !== type) { + typeSize = getNativeTypeSize(type); + previousType = type; + } + i += typeSize; + } + + return ret; +} + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!staticSealed) return staticAlloc(size); + if (!runtimeInitialized) return dynamicAlloc(size); + return _malloc(size); +} + +/** @type {function(number, number=)} */ +function Pointer_stringify(ptr, length) { + if (length === 0 || !ptr) return ''; + // TODO: use TextDecoder + // Find the length, and check for UTF while doing so + var hasUtf = 0; + var t; + var i = 0; + while (1) { + assert(ptr + i < TOTAL_MEMORY); + t = HEAPU8[(((ptr)+(i))>>0)]; + hasUtf |= t; + if (t == 0 && !length) break; + i++; + if (length && i == length) break; + } + if (!length) length = i; + + var ret = ''; + + if (hasUtf < 128) { + var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack + var curr; + while (length > 0) { + curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK))); + ret = ret ? ret + curr : curr; + ptr += MAX_CHUNK; + length -= MAX_CHUNK; + } + return ret; + } + return UTF8ToString(ptr); +} + +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAP8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; +function UTF8ArrayToString(u8Array, idx) { + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + while (u8Array[endPtr]) ++endPtr; + + if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) { + return UTF8Decoder.decode(u8Array.subarray(idx, endPtr)); + } else { + var u0, u1, u2, u3, u4, u5; + + var str = ''; + while (1) { + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + u0 = u8Array[idx++]; + if (!u0) return str; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + u3 = u8Array[idx++] & 63; + if ((u0 & 0xF8) == 0xF0) { + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3; + } else { + u4 = u8Array[idx++] & 63; + if ((u0 & 0xFC) == 0xF8) { + u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4; + } else { + u5 = u8Array[idx++] & 63; + u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5; + } + } + } + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + } +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function UTF8ToString(ptr) { + return UTF8ArrayToString(HEAPU8,ptr); +} + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x1FFFFF) { + if (outIdx + 3 >= endIdx) break; + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x3FFFFFF) { + if (outIdx + 4 >= endIdx) break; + outU8Array[outIdx++] = 0xF8 | (u >> 24); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 5 >= endIdx) break; + outU8Array[outIdx++] = 0xFC | (u >> 30); + outU8Array[outIdx++] = 0x80 | ((u >> 24) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + ++len; + } else if (u <= 0x7FF) { + len += 2; + } else if (u <= 0xFFFF) { + len += 3; + } else if (u <= 0x1FFFFF) { + len += 4; + } else if (u <= 0x3FFFFFF) { + len += 5; + } else { + len += 6; + } + } + return len; +} + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; +function UTF16ToString(ptr) { + assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!'); + var endPtr = ptr; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + var idx = endPtr >> 1; + while (HEAP16[idx]) ++idx; + endPtr = idx << 1; + + if (endPtr - ptr > 32 && UTF16Decoder) { + return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); + } else { + var i = 0; + + var str = ''; + while (1) { + var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; + if (codeUnit == 0) return str; + ++i; + // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. + str += String.fromCharCode(codeUnit); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; + } + // Null-terminate the pointer to the HEAP. + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} + +function UTF32ToString(ptr) { + assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!'); + var i = 0; + + var str = ''; + while (1) { + var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; + if (utf32 == 0) + return str; + ++i; + // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + if (utf32 >= 0x10000) { + var ch = utf32 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } else { + str += String.fromCharCode(utf32); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + assert(outPtr % 4 == 0, 'Pointer passed to stringToUTF32 must be aligned to four bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + // 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. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); + } + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + // Null-terminate the pointer to the HEAP. + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // 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. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} + +// Allocate heap space for a JS string, and write it there. +// It is the responsibility of the caller to free() that memory. +function allocateUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Allocate stack space for a JS string, and write it there. +function allocateUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +function demangle(func) { + warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); + return func; +} + +function demangleAll(text) { + var regex = + /__Z[\w\d_]+/g; + return text.replace(regex, + function(x) { + var y = demangle(x); + return x === y ? x : (x + ' [' + y + ']'); + }); +} + +function jsStackTrace() { + var err = new Error(); + if (!err.stack) { + // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, + // so try that as a special-case. + try { + throw new Error(0); + } catch(e) { + err = e; + } + if (!err.stack) { + return '(no stack trace available)'; + } + } + return err.stack.toString(); +} + +function stackTrace() { + var js = jsStackTrace(); + if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); + return demangleAll(js); +} + +// Memory management + +var PAGE_SIZE = 16384; +var WASM_PAGE_SIZE = 65536; +var ASMJS_PAGE_SIZE = 16777216; +var MIN_TOTAL_MEMORY = 16777216; + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - (x % multiple); + } + return x; +} + +var HEAP, +/** @type {ArrayBuffer} */ + buffer, +/** @type {Int8Array} */ + HEAP8, +/** @type {Uint8Array} */ + HEAPU8, +/** @type {Int16Array} */ + HEAP16, +/** @type {Uint16Array} */ + HEAPU16, +/** @type {Int32Array} */ + HEAP32, +/** @type {Uint32Array} */ + HEAPU32, +/** @type {Float32Array} */ + HEAPF32, +/** @type {Float64Array} */ + HEAPF64; + +function updateGlobalBuffer(buf) { + Module['buffer'] = buffer = buf; +} + +function updateGlobalBufferViews() { + Module['HEAP8'] = HEAP8 = new Int8Array(buffer); + Module['HEAP16'] = HEAP16 = new Int16Array(buffer); + Module['HEAP32'] = HEAP32 = new Int32Array(buffer); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buffer); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buffer); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buffer); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buffer); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buffer); +} + +var STATIC_BASE, STATICTOP, staticSealed; // static area +var STACK_BASE, STACKTOP, STACK_MAX; // stack area +var DYNAMIC_BASE, DYNAMICTOP_PTR; // dynamic area handled by sbrk + + STATIC_BASE = STATICTOP = STACK_BASE = STACKTOP = STACK_MAX = DYNAMIC_BASE = DYNAMICTOP_PTR = 0; + staticSealed = false; + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + assert((STACK_MAX & 3) == 0); + HEAPU32[(STACK_MAX >> 2)-1] = 0x02135467; + HEAPU32[(STACK_MAX >> 2)-2] = 0x89BACDFE; +} + +function checkStackCookie() { + if (HEAPU32[(STACK_MAX >> 2)-1] != 0x02135467 || HEAPU32[(STACK_MAX >> 2)-2] != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x' + HEAPU32[(STACK_MAX >> 2)-2].toString(16) + ' ' + HEAPU32[(STACK_MAX >> 2)-1].toString(16)); + } + // Also test the global address 0 for integrity. This check is not compatible with SAFE_SPLIT_MEMORY though, since that mode already tests all address 0 accesses on its own. + if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) throw 'Runtime error: The application has corrupted its heap memory area (address zero)!'; +} + +function abortStackOverflow(allocSize) { + abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!'); +} + +function abortOnCannotGrowMemory() { + 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 -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); +} + + +function enlargeMemory() { + abortOnCannotGrowMemory(); +} + + +var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; +var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; +if (TOTAL_MEMORY < TOTAL_STACK) Module.printErr('TOTAL_MEMORY should be larger than TOTAL_STACK, was ' + TOTAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); + +// Initialize the runtime's memory +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, + 'JS engine does not provide full typed array support'); + + + +// Use a provided buffer, if there is one, or else allocate a new one +if (Module['buffer']) { + buffer = Module['buffer']; + assert(buffer.byteLength === TOTAL_MEMORY, 'provided buffer should be ' + TOTAL_MEMORY + ' bytes, but it is ' + buffer.byteLength); +} else { + // Use a WebAssembly memory where available + { + buffer = new ArrayBuffer(TOTAL_MEMORY); + } + assert(buffer.byteLength === TOTAL_MEMORY); + Module['buffer'] = buffer; +} +updateGlobalBufferViews(); + + +function getTotalMemory() { + return TOTAL_MEMORY; +} + +// Endianness check (note: assumes compiler arch was little-endian) + HEAP32[0] = 0x63736d65; /* 'emsc' */ +HEAP16[1] = 0x6373; +if (HEAPU8[2] !== 0x73 || HEAPU8[3] !== 0x63) throw 'Runtime error: expected the system to be little-endian!'; + +function callRuntimeCallbacks(callbacks) { + while(callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(); + continue; + } + var func = callback.func; + if (typeof func === 'number') { + if (callback.arg === undefined) { + Module['dynCall_v'](func); + } else { + Module['dynCall_vi'](func, callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the runtime has exited + +var runtimeInitialized = false; +var runtimeExited = false; + + +function preRun() { + // compatibility - merge in anything from Module['preRun'] at this time + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + callRuntimeCallbacks(__ATPRERUN__); +} + +function ensureInitRuntime() { + checkStackCookie(); + if (runtimeInitialized) return; + runtimeInitialized = true; + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + checkStackCookie(); + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + checkStackCookie(); + callRuntimeCallbacks(__ATEXIT__); + runtimeExited = true; +} + +function postRun() { + checkStackCookie(); + // compatibility - merge in anything from Module['postRun'] at this time + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { + __ATEXIT__.unshift(cb); +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +// Deprecated: This function should not be called because it is unsafe and does not provide +// a maximum length limit of how many bytes it is allowed to write. Prefer calling the +// function stringToUTF8Array() instead, which takes in a maximum length that can be used +// to be secure from out of bounds writes. +/** @deprecated */ +function writeStringToMemory(string, buffer, dontAddNull) { + warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); + + var /** @type {number} */ lastChar, /** @type {number} */ end; + if (dontAddNull) { + // stringToUTF8Array always appends null. If we don't want to do that, remember the + // character that existed at the location where the null will be placed, and restore + // that after the write (below). + end = buffer + lengthBytesUTF8(string); + lastChar = HEAP8[end]; + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. +} + +function writeArrayToMemory(array, buffer) { + assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)') + HEAP8.set(array, buffer); +} + +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + assert(str.charCodeAt(i) === str.charCodeAt(i)&0xff); + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); + } + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; +} + +function unSign(value, bits, ignore) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; +} +function reSign(value, bits, ignore) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 + : Math.pow(2, bits-1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + +assert(Math['imul'] && Math['fround'] && Math['clz32'] && Math['trunc'], 'this is a legacy browser, build with LEGACY_VM_SUPPORT'); + +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_fround = Math.fround; +var Math_round = Math.round; +var Math_min = Math.min; +var Math_max = Math.max; +var Math_clz32 = Math.clz32; +var Math_trunc = Math.trunc; + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// PRE_RUN_ADDITIONS (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } + return id; +} + +function addRunDependency(id) { + runDependencies++; + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval !== 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function() { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + Module.printErr('still waiting on run dependencies:'); + } + Module.printErr('dependency: ' + dep); + } + if (shown) { + Module.printErr('(end of list)'); + } + }, 10000); + } + } else { + Module.printErr('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + Module.printErr('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +Module["preloadedImages"] = {}; // maps url to image data +Module["preloadedAudios"] = {}; // maps url to audio data + + + +var memoryInitializer = null; + + + +var /* show errors on likely calls to FS when it was not included */ FS = { + error: function() { + abort('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1'); + }, + init: function() { FS.error() }, + createDataFile: function() { FS.error() }, + createPreloadedFile: function() { FS.error() }, + createLazyFile: function() { FS.error() }, + open: function() { FS.error() }, + mkdev: function() { FS.error() }, + registerDevice: function() { FS.error() }, + analyzePath: function() { FS.error() }, + loadFilesFromDB: function() { FS.error() }, + + ErrnoError: function ErrnoError() { FS.error() }, +}; +Module['FS_createDataFile'] = FS.createDataFile; +Module['FS_createPreloadedFile'] = FS.createPreloadedFile; + + + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + return String.prototype.startsWith ? + filename.startsWith(dataURIPrefix) : + filename.indexOf(dataURIPrefix) === 0; +} + + + + + +// === Body === + +var ASM_CONSTS = []; + + + + +STATIC_BASE = GLOBAL_BASE; + +STATICTOP = STATIC_BASE + 30032; +/* global initializers */ __ATINIT__.push(); + + +memoryInitializer = "data:application/octet-stream;base64,REYAAPBtAABsRgAAUG4AACAAAAAAAAAAbEYAAP1tAAAwAAA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AEAAcACgANAAIABQAIAAsADgAAQANABkAJQAxAAUAEQAdACkANQAJABUAIQAtADkAAgAOABoAJgAyAAYAEgAeACoANgAKABYAIgAuADoAAwAPABsAJwAzAAcAEwAfACsANwALABcAIwAvADsAAAAYADAASABgAAgAIAA4AFAAaAAQACgAQABYAHAABAAcADQATABkAAwAJAA8AFQAbAAUACwARABcAHQAAQAZADEASQBhAAkAIQA5AFEAaQARACkAQQBZAHEABQAdADUATQBlAA0AJQA9AFUAbQAVAC0ARQBdAHUAAgAaADIASgBiAAoAIgA6AFIAagASACoAQgBaAHIABgAeADYATgBmAA4AJgA+AFYAbgAWAC4ARgBeAHYAAwAbADMASwBjAAsAIwA7AFMAawATACsAQwBbAHMABwAfADcATwBnAA8AJwA/AFcAbwAXAC8ARwBfAHcAAAAwAGAAkADAABAAQABwAKAA0AAgAFAAgACwAOAABAA0AGQAlADEABQARAB0AKQA1AAkAFQAhAC0AOQACAA4AGgAmADIABgASAB4AKgA2AAoAFgAiAC4AOgADAA8AGwAnADMABwATAB8AKwA3AAsAFwAjAC8AOwAAQAxAGEAkQDBABEAQQBxAKEA0QAhAFEAgQCxAOEABQA1AGUAlQDFABUARQB1AKUA1QAlAFUAhQC1AOUACQA5AGkAmQDJABkASQB5AKkA2QApAFkAiQC5AOkADQA9AG0AnQDNAB0ATQB9AK0A3QAtAF0AjQC9AO0AAgAyAGIAkgDCABIAQgByAKIA0gAiAFIAggCyAOIABgA2AGYAlgDGABYARgB2AKYA1gAmAFYAhgC2AOYACgA6AGoAmgDKABoASgB6AKoA2gAqAFoAigC6AOoADgA+AG4AngDOAB4ATgB+AK4A3gAuAF4AjgC+AO4AAwAzAGMAkwDDABMAQwBzAKMA0wAjAFMAgwCzAOMABwA3AGcAlwDHABcARwB3AKcA1wAnAFcAhwC3AOcACwA7AGsAmwDLABsASwB7AKsA2wArAFsAiwC7AOsADwA/AG8AnwDPAB8ATwB/AK8A3wAvAF8AjwC/AO8AAABgAMAAIAGAASAAgADgAEABo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3h4YWJpdjEyMF9fc2lfY2xhc3NfdHlwZV9pbmZvRQBOMTBfX2N4eGFiaXYxMTdfX2NsYXNzX3R5cGVfaW5mb0UAc3RkOjpiYWRfYWxsb2MAU3Q5YmFkX2FsbG9jAFN0MTFsb2dpY19lcnJvcgBTdDEybGVuZ3RoX2Vycm9yAE4xMF9fY3h4YWJpdjExOV9fcG9pbnRlcl90eXBlX2luZm9FAE4xMF9fY3h4YWJpdjExN19fcGJhc2VfdHlwZV9pbmZvRQ=="; + + + + + +/* no memory initializer */ +var tempDoublePtr = STATICTOP; STATICTOP += 16; + +assert(tempDoublePtr % 8 == 0); + +function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much + + HEAP8[tempDoublePtr] = HEAP8[ptr]; + + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + +} + +function copyTempDouble(ptr) { + + HEAP8[tempDoublePtr] = HEAP8[ptr]; + + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + + HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; + + HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; + + HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; + + HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; + +} + +// {{PRE_LIBRARY}} + + + function ___cxa_allocate_exception(size) { + return _malloc(size); + } + + function ___cxa_find_matching_catch_2() { + return ___cxa_find_matching_catch.apply(null, arguments); + } + + function ___cxa_free_exception(ptr) { + try { + return _free(ptr); + } catch(e) { // XXX FIXME + Module.printErr('exception during cxa_free_exception: ' + e); + } + } + + + function __ZSt18uncaught_exceptionv() { // std::uncaught_exception() + return !!__ZSt18uncaught_exceptionv.uncaught_exception; + } + + + + var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function (adjusted) { + if (!adjusted || EXCEPTIONS.infos[adjusted]) return adjusted; + for (var ptr in EXCEPTIONS.infos) { + var info = EXCEPTIONS.infos[ptr]; + if (info.adjusted === adjusted) { + return ptr; + } + } + return adjusted; + },addRef:function (ptr) { + if (!ptr) return; + var info = EXCEPTIONS.infos[ptr]; + info.refcount++; + },decRef:function (ptr) { + if (!ptr) return; + var info = EXCEPTIONS.infos[ptr]; + assert(info.refcount > 0); + info.refcount--; + // A rethrown exception can reach refcount 0; it must not be discarded + // Its next handler will clear the rethrown flag and addRef it, prior to + // final decRef and destruction here + if (info.refcount === 0 && !info.rethrown) { + if (info.destructor) { + Module['dynCall_vi'](info.destructor, ptr); + } + delete EXCEPTIONS.infos[ptr]; + ___cxa_free_exception(ptr); + } + },clearRef:function (ptr) { + if (!ptr) return; + var info = EXCEPTIONS.infos[ptr]; + info.refcount = 0; + }}; + function ___resumeException(ptr) { + if (!EXCEPTIONS.last) { EXCEPTIONS.last = ptr; } + throw ptr; + }function ___cxa_find_matching_catch() { + var thrown = EXCEPTIONS.last; + if (!thrown) { + // just pass through the null ptr + return ((setTempRet0(0),0)|0); + } + var info = EXCEPTIONS.infos[thrown]; + var throwntype = info.type; + if (!throwntype) { + // just pass through the thrown ptr + return ((setTempRet0(0),thrown)|0); + } + var typeArray = Array.prototype.slice.call(arguments); + + var pointer = Module['___cxa_is_pointer_type'](throwntype); + // can_catch receives a **, add indirection + if (!___cxa_find_matching_catch.buffer) ___cxa_find_matching_catch.buffer = _malloc(4); + HEAP32[((___cxa_find_matching_catch.buffer)>>2)]=thrown; + thrown = ___cxa_find_matching_catch.buffer; + // The different catch blocks are denoted by different types. + // Due to inheritance, those types may not precisely match the + // type of the thrown object. Find one which matches, and + // return the type of the catch block which should be called. + for (var i = 0; i < typeArray.length; i++) { + if (typeArray[i] && Module['___cxa_can_catch'](typeArray[i], throwntype, thrown)) { + thrown = HEAP32[((thrown)>>2)]; // undo indirection + info.adjusted = thrown; + return ((setTempRet0(typeArray[i]),thrown)|0); + } + } + // Shouldn't happen unless we have bogus data in typeArray + // or encounter a type for which emscripten doesn't have suitable + // typeinfo defined. Best-efforts match just in case. + thrown = HEAP32[((thrown)>>2)]; // undo indirection + return ((setTempRet0(throwntype),thrown)|0); + }function ___cxa_throw(ptr, type, destructor) { + EXCEPTIONS.infos[ptr] = { + ptr: ptr, + adjusted: ptr, + type: type, + destructor: destructor, + refcount: 0, + caught: false, + rethrown: false + }; + EXCEPTIONS.last = ptr; + if (!("uncaught_exception" in __ZSt18uncaught_exceptionv)) { + __ZSt18uncaught_exceptionv.uncaught_exception = 1; + } else { + __ZSt18uncaught_exceptionv.uncaught_exception++; + } + throw ptr; + } + + function ___gxx_personality_v0() { + } + + function ___lock() {} + + + + + + + var SYSCALLS={varargs:0,get:function (varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function () { + var ret = Pointer_stringify(SYSCALLS.get()); + return ret; + },get64:function () { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function () { + assert(SYSCALLS.get() === 0); + }};function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + // NOTE: offset_high is unused - Emscripten's off_t is 32-bit + var offset = offset_low; + FS.llseek(stream, offset, whence); + HEAP32[((result)>>2)]=stream.position; + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + function flush_NO_FILESYSTEM() { + // flush anything remaining in the buffers during shutdown + var fflush = Module["_fflush"]; + if (fflush) fflush(0); + var printChar = ___syscall146.printChar; + if (!printChar) return; + var buffers = ___syscall146.buffers; + if (buffers[1].length) printChar(1, 10); + if (buffers[2].length) printChar(2, 10); + }function ___syscall146(which, varargs) {SYSCALLS.varargs = varargs; + try { + // writev + // hack to support printf in NO_FILESYSTEM + var stream = SYSCALLS.get(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + var ret = 0; + if (!___syscall146.buffers) { + ___syscall146.buffers = [null, [], []]; // 1 => stdout, 2 => stderr + ___syscall146.printChar = function(stream, curr) { + var buffer = ___syscall146.buffers[stream]; + assert(buffer); + if (curr === 0 || curr === 10) { + (stream === 1 ? Module['print'] : Module['printErr'])(UTF8ArrayToString(buffer, 0)); + buffer.length = 0; + } else { + buffer.push(curr); + } + }; + } + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + for (var j = 0; j < len; j++) { + ___syscall146.printChar(stream, HEAPU8[ptr+j]); + } + ret += len; + } + return ret; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs; + try { + // ioctl + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + + + + + + var cttz_i8 = allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0], "i8", ALLOC_STATIC); + + function ___unlock() {} + + + + function _abort() { + Module['abort'](); + } + + + + + + + + + + + + var _llvm_ctlz_i32=true; + + function _llvm_stackrestore(p) { + var self = _llvm_stacksave; + var ret = self.LLVM_SAVEDSTACKS[p]; + self.LLVM_SAVEDSTACKS.splice(p, 1); + stackRestore(ret); + } + + function _llvm_stacksave() { + var self = _llvm_stacksave; + if (!self.LLVM_SAVEDSTACKS) { + self.LLVM_SAVEDSTACKS = []; + } + self.LLVM_SAVEDSTACKS.push(stackSave()); + return self.LLVM_SAVEDSTACKS.length-1; + } + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + return dest; + } + + + + + + + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; + else Module.printErr('failed to set errno from JS'); + return value; + } +DYNAMICTOP_PTR = staticAlloc(4); + +STACK_BASE = STACKTOP = alignMemory(STATICTOP); + +STACK_MAX = STACK_BASE + TOTAL_STACK; + +DYNAMIC_BASE = alignMemory(STACK_MAX); + +HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE; + +staticSealed = true; // seal the static portion of memory + +assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack"); + +var ASSERTIONS = true; + +/** @type {function(string, boolean=, number=)} */ +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + if (ASSERTIONS) { + assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); + } + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} + + +// Copied from https://github.com/strophe/strophejs/blob/e06d027/src/polyfills.js#L149 + +// This code was written by Tyler Akins and has been placed in the +// public domain. It would be nice if you left this header intact. +// Base64 code from Tyler Akins -- http://rumkin.com + +/** + * Decodes a base64 string. + * @param {String} input The string to decode. + */ +var decodeBase64 = typeof atob === 'function' ? atob : function (input) { + var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + var output = ''; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + // remove all characters that are not A-Z, a-z, 0-9, +, /, or = + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); + do { + enc1 = keyStr.indexOf(input.charAt(i++)); + enc2 = keyStr.indexOf(input.charAt(i++)); + enc3 = keyStr.indexOf(input.charAt(i++)); + enc4 = keyStr.indexOf(input.charAt(i++)); + + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + + output = output + String.fromCharCode(chr1); + + if (enc3 !== 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 !== 64) { + output = output + String.fromCharCode(chr3); + } + } while (i < input.length); + return output; +}; + +// Converts a string of base64 into a byte array. +// Throws error on invalid input. +function intArrayFromBase64(s) { + if (typeof ENVIRONMENT_IS_NODE === 'boolean' && ENVIRONMENT_IS_NODE) { + var buf; + try { + buf = Buffer.from(s, 'base64'); + } catch (_) { + buf = new Buffer(s, 'base64'); + } + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + + try { + var decoded = decodeBase64(s); + var bytes = new Uint8Array(decoded.length); + for (var i = 0 ; i < decoded.length ; ++i) { + bytes[i] = decoded.charCodeAt(i); + } + return bytes; + } catch (_) { + throw new Error('Converting base64 string to bytes failed.'); + } +} + +// If filename is a base64 data URI, parses and returns data (Buffer on node, +// Uint8Array otherwise). If filename is not a base64 data URI, returns undefined. +function tryParseAsDataURI(filename) { + if (!isDataURI(filename)) { + return; + } + + return intArrayFromBase64(filename.slice(dataURIPrefix.length)); +} + + + +function nullFunc_ii(x) { Module["printErr"]("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function nullFunc_iiii(x) { Module["printErr"]("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function nullFunc_v(x) { Module["printErr"]("Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function nullFunc_vi(x) { Module["printErr"]("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function nullFunc_vii(x) { Module["printErr"]("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function nullFunc_viiii(x) { Module["printErr"]("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function nullFunc_viiiii(x) { Module["printErr"]("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function nullFunc_viiiiii(x) { Module["printErr"]("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function invoke_ii(index,a1) { + try { + return Module["dynCall_ii"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_iiii(index,a1,a2,a3) { + try { + return Module["dynCall_iiii"](index,a1,a2,a3); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_v(index) { + try { + Module["dynCall_v"](index); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_vi(index,a1) { + try { + Module["dynCall_vi"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_vii(index,a1,a2) { + try { + Module["dynCall_vii"](index,a1,a2); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_viiii(index,a1,a2,a3,a4) { + try { + Module["dynCall_viiii"](index,a1,a2,a3,a4); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_viiiii(index,a1,a2,a3,a4,a5) { + try { + Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6) { + try { + Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity }; + +Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "abortStackOverflow": abortStackOverflow, "nullFunc_ii": nullFunc_ii, "nullFunc_iiii": nullFunc_iiii, "nullFunc_v": nullFunc_v, "nullFunc_vi": nullFunc_vi, "nullFunc_vii": nullFunc_vii, "nullFunc_viiii": nullFunc_viiii, "nullFunc_viiiii": nullFunc_viiiii, "nullFunc_viiiiii": nullFunc_viiiiii, "invoke_ii": invoke_ii, "invoke_iiii": invoke_iiii, "invoke_v": invoke_v, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_viiii": invoke_viiii, "invoke_viiiii": invoke_viiiii, "invoke_viiiiii": invoke_viiiiii, "__ZSt18uncaught_exceptionv": __ZSt18uncaught_exceptionv, "___cxa_allocate_exception": ___cxa_allocate_exception, "___cxa_find_matching_catch": ___cxa_find_matching_catch, "___cxa_find_matching_catch_2": ___cxa_find_matching_catch_2, "___cxa_free_exception": ___cxa_free_exception, "___cxa_throw": ___cxa_throw, "___gxx_personality_v0": ___gxx_personality_v0, "___lock": ___lock, "___resumeException": ___resumeException, "___setErrNo": ___setErrNo, "___syscall140": ___syscall140, "___syscall146": ___syscall146, "___syscall54": ___syscall54, "___syscall6": ___syscall6, "___unlock": ___unlock, "_abort": _abort, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_llvm_stackrestore": _llvm_stackrestore, "_llvm_stacksave": _llvm_stacksave, "flush_NO_FILESYSTEM": flush_NO_FILESYSTEM, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "cttz_i8": cttz_i8 }; +// EMSCRIPTEN_START_ASM +var asm = (/** @suppress {uselessCode} */ function(global, env, buffer) { +'almost asm'; + + + var HEAP8 = new global.Int8Array(buffer); + var HEAP16 = new global.Int16Array(buffer); + var HEAP32 = new global.Int32Array(buffer); + var HEAPU8 = new global.Uint8Array(buffer); + var HEAPU16 = new global.Uint16Array(buffer); + var HEAPU32 = new global.Uint32Array(buffer); + var HEAPF32 = new global.Float32Array(buffer); + var HEAPF64 = new global.Float64Array(buffer); + + var DYNAMICTOP_PTR=env.DYNAMICTOP_PTR|0; + var tempDoublePtr=env.tempDoublePtr|0; + var ABORT=env.ABORT|0; + var STACKTOP=env.STACKTOP|0; + var STACK_MAX=env.STACK_MAX|0; + var cttz_i8=env.cttz_i8|0; + + var __THREW__ = 0; + var threwValue = 0; + var setjmpId = 0; + var undef = 0; + var nan = global.NaN, inf = global.Infinity; + var tempInt = 0, tempBigInt = 0, tempBigIntS = 0, tempValue = 0, tempDouble = 0.0; + var tempRet0 = 0; + + var Math_floor=global.Math.floor; + var Math_abs=global.Math.abs; + var Math_sqrt=global.Math.sqrt; + var Math_pow=global.Math.pow; + var Math_cos=global.Math.cos; + var Math_sin=global.Math.sin; + var Math_tan=global.Math.tan; + var Math_acos=global.Math.acos; + var Math_asin=global.Math.asin; + var Math_atan=global.Math.atan; + var Math_atan2=global.Math.atan2; + var Math_exp=global.Math.exp; + var Math_log=global.Math.log; + var Math_ceil=global.Math.ceil; + var Math_imul=global.Math.imul; + var Math_min=global.Math.min; + var Math_max=global.Math.max; + var Math_clz32=global.Math.clz32; + var abort=env.abort; + var assert=env.assert; + var enlargeMemory=env.enlargeMemory; + var getTotalMemory=env.getTotalMemory; + var abortOnCannotGrowMemory=env.abortOnCannotGrowMemory; + var abortStackOverflow=env.abortStackOverflow; + var nullFunc_ii=env.nullFunc_ii; + var nullFunc_iiii=env.nullFunc_iiii; + var nullFunc_v=env.nullFunc_v; + var nullFunc_vi=env.nullFunc_vi; + var nullFunc_vii=env.nullFunc_vii; + var nullFunc_viiii=env.nullFunc_viiii; + var nullFunc_viiiii=env.nullFunc_viiiii; + var nullFunc_viiiiii=env.nullFunc_viiiiii; + var invoke_ii=env.invoke_ii; + var invoke_iiii=env.invoke_iiii; + var invoke_v=env.invoke_v; + var invoke_vi=env.invoke_vi; + var invoke_vii=env.invoke_vii; + var invoke_viiii=env.invoke_viiii; + var invoke_viiiii=env.invoke_viiiii; + var invoke_viiiiii=env.invoke_viiiiii; + var __ZSt18uncaught_exceptionv=env.__ZSt18uncaught_exceptionv; + var ___cxa_allocate_exception=env.___cxa_allocate_exception; + var ___cxa_find_matching_catch=env.___cxa_find_matching_catch; + var ___cxa_find_matching_catch_2=env.___cxa_find_matching_catch_2; + var ___cxa_free_exception=env.___cxa_free_exception; + var ___cxa_throw=env.___cxa_throw; + var ___gxx_personality_v0=env.___gxx_personality_v0; + var ___lock=env.___lock; + var ___resumeException=env.___resumeException; + var ___setErrNo=env.___setErrNo; + var ___syscall140=env.___syscall140; + var ___syscall146=env.___syscall146; + var ___syscall54=env.___syscall54; + var ___syscall6=env.___syscall6; + var ___unlock=env.___unlock; + var _abort=env._abort; + var _emscripten_memcpy_big=env._emscripten_memcpy_big; + var _llvm_stackrestore=env._llvm_stackrestore; + var _llvm_stacksave=env._llvm_stacksave; + var flush_NO_FILESYSTEM=env.flush_NO_FILESYSTEM; + var tempFloat = 0.0; + +// EMSCRIPTEN_START_FUNCS + +function stackAlloc(size) { + size = size|0; + var ret = 0; + ret = STACKTOP; + STACKTOP = (STACKTOP + size)|0; + STACKTOP = (STACKTOP + 15)&-16; + if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(size|0); + + return ret|0; +} +function stackSave() { + return STACKTOP|0; +} +function stackRestore(top) { + top = top|0; + STACKTOP = top; +} +function establishStackSpace(stackBase, stackMax) { + stackBase = stackBase|0; + stackMax = stackMax|0; + STACKTOP = stackBase; + STACK_MAX = stackMax; +} + +function setThrew(threw, value) { + threw = threw|0; + value = value|0; + if ((__THREW__|0) == 0) { + __THREW__ = threw; + threwValue = value; + } +} + +function setTempRet0(value) { + value = value|0; + tempRet0 = value; +} +function getTempRet0() { + return tempRet0|0; +} + +function _codec_opus_createNativeHandle() { + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $__s$addr$i = 0, $call = 0, $call2 = 0, $call3 = 0, $codec = 0, $decoder = 0, $encoder = 0, $this$addr$i = 0, $this1$i = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $call = (__Znwj(24)|0); + __ZN10OpusHandleC2Ev($call); + $codec = $call; + $0 = $codec; + $this$addr$i = $0; + $__s$addr$i = 20958; + $this1$i = $this$addr$i; + $1 = $__s$addr$i; + (__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc($this1$i,$1)|0); + $call2 = (_opus_decoder_create(48000,1,0)|0); + $2 = $codec; + $decoder = ((($2)) + 16|0); + HEAP32[$decoder>>2] = $call2; + $call3 = (_opus_encoder_create(48000,1,2048,0)|0); + $3 = $codec; + $encoder = ((($3)) + 12|0); + HEAP32[$encoder>>2] = $call3; + $4 = $codec; + STACKTOP = sp;return ($4|0); +} +function __ZN10OpusHandleC2Ev($this) { + $this = $this|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $__a$i$i = 0, $__i$i$i = 0, $arrayidx$i$i = 0, $channelCount = 0, $cmp$i$i = 0, $inc$i$i = 0, $this$addr = 0, $this$addr$i = 0, $this$addr$i$i = 0, $this$addr$i$i$i = 0, $this$addr$i$i$i$i = 0, $this$addr$i$i$i2$i = 0, $this$addr$i$i3$i = 0, $this$addr$i4$i = 0, $this1 = 0, $this1$i = 0; + var $this1$i$i = 0, $this1$i$i$i = 0, $this1$i$i$i7$i = 0, $this1$i$i6$i = 0, $this1$i5$i = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $this$addr = $this; + $this1 = $this$addr; + $this$addr$i = $this1; + $this1$i = $this$addr$i; + $this$addr$i$i = $this1$i; + $this1$i$i = $this$addr$i$i; + $this$addr$i$i$i = $this1$i$i; + $this1$i$i$i = $this$addr$i$i$i; + $this$addr$i$i$i$i = $this1$i$i$i; + ;HEAP32[$this1$i$i$i>>2]=0|0;HEAP32[$this1$i$i$i+4>>2]=0|0;HEAP32[$this1$i$i$i+8>>2]=0|0; + $this$addr$i4$i = $this1$i; + $this1$i5$i = $this$addr$i4$i; + $this$addr$i$i3$i = $this1$i5$i; + $this1$i$i6$i = $this$addr$i$i3$i; + $this$addr$i$i$i2$i = $this1$i$i6$i; + $this1$i$i$i7$i = $this$addr$i$i$i2$i; + $__a$i$i = $this1$i$i$i7$i; + $__i$i$i = 0; + while(1) { + $0 = $__i$i$i; + $cmp$i$i = ($0>>>0)<(3); + if (!($cmp$i$i)) { + break; + } + $1 = $__a$i$i; + $2 = $__i$i$i; + $arrayidx$i$i = (($1) + ($2<<2)|0); + HEAP32[$arrayidx$i$i>>2] = 0; + $3 = $__i$i$i; + $inc$i$i = (($3) + 1)|0; + $__i$i$i = $inc$i$i; + } + $channelCount = ((($this1)) + 20|0); + HEAP32[$channelCount>>2] = 1; + STACKTOP = sp;return; +} +function _printCodecName($codec) { + $codec = $codec|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $__p$addr$i$i$i = 0, $__r$addr$i$i$i$i$i = 0, $__x$addr$i$i$i$i$i$i = 0, $and$i$i$i$i = 0, $codec$addr = 0, $cond$i$i$i = 0, $conv$i$i$i$i = 0, $this$addr$i = 0, $this$addr$i$i = 0, $this$addr$i$i$i = 0, $this$addr$i$i$i$i = 0, $this$addr$i$i$i$i$i = 0, $this$addr$i$i$i$i$i$i = 0; + var $this$addr$i$i$i13$i$i$i = 0, $this$addr$i$i$i4$i$i$i = 0, $this$addr$i$i14$i$i$i = 0, $this$addr$i$i5$i$i$i = 0, $this$addr$i15$i$i$i = 0, $this$addr$i6$i$i$i = 0, $this1$i = 0, $this1$i$i = 0, $this1$i$i$i = 0, $this1$i$i$i$i = 0, $this1$i$i$i$i$i = 0, $this1$i$i$i$i$i$i = 0, $this1$i$i$i10$i$i$i = 0, $this1$i$i$i19$i$i$i = 0, $this1$i$i18$i$i$i = 0, $this1$i$i9$i$i$i = 0, $this1$i16$i$i$i = 0, $this1$i7$i$i$i = 0, $tobool$i$i$i$i = 0, $vararg_buffer = 0; + var label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); + $vararg_buffer = sp; + $codec$addr = $codec; + $0 = $codec$addr; + $this$addr$i = $0; + $this1$i = $this$addr$i; + $this$addr$i$i = $this1$i; + $this1$i$i = $this$addr$i$i; + $this$addr$i$i$i = $this1$i$i; + $this1$i$i$i = $this$addr$i$i$i; + $this$addr$i$i$i$i = $this1$i$i$i; + $this1$i$i$i$i = $this$addr$i$i$i$i; + $this$addr$i$i$i$i$i = $this1$i$i$i$i; + $this1$i$i$i$i$i = $this$addr$i$i$i$i$i; + $this$addr$i$i$i$i$i$i = $this1$i$i$i$i$i; + $this1$i$i$i$i$i$i = $this$addr$i$i$i$i$i$i; + $1 = ((($this1$i$i$i$i$i$i)) + 11|0); + $2 = HEAP8[$1>>0]|0; + $conv$i$i$i$i = $2&255; + $and$i$i$i$i = $conv$i$i$i$i & 128; + $tobool$i$i$i$i = ($and$i$i$i$i|0)!=(0); + if ($tobool$i$i$i$i) { + $this$addr$i15$i$i$i = $this1$i$i$i; + $this1$i16$i$i$i = $this$addr$i15$i$i$i; + $this$addr$i$i14$i$i$i = $this1$i16$i$i$i; + $this1$i$i18$i$i$i = $this$addr$i$i14$i$i$i; + $this$addr$i$i$i13$i$i$i = $this1$i$i18$i$i$i; + $this1$i$i$i19$i$i$i = $this$addr$i$i$i13$i$i$i; + $3 = HEAP32[$this1$i$i$i19$i$i$i>>2]|0; + $cond$i$i$i = $3; + $__p$addr$i$i$i = $cond$i$i$i; + $6 = $__p$addr$i$i$i; + HEAP32[$vararg_buffer>>2] = $6; + (_printf(20970,$vararg_buffer)|0); + STACKTOP = sp;return; + } else { + $this$addr$i6$i$i$i = $this1$i$i$i; + $this1$i7$i$i$i = $this$addr$i6$i$i$i; + $this$addr$i$i5$i$i$i = $this1$i7$i$i$i; + $this1$i$i9$i$i$i = $this$addr$i$i5$i$i$i; + $this$addr$i$i$i4$i$i$i = $this1$i$i9$i$i$i; + $this1$i$i$i10$i$i$i = $this$addr$i$i$i4$i$i$i; + $__r$addr$i$i$i$i$i = $this1$i$i$i10$i$i$i; + $4 = $__r$addr$i$i$i$i$i; + $__x$addr$i$i$i$i$i$i = $4; + $5 = $__x$addr$i$i$i$i$i$i; + $cond$i$i$i = $5; + $__p$addr$i$i$i = $cond$i$i$i; + $6 = $__p$addr$i$i$i; + HEAP32[$vararg_buffer>>2] = $6; + (_printf(20970,$vararg_buffer)|0); + STACKTOP = sp;return; + } +} +function _codec_opus_encode($handle,$buffer,$length) { + $handle = $handle|0; + $buffer = $buffer|0; + $length = $length|0; + var $0 = 0, $buffer$addr = 0, $handle$addr = 0, $length$addr = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $handle$addr = $handle; + $buffer$addr = $buffer; + $length$addr = $length; + $0 = $length$addr; + HEAP32[$vararg_buffer>>2] = $0; + (_printf(20986,$vararg_buffer)|0); + STACKTOP = sp;return -1; +} +function _codec_opus_decode($handle,$buffer,$length,$maxLength) { + $handle = $handle|0; + $buffer = $buffer|0; + $length = $length|0; + $maxLength = $maxLength|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $buffer$addr = 0, $call = 0, $channelCount = 0, $decoder = 0, $div = 0, $div1 = 0, $handle$addr = 0, $length$addr = 0, $maxLength$addr = 0, $result = 0; + var $retval = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $handle$addr = $handle; + $buffer$addr = $buffer; + $length$addr = $length; + $maxLength$addr = $maxLength; + $0 = $handle$addr; + $decoder = ((($0)) + 16|0); + $1 = HEAP32[$decoder>>2]|0; + $2 = $buffer$addr; + $3 = $length$addr; + $4 = $buffer$addr; + $5 = $maxLength$addr; + $div = (($5>>>0) / 4)&-1; + $6 = $handle$addr; + $channelCount = ((($6)) + 20|0); + $7 = HEAP32[$channelCount>>2]|0; + $div1 = (($div>>>0) / ($7>>>0))&-1; + $call = (_opus_decode_float($1,$2,$3,$4,$div1,0)|0); + $result = $call; + $8 = $result; + $retval = $8; + $9 = $retval; + STACKTOP = sp;return ($9|0); +} +function _opus_decoder_get_size($channels) { + $channels = $channels|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $add = 0, $add7 = 0, $call = 0, $call4 = 0, $call5 = 0, $call6 = 0, $celtDecSizeBytes = 0, $channels$addr = 0, $cmp = 0, $cmp1 = 0, $or$cond = 0, $ret = 0; + var $retval = 0, $silkDecSizeBytes = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $silkDecSizeBytes = sp + 8|0; + $channels$addr = $channels; + $0 = $channels$addr; + $cmp = ($0|0)<(1); + $1 = $channels$addr; + $cmp1 = ($1|0)>(2); + $or$cond = $cmp | $cmp1; + if ($or$cond) { + $retval = 0; + $7 = $retval; + STACKTOP = sp;return ($7|0); + } + $call = (_silk_Get_Decoder_Size($silkDecSizeBytes)|0); + $ret = $call; + $2 = $ret; + $tobool = ($2|0)!=(0); + if ($tobool) { + $retval = 0; + $7 = $retval; + STACKTOP = sp;return ($7|0); + } else { + $3 = HEAP32[$silkDecSizeBytes>>2]|0; + $call4 = (_align($3)|0); + HEAP32[$silkDecSizeBytes>>2] = $call4; + $4 = $channels$addr; + $call5 = (_celt_decoder_get_size($4)|0); + $celtDecSizeBytes = $call5; + $call6 = (_align(88)|0); + $5 = HEAP32[$silkDecSizeBytes>>2]|0; + $add = (($call6) + ($5))|0; + $6 = $celtDecSizeBytes; + $add7 = (($add) + ($6))|0; + $retval = $add7; + $7 = $retval; + STACKTOP = sp;return ($7|0); + } + return (0)|0; +} +function _align($i) { + $i = $i|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $add = 0, $alignment = 0, $div = 0, $i$addr = 0, $mul = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $i$addr = $i; + $alignment = 4; + $0 = $i$addr; + $1 = $alignment; + $add = (($0) + ($1))|0; + $sub = (($add) - 1)|0; + $2 = $alignment; + $div = (($sub>>>0) / ($2>>>0))&-1; + $3 = $alignment; + $mul = Math_imul($div, $3)|0; + STACKTOP = sp;return ($mul|0); +} +function _opus_decoder_init($st,$Fs,$channels) { + $st = $st|0; + $Fs = $Fs|0; + $channels = $channels|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $API_sampleRate = 0, $DecControl = 0, $DecControl24 = 0, $Fs$addr = 0, $Fs21 = 0, $Fs22 = 0, $add = 0, $add$ptr = 0, $add$ptr19 = 0, $arch = 0, $call = 0, $call11 = 0, $call14 = 0, $call15 = 0, $call25 = 0; + var $call29 = 0, $call34 = 0, $celt_dec = 0, $channels$addr = 0, $channels20 = 0, $channels23 = 0, $cmp = 0, $cmp1 = 0, $cmp10 = 0, $cmp3 = 0, $cmp30 = 0, $cmp5 = 0, $cmp7 = 0, $cmp8 = 0, $div = 0, $frame_size = 0, $mul = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0; + var $or$cond3 = 0, $or$cond4 = 0, $prev_mode = 0, $ret = 0, $retval = 0, $silkDecSizeBytes = 0, $silk_dec = 0, $silk_dec_offset = 0, $silk_dec_offset16 = 0, $silk_dec_offset17 = 0, $st$addr = 0, $stream_channels = 0, $tobool = 0, $tobool26 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $vararg_buffer = sp; + $silkDecSizeBytes = sp + 4|0; + $st$addr = $st; + $Fs$addr = $Fs; + $channels$addr = $channels; + $0 = $Fs$addr; + $cmp = ($0|0)!=(48000); + $1 = $Fs$addr; + $cmp1 = ($1|0)!=(24000); + $or$cond = $cmp & $cmp1; + $2 = $Fs$addr; + $cmp3 = ($2|0)!=(16000); + $or$cond1 = $or$cond & $cmp3; + $3 = $Fs$addr; + $cmp5 = ($3|0)!=(12000); + $or$cond2 = $or$cond1 & $cmp5; + $4 = $Fs$addr; + $cmp7 = ($4|0)!=(8000); + $or$cond3 = $or$cond2 & $cmp7; + if (!($or$cond3)) { + $5 = $channels$addr; + $cmp8 = ($5|0)!=(1); + $6 = $channels$addr; + $cmp10 = ($6|0)!=(2); + $or$cond4 = $cmp8 & $cmp10; + if (!($or$cond4)) { + $7 = $st$addr; + $8 = $channels$addr; + $call = (_opus_decoder_get_size($8)|0); + $mul = $call; + _memset(($7|0),0,($mul|0))|0; + $call11 = (_silk_Get_Decoder_Size($silkDecSizeBytes)|0); + $ret = $call11; + $9 = $ret; + $tobool = ($9|0)!=(0); + if ($tobool) { + $retval = -3; + $44 = $retval; + STACKTOP = sp;return ($44|0); + } + $10 = HEAP32[$silkDecSizeBytes>>2]|0; + $call14 = (_align($10)|0); + HEAP32[$silkDecSizeBytes>>2] = $call14; + $call15 = (_align(88)|0); + $11 = $st$addr; + $silk_dec_offset = ((($11)) + 4|0); + HEAP32[$silk_dec_offset>>2] = $call15; + $12 = $st$addr; + $silk_dec_offset16 = ((($12)) + 4|0); + $13 = HEAP32[$silk_dec_offset16>>2]|0; + $14 = HEAP32[$silkDecSizeBytes>>2]|0; + $add = (($13) + ($14))|0; + $15 = $st$addr; + HEAP32[$15>>2] = $add; + $16 = $st$addr; + $17 = $st$addr; + $silk_dec_offset17 = ((($17)) + 4|0); + $18 = HEAP32[$silk_dec_offset17>>2]|0; + $add$ptr = (($16) + ($18)|0); + $silk_dec = $add$ptr; + $19 = $st$addr; + $20 = $st$addr; + $21 = HEAP32[$20>>2]|0; + $add$ptr19 = (($19) + ($21)|0); + $celt_dec = $add$ptr19; + $22 = $channels$addr; + $23 = $st$addr; + $channels20 = ((($23)) + 8|0); + HEAP32[$channels20>>2] = $22; + $24 = $st$addr; + $stream_channels = ((($24)) + 48|0); + HEAP32[$stream_channels>>2] = $22; + $25 = $Fs$addr; + $26 = $st$addr; + $Fs21 = ((($26)) + 12|0); + HEAP32[$Fs21>>2] = $25; + $27 = $st$addr; + $Fs22 = ((($27)) + 12|0); + $28 = HEAP32[$Fs22>>2]|0; + $29 = $st$addr; + $DecControl = ((($29)) + 16|0); + $API_sampleRate = ((($DecControl)) + 8|0); + HEAP32[$API_sampleRate>>2] = $28; + $30 = $st$addr; + $channels23 = ((($30)) + 8|0); + $31 = HEAP32[$channels23>>2]|0; + $32 = $st$addr; + $DecControl24 = ((($32)) + 16|0); + HEAP32[$DecControl24>>2] = $31; + $33 = $silk_dec; + $call25 = (_silk_InitDecoder($33)|0); + $ret = $call25; + $34 = $ret; + $tobool26 = ($34|0)!=(0); + if ($tobool26) { + $retval = -3; + $44 = $retval; + STACKTOP = sp;return ($44|0); + } + $35 = $celt_dec; + $36 = $Fs$addr; + $37 = $channels$addr; + $call29 = (_celt_decoder_init($35,$36,$37)|0); + $ret = $call29; + $38 = $ret; + $cmp30 = ($38|0)!=(0); + if ($cmp30) { + $retval = -3; + $44 = $retval; + STACKTOP = sp;return ($44|0); + } else { + $39 = $celt_dec; + HEAP32[$vararg_buffer>>2] = 0; + (_opus_custom_decoder_ctl($39,10016,$vararg_buffer)|0); + $40 = $st$addr; + $prev_mode = ((($40)) + 60|0); + HEAP32[$prev_mode>>2] = 0; + $41 = $Fs$addr; + $div = (($41|0) / 400)&-1; + $42 = $st$addr; + $frame_size = ((($42)) + 64|0); + HEAP32[$frame_size>>2] = $div; + $call34 = (_opus_select_arch()|0); + $43 = $st$addr; + $arch = ((($43)) + 44|0); + HEAP32[$arch>>2] = $call34; + $retval = 0; + $44 = $retval; + STACKTOP = sp;return ($44|0); + } + } + } + $retval = -1; + $44 = $retval; + STACKTOP = sp;return ($44|0); +} +function _opus_select_arch() { + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function _opus_decoder_create($Fs,$channels,$error) { + $Fs = $Fs|0; + $channels = $channels|0; + $error = $error|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; + var $7 = 0, $8 = 0, $9 = 0, $Fs$addr = 0, $call = 0, $call13 = 0, $call20 = 0, $channels$addr = 0, $cmp = 0, $cmp1 = 0, $cmp10 = 0, $cmp14 = 0, $cmp24 = 0, $cmp3 = 0, $cmp5 = 0, $cmp7 = 0, $cmp8 = 0, $error$addr = 0, $or$cond = 0, $or$cond1 = 0; + var $or$cond2 = 0, $or$cond3 = 0, $or$cond4 = 0, $ret = 0, $retval = 0, $st = 0, $tobool = 0, $tobool16 = 0, $tobool21 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $Fs$addr = $Fs; + $channels$addr = $channels; + $error$addr = $error; + $0 = $Fs$addr; + $cmp = ($0|0)!=(48000); + $1 = $Fs$addr; + $cmp1 = ($1|0)!=(24000); + $or$cond = $cmp & $cmp1; + $2 = $Fs$addr; + $cmp3 = ($2|0)!=(16000); + $or$cond1 = $or$cond & $cmp3; + $3 = $Fs$addr; + $cmp5 = ($3|0)!=(12000); + $or$cond2 = $or$cond1 & $cmp5; + $4 = $Fs$addr; + $cmp7 = ($4|0)!=(8000); + $or$cond3 = $or$cond2 & $cmp7; + if (!($or$cond3)) { + $5 = $channels$addr; + $cmp8 = ($5|0)!=(1); + $6 = $channels$addr; + $cmp10 = ($6|0)!=(2); + $or$cond4 = $cmp8 & $cmp10; + if (!($or$cond4)) { + $9 = $channels$addr; + $call = (_opus_decoder_get_size($9)|0); + $call13 = (_opus_alloc($call)|0); + $st = $call13; + $10 = $st; + $cmp14 = ($10|0)==(0|0); + if ($cmp14) { + $11 = $error$addr; + $tobool16 = ($11|0)!=(0|0); + if ($tobool16) { + $12 = $error$addr; + HEAP32[$12>>2] = -7; + } + $retval = 0; + $22 = $retval; + STACKTOP = sp;return ($22|0); + } + $13 = $st; + $14 = $Fs$addr; + $15 = $channels$addr; + $call20 = (_opus_decoder_init($13,$14,$15)|0); + $ret = $call20; + $16 = $error$addr; + $tobool21 = ($16|0)!=(0|0); + if ($tobool21) { + $17 = $ret; + $18 = $error$addr; + HEAP32[$18>>2] = $17; + } + $19 = $ret; + $cmp24 = ($19|0)!=(0); + if ($cmp24) { + $20 = $st; + _opus_free($20); + $st = 0; + } + $21 = $st; + $retval = $21; + $22 = $retval; + STACKTOP = sp;return ($22|0); + } + } + $7 = $error$addr; + $tobool = ($7|0)!=(0|0); + if ($tobool) { + $8 = $error$addr; + HEAP32[$8>>2] = -1; + } + $retval = 0; + $22 = $retval; + STACKTOP = sp;return ($22|0); +} +function _opus_alloc($size) { + $size = $size|0; + var $0 = 0, $call = 0, $size$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $size$addr = $size; + $0 = $size$addr; + $call = (_malloc($0)|0); + STACKTOP = sp;return ($call|0); +} +function _opus_free($ptr) { + $ptr = $ptr|0; + var $0 = 0, $ptr$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $ptr$addr = $ptr; + $0 = $ptr$addr; + _free($0); + STACKTOP = sp;return; +} +function _opus_decode_native($st,$data,$len,$pcm,$frame_size,$decode_fec,$self_delimited,$packet_offset,$soft_clip) { + $st = $st|0; + $data = $data|0; + $len = $len|0; + $pcm = $pcm|0; + $frame_size = $frame_size|0; + $decode_fec = $decode_fec|0; + $self_delimited = $self_delimited|0; + $packet_offset = $packet_offset|0; + $soft_clip = $soft_clip|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; + var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; + var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0; + var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0; + var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0; + var $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $Fs = 0, $Fs30 = 0, $add = 0, $add$ptr = 0, $add$ptr105 = 0, $add$ptr37 = 0, $add$ptr65 = 0, $add$ptr96 = 0, $add106 = 0, $arrayidx103 = 0, $arrayidx121 = 0, $arrayidx92 = 0; + var $bandwidth = 0, $bandwidth86 = 0, $call = 0, $call28 = 0, $call29 = 0, $call31 = 0, $call32 = 0, $call33 = 0, $call47 = 0, $call54 = 0, $call66 = 0, $call98 = 0, $channels = 0, $channels117 = 0, $channels62 = 0, $channels94 = 0, $cmp = 0, $cmp1 = 0, $cmp11 = 0, $cmp13 = 0; + var $cmp16 = 0, $cmp24 = 0, $cmp3 = 0, $cmp34 = 0, $cmp41 = 0, $cmp43 = 0, $cmp45 = 0, $cmp5 = 0, $cmp51 = 0, $cmp55 = 0, $cmp6 = 0, $cmp67 = 0, $cmp81 = 0, $cmp89 = 0, $cmp9 = 0, $cmp99 = 0, $conv = 0, $conv104 = 0, $conv93 = 0, $count = 0; + var $data$addr = 0, $decode_fec$addr = 0, $div = 0, $duration_copy = 0, $frame_size$addr = 0, $frame_size61 = 0, $frame_size87 = 0, $i = 0, $inc = 0, $last_packet_duration = 0, $last_packet_duration107 = 0, $last_packet_duration49 = 0, $last_packet_duration57 = 0, $last_packet_duration78 = 0, $len$addr = 0, $mode = 0, $mode60 = 0, $mode85 = 0, $mul = 0, $mul64 = 0; + var $mul80 = 0, $mul95 = 0, $nb_samples = 0, $offset = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $or$cond3 = 0, $or$cond4 = 0, $packet_bandwidth = 0, $packet_frame_size = 0, $packet_mode = 0, $packet_offset$addr = 0, $packet_stream_channels = 0, $pcm$addr = 0, $pcm_count = 0, $rem = 0, $ret = 0, $ret40 = 0, $ret91 = 0; + var $retval = 0, $self_delimited$addr = 0, $size = 0, $soft_clip$addr = 0, $softclip_mem = 0, $softclip_mem120 = 0, $softclip_mem122 = 0, $st$addr = 0, $stream_channels = 0, $stream_channels88 = 0, $sub = 0, $sub50 = 0, $sub53 = 0, $sub63 = 0, $sub97 = 0, $tobool = 0, $tobool115 = 0, $tobool38 = 0, $toc = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 208|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(208|0); + $offset = sp + 36|0; + $toc = sp + 192|0; + $size = sp + 96|0; + $st$addr = $st; + $data$addr = $data; + $len$addr = $len; + $pcm$addr = $pcm; + $frame_size$addr = $frame_size; + $decode_fec$addr = $decode_fec; + $self_delimited$addr = $self_delimited; + $packet_offset$addr = $packet_offset; + $soft_clip$addr = $soft_clip; + $0 = $decode_fec$addr; + $cmp = ($0|0)<(0); + $1 = $decode_fec$addr; + $cmp1 = ($1|0)>(1); + $or$cond = $cmp | $cmp1; + if ($or$cond) { + $retval = -1; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + $2 = $decode_fec$addr; + $tobool = ($2|0)!=(0); + $3 = $len$addr; + $cmp3 = ($3|0)==(0); + $or$cond1 = $tobool | $cmp3; + $4 = $data$addr; + $cmp5 = ($4|0)==(0|0); + $or$cond2 = $or$cond1 | $cmp5; + if ($or$cond2) { + $5 = $frame_size$addr; + $6 = $st$addr; + $Fs = ((($6)) + 12|0); + $7 = HEAP32[$Fs>>2]|0; + $div = (($7|0) / 400)&-1; + $rem = (($5|0) % ($div|0))&-1; + $cmp6 = ($rem|0)!=(0); + if ($cmp6) { + $retval = -1; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + } + $8 = $len$addr; + $cmp9 = ($8|0)==(0); + $9 = $data$addr; + $cmp11 = ($9|0)==(0|0); + $or$cond3 = $cmp9 | $cmp11; + if ($or$cond3) { + $pcm_count = 0; + while(1) { + $10 = $st$addr; + $11 = $pcm$addr; + $12 = $pcm_count; + $13 = $st$addr; + $channels = ((($13)) + 8|0); + $14 = HEAP32[$channels>>2]|0; + $mul = Math_imul($12, $14)|0; + $add$ptr = (($11) + ($mul<<2)|0); + $15 = $frame_size$addr; + $16 = $pcm_count; + $sub = (($15) - ($16))|0; + $call = (_opus_decode_frame($10,0,0,$add$ptr,$sub,0)|0); + $ret = $call; + $17 = $ret; + $cmp13 = ($17|0)<(0); + $18 = $ret; + if ($cmp13) { + label = 9; + break; + } + $19 = $pcm_count; + $add = (($19) + ($18))|0; + $pcm_count = $add; + $20 = $pcm_count; + $21 = $frame_size$addr; + $cmp16 = ($20|0)<($21|0); + if (!($cmp16)) { + label = 11; + break; + } + } + if ((label|0) == 9) { + $retval = $18; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + else if ((label|0) == 11) { + (__opus_false()|0); + $22 = $pcm_count; + $23 = $st$addr; + $last_packet_duration = ((($23)) + 72|0); + HEAP32[$last_packet_duration>>2] = $22; + $24 = $pcm_count; + $retval = $24; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + } + $25 = $len$addr; + $cmp24 = ($25|0)<(0); + if ($cmp24) { + $retval = -1; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + $26 = $data$addr; + $call28 = (_opus_packet_get_mode($26)|0); + $packet_mode = $call28; + $27 = $data$addr; + $call29 = (_opus_packet_get_bandwidth($27)|0); + $packet_bandwidth = $call29; + $28 = $data$addr; + $29 = $st$addr; + $Fs30 = ((($29)) + 12|0); + $30 = HEAP32[$Fs30>>2]|0; + $call31 = (_opus_packet_get_samples_per_frame($28,$30)|0); + $packet_frame_size = $call31; + $31 = $data$addr; + $call32 = (_opus_packet_get_nb_channels($31)|0); + $packet_stream_channels = $call32; + $32 = $data$addr; + $33 = $len$addr; + $34 = $self_delimited$addr; + $35 = $packet_offset$addr; + $call33 = (_opus_packet_parse_impl($32,$33,$34,$toc,0,$size,$offset,$35)|0); + $count = $call33; + $36 = $count; + $cmp34 = ($36|0)<(0); + if ($cmp34) { + $37 = $count; + $retval = $37; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + $38 = HEAP32[$offset>>2]|0; + $39 = $data$addr; + $add$ptr37 = (($39) + ($38)|0); + $data$addr = $add$ptr37; + $40 = $decode_fec$addr; + $tobool38 = ($40|0)!=(0); + if ($tobool38) { + $41 = $frame_size$addr; + $42 = $packet_frame_size; + $cmp41 = ($41|0)<($42|0); + $43 = $packet_mode; + $cmp43 = ($43|0)==(1002); + $or$cond4 = $cmp41 | $cmp43; + if (!($or$cond4)) { + $44 = $st$addr; + $mode = ((($44)) + 56|0); + $45 = HEAP32[$mode>>2]|0; + $cmp45 = ($45|0)==(1002); + if (!($cmp45)) { + $50 = $st$addr; + $last_packet_duration49 = ((($50)) + 72|0); + $51 = HEAP32[$last_packet_duration49>>2]|0; + $duration_copy = $51; + $52 = $frame_size$addr; + $53 = $packet_frame_size; + $sub50 = (($52) - ($53))|0; + $cmp51 = ($sub50|0)!=(0); + if ($cmp51) { + $54 = $st$addr; + $55 = $pcm$addr; + $56 = $frame_size$addr; + $57 = $packet_frame_size; + $sub53 = (($56) - ($57))|0; + $58 = $soft_clip$addr; + $call54 = (_opus_decode_native($54,0,0,$55,$sub53,0,0,0,$58)|0); + $ret40 = $call54; + $59 = $ret40; + $cmp55 = ($59|0)<(0); + if ($cmp55) { + $60 = $duration_copy; + $61 = $st$addr; + $last_packet_duration57 = ((($61)) + 72|0); + HEAP32[$last_packet_duration57>>2] = $60; + $62 = $ret40; + $retval = $62; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + } + $63 = $packet_mode; + $64 = $st$addr; + $mode60 = ((($64)) + 56|0); + HEAP32[$mode60>>2] = $63; + $65 = $packet_bandwidth; + $66 = $st$addr; + $bandwidth = ((($66)) + 52|0); + HEAP32[$bandwidth>>2] = $65; + $67 = $packet_frame_size; + $68 = $st$addr; + $frame_size61 = ((($68)) + 64|0); + HEAP32[$frame_size61>>2] = $67; + $69 = $packet_stream_channels; + $70 = $st$addr; + $stream_channels = ((($70)) + 48|0); + HEAP32[$stream_channels>>2] = $69; + $71 = $st$addr; + $72 = $data$addr; + $73 = HEAP16[$size>>1]|0; + $conv = $73 << 16 >> 16; + $74 = $pcm$addr; + $75 = $st$addr; + $channels62 = ((($75)) + 8|0); + $76 = HEAP32[$channels62>>2]|0; + $77 = $frame_size$addr; + $78 = $packet_frame_size; + $sub63 = (($77) - ($78))|0; + $mul64 = Math_imul($76, $sub63)|0; + $add$ptr65 = (($74) + ($mul64<<2)|0); + $79 = $packet_frame_size; + $call66 = (_opus_decode_frame($71,$72,$conv,$add$ptr65,$79,1)|0); + $ret40 = $call66; + $80 = $ret40; + $cmp67 = ($80|0)<(0); + if ($cmp67) { + $81 = $ret40; + $retval = $81; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } else { + (__opus_false()|0); + $82 = $frame_size$addr; + $83 = $st$addr; + $last_packet_duration78 = ((($83)) + 72|0); + HEAP32[$last_packet_duration78>>2] = $82; + $84 = $frame_size$addr; + $retval = $84; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + } + } + $46 = $st$addr; + $47 = $pcm$addr; + $48 = $frame_size$addr; + $49 = $soft_clip$addr; + $call47 = (_opus_decode_native($46,0,0,$47,$48,0,0,0,$49)|0); + $retval = $call47; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + $85 = $count; + $86 = $packet_frame_size; + $mul80 = Math_imul($85, $86)|0; + $87 = $frame_size$addr; + $cmp81 = ($mul80|0)>($87|0); + if ($cmp81) { + $retval = -2; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + $88 = $packet_mode; + $89 = $st$addr; + $mode85 = ((($89)) + 56|0); + HEAP32[$mode85>>2] = $88; + $90 = $packet_bandwidth; + $91 = $st$addr; + $bandwidth86 = ((($91)) + 52|0); + HEAP32[$bandwidth86>>2] = $90; + $92 = $packet_frame_size; + $93 = $st$addr; + $frame_size87 = ((($93)) + 64|0); + HEAP32[$frame_size87>>2] = $92; + $94 = $packet_stream_channels; + $95 = $st$addr; + $stream_channels88 = ((($95)) + 48|0); + HEAP32[$stream_channels88>>2] = $94; + $nb_samples = 0; + $i = 0; + while(1) { + $96 = $i; + $97 = $count; + $cmp89 = ($96|0)<($97|0); + if (!($cmp89)) { + break; + } + $98 = $st$addr; + $99 = $data$addr; + $100 = $i; + $arrayidx92 = (($size) + ($100<<1)|0); + $101 = HEAP16[$arrayidx92>>1]|0; + $conv93 = $101 << 16 >> 16; + $102 = $pcm$addr; + $103 = $nb_samples; + $104 = $st$addr; + $channels94 = ((($104)) + 8|0); + $105 = HEAP32[$channels94>>2]|0; + $mul95 = Math_imul($103, $105)|0; + $add$ptr96 = (($102) + ($mul95<<2)|0); + $106 = $frame_size$addr; + $107 = $nb_samples; + $sub97 = (($106) - ($107))|0; + $call98 = (_opus_decode_frame($98,$99,$conv93,$add$ptr96,$sub97,0)|0); + $ret91 = $call98; + $108 = $ret91; + $cmp99 = ($108|0)<(0); + if ($cmp99) { + label = 31; + break; + } + $110 = $i; + $arrayidx103 = (($size) + ($110<<1)|0); + $111 = HEAP16[$arrayidx103>>1]|0; + $conv104 = $111 << 16 >> 16; + $112 = $data$addr; + $add$ptr105 = (($112) + ($conv104)|0); + $data$addr = $add$ptr105; + $113 = $ret91; + $114 = $nb_samples; + $add106 = (($114) + ($113))|0; + $nb_samples = $add106; + $115 = $i; + $inc = (($115) + 1)|0; + $i = $inc; + } + if ((label|0) == 31) { + $109 = $ret91; + $retval = $109; + $127 = $retval; + STACKTOP = sp;return ($127|0); + } + $116 = $nb_samples; + $117 = $st$addr; + $last_packet_duration107 = ((($117)) + 72|0); + HEAP32[$last_packet_duration107>>2] = $116; + (__opus_false()|0); + $118 = $soft_clip$addr; + $tobool115 = ($118|0)!=(0); + if ($tobool115) { + $119 = $pcm$addr; + $120 = $nb_samples; + $121 = $st$addr; + $channels117 = ((($121)) + 8|0); + $122 = HEAP32[$channels117>>2]|0; + $123 = $st$addr; + $softclip_mem = ((($123)) + 76|0); + _opus_pcm_soft_clip($119,$120,$122,$softclip_mem); + } else { + $124 = $st$addr; + $softclip_mem120 = ((($124)) + 76|0); + $arrayidx121 = ((($softclip_mem120)) + 4|0); + HEAPF32[$arrayidx121>>2] = 0.0; + $125 = $st$addr; + $softclip_mem122 = ((($125)) + 76|0); + HEAPF32[$softclip_mem122>>2] = 0.0; + } + $126 = $nb_samples; + $retval = $126; + $127 = $retval; + STACKTOP = sp;return ($127|0); +} +function _opus_decode_frame($st,$data,$len,$pcm,$frame_size,$decode_fec) { + $st = $st|0; + $data = $data|0; + $len = $len|0; + $pcm = $pcm|0; + $frame_size = $frame_size|0; + $decode_fec = $decode_fec|0; + var $$ = 0, $$12 = 0, $$sink = 0, $$sink11 = 0, $$sink2 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0; + var $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0; + var $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0; + var $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0; + var $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0; + var $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0; + var $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0; + var $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0; + var $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0; + var $256 = 0.0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0; + var $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0; + var $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0.0, $306 = 0, $307 = 0, $308 = 0, $309 = 0; + var $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0; + var $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0.0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0; + var $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0; + var $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0.0, $38 = 0, $380 = 0.0, $381 = 0.0; + var $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0; + var $40 = 0, $400 = 0, $401 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0; + var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0; + var $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0; + var $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $DecControl = 0, $DecControl133 = 0, $DecControl138 = 0, $DecControl170 = 0, $F10 = 0, $F20 = 0, $F2_5 = 0, $F5 = 0, $Fs = 0, $Fs121 = 0, $Fs127 = 0, $Fs4 = 0, $Fs413 = 0; + var $Fs452 = 0, $Fs480 = 0, $Fs483 = 0, $Fs7 = 0, $add = 0, $add$ptr = 0, $add$ptr1 = 0, $add$ptr191 = 0, $add$ptr293 = 0, $add$ptr295 = 0, $add$ptr384 = 0, $add$ptr393 = 0, $add$ptr399 = 0, $add$ptr404 = 0, $add$ptr407 = 0, $add$ptr41 = 0, $add$ptr411 = 0, $add$ptr444 = 0, $add$ptr447 = 0, $add$ptr450 = 0; + var $add$ptr472 = 0, $add$ptr475 = 0, $add$ptr478 = 0, $add206 = 0, $add211 = 0, $add229 = 0, $add232 = 0, $add374 = 0.0, $add430 = 0, $add434 = 0, $arch = 0, $arrayidx = 0, $arrayidx182 = 0, $arrayidx338 = 0, $arrayidx369 = 0, $arrayidx370 = 0, $arrayidx375 = 0, $arrayidx431 = 0, $arrayidx435 = 0, $arrayidx465 = 0; + var $arrayidx466 = 0, $arrayidx501 = 0, $arrayidx503 = 0, $audiosize = 0, $bandwidth = 0, $bandwidth140 = 0, $bandwidth251 = 0, $c = 0, $call = 0, $call171 = 0, $call205 = 0, $call219 = 0, $call224 = 0, $call228 = 0, $call231 = 0, $call239 = 0, $call328 = 0, $call493 = 0.0, $celt_accum = 0, $celt_dec = 0; + var $celt_frame_size = 0, $celt_mode = 0, $celt_ret = 0, $celt_to_silk = 0, $channels = 0, $channels107 = 0, $channels177 = 0, $channels189 = 0, $channels282 = 0, $channels333 = 0, $channels364 = 0, $channels39 = 0, $channels401 = 0, $channels405 = 0, $channels408 = 0, $channels412 = 0, $channels420 = 0, $channels428 = 0, $channels432 = 0, $channels442 = 0; + var $channels445 = 0, $channels448 = 0, $channels451 = 0, $channels460 = 0, $channels470 = 0, $channels473 = 0, $channels476 = 0, $channels479 = 0, $channels482 = 0, $channels496 = 0, $channels76 = 0, $cleanup$dest$slot = 0, $cmp = 0, $cmp10 = 0, $cmp102 = 0, $cmp113 = 0, $cmp116 = 0, $cmp123 = 0, $cmp13 = 0, $cmp131 = 0; + var $cmp134 = 0, $cmp136 = 0, $cmp141 = 0, $cmp162 = 0, $cmp169 = 0, $cmp179 = 0, $cmp193 = 0, $cmp199 = 0, $cmp20 = 0, $cmp202 = 0, $cmp208 = 0, $cmp213 = 0, $cmp216 = 0, $cmp225 = 0, $cmp24 = 0, $cmp240 = 0, $cmp247 = 0, $cmp269 = 0, $cmp27 = 0, $cmp272 = 0; + var $cmp29 = 0, $cmp301 = 0, $cmp304 = 0, $cmp31 = 0, $cmp311 = 0, $cmp315 = 0, $cmp335 = 0, $cmp344 = 0, $cmp358 = 0, $cmp36 = 0, $cmp366 = 0, $cmp42 = 0, $cmp421 = 0, $cmp425 = 0, $cmp44 = 0, $cmp456 = 0, $cmp46 = 0, $cmp462 = 0, $cmp49 = 0, $cmp498 = 0; + var $cmp50 = 0, $cmp508 = 0, $cmp518 = 0, $cmp52 = 0, $cmp529 = 0, $cmp59 = 0, $cmp6 = 0, $cmp62 = 0, $cmp64 = 0, $cmp67 = 0, $cmp69 = 0, $cmp72 = 0, $cmp74 = 0, $cmp85 = 0, $cmp87 = 0, $cmp94 = 0, $cmp98 = 0, $cond = 0, $cond106 = 0, $cond111 = 0; + var $cond130 = 0, $cond167 = 0, $cond18 = 0, $cond236 = 0, $cond277 = 0, $cond286 = 0, $cond309 = 0, $cond327 = 0, $cond35 = 0, $cond534 = 0, $cond91 = 0, $conv = 0, $conv209 = 0, $conv371 = 0, $conv372 = 0.0, $conv489 = 0.0, $conv491 = 0.0, $conv494 = 0.0, $data$addr = 0, $dec = 0; + var $decode_fec$addr = 0, $decode_gain = 0, $decode_gain488 = 0, $decoded_samples = 0, $div = 0, $div122 = 0, $div128 = 0, $div5 = 0, $div8 = 0, $endband = 0, $first_frame = 0, $frame_size$addr = 0, $frame_size12 = 0, $frame_size16 = 0, $frame_size22 = 0, $gain = 0.0, $i = 0, $inc = 0, $inc184 = 0, $inc340 = 0; + var $inc377 = 0, $inc437 = 0, $inc440 = 0, $inc468 = 0, $inc505 = 0, $internalSampleRate = 0, $land$ext = 0, $len$addr = 0, $lnot = 0, $lost_flag = 0, $mode = 0, $mode207 = 0, $mode23 = 0, $mul = 0, $mul108 = 0, $mul120 = 0, $mul126 = 0, $mul165 = 0, $mul178 = 0, $mul190 = 0; + var $mul210 = 0, $mul212 = 0, $mul238 = 0, $mul26 = 0, $mul283 = 0, $mul334 = 0, $mul365 = 0, $mul373 = 0.0, $mul40 = 0, $mul403 = 0, $mul406 = 0, $mul410 = 0, $mul429 = 0, $mul433 = 0, $mul443 = 0, $mul446 = 0, $mul449 = 0, $mul461 = 0, $mul471 = 0, $mul474 = 0; + var $mul477 = 0, $mul490 = 0.0, $mul492 = 0.0, $mul497 = 0, $mul502 = 0.0, $mul77 = 0, $mul9 = 0, $nChannelsInternal = 0, $or$cond = 0, $or$cond1 = 0, $or$cond10 = 0, $or$cond3 = 0, $or$cond4 = 0, $or$cond5 = 0, $or$cond6 = 0, $or$cond7 = 0, $or$cond8 = 0, $or$cond9 = 0, $payloadSize_ms = 0, $pcm$addr = 0; + var $pcm_ptr = 0, $pcm_silk_size = 0, $pcm_transition = 0, $pcm_transition_celt_size = 0, $pcm_transition_silk_size = 0, $prev_mode = 0, $prev_mode115 = 0, $prev_mode310 = 0, $prev_mode314 = 0, $prev_mode343 = 0, $prev_mode514 = 0, $prev_mode61 = 0, $prev_mode66 = 0, $prev_mode71 = 0, $prev_redundancy = 0, $prev_redundancy318 = 0, $prev_redundancy351 = 0, $prev_redundancy517 = 0, $rangeFinal512 = 0, $redundancy = 0; + var $redundancy_bytes = 0, $redundant_audio_size = 0, $redundant_rng = 0, $ret = 0, $retval = 0, $rng = 0, $saved_stack = 0, $shr = 0, $shr2 = 0, $shr233 = 0, $shr3 = 0, $silence = 0, $silk_dec = 0, $silk_dec_offset = 0, $silk_frame_size = 0, $silk_ret = 0, $st$addr = 0, $start_band = 0, $storage = 0, $stream_channels = 0; + var $stream_channels261 = 0, $sub = 0, $sub$ptr$div = 0, $sub$ptr$div383 = 0, $sub$ptr$div398 = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$lhs$cast380 = 0, $sub$ptr$lhs$cast395 = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$rhs$cast381 = 0, $sub$ptr$rhs$cast396 = 0, $sub$ptr$sub = 0, $sub$ptr$sub382 = 0, $sub$ptr$sub397 = 0, $sub234 = 0, $sub237 = 0, $sub244 = 0, $sub402 = 0, $sub409 = 0, $tobool = 0; + var $tobool100 = 0, $tobool172 = 0, $tobool174 = 0, $tobool197 = 0, $tobool222 = 0, $tobool263 = 0, $tobool267 = 0, $tobool280 = 0, $tobool288 = 0, $tobool290 = 0, $tobool319 = 0, $tobool323 = 0, $tobool330 = 0, $tobool347 = 0, $tobool349 = 0, $tobool352 = 0, $tobool361 = 0, $tobool387 = 0, $tobool389 = 0, $tobool415 = 0; + var $tobool417 = 0, $tobool454 = 0, $tobool486 = 0, $tobool515 = 0, $tobool516 = 0, $tobool83 = 0, $transition = 0, $vararg_buffer = 0, $vararg_buffer13 = 0, $vararg_buffer16 = 0, $vararg_buffer19 = 0, $vararg_buffer22 = 0, $vararg_buffer25 = 0, $vararg_buffer27 = 0, $vararg_buffer30 = 0, $vararg_buffer33 = 0, $vararg_buffer35 = 0, $vararg_buffer38 = 0, $vla = 0, $vla$alloca_mul = 0; + var $vla112 = 0, $vla112$alloca_mul = 0, $vla266 = 0, $vla266$alloca_mul = 0, $vla287 = 0, $vla287$alloca_mul = 0, $window = 0, $window386 = 0, $x = 0.0, $xor = 0, $xor$sink = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 320|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(320|0); + $vararg_buffer38 = sp + 80|0; + $vararg_buffer35 = sp + 72|0; + $vararg_buffer33 = sp + 64|0; + $vararg_buffer30 = sp + 56|0; + $vararg_buffer27 = sp + 48|0; + $vararg_buffer25 = sp + 40|0; + $vararg_buffer22 = sp + 32|0; + $vararg_buffer19 = sp + 24|0; + $vararg_buffer16 = sp + 16|0; + $vararg_buffer13 = sp + 8|0; + $vararg_buffer = sp; + $dec = sp + 216|0; + $silk_frame_size = sp + 212|0; + $redundant_rng = sp + 136|0; + $silence = sp + 312|0; + $celt_mode = sp + 92|0; + $st$addr = $st; + $data$addr = $data; + $len$addr = $len; + $pcm$addr = $pcm; + $frame_size$addr = $frame_size; + $decode_fec$addr = $decode_fec; + $silk_ret = 0; + $celt_ret = 0; + $pcm_transition = 0; + $transition = 0; + $redundancy = 0; + $redundancy_bytes = 0; + $celt_to_silk = 0; + HEAP32[$redundant_rng>>2] = 0; + $0 = $st$addr; + $1 = $st$addr; + $silk_dec_offset = ((($1)) + 4|0); + $2 = HEAP32[$silk_dec_offset>>2]|0; + $add$ptr = (($0) + ($2)|0); + $silk_dec = $add$ptr; + $3 = $st$addr; + $4 = $st$addr; + $5 = HEAP32[$4>>2]|0; + $add$ptr1 = (($3) + ($5)|0); + $celt_dec = $add$ptr1; + $6 = $st$addr; + $Fs = ((($6)) + 12|0); + $7 = HEAP32[$Fs>>2]|0; + $div = (($7|0) / 50)&-1; + $F20 = $div; + $8 = $F20; + $shr = $8 >> 1; + $F10 = $shr; + $9 = $F10; + $shr2 = $9 >> 1; + $F5 = $shr2; + $10 = $F5; + $shr3 = $10 >> 1; + $F2_5 = $shr3; + $11 = $frame_size$addr; + $12 = $F2_5; + $cmp = ($11|0)<($12|0); + if ($cmp) { + $retval = -2; + $401 = $retval; + STACKTOP = sp;return ($401|0); + } + $13 = $frame_size$addr; + $14 = $st$addr; + $Fs4 = ((($14)) + 12|0); + $15 = HEAP32[$Fs4>>2]|0; + $div5 = (($15|0) / 25)&-1; + $mul = ($div5*3)|0; + $cmp6 = ($13|0)<($mul|0); + if ($cmp6) { + $16 = $frame_size$addr; + $cond = $16; + } else { + $17 = $st$addr; + $Fs7 = ((($17)) + 12|0); + $18 = HEAP32[$Fs7>>2]|0; + $div8 = (($18|0) / 25)&-1; + $mul9 = ($div8*3)|0; + $cond = $mul9; + } + $frame_size$addr = $cond; + $19 = $len$addr; + $cmp10 = ($19|0)<=(1); + if ($cmp10) { + $data$addr = 0; + $20 = $frame_size$addr; + $21 = $st$addr; + $frame_size12 = ((($21)) + 64|0); + $22 = HEAP32[$frame_size12>>2]|0; + $cmp13 = ($20|0)<($22|0); + if ($cmp13) { + $23 = $frame_size$addr; + $cond18 = $23; + } else { + $24 = $st$addr; + $frame_size16 = ((($24)) + 64|0); + $25 = HEAP32[$frame_size16>>2]|0; + $cond18 = $25; + } + $frame_size$addr = $cond18; + } + $26 = $data$addr; + $cmp20 = ($26|0)!=(0|0); + do { + if ($cmp20) { + $27 = $st$addr; + $frame_size22 = ((($27)) + 64|0); + $28 = HEAP32[$frame_size22>>2]|0; + $audiosize = $28; + $29 = $st$addr; + $mode23 = ((($29)) + 56|0); + $30 = HEAP32[$mode23>>2]|0; + $mode = $30; + $31 = $data$addr; + $32 = $len$addr; + _ec_dec_init($dec,$31,$32); + } else { + $33 = $frame_size$addr; + $audiosize = $33; + $34 = $st$addr; + $prev_mode = ((($34)) + 60|0); + $35 = HEAP32[$prev_mode>>2]|0; + $mode = $35; + $36 = $mode; + $cmp24 = ($36|0)==(0); + if ($cmp24) { + $i = 0; + while(1) { + $37 = $i; + $38 = $audiosize; + $39 = $st$addr; + $channels = ((($39)) + 8|0); + $40 = HEAP32[$channels>>2]|0; + $mul26 = Math_imul($38, $40)|0; + $cmp27 = ($37|0)<($mul26|0); + if (!($cmp27)) { + break; + } + $41 = $pcm$addr; + $42 = $i; + $arrayidx = (($41) + ($42<<2)|0); + HEAPF32[$arrayidx>>2] = 0.0; + $43 = $i; + $inc = (($43) + 1)|0; + $i = $inc; + } + $44 = $audiosize; + $retval = $44; + $401 = $retval; + STACKTOP = sp;return ($401|0); + } + $45 = $audiosize; + $46 = $F20; + $cmp29 = ($45|0)>($46|0); + if ($cmp29) { + while(1) { + $47 = $st$addr; + $48 = $pcm$addr; + $49 = $audiosize; + $50 = $F20; + $cmp31 = ($49|0)<($50|0); + $51 = $audiosize; + $52 = $F20; + $cond35 = $cmp31 ? $51 : $52; + $call = (_opus_decode_frame($47,0,0,$48,$cond35,0)|0); + $ret = $call; + $53 = $ret; + $cmp36 = ($53|0)<(0); + $54 = $ret; + if ($cmp36) { + label = 20; + break; + } + $55 = $st$addr; + $channels39 = ((($55)) + 8|0); + $56 = HEAP32[$channels39>>2]|0; + $mul40 = Math_imul($54, $56)|0; + $57 = $pcm$addr; + $add$ptr41 = (($57) + ($mul40<<2)|0); + $pcm$addr = $add$ptr41; + $58 = $ret; + $59 = $audiosize; + $sub = (($59) - ($58))|0; + $audiosize = $sub; + $60 = $audiosize; + $cmp42 = ($60|0)>(0); + if (!($cmp42)) { + label = 22; + break; + } + } + if ((label|0) == 20) { + $retval = $54; + $401 = $retval; + STACKTOP = sp;return ($401|0); + } + else if ((label|0) == 22) { + $61 = $frame_size$addr; + $retval = $61; + $401 = $retval; + STACKTOP = sp;return ($401|0); + } + } + $62 = $audiosize; + $63 = $F20; + $cmp44 = ($62|0)<($63|0); + if ($cmp44) { + $64 = $audiosize; + $65 = $F10; + $cmp46 = ($64|0)>($65|0); + if ($cmp46) { + $66 = $F10; + $audiosize = $66; + break; + } + $67 = $mode; + $cmp49 = ($67|0)!=(1000); + if ($cmp49) { + $68 = $audiosize; + $69 = $F5; + $cmp50 = ($68|0)>($69|0); + if ($cmp50) { + $70 = $audiosize; + $71 = $F10; + $cmp52 = ($70|0)<($71|0); + if ($cmp52) { + $72 = $F5; + $audiosize = $72; + } + } + } + } + } + } while(0); + $celt_accum = 0; + $pcm_transition_silk_size = 1; + $pcm_transition_celt_size = 1; + $73 = $data$addr; + $cmp59 = ($73|0)!=(0|0); + do { + if ($cmp59) { + $74 = $st$addr; + $prev_mode61 = ((($74)) + 60|0); + $75 = HEAP32[$prev_mode61>>2]|0; + $cmp62 = ($75|0)>(0); + if ($cmp62) { + $76 = $mode; + $cmp64 = ($76|0)==(1002); + if ($cmp64) { + $77 = $st$addr; + $prev_mode66 = ((($77)) + 60|0); + $78 = HEAP32[$prev_mode66>>2]|0; + $cmp67 = ($78|0)!=(1002); + if ($cmp67) { + $79 = $st$addr; + $prev_redundancy = ((($79)) + 68|0); + $80 = HEAP32[$prev_redundancy>>2]|0; + $tobool = ($80|0)!=(0); + if ($tobool) { + label = 35; + } + } else { + label = 35; + } + } else { + label = 35; + } + if ((label|0) == 35) { + $81 = $mode; + $cmp69 = ($81|0)!=(1002); + if (!($cmp69)) { + break; + } + $82 = $st$addr; + $prev_mode71 = ((($82)) + 60|0); + $83 = HEAP32[$prev_mode71>>2]|0; + $cmp72 = ($83|0)==(1002); + if (!($cmp72)) { + break; + } + } + $transition = 1; + $84 = $mode; + $cmp74 = ($84|0)==(1002); + $85 = $F5; + $86 = $st$addr; + $channels76 = ((($86)) + 8|0); + $87 = HEAP32[$channels76>>2]|0; + $mul77 = Math_imul($85, $87)|0; + if ($cmp74) { + $pcm_transition_celt_size = $mul77; + break; + } else { + $pcm_transition_silk_size = $mul77; + break; + } + } + } + } while(0); + $88 = $pcm_transition_celt_size; + $89 = (_llvm_stacksave()|0); + $saved_stack = $89; + $vla$alloca_mul = $88<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $90 = $transition; + $tobool83 = ($90|0)!=(0); + $91 = $mode; + $cmp85 = ($91|0)==(1002); + $or$cond = $tobool83 & $cmp85; + if ($or$cond) { + $pcm_transition = $vla; + $92 = $st$addr; + $93 = $pcm_transition; + $94 = $F5; + $95 = $audiosize; + $cmp87 = ($94|0)<($95|0); + $96 = $F5; + $97 = $audiosize; + $cond91 = $cmp87 ? $96 : $97; + (_opus_decode_frame($92,0,0,$93,$cond91,0)|0); + } + $98 = $audiosize; + $99 = $frame_size$addr; + $cmp94 = ($98|0)>($99|0); + L62: do { + if ($cmp94) { + $retval = -1; + $cleanup$dest$slot = 1; + } else { + $100 = $audiosize; + $frame_size$addr = $100; + $101 = $mode; + $cmp98 = ($101|0)==(1002); + $102 = $celt_accum; + $tobool100 = ($102|0)!=(0); + $or$cond1 = $cmp98 | $tobool100; + if ($or$cond1) { + $cond111 = 1; + } else { + $103 = $F10; + $104 = $frame_size$addr; + $cmp102 = ($103|0)>($104|0); + $105 = $F10; + $106 = $frame_size$addr; + $cond106 = $cmp102 ? $105 : $106; + $107 = $st$addr; + $channels107 = ((($107)) + 8|0); + $108 = HEAP32[$channels107>>2]|0; + $mul108 = Math_imul($cond106, $108)|0; + $cond111 = $mul108; + } + $pcm_silk_size = $cond111; + $109 = $pcm_silk_size; + $vla112$alloca_mul = $109<<1; + $vla112 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla112$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla112$alloca_mul)|0)+15)&-16)|0);; + $110 = $mode; + $cmp113 = ($110|0)!=(1002); + L68: do { + if ($cmp113) { + $pcm_ptr = $vla112; + $111 = $st$addr; + $prev_mode115 = ((($111)) + 60|0); + $112 = HEAP32[$prev_mode115>>2]|0; + $cmp116 = ($112|0)==(1002); + if ($cmp116) { + $113 = $silk_dec; + (_silk_InitDecoder($113)|0); + } + $114 = $audiosize; + $mul120 = ($114*1000)|0; + $115 = $st$addr; + $Fs121 = ((($115)) + 12|0); + $116 = HEAP32[$Fs121>>2]|0; + $div122 = (($mul120|0) / ($116|0))&-1; + $cmp123 = (10)>($div122|0); + if ($cmp123) { + $cond130 = 10; + } else { + $117 = $audiosize; + $mul126 = ($117*1000)|0; + $118 = $st$addr; + $Fs127 = ((($118)) + 12|0); + $119 = HEAP32[$Fs127>>2]|0; + $div128 = (($mul126|0) / ($119|0))&-1; + $cond130 = $div128; + } + $120 = $st$addr; + $DecControl = ((($120)) + 16|0); + $payloadSize_ms = ((($DecControl)) + 16|0); + HEAP32[$payloadSize_ms>>2] = $cond130; + $121 = $data$addr; + $cmp131 = ($121|0)!=(0|0); + if ($cmp131) { + $122 = $st$addr; + $stream_channels = ((($122)) + 48|0); + $123 = HEAP32[$stream_channels>>2]|0; + $124 = $st$addr; + $DecControl133 = ((($124)) + 16|0); + $nChannelsInternal = ((($DecControl133)) + 4|0); + HEAP32[$nChannelsInternal>>2] = $123; + $125 = $mode; + $cmp134 = ($125|0)==(1000); + $126 = $st$addr; + if ($cmp134) { + $bandwidth = ((($126)) + 52|0); + $127 = HEAP32[$bandwidth>>2]|0; + $cmp136 = ($127|0)==(1101); + $128 = $st$addr; + if ($cmp136) { + $$sink = 8000;$$sink2 = $128; + } else { + $bandwidth140 = ((($128)) + 52|0); + $129 = HEAP32[$bandwidth140>>2]|0; + $cmp141 = ($129|0)==(1102); + $130 = $st$addr; + $131 = $st$addr; + $$ = $cmp141 ? $130 : $131; + $$12 = $cmp141 ? 12000 : 16000; + $$sink = $$12;$$sink2 = $$; + } + } else { + $$sink = 16000;$$sink2 = $126; + } + $DecControl138 = ((($$sink2)) + 16|0); + $internalSampleRate = ((($DecControl138)) + 12|0); + HEAP32[$internalSampleRate>>2] = $$sink; + } + $132 = $data$addr; + $cmp162 = ($132|0)==(0|0); + $133 = $decode_fec$addr; + $mul165 = $133<<1; + $cond167 = $cmp162 ? 1 : $mul165; + $lost_flag = $cond167; + $decoded_samples = 0; + L83: while(1) { + $134 = $decoded_samples; + $cmp169 = ($134|0)==(0); + $conv = $cmp169&1; + $first_frame = $conv; + $135 = $silk_dec; + $136 = $st$addr; + $DecControl170 = ((($136)) + 16|0); + $137 = $lost_flag; + $138 = $first_frame; + $139 = $pcm_ptr; + $140 = $st$addr; + $arch = ((($140)) + 44|0); + $141 = HEAP32[$arch>>2]|0; + $call171 = (_silk_Decode($135,$DecControl170,$137,$138,$dec,$139,$silk_frame_size,$141)|0); + $silk_ret = $call171; + $142 = $silk_ret; + $tobool172 = ($142|0)!=(0); + L85: do { + if ($tobool172) { + $143 = $lost_flag; + $tobool174 = ($143|0)!=(0); + if (!($tobool174)) { + break L83; + } + $144 = $frame_size$addr; + HEAP32[$silk_frame_size>>2] = $144; + $i = 0; + while(1) { + $145 = $i; + $146 = $frame_size$addr; + $147 = $st$addr; + $channels177 = ((($147)) + 8|0); + $148 = HEAP32[$channels177>>2]|0; + $mul178 = Math_imul($146, $148)|0; + $cmp179 = ($145|0)<($mul178|0); + if (!($cmp179)) { + break L85; + } + $149 = $pcm_ptr; + $150 = $i; + $arrayidx182 = (($149) + ($150<<1)|0); + HEAP16[$arrayidx182>>1] = 0; + $151 = $i; + $inc184 = (($151) + 1)|0; + $i = $inc184; + } + } + } while(0); + $152 = HEAP32[$silk_frame_size>>2]|0; + $153 = $st$addr; + $channels189 = ((($153)) + 8|0); + $154 = HEAP32[$channels189>>2]|0; + $mul190 = Math_imul($152, $154)|0; + $155 = $pcm_ptr; + $add$ptr191 = (($155) + ($mul190<<1)|0); + $pcm_ptr = $add$ptr191; + $156 = HEAP32[$silk_frame_size>>2]|0; + $157 = $decoded_samples; + $add = (($157) + ($156))|0; + $decoded_samples = $add; + $158 = $decoded_samples; + $159 = $frame_size$addr; + $cmp193 = ($158|0)<($159|0); + if (!($cmp193)) { + break L68; + } + } + $retval = -3; + $cleanup$dest$slot = 1; + break L62; + } + } while(0); + $start_band = 0; + $160 = $decode_fec$addr; + $tobool197 = ($160|0)==(0); + $161 = $mode; + $cmp199 = ($161|0)!=(1002); + $or$cond3 = $tobool197 & $cmp199; + $162 = $data$addr; + $cmp202 = ($162|0)!=(0|0); + $or$cond4 = $or$cond3 & $cmp202; + if ($or$cond4) { + $call205 = (_ec_tell($dec)|0); + $add206 = (($call205) + 17)|0; + $163 = $st$addr; + $mode207 = ((($163)) + 56|0); + $164 = HEAP32[$mode207>>2]|0; + $cmp208 = ($164|0)==(1001); + $conv209 = $cmp208&1; + $mul210 = ($conv209*20)|0; + $add211 = (($add206) + ($mul210))|0; + $165 = $len$addr; + $mul212 = $165<<3; + $cmp213 = ($add211|0)<=($mul212|0); + if ($cmp213) { + $166 = $mode; + $cmp216 = ($166|0)==(1001); + if ($cmp216) { + $call219 = (_ec_dec_bit_logp($dec,12)|0); + $redundancy = $call219; + } else { + $redundancy = 1; + } + $167 = $redundancy; + $tobool222 = ($167|0)!=(0); + if ($tobool222) { + $call224 = (_ec_dec_bit_logp($dec,1)|0); + $celt_to_silk = $call224; + $168 = $mode; + $cmp225 = ($168|0)==(1001); + if ($cmp225) { + $call228 = (_ec_dec_uint($dec,256)|0); + $add229 = (($call228) + 2)|0; + $cond236 = $add229; + } else { + $169 = $len$addr; + $call231 = (_ec_tell($dec)|0); + $add232 = (($call231) + 7)|0; + $shr233 = $add232 >> 3; + $sub234 = (($169) - ($shr233))|0; + $cond236 = $sub234; + } + $redundancy_bytes = $cond236; + $170 = $redundancy_bytes; + $171 = $len$addr; + $sub237 = (($171) - ($170))|0; + $len$addr = $sub237; + $172 = $len$addr; + $mul238 = $172<<3; + $call239 = (_ec_tell($dec)|0); + $cmp240 = ($mul238|0)<($call239|0); + if ($cmp240) { + $len$addr = 0; + $redundancy_bytes = 0; + $redundancy = 0; + } + $173 = $redundancy_bytes; + $storage = ((($dec)) + 4|0); + $174 = HEAP32[$storage>>2]|0; + $sub244 = (($174) - ($173))|0; + HEAP32[$storage>>2] = $sub244; + } + } + } + $175 = $mode; + $cmp247 = ($175|0)!=(1002); + if ($cmp247) { + $start_band = 17; + } + $endband = 21; + $176 = $st$addr; + $bandwidth251 = ((($176)) + 52|0); + $177 = HEAP32[$bandwidth251>>2]|0; + switch ($177|0) { + case 1101: { + $endband = 13; + break; + } + case 1103: case 1102: { + $endband = 17; + break; + } + case 1104: { + $endband = 19; + break; + } + case 1105: { + $endband = 21; + break; + } + default: { + } + } + $178 = $celt_dec; + $179 = $endband; + HEAP32[$vararg_buffer>>2] = $179; + (_opus_custom_decoder_ctl($178,10012,$vararg_buffer)|0); + $180 = $celt_dec; + $181 = $st$addr; + $stream_channels261 = ((($181)) + 48|0); + $182 = HEAP32[$stream_channels261>>2]|0; + HEAP32[$vararg_buffer13>>2] = $182; + (_opus_custom_decoder_ctl($180,10008,$vararg_buffer13)|0); + $183 = $redundancy; + $tobool263 = ($183|0)!=(0); + if ($tobool263) { + $transition = 0; + $pcm_transition_silk_size = 1; + } + $184 = $pcm_transition_silk_size; + $vla266$alloca_mul = $184<<2; + $vla266 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla266$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla266$alloca_mul)|0)+15)&-16)|0);; + $185 = $transition; + $tobool267 = ($185|0)!=(0); + $186 = $mode; + $cmp269 = ($186|0)!=(1002); + $or$cond5 = $tobool267 & $cmp269; + if ($or$cond5) { + $pcm_transition = $vla266; + $187 = $st$addr; + $188 = $pcm_transition; + $189 = $F5; + $190 = $audiosize; + $cmp272 = ($189|0)<($190|0); + $191 = $F5; + $192 = $audiosize; + $cond277 = $cmp272 ? $191 : $192; + (_opus_decode_frame($187,0,0,$188,$cond277,0)|0); + } + $193 = $redundancy; + $tobool280 = ($193|0)!=(0); + if ($tobool280) { + $194 = $F5; + $195 = $st$addr; + $channels282 = ((($195)) + 8|0); + $196 = HEAP32[$channels282>>2]|0; + $mul283 = Math_imul($194, $196)|0; + $cond286 = $mul283; + } else { + $cond286 = 1; + } + $redundant_audio_size = $cond286; + $197 = $redundant_audio_size; + $vla287$alloca_mul = $197<<2; + $vla287 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla287$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla287$alloca_mul)|0)+15)&-16)|0);; + $198 = $redundancy; + $tobool288 = ($198|0)!=(0); + $199 = $celt_to_silk; + $tobool290 = ($199|0)!=(0); + $or$cond6 = $tobool288 & $tobool290; + if ($or$cond6) { + $200 = $celt_dec; + HEAP32[$vararg_buffer16>>2] = 0; + (_opus_custom_decoder_ctl($200,10010,$vararg_buffer16)|0); + $201 = $celt_dec; + $202 = $data$addr; + $203 = $len$addr; + $add$ptr293 = (($202) + ($203)|0); + $204 = $redundancy_bytes; + $205 = $F5; + (_celt_decode_with_ec($201,$add$ptr293,$204,$vla287,$205,0,0)|0); + $206 = $celt_dec; + $sub$ptr$lhs$cast = $redundant_rng; + $sub$ptr$rhs$cast = $redundant_rng; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $add$ptr295 = (($redundant_rng) + ($sub$ptr$div<<2)|0); + HEAP32[$vararg_buffer19>>2] = $add$ptr295; + (_opus_custom_decoder_ctl($206,4031,$vararg_buffer19)|0); + } + $207 = $celt_dec; + $208 = $start_band; + HEAP32[$vararg_buffer22>>2] = $208; + (_opus_custom_decoder_ctl($207,10010,$vararg_buffer22)|0); + $209 = $mode; + $cmp301 = ($209|0)!=(1000); + do { + if ($cmp301) { + $210 = $F20; + $211 = $frame_size$addr; + $cmp304 = ($210|0)<($211|0); + $212 = $F20; + $213 = $frame_size$addr; + $cond309 = $cmp304 ? $212 : $213; + $celt_frame_size = $cond309; + $214 = $mode; + $215 = $st$addr; + $prev_mode310 = ((($215)) + 60|0); + $216 = HEAP32[$prev_mode310>>2]|0; + $cmp311 = ($214|0)!=($216|0); + do { + if ($cmp311) { + $217 = $st$addr; + $prev_mode314 = ((($217)) + 60|0); + $218 = HEAP32[$prev_mode314>>2]|0; + $cmp315 = ($218|0)>(0); + if (!($cmp315)) { + break; + } + $219 = $st$addr; + $prev_redundancy318 = ((($219)) + 68|0); + $220 = HEAP32[$prev_redundancy318>>2]|0; + $tobool319 = ($220|0)!=(0); + if ($tobool319) { + break; + } + $221 = $celt_dec; + (_opus_custom_decoder_ctl($221,4028,$vararg_buffer25)|0); + } + } while(0); + $222 = $celt_dec; + $223 = $decode_fec$addr; + $tobool323 = ($223|0)!=(0); + $224 = $data$addr; + $cond327 = $tobool323 ? 0 : $224; + $225 = $len$addr; + $226 = $pcm$addr; + $227 = $celt_frame_size; + $228 = $celt_accum; + $call328 = (_celt_decode_with_ec($222,$cond327,$225,$226,$227,$dec,$228)|0); + $celt_ret = $call328; + } else { + ;HEAP8[$silence>>0]=HEAP8[21021>>0]|0;HEAP8[$silence+1>>0]=HEAP8[21021+1>>0]|0; + $229 = $celt_accum; + $tobool330 = ($229|0)!=(0); + L139: do { + if (!($tobool330)) { + $i = 0; + while(1) { + $230 = $i; + $231 = $frame_size$addr; + $232 = $st$addr; + $channels333 = ((($232)) + 8|0); + $233 = HEAP32[$channels333>>2]|0; + $mul334 = Math_imul($231, $233)|0; + $cmp335 = ($230|0)<($mul334|0); + if (!($cmp335)) { + break L139; + } + $234 = $pcm$addr; + $235 = $i; + $arrayidx338 = (($234) + ($235<<2)|0); + HEAPF32[$arrayidx338>>2] = 0.0; + $236 = $i; + $inc340 = (($236) + 1)|0; + $i = $inc340; + } + } + } while(0); + $237 = $st$addr; + $prev_mode343 = ((($237)) + 60|0); + $238 = HEAP32[$prev_mode343>>2]|0; + $cmp344 = ($238|0)==(1001); + if ($cmp344) { + $239 = $redundancy; + $tobool347 = ($239|0)!=(0); + $240 = $celt_to_silk; + $tobool349 = ($240|0)!=(0); + $or$cond7 = $tobool347 & $tobool349; + if ($or$cond7) { + $241 = $st$addr; + $prev_redundancy351 = ((($241)) + 68|0); + $242 = HEAP32[$prev_redundancy351>>2]|0; + $tobool352 = ($242|0)!=(0); + if ($tobool352) { + break; + } + } + $243 = $celt_dec; + HEAP32[$vararg_buffer27>>2] = 0; + (_opus_custom_decoder_ctl($243,10010,$vararg_buffer27)|0); + $244 = $celt_dec; + $245 = $pcm$addr; + $246 = $F2_5; + $247 = $celt_accum; + (_celt_decode_with_ec($244,$silence,2,$245,$246,0,$247)|0); + } + } + } while(0); + $248 = $mode; + $cmp358 = ($248|0)==(1002); + $249 = $celt_accum; + $tobool361 = ($249|0)!=(0); + $or$cond8 = $cmp358 | $tobool361; + L150: do { + if (!($or$cond8)) { + $i = 0; + while(1) { + $250 = $i; + $251 = $frame_size$addr; + $252 = $st$addr; + $channels364 = ((($252)) + 8|0); + $253 = HEAP32[$channels364>>2]|0; + $mul365 = Math_imul($251, $253)|0; + $cmp366 = ($250|0)<($mul365|0); + if (!($cmp366)) { + break L150; + } + $254 = $pcm$addr; + $255 = $i; + $arrayidx369 = (($254) + ($255<<2)|0); + $256 = +HEAPF32[$arrayidx369>>2]; + $257 = $i; + $arrayidx370 = (($vla112) + ($257<<1)|0); + $258 = HEAP16[$arrayidx370>>1]|0; + $conv371 = $258 << 16 >> 16; + $conv372 = (+($conv371|0)); + $mul373 = 3.0517578125E-5 * $conv372; + $add374 = $256 + $mul373; + $259 = $pcm$addr; + $260 = $i; + $arrayidx375 = (($259) + ($260<<2)|0); + HEAPF32[$arrayidx375>>2] = $add374; + $261 = $i; + $inc377 = (($261) + 1)|0; + $i = $inc377; + } + } + } while(0); + $262 = $celt_dec; + $sub$ptr$lhs$cast380 = $celt_mode; + $sub$ptr$rhs$cast381 = $celt_mode; + $sub$ptr$sub382 = (($sub$ptr$lhs$cast380) - ($sub$ptr$rhs$cast381))|0; + $sub$ptr$div383 = (($sub$ptr$sub382|0) / 4)&-1; + $add$ptr384 = (($celt_mode) + ($sub$ptr$div383<<2)|0); + HEAP32[$vararg_buffer30>>2] = $add$ptr384; + (_opus_custom_decoder_ctl($262,10015,$vararg_buffer30)|0); + $263 = HEAP32[$celt_mode>>2]|0; + $window386 = ((($263)) + 60|0); + $264 = HEAP32[$window386>>2]|0; + $window = $264; + $265 = $redundancy; + $tobool387 = ($265|0)==(0); + $266 = $celt_to_silk; + $tobool389 = ($266|0)!=(0); + $or$cond9 = $tobool387 | $tobool389; + if (!($or$cond9)) { + $267 = $celt_dec; + (_opus_custom_decoder_ctl($267,4028,$vararg_buffer33)|0); + $268 = $celt_dec; + HEAP32[$vararg_buffer35>>2] = 0; + (_opus_custom_decoder_ctl($268,10010,$vararg_buffer35)|0); + $269 = $celt_dec; + $270 = $data$addr; + $271 = $len$addr; + $add$ptr393 = (($270) + ($271)|0); + $272 = $redundancy_bytes; + $273 = $F5; + (_celt_decode_with_ec($269,$add$ptr393,$272,$vla287,$273,0,0)|0); + $274 = $celt_dec; + $sub$ptr$lhs$cast395 = $redundant_rng; + $sub$ptr$rhs$cast396 = $redundant_rng; + $sub$ptr$sub397 = (($sub$ptr$lhs$cast395) - ($sub$ptr$rhs$cast396))|0; + $sub$ptr$div398 = (($sub$ptr$sub397|0) / 4)&-1; + $add$ptr399 = (($redundant_rng) + ($sub$ptr$div398<<2)|0); + HEAP32[$vararg_buffer38>>2] = $add$ptr399; + (_opus_custom_decoder_ctl($274,4031,$vararg_buffer38)|0); + $275 = $pcm$addr; + $276 = $st$addr; + $channels401 = ((($276)) + 8|0); + $277 = HEAP32[$channels401>>2]|0; + $278 = $frame_size$addr; + $279 = $F2_5; + $sub402 = (($278) - ($279))|0; + $mul403 = Math_imul($277, $sub402)|0; + $add$ptr404 = (($275) + ($mul403<<2)|0); + $280 = $st$addr; + $channels405 = ((($280)) + 8|0); + $281 = HEAP32[$channels405>>2]|0; + $282 = $F2_5; + $mul406 = Math_imul($281, $282)|0; + $add$ptr407 = (($vla287) + ($mul406<<2)|0); + $283 = $pcm$addr; + $284 = $st$addr; + $channels408 = ((($284)) + 8|0); + $285 = HEAP32[$channels408>>2]|0; + $286 = $frame_size$addr; + $287 = $F2_5; + $sub409 = (($286) - ($287))|0; + $mul410 = Math_imul($285, $sub409)|0; + $add$ptr411 = (($283) + ($mul410<<2)|0); + $288 = $F2_5; + $289 = $st$addr; + $channels412 = ((($289)) + 8|0); + $290 = HEAP32[$channels412>>2]|0; + $291 = $window; + $292 = $st$addr; + $Fs413 = ((($292)) + 12|0); + $293 = HEAP32[$Fs413>>2]|0; + _smooth_fade($add$ptr404,$add$ptr407,$add$ptr411,$288,$290,$291,$293); + } + $294 = $redundancy; + $tobool415 = ($294|0)!=(0); + $295 = $celt_to_silk; + $tobool417 = ($295|0)!=(0); + $or$cond10 = $tobool415 & $tobool417; + if ($or$cond10) { + $c = 0; + while(1) { + $296 = $c; + $297 = $st$addr; + $channels420 = ((($297)) + 8|0); + $298 = HEAP32[$channels420>>2]|0; + $cmp421 = ($296|0)<($298|0); + if (!($cmp421)) { + break; + } + $i = 0; + while(1) { + $299 = $i; + $300 = $F2_5; + $cmp425 = ($299|0)<($300|0); + if (!($cmp425)) { + break; + } + $301 = $st$addr; + $channels428 = ((($301)) + 8|0); + $302 = HEAP32[$channels428>>2]|0; + $303 = $i; + $mul429 = Math_imul($302, $303)|0; + $304 = $c; + $add430 = (($mul429) + ($304))|0; + $arrayidx431 = (($vla287) + ($add430<<2)|0); + $305 = +HEAPF32[$arrayidx431>>2]; + $306 = $pcm$addr; + $307 = $st$addr; + $channels432 = ((($307)) + 8|0); + $308 = HEAP32[$channels432>>2]|0; + $309 = $i; + $mul433 = Math_imul($308, $309)|0; + $310 = $c; + $add434 = (($mul433) + ($310))|0; + $arrayidx435 = (($306) + ($add434<<2)|0); + HEAPF32[$arrayidx435>>2] = $305; + $311 = $i; + $inc437 = (($311) + 1)|0; + $i = $inc437; + } + $312 = $c; + $inc440 = (($312) + 1)|0; + $c = $inc440; + } + $313 = $st$addr; + $channels442 = ((($313)) + 8|0); + $314 = HEAP32[$channels442>>2]|0; + $315 = $F2_5; + $mul443 = Math_imul($314, $315)|0; + $add$ptr444 = (($vla287) + ($mul443<<2)|0); + $316 = $pcm$addr; + $317 = $st$addr; + $channels445 = ((($317)) + 8|0); + $318 = HEAP32[$channels445>>2]|0; + $319 = $F2_5; + $mul446 = Math_imul($318, $319)|0; + $add$ptr447 = (($316) + ($mul446<<2)|0); + $320 = $pcm$addr; + $321 = $st$addr; + $channels448 = ((($321)) + 8|0); + $322 = HEAP32[$channels448>>2]|0; + $323 = $F2_5; + $mul449 = Math_imul($322, $323)|0; + $add$ptr450 = (($320) + ($mul449<<2)|0); + $324 = $F2_5; + $325 = $st$addr; + $channels451 = ((($325)) + 8|0); + $326 = HEAP32[$channels451>>2]|0; + $327 = $window; + $328 = $st$addr; + $Fs452 = ((($328)) + 12|0); + $329 = HEAP32[$Fs452>>2]|0; + _smooth_fade($add$ptr444,$add$ptr447,$add$ptr450,$324,$326,$327,$329); + } + $330 = $transition; + $tobool454 = ($330|0)!=(0); + do { + if ($tobool454) { + $331 = $audiosize; + $332 = $F5; + $cmp456 = ($331|0)>=($332|0); + if (!($cmp456)) { + $360 = $pcm_transition; + $361 = $pcm$addr; + $362 = $pcm$addr; + $363 = $F2_5; + $364 = $st$addr; + $channels482 = ((($364)) + 8|0); + $365 = HEAP32[$channels482>>2]|0; + $366 = $window; + $367 = $st$addr; + $Fs483 = ((($367)) + 12|0); + $368 = HEAP32[$Fs483>>2]|0; + _smooth_fade($360,$361,$362,$363,$365,$366,$368); + break; + } + $i = 0; + while(1) { + $333 = $i; + $334 = $st$addr; + $channels460 = ((($334)) + 8|0); + $335 = HEAP32[$channels460>>2]|0; + $336 = $F2_5; + $mul461 = Math_imul($335, $336)|0; + $cmp462 = ($333|0)<($mul461|0); + $337 = $pcm_transition; + if (!($cmp462)) { + break; + } + $338 = $i; + $arrayidx465 = (($337) + ($338<<2)|0); + $339 = +HEAPF32[$arrayidx465>>2]; + $340 = $pcm$addr; + $341 = $i; + $arrayidx466 = (($340) + ($341<<2)|0); + HEAPF32[$arrayidx466>>2] = $339; + $342 = $i; + $inc468 = (($342) + 1)|0; + $i = $inc468; + } + $343 = $st$addr; + $channels470 = ((($343)) + 8|0); + $344 = HEAP32[$channels470>>2]|0; + $345 = $F2_5; + $mul471 = Math_imul($344, $345)|0; + $add$ptr472 = (($337) + ($mul471<<2)|0); + $346 = $pcm$addr; + $347 = $st$addr; + $channels473 = ((($347)) + 8|0); + $348 = HEAP32[$channels473>>2]|0; + $349 = $F2_5; + $mul474 = Math_imul($348, $349)|0; + $add$ptr475 = (($346) + ($mul474<<2)|0); + $350 = $pcm$addr; + $351 = $st$addr; + $channels476 = ((($351)) + 8|0); + $352 = HEAP32[$channels476>>2]|0; + $353 = $F2_5; + $mul477 = Math_imul($352, $353)|0; + $add$ptr478 = (($350) + ($mul477<<2)|0); + $354 = $F2_5; + $355 = $st$addr; + $channels479 = ((($355)) + 8|0); + $356 = HEAP32[$channels479>>2]|0; + $357 = $window; + $358 = $st$addr; + $Fs480 = ((($358)) + 12|0); + $359 = HEAP32[$Fs480>>2]|0; + _smooth_fade($add$ptr472,$add$ptr475,$add$ptr478,$354,$356,$357,$359); + } + } while(0); + $369 = $st$addr; + $decode_gain = ((($369)) + 40|0); + $370 = HEAP32[$decode_gain>>2]|0; + $tobool486 = ($370|0)!=(0); + L180: do { + if ($tobool486) { + $371 = $st$addr; + $decode_gain488 = ((($371)) + 40|0); + $372 = HEAP32[$decode_gain488>>2]|0; + $conv489 = (+($372|0)); + $mul490 = 6.4881407888606191E-4 * $conv489; + $conv491 = $mul490; + $mul492 = 0.69314718055994529 * $conv491; + $call493 = (+Math_exp((+$mul492))); + $conv494 = $call493; + $gain = $conv494; + $i = 0; + while(1) { + $373 = $i; + $374 = $frame_size$addr; + $375 = $st$addr; + $channels496 = ((($375)) + 8|0); + $376 = HEAP32[$channels496>>2]|0; + $mul497 = Math_imul($374, $376)|0; + $cmp498 = ($373|0)<($mul497|0); + if (!($cmp498)) { + break L180; + } + $377 = $pcm$addr; + $378 = $i; + $arrayidx501 = (($377) + ($378<<2)|0); + $379 = +HEAPF32[$arrayidx501>>2]; + $380 = $gain; + $mul502 = $379 * $380; + $x = $mul502; + $381 = $x; + $382 = $pcm$addr; + $383 = $i; + $arrayidx503 = (($382) + ($383<<2)|0); + HEAPF32[$arrayidx503>>2] = $381; + $384 = $i; + $inc505 = (($384) + 1)|0; + $i = $inc505; + } + } + } while(0); + $385 = $len$addr; + $cmp508 = ($385|0)<=(1); + if ($cmp508) { + $386 = $st$addr; + $$sink11 = $386;$xor$sink = 0; + } else { + $rng = ((($dec)) + 28|0); + $387 = HEAP32[$rng>>2]|0; + $388 = HEAP32[$redundant_rng>>2]|0; + $xor = $387 ^ $388; + $389 = $st$addr; + $$sink11 = $389;$xor$sink = $xor; + } + $rangeFinal512 = ((($$sink11)) + 84|0); + HEAP32[$rangeFinal512>>2] = $xor$sink; + $390 = $mode; + $391 = $st$addr; + $prev_mode514 = ((($391)) + 60|0); + HEAP32[$prev_mode514>>2] = $390; + $392 = $redundancy; + $tobool515 = ($392|0)!=(0); + if ($tobool515) { + $393 = $celt_to_silk; + $tobool516 = ($393|0)!=(0); + $lnot = $tobool516 ^ 1; + $394 = $lnot; + } else { + $394 = 0; + } + $land$ext = $394&1; + $395 = $st$addr; + $prev_redundancy517 = ((($395)) + 68|0); + HEAP32[$prev_redundancy517>>2] = $land$ext; + $396 = $celt_ret; + $cmp518 = ($396|0)>=(0); + if ($cmp518) { + (__opus_false()|0); + } + $397 = $celt_ret; + $cmp529 = ($397|0)<(0); + $398 = $celt_ret; + $399 = $audiosize; + $cond534 = $cmp529 ? $398 : $399; + $retval = $cond534; + $cleanup$dest$slot = 1; + } + } while(0); + $400 = $saved_stack; + _llvm_stackrestore(($400|0)); + $401 = $retval; + STACKTOP = sp;return ($401|0); +} +function __opus_false() { + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function _opus_packet_get_mode($data) { + $data = $data|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $and = 0, $and3 = 0, $cmp = 0, $conv = 0, $conv2 = 0, $data$addr = 0, $mode = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $data$addr = $data; + $0 = $data$addr; + $1 = HEAP8[$0>>0]|0; + $conv = $1&255; + $and = $conv & 128; + $tobool = ($and|0)!=(0); + do { + if ($tobool) { + $mode = 1002; + } else { + $2 = $data$addr; + $3 = HEAP8[$2>>0]|0; + $conv2 = $3&255; + $and3 = $conv2 & 96; + $cmp = ($and3|0)==(96); + if ($cmp) { + $mode = 1001; + break; + } else { + $mode = 1000; + break; + } + } + } while(0); + $4 = $mode; + STACKTOP = sp;return ($4|0); +} +function _opus_packet_get_bandwidth($data) { + $data = $data|0; + var $$add = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $add = 0, $add21 = 0, $and = 0, $and14 = 0, $and20 = 0, $and3 = 0, $and8 = 0, $bandwidth = 0, $cmp = 0, $cmp9 = 0, $cond = 0; + var $conv = 0, $conv13 = 0, $conv2 = 0, $data$addr = 0, $shr = 0, $shr19 = 0, $tobool = 0, $tobool15 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $data$addr = $data; + $0 = $data$addr; + $1 = HEAP8[$0>>0]|0; + $conv = $1&255; + $and = $conv & 128; + $tobool = ($and|0)!=(0); + $2 = $data$addr; + $3 = HEAP8[$2>>0]|0; + $conv2 = $3&255; + if ($tobool) { + $shr = $conv2 >> 5; + $and3 = $shr & 3; + $add = (1102 + ($and3))|0; + $bandwidth = $add; + $4 = $bandwidth; + $cmp = ($4|0)==(1102); + $$add = $cmp ? 1101 : $add; + $bandwidth = $$add; + $7 = $bandwidth; + STACKTOP = sp;return ($7|0); + } + $and8 = $conv2 & 96; + $cmp9 = ($and8|0)==(96); + $5 = $data$addr; + $6 = HEAP8[$5>>0]|0; + $conv13 = $6&255; + if ($cmp9) { + $and14 = $conv13 & 16; + $tobool15 = ($and14|0)!=(0); + $cond = $tobool15 ? 1105 : 1104; + $bandwidth = $cond; + $7 = $bandwidth; + STACKTOP = sp;return ($7|0); + } else { + $shr19 = $conv13 >> 5; + $and20 = $shr19 & 3; + $add21 = (1101 + ($and20))|0; + $bandwidth = $add21; + $7 = $bandwidth; + STACKTOP = sp;return ($7|0); + } + return (0)|0; +} +function _opus_packet_get_nb_channels($data) { + $data = $data|0; + var $0 = 0, $1 = 0, $and = 0, $cond = 0, $conv = 0, $data$addr = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $data$addr = $data; + $0 = $data$addr; + $1 = HEAP8[$0>>0]|0; + $conv = $1&255; + $and = $conv & 4; + $tobool = ($and|0)!=(0); + $cond = $tobool ? 2 : 1; + STACKTOP = sp;return ($cond|0); +} +function _ec_tell($_this) { + $_this = $_this|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $_this$addr = 0, $nbits_total = 0, $rng = 0, $sub = 0, $sub1 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $0 = $_this$addr; + $nbits_total = ((($0)) + 20|0); + $1 = HEAP32[$nbits_total>>2]|0; + $2 = $_this$addr; + $rng = ((($2)) + 28|0); + $3 = HEAP32[$rng>>2]|0; + $4 = (Math_clz32(($3|0))|0); + $sub = (32 - ($4))|0; + $sub1 = (($1) - ($sub))|0; + STACKTOP = sp;return ($sub1|0); +} +function _smooth_fade($in1,$in2,$out,$overlap,$channels,$window,$Fs) { + $in1 = $in1|0; + $in2 = $in2|0; + $out = $out|0; + $overlap = $overlap|0; + $channels = $channels|0; + $window = $window|0; + $Fs = $Fs|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, $Fs$addr = 0, $add = 0, $add11 = 0, $add14 = 0.0, $add16 = 0, $arrayidx = 0, $arrayidx12 = 0, $arrayidx17 = 0, $arrayidx5 = 0; + var $arrayidx8 = 0, $c = 0, $channels$addr = 0, $cmp = 0, $cmp2 = 0, $div = 0, $i = 0, $in1$addr = 0, $in2$addr = 0, $inc = 0, $inc18 = 0, $inc20 = 0, $mul = 0, $mul10 = 0, $mul13 = 0.0, $mul15 = 0, $mul4 = 0, $mul6 = 0.0, $mul7 = 0, $mul9 = 0.0; + var $out$addr = 0, $overlap$addr = 0, $sub = 0.0, $w = 0.0, $window$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $in1$addr = $in1; + $in2$addr = $in2; + $out$addr = $out; + $overlap$addr = $overlap; + $channels$addr = $channels; + $window$addr = $window; + $Fs$addr = $Fs; + $0 = $Fs$addr; + $div = (48000 / ($0|0))&-1; + $inc = $div; + $c = 0; + while(1) { + $1 = $c; + $2 = $channels$addr; + $cmp = ($1|0)<($2|0); + if (!($cmp)) { + break; + } + $i = 0; + while(1) { + $3 = $i; + $4 = $overlap$addr; + $cmp2 = ($3|0)<($4|0); + if (!($cmp2)) { + break; + } + $5 = $window$addr; + $6 = $i; + $7 = $inc; + $mul = Math_imul($6, $7)|0; + $arrayidx = (($5) + ($mul<<2)|0); + $8 = +HEAPF32[$arrayidx>>2]; + $9 = $window$addr; + $10 = $i; + $11 = $inc; + $mul4 = Math_imul($10, $11)|0; + $arrayidx5 = (($9) + ($mul4<<2)|0); + $12 = +HEAPF32[$arrayidx5>>2]; + $mul6 = $8 * $12; + $w = $mul6; + $13 = $w; + $14 = $in2$addr; + $15 = $i; + $16 = $channels$addr; + $mul7 = Math_imul($15, $16)|0; + $17 = $c; + $add = (($mul7) + ($17))|0; + $arrayidx8 = (($14) + ($add<<2)|0); + $18 = +HEAPF32[$arrayidx8>>2]; + $mul9 = $13 * $18; + $19 = $w; + $sub = 1.0 - $19; + $20 = $in1$addr; + $21 = $i; + $22 = $channels$addr; + $mul10 = Math_imul($21, $22)|0; + $23 = $c; + $add11 = (($mul10) + ($23))|0; + $arrayidx12 = (($20) + ($add11<<2)|0); + $24 = +HEAPF32[$arrayidx12>>2]; + $mul13 = $sub * $24; + $add14 = $mul9 + $mul13; + $25 = $out$addr; + $26 = $i; + $27 = $channels$addr; + $mul15 = Math_imul($26, $27)|0; + $28 = $c; + $add16 = (($mul15) + ($28))|0; + $arrayidx17 = (($25) + ($add16<<2)|0); + HEAPF32[$arrayidx17>>2] = $add14; + $29 = $i; + $inc18 = (($29) + 1)|0; + $i = $inc18; + } + $30 = $c; + $inc20 = (($30) + 1)|0; + $c = $inc20; + } + STACKTOP = sp;return; +} +function _opus_decode_float($st,$data,$len,$pcm,$frame_size,$decode_fec) { + $st = $st|0; + $data = $data|0; + $len = $len|0; + $pcm = $pcm|0; + $frame_size = $frame_size|0; + $decode_fec = $decode_fec|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $call = 0, $cmp = 0, $data$addr = 0, $decode_fec$addr = 0, $frame_size$addr = 0, $len$addr = 0, $pcm$addr = 0, $retval = 0, $st$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $st$addr = $st; + $data$addr = $data; + $len$addr = $len; + $pcm$addr = $pcm; + $frame_size$addr = $frame_size; + $decode_fec$addr = $decode_fec; + $0 = $frame_size$addr; + $cmp = ($0|0)<=(0); + if ($cmp) { + $retval = -1; + $7 = $retval; + STACKTOP = sp;return ($7|0); + } else { + $1 = $st$addr; + $2 = $data$addr; + $3 = $len$addr; + $4 = $pcm$addr; + $5 = $frame_size$addr; + $6 = $decode_fec$addr; + $call = (_opus_decode_native($1,$2,$3,$4,$5,$6,0,0,0)|0); + $retval = $call; + $7 = $retval; + STACKTOP = sp;return ($7|0); + } + return (0)|0; +} +function _opus_encoder_get_size($channels) { + $channels = $channels|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $add = 0, $add7 = 0, $call = 0, $call4 = 0, $call5 = 0, $call6 = 0, $celtEncSizeBytes = 0, $channels$addr = 0, $cmp = 0, $cmp1 = 0, $or$cond = 0, $ret = 0; + var $retval = 0, $silkEncSizeBytes = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $silkEncSizeBytes = sp + 8|0; + $channels$addr = $channels; + $0 = $channels$addr; + $cmp = ($0|0)<(1); + $1 = $channels$addr; + $cmp1 = ($1|0)>(2); + $or$cond = $cmp | $cmp1; + if ($or$cond) { + $retval = 0; + $7 = $retval; + STACKTOP = sp;return ($7|0); + } + $call = (_silk_Get_Encoder_Size($silkEncSizeBytes)|0); + $ret = $call; + $2 = $ret; + $tobool = ($2|0)!=(0); + if ($tobool) { + $retval = 0; + $7 = $retval; + STACKTOP = sp;return ($7|0); + } else { + $3 = HEAP32[$silkEncSizeBytes>>2]|0; + $call4 = (_align_5($3)|0); + HEAP32[$silkEncSizeBytes>>2] = $call4; + $4 = $channels$addr; + $call5 = (_celt_encoder_get_size($4)|0); + $celtEncSizeBytes = $call5; + $call6 = (_align_5(18220)|0); + $5 = HEAP32[$silkEncSizeBytes>>2]|0; + $add = (($call6) + ($5))|0; + $6 = $celtEncSizeBytes; + $add7 = (($add) + ($6))|0; + $retval = $add7; + $7 = $retval; + STACKTOP = sp;return ($7|0); + } + return (0)|0; +} +function _align_5($i) { + $i = $i|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $add = 0, $alignment = 0, $div = 0, $i$addr = 0, $mul = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $i$addr = $i; + $alignment = 4; + $0 = $i$addr; + $1 = $alignment; + $add = (($0) + ($1))|0; + $sub = (($add) - 1)|0; + $2 = $alignment; + $div = (($sub>>>0) / ($2>>>0))&-1; + $3 = $alignment; + $mul = Math_imul($div, $3)|0; + STACKTOP = sp;return ($mul|0); +} +function _opus_encoder_init($st,$Fs,$channels,$application) { + $st = $st|0; + $Fs = $Fs|0; + $channels = $channels|0; + $application = $application|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; + var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $API_sampleRate = 0, $Fs$addr = 0, $Fs27 = 0, $Fs36 = 0, $Fs64 = 0, $Fs65 = 0; + var $add = 0, $add$ptr = 0, $add$ptr25 = 0, $add62 = 0, $analysis = 0, $application$addr = 0, $application63 = 0, $arch = 0, $arch29 = 0, $arch49 = 0, $bandwidth = 0, $bitRate = 0, $bitrate_bps = 0, $call = 0, $call17 = 0, $call20 = 0, $call21 = 0, $call28 = 0, $call30 = 0, $call50 = 0; + var $call67 = 0, $celt_enc = 0, $channels$addr = 0, $channels26 = 0, $cmp = 0, $cmp1 = 0, $cmp10 = 0, $cmp12 = 0, $cmp14 = 0, $cmp16 = 0, $cmp3 = 0, $cmp5 = 0, $cmp51 = 0, $cmp7 = 0, $cmp8 = 0, $complexity = 0, $complexity59 = 0, $delay_compensation = 0, $desiredInternalSampleRate = 0, $div = 0; + var $div66 = 0, $encoder_buffer = 0, $err = 0, $first = 0, $force_channels = 0, $hybrid_stereo_width_Q14 = 0, $lsb_depth = 0, $maxInternalSampleRate = 0, $max_bandwidth = 0, $minInternalSampleRate = 0, $mode = 0, $mul = 0, $mul61 = 0, $nChannelsInternal = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $or$cond3 = 0, $or$cond4 = 0, $or$cond5 = 0; + var $or$cond6 = 0, $packetLossPercentage = 0, $payloadSize_ms = 0, $prev_HB_gain = 0, $reducedDependency = 0, $ret = 0, $retval = 0, $shl = 0, $signal_type = 0, $silkEncSizeBytes = 0, $silk_enc = 0, $silk_enc_offset = 0, $silk_enc_offset22 = 0, $silk_enc_offset23 = 0, $silk_mode = 0, $silk_mode34 = 0, $silk_mode35 = 0, $silk_mode37 = 0, $silk_mode38 = 0, $silk_mode39 = 0; + var $silk_mode40 = 0, $silk_mode41 = 0, $silk_mode42 = 0, $silk_mode43 = 0, $silk_mode44 = 0, $silk_mode45 = 0, $silk_mode46 = 0, $silk_mode47 = 0, $silk_mode48 = 0, $silk_mode58 = 0, $st$addr = 0, $stream_channels = 0, $tobool = 0, $tobool31 = 0, $useCBR = 0, $useDTX = 0, $useInBandFEC = 0, $use_vbr = 0, $user_bandwidth = 0, $user_bitrate_bps = 0; + var $user_forced_mode = 0, $vararg_buffer = 0, $vararg_buffer7 = 0, $variable_HP_smth2_Q15 = 0, $variable_duration = 0, $vbr_constraint = 0, $voice_ratio = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $vararg_buffer7 = sp + 8|0; + $vararg_buffer = sp; + $silkEncSizeBytes = sp + 12|0; + $st$addr = $st; + $Fs$addr = $Fs; + $channels$addr = $channels; + $application$addr = $application; + $0 = $Fs$addr; + $cmp = ($0|0)!=(48000); + $1 = $Fs$addr; + $cmp1 = ($1|0)!=(24000); + $or$cond = $cmp & $cmp1; + $2 = $Fs$addr; + $cmp3 = ($2|0)!=(16000); + $or$cond1 = $or$cond & $cmp3; + $3 = $Fs$addr; + $cmp5 = ($3|0)!=(12000); + $or$cond2 = $or$cond1 & $cmp5; + $4 = $Fs$addr; + $cmp7 = ($4|0)!=(8000); + $or$cond3 = $or$cond2 & $cmp7; + if (!($or$cond3)) { + $5 = $channels$addr; + $cmp8 = ($5|0)!=(1); + $6 = $channels$addr; + $cmp10 = ($6|0)!=(2); + $or$cond4 = $cmp8 & $cmp10; + if (!($or$cond4)) { + $7 = $application$addr; + $cmp12 = ($7|0)!=(2048); + $8 = $application$addr; + $cmp14 = ($8|0)!=(2049); + $or$cond5 = $cmp12 & $cmp14; + $9 = $application$addr; + $cmp16 = ($9|0)!=(2051); + $or$cond6 = $or$cond5 & $cmp16; + if (!($or$cond6)) { + $10 = $st$addr; + $11 = $channels$addr; + $call = (_opus_encoder_get_size($11)|0); + $mul = $call; + _memset(($10|0),0,($mul|0))|0; + $call17 = (_silk_Get_Encoder_Size($silkEncSizeBytes)|0); + $ret = $call17; + $12 = $ret; + $tobool = ($12|0)!=(0); + if ($tobool) { + $retval = -1; + $93 = $retval; + STACKTOP = sp;return ($93|0); + } + $13 = HEAP32[$silkEncSizeBytes>>2]|0; + $call20 = (_align_5($13)|0); + HEAP32[$silkEncSizeBytes>>2] = $call20; + $call21 = (_align_5(18220)|0); + $14 = $st$addr; + $silk_enc_offset = ((($14)) + 4|0); + HEAP32[$silk_enc_offset>>2] = $call21; + $15 = $st$addr; + $silk_enc_offset22 = ((($15)) + 4|0); + $16 = HEAP32[$silk_enc_offset22>>2]|0; + $17 = HEAP32[$silkEncSizeBytes>>2]|0; + $add = (($16) + ($17))|0; + $18 = $st$addr; + HEAP32[$18>>2] = $add; + $19 = $st$addr; + $20 = $st$addr; + $silk_enc_offset23 = ((($20)) + 4|0); + $21 = HEAP32[$silk_enc_offset23>>2]|0; + $add$ptr = (($19) + ($21)|0); + $silk_enc = $add$ptr; + $22 = $st$addr; + $23 = $st$addr; + $24 = HEAP32[$23>>2]|0; + $add$ptr25 = (($22) + ($24)|0); + $celt_enc = $add$ptr25; + $25 = $channels$addr; + $26 = $st$addr; + $channels26 = ((($26)) + 100|0); + HEAP32[$channels26>>2] = $25; + $27 = $st$addr; + $stream_channels = ((($27)) + 14288|0); + HEAP32[$stream_channels>>2] = $25; + $28 = $Fs$addr; + $29 = $st$addr; + $Fs27 = ((($29)) + 132|0); + HEAP32[$Fs27>>2] = $28; + $call28 = (_opus_select_arch_6()|0); + $30 = $st$addr; + $arch = ((($30)) + 168|0); + HEAP32[$arch>>2] = $call28; + $31 = $silk_enc; + $32 = $st$addr; + $arch29 = ((($32)) + 168|0); + $33 = HEAP32[$arch29>>2]|0; + $34 = $st$addr; + $silk_mode = ((($34)) + 8|0); + $call30 = (_silk_InitEncoder($31,$33,$silk_mode)|0); + $ret = $call30; + $35 = $ret; + $tobool31 = ($35|0)!=(0); + if ($tobool31) { + $retval = -3; + $93 = $retval; + STACKTOP = sp;return ($93|0); + } + $36 = $channels$addr; + $37 = $st$addr; + $silk_mode34 = ((($37)) + 8|0); + HEAP32[$silk_mode34>>2] = $36; + $38 = $channels$addr; + $39 = $st$addr; + $silk_mode35 = ((($39)) + 8|0); + $nChannelsInternal = ((($silk_mode35)) + 4|0); + HEAP32[$nChannelsInternal>>2] = $38; + $40 = $st$addr; + $Fs36 = ((($40)) + 132|0); + $41 = HEAP32[$Fs36>>2]|0; + $42 = $st$addr; + $silk_mode37 = ((($42)) + 8|0); + $API_sampleRate = ((($silk_mode37)) + 8|0); + HEAP32[$API_sampleRate>>2] = $41; + $43 = $st$addr; + $silk_mode38 = ((($43)) + 8|0); + $maxInternalSampleRate = ((($silk_mode38)) + 12|0); + HEAP32[$maxInternalSampleRate>>2] = 16000; + $44 = $st$addr; + $silk_mode39 = ((($44)) + 8|0); + $minInternalSampleRate = ((($silk_mode39)) + 16|0); + HEAP32[$minInternalSampleRate>>2] = 8000; + $45 = $st$addr; + $silk_mode40 = ((($45)) + 8|0); + $desiredInternalSampleRate = ((($silk_mode40)) + 20|0); + HEAP32[$desiredInternalSampleRate>>2] = 16000; + $46 = $st$addr; + $silk_mode41 = ((($46)) + 8|0); + $payloadSize_ms = ((($silk_mode41)) + 24|0); + HEAP32[$payloadSize_ms>>2] = 20; + $47 = $st$addr; + $silk_mode42 = ((($47)) + 8|0); + $bitRate = ((($silk_mode42)) + 28|0); + HEAP32[$bitRate>>2] = 25000; + $48 = $st$addr; + $silk_mode43 = ((($48)) + 8|0); + $packetLossPercentage = ((($silk_mode43)) + 32|0); + HEAP32[$packetLossPercentage>>2] = 0; + $49 = $st$addr; + $silk_mode44 = ((($49)) + 8|0); + $complexity = ((($silk_mode44)) + 36|0); + HEAP32[$complexity>>2] = 9; + $50 = $st$addr; + $silk_mode45 = ((($50)) + 8|0); + $useInBandFEC = ((($silk_mode45)) + 40|0); + HEAP32[$useInBandFEC>>2] = 0; + $51 = $st$addr; + $silk_mode46 = ((($51)) + 8|0); + $useDTX = ((($silk_mode46)) + 44|0); + HEAP32[$useDTX>>2] = 0; + $52 = $st$addr; + $silk_mode47 = ((($52)) + 8|0); + $useCBR = ((($silk_mode47)) + 48|0); + HEAP32[$useCBR>>2] = 0; + $53 = $st$addr; + $silk_mode48 = ((($53)) + 8|0); + $reducedDependency = ((($silk_mode48)) + 64|0); + HEAP32[$reducedDependency>>2] = 0; + $54 = $celt_enc; + $55 = $Fs$addr; + $56 = $channels$addr; + $57 = $st$addr; + $arch49 = ((($57)) + 168|0); + $58 = HEAP32[$arch49>>2]|0; + $call50 = (_celt_encoder_init($54,$55,$56,$58)|0); + $err = $call50; + $59 = $err; + $cmp51 = ($59|0)!=(0); + if ($cmp51) { + $retval = -3; + $93 = $retval; + STACKTOP = sp;return ($93|0); + } else { + $60 = $celt_enc; + HEAP32[$vararg_buffer>>2] = 0; + (_opus_custom_encoder_ctl($60,10016,$vararg_buffer)|0); + $61 = $celt_enc; + $62 = $st$addr; + $silk_mode58 = ((($62)) + 8|0); + $complexity59 = ((($silk_mode58)) + 36|0); + $63 = HEAP32[$complexity59>>2]|0; + HEAP32[$vararg_buffer7>>2] = $63; + (_opus_custom_encoder_ctl($61,4010,$vararg_buffer7)|0); + $64 = $st$addr; + $use_vbr = ((($64)) + 136|0); + HEAP32[$use_vbr>>2] = 1; + $65 = $st$addr; + $vbr_constraint = ((($65)) + 140|0); + HEAP32[$vbr_constraint>>2] = 1; + $66 = $st$addr; + $user_bitrate_bps = ((($66)) + 152|0); + HEAP32[$user_bitrate_bps>>2] = -1000; + $67 = $Fs$addr; + $68 = $channels$addr; + $mul61 = Math_imul($67, $68)|0; + $add62 = (3000 + ($mul61))|0; + $69 = $st$addr; + $bitrate_bps = ((($69)) + 148|0); + HEAP32[$bitrate_bps>>2] = $add62; + $70 = $application$addr; + $71 = $st$addr; + $application63 = ((($71)) + 96|0); + HEAP32[$application63>>2] = $70; + $72 = $st$addr; + $signal_type = ((($72)) + 112|0); + HEAP32[$signal_type>>2] = -1000; + $73 = $st$addr; + $user_bandwidth = ((($73)) + 116|0); + HEAP32[$user_bandwidth>>2] = -1000; + $74 = $st$addr; + $max_bandwidth = ((($74)) + 120|0); + HEAP32[$max_bandwidth>>2] = 1105; + $75 = $st$addr; + $force_channels = ((($75)) + 108|0); + HEAP32[$force_channels>>2] = -1000; + $76 = $st$addr; + $user_forced_mode = ((($76)) + 124|0); + HEAP32[$user_forced_mode>>2] = -1000; + $77 = $st$addr; + $voice_ratio = ((($77)) + 128|0); + HEAP32[$voice_ratio>>2] = -1; + $78 = $st$addr; + $Fs64 = ((($78)) + 132|0); + $79 = HEAP32[$Fs64>>2]|0; + $div = (($79|0) / 100)&-1; + $80 = $st$addr; + $encoder_buffer = ((($80)) + 160|0); + HEAP32[$encoder_buffer>>2] = $div; + $81 = $st$addr; + $lsb_depth = ((($81)) + 156|0); + HEAP32[$lsb_depth>>2] = 24; + $82 = $st$addr; + $variable_duration = ((($82)) + 144|0); + HEAP32[$variable_duration>>2] = 5000; + $83 = $st$addr; + $Fs65 = ((($83)) + 132|0); + $84 = HEAP32[$Fs65>>2]|0; + $div66 = (($84|0) / 250)&-1; + $85 = $st$addr; + $delay_compensation = ((($85)) + 104|0); + HEAP32[$delay_compensation>>2] = $div66; + $86 = $st$addr; + $hybrid_stereo_width_Q14 = ((($86)) + 14292|0); + HEAP16[$hybrid_stereo_width_Q14>>1] = 16384; + $87 = $st$addr; + $prev_HB_gain = ((($87)) + 14300|0); + HEAPF32[$prev_HB_gain>>2] = 1.0; + $call67 = (_silk_lin2log(60)|0); + $shl = $call67 << 8; + $88 = $st$addr; + $variable_HP_smth2_Q15 = ((($88)) + 14296|0); + HEAP32[$variable_HP_smth2_Q15>>2] = $shl; + $89 = $st$addr; + $first = ((($89)) + 14344|0); + HEAP32[$first>>2] = 1; + $90 = $st$addr; + $mode = ((($90)) + 14320|0); + HEAP32[$mode>>2] = 1001; + $91 = $st$addr; + $bandwidth = ((($91)) + 14336|0); + HEAP32[$bandwidth>>2] = 1105; + $92 = $st$addr; + $analysis = ((($92)) + 172|0); + _tonality_analysis_init($analysis); + $retval = 0; + $93 = $retval; + STACKTOP = sp;return ($93|0); + } + } + } + } + $retval = -1; + $93 = $retval; + STACKTOP = sp;return ($93|0); +} +function _opus_select_arch_6() { + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function _opus_encoder_create($Fs,$channels,$application,$error) { + $Fs = $Fs|0; + $channels = $channels|0; + $application = $application|0; + $error = $error|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $Fs$addr = 0, $application$addr = 0, $call = 0, $call19 = 0, $call26 = 0, $channels$addr = 0, $cmp = 0, $cmp1 = 0, $cmp10 = 0, $cmp12 = 0, $cmp14 = 0, $cmp16 = 0, $cmp20 = 0; + var $cmp3 = 0, $cmp30 = 0, $cmp5 = 0, $cmp7 = 0, $cmp8 = 0, $error$addr = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $or$cond3 = 0, $or$cond4 = 0, $or$cond5 = 0, $or$cond6 = 0, $ret = 0, $retval = 0, $st = 0, $tobool = 0, $tobool22 = 0, $tobool27 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $Fs$addr = $Fs; + $channels$addr = $channels; + $application$addr = $application; + $error$addr = $error; + $0 = $Fs$addr; + $cmp = ($0|0)!=(48000); + $1 = $Fs$addr; + $cmp1 = ($1|0)!=(24000); + $or$cond = $cmp & $cmp1; + $2 = $Fs$addr; + $cmp3 = ($2|0)!=(16000); + $or$cond1 = $or$cond & $cmp3; + $3 = $Fs$addr; + $cmp5 = ($3|0)!=(12000); + $or$cond2 = $or$cond1 & $cmp5; + $4 = $Fs$addr; + $cmp7 = ($4|0)!=(8000); + $or$cond3 = $or$cond2 & $cmp7; + if (!($or$cond3)) { + $5 = $channels$addr; + $cmp8 = ($5|0)!=(1); + $6 = $channels$addr; + $cmp10 = ($6|0)!=(2); + $or$cond4 = $cmp8 & $cmp10; + if (!($or$cond4)) { + $7 = $application$addr; + $cmp12 = ($7|0)!=(2048); + $8 = $application$addr; + $cmp14 = ($8|0)!=(2049); + $or$cond5 = $cmp12 & $cmp14; + $9 = $application$addr; + $cmp16 = ($9|0)!=(2051); + $or$cond6 = $or$cond5 & $cmp16; + if (!($or$cond6)) { + $12 = $channels$addr; + $call = (_opus_encoder_get_size($12)|0); + $call19 = (_opus_alloc_9($call)|0); + $st = $call19; + $13 = $st; + $cmp20 = ($13|0)==(0|0); + if ($cmp20) { + $14 = $error$addr; + $tobool22 = ($14|0)!=(0|0); + if ($tobool22) { + $15 = $error$addr; + HEAP32[$15>>2] = -7; + } + $retval = 0; + $26 = $retval; + STACKTOP = sp;return ($26|0); + } + $16 = $st; + $17 = $Fs$addr; + $18 = $channels$addr; + $19 = $application$addr; + $call26 = (_opus_encoder_init($16,$17,$18,$19)|0); + $ret = $call26; + $20 = $error$addr; + $tobool27 = ($20|0)!=(0|0); + if ($tobool27) { + $21 = $ret; + $22 = $error$addr; + HEAP32[$22>>2] = $21; + } + $23 = $ret; + $cmp30 = ($23|0)!=(0); + if ($cmp30) { + $24 = $st; + _opus_free_10($24); + $st = 0; + } + $25 = $st; + $retval = $25; + $26 = $retval; + STACKTOP = sp;return ($26|0); + } + } + } + $10 = $error$addr; + $tobool = ($10|0)!=(0|0); + if ($tobool) { + $11 = $error$addr; + HEAP32[$11>>2] = -1; + } + $retval = 0; + $26 = $retval; + STACKTOP = sp;return ($26|0); +} +function _opus_alloc_9($size) { + $size = $size|0; + var $0 = 0, $call = 0, $size$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $size$addr = $size; + $0 = $size$addr; + $call = (_malloc($0)|0); + STACKTOP = sp;return ($call|0); +} +function _opus_free_10($ptr) { + $ptr = $ptr|0; + var $0 = 0, $ptr$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $ptr$addr = $ptr; + $0 = $ptr$addr; + _free($0); + STACKTOP = sp;return; +} +function _tonality_analysis_init($tonal) { + $tonal = $tonal|0; + var $0 = 0, $1 = 0, $call = 0, $tonal$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $tonal$addr = $tonal; + $call = (_opus_select_arch_25()|0); + $0 = $tonal$addr; + HEAP32[$0>>2] = $call; + $1 = $tonal$addr; + _tonality_analysis_reset($1); + STACKTOP = sp;return; +} +function _opus_select_arch_25() { + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function _tonality_analysis_reset($tonal) { + $tonal = $tonal|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $angle = 0, $mul = 0, $start = 0, $sub = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0, $tonal$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $tonal$addr = $tonal; + $0 = $tonal$addr; + $angle = ((($0)) + 4|0); + $start = $angle; + $1 = $start; + $2 = $start; + $3 = $tonal$addr; + $sub$ptr$lhs$cast = $2; + $sub$ptr$rhs$cast = $3; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub = (14116 - ($sub$ptr$sub))|0; + $mul = $sub; + _memset(($1|0),0,($mul|0))|0; + STACKTOP = sp;return; +} +function _celt_encoder_get_size($channels) { + $channels = $channels|0; + var $0 = 0, $1 = 0, $call = 0, $call1 = 0, $channels$addr = 0, $mode = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $channels$addr = $channels; + $call = (_opus_custom_mode_create(48000,960,0)|0); + $mode = $call; + $0 = $mode; + $1 = $channels$addr; + $call1 = (_opus_custom_encoder_get_size($0,$1)|0); + STACKTOP = sp;return ($call1|0); +} +function _opus_custom_encoder_get_size($mode,$channels) { + $mode = $mode|0; + $channels = $channels|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $add = 0, $add4 = 0, $add8 = 0, $channels$addr = 0, $mode$addr = 0, $mul = 0, $mul1 = 0, $mul2 = 0, $mul3 = 0, $mul5 = 0, $mul6 = 0, $mul7 = 0; + var $nbEBands = 0, $overlap = 0, $size = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $mode$addr = $mode; + $channels$addr = $channels; + $0 = $channels$addr; + $1 = $mode$addr; + $overlap = ((($1)) + 4|0); + $2 = HEAP32[$overlap>>2]|0; + $mul = Math_imul($0, $2)|0; + $sub = (($mul) - 1)|0; + $mul1 = $sub<<2; + $add = (204 + ($mul1))|0; + $3 = $channels$addr; + $mul2 = $3<<10; + $mul3 = $mul2<<2; + $add4 = (($add) + ($mul3))|0; + $4 = $channels$addr; + $mul5 = ($4*3)|0; + $5 = $mode$addr; + $nbEBands = ((($5)) + 8|0); + $6 = HEAP32[$nbEBands>>2]|0; + $mul6 = Math_imul($mul5, $6)|0; + $mul7 = $mul6<<2; + $add8 = (($add4) + ($mul7))|0; + $size = $add8; + $7 = $size; + STACKTOP = sp;return ($7|0); +} +function _celt_encoder_init($st,$sampling_rate,$channels,$arch) { + $st = $st|0; + $sampling_rate = $sampling_rate|0; + $channels = $channels|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $arch$addr = 0, $call = 0, $call1 = 0, $call2 = 0, $channels$addr = 0, $cmp = 0, $ret = 0, $retval = 0, $sampling_rate$addr = 0, $st$addr = 0, $upsample = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $st$addr = $st; + $sampling_rate$addr = $sampling_rate; + $channels$addr = $channels; + $arch$addr = $arch; + $0 = $st$addr; + $call = (_opus_custom_mode_create(48000,960,0)|0); + $1 = $channels$addr; + $2 = $arch$addr; + $call1 = (_opus_custom_encoder_init_arch($0,$call,$1,$2)|0); + $ret = $call1; + $3 = $ret; + $cmp = ($3|0)!=(0); + if ($cmp) { + $4 = $ret; + $retval = $4; + $7 = $retval; + STACKTOP = sp;return ($7|0); + } else { + $5 = $sampling_rate$addr; + $call2 = (_resampling_factor($5)|0); + $6 = $st$addr; + $upsample = ((($6)) + 28|0); + HEAP32[$upsample>>2] = $call2; + $retval = 0; + $7 = $retval; + STACKTOP = sp;return ($7|0); + } + return (0)|0; +} +function _opus_custom_encoder_init_arch($st,$mode,$channels,$arch) { + $st = $st|0; + $mode = $mode|0; + $channels = $channels|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $arch$addr = 0, $arch10 = 0, $bitrate = 0, $call = 0, $channels$addr = 0, $channels8 = 0, $clip = 0, $cmp = 0, $cmp1 = 0, $cmp2 = 0; + var $cmp4 = 0, $complexity = 0, $constrained_vbr = 0, $effEBands = 0, $end = 0, $force_intra = 0, $lsb_depth = 0, $mode$addr = 0, $mul = 0, $or$cond = 0, $or$cond1 = 0, $retval = 0, $signalling = 0, $st$addr = 0, $start = 0, $stream_channels = 0, $upsample = 0, $vararg_buffer = 0, $vbr = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer = sp; + $st$addr = $st; + $mode$addr = $mode; + $channels$addr = $channels; + $arch$addr = $arch; + $0 = $channels$addr; + $cmp = ($0|0)<(0); + $1 = $channels$addr; + $cmp1 = ($1|0)>(2); + $or$cond = $cmp | $cmp1; + if ($or$cond) { + $retval = -1; + $29 = $retval; + STACKTOP = sp;return ($29|0); + } + $2 = $st$addr; + $cmp2 = ($2|0)==(0|0); + $3 = $mode$addr; + $cmp4 = ($3|0)==(0|0); + $or$cond1 = $cmp2 | $cmp4; + if ($or$cond1) { + $retval = -7; + $29 = $retval; + STACKTOP = sp;return ($29|0); + } else { + $4 = $st$addr; + $5 = $mode$addr; + $6 = $channels$addr; + $call = (_opus_custom_encoder_get_size($5,$6)|0); + $mul = $call; + _memset(($4|0),0,($mul|0))|0; + $7 = $mode$addr; + $8 = $st$addr; + HEAP32[$8>>2] = $7; + $9 = $channels$addr; + $10 = $st$addr; + $channels8 = ((($10)) + 4|0); + HEAP32[$channels8>>2] = $9; + $11 = $st$addr; + $stream_channels = ((($11)) + 8|0); + HEAP32[$stream_channels>>2] = $9; + $12 = $st$addr; + $upsample = ((($12)) + 28|0); + HEAP32[$upsample>>2] = 1; + $13 = $st$addr; + $start = ((($13)) + 32|0); + HEAP32[$start>>2] = 0; + $14 = $st$addr; + $15 = HEAP32[$14>>2]|0; + $effEBands = ((($15)) + 12|0); + $16 = HEAP32[$effEBands>>2]|0; + $17 = $st$addr; + $end = ((($17)) + 36|0); + HEAP32[$end>>2] = $16; + $18 = $st$addr; + $signalling = ((($18)) + 48|0); + HEAP32[$signalling>>2] = 1; + $19 = $arch$addr; + $20 = $st$addr; + $arch10 = ((($20)) + 72|0); + HEAP32[$arch10>>2] = $19; + $21 = $st$addr; + $constrained_vbr = ((($21)) + 52|0); + HEAP32[$constrained_vbr>>2] = 1; + $22 = $st$addr; + $clip = ((($22)) + 16|0); + HEAP32[$clip>>2] = 1; + $23 = $st$addr; + $bitrate = ((($23)) + 40|0); + HEAP32[$bitrate>>2] = -1; + $24 = $st$addr; + $vbr = ((($24)) + 44|0); + HEAP32[$vbr>>2] = 0; + $25 = $st$addr; + $force_intra = ((($25)) + 12|0); + HEAP32[$force_intra>>2] = 0; + $26 = $st$addr; + $complexity = ((($26)) + 24|0); + HEAP32[$complexity>>2] = 5; + $27 = $st$addr; + $lsb_depth = ((($27)) + 60|0); + HEAP32[$lsb_depth>>2] = 24; + $28 = $st$addr; + (_opus_custom_encoder_ctl($28,4028,$vararg_buffer)|0); + $retval = 0; + $29 = $retval; + STACKTOP = sp;return ($29|0); + } + return (0)|0; +} +function _opus_custom_encoder_ctl($st,$request,$varargs) { + $st = $st|0; + $request = $request|0; + $varargs = $varargs|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; + var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; + var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; + var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0; + var $98 = 0, $99 = 0, $add = 0, $add$ptr = 0, $add$ptr109 = 0, $add$ptr114 = 0, $add139 = 0, $analysis = 0, $analysis134 = 0, $ap = 0, $arglist_current = 0, $arglist_current10 = 0, $arglist_current13 = 0, $arglist_current16 = 0, $arglist_current19 = 0, $arglist_current22 = 0, $arglist_current25 = 0, $arglist_current28 = 0, $arglist_current31 = 0, $arglist_current34 = 0; + var $arglist_current37 = 0, $arglist_current40 = 0, $arglist_current43 = 0, $arglist_current46 = 0, $arglist_current49 = 0, $arglist_current52 = 0, $arglist_current55 = 0, $arglist_current7 = 0, $arglist_next = 0, $arglist_next11 = 0, $arglist_next14 = 0, $arglist_next17 = 0, $arglist_next20 = 0, $arglist_next23 = 0, $arglist_next26 = 0, $arglist_next29 = 0, $arglist_next32 = 0, $arglist_next35 = 0, $arglist_next38 = 0, $arglist_next41 = 0; + var $arglist_next44 = 0, $arglist_next47 = 0, $arglist_next50 = 0, $arglist_next53 = 0, $arglist_next56 = 0, $arglist_next8 = 0, $arrayidx = 0, $arrayidx125 = 0, $bitrate = 0, $call = 0, $channels = 0, $channels102 = 0, $channels105 = 0, $channels110 = 0, $channels116 = 0, $channels119 = 0, $channels67 = 0, $cmp = 0, $cmp10 = 0, $cmp123 = 0; + var $cmp145 = 0, $cmp154 = 0, $cmp17 = 0, $cmp21 = 0, $cmp28 = 0, $cmp3 = 0, $cmp30 = 0, $cmp33 = 0, $cmp34 = 0, $cmp40 = 0, $cmp43 = 0, $cmp59 = 0, $cmp61 = 0, $cmp65 = 0, $cmp73 = 0, $cmp76 = 0, $cmp8 = 0, $cmp84 = 0, $cmp87 = 0, $complexity = 0; + var $cond = 0, $constrained_vbr = 0, $conv = 0, $conv35 = 0, $delayedIntra = 0, $disable_pf = 0, $end = 0, $energy_mask = 0, $expanded = 0, $expanded100 = 0, $expanded102 = 0, $expanded103 = 0, $expanded104 = 0, $expanded106 = 0, $expanded107 = 0, $expanded109 = 0, $expanded11 = 0, $expanded110 = 0, $expanded111 = 0, $expanded113 = 0; + var $expanded114 = 0, $expanded116 = 0, $expanded117 = 0, $expanded118 = 0, $expanded12 = 0, $expanded120 = 0, $expanded121 = 0, $expanded123 = 0, $expanded124 = 0, $expanded125 = 0, $expanded13 = 0, $expanded15 = 0, $expanded16 = 0, $expanded18 = 0, $expanded19 = 0, $expanded2 = 0, $expanded20 = 0, $expanded22 = 0, $expanded23 = 0, $expanded25 = 0; + var $expanded26 = 0, $expanded27 = 0, $expanded29 = 0, $expanded30 = 0, $expanded32 = 0, $expanded33 = 0, $expanded34 = 0, $expanded36 = 0, $expanded37 = 0, $expanded39 = 0, $expanded4 = 0, $expanded40 = 0, $expanded41 = 0, $expanded43 = 0, $expanded44 = 0, $expanded46 = 0, $expanded47 = 0, $expanded48 = 0, $expanded5 = 0, $expanded50 = 0; + var $expanded51 = 0, $expanded53 = 0, $expanded54 = 0, $expanded55 = 0, $expanded57 = 0, $expanded58 = 0, $expanded6 = 0, $expanded60 = 0, $expanded61 = 0, $expanded62 = 0, $expanded64 = 0, $expanded65 = 0, $expanded67 = 0, $expanded68 = 0, $expanded69 = 0, $expanded71 = 0, $expanded72 = 0, $expanded74 = 0, $expanded75 = 0, $expanded76 = 0; + var $expanded78 = 0, $expanded79 = 0, $expanded8 = 0, $expanded81 = 0, $expanded82 = 0, $expanded83 = 0, $expanded85 = 0, $expanded86 = 0, $expanded88 = 0, $expanded89 = 0, $expanded9 = 0, $expanded90 = 0, $expanded92 = 0, $expanded93 = 0, $expanded95 = 0, $expanded96 = 0, $expanded97 = 0, $expanded99 = 0, $force_intra = 0, $hf_average = 0; + var $i = 0, $in_mem = 0, $inc = 0, $info = 0, $lfe = 0, $loss_rate = 0, $lsb_depth = 0, $lsb_depth95 = 0, $mul = 0, $mul104 = 0, $mul108 = 0, $mul113 = 0, $mul118 = 0, $mul122 = 0, $mul138 = 0, $mul68 = 0, $nbEBands = 0, $nbEBands107 = 0, $nbEBands112 = 0, $nbEBands121 = 0; + var $nbEBands20 = 0, $oldBandE = 0, $oldLogE = 0, $oldLogE2 = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $or$cond3 = 0, $or$cond4 = 0, $or$cond5 = 0, $overlap = 0, $request$addr = 0, $retval = 0, $rng = 0, $rng117 = 0, $rng158 = 0, $signalling = 0, $spread_decision = 0, $st$addr = 0, $start = 0; + var $stream_channels = 0, $sub = 0, $sub$ptr$div = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$lhs$cast135 = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$rhs$cast136 = 0, $sub$ptr$sub = 0, $sub$ptr$sub137 = 0, $tapset_decision = 0, $tobool = 0, $tonal_average = 0, $value = 0, $value127 = 0, $value14 = 0, $value142 = 0, $value151 = 0, $value160 = 0, $value164 = 0, $value25 = 0; + var $value37 = 0, $value48 = 0, $value5 = 0, $value52 = 0, $value56 = 0, $value70 = 0, $value81 = 0, $value92 = 0, $value97 = 0, $varet = 0, $varet129 = 0, $varet132 = 0, $varet144 = 0, $varet153 = 0, $varet16 = 0, $varet162 = 0, $varet166 = 0, $varet27 = 0, $varet39 = 0, $varet50 = 0; + var $varet54 = 0, $varet58 = 0, $varet7 = 0, $varet72 = 0, $varet83 = 0, $varet94 = 0, $varet99 = 0, $variable_duration = 0, $vbr = 0, $vbr_offset = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 192|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(192|0); + $ap = sp + 160|0; + $st$addr = $st; + $request$addr = $request; + HEAP32[$ap>>2] = $varargs; + $0 = $request$addr; + do { + switch ($0|0) { + case 4010: { + $arglist_current = HEAP32[$ap>>2]|0; + $1 = $arglist_current; + $2 = ((0) + 4|0); + $expanded2 = $2; + $expanded = (($expanded2) - 1)|0; + $3 = (($1) + ($expanded))|0; + $4 = ((0) + 4|0); + $expanded6 = $4; + $expanded5 = (($expanded6) - 1)|0; + $expanded4 = $expanded5 ^ -1; + $5 = $3 & $expanded4; + $6 = $5; + $7 = HEAP32[$6>>2]|0; + $arglist_next = ((($6)) + 4|0); + HEAP32[$ap>>2] = $arglist_next; + $varet = $7; + $8 = $varet; + $value = $8; + $9 = $value; + $cmp = ($9|0)<(0); + $10 = $value; + $cmp3 = ($10|0)>(10); + $or$cond = $cmp | $cmp3; + if ($or$cond) { + label = 41; + } else { + $11 = $value; + $12 = $st$addr; + $complexity = ((($12)) + 24|0); + HEAP32[$complexity>>2] = $11; + label = 40; + } + break; + } + case 10010: { + $arglist_current7 = HEAP32[$ap>>2]|0; + $13 = $arglist_current7; + $14 = ((0) + 4|0); + $expanded9 = $14; + $expanded8 = (($expanded9) - 1)|0; + $15 = (($13) + ($expanded8))|0; + $16 = ((0) + 4|0); + $expanded13 = $16; + $expanded12 = (($expanded13) - 1)|0; + $expanded11 = $expanded12 ^ -1; + $17 = $15 & $expanded11; + $18 = $17; + $19 = HEAP32[$18>>2]|0; + $arglist_next8 = ((($18)) + 4|0); + HEAP32[$ap>>2] = $arglist_next8; + $varet7 = $19; + $20 = $varet7; + $value5 = $20; + $21 = $value5; + $cmp8 = ($21|0)<(0); + if ($cmp8) { + label = 41; + } else { + $22 = $value5; + $23 = $st$addr; + $24 = HEAP32[$23>>2]|0; + $nbEBands = ((($24)) + 8|0); + $25 = HEAP32[$nbEBands>>2]|0; + $cmp10 = ($22|0)>=($25|0); + if ($cmp10) { + label = 41; + } else { + $26 = $value5; + $27 = $st$addr; + $start = ((($27)) + 32|0); + HEAP32[$start>>2] = $26; + label = 40; + } + } + break; + } + case 10012: { + $arglist_current10 = HEAP32[$ap>>2]|0; + $28 = $arglist_current10; + $29 = ((0) + 4|0); + $expanded16 = $29; + $expanded15 = (($expanded16) - 1)|0; + $30 = (($28) + ($expanded15))|0; + $31 = ((0) + 4|0); + $expanded20 = $31; + $expanded19 = (($expanded20) - 1)|0; + $expanded18 = $expanded19 ^ -1; + $32 = $30 & $expanded18; + $33 = $32; + $34 = HEAP32[$33>>2]|0; + $arglist_next11 = ((($33)) + 4|0); + HEAP32[$ap>>2] = $arglist_next11; + $varet16 = $34; + $35 = $varet16; + $value14 = $35; + $36 = $value14; + $cmp17 = ($36|0)<(1); + if ($cmp17) { + label = 41; + } else { + $37 = $value14; + $38 = $st$addr; + $39 = HEAP32[$38>>2]|0; + $nbEBands20 = ((($39)) + 8|0); + $40 = HEAP32[$nbEBands20>>2]|0; + $cmp21 = ($37|0)>($40|0); + if ($cmp21) { + label = 41; + } else { + $41 = $value14; + $42 = $st$addr; + $end = ((($42)) + 36|0); + HEAP32[$end>>2] = $41; + label = 40; + } + } + break; + } + case 10002: { + $arglist_current13 = HEAP32[$ap>>2]|0; + $43 = $arglist_current13; + $44 = ((0) + 4|0); + $expanded23 = $44; + $expanded22 = (($expanded23) - 1)|0; + $45 = (($43) + ($expanded22))|0; + $46 = ((0) + 4|0); + $expanded27 = $46; + $expanded26 = (($expanded27) - 1)|0; + $expanded25 = $expanded26 ^ -1; + $47 = $45 & $expanded25; + $48 = $47; + $49 = HEAP32[$48>>2]|0; + $arglist_next14 = ((($48)) + 4|0); + HEAP32[$ap>>2] = $arglist_next14; + $varet27 = $49; + $50 = $varet27; + $value25 = $50; + $51 = $value25; + $cmp28 = ($51|0)<(0); + $52 = $value25; + $cmp30 = ($52|0)>(2); + $or$cond1 = $cmp28 | $cmp30; + if ($or$cond1) { + label = 41; + } else { + $53 = $value25; + $cmp33 = ($53|0)<=(1); + $conv = $cmp33&1; + $54 = $st$addr; + $disable_pf = ((($54)) + 20|0); + HEAP32[$disable_pf>>2] = $conv; + $55 = $value25; + $cmp34 = ($55|0)==(0); + $conv35 = $cmp34&1; + $56 = $st$addr; + $force_intra = ((($56)) + 12|0); + HEAP32[$force_intra>>2] = $conv35; + label = 40; + } + break; + } + case 4014: { + $arglist_current16 = HEAP32[$ap>>2]|0; + $57 = $arglist_current16; + $58 = ((0) + 4|0); + $expanded30 = $58; + $expanded29 = (($expanded30) - 1)|0; + $59 = (($57) + ($expanded29))|0; + $60 = ((0) + 4|0); + $expanded34 = $60; + $expanded33 = (($expanded34) - 1)|0; + $expanded32 = $expanded33 ^ -1; + $61 = $59 & $expanded32; + $62 = $61; + $63 = HEAP32[$62>>2]|0; + $arglist_next17 = ((($62)) + 4|0); + HEAP32[$ap>>2] = $arglist_next17; + $varet39 = $63; + $64 = $varet39; + $value37 = $64; + $65 = $value37; + $cmp40 = ($65|0)<(0); + $66 = $value37; + $cmp43 = ($66|0)>(100); + $or$cond2 = $cmp40 | $cmp43; + if ($or$cond2) { + label = 41; + } else { + $67 = $value37; + $68 = $st$addr; + $loss_rate = ((($68)) + 56|0); + HEAP32[$loss_rate>>2] = $67; + label = 40; + } + break; + } + case 4020: { + $arglist_current19 = HEAP32[$ap>>2]|0; + $69 = $arglist_current19; + $70 = ((0) + 4|0); + $expanded37 = $70; + $expanded36 = (($expanded37) - 1)|0; + $71 = (($69) + ($expanded36))|0; + $72 = ((0) + 4|0); + $expanded41 = $72; + $expanded40 = (($expanded41) - 1)|0; + $expanded39 = $expanded40 ^ -1; + $73 = $71 & $expanded39; + $74 = $73; + $75 = HEAP32[$74>>2]|0; + $arglist_next20 = ((($74)) + 4|0); + HEAP32[$ap>>2] = $arglist_next20; + $varet50 = $75; + $76 = $varet50; + $value48 = $76; + $77 = $value48; + $78 = $st$addr; + $constrained_vbr = ((($78)) + 52|0); + HEAP32[$constrained_vbr>>2] = $77; + label = 40; + break; + } + case 4006: { + $arglist_current22 = HEAP32[$ap>>2]|0; + $79 = $arglist_current22; + $80 = ((0) + 4|0); + $expanded44 = $80; + $expanded43 = (($expanded44) - 1)|0; + $81 = (($79) + ($expanded43))|0; + $82 = ((0) + 4|0); + $expanded48 = $82; + $expanded47 = (($expanded48) - 1)|0; + $expanded46 = $expanded47 ^ -1; + $83 = $81 & $expanded46; + $84 = $83; + $85 = HEAP32[$84>>2]|0; + $arglist_next23 = ((($84)) + 4|0); + HEAP32[$ap>>2] = $arglist_next23; + $varet54 = $85; + $86 = $varet54; + $value52 = $86; + $87 = $value52; + $88 = $st$addr; + $vbr = ((($88)) + 44|0); + HEAP32[$vbr>>2] = $87; + label = 40; + break; + } + case 4002: { + $arglist_current25 = HEAP32[$ap>>2]|0; + $89 = $arglist_current25; + $90 = ((0) + 4|0); + $expanded51 = $90; + $expanded50 = (($expanded51) - 1)|0; + $91 = (($89) + ($expanded50))|0; + $92 = ((0) + 4|0); + $expanded55 = $92; + $expanded54 = (($expanded55) - 1)|0; + $expanded53 = $expanded54 ^ -1; + $93 = $91 & $expanded53; + $94 = $93; + $95 = HEAP32[$94>>2]|0; + $arglist_next26 = ((($94)) + 4|0); + HEAP32[$ap>>2] = $arglist_next26; + $varet58 = $95; + $96 = $varet58; + $value56 = $96; + $97 = $value56; + $cmp59 = ($97|0)<=(500); + $98 = $value56; + $cmp61 = ($98|0)!=(-1); + $or$cond3 = $cmp59 & $cmp61; + if ($or$cond3) { + label = 41; + } else { + $99 = $value56; + $100 = $st$addr; + $channels = ((($100)) + 4|0); + $101 = HEAP32[$channels>>2]|0; + $mul = ($101*260000)|0; + $cmp65 = ($99|0)<($mul|0); + if ($cmp65) { + $102 = $value56; + $cond = $102; + } else { + $103 = $st$addr; + $channels67 = ((($103)) + 4|0); + $104 = HEAP32[$channels67>>2]|0; + $mul68 = ($104*260000)|0; + $cond = $mul68; + } + $value56 = $cond; + $105 = $value56; + $106 = $st$addr; + $bitrate = ((($106)) + 40|0); + HEAP32[$bitrate>>2] = $105; + label = 40; + } + break; + } + case 10008: { + $arglist_current28 = HEAP32[$ap>>2]|0; + $107 = $arglist_current28; + $108 = ((0) + 4|0); + $expanded58 = $108; + $expanded57 = (($expanded58) - 1)|0; + $109 = (($107) + ($expanded57))|0; + $110 = ((0) + 4|0); + $expanded62 = $110; + $expanded61 = (($expanded62) - 1)|0; + $expanded60 = $expanded61 ^ -1; + $111 = $109 & $expanded60; + $112 = $111; + $113 = HEAP32[$112>>2]|0; + $arglist_next29 = ((($112)) + 4|0); + HEAP32[$ap>>2] = $arglist_next29; + $varet72 = $113; + $114 = $varet72; + $value70 = $114; + $115 = $value70; + $cmp73 = ($115|0)<(1); + $116 = $value70; + $cmp76 = ($116|0)>(2); + $or$cond4 = $cmp73 | $cmp76; + if ($or$cond4) { + label = 41; + } else { + $117 = $value70; + $118 = $st$addr; + $stream_channels = ((($118)) + 8|0); + HEAP32[$stream_channels>>2] = $117; + label = 40; + } + break; + } + case 4036: { + $arglist_current31 = HEAP32[$ap>>2]|0; + $119 = $arglist_current31; + $120 = ((0) + 4|0); + $expanded65 = $120; + $expanded64 = (($expanded65) - 1)|0; + $121 = (($119) + ($expanded64))|0; + $122 = ((0) + 4|0); + $expanded69 = $122; + $expanded68 = (($expanded69) - 1)|0; + $expanded67 = $expanded68 ^ -1; + $123 = $121 & $expanded67; + $124 = $123; + $125 = HEAP32[$124>>2]|0; + $arglist_next32 = ((($124)) + 4|0); + HEAP32[$ap>>2] = $arglist_next32; + $varet83 = $125; + $126 = $varet83; + $value81 = $126; + $127 = $value81; + $cmp84 = ($127|0)<(8); + $128 = $value81; + $cmp87 = ($128|0)>(24); + $or$cond5 = $cmp84 | $cmp87; + if ($or$cond5) { + label = 41; + } else { + $129 = $value81; + $130 = $st$addr; + $lsb_depth = ((($130)) + 60|0); + HEAP32[$lsb_depth>>2] = $129; + label = 40; + } + break; + } + case 4037: { + $arglist_current34 = HEAP32[$ap>>2]|0; + $131 = $arglist_current34; + $132 = ((0) + 4|0); + $expanded72 = $132; + $expanded71 = (($expanded72) - 1)|0; + $133 = (($131) + ($expanded71))|0; + $134 = ((0) + 4|0); + $expanded76 = $134; + $expanded75 = (($expanded76) - 1)|0; + $expanded74 = $expanded75 ^ -1; + $135 = $133 & $expanded74; + $136 = $135; + $137 = HEAP32[$136>>2]|0; + $arglist_next35 = ((($136)) + 4|0); + HEAP32[$ap>>2] = $arglist_next35; + $varet94 = $137; + $138 = $varet94; + $value92 = $138; + $139 = $st$addr; + $lsb_depth95 = ((($139)) + 60|0); + $140 = HEAP32[$lsb_depth95>>2]|0; + $141 = $value92; + HEAP32[$141>>2] = $140; + label = 40; + break; + } + case 4040: { + $arglist_current37 = HEAP32[$ap>>2]|0; + $142 = $arglist_current37; + $143 = ((0) + 4|0); + $expanded79 = $143; + $expanded78 = (($expanded79) - 1)|0; + $144 = (($142) + ($expanded78))|0; + $145 = ((0) + 4|0); + $expanded83 = $145; + $expanded82 = (($expanded83) - 1)|0; + $expanded81 = $expanded82 ^ -1; + $146 = $144 & $expanded81; + $147 = $146; + $148 = HEAP32[$147>>2]|0; + $arglist_next38 = ((($147)) + 4|0); + HEAP32[$ap>>2] = $arglist_next38; + $varet99 = $148; + $149 = $varet99; + $value97 = $149; + $150 = $value97; + $151 = $st$addr; + $variable_duration = ((($151)) + 64|0); + HEAP32[$variable_duration>>2] = $150; + label = 40; + break; + } + case 4028: { + $152 = $st$addr; + $in_mem = ((($152)) + 200|0); + $153 = $st$addr; + $channels102 = ((($153)) + 4|0); + $154 = HEAP32[$channels102>>2]|0; + $155 = $st$addr; + $156 = HEAP32[$155>>2]|0; + $overlap = ((($156)) + 4|0); + $157 = HEAP32[$overlap>>2]|0; + $add = (($157) + 1024)|0; + $mul104 = Math_imul($154, $add)|0; + $add$ptr = (($in_mem) + ($mul104<<2)|0); + $oldBandE = $add$ptr; + $158 = $oldBandE; + $159 = $st$addr; + $channels105 = ((($159)) + 4|0); + $160 = HEAP32[$channels105>>2]|0; + $161 = $st$addr; + $162 = HEAP32[$161>>2]|0; + $nbEBands107 = ((($162)) + 8|0); + $163 = HEAP32[$nbEBands107>>2]|0; + $mul108 = Math_imul($160, $163)|0; + $add$ptr109 = (($158) + ($mul108<<2)|0); + $oldLogE = $add$ptr109; + $164 = $oldLogE; + $165 = $st$addr; + $channels110 = ((($165)) + 4|0); + $166 = HEAP32[$channels110>>2]|0; + $167 = $st$addr; + $168 = HEAP32[$167>>2]|0; + $nbEBands112 = ((($168)) + 8|0); + $169 = HEAP32[$nbEBands112>>2]|0; + $mul113 = Math_imul($166, $169)|0; + $add$ptr114 = (($164) + ($mul113<<2)|0); + $oldLogE2 = $add$ptr114; + $170 = $st$addr; + $rng = ((($170)) + 76|0); + $171 = $st$addr; + $172 = HEAP32[$171>>2]|0; + $173 = $st$addr; + $channels116 = ((($173)) + 4|0); + $174 = HEAP32[$channels116>>2]|0; + $call = (_opus_custom_encoder_get_size($172,$174)|0); + $175 = $st$addr; + $rng117 = ((($175)) + 76|0); + $176 = $st$addr; + $sub$ptr$lhs$cast = $rng117; + $sub$ptr$rhs$cast = $176; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub = (($call) - ($sub$ptr$sub))|0; + $mul118 = $sub; + _memset(($rng|0),0,($mul118|0))|0; + $i = 0; + while(1) { + $177 = $i; + $178 = $st$addr; + $channels119 = ((($178)) + 4|0); + $179 = HEAP32[$channels119>>2]|0; + $180 = $st$addr; + $181 = HEAP32[$180>>2]|0; + $nbEBands121 = ((($181)) + 8|0); + $182 = HEAP32[$nbEBands121>>2]|0; + $mul122 = Math_imul($179, $182)|0; + $cmp123 = ($177|0)<($mul122|0); + if (!($cmp123)) { + break; + } + $183 = $oldLogE2; + $184 = $i; + $arrayidx = (($183) + ($184<<2)|0); + HEAPF32[$arrayidx>>2] = -28.0; + $185 = $oldLogE; + $186 = $i; + $arrayidx125 = (($185) + ($186<<2)|0); + HEAPF32[$arrayidx125>>2] = -28.0; + $187 = $i; + $inc = (($187) + 1)|0; + $i = $inc; + } + $188 = $st$addr; + $vbr_offset = ((($188)) + 172|0); + HEAP32[$vbr_offset>>2] = 0; + $189 = $st$addr; + $delayedIntra = ((($189)) + 84|0); + HEAPF32[$delayedIntra>>2] = 1.0; + $190 = $st$addr; + $spread_decision = ((($190)) + 80|0); + HEAP32[$spread_decision>>2] = 2; + $191 = $st$addr; + $tonal_average = ((($191)) + 88|0); + HEAP32[$tonal_average>>2] = 256; + $192 = $st$addr; + $hf_average = ((($192)) + 96|0); + HEAP32[$hf_average>>2] = 0; + $193 = $st$addr; + $tapset_decision = ((($193)) + 100|0); + HEAP32[$tapset_decision>>2] = 0; + label = 40; + break; + } + case 10016: { + $arglist_current40 = HEAP32[$ap>>2]|0; + $194 = $arglist_current40; + $195 = ((0) + 4|0); + $expanded86 = $195; + $expanded85 = (($expanded86) - 1)|0; + $196 = (($194) + ($expanded85))|0; + $197 = ((0) + 4|0); + $expanded90 = $197; + $expanded89 = (($expanded90) - 1)|0; + $expanded88 = $expanded89 ^ -1; + $198 = $196 & $expanded88; + $199 = $198; + $200 = HEAP32[$199>>2]|0; + $arglist_next41 = ((($199)) + 4|0); + HEAP32[$ap>>2] = $arglist_next41; + $varet129 = $200; + $201 = $varet129; + $value127 = $201; + $202 = $value127; + $203 = $st$addr; + $signalling = ((($203)) + 48|0); + HEAP32[$signalling>>2] = $202; + label = 40; + break; + } + case 10022: { + $arglist_current43 = HEAP32[$ap>>2]|0; + $204 = $arglist_current43; + $205 = ((0) + 4|0); + $expanded93 = $205; + $expanded92 = (($expanded93) - 1)|0; + $206 = (($204) + ($expanded92))|0; + $207 = ((0) + 4|0); + $expanded97 = $207; + $expanded96 = (($expanded97) - 1)|0; + $expanded95 = $expanded96 ^ -1; + $208 = $206 & $expanded95; + $209 = $208; + $210 = HEAP32[$209>>2]|0; + $arglist_next44 = ((($209)) + 4|0); + HEAP32[$ap>>2] = $arglist_next44; + $varet132 = $210; + $211 = $varet132; + $info = $211; + $212 = $info; + $tobool = ($212|0)!=(0|0); + if ($tobool) { + $213 = $st$addr; + $analysis = ((($213)) + 120|0); + $214 = $info; + $215 = $st$addr; + $analysis134 = ((($215)) + 120|0); + $216 = $info; + $sub$ptr$lhs$cast135 = $analysis134; + $sub$ptr$rhs$cast136 = $216; + $sub$ptr$sub137 = (($sub$ptr$lhs$cast135) - ($sub$ptr$rhs$cast136))|0; + $sub$ptr$div = (($sub$ptr$sub137|0) / 28)&-1; + $mul138 = 0; + $add139 = (28 + ($mul138))|0; + _memcpy(($analysis|0),($214|0),($add139|0))|0; + label = 40; + } else { + label = 40; + } + break; + } + case 10015: { + $arglist_current46 = HEAP32[$ap>>2]|0; + $217 = $arglist_current46; + $218 = ((0) + 4|0); + $expanded100 = $218; + $expanded99 = (($expanded100) - 1)|0; + $219 = (($217) + ($expanded99))|0; + $220 = ((0) + 4|0); + $expanded104 = $220; + $expanded103 = (($expanded104) - 1)|0; + $expanded102 = $expanded103 ^ -1; + $221 = $219 & $expanded102; + $222 = $221; + $223 = HEAP32[$222>>2]|0; + $arglist_next47 = ((($222)) + 4|0); + HEAP32[$ap>>2] = $arglist_next47; + $varet144 = $223; + $224 = $varet144; + $value142 = $224; + $225 = $value142; + $cmp145 = ($225|0)==(0|0); + if ($cmp145) { + label = 41; + } else { + $226 = $st$addr; + $227 = HEAP32[$226>>2]|0; + $228 = $value142; + HEAP32[$228>>2] = $227; + label = 40; + } + break; + } + case 4031: { + $arglist_current49 = HEAP32[$ap>>2]|0; + $229 = $arglist_current49; + $230 = ((0) + 4|0); + $expanded107 = $230; + $expanded106 = (($expanded107) - 1)|0; + $231 = (($229) + ($expanded106))|0; + $232 = ((0) + 4|0); + $expanded111 = $232; + $expanded110 = (($expanded111) - 1)|0; + $expanded109 = $expanded110 ^ -1; + $233 = $231 & $expanded109; + $234 = $233; + $235 = HEAP32[$234>>2]|0; + $arglist_next50 = ((($234)) + 4|0); + HEAP32[$ap>>2] = $arglist_next50; + $varet153 = $235; + $236 = $varet153; + $value151 = $236; + $237 = $value151; + $cmp154 = ($237|0)==(0|0); + if ($cmp154) { + label = 41; + } else { + $238 = $st$addr; + $rng158 = ((($238)) + 76|0); + $239 = HEAP32[$rng158>>2]|0; + $240 = $value151; + HEAP32[$240>>2] = $239; + label = 40; + } + break; + } + case 10024: { + $arglist_current52 = HEAP32[$ap>>2]|0; + $241 = $arglist_current52; + $242 = ((0) + 4|0); + $expanded114 = $242; + $expanded113 = (($expanded114) - 1)|0; + $243 = (($241) + ($expanded113))|0; + $244 = ((0) + 4|0); + $expanded118 = $244; + $expanded117 = (($expanded118) - 1)|0; + $expanded116 = $expanded117 ^ -1; + $245 = $243 & $expanded116; + $246 = $245; + $247 = HEAP32[$246>>2]|0; + $arglist_next53 = ((($246)) + 4|0); + HEAP32[$ap>>2] = $arglist_next53; + $varet162 = $247; + $248 = $varet162; + $value160 = $248; + $249 = $value160; + $250 = $st$addr; + $lfe = ((($250)) + 68|0); + HEAP32[$lfe>>2] = $249; + label = 40; + break; + } + case 10026: { + $arglist_current55 = HEAP32[$ap>>2]|0; + $251 = $arglist_current55; + $252 = ((0) + 4|0); + $expanded121 = $252; + $expanded120 = (($expanded121) - 1)|0; + $253 = (($251) + ($expanded120))|0; + $254 = ((0) + 4|0); + $expanded125 = $254; + $expanded124 = (($expanded125) - 1)|0; + $expanded123 = $expanded124 ^ -1; + $255 = $253 & $expanded123; + $256 = $255; + $257 = HEAP32[$256>>2]|0; + $arglist_next56 = ((($256)) + 4|0); + HEAP32[$ap>>2] = $arglist_next56; + $varet166 = $257; + $258 = $varet166; + $value164 = $258; + $259 = $value164; + $260 = $st$addr; + $energy_mask = ((($260)) + 192|0); + HEAP32[$energy_mask>>2] = $259; + label = 40; + break; + } + default: { + $retval = -5; + $261 = $retval; + STACKTOP = sp;return ($261|0); + } + } + } while(0); + if ((label|0) == 40) { + $retval = 0; + $261 = $retval; + STACKTOP = sp;return ($261|0); + } + else if ((label|0) == 41) { + $retval = -1; + $261 = $retval; + STACKTOP = sp;return ($261|0); + } + return (0)|0; +} +function _celt_decoder_get_size($channels) { + $channels = $channels|0; + var $0 = 0, $1 = 0, $call = 0, $call1 = 0, $channels$addr = 0, $mode = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $channels$addr = $channels; + $call = (_opus_custom_mode_create(48000,960,0)|0); + $mode = $call; + $0 = $mode; + $1 = $channels$addr; + $call1 = (_opus_custom_decoder_get_size($0,$1)|0); + STACKTOP = sp;return ($call1|0); +} +function _opus_custom_decoder_get_size($mode,$channels) { + $mode = $mode|0; + $channels = $channels|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $add = 0, $add2 = 0, $add5 = 0, $add8 = 0, $channels$addr = 0, $mode$addr = 0, $mul = 0, $mul1 = 0, $mul3 = 0, $mul4 = 0, $mul6 = 0, $mul7 = 0, $nbEBands = 0; + var $overlap = 0, $size = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $mode$addr = $mode; + $channels$addr = $channels; + $0 = $channels$addr; + $1 = $mode$addr; + $overlap = ((($1)) + 4|0); + $2 = HEAP32[$overlap>>2]|0; + $add = (2048 + ($2))|0; + $mul = Math_imul($0, $add)|0; + $sub = (($mul) - 1)|0; + $mul1 = $sub<<2; + $add2 = (88 + ($mul1))|0; + $3 = $channels$addr; + $mul3 = ($3*24)|0; + $mul4 = $mul3<<2; + $add5 = (($add2) + ($mul4))|0; + $4 = $mode$addr; + $nbEBands = ((($4)) + 8|0); + $5 = HEAP32[$nbEBands>>2]|0; + $mul6 = $5<<3; + $mul7 = $mul6<<2; + $add8 = (($add5) + ($mul7))|0; + $size = $add8; + $6 = $size; + STACKTOP = sp;return ($6|0); +} +function _celt_decoder_init($st,$sampling_rate,$channels) { + $st = $st|0; + $sampling_rate = $sampling_rate|0; + $channels = $channels|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $call = 0, $call1 = 0, $call2 = 0, $channels$addr = 0, $cmp = 0, $cmp4 = 0, $downsample = 0, $downsample3 = 0, $ret = 0, $retval = 0, $sampling_rate$addr = 0; + var $st$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $st$addr = $st; + $sampling_rate$addr = $sampling_rate; + $channels$addr = $channels; + $0 = $st$addr; + $call = (_opus_custom_mode_create(48000,960,0)|0); + $1 = $channels$addr; + $call1 = (_opus_custom_decoder_init($0,$call,$1)|0); + $ret = $call1; + $2 = $ret; + $cmp = ($2|0)!=(0); + if ($cmp) { + $3 = $ret; + $retval = $3; + $8 = $retval; + STACKTOP = sp;return ($8|0); + } + $4 = $sampling_rate$addr; + $call2 = (_resampling_factor($4)|0); + $5 = $st$addr; + $downsample = ((($5)) + 16|0); + HEAP32[$downsample>>2] = $call2; + $6 = $st$addr; + $downsample3 = ((($6)) + 16|0); + $7 = HEAP32[$downsample3>>2]|0; + $cmp4 = ($7|0)==(0); + if ($cmp4) { + $retval = -1; + $8 = $retval; + STACKTOP = sp;return ($8|0); + } else { + $retval = 0; + $8 = $retval; + STACKTOP = sp;return ($8|0); + } + return (0)|0; +} +function _opus_custom_decoder_init($st,$mode,$channels) { + $st = $st|0; + $mode = $mode|0; + $channels = $channels|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0; + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $arch = 0, $call = 0, $call9 = 0, $channels$addr = 0, $channels7 = 0, $cmp = 0, $cmp1 = 0, $cmp2 = 0, $downsample = 0, $effEBands = 0, $end = 0, $loss_count = 0, $mode$addr = 0, $mul = 0, $or$cond = 0; + var $overlap = 0, $overlap6 = 0, $retval = 0, $signalling = 0, $st$addr = 0, $start = 0, $stream_channels = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer = sp; + $st$addr = $st; + $mode$addr = $mode; + $channels$addr = $channels; + $0 = $channels$addr; + $cmp = ($0|0)<(0); + $1 = $channels$addr; + $cmp1 = ($1|0)>(2); + $or$cond = $cmp | $cmp1; + if ($or$cond) { + $retval = -1; + $24 = $retval; + STACKTOP = sp;return ($24|0); + } + $2 = $st$addr; + $cmp2 = ($2|0)==(0|0); + if ($cmp2) { + $retval = -7; + $24 = $retval; + STACKTOP = sp;return ($24|0); + } else { + $3 = $st$addr; + $4 = $mode$addr; + $5 = $channels$addr; + $call = (_opus_custom_decoder_get_size($4,$5)|0); + $mul = $call; + _memset(($3|0),0,($mul|0))|0; + $6 = $mode$addr; + $7 = $st$addr; + HEAP32[$7>>2] = $6; + $8 = $mode$addr; + $overlap = ((($8)) + 4|0); + $9 = HEAP32[$overlap>>2]|0; + $10 = $st$addr; + $overlap6 = ((($10)) + 4|0); + HEAP32[$overlap6>>2] = $9; + $11 = $channels$addr; + $12 = $st$addr; + $channels7 = ((($12)) + 8|0); + HEAP32[$channels7>>2] = $11; + $13 = $st$addr; + $stream_channels = ((($13)) + 12|0); + HEAP32[$stream_channels>>2] = $11; + $14 = $st$addr; + $downsample = ((($14)) + 16|0); + HEAP32[$downsample>>2] = 1; + $15 = $st$addr; + $start = ((($15)) + 20|0); + HEAP32[$start>>2] = 0; + $16 = $st$addr; + $17 = HEAP32[$16>>2]|0; + $effEBands = ((($17)) + 12|0); + $18 = HEAP32[$effEBands>>2]|0; + $19 = $st$addr; + $end = ((($19)) + 24|0); + HEAP32[$end>>2] = $18; + $20 = $st$addr; + $signalling = ((($20)) + 28|0); + HEAP32[$signalling>>2] = 1; + $call9 = (_opus_select_arch_48()|0); + $21 = $st$addr; + $arch = ((($21)) + 32|0); + HEAP32[$arch>>2] = $call9; + $22 = $st$addr; + $loss_count = ((($22)) + 48|0); + HEAP32[$loss_count>>2] = 0; + $23 = $st$addr; + (_opus_custom_decoder_ctl($23,4028,$vararg_buffer)|0); + $retval = 0; + $24 = $retval; + STACKTOP = sp;return ($24|0); + } + return (0)|0; +} +function _opus_select_arch_48() { + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function _opus_custom_decoder_ctl($st,$request,$varargs) { + $st = $st|0; + $request = $request|0; + $varargs = $varargs|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; + var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; + var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; + var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; + var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; + var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $_decode_mem = 0, $add = 0, $add$ptr = 0, $add$ptr44 = 0, $add$ptr48 = 0, $add$ptr52 = 0, $ap = 0, $arglist_current = 0, $arglist_current11 = 0, $arglist_current14 = 0, $arglist_current17 = 0; + var $arglist_current2 = 0, $arglist_current20 = 0, $arglist_current23 = 0, $arglist_current5 = 0, $arglist_current8 = 0, $arglist_next = 0, $arglist_next12 = 0, $arglist_next15 = 0, $arglist_next18 = 0, $arglist_next21 = 0, $arglist_next24 = 0, $arglist_next3 = 0, $arglist_next6 = 0, $arglist_next9 = 0, $arrayidx = 0, $arrayidx61 = 0, $call = 0, $channels = 0, $channels42 = 0, $channels54 = 0; + var $cmp = 0, $cmp12 = 0, $cmp19 = 0, $cmp21 = 0, $cmp28 = 0, $cmp3 = 0, $cmp36 = 0, $cmp60 = 0, $cmp66 = 0, $cmp73 = 0, $cmp8 = 0, $cmp85 = 0, $div = 0, $downsample = 0, $end = 0, $error = 0, $error31 = 0, $expanded = 0, $expanded10 = 0, $expanded12 = 0; + var $expanded13 = 0, $expanded14 = 0, $expanded16 = 0, $expanded17 = 0, $expanded19 = 0, $expanded20 = 0, $expanded21 = 0, $expanded23 = 0, $expanded24 = 0, $expanded26 = 0, $expanded27 = 0, $expanded28 = 0, $expanded3 = 0, $expanded30 = 0, $expanded31 = 0, $expanded33 = 0, $expanded34 = 0, $expanded35 = 0, $expanded37 = 0, $expanded38 = 0; + var $expanded40 = 0, $expanded41 = 0, $expanded42 = 0, $expanded44 = 0, $expanded45 = 0, $expanded47 = 0, $expanded48 = 0, $expanded49 = 0, $expanded5 = 0, $expanded51 = 0, $expanded52 = 0, $expanded54 = 0, $expanded55 = 0, $expanded56 = 0, $expanded58 = 0, $expanded59 = 0, $expanded6 = 0, $expanded61 = 0, $expanded62 = 0, $expanded63 = 0; + var $expanded7 = 0, $expanded9 = 0, $i = 0, $inc = 0, $lpc = 0, $mul = 0, $mul43 = 0, $mul47 = 0, $mul51 = 0, $mul56 = 0, $mul59 = 0, $nbEBands = 0, $nbEBands11 = 0, $nbEBands46 = 0, $nbEBands50 = 0, $nbEBands58 = 0, $oldBandE = 0, $oldLogE = 0, $oldLogE2 = 0, $or$cond = 0; + var $overlap = 0, $overlap41 = 0, $postfilter_period = 0, $request$addr = 0, $retval = 0, $rng = 0, $rng55 = 0, $rng88 = 0, $signalling = 0, $st$addr = 0, $start = 0, $stream_channels = 0, $sub = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0, $value = 0, $value16 = 0, $value25 = 0, $value33 = 0; + var $value5 = 0, $value63 = 0, $value70 = 0, $value78 = 0, $value82 = 0, $varet = 0, $varet18 = 0, $varet27 = 0, $varet35 = 0, $varet65 = 0, $varet7 = 0, $varet72 = 0, $varet80 = 0, $varet84 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $ap = sp + 96|0; + $st$addr = $st; + $request$addr = $request; + HEAP32[$ap>>2] = $varargs; + $0 = $request$addr; + L1: do { + switch ($0|0) { + case 10010: { + $arglist_current = HEAP32[$ap>>2]|0; + $1 = $arglist_current; + $2 = ((0) + 4|0); + $expanded3 = $2; + $expanded = (($expanded3) - 1)|0; + $3 = (($1) + ($expanded))|0; + $4 = ((0) + 4|0); + $expanded7 = $4; + $expanded6 = (($expanded7) - 1)|0; + $expanded5 = $expanded6 ^ -1; + $5 = $3 & $expanded5; + $6 = $5; + $7 = HEAP32[$6>>2]|0; + $arglist_next = ((($6)) + 4|0); + HEAP32[$ap>>2] = $arglist_next; + $varet = $7; + $8 = $varet; + $value = $8; + $9 = $value; + $cmp = ($9|0)<(0); + if ($cmp) { + label = 25; + } else { + $10 = $value; + $11 = $st$addr; + $12 = HEAP32[$11>>2]|0; + $nbEBands = ((($12)) + 8|0); + $13 = HEAP32[$nbEBands>>2]|0; + $cmp3 = ($10|0)>=($13|0); + if ($cmp3) { + label = 25; + } else { + $14 = $value; + $15 = $st$addr; + $start = ((($15)) + 20|0); + HEAP32[$start>>2] = $14; + label = 24; + } + } + break; + } + case 10012: { + $arglist_current2 = HEAP32[$ap>>2]|0; + $16 = $arglist_current2; + $17 = ((0) + 4|0); + $expanded10 = $17; + $expanded9 = (($expanded10) - 1)|0; + $18 = (($16) + ($expanded9))|0; + $19 = ((0) + 4|0); + $expanded14 = $19; + $expanded13 = (($expanded14) - 1)|0; + $expanded12 = $expanded13 ^ -1; + $20 = $18 & $expanded12; + $21 = $20; + $22 = HEAP32[$21>>2]|0; + $arglist_next3 = ((($21)) + 4|0); + HEAP32[$ap>>2] = $arglist_next3; + $varet7 = $22; + $23 = $varet7; + $value5 = $23; + $24 = $value5; + $cmp8 = ($24|0)<(1); + if ($cmp8) { + label = 25; + } else { + $25 = $value5; + $26 = $st$addr; + $27 = HEAP32[$26>>2]|0; + $nbEBands11 = ((($27)) + 8|0); + $28 = HEAP32[$nbEBands11>>2]|0; + $cmp12 = ($25|0)>($28|0); + if ($cmp12) { + label = 25; + } else { + $29 = $value5; + $30 = $st$addr; + $end = ((($30)) + 24|0); + HEAP32[$end>>2] = $29; + label = 24; + } + } + break; + } + case 10008: { + $arglist_current5 = HEAP32[$ap>>2]|0; + $31 = $arglist_current5; + $32 = ((0) + 4|0); + $expanded17 = $32; + $expanded16 = (($expanded17) - 1)|0; + $33 = (($31) + ($expanded16))|0; + $34 = ((0) + 4|0); + $expanded21 = $34; + $expanded20 = (($expanded21) - 1)|0; + $expanded19 = $expanded20 ^ -1; + $35 = $33 & $expanded19; + $36 = $35; + $37 = HEAP32[$36>>2]|0; + $arglist_next6 = ((($36)) + 4|0); + HEAP32[$ap>>2] = $arglist_next6; + $varet18 = $37; + $38 = $varet18; + $value16 = $38; + $39 = $value16; + $cmp19 = ($39|0)<(1); + $40 = $value16; + $cmp21 = ($40|0)>(2); + $or$cond = $cmp19 | $cmp21; + if ($or$cond) { + label = 25; + } else { + $41 = $value16; + $42 = $st$addr; + $stream_channels = ((($42)) + 12|0); + HEAP32[$stream_channels>>2] = $41; + label = 24; + } + break; + } + case 10007: { + $arglist_current8 = HEAP32[$ap>>2]|0; + $43 = $arglist_current8; + $44 = ((0) + 4|0); + $expanded24 = $44; + $expanded23 = (($expanded24) - 1)|0; + $45 = (($43) + ($expanded23))|0; + $46 = ((0) + 4|0); + $expanded28 = $46; + $expanded27 = (($expanded28) - 1)|0; + $expanded26 = $expanded27 ^ -1; + $47 = $45 & $expanded26; + $48 = $47; + $49 = HEAP32[$48>>2]|0; + $arglist_next9 = ((($48)) + 4|0); + HEAP32[$ap>>2] = $arglist_next9; + $varet27 = $49; + $50 = $varet27; + $value25 = $50; + $51 = $value25; + $cmp28 = ($51|0)==(0|0); + if ($cmp28) { + label = 25; + } else { + $52 = $st$addr; + $error = ((($52)) + 40|0); + $53 = HEAP32[$error>>2]|0; + $54 = $value25; + HEAP32[$54>>2] = $53; + $55 = $st$addr; + $error31 = ((($55)) + 40|0); + HEAP32[$error31>>2] = 0; + label = 24; + } + break; + } + case 4027: { + $arglist_current11 = HEAP32[$ap>>2]|0; + $56 = $arglist_current11; + $57 = ((0) + 4|0); + $expanded31 = $57; + $expanded30 = (($expanded31) - 1)|0; + $58 = (($56) + ($expanded30))|0; + $59 = ((0) + 4|0); + $expanded35 = $59; + $expanded34 = (($expanded35) - 1)|0; + $expanded33 = $expanded34 ^ -1; + $60 = $58 & $expanded33; + $61 = $60; + $62 = HEAP32[$61>>2]|0; + $arglist_next12 = ((($61)) + 4|0); + HEAP32[$ap>>2] = $arglist_next12; + $varet35 = $62; + $63 = $varet35; + $value33 = $63; + $64 = $value33; + $cmp36 = ($64|0)==(0|0); + if ($cmp36) { + label = 25; + } else { + $65 = $st$addr; + $overlap = ((($65)) + 4|0); + $66 = HEAP32[$overlap>>2]|0; + $67 = $st$addr; + $downsample = ((($67)) + 16|0); + $68 = HEAP32[$downsample>>2]|0; + $div = (($66|0) / ($68|0))&-1; + $69 = $value33; + HEAP32[$69>>2] = $div; + label = 24; + } + break; + } + case 4028: { + $70 = $st$addr; + $_decode_mem = ((($70)) + 84|0); + $71 = $st$addr; + $overlap41 = ((($71)) + 4|0); + $72 = HEAP32[$overlap41>>2]|0; + $add = (2048 + ($72))|0; + $73 = $st$addr; + $channels = ((($73)) + 8|0); + $74 = HEAP32[$channels>>2]|0; + $mul = Math_imul($add, $74)|0; + $add$ptr = (($_decode_mem) + ($mul<<2)|0); + $lpc = $add$ptr; + $75 = $lpc; + $76 = $st$addr; + $channels42 = ((($76)) + 8|0); + $77 = HEAP32[$channels42>>2]|0; + $mul43 = ($77*24)|0; + $add$ptr44 = (($75) + ($mul43<<2)|0); + $oldBandE = $add$ptr44; + $78 = $oldBandE; + $79 = $st$addr; + $80 = HEAP32[$79>>2]|0; + $nbEBands46 = ((($80)) + 8|0); + $81 = HEAP32[$nbEBands46>>2]|0; + $mul47 = $81<<1; + $add$ptr48 = (($78) + ($mul47<<2)|0); + $oldLogE = $add$ptr48; + $82 = $oldLogE; + $83 = $st$addr; + $84 = HEAP32[$83>>2]|0; + $nbEBands50 = ((($84)) + 8|0); + $85 = HEAP32[$nbEBands50>>2]|0; + $mul51 = $85<<1; + $add$ptr52 = (($82) + ($mul51<<2)|0); + $oldLogE2 = $add$ptr52; + $86 = $st$addr; + $rng = ((($86)) + 36|0); + $87 = $st$addr; + $88 = HEAP32[$87>>2]|0; + $89 = $st$addr; + $channels54 = ((($89)) + 8|0); + $90 = HEAP32[$channels54>>2]|0; + $call = (_opus_custom_decoder_get_size($88,$90)|0); + $91 = $st$addr; + $rng55 = ((($91)) + 36|0); + $92 = $st$addr; + $sub$ptr$lhs$cast = $rng55; + $sub$ptr$rhs$cast = $92; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub = (($call) - ($sub$ptr$sub))|0; + $mul56 = $sub; + _memset(($rng|0),0,($mul56|0))|0; + $i = 0; + while(1) { + $93 = $i; + $94 = $st$addr; + $95 = HEAP32[$94>>2]|0; + $nbEBands58 = ((($95)) + 8|0); + $96 = HEAP32[$nbEBands58>>2]|0; + $mul59 = $96<<1; + $cmp60 = ($93|0)<($mul59|0); + if (!($cmp60)) { + label = 24; + break L1; + } + $97 = $oldLogE2; + $98 = $i; + $arrayidx = (($97) + ($98<<2)|0); + HEAPF32[$arrayidx>>2] = -28.0; + $99 = $oldLogE; + $100 = $i; + $arrayidx61 = (($99) + ($100<<2)|0); + HEAPF32[$arrayidx61>>2] = -28.0; + $101 = $i; + $inc = (($101) + 1)|0; + $i = $inc; + } + break; + } + case 4033: { + $arglist_current14 = HEAP32[$ap>>2]|0; + $102 = $arglist_current14; + $103 = ((0) + 4|0); + $expanded38 = $103; + $expanded37 = (($expanded38) - 1)|0; + $104 = (($102) + ($expanded37))|0; + $105 = ((0) + 4|0); + $expanded42 = $105; + $expanded41 = (($expanded42) - 1)|0; + $expanded40 = $expanded41 ^ -1; + $106 = $104 & $expanded40; + $107 = $106; + $108 = HEAP32[$107>>2]|0; + $arglist_next15 = ((($107)) + 4|0); + HEAP32[$ap>>2] = $arglist_next15; + $varet65 = $108; + $109 = $varet65; + $value63 = $109; + $110 = $value63; + $cmp66 = ($110|0)==(0|0); + if ($cmp66) { + label = 25; + } else { + $111 = $st$addr; + $postfilter_period = ((($111)) + 52|0); + $112 = HEAP32[$postfilter_period>>2]|0; + $113 = $value63; + HEAP32[$113>>2] = $112; + label = 24; + } + break; + } + case 10015: { + $arglist_current17 = HEAP32[$ap>>2]|0; + $114 = $arglist_current17; + $115 = ((0) + 4|0); + $expanded45 = $115; + $expanded44 = (($expanded45) - 1)|0; + $116 = (($114) + ($expanded44))|0; + $117 = ((0) + 4|0); + $expanded49 = $117; + $expanded48 = (($expanded49) - 1)|0; + $expanded47 = $expanded48 ^ -1; + $118 = $116 & $expanded47; + $119 = $118; + $120 = HEAP32[$119>>2]|0; + $arglist_next18 = ((($119)) + 4|0); + HEAP32[$ap>>2] = $arglist_next18; + $varet72 = $120; + $121 = $varet72; + $value70 = $121; + $122 = $value70; + $cmp73 = ($122|0)==(0|0); + if ($cmp73) { + label = 25; + } else { + $123 = $st$addr; + $124 = HEAP32[$123>>2]|0; + $125 = $value70; + HEAP32[$125>>2] = $124; + label = 24; + } + break; + } + case 10016: { + $arglist_current20 = HEAP32[$ap>>2]|0; + $126 = $arglist_current20; + $127 = ((0) + 4|0); + $expanded52 = $127; + $expanded51 = (($expanded52) - 1)|0; + $128 = (($126) + ($expanded51))|0; + $129 = ((0) + 4|0); + $expanded56 = $129; + $expanded55 = (($expanded56) - 1)|0; + $expanded54 = $expanded55 ^ -1; + $130 = $128 & $expanded54; + $131 = $130; + $132 = HEAP32[$131>>2]|0; + $arglist_next21 = ((($131)) + 4|0); + HEAP32[$ap>>2] = $arglist_next21; + $varet80 = $132; + $133 = $varet80; + $value78 = $133; + $134 = $value78; + $135 = $st$addr; + $signalling = ((($135)) + 28|0); + HEAP32[$signalling>>2] = $134; + label = 24; + break; + } + case 4031: { + $arglist_current23 = HEAP32[$ap>>2]|0; + $136 = $arglist_current23; + $137 = ((0) + 4|0); + $expanded59 = $137; + $expanded58 = (($expanded59) - 1)|0; + $138 = (($136) + ($expanded58))|0; + $139 = ((0) + 4|0); + $expanded63 = $139; + $expanded62 = (($expanded63) - 1)|0; + $expanded61 = $expanded62 ^ -1; + $140 = $138 & $expanded61; + $141 = $140; + $142 = HEAP32[$141>>2]|0; + $arglist_next24 = ((($141)) + 4|0); + HEAP32[$ap>>2] = $arglist_next24; + $varet84 = $142; + $143 = $varet84; + $value82 = $143; + $144 = $value82; + $cmp85 = ($144|0)==(0|0); + if ($cmp85) { + label = 25; + } else { + $145 = $st$addr; + $rng88 = ((($145)) + 36|0); + $146 = HEAP32[$rng88>>2]|0; + $147 = $value82; + HEAP32[$147>>2] = $146; + label = 24; + } + break; + } + default: { + $retval = -5; + $148 = $retval; + STACKTOP = sp;return ($148|0); + } + } + } while(0); + if ((label|0) == 24) { + $retval = 0; + $148 = $retval; + STACKTOP = sp;return ($148|0); + } + else if ((label|0) == 25) { + $retval = -1; + $148 = $retval; + STACKTOP = sp;return ($148|0); + } + return (0)|0; +} +function _celt_decode_with_ec($st,$data,$len,$pcm,$frame_size,$dec,$accum) { + $st = $st|0; + $data = $data|0; + $len = $len|0; + $pcm = $pcm|0; + $frame_size = $frame_size|0; + $dec = $dec|0; + $accum = $accum|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0.0, $331 = 0; + var $332 = 0.0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0.0, $359 = 0.0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0.0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0.0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0.0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0.0; + var $422 = 0.0, $423 = 0, $424 = 0, $425 = 0.0, $426 = 0, $427 = 0, $428 = 0.0, $429 = 0.0, $43 = 0, $430 = 0, $431 = 0, $432 = 0.0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0; + var $440 = 0.0, $441 = 0, $442 = 0, $443 = 0.0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0.0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0; + var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0; + var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0; + var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; + var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; + var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0.0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0.0, $93 = 0, $94 = 0; + var $95 = 0, $96 = 0, $97 = 0.0, $98 = 0, $99 = 0, $C = 0, $CC = 0, $LM = 0, $M = 0, $N = 0, $_dec = 0, $_decode_mem = 0, $_decode_mem30 = 0, $accum$addr = 0, $add = 0, $add$ptr = 0, $add$ptr11 = 0, $add$ptr13 = 0, $add$ptr15 = 0, $add$ptr242 = 0; + var $add$ptr249 = 0, $add$ptr264 = 0, $add$ptr328 = 0, $add$ptr331 = 0, $add$ptr34 = 0, $add$ptr36 = 0, $add$ptr37 = 0, $add$ptr9 = 0, $add100 = 0, $add104 = 0, $add109 = 0, $add117 = 0, $add129 = 0, $add138 = 0, $add152 = 0, $add181 = 0, $add192 = 0, $add211 = 0, $add229 = 0, $add245 = 0; + var $add251 = 0, $add32 = 0, $add375 = 0, $add386 = 0, $add394 = 0, $add408 = 0.0, $add414 = 0.0, $add450 = 0, $add453 = 0, $add456 = 0, $add466 = 0, $add469 = 0, $add472 = 0, $add64 = 0, $add68 = 0, $add68$sink = 0, $add87 = 0, $add90 = 0, $add98 = 0, $alloc_trim = 0; + var $anti_collapse_on = 0, $anti_collapse_rsv = 0, $arch = 0, $arch281 = 0, $arch297 = 0, $arch322 = 0, $arch338 = 0, $arrayidx = 0, $arrayidx153 = 0, $arrayidx155 = 0, $arrayidx184 = 0, $arrayidx194 = 0, $arrayidx240 = 0, $arrayidx241 = 0, $arrayidx247 = 0, $arrayidx248 = 0, $arrayidx290 = 0, $arrayidx315 = 0, $arrayidx316 = 0, $arrayidx326 = 0; + var $arrayidx329 = 0, $arrayidx35 = 0, $arrayidx367 = 0, $arrayidx369 = 0, $arrayidx38 = 0, $arrayidx407 = 0, $arrayidx409 = 0, $arrayidx413 = 0, $arrayidx416 = 0, $arrayidx419 = 0, $arrayidx429 = 0, $arrayidx430 = 0, $arrayidx434 = 0, $arrayidx436 = 0, $arrayidx436$sink = 0, $arrayidx439 = 0, $arrayidx451 = 0, $arrayidx454 = 0, $arrayidx457 = 0, $arrayidx467 = 0; + var $arrayidx470 = 0, $arrayidx473 = 0, $arrayidx63 = 0, $arrayidx65 = 0, $arrayidx69 = 0, $arrayidx70 = 0, $backgroundLogE = 0, $balance = 0, $bits = 0, $boost = 0, $c = 0, $call = 0, $call102 = 0, $call103 = 0, $call107 = 0, $call112 = 0, $call121 = 0, $call122 = 0, $call133 = 0, $call137 = 0; + var $call142 = 0, $call147 = 0, $call187 = 0, $call188 = 0, $call215 = 0, $call221 = 0, $call238 = 0, $call273 = 0, $call276 = 0, $call491 = 0, $call497 = 0, $call80 = 0, $call86 = 0, $call93 = 0, $call96 = 0, $call99 = 0, $channels = 0, $cleanup$dest$slot = 0, $cmp = 0, $cmp105 = 0; + var $cmp114 = 0, $cmp118 = 0, $cmp130 = 0, $cmp139 = 0, $cmp149 = 0, $cmp16 = 0, $cmp161 = 0, $cmp167 = 0, $cmp172 = 0, $cmp18 = 0, $cmp182 = 0, $cmp185 = 0, $cmp195 = 0, $cmp199 = 0, $cmp212 = 0, $cmp22 = 0, $cmp226 = 0, $cmp23 = 0, $cmp231 = 0, $cmp25 = 0; + var $cmp254 = 0, $cmp261 = 0, $cmp270 = 0, $cmp287 = 0, $cmp299 = 0, $cmp307 = 0, $cmp323 = 0, $cmp342 = 0, $cmp354 = 0, $cmp364 = 0, $cmp395 = 0, $cmp40 = 0, $cmp404 = 0, $cmp41 = 0, $cmp410 = 0, $cmp426 = 0, $cmp431 = 0, $cmp446 = 0, $cmp45 = 0, $cmp462 = 0; + var $cmp47 = 0, $cmp479 = 0, $cmp493 = 0, $cmp55 = 0, $cmp58 = 0, $cmp61 = 0, $cmp66 = 0, $cmp76 = 0, $cmp78 = 0, $cmp89 = 0, $cmp91 = 0, $codedBands = 0, $cond136 = 0, $cond166 = 0, $cond177 = 0, $cond179 = 0, $cond205 = 0, $cond218 = 0, $cond234 = 0, $cond267 = 0; + var $cond305 = 0, $cond313 = 0, $cond418 = 0.0, $conv = 0.0, $conv154 = 0, $conv156 = 0, $conv398 = 0.0, $data$addr = 0, $dec$addr = 0, $decode_mem = 0, $div = 0, $div244 = 0, $div502 = 0, $downsample = 0, $downsample296 = 0, $downsample485 = 0, $downsample50 = 0, $downsample501 = 0, $downsample53 = 0, $dual_stereo = 0; + var $dynalloc_logp = 0, $dynalloc_loop_logp = 0, $eBands = 0, $eBands4 = 0, $effEBands = 0, $effEBands43 = 0, $effEnd = 0, $end = 0, $end6 = 0, $error = 0, $flag = 0, $frame_size$addr = 0, $i = 0, $idx$neg = 0, $inc = 0, $inc208 = 0, $inc253 = 0, $inc292 = 0, $inc341 = 0, $inc39 = 0; + var $inc421 = 0, $inc441 = 0, $inc459 = 0, $inc475 = 0, $inc478 = 0, $inc72 = 0, $intensity = 0, $intra_ener = 0, $isTransient = 0, $len$addr = 0, $loss_count = 0, $loss_count490 = 0, $lpc = 0, $maxLM = 0, $maxLM17 = 0, $max_background_increase = 0.0, $mode = 0, $mul = 0, $mul10 = 0, $mul110 = 0.0; + var $mul12 = 0, $mul14 = 0, $mul158 = 0, $mul219 = 0, $mul246 = 0, $mul250 = 0, $mul257 = 0, $mul259 = 0, $mul268 = 0, $mul275 = 0, $mul286 = 0, $mul29 = 0, $mul33 = 0, $mul368 = 0, $mul374 = 0, $mul379 = 0, $mul380 = 0, $mul385 = 0, $mul387 = 0, $mul388 = 0; + var $mul393 = 0, $mul399 = 0.0, $mul403 = 0, $mul425 = 0, $mul449 = 0, $mul452 = 0, $mul455 = 0, $mul465 = 0, $mul468 = 0, $mul471 = 0, $mul492 = 0, $mul7 = 0, $mul75 = 0, $mul8 = 0, $mul85 = 0, $nbEBands = 0, $nbEBands2 = 0, $nbits_total = 0, $octave = 0, $oldBandE = 0; + var $oldLogE = 0, $oldLogE2 = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $or$cond3 = 0, $out_syn = 0, $overlap = 0, $overlap3 = 0, $pcm$addr = 0, $postfilter_gain = 0.0, $postfilter_gain320 = 0, $postfilter_gain335 = 0, $postfilter_gain347 = 0, $postfilter_gain352 = 0, $postfilter_gain359 = 0, $postfilter_gain_old = 0, $postfilter_gain_old348 = 0, $postfilter_gain_old360 = 0, $postfilter_period = 0; + var $postfilter_period302 = 0, $postfilter_period306 = 0, $postfilter_period318 = 0, $postfilter_period332 = 0, $postfilter_period345 = 0, $postfilter_period351 = 0, $postfilter_period357 = 0, $postfilter_period_old = 0, $postfilter_period_old310 = 0, $postfilter_period_old314 = 0, $postfilter_period_old317 = 0, $postfilter_period_old346 = 0, $postfilter_period_old358 = 0, $postfilter_pitch = 0, $postfilter_tapset = 0, $postfilter_tapset321 = 0, $postfilter_tapset336 = 0, $postfilter_tapset349 = 0, $postfilter_tapset353 = 0, $postfilter_tapset361 = 0; + var $postfilter_tapset_old = 0, $postfilter_tapset_old350 = 0, $postfilter_tapset_old362 = 0, $preemph = 0, $preemph486 = 0, $preemph_memD = 0, $preemph_memD488 = 0, $qg = 0, $quanta = 0, $retval = 0, $rng = 0, $rng280 = 0, $rng482 = 0, $rng483 = 0, $saved_stack = 0, $shl = 0, $shl146 = 0, $shl159 = 0, $shl160 = 0, $shl170 = 0; + var $shl180 = 0, $shl21 = 0, $shl220 = 0, $shl230 = 0, $shl97 = 0, $shortBlocks = 0, $shortMdctSize = 0, $shortMdctSize28 = 0, $shortMdctSize319 = 0, $shortMdctSize327 = 0, $shortMdctSize330 = 0, $shortMdctSize333 = 0, $silence = 0, $spread_decision = 0, $st$addr = 0, $start = 0, $start5 = 0, $stream_channels = 0, $sub = 0, $sub$ptr$div = 0; + var $sub$ptr$div373 = 0, $sub$ptr$div384 = 0, $sub$ptr$div392 = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$lhs$cast370 = 0, $sub$ptr$lhs$cast381 = 0, $sub$ptr$lhs$cast389 = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$rhs$cast371 = 0, $sub$ptr$rhs$cast382 = 0, $sub$ptr$rhs$cast390 = 0, $sub$ptr$sub = 0, $sub$ptr$sub372 = 0, $sub$ptr$sub383 = 0, $sub$ptr$sub391 = 0, $sub101 = 0, $sub157 = 0, $sub193 = 0, $sub198 = 0, $sub203 = 0; + var $sub222 = 0, $sub223 = 0, $sub235 = 0, $sub243 = 0, $sub269 = 0, $sub277 = 0, $sub334 = 0, $tell = 0, $tobool = 0, $tobool125 = 0, $tobool189 = 0, $tobool224 = 0, $tobool278 = 0, $tobool283 = 0, $tobool377 = 0, $tobool498 = 0, $tobool94 = 0, $total_bits = 0, $vla = 0, $vla$alloca_mul = 0; + var $vla144 = 0, $vla144$alloca_mul = 0, $vla145 = 0, $vla145$alloca_mul = 0, $vla210 = 0, $vla210$alloca_mul = 0, $vla236 = 0, $vla236$alloca_mul = 0, $vla237 = 0, $vla237$alloca_mul = 0, $vla258 = 0, $vla258$alloca_mul = 0, $vla260 = 0, $vla260$alloca_mul = 0, $width = 0, $window = 0, $window337 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 304|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(304|0); + $_dec = sp + 192|0; + $decode_mem = sp + 184|0; + $out_syn = sp + 176|0; + $intensity = sp + 96|0; + $dual_stereo = sp + 92|0; + $balance = sp + 84|0; + $st$addr = $st; + $data$addr = $data; + $len$addr = $len; + $pcm$addr = $pcm; + $frame_size$addr = $frame_size; + $dec$addr = $dec; + $accum$addr = $accum; + $0 = $st$addr; + $channels = ((($0)) + 8|0); + $1 = HEAP32[$channels>>2]|0; + $CC = $1; + HEAP32[$intensity>>2] = 0; + HEAP32[$dual_stereo>>2] = 0; + $anti_collapse_on = 0; + $2 = $st$addr; + $stream_channels = ((($2)) + 12|0); + $3 = HEAP32[$stream_channels>>2]|0; + $C = $3; + $4 = $st$addr; + $5 = HEAP32[$4>>2]|0; + $mode = $5; + $6 = $mode; + $nbEBands2 = ((($6)) + 8|0); + $7 = HEAP32[$nbEBands2>>2]|0; + $nbEBands = $7; + $8 = $mode; + $overlap3 = ((($8)) + 4|0); + $9 = HEAP32[$overlap3>>2]|0; + $overlap = $9; + $10 = $mode; + $eBands4 = ((($10)) + 32|0); + $11 = HEAP32[$eBands4>>2]|0; + $eBands = $11; + $12 = $st$addr; + $start5 = ((($12)) + 20|0); + $13 = HEAP32[$start5>>2]|0; + $start = $13; + $14 = $st$addr; + $end6 = ((($14)) + 24|0); + $15 = HEAP32[$end6>>2]|0; + $end = $15; + $16 = $st$addr; + $downsample = ((($16)) + 16|0); + $17 = HEAP32[$downsample>>2]|0; + $18 = $frame_size$addr; + $mul = Math_imul($18, $17)|0; + $frame_size$addr = $mul; + $19 = $st$addr; + $_decode_mem = ((($19)) + 84|0); + $20 = $overlap; + $add = (2048 + ($20))|0; + $21 = $CC; + $mul7 = Math_imul($add, $21)|0; + $add$ptr = (($_decode_mem) + ($mul7<<2)|0); + $lpc = $add$ptr; + $22 = $lpc; + $23 = $CC; + $mul8 = ($23*24)|0; + $add$ptr9 = (($22) + ($mul8<<2)|0); + $oldBandE = $add$ptr9; + $24 = $oldBandE; + $25 = $nbEBands; + $mul10 = $25<<1; + $add$ptr11 = (($24) + ($mul10<<2)|0); + $oldLogE = $add$ptr11; + $26 = $oldLogE; + $27 = $nbEBands; + $mul12 = $27<<1; + $add$ptr13 = (($26) + ($mul12<<2)|0); + $oldLogE2 = $add$ptr13; + $28 = $oldLogE2; + $29 = $nbEBands; + $mul14 = $29<<1; + $add$ptr15 = (($28) + ($mul14<<2)|0); + $backgroundLogE = $add$ptr15; + $LM = 0; + while(1) { + $30 = $LM; + $31 = $mode; + $maxLM = ((($31)) + 36|0); + $32 = HEAP32[$maxLM>>2]|0; + $cmp = ($30|0)<=($32|0); + if (!($cmp)) { + break; + } + $33 = $mode; + $shortMdctSize = ((($33)) + 44|0); + $34 = HEAP32[$shortMdctSize>>2]|0; + $35 = $LM; + $shl = $34 << $35; + $36 = $frame_size$addr; + $cmp16 = ($shl|0)==($36|0); + if ($cmp16) { + break; + } + $37 = $LM; + $inc = (($37) + 1)|0; + $LM = $inc; + } + $38 = $LM; + $39 = $mode; + $maxLM17 = ((($39)) + 36|0); + $40 = HEAP32[$maxLM17>>2]|0; + $cmp18 = ($38|0)>($40|0); + if ($cmp18) { + $retval = -1; + $504 = $retval; + STACKTOP = sp;return ($504|0); + } + $41 = $LM; + $shl21 = 1 << $41; + $M = $shl21; + $42 = $len$addr; + $cmp22 = ($42|0)<(0); + $43 = $len$addr; + $cmp23 = ($43|0)>(1275); + $or$cond = $cmp22 | $cmp23; + $44 = $pcm$addr; + $cmp25 = ($44|0)==(0|0); + $or$cond1 = $or$cond | $cmp25; + if ($or$cond1) { + $retval = -1; + $504 = $retval; + STACKTOP = sp;return ($504|0); + } + $45 = $M; + $46 = $mode; + $shortMdctSize28 = ((($46)) + 44|0); + $47 = HEAP32[$shortMdctSize28>>2]|0; + $mul29 = Math_imul($45, $47)|0; + $N = $mul29; + $c = 0; + while(1) { + $48 = $st$addr; + $_decode_mem30 = ((($48)) + 84|0); + $49 = $c; + $50 = $overlap; + $add32 = (2048 + ($50))|0; + $mul33 = Math_imul($49, $add32)|0; + $add$ptr34 = (($_decode_mem30) + ($mul33<<2)|0); + $51 = $c; + $arrayidx = (($decode_mem) + ($51<<2)|0); + HEAP32[$arrayidx>>2] = $add$ptr34; + $52 = $c; + $arrayidx35 = (($decode_mem) + ($52<<2)|0); + $53 = HEAP32[$arrayidx35>>2]|0; + $add$ptr36 = ((($53)) + 8192|0); + $54 = $N; + $idx$neg = (0 - ($54))|0; + $add$ptr37 = (($add$ptr36) + ($idx$neg<<2)|0); + $55 = $c; + $arrayidx38 = (($out_syn) + ($55<<2)|0); + HEAP32[$arrayidx38>>2] = $add$ptr37; + $56 = $c; + $inc39 = (($56) + 1)|0; + $c = $inc39; + $57 = $CC; + $cmp40 = ($inc39|0)<($57|0); + if (!($cmp40)) { + break; + } + } + $58 = $end; + $effEnd = $58; + $59 = $effEnd; + $60 = $mode; + $effEBands = ((($60)) + 12|0); + $61 = HEAP32[$effEBands>>2]|0; + $cmp41 = ($59|0)>($61|0); + if ($cmp41) { + $62 = $mode; + $effEBands43 = ((($62)) + 12|0); + $63 = HEAP32[$effEBands43>>2]|0; + $effEnd = $63; + } + $64 = $data$addr; + $cmp45 = ($64|0)==(0|0); + $65 = $len$addr; + $cmp47 = ($65|0)<=(1); + $or$cond2 = $cmp45 | $cmp47; + if ($or$cond2) { + $66 = $st$addr; + $67 = $N; + $68 = $LM; + _celt_decode_lost($66,$67,$68); + $69 = $pcm$addr; + $70 = $N; + $71 = $CC; + $72 = $st$addr; + $downsample50 = ((($72)) + 16|0); + $73 = HEAP32[$downsample50>>2]|0; + $74 = $mode; + $preemph = ((($74)) + 16|0); + $75 = $st$addr; + $preemph_memD = ((($75)) + 76|0); + $76 = $accum$addr; + _deemphasis($out_syn,$69,$70,$71,$73,$preemph,$preemph_memD,$76); + $77 = $frame_size$addr; + $78 = $st$addr; + $downsample53 = ((($78)) + 16|0); + $79 = HEAP32[$downsample53>>2]|0; + $div = (($77|0) / ($79|0))&-1; + $retval = $div; + $504 = $retval; + STACKTOP = sp;return ($504|0); + } + $80 = $dec$addr; + $cmp55 = ($80|0)==(0|0); + if ($cmp55) { + $81 = $data$addr; + $82 = $len$addr; + _ec_dec_init($_dec,$81,$82); + $dec$addr = $_dec; + } + $83 = $C; + $cmp58 = ($83|0)==(1); + L27: do { + if ($cmp58) { + $i = 0; + while(1) { + $84 = $i; + $85 = $nbEBands; + $cmp61 = ($84|0)<($85|0); + if (!($cmp61)) { + break L27; + } + $86 = $oldBandE; + $87 = $i; + $arrayidx63 = (($86) + ($87<<2)|0); + $88 = +HEAPF32[$arrayidx63>>2]; + $89 = $oldBandE; + $90 = $nbEBands; + $91 = $i; + $add64 = (($90) + ($91))|0; + $arrayidx65 = (($89) + ($add64<<2)|0); + $92 = +HEAPF32[$arrayidx65>>2]; + $cmp66 = $88 > $92; + $93 = $oldBandE; + if ($cmp66) { + $94 = $i; + $add68$sink = $94; + } else { + $95 = $nbEBands; + $96 = $i; + $add68 = (($95) + ($96))|0; + $add68$sink = $add68; + } + $arrayidx69 = (($93) + ($add68$sink<<2)|0); + $97 = +HEAPF32[$arrayidx69>>2]; + $98 = $oldBandE; + $99 = $i; + $arrayidx70 = (($98) + ($99<<2)|0); + HEAPF32[$arrayidx70>>2] = $97; + $100 = $i; + $inc72 = (($100) + 1)|0; + $i = $inc72; + } + } + } while(0); + $101 = $len$addr; + $mul75 = $101<<3; + $total_bits = $mul75; + $102 = $dec$addr; + $call = (_ec_tell_53($102)|0); + $tell = $call; + $103 = $tell; + $104 = $total_bits; + $cmp76 = ($103|0)>=($104|0); + do { + if ($cmp76) { + $silence = 1; + } else { + $105 = $tell; + $cmp78 = ($105|0)==(1); + if ($cmp78) { + $106 = $dec$addr; + $call80 = (_ec_dec_bit_logp($106,15)|0); + $silence = $call80; + break; + } else { + $silence = 0; + break; + } + } + } while(0); + $107 = $silence; + $tobool = ($107|0)!=(0); + if ($tobool) { + $108 = $len$addr; + $mul85 = $108<<3; + $tell = $mul85; + $109 = $tell; + $110 = $dec$addr; + $call86 = (_ec_tell_53($110)|0); + $sub = (($109) - ($call86))|0; + $111 = $dec$addr; + $nbits_total = ((($111)) + 20|0); + $112 = HEAP32[$nbits_total>>2]|0; + $add87 = (($112) + ($sub))|0; + HEAP32[$nbits_total>>2] = $add87; + } + $postfilter_gain = 0.0; + $postfilter_pitch = 0; + $postfilter_tapset = 0; + $113 = $start; + $cmp89 = ($113|0)==(0); + if ($cmp89) { + $114 = $tell; + $add90 = (($114) + 16)|0; + $115 = $total_bits; + $cmp91 = ($add90|0)<=($115|0); + if ($cmp91) { + $116 = $dec$addr; + $call93 = (_ec_dec_bit_logp($116,1)|0); + $tobool94 = ($call93|0)!=(0); + if ($tobool94) { + $117 = $dec$addr; + $call96 = (_ec_dec_uint($117,6)|0); + $octave = $call96; + $118 = $octave; + $shl97 = 16 << $118; + $119 = $dec$addr; + $120 = $octave; + $add98 = (4 + ($120))|0; + $call99 = (_ec_dec_bits($119,$add98)|0); + $add100 = (($shl97) + ($call99))|0; + $sub101 = (($add100) - 1)|0; + $postfilter_pitch = $sub101; + $121 = $dec$addr; + $call102 = (_ec_dec_bits($121,3)|0); + $qg = $call102; + $122 = $dec$addr; + $call103 = (_ec_tell_53($122)|0); + $add104 = (($call103) + 2)|0; + $123 = $total_bits; + $cmp105 = ($add104|0)<=($123|0); + if ($cmp105) { + $124 = $dec$addr; + $call107 = (_ec_dec_icdf($124,21023,2)|0); + $postfilter_tapset = $call107; + } + $125 = $qg; + $add109 = (($125) + 1)|0; + $conv = (+($add109|0)); + $mul110 = 0.09375 * $conv; + $postfilter_gain = $mul110; + } + $126 = $dec$addr; + $call112 = (_ec_tell_53($126)|0); + $tell = $call112; + } + } + $127 = $LM; + $cmp114 = ($127|0)>(0); + if ($cmp114) { + $128 = $tell; + $add117 = (($128) + 3)|0; + $129 = $total_bits; + $cmp118 = ($add117|0)<=($129|0); + if ($cmp118) { + $130 = $dec$addr; + $call121 = (_ec_dec_bit_logp($130,3)|0); + $isTransient = $call121; + $131 = $dec$addr; + $call122 = (_ec_tell_53($131)|0); + $tell = $call122; + } else { + label = 41; + } + } else { + label = 41; + } + if ((label|0) == 41) { + $isTransient = 0; + } + $132 = $isTransient; + $tobool125 = ($132|0)!=(0); + if ($tobool125) { + $133 = $M; + $shortBlocks = $133; + } else { + $shortBlocks = 0; + } + $134 = $tell; + $add129 = (($134) + 3)|0; + $135 = $total_bits; + $cmp130 = ($add129|0)<=($135|0); + if ($cmp130) { + $136 = $dec$addr; + $call133 = (_ec_dec_bit_logp($136,3)|0); + $cond136 = $call133; + } else { + $cond136 = 0; + } + $intra_ener = $cond136; + $137 = $mode; + $138 = $start; + $139 = $end; + $140 = $oldBandE; + $141 = $intra_ener; + $142 = $dec$addr; + $143 = $C; + $144 = $LM; + _unquant_coarse_energy($137,$138,$139,$140,$141,$142,$143,$144); + $145 = $nbEBands; + $146 = (_llvm_stacksave()|0); + $saved_stack = $146; + $vla$alloca_mul = $145<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $147 = $start; + $148 = $end; + $149 = $isTransient; + $150 = $LM; + $151 = $dec$addr; + _tf_decode($147,$148,$149,$vla,$150,$151); + $152 = $dec$addr; + $call137 = (_ec_tell_53($152)|0); + $tell = $call137; + $spread_decision = 2; + $153 = $tell; + $add138 = (($153) + 4)|0; + $154 = $total_bits; + $cmp139 = ($add138|0)<=($154|0); + if ($cmp139) { + $155 = $dec$addr; + $call142 = (_ec_dec_icdf($155,21026,5)|0); + $spread_decision = $call142; + } + $156 = $nbEBands; + $vla144$alloca_mul = $156<<2; + $vla144 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla144$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla144$alloca_mul)|0)+15)&-16)|0);; + $157 = $mode; + $158 = $LM; + $159 = $C; + _init_caps($157,$vla144,$158,$159); + $160 = $nbEBands; + $vla145$alloca_mul = $160<<2; + $vla145 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla145$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla145$alloca_mul)|0)+15)&-16)|0);; + $dynalloc_logp = 6; + $161 = $total_bits; + $shl146 = $161 << 3; + $total_bits = $shl146; + $162 = $dec$addr; + $call147 = (_ec_tell_frac($162)|0); + $tell = $call147; + $163 = $start; + $i = $163; + while(1) { + $164 = $i; + $165 = $end; + $cmp149 = ($164|0)<($165|0); + if (!($cmp149)) { + break; + } + $166 = $C; + $167 = $eBands; + $168 = $i; + $add152 = (($168) + 1)|0; + $arrayidx153 = (($167) + ($add152<<1)|0); + $169 = HEAP16[$arrayidx153>>1]|0; + $conv154 = $169 << 16 >> 16; + $170 = $eBands; + $171 = $i; + $arrayidx155 = (($170) + ($171<<1)|0); + $172 = HEAP16[$arrayidx155>>1]|0; + $conv156 = $172 << 16 >> 16; + $sub157 = (($conv154) - ($conv156))|0; + $mul158 = Math_imul($166, $sub157)|0; + $173 = $LM; + $shl159 = $mul158 << $173; + $width = $shl159; + $174 = $width; + $shl160 = $174 << 3; + $175 = $width; + $cmp161 = (48)>($175|0); + $176 = $width; + $cond166 = $cmp161 ? 48 : $176; + $cmp167 = ($shl160|0)<($cond166|0); + $177 = $width; + if ($cmp167) { + $shl170 = $177 << 3; + $cond179 = $shl170; + } else { + $cmp172 = (48)>($177|0); + $178 = $width; + $cond177 = $cmp172 ? 48 : $178; + $cond179 = $cond177; + } + $quanta = $cond179; + $179 = $dynalloc_logp; + $dynalloc_loop_logp = $179; + $boost = 0; + while(1) { + $180 = $tell; + $181 = $dynalloc_loop_logp; + $shl180 = $181 << 3; + $add181 = (($180) + ($shl180))|0; + $182 = $total_bits; + $cmp182 = ($add181|0)<($182|0); + if (!($cmp182)) { + break; + } + $183 = $boost; + $184 = $i; + $arrayidx184 = (($vla144) + ($184<<2)|0); + $185 = HEAP32[$arrayidx184>>2]|0; + $cmp185 = ($183|0)<($185|0); + if (!($cmp185)) { + break; + } + $186 = $dec$addr; + $187 = $dynalloc_loop_logp; + $call187 = (_ec_dec_bit_logp($186,$187)|0); + $flag = $call187; + $188 = $dec$addr; + $call188 = (_ec_tell_frac($188)|0); + $tell = $call188; + $189 = $flag; + $tobool189 = ($189|0)!=(0); + if (!($tobool189)) { + break; + } + $190 = $quanta; + $191 = $boost; + $add192 = (($191) + ($190))|0; + $boost = $add192; + $192 = $quanta; + $193 = $total_bits; + $sub193 = (($193) - ($192))|0; + $total_bits = $sub193; + $dynalloc_loop_logp = 1; + } + $194 = $boost; + $195 = $i; + $arrayidx194 = (($vla145) + ($195<<2)|0); + HEAP32[$arrayidx194>>2] = $194; + $196 = $boost; + $cmp195 = ($196|0)>(0); + if ($cmp195) { + $197 = $dynalloc_logp; + $sub198 = (($197) - 1)|0; + $cmp199 = (2)>($sub198|0); + $198 = $dynalloc_logp; + $sub203 = (($198) - 1)|0; + $cond205 = $cmp199 ? 2 : $sub203; + $dynalloc_logp = $cond205; + } + $199 = $i; + $inc208 = (($199) + 1)|0; + $i = $inc208; + } + $200 = $nbEBands; + $vla210$alloca_mul = $200<<2; + $vla210 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla210$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla210$alloca_mul)|0)+15)&-16)|0);; + $201 = $tell; + $add211 = (($201) + 48)|0; + $202 = $total_bits; + $cmp212 = ($add211|0)<=($202|0); + if ($cmp212) { + $203 = $dec$addr; + $call215 = (_ec_dec_icdf($203,21030,7)|0); + $cond218 = $call215; + } else { + $cond218 = 5; + } + $alloc_trim = $cond218; + $204 = $len$addr; + $mul219 = $204<<3; + $shl220 = $mul219 << 3; + $205 = $dec$addr; + $call221 = (_ec_tell_frac($205)|0); + $sub222 = (($shl220) - ($call221))|0; + $sub223 = (($sub222) - 1)|0; + $bits = $sub223; + $206 = $isTransient; + $tobool224 = ($206|0)!=(0); + $207 = $LM; + $cmp226 = ($207|0)>=(2); + $or$cond3 = $tobool224 & $cmp226; + if ($or$cond3) { + $208 = $bits; + $209 = $LM; + $add229 = (($209) + 2)|0; + $shl230 = $add229 << 3; + $cmp231 = ($208|0)>=($shl230|0); + $210 = $cmp231; + } else { + $210 = 0; + } + $cond234 = $210 ? 8 : 0; + $anti_collapse_rsv = $cond234; + $211 = $anti_collapse_rsv; + $212 = $bits; + $sub235 = (($212) - ($211))|0; + $bits = $sub235; + $213 = $nbEBands; + $vla236$alloca_mul = $213<<2; + $vla236 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla236$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla236$alloca_mul)|0)+15)&-16)|0);; + $214 = $nbEBands; + $vla237$alloca_mul = $214<<2; + $vla237 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla237$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla237$alloca_mul)|0)+15)&-16)|0);; + $215 = $mode; + $216 = $start; + $217 = $end; + $218 = $alloc_trim; + $219 = $bits; + $220 = $C; + $221 = $LM; + $222 = $dec$addr; + $call238 = (_compute_allocation($215,$216,$217,$vla145,$vla144,$218,$intensity,$dual_stereo,$219,$balance,$vla236,$vla210,$vla237,$220,$221,$222,0,0,0)|0); + $codedBands = $call238; + $223 = $mode; + $224 = $start; + $225 = $end; + $226 = $oldBandE; + $227 = $dec$addr; + $228 = $C; + _unquant_fine_energy($223,$224,$225,$226,$vla210,$227,$228); + $c = 0; + while(1) { + $229 = $c; + $arrayidx240 = (($decode_mem) + ($229<<2)|0); + $230 = HEAP32[$arrayidx240>>2]|0; + $231 = $c; + $arrayidx241 = (($decode_mem) + ($231<<2)|0); + $232 = HEAP32[$arrayidx241>>2]|0; + $233 = $N; + $add$ptr242 = (($232) + ($233<<2)|0); + $234 = $N; + $sub243 = (2048 - ($234))|0; + $235 = $overlap; + $div244 = (($235|0) / 2)&-1; + $add245 = (($sub243) + ($div244))|0; + $mul246 = $add245<<2; + $236 = $c; + $arrayidx247 = (($decode_mem) + ($236<<2)|0); + $237 = HEAP32[$arrayidx247>>2]|0; + $238 = $c; + $arrayidx248 = (($decode_mem) + ($238<<2)|0); + $239 = HEAP32[$arrayidx248>>2]|0; + $240 = $N; + $add$ptr249 = (($239) + ($240<<2)|0); + $sub$ptr$lhs$cast = $237; + $sub$ptr$rhs$cast = $add$ptr249; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $mul250 = 0; + $add251 = (($mul246) + ($mul250))|0; + _memmove(($230|0),($add$ptr242|0),($add251|0))|0; + $241 = $c; + $inc253 = (($241) + 1)|0; + $c = $inc253; + $242 = $CC; + $cmp254 = ($inc253|0)<($242|0); + if (!($cmp254)) { + break; + } + } + $243 = $C; + $244 = $nbEBands; + $mul257 = Math_imul($243, $244)|0; + $vla258$alloca_mul = $mul257; + $vla258 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla258$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla258$alloca_mul)|0)+15)&-16)|0);; + $245 = $C; + $246 = $N; + $mul259 = Math_imul($245, $246)|0; + $vla260$alloca_mul = $mul259<<2; + $vla260 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla260$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla260$alloca_mul)|0)+15)&-16)|0);; + $247 = $mode; + $248 = $start; + $249 = $end; + $250 = $C; + $cmp261 = ($250|0)==(2); + $251 = $N; + $add$ptr264 = (($vla260) + ($251<<2)|0); + $cond267 = $cmp261 ? $add$ptr264 : 0; + $252 = $shortBlocks; + $253 = $spread_decision; + $254 = HEAP32[$dual_stereo>>2]|0; + $255 = HEAP32[$intensity>>2]|0; + $256 = $len$addr; + $mul268 = $256<<6; + $257 = $anti_collapse_rsv; + $sub269 = (($mul268) - ($257))|0; + $258 = HEAP32[$balance>>2]|0; + $259 = $dec$addr; + $260 = $LM; + $261 = $codedBands; + $262 = $st$addr; + $rng = ((($262)) + 36|0); + $263 = $st$addr; + $arch = ((($263)) + 32|0); + $264 = HEAP32[$arch>>2]|0; + _quant_all_bands(0,$247,$248,$249,$vla260,$cond267,$vla258,0,$vla236,$252,$253,$254,$255,$vla,$sub269,$258,$259,$260,$261,$rng,$264); + $265 = $anti_collapse_rsv; + $cmp270 = ($265|0)>(0); + if ($cmp270) { + $266 = $dec$addr; + $call273 = (_ec_dec_bits($266,1)|0); + $anti_collapse_on = $call273; + } + $267 = $mode; + $268 = $start; + $269 = $end; + $270 = $oldBandE; + $271 = $len$addr; + $mul275 = $271<<3; + $272 = $dec$addr; + $call276 = (_ec_tell_53($272)|0); + $sub277 = (($mul275) - ($call276))|0; + $273 = $dec$addr; + $274 = $C; + _unquant_energy_finalise($267,$268,$269,$270,$vla210,$vla237,$sub277,$273,$274); + $275 = $anti_collapse_on; + $tobool278 = ($275|0)!=(0); + if ($tobool278) { + $276 = $mode; + $277 = $LM; + $278 = $C; + $279 = $N; + $280 = $start; + $281 = $end; + $282 = $oldBandE; + $283 = $oldLogE; + $284 = $oldLogE2; + $285 = $st$addr; + $rng280 = ((($285)) + 36|0); + $286 = HEAP32[$rng280>>2]|0; + $287 = $st$addr; + $arch281 = ((($287)) + 32|0); + $288 = HEAP32[$arch281>>2]|0; + _anti_collapse($276,$vla260,$vla258,$277,$278,$279,$280,$281,$282,$283,$284,$vla236,$286,$288); + } + $289 = $silence; + $tobool283 = ($289|0)!=(0); + L105: do { + if ($tobool283) { + $i = 0; + while(1) { + $290 = $i; + $291 = $C; + $292 = $nbEBands; + $mul286 = Math_imul($291, $292)|0; + $cmp287 = ($290|0)<($mul286|0); + if (!($cmp287)) { + break L105; + } + $293 = $oldBandE; + $294 = $i; + $arrayidx290 = (($293) + ($294<<2)|0); + HEAPF32[$arrayidx290>>2] = -28.0; + $295 = $i; + $inc292 = (($295) + 1)|0; + $i = $inc292; + } + } + } while(0); + $296 = $mode; + $297 = $oldBandE; + $298 = $start; + $299 = $effEnd; + $300 = $C; + $301 = $CC; + $302 = $isTransient; + $303 = $LM; + $304 = $st$addr; + $downsample296 = ((($304)) + 16|0); + $305 = HEAP32[$downsample296>>2]|0; + $306 = $silence; + $307 = $st$addr; + $arch297 = ((($307)) + 32|0); + $308 = HEAP32[$arch297>>2]|0; + _celt_synthesis($296,$vla260,$out_syn,$297,$298,$299,$300,$301,$302,$303,$305,$306,$308); + $c = 0; + while(1) { + $309 = $st$addr; + $postfilter_period = ((($309)) + 52|0); + $310 = HEAP32[$postfilter_period>>2]|0; + $cmp299 = ($310|0)>(15); + if ($cmp299) { + $311 = $st$addr; + $postfilter_period302 = ((($311)) + 52|0); + $312 = HEAP32[$postfilter_period302>>2]|0; + $cond305 = $312; + } else { + $cond305 = 15; + } + $313 = $st$addr; + $postfilter_period306 = ((($313)) + 52|0); + HEAP32[$postfilter_period306>>2] = $cond305; + $314 = $st$addr; + $postfilter_period_old = ((($314)) + 56|0); + $315 = HEAP32[$postfilter_period_old>>2]|0; + $cmp307 = ($315|0)>(15); + if ($cmp307) { + $316 = $st$addr; + $postfilter_period_old310 = ((($316)) + 56|0); + $317 = HEAP32[$postfilter_period_old310>>2]|0; + $cond313 = $317; + } else { + $cond313 = 15; + } + $318 = $st$addr; + $postfilter_period_old314 = ((($318)) + 56|0); + HEAP32[$postfilter_period_old314>>2] = $cond313; + $319 = $c; + $arrayidx315 = (($out_syn) + ($319<<2)|0); + $320 = HEAP32[$arrayidx315>>2]|0; + $321 = $c; + $arrayidx316 = (($out_syn) + ($321<<2)|0); + $322 = HEAP32[$arrayidx316>>2]|0; + $323 = $st$addr; + $postfilter_period_old317 = ((($323)) + 56|0); + $324 = HEAP32[$postfilter_period_old317>>2]|0; + $325 = $st$addr; + $postfilter_period318 = ((($325)) + 52|0); + $326 = HEAP32[$postfilter_period318>>2]|0; + $327 = $mode; + $shortMdctSize319 = ((($327)) + 44|0); + $328 = HEAP32[$shortMdctSize319>>2]|0; + $329 = $st$addr; + $postfilter_gain_old = ((($329)) + 64|0); + $330 = +HEAPF32[$postfilter_gain_old>>2]; + $331 = $st$addr; + $postfilter_gain320 = ((($331)) + 60|0); + $332 = +HEAPF32[$postfilter_gain320>>2]; + $333 = $st$addr; + $postfilter_tapset_old = ((($333)) + 72|0); + $334 = HEAP32[$postfilter_tapset_old>>2]|0; + $335 = $st$addr; + $postfilter_tapset321 = ((($335)) + 68|0); + $336 = HEAP32[$postfilter_tapset321>>2]|0; + $337 = $mode; + $window = ((($337)) + 60|0); + $338 = HEAP32[$window>>2]|0; + $339 = $overlap; + $340 = $st$addr; + $arch322 = ((($340)) + 32|0); + $341 = HEAP32[$arch322>>2]|0; + _comb_filter($320,$322,$324,$326,$328,$330,$332,$334,$336,$338,$339,$341); + $342 = $LM; + $cmp323 = ($342|0)!=(0); + if ($cmp323) { + $343 = $c; + $arrayidx326 = (($out_syn) + ($343<<2)|0); + $344 = HEAP32[$arrayidx326>>2]|0; + $345 = $mode; + $shortMdctSize327 = ((($345)) + 44|0); + $346 = HEAP32[$shortMdctSize327>>2]|0; + $add$ptr328 = (($344) + ($346<<2)|0); + $347 = $c; + $arrayidx329 = (($out_syn) + ($347<<2)|0); + $348 = HEAP32[$arrayidx329>>2]|0; + $349 = $mode; + $shortMdctSize330 = ((($349)) + 44|0); + $350 = HEAP32[$shortMdctSize330>>2]|0; + $add$ptr331 = (($348) + ($350<<2)|0); + $351 = $st$addr; + $postfilter_period332 = ((($351)) + 52|0); + $352 = HEAP32[$postfilter_period332>>2]|0; + $353 = $postfilter_pitch; + $354 = $N; + $355 = $mode; + $shortMdctSize333 = ((($355)) + 44|0); + $356 = HEAP32[$shortMdctSize333>>2]|0; + $sub334 = (($354) - ($356))|0; + $357 = $st$addr; + $postfilter_gain335 = ((($357)) + 60|0); + $358 = +HEAPF32[$postfilter_gain335>>2]; + $359 = $postfilter_gain; + $360 = $st$addr; + $postfilter_tapset336 = ((($360)) + 68|0); + $361 = HEAP32[$postfilter_tapset336>>2]|0; + $362 = $postfilter_tapset; + $363 = $mode; + $window337 = ((($363)) + 60|0); + $364 = HEAP32[$window337>>2]|0; + $365 = $overlap; + $366 = $st$addr; + $arch338 = ((($366)) + 32|0); + $367 = HEAP32[$arch338>>2]|0; + _comb_filter($add$ptr328,$add$ptr331,$352,$353,$sub334,$358,$359,$361,$362,$364,$365,$367); + } + $368 = $c; + $inc341 = (($368) + 1)|0; + $c = $inc341; + $369 = $CC; + $cmp342 = ($inc341|0)<($369|0); + if (!($cmp342)) { + break; + } + } + $370 = $st$addr; + $postfilter_period345 = ((($370)) + 52|0); + $371 = HEAP32[$postfilter_period345>>2]|0; + $372 = $st$addr; + $postfilter_period_old346 = ((($372)) + 56|0); + HEAP32[$postfilter_period_old346>>2] = $371; + $373 = $st$addr; + $postfilter_gain347 = ((($373)) + 60|0); + $374 = +HEAPF32[$postfilter_gain347>>2]; + $375 = $st$addr; + $postfilter_gain_old348 = ((($375)) + 64|0); + HEAPF32[$postfilter_gain_old348>>2] = $374; + $376 = $st$addr; + $postfilter_tapset349 = ((($376)) + 68|0); + $377 = HEAP32[$postfilter_tapset349>>2]|0; + $378 = $st$addr; + $postfilter_tapset_old350 = ((($378)) + 72|0); + HEAP32[$postfilter_tapset_old350>>2] = $377; + $379 = $postfilter_pitch; + $380 = $st$addr; + $postfilter_period351 = ((($380)) + 52|0); + HEAP32[$postfilter_period351>>2] = $379; + $381 = $postfilter_gain; + $382 = $st$addr; + $postfilter_gain352 = ((($382)) + 60|0); + HEAPF32[$postfilter_gain352>>2] = $381; + $383 = $postfilter_tapset; + $384 = $st$addr; + $postfilter_tapset353 = ((($384)) + 68|0); + HEAP32[$postfilter_tapset353>>2] = $383; + $385 = $LM; + $cmp354 = ($385|0)!=(0); + if ($cmp354) { + $386 = $st$addr; + $postfilter_period357 = ((($386)) + 52|0); + $387 = HEAP32[$postfilter_period357>>2]|0; + $388 = $st$addr; + $postfilter_period_old358 = ((($388)) + 56|0); + HEAP32[$postfilter_period_old358>>2] = $387; + $389 = $st$addr; + $postfilter_gain359 = ((($389)) + 60|0); + $390 = +HEAPF32[$postfilter_gain359>>2]; + $391 = $st$addr; + $postfilter_gain_old360 = ((($391)) + 64|0); + HEAPF32[$postfilter_gain_old360>>2] = $390; + $392 = $st$addr; + $postfilter_tapset361 = ((($392)) + 68|0); + $393 = HEAP32[$postfilter_tapset361>>2]|0; + $394 = $st$addr; + $postfilter_tapset_old362 = ((($394)) + 72|0); + HEAP32[$postfilter_tapset_old362>>2] = $393; + } + $395 = $C; + $cmp364 = ($395|0)==(1); + if ($cmp364) { + $396 = $oldBandE; + $397 = $nbEBands; + $arrayidx367 = (($396) + ($397<<2)|0); + $398 = $oldBandE; + $399 = $nbEBands; + $mul368 = $399<<2; + $400 = $oldBandE; + $401 = $nbEBands; + $arrayidx369 = (($400) + ($401<<2)|0); + $402 = $oldBandE; + $sub$ptr$lhs$cast370 = $arrayidx369; + $sub$ptr$rhs$cast371 = $402; + $sub$ptr$sub372 = (($sub$ptr$lhs$cast370) - ($sub$ptr$rhs$cast371))|0; + $sub$ptr$div373 = (($sub$ptr$sub372|0) / 4)&-1; + $mul374 = 0; + $add375 = (($mul368) + ($mul374))|0; + _memcpy(($arrayidx367|0),($398|0),($add375|0))|0; + } + $403 = $isTransient; + $tobool377 = ($403|0)!=(0); + L129: do { + if ($tobool377) { + $i = 0; + while(1) { + $436 = $i; + $437 = $nbEBands; + $mul425 = $437<<1; + $cmp426 = ($436|0)<($mul425|0); + if (!($cmp426)) { + break L129; + } + $438 = $oldLogE; + $439 = $i; + $arrayidx429 = (($438) + ($439<<2)|0); + $440 = +HEAPF32[$arrayidx429>>2]; + $441 = $oldBandE; + $442 = $i; + $arrayidx430 = (($441) + ($442<<2)|0); + $443 = +HEAPF32[$arrayidx430>>2]; + $cmp431 = $440 < $443; + if ($cmp431) { + $444 = $oldLogE; + $445 = $i; + $arrayidx434 = (($444) + ($445<<2)|0); + $arrayidx436$sink = $arrayidx434; + } else { + $446 = $oldBandE; + $447 = $i; + $arrayidx436 = (($446) + ($447<<2)|0); + $arrayidx436$sink = $arrayidx436; + } + $448 = +HEAPF32[$arrayidx436$sink>>2]; + $449 = $oldLogE; + $450 = $i; + $arrayidx439 = (($449) + ($450<<2)|0); + HEAPF32[$arrayidx439>>2] = $448; + $451 = $i; + $inc441 = (($451) + 1)|0; + $i = $inc441; + } + } else { + $404 = $oldLogE2; + $405 = $oldLogE; + $406 = $nbEBands; + $mul379 = $406<<1; + $mul380 = $mul379<<2; + $407 = $oldLogE2; + $408 = $oldLogE; + $sub$ptr$lhs$cast381 = $407; + $sub$ptr$rhs$cast382 = $408; + $sub$ptr$sub383 = (($sub$ptr$lhs$cast381) - ($sub$ptr$rhs$cast382))|0; + $sub$ptr$div384 = (($sub$ptr$sub383|0) / 4)&-1; + $mul385 = 0; + $add386 = (($mul380) + ($mul385))|0; + _memcpy(($404|0),($405|0),($add386|0))|0; + $409 = $oldLogE; + $410 = $oldBandE; + $411 = $nbEBands; + $mul387 = $411<<1; + $mul388 = $mul387<<2; + $412 = $oldLogE; + $413 = $oldBandE; + $sub$ptr$lhs$cast389 = $412; + $sub$ptr$rhs$cast390 = $413; + $sub$ptr$sub391 = (($sub$ptr$lhs$cast389) - ($sub$ptr$rhs$cast390))|0; + $sub$ptr$div392 = (($sub$ptr$sub391|0) / 4)&-1; + $mul393 = 0; + $add394 = (($mul388) + ($mul393))|0; + _memcpy(($409|0),($410|0),($add394|0))|0; + $414 = $st$addr; + $loss_count = ((($414)) + 48|0); + $415 = HEAP32[$loss_count>>2]|0; + $cmp395 = ($415|0)<(10); + if ($cmp395) { + $416 = $M; + $conv398 = (+($416|0)); + $mul399 = $conv398 * 0.0010000000474974513; + $max_background_increase = $mul399; + } else { + $max_background_increase = 1.0; + } + $i = 0; + while(1) { + $417 = $i; + $418 = $nbEBands; + $mul403 = $418<<1; + $cmp404 = ($417|0)<($mul403|0); + if (!($cmp404)) { + break L129; + } + $419 = $backgroundLogE; + $420 = $i; + $arrayidx407 = (($419) + ($420<<2)|0); + $421 = +HEAPF32[$arrayidx407>>2]; + $422 = $max_background_increase; + $add408 = $421 + $422; + $423 = $oldBandE; + $424 = $i; + $arrayidx409 = (($423) + ($424<<2)|0); + $425 = +HEAPF32[$arrayidx409>>2]; + $cmp410 = $add408 < $425; + if ($cmp410) { + $426 = $backgroundLogE; + $427 = $i; + $arrayidx413 = (($426) + ($427<<2)|0); + $428 = +HEAPF32[$arrayidx413>>2]; + $429 = $max_background_increase; + $add414 = $428 + $429; + $cond418 = $add414; + } else { + $430 = $oldBandE; + $431 = $i; + $arrayidx416 = (($430) + ($431<<2)|0); + $432 = +HEAPF32[$arrayidx416>>2]; + $cond418 = $432; + } + $433 = $backgroundLogE; + $434 = $i; + $arrayidx419 = (($433) + ($434<<2)|0); + HEAPF32[$arrayidx419>>2] = $cond418; + $435 = $i; + $inc421 = (($435) + 1)|0; + $i = $inc421; + } + } + } while(0); + $c = 0; + while(1) { + $i = 0; + while(1) { + $452 = $i; + $453 = $start; + $cmp446 = ($452|0)<($453|0); + if (!($cmp446)) { + break; + } + $454 = $oldBandE; + $455 = $c; + $456 = $nbEBands; + $mul449 = Math_imul($455, $456)|0; + $457 = $i; + $add450 = (($mul449) + ($457))|0; + $arrayidx451 = (($454) + ($add450<<2)|0); + HEAPF32[$arrayidx451>>2] = 0.0; + $458 = $oldLogE2; + $459 = $c; + $460 = $nbEBands; + $mul452 = Math_imul($459, $460)|0; + $461 = $i; + $add453 = (($mul452) + ($461))|0; + $arrayidx454 = (($458) + ($add453<<2)|0); + HEAPF32[$arrayidx454>>2] = -28.0; + $462 = $oldLogE; + $463 = $c; + $464 = $nbEBands; + $mul455 = Math_imul($463, $464)|0; + $465 = $i; + $add456 = (($mul455) + ($465))|0; + $arrayidx457 = (($462) + ($add456<<2)|0); + HEAPF32[$arrayidx457>>2] = -28.0; + $466 = $i; + $inc459 = (($466) + 1)|0; + $i = $inc459; + } + $467 = $end; + $i = $467; + while(1) { + $468 = $i; + $469 = $nbEBands; + $cmp462 = ($468|0)<($469|0); + if (!($cmp462)) { + break; + } + $470 = $oldBandE; + $471 = $c; + $472 = $nbEBands; + $mul465 = Math_imul($471, $472)|0; + $473 = $i; + $add466 = (($mul465) + ($473))|0; + $arrayidx467 = (($470) + ($add466<<2)|0); + HEAPF32[$arrayidx467>>2] = 0.0; + $474 = $oldLogE2; + $475 = $c; + $476 = $nbEBands; + $mul468 = Math_imul($475, $476)|0; + $477 = $i; + $add469 = (($mul468) + ($477))|0; + $arrayidx470 = (($474) + ($add469<<2)|0); + HEAPF32[$arrayidx470>>2] = -28.0; + $478 = $oldLogE; + $479 = $c; + $480 = $nbEBands; + $mul471 = Math_imul($479, $480)|0; + $481 = $i; + $add472 = (($mul471) + ($481))|0; + $arrayidx473 = (($478) + ($add472<<2)|0); + HEAPF32[$arrayidx473>>2] = -28.0; + $482 = $i; + $inc475 = (($482) + 1)|0; + $i = $inc475; + } + $483 = $c; + $inc478 = (($483) + 1)|0; + $c = $inc478; + $cmp479 = ($inc478|0)<(2); + if (!($cmp479)) { + break; + } + } + $484 = $dec$addr; + $rng482 = ((($484)) + 28|0); + $485 = HEAP32[$rng482>>2]|0; + $486 = $st$addr; + $rng483 = ((($486)) + 36|0); + HEAP32[$rng483>>2] = $485; + $487 = $pcm$addr; + $488 = $N; + $489 = $CC; + $490 = $st$addr; + $downsample485 = ((($490)) + 16|0); + $491 = HEAP32[$downsample485>>2]|0; + $492 = $mode; + $preemph486 = ((($492)) + 16|0); + $493 = $st$addr; + $preemph_memD488 = ((($493)) + 76|0); + $494 = $accum$addr; + _deemphasis($out_syn,$487,$488,$489,$491,$preemph486,$preemph_memD488,$494); + $495 = $st$addr; + $loss_count490 = ((($495)) + 48|0); + HEAP32[$loss_count490>>2] = 0; + $496 = $dec$addr; + $call491 = (_ec_tell_53($496)|0); + $497 = $len$addr; + $mul492 = $497<<3; + $cmp493 = ($call491|0)>($mul492|0); + if ($cmp493) { + $retval = -3; + $cleanup$dest$slot = 1; + } else { + $498 = $dec$addr; + $call497 = (_ec_get_error_57($498)|0); + $tobool498 = ($call497|0)!=(0); + if ($tobool498) { + $499 = $st$addr; + $error = ((($499)) + 40|0); + HEAP32[$error>>2] = 1; + } + $500 = $frame_size$addr; + $501 = $st$addr; + $downsample501 = ((($501)) + 16|0); + $502 = HEAP32[$downsample501>>2]|0; + $div502 = (($500|0) / ($502|0))&-1; + $retval = $div502; + $cleanup$dest$slot = 1; + } + $503 = $saved_stack; + _llvm_stackrestore(($503|0)); + $504 = $retval; + STACKTOP = sp;return ($504|0); +} +function _celt_decode_lost($st,$N,$LM) { + $st = $st|0; + $N = $N|0; + $LM = $LM|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0.0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0.0, $177 = 0, $178 = 0, $179 = 0.0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0.0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0.0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0.0, $209 = 0.0, $21 = 0, $210 = 0.0, $211 = 0.0, $212 = 0, $213 = 0, $214 = 0.0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0, $219 = 0.0, $22 = 0, $220 = 0.0, $221 = 0.0, $222 = 0.0, $223 = 0.0; + var $224 = 0.0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0.0, $236 = 0.0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0.0, $244 = 0.0, $245 = 0.0, $246 = 0, $247 = 0, $248 = 0.0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0.0, $257 = 0.0, $258 = 0.0, $259 = 0.0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0.0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0.0, $283 = 0.0, $284 = 0.0, $285 = 0.0, $286 = 0, $287 = 0.0, $288 = 0.0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0.0, $296 = 0.0; + var $297 = 0.0, $298 = 0.0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0.0, $304 = 0.0, $305 = 0.0, $306 = 0, $307 = 0, $308 = 0, $309 = 0.0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0.0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0.0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0.0, $334 = 0, $335 = 0.0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0.0, $347 = 0, $348 = 0, $349 = 0.0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0.0, $354 = 0, $355 = 0.0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; + var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0; + var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0; + var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0; + var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $C = 0, $E1 = 0.0, $E2 = 0.0, $LM$addr = 0, $N$addr = 0, $S1 = 0.0, $S2 = 0.0, $_decode_mem = 0, $_decode_mem9 = 0, $ac = 0, $add = 0, $add$ptr = 0, $add$ptr109 = 0, $add$ptr116 = 0, $add$ptr13 = 0, $add$ptr15 = 0; + var $add$ptr17 = 0, $add$ptr176 = 0, $add$ptr19 = 0, $add$ptr200 = 0, $add$ptr202 = 0, $add$ptr204 = 0, $add$ptr206 = 0, $add$ptr208 = 0, $add$ptr21 = 0, $add$ptr239 = 0, $add$ptr242 = 0, $add$ptr291 = 0, $add$ptr293 = 0, $add$ptr295 = 0, $add$ptr296 = 0, $add$ptr298 = 0, $add$ptr372 = 0, $add$ptr6 = 0, $add$ptr7 = 0, $add$ptr98 = 0; + var $add11 = 0, $add112 = 0, $add118 = 0, $add145 = 0, $add217 = 0, $add220 = 0.0, $add223 = 0, $add226 = 0.0, $add248 = 0, $add250 = 0, $add262 = 0, $add266 = 0, $add269 = 0, $add270 = 0, $add273 = 0.0, $add307 = 0, $add310 = 0.0, $add323 = 0, $add332 = 0.0, $add333 = 0.0; + var $add347 = 0, $add351 = 0, $add361 = 0, $add365 = 0, $add394 = 0.0, $add395 = 0, $add406 = 0, $add47 = 0, $add50 = 0, $add55 = 0, $add59 = 0, $add65 = 0, $add80 = 0, $add81 = 0, $add93 = 0, $arch = 0, $arch125 = 0, $arch130 = 0, $arch156 = 0, $arch210 = 0; + var $arch300 = 0, $arch378 = 0, $arrayidx = 0, $arrayidx107 = 0, $arrayidx108 = 0, $arrayidx114 = 0, $arrayidx115 = 0, $arrayidx140 = 0, $arrayidx146 = 0, $arrayidx147 = 0, $arrayidx164 = 0, $arrayidx170 = 0, $arrayidx194 = 0, $arrayidx195 = 0, $arrayidx218 = 0, $arrayidx224 = 0, $arrayidx263 = 0, $arrayidx267 = 0, $arrayidx271 = 0, $arrayidx286 = 0; + var $arrayidx287 = 0, $arrayidx308 = 0, $arrayidx324 = 0, $arrayidx342 = 0, $arrayidx348 = 0, $arrayidx352 = 0, $arrayidx362 = 0, $arrayidx366 = 0, $arrayidx384 = 0, $arrayidx387 = 0, $arrayidx391 = 0, $arrayidx392 = 0, $arrayidx396 = 0, $arrayidx48 = 0, $arrayidx5 = 0, $arrayidx51 = 0, $arrayidx56 = 0, $arrayidx60 = 0, $arrayidx66 = 0, $arrayidx79 = 0; + var $arrayidx8 = 0, $arrayidx82 = 0, $arrayidx84 = 0, $arrayidx94 = 0, $attenuation = 0.0, $backgroundLogE = 0, $blen = 0, $boffs = 0, $buf = 0, $c = 0, $call = 0, $call131 = 0, $call237 = 0.0, $call336 = 0.0, $channels = 0, $cmp = 0, $cmp121 = 0, $cmp126 = 0, $cmp142 = 0, $cmp151 = 0; + var $cmp161 = 0, $cmp180 = 0, $cmp188 = 0, $cmp213 = 0, $cmp230 = 0, $cmp24 = 0, $cmp25 = 0, $cmp253 = 0, $cmp256 = 0, $cmp27 = 0, $cmp280 = 0, $cmp29 = 0, $cmp302 = 0, $cmp315 = 0, $cmp319 = 0, $cmp329 = 0, $cmp33 = 0, $cmp339 = 0, $cmp357 = 0, $cmp381 = 0; + var $cmp402 = 0, $cmp42 = 0, $cmp45 = 0, $cmp52 = 0, $cmp70 = 0, $cmp73 = 0, $cmp76 = 0, $cmp89 = 0, $cond = 0, $cond186 = 0, $cond235 = 0.0, $cond40 = 0, $cond43 = 0.0, $cond63 = 0.0, $conv = 0, $conv166 = 0.0, $conv168 = 0.0, $conv236 = 0.0, $conv238 = 0.0, $conv335 = 0.0; + var $conv337 = 0.0, $conv83 = 0, $conv85 = 0, $conv92 = 0.0, $decay = 0.0, $decay138 = 0.0, $decay_length = 0, $decode_mem = 0, $div = 0.0, $div334 = 0.0, $div380 = 0, $downsample = 0, $e = 0.0, $eBands = 0, $eBands4 = 0, $effEBands = 0, $effEBands28 = 0, $effEBands32 = 0, $effEBands36 = 0, $effEnd = 0; + var $end = 0, $end26 = 0, $exc = 0, $exc_length = 0, $extrapolation_len = 0, $extrapolation_offset = 0, $fade = 0.0, $i = 0, $idx$neg = 0, $idx$neg201 = 0, $idx$neg207 = 0, $idx$neg292 = 0, $idx$neg297 = 0, $inc = 0, $inc100 = 0, $inc103 = 0, $inc120 = 0, $inc149 = 0, $inc173 = 0, $inc197 = 0; + var $inc228 = 0, $inc275 = 0, $inc276 = 0, $inc289 = 0, $inc312 = 0, $inc326 = 0, $inc354 = 0, $inc368 = 0, $inc398 = 0, $inc401 = 0, $inc67 = 0, $inc69 = 0, $inc96 = 0, $j = 0, $j139 = 0, $last_pitch_index = 0, $last_pitch_index133 = 0, $lor$ext = 0, $loss_count = 0, $loss_count22 = 0; + var $loss_count407 = 0, $lpc = 0, $lpc_mem = 0, $lpc_mem278 = 0, $mode = 0, $mul = 0, $mul113 = 0, $mul117 = 0, $mul12 = 0, $mul14 = 0, $mul159 = 0.0, $mul16 = 0, $mul165 = 0.0, $mul167 = 0.0, $mul169 = 0.0, $mul175 = 0, $mul179 = 0, $mul18 = 0, $mul183 = 0, $mul20 = 0; + var $mul203 = 0, $mul219 = 0.0, $mul221 = 0, $mul225 = 0.0, $mul241 = 0, $mul247 = 0, $mul251 = 0.0, $mul260 = 0.0, $mul264 = 0.0, $mul272 = 0.0, $mul294 = 0, $mul309 = 0.0, $mul314 = 0.0, $mul344 = 0.0, $mul349 = 0.0, $mul363 = 0.0, $mul388 = 0.0, $mul393 = 0.0, $mul41 = 0, $mul46 = 0; + var $mul49 = 0, $mul54 = 0, $mul58 = 0, $mul64 = 0, $mul78 = 0, $nbEBands = 0, $nbEBands2 = 0, $noise_based = 0, $oldBandE = 0, $oldLogE = 0, $oldLogE2 = 0, $out_syn = 0, $overlap = 0, $overlap3 = 0, $pitch_index = 0, $postfilter_gain = 0, $postfilter_gain375 = 0, $postfilter_period = 0, $postfilter_period373 = 0, $postfilter_tapset = 0; + var $postfilter_tapset377 = 0, $ratio = 0.0, $rng = 0, $rng105 = 0, $saved_stack = 0, $saved_stack134 = 0, $seed = 0, $shl = 0, $shl87 = 0, $shr = 0, $shr111 = 0, $shr211 = 0, $st$addr = 0, $start = 0, $start23 = 0, $sub = 0.0, $sub$ptr$div = 0, $sub$ptr$div246 = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$lhs$cast243 = 0; + var $sub$ptr$rhs$cast = 0, $sub$ptr$rhs$cast244 = 0, $sub$ptr$sub = 0, $sub$ptr$sub245 = 0, $sub110 = 0, $sub171 = 0.0, $sub191 = 0, $sub192 = 0, $sub193 = 0, $sub216 = 0, $sub222 = 0, $sub240 = 0, $sub249 = 0, $sub259 = 0, $sub265 = 0, $sub268 = 0, $sub283 = 0, $sub284 = 0, $sub285 = 0, $sub306 = 0; + var $sub322 = 0, $sub343 = 0.0, $sub345 = 0.0, $sub346 = 0, $sub350 = 0, $sub360 = 0, $sub364 = 0, $sub374 = 0.0, $sub376 = 0.0, $sub385 = 0, $sub386 = 0, $sub389 = 0, $sub390 = 0, $sub61 = 0.0, $sub86 = 0, $tmp = 0.0, $tmp305 = 0.0, $tmp_g = 0.0, $tobool = 0, $vla = 0; + var $vla$alloca_mul = 0, $vla135 = 0, $vla135$alloca_mul = 0, $window = 0, $window136 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 4608|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(4608|0); + $decode_mem = sp + 4568|0; + $out_syn = sp + 4560|0; + $exc = sp + 368|0; + $ac = sp + 232|0; + $lpc_mem = sp + 136|0; + $lpc_mem278 = sp + 16|0; + $st$addr = $st; + $N$addr = $N; + $LM$addr = $LM; + $0 = $st$addr; + $channels = ((($0)) + 8|0); + $1 = HEAP32[$channels>>2]|0; + $C = $1; + $2 = $st$addr; + $3 = HEAP32[$2>>2]|0; + $mode = $3; + $4 = $mode; + $nbEBands2 = ((($4)) + 8|0); + $5 = HEAP32[$nbEBands2>>2]|0; + $nbEBands = $5; + $6 = $mode; + $overlap3 = ((($6)) + 4|0); + $7 = HEAP32[$overlap3>>2]|0; + $overlap = $7; + $8 = $mode; + $eBands4 = ((($8)) + 32|0); + $9 = HEAP32[$eBands4>>2]|0; + $eBands = $9; + $c = 0; + while(1) { + $10 = $st$addr; + $_decode_mem = ((($10)) + 84|0); + $11 = $c; + $12 = $overlap; + $add = (2048 + ($12))|0; + $mul = Math_imul($11, $add)|0; + $add$ptr = (($_decode_mem) + ($mul<<2)|0); + $13 = $c; + $arrayidx = (($decode_mem) + ($13<<2)|0); + HEAP32[$arrayidx>>2] = $add$ptr; + $14 = $c; + $arrayidx5 = (($decode_mem) + ($14<<2)|0); + $15 = HEAP32[$arrayidx5>>2]|0; + $add$ptr6 = ((($15)) + 8192|0); + $16 = $N$addr; + $idx$neg = (0 - ($16))|0; + $add$ptr7 = (($add$ptr6) + ($idx$neg<<2)|0); + $17 = $c; + $arrayidx8 = (($out_syn) + ($17<<2)|0); + HEAP32[$arrayidx8>>2] = $add$ptr7; + $18 = $c; + $inc = (($18) + 1)|0; + $c = $inc; + $19 = $C; + $cmp = ($inc|0)<($19|0); + if (!($cmp)) { + break; + } + } + $20 = $st$addr; + $_decode_mem9 = ((($20)) + 84|0); + $21 = $overlap; + $add11 = (2048 + ($21))|0; + $22 = $C; + $mul12 = Math_imul($add11, $22)|0; + $add$ptr13 = (($_decode_mem9) + ($mul12<<2)|0); + $lpc = $add$ptr13; + $23 = $lpc; + $24 = $C; + $mul14 = ($24*24)|0; + $add$ptr15 = (($23) + ($mul14<<2)|0); + $oldBandE = $add$ptr15; + $25 = $oldBandE; + $26 = $nbEBands; + $mul16 = $26<<1; + $add$ptr17 = (($25) + ($mul16<<2)|0); + $oldLogE = $add$ptr17; + $27 = $oldLogE; + $28 = $nbEBands; + $mul18 = $28<<1; + $add$ptr19 = (($27) + ($mul18<<2)|0); + $oldLogE2 = $add$ptr19; + $29 = $oldLogE2; + $30 = $nbEBands; + $mul20 = $30<<1; + $add$ptr21 = (($29) + ($mul20<<2)|0); + $backgroundLogE = $add$ptr21; + $31 = $st$addr; + $loss_count22 = ((($31)) + 48|0); + $32 = HEAP32[$loss_count22>>2]|0; + $loss_count = $32; + $33 = $st$addr; + $start23 = ((($33)) + 20|0); + $34 = HEAP32[$start23>>2]|0; + $start = $34; + $35 = $loss_count; + $cmp24 = ($35|0)>=(5); + $36 = $start; + $cmp25 = ($36|0)!=(0); + $37 = $cmp24 ? 1 : $cmp25; + $lor$ext = $37&1; + $noise_based = $lor$ext; + $38 = $noise_based; + $tobool = ($38|0)!=(0); + if ($tobool) { + $39 = $st$addr; + $end26 = ((($39)) + 24|0); + $40 = HEAP32[$end26>>2]|0; + $end = $40; + $41 = $start; + $42 = $end; + $43 = $mode; + $effEBands = ((($43)) + 12|0); + $44 = HEAP32[$effEBands>>2]|0; + $cmp27 = ($42|0)<($44|0); + if ($cmp27) { + $45 = $end; + $cond = $45; + } else { + $46 = $mode; + $effEBands28 = ((($46)) + 12|0); + $47 = HEAP32[$effEBands28>>2]|0; + $cond = $47; + } + $cmp29 = ($41|0)>($cond|0); + do { + if ($cmp29) { + $48 = $start; + $cond40 = $48; + } else { + $49 = $end; + $50 = $mode; + $effEBands32 = ((($50)) + 12|0); + $51 = HEAP32[$effEBands32>>2]|0; + $cmp33 = ($49|0)<($51|0); + if ($cmp33) { + $52 = $end; + $cond40 = $52; + break; + } else { + $53 = $mode; + $effEBands36 = ((($53)) + 12|0); + $54 = HEAP32[$effEBands36>>2]|0; + $cond40 = $54; + break; + } + } + } while(0); + $effEnd = $cond40; + $55 = $C; + $56 = $N$addr; + $mul41 = Math_imul($55, $56)|0; + $57 = (_llvm_stacksave()|0); + $saved_stack = $57; + $vla$alloca_mul = $mul41<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $58 = $loss_count; + $cmp42 = ($58|0)==(0); + $cond43 = $cmp42 ? 1.5 : 0.5; + $decay = $cond43; + $c = 0; + while(1) { + $59 = $start; + $i = $59; + while(1) { + $60 = $i; + $61 = $end; + $cmp45 = ($60|0)<($61|0); + if (!($cmp45)) { + break; + } + $62 = $backgroundLogE; + $63 = $c; + $64 = $nbEBands; + $mul46 = Math_imul($63, $64)|0; + $65 = $i; + $add47 = (($mul46) + ($65))|0; + $arrayidx48 = (($62) + ($add47<<2)|0); + $66 = +HEAPF32[$arrayidx48>>2]; + $67 = $oldBandE; + $68 = $c; + $69 = $nbEBands; + $mul49 = Math_imul($68, $69)|0; + $70 = $i; + $add50 = (($mul49) + ($70))|0; + $arrayidx51 = (($67) + ($add50<<2)|0); + $71 = +HEAPF32[$arrayidx51>>2]; + $72 = $decay; + $sub = $71 - $72; + $cmp52 = $66 > $sub; + if ($cmp52) { + $73 = $backgroundLogE; + $74 = $c; + $75 = $nbEBands; + $mul54 = Math_imul($74, $75)|0; + $76 = $i; + $add55 = (($mul54) + ($76))|0; + $arrayidx56 = (($73) + ($add55<<2)|0); + $77 = +HEAPF32[$arrayidx56>>2]; + $cond63 = $77; + } else { + $78 = $oldBandE; + $79 = $c; + $80 = $nbEBands; + $mul58 = Math_imul($79, $80)|0; + $81 = $i; + $add59 = (($mul58) + ($81))|0; + $arrayidx60 = (($78) + ($add59<<2)|0); + $82 = +HEAPF32[$arrayidx60>>2]; + $83 = $decay; + $sub61 = $82 - $83; + $cond63 = $sub61; + } + $84 = $oldBandE; + $85 = $c; + $86 = $nbEBands; + $mul64 = Math_imul($85, $86)|0; + $87 = $i; + $add65 = (($mul64) + ($87))|0; + $arrayidx66 = (($84) + ($add65<<2)|0); + HEAPF32[$arrayidx66>>2] = $cond63; + $88 = $i; + $inc67 = (($88) + 1)|0; + $i = $inc67; + } + $89 = $c; + $inc69 = (($89) + 1)|0; + $c = $inc69; + $90 = $C; + $cmp70 = ($inc69|0)<($90|0); + if (!($cmp70)) { + break; + } + } + $91 = $st$addr; + $rng = ((($91)) + 36|0); + $92 = HEAP32[$rng>>2]|0; + $seed = $92; + $c = 0; + while(1) { + $93 = $c; + $94 = $C; + $cmp73 = ($93|0)<($94|0); + if (!($cmp73)) { + break; + } + $95 = $start; + $i = $95; + while(1) { + $96 = $i; + $97 = $effEnd; + $cmp76 = ($96|0)<($97|0); + if (!($cmp76)) { + break; + } + $98 = $N$addr; + $99 = $c; + $mul78 = Math_imul($98, $99)|0; + $100 = $eBands; + $101 = $i; + $arrayidx79 = (($100) + ($101<<1)|0); + $102 = HEAP16[$arrayidx79>>1]|0; + $conv = $102 << 16 >> 16; + $103 = $LM$addr; + $shl = $conv << $103; + $add80 = (($mul78) + ($shl))|0; + $boffs = $add80; + $104 = $eBands; + $105 = $i; + $add81 = (($105) + 1)|0; + $arrayidx82 = (($104) + ($add81<<1)|0); + $106 = HEAP16[$arrayidx82>>1]|0; + $conv83 = $106 << 16 >> 16; + $107 = $eBands; + $108 = $i; + $arrayidx84 = (($107) + ($108<<1)|0); + $109 = HEAP16[$arrayidx84>>1]|0; + $conv85 = $109 << 16 >> 16; + $sub86 = (($conv83) - ($conv85))|0; + $110 = $LM$addr; + $shl87 = $sub86 << $110; + $blen = $shl87; + $j = 0; + while(1) { + $111 = $j; + $112 = $blen; + $cmp89 = ($111|0)<($112|0); + if (!($cmp89)) { + break; + } + $113 = $seed; + $call = (_celt_lcg_rand($113)|0); + $seed = $call; + $114 = $seed; + $shr = $114 >> 20; + $conv92 = (+($shr|0)); + $115 = $boffs; + $116 = $j; + $add93 = (($115) + ($116))|0; + $arrayidx94 = (($vla) + ($add93<<2)|0); + HEAPF32[$arrayidx94>>2] = $conv92; + $117 = $j; + $inc96 = (($117) + 1)|0; + $j = $inc96; + } + $118 = $boffs; + $add$ptr98 = (($vla) + ($118<<2)|0); + $119 = $blen; + $120 = $st$addr; + $arch = ((($120)) + 32|0); + $121 = HEAP32[$arch>>2]|0; + _renormalise_vector($add$ptr98,$119,1.0,$121); + $122 = $i; + $inc100 = (($122) + 1)|0; + $i = $inc100; + } + $123 = $c; + $inc103 = (($123) + 1)|0; + $c = $inc103; + } + $124 = $seed; + $125 = $st$addr; + $rng105 = ((($125)) + 36|0); + HEAP32[$rng105>>2] = $124; + $c = 0; + while(1) { + $126 = $c; + $arrayidx107 = (($decode_mem) + ($126<<2)|0); + $127 = HEAP32[$arrayidx107>>2]|0; + $128 = $c; + $arrayidx108 = (($decode_mem) + ($128<<2)|0); + $129 = HEAP32[$arrayidx108>>2]|0; + $130 = $N$addr; + $add$ptr109 = (($129) + ($130<<2)|0); + $131 = $N$addr; + $sub110 = (2048 - ($131))|0; + $132 = $overlap; + $shr111 = $132 >> 1; + $add112 = (($sub110) + ($shr111))|0; + $mul113 = $add112<<2; + $133 = $c; + $arrayidx114 = (($decode_mem) + ($133<<2)|0); + $134 = HEAP32[$arrayidx114>>2]|0; + $135 = $c; + $arrayidx115 = (($decode_mem) + ($135<<2)|0); + $136 = HEAP32[$arrayidx115>>2]|0; + $137 = $N$addr; + $add$ptr116 = (($136) + ($137<<2)|0); + $sub$ptr$lhs$cast = $134; + $sub$ptr$rhs$cast = $add$ptr116; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $mul117 = 0; + $add118 = (($mul113) + ($mul117))|0; + _memmove(($127|0),($add$ptr109|0),($add118|0))|0; + $138 = $c; + $inc120 = (($138) + 1)|0; + $c = $inc120; + $139 = $C; + $cmp121 = ($inc120|0)<($139|0); + if (!($cmp121)) { + break; + } + } + $140 = $mode; + $141 = $oldBandE; + $142 = $start; + $143 = $effEnd; + $144 = $C; + $145 = $C; + $146 = $LM$addr; + $147 = $st$addr; + $downsample = ((($147)) + 16|0); + $148 = HEAP32[$downsample>>2]|0; + $149 = $st$addr; + $arch125 = ((($149)) + 32|0); + $150 = HEAP32[$arch125>>2]|0; + _celt_synthesis($140,$vla,$out_syn,$141,$142,$143,$144,$145,0,$146,$148,0,$150); + $151 = $saved_stack; + _llvm_stackrestore(($151|0)); + $362 = $loss_count; + $add406 = (($362) + 1)|0; + $363 = $st$addr; + $loss_count407 = ((($363)) + 48|0); + HEAP32[$loss_count407>>2] = $add406; + STACKTOP = sp;return; + } + $fade = 1.0; + $152 = $loss_count; + $cmp126 = ($152|0)==(0); + if ($cmp126) { + $153 = $C; + $154 = $st$addr; + $arch130 = ((($154)) + 32|0); + $155 = HEAP32[$arch130>>2]|0; + $call131 = (_celt_plc_pitch_search($decode_mem,$153,$155)|0); + $pitch_index = $call131; + $156 = $st$addr; + $last_pitch_index = ((($156)) + 44|0); + HEAP32[$last_pitch_index>>2] = $call131; + } else { + $157 = $st$addr; + $last_pitch_index133 = ((($157)) + 44|0); + $158 = HEAP32[$last_pitch_index133>>2]|0; + $pitch_index = $158; + $fade = 0.80000001192092896; + } + $159 = $overlap; + $160 = (_llvm_stacksave()|0); + $saved_stack134 = $160; + $vla135$alloca_mul = $159<<2; + $vla135 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla135$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla135$alloca_mul)|0)+15)&-16)|0);; + $161 = $mode; + $window136 = ((($161)) + 60|0); + $162 = HEAP32[$window136>>2]|0; + $window = $162; + $c = 0; + while(1) { + $S1 = 0.0; + $163 = $c; + $arrayidx140 = (($decode_mem) + ($163<<2)|0); + $164 = HEAP32[$arrayidx140>>2]|0; + $buf = $164; + $i = 0; + while(1) { + $165 = $i; + $cmp142 = ($165|0)<(1024); + if (!($cmp142)) { + break; + } + $166 = $buf; + $167 = $i; + $add145 = (1024 + ($167))|0; + $arrayidx146 = (($166) + ($add145<<2)|0); + $168 = +HEAPF32[$arrayidx146>>2]; + $169 = $i; + $arrayidx147 = (($exc) + ($169<<2)|0); + HEAPF32[$arrayidx147>>2] = $168; + $170 = $i; + $inc149 = (($170) + 1)|0; + $i = $inc149; + } + $171 = $loss_count; + $cmp151 = ($171|0)==(0); + if ($cmp151) { + $172 = $window; + $173 = $overlap; + $174 = $st$addr; + $arch156 = ((($174)) + 32|0); + $175 = HEAP32[$arch156>>2]|0; + (__celt_autocorr($exc,$ac,$172,$173,24,1024,$175)|0); + $176 = +HEAPF32[$ac>>2]; + $mul159 = $176 * 1.0001000165939331; + HEAPF32[$ac>>2] = $mul159; + $i = 1; + while(1) { + $177 = $i; + $cmp161 = ($177|0)<=(24); + if (!($cmp161)) { + break; + } + $178 = $i; + $arrayidx164 = (($ac) + ($178<<2)|0); + $179 = +HEAPF32[$arrayidx164>>2]; + $mul165 = $179 * 6.4000007114373147E-5; + $180 = $i; + $conv166 = (+($180|0)); + $mul167 = $mul165 * $conv166; + $181 = $i; + $conv168 = (+($181|0)); + $mul169 = $mul167 * $conv168; + $182 = $i; + $arrayidx170 = (($ac) + ($182<<2)|0); + $183 = +HEAPF32[$arrayidx170>>2]; + $sub171 = $183 - $mul169; + HEAPF32[$arrayidx170>>2] = $sub171; + $184 = $i; + $inc173 = (($184) + 1)|0; + $i = $inc173; + } + $185 = $lpc; + $186 = $c; + $mul175 = ($186*24)|0; + $add$ptr176 = (($185) + ($mul175<<2)|0); + __celt_lpc($add$ptr176,$ac,24); + } + $187 = $pitch_index; + $mul179 = $187<<1; + $cmp180 = ($mul179|0)<(1024); + $188 = $pitch_index; + $mul183 = $188<<1; + $cond186 = $cmp180 ? $mul183 : 1024; + $exc_length = $cond186; + $i = 0; + while(1) { + $189 = $i; + $cmp188 = ($189|0)<(24); + if (!($cmp188)) { + break; + } + $190 = $buf; + $191 = $exc_length; + $sub191 = (2048 - ($191))|0; + $sub192 = (($sub191) - 1)|0; + $192 = $i; + $sub193 = (($sub192) - ($192))|0; + $arrayidx194 = (($190) + ($sub193<<2)|0); + $193 = +HEAPF32[$arrayidx194>>2]; + $194 = $i; + $arrayidx195 = (($lpc_mem) + ($194<<2)|0); + HEAPF32[$arrayidx195>>2] = $193; + $195 = $i; + $inc197 = (($195) + 1)|0; + $i = $inc197; + } + $add$ptr200 = ((($exc)) + 4096|0); + $196 = $exc_length; + $idx$neg201 = (0 - ($196))|0; + $add$ptr202 = (($add$ptr200) + ($idx$neg201<<2)|0); + $197 = $lpc; + $198 = $c; + $mul203 = ($198*24)|0; + $add$ptr204 = (($197) + ($mul203<<2)|0); + $add$ptr206 = ((($exc)) + 4096|0); + $199 = $exc_length; + $idx$neg207 = (0 - ($199))|0; + $add$ptr208 = (($add$ptr206) + ($idx$neg207<<2)|0); + $200 = $exc_length; + $201 = $st$addr; + $arch210 = ((($201)) + 32|0); + $202 = HEAP32[$arch210>>2]|0; + _celt_fir_c($add$ptr202,$add$ptr204,$add$ptr208,$200,24,$lpc_mem,$202); + $E1 = 1.0; + $E2 = 1.0; + $203 = $exc_length; + $shr211 = $203 >> 1; + $decay_length = $shr211; + $i = 0; + while(1) { + $204 = $i; + $205 = $decay_length; + $cmp213 = ($204|0)<($205|0); + if (!($cmp213)) { + break; + } + $206 = $decay_length; + $sub216 = (1024 - ($206))|0; + $207 = $i; + $add217 = (($sub216) + ($207))|0; + $arrayidx218 = (($exc) + ($add217<<2)|0); + $208 = +HEAPF32[$arrayidx218>>2]; + $e = $208; + $209 = $e; + $210 = $e; + $mul219 = $209 * $210; + $211 = $E1; + $add220 = $211 + $mul219; + $E1 = $add220; + $212 = $decay_length; + $mul221 = $212<<1; + $sub222 = (1024 - ($mul221))|0; + $213 = $i; + $add223 = (($sub222) + ($213))|0; + $arrayidx224 = (($exc) + ($add223<<2)|0); + $214 = +HEAPF32[$arrayidx224>>2]; + $e = $214; + $215 = $e; + $216 = $e; + $mul225 = $215 * $216; + $217 = $E2; + $add226 = $217 + $mul225; + $E2 = $add226; + $218 = $i; + $inc228 = (($218) + 1)|0; + $i = $inc228; + } + $219 = $E1; + $220 = $E2; + $cmp230 = $219 < $220; + $221 = $E1; + $222 = $E2; + $cond235 = $cmp230 ? $221 : $222; + $E1 = $cond235; + $223 = $E1; + $224 = $E2; + $div = $223 / $224; + $conv236 = $div; + $call237 = (+Math_sqrt((+$conv236))); + $conv238 = $call237; + $decay138 = $conv238; + $225 = $buf; + $226 = $buf; + $227 = $N$addr; + $add$ptr239 = (($226) + ($227<<2)|0); + $228 = $N$addr; + $sub240 = (2048 - ($228))|0; + $mul241 = $sub240<<2; + $229 = $buf; + $230 = $buf; + $231 = $N$addr; + $add$ptr242 = (($230) + ($231<<2)|0); + $sub$ptr$lhs$cast243 = $229; + $sub$ptr$rhs$cast244 = $add$ptr242; + $sub$ptr$sub245 = (($sub$ptr$lhs$cast243) - ($sub$ptr$rhs$cast244))|0; + $sub$ptr$div246 = (($sub$ptr$sub245|0) / 4)&-1; + $mul247 = 0; + $add248 = (($mul241) + ($mul247))|0; + _memmove(($225|0),($add$ptr239|0),($add248|0))|0; + $232 = $pitch_index; + $sub249 = (1024 - ($232))|0; + $extrapolation_offset = $sub249; + $233 = $N$addr; + $234 = $overlap; + $add250 = (($233) + ($234))|0; + $extrapolation_len = $add250; + $235 = $fade; + $236 = $decay138; + $mul251 = $235 * $236; + $attenuation = $mul251; + $j139 = 0; + $i = 0; + while(1) { + $237 = $i; + $238 = $extrapolation_len; + $cmp253 = ($237|0)<($238|0); + if (!($cmp253)) { + break; + } + $239 = $j139; + $240 = $pitch_index; + $cmp256 = ($239|0)>=($240|0); + if ($cmp256) { + $241 = $pitch_index; + $242 = $j139; + $sub259 = (($242) - ($241))|0; + $j139 = $sub259; + $243 = $attenuation; + $244 = $decay138; + $mul260 = $243 * $244; + $attenuation = $mul260; + } + $245 = $attenuation; + $246 = $extrapolation_offset; + $247 = $j139; + $add262 = (($246) + ($247))|0; + $arrayidx263 = (($exc) + ($add262<<2)|0); + $248 = +HEAPF32[$arrayidx263>>2]; + $mul264 = $245 * $248; + $249 = $buf; + $250 = $N$addr; + $sub265 = (2048 - ($250))|0; + $251 = $i; + $add266 = (($sub265) + ($251))|0; + $arrayidx267 = (($249) + ($add266<<2)|0); + HEAPF32[$arrayidx267>>2] = $mul264; + $252 = $buf; + $253 = $N$addr; + $sub268 = (1024 - ($253))|0; + $254 = $extrapolation_offset; + $add269 = (($sub268) + ($254))|0; + $255 = $j139; + $add270 = (($add269) + ($255))|0; + $arrayidx271 = (($252) + ($add270<<2)|0); + $256 = +HEAPF32[$arrayidx271>>2]; + $tmp = $256; + $257 = $tmp; + $258 = $tmp; + $mul272 = $257 * $258; + $259 = $S1; + $add273 = $259 + $mul272; + $S1 = $add273; + $260 = $i; + $inc275 = (($260) + 1)|0; + $i = $inc275; + $261 = $j139; + $inc276 = (($261) + 1)|0; + $j139 = $inc276; + } + $i = 0; + while(1) { + $262 = $i; + $cmp280 = ($262|0)<(24); + $263 = $buf; + if (!($cmp280)) { + break; + } + $264 = $N$addr; + $sub283 = (2048 - ($264))|0; + $sub284 = (($sub283) - 1)|0; + $265 = $i; + $sub285 = (($sub284) - ($265))|0; + $arrayidx286 = (($263) + ($sub285<<2)|0); + $266 = +HEAPF32[$arrayidx286>>2]; + $267 = $i; + $arrayidx287 = (($lpc_mem278) + ($267<<2)|0); + HEAPF32[$arrayidx287>>2] = $266; + $268 = $i; + $inc289 = (($268) + 1)|0; + $i = $inc289; + } + $add$ptr291 = ((($263)) + 8192|0); + $269 = $N$addr; + $idx$neg292 = (0 - ($269))|0; + $add$ptr293 = (($add$ptr291) + ($idx$neg292<<2)|0); + $270 = $lpc; + $271 = $c; + $mul294 = ($271*24)|0; + $add$ptr295 = (($270) + ($mul294<<2)|0); + $272 = $buf; + $add$ptr296 = ((($272)) + 8192|0); + $273 = $N$addr; + $idx$neg297 = (0 - ($273))|0; + $add$ptr298 = (($add$ptr296) + ($idx$neg297<<2)|0); + $274 = $extrapolation_len; + $275 = $st$addr; + $arch300 = ((($275)) + 32|0); + $276 = HEAP32[$arch300>>2]|0; + _celt_iir($add$ptr293,$add$ptr295,$add$ptr298,$274,24,$lpc_mem278,$276); + $S2 = 0.0; + $i = 0; + while(1) { + $277 = $i; + $278 = $extrapolation_len; + $cmp302 = ($277|0)<($278|0); + if (!($cmp302)) { + break; + } + $279 = $buf; + $280 = $N$addr; + $sub306 = (2048 - ($280))|0; + $281 = $i; + $add307 = (($sub306) + ($281))|0; + $arrayidx308 = (($279) + ($add307<<2)|0); + $282 = +HEAPF32[$arrayidx308>>2]; + $tmp305 = $282; + $283 = $tmp305; + $284 = $tmp305; + $mul309 = $283 * $284; + $285 = $S2; + $add310 = $285 + $mul309; + $S2 = $add310; + $286 = $i; + $inc312 = (($286) + 1)|0; + $i = $inc312; + } + $287 = $S1; + $288 = $S2; + $mul314 = 0.20000000298023224 * $288; + $cmp315 = $287 > $mul314; + L85: do { + if ($cmp315) { + $295 = $S1; + $296 = $S2; + $cmp329 = $295 < $296; + if ($cmp329) { + $297 = $S1; + $add332 = $297 + 1.0; + $298 = $S2; + $add333 = $298 + 1.0; + $div334 = $add332 / $add333; + $conv335 = $div334; + $call336 = (+Math_sqrt((+$conv335))); + $conv337 = $call336; + $ratio = $conv337; + $i = 0; + while(1) { + $299 = $i; + $300 = $overlap; + $cmp339 = ($299|0)<($300|0); + if (!($cmp339)) { + break; + } + $301 = $window; + $302 = $i; + $arrayidx342 = (($301) + ($302<<2)|0); + $303 = +HEAPF32[$arrayidx342>>2]; + $304 = $ratio; + $sub343 = 1.0 - $304; + $mul344 = $303 * $sub343; + $sub345 = 1.0 - $mul344; + $tmp_g = $sub345; + $305 = $tmp_g; + $306 = $buf; + $307 = $N$addr; + $sub346 = (2048 - ($307))|0; + $308 = $i; + $add347 = (($sub346) + ($308))|0; + $arrayidx348 = (($306) + ($add347<<2)|0); + $309 = +HEAPF32[$arrayidx348>>2]; + $mul349 = $305 * $309; + $310 = $buf; + $311 = $N$addr; + $sub350 = (2048 - ($311))|0; + $312 = $i; + $add351 = (($sub350) + ($312))|0; + $arrayidx352 = (($310) + ($add351<<2)|0); + HEAPF32[$arrayidx352>>2] = $mul349; + $313 = $i; + $inc354 = (($313) + 1)|0; + $i = $inc354; + } + $314 = $overlap; + $i = $314; + while(1) { + $315 = $i; + $316 = $extrapolation_len; + $cmp357 = ($315|0)<($316|0); + if (!($cmp357)) { + break L85; + } + $317 = $ratio; + $318 = $buf; + $319 = $N$addr; + $sub360 = (2048 - ($319))|0; + $320 = $i; + $add361 = (($sub360) + ($320))|0; + $arrayidx362 = (($318) + ($add361<<2)|0); + $321 = +HEAPF32[$arrayidx362>>2]; + $mul363 = $317 * $321; + $322 = $buf; + $323 = $N$addr; + $sub364 = (2048 - ($323))|0; + $324 = $i; + $add365 = (($sub364) + ($324))|0; + $arrayidx366 = (($322) + ($add365<<2)|0); + HEAPF32[$arrayidx366>>2] = $mul363; + $325 = $i; + $inc368 = (($325) + 1)|0; + $i = $inc368; + } + } + } else { + $i = 0; + while(1) { + $289 = $i; + $290 = $extrapolation_len; + $cmp319 = ($289|0)<($290|0); + if (!($cmp319)) { + break L85; + } + $291 = $buf; + $292 = $N$addr; + $sub322 = (2048 - ($292))|0; + $293 = $i; + $add323 = (($sub322) + ($293))|0; + $arrayidx324 = (($291) + ($add323<<2)|0); + HEAPF32[$arrayidx324>>2] = 0.0; + $294 = $i; + $inc326 = (($294) + 1)|0; + $i = $inc326; + } + } + } while(0); + $326 = $buf; + $add$ptr372 = ((($326)) + 8192|0); + $327 = $st$addr; + $postfilter_period = ((($327)) + 52|0); + $328 = HEAP32[$postfilter_period>>2]|0; + $329 = $st$addr; + $postfilter_period373 = ((($329)) + 52|0); + $330 = HEAP32[$postfilter_period373>>2]|0; + $331 = $overlap; + $332 = $st$addr; + $postfilter_gain = ((($332)) + 60|0); + $333 = +HEAPF32[$postfilter_gain>>2]; + $sub374 = - $333; + $334 = $st$addr; + $postfilter_gain375 = ((($334)) + 60|0); + $335 = +HEAPF32[$postfilter_gain375>>2]; + $sub376 = - $335; + $336 = $st$addr; + $postfilter_tapset = ((($336)) + 68|0); + $337 = HEAP32[$postfilter_tapset>>2]|0; + $338 = $st$addr; + $postfilter_tapset377 = ((($338)) + 68|0); + $339 = HEAP32[$postfilter_tapset377>>2]|0; + $340 = $st$addr; + $arch378 = ((($340)) + 32|0); + $341 = HEAP32[$arch378>>2]|0; + _comb_filter($vla135,$add$ptr372,$328,$330,$331,$sub374,$sub376,$337,$339,0,0,$341); + $i = 0; + while(1) { + $342 = $i; + $343 = $overlap; + $div380 = (($343|0) / 2)&-1; + $cmp381 = ($342|0)<($div380|0); + if (!($cmp381)) { + break; + } + $344 = $window; + $345 = $i; + $arrayidx384 = (($344) + ($345<<2)|0); + $346 = +HEAPF32[$arrayidx384>>2]; + $347 = $overlap; + $sub385 = (($347) - 1)|0; + $348 = $i; + $sub386 = (($sub385) - ($348))|0; + $arrayidx387 = (($vla135) + ($sub386<<2)|0); + $349 = +HEAPF32[$arrayidx387>>2]; + $mul388 = $346 * $349; + $350 = $window; + $351 = $overlap; + $352 = $i; + $sub389 = (($351) - ($352))|0; + $sub390 = (($sub389) - 1)|0; + $arrayidx391 = (($350) + ($sub390<<2)|0); + $353 = +HEAPF32[$arrayidx391>>2]; + $354 = $i; + $arrayidx392 = (($vla135) + ($354<<2)|0); + $355 = +HEAPF32[$arrayidx392>>2]; + $mul393 = $353 * $355; + $add394 = $mul388 + $mul393; + $356 = $buf; + $357 = $i; + $add395 = (2048 + ($357))|0; + $arrayidx396 = (($356) + ($add395<<2)|0); + HEAPF32[$arrayidx396>>2] = $add394; + $358 = $i; + $inc398 = (($358) + 1)|0; + $i = $inc398; + } + $359 = $c; + $inc401 = (($359) + 1)|0; + $c = $inc401; + $360 = $C; + $cmp402 = ($inc401|0)<($360|0); + if (!($cmp402)) { + break; + } + } + $361 = $saved_stack134; + _llvm_stackrestore(($361|0)); + $362 = $loss_count; + $add406 = (($362) + 1)|0; + $363 = $st$addr; + $loss_count407 = ((($363)) + 48|0); + HEAP32[$loss_count407>>2] = $add406; + STACKTOP = sp;return; +} +function _deemphasis($in,$pcm,$N,$C,$downsample,$coef,$mem,$accum) { + $in = $in|0; + $pcm = $pcm|0; + $N = $N|0; + $C = $C|0; + $downsample = $downsample|0; + $coef = $coef|0; + $mem = $mem|0; + $accum = $accum|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, $C$addr = 0, $N$addr = 0, $Nd = 0, $accum$addr = 0, $add = 0.0; + var $add$ptr = 0, $add12 = 0.0, $add13 = 0.0, $add5 = 0.0, $apply_downsampling = 0, $arrayidx1 = 0, $arrayidx11 = 0, $arrayidx17 = 0, $arrayidx2 = 0, $arrayidx21 = 0, $arrayidx27 = 0, $arrayidx30 = 0, $arrayidx4 = 0, $arrayidx6 = 0, $c = 0, $cmp = 0, $cmp24 = 0, $cmp3 = 0, $cmp36 = 0, $cmp8 = 0; + var $coef$addr = 0, $coef0 = 0.0, $div = 0, $downsample$addr = 0, $in$addr = 0, $inc = 0, $inc19 = 0, $inc32 = 0, $inc35 = 0, $j = 0, $m = 0.0, $mem$addr = 0, $mul = 0.0, $mul14 = 0.0, $mul15 = 0.0, $mul16 = 0, $mul26 = 0, $mul28 = 0.0, $mul29 = 0, $pcm$addr = 0; + var $saved_stack = 0, $tmp = 0.0, $tmp10 = 0.0, $tobool = 0, $vla = 0, $vla$alloca_mul = 0, $x = 0, $y = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); + $in$addr = $in; + $pcm$addr = $pcm; + $N$addr = $N; + $C$addr = $C; + $downsample$addr = $downsample; + $coef$addr = $coef; + $mem$addr = $mem; + $accum$addr = $accum; + $apply_downsampling = 0; + $0 = $N$addr; + $1 = (_llvm_stacksave()|0); + $saved_stack = $1; + $vla$alloca_mul = $0<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $2 = $coef$addr; + $3 = +HEAPF32[$2>>2]; + $coef0 = $3; + $4 = $N$addr; + $5 = $downsample$addr; + $div = (($4|0) / ($5|0))&-1; + $Nd = $div; + $c = 0; + while(1) { + $6 = $mem$addr; + $7 = $c; + $arrayidx1 = (($6) + ($7<<2)|0); + $8 = +HEAPF32[$arrayidx1>>2]; + $m = $8; + $9 = $in$addr; + $10 = $c; + $arrayidx2 = (($9) + ($10<<2)|0); + $11 = HEAP32[$arrayidx2>>2]|0; + $x = $11; + $12 = $pcm$addr; + $13 = $c; + $add$ptr = (($12) + ($13<<2)|0); + $y = $add$ptr; + $14 = $downsample$addr; + $cmp = ($14|0)>(1); + $j = 0; + L3: do { + if ($cmp) { + while(1) { + $15 = $j; + $16 = $N$addr; + $cmp3 = ($15|0)<($16|0); + if (!($cmp3)) { + break; + } + $17 = $x; + $18 = $j; + $arrayidx4 = (($17) + ($18<<2)|0); + $19 = +HEAPF32[$arrayidx4>>2]; + $20 = $m; + $add = $19 + $20; + $add5 = $add + 1.0000000031710769E-30; + $tmp = $add5; + $21 = $coef0; + $22 = $tmp; + $mul = $21 * $22; + $m = $mul; + $23 = $tmp; + $24 = $j; + $arrayidx6 = (($vla) + ($24<<2)|0); + HEAPF32[$arrayidx6>>2] = $23; + $25 = $j; + $inc = (($25) + 1)|0; + $j = $inc; + } + $apply_downsampling = 1; + } else { + while(1) { + $26 = $j; + $27 = $N$addr; + $cmp8 = ($26|0)<($27|0); + if (!($cmp8)) { + break L3; + } + $28 = $x; + $29 = $j; + $arrayidx11 = (($28) + ($29<<2)|0); + $30 = +HEAPF32[$arrayidx11>>2]; + $31 = $m; + $add12 = $30 + $31; + $add13 = $add12 + 1.0000000031710769E-30; + $tmp10 = $add13; + $32 = $coef0; + $33 = $tmp10; + $mul14 = $32 * $33; + $m = $mul14; + $34 = $tmp10; + $mul15 = $34 * 3.0517578125E-5; + $35 = $y; + $36 = $j; + $37 = $C$addr; + $mul16 = Math_imul($36, $37)|0; + $arrayidx17 = (($35) + ($mul16<<2)|0); + HEAPF32[$arrayidx17>>2] = $mul15; + $38 = $j; + $inc19 = (($38) + 1)|0; + $j = $inc19; + } + } + } while(0); + $39 = $m; + $40 = $mem$addr; + $41 = $c; + $arrayidx21 = (($40) + ($41<<2)|0); + HEAPF32[$arrayidx21>>2] = $39; + $42 = $apply_downsampling; + $tobool = ($42|0)!=(0); + L12: do { + if ($tobool) { + $j = 0; + while(1) { + $43 = $j; + $44 = $Nd; + $cmp24 = ($43|0)<($44|0); + if (!($cmp24)) { + break L12; + } + $45 = $j; + $46 = $downsample$addr; + $mul26 = Math_imul($45, $46)|0; + $arrayidx27 = (($vla) + ($mul26<<2)|0); + $47 = +HEAPF32[$arrayidx27>>2]; + $mul28 = $47 * 3.0517578125E-5; + $48 = $y; + $49 = $j; + $50 = $C$addr; + $mul29 = Math_imul($49, $50)|0; + $arrayidx30 = (($48) + ($mul29<<2)|0); + HEAPF32[$arrayidx30>>2] = $mul28; + $51 = $j; + $inc32 = (($51) + 1)|0; + $j = $inc32; + } + } + } while(0); + $52 = $c; + $inc35 = (($52) + 1)|0; + $c = $inc35; + $53 = $C$addr; + $cmp36 = ($inc35|0)<($53|0); + if (!($cmp36)) { + break; + } + } + $54 = $saved_stack; + _llvm_stackrestore(($54|0)); + STACKTOP = sp;return; +} +function _ec_tell_53($_this) { + $_this = $_this|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $_this$addr = 0, $nbits_total = 0, $rng = 0, $sub = 0, $sub1 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $0 = $_this$addr; + $nbits_total = ((($0)) + 20|0); + $1 = HEAP32[$nbits_total>>2]|0; + $2 = $_this$addr; + $rng = ((($2)) + 28|0); + $3 = HEAP32[$rng>>2]|0; + $4 = (Math_clz32(($3|0))|0); + $sub = (32 - ($4))|0; + $sub1 = (($1) - ($sub))|0; + STACKTOP = sp;return ($sub1|0); +} +function _tf_decode($start,$end,$isTransient,$tf_res,$LM,$dec) { + $start = $start|0; + $end = $end|0; + $isTransient = $isTransient|0; + $tf_res = $tf_res|0; + $LM = $LM|0; + $dec = $dec|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $LM$addr = 0, $add = 0, $add1 = 0, $add13 = 0, $add14 = 0, $add18 = 0, $add19 = 0, $add34 = 0, $add36 = 0; + var $add4 = 0, $arrayidx = 0, $arrayidx11 = 0, $arrayidx15 = 0, $arrayidx16 = 0, $arrayidx20 = 0, $arrayidx31 = 0, $arrayidx35 = 0, $arrayidx37 = 0, $arrayidx39 = 0, $budget = 0, $call = 0, $call25 = 0, $call6 = 0, $call7 = 0, $cmp = 0, $cmp2 = 0, $cmp22 = 0, $cmp28 = 0, $cmp3 = 0; + var $cmp5 = 0, $cond = 0, $cond9 = 0, $conv = 0, $conv21 = 0, $conv38 = 0, $curr = 0, $dec$addr = 0, $end$addr = 0, $i = 0, $inc = 0, $inc41 = 0, $isTransient$addr = 0, $land$ext = 0, $logp = 0, $mul = 0, $mul12 = 0, $mul17 = 0, $mul32 = 0, $mul33 = 0; + var $or = 0, $start$addr = 0, $storage = 0, $sub = 0, $tell = 0, $tf_changed = 0, $tf_res$addr = 0, $tf_select = 0, $tf_select_rsv = 0, $tobool = 0, $tobool10 = 0, $tobool8 = 0, $xor = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $start$addr = $start; + $end$addr = $end; + $isTransient$addr = $isTransient; + $tf_res$addr = $tf_res; + $LM$addr = $LM; + $dec$addr = $dec; + $0 = $dec$addr; + $storage = ((($0)) + 4|0); + $1 = HEAP32[$storage>>2]|0; + $mul = $1<<3; + $budget = $mul; + $2 = $dec$addr; + $call = (_ec_tell_53($2)|0); + $tell = $call; + $3 = $isTransient$addr; + $tobool = ($3|0)!=(0); + $cond = $tobool ? 2 : 4; + $logp = $cond; + $4 = $LM$addr; + $cmp = ($4|0)>(0); + if ($cmp) { + $5 = $tell; + $6 = $logp; + $add = (($5) + ($6))|0; + $add1 = (($add) + 1)|0; + $7 = $budget; + $cmp2 = ($add1>>>0)<=($7>>>0); + $8 = $cmp2; + } else { + $8 = 0; + } + $land$ext = $8&1; + $tf_select_rsv = $land$ext; + $9 = $tf_select_rsv; + $10 = $budget; + $sub = (($10) - ($9))|0; + $budget = $sub; + $curr = 0; + $tf_changed = 0; + $11 = $start$addr; + $i = $11; + while(1) { + $12 = $i; + $13 = $end$addr; + $cmp3 = ($12|0)<($13|0); + if (!($cmp3)) { + break; + } + $14 = $tell; + $15 = $logp; + $add4 = (($14) + ($15))|0; + $16 = $budget; + $cmp5 = ($add4>>>0)<=($16>>>0); + if ($cmp5) { + $17 = $dec$addr; + $18 = $logp; + $call6 = (_ec_dec_bit_logp($17,$18)|0); + $19 = $curr; + $xor = $19 ^ $call6; + $curr = $xor; + $20 = $dec$addr; + $call7 = (_ec_tell_53($20)|0); + $tell = $call7; + $21 = $curr; + $22 = $tf_changed; + $or = $22 | $21; + $tf_changed = $or; + } + $23 = $curr; + $24 = $tf_res$addr; + $25 = $i; + $arrayidx = (($24) + ($25<<2)|0); + HEAP32[$arrayidx>>2] = $23; + $26 = $isTransient$addr; + $tobool8 = ($26|0)!=(0); + $cond9 = $tobool8 ? 4 : 5; + $logp = $cond9; + $27 = $i; + $inc = (($27) + 1)|0; + $i = $inc; + } + $tf_select = 0; + $28 = $tf_select_rsv; + $tobool10 = ($28|0)!=(0); + if ($tobool10) { + $29 = $LM$addr; + $arrayidx11 = (23725 + ($29<<3)|0); + $30 = $isTransient$addr; + $mul12 = $30<<2; + $add13 = (($mul12) + 0)|0; + $31 = $tf_changed; + $add14 = (($add13) + ($31))|0; + $arrayidx15 = (($arrayidx11) + ($add14)|0); + $32 = HEAP8[$arrayidx15>>0]|0; + $conv = $32 << 24 >> 24; + $33 = $LM$addr; + $arrayidx16 = (23725 + ($33<<3)|0); + $34 = $isTransient$addr; + $mul17 = $34<<2; + $add18 = (($mul17) + 2)|0; + $35 = $tf_changed; + $add19 = (($add18) + ($35))|0; + $arrayidx20 = (($arrayidx16) + ($add19)|0); + $36 = HEAP8[$arrayidx20>>0]|0; + $conv21 = $36 << 24 >> 24; + $cmp22 = ($conv|0)!=($conv21|0); + if ($cmp22) { + $37 = $dec$addr; + $call25 = (_ec_dec_bit_logp($37,1)|0); + $tf_select = $call25; + } + } + $38 = $start$addr; + $i = $38; + while(1) { + $39 = $i; + $40 = $end$addr; + $cmp28 = ($39|0)<($40|0); + if (!($cmp28)) { + break; + } + $41 = $LM$addr; + $arrayidx31 = (23725 + ($41<<3)|0); + $42 = $isTransient$addr; + $mul32 = $42<<2; + $43 = $tf_select; + $mul33 = $43<<1; + $add34 = (($mul32) + ($mul33))|0; + $44 = $tf_res$addr; + $45 = $i; + $arrayidx35 = (($44) + ($45<<2)|0); + $46 = HEAP32[$arrayidx35>>2]|0; + $add36 = (($add34) + ($46))|0; + $arrayidx37 = (($arrayidx31) + ($add36)|0); + $47 = HEAP8[$arrayidx37>>0]|0; + $conv38 = $47 << 24 >> 24; + $48 = $tf_res$addr; + $49 = $i; + $arrayidx39 = (($48) + ($49<<2)|0); + HEAP32[$arrayidx39>>2] = $conv38; + $50 = $i; + $inc41 = (($50) + 1)|0; + $i = $inc41; + } + STACKTOP = sp;return; +} +function _celt_synthesis($mode,$X,$out_syn,$oldBandE,$start,$effEnd,$C,$CC,$isTransient,$LM,$downsample,$silence,$arch) { + $mode = $mode|0; + $X = $X|0; + $out_syn = $out_syn|0; + $oldBandE = $oldBandE|0; + $start = $start|0; + $effEnd = $effEnd|0; + $C = $C|0; + $CC = $CC|0; + $isTransient = $isTransient|0; + $LM = $LM|0; + $downsample = $downsample|0; + $silence = $silence|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; + var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; + var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0; + var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0; + var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0; + var $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0.0, $97 = 0, $98 = 0, $99 = 0.0, $B = 0, $C$addr = 0, $CC$addr = 0, $LM$addr = 0, $M = 0, $N = 0, $NB = 0, $X$addr = 0, $add = 0, $add$ptr = 0, $add$ptr15 = 0, $add$ptr23 = 0; + var $add$ptr36 = 0, $add$ptr37 = 0, $add$ptr38 = 0, $add$ptr57 = 0, $add$ptr64 = 0, $add$ptr66 = 0, $add$ptr74 = 0, $add44 = 0.0, $arch$addr = 0, $arrayidx = 0, $arrayidx12 = 0, $arrayidx20 = 0, $arrayidx21 = 0, $arrayidx42 = 0, $arrayidx43 = 0, $arrayidx46 = 0, $arrayidx54 = 0, $arrayidx71 = 0, $arrayidx72 = 0, $b = 0; + var $c = 0, $cmp = 0, $cmp11 = 0, $cmp17 = 0, $cmp29 = 0, $cmp31 = 0, $cmp40 = 0, $cmp51 = 0, $cmp68 = 0, $cmp8 = 0, $cmp80 = 0, $div = 0, $div35 = 0, $downsample$addr = 0, $effEnd$addr = 0, $freq2 = 0, $freq233 = 0, $i = 0, $inc = 0, $inc26 = 0; + var $inc48 = 0, $inc60 = 0, $inc77 = 0, $inc79 = 0, $isTransient$addr = 0, $maxLM = 0, $maxLM7 = 0, $mdct = 0, $mdct19 = 0, $mdct53 = 0, $mdct70 = 0, $mode$addr = 0, $mul = 0, $mul10 = 0, $mul14 = 0, $mul22 = 0, $mul45 = 0.0, $mul56 = 0, $mul63 = 0, $mul65 = 0; + var $mul73 = 0, $nbEBands = 0, $nbEBands2 = 0, $oldBandE$addr = 0, $or$cond = 0, $or$cond1 = 0, $out_syn$addr = 0, $overlap = 0, $overlap1 = 0, $saved_stack = 0, $shift = 0, $shl = 0, $shl3 = 0, $shl6 = 0, $shortMdctSize = 0, $shortMdctSize4 = 0, $shortMdctSize5 = 0, $silence$addr = 0, $start$addr = 0, $sub = 0; + var $sub$ptr$div = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0, $tobool = 0, $vla = 0, $vla$alloca_mul = 0, $window = 0, $window24 = 0, $window58 = 0, $window75 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $mode$addr = $mode; + $X$addr = $X; + $out_syn$addr = $out_syn; + $oldBandE$addr = $oldBandE; + $start$addr = $start; + $effEnd$addr = $effEnd; + $C$addr = $C; + $CC$addr = $CC; + $isTransient$addr = $isTransient; + $LM$addr = $LM; + $downsample$addr = $downsample; + $silence$addr = $silence; + $arch$addr = $arch; + $0 = $mode$addr; + $overlap1 = ((($0)) + 4|0); + $1 = HEAP32[$overlap1>>2]|0; + $overlap = $1; + $2 = $mode$addr; + $nbEBands2 = ((($2)) + 8|0); + $3 = HEAP32[$nbEBands2>>2]|0; + $nbEBands = $3; + $4 = $mode$addr; + $shortMdctSize = ((($4)) + 44|0); + $5 = HEAP32[$shortMdctSize>>2]|0; + $6 = $LM$addr; + $shl = $5 << $6; + $N = $shl; + $7 = $N; + $8 = (_llvm_stacksave()|0); + $saved_stack = $8; + $vla$alloca_mul = $7<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $9 = $LM$addr; + $shl3 = 1 << $9; + $M = $shl3; + $10 = $isTransient$addr; + $tobool = ($10|0)!=(0); + if ($tobool) { + $11 = $M; + $B = $11; + $12 = $mode$addr; + $shortMdctSize4 = ((($12)) + 44|0); + $13 = HEAP32[$shortMdctSize4>>2]|0; + $NB = $13; + $14 = $mode$addr; + $maxLM = ((($14)) + 36|0); + $15 = HEAP32[$maxLM>>2]|0; + $shift = $15; + } else { + $B = 1; + $16 = $mode$addr; + $shortMdctSize5 = ((($16)) + 44|0); + $17 = HEAP32[$shortMdctSize5>>2]|0; + $18 = $LM$addr; + $shl6 = $17 << $18; + $NB = $shl6; + $19 = $mode$addr; + $maxLM7 = ((($19)) + 36|0); + $20 = HEAP32[$maxLM7>>2]|0; + $21 = $LM$addr; + $sub = (($20) - ($21))|0; + $shift = $sub; + } + $22 = $CC$addr; + $cmp = ($22|0)==(2); + $23 = $C$addr; + $cmp8 = ($23|0)==(1); + $or$cond = $cmp & $cmp8; + if ($or$cond) { + $24 = $mode$addr; + $25 = $X$addr; + $26 = $oldBandE$addr; + $27 = $start$addr; + $28 = $effEnd$addr; + $29 = $M; + $30 = $downsample$addr; + $31 = $silence$addr; + _denormalise_bands($24,$25,$vla,$26,$27,$28,$29,$30,$31); + $32 = $out_syn$addr; + $arrayidx = ((($32)) + 4|0); + $33 = HEAP32[$arrayidx>>2]|0; + $34 = $overlap; + $div = (($34|0) / 2)&-1; + $add$ptr = (($33) + ($div<<2)|0); + $freq2 = $add$ptr; + $35 = $freq2; + $36 = $N; + $mul = $36<<2; + $37 = $freq2; + $sub$ptr$lhs$cast = $37; + $sub$ptr$rhs$cast = $vla; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $mul10 = 0; + $add = (($mul) + ($mul10))|0; + _memcpy(($35|0),($vla|0),($add|0))|0; + $b = 0; + while(1) { + $38 = $b; + $39 = $B; + $cmp11 = ($38|0)<($39|0); + if (!($cmp11)) { + break; + } + $40 = $mode$addr; + $mdct = ((($40)) + 64|0); + $41 = $freq2; + $42 = $b; + $arrayidx12 = (($41) + ($42<<2)|0); + $43 = $out_syn$addr; + $44 = HEAP32[$43>>2]|0; + $45 = $NB; + $46 = $b; + $mul14 = Math_imul($45, $46)|0; + $add$ptr15 = (($44) + ($mul14<<2)|0); + $47 = $mode$addr; + $window = ((($47)) + 60|0); + $48 = HEAP32[$window>>2]|0; + $49 = $overlap; + $50 = $shift; + $51 = $B; + $52 = $arch$addr; + _clt_mdct_backward_c($mdct,$arrayidx12,$add$ptr15,$48,$49,$50,$51,$52); + $53 = $b; + $inc = (($53) + 1)|0; + $b = $inc; + } + $b = 0; + while(1) { + $54 = $b; + $55 = $B; + $cmp17 = ($54|0)<($55|0); + if (!($cmp17)) { + break; + } + $56 = $mode$addr; + $mdct19 = ((($56)) + 64|0); + $57 = $b; + $arrayidx20 = (($vla) + ($57<<2)|0); + $58 = $out_syn$addr; + $arrayidx21 = ((($58)) + 4|0); + $59 = HEAP32[$arrayidx21>>2]|0; + $60 = $NB; + $61 = $b; + $mul22 = Math_imul($60, $61)|0; + $add$ptr23 = (($59) + ($mul22<<2)|0); + $62 = $mode$addr; + $window24 = ((($62)) + 60|0); + $63 = HEAP32[$window24>>2]|0; + $64 = $overlap; + $65 = $shift; + $66 = $B; + $67 = $arch$addr; + _clt_mdct_backward_c($mdct19,$arrayidx20,$add$ptr23,$63,$64,$65,$66,$67); + $68 = $b; + $inc26 = (($68) + 1)|0; + $b = $inc26; + } + $147 = $saved_stack; + _llvm_stackrestore(($147|0)); + STACKTOP = sp;return; + } + $69 = $CC$addr; + $cmp29 = ($69|0)==(1); + $70 = $C$addr; + $cmp31 = ($70|0)==(2); + $or$cond1 = $cmp29 & $cmp31; + if (!($or$cond1)) { + $c = 0; + while(1) { + $117 = $mode$addr; + $118 = $X$addr; + $119 = $c; + $120 = $N; + $mul63 = Math_imul($119, $120)|0; + $add$ptr64 = (($118) + ($mul63<<2)|0); + $121 = $oldBandE$addr; + $122 = $c; + $123 = $nbEBands; + $mul65 = Math_imul($122, $123)|0; + $add$ptr66 = (($121) + ($mul65<<2)|0); + $124 = $start$addr; + $125 = $effEnd$addr; + $126 = $M; + $127 = $downsample$addr; + $128 = $silence$addr; + _denormalise_bands($117,$add$ptr64,$vla,$add$ptr66,$124,$125,$126,$127,$128); + $b = 0; + while(1) { + $129 = $b; + $130 = $B; + $cmp68 = ($129|0)<($130|0); + if (!($cmp68)) { + break; + } + $131 = $mode$addr; + $mdct70 = ((($131)) + 64|0); + $132 = $b; + $arrayidx71 = (($vla) + ($132<<2)|0); + $133 = $out_syn$addr; + $134 = $c; + $arrayidx72 = (($133) + ($134<<2)|0); + $135 = HEAP32[$arrayidx72>>2]|0; + $136 = $NB; + $137 = $b; + $mul73 = Math_imul($136, $137)|0; + $add$ptr74 = (($135) + ($mul73<<2)|0); + $138 = $mode$addr; + $window75 = ((($138)) + 60|0); + $139 = HEAP32[$window75>>2]|0; + $140 = $overlap; + $141 = $shift; + $142 = $B; + $143 = $arch$addr; + _clt_mdct_backward_c($mdct70,$arrayidx71,$add$ptr74,$139,$140,$141,$142,$143); + $144 = $b; + $inc77 = (($144) + 1)|0; + $b = $inc77; + } + $145 = $c; + $inc79 = (($145) + 1)|0; + $c = $inc79; + $146 = $CC$addr; + $cmp80 = ($inc79|0)<($146|0); + if (!($cmp80)) { + break; + } + } + $147 = $saved_stack; + _llvm_stackrestore(($147|0)); + STACKTOP = sp;return; + } + $71 = $out_syn$addr; + $72 = HEAP32[$71>>2]|0; + $73 = $overlap; + $div35 = (($73|0) / 2)&-1; + $add$ptr36 = (($72) + ($div35<<2)|0); + $freq233 = $add$ptr36; + $74 = $mode$addr; + $75 = $X$addr; + $76 = $oldBandE$addr; + $77 = $start$addr; + $78 = $effEnd$addr; + $79 = $M; + $80 = $downsample$addr; + $81 = $silence$addr; + _denormalise_bands($74,$75,$vla,$76,$77,$78,$79,$80,$81); + $82 = $mode$addr; + $83 = $X$addr; + $84 = $N; + $add$ptr37 = (($83) + ($84<<2)|0); + $85 = $freq233; + $86 = $oldBandE$addr; + $87 = $nbEBands; + $add$ptr38 = (($86) + ($87<<2)|0); + $88 = $start$addr; + $89 = $effEnd$addr; + $90 = $M; + $91 = $downsample$addr; + $92 = $silence$addr; + _denormalise_bands($82,$add$ptr37,$85,$add$ptr38,$88,$89,$90,$91,$92); + $i = 0; + while(1) { + $93 = $i; + $94 = $N; + $cmp40 = ($93|0)<($94|0); + if (!($cmp40)) { + break; + } + $95 = $i; + $arrayidx42 = (($vla) + ($95<<2)|0); + $96 = +HEAPF32[$arrayidx42>>2]; + $97 = $freq233; + $98 = $i; + $arrayidx43 = (($97) + ($98<<2)|0); + $99 = +HEAPF32[$arrayidx43>>2]; + $add44 = $96 + $99; + $mul45 = 0.5 * $add44; + $100 = $i; + $arrayidx46 = (($vla) + ($100<<2)|0); + HEAPF32[$arrayidx46>>2] = $mul45; + $101 = $i; + $inc48 = (($101) + 1)|0; + $i = $inc48; + } + $b = 0; + while(1) { + $102 = $b; + $103 = $B; + $cmp51 = ($102|0)<($103|0); + if (!($cmp51)) { + break; + } + $104 = $mode$addr; + $mdct53 = ((($104)) + 64|0); + $105 = $b; + $arrayidx54 = (($vla) + ($105<<2)|0); + $106 = $out_syn$addr; + $107 = HEAP32[$106>>2]|0; + $108 = $NB; + $109 = $b; + $mul56 = Math_imul($108, $109)|0; + $add$ptr57 = (($107) + ($mul56<<2)|0); + $110 = $mode$addr; + $window58 = ((($110)) + 60|0); + $111 = HEAP32[$window58>>2]|0; + $112 = $overlap; + $113 = $shift; + $114 = $B; + $115 = $arch$addr; + _clt_mdct_backward_c($mdct53,$arrayidx54,$add$ptr57,$111,$112,$113,$114,$115); + $116 = $b; + $inc60 = (($116) + 1)|0; + $b = $inc60; + } + $147 = $saved_stack; + _llvm_stackrestore(($147|0)); + STACKTOP = sp;return; +} +function _ec_get_error_57($_this) { + $_this = $_this|0; + var $0 = 0, $1 = 0, $_this$addr = 0, $error = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $0 = $_this$addr; + $error = ((($0)) + 44|0); + $1 = HEAP32[$error>>2]|0; + STACKTOP = sp;return ($1|0); +} +function _celt_plc_pitch_search($decode_mem,$C,$arch) { + $decode_mem = $decode_mem|0; + $C = $C|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $C$addr = 0, $add$ptr = 0, $arch$addr = 0, $decode_mem$addr = 0, $lp_pitch_buf = 0, $pitch_index = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 4112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(4112|0); + $pitch_index = sp + 4096|0; + $lp_pitch_buf = sp; + $decode_mem$addr = $decode_mem; + $C$addr = $C; + $arch$addr = $arch; + $0 = $decode_mem$addr; + $1 = $C$addr; + $2 = $arch$addr; + _pitch_downsample($0,$lp_pitch_buf,2048,$1,$2); + $add$ptr = ((($lp_pitch_buf)) + 1440|0); + $3 = $arch$addr; + _pitch_search($add$ptr,$lp_pitch_buf,1328,620,$pitch_index,$3); + $4 = HEAP32[$pitch_index>>2]|0; + $sub = (720 - ($4))|0; + HEAP32[$pitch_index>>2] = $sub; + $5 = HEAP32[$pitch_index>>2]|0; + STACKTOP = sp;return ($5|0); +} +function _ec_tell_frac($_this) { + $_this = $_this|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_this$addr = 0, $add = 0, $add6 = 0; + var $arrayidx = 0, $b = 0, $cmp = 0, $conv = 0, $l = 0, $nbits = 0, $nbits_total = 0, $r = 0, $rng = 0, $rng1 = 0, $shl = 0, $shl5 = 0, $shr = 0, $shr3 = 0, $sub = 0, $sub2 = 0, $sub4 = 0, $sub7 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_this$addr = $_this; + $0 = $_this$addr; + $nbits_total = ((($0)) + 20|0); + $1 = HEAP32[$nbits_total>>2]|0; + $shl = $1 << 3; + $nbits = $shl; + $2 = $_this$addr; + $rng = ((($2)) + 28|0); + $3 = HEAP32[$rng>>2]|0; + $4 = (Math_clz32(($3|0))|0); + $sub = (32 - ($4))|0; + $l = $sub; + $5 = $_this$addr; + $rng1 = ((($5)) + 28|0); + $6 = HEAP32[$rng1>>2]|0; + $7 = $l; + $sub2 = (($7) - 16)|0; + $shr = $6 >>> $sub2; + $r = $shr; + $8 = $r; + $shr3 = $8 >>> 12; + $sub4 = (($shr3) - 8)|0; + $b = $sub4; + $9 = $r; + $10 = $b; + $arrayidx = (152 + ($10<<2)|0); + $11 = HEAP32[$arrayidx>>2]|0; + $cmp = ($9>>>0)>($11>>>0); + $conv = $cmp&1; + $12 = $b; + $add = (($12) + ($conv))|0; + $b = $add; + $13 = $l; + $shl5 = $13 << 3; + $14 = $b; + $add6 = (($shl5) + ($14))|0; + $l = $add6; + $15 = $nbits; + $16 = $l; + $sub7 = (($15) - ($16))|0; + STACKTOP = sp;return ($sub7|0); +} +function _ec_dec_init($_this,$_buf,$_storage) { + $_this = $_this|0; + $_buf = $_buf|0; + $_storage = $_storage|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_buf$addr = 0; + var $_storage$addr = 0, $_this$addr = 0, $call = 0, $end_offs = 0, $end_window = 0, $error = 0, $nbits_total = 0, $nend_bits = 0, $offs = 0, $rem = 0, $rem2 = 0, $rng = 0, $rng1 = 0, $shr = 0, $storage = 0, $sub = 0, $sub3 = 0, $val = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $_buf$addr = $_buf; + $_storage$addr = $_storage; + $0 = $_buf$addr; + $1 = $_this$addr; + HEAP32[$1>>2] = $0; + $2 = $_storage$addr; + $3 = $_this$addr; + $storage = ((($3)) + 4|0); + HEAP32[$storage>>2] = $2; + $4 = $_this$addr; + $end_offs = ((($4)) + 8|0); + HEAP32[$end_offs>>2] = 0; + $5 = $_this$addr; + $end_window = ((($5)) + 12|0); + HEAP32[$end_window>>2] = 0; + $6 = $_this$addr; + $nend_bits = ((($6)) + 16|0); + HEAP32[$nend_bits>>2] = 0; + $7 = $_this$addr; + $nbits_total = ((($7)) + 20|0); + HEAP32[$nbits_total>>2] = 9; + $8 = $_this$addr; + $offs = ((($8)) + 24|0); + HEAP32[$offs>>2] = 0; + $9 = $_this$addr; + $rng = ((($9)) + 28|0); + HEAP32[$rng>>2] = 128; + $10 = $_this$addr; + $call = (_ec_read_byte($10)|0); + $11 = $_this$addr; + $rem = ((($11)) + 40|0); + HEAP32[$rem>>2] = $call; + $12 = $_this$addr; + $rng1 = ((($12)) + 28|0); + $13 = HEAP32[$rng1>>2]|0; + $sub = (($13) - 1)|0; + $14 = $_this$addr; + $rem2 = ((($14)) + 40|0); + $15 = HEAP32[$rem2>>2]|0; + $shr = $15 >> 1; + $sub3 = (($sub) - ($shr))|0; + $16 = $_this$addr; + $val = ((($16)) + 32|0); + HEAP32[$val>>2] = $sub3; + $17 = $_this$addr; + $error = ((($17)) + 44|0); + HEAP32[$error>>2] = 0; + $18 = $_this$addr; + _ec_dec_normalize($18); + STACKTOP = sp;return; +} +function _ec_read_byte($_this) { + $_this = $_this|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $_this$addr = 0, $arrayidx = 0, $cmp = 0, $cond = 0, $conv = 0, $inc = 0, $offs = 0, $offs1 = 0, $storage = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $0 = $_this$addr; + $offs = ((($0)) + 24|0); + $1 = HEAP32[$offs>>2]|0; + $2 = $_this$addr; + $storage = ((($2)) + 4|0); + $3 = HEAP32[$storage>>2]|0; + $cmp = ($1>>>0)<($3>>>0); + if (!($cmp)) { + $cond = 0; + STACKTOP = sp;return ($cond|0); + } + $4 = $_this$addr; + $5 = HEAP32[$4>>2]|0; + $6 = $_this$addr; + $offs1 = ((($6)) + 24|0); + $7 = HEAP32[$offs1>>2]|0; + $inc = (($7) + 1)|0; + HEAP32[$offs1>>2] = $inc; + $arrayidx = (($5) + ($7)|0); + $8 = HEAP8[$arrayidx>>0]|0; + $conv = $8&255; + $cond = $conv; + STACKTOP = sp;return ($cond|0); +} +function _ec_dec_normalize($_this) { + $_this = $_this|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_this$addr = 0, $add = 0, $add6 = 0; + var $and = 0, $and7 = 0, $call = 0, $cmp = 0, $nbits_total = 0, $neg = 0, $or = 0, $rem = 0, $rem2 = 0, $rem4 = 0, $rng = 0, $rng1 = 0, $shl = 0, $shl3 = 0, $shl5 = 0, $shr = 0, $sym = 0, $val = 0, $val8 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + while(1) { + $0 = $_this$addr; + $rng = ((($0)) + 28|0); + $1 = HEAP32[$rng>>2]|0; + $cmp = ($1>>>0)<=(8388608); + if (!($cmp)) { + break; + } + $2 = $_this$addr; + $nbits_total = ((($2)) + 20|0); + $3 = HEAP32[$nbits_total>>2]|0; + $add = (($3) + 8)|0; + HEAP32[$nbits_total>>2] = $add; + $4 = $_this$addr; + $rng1 = ((($4)) + 28|0); + $5 = HEAP32[$rng1>>2]|0; + $shl = $5 << 8; + HEAP32[$rng1>>2] = $shl; + $6 = $_this$addr; + $rem = ((($6)) + 40|0); + $7 = HEAP32[$rem>>2]|0; + $sym = $7; + $8 = $_this$addr; + $call = (_ec_read_byte($8)|0); + $9 = $_this$addr; + $rem2 = ((($9)) + 40|0); + HEAP32[$rem2>>2] = $call; + $10 = $sym; + $shl3 = $10 << 8; + $11 = $_this$addr; + $rem4 = ((($11)) + 40|0); + $12 = HEAP32[$rem4>>2]|0; + $or = $shl3 | $12; + $shr = $or >> 1; + $sym = $shr; + $13 = $_this$addr; + $val = ((($13)) + 32|0); + $14 = HEAP32[$val>>2]|0; + $shl5 = $14 << 8; + $15 = $sym; + $neg = $15 ^ -1; + $and = 255 & $neg; + $add6 = (($shl5) + ($and))|0; + $and7 = $add6 & 2147483647; + $16 = $_this$addr; + $val8 = ((($16)) + 32|0); + HEAP32[$val8>>2] = $and7; + } + STACKTOP = sp;return; +} +function _ec_decode($_this,$_ft) { + $_this = $_this|0; + $_ft = $_ft|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_ft$addr = 0, $_this$addr = 0, $add = 0, $add2 = 0, $add3 = 0, $add5 = 0; + var $and = 0, $call = 0, $cmp = 0, $conv = 0, $div = 0, $ext = 0, $ext1 = 0, $rng = 0, $s = 0, $sub = 0, $sub4 = 0, $sub6 = 0, $val = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $_ft$addr = $_ft; + $0 = $_this$addr; + $rng = ((($0)) + 28|0); + $1 = HEAP32[$rng>>2]|0; + $2 = $_ft$addr; + $call = (_celt_udiv($1,$2)|0); + $3 = $_this$addr; + $ext = ((($3)) + 36|0); + HEAP32[$ext>>2] = $call; + $4 = $_this$addr; + $val = ((($4)) + 32|0); + $5 = HEAP32[$val>>2]|0; + $6 = $_this$addr; + $ext1 = ((($6)) + 36|0); + $7 = HEAP32[$ext1>>2]|0; + $div = (($5>>>0) / ($7>>>0))&-1; + $s = $div; + $8 = $_ft$addr; + $9 = $s; + $add = (($9) + 1)|0; + $10 = $_ft$addr; + $11 = $s; + $add2 = (($11) + 1)|0; + $sub = (($10) - ($add2))|0; + $12 = $_ft$addr; + $13 = $s; + $add3 = (($13) + 1)|0; + $cmp = ($12>>>0)<($add3>>>0); + $conv = $cmp&1; + $sub4 = (0 - ($conv))|0; + $and = $sub & $sub4; + $add5 = (($add) + ($and))|0; + $sub6 = (($8) - ($add5))|0; + STACKTOP = sp;return ($sub6|0); +} +function _celt_udiv($n,$d) { + $n = $n|0; + $d = $d|0; + var $0 = 0, $1 = 0, $d$addr = 0, $div = 0, $n$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $n$addr = $n; + $d$addr = $d; + $0 = $n$addr; + $1 = $d$addr; + $div = (($0>>>0) / ($1>>>0))&-1; + STACKTOP = sp;return ($div|0); +} +function _ec_decode_bin($_this,$_bits) { + $_this = $_this|0; + $_bits = $_bits|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_bits$addr = 0, $_this$addr = 0, $add = 0, $add3 = 0, $add5 = 0, $add7 = 0; + var $and = 0, $cmp = 0, $conv = 0, $div = 0, $ext = 0, $ext1 = 0, $rng = 0, $s = 0, $shl = 0, $shl2 = 0, $shl4 = 0, $shr = 0, $sub = 0, $sub6 = 0, $sub8 = 0, $val = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $_bits$addr = $_bits; + $0 = $_this$addr; + $rng = ((($0)) + 28|0); + $1 = HEAP32[$rng>>2]|0; + $2 = $_bits$addr; + $shr = $1 >>> $2; + $3 = $_this$addr; + $ext = ((($3)) + 36|0); + HEAP32[$ext>>2] = $shr; + $4 = $_this$addr; + $val = ((($4)) + 32|0); + $5 = HEAP32[$val>>2]|0; + $6 = $_this$addr; + $ext1 = ((($6)) + 36|0); + $7 = HEAP32[$ext1>>2]|0; + $div = (($5>>>0) / ($7>>>0))&-1; + $s = $div; + $8 = $_bits$addr; + $shl = 1 << $8; + $9 = $s; + $add = (($9) + 1)|0; + $10 = $_bits$addr; + $shl2 = 1 << $10; + $11 = $s; + $add3 = (($11) + 1)|0; + $sub = (($shl2) - ($add3))|0; + $12 = $_bits$addr; + $shl4 = 1 << $12; + $13 = $s; + $add5 = (($13) + 1)|0; + $cmp = ($shl4>>>0)<($add5>>>0); + $conv = $cmp&1; + $sub6 = (0 - ($conv))|0; + $and = $sub & $sub6; + $add7 = (($add) + ($and))|0; + $sub8 = (($shl) - ($add7))|0; + STACKTOP = sp;return ($sub8|0); +} +function _ec_dec_update($_this,$_fl,$_fh,$_ft) { + $_this = $_this|0; + $_fl = $_fl|0; + $_fh = $_fh|0; + $_ft = $_ft|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_fh$addr = 0, $_fl$addr = 0, $_ft$addr = 0, $_this$addr = 0; + var $cmp = 0, $cond = 0, $ext = 0, $ext2 = 0, $mul = 0, $mul4 = 0, $rng = 0, $rng6 = 0, $s = 0, $sub = 0, $sub1 = 0, $sub3 = 0, $sub5 = 0, $val = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_this$addr = $_this; + $_fl$addr = $_fl; + $_fh$addr = $_fh; + $_ft$addr = $_ft; + $0 = $_this$addr; + $ext = ((($0)) + 36|0); + $1 = HEAP32[$ext>>2]|0; + $2 = $_ft$addr; + $3 = $_fh$addr; + $sub = (($2) - ($3))|0; + $mul = Math_imul($1, $sub)|0; + $s = $mul; + $4 = $s; + $5 = $_this$addr; + $val = ((($5)) + 32|0); + $6 = HEAP32[$val>>2]|0; + $sub1 = (($6) - ($4))|0; + HEAP32[$val>>2] = $sub1; + $7 = $_fl$addr; + $cmp = ($7>>>0)>(0); + $8 = $_this$addr; + if ($cmp) { + $ext2 = ((($8)) + 36|0); + $9 = HEAP32[$ext2>>2]|0; + $10 = $_fh$addr; + $11 = $_fl$addr; + $sub3 = (($10) - ($11))|0; + $mul4 = Math_imul($9, $sub3)|0; + $cond = $mul4; + $14 = $_this$addr; + $rng6 = ((($14)) + 28|0); + HEAP32[$rng6>>2] = $cond; + $15 = $_this$addr; + _ec_dec_normalize($15); + STACKTOP = sp;return; + } else { + $rng = ((($8)) + 28|0); + $12 = HEAP32[$rng>>2]|0; + $13 = $s; + $sub5 = (($12) - ($13))|0; + $cond = $sub5; + $14 = $_this$addr; + $rng6 = ((($14)) + 28|0); + HEAP32[$rng6>>2] = $cond; + $15 = $_this$addr; + _ec_dec_normalize($15); + STACKTOP = sp;return; + } +} +function _ec_dec_bit_logp($_this,$_logp) { + $_this = $_this|0; + $_logp = $_logp|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_logp$addr = 0; + var $_this$addr = 0, $cmp = 0, $cond = 0, $conv = 0, $d = 0, $r = 0, $ret = 0, $rng = 0, $rng4 = 0, $s = 0, $shr = 0, $sub = 0, $sub3 = 0, $tobool = 0, $tobool2 = 0, $val = 0, $val1 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_this$addr = $_this; + $_logp$addr = $_logp; + $0 = $_this$addr; + $rng = ((($0)) + 28|0); + $1 = HEAP32[$rng>>2]|0; + $r = $1; + $2 = $_this$addr; + $val = ((($2)) + 32|0); + $3 = HEAP32[$val>>2]|0; + $d = $3; + $4 = $r; + $5 = $_logp$addr; + $shr = $4 >>> $5; + $s = $shr; + $6 = $d; + $7 = $s; + $cmp = ($6>>>0)<($7>>>0); + $conv = $cmp&1; + $ret = $conv; + $8 = $ret; + $tobool = ($8|0)!=(0); + if (!($tobool)) { + $9 = $d; + $10 = $s; + $sub = (($9) - ($10))|0; + $11 = $_this$addr; + $val1 = ((($11)) + 32|0); + HEAP32[$val1>>2] = $sub; + } + $12 = $ret; + $tobool2 = ($12|0)!=(0); + if ($tobool2) { + $13 = $s; + $cond = $13; + } else { + $14 = $r; + $15 = $s; + $sub3 = (($14) - ($15))|0; + $cond = $sub3; + } + $16 = $_this$addr; + $rng4 = ((($16)) + 28|0); + HEAP32[$rng4>>2] = $cond; + $17 = $_this$addr; + _ec_dec_normalize($17); + $18 = $ret; + STACKTOP = sp;return ($18|0); +} +function _ec_dec_icdf($_this,$_icdf,$_ftb) { + $_this = $_this|0; + $_icdf = $_icdf|0; + $_ftb = $_ftb|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, $_ftb$addr = 0, $_icdf$addr = 0, $_this$addr = 0, $arrayidx = 0, $cmp = 0, $conv = 0, $d = 0, $inc = 0, $mul = 0, $r = 0, $ret = 0, $rng = 0, $rng4 = 0, $s = 0, $shr = 0, $sub = 0, $sub3 = 0, $t = 0, $val = 0; + var $val2 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_this$addr = $_this; + $_icdf$addr = $_icdf; + $_ftb$addr = $_ftb; + $0 = $_this$addr; + $rng = ((($0)) + 28|0); + $1 = HEAP32[$rng>>2]|0; + $s = $1; + $2 = $_this$addr; + $val = ((($2)) + 32|0); + $3 = HEAP32[$val>>2]|0; + $d = $3; + $4 = $s; + $5 = $_ftb$addr; + $shr = $4 >>> $5; + $r = $shr; + $ret = -1; + while(1) { + $6 = $s; + $t = $6; + $7 = $r; + $8 = $_icdf$addr; + $9 = $ret; + $inc = (($9) + 1)|0; + $ret = $inc; + $arrayidx = (($8) + ($inc)|0); + $10 = HEAP8[$arrayidx>>0]|0; + $conv = $10&255; + $mul = Math_imul($7, $conv)|0; + $s = $mul; + $11 = $d; + $12 = $s; + $cmp = ($11>>>0)<($12>>>0); + if (!($cmp)) { + break; + } + } + $13 = $d; + $14 = $s; + $sub = (($13) - ($14))|0; + $15 = $_this$addr; + $val2 = ((($15)) + 32|0); + HEAP32[$val2>>2] = $sub; + $16 = $t; + $17 = $s; + $sub3 = (($16) - ($17))|0; + $18 = $_this$addr; + $rng4 = ((($18)) + 28|0); + HEAP32[$rng4>>2] = $sub3; + $19 = $_this$addr; + _ec_dec_normalize($19); + $20 = $ret; + STACKTOP = sp;return ($20|0); +} +function _ec_dec_uint($_this,$_ft) { + $_this = $_this|0; + $_ft = $_ft|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_ft$addr = 0, $_this$addr = 0, $add = 0, $add2 = 0, $add7 = 0, $call = 0, $call3 = 0, $call6 = 0, $cmp = 0; + var $cmp4 = 0, $dec = 0, $error = 0, $ft = 0, $ftb = 0, $inc = 0, $or = 0, $retval = 0, $s = 0, $shl = 0, $shr = 0, $sub = 0, $sub1 = 0, $t = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_this$addr = $_this; + $_ft$addr = $_ft; + $0 = $_ft$addr; + $dec = (($0) + -1)|0; + $_ft$addr = $dec; + $1 = $_ft$addr; + $2 = (Math_clz32(($1|0))|0); + $sub = (32 - ($2))|0; + $ftb = $sub; + $3 = $ftb; + $cmp = ($3|0)>(8); + if (!($cmp)) { + $22 = $_ft$addr; + $inc = (($22) + 1)|0; + $_ft$addr = $inc; + $23 = $_this$addr; + $24 = $_ft$addr; + $call6 = (_ec_decode($23,$24)|0); + $s = $call6; + $25 = $_this$addr; + $26 = $s; + $27 = $s; + $add7 = (($27) + 1)|0; + $28 = $_ft$addr; + _ec_dec_update($25,$26,$add7,$28); + $29 = $s; + $retval = $29; + $30 = $retval; + STACKTOP = sp;return ($30|0); + } + $4 = $ftb; + $sub1 = (($4) - 8)|0; + $ftb = $sub1; + $5 = $_ft$addr; + $6 = $ftb; + $shr = $5 >>> $6; + $add = (($shr) + 1)|0; + $ft = $add; + $7 = $_this$addr; + $8 = $ft; + $call = (_ec_decode($7,$8)|0); + $s = $call; + $9 = $_this$addr; + $10 = $s; + $11 = $s; + $add2 = (($11) + 1)|0; + $12 = $ft; + _ec_dec_update($9,$10,$add2,$12); + $13 = $s; + $14 = $ftb; + $shl = $13 << $14; + $15 = $_this$addr; + $16 = $ftb; + $call3 = (_ec_dec_bits($15,$16)|0); + $or = $shl | $call3; + $t = $or; + $17 = $t; + $18 = $_ft$addr; + $cmp4 = ($17>>>0)<=($18>>>0); + if ($cmp4) { + $19 = $t; + $retval = $19; + $30 = $retval; + STACKTOP = sp;return ($30|0); + } else { + $20 = $_this$addr; + $error = ((($20)) + 44|0); + HEAP32[$error>>2] = 1; + $21 = $_ft$addr; + $retval = $21; + $30 = $retval; + STACKTOP = sp;return ($30|0); + } + return (0)|0; +} +function _ec_dec_bits($_this,$_bits) { + $_this = $_this|0; + $_bits = $_bits|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0; + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_bits$addr = 0, $_this$addr = 0, $add = 0, $add6 = 0, $and = 0, $available = 0, $call = 0, $cmp = 0, $cmp1 = 0, $end_window = 0, $end_window4 = 0, $nbits_total = 0, $nend_bits = 0, $nend_bits5 = 0, $or = 0; + var $ret = 0, $shl = 0, $shl2 = 0, $shr = 0, $sub = 0, $sub3 = 0, $window = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_this$addr = $_this; + $_bits$addr = $_bits; + $0 = $_this$addr; + $end_window = ((($0)) + 12|0); + $1 = HEAP32[$end_window>>2]|0; + $window = $1; + $2 = $_this$addr; + $nend_bits = ((($2)) + 16|0); + $3 = HEAP32[$nend_bits>>2]|0; + $available = $3; + $4 = $available; + $5 = $_bits$addr; + $cmp = ($4>>>0)<($5>>>0); + if ($cmp) { + while(1) { + $6 = $_this$addr; + $call = (_ec_read_byte_from_end($6)|0); + $7 = $available; + $shl = $call << $7; + $8 = $window; + $or = $8 | $shl; + $window = $or; + $9 = $available; + $add = (($9) + 8)|0; + $available = $add; + $10 = $available; + $cmp1 = ($10|0)<=(24); + if (!($cmp1)) { + break; + } + } + } + $11 = $window; + $12 = $_bits$addr; + $shl2 = 1 << $12; + $sub = (($shl2) - 1)|0; + $and = $11 & $sub; + $ret = $and; + $13 = $_bits$addr; + $14 = $window; + $shr = $14 >>> $13; + $window = $shr; + $15 = $_bits$addr; + $16 = $available; + $sub3 = (($16) - ($15))|0; + $available = $sub3; + $17 = $window; + $18 = $_this$addr; + $end_window4 = ((($18)) + 12|0); + HEAP32[$end_window4>>2] = $17; + $19 = $available; + $20 = $_this$addr; + $nend_bits5 = ((($20)) + 16|0); + HEAP32[$nend_bits5>>2] = $19; + $21 = $_bits$addr; + $22 = $_this$addr; + $nbits_total = ((($22)) + 20|0); + $23 = HEAP32[$nbits_total>>2]|0; + $add6 = (($23) + ($21))|0; + HEAP32[$nbits_total>>2] = $add6; + $24 = $ret; + STACKTOP = sp;return ($24|0); +} +function _ec_read_byte_from_end($_this) { + $_this = $_this|0; + var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_this$addr = 0, $arrayidx = 0, $cmp = 0, $cond = 0, $conv = 0, $end_offs = 0, $end_offs2 = 0, $inc = 0, $storage = 0; + var $storage1 = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $0 = $_this$addr; + $end_offs = ((($0)) + 8|0); + $1 = HEAP32[$end_offs>>2]|0; + $2 = $_this$addr; + $storage = ((($2)) + 4|0); + $3 = HEAP32[$storage>>2]|0; + $cmp = ($1>>>0)<($3>>>0); + if (!($cmp)) { + $cond = 0; + STACKTOP = sp;return ($cond|0); + } + $4 = $_this$addr; + $5 = HEAP32[$4>>2]|0; + $6 = $_this$addr; + $storage1 = ((($6)) + 4|0); + $7 = HEAP32[$storage1>>2]|0; + $8 = $_this$addr; + $end_offs2 = ((($8)) + 8|0); + $9 = HEAP32[$end_offs2>>2]|0; + $inc = (($9) + 1)|0; + HEAP32[$end_offs2>>2] = $inc; + $sub = (($7) - ($inc))|0; + $arrayidx = (($5) + ($sub)|0); + $10 = HEAP8[$arrayidx>>0]|0; + $conv = $10&255; + $cond = $conv; + STACKTOP = sp;return ($cond|0); +} +function _ec_encode($_this,$_fl,$_fh,$_ft) { + $_this = $_this|0; + $_fl = $_fl|0; + $_fh = $_fh|0; + $_ft = $_ft|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, $_fh$addr = 0, $_fl$addr = 0, $_ft$addr = 0, $_this$addr = 0, $add = 0, $call = 0, $cmp = 0, $mul = 0, $mul4 = 0, $mul7 = 0, $r = 0, $rng = 0, $rng1 = 0, $rng5 = 0, $rng8 = 0, $sub = 0, $sub2 = 0, $sub3 = 0, $sub6 = 0; + var $sub9 = 0, $val = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_this$addr = $_this; + $_fl$addr = $_fl; + $_fh$addr = $_fh; + $_ft$addr = $_ft; + $0 = $_this$addr; + $rng = ((($0)) + 28|0); + $1 = HEAP32[$rng>>2]|0; + $2 = $_ft$addr; + $call = (_celt_udiv_72($1,$2)|0); + $r = $call; + $3 = $_fl$addr; + $cmp = ($3>>>0)>(0); + if ($cmp) { + $4 = $_this$addr; + $rng1 = ((($4)) + 28|0); + $5 = HEAP32[$rng1>>2]|0; + $6 = $r; + $7 = $_ft$addr; + $8 = $_fl$addr; + $sub = (($7) - ($8))|0; + $mul = Math_imul($6, $sub)|0; + $sub2 = (($5) - ($mul))|0; + $9 = $_this$addr; + $val = ((($9)) + 32|0); + $10 = HEAP32[$val>>2]|0; + $add = (($10) + ($sub2))|0; + HEAP32[$val>>2] = $add; + $11 = $r; + $12 = $_fh$addr; + $13 = $_fl$addr; + $sub3 = (($12) - ($13))|0; + $mul4 = Math_imul($11, $sub3)|0; + $14 = $_this$addr; + $rng5 = ((($14)) + 28|0); + HEAP32[$rng5>>2] = $mul4; + $20 = $_this$addr; + _ec_enc_normalize($20); + STACKTOP = sp;return; + } else { + $15 = $r; + $16 = $_ft$addr; + $17 = $_fh$addr; + $sub6 = (($16) - ($17))|0; + $mul7 = Math_imul($15, $sub6)|0; + $18 = $_this$addr; + $rng8 = ((($18)) + 28|0); + $19 = HEAP32[$rng8>>2]|0; + $sub9 = (($19) - ($mul7))|0; + HEAP32[$rng8>>2] = $sub9; + $20 = $_this$addr; + _ec_enc_normalize($20); + STACKTOP = sp;return; + } +} +function _celt_udiv_72($n,$d) { + $n = $n|0; + $d = $d|0; + var $0 = 0, $1 = 0, $d$addr = 0, $div = 0, $n$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $n$addr = $n; + $d$addr = $d; + $0 = $n$addr; + $1 = $d$addr; + $div = (($0>>>0) / ($1>>>0))&-1; + STACKTOP = sp;return ($div|0); +} +function _ec_enc_normalize($_this) { + $_this = $_this|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_this$addr = 0, $add = 0, $and = 0, $cmp = 0, $nbits_total = 0, $rng = 0, $rng3 = 0, $shl = 0; + var $shl4 = 0, $shr = 0, $val = 0, $val1 = 0, $val2 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + while(1) { + $0 = $_this$addr; + $rng = ((($0)) + 28|0); + $1 = HEAP32[$rng>>2]|0; + $cmp = ($1>>>0)<=(8388608); + if (!($cmp)) { + break; + } + $2 = $_this$addr; + $3 = $_this$addr; + $val = ((($3)) + 32|0); + $4 = HEAP32[$val>>2]|0; + $shr = $4 >>> 23; + _ec_enc_carry_out($2,$shr); + $5 = $_this$addr; + $val1 = ((($5)) + 32|0); + $6 = HEAP32[$val1>>2]|0; + $shl = $6 << 8; + $and = $shl & 2147483647; + $7 = $_this$addr; + $val2 = ((($7)) + 32|0); + HEAP32[$val2>>2] = $and; + $8 = $_this$addr; + $rng3 = ((($8)) + 28|0); + $9 = HEAP32[$rng3>>2]|0; + $shl4 = $9 << 8; + HEAP32[$rng3>>2] = $shl4; + $10 = $_this$addr; + $nbits_total = ((($10)) + 20|0); + $11 = HEAP32[$nbits_total>>2]|0; + $add = (($11) + 8)|0; + HEAP32[$nbits_total>>2] = $add; + } + STACKTOP = sp;return; +} +function _ec_enc_carry_out($_this,$_c) { + $_this = $_this|0; + $_c = $_c|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; + var $7 = 0, $8 = 0, $9 = 0, $_c$addr = 0, $_this$addr = 0, $add = 0, $add6 = 0, $and = 0, $and13 = 0, $call = 0, $call7 = 0, $carry = 0, $cmp = 0, $cmp1 = 0, $cmp11 = 0, $cmp4 = 0, $dec = 0, $error = 0, $error8 = 0, $ext = 0; + var $ext10 = 0, $ext15 = 0, $inc = 0, $or = 0, $or9 = 0, $rem = 0, $rem14 = 0, $rem3 = 0, $shr = 0, $sym = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $_c$addr = $_c; + $0 = $_c$addr; + $cmp = ($0|0)!=(255); + if (!($cmp)) { + $21 = $_this$addr; + $ext15 = ((($21)) + 36|0); + $22 = HEAP32[$ext15>>2]|0; + $inc = (($22) + 1)|0; + HEAP32[$ext15>>2] = $inc; + STACKTOP = sp;return; + } + $1 = $_c$addr; + $shr = $1 >> 8; + $carry = $shr; + $2 = $_this$addr; + $rem = ((($2)) + 40|0); + $3 = HEAP32[$rem>>2]|0; + $cmp1 = ($3|0)>=(0); + if ($cmp1) { + $4 = $_this$addr; + $5 = $_this$addr; + $rem3 = ((($5)) + 40|0); + $6 = HEAP32[$rem3>>2]|0; + $7 = $carry; + $add = (($6) + ($7))|0; + $call = (_ec_write_byte($4,$add)|0); + $8 = $_this$addr; + $error = ((($8)) + 44|0); + $9 = HEAP32[$error>>2]|0; + $or = $9 | $call; + HEAP32[$error>>2] = $or; + } + $10 = $_this$addr; + $ext = ((($10)) + 36|0); + $11 = HEAP32[$ext>>2]|0; + $cmp4 = ($11>>>0)>(0); + if ($cmp4) { + $12 = $carry; + $add6 = (255 + ($12))|0; + $and = $add6 & 255; + $sym = $and; + while(1) { + $13 = $_this$addr; + $14 = $sym; + $call7 = (_ec_write_byte($13,$14)|0); + $15 = $_this$addr; + $error8 = ((($15)) + 44|0); + $16 = HEAP32[$error8>>2]|0; + $or9 = $16 | $call7; + HEAP32[$error8>>2] = $or9; + $17 = $_this$addr; + $ext10 = ((($17)) + 36|0); + $18 = HEAP32[$ext10>>2]|0; + $dec = (($18) + -1)|0; + HEAP32[$ext10>>2] = $dec; + $cmp11 = ($dec>>>0)>(0); + if (!($cmp11)) { + break; + } + } + } + $19 = $_c$addr; + $and13 = $19 & 255; + $20 = $_this$addr; + $rem14 = ((($20)) + 40|0); + HEAP32[$rem14>>2] = $and13; + STACKTOP = sp;return; +} +function _ec_write_byte($_this,$_value) { + $_this = $_this|0; + $_value = $_value|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_this$addr = 0, $_value$addr = 0, $add = 0, $arrayidx = 0, $cmp = 0, $conv = 0, $end_offs = 0, $inc = 0; + var $offs = 0, $offs1 = 0, $retval = 0, $storage = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $_value$addr = $_value; + $0 = $_this$addr; + $offs = ((($0)) + 24|0); + $1 = HEAP32[$offs>>2]|0; + $2 = $_this$addr; + $end_offs = ((($2)) + 8|0); + $3 = HEAP32[$end_offs>>2]|0; + $add = (($1) + ($3))|0; + $4 = $_this$addr; + $storage = ((($4)) + 4|0); + $5 = HEAP32[$storage>>2]|0; + $cmp = ($add>>>0)>=($5>>>0); + if ($cmp) { + $retval = -1; + $11 = $retval; + STACKTOP = sp;return ($11|0); + } else { + $6 = $_value$addr; + $conv = $6&255; + $7 = $_this$addr; + $8 = HEAP32[$7>>2]|0; + $9 = $_this$addr; + $offs1 = ((($9)) + 24|0); + $10 = HEAP32[$offs1>>2]|0; + $inc = (($10) + 1)|0; + HEAP32[$offs1>>2] = $inc; + $arrayidx = (($8) + ($10)|0); + HEAP8[$arrayidx>>0] = $conv; + $retval = 0; + $11 = $retval; + STACKTOP = sp;return ($11|0); + } + return (0)|0; +} +function _ec_enc_bit_logp($_this,$_val,$_logp) { + $_this = $_this|0; + $_val = $_val|0; + $_logp = $_logp|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_logp$addr = 0, $_this$addr = 0, $_val$addr = 0; + var $add = 0, $cond = 0, $l = 0, $r = 0, $rng = 0, $rng3 = 0, $s = 0, $shr = 0, $sub = 0, $tobool = 0, $tobool2 = 0, $val = 0, $val1 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_this$addr = $_this; + $_val$addr = $_val; + $_logp$addr = $_logp; + $0 = $_this$addr; + $rng = ((($0)) + 28|0); + $1 = HEAP32[$rng>>2]|0; + $r = $1; + $2 = $_this$addr; + $val = ((($2)) + 32|0); + $3 = HEAP32[$val>>2]|0; + $l = $3; + $4 = $r; + $5 = $_logp$addr; + $shr = $4 >>> $5; + $s = $shr; + $6 = $s; + $7 = $r; + $sub = (($7) - ($6))|0; + $r = $sub; + $8 = $_val$addr; + $tobool = ($8|0)!=(0); + if ($tobool) { + $9 = $l; + $10 = $r; + $add = (($9) + ($10))|0; + $11 = $_this$addr; + $val1 = ((($11)) + 32|0); + HEAP32[$val1>>2] = $add; + } + $12 = $_val$addr; + $tobool2 = ($12|0)!=(0); + $13 = $s; + $14 = $r; + $cond = $tobool2 ? $13 : $14; + $15 = $_this$addr; + $rng3 = ((($15)) + 28|0); + HEAP32[$rng3>>2] = $cond; + $16 = $_this$addr; + _ec_enc_normalize($16); + STACKTOP = sp;return; +} +function _ec_enc_uint($_this,$_fl,$_ft) { + $_this = $_this|0; + $_fl = $_fl|0; + $_ft = $_ft|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, $_fl$addr = 0, $_ft$addr = 0, $_this$addr = 0, $add = 0, $add3 = 0, $add5 = 0, $add6 = 0, $and = 0, $cmp = 0, $dec = 0, $fl = 0, $ft = 0, $ftb = 0, $shl = 0, $shr = 0, $shr2 = 0, $sub = 0, $sub1 = 0, $sub4 = 0; + var label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_this$addr = $_this; + $_fl$addr = $_fl; + $_ft$addr = $_ft; + $0 = $_ft$addr; + $dec = (($0) + -1)|0; + $_ft$addr = $dec; + $1 = $_ft$addr; + $2 = (Math_clz32(($1|0))|0); + $sub = (32 - ($2))|0; + $ftb = $sub; + $3 = $ftb; + $cmp = ($3|0)>(8); + if ($cmp) { + $4 = $ftb; + $sub1 = (($4) - 8)|0; + $ftb = $sub1; + $5 = $_ft$addr; + $6 = $ftb; + $shr = $5 >>> $6; + $add = (($shr) + 1)|0; + $ft = $add; + $7 = $_fl$addr; + $8 = $ftb; + $shr2 = $7 >>> $8; + $fl = $shr2; + $9 = $_this$addr; + $10 = $fl; + $11 = $fl; + $add3 = (($11) + 1)|0; + $12 = $ft; + _ec_encode($9,$10,$add3,$12); + $13 = $_this$addr; + $14 = $_fl$addr; + $15 = $ftb; + $shl = 1 << $15; + $sub4 = (($shl) - 1)|0; + $and = $14 & $sub4; + $16 = $ftb; + _ec_enc_bits($13,$and,$16); + STACKTOP = sp;return; + } else { + $17 = $_this$addr; + $18 = $_fl$addr; + $19 = $_fl$addr; + $add5 = (($19) + 1)|0; + $20 = $_ft$addr; + $add6 = (($20) + 1)|0; + _ec_encode($17,$18,$add5,$add6); + STACKTOP = sp;return; + } +} +function _ec_enc_bits($_this,$_fl,$_bits) { + $_this = $_this|0; + $_fl = $_fl|0; + $_bits = $_bits|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0; + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_bits$addr = 0, $_fl$addr = 0, $_this$addr = 0, $add = 0, $add3 = 0, $add6 = 0, $and = 0, $call = 0, $cmp = 0, $cmp1 = 0, $end_window = 0, $end_window4 = 0, $error = 0, $nbits_total = 0, $nend_bits = 0; + var $nend_bits5 = 0, $or = 0, $or2 = 0, $shl = 0, $shr = 0, $sub = 0, $used = 0, $window = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_this$addr = $_this; + $_fl$addr = $_fl; + $_bits$addr = $_bits; + $0 = $_this$addr; + $end_window = ((($0)) + 12|0); + $1 = HEAP32[$end_window>>2]|0; + $window = $1; + $2 = $_this$addr; + $nend_bits = ((($2)) + 16|0); + $3 = HEAP32[$nend_bits>>2]|0; + $used = $3; + $4 = $used; + $5 = $_bits$addr; + $add = (($4) + ($5))|0; + $cmp = ($add>>>0)>(32); + if ($cmp) { + while(1) { + $6 = $_this$addr; + $7 = $window; + $and = $7 & 255; + $call = (_ec_write_byte_at_end($6,$and)|0); + $8 = $_this$addr; + $error = ((($8)) + 44|0); + $9 = HEAP32[$error>>2]|0; + $or = $9 | $call; + HEAP32[$error>>2] = $or; + $10 = $window; + $shr = $10 >>> 8; + $window = $shr; + $11 = $used; + $sub = (($11) - 8)|0; + $used = $sub; + $12 = $used; + $cmp1 = ($12|0)>=(8); + if (!($cmp1)) { + break; + } + } + } + $13 = $_fl$addr; + $14 = $used; + $shl = $13 << $14; + $15 = $window; + $or2 = $15 | $shl; + $window = $or2; + $16 = $_bits$addr; + $17 = $used; + $add3 = (($17) + ($16))|0; + $used = $add3; + $18 = $window; + $19 = $_this$addr; + $end_window4 = ((($19)) + 12|0); + HEAP32[$end_window4>>2] = $18; + $20 = $used; + $21 = $_this$addr; + $nend_bits5 = ((($21)) + 16|0); + HEAP32[$nend_bits5>>2] = $20; + $22 = $_bits$addr; + $23 = $_this$addr; + $nbits_total = ((($23)) + 20|0); + $24 = HEAP32[$nbits_total>>2]|0; + $add6 = (($24) + ($22))|0; + HEAP32[$nbits_total>>2] = $add6; + STACKTOP = sp;return; +} +function _ec_write_byte_at_end($_this,$_value) { + $_this = $_this|0; + $_value = $_value|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_this$addr = 0, $_value$addr = 0, $add = 0, $arrayidx = 0, $cmp = 0, $conv = 0; + var $end_offs = 0, $end_offs2 = 0, $inc = 0, $offs = 0, $retval = 0, $storage = 0, $storage1 = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $_value$addr = $_value; + $0 = $_this$addr; + $offs = ((($0)) + 24|0); + $1 = HEAP32[$offs>>2]|0; + $2 = $_this$addr; + $end_offs = ((($2)) + 8|0); + $3 = HEAP32[$end_offs>>2]|0; + $add = (($1) + ($3))|0; + $4 = $_this$addr; + $storage = ((($4)) + 4|0); + $5 = HEAP32[$storage>>2]|0; + $cmp = ($add>>>0)>=($5>>>0); + if ($cmp) { + $retval = -1; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } else { + $6 = $_value$addr; + $conv = $6&255; + $7 = $_this$addr; + $8 = HEAP32[$7>>2]|0; + $9 = $_this$addr; + $storage1 = ((($9)) + 4|0); + $10 = HEAP32[$storage1>>2]|0; + $11 = $_this$addr; + $end_offs2 = ((($11)) + 8|0); + $12 = HEAP32[$end_offs2>>2]|0; + $inc = (($12) + 1)|0; + HEAP32[$end_offs2>>2] = $inc; + $sub = (($10) - ($inc))|0; + $arrayidx = (($8) + ($sub)|0); + HEAP8[$arrayidx>>0] = $conv; + $retval = 0; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } + return (0)|0; +} +function _opus_fft_impl($st,$fout) { + $st = $st|0; + $fout = $fout|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $7 = 0, $8 = 0; + var $9 = 0, $L = 0, $add = 0, $add10 = 0, $arrayidx11 = 0, $arrayidx16 = 0, $arrayidx26 = 0, $arrayidx3 = 0, $arrayidx30 = 0, $arrayidx32 = 0, $arrayidx34 = 0, $arrayidx35 = 0, $arrayidx37 = 0, $arrayidx39 = 0, $arrayidx41 = 0, $arrayidx43 = 0, $arrayidx6 = 0, $arrayidx8 = 0, $cmp = 0, $cmp12 = 0; + var $cmp19 = 0, $cmp21 = 0, $cond = 0, $conv = 0, $conv17 = 0, $conv27 = 0, $conv31 = 0, $conv7 = 0, $dec = 0, $factors = 0, $factors14 = 0, $factors23 = 0, $factors28 = 0, $factors4 = 0, $fout$addr = 0, $fstride = 0, $i = 0, $inc = 0, $m = 0, $m2 = 0; + var $mul = 0, $mul15 = 0, $mul24 = 0, $mul29 = 0, $mul5 = 0, $mul9 = 0, $p = 0, $shift = 0, $shift1 = 0, $shift2 = 0, $shl = 0, $shl38 = 0, $shl42 = 0, $st$addr = 0, $sub = 0, $sub18 = 0, $sub25 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $fstride = sp + 8|0; + $st$addr = $st; + $fout$addr = $fout; + $0 = $st$addr; + $shift1 = ((($0)) + 8|0); + $1 = HEAP32[$shift1>>2]|0; + $cmp = ($1|0)>(0); + if ($cmp) { + $2 = $st$addr; + $shift2 = ((($2)) + 8|0); + $3 = HEAP32[$shift2>>2]|0; + $cond = $3; + } else { + $cond = 0; + } + $shift = $cond; + HEAP32[$fstride>>2] = 1; + $L = 0; + while(1) { + $4 = $st$addr; + $factors = ((($4)) + 12|0); + $5 = $L; + $mul = $5<<1; + $arrayidx3 = (($factors) + ($mul<<1)|0); + $6 = HEAP16[$arrayidx3>>1]|0; + $conv = $6 << 16 >> 16; + $p = $conv; + $7 = $st$addr; + $factors4 = ((($7)) + 12|0); + $8 = $L; + $mul5 = $8<<1; + $add = (($mul5) + 1)|0; + $arrayidx6 = (($factors4) + ($add<<1)|0); + $9 = HEAP16[$arrayidx6>>1]|0; + $conv7 = $9 << 16 >> 16; + $m = $conv7; + $10 = $L; + $arrayidx8 = (($fstride) + ($10<<2)|0); + $11 = HEAP32[$arrayidx8>>2]|0; + $12 = $p; + $mul9 = Math_imul($11, $12)|0; + $13 = $L; + $add10 = (($13) + 1)|0; + $arrayidx11 = (($fstride) + ($add10<<2)|0); + HEAP32[$arrayidx11>>2] = $mul9; + $14 = $L; + $inc = (($14) + 1)|0; + $L = $inc; + $15 = $m; + $cmp12 = ($15|0)!=(1); + if (!($cmp12)) { + break; + } + } + $16 = $st$addr; + $factors14 = ((($16)) + 12|0); + $17 = $L; + $mul15 = $17<<1; + $sub = (($mul15) - 1)|0; + $arrayidx16 = (($factors14) + ($sub<<1)|0); + $18 = HEAP16[$arrayidx16>>1]|0; + $conv17 = $18 << 16 >> 16; + $m = $conv17; + $19 = $L; + $sub18 = (($19) - 1)|0; + $i = $sub18; + while(1) { + $20 = $i; + $cmp19 = ($20|0)>=(0); + if (!($cmp19)) { + break; + } + $21 = $i; + $cmp21 = ($21|0)!=(0); + if ($cmp21) { + $22 = $st$addr; + $factors23 = ((($22)) + 12|0); + $23 = $i; + $mul24 = $23<<1; + $sub25 = (($mul24) - 1)|0; + $arrayidx26 = (($factors23) + ($sub25<<1)|0); + $24 = HEAP16[$arrayidx26>>1]|0; + $conv27 = $24 << 16 >> 16; + $m2 = $conv27; + } else { + $m2 = 1; + } + $25 = $st$addr; + $factors28 = ((($25)) + 12|0); + $26 = $i; + $mul29 = $26<<1; + $arrayidx30 = (($factors28) + ($mul29<<1)|0); + $27 = HEAP16[$arrayidx30>>1]|0; + $conv31 = $27 << 16 >> 16; + switch ($conv31|0) { + case 2: { + $28 = $fout$addr; + $29 = $m; + $30 = $i; + $arrayidx32 = (($fstride) + ($30<<2)|0); + $31 = HEAP32[$arrayidx32>>2]|0; + _kf_bfly2($28,$29,$31); + break; + } + case 4: { + $32 = $fout$addr; + $33 = $i; + $arrayidx34 = (($fstride) + ($33<<2)|0); + $34 = HEAP32[$arrayidx34>>2]|0; + $35 = $shift; + $shl = $34 << $35; + $36 = $st$addr; + $37 = $m; + $38 = $i; + $arrayidx35 = (($fstride) + ($38<<2)|0); + $39 = HEAP32[$arrayidx35>>2]|0; + $40 = $m2; + _kf_bfly4($32,$shl,$36,$37,$39,$40); + break; + } + case 3: { + $41 = $fout$addr; + $42 = $i; + $arrayidx37 = (($fstride) + ($42<<2)|0); + $43 = HEAP32[$arrayidx37>>2]|0; + $44 = $shift; + $shl38 = $43 << $44; + $45 = $st$addr; + $46 = $m; + $47 = $i; + $arrayidx39 = (($fstride) + ($47<<2)|0); + $48 = HEAP32[$arrayidx39>>2]|0; + $49 = $m2; + _kf_bfly3($41,$shl38,$45,$46,$48,$49); + break; + } + case 5: { + $50 = $fout$addr; + $51 = $i; + $arrayidx41 = (($fstride) + ($51<<2)|0); + $52 = HEAP32[$arrayidx41>>2]|0; + $53 = $shift; + $shl42 = $52 << $53; + $54 = $st$addr; + $55 = $m; + $56 = $i; + $arrayidx43 = (($fstride) + ($56<<2)|0); + $57 = HEAP32[$arrayidx43>>2]|0; + $58 = $m2; + _kf_bfly5($50,$shl42,$54,$55,$57,$58); + break; + } + default: { + } + } + $59 = $m2; + $m = $59; + $60 = $i; + $dec = (($60) + -1)|0; + $i = $dec; + } + STACKTOP = sp;return; +} +function _kf_bfly2($Fout,$m,$N) { + $Fout = $Fout|0; + $m = $m|0; + $N = $N|0; + var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0.0; + var $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0; + var $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0.0, $60 = 0, $61 = 0.0, $62 = 0; + var $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0.0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0.0; + var $81 = 0.0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0, $9 = 0.0, $Fout$addr = 0, $Fout2 = 0, $N$addr = 0, $add = 0.0, $add$ptr = 0, $add$ptr127 = 0, $add121 = 0.0, $add125 = 0.0, $add18 = 0.0, $add24 = 0.0, $add51 = 0.0, $add55 = 0.0, $add82 = 0.0, $add86 = 0.0; + var $arrayidx104 = 0, $arrayidx108 = 0, $arrayidx110 = 0, $arrayidx114 = 0, $arrayidx119 = 0, $arrayidx123 = 0, $arrayidx20 = 0, $arrayidx22 = 0, $arrayidx26 = 0, $arrayidx28 = 0, $arrayidx34 = 0, $arrayidx38 = 0, $arrayidx40 = 0, $arrayidx44 = 0, $arrayidx49 = 0, $arrayidx53 = 0, $arrayidx57 = 0, $arrayidx60 = 0, $arrayidx65 = 0, $arrayidx69 = 0; + var $arrayidx71 = 0, $arrayidx75 = 0, $arrayidx80 = 0, $arrayidx84 = 0, $arrayidx88 = 0, $arrayidx90 = 0, $arrayidx95 = 0, $arrayidx98 = 0, $cmp = 0, $i = 0, $i10 = 0, $i102 = 0, $i111 = 0, $i112 = 0, $i115 = 0, $i122 = 0, $i124 = 0, $i15 = 0, $i17 = 0, $i23 = 0; + var $i27 = 0, $i32 = 0, $i41 = 0, $i42 = 0, $i45 = 0, $i52 = 0, $i54 = 0, $i58 = 0, $i6 = 0, $i63 = 0, $i7 = 0, $i72 = 0, $i73 = 0, $i76 = 0, $i83 = 0, $i85 = 0, $i89 = 0, $i96 = 0, $inc = 0, $m$addr = 0; + var $mul = 0.0, $mul101 = 0.0, $mul31 = 0.0, $mul93 = 0.0, $sub = 0.0, $sub100 = 0.0, $sub107 = 0.0, $sub113 = 0.0, $sub30 = 0.0, $sub37 = 0.0, $sub43 = 0.0, $sub62 = 0.0, $sub68 = 0.0, $sub74 = 0.0, $sub8 = 0.0, $sub92 = 0.0, $sub97 = 0.0, $t = 0, $tw = 0.0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $t = sp; + $Fout$addr = $Fout; + $m$addr = $m; + $N$addr = $N; + $tw = 0.70710676908493042; + $i = 0; + while(1) { + $0 = $i; + $1 = $N$addr; + $cmp = ($0|0)<($1|0); + if (!($cmp)) { + break; + } + $2 = $Fout$addr; + $add$ptr = ((($2)) + 32|0); + $Fout2 = $add$ptr; + $3 = $Fout2; + ;HEAP32[$t>>2]=HEAP32[$3>>2]|0;HEAP32[$t+4>>2]=HEAP32[$3+4>>2]|0; + $4 = $Fout$addr; + $5 = +HEAPF32[$4>>2]; + $6 = +HEAPF32[$t>>2]; + $sub = $5 - $6; + $7 = $Fout2; + HEAPF32[$7>>2] = $sub; + $8 = $Fout$addr; + $i6 = ((($8)) + 4|0); + $9 = +HEAPF32[$i6>>2]; + $i7 = ((($t)) + 4|0); + $10 = +HEAPF32[$i7>>2]; + $sub8 = $9 - $10; + $11 = $Fout2; + $i10 = ((($11)) + 4|0); + HEAPF32[$i10>>2] = $sub8; + $12 = +HEAPF32[$t>>2]; + $13 = $Fout$addr; + $14 = +HEAPF32[$13>>2]; + $add = $14 + $12; + HEAPF32[$13>>2] = $add; + $i15 = ((($t)) + 4|0); + $15 = +HEAPF32[$i15>>2]; + $16 = $Fout$addr; + $i17 = ((($16)) + 4|0); + $17 = +HEAPF32[$i17>>2]; + $add18 = $17 + $15; + HEAPF32[$i17>>2] = $add18; + $18 = $Fout2; + $arrayidx20 = ((($18)) + 8|0); + $19 = +HEAPF32[$arrayidx20>>2]; + $20 = $Fout2; + $arrayidx22 = ((($20)) + 8|0); + $i23 = ((($arrayidx22)) + 4|0); + $21 = +HEAPF32[$i23>>2]; + $add24 = $19 + $21; + $22 = $tw; + $mul = $add24 * $22; + HEAPF32[$t>>2] = $mul; + $23 = $Fout2; + $arrayidx26 = ((($23)) + 8|0); + $i27 = ((($arrayidx26)) + 4|0); + $24 = +HEAPF32[$i27>>2]; + $25 = $Fout2; + $arrayidx28 = ((($25)) + 8|0); + $26 = +HEAPF32[$arrayidx28>>2]; + $sub30 = $24 - $26; + $27 = $tw; + $mul31 = $sub30 * $27; + $i32 = ((($t)) + 4|0); + HEAPF32[$i32>>2] = $mul31; + $28 = $Fout$addr; + $arrayidx34 = ((($28)) + 8|0); + $29 = +HEAPF32[$arrayidx34>>2]; + $30 = +HEAPF32[$t>>2]; + $sub37 = $29 - $30; + $31 = $Fout2; + $arrayidx38 = ((($31)) + 8|0); + HEAPF32[$arrayidx38>>2] = $sub37; + $32 = $Fout$addr; + $arrayidx40 = ((($32)) + 8|0); + $i41 = ((($arrayidx40)) + 4|0); + $33 = +HEAPF32[$i41>>2]; + $i42 = ((($t)) + 4|0); + $34 = +HEAPF32[$i42>>2]; + $sub43 = $33 - $34; + $35 = $Fout2; + $arrayidx44 = ((($35)) + 8|0); + $i45 = ((($arrayidx44)) + 4|0); + HEAPF32[$i45>>2] = $sub43; + $36 = +HEAPF32[$t>>2]; + $37 = $Fout$addr; + $arrayidx49 = ((($37)) + 8|0); + $38 = +HEAPF32[$arrayidx49>>2]; + $add51 = $38 + $36; + HEAPF32[$arrayidx49>>2] = $add51; + $i52 = ((($t)) + 4|0); + $39 = +HEAPF32[$i52>>2]; + $40 = $Fout$addr; + $arrayidx53 = ((($40)) + 8|0); + $i54 = ((($arrayidx53)) + 4|0); + $41 = +HEAPF32[$i54>>2]; + $add55 = $41 + $39; + HEAPF32[$i54>>2] = $add55; + $42 = $Fout2; + $arrayidx57 = ((($42)) + 16|0); + $i58 = ((($arrayidx57)) + 4|0); + $43 = +HEAPF32[$i58>>2]; + HEAPF32[$t>>2] = $43; + $44 = $Fout2; + $arrayidx60 = ((($44)) + 16|0); + $45 = +HEAPF32[$arrayidx60>>2]; + $sub62 = - $45; + $i63 = ((($t)) + 4|0); + HEAPF32[$i63>>2] = $sub62; + $46 = $Fout$addr; + $arrayidx65 = ((($46)) + 16|0); + $47 = +HEAPF32[$arrayidx65>>2]; + $48 = +HEAPF32[$t>>2]; + $sub68 = $47 - $48; + $49 = $Fout2; + $arrayidx69 = ((($49)) + 16|0); + HEAPF32[$arrayidx69>>2] = $sub68; + $50 = $Fout$addr; + $arrayidx71 = ((($50)) + 16|0); + $i72 = ((($arrayidx71)) + 4|0); + $51 = +HEAPF32[$i72>>2]; + $i73 = ((($t)) + 4|0); + $52 = +HEAPF32[$i73>>2]; + $sub74 = $51 - $52; + $53 = $Fout2; + $arrayidx75 = ((($53)) + 16|0); + $i76 = ((($arrayidx75)) + 4|0); + HEAPF32[$i76>>2] = $sub74; + $54 = +HEAPF32[$t>>2]; + $55 = $Fout$addr; + $arrayidx80 = ((($55)) + 16|0); + $56 = +HEAPF32[$arrayidx80>>2]; + $add82 = $56 + $54; + HEAPF32[$arrayidx80>>2] = $add82; + $i83 = ((($t)) + 4|0); + $57 = +HEAPF32[$i83>>2]; + $58 = $Fout$addr; + $arrayidx84 = ((($58)) + 16|0); + $i85 = ((($arrayidx84)) + 4|0); + $59 = +HEAPF32[$i85>>2]; + $add86 = $59 + $57; + HEAPF32[$i85>>2] = $add86; + $60 = $Fout2; + $arrayidx88 = ((($60)) + 24|0); + $i89 = ((($arrayidx88)) + 4|0); + $61 = +HEAPF32[$i89>>2]; + $62 = $Fout2; + $arrayidx90 = ((($62)) + 24|0); + $63 = +HEAPF32[$arrayidx90>>2]; + $sub92 = $61 - $63; + $64 = $tw; + $mul93 = $sub92 * $64; + HEAPF32[$t>>2] = $mul93; + $65 = $Fout2; + $arrayidx95 = ((($65)) + 24|0); + $i96 = ((($arrayidx95)) + 4|0); + $66 = +HEAPF32[$i96>>2]; + $sub97 = - $66; + $67 = $Fout2; + $arrayidx98 = ((($67)) + 24|0); + $68 = +HEAPF32[$arrayidx98>>2]; + $sub100 = $sub97 - $68; + $69 = $tw; + $mul101 = $sub100 * $69; + $i102 = ((($t)) + 4|0); + HEAPF32[$i102>>2] = $mul101; + $70 = $Fout$addr; + $arrayidx104 = ((($70)) + 24|0); + $71 = +HEAPF32[$arrayidx104>>2]; + $72 = +HEAPF32[$t>>2]; + $sub107 = $71 - $72; + $73 = $Fout2; + $arrayidx108 = ((($73)) + 24|0); + HEAPF32[$arrayidx108>>2] = $sub107; + $74 = $Fout$addr; + $arrayidx110 = ((($74)) + 24|0); + $i111 = ((($arrayidx110)) + 4|0); + $75 = +HEAPF32[$i111>>2]; + $i112 = ((($t)) + 4|0); + $76 = +HEAPF32[$i112>>2]; + $sub113 = $75 - $76; + $77 = $Fout2; + $arrayidx114 = ((($77)) + 24|0); + $i115 = ((($arrayidx114)) + 4|0); + HEAPF32[$i115>>2] = $sub113; + $78 = +HEAPF32[$t>>2]; + $79 = $Fout$addr; + $arrayidx119 = ((($79)) + 24|0); + $80 = +HEAPF32[$arrayidx119>>2]; + $add121 = $80 + $78; + HEAPF32[$arrayidx119>>2] = $add121; + $i122 = ((($t)) + 4|0); + $81 = +HEAPF32[$i122>>2]; + $82 = $Fout$addr; + $arrayidx123 = ((($82)) + 24|0); + $i124 = ((($arrayidx123)) + 4|0); + $83 = +HEAPF32[$i124>>2]; + $add125 = $83 + $81; + HEAPF32[$i124>>2] = $add125; + $84 = $Fout$addr; + $add$ptr127 = ((($84)) + 64|0); + $Fout$addr = $add$ptr127; + $85 = $i; + $inc = (($85) + 1)|0; + $i = $inc; + } + STACKTOP = sp;return; +} +function _kf_bfly4($Fout,$fstride,$st,$m,$N,$mm) { + $Fout = $Fout|0; + $fstride = $fstride|0; + $st = $st|0; + $m = $m|0; + $N = $N|0; + $mm = $mm|0; + var $0 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0, $102 = 0.0, $103 = 0, $104 = 0.0, $105 = 0, $106 = 0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0, $110 = 0, $111 = 0, $112 = 0.0, $113 = 0, $114 = 0.0, $115 = 0; + var $116 = 0, $117 = 0.0, $118 = 0, $119 = 0.0, $12 = 0.0, $120 = 0, $121 = 0, $122 = 0.0, $123 = 0, $124 = 0.0, $125 = 0, $126 = 0, $127 = 0.0, $128 = 0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0, $132 = 0.0, $133 = 0; + var $134 = 0.0, $135 = 0, $136 = 0.0, $137 = 0.0, $138 = 0, $139 = 0.0, $14 = 0.0, $140 = 0.0, $141 = 0.0, $142 = 0, $143 = 0.0, $144 = 0.0, $145 = 0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0.0, $15 = 0, $150 = 0.0, $151 = 0.0; + var $152 = 0.0, $153 = 0.0, $154 = 0.0, $155 = 0, $156 = 0.0, $157 = 0.0, $158 = 0, $159 = 0, $16 = 0.0, $160 = 0, $161 = 0.0, $162 = 0.0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0.0, $172 = 0, $173 = 0.0, $174 = 0.0, $175 = 0, $176 = 0.0, $177 = 0.0, $178 = 0.0, $179 = 0, $18 = 0.0, $180 = 0, $181 = 0.0, $182 = 0.0, $183 = 0, $184 = 0, $185 = 0.0, $186 = 0.0, $187 = 0, $188 = 0; + var $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0; + var $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0.0; + var $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0; + var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0.0, $8 = 0.0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0.0; + var $85 = 0, $86 = 0, $87 = 0.0, $88 = 0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0, $92 = 0.0, $93 = 0, $94 = 0.0, $95 = 0, $96 = 0, $97 = 0.0, $98 = 0, $99 = 0.0, $Fout$addr = 0, $Fout_beg = 0, $N$addr = 0, $add = 0.0; + var $add$ptr = 0, $add$ptr237 = 0, $add$ptr239 = 0, $add$ptr241 = 0, $add$ptr91 = 0, $add115 = 0.0, $add139 = 0.0, $add16 = 0.0, $add163 = 0.0, $add185 = 0.0, $add189 = 0.0, $add196 = 0.0, $add203 = 0.0, $add23 = 0.0, $add246 = 0.0, $add250 = 0.0, $add256 = 0.0, $add277 = 0.0, $add29 = 0.0, $add47 = 0.0; + var $add50 = 0.0, $add68 = 0.0, $add83 = 0.0, $arrayidx = 0, $arrayidx10 = 0, $arrayidx100 = 0, $arrayidx107 = 0, $arrayidx111 = 0, $arrayidx120 = 0, $arrayidx124 = 0, $arrayidx129 = 0, $arrayidx13 = 0, $arrayidx131 = 0, $arrayidx135 = 0, $arrayidx140 = 0, $arrayidx144 = 0, $arrayidx148 = 0, $arrayidx153 = 0, $arrayidx155 = 0, $arrayidx159 = 0; + var $arrayidx164 = 0, $arrayidx169 = 0, $arrayidx172 = 0, $arrayidx175 = 0, $arrayidx178 = 0, $arrayidx182 = 0, $arrayidx186 = 0, $arrayidx19 = 0, $arrayidx194 = 0, $arrayidx197 = 0, $arrayidx201 = 0, $arrayidx204 = 0, $arrayidx21 = 0, $arrayidx210 = 0, $arrayidx213 = 0, $arrayidx217 = 0, $arrayidx220 = 0, $arrayidx225 = 0, $arrayidx228 = 0, $arrayidx231 = 0; + var $arrayidx234 = 0, $arrayidx243 = 0, $arrayidx247 = 0, $arrayidx25 = 0, $arrayidx252 = 0, $arrayidx254 = 0, $arrayidx257 = 0, $arrayidx259 = 0, $arrayidx261 = 0, $arrayidx264 = 0, $arrayidx266 = 0, $arrayidx268 = 0, $arrayidx27 = 0, $arrayidx271 = 0, $arrayidx273 = 0, $arrayidx275 = 0, $arrayidx278 = 0, $arrayidx36 = 0, $arrayidx41 = 0, $arrayidx5 = 0; + var $arrayidx53 = 0, $arrayidx55 = 0, $arrayidx59 = 0, $arrayidx61 = 0, $arrayidx69 = 0, $arrayidx74 = 0, $arrayidx79 = 0, $arrayidx84 = 0, $arrayidx96 = 0, $cmp = 0, $cmp1 = 0, $cmp88 = 0, $cmp93 = 0, $fstride$addr = 0, $i = 0, $i101 = 0, $i102 = 0, $i109 = 0, $i112 = 0, $i117 = 0; + var $i125 = 0, $i126 = 0, $i133 = 0, $i136 = 0, $i14 = 0, $i141 = 0, $i149 = 0, $i15 = 0, $i150 = 0, $i157 = 0, $i160 = 0, $i165 = 0, $i174 = 0, $i176 = 0, $i179 = 0, $i187 = 0, $i188 = 0, $i200 = 0, $i202 = 0, $i205 = 0; + var $i216 = 0, $i218 = 0, $i221 = 0, $i230 = 0, $i232 = 0, $i235 = 0, $i248 = 0, $i249 = 0, $i255 = 0, $i26 = 0, $i260 = 0, $i265 = 0, $i269 = 0, $i274 = 0, $i279 = 0, $i28 = 0, $i30 = 0, $i38 = 0, $i39 = 0, $i4 = 0; + var $i42 = 0, $i48 = 0, $i49 = 0, $i6 = 0, $i60 = 0, $i62 = 0, $i64 = 0, $i67 = 0, $i71 = 0, $i75 = 0, $i77 = 0, $i8 = 0, $i81 = 0, $i85 = 0, $inc = 0, $inc281 = 0, $inc284 = 0, $incdec$ptr = 0, $j = 0, $m$addr = 0; + var $m2 = 0, $m3 = 0, $mm$addr = 0, $mul = 0, $mul103 = 0.0, $mul110 = 0.0, $mul114 = 0.0, $mul123 = 0.0, $mul127 = 0.0, $mul134 = 0.0, $mul138 = 0.0, $mul147 = 0.0, $mul151 = 0.0, $mul158 = 0.0, $mul162 = 0.0, $mul238 = 0, $mul240 = 0, $mul86 = 0, $mul90 = 0, $mul99 = 0.0; + var $scratch = 0, $scratch0 = 0, $scratch1 = 0, $st$addr = 0, $sub = 0.0, $sub104 = 0.0, $sub128 = 0.0, $sub152 = 0.0, $sub171 = 0.0, $sub177 = 0.0, $sub212 = 0.0, $sub219 = 0.0, $sub227 = 0.0, $sub233 = 0.0, $sub263 = 0.0, $sub270 = 0.0, $sub35 = 0.0, $sub40 = 0.0, $sub57 = 0.0, $sub63 = 0.0; + var $sub7 = 0.0, $sub73 = 0.0, $sub78 = 0.0, $tw1 = 0, $tw2 = 0, $tw3 = 0, $twiddles = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $scratch0 = sp + 88|0; + $scratch1 = sp + 80|0; + $scratch = sp + 24|0; + $Fout$addr = $Fout; + $fstride$addr = $fstride; + $st$addr = $st; + $m$addr = $m; + $N$addr = $N; + $mm$addr = $mm; + $0 = $m$addr; + $cmp = ($0|0)==(1); + if ($cmp) { + $i = 0; + while(1) { + $1 = $i; + $2 = $N$addr; + $cmp1 = ($1|0)<($2|0); + if (!($cmp1)) { + break; + } + $3 = $Fout$addr; + $4 = +HEAPF32[$3>>2]; + $5 = $Fout$addr; + $arrayidx = ((($5)) + 16|0); + $6 = +HEAPF32[$arrayidx>>2]; + $sub = $4 - $6; + HEAPF32[$scratch0>>2] = $sub; + $7 = $Fout$addr; + $i4 = ((($7)) + 4|0); + $8 = +HEAPF32[$i4>>2]; + $9 = $Fout$addr; + $arrayidx5 = ((($9)) + 16|0); + $i6 = ((($arrayidx5)) + 4|0); + $10 = +HEAPF32[$i6>>2]; + $sub7 = $8 - $10; + $i8 = ((($scratch0)) + 4|0); + HEAPF32[$i8>>2] = $sub7; + $11 = $Fout$addr; + $arrayidx10 = ((($11)) + 16|0); + $12 = +HEAPF32[$arrayidx10>>2]; + $13 = $Fout$addr; + $14 = +HEAPF32[$13>>2]; + $add = $14 + $12; + HEAPF32[$13>>2] = $add; + $15 = $Fout$addr; + $arrayidx13 = ((($15)) + 16|0); + $i14 = ((($arrayidx13)) + 4|0); + $16 = +HEAPF32[$i14>>2]; + $17 = $Fout$addr; + $i15 = ((($17)) + 4|0); + $18 = +HEAPF32[$i15>>2]; + $add16 = $18 + $16; + HEAPF32[$i15>>2] = $add16; + $19 = $Fout$addr; + $arrayidx19 = ((($19)) + 8|0); + $20 = +HEAPF32[$arrayidx19>>2]; + $21 = $Fout$addr; + $arrayidx21 = ((($21)) + 24|0); + $22 = +HEAPF32[$arrayidx21>>2]; + $add23 = $20 + $22; + HEAPF32[$scratch1>>2] = $add23; + $23 = $Fout$addr; + $arrayidx25 = ((($23)) + 8|0); + $i26 = ((($arrayidx25)) + 4|0); + $24 = +HEAPF32[$i26>>2]; + $25 = $Fout$addr; + $arrayidx27 = ((($25)) + 24|0); + $i28 = ((($arrayidx27)) + 4|0); + $26 = +HEAPF32[$i28>>2]; + $add29 = $24 + $26; + $i30 = ((($scratch1)) + 4|0); + HEAPF32[$i30>>2] = $add29; + $27 = $Fout$addr; + $28 = +HEAPF32[$27>>2]; + $29 = +HEAPF32[$scratch1>>2]; + $sub35 = $28 - $29; + $30 = $Fout$addr; + $arrayidx36 = ((($30)) + 16|0); + HEAPF32[$arrayidx36>>2] = $sub35; + $31 = $Fout$addr; + $i38 = ((($31)) + 4|0); + $32 = +HEAPF32[$i38>>2]; + $i39 = ((($scratch1)) + 4|0); + $33 = +HEAPF32[$i39>>2]; + $sub40 = $32 - $33; + $34 = $Fout$addr; + $arrayidx41 = ((($34)) + 16|0); + $i42 = ((($arrayidx41)) + 4|0); + HEAPF32[$i42>>2] = $sub40; + $35 = +HEAPF32[$scratch1>>2]; + $36 = $Fout$addr; + $37 = +HEAPF32[$36>>2]; + $add47 = $37 + $35; + HEAPF32[$36>>2] = $add47; + $i48 = ((($scratch1)) + 4|0); + $38 = +HEAPF32[$i48>>2]; + $39 = $Fout$addr; + $i49 = ((($39)) + 4|0); + $40 = +HEAPF32[$i49>>2]; + $add50 = $40 + $38; + HEAPF32[$i49>>2] = $add50; + $41 = $Fout$addr; + $arrayidx53 = ((($41)) + 8|0); + $42 = +HEAPF32[$arrayidx53>>2]; + $43 = $Fout$addr; + $arrayidx55 = ((($43)) + 24|0); + $44 = +HEAPF32[$arrayidx55>>2]; + $sub57 = $42 - $44; + HEAPF32[$scratch1>>2] = $sub57; + $45 = $Fout$addr; + $arrayidx59 = ((($45)) + 8|0); + $i60 = ((($arrayidx59)) + 4|0); + $46 = +HEAPF32[$i60>>2]; + $47 = $Fout$addr; + $arrayidx61 = ((($47)) + 24|0); + $i62 = ((($arrayidx61)) + 4|0); + $48 = +HEAPF32[$i62>>2]; + $sub63 = $46 - $48; + $i64 = ((($scratch1)) + 4|0); + HEAPF32[$i64>>2] = $sub63; + $49 = +HEAPF32[$scratch0>>2]; + $i67 = ((($scratch1)) + 4|0); + $50 = +HEAPF32[$i67>>2]; + $add68 = $49 + $50; + $51 = $Fout$addr; + $arrayidx69 = ((($51)) + 8|0); + HEAPF32[$arrayidx69>>2] = $add68; + $i71 = ((($scratch0)) + 4|0); + $52 = +HEAPF32[$i71>>2]; + $53 = +HEAPF32[$scratch1>>2]; + $sub73 = $52 - $53; + $54 = $Fout$addr; + $arrayidx74 = ((($54)) + 8|0); + $i75 = ((($arrayidx74)) + 4|0); + HEAPF32[$i75>>2] = $sub73; + $55 = +HEAPF32[$scratch0>>2]; + $i77 = ((($scratch1)) + 4|0); + $56 = +HEAPF32[$i77>>2]; + $sub78 = $55 - $56; + $57 = $Fout$addr; + $arrayidx79 = ((($57)) + 24|0); + HEAPF32[$arrayidx79>>2] = $sub78; + $i81 = ((($scratch0)) + 4|0); + $58 = +HEAPF32[$i81>>2]; + $59 = +HEAPF32[$scratch1>>2]; + $add83 = $58 + $59; + $60 = $Fout$addr; + $arrayidx84 = ((($60)) + 24|0); + $i85 = ((($arrayidx84)) + 4|0); + HEAPF32[$i85>>2] = $add83; + $61 = $Fout$addr; + $add$ptr = ((($61)) + 32|0); + $Fout$addr = $add$ptr; + $62 = $i; + $inc = (($62) + 1)|0; + $i = $inc; + } + STACKTOP = sp;return; + } + $63 = $m$addr; + $mul = $63<<1; + $m2 = $mul; + $64 = $m$addr; + $mul86 = ($64*3)|0; + $m3 = $mul86; + $65 = $Fout$addr; + $Fout_beg = $65; + $i = 0; + while(1) { + $66 = $i; + $67 = $N$addr; + $cmp88 = ($66|0)<($67|0); + if (!($cmp88)) { + break; + } + $68 = $Fout_beg; + $69 = $i; + $70 = $mm$addr; + $mul90 = Math_imul($69, $70)|0; + $add$ptr91 = (($68) + ($mul90<<3)|0); + $Fout$addr = $add$ptr91; + $71 = $st$addr; + $twiddles = ((($71)) + 48|0); + $72 = HEAP32[$twiddles>>2]|0; + $tw1 = $72; + $tw2 = $72; + $tw3 = $72; + $j = 0; + while(1) { + $73 = $j; + $74 = $m$addr; + $cmp93 = ($73|0)<($74|0); + if (!($cmp93)) { + break; + } + $75 = $Fout$addr; + $76 = $m$addr; + $arrayidx96 = (($75) + ($76<<3)|0); + $77 = +HEAPF32[$arrayidx96>>2]; + $78 = $tw1; + $79 = +HEAPF32[$78>>2]; + $mul99 = $77 * $79; + $80 = $Fout$addr; + $81 = $m$addr; + $arrayidx100 = (($80) + ($81<<3)|0); + $i101 = ((($arrayidx100)) + 4|0); + $82 = +HEAPF32[$i101>>2]; + $83 = $tw1; + $i102 = ((($83)) + 4|0); + $84 = +HEAPF32[$i102>>2]; + $mul103 = $82 * $84; + $sub104 = $mul99 - $mul103; + HEAPF32[$scratch>>2] = $sub104; + $85 = $Fout$addr; + $86 = $m$addr; + $arrayidx107 = (($85) + ($86<<3)|0); + $87 = +HEAPF32[$arrayidx107>>2]; + $88 = $tw1; + $i109 = ((($88)) + 4|0); + $89 = +HEAPF32[$i109>>2]; + $mul110 = $87 * $89; + $90 = $Fout$addr; + $91 = $m$addr; + $arrayidx111 = (($90) + ($91<<3)|0); + $i112 = ((($arrayidx111)) + 4|0); + $92 = +HEAPF32[$i112>>2]; + $93 = $tw1; + $94 = +HEAPF32[$93>>2]; + $mul114 = $92 * $94; + $add115 = $mul110 + $mul114; + $i117 = ((($scratch)) + 4|0); + HEAPF32[$i117>>2] = $add115; + $95 = $Fout$addr; + $96 = $m2; + $arrayidx120 = (($95) + ($96<<3)|0); + $97 = +HEAPF32[$arrayidx120>>2]; + $98 = $tw2; + $99 = +HEAPF32[$98>>2]; + $mul123 = $97 * $99; + $100 = $Fout$addr; + $101 = $m2; + $arrayidx124 = (($100) + ($101<<3)|0); + $i125 = ((($arrayidx124)) + 4|0); + $102 = +HEAPF32[$i125>>2]; + $103 = $tw2; + $i126 = ((($103)) + 4|0); + $104 = +HEAPF32[$i126>>2]; + $mul127 = $102 * $104; + $sub128 = $mul123 - $mul127; + $arrayidx129 = ((($scratch)) + 8|0); + HEAPF32[$arrayidx129>>2] = $sub128; + $105 = $Fout$addr; + $106 = $m2; + $arrayidx131 = (($105) + ($106<<3)|0); + $107 = +HEAPF32[$arrayidx131>>2]; + $108 = $tw2; + $i133 = ((($108)) + 4|0); + $109 = +HEAPF32[$i133>>2]; + $mul134 = $107 * $109; + $110 = $Fout$addr; + $111 = $m2; + $arrayidx135 = (($110) + ($111<<3)|0); + $i136 = ((($arrayidx135)) + 4|0); + $112 = +HEAPF32[$i136>>2]; + $113 = $tw2; + $114 = +HEAPF32[$113>>2]; + $mul138 = $112 * $114; + $add139 = $mul134 + $mul138; + $arrayidx140 = ((($scratch)) + 8|0); + $i141 = ((($arrayidx140)) + 4|0); + HEAPF32[$i141>>2] = $add139; + $115 = $Fout$addr; + $116 = $m3; + $arrayidx144 = (($115) + ($116<<3)|0); + $117 = +HEAPF32[$arrayidx144>>2]; + $118 = $tw3; + $119 = +HEAPF32[$118>>2]; + $mul147 = $117 * $119; + $120 = $Fout$addr; + $121 = $m3; + $arrayidx148 = (($120) + ($121<<3)|0); + $i149 = ((($arrayidx148)) + 4|0); + $122 = +HEAPF32[$i149>>2]; + $123 = $tw3; + $i150 = ((($123)) + 4|0); + $124 = +HEAPF32[$i150>>2]; + $mul151 = $122 * $124; + $sub152 = $mul147 - $mul151; + $arrayidx153 = ((($scratch)) + 16|0); + HEAPF32[$arrayidx153>>2] = $sub152; + $125 = $Fout$addr; + $126 = $m3; + $arrayidx155 = (($125) + ($126<<3)|0); + $127 = +HEAPF32[$arrayidx155>>2]; + $128 = $tw3; + $i157 = ((($128)) + 4|0); + $129 = +HEAPF32[$i157>>2]; + $mul158 = $127 * $129; + $130 = $Fout$addr; + $131 = $m3; + $arrayidx159 = (($130) + ($131<<3)|0); + $i160 = ((($arrayidx159)) + 4|0); + $132 = +HEAPF32[$i160>>2]; + $133 = $tw3; + $134 = +HEAPF32[$133>>2]; + $mul162 = $132 * $134; + $add163 = $mul158 + $mul162; + $arrayidx164 = ((($scratch)) + 16|0); + $i165 = ((($arrayidx164)) + 4|0); + HEAPF32[$i165>>2] = $add163; + $135 = $Fout$addr; + $136 = +HEAPF32[$135>>2]; + $arrayidx169 = ((($scratch)) + 8|0); + $137 = +HEAPF32[$arrayidx169>>2]; + $sub171 = $136 - $137; + $arrayidx172 = ((($scratch)) + 40|0); + HEAPF32[$arrayidx172>>2] = $sub171; + $138 = $Fout$addr; + $i174 = ((($138)) + 4|0); + $139 = +HEAPF32[$i174>>2]; + $arrayidx175 = ((($scratch)) + 8|0); + $i176 = ((($arrayidx175)) + 4|0); + $140 = +HEAPF32[$i176>>2]; + $sub177 = $139 - $140; + $arrayidx178 = ((($scratch)) + 40|0); + $i179 = ((($arrayidx178)) + 4|0); + HEAPF32[$i179>>2] = $sub177; + $arrayidx182 = ((($scratch)) + 8|0); + $141 = +HEAPF32[$arrayidx182>>2]; + $142 = $Fout$addr; + $143 = +HEAPF32[$142>>2]; + $add185 = $143 + $141; + HEAPF32[$142>>2] = $add185; + $arrayidx186 = ((($scratch)) + 8|0); + $i187 = ((($arrayidx186)) + 4|0); + $144 = +HEAPF32[$i187>>2]; + $145 = $Fout$addr; + $i188 = ((($145)) + 4|0); + $146 = +HEAPF32[$i188>>2]; + $add189 = $146 + $144; + HEAPF32[$i188>>2] = $add189; + $147 = +HEAPF32[$scratch>>2]; + $arrayidx194 = ((($scratch)) + 16|0); + $148 = +HEAPF32[$arrayidx194>>2]; + $add196 = $147 + $148; + $arrayidx197 = ((($scratch)) + 24|0); + HEAPF32[$arrayidx197>>2] = $add196; + $i200 = ((($scratch)) + 4|0); + $149 = +HEAPF32[$i200>>2]; + $arrayidx201 = ((($scratch)) + 16|0); + $i202 = ((($arrayidx201)) + 4|0); + $150 = +HEAPF32[$i202>>2]; + $add203 = $149 + $150; + $arrayidx204 = ((($scratch)) + 24|0); + $i205 = ((($arrayidx204)) + 4|0); + HEAPF32[$i205>>2] = $add203; + $151 = +HEAPF32[$scratch>>2]; + $arrayidx210 = ((($scratch)) + 16|0); + $152 = +HEAPF32[$arrayidx210>>2]; + $sub212 = $151 - $152; + $arrayidx213 = ((($scratch)) + 32|0); + HEAPF32[$arrayidx213>>2] = $sub212; + $i216 = ((($scratch)) + 4|0); + $153 = +HEAPF32[$i216>>2]; + $arrayidx217 = ((($scratch)) + 16|0); + $i218 = ((($arrayidx217)) + 4|0); + $154 = +HEAPF32[$i218>>2]; + $sub219 = $153 - $154; + $arrayidx220 = ((($scratch)) + 32|0); + $i221 = ((($arrayidx220)) + 4|0); + HEAPF32[$i221>>2] = $sub219; + $155 = $Fout$addr; + $156 = +HEAPF32[$155>>2]; + $arrayidx225 = ((($scratch)) + 24|0); + $157 = +HEAPF32[$arrayidx225>>2]; + $sub227 = $156 - $157; + $158 = $Fout$addr; + $159 = $m2; + $arrayidx228 = (($158) + ($159<<3)|0); + HEAPF32[$arrayidx228>>2] = $sub227; + $160 = $Fout$addr; + $i230 = ((($160)) + 4|0); + $161 = +HEAPF32[$i230>>2]; + $arrayidx231 = ((($scratch)) + 24|0); + $i232 = ((($arrayidx231)) + 4|0); + $162 = +HEAPF32[$i232>>2]; + $sub233 = $161 - $162; + $163 = $Fout$addr; + $164 = $m2; + $arrayidx234 = (($163) + ($164<<3)|0); + $i235 = ((($arrayidx234)) + 4|0); + HEAPF32[$i235>>2] = $sub233; + $165 = $fstride$addr; + $166 = $tw1; + $add$ptr237 = (($166) + ($165<<3)|0); + $tw1 = $add$ptr237; + $167 = $fstride$addr; + $mul238 = $167<<1; + $168 = $tw2; + $add$ptr239 = (($168) + ($mul238<<3)|0); + $tw2 = $add$ptr239; + $169 = $fstride$addr; + $mul240 = ($169*3)|0; + $170 = $tw3; + $add$ptr241 = (($170) + ($mul240<<3)|0); + $tw3 = $add$ptr241; + $arrayidx243 = ((($scratch)) + 24|0); + $171 = +HEAPF32[$arrayidx243>>2]; + $172 = $Fout$addr; + $173 = +HEAPF32[$172>>2]; + $add246 = $173 + $171; + HEAPF32[$172>>2] = $add246; + $arrayidx247 = ((($scratch)) + 24|0); + $i248 = ((($arrayidx247)) + 4|0); + $174 = +HEAPF32[$i248>>2]; + $175 = $Fout$addr; + $i249 = ((($175)) + 4|0); + $176 = +HEAPF32[$i249>>2]; + $add250 = $176 + $174; + HEAPF32[$i249>>2] = $add250; + $arrayidx252 = ((($scratch)) + 40|0); + $177 = +HEAPF32[$arrayidx252>>2]; + $arrayidx254 = ((($scratch)) + 32|0); + $i255 = ((($arrayidx254)) + 4|0); + $178 = +HEAPF32[$i255>>2]; + $add256 = $177 + $178; + $179 = $Fout$addr; + $180 = $m$addr; + $arrayidx257 = (($179) + ($180<<3)|0); + HEAPF32[$arrayidx257>>2] = $add256; + $arrayidx259 = ((($scratch)) + 40|0); + $i260 = ((($arrayidx259)) + 4|0); + $181 = +HEAPF32[$i260>>2]; + $arrayidx261 = ((($scratch)) + 32|0); + $182 = +HEAPF32[$arrayidx261>>2]; + $sub263 = $181 - $182; + $183 = $Fout$addr; + $184 = $m$addr; + $arrayidx264 = (($183) + ($184<<3)|0); + $i265 = ((($arrayidx264)) + 4|0); + HEAPF32[$i265>>2] = $sub263; + $arrayidx266 = ((($scratch)) + 40|0); + $185 = +HEAPF32[$arrayidx266>>2]; + $arrayidx268 = ((($scratch)) + 32|0); + $i269 = ((($arrayidx268)) + 4|0); + $186 = +HEAPF32[$i269>>2]; + $sub270 = $185 - $186; + $187 = $Fout$addr; + $188 = $m3; + $arrayidx271 = (($187) + ($188<<3)|0); + HEAPF32[$arrayidx271>>2] = $sub270; + $arrayidx273 = ((($scratch)) + 40|0); + $i274 = ((($arrayidx273)) + 4|0); + $189 = +HEAPF32[$i274>>2]; + $arrayidx275 = ((($scratch)) + 32|0); + $190 = +HEAPF32[$arrayidx275>>2]; + $add277 = $189 + $190; + $191 = $Fout$addr; + $192 = $m3; + $arrayidx278 = (($191) + ($192<<3)|0); + $i279 = ((($arrayidx278)) + 4|0); + HEAPF32[$i279>>2] = $add277; + $193 = $Fout$addr; + $incdec$ptr = ((($193)) + 8|0); + $Fout$addr = $incdec$ptr; + $194 = $j; + $inc281 = (($194) + 1)|0; + $j = $inc281; + } + $195 = $i; + $inc284 = (($195) + 1)|0; + $i = $inc284; + } + STACKTOP = sp;return; +} +function _kf_bfly3($Fout,$fstride,$st,$m,$N,$mm) { + $Fout = $Fout|0; + $fstride = $fstride|0; + $st = $st|0; + $m = $m|0; + $N = $N|0; + $mm = $mm|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0, $107 = 0, $108 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0.0; + var $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0.0; + var $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0.0, $54 = 0.0; + var $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0.0; + var $73 = 0.0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0, $85 = 0.0, $86 = 0, $87 = 0, $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0; + var $91 = 0, $92 = 0, $93 = 0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0, $Fout$addr = 0, $Fout_beg = 0, $N$addr = 0, $add = 0.0, $add$ptr = 0, $add$ptr80 = 0, $add$ptr82 = 0, $add111 = 0.0, $add115 = 0.0, $add121 = 0.0, $add140 = 0.0; + var $add44 = 0.0, $add53 = 0.0, $add60 = 0.0, $arrayidx = 0, $arrayidx108 = 0, $arrayidx112 = 0, $arrayidx117 = 0, $arrayidx12 = 0, $arrayidx122 = 0, $arrayidx124 = 0, $arrayidx129 = 0, $arrayidx133 = 0, $arrayidx138 = 0, $arrayidx14 = 0, $arrayidx18 = 0, $arrayidx22 = 0, $arrayidx25 = 0, $arrayidx29 = 0, $arrayidx34 = 0, $arrayidx36 = 0; + var $arrayidx40 = 0, $arrayidx45 = 0, $arrayidx49 = 0, $arrayidx5 = 0, $arrayidx51 = 0, $arrayidx54 = 0, $arrayidx56 = 0, $arrayidx58 = 0, $arrayidx61 = 0, $arrayidx65 = 0, $arrayidx67 = 0, $arrayidx72 = 0, $arrayidx74 = 0, $arrayidx8 = 0, $arrayidx84 = 0, $arrayidx88 = 0, $arrayidx91 = 0, $arrayidx95 = 0, $cmp = 0, $dec = 0; + var $epi3 = 0, $fstride$addr = 0, $i = 0, $i10 = 0, $i102 = 0, $i104 = 0, $i113 = 0, $i114 = 0, $i120 = 0, $i125 = 0, $i130 = 0, $i132 = 0, $i139 = 0, $i16 = 0, $i19 = 0, $i23 = 0, $i30 = 0, $i31 = 0, $i38 = 0, $i41 = 0; + var $i46 = 0, $i57 = 0, $i59 = 0, $i62 = 0, $i73 = 0, $i75 = 0, $i78 = 0, $i9 = 0, $i90 = 0, $i92 = 0, $i96 = 0, $i98 = 0, $inc = 0, $incdec$ptr = 0, $k = 0, $m$addr = 0, $m2 = 0, $mm$addr = 0, $mul = 0, $mul1 = 0; + var $mul101 = 0.0, $mul105 = 0.0, $mul11 = 0.0, $mul17 = 0.0, $mul2 = 0, $mul21 = 0.0, $mul28 = 0.0, $mul32 = 0.0, $mul39 = 0.0, $mul43 = 0.0, $mul7 = 0.0, $mul81 = 0, $mul86 = 0.0, $mul93 = 0.0, $scratch = 0, $st$addr = 0, $sub = 0.0, $sub128 = 0.0, $sub135 = 0.0, $sub33 = 0.0; + var $sub69 = 0.0, $sub76 = 0.0, $sub87 = 0.0, $sub94 = 0.0, $tobool = 0, $tw1 = 0, $tw2 = 0, $twiddles = 0, $twiddles3 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $scratch = sp + 16|0; + $epi3 = sp + 8|0; + $Fout$addr = $Fout; + $fstride$addr = $fstride; + $st$addr = $st; + $m$addr = $m; + $N$addr = $N; + $mm$addr = $mm; + $0 = $m$addr; + $mul = $0<<1; + $m2 = $mul; + $1 = $Fout$addr; + $Fout_beg = $1; + $2 = $st$addr; + $twiddles = ((($2)) + 48|0); + $3 = HEAP32[$twiddles>>2]|0; + $4 = $fstride$addr; + $5 = $m$addr; + $mul1 = Math_imul($4, $5)|0; + $arrayidx = (($3) + ($mul1<<3)|0); + ;HEAP32[$epi3>>2]=HEAP32[$arrayidx>>2]|0;HEAP32[$epi3+4>>2]=HEAP32[$arrayidx+4>>2]|0; + $i = 0; + while(1) { + $6 = $i; + $7 = $N$addr; + $cmp = ($6|0)<($7|0); + if (!($cmp)) { + break; + } + $8 = $Fout_beg; + $9 = $i; + $10 = $mm$addr; + $mul2 = Math_imul($9, $10)|0; + $add$ptr = (($8) + ($mul2<<3)|0); + $Fout$addr = $add$ptr; + $11 = $st$addr; + $twiddles3 = ((($11)) + 48|0); + $12 = HEAP32[$twiddles3>>2]|0; + $tw2 = $12; + $tw1 = $12; + $13 = $m$addr; + $k = $13; + while(1) { + $14 = $Fout$addr; + $15 = $m$addr; + $arrayidx5 = (($14) + ($15<<3)|0); + $16 = +HEAPF32[$arrayidx5>>2]; + $17 = $tw1; + $18 = +HEAPF32[$17>>2]; + $mul7 = $16 * $18; + $19 = $Fout$addr; + $20 = $m$addr; + $arrayidx8 = (($19) + ($20<<3)|0); + $i9 = ((($arrayidx8)) + 4|0); + $21 = +HEAPF32[$i9>>2]; + $22 = $tw1; + $i10 = ((($22)) + 4|0); + $23 = +HEAPF32[$i10>>2]; + $mul11 = $21 * $23; + $sub = $mul7 - $mul11; + $arrayidx12 = ((($scratch)) + 8|0); + HEAPF32[$arrayidx12>>2] = $sub; + $24 = $Fout$addr; + $25 = $m$addr; + $arrayidx14 = (($24) + ($25<<3)|0); + $26 = +HEAPF32[$arrayidx14>>2]; + $27 = $tw1; + $i16 = ((($27)) + 4|0); + $28 = +HEAPF32[$i16>>2]; + $mul17 = $26 * $28; + $29 = $Fout$addr; + $30 = $m$addr; + $arrayidx18 = (($29) + ($30<<3)|0); + $i19 = ((($arrayidx18)) + 4|0); + $31 = +HEAPF32[$i19>>2]; + $32 = $tw1; + $33 = +HEAPF32[$32>>2]; + $mul21 = $31 * $33; + $add = $mul17 + $mul21; + $arrayidx22 = ((($scratch)) + 8|0); + $i23 = ((($arrayidx22)) + 4|0); + HEAPF32[$i23>>2] = $add; + $34 = $Fout$addr; + $35 = $m2; + $arrayidx25 = (($34) + ($35<<3)|0); + $36 = +HEAPF32[$arrayidx25>>2]; + $37 = $tw2; + $38 = +HEAPF32[$37>>2]; + $mul28 = $36 * $38; + $39 = $Fout$addr; + $40 = $m2; + $arrayidx29 = (($39) + ($40<<3)|0); + $i30 = ((($arrayidx29)) + 4|0); + $41 = +HEAPF32[$i30>>2]; + $42 = $tw2; + $i31 = ((($42)) + 4|0); + $43 = +HEAPF32[$i31>>2]; + $mul32 = $41 * $43; + $sub33 = $mul28 - $mul32; + $arrayidx34 = ((($scratch)) + 16|0); + HEAPF32[$arrayidx34>>2] = $sub33; + $44 = $Fout$addr; + $45 = $m2; + $arrayidx36 = (($44) + ($45<<3)|0); + $46 = +HEAPF32[$arrayidx36>>2]; + $47 = $tw2; + $i38 = ((($47)) + 4|0); + $48 = +HEAPF32[$i38>>2]; + $mul39 = $46 * $48; + $49 = $Fout$addr; + $50 = $m2; + $arrayidx40 = (($49) + ($50<<3)|0); + $i41 = ((($arrayidx40)) + 4|0); + $51 = +HEAPF32[$i41>>2]; + $52 = $tw2; + $53 = +HEAPF32[$52>>2]; + $mul43 = $51 * $53; + $add44 = $mul39 + $mul43; + $arrayidx45 = ((($scratch)) + 16|0); + $i46 = ((($arrayidx45)) + 4|0); + HEAPF32[$i46>>2] = $add44; + $arrayidx49 = ((($scratch)) + 8|0); + $54 = +HEAPF32[$arrayidx49>>2]; + $arrayidx51 = ((($scratch)) + 16|0); + $55 = +HEAPF32[$arrayidx51>>2]; + $add53 = $54 + $55; + $arrayidx54 = ((($scratch)) + 24|0); + HEAPF32[$arrayidx54>>2] = $add53; + $arrayidx56 = ((($scratch)) + 8|0); + $i57 = ((($arrayidx56)) + 4|0); + $56 = +HEAPF32[$i57>>2]; + $arrayidx58 = ((($scratch)) + 16|0); + $i59 = ((($arrayidx58)) + 4|0); + $57 = +HEAPF32[$i59>>2]; + $add60 = $56 + $57; + $arrayidx61 = ((($scratch)) + 24|0); + $i62 = ((($arrayidx61)) + 4|0); + HEAPF32[$i62>>2] = $add60; + $arrayidx65 = ((($scratch)) + 8|0); + $58 = +HEAPF32[$arrayidx65>>2]; + $arrayidx67 = ((($scratch)) + 16|0); + $59 = +HEAPF32[$arrayidx67>>2]; + $sub69 = $58 - $59; + HEAPF32[$scratch>>2] = $sub69; + $arrayidx72 = ((($scratch)) + 8|0); + $i73 = ((($arrayidx72)) + 4|0); + $60 = +HEAPF32[$i73>>2]; + $arrayidx74 = ((($scratch)) + 16|0); + $i75 = ((($arrayidx74)) + 4|0); + $61 = +HEAPF32[$i75>>2]; + $sub76 = $60 - $61; + $i78 = ((($scratch)) + 4|0); + HEAPF32[$i78>>2] = $sub76; + $62 = $fstride$addr; + $63 = $tw1; + $add$ptr80 = (($63) + ($62<<3)|0); + $tw1 = $add$ptr80; + $64 = $fstride$addr; + $mul81 = $64<<1; + $65 = $tw2; + $add$ptr82 = (($65) + ($mul81<<3)|0); + $tw2 = $add$ptr82; + $66 = $Fout$addr; + $67 = +HEAPF32[$66>>2]; + $arrayidx84 = ((($scratch)) + 24|0); + $68 = +HEAPF32[$arrayidx84>>2]; + $mul86 = $68 * 0.5; + $sub87 = $67 - $mul86; + $69 = $Fout$addr; + $70 = $m$addr; + $arrayidx88 = (($69) + ($70<<3)|0); + HEAPF32[$arrayidx88>>2] = $sub87; + $71 = $Fout$addr; + $i90 = ((($71)) + 4|0); + $72 = +HEAPF32[$i90>>2]; + $arrayidx91 = ((($scratch)) + 24|0); + $i92 = ((($arrayidx91)) + 4|0); + $73 = +HEAPF32[$i92>>2]; + $mul93 = $73 * 0.5; + $sub94 = $72 - $mul93; + $74 = $Fout$addr; + $75 = $m$addr; + $arrayidx95 = (($74) + ($75<<3)|0); + $i96 = ((($arrayidx95)) + 4|0); + HEAPF32[$i96>>2] = $sub94; + $i98 = ((($epi3)) + 4|0); + $76 = +HEAPF32[$i98>>2]; + $77 = +HEAPF32[$scratch>>2]; + $mul101 = $77 * $76; + HEAPF32[$scratch>>2] = $mul101; + $i102 = ((($epi3)) + 4|0); + $78 = +HEAPF32[$i102>>2]; + $i104 = ((($scratch)) + 4|0); + $79 = +HEAPF32[$i104>>2]; + $mul105 = $79 * $78; + HEAPF32[$i104>>2] = $mul105; + $arrayidx108 = ((($scratch)) + 24|0); + $80 = +HEAPF32[$arrayidx108>>2]; + $81 = $Fout$addr; + $82 = +HEAPF32[$81>>2]; + $add111 = $82 + $80; + HEAPF32[$81>>2] = $add111; + $arrayidx112 = ((($scratch)) + 24|0); + $i113 = ((($arrayidx112)) + 4|0); + $83 = +HEAPF32[$i113>>2]; + $84 = $Fout$addr; + $i114 = ((($84)) + 4|0); + $85 = +HEAPF32[$i114>>2]; + $add115 = $85 + $83; + HEAPF32[$i114>>2] = $add115; + $86 = $Fout$addr; + $87 = $m$addr; + $arrayidx117 = (($86) + ($87<<3)|0); + $88 = +HEAPF32[$arrayidx117>>2]; + $i120 = ((($scratch)) + 4|0); + $89 = +HEAPF32[$i120>>2]; + $add121 = $88 + $89; + $90 = $Fout$addr; + $91 = $m2; + $arrayidx122 = (($90) + ($91<<3)|0); + HEAPF32[$arrayidx122>>2] = $add121; + $92 = $Fout$addr; + $93 = $m$addr; + $arrayidx124 = (($92) + ($93<<3)|0); + $i125 = ((($arrayidx124)) + 4|0); + $94 = +HEAPF32[$i125>>2]; + $95 = +HEAPF32[$scratch>>2]; + $sub128 = $94 - $95; + $96 = $Fout$addr; + $97 = $m2; + $arrayidx129 = (($96) + ($97<<3)|0); + $i130 = ((($arrayidx129)) + 4|0); + HEAPF32[$i130>>2] = $sub128; + $i132 = ((($scratch)) + 4|0); + $98 = +HEAPF32[$i132>>2]; + $99 = $Fout$addr; + $100 = $m$addr; + $arrayidx133 = (($99) + ($100<<3)|0); + $101 = +HEAPF32[$arrayidx133>>2]; + $sub135 = $101 - $98; + HEAPF32[$arrayidx133>>2] = $sub135; + $102 = +HEAPF32[$scratch>>2]; + $103 = $Fout$addr; + $104 = $m$addr; + $arrayidx138 = (($103) + ($104<<3)|0); + $i139 = ((($arrayidx138)) + 4|0); + $105 = +HEAPF32[$i139>>2]; + $add140 = $105 + $102; + HEAPF32[$i139>>2] = $add140; + $106 = $Fout$addr; + $incdec$ptr = ((($106)) + 8|0); + $Fout$addr = $incdec$ptr; + $107 = $k; + $dec = (($107) + -1)|0; + $k = $dec; + $tobool = ($dec|0)!=(0); + if (!($tobool)) { + break; + } + } + $108 = $i; + $inc = (($108) + 1)|0; + $i = $inc; + } + STACKTOP = sp;return; +} +function _kf_bfly5($Fout,$fstride,$st,$m,$N,$mm) { + $Fout = $Fout|0; + $fstride = $fstride|0; + $st = $st|0; + $m = $m|0; + $N = $N|0; + $mm = $mm|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0, $107 = 0.0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0.0, $112 = 0, $113 = 0.0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0.0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0; + var $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0, $147 = 0.0, $148 = 0.0, $149 = 0.0, $15 = 0, $150 = 0.0, $151 = 0.0; + var $152 = 0.0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0, $169 = 0.0, $17 = 0; + var $170 = 0.0, $171 = 0, $172 = 0.0, $173 = 0.0, $174 = 0, $175 = 0.0, $176 = 0.0, $177 = 0, $178 = 0.0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0.0, $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0.0; + var $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0.0, $192 = 0.0, $193 = 0.0, $194 = 0.0, $195 = 0.0, $196 = 0.0, $197 = 0.0, $198 = 0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0, $202 = 0.0, $203 = 0.0, $204 = 0, $205 = 0.0; + var $206 = 0.0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0; + var $31 = 0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0; + var $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0, $67 = 0; + var $68 = 0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0; + var $86 = 0, $87 = 0.0, $88 = 0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0.0, $94 = 0, $95 = 0.0, $96 = 0, $97 = 0, $98 = 0, $99 = 0.0, $Fout$addr = 0, $Fout0 = 0, $Fout1 = 0, $Fout2 = 0, $Fout3 = 0; + var $Fout4 = 0, $Fout_beg = 0, $N$addr = 0, $add = 0.0, $add$ptr = 0, $add$ptr11 = 0, $add$ptr13 = 0, $add$ptr7 = 0, $add$ptr9 = 0, $add101 = 0.0, $add133 = 0.0, $add142 = 0.0, $add149 = 0.0, $add174 = 0.0, $add181 = 0.0, $add205 = 0.0, $add207 = 0.0, $add212 = 0.0, $add214 = 0.0, $add221 = 0.0; + var $add226 = 0.0, $add235 = 0.0, $add240 = 0.0, $add251 = 0.0, $add285 = 0.0, $add291 = 0.0, $add300 = 0.0, $add305 = 0.0, $add314 = 0.0, $add319 = 0.0, $add331 = 0.0, $add350 = 0.0, $add356 = 0.0, $add69 = 0.0, $arrayidx = 0, $arrayidx102 = 0, $arrayidx109 = 0, $arrayidx115 = 0, $arrayidx119 = 0, $arrayidx124 = 0; + var $arrayidx130 = 0, $arrayidx134 = 0, $arrayidx138 = 0, $arrayidx140 = 0, $arrayidx143 = 0, $arrayidx145 = 0, $arrayidx147 = 0, $arrayidx150 = 0, $arrayidx154 = 0, $arrayidx156 = 0, $arrayidx159 = 0, $arrayidx161 = 0, $arrayidx163 = 0, $arrayidx166 = 0, $arrayidx170 = 0, $arrayidx172 = 0, $arrayidx175 = 0, $arrayidx177 = 0, $arrayidx179 = 0, $arrayidx182 = 0; + var $arrayidx186 = 0, $arrayidx188 = 0, $arrayidx19 = 0, $arrayidx191 = 0, $arrayidx193 = 0, $arrayidx195 = 0, $arrayidx198 = 0, $arrayidx201 = 0, $arrayidx203 = 0, $arrayidx208 = 0, $arrayidx210 = 0, $arrayidx217 = 0, $arrayidx222 = 0, $arrayidx227 = 0, $arrayidx231 = 0, $arrayidx236 = 0, $arrayidx24 = 0, $arrayidx241 = 0, $arrayidx243 = 0, $arrayidx247 = 0; + var $arrayidx252 = 0, $arrayidx254 = 0, $arrayidx259 = 0, $arrayidx264 = 0, $arrayidx267 = 0, $arrayidx269 = 0, $arrayidx27 = 0, $arrayidx273 = 0, $arrayidx275 = 0, $arrayidx281 = 0, $arrayidx283 = 0, $arrayidx287 = 0, $arrayidx289 = 0, $arrayidx296 = 0, $arrayidx301 = 0, $arrayidx306 = 0, $arrayidx31 = 0, $arrayidx310 = 0, $arrayidx315 = 0, $arrayidx320 = 0; + var $arrayidx322 = 0, $arrayidx327 = 0, $arrayidx332 = 0, $arrayidx334 = 0, $arrayidx338 = 0, $arrayidx343 = 0, $arrayidx346 = 0, $arrayidx348 = 0, $arrayidx352 = 0, $arrayidx354 = 0, $arrayidx36 = 0, $arrayidx360 = 0, $arrayidx362 = 0, $arrayidx366 = 0, $arrayidx368 = 0, $arrayidx39 = 0, $arrayidx4 = 0, $arrayidx45 = 0, $arrayidx51 = 0, $arrayidx55 = 0; + var $arrayidx60 = 0, $arrayidx66 = 0, $arrayidx70 = 0, $arrayidx77 = 0, $arrayidx83 = 0, $arrayidx87 = 0, $arrayidx92 = 0, $arrayidx98 = 0, $cmp = 0, $cmp15 = 0, $fstride$addr = 0, $i = 0, $i103 = 0, $i112 = 0, $i116 = 0, $i125 = 0, $i127 = 0, $i135 = 0, $i146 = 0, $i148 = 0; + var $i151 = 0, $i162 = 0, $i164 = 0, $i167 = 0, $i178 = 0, $i180 = 0, $i183 = 0, $i194 = 0, $i196 = 0, $i199 = 0, $i209 = 0, $i211 = 0, $i213 = 0, $i22 = 0, $i230 = 0, $i232 = 0, $i237 = 0, $i242 = 0, $i244 = 0, $i245 = 0; + var $i248 = 0, $i249 = 0, $i25 = 0, $i256 = 0, $i261 = 0, $i265 = 0, $i274 = 0, $i276 = 0, $i278 = 0, $i288 = 0, $i290 = 0, $i292 = 0, $i309 = 0, $i311 = 0, $i316 = 0, $i32 = 0, $i321 = 0, $i323 = 0, $i324 = 0, $i328 = 0; + var $i329 = 0, $i336 = 0, $i34 = 0, $i340 = 0, $i344 = 0, $i353 = 0, $i355 = 0, $i357 = 0, $i367 = 0, $i369 = 0, $i371 = 0, $i40 = 0, $i48 = 0, $i52 = 0, $i61 = 0, $i63 = 0, $i71 = 0, $i80 = 0, $i84 = 0, $i93 = 0; + var $i95 = 0, $inc = 0, $inc378 = 0, $incdec$ptr = 0, $incdec$ptr373 = 0, $incdec$ptr374 = 0, $incdec$ptr375 = 0, $incdec$ptr376 = 0, $m$addr = 0, $mm$addr = 0, $mul = 0, $mul10 = 0, $mul100 = 0.0, $mul107 = 0, $mul108 = 0, $mul111 = 0.0, $mul113 = 0, $mul114 = 0, $mul117 = 0.0, $mul12 = 0; + var $mul122 = 0, $mul123 = 0, $mul126 = 0.0, $mul128 = 0, $mul129 = 0, $mul132 = 0.0, $mul18 = 0, $mul2 = 0, $mul21 = 0.0, $mul220 = 0.0, $mul225 = 0.0, $mul23 = 0, $mul234 = 0.0, $mul239 = 0.0, $mul246 = 0.0, $mul250 = 0.0, $mul257 = 0.0, $mul26 = 0.0, $mul262 = 0.0, $mul299 = 0.0; + var $mul3 = 0, $mul30 = 0, $mul304 = 0.0, $mul313 = 0.0, $mul318 = 0.0, $mul325 = 0.0, $mul33 = 0.0, $mul330 = 0.0, $mul337 = 0.0, $mul341 = 0.0, $mul35 = 0, $mul38 = 0.0, $mul43 = 0, $mul44 = 0, $mul47 = 0.0, $mul49 = 0, $mul50 = 0, $mul53 = 0.0, $mul58 = 0, $mul59 = 0; + var $mul6 = 0, $mul62 = 0.0, $mul64 = 0, $mul65 = 0, $mul68 = 0.0, $mul75 = 0, $mul76 = 0, $mul79 = 0.0, $mul8 = 0, $mul81 = 0, $mul82 = 0, $mul85 = 0.0, $mul90 = 0, $mul91 = 0, $mul94 = 0.0, $mul96 = 0, $mul97 = 0, $scratch = 0, $st$addr = 0, $sub = 0.0; + var $sub118 = 0.0, $sub158 = 0.0, $sub165 = 0.0, $sub190 = 0.0, $sub197 = 0.0, $sub258 = 0.0, $sub263 = 0.0, $sub271 = 0.0, $sub277 = 0.0, $sub326 = 0.0, $sub342 = 0.0, $sub364 = 0.0, $sub370 = 0.0, $sub54 = 0.0, $sub86 = 0.0, $tw = 0, $twiddles = 0, $twiddles1 = 0, $twiddles5 = 0, $u = 0; + var $ya = 0, $yb = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 192|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(192|0); + $scratch = sp + 32|0; + $ya = sp + 16|0; + $yb = sp + 8|0; + $Fout$addr = $Fout; + $fstride$addr = $fstride; + $st$addr = $st; + $m$addr = $m; + $N$addr = $N; + $mm$addr = $mm; + $0 = $Fout$addr; + $Fout_beg = $0; + $1 = $st$addr; + $twiddles = ((($1)) + 48|0); + $2 = HEAP32[$twiddles>>2]|0; + $3 = $fstride$addr; + $4 = $m$addr; + $mul = Math_imul($3, $4)|0; + $arrayidx = (($2) + ($mul<<3)|0); + ;HEAP32[$ya>>2]=HEAP32[$arrayidx>>2]|0;HEAP32[$ya+4>>2]=HEAP32[$arrayidx+4>>2]|0; + $5 = $st$addr; + $twiddles1 = ((($5)) + 48|0); + $6 = HEAP32[$twiddles1>>2]|0; + $7 = $fstride$addr; + $mul2 = $7<<1; + $8 = $m$addr; + $mul3 = Math_imul($mul2, $8)|0; + $arrayidx4 = (($6) + ($mul3<<3)|0); + ;HEAP32[$yb>>2]=HEAP32[$arrayidx4>>2]|0;HEAP32[$yb+4>>2]=HEAP32[$arrayidx4+4>>2]|0; + $9 = $st$addr; + $twiddles5 = ((($9)) + 48|0); + $10 = HEAP32[$twiddles5>>2]|0; + $tw = $10; + $i = 0; + while(1) { + $11 = $i; + $12 = $N$addr; + $cmp = ($11|0)<($12|0); + if (!($cmp)) { + break; + } + $13 = $Fout_beg; + $14 = $i; + $15 = $mm$addr; + $mul6 = Math_imul($14, $15)|0; + $add$ptr = (($13) + ($mul6<<3)|0); + $Fout$addr = $add$ptr; + $16 = $Fout$addr; + $Fout0 = $16; + $17 = $Fout0; + $18 = $m$addr; + $add$ptr7 = (($17) + ($18<<3)|0); + $Fout1 = $add$ptr7; + $19 = $Fout0; + $20 = $m$addr; + $mul8 = $20<<1; + $add$ptr9 = (($19) + ($mul8<<3)|0); + $Fout2 = $add$ptr9; + $21 = $Fout0; + $22 = $m$addr; + $mul10 = ($22*3)|0; + $add$ptr11 = (($21) + ($mul10<<3)|0); + $Fout3 = $add$ptr11; + $23 = $Fout0; + $24 = $m$addr; + $mul12 = $24<<2; + $add$ptr13 = (($23) + ($mul12<<3)|0); + $Fout4 = $add$ptr13; + $u = 0; + while(1) { + $25 = $u; + $26 = $m$addr; + $cmp15 = ($25|0)<($26|0); + if (!($cmp15)) { + break; + } + $27 = $Fout0; + ;HEAP32[$scratch>>2]=HEAP32[$27>>2]|0;HEAP32[$scratch+4>>2]=HEAP32[$27+4>>2]|0; + $28 = $Fout1; + $29 = +HEAPF32[$28>>2]; + $30 = $tw; + $31 = $u; + $32 = $fstride$addr; + $mul18 = Math_imul($31, $32)|0; + $arrayidx19 = (($30) + ($mul18<<3)|0); + $33 = +HEAPF32[$arrayidx19>>2]; + $mul21 = $29 * $33; + $34 = $Fout1; + $i22 = ((($34)) + 4|0); + $35 = +HEAPF32[$i22>>2]; + $36 = $tw; + $37 = $u; + $38 = $fstride$addr; + $mul23 = Math_imul($37, $38)|0; + $arrayidx24 = (($36) + ($mul23<<3)|0); + $i25 = ((($arrayidx24)) + 4|0); + $39 = +HEAPF32[$i25>>2]; + $mul26 = $35 * $39; + $sub = $mul21 - $mul26; + $arrayidx27 = ((($scratch)) + 8|0); + HEAPF32[$arrayidx27>>2] = $sub; + $40 = $Fout1; + $41 = +HEAPF32[$40>>2]; + $42 = $tw; + $43 = $u; + $44 = $fstride$addr; + $mul30 = Math_imul($43, $44)|0; + $arrayidx31 = (($42) + ($mul30<<3)|0); + $i32 = ((($arrayidx31)) + 4|0); + $45 = +HEAPF32[$i32>>2]; + $mul33 = $41 * $45; + $46 = $Fout1; + $i34 = ((($46)) + 4|0); + $47 = +HEAPF32[$i34>>2]; + $48 = $tw; + $49 = $u; + $50 = $fstride$addr; + $mul35 = Math_imul($49, $50)|0; + $arrayidx36 = (($48) + ($mul35<<3)|0); + $51 = +HEAPF32[$arrayidx36>>2]; + $mul38 = $47 * $51; + $add = $mul33 + $mul38; + $arrayidx39 = ((($scratch)) + 8|0); + $i40 = ((($arrayidx39)) + 4|0); + HEAPF32[$i40>>2] = $add; + $52 = $Fout2; + $53 = +HEAPF32[$52>>2]; + $54 = $tw; + $55 = $u; + $mul43 = $55<<1; + $56 = $fstride$addr; + $mul44 = Math_imul($mul43, $56)|0; + $arrayidx45 = (($54) + ($mul44<<3)|0); + $57 = +HEAPF32[$arrayidx45>>2]; + $mul47 = $53 * $57; + $58 = $Fout2; + $i48 = ((($58)) + 4|0); + $59 = +HEAPF32[$i48>>2]; + $60 = $tw; + $61 = $u; + $mul49 = $61<<1; + $62 = $fstride$addr; + $mul50 = Math_imul($mul49, $62)|0; + $arrayidx51 = (($60) + ($mul50<<3)|0); + $i52 = ((($arrayidx51)) + 4|0); + $63 = +HEAPF32[$i52>>2]; + $mul53 = $59 * $63; + $sub54 = $mul47 - $mul53; + $arrayidx55 = ((($scratch)) + 16|0); + HEAPF32[$arrayidx55>>2] = $sub54; + $64 = $Fout2; + $65 = +HEAPF32[$64>>2]; + $66 = $tw; + $67 = $u; + $mul58 = $67<<1; + $68 = $fstride$addr; + $mul59 = Math_imul($mul58, $68)|0; + $arrayidx60 = (($66) + ($mul59<<3)|0); + $i61 = ((($arrayidx60)) + 4|0); + $69 = +HEAPF32[$i61>>2]; + $mul62 = $65 * $69; + $70 = $Fout2; + $i63 = ((($70)) + 4|0); + $71 = +HEAPF32[$i63>>2]; + $72 = $tw; + $73 = $u; + $mul64 = $73<<1; + $74 = $fstride$addr; + $mul65 = Math_imul($mul64, $74)|0; + $arrayidx66 = (($72) + ($mul65<<3)|0); + $75 = +HEAPF32[$arrayidx66>>2]; + $mul68 = $71 * $75; + $add69 = $mul62 + $mul68; + $arrayidx70 = ((($scratch)) + 16|0); + $i71 = ((($arrayidx70)) + 4|0); + HEAPF32[$i71>>2] = $add69; + $76 = $Fout3; + $77 = +HEAPF32[$76>>2]; + $78 = $tw; + $79 = $u; + $mul75 = ($79*3)|0; + $80 = $fstride$addr; + $mul76 = Math_imul($mul75, $80)|0; + $arrayidx77 = (($78) + ($mul76<<3)|0); + $81 = +HEAPF32[$arrayidx77>>2]; + $mul79 = $77 * $81; + $82 = $Fout3; + $i80 = ((($82)) + 4|0); + $83 = +HEAPF32[$i80>>2]; + $84 = $tw; + $85 = $u; + $mul81 = ($85*3)|0; + $86 = $fstride$addr; + $mul82 = Math_imul($mul81, $86)|0; + $arrayidx83 = (($84) + ($mul82<<3)|0); + $i84 = ((($arrayidx83)) + 4|0); + $87 = +HEAPF32[$i84>>2]; + $mul85 = $83 * $87; + $sub86 = $mul79 - $mul85; + $arrayidx87 = ((($scratch)) + 24|0); + HEAPF32[$arrayidx87>>2] = $sub86; + $88 = $Fout3; + $89 = +HEAPF32[$88>>2]; + $90 = $tw; + $91 = $u; + $mul90 = ($91*3)|0; + $92 = $fstride$addr; + $mul91 = Math_imul($mul90, $92)|0; + $arrayidx92 = (($90) + ($mul91<<3)|0); + $i93 = ((($arrayidx92)) + 4|0); + $93 = +HEAPF32[$i93>>2]; + $mul94 = $89 * $93; + $94 = $Fout3; + $i95 = ((($94)) + 4|0); + $95 = +HEAPF32[$i95>>2]; + $96 = $tw; + $97 = $u; + $mul96 = ($97*3)|0; + $98 = $fstride$addr; + $mul97 = Math_imul($mul96, $98)|0; + $arrayidx98 = (($96) + ($mul97<<3)|0); + $99 = +HEAPF32[$arrayidx98>>2]; + $mul100 = $95 * $99; + $add101 = $mul94 + $mul100; + $arrayidx102 = ((($scratch)) + 24|0); + $i103 = ((($arrayidx102)) + 4|0); + HEAPF32[$i103>>2] = $add101; + $100 = $Fout4; + $101 = +HEAPF32[$100>>2]; + $102 = $tw; + $103 = $u; + $mul107 = $103<<2; + $104 = $fstride$addr; + $mul108 = Math_imul($mul107, $104)|0; + $arrayidx109 = (($102) + ($mul108<<3)|0); + $105 = +HEAPF32[$arrayidx109>>2]; + $mul111 = $101 * $105; + $106 = $Fout4; + $i112 = ((($106)) + 4|0); + $107 = +HEAPF32[$i112>>2]; + $108 = $tw; + $109 = $u; + $mul113 = $109<<2; + $110 = $fstride$addr; + $mul114 = Math_imul($mul113, $110)|0; + $arrayidx115 = (($108) + ($mul114<<3)|0); + $i116 = ((($arrayidx115)) + 4|0); + $111 = +HEAPF32[$i116>>2]; + $mul117 = $107 * $111; + $sub118 = $mul111 - $mul117; + $arrayidx119 = ((($scratch)) + 32|0); + HEAPF32[$arrayidx119>>2] = $sub118; + $112 = $Fout4; + $113 = +HEAPF32[$112>>2]; + $114 = $tw; + $115 = $u; + $mul122 = $115<<2; + $116 = $fstride$addr; + $mul123 = Math_imul($mul122, $116)|0; + $arrayidx124 = (($114) + ($mul123<<3)|0); + $i125 = ((($arrayidx124)) + 4|0); + $117 = +HEAPF32[$i125>>2]; + $mul126 = $113 * $117; + $118 = $Fout4; + $i127 = ((($118)) + 4|0); + $119 = +HEAPF32[$i127>>2]; + $120 = $tw; + $121 = $u; + $mul128 = $121<<2; + $122 = $fstride$addr; + $mul129 = Math_imul($mul128, $122)|0; + $arrayidx130 = (($120) + ($mul129<<3)|0); + $123 = +HEAPF32[$arrayidx130>>2]; + $mul132 = $119 * $123; + $add133 = $mul126 + $mul132; + $arrayidx134 = ((($scratch)) + 32|0); + $i135 = ((($arrayidx134)) + 4|0); + HEAPF32[$i135>>2] = $add133; + $arrayidx138 = ((($scratch)) + 8|0); + $124 = +HEAPF32[$arrayidx138>>2]; + $arrayidx140 = ((($scratch)) + 32|0); + $125 = +HEAPF32[$arrayidx140>>2]; + $add142 = $124 + $125; + $arrayidx143 = ((($scratch)) + 56|0); + HEAPF32[$arrayidx143>>2] = $add142; + $arrayidx145 = ((($scratch)) + 8|0); + $i146 = ((($arrayidx145)) + 4|0); + $126 = +HEAPF32[$i146>>2]; + $arrayidx147 = ((($scratch)) + 32|0); + $i148 = ((($arrayidx147)) + 4|0); + $127 = +HEAPF32[$i148>>2]; + $add149 = $126 + $127; + $arrayidx150 = ((($scratch)) + 56|0); + $i151 = ((($arrayidx150)) + 4|0); + HEAPF32[$i151>>2] = $add149; + $arrayidx154 = ((($scratch)) + 8|0); + $128 = +HEAPF32[$arrayidx154>>2]; + $arrayidx156 = ((($scratch)) + 32|0); + $129 = +HEAPF32[$arrayidx156>>2]; + $sub158 = $128 - $129; + $arrayidx159 = ((($scratch)) + 80|0); + HEAPF32[$arrayidx159>>2] = $sub158; + $arrayidx161 = ((($scratch)) + 8|0); + $i162 = ((($arrayidx161)) + 4|0); + $130 = +HEAPF32[$i162>>2]; + $arrayidx163 = ((($scratch)) + 32|0); + $i164 = ((($arrayidx163)) + 4|0); + $131 = +HEAPF32[$i164>>2]; + $sub165 = $130 - $131; + $arrayidx166 = ((($scratch)) + 80|0); + $i167 = ((($arrayidx166)) + 4|0); + HEAPF32[$i167>>2] = $sub165; + $arrayidx170 = ((($scratch)) + 16|0); + $132 = +HEAPF32[$arrayidx170>>2]; + $arrayidx172 = ((($scratch)) + 24|0); + $133 = +HEAPF32[$arrayidx172>>2]; + $add174 = $132 + $133; + $arrayidx175 = ((($scratch)) + 64|0); + HEAPF32[$arrayidx175>>2] = $add174; + $arrayidx177 = ((($scratch)) + 16|0); + $i178 = ((($arrayidx177)) + 4|0); + $134 = +HEAPF32[$i178>>2]; + $arrayidx179 = ((($scratch)) + 24|0); + $i180 = ((($arrayidx179)) + 4|0); + $135 = +HEAPF32[$i180>>2]; + $add181 = $134 + $135; + $arrayidx182 = ((($scratch)) + 64|0); + $i183 = ((($arrayidx182)) + 4|0); + HEAPF32[$i183>>2] = $add181; + $arrayidx186 = ((($scratch)) + 16|0); + $136 = +HEAPF32[$arrayidx186>>2]; + $arrayidx188 = ((($scratch)) + 24|0); + $137 = +HEAPF32[$arrayidx188>>2]; + $sub190 = $136 - $137; + $arrayidx191 = ((($scratch)) + 72|0); + HEAPF32[$arrayidx191>>2] = $sub190; + $arrayidx193 = ((($scratch)) + 16|0); + $i194 = ((($arrayidx193)) + 4|0); + $138 = +HEAPF32[$i194>>2]; + $arrayidx195 = ((($scratch)) + 24|0); + $i196 = ((($arrayidx195)) + 4|0); + $139 = +HEAPF32[$i196>>2]; + $sub197 = $138 - $139; + $arrayidx198 = ((($scratch)) + 72|0); + $i199 = ((($arrayidx198)) + 4|0); + HEAPF32[$i199>>2] = $sub197; + $arrayidx201 = ((($scratch)) + 56|0); + $140 = +HEAPF32[$arrayidx201>>2]; + $arrayidx203 = ((($scratch)) + 64|0); + $141 = +HEAPF32[$arrayidx203>>2]; + $add205 = $140 + $141; + $142 = $Fout0; + $143 = +HEAPF32[$142>>2]; + $add207 = $143 + $add205; + HEAPF32[$142>>2] = $add207; + $arrayidx208 = ((($scratch)) + 56|0); + $i209 = ((($arrayidx208)) + 4|0); + $144 = +HEAPF32[$i209>>2]; + $arrayidx210 = ((($scratch)) + 64|0); + $i211 = ((($arrayidx210)) + 4|0); + $145 = +HEAPF32[$i211>>2]; + $add212 = $144 + $145; + $146 = $Fout0; + $i213 = ((($146)) + 4|0); + $147 = +HEAPF32[$i213>>2]; + $add214 = $147 + $add212; + HEAPF32[$i213>>2] = $add214; + $148 = +HEAPF32[$scratch>>2]; + $arrayidx217 = ((($scratch)) + 56|0); + $149 = +HEAPF32[$arrayidx217>>2]; + $150 = +HEAPF32[$ya>>2]; + $mul220 = $149 * $150; + $add221 = $148 + $mul220; + $arrayidx222 = ((($scratch)) + 64|0); + $151 = +HEAPF32[$arrayidx222>>2]; + $152 = +HEAPF32[$yb>>2]; + $mul225 = $151 * $152; + $add226 = $add221 + $mul225; + $arrayidx227 = ((($scratch)) + 40|0); + HEAPF32[$arrayidx227>>2] = $add226; + $i230 = ((($scratch)) + 4|0); + $153 = +HEAPF32[$i230>>2]; + $arrayidx231 = ((($scratch)) + 56|0); + $i232 = ((($arrayidx231)) + 4|0); + $154 = +HEAPF32[$i232>>2]; + $155 = +HEAPF32[$ya>>2]; + $mul234 = $154 * $155; + $add235 = $153 + $mul234; + $arrayidx236 = ((($scratch)) + 64|0); + $i237 = ((($arrayidx236)) + 4|0); + $156 = +HEAPF32[$i237>>2]; + $157 = +HEAPF32[$yb>>2]; + $mul239 = $156 * $157; + $add240 = $add235 + $mul239; + $arrayidx241 = ((($scratch)) + 40|0); + $i242 = ((($arrayidx241)) + 4|0); + HEAPF32[$i242>>2] = $add240; + $arrayidx243 = ((($scratch)) + 80|0); + $i244 = ((($arrayidx243)) + 4|0); + $158 = +HEAPF32[$i244>>2]; + $i245 = ((($ya)) + 4|0); + $159 = +HEAPF32[$i245>>2]; + $mul246 = $158 * $159; + $arrayidx247 = ((($scratch)) + 72|0); + $i248 = ((($arrayidx247)) + 4|0); + $160 = +HEAPF32[$i248>>2]; + $i249 = ((($yb)) + 4|0); + $161 = +HEAPF32[$i249>>2]; + $mul250 = $160 * $161; + $add251 = $mul246 + $mul250; + $arrayidx252 = ((($scratch)) + 48|0); + HEAPF32[$arrayidx252>>2] = $add251; + $arrayidx254 = ((($scratch)) + 80|0); + $162 = +HEAPF32[$arrayidx254>>2]; + $i256 = ((($ya)) + 4|0); + $163 = +HEAPF32[$i256>>2]; + $mul257 = $162 * $163; + $sub258 = - $mul257; + $arrayidx259 = ((($scratch)) + 72|0); + $164 = +HEAPF32[$arrayidx259>>2]; + $i261 = ((($yb)) + 4|0); + $165 = +HEAPF32[$i261>>2]; + $mul262 = $164 * $165; + $sub263 = $sub258 - $mul262; + $arrayidx264 = ((($scratch)) + 48|0); + $i265 = ((($arrayidx264)) + 4|0); + HEAPF32[$i265>>2] = $sub263; + $arrayidx267 = ((($scratch)) + 40|0); + $166 = +HEAPF32[$arrayidx267>>2]; + $arrayidx269 = ((($scratch)) + 48|0); + $167 = +HEAPF32[$arrayidx269>>2]; + $sub271 = $166 - $167; + $168 = $Fout1; + HEAPF32[$168>>2] = $sub271; + $arrayidx273 = ((($scratch)) + 40|0); + $i274 = ((($arrayidx273)) + 4|0); + $169 = +HEAPF32[$i274>>2]; + $arrayidx275 = ((($scratch)) + 48|0); + $i276 = ((($arrayidx275)) + 4|0); + $170 = +HEAPF32[$i276>>2]; + $sub277 = $169 - $170; + $171 = $Fout1; + $i278 = ((($171)) + 4|0); + HEAPF32[$i278>>2] = $sub277; + $arrayidx281 = ((($scratch)) + 40|0); + $172 = +HEAPF32[$arrayidx281>>2]; + $arrayidx283 = ((($scratch)) + 48|0); + $173 = +HEAPF32[$arrayidx283>>2]; + $add285 = $172 + $173; + $174 = $Fout4; + HEAPF32[$174>>2] = $add285; + $arrayidx287 = ((($scratch)) + 40|0); + $i288 = ((($arrayidx287)) + 4|0); + $175 = +HEAPF32[$i288>>2]; + $arrayidx289 = ((($scratch)) + 48|0); + $i290 = ((($arrayidx289)) + 4|0); + $176 = +HEAPF32[$i290>>2]; + $add291 = $175 + $176; + $177 = $Fout4; + $i292 = ((($177)) + 4|0); + HEAPF32[$i292>>2] = $add291; + $178 = +HEAPF32[$scratch>>2]; + $arrayidx296 = ((($scratch)) + 56|0); + $179 = +HEAPF32[$arrayidx296>>2]; + $180 = +HEAPF32[$yb>>2]; + $mul299 = $179 * $180; + $add300 = $178 + $mul299; + $arrayidx301 = ((($scratch)) + 64|0); + $181 = +HEAPF32[$arrayidx301>>2]; + $182 = +HEAPF32[$ya>>2]; + $mul304 = $181 * $182; + $add305 = $add300 + $mul304; + $arrayidx306 = ((($scratch)) + 88|0); + HEAPF32[$arrayidx306>>2] = $add305; + $i309 = ((($scratch)) + 4|0); + $183 = +HEAPF32[$i309>>2]; + $arrayidx310 = ((($scratch)) + 56|0); + $i311 = ((($arrayidx310)) + 4|0); + $184 = +HEAPF32[$i311>>2]; + $185 = +HEAPF32[$yb>>2]; + $mul313 = $184 * $185; + $add314 = $183 + $mul313; + $arrayidx315 = ((($scratch)) + 64|0); + $i316 = ((($arrayidx315)) + 4|0); + $186 = +HEAPF32[$i316>>2]; + $187 = +HEAPF32[$ya>>2]; + $mul318 = $186 * $187; + $add319 = $add314 + $mul318; + $arrayidx320 = ((($scratch)) + 88|0); + $i321 = ((($arrayidx320)) + 4|0); + HEAPF32[$i321>>2] = $add319; + $arrayidx322 = ((($scratch)) + 80|0); + $i323 = ((($arrayidx322)) + 4|0); + $188 = +HEAPF32[$i323>>2]; + $i324 = ((($yb)) + 4|0); + $189 = +HEAPF32[$i324>>2]; + $mul325 = $188 * $189; + $sub326 = - $mul325; + $arrayidx327 = ((($scratch)) + 72|0); + $i328 = ((($arrayidx327)) + 4|0); + $190 = +HEAPF32[$i328>>2]; + $i329 = ((($ya)) + 4|0); + $191 = +HEAPF32[$i329>>2]; + $mul330 = $190 * $191; + $add331 = $sub326 + $mul330; + $arrayidx332 = ((($scratch)) + 96|0); + HEAPF32[$arrayidx332>>2] = $add331; + $arrayidx334 = ((($scratch)) + 80|0); + $192 = +HEAPF32[$arrayidx334>>2]; + $i336 = ((($yb)) + 4|0); + $193 = +HEAPF32[$i336>>2]; + $mul337 = $192 * $193; + $arrayidx338 = ((($scratch)) + 72|0); + $194 = +HEAPF32[$arrayidx338>>2]; + $i340 = ((($ya)) + 4|0); + $195 = +HEAPF32[$i340>>2]; + $mul341 = $194 * $195; + $sub342 = $mul337 - $mul341; + $arrayidx343 = ((($scratch)) + 96|0); + $i344 = ((($arrayidx343)) + 4|0); + HEAPF32[$i344>>2] = $sub342; + $arrayidx346 = ((($scratch)) + 88|0); + $196 = +HEAPF32[$arrayidx346>>2]; + $arrayidx348 = ((($scratch)) + 96|0); + $197 = +HEAPF32[$arrayidx348>>2]; + $add350 = $196 + $197; + $198 = $Fout2; + HEAPF32[$198>>2] = $add350; + $arrayidx352 = ((($scratch)) + 88|0); + $i353 = ((($arrayidx352)) + 4|0); + $199 = +HEAPF32[$i353>>2]; + $arrayidx354 = ((($scratch)) + 96|0); + $i355 = ((($arrayidx354)) + 4|0); + $200 = +HEAPF32[$i355>>2]; + $add356 = $199 + $200; + $201 = $Fout2; + $i357 = ((($201)) + 4|0); + HEAPF32[$i357>>2] = $add356; + $arrayidx360 = ((($scratch)) + 88|0); + $202 = +HEAPF32[$arrayidx360>>2]; + $arrayidx362 = ((($scratch)) + 96|0); + $203 = +HEAPF32[$arrayidx362>>2]; + $sub364 = $202 - $203; + $204 = $Fout3; + HEAPF32[$204>>2] = $sub364; + $arrayidx366 = ((($scratch)) + 88|0); + $i367 = ((($arrayidx366)) + 4|0); + $205 = +HEAPF32[$i367>>2]; + $arrayidx368 = ((($scratch)) + 96|0); + $i369 = ((($arrayidx368)) + 4|0); + $206 = +HEAPF32[$i369>>2]; + $sub370 = $205 - $206; + $207 = $Fout3; + $i371 = ((($207)) + 4|0); + HEAPF32[$i371>>2] = $sub370; + $208 = $Fout0; + $incdec$ptr = ((($208)) + 8|0); + $Fout0 = $incdec$ptr; + $209 = $Fout1; + $incdec$ptr373 = ((($209)) + 8|0); + $Fout1 = $incdec$ptr373; + $210 = $Fout2; + $incdec$ptr374 = ((($210)) + 8|0); + $Fout2 = $incdec$ptr374; + $211 = $Fout3; + $incdec$ptr375 = ((($211)) + 8|0); + $Fout3 = $incdec$ptr375; + $212 = $Fout4; + $incdec$ptr376 = ((($212)) + 8|0); + $Fout4 = $incdec$ptr376; + $213 = $u; + $inc = (($213) + 1)|0; + $u = $inc; + } + $214 = $i; + $inc378 = (($214) + 1)|0; + $i = $inc378; + } + STACKTOP = sp;return; +} +function _clt_mdct_backward_c($l,$in,$out,$window,$overlap,$shift,$stride,$arch) { + $l = $l|0; + $in = $in|0; + $out = $out|0; + $window = $window|0; + $overlap = $overlap|0; + $shift = $shift|0; + $stride = $stride|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0.0, $103 = 0, $104 = 0, $105 = 0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0; + var $116 = 0, $117 = 0.0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0, $133 = 0.0; + var $134 = 0, $135 = 0.0, $136 = 0.0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0.0, $146 = 0.0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $16 = 0; + var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0; + var $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0; + var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; + var $71 = 0, $72 = 0, $73 = 0.0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0; + var $9 = 0, $90 = 0.0, $91 = 0, $92 = 0.0, $93 = 0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0.0, $98 = 0, $99 = 0, $N = 0, $N2 = 0, $N4 = 0, $add = 0, $add$ptr = 0, $add$ptr29 = 0, $add$ptr31 = 0, $add$ptr38 = 0, $add$ptr4 = 0; + var $add$ptr40 = 0, $add$ptr42 = 0, $add$ptr43 = 0, $add$ptr44 = 0, $add$ptr6 = 0, $add$ptr84 = 0, $add$ptr85 = 0, $add$ptr90 = 0, $add$ptr91 = 0, $add$ptr93 = 0, $add$ptr94 = 0, $add105 = 0.0, $add16 = 0.0, $add19 = 0, $add24 = 0, $add48 = 0, $add58 = 0, $add62 = 0.0, $add78 = 0.0, $arch$addr = 0; + var $arrayidx12 = 0, $arrayidx14 = 0, $arrayidx17 = 0, $arrayidx20 = 0, $arrayidx25 = 0, $arrayidx27 = 0, $arrayidx36 = 0, $arrayidx55 = 0, $arrayidx57 = 0, $arrayidx59 = 0, $arrayidx66 = 0, $arrayidx69 = 0, $arrayidx7 = 0, $arrayidx72 = 0, $arrayidx75 = 0, $arrayidx83 = 0, $bitrev = 0, $bitrev8 = 0, $cmp = 0, $cmp10 = 0; + var $cmp50 = 0, $cmp96 = 0, $conv = 0, $div = 0, $i = 0, $idx$neg = 0, $im = 0.0, $in$addr = 0, $inc = 0, $inc110 = 0, $inc33 = 0, $inc87 = 0, $incdec$ptr = 0, $incdec$ptr102 = 0, $incdec$ptr106 = 0, $incdec$ptr107 = 0, $incdec$ptr108 = 0, $kfft = 0, $kfft35 = 0, $l$addr = 0; + var $mul = 0, $mul100 = 0.0, $mul103 = 0.0, $mul104 = 0.0, $mul13 = 0.0, $mul15 = 0.0, $mul18 = 0.0, $mul21 = 0.0, $mul23 = 0, $mul26 = 0, $mul28 = 0, $mul30 = 0, $mul60 = 0.0, $mul61 = 0.0, $mul63 = 0.0, $mul64 = 0.0, $mul76 = 0.0, $mul77 = 0.0, $mul79 = 0.0, $mul80 = 0.0; + var $mul99 = 0.0, $out$addr = 0, $overlap$addr = 0, $re = 0.0, $rev = 0, $shift$addr = 0, $shr = 0, $shr3 = 0, $shr37 = 0, $shr39 = 0, $shr41 = 0, $shr49 = 0, $shr5 = 0, $stride$addr = 0, $sub = 0, $sub101 = 0.0, $sub22 = 0.0, $sub65 = 0.0, $sub70 = 0, $sub71 = 0; + var $sub73 = 0, $sub74 = 0, $sub81 = 0.0, $t = 0, $t0 = 0.0, $t1 = 0.0, $t45 = 0, $trig = 0, $trig1 = 0, $window$addr = 0, $wp1 = 0, $wp2 = 0, $x1 = 0.0, $x2 = 0.0, $xp1 = 0, $xp189 = 0, $xp2 = 0, $yi = 0.0, $yi54 = 0.0, $yp = 0; + var $yp0 = 0, $yp1 = 0, $yp192 = 0, $yr = 0.0, $yr53 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); + $l$addr = $l; + $in$addr = $in; + $out$addr = $out; + $window$addr = $window; + $overlap$addr = $overlap; + $shift$addr = $shift; + $stride$addr = $stride; + $arch$addr = $arch; + $0 = $l$addr; + $1 = HEAP32[$0>>2]|0; + $N = $1; + $2 = $l$addr; + $trig1 = ((($2)) + 24|0); + $3 = HEAP32[$trig1>>2]|0; + $trig = $3; + $i = 0; + while(1) { + $4 = $i; + $5 = $shift$addr; + $cmp = ($4|0)<($5|0); + $6 = $N; + $shr = $6 >> 1; + if (!($cmp)) { + break; + } + $N = $shr; + $7 = $N; + $8 = $trig; + $add$ptr = (($8) + ($7<<2)|0); + $trig = $add$ptr; + $9 = $i; + $inc = (($9) + 1)|0; + $i = $inc; + } + $N2 = $shr; + $10 = $N; + $shr3 = $10 >> 2; + $N4 = $shr3; + $11 = $in$addr; + $xp1 = $11; + $12 = $in$addr; + $13 = $stride$addr; + $14 = $N2; + $sub = (($14) - 1)|0; + $mul = Math_imul($13, $sub)|0; + $add$ptr4 = (($12) + ($mul<<2)|0); + $xp2 = $add$ptr4; + $15 = $out$addr; + $16 = $overlap$addr; + $shr5 = $16 >> 1; + $add$ptr6 = (($15) + ($shr5<<2)|0); + $yp = $add$ptr6; + $17 = $trig; + $t = $17; + $18 = $l$addr; + $kfft = ((($18)) + 8|0); + $19 = $shift$addr; + $arrayidx7 = (($kfft) + ($19<<2)|0); + $20 = HEAP32[$arrayidx7>>2]|0; + $bitrev8 = ((($20)) + 44|0); + $21 = HEAP32[$bitrev8>>2]|0; + $bitrev = $21; + $i = 0; + while(1) { + $22 = $i; + $23 = $N4; + $cmp10 = ($22|0)<($23|0); + if (!($cmp10)) { + break; + } + $24 = $bitrev; + $incdec$ptr = ((($24)) + 2|0); + $bitrev = $incdec$ptr; + $25 = HEAP16[$24>>1]|0; + $conv = $25 << 16 >> 16; + $rev = $conv; + $26 = $xp2; + $27 = +HEAPF32[$26>>2]; + $28 = $t; + $29 = $i; + $arrayidx12 = (($28) + ($29<<2)|0); + $30 = +HEAPF32[$arrayidx12>>2]; + $mul13 = $27 * $30; + $31 = $xp1; + $32 = +HEAPF32[$31>>2]; + $33 = $t; + $34 = $N4; + $35 = $i; + $add = (($34) + ($35))|0; + $arrayidx14 = (($33) + ($add<<2)|0); + $36 = +HEAPF32[$arrayidx14>>2]; + $mul15 = $32 * $36; + $add16 = $mul13 + $mul15; + $yr = $add16; + $37 = $xp1; + $38 = +HEAPF32[$37>>2]; + $39 = $t; + $40 = $i; + $arrayidx17 = (($39) + ($40<<2)|0); + $41 = +HEAPF32[$arrayidx17>>2]; + $mul18 = $38 * $41; + $42 = $xp2; + $43 = +HEAPF32[$42>>2]; + $44 = $t; + $45 = $N4; + $46 = $i; + $add19 = (($45) + ($46))|0; + $arrayidx20 = (($44) + ($add19<<2)|0); + $47 = +HEAPF32[$arrayidx20>>2]; + $mul21 = $43 * $47; + $sub22 = $mul18 - $mul21; + $yi = $sub22; + $48 = $yr; + $49 = $yp; + $50 = $rev; + $mul23 = $50<<1; + $add24 = (($mul23) + 1)|0; + $arrayidx25 = (($49) + ($add24<<2)|0); + HEAPF32[$arrayidx25>>2] = $48; + $51 = $yi; + $52 = $yp; + $53 = $rev; + $mul26 = $53<<1; + $arrayidx27 = (($52) + ($mul26<<2)|0); + HEAPF32[$arrayidx27>>2] = $51; + $54 = $stride$addr; + $mul28 = $54<<1; + $55 = $xp1; + $add$ptr29 = (($55) + ($mul28<<2)|0); + $xp1 = $add$ptr29; + $56 = $stride$addr; + $mul30 = $56<<1; + $57 = $xp2; + $idx$neg = (0 - ($mul30))|0; + $add$ptr31 = (($57) + ($idx$neg<<2)|0); + $xp2 = $add$ptr31; + $58 = $i; + $inc33 = (($58) + 1)|0; + $i = $inc33; + } + $59 = $l$addr; + $kfft35 = ((($59)) + 8|0); + $60 = $shift$addr; + $arrayidx36 = (($kfft35) + ($60<<2)|0); + $61 = HEAP32[$arrayidx36>>2]|0; + $62 = $out$addr; + $63 = $overlap$addr; + $shr37 = $63 >> 1; + $add$ptr38 = (($62) + ($shr37<<2)|0); + _opus_fft_impl($61,$add$ptr38); + $64 = $out$addr; + $65 = $overlap$addr; + $shr39 = $65 >> 1; + $add$ptr40 = (($64) + ($shr39<<2)|0); + $yp0 = $add$ptr40; + $66 = $out$addr; + $67 = $overlap$addr; + $shr41 = $67 >> 1; + $add$ptr42 = (($66) + ($shr41<<2)|0); + $68 = $N2; + $add$ptr43 = (($add$ptr42) + ($68<<2)|0); + $add$ptr44 = ((($add$ptr43)) + -8|0); + $yp1 = $add$ptr44; + $69 = $trig; + $t45 = $69; + $i = 0; + while(1) { + $70 = $i; + $71 = $N4; + $add48 = (($71) + 1)|0; + $shr49 = $add48 >> 1; + $cmp50 = ($70|0)<($shr49|0); + if (!($cmp50)) { + break; + } + $72 = $yp0; + $arrayidx55 = ((($72)) + 4|0); + $73 = +HEAPF32[$arrayidx55>>2]; + $re = $73; + $74 = $yp0; + $75 = +HEAPF32[$74>>2]; + $im = $75; + $76 = $t45; + $77 = $i; + $arrayidx57 = (($76) + ($77<<2)|0); + $78 = +HEAPF32[$arrayidx57>>2]; + $t0 = $78; + $79 = $t45; + $80 = $N4; + $81 = $i; + $add58 = (($80) + ($81))|0; + $arrayidx59 = (($79) + ($add58<<2)|0); + $82 = +HEAPF32[$arrayidx59>>2]; + $t1 = $82; + $83 = $re; + $84 = $t0; + $mul60 = $83 * $84; + $85 = $im; + $86 = $t1; + $mul61 = $85 * $86; + $add62 = $mul60 + $mul61; + $yr53 = $add62; + $87 = $re; + $88 = $t1; + $mul63 = $87 * $88; + $89 = $im; + $90 = $t0; + $mul64 = $89 * $90; + $sub65 = $mul63 - $mul64; + $yi54 = $sub65; + $91 = $yp1; + $arrayidx66 = ((($91)) + 4|0); + $92 = +HEAPF32[$arrayidx66>>2]; + $re = $92; + $93 = $yp1; + $94 = +HEAPF32[$93>>2]; + $im = $94; + $95 = $yr53; + $96 = $yp0; + HEAPF32[$96>>2] = $95; + $97 = $yi54; + $98 = $yp1; + $arrayidx69 = ((($98)) + 4|0); + HEAPF32[$arrayidx69>>2] = $97; + $99 = $t45; + $100 = $N4; + $101 = $i; + $sub70 = (($100) - ($101))|0; + $sub71 = (($sub70) - 1)|0; + $arrayidx72 = (($99) + ($sub71<<2)|0); + $102 = +HEAPF32[$arrayidx72>>2]; + $t0 = $102; + $103 = $t45; + $104 = $N2; + $105 = $i; + $sub73 = (($104) - ($105))|0; + $sub74 = (($sub73) - 1)|0; + $arrayidx75 = (($103) + ($sub74<<2)|0); + $106 = +HEAPF32[$arrayidx75>>2]; + $t1 = $106; + $107 = $re; + $108 = $t0; + $mul76 = $107 * $108; + $109 = $im; + $110 = $t1; + $mul77 = $109 * $110; + $add78 = $mul76 + $mul77; + $yr53 = $add78; + $111 = $re; + $112 = $t1; + $mul79 = $111 * $112; + $113 = $im; + $114 = $t0; + $mul80 = $113 * $114; + $sub81 = $mul79 - $mul80; + $yi54 = $sub81; + $115 = $yr53; + $116 = $yp1; + HEAPF32[$116>>2] = $115; + $117 = $yi54; + $118 = $yp0; + $arrayidx83 = ((($118)) + 4|0); + HEAPF32[$arrayidx83>>2] = $117; + $119 = $yp0; + $add$ptr84 = ((($119)) + 8|0); + $yp0 = $add$ptr84; + $120 = $yp1; + $add$ptr85 = ((($120)) + -8|0); + $yp1 = $add$ptr85; + $121 = $i; + $inc87 = (($121) + 1)|0; + $i = $inc87; + } + $122 = $out$addr; + $123 = $overlap$addr; + $add$ptr90 = (($122) + ($123<<2)|0); + $add$ptr91 = ((($add$ptr90)) + -4|0); + $xp189 = $add$ptr91; + $124 = $out$addr; + $yp192 = $124; + $125 = $window$addr; + $wp1 = $125; + $126 = $window$addr; + $127 = $overlap$addr; + $add$ptr93 = (($126) + ($127<<2)|0); + $add$ptr94 = ((($add$ptr93)) + -4|0); + $wp2 = $add$ptr94; + $i = 0; + while(1) { + $128 = $i; + $129 = $overlap$addr; + $div = (($129|0) / 2)&-1; + $cmp96 = ($128|0)<($div|0); + if (!($cmp96)) { + break; + } + $130 = $xp189; + $131 = +HEAPF32[$130>>2]; + $x1 = $131; + $132 = $yp192; + $133 = +HEAPF32[$132>>2]; + $x2 = $133; + $134 = $wp2; + $135 = +HEAPF32[$134>>2]; + $136 = $x2; + $mul99 = $135 * $136; + $137 = $wp1; + $138 = +HEAPF32[$137>>2]; + $139 = $x1; + $mul100 = $138 * $139; + $sub101 = $mul99 - $mul100; + $140 = $yp192; + $incdec$ptr102 = ((($140)) + 4|0); + $yp192 = $incdec$ptr102; + HEAPF32[$140>>2] = $sub101; + $141 = $wp1; + $142 = +HEAPF32[$141>>2]; + $143 = $x2; + $mul103 = $142 * $143; + $144 = $wp2; + $145 = +HEAPF32[$144>>2]; + $146 = $x1; + $mul104 = $145 * $146; + $add105 = $mul103 + $mul104; + $147 = $xp189; + $incdec$ptr106 = ((($147)) + -4|0); + $xp189 = $incdec$ptr106; + HEAPF32[$147>>2] = $add105; + $148 = $wp1; + $incdec$ptr107 = ((($148)) + 4|0); + $wp1 = $incdec$ptr107; + $149 = $wp2; + $incdec$ptr108 = ((($149)) + -4|0); + $wp2 = $incdec$ptr108; + $150 = $i; + $inc110 = (($150) + 1)|0; + $i = $inc110; + } + STACKTOP = sp;return; +} +function _opus_custom_mode_create($Fs,$frame_size,$error) { + $Fs = $Fs|0; + $frame_size = $frame_size|0; + $error = $error|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; + var $7 = 0, $8 = 0, $9 = 0, $Fs$addr = 0, $arrayidx = 0, $arrayidx10 = 0, $arrayidx6 = 0, $arrayidx7 = 0, $cmp = 0, $cmp2 = 0, $cmp5 = 0, $cmp8 = 0, $error$addr = 0, $frame_size$addr = 0, $i = 0, $inc = 0, $inc13 = 0, $j = 0, $mul = 0, $nbShortMdcts = 0; + var $retval = 0, $shl = 0, $shortMdctSize = 0, $tobool = 0, $tobool15 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $Fs$addr = $Fs; + $frame_size$addr = $frame_size; + $error$addr = $error; + $i = 0; + L1: while(1) { + $0 = $i; + $cmp = ($0|0)<(1); + if (!($cmp)) { + label = 12; + break; + } + $j = 0; + while(1) { + $1 = $j; + $cmp2 = ($1|0)<(4); + if (!($cmp2)) { + break; + } + $2 = $Fs$addr; + $3 = $i; + $arrayidx = (184 + ($3<<2)|0); + $4 = HEAP32[$arrayidx>>2]|0; + $5 = HEAP32[$4>>2]|0; + $cmp5 = ($2|0)==($5|0); + if ($cmp5) { + $6 = $frame_size$addr; + $7 = $j; + $shl = $6 << $7; + $8 = $i; + $arrayidx6 = (184 + ($8<<2)|0); + $9 = HEAP32[$arrayidx6>>2]|0; + $shortMdctSize = ((($9)) + 44|0); + $10 = HEAP32[$shortMdctSize>>2]|0; + $11 = $i; + $arrayidx7 = (184 + ($11<<2)|0); + $12 = HEAP32[$arrayidx7>>2]|0; + $nbShortMdcts = ((($12)) + 40|0); + $13 = HEAP32[$nbShortMdcts>>2]|0; + $mul = Math_imul($10, $13)|0; + $cmp8 = ($shl|0)==($mul|0); + if ($cmp8) { + label = 7; + break L1; + } + } + $18 = $j; + $inc = (($18) + 1)|0; + $j = $inc; + } + $19 = $i; + $inc13 = (($19) + 1)|0; + $i = $inc13; + } + if ((label|0) == 7) { + $14 = $error$addr; + $tobool = ($14|0)!=(0|0); + if ($tobool) { + $15 = $error$addr; + HEAP32[$15>>2] = 0; + } + $16 = $i; + $arrayidx10 = (184 + ($16<<2)|0); + $17 = HEAP32[$arrayidx10>>2]|0; + $retval = $17; + $22 = $retval; + STACKTOP = sp;return ($22|0); + } + else if ((label|0) == 12) { + $20 = $error$addr; + $tobool15 = ($20|0)!=(0|0); + if ($tobool15) { + $21 = $error$addr; + HEAP32[$21>>2] = -1; + } + $retval = 0; + $22 = $retval; + STACKTOP = sp;return ($22|0); + } + return (0)|0; +} +function _pitch_downsample($x,$x_lp,$len,$C,$arch) { + $x = $x|0; + $x_lp = $x_lp|0; + $len = $len|0; + $C = $C|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0; + var $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0.0; + var $63 = 0.0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; + var $9 = 0.0, $C$addr = 0, $ac = 0, $add = 0, $add10 = 0.0, $add101 = 0.0, $add18 = 0.0, $add32 = 0, $add34 = 0.0, $add39 = 0.0, $add42 = 0.0, $add5 = 0.0, $add51 = 0.0, $add54 = 0.0, $add86 = 0.0, $add91 = 0.0, $add96 = 0.0, $arch$addr = 0, $arrayidx1 = 0, $arrayidx102 = 0; + var $arrayidx103 = 0, $arrayidx105 = 0, $arrayidx12 = 0, $arrayidx14 = 0, $arrayidx26 = 0, $arrayidx29 = 0, $arrayidx30 = 0, $arrayidx33 = 0, $arrayidx36 = 0, $arrayidx38 = 0, $arrayidx4 = 0, $arrayidx41 = 0, $arrayidx47 = 0, $arrayidx49 = 0, $arrayidx61 = 0, $arrayidx67 = 0, $arrayidx79 = 0, $arrayidx81 = 0, $arrayidx88 = 0, $arrayidx9 = 0; + var $arrayidx92 = 0, $arrayidx93 = 0, $arrayidx94 = 0, $arrayidx97 = 0, $arrayidx98 = 0, $arrayidx99 = 0, $c1 = 0.0, $cmp = 0, $cmp21 = 0, $cmp24 = 0, $cmp59 = 0, $cmp75 = 0, $conv = 0.0, $conv64 = 0.0, $i = 0, $inc = 0, $inc44 = 0, $inc70 = 0, $inc83 = 0, $len$addr = 0; + var $lpc = 0, $lpc2 = 0, $mem = 0, $mul = 0, $mul100 = 0.0, $mul104 = 0.0, $mul11 = 0.0, $mul15 = 0.0, $mul19 = 0.0, $mul27 = 0, $mul3 = 0, $mul31 = 0, $mul35 = 0.0, $mul37 = 0, $mul40 = 0.0, $mul48 = 0.0, $mul52 = 0.0, $mul57 = 0.0, $mul6 = 0.0, $mul62 = 0.0; + var $mul63 = 0.0, $mul65 = 0.0, $mul66 = 0.0, $mul78 = 0.0, $mul8 = 0, $mul80 = 0.0, $mul90 = 0.0, $mul95 = 0.0, $shr = 0, $shr107 = 0, $shr23 = 0, $shr55 = 0, $sub = 0, $sub28 = 0, $sub68 = 0.0, $tmp = 0.0, $x$addr = 0, $x_lp$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $ac = sp + 68|0; + $lpc = sp + 48|0; + $mem = sp + 24|0; + $lpc2 = sp + 4|0; + $x$addr = $x; + $x_lp$addr = $x_lp; + $len$addr = $len; + $C$addr = $C; + $arch$addr = $arch; + $tmp = 1.0; + ;HEAP32[$mem>>2]=0|0;HEAP32[$mem+4>>2]=0|0;HEAP32[$mem+8>>2]=0|0;HEAP32[$mem+12>>2]=0|0;HEAP32[$mem+16>>2]=0|0; + $c1 = 0.80000001192092896; + $i = 1; + while(1) { + $0 = $i; + $1 = $len$addr; + $shr = $1 >> 1; + $cmp = ($0|0)<($shr|0); + $2 = $x$addr; + $3 = HEAP32[$2>>2]|0; + if (!($cmp)) { + break; + } + $4 = $i; + $mul = $4<<1; + $sub = (($mul) - 1)|0; + $arrayidx1 = (($3) + ($sub<<2)|0); + $5 = +HEAPF32[$arrayidx1>>2]; + $6 = $x$addr; + $7 = HEAP32[$6>>2]|0; + $8 = $i; + $mul3 = $8<<1; + $add = (($mul3) + 1)|0; + $arrayidx4 = (($7) + ($add<<2)|0); + $9 = +HEAPF32[$arrayidx4>>2]; + $add5 = $5 + $9; + $mul6 = 0.5 * $add5; + $10 = $x$addr; + $11 = HEAP32[$10>>2]|0; + $12 = $i; + $mul8 = $12<<1; + $arrayidx9 = (($11) + ($mul8<<2)|0); + $13 = +HEAPF32[$arrayidx9>>2]; + $add10 = $mul6 + $13; + $mul11 = 0.5 * $add10; + $14 = $x_lp$addr; + $15 = $i; + $arrayidx12 = (($14) + ($15<<2)|0); + HEAPF32[$arrayidx12>>2] = $mul11; + $16 = $i; + $inc = (($16) + 1)|0; + $i = $inc; + } + $arrayidx14 = ((($3)) + 4|0); + $17 = +HEAPF32[$arrayidx14>>2]; + $mul15 = 0.5 * $17; + $18 = $x$addr; + $19 = HEAP32[$18>>2]|0; + $20 = +HEAPF32[$19>>2]; + $add18 = $mul15 + $20; + $mul19 = 0.5 * $add18; + $21 = $x_lp$addr; + HEAPF32[$21>>2] = $mul19; + $22 = $C$addr; + $cmp21 = ($22|0)==(2); + if ($cmp21) { + $i = 1; + while(1) { + $23 = $i; + $24 = $len$addr; + $shr23 = $24 >> 1; + $cmp24 = ($23|0)<($shr23|0); + $25 = $x$addr; + $arrayidx26 = ((($25)) + 4|0); + $26 = HEAP32[$arrayidx26>>2]|0; + if (!($cmp24)) { + break; + } + $27 = $i; + $mul27 = $27<<1; + $sub28 = (($mul27) - 1)|0; + $arrayidx29 = (($26) + ($sub28<<2)|0); + $28 = +HEAPF32[$arrayidx29>>2]; + $29 = $x$addr; + $arrayidx30 = ((($29)) + 4|0); + $30 = HEAP32[$arrayidx30>>2]|0; + $31 = $i; + $mul31 = $31<<1; + $add32 = (($mul31) + 1)|0; + $arrayidx33 = (($30) + ($add32<<2)|0); + $32 = +HEAPF32[$arrayidx33>>2]; + $add34 = $28 + $32; + $mul35 = 0.5 * $add34; + $33 = $x$addr; + $arrayidx36 = ((($33)) + 4|0); + $34 = HEAP32[$arrayidx36>>2]|0; + $35 = $i; + $mul37 = $35<<1; + $arrayidx38 = (($34) + ($mul37<<2)|0); + $36 = +HEAPF32[$arrayidx38>>2]; + $add39 = $mul35 + $36; + $mul40 = 0.5 * $add39; + $37 = $x_lp$addr; + $38 = $i; + $arrayidx41 = (($37) + ($38<<2)|0); + $39 = +HEAPF32[$arrayidx41>>2]; + $add42 = $39 + $mul40; + HEAPF32[$arrayidx41>>2] = $add42; + $40 = $i; + $inc44 = (($40) + 1)|0; + $i = $inc44; + } + $arrayidx47 = ((($26)) + 4|0); + $41 = +HEAPF32[$arrayidx47>>2]; + $mul48 = 0.5 * $41; + $42 = $x$addr; + $arrayidx49 = ((($42)) + 4|0); + $43 = HEAP32[$arrayidx49>>2]|0; + $44 = +HEAPF32[$43>>2]; + $add51 = $mul48 + $44; + $mul52 = 0.5 * $add51; + $45 = $x_lp$addr; + $46 = +HEAPF32[$45>>2]; + $add54 = $46 + $mul52; + HEAPF32[$45>>2] = $add54; + } + $47 = $x_lp$addr; + $48 = $len$addr; + $shr55 = $48 >> 1; + $49 = $arch$addr; + (__celt_autocorr($47,$ac,0,0,4,$shr55,$49)|0); + $50 = +HEAPF32[$ac>>2]; + $mul57 = $50 * 1.0001000165939331; + HEAPF32[$ac>>2] = $mul57; + $i = 1; + while(1) { + $51 = $i; + $cmp59 = ($51|0)<=(4); + if (!($cmp59)) { + break; + } + $52 = $i; + $arrayidx61 = (($ac) + ($52<<2)|0); + $53 = +HEAPF32[$arrayidx61>>2]; + $54 = $i; + $conv = (+($54|0)); + $mul62 = 0.0080000003799796104 * $conv; + $mul63 = $53 * $mul62; + $55 = $i; + $conv64 = (+($55|0)); + $mul65 = 0.0080000003799796104 * $conv64; + $mul66 = $mul63 * $mul65; + $56 = $i; + $arrayidx67 = (($ac) + ($56<<2)|0); + $57 = +HEAPF32[$arrayidx67>>2]; + $sub68 = $57 - $mul66; + HEAPF32[$arrayidx67>>2] = $sub68; + $58 = $i; + $inc70 = (($58) + 1)|0; + $i = $inc70; + } + __celt_lpc($lpc,$ac,4); + $i = 0; + while(1) { + $59 = $i; + $cmp75 = ($59|0)<(4); + if (!($cmp75)) { + break; + } + $60 = $tmp; + $mul78 = 0.89999997615814208 * $60; + $tmp = $mul78; + $61 = $i; + $arrayidx79 = (($lpc) + ($61<<2)|0); + $62 = +HEAPF32[$arrayidx79>>2]; + $63 = $tmp; + $mul80 = $62 * $63; + $64 = $i; + $arrayidx81 = (($lpc) + ($64<<2)|0); + HEAPF32[$arrayidx81>>2] = $mul80; + $65 = $i; + $inc83 = (($65) + 1)|0; + $i = $inc83; + } + $66 = +HEAPF32[$lpc>>2]; + $add86 = $66 + 0.80000001192092896; + HEAPF32[$lpc2>>2] = $add86; + $arrayidx88 = ((($lpc)) + 4|0); + $67 = +HEAPF32[$arrayidx88>>2]; + $68 = $c1; + $69 = +HEAPF32[$lpc>>2]; + $mul90 = $68 * $69; + $add91 = $67 + $mul90; + $arrayidx92 = ((($lpc2)) + 4|0); + HEAPF32[$arrayidx92>>2] = $add91; + $arrayidx93 = ((($lpc)) + 8|0); + $70 = +HEAPF32[$arrayidx93>>2]; + $71 = $c1; + $arrayidx94 = ((($lpc)) + 4|0); + $72 = +HEAPF32[$arrayidx94>>2]; + $mul95 = $71 * $72; + $add96 = $70 + $mul95; + $arrayidx97 = ((($lpc2)) + 8|0); + HEAPF32[$arrayidx97>>2] = $add96; + $arrayidx98 = ((($lpc)) + 12|0); + $73 = +HEAPF32[$arrayidx98>>2]; + $74 = $c1; + $arrayidx99 = ((($lpc)) + 8|0); + $75 = +HEAPF32[$arrayidx99>>2]; + $mul100 = $74 * $75; + $add101 = $73 + $mul100; + $arrayidx102 = ((($lpc2)) + 12|0); + HEAPF32[$arrayidx102>>2] = $add101; + $76 = $c1; + $arrayidx103 = ((($lpc)) + 12|0); + $77 = +HEAPF32[$arrayidx103>>2]; + $mul104 = $76 * $77; + $arrayidx105 = ((($lpc2)) + 16|0); + HEAPF32[$arrayidx105>>2] = $mul104; + $78 = $x_lp$addr; + $79 = $x_lp$addr; + $80 = $len$addr; + $shr107 = $80 >> 1; + _celt_fir5($78,$lpc2,$79,$shr107,$mem); + STACKTOP = sp;return; +} +function _celt_fir5($x,$num,$y,$N,$mem) { + $x = $x|0; + $num = $num|0; + $y = $y|0; + $N = $N|0; + $mem = $mem|0; + var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0; + var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0; + var $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $7 = 0.0, $8 = 0; + var $9 = 0.0, $N$addr = 0, $add = 0.0, $add12 = 0.0, $add14 = 0.0, $add16 = 0.0, $add18 = 0.0, $arrayidx1 = 0, $arrayidx10 = 0, $arrayidx19 = 0, $arrayidx2 = 0, $arrayidx20 = 0, $arrayidx22 = 0, $arrayidx23 = 0, $arrayidx24 = 0, $arrayidx25 = 0, $arrayidx3 = 0, $arrayidx4 = 0, $arrayidx6 = 0, $arrayidx7 = 0; + var $arrayidx8 = 0, $arrayidx9 = 0, $cmp = 0, $i = 0, $inc = 0, $mem$addr = 0, $mem0 = 0.0, $mem1 = 0.0, $mem2 = 0.0, $mem3 = 0.0, $mem4 = 0.0, $mul = 0.0, $mul11 = 0.0, $mul13 = 0.0, $mul15 = 0.0, $mul17 = 0.0, $num$addr = 0, $num0 = 0.0, $num1 = 0.0, $num2 = 0.0; + var $num3 = 0.0, $num4 = 0.0, $sum = 0.0, $x$addr = 0, $y$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); + $x$addr = $x; + $num$addr = $num; + $y$addr = $y; + $N$addr = $N; + $mem$addr = $mem; + $0 = $num$addr; + $1 = +HEAPF32[$0>>2]; + $num0 = $1; + $2 = $num$addr; + $arrayidx1 = ((($2)) + 4|0); + $3 = +HEAPF32[$arrayidx1>>2]; + $num1 = $3; + $4 = $num$addr; + $arrayidx2 = ((($4)) + 8|0); + $5 = +HEAPF32[$arrayidx2>>2]; + $num2 = $5; + $6 = $num$addr; + $arrayidx3 = ((($6)) + 12|0); + $7 = +HEAPF32[$arrayidx3>>2]; + $num3 = $7; + $8 = $num$addr; + $arrayidx4 = ((($8)) + 16|0); + $9 = +HEAPF32[$arrayidx4>>2]; + $num4 = $9; + $10 = $mem$addr; + $11 = +HEAPF32[$10>>2]; + $mem0 = $11; + $12 = $mem$addr; + $arrayidx6 = ((($12)) + 4|0); + $13 = +HEAPF32[$arrayidx6>>2]; + $mem1 = $13; + $14 = $mem$addr; + $arrayidx7 = ((($14)) + 8|0); + $15 = +HEAPF32[$arrayidx7>>2]; + $mem2 = $15; + $16 = $mem$addr; + $arrayidx8 = ((($16)) + 12|0); + $17 = +HEAPF32[$arrayidx8>>2]; + $mem3 = $17; + $18 = $mem$addr; + $arrayidx9 = ((($18)) + 16|0); + $19 = +HEAPF32[$arrayidx9>>2]; + $mem4 = $19; + $i = 0; + while(1) { + $20 = $i; + $21 = $N$addr; + $cmp = ($20|0)<($21|0); + if (!($cmp)) { + break; + } + $22 = $x$addr; + $23 = $i; + $arrayidx10 = (($22) + ($23<<2)|0); + $24 = +HEAPF32[$arrayidx10>>2]; + $sum = $24; + $25 = $sum; + $26 = $num0; + $27 = $mem0; + $mul = $26 * $27; + $add = $25 + $mul; + $sum = $add; + $28 = $sum; + $29 = $num1; + $30 = $mem1; + $mul11 = $29 * $30; + $add12 = $28 + $mul11; + $sum = $add12; + $31 = $sum; + $32 = $num2; + $33 = $mem2; + $mul13 = $32 * $33; + $add14 = $31 + $mul13; + $sum = $add14; + $34 = $sum; + $35 = $num3; + $36 = $mem3; + $mul15 = $35 * $36; + $add16 = $34 + $mul15; + $sum = $add16; + $37 = $sum; + $38 = $num4; + $39 = $mem4; + $mul17 = $38 * $39; + $add18 = $37 + $mul17; + $sum = $add18; + $40 = $mem3; + $mem4 = $40; + $41 = $mem2; + $mem3 = $41; + $42 = $mem1; + $mem2 = $42; + $43 = $mem0; + $mem1 = $43; + $44 = $x$addr; + $45 = $i; + $arrayidx19 = (($44) + ($45<<2)|0); + $46 = +HEAPF32[$arrayidx19>>2]; + $mem0 = $46; + $47 = $sum; + $48 = $y$addr; + $49 = $i; + $arrayidx20 = (($48) + ($49<<2)|0); + HEAPF32[$arrayidx20>>2] = $47; + $50 = $i; + $inc = (($50) + 1)|0; + $i = $inc; + } + $51 = $mem0; + $52 = $mem$addr; + HEAPF32[$52>>2] = $51; + $53 = $mem1; + $54 = $mem$addr; + $arrayidx22 = ((($54)) + 4|0); + HEAPF32[$arrayidx22>>2] = $53; + $55 = $mem2; + $56 = $mem$addr; + $arrayidx23 = ((($56)) + 8|0); + HEAPF32[$arrayidx23>>2] = $55; + $57 = $mem3; + $58 = $mem$addr; + $arrayidx24 = ((($58)) + 12|0); + HEAPF32[$arrayidx24>>2] = $57; + $59 = $mem4; + $60 = $mem$addr; + $arrayidx25 = ((($60)) + 16|0); + HEAPF32[$arrayidx25>>2] = $59; + STACKTOP = sp;return; +} +function _celt_pitch_xcorr($_x,$_y,$xcorr,$len,$max_pitch,$arch) { + $_x = $_x|0; + $_y = $_y|0; + $xcorr = $xcorr|0; + $len = $len|0; + $max_pitch = $max_pitch|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0; + var $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, $_x$addr = 0, $_y$addr = 0, $add = 0, $add$ptr = 0, $add$ptr15 = 0, $add10 = 0, $add5 = 0, $add8 = 0, $arch$addr = 0, $arrayidx1 = 0, $arrayidx16 = 0; + var $arrayidx2 = 0, $arrayidx3 = 0, $arrayidx4 = 0, $arrayidx6 = 0, $arrayidx7 = 0, $arrayidx9 = 0, $call = 0.0, $cmp = 0, $cmp12 = 0, $i = 0, $inc = 0, $len$addr = 0, $max_pitch$addr = 0, $sub = 0, $sum = 0, $sum14 = 0.0, $xcorr$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $sum = sp + 8|0; + $_x$addr = $_x; + $_y$addr = $_y; + $xcorr$addr = $xcorr; + $len$addr = $len; + $max_pitch$addr = $max_pitch; + $arch$addr = $arch; + $i = 0; + while(1) { + $0 = $i; + $1 = $max_pitch$addr; + $sub = (($1) - 3)|0; + $cmp = ($0|0)<($sub|0); + if (!($cmp)) { + break; + } + ;HEAP32[$sum>>2]=0|0;HEAP32[$sum+4>>2]=0|0;HEAP32[$sum+8>>2]=0|0;HEAP32[$sum+12>>2]=0|0; + $2 = $_x$addr; + $3 = $_y$addr; + $4 = $i; + $add$ptr = (($3) + ($4<<2)|0); + $5 = $len$addr; + _xcorr_kernel_c($2,$add$ptr,$sum,$5); + $6 = +HEAPF32[$sum>>2]; + $7 = $xcorr$addr; + $8 = $i; + $arrayidx1 = (($7) + ($8<<2)|0); + HEAPF32[$arrayidx1>>2] = $6; + $arrayidx2 = ((($sum)) + 4|0); + $9 = +HEAPF32[$arrayidx2>>2]; + $10 = $xcorr$addr; + $11 = $i; + $add = (($11) + 1)|0; + $arrayidx3 = (($10) + ($add<<2)|0); + HEAPF32[$arrayidx3>>2] = $9; + $arrayidx4 = ((($sum)) + 8|0); + $12 = +HEAPF32[$arrayidx4>>2]; + $13 = $xcorr$addr; + $14 = $i; + $add5 = (($14) + 2)|0; + $arrayidx6 = (($13) + ($add5<<2)|0); + HEAPF32[$arrayidx6>>2] = $12; + $arrayidx7 = ((($sum)) + 12|0); + $15 = +HEAPF32[$arrayidx7>>2]; + $16 = $xcorr$addr; + $17 = $i; + $add8 = (($17) + 3)|0; + $arrayidx9 = (($16) + ($add8<<2)|0); + HEAPF32[$arrayidx9>>2] = $15; + $18 = $i; + $add10 = (($18) + 4)|0; + $i = $add10; + } + while(1) { + $19 = $i; + $20 = $max_pitch$addr; + $cmp12 = ($19|0)<($20|0); + if (!($cmp12)) { + break; + } + $21 = $_x$addr; + $22 = $_y$addr; + $23 = $i; + $add$ptr15 = (($22) + ($23<<2)|0); + $24 = $len$addr; + $call = (+_celt_inner_prod_c_95($21,$add$ptr15,$24)); + $sum14 = $call; + $25 = $sum14; + $26 = $xcorr$addr; + $27 = $i; + $arrayidx16 = (($26) + ($27<<2)|0); + HEAPF32[$arrayidx16>>2] = $25; + $28 = $i; + $inc = (($28) + 1)|0; + $i = $inc; + } + STACKTOP = sp;return; +} +function _xcorr_kernel_c($x,$y,$sum,$len) { + $x = $x|0; + $y = $y|0; + $sum = $sum|0; + $len = $len|0; + var $0 = 0, $1 = 0.0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0.0, $109 = 0, $11 = 0.0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0; + var $116 = 0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0, $126 = 0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0.0, $135 = 0, $136 = 0.0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0.0, $140 = 0.0, $141 = 0, $142 = 0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0, $147 = 0, $148 = 0.0, $149 = 0.0, $15 = 0.0, $150 = 0.0, $151 = 0; + var $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0.0, $161 = 0, $162 = 0.0, $163 = 0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0, $168 = 0, $169 = 0.0, $17 = 0; + var $170 = 0.0, $171 = 0.0, $172 = 0, $173 = 0, $174 = 0.0, $175 = 0.0, $176 = 0.0, $177 = 0, $178 = 0, $179 = 0.0, $18 = 0.0, $180 = 0.0, $181 = 0.0, $182 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0; + var $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0; + var $60 = 0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0; + var $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0.0; + var $97 = 0.0, $98 = 0, $99 = 0, $add = 0.0, $add101 = 0.0, $add105 = 0.0, $add109 = 0.0, $add113 = 0.0, $add12 = 0.0, $add123 = 0.0, $add127 = 0.0, $add131 = 0.0, $add135 = 0.0, $add16 = 0.0, $add22 = 0.0, $add26 = 0.0, $add30 = 0.0, $add34 = 0.0, $add40 = 0.0, $add44 = 0.0; + var $add48 = 0.0, $add52 = 0.0, $add58 = 0.0, $add62 = 0.0, $add66 = 0.0, $add70 = 0.0, $add72 = 0, $add79 = 0.0, $add8 = 0.0, $add83 = 0.0, $add87 = 0.0, $add91 = 0.0, $arrayidx10 = 0, $arrayidx103 = 0, $arrayidx106 = 0, $arrayidx107 = 0, $arrayidx110 = 0, $arrayidx111 = 0, $arrayidx114 = 0, $arrayidx125 = 0; + var $arrayidx128 = 0, $arrayidx129 = 0, $arrayidx13 = 0, $arrayidx132 = 0, $arrayidx133 = 0, $arrayidx136 = 0, $arrayidx14 = 0, $arrayidx17 = 0, $arrayidx24 = 0, $arrayidx27 = 0, $arrayidx28 = 0, $arrayidx31 = 0, $arrayidx32 = 0, $arrayidx35 = 0, $arrayidx42 = 0, $arrayidx45 = 0, $arrayidx46 = 0, $arrayidx49 = 0, $arrayidx50 = 0, $arrayidx53 = 0; + var $arrayidx6 = 0, $arrayidx60 = 0, $arrayidx63 = 0, $arrayidx64 = 0, $arrayidx67 = 0, $arrayidx68 = 0, $arrayidx71 = 0, $arrayidx81 = 0, $arrayidx84 = 0, $arrayidx85 = 0, $arrayidx88 = 0, $arrayidx89 = 0, $arrayidx9 = 0, $arrayidx92 = 0, $cmp = 0, $cmp116 = 0, $cmp73 = 0, $cmp94 = 0, $inc = 0, $inc93 = 0; + var $incdec$ptr = 0, $incdec$ptr1 = 0, $incdec$ptr119 = 0, $incdec$ptr120 = 0, $incdec$ptr18 = 0, $incdec$ptr19 = 0, $incdec$ptr2 = 0, $incdec$ptr3 = 0, $incdec$ptr36 = 0, $incdec$ptr37 = 0, $incdec$ptr4 = 0, $incdec$ptr54 = 0, $incdec$ptr55 = 0, $incdec$ptr75 = 0, $incdec$ptr76 = 0, $incdec$ptr97 = 0, $incdec$ptr98 = 0, $j = 0, $len$addr = 0, $mul = 0.0; + var $mul100 = 0.0, $mul104 = 0.0, $mul108 = 0.0, $mul11 = 0.0, $mul112 = 0.0, $mul122 = 0.0, $mul126 = 0.0, $mul130 = 0.0, $mul134 = 0.0, $mul15 = 0.0, $mul21 = 0.0, $mul25 = 0.0, $mul29 = 0.0, $mul33 = 0.0, $mul39 = 0.0, $mul43 = 0.0, $mul47 = 0.0, $mul51 = 0.0, $mul57 = 0.0, $mul61 = 0.0; + var $mul65 = 0.0, $mul69 = 0.0, $mul7 = 0.0, $mul78 = 0.0, $mul82 = 0.0, $mul86 = 0.0, $mul90 = 0.0, $sub = 0, $sum$addr = 0, $tmp = 0.0, $tmp118 = 0.0, $tmp74 = 0.0, $tmp96 = 0.0, $x$addr = 0, $y$addr = 0, $y_0 = 0.0, $y_1 = 0.0, $y_2 = 0.0, $y_3 = 0.0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $x$addr = $x; + $y$addr = $y; + $sum$addr = $sum; + $len$addr = $len; + $y_3 = 0.0; + $0 = $y$addr; + $incdec$ptr = ((($0)) + 4|0); + $y$addr = $incdec$ptr; + $1 = +HEAPF32[$0>>2]; + $y_0 = $1; + $2 = $y$addr; + $incdec$ptr1 = ((($2)) + 4|0); + $y$addr = $incdec$ptr1; + $3 = +HEAPF32[$2>>2]; + $y_1 = $3; + $4 = $y$addr; + $incdec$ptr2 = ((($4)) + 4|0); + $y$addr = $incdec$ptr2; + $5 = +HEAPF32[$4>>2]; + $y_2 = $5; + $j = 0; + while(1) { + $6 = $j; + $7 = $len$addr; + $sub = (($7) - 3)|0; + $cmp = ($6|0)<($sub|0); + if (!($cmp)) { + break; + } + $8 = $x$addr; + $incdec$ptr3 = ((($8)) + 4|0); + $x$addr = $incdec$ptr3; + $9 = +HEAPF32[$8>>2]; + $tmp = $9; + $10 = $y$addr; + $incdec$ptr4 = ((($10)) + 4|0); + $y$addr = $incdec$ptr4; + $11 = +HEAPF32[$10>>2]; + $y_3 = $11; + $12 = $sum$addr; + $13 = +HEAPF32[$12>>2]; + $14 = $tmp; + $15 = $y_0; + $mul = $14 * $15; + $add = $13 + $mul; + $16 = $sum$addr; + HEAPF32[$16>>2] = $add; + $17 = $sum$addr; + $arrayidx6 = ((($17)) + 4|0); + $18 = +HEAPF32[$arrayidx6>>2]; + $19 = $tmp; + $20 = $y_1; + $mul7 = $19 * $20; + $add8 = $18 + $mul7; + $21 = $sum$addr; + $arrayidx9 = ((($21)) + 4|0); + HEAPF32[$arrayidx9>>2] = $add8; + $22 = $sum$addr; + $arrayidx10 = ((($22)) + 8|0); + $23 = +HEAPF32[$arrayidx10>>2]; + $24 = $tmp; + $25 = $y_2; + $mul11 = $24 * $25; + $add12 = $23 + $mul11; + $26 = $sum$addr; + $arrayidx13 = ((($26)) + 8|0); + HEAPF32[$arrayidx13>>2] = $add12; + $27 = $sum$addr; + $arrayidx14 = ((($27)) + 12|0); + $28 = +HEAPF32[$arrayidx14>>2]; + $29 = $tmp; + $30 = $y_3; + $mul15 = $29 * $30; + $add16 = $28 + $mul15; + $31 = $sum$addr; + $arrayidx17 = ((($31)) + 12|0); + HEAPF32[$arrayidx17>>2] = $add16; + $32 = $x$addr; + $incdec$ptr18 = ((($32)) + 4|0); + $x$addr = $incdec$ptr18; + $33 = +HEAPF32[$32>>2]; + $tmp = $33; + $34 = $y$addr; + $incdec$ptr19 = ((($34)) + 4|0); + $y$addr = $incdec$ptr19; + $35 = +HEAPF32[$34>>2]; + $y_0 = $35; + $36 = $sum$addr; + $37 = +HEAPF32[$36>>2]; + $38 = $tmp; + $39 = $y_1; + $mul21 = $38 * $39; + $add22 = $37 + $mul21; + $40 = $sum$addr; + HEAPF32[$40>>2] = $add22; + $41 = $sum$addr; + $arrayidx24 = ((($41)) + 4|0); + $42 = +HEAPF32[$arrayidx24>>2]; + $43 = $tmp; + $44 = $y_2; + $mul25 = $43 * $44; + $add26 = $42 + $mul25; + $45 = $sum$addr; + $arrayidx27 = ((($45)) + 4|0); + HEAPF32[$arrayidx27>>2] = $add26; + $46 = $sum$addr; + $arrayidx28 = ((($46)) + 8|0); + $47 = +HEAPF32[$arrayidx28>>2]; + $48 = $tmp; + $49 = $y_3; + $mul29 = $48 * $49; + $add30 = $47 + $mul29; + $50 = $sum$addr; + $arrayidx31 = ((($50)) + 8|0); + HEAPF32[$arrayidx31>>2] = $add30; + $51 = $sum$addr; + $arrayidx32 = ((($51)) + 12|0); + $52 = +HEAPF32[$arrayidx32>>2]; + $53 = $tmp; + $54 = $y_0; + $mul33 = $53 * $54; + $add34 = $52 + $mul33; + $55 = $sum$addr; + $arrayidx35 = ((($55)) + 12|0); + HEAPF32[$arrayidx35>>2] = $add34; + $56 = $x$addr; + $incdec$ptr36 = ((($56)) + 4|0); + $x$addr = $incdec$ptr36; + $57 = +HEAPF32[$56>>2]; + $tmp = $57; + $58 = $y$addr; + $incdec$ptr37 = ((($58)) + 4|0); + $y$addr = $incdec$ptr37; + $59 = +HEAPF32[$58>>2]; + $y_1 = $59; + $60 = $sum$addr; + $61 = +HEAPF32[$60>>2]; + $62 = $tmp; + $63 = $y_2; + $mul39 = $62 * $63; + $add40 = $61 + $mul39; + $64 = $sum$addr; + HEAPF32[$64>>2] = $add40; + $65 = $sum$addr; + $arrayidx42 = ((($65)) + 4|0); + $66 = +HEAPF32[$arrayidx42>>2]; + $67 = $tmp; + $68 = $y_3; + $mul43 = $67 * $68; + $add44 = $66 + $mul43; + $69 = $sum$addr; + $arrayidx45 = ((($69)) + 4|0); + HEAPF32[$arrayidx45>>2] = $add44; + $70 = $sum$addr; + $arrayidx46 = ((($70)) + 8|0); + $71 = +HEAPF32[$arrayidx46>>2]; + $72 = $tmp; + $73 = $y_0; + $mul47 = $72 * $73; + $add48 = $71 + $mul47; + $74 = $sum$addr; + $arrayidx49 = ((($74)) + 8|0); + HEAPF32[$arrayidx49>>2] = $add48; + $75 = $sum$addr; + $arrayidx50 = ((($75)) + 12|0); + $76 = +HEAPF32[$arrayidx50>>2]; + $77 = $tmp; + $78 = $y_1; + $mul51 = $77 * $78; + $add52 = $76 + $mul51; + $79 = $sum$addr; + $arrayidx53 = ((($79)) + 12|0); + HEAPF32[$arrayidx53>>2] = $add52; + $80 = $x$addr; + $incdec$ptr54 = ((($80)) + 4|0); + $x$addr = $incdec$ptr54; + $81 = +HEAPF32[$80>>2]; + $tmp = $81; + $82 = $y$addr; + $incdec$ptr55 = ((($82)) + 4|0); + $y$addr = $incdec$ptr55; + $83 = +HEAPF32[$82>>2]; + $y_2 = $83; + $84 = $sum$addr; + $85 = +HEAPF32[$84>>2]; + $86 = $tmp; + $87 = $y_3; + $mul57 = $86 * $87; + $add58 = $85 + $mul57; + $88 = $sum$addr; + HEAPF32[$88>>2] = $add58; + $89 = $sum$addr; + $arrayidx60 = ((($89)) + 4|0); + $90 = +HEAPF32[$arrayidx60>>2]; + $91 = $tmp; + $92 = $y_0; + $mul61 = $91 * $92; + $add62 = $90 + $mul61; + $93 = $sum$addr; + $arrayidx63 = ((($93)) + 4|0); + HEAPF32[$arrayidx63>>2] = $add62; + $94 = $sum$addr; + $arrayidx64 = ((($94)) + 8|0); + $95 = +HEAPF32[$arrayidx64>>2]; + $96 = $tmp; + $97 = $y_1; + $mul65 = $96 * $97; + $add66 = $95 + $mul65; + $98 = $sum$addr; + $arrayidx67 = ((($98)) + 8|0); + HEAPF32[$arrayidx67>>2] = $add66; + $99 = $sum$addr; + $arrayidx68 = ((($99)) + 12|0); + $100 = +HEAPF32[$arrayidx68>>2]; + $101 = $tmp; + $102 = $y_2; + $mul69 = $101 * $102; + $add70 = $100 + $mul69; + $103 = $sum$addr; + $arrayidx71 = ((($103)) + 12|0); + HEAPF32[$arrayidx71>>2] = $add70; + $104 = $j; + $add72 = (($104) + 4)|0; + $j = $add72; + } + $105 = $j; + $inc = (($105) + 1)|0; + $j = $inc; + $106 = $len$addr; + $cmp73 = ($105|0)<($106|0); + if ($cmp73) { + $107 = $x$addr; + $incdec$ptr75 = ((($107)) + 4|0); + $x$addr = $incdec$ptr75; + $108 = +HEAPF32[$107>>2]; + $tmp74 = $108; + $109 = $y$addr; + $incdec$ptr76 = ((($109)) + 4|0); + $y$addr = $incdec$ptr76; + $110 = +HEAPF32[$109>>2]; + $y_3 = $110; + $111 = $sum$addr; + $112 = +HEAPF32[$111>>2]; + $113 = $tmp74; + $114 = $y_0; + $mul78 = $113 * $114; + $add79 = $112 + $mul78; + $115 = $sum$addr; + HEAPF32[$115>>2] = $add79; + $116 = $sum$addr; + $arrayidx81 = ((($116)) + 4|0); + $117 = +HEAPF32[$arrayidx81>>2]; + $118 = $tmp74; + $119 = $y_1; + $mul82 = $118 * $119; + $add83 = $117 + $mul82; + $120 = $sum$addr; + $arrayidx84 = ((($120)) + 4|0); + HEAPF32[$arrayidx84>>2] = $add83; + $121 = $sum$addr; + $arrayidx85 = ((($121)) + 8|0); + $122 = +HEAPF32[$arrayidx85>>2]; + $123 = $tmp74; + $124 = $y_2; + $mul86 = $123 * $124; + $add87 = $122 + $mul86; + $125 = $sum$addr; + $arrayidx88 = ((($125)) + 8|0); + HEAPF32[$arrayidx88>>2] = $add87; + $126 = $sum$addr; + $arrayidx89 = ((($126)) + 12|0); + $127 = +HEAPF32[$arrayidx89>>2]; + $128 = $tmp74; + $129 = $y_3; + $mul90 = $128 * $129; + $add91 = $127 + $mul90; + $130 = $sum$addr; + $arrayidx92 = ((($130)) + 12|0); + HEAPF32[$arrayidx92>>2] = $add91; + } + $131 = $j; + $inc93 = (($131) + 1)|0; + $j = $inc93; + $132 = $len$addr; + $cmp94 = ($131|0)<($132|0); + if ($cmp94) { + $133 = $x$addr; + $incdec$ptr97 = ((($133)) + 4|0); + $x$addr = $incdec$ptr97; + $134 = +HEAPF32[$133>>2]; + $tmp96 = $134; + $135 = $y$addr; + $incdec$ptr98 = ((($135)) + 4|0); + $y$addr = $incdec$ptr98; + $136 = +HEAPF32[$135>>2]; + $y_0 = $136; + $137 = $sum$addr; + $138 = +HEAPF32[$137>>2]; + $139 = $tmp96; + $140 = $y_1; + $mul100 = $139 * $140; + $add101 = $138 + $mul100; + $141 = $sum$addr; + HEAPF32[$141>>2] = $add101; + $142 = $sum$addr; + $arrayidx103 = ((($142)) + 4|0); + $143 = +HEAPF32[$arrayidx103>>2]; + $144 = $tmp96; + $145 = $y_2; + $mul104 = $144 * $145; + $add105 = $143 + $mul104; + $146 = $sum$addr; + $arrayidx106 = ((($146)) + 4|0); + HEAPF32[$arrayidx106>>2] = $add105; + $147 = $sum$addr; + $arrayidx107 = ((($147)) + 8|0); + $148 = +HEAPF32[$arrayidx107>>2]; + $149 = $tmp96; + $150 = $y_3; + $mul108 = $149 * $150; + $add109 = $148 + $mul108; + $151 = $sum$addr; + $arrayidx110 = ((($151)) + 8|0); + HEAPF32[$arrayidx110>>2] = $add109; + $152 = $sum$addr; + $arrayidx111 = ((($152)) + 12|0); + $153 = +HEAPF32[$arrayidx111>>2]; + $154 = $tmp96; + $155 = $y_0; + $mul112 = $154 * $155; + $add113 = $153 + $mul112; + $156 = $sum$addr; + $arrayidx114 = ((($156)) + 12|0); + HEAPF32[$arrayidx114>>2] = $add113; + } + $157 = $j; + $158 = $len$addr; + $cmp116 = ($157|0)<($158|0); + if (!($cmp116)) { + STACKTOP = sp;return; + } + $159 = $x$addr; + $incdec$ptr119 = ((($159)) + 4|0); + $x$addr = $incdec$ptr119; + $160 = +HEAPF32[$159>>2]; + $tmp118 = $160; + $161 = $y$addr; + $incdec$ptr120 = ((($161)) + 4|0); + $y$addr = $incdec$ptr120; + $162 = +HEAPF32[$161>>2]; + $y_1 = $162; + $163 = $sum$addr; + $164 = +HEAPF32[$163>>2]; + $165 = $tmp118; + $166 = $y_2; + $mul122 = $165 * $166; + $add123 = $164 + $mul122; + $167 = $sum$addr; + HEAPF32[$167>>2] = $add123; + $168 = $sum$addr; + $arrayidx125 = ((($168)) + 4|0); + $169 = +HEAPF32[$arrayidx125>>2]; + $170 = $tmp118; + $171 = $y_3; + $mul126 = $170 * $171; + $add127 = $169 + $mul126; + $172 = $sum$addr; + $arrayidx128 = ((($172)) + 4|0); + HEAPF32[$arrayidx128>>2] = $add127; + $173 = $sum$addr; + $arrayidx129 = ((($173)) + 8|0); + $174 = +HEAPF32[$arrayidx129>>2]; + $175 = $tmp118; + $176 = $y_0; + $mul130 = $175 * $176; + $add131 = $174 + $mul130; + $177 = $sum$addr; + $arrayidx132 = ((($177)) + 8|0); + HEAPF32[$arrayidx132>>2] = $add131; + $178 = $sum$addr; + $arrayidx133 = ((($178)) + 12|0); + $179 = +HEAPF32[$arrayidx133>>2]; + $180 = $tmp118; + $181 = $y_1; + $mul134 = $180 * $181; + $add135 = $179 + $mul134; + $182 = $sum$addr; + $arrayidx136 = ((($182)) + 12|0); + HEAPF32[$arrayidx136>>2] = $add135; + STACKTOP = sp;return; +} +function _celt_inner_prod_c_95($x,$y,$N) { + $x = $x|0; + $y = $y|0; + $N = $N|0; + var $0 = 0, $1 = 0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, $N$addr = 0, $add = 0.0, $arrayidx = 0, $arrayidx1 = 0, $cmp = 0, $i = 0, $inc = 0, $mul = 0.0, $x$addr = 0, $xy = 0.0; + var $y$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $x$addr = $x; + $y$addr = $y; + $N$addr = $N; + $xy = 0.0; + $i = 0; + while(1) { + $0 = $i; + $1 = $N$addr; + $cmp = ($0|0)<($1|0); + $2 = $xy; + if (!($cmp)) { + break; + } + $3 = $x$addr; + $4 = $i; + $arrayidx = (($3) + ($4<<2)|0); + $5 = +HEAPF32[$arrayidx>>2]; + $6 = $y$addr; + $7 = $i; + $arrayidx1 = (($6) + ($7<<2)|0); + $8 = +HEAPF32[$arrayidx1>>2]; + $mul = $5 * $8; + $add = $2 + $mul; + $xy = $add; + $9 = $i; + $inc = (($9) + 1)|0; + $i = $inc; + } + STACKTOP = sp;return (+$2); +} +function _pitch_search($x_lp,$y,$len,$max_pitch,$pitch,$arch) { + $x_lp = $x_lp|0; + $y = $y|0; + $len = $len|0; + $max_pitch = $max_pitch|0; + $pitch = $pitch|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0.0, $add = 0, $add$ptr = 0, $add58 = 0, $arch$addr = 0, $arrayidx = 0, $arrayidx12 = 0, $arrayidx13 = 0, $arrayidx25 = 0, $arrayidx29 = 0, $arrayidx37 = 0, $arrayidx54 = 0, $arrayidx56 = 0, $arrayidx59 = 0, $arrayidx6 = 0, $b = 0.0; + var $best_pitch = 0, $c = 0.0, $call = 0, $call32 = 0, $call35 = 0.0, $cmp = 0, $cmp23 = 0, $cmp28 = 0, $cmp33 = 0, $cmp36 = 0, $cmp45 = 0, $cmp50 = 0, $cmp63 = 0, $cmp68 = 0, $cmp9 = 0, $cond = 0.0, $i = 0, $inc = 0, $inc15 = 0, $inc39 = 0; + var $j = 0, $lag = 0, $len$addr = 0, $max_pitch$addr = 0, $mul = 0, $mul11 = 0, $mul27 = 0, $mul30 = 0, $mul62 = 0.0, $mul67 = 0.0, $mul76 = 0, $offset = 0, $pitch$addr = 0, $saved_stack = 0, $shr = 0, $shr1 = 0, $shr17 = 0, $shr18 = 0, $shr19 = 0, $shr20 = 0; + var $shr22 = 0, $shr3 = 0, $shr34 = 0, $shr41 = 0, $shr42 = 0, $shr48 = 0, $shr5 = 0, $shr8 = 0, $sub = 0, $sub31 = 0, $sub49 = 0, $sub53 = 0, $sub60 = 0.0, $sub61 = 0.0, $sub65 = 0.0, $sub66 = 0.0, $sub77 = 0, $sum = 0.0, $vla = 0, $vla$alloca_mul = 0; + var $vla2 = 0, $vla2$alloca_mul = 0, $vla4 = 0, $vla4$alloca_mul = 0, $x_lp$addr = 0, $y$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); + $best_pitch = sp + 24|0; + $x_lp$addr = $x_lp; + $y$addr = $y; + $len$addr = $len; + $max_pitch$addr = $max_pitch; + $pitch$addr = $pitch; + $arch$addr = $arch; + ;HEAP32[$best_pitch>>2]=0|0;HEAP32[$best_pitch+4>>2]=0|0; + $0 = $len$addr; + $1 = $max_pitch$addr; + $add = (($0) + ($1))|0; + $lag = $add; + $2 = $len$addr; + $shr = $2 >> 2; + $3 = (_llvm_stacksave()|0); + $saved_stack = $3; + $vla$alloca_mul = $shr<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $4 = $lag; + $shr1 = $4 >> 2; + $vla2$alloca_mul = $shr1<<2; + $vla2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla2$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla2$alloca_mul)|0)+15)&-16)|0);; + $5 = $max_pitch$addr; + $shr3 = $5 >> 1; + $vla4$alloca_mul = $shr3<<2; + $vla4 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla4$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla4$alloca_mul)|0)+15)&-16)|0);; + $j = 0; + while(1) { + $6 = $j; + $7 = $len$addr; + $shr5 = $7 >> 2; + $cmp = ($6|0)<($shr5|0); + if (!($cmp)) { + break; + } + $8 = $x_lp$addr; + $9 = $j; + $mul = $9<<1; + $arrayidx = (($8) + ($mul<<2)|0); + $10 = +HEAPF32[$arrayidx>>2]; + $11 = $j; + $arrayidx6 = (($vla) + ($11<<2)|0); + HEAPF32[$arrayidx6>>2] = $10; + $12 = $j; + $inc = (($12) + 1)|0; + $j = $inc; + } + $j = 0; + while(1) { + $13 = $j; + $14 = $lag; + $shr8 = $14 >> 2; + $cmp9 = ($13|0)<($shr8|0); + if (!($cmp9)) { + break; + } + $15 = $y$addr; + $16 = $j; + $mul11 = $16<<1; + $arrayidx12 = (($15) + ($mul11<<2)|0); + $17 = +HEAPF32[$arrayidx12>>2]; + $18 = $j; + $arrayidx13 = (($vla2) + ($18<<2)|0); + HEAPF32[$arrayidx13>>2] = $17; + $19 = $j; + $inc15 = (($19) + 1)|0; + $j = $inc15; + } + $20 = $len$addr; + $shr17 = $20 >> 2; + $21 = $max_pitch$addr; + $shr18 = $21 >> 2; + $22 = $arch$addr; + _celt_pitch_xcorr($vla,$vla2,$vla4,$shr17,$shr18,$22); + $23 = $len$addr; + $shr19 = $23 >> 2; + $24 = $max_pitch$addr; + $shr20 = $24 >> 2; + _find_best_pitch($vla4,$vla2,$shr19,$shr20,$best_pitch); + $i = 0; + while(1) { + $25 = $i; + $26 = $max_pitch$addr; + $shr22 = $26 >> 1; + $cmp23 = ($25|0)<($shr22|0); + if (!($cmp23)) { + break; + } + $27 = $i; + $arrayidx25 = (($vla4) + ($27<<2)|0); + HEAPF32[$arrayidx25>>2] = 0.0; + $28 = $i; + $29 = HEAP32[$best_pitch>>2]|0; + $mul27 = $29<<1; + $sub = (($28) - ($mul27))|0; + $call = (Math_abs(($sub|0))|0); + $cmp28 = ($call|0)>(2); + if ($cmp28) { + $30 = $i; + $arrayidx29 = ((($best_pitch)) + 4|0); + $31 = HEAP32[$arrayidx29>>2]|0; + $mul30 = $31<<1; + $sub31 = (($30) - ($mul30))|0; + $call32 = (Math_abs(($sub31|0))|0); + $cmp33 = ($call32|0)>(2); + if (!($cmp33)) { + label = 11; + } + } else { + label = 11; + } + if ((label|0) == 11) { + label = 0; + $32 = $x_lp$addr; + $33 = $y$addr; + $34 = $i; + $add$ptr = (($33) + ($34<<2)|0); + $35 = $len$addr; + $shr34 = $35 >> 1; + $call35 = (+_celt_inner_prod_c_95($32,$add$ptr,$shr34)); + $sum = $call35; + $36 = $sum; + $cmp36 = -1.0 > $36; + $37 = $sum; + $cond = $cmp36 ? -1.0 : $37; + $38 = $i; + $arrayidx37 = (($vla4) + ($38<<2)|0); + HEAPF32[$arrayidx37>>2] = $cond; + } + $39 = $i; + $inc39 = (($39) + 1)|0; + $i = $inc39; + } + $40 = $y$addr; + $41 = $len$addr; + $shr41 = $41 >> 1; + $42 = $max_pitch$addr; + $shr42 = $42 >> 1; + _find_best_pitch($vla4,$40,$shr41,$shr42,$best_pitch); + $43 = HEAP32[$best_pitch>>2]|0; + $cmp45 = ($43|0)>(0); + if ($cmp45) { + $44 = HEAP32[$best_pitch>>2]|0; + $45 = $max_pitch$addr; + $shr48 = $45 >> 1; + $sub49 = (($shr48) - 1)|0; + $cmp50 = ($44|0)<($sub49|0); + if ($cmp50) { + $46 = HEAP32[$best_pitch>>2]|0; + $sub53 = (($46) - 1)|0; + $arrayidx54 = (($vla4) + ($sub53<<2)|0); + $47 = +HEAPF32[$arrayidx54>>2]; + $a = $47; + $48 = HEAP32[$best_pitch>>2]|0; + $arrayidx56 = (($vla4) + ($48<<2)|0); + $49 = +HEAPF32[$arrayidx56>>2]; + $b = $49; + $50 = HEAP32[$best_pitch>>2]|0; + $add58 = (($50) + 1)|0; + $arrayidx59 = (($vla4) + ($add58<<2)|0); + $51 = +HEAPF32[$arrayidx59>>2]; + $c = $51; + $52 = $c; + $53 = $a; + $sub60 = $52 - $53; + $54 = $b; + $55 = $a; + $sub61 = $54 - $55; + $mul62 = 0.69999998807907104 * $sub61; + $cmp63 = $sub60 > $mul62; + if ($cmp63) { + $offset = 1; + $60 = HEAP32[$best_pitch>>2]|0; + $mul76 = $60<<1; + $61 = $offset; + $sub77 = (($mul76) - ($61))|0; + $62 = $pitch$addr; + HEAP32[$62>>2] = $sub77; + $63 = $saved_stack; + _llvm_stackrestore(($63|0)); + STACKTOP = sp;return; + } + $56 = $a; + $57 = $c; + $sub65 = $56 - $57; + $58 = $b; + $59 = $c; + $sub66 = $58 - $59; + $mul67 = 0.69999998807907104 * $sub66; + $cmp68 = $sub65 > $mul67; + if ($cmp68) { + $offset = -1; + $60 = HEAP32[$best_pitch>>2]|0; + $mul76 = $60<<1; + $61 = $offset; + $sub77 = (($mul76) - ($61))|0; + $62 = $pitch$addr; + HEAP32[$62>>2] = $sub77; + $63 = $saved_stack; + _llvm_stackrestore(($63|0)); + STACKTOP = sp;return; + } else { + $offset = 0; + $60 = HEAP32[$best_pitch>>2]|0; + $mul76 = $60<<1; + $61 = $offset; + $sub77 = (($mul76) - ($61))|0; + $62 = $pitch$addr; + HEAP32[$62>>2] = $sub77; + $63 = $saved_stack; + _llvm_stackrestore(($63|0)); + STACKTOP = sp;return; + } + } + } + $offset = 0; + $60 = HEAP32[$best_pitch>>2]|0; + $mul76 = $60<<1; + $61 = $offset; + $sub77 = (($mul76) - ($61))|0; + $62 = $pitch$addr; + HEAP32[$62>>2] = $sub77; + $63 = $saved_stack; + _llvm_stackrestore(($63|0)); + STACKTOP = sp;return; +} +function _find_best_pitch($xcorr,$y,$len,$max_pitch,$best_pitch) { + $xcorr = $xcorr|0; + $y = $y|0; + $len = $len|0; + $max_pitch = $max_pitch|0; + $best_pitch = $best_pitch|0; + var $$sink = 0, $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0; + var $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0; + var $44 = 0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0; + var $7 = 0.0, $8 = 0, $9 = 0, $Syy = 0.0, $add = 0.0, $add42 = 0, $add44 = 0, $add50 = 0.0, $arrayidx1 = 0, $arrayidx11 = 0, $arrayidx13 = 0, $arrayidx16 = 0, $arrayidx18 = 0, $arrayidx29 = 0, $arrayidx3 = 0, $arrayidx31 = 0, $arrayidx33 = 0, $arrayidx37 = 0, $arrayidx38 = 0, $arrayidx39 = 0; + var $arrayidx39$sink = 0, $arrayidx43 = 0, $arrayidx45 = 0, $arrayidx47 = 0, $arrayidx48 = 0, $arrayidx5 = 0, $arrayidx6 = 0, $arrayidx7 = 0, $best_den = 0, $best_num = 0, $best_pitch$addr = 0, $cmp = 0, $cmp12 = 0, $cmp20 = 0, $cmp26 = 0, $cmp51 = 0, $cmp9 = 0, $cond = 0.0, $i = 0, $inc = 0; + var $inc53 = 0, $j = 0, $len$addr = 0, $max_pitch$addr = 0, $mul = 0.0, $mul14 = 0.0, $mul15 = 0.0, $mul17 = 0.0, $mul19 = 0.0, $mul23 = 0.0, $mul25 = 0.0, $mul46 = 0.0, $mul49 = 0.0, $num = 0.0, $sub = 0.0, $xcorr$addr = 0, $xcorr16 = 0.0, $y$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $best_num = sp + 16|0; + $best_den = sp + 8|0; + $xcorr$addr = $xcorr; + $y$addr = $y; + $len$addr = $len; + $max_pitch$addr = $max_pitch; + $best_pitch$addr = $best_pitch; + $Syy = 1.0; + HEAPF32[$best_num>>2] = -1.0; + $arrayidx1 = ((($best_num)) + 4|0); + HEAPF32[$arrayidx1>>2] = -1.0; + HEAPF32[$best_den>>2] = 0.0; + $arrayidx3 = ((($best_den)) + 4|0); + HEAPF32[$arrayidx3>>2] = 0.0; + $0 = $best_pitch$addr; + HEAP32[$0>>2] = 0; + $1 = $best_pitch$addr; + $arrayidx5 = ((($1)) + 4|0); + HEAP32[$arrayidx5>>2] = 1; + $j = 0; + while(1) { + $2 = $j; + $3 = $len$addr; + $cmp = ($2|0)<($3|0); + if (!($cmp)) { + break; + } + $4 = $Syy; + $5 = $y$addr; + $6 = $j; + $arrayidx6 = (($5) + ($6<<2)|0); + $7 = +HEAPF32[$arrayidx6>>2]; + $8 = $y$addr; + $9 = $j; + $arrayidx7 = (($8) + ($9<<2)|0); + $10 = +HEAPF32[$arrayidx7>>2]; + $mul = $7 * $10; + $add = $4 + $mul; + $Syy = $add; + $11 = $j; + $inc = (($11) + 1)|0; + $j = $inc; + } + $i = 0; + while(1) { + $12 = $i; + $13 = $max_pitch$addr; + $cmp9 = ($12|0)<($13|0); + if (!($cmp9)) { + break; + } + $14 = $xcorr$addr; + $15 = $i; + $arrayidx11 = (($14) + ($15<<2)|0); + $16 = +HEAPF32[$arrayidx11>>2]; + $cmp12 = $16 > 0.0; + if ($cmp12) { + $17 = $xcorr$addr; + $18 = $i; + $arrayidx13 = (($17) + ($18<<2)|0); + $19 = +HEAPF32[$arrayidx13>>2]; + $xcorr16 = $19; + $20 = $xcorr16; + $mul14 = $20 * 9.999999960041972E-13; + $xcorr16 = $mul14; + $21 = $xcorr16; + $22 = $xcorr16; + $mul15 = $21 * $22; + $num = $mul15; + $23 = $num; + $arrayidx16 = ((($best_den)) + 4|0); + $24 = +HEAPF32[$arrayidx16>>2]; + $mul17 = $23 * $24; + $arrayidx18 = ((($best_num)) + 4|0); + $25 = +HEAPF32[$arrayidx18>>2]; + $26 = $Syy; + $mul19 = $25 * $26; + $cmp20 = $mul17 > $mul19; + if ($cmp20) { + $27 = $num; + $28 = +HEAPF32[$best_den>>2]; + $mul23 = $27 * $28; + $29 = +HEAPF32[$best_num>>2]; + $30 = $Syy; + $mul25 = $29 * $30; + $cmp26 = $mul23 > $mul25; + if ($cmp26) { + $31 = +HEAPF32[$best_num>>2]; + $arrayidx29 = ((($best_num)) + 4|0); + HEAPF32[$arrayidx29>>2] = $31; + $32 = +HEAPF32[$best_den>>2]; + $arrayidx31 = ((($best_den)) + 4|0); + HEAPF32[$arrayidx31>>2] = $32; + $33 = $best_pitch$addr; + $34 = HEAP32[$33>>2]|0; + $35 = $best_pitch$addr; + $arrayidx33 = ((($35)) + 4|0); + HEAP32[$arrayidx33>>2] = $34; + $36 = $num; + HEAPF32[$best_num>>2] = $36; + $37 = $Syy; + HEAPF32[$best_den>>2] = $37; + $38 = $i; + $39 = $best_pitch$addr; + $$sink = $38;$arrayidx39$sink = $39; + } else { + $40 = $num; + $arrayidx37 = ((($best_num)) + 4|0); + HEAPF32[$arrayidx37>>2] = $40; + $41 = $Syy; + $arrayidx38 = ((($best_den)) + 4|0); + HEAPF32[$arrayidx38>>2] = $41; + $42 = $i; + $43 = $best_pitch$addr; + $arrayidx39 = ((($43)) + 4|0); + $$sink = $42;$arrayidx39$sink = $arrayidx39; + } + HEAP32[$arrayidx39$sink>>2] = $$sink; + } + } + $44 = $y$addr; + $45 = $i; + $46 = $len$addr; + $add42 = (($45) + ($46))|0; + $arrayidx43 = (($44) + ($add42<<2)|0); + $47 = +HEAPF32[$arrayidx43>>2]; + $48 = $y$addr; + $49 = $i; + $50 = $len$addr; + $add44 = (($49) + ($50))|0; + $arrayidx45 = (($48) + ($add44<<2)|0); + $51 = +HEAPF32[$arrayidx45>>2]; + $mul46 = $47 * $51; + $52 = $y$addr; + $53 = $i; + $arrayidx47 = (($52) + ($53<<2)|0); + $54 = +HEAPF32[$arrayidx47>>2]; + $55 = $y$addr; + $56 = $i; + $arrayidx48 = (($55) + ($56<<2)|0); + $57 = +HEAPF32[$arrayidx48>>2]; + $mul49 = $54 * $57; + $sub = $mul46 - $mul49; + $58 = $Syy; + $add50 = $58 + $sub; + $Syy = $add50; + $59 = $Syy; + $cmp51 = 1.0 > $59; + $60 = $Syy; + $cond = $cmp51 ? 1.0 : $60; + $Syy = $cond; + $61 = $i; + $inc53 = (($61) + 1)|0; + $i = $inc53; + } + STACKTOP = sp;return; +} +function __celt_lpc($_lpc,$ac,$p) { + $_lpc = $_lpc|0; + $ac = $ac|0; + $p = $p|0; + var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0.0; + var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0; + var $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $7 = 0, $8 = 0; + var $9 = 0.0, $_lpc$addr = 0, $ac$addr = 0, $add = 0.0, $add15 = 0, $add17 = 0.0, $add21 = 0, $add29 = 0.0, $add32 = 0.0, $arrayidx1 = 0, $arrayidx10 = 0, $arrayidx11 = 0, $arrayidx16 = 0, $arrayidx19 = 0, $arrayidx24 = 0, $arrayidx27 = 0, $arrayidx30 = 0, $arrayidx35 = 0, $cmp = 0, $cmp22 = 0; + var $cmp3 = 0, $cmp44 = 0, $cmp5 = 0, $cmp8 = 0, $div = 0.0, $error = 0.0, $i = 0, $inc = 0, $inc13 = 0, $inc37 = 0, $inc47 = 0, $j = 0, $lpc = 0, $mul = 0.0, $mul28 = 0.0, $mul31 = 0.0, $mul39 = 0.0, $mul40 = 0.0, $mul43 = 0.0, $p$addr = 0; + var $r = 0.0, $rr = 0.0, $shr = 0, $sub = 0, $sub18 = 0.0, $sub25 = 0, $sub26 = 0, $sub33 = 0, $sub34 = 0, $sub41 = 0.0, $tmp1 = 0.0, $tmp2 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $_lpc$addr = $_lpc; + $ac$addr = $ac; + $p$addr = $p; + $0 = $ac$addr; + $1 = +HEAPF32[$0>>2]; + $error = $1; + $2 = $_lpc$addr; + $lpc = $2; + $i = 0; + while(1) { + $3 = $i; + $4 = $p$addr; + $cmp = ($3|0)<($4|0); + if (!($cmp)) { + break; + } + $5 = $lpc; + $6 = $i; + $arrayidx1 = (($5) + ($6<<2)|0); + HEAPF32[$arrayidx1>>2] = 0.0; + $7 = $i; + $inc = (($7) + 1)|0; + $i = $inc; + } + $8 = $ac$addr; + $9 = +HEAPF32[$8>>2]; + $cmp3 = $9 != 0.0; + if (!($cmp3)) { + STACKTOP = sp;return; + } + $i = 0; + while(1) { + $10 = $i; + $11 = $p$addr; + $cmp5 = ($10|0)<($11|0); + if (!($cmp5)) { + label = 15; + break; + } + $rr = 0.0; + $j = 0; + while(1) { + $12 = $j; + $13 = $i; + $cmp8 = ($12|0)<($13|0); + if (!($cmp8)) { + break; + } + $14 = $lpc; + $15 = $j; + $arrayidx10 = (($14) + ($15<<2)|0); + $16 = +HEAPF32[$arrayidx10>>2]; + $17 = $ac$addr; + $18 = $i; + $19 = $j; + $sub = (($18) - ($19))|0; + $arrayidx11 = (($17) + ($sub<<2)|0); + $20 = +HEAPF32[$arrayidx11>>2]; + $mul = $16 * $20; + $21 = $rr; + $add = $21 + $mul; + $rr = $add; + $22 = $j; + $inc13 = (($22) + 1)|0; + $j = $inc13; + } + $23 = $ac$addr; + $24 = $i; + $add15 = (($24) + 1)|0; + $arrayidx16 = (($23) + ($add15<<2)|0); + $25 = +HEAPF32[$arrayidx16>>2]; + $26 = $rr; + $add17 = $26 + $25; + $rr = $add17; + $27 = $rr; + $28 = $error; + $div = $27 / $28; + $sub18 = - $div; + $r = $sub18; + $29 = $r; + $30 = $lpc; + $31 = $i; + $arrayidx19 = (($30) + ($31<<2)|0); + HEAPF32[$arrayidx19>>2] = $29; + $j = 0; + while(1) { + $32 = $j; + $33 = $i; + $add21 = (($33) + 1)|0; + $shr = $add21 >> 1; + $cmp22 = ($32|0)<($shr|0); + if (!($cmp22)) { + break; + } + $34 = $lpc; + $35 = $j; + $arrayidx24 = (($34) + ($35<<2)|0); + $36 = +HEAPF32[$arrayidx24>>2]; + $tmp1 = $36; + $37 = $lpc; + $38 = $i; + $sub25 = (($38) - 1)|0; + $39 = $j; + $sub26 = (($sub25) - ($39))|0; + $arrayidx27 = (($37) + ($sub26<<2)|0); + $40 = +HEAPF32[$arrayidx27>>2]; + $tmp2 = $40; + $41 = $tmp1; + $42 = $r; + $43 = $tmp2; + $mul28 = $42 * $43; + $add29 = $41 + $mul28; + $44 = $lpc; + $45 = $j; + $arrayidx30 = (($44) + ($45<<2)|0); + HEAPF32[$arrayidx30>>2] = $add29; + $46 = $tmp2; + $47 = $r; + $48 = $tmp1; + $mul31 = $47 * $48; + $add32 = $46 + $mul31; + $49 = $lpc; + $50 = $i; + $sub33 = (($50) - 1)|0; + $51 = $j; + $sub34 = (($sub33) - ($51))|0; + $arrayidx35 = (($49) + ($sub34<<2)|0); + HEAPF32[$arrayidx35>>2] = $add32; + $52 = $j; + $inc37 = (($52) + 1)|0; + $j = $inc37; + } + $53 = $error; + $54 = $r; + $55 = $r; + $mul39 = $54 * $55; + $56 = $error; + $mul40 = $mul39 * $56; + $sub41 = $53 - $mul40; + $error = $sub41; + $57 = $error; + $58 = $ac$addr; + $59 = +HEAPF32[$58>>2]; + $mul43 = 0.0010000000474974513 * $59; + $cmp44 = $57 < $mul43; + if ($cmp44) { + label = 15; + break; + } + $60 = $i; + $inc47 = (($60) + 1)|0; + $i = $inc47; + } + if ((label|0) == 15) { + STACKTOP = sp;return; + } +} +function _celt_fir_c($_x,$num,$_y,$N,$ord,$mem,$arch) { + $_x = $_x|0; + $num = $num|0; + $_y = $_y|0; + $N = $N|0; + $ord = $ord|0; + $mem = $mem|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0.0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0.0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0, $78 = 0, $79 = 0.0, $8 = 0, $80 = 0.0; + var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $9 = 0.0, $N$addr = 0, $_x$addr = 0, $_y$addr = 0, $add = 0, $add$ptr = 0, $add18 = 0, $add39 = 0.0, $add41 = 0, $add44 = 0.0, $add45 = 0, $add47 = 0, $add50 = 0.0, $add51 = 0, $add53 = 0, $add56 = 0.0; + var $add57 = 0, $add60 = 0, $add70 = 0, $add72 = 0.0, $add77 = 0.0, $arch$addr = 0, $arrayidx = 0, $arrayidx10 = 0, $arrayidx17 = 0, $arrayidx19 = 0, $arrayidx28 = 0, $arrayidx29 = 0, $arrayidx3 = 0, $arrayidx37 = 0, $arrayidx40 = 0, $arrayidx42 = 0, $arrayidx43 = 0, $arrayidx46 = 0, $arrayidx48 = 0, $arrayidx49 = 0; + var $arrayidx52 = 0, $arrayidx54 = 0, $arrayidx55 = 0, $arrayidx58 = 0, $arrayidx69 = 0, $arrayidx71 = 0, $arrayidx76 = 0, $arrayidx78 = 0, $arrayidx9 = 0, $cmp = 0, $cmp15 = 0, $cmp24 = 0, $cmp35 = 0, $cmp5 = 0, $cmp63 = 0, $cmp67 = 0, $i = 0, $inc = 0, $inc12 = 0, $inc21 = 0; + var $inc31 = 0, $inc74 = 0, $inc80 = 0, $j = 0, $mem$addr = 0, $mul = 0.0, $num$addr = 0, $ord$addr = 0, $saved_stack = 0, $sub = 0, $sub2 = 0, $sub26 = 0, $sub27 = 0, $sub34 = 0, $sub7 = 0, $sub8 = 0, $sum = 0, $sum65 = 0.0, $vla = 0, $vla$alloca_mul = 0; + var $vla1 = 0, $vla1$alloca_mul = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $sum = sp + 8|0; + $_x$addr = $_x; + $num$addr = $num; + $_y$addr = $_y; + $N$addr = $N; + $ord$addr = $ord; + $mem$addr = $mem; + $arch$addr = $arch; + $0 = $ord$addr; + $1 = (_llvm_stacksave()|0); + $saved_stack = $1; + $vla$alloca_mul = $0<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $2 = $N$addr; + $3 = $ord$addr; + $add = (($2) + ($3))|0; + $vla1$alloca_mul = $add<<2; + $vla1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla1$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla1$alloca_mul)|0)+15)&-16)|0);; + $i = 0; + while(1) { + $4 = $i; + $5 = $ord$addr; + $cmp = ($4|0)<($5|0); + if (!($cmp)) { + break; + } + $6 = $num$addr; + $7 = $ord$addr; + $8 = $i; + $sub = (($7) - ($8))|0; + $sub2 = (($sub) - 1)|0; + $arrayidx = (($6) + ($sub2<<2)|0); + $9 = +HEAPF32[$arrayidx>>2]; + $10 = $i; + $arrayidx3 = (($vla) + ($10<<2)|0); + HEAPF32[$arrayidx3>>2] = $9; + $11 = $i; + $inc = (($11) + 1)|0; + $i = $inc; + } + $i = 0; + while(1) { + $12 = $i; + $13 = $ord$addr; + $cmp5 = ($12|0)<($13|0); + if (!($cmp5)) { + break; + } + $14 = $mem$addr; + $15 = $ord$addr; + $16 = $i; + $sub7 = (($15) - ($16))|0; + $sub8 = (($sub7) - 1)|0; + $arrayidx9 = (($14) + ($sub8<<2)|0); + $17 = +HEAPF32[$arrayidx9>>2]; + $18 = $i; + $arrayidx10 = (($vla1) + ($18<<2)|0); + HEAPF32[$arrayidx10>>2] = $17; + $19 = $i; + $inc12 = (($19) + 1)|0; + $i = $inc12; + } + $i = 0; + while(1) { + $20 = $i; + $21 = $N$addr; + $cmp15 = ($20|0)<($21|0); + if (!($cmp15)) { + break; + } + $22 = $_x$addr; + $23 = $i; + $arrayidx17 = (($22) + ($23<<2)|0); + $24 = +HEAPF32[$arrayidx17>>2]; + $25 = $i; + $26 = $ord$addr; + $add18 = (($25) + ($26))|0; + $arrayidx19 = (($vla1) + ($add18<<2)|0); + HEAPF32[$arrayidx19>>2] = $24; + $27 = $i; + $inc21 = (($27) + 1)|0; + $i = $inc21; + } + $i = 0; + while(1) { + $28 = $i; + $29 = $ord$addr; + $cmp24 = ($28|0)<($29|0); + if (!($cmp24)) { + break; + } + $30 = $_x$addr; + $31 = $N$addr; + $32 = $i; + $sub26 = (($31) - ($32))|0; + $sub27 = (($sub26) - 1)|0; + $arrayidx28 = (($30) + ($sub27<<2)|0); + $33 = +HEAPF32[$arrayidx28>>2]; + $34 = $mem$addr; + $35 = $i; + $arrayidx29 = (($34) + ($35<<2)|0); + HEAPF32[$arrayidx29>>2] = $33; + $36 = $i; + $inc31 = (($36) + 1)|0; + $i = $inc31; + } + $i = 0; + while(1) { + $37 = $i; + $38 = $N$addr; + $sub34 = (($38) - 3)|0; + $cmp35 = ($37|0)<($sub34|0); + if (!($cmp35)) { + break; + } + ;HEAP32[$sum>>2]=0|0;HEAP32[$sum+4>>2]=0|0;HEAP32[$sum+8>>2]=0|0;HEAP32[$sum+12>>2]=0|0; + $39 = $i; + $add$ptr = (($vla1) + ($39<<2)|0); + $40 = $ord$addr; + _xcorr_kernel_c_105($vla,$add$ptr,$sum,$40); + $41 = $_x$addr; + $42 = $i; + $arrayidx37 = (($41) + ($42<<2)|0); + $43 = +HEAPF32[$arrayidx37>>2]; + $44 = +HEAPF32[$sum>>2]; + $add39 = $43 + $44; + $45 = $_y$addr; + $46 = $i; + $arrayidx40 = (($45) + ($46<<2)|0); + HEAPF32[$arrayidx40>>2] = $add39; + $47 = $_x$addr; + $48 = $i; + $add41 = (($48) + 1)|0; + $arrayidx42 = (($47) + ($add41<<2)|0); + $49 = +HEAPF32[$arrayidx42>>2]; + $arrayidx43 = ((($sum)) + 4|0); + $50 = +HEAPF32[$arrayidx43>>2]; + $add44 = $49 + $50; + $51 = $_y$addr; + $52 = $i; + $add45 = (($52) + 1)|0; + $arrayidx46 = (($51) + ($add45<<2)|0); + HEAPF32[$arrayidx46>>2] = $add44; + $53 = $_x$addr; + $54 = $i; + $add47 = (($54) + 2)|0; + $arrayidx48 = (($53) + ($add47<<2)|0); + $55 = +HEAPF32[$arrayidx48>>2]; + $arrayidx49 = ((($sum)) + 8|0); + $56 = +HEAPF32[$arrayidx49>>2]; + $add50 = $55 + $56; + $57 = $_y$addr; + $58 = $i; + $add51 = (($58) + 2)|0; + $arrayidx52 = (($57) + ($add51<<2)|0); + HEAPF32[$arrayidx52>>2] = $add50; + $59 = $_x$addr; + $60 = $i; + $add53 = (($60) + 3)|0; + $arrayidx54 = (($59) + ($add53<<2)|0); + $61 = +HEAPF32[$arrayidx54>>2]; + $arrayidx55 = ((($sum)) + 12|0); + $62 = +HEAPF32[$arrayidx55>>2]; + $add56 = $61 + $62; + $63 = $_y$addr; + $64 = $i; + $add57 = (($64) + 3)|0; + $arrayidx58 = (($63) + ($add57<<2)|0); + HEAPF32[$arrayidx58>>2] = $add56; + $65 = $i; + $add60 = (($65) + 4)|0; + $i = $add60; + } + while(1) { + $66 = $i; + $67 = $N$addr; + $cmp63 = ($66|0)<($67|0); + if (!($cmp63)) { + break; + } + $sum65 = 0.0; + $j = 0; + while(1) { + $68 = $j; + $69 = $ord$addr; + $cmp67 = ($68|0)<($69|0); + if (!($cmp67)) { + break; + } + $70 = $sum65; + $71 = $j; + $arrayidx69 = (($vla) + ($71<<2)|0); + $72 = +HEAPF32[$arrayidx69>>2]; + $73 = $i; + $74 = $j; + $add70 = (($73) + ($74))|0; + $arrayidx71 = (($vla1) + ($add70<<2)|0); + $75 = +HEAPF32[$arrayidx71>>2]; + $mul = $72 * $75; + $add72 = $70 + $mul; + $sum65 = $add72; + $76 = $j; + $inc74 = (($76) + 1)|0; + $j = $inc74; + } + $77 = $_x$addr; + $78 = $i; + $arrayidx76 = (($77) + ($78<<2)|0); + $79 = +HEAPF32[$arrayidx76>>2]; + $80 = $sum65; + $add77 = $79 + $80; + $81 = $_y$addr; + $82 = $i; + $arrayidx78 = (($81) + ($82<<2)|0); + HEAPF32[$arrayidx78>>2] = $add77; + $83 = $i; + $inc80 = (($83) + 1)|0; + $i = $inc80; + } + $84 = $saved_stack; + _llvm_stackrestore(($84|0)); + STACKTOP = sp;return; +} +function _xcorr_kernel_c_105($x,$y,$sum,$len) { + $x = $x|0; + $y = $y|0; + $sum = $sum|0; + $len = $len|0; + var $0 = 0, $1 = 0.0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0.0, $109 = 0, $11 = 0.0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0; + var $116 = 0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0, $126 = 0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0.0, $135 = 0, $136 = 0.0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0.0, $140 = 0.0, $141 = 0, $142 = 0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0, $147 = 0, $148 = 0.0, $149 = 0.0, $15 = 0.0, $150 = 0.0, $151 = 0; + var $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0.0, $161 = 0, $162 = 0.0, $163 = 0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0, $168 = 0, $169 = 0.0, $17 = 0; + var $170 = 0.0, $171 = 0.0, $172 = 0, $173 = 0, $174 = 0.0, $175 = 0.0, $176 = 0.0, $177 = 0, $178 = 0, $179 = 0.0, $18 = 0.0, $180 = 0.0, $181 = 0.0, $182 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0; + var $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0; + var $60 = 0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0; + var $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0.0; + var $97 = 0.0, $98 = 0, $99 = 0, $add = 0.0, $add101 = 0.0, $add105 = 0.0, $add109 = 0.0, $add113 = 0.0, $add12 = 0.0, $add123 = 0.0, $add127 = 0.0, $add131 = 0.0, $add135 = 0.0, $add16 = 0.0, $add22 = 0.0, $add26 = 0.0, $add30 = 0.0, $add34 = 0.0, $add40 = 0.0, $add44 = 0.0; + var $add48 = 0.0, $add52 = 0.0, $add58 = 0.0, $add62 = 0.0, $add66 = 0.0, $add70 = 0.0, $add72 = 0, $add79 = 0.0, $add8 = 0.0, $add83 = 0.0, $add87 = 0.0, $add91 = 0.0, $arrayidx10 = 0, $arrayidx103 = 0, $arrayidx106 = 0, $arrayidx107 = 0, $arrayidx110 = 0, $arrayidx111 = 0, $arrayidx114 = 0, $arrayidx125 = 0; + var $arrayidx128 = 0, $arrayidx129 = 0, $arrayidx13 = 0, $arrayidx132 = 0, $arrayidx133 = 0, $arrayidx136 = 0, $arrayidx14 = 0, $arrayidx17 = 0, $arrayidx24 = 0, $arrayidx27 = 0, $arrayidx28 = 0, $arrayidx31 = 0, $arrayidx32 = 0, $arrayidx35 = 0, $arrayidx42 = 0, $arrayidx45 = 0, $arrayidx46 = 0, $arrayidx49 = 0, $arrayidx50 = 0, $arrayidx53 = 0; + var $arrayidx6 = 0, $arrayidx60 = 0, $arrayidx63 = 0, $arrayidx64 = 0, $arrayidx67 = 0, $arrayidx68 = 0, $arrayidx71 = 0, $arrayidx81 = 0, $arrayidx84 = 0, $arrayidx85 = 0, $arrayidx88 = 0, $arrayidx89 = 0, $arrayidx9 = 0, $arrayidx92 = 0, $cmp = 0, $cmp116 = 0, $cmp73 = 0, $cmp94 = 0, $inc = 0, $inc93 = 0; + var $incdec$ptr = 0, $incdec$ptr1 = 0, $incdec$ptr119 = 0, $incdec$ptr120 = 0, $incdec$ptr18 = 0, $incdec$ptr19 = 0, $incdec$ptr2 = 0, $incdec$ptr3 = 0, $incdec$ptr36 = 0, $incdec$ptr37 = 0, $incdec$ptr4 = 0, $incdec$ptr54 = 0, $incdec$ptr55 = 0, $incdec$ptr75 = 0, $incdec$ptr76 = 0, $incdec$ptr97 = 0, $incdec$ptr98 = 0, $j = 0, $len$addr = 0, $mul = 0.0; + var $mul100 = 0.0, $mul104 = 0.0, $mul108 = 0.0, $mul11 = 0.0, $mul112 = 0.0, $mul122 = 0.0, $mul126 = 0.0, $mul130 = 0.0, $mul134 = 0.0, $mul15 = 0.0, $mul21 = 0.0, $mul25 = 0.0, $mul29 = 0.0, $mul33 = 0.0, $mul39 = 0.0, $mul43 = 0.0, $mul47 = 0.0, $mul51 = 0.0, $mul57 = 0.0, $mul61 = 0.0; + var $mul65 = 0.0, $mul69 = 0.0, $mul7 = 0.0, $mul78 = 0.0, $mul82 = 0.0, $mul86 = 0.0, $mul90 = 0.0, $sub = 0, $sum$addr = 0, $tmp = 0.0, $tmp118 = 0.0, $tmp74 = 0.0, $tmp96 = 0.0, $x$addr = 0, $y$addr = 0, $y_0 = 0.0, $y_1 = 0.0, $y_2 = 0.0, $y_3 = 0.0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $x$addr = $x; + $y$addr = $y; + $sum$addr = $sum; + $len$addr = $len; + $y_3 = 0.0; + $0 = $y$addr; + $incdec$ptr = ((($0)) + 4|0); + $y$addr = $incdec$ptr; + $1 = +HEAPF32[$0>>2]; + $y_0 = $1; + $2 = $y$addr; + $incdec$ptr1 = ((($2)) + 4|0); + $y$addr = $incdec$ptr1; + $3 = +HEAPF32[$2>>2]; + $y_1 = $3; + $4 = $y$addr; + $incdec$ptr2 = ((($4)) + 4|0); + $y$addr = $incdec$ptr2; + $5 = +HEAPF32[$4>>2]; + $y_2 = $5; + $j = 0; + while(1) { + $6 = $j; + $7 = $len$addr; + $sub = (($7) - 3)|0; + $cmp = ($6|0)<($sub|0); + if (!($cmp)) { + break; + } + $8 = $x$addr; + $incdec$ptr3 = ((($8)) + 4|0); + $x$addr = $incdec$ptr3; + $9 = +HEAPF32[$8>>2]; + $tmp = $9; + $10 = $y$addr; + $incdec$ptr4 = ((($10)) + 4|0); + $y$addr = $incdec$ptr4; + $11 = +HEAPF32[$10>>2]; + $y_3 = $11; + $12 = $sum$addr; + $13 = +HEAPF32[$12>>2]; + $14 = $tmp; + $15 = $y_0; + $mul = $14 * $15; + $add = $13 + $mul; + $16 = $sum$addr; + HEAPF32[$16>>2] = $add; + $17 = $sum$addr; + $arrayidx6 = ((($17)) + 4|0); + $18 = +HEAPF32[$arrayidx6>>2]; + $19 = $tmp; + $20 = $y_1; + $mul7 = $19 * $20; + $add8 = $18 + $mul7; + $21 = $sum$addr; + $arrayidx9 = ((($21)) + 4|0); + HEAPF32[$arrayidx9>>2] = $add8; + $22 = $sum$addr; + $arrayidx10 = ((($22)) + 8|0); + $23 = +HEAPF32[$arrayidx10>>2]; + $24 = $tmp; + $25 = $y_2; + $mul11 = $24 * $25; + $add12 = $23 + $mul11; + $26 = $sum$addr; + $arrayidx13 = ((($26)) + 8|0); + HEAPF32[$arrayidx13>>2] = $add12; + $27 = $sum$addr; + $arrayidx14 = ((($27)) + 12|0); + $28 = +HEAPF32[$arrayidx14>>2]; + $29 = $tmp; + $30 = $y_3; + $mul15 = $29 * $30; + $add16 = $28 + $mul15; + $31 = $sum$addr; + $arrayidx17 = ((($31)) + 12|0); + HEAPF32[$arrayidx17>>2] = $add16; + $32 = $x$addr; + $incdec$ptr18 = ((($32)) + 4|0); + $x$addr = $incdec$ptr18; + $33 = +HEAPF32[$32>>2]; + $tmp = $33; + $34 = $y$addr; + $incdec$ptr19 = ((($34)) + 4|0); + $y$addr = $incdec$ptr19; + $35 = +HEAPF32[$34>>2]; + $y_0 = $35; + $36 = $sum$addr; + $37 = +HEAPF32[$36>>2]; + $38 = $tmp; + $39 = $y_1; + $mul21 = $38 * $39; + $add22 = $37 + $mul21; + $40 = $sum$addr; + HEAPF32[$40>>2] = $add22; + $41 = $sum$addr; + $arrayidx24 = ((($41)) + 4|0); + $42 = +HEAPF32[$arrayidx24>>2]; + $43 = $tmp; + $44 = $y_2; + $mul25 = $43 * $44; + $add26 = $42 + $mul25; + $45 = $sum$addr; + $arrayidx27 = ((($45)) + 4|0); + HEAPF32[$arrayidx27>>2] = $add26; + $46 = $sum$addr; + $arrayidx28 = ((($46)) + 8|0); + $47 = +HEAPF32[$arrayidx28>>2]; + $48 = $tmp; + $49 = $y_3; + $mul29 = $48 * $49; + $add30 = $47 + $mul29; + $50 = $sum$addr; + $arrayidx31 = ((($50)) + 8|0); + HEAPF32[$arrayidx31>>2] = $add30; + $51 = $sum$addr; + $arrayidx32 = ((($51)) + 12|0); + $52 = +HEAPF32[$arrayidx32>>2]; + $53 = $tmp; + $54 = $y_0; + $mul33 = $53 * $54; + $add34 = $52 + $mul33; + $55 = $sum$addr; + $arrayidx35 = ((($55)) + 12|0); + HEAPF32[$arrayidx35>>2] = $add34; + $56 = $x$addr; + $incdec$ptr36 = ((($56)) + 4|0); + $x$addr = $incdec$ptr36; + $57 = +HEAPF32[$56>>2]; + $tmp = $57; + $58 = $y$addr; + $incdec$ptr37 = ((($58)) + 4|0); + $y$addr = $incdec$ptr37; + $59 = +HEAPF32[$58>>2]; + $y_1 = $59; + $60 = $sum$addr; + $61 = +HEAPF32[$60>>2]; + $62 = $tmp; + $63 = $y_2; + $mul39 = $62 * $63; + $add40 = $61 + $mul39; + $64 = $sum$addr; + HEAPF32[$64>>2] = $add40; + $65 = $sum$addr; + $arrayidx42 = ((($65)) + 4|0); + $66 = +HEAPF32[$arrayidx42>>2]; + $67 = $tmp; + $68 = $y_3; + $mul43 = $67 * $68; + $add44 = $66 + $mul43; + $69 = $sum$addr; + $arrayidx45 = ((($69)) + 4|0); + HEAPF32[$arrayidx45>>2] = $add44; + $70 = $sum$addr; + $arrayidx46 = ((($70)) + 8|0); + $71 = +HEAPF32[$arrayidx46>>2]; + $72 = $tmp; + $73 = $y_0; + $mul47 = $72 * $73; + $add48 = $71 + $mul47; + $74 = $sum$addr; + $arrayidx49 = ((($74)) + 8|0); + HEAPF32[$arrayidx49>>2] = $add48; + $75 = $sum$addr; + $arrayidx50 = ((($75)) + 12|0); + $76 = +HEAPF32[$arrayidx50>>2]; + $77 = $tmp; + $78 = $y_1; + $mul51 = $77 * $78; + $add52 = $76 + $mul51; + $79 = $sum$addr; + $arrayidx53 = ((($79)) + 12|0); + HEAPF32[$arrayidx53>>2] = $add52; + $80 = $x$addr; + $incdec$ptr54 = ((($80)) + 4|0); + $x$addr = $incdec$ptr54; + $81 = +HEAPF32[$80>>2]; + $tmp = $81; + $82 = $y$addr; + $incdec$ptr55 = ((($82)) + 4|0); + $y$addr = $incdec$ptr55; + $83 = +HEAPF32[$82>>2]; + $y_2 = $83; + $84 = $sum$addr; + $85 = +HEAPF32[$84>>2]; + $86 = $tmp; + $87 = $y_3; + $mul57 = $86 * $87; + $add58 = $85 + $mul57; + $88 = $sum$addr; + HEAPF32[$88>>2] = $add58; + $89 = $sum$addr; + $arrayidx60 = ((($89)) + 4|0); + $90 = +HEAPF32[$arrayidx60>>2]; + $91 = $tmp; + $92 = $y_0; + $mul61 = $91 * $92; + $add62 = $90 + $mul61; + $93 = $sum$addr; + $arrayidx63 = ((($93)) + 4|0); + HEAPF32[$arrayidx63>>2] = $add62; + $94 = $sum$addr; + $arrayidx64 = ((($94)) + 8|0); + $95 = +HEAPF32[$arrayidx64>>2]; + $96 = $tmp; + $97 = $y_1; + $mul65 = $96 * $97; + $add66 = $95 + $mul65; + $98 = $sum$addr; + $arrayidx67 = ((($98)) + 8|0); + HEAPF32[$arrayidx67>>2] = $add66; + $99 = $sum$addr; + $arrayidx68 = ((($99)) + 12|0); + $100 = +HEAPF32[$arrayidx68>>2]; + $101 = $tmp; + $102 = $y_2; + $mul69 = $101 * $102; + $add70 = $100 + $mul69; + $103 = $sum$addr; + $arrayidx71 = ((($103)) + 12|0); + HEAPF32[$arrayidx71>>2] = $add70; + $104 = $j; + $add72 = (($104) + 4)|0; + $j = $add72; + } + $105 = $j; + $inc = (($105) + 1)|0; + $j = $inc; + $106 = $len$addr; + $cmp73 = ($105|0)<($106|0); + if ($cmp73) { + $107 = $x$addr; + $incdec$ptr75 = ((($107)) + 4|0); + $x$addr = $incdec$ptr75; + $108 = +HEAPF32[$107>>2]; + $tmp74 = $108; + $109 = $y$addr; + $incdec$ptr76 = ((($109)) + 4|0); + $y$addr = $incdec$ptr76; + $110 = +HEAPF32[$109>>2]; + $y_3 = $110; + $111 = $sum$addr; + $112 = +HEAPF32[$111>>2]; + $113 = $tmp74; + $114 = $y_0; + $mul78 = $113 * $114; + $add79 = $112 + $mul78; + $115 = $sum$addr; + HEAPF32[$115>>2] = $add79; + $116 = $sum$addr; + $arrayidx81 = ((($116)) + 4|0); + $117 = +HEAPF32[$arrayidx81>>2]; + $118 = $tmp74; + $119 = $y_1; + $mul82 = $118 * $119; + $add83 = $117 + $mul82; + $120 = $sum$addr; + $arrayidx84 = ((($120)) + 4|0); + HEAPF32[$arrayidx84>>2] = $add83; + $121 = $sum$addr; + $arrayidx85 = ((($121)) + 8|0); + $122 = +HEAPF32[$arrayidx85>>2]; + $123 = $tmp74; + $124 = $y_2; + $mul86 = $123 * $124; + $add87 = $122 + $mul86; + $125 = $sum$addr; + $arrayidx88 = ((($125)) + 8|0); + HEAPF32[$arrayidx88>>2] = $add87; + $126 = $sum$addr; + $arrayidx89 = ((($126)) + 12|0); + $127 = +HEAPF32[$arrayidx89>>2]; + $128 = $tmp74; + $129 = $y_3; + $mul90 = $128 * $129; + $add91 = $127 + $mul90; + $130 = $sum$addr; + $arrayidx92 = ((($130)) + 12|0); + HEAPF32[$arrayidx92>>2] = $add91; + } + $131 = $j; + $inc93 = (($131) + 1)|0; + $j = $inc93; + $132 = $len$addr; + $cmp94 = ($131|0)<($132|0); + if ($cmp94) { + $133 = $x$addr; + $incdec$ptr97 = ((($133)) + 4|0); + $x$addr = $incdec$ptr97; + $134 = +HEAPF32[$133>>2]; + $tmp96 = $134; + $135 = $y$addr; + $incdec$ptr98 = ((($135)) + 4|0); + $y$addr = $incdec$ptr98; + $136 = +HEAPF32[$135>>2]; + $y_0 = $136; + $137 = $sum$addr; + $138 = +HEAPF32[$137>>2]; + $139 = $tmp96; + $140 = $y_1; + $mul100 = $139 * $140; + $add101 = $138 + $mul100; + $141 = $sum$addr; + HEAPF32[$141>>2] = $add101; + $142 = $sum$addr; + $arrayidx103 = ((($142)) + 4|0); + $143 = +HEAPF32[$arrayidx103>>2]; + $144 = $tmp96; + $145 = $y_2; + $mul104 = $144 * $145; + $add105 = $143 + $mul104; + $146 = $sum$addr; + $arrayidx106 = ((($146)) + 4|0); + HEAPF32[$arrayidx106>>2] = $add105; + $147 = $sum$addr; + $arrayidx107 = ((($147)) + 8|0); + $148 = +HEAPF32[$arrayidx107>>2]; + $149 = $tmp96; + $150 = $y_3; + $mul108 = $149 * $150; + $add109 = $148 + $mul108; + $151 = $sum$addr; + $arrayidx110 = ((($151)) + 8|0); + HEAPF32[$arrayidx110>>2] = $add109; + $152 = $sum$addr; + $arrayidx111 = ((($152)) + 12|0); + $153 = +HEAPF32[$arrayidx111>>2]; + $154 = $tmp96; + $155 = $y_0; + $mul112 = $154 * $155; + $add113 = $153 + $mul112; + $156 = $sum$addr; + $arrayidx114 = ((($156)) + 12|0); + HEAPF32[$arrayidx114>>2] = $add113; + } + $157 = $j; + $158 = $len$addr; + $cmp116 = ($157|0)<($158|0); + if (!($cmp116)) { + STACKTOP = sp;return; + } + $159 = $x$addr; + $incdec$ptr119 = ((($159)) + 4|0); + $x$addr = $incdec$ptr119; + $160 = +HEAPF32[$159>>2]; + $tmp118 = $160; + $161 = $y$addr; + $incdec$ptr120 = ((($161)) + 4|0); + $y$addr = $incdec$ptr120; + $162 = +HEAPF32[$161>>2]; + $y_1 = $162; + $163 = $sum$addr; + $164 = +HEAPF32[$163>>2]; + $165 = $tmp118; + $166 = $y_2; + $mul122 = $165 * $166; + $add123 = $164 + $mul122; + $167 = $sum$addr; + HEAPF32[$167>>2] = $add123; + $168 = $sum$addr; + $arrayidx125 = ((($168)) + 4|0); + $169 = +HEAPF32[$arrayidx125>>2]; + $170 = $tmp118; + $171 = $y_3; + $mul126 = $170 * $171; + $add127 = $169 + $mul126; + $172 = $sum$addr; + $arrayidx128 = ((($172)) + 4|0); + HEAPF32[$arrayidx128>>2] = $add127; + $173 = $sum$addr; + $arrayidx129 = ((($173)) + 8|0); + $174 = +HEAPF32[$arrayidx129>>2]; + $175 = $tmp118; + $176 = $y_0; + $mul130 = $175 * $176; + $add131 = $174 + $mul130; + $177 = $sum$addr; + $arrayidx132 = ((($177)) + 8|0); + HEAPF32[$arrayidx132>>2] = $add131; + $178 = $sum$addr; + $arrayidx133 = ((($178)) + 12|0); + $179 = +HEAPF32[$arrayidx133>>2]; + $180 = $tmp118; + $181 = $y_1; + $mul134 = $180 * $181; + $add135 = $179 + $mul134; + $182 = $sum$addr; + $arrayidx136 = ((($182)) + 12|0); + HEAPF32[$arrayidx136>>2] = $add135; + STACKTOP = sp;return; +} +function _celt_iir($_x,$den,$_y,$N,$ord,$mem,$arch) { + $_x = $_x|0; + $den = $den|0; + $_y = $_y|0; + $N = $N|0; + $ord = $ord|0; + $mem = $mem|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0.0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0, $113 = 0.0, $114 = 0.0, $115 = 0; + var $116 = 0.0, $117 = 0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0.0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $14 = 0; + var $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0; + var $33 = 0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0; + var $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0.0, $63 = 0, $64 = 0.0, $65 = 0.0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0; + var $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0, $73 = 0, $74 = 0.0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0, $85 = 0, $86 = 0.0, $87 = 0; + var $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0, $91 = 0, $92 = 0.0, $93 = 0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0, $N$addr = 0, $_x$addr = 0, $_y$addr = 0, $add = 0, $add$ptr = 0, $add102 = 0.0, $add106 = 0; + var $add107 = 0, $add110 = 0, $add113 = 0, $add124 = 0, $add131 = 0, $add16 = 0, $add29 = 0, $add32 = 0, $add35 = 0, $add40 = 0, $add45 = 0, $add48 = 0.0, $add52 = 0, $add53 = 0, $add56 = 0, $add59 = 0, $add60 = 0, $add64 = 0.0, $add67 = 0, $add71 = 0.0; + var $add75 = 0, $add76 = 0, $add79 = 0, $add82 = 0, $add83 = 0, $add87 = 0.0, $add90 = 0, $add91 = 0, $add95 = 0.0, $add98 = 0, $arch$addr = 0, $arrayidx = 0, $arrayidx100 = 0, $arrayidx103 = 0, $arrayidx104 = 0, $arrayidx108 = 0, $arrayidx109 = 0, $arrayidx11 = 0, $arrayidx111 = 0, $arrayidx119 = 0; + var $arrayidx123 = 0, $arrayidx125 = 0, $arrayidx132 = 0, $arrayidx133 = 0, $arrayidx142 = 0, $arrayidx143 = 0, $arrayidx19 = 0, $arrayidx27 = 0, $arrayidx3 = 0, $arrayidx30 = 0, $arrayidx31 = 0, $arrayidx33 = 0, $arrayidx34 = 0, $arrayidx36 = 0, $arrayidx37 = 0, $arrayidx41 = 0, $arrayidx43 = 0, $arrayidx44 = 0, $arrayidx46 = 0, $arrayidx49 = 0; + var $arrayidx50 = 0, $arrayidx54 = 0, $arrayidx55 = 0, $arrayidx57 = 0, $arrayidx58 = 0, $arrayidx61 = 0, $arrayidx65 = 0, $arrayidx66 = 0, $arrayidx68 = 0, $arrayidx69 = 0, $arrayidx72 = 0, $arrayidx73 = 0, $arrayidx77 = 0, $arrayidx78 = 0, $arrayidx80 = 0, $arrayidx81 = 0, $arrayidx84 = 0, $arrayidx88 = 0, $arrayidx89 = 0, $arrayidx9 = 0; + var $arrayidx92 = 0, $arrayidx93 = 0, $arrayidx96 = 0, $arrayidx97 = 0, $arrayidx99 = 0, $cmp = 0, $cmp116 = 0, $cmp121 = 0, $cmp138 = 0, $cmp17 = 0, $cmp25 = 0, $cmp5 = 0, $den$addr = 0, $i = 0, $inc = 0, $inc129 = 0, $inc13 = 0, $inc135 = 0, $inc145 = 0, $inc21 = 0; + var $j = 0, $mem$addr = 0, $mul = 0.0, $mul101 = 0.0, $mul126 = 0.0, $mul63 = 0.0, $mul70 = 0.0, $mul86 = 0.0, $mul94 = 0.0, $ord$addr = 0, $saved_stack = 0, $sub = 0, $sub10 = 0.0, $sub105 = 0.0, $sub127 = 0.0, $sub140 = 0, $sub141 = 0, $sub2 = 0, $sub24 = 0, $sub39 = 0.0; + var $sub51 = 0.0, $sub7 = 0, $sub74 = 0.0, $sub8 = 0, $sum = 0, $sum118 = 0.0, $vla = 0, $vla$alloca_mul = 0, $vla1 = 0, $vla1$alloca_mul = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $sum = sp + 8|0; + $_x$addr = $_x; + $den$addr = $den; + $_y$addr = $_y; + $N$addr = $N; + $ord$addr = $ord; + $mem$addr = $mem; + $arch$addr = $arch; + $0 = $ord$addr; + $1 = (_llvm_stacksave()|0); + $saved_stack = $1; + $vla$alloca_mul = $0<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $2 = $N$addr; + $3 = $ord$addr; + $add = (($2) + ($3))|0; + $vla1$alloca_mul = $add<<2; + $vla1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla1$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla1$alloca_mul)|0)+15)&-16)|0);; + $i = 0; + while(1) { + $4 = $i; + $5 = $ord$addr; + $cmp = ($4|0)<($5|0); + if (!($cmp)) { + break; + } + $6 = $den$addr; + $7 = $ord$addr; + $8 = $i; + $sub = (($7) - ($8))|0; + $sub2 = (($sub) - 1)|0; + $arrayidx = (($6) + ($sub2<<2)|0); + $9 = +HEAPF32[$arrayidx>>2]; + $10 = $i; + $arrayidx3 = (($vla) + ($10<<2)|0); + HEAPF32[$arrayidx3>>2] = $9; + $11 = $i; + $inc = (($11) + 1)|0; + $i = $inc; + } + $i = 0; + while(1) { + $12 = $i; + $13 = $ord$addr; + $cmp5 = ($12|0)<($13|0); + if (!($cmp5)) { + break; + } + $14 = $mem$addr; + $15 = $ord$addr; + $16 = $i; + $sub7 = (($15) - ($16))|0; + $sub8 = (($sub7) - 1)|0; + $arrayidx9 = (($14) + ($sub8<<2)|0); + $17 = +HEAPF32[$arrayidx9>>2]; + $sub10 = - $17; + $18 = $i; + $arrayidx11 = (($vla1) + ($18<<2)|0); + HEAPF32[$arrayidx11>>2] = $sub10; + $19 = $i; + $inc13 = (($19) + 1)|0; + $i = $inc13; + } + while(1) { + $20 = $i; + $21 = $N$addr; + $22 = $ord$addr; + $add16 = (($21) + ($22))|0; + $cmp17 = ($20|0)<($add16|0); + if (!($cmp17)) { + break; + } + $23 = $i; + $arrayidx19 = (($vla1) + ($23<<2)|0); + HEAPF32[$arrayidx19>>2] = 0.0; + $24 = $i; + $inc21 = (($24) + 1)|0; + $i = $inc21; + } + $i = 0; + while(1) { + $25 = $i; + $26 = $N$addr; + $sub24 = (($26) - 3)|0; + $cmp25 = ($25|0)<($sub24|0); + if (!($cmp25)) { + break; + } + $27 = $_x$addr; + $28 = $i; + $arrayidx27 = (($27) + ($28<<2)|0); + $29 = +HEAPF32[$arrayidx27>>2]; + HEAPF32[$sum>>2] = $29; + $30 = $_x$addr; + $31 = $i; + $add29 = (($31) + 1)|0; + $arrayidx30 = (($30) + ($add29<<2)|0); + $32 = +HEAPF32[$arrayidx30>>2]; + $arrayidx31 = ((($sum)) + 4|0); + HEAPF32[$arrayidx31>>2] = $32; + $33 = $_x$addr; + $34 = $i; + $add32 = (($34) + 2)|0; + $arrayidx33 = (($33) + ($add32<<2)|0); + $35 = +HEAPF32[$arrayidx33>>2]; + $arrayidx34 = ((($sum)) + 8|0); + HEAPF32[$arrayidx34>>2] = $35; + $36 = $_x$addr; + $37 = $i; + $add35 = (($37) + 3)|0; + $arrayidx36 = (($36) + ($add35<<2)|0); + $38 = +HEAPF32[$arrayidx36>>2]; + $arrayidx37 = ((($sum)) + 12|0); + HEAPF32[$arrayidx37>>2] = $38; + $39 = $i; + $add$ptr = (($vla1) + ($39<<2)|0); + $40 = $ord$addr; + _xcorr_kernel_c_105($vla,$add$ptr,$sum,$40); + $41 = +HEAPF32[$sum>>2]; + $sub39 = - $41; + $42 = $i; + $43 = $ord$addr; + $add40 = (($42) + ($43))|0; + $arrayidx41 = (($vla1) + ($add40<<2)|0); + HEAPF32[$arrayidx41>>2] = $sub39; + $44 = +HEAPF32[$sum>>2]; + $45 = $_y$addr; + $46 = $i; + $arrayidx43 = (($45) + ($46<<2)|0); + HEAPF32[$arrayidx43>>2] = $44; + $arrayidx44 = ((($sum)) + 4|0); + $47 = +HEAPF32[$arrayidx44>>2]; + $48 = $i; + $49 = $ord$addr; + $add45 = (($48) + ($49))|0; + $arrayidx46 = (($vla1) + ($add45<<2)|0); + $50 = +HEAPF32[$arrayidx46>>2]; + $51 = $den$addr; + $52 = +HEAPF32[$51>>2]; + $mul = $50 * $52; + $add48 = $47 + $mul; + $arrayidx49 = ((($sum)) + 4|0); + HEAPF32[$arrayidx49>>2] = $add48; + $arrayidx50 = ((($sum)) + 4|0); + $53 = +HEAPF32[$arrayidx50>>2]; + $sub51 = - $53; + $54 = $i; + $55 = $ord$addr; + $add52 = (($54) + ($55))|0; + $add53 = (($add52) + 1)|0; + $arrayidx54 = (($vla1) + ($add53<<2)|0); + HEAPF32[$arrayidx54>>2] = $sub51; + $arrayidx55 = ((($sum)) + 4|0); + $56 = +HEAPF32[$arrayidx55>>2]; + $57 = $_y$addr; + $58 = $i; + $add56 = (($58) + 1)|0; + $arrayidx57 = (($57) + ($add56<<2)|0); + HEAPF32[$arrayidx57>>2] = $56; + $arrayidx58 = ((($sum)) + 8|0); + $59 = +HEAPF32[$arrayidx58>>2]; + $60 = $i; + $61 = $ord$addr; + $add59 = (($60) + ($61))|0; + $add60 = (($add59) + 1)|0; + $arrayidx61 = (($vla1) + ($add60<<2)|0); + $62 = +HEAPF32[$arrayidx61>>2]; + $63 = $den$addr; + $64 = +HEAPF32[$63>>2]; + $mul63 = $62 * $64; + $add64 = $59 + $mul63; + $arrayidx65 = ((($sum)) + 8|0); + HEAPF32[$arrayidx65>>2] = $add64; + $arrayidx66 = ((($sum)) + 8|0); + $65 = +HEAPF32[$arrayidx66>>2]; + $66 = $i; + $67 = $ord$addr; + $add67 = (($66) + ($67))|0; + $arrayidx68 = (($vla1) + ($add67<<2)|0); + $68 = +HEAPF32[$arrayidx68>>2]; + $69 = $den$addr; + $arrayidx69 = ((($69)) + 4|0); + $70 = +HEAPF32[$arrayidx69>>2]; + $mul70 = $68 * $70; + $add71 = $65 + $mul70; + $arrayidx72 = ((($sum)) + 8|0); + HEAPF32[$arrayidx72>>2] = $add71; + $arrayidx73 = ((($sum)) + 8|0); + $71 = +HEAPF32[$arrayidx73>>2]; + $sub74 = - $71; + $72 = $i; + $73 = $ord$addr; + $add75 = (($72) + ($73))|0; + $add76 = (($add75) + 2)|0; + $arrayidx77 = (($vla1) + ($add76<<2)|0); + HEAPF32[$arrayidx77>>2] = $sub74; + $arrayidx78 = ((($sum)) + 8|0); + $74 = +HEAPF32[$arrayidx78>>2]; + $75 = $_y$addr; + $76 = $i; + $add79 = (($76) + 2)|0; + $arrayidx80 = (($75) + ($add79<<2)|0); + HEAPF32[$arrayidx80>>2] = $74; + $arrayidx81 = ((($sum)) + 12|0); + $77 = +HEAPF32[$arrayidx81>>2]; + $78 = $i; + $79 = $ord$addr; + $add82 = (($78) + ($79))|0; + $add83 = (($add82) + 2)|0; + $arrayidx84 = (($vla1) + ($add83<<2)|0); + $80 = +HEAPF32[$arrayidx84>>2]; + $81 = $den$addr; + $82 = +HEAPF32[$81>>2]; + $mul86 = $80 * $82; + $add87 = $77 + $mul86; + $arrayidx88 = ((($sum)) + 12|0); + HEAPF32[$arrayidx88>>2] = $add87; + $arrayidx89 = ((($sum)) + 12|0); + $83 = +HEAPF32[$arrayidx89>>2]; + $84 = $i; + $85 = $ord$addr; + $add90 = (($84) + ($85))|0; + $add91 = (($add90) + 1)|0; + $arrayidx92 = (($vla1) + ($add91<<2)|0); + $86 = +HEAPF32[$arrayidx92>>2]; + $87 = $den$addr; + $arrayidx93 = ((($87)) + 4|0); + $88 = +HEAPF32[$arrayidx93>>2]; + $mul94 = $86 * $88; + $add95 = $83 + $mul94; + $arrayidx96 = ((($sum)) + 12|0); + HEAPF32[$arrayidx96>>2] = $add95; + $arrayidx97 = ((($sum)) + 12|0); + $89 = +HEAPF32[$arrayidx97>>2]; + $90 = $i; + $91 = $ord$addr; + $add98 = (($90) + ($91))|0; + $arrayidx99 = (($vla1) + ($add98<<2)|0); + $92 = +HEAPF32[$arrayidx99>>2]; + $93 = $den$addr; + $arrayidx100 = ((($93)) + 8|0); + $94 = +HEAPF32[$arrayidx100>>2]; + $mul101 = $92 * $94; + $add102 = $89 + $mul101; + $arrayidx103 = ((($sum)) + 12|0); + HEAPF32[$arrayidx103>>2] = $add102; + $arrayidx104 = ((($sum)) + 12|0); + $95 = +HEAPF32[$arrayidx104>>2]; + $sub105 = - $95; + $96 = $i; + $97 = $ord$addr; + $add106 = (($96) + ($97))|0; + $add107 = (($add106) + 3)|0; + $arrayidx108 = (($vla1) + ($add107<<2)|0); + HEAPF32[$arrayidx108>>2] = $sub105; + $arrayidx109 = ((($sum)) + 12|0); + $98 = +HEAPF32[$arrayidx109>>2]; + $99 = $_y$addr; + $100 = $i; + $add110 = (($100) + 3)|0; + $arrayidx111 = (($99) + ($add110<<2)|0); + HEAPF32[$arrayidx111>>2] = $98; + $101 = $i; + $add113 = (($101) + 4)|0; + $i = $add113; + } + while(1) { + $102 = $i; + $103 = $N$addr; + $cmp116 = ($102|0)<($103|0); + if (!($cmp116)) { + break; + } + $104 = $_x$addr; + $105 = $i; + $arrayidx119 = (($104) + ($105<<2)|0); + $106 = +HEAPF32[$arrayidx119>>2]; + $sum118 = $106; + $j = 0; + while(1) { + $107 = $j; + $108 = $ord$addr; + $cmp121 = ($107|0)<($108|0); + if (!($cmp121)) { + break; + } + $109 = $j; + $arrayidx123 = (($vla) + ($109<<2)|0); + $110 = +HEAPF32[$arrayidx123>>2]; + $111 = $i; + $112 = $j; + $add124 = (($111) + ($112))|0; + $arrayidx125 = (($vla1) + ($add124<<2)|0); + $113 = +HEAPF32[$arrayidx125>>2]; + $mul126 = $110 * $113; + $114 = $sum118; + $sub127 = $114 - $mul126; + $sum118 = $sub127; + $115 = $j; + $inc129 = (($115) + 1)|0; + $j = $inc129; + } + $116 = $sum118; + $117 = $i; + $118 = $ord$addr; + $add131 = (($117) + ($118))|0; + $arrayidx132 = (($vla1) + ($add131<<2)|0); + HEAPF32[$arrayidx132>>2] = $116; + $119 = $sum118; + $120 = $_y$addr; + $121 = $i; + $arrayidx133 = (($120) + ($121<<2)|0); + HEAPF32[$arrayidx133>>2] = $119; + $122 = $i; + $inc135 = (($122) + 1)|0; + $i = $inc135; + } + $i = 0; + while(1) { + $123 = $i; + $124 = $ord$addr; + $cmp138 = ($123|0)<($124|0); + if (!($cmp138)) { + break; + } + $125 = $_y$addr; + $126 = $N$addr; + $127 = $i; + $sub140 = (($126) - ($127))|0; + $sub141 = (($sub140) - 1)|0; + $arrayidx142 = (($125) + ($sub141<<2)|0); + $128 = +HEAPF32[$arrayidx142>>2]; + $129 = $mem$addr; + $130 = $i; + $arrayidx143 = (($129) + ($130<<2)|0); + HEAPF32[$arrayidx143>>2] = $128; + $131 = $i; + $inc145 = (($131) + 1)|0; + $i = $inc145; + } + $132 = $saved_stack; + _llvm_stackrestore(($132|0)); + STACKTOP = sp;return; +} +function __celt_autocorr($x,$ac,$window,$overlap,$lag,$n,$arch) { + $x = $x|0; + $ac = $ac|0; + $window = $window|0; + $overlap = $overlap|0; + $lag = $lag|0; + $n = $n|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0; + var $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0; + var $45 = 0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ac$addr = 0; + var $add = 0, $add23 = 0, $add31 = 0.0, $add36 = 0.0, $arch$addr = 0, $arrayidx = 0, $arrayidx11 = 0, $arrayidx12 = 0, $arrayidx16 = 0, $arrayidx2 = 0, $arrayidx27 = 0, $arrayidx29 = 0, $arrayidx35 = 0, $arrayidx6 = 0, $arrayidx7 = 0, $arrayidx8 = 0, $cmp = 0, $cmp1 = 0, $cmp21 = 0, $cmp25 = 0; + var $cmp4 = 0, $d = 0.0, $fastN = 0, $i = 0, $inc = 0, $inc18 = 0, $inc33 = 0, $inc38 = 0, $k = 0, $lag$addr = 0, $mul = 0.0, $mul13 = 0.0, $mul30 = 0.0, $n$addr = 0, $overlap$addr = 0, $saved_stack = 0, $shift = 0, $sub = 0, $sub10 = 0, $sub14 = 0; + var $sub15 = 0, $sub28 = 0, $sub9 = 0, $vla = 0, $vla$alloca_mul = 0, $window$addr = 0, $x$addr = 0, $xptr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $x$addr = $x; + $ac$addr = $ac; + $window$addr = $window; + $overlap$addr = $overlap; + $lag$addr = $lag; + $n$addr = $n; + $arch$addr = $arch; + $0 = $n$addr; + $1 = $lag$addr; + $sub = (($0) - ($1))|0; + $fastN = $sub; + $2 = $n$addr; + $3 = (_llvm_stacksave()|0); + $saved_stack = $3; + $vla$alloca_mul = $2<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $4 = $overlap$addr; + $cmp = ($4|0)==(0); + if ($cmp) { + $5 = $x$addr; + $xptr = $5; + } else { + $i = 0; + while(1) { + $6 = $i; + $7 = $n$addr; + $cmp1 = ($6|0)<($7|0); + if (!($cmp1)) { + break; + } + $8 = $x$addr; + $9 = $i; + $arrayidx = (($8) + ($9<<2)|0); + $10 = +HEAPF32[$arrayidx>>2]; + $11 = $i; + $arrayidx2 = (($vla) + ($11<<2)|0); + HEAPF32[$arrayidx2>>2] = $10; + $12 = $i; + $inc = (($12) + 1)|0; + $i = $inc; + } + $i = 0; + while(1) { + $13 = $i; + $14 = $overlap$addr; + $cmp4 = ($13|0)<($14|0); + if (!($cmp4)) { + break; + } + $15 = $x$addr; + $16 = $i; + $arrayidx6 = (($15) + ($16<<2)|0); + $17 = +HEAPF32[$arrayidx6>>2]; + $18 = $window$addr; + $19 = $i; + $arrayidx7 = (($18) + ($19<<2)|0); + $20 = +HEAPF32[$arrayidx7>>2]; + $mul = $17 * $20; + $21 = $i; + $arrayidx8 = (($vla) + ($21<<2)|0); + HEAPF32[$arrayidx8>>2] = $mul; + $22 = $x$addr; + $23 = $n$addr; + $24 = $i; + $sub9 = (($23) - ($24))|0; + $sub10 = (($sub9) - 1)|0; + $arrayidx11 = (($22) + ($sub10<<2)|0); + $25 = +HEAPF32[$arrayidx11>>2]; + $26 = $window$addr; + $27 = $i; + $arrayidx12 = (($26) + ($27<<2)|0); + $28 = +HEAPF32[$arrayidx12>>2]; + $mul13 = $25 * $28; + $29 = $n$addr; + $30 = $i; + $sub14 = (($29) - ($30))|0; + $sub15 = (($sub14) - 1)|0; + $arrayidx16 = (($vla) + ($sub15<<2)|0); + HEAPF32[$arrayidx16>>2] = $mul13; + $31 = $i; + $inc18 = (($31) + 1)|0; + $i = $inc18; + } + $xptr = $vla; + } + $shift = 0; + $32 = $xptr; + $33 = $xptr; + $34 = $ac$addr; + $35 = $fastN; + $36 = $lag$addr; + $add = (($36) + 1)|0; + $37 = $arch$addr; + _celt_pitch_xcorr($32,$33,$34,$35,$add,$37); + $k = 0; + while(1) { + $38 = $k; + $39 = $lag$addr; + $cmp21 = ($38|0)<=($39|0); + if (!($cmp21)) { + break; + } + $40 = $k; + $41 = $fastN; + $add23 = (($40) + ($41))|0; + $i = $add23; + $d = 0.0; + while(1) { + $42 = $i; + $43 = $n$addr; + $cmp25 = ($42|0)<($43|0); + $44 = $d; + if (!($cmp25)) { + break; + } + $45 = $xptr; + $46 = $i; + $arrayidx27 = (($45) + ($46<<2)|0); + $47 = +HEAPF32[$arrayidx27>>2]; + $48 = $xptr; + $49 = $i; + $50 = $k; + $sub28 = (($49) - ($50))|0; + $arrayidx29 = (($48) + ($sub28<<2)|0); + $51 = +HEAPF32[$arrayidx29>>2]; + $mul30 = $47 * $51; + $add31 = $44 + $mul30; + $d = $add31; + $52 = $i; + $inc33 = (($52) + 1)|0; + $i = $inc33; + } + $53 = $ac$addr; + $54 = $k; + $arrayidx35 = (($53) + ($54<<2)|0); + $55 = +HEAPF32[$arrayidx35>>2]; + $add36 = $55 + $44; + HEAPF32[$arrayidx35>>2] = $add36; + $56 = $k; + $inc38 = (($56) + 1)|0; + $k = $inc38; + } + $57 = $shift; + $58 = $saved_stack; + _llvm_stackrestore(($58|0)); + STACKTOP = sp;return ($57|0); +} +function _ec_tell_114($_this) { + $_this = $_this|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $_this$addr = 0, $nbits_total = 0, $rng = 0, $sub = 0, $sub1 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_this$addr = $_this; + $0 = $_this$addr; + $nbits_total = ((($0)) + 20|0); + $1 = HEAP32[$nbits_total>>2]|0; + $2 = $_this$addr; + $rng = ((($2)) + 28|0); + $3 = HEAP32[$rng>>2]|0; + $4 = (Math_clz32(($3|0))|0); + $sub = (32 - ($4))|0; + $sub1 = (($1) - ($sub))|0; + STACKTOP = sp;return ($sub1|0); +} +function _unquant_coarse_energy($m,$start,$end,$oldEBands,$intra,$dec,$C,$LM) { + $m = $m|0; + $start = $start|0; + $end = $end|0; + $oldEBands = $oldEBands|0; + $intra = $intra|0; + $dec = $dec|0; + $C = $C|0; + $LM = $LM|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $8 = 0, $9 = 0, $C$addr = 0, $LM$addr = 0, $add = 0, $add33 = 0, $add41 = 0; + var $add47 = 0, $add51 = 0, $add55 = 0.0, $add56 = 0.0, $add59 = 0, $add62 = 0.0, $and = 0, $arrayidx = 0, $arrayidx1 = 0, $arrayidx2 = 0, $arrayidx3 = 0, $arrayidx34 = 0, $arrayidx42 = 0, $arrayidx48 = 0, $arrayidx52 = 0, $arrayidx54 = 0, $arrayidx60 = 0, $arrayidx61 = 0, $arrayidx65 = 0, $arrayidx8 = 0; + var $arrayidx9 = 0, $beta = 0.0, $budget = 0, $c = 0, $call = 0, $call12 = 0, $call18 = 0, $call25 = 0, $cmp = 0, $cmp15 = 0, $cmp22 = 0, $cmp35 = 0, $cmp4 = 0, $cmp6 = 0, $cmp66 = 0, $coef = 0.0, $cond = 0, $cond44 = 0.0, $conv = 0, $conv10 = 0; + var $conv31 = 0.0, $dec$addr = 0, $end$addr = 0, $i = 0, $inc = 0, $inc68 = 0, $intra$addr = 0, $m$addr = 0, $mul = 0, $mul32 = 0, $mul40 = 0, $mul46 = 0, $mul50 = 0, $mul53 = 0.0, $mul58 = 0, $mul63 = 0.0, $mul7 = 0, $nbEBands = 0, $nbEBands39 = 0, $nbEBands45 = 0; + var $nbEBands49 = 0, $nbEBands57 = 0, $oldEBands$addr = 0, $pi = 0, $prev = 0, $prob_model = 0, $q = 0.0, $qi = 0, $shl = 0, $shl11 = 0, $shr = 0, $start$addr = 0, $storage = 0, $sub = 0, $sub14 = 0, $sub19 = 0, $sub21 = 0, $sub26 = 0, $sub64 = 0.0, $tell = 0; + var $tmp = 0.0, $tobool = 0, $xor = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); + $prev = sp + 32|0; + $m$addr = $m; + $start$addr = $start; + $end$addr = $end; + $oldEBands$addr = $oldEBands; + $intra$addr = $intra; + $dec$addr = $dec; + $C$addr = $C; + $LM$addr = $LM; + $0 = $LM$addr; + $arrayidx = (21832 + (($0*84)|0)|0); + $1 = $intra$addr; + $arrayidx1 = (($arrayidx) + (($1*42)|0)|0); + $prob_model = $arrayidx1; + ;HEAP32[$prev>>2]=0|0;HEAP32[$prev+4>>2]=0|0; + $2 = $intra$addr; + $tobool = ($2|0)!=(0); + if ($tobool) { + $coef = 0.0; + $beta = 0.149993896484375; + } else { + $3 = $LM$addr; + $arrayidx2 = (12156 + ($3<<2)|0); + $4 = +HEAPF32[$arrayidx2>>2]; + $beta = $4; + $5 = $LM$addr; + $arrayidx3 = (12140 + ($5<<2)|0); + $6 = +HEAPF32[$arrayidx3>>2]; + $coef = $6; + } + $7 = $dec$addr; + $storage = ((($7)) + 4|0); + $8 = HEAP32[$storage>>2]|0; + $mul = $8<<3; + $budget = $mul; + $9 = $start$addr; + $i = $9; + while(1) { + $10 = $i; + $11 = $end$addr; + $cmp = ($10|0)<($11|0); + if (!($cmp)) { + break; + } + $c = 0; + while(1) { + $12 = $dec$addr; + $call = (_ec_tell_114($12)|0); + $tell = $call; + $13 = $budget; + $14 = $tell; + $sub = (($13) - ($14))|0; + $cmp4 = ($sub|0)>=(15); + do { + if ($cmp4) { + $15 = $i; + $cmp6 = ($15|0)<(20); + $16 = $i; + $cond = $cmp6 ? $16 : 20; + $mul7 = $cond<<1; + $pi = $mul7; + $17 = $dec$addr; + $18 = $prob_model; + $19 = $pi; + $arrayidx8 = (($18) + ($19)|0); + $20 = HEAP8[$arrayidx8>>0]|0; + $conv = $20&255; + $shl = $conv << 7; + $21 = $prob_model; + $22 = $pi; + $add = (($22) + 1)|0; + $arrayidx9 = (($21) + ($add)|0); + $23 = HEAP8[$arrayidx9>>0]|0; + $conv10 = $23&255; + $shl11 = $conv10 << 6; + $call12 = (_ec_laplace_decode($17,$shl,$shl11)|0); + $qi = $call12; + } else { + $24 = $budget; + $25 = $tell; + $sub14 = (($24) - ($25))|0; + $cmp15 = ($sub14|0)>=(2); + if ($cmp15) { + $26 = $dec$addr; + $call18 = (_ec_dec_icdf($26,22168,2)|0); + $qi = $call18; + $27 = $qi; + $shr = $27 >> 1; + $28 = $qi; + $and = $28 & 1; + $sub19 = (0 - ($and))|0; + $xor = $shr ^ $sub19; + $qi = $xor; + break; + } + $29 = $budget; + $30 = $tell; + $sub21 = (($29) - ($30))|0; + $cmp22 = ($sub21|0)>=(1); + if ($cmp22) { + $31 = $dec$addr; + $call25 = (_ec_dec_bit_logp($31,1)|0); + $sub26 = (0 - ($call25))|0; + $qi = $sub26; + break; + } else { + $qi = -1; + break; + } + } + } while(0); + $32 = $qi; + $conv31 = (+($32|0)); + $q = $conv31; + $33 = $oldEBands$addr; + $34 = $i; + $35 = $c; + $36 = $m$addr; + $nbEBands = ((($36)) + 8|0); + $37 = HEAP32[$nbEBands>>2]|0; + $mul32 = Math_imul($35, $37)|0; + $add33 = (($34) + ($mul32))|0; + $arrayidx34 = (($33) + ($add33<<2)|0); + $38 = +HEAPF32[$arrayidx34>>2]; + $cmp35 = -9.0 > $38; + if ($cmp35) { + $cond44 = -9.0; + } else { + $39 = $oldEBands$addr; + $40 = $i; + $41 = $c; + $42 = $m$addr; + $nbEBands39 = ((($42)) + 8|0); + $43 = HEAP32[$nbEBands39>>2]|0; + $mul40 = Math_imul($41, $43)|0; + $add41 = (($40) + ($mul40))|0; + $arrayidx42 = (($39) + ($add41<<2)|0); + $44 = +HEAPF32[$arrayidx42>>2]; + $cond44 = $44; + } + $45 = $oldEBands$addr; + $46 = $i; + $47 = $c; + $48 = $m$addr; + $nbEBands45 = ((($48)) + 8|0); + $49 = HEAP32[$nbEBands45>>2]|0; + $mul46 = Math_imul($47, $49)|0; + $add47 = (($46) + ($mul46))|0; + $arrayidx48 = (($45) + ($add47<<2)|0); + HEAPF32[$arrayidx48>>2] = $cond44; + $50 = $coef; + $51 = $oldEBands$addr; + $52 = $i; + $53 = $c; + $54 = $m$addr; + $nbEBands49 = ((($54)) + 8|0); + $55 = HEAP32[$nbEBands49>>2]|0; + $mul50 = Math_imul($53, $55)|0; + $add51 = (($52) + ($mul50))|0; + $arrayidx52 = (($51) + ($add51<<2)|0); + $56 = +HEAPF32[$arrayidx52>>2]; + $mul53 = $50 * $56; + $57 = $c; + $arrayidx54 = (($prev) + ($57<<2)|0); + $58 = +HEAPF32[$arrayidx54>>2]; + $add55 = $mul53 + $58; + $59 = $q; + $add56 = $add55 + $59; + $tmp = $add56; + $60 = $tmp; + $61 = $oldEBands$addr; + $62 = $i; + $63 = $c; + $64 = $m$addr; + $nbEBands57 = ((($64)) + 8|0); + $65 = HEAP32[$nbEBands57>>2]|0; + $mul58 = Math_imul($63, $65)|0; + $add59 = (($62) + ($mul58))|0; + $arrayidx60 = (($61) + ($add59<<2)|0); + HEAPF32[$arrayidx60>>2] = $60; + $66 = $c; + $arrayidx61 = (($prev) + ($66<<2)|0); + $67 = +HEAPF32[$arrayidx61>>2]; + $68 = $q; + $add62 = $67 + $68; + $69 = $beta; + $70 = $q; + $mul63 = $69 * $70; + $sub64 = $add62 - $mul63; + $71 = $c; + $arrayidx65 = (($prev) + ($71<<2)|0); + HEAPF32[$arrayidx65>>2] = $sub64; + $72 = $c; + $inc = (($72) + 1)|0; + $c = $inc; + $73 = $C$addr; + $cmp66 = ($inc|0)<($73|0); + if (!($cmp66)) { + break; + } + } + $74 = $i; + $inc68 = (($74) + 1)|0; + $i = $inc68; + } + STACKTOP = sp;return; +} +function _unquant_fine_energy($m,$start,$end,$oldEBands,$fine_quant,$dec,$C) { + $m = $m|0; + $start = $start|0; + $end = $end|0; + $oldEBands = $oldEBands|0; + $fine_quant = $fine_quant|0; + $dec = $dec|0; + $C = $C|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $C$addr = 0, $add = 0.0, $add10 = 0.0, $add8 = 0, $arrayidx = 0, $arrayidx2 = 0, $arrayidx3 = 0, $arrayidx9 = 0, $c = 0, $call = 0, $cmp = 0, $cmp1 = 0, $cmp11 = 0, $conv = 0.0, $conv4 = 0.0, $dec$addr = 0; + var $end$addr = 0, $fine_quant$addr = 0, $i = 0, $inc = 0, $inc13 = 0, $m$addr = 0, $mul = 0.0, $mul5 = 0.0, $mul7 = 0, $nbEBands = 0, $offset = 0.0, $oldEBands$addr = 0, $q2 = 0, $shl = 0, $start$addr = 0, $sub = 0, $sub6 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $m$addr = $m; + $start$addr = $start; + $end$addr = $end; + $oldEBands$addr = $oldEBands; + $fine_quant$addr = $fine_quant; + $dec$addr = $dec; + $C$addr = $C; + $0 = $start$addr; + $i = $0; + while(1) { + $1 = $i; + $2 = $end$addr; + $cmp = ($1|0)<($2|0); + if (!($cmp)) { + break; + } + $3 = $fine_quant$addr; + $4 = $i; + $arrayidx = (($3) + ($4<<2)|0); + $5 = HEAP32[$arrayidx>>2]|0; + $cmp1 = ($5|0)<=(0); + if (!($cmp1)) { + $c = 0; + while(1) { + $6 = $dec$addr; + $7 = $fine_quant$addr; + $8 = $i; + $arrayidx2 = (($7) + ($8<<2)|0); + $9 = HEAP32[$arrayidx2>>2]|0; + $call = (_ec_dec_bits($6,$9)|0); + $q2 = $call; + $10 = $q2; + $conv = (+($10|0)); + $add = $conv + 0.5; + $11 = $fine_quant$addr; + $12 = $i; + $arrayidx3 = (($11) + ($12<<2)|0); + $13 = HEAP32[$arrayidx3>>2]|0; + $sub = (14 - ($13))|0; + $shl = 1 << $sub; + $conv4 = (+($shl|0)); + $mul = $add * $conv4; + $mul5 = $mul * 6.103515625E-5; + $sub6 = $mul5 - 0.5; + $offset = $sub6; + $14 = $offset; + $15 = $oldEBands$addr; + $16 = $i; + $17 = $c; + $18 = $m$addr; + $nbEBands = ((($18)) + 8|0); + $19 = HEAP32[$nbEBands>>2]|0; + $mul7 = Math_imul($17, $19)|0; + $add8 = (($16) + ($mul7))|0; + $arrayidx9 = (($15) + ($add8<<2)|0); + $20 = +HEAPF32[$arrayidx9>>2]; + $add10 = $20 + $14; + HEAPF32[$arrayidx9>>2] = $add10; + $21 = $c; + $inc = (($21) + 1)|0; + $c = $inc; + $22 = $C$addr; + $cmp11 = ($inc|0)<($22|0); + if (!($cmp11)) { + break; + } + } + } + $23 = $i; + $inc13 = (($23) + 1)|0; + $i = $inc13; + } + STACKTOP = sp;return; +} +function _unquant_energy_finalise($m,$start,$end,$oldEBands,$fine_quant,$fine_priority,$bits_left,$dec,$C) { + $m = $m|0; + $start = $start|0; + $end = $end|0; + $oldEBands = $oldEBands|0; + $fine_quant = $fine_quant|0; + $fine_priority = $fine_priority|0; + $bits_left = $bits_left|0; + $dec = $dec|0; + $C = $C|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $C$addr = 0, $add = 0, $add15 = 0.0, $arrayidx = 0, $arrayidx14 = 0, $arrayidx6 = 0, $arrayidx8 = 0, $bits_left$addr = 0, $c = 0, $call = 0; + var $cmp = 0, $cmp17 = 0, $cmp2 = 0, $cmp3 = 0, $cmp5 = 0, $cmp7 = 0, $conv = 0.0, $conv11 = 0.0, $dec$addr = 0, $dec16 = 0, $end$addr = 0, $fine_priority$addr = 0, $fine_quant$addr = 0, $i = 0, $inc = 0, $inc19 = 0, $inc21 = 0, $m$addr = 0, $mul = 0.0, $mul12 = 0.0; + var $mul13 = 0, $nbEBands = 0, $offset = 0.0, $oldEBands$addr = 0, $prio = 0, $q2 = 0, $shl = 0, $start$addr = 0, $sub = 0.0, $sub10 = 0, $sub9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $m$addr = $m; + $start$addr = $start; + $end$addr = $end; + $oldEBands$addr = $oldEBands; + $fine_quant$addr = $fine_quant; + $fine_priority$addr = $fine_priority; + $bits_left$addr = $bits_left; + $dec$addr = $dec; + $C$addr = $C; + $prio = 0; + while(1) { + $0 = $prio; + $cmp = ($0|0)<(2); + if (!($cmp)) { + break; + } + $1 = $start$addr; + $i = $1; + while(1) { + $2 = $i; + $3 = $end$addr; + $cmp2 = ($2|0)<($3|0); + if (!($cmp2)) { + break; + } + $4 = $bits_left$addr; + $5 = $C$addr; + $cmp3 = ($4|0)>=($5|0); + if (!($cmp3)) { + break; + } + $6 = $fine_quant$addr; + $7 = $i; + $arrayidx = (($6) + ($7<<2)|0); + $8 = HEAP32[$arrayidx>>2]|0; + $cmp5 = ($8|0)>=(8); + if (!($cmp5)) { + $9 = $fine_priority$addr; + $10 = $i; + $arrayidx6 = (($9) + ($10<<2)|0); + $11 = HEAP32[$arrayidx6>>2]|0; + $12 = $prio; + $cmp7 = ($11|0)!=($12|0); + if (!($cmp7)) { + $c = 0; + while(1) { + $13 = $dec$addr; + $call = (_ec_dec_bits($13,1)|0); + $q2 = $call; + $14 = $q2; + $conv = (+($14|0)); + $sub = $conv - 0.5; + $15 = $fine_quant$addr; + $16 = $i; + $arrayidx8 = (($15) + ($16<<2)|0); + $17 = HEAP32[$arrayidx8>>2]|0; + $sub9 = (14 - ($17))|0; + $sub10 = (($sub9) - 1)|0; + $shl = 1 << $sub10; + $conv11 = (+($shl|0)); + $mul = $sub * $conv11; + $mul12 = $mul * 6.103515625E-5; + $offset = $mul12; + $18 = $offset; + $19 = $oldEBands$addr; + $20 = $i; + $21 = $c; + $22 = $m$addr; + $nbEBands = ((($22)) + 8|0); + $23 = HEAP32[$nbEBands>>2]|0; + $mul13 = Math_imul($21, $23)|0; + $add = (($20) + ($mul13))|0; + $arrayidx14 = (($19) + ($add<<2)|0); + $24 = +HEAPF32[$arrayidx14>>2]; + $add15 = $24 + $18; + HEAPF32[$arrayidx14>>2] = $add15; + $25 = $bits_left$addr; + $dec16 = (($25) + -1)|0; + $bits_left$addr = $dec16; + $26 = $c; + $inc = (($26) + 1)|0; + $c = $inc; + $27 = $C$addr; + $cmp17 = ($inc|0)<($27|0); + if (!($cmp17)) { + break; + } + } + } + } + $28 = $i; + $inc19 = (($28) + 1)|0; + $i = $inc19; + } + $29 = $prio; + $inc21 = (($29) + 1)|0; + $prio = $inc21; + } + STACKTOP = sp;return; +} +function _compute_allocation($m,$start,$end,$offsets,$cap,$alloc_trim,$intensity,$dual_stereo,$total,$balance,$pulses,$ebits,$fine_priority,$C,$LM,$ec,$encode,$prev,$signalBandwidth) { + $m = $m|0; + $start = $start|0; + $end = $end|0; + $offsets = $offsets|0; + $cap = $cap|0; + $alloc_trim = $alloc_trim|0; + $intensity = $intensity|0; + $dual_stereo = $dual_stereo|0; + $total = $total|0; + $balance = $balance|0; + $pulses = $pulses|0; + $ebits = $ebits|0; + $fine_priority = $fine_priority|0; + $C = $C|0; + $LM = $LM|0; + $ec = $ec|0; + $encode = $encode|0; + $prev = $prev|0; + $signalBandwidth = $signalBandwidth|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; + var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0; + var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0; + var $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0; + var $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $C$addr = 0, $LM$addr = 0, $N = 0, $N159 = 0, $add = 0, $add100 = 0, $add110 = 0, $add116 = 0, $add121 = 0, $add134 = 0, $add141 = 0, $add150 = 0, $add161 = 0; + var $add171 = 0, $add186 = 0, $add198 = 0, $add204 = 0, $add212 = 0, $add218 = 0, $add226 = 0, $add229 = 0, $add33 = 0, $add48 = 0, $add62 = 0, $add68 = 0, $add84 = 0, $add91 = 0, $allocVectors = 0, $allocVectors169 = 0, $allocVectors184 = 0, $alloc_trim$addr = 0, $arrayidx = 0, $arrayidx101 = 0; + var $arrayidx109 = 0, $arrayidx115 = 0, $arrayidx120 = 0, $arrayidx122 = 0, $arrayidx126 = 0, $arrayidx131 = 0, $arrayidx162 = 0, $arrayidx165 = 0, $arrayidx172 = 0, $arrayidx181 = 0, $arrayidx187 = 0, $arrayidx19 = 0, $arrayidx197 = 0, $arrayidx203 = 0, $arrayidx211 = 0, $arrayidx217 = 0, $arrayidx22 = 0, $arrayidx225 = 0, $arrayidx228 = 0, $arrayidx230 = 0; + var $arrayidx243 = 0, $arrayidx244 = 0, $arrayidx34 = 0, $arrayidx37 = 0, $arrayidx46 = 0, $arrayidx49 = 0, $arrayidx52 = 0, $arrayidx66 = 0, $arrayidx69 = 0, $arrayidx72 = 0, $arrayidx80 = 0, $arrayidx92 = 0, $arrayidx95 = 0, $balance$addr = 0, $bits1j = 0, $bits2j = 0, $bitsj = 0, $call = 0, $cap$addr = 0, $cmp = 0; + var $cmp1 = 0, $cmp106 = 0, $cmp111 = 0, $cmp123 = 0, $cmp127 = 0, $cmp137 = 0, $cmp145 = 0, $cmp152 = 0, $cmp156 = 0, $cmp17 = 0, $cmp178 = 0, $cmp194 = 0, $cmp199 = 0, $cmp208 = 0, $cmp213 = 0, $cmp222 = 0, $cmp231 = 0, $cmp236 = 0, $cmp27 = 0, $cmp3 = 0; + var $cmp5 = 0, $cmp76 = 0, $cmp87 = 0, $cmp9 = 0, $codedBands = 0, $cond = 0, $cond11 = 0, $cond118 = 0, $cond133 = 0, $cond193 = 0, $cond2 = 0, $cond206 = 0, $cond220 = 0, $cond242 = 0, $cond45 = 0, $conv = 0, $conv102 = 0, $conv163 = 0, $conv166 = 0, $conv173 = 0; + var $conv188 = 0, $conv20 = 0, $conv23 = 0, $conv35 = 0, $conv38 = 0, $conv50 = 0, $conv53 = 0, $conv70 = 0, $conv73 = 0, $conv93 = 0, $conv96 = 0, $dec = 0, $dec154 = 0, $done = 0, $dual_stereo$addr = 0, $dual_stereo_rsv = 0, $eBands = 0, $eBands160 = 0, $eBands164 = 0, $eBands21 = 0; + var $eBands32 = 0, $eBands36 = 0, $eBands47 = 0, $eBands51 = 0, $eBands67 = 0, $eBands71 = 0, $eBands90 = 0, $eBands94 = 0, $ebits$addr = 0, $ec$addr = 0, $encode$addr = 0, $end$addr = 0, $fine_priority$addr = 0, $hi = 0, $inc = 0, $inc246 = 0, $intensity$addr = 0, $intensity_rsv = 0, $j = 0, $len = 0; + var $lo = 0, $m$addr = 0, $mid = 0, $mul = 0, $mul103 = 0, $mul168 = 0, $mul170 = 0, $mul174 = 0, $mul183 = 0, $mul185 = 0, $mul189 = 0, $mul40 = 0, $mul55 = 0, $mul58 = 0, $mul61 = 0, $mul64 = 0, $mul98 = 0, $mul99 = 0, $nbAllocVectors = 0, $nbAllocVectors177 = 0; + var $nbEBands = 0, $offsets$addr = 0, $or$cond = 0, $prev$addr = 0, $psum = 0, $pulses$addr = 0, $saved_stack = 0, $shl = 0, $shl104 = 0, $shl136 = 0, $shl140 = 0, $shl175 = 0, $shl190 = 0, $shl25 = 0, $shl26 = 0, $shl30 = 0, $shl41 = 0, $shl42 = 0, $shl63 = 0, $shl75 = 0; + var $shl79 = 0, $shr = 0, $shr105 = 0, $shr176 = 0, $shr191 = 0, $shr43 = 0, $shr65 = 0, $shr85 = 0, $signalBandwidth$addr = 0, $skip_rsv = 0, $skip_start = 0, $start$addr = 0, $sub = 0, $sub12 = 0, $sub148 = 0, $sub167 = 0, $sub235 = 0, $sub24 = 0, $sub240 = 0, $sub39 = 0; + var $sub4 = 0, $sub54 = 0, $sub56 = 0, $sub57 = 0, $sub59 = 0, $sub60 = 0, $sub74 = 0, $sub8 = 0, $sub81 = 0, $sub83 = 0, $sub97 = 0, $tobool = 0, $total$addr = 0, $vla = 0, $vla$alloca_mul = 0, $vla14 = 0, $vla14$alloca_mul = 0, $vla15 = 0, $vla15$alloca_mul = 0, $vla16 = 0; + var $vla16$alloca_mul = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(160|0); + $m$addr = $m; + $start$addr = $start; + $end$addr = $end; + $offsets$addr = $offsets; + $cap$addr = $cap; + $alloc_trim$addr = $alloc_trim; + $intensity$addr = $intensity; + $dual_stereo$addr = $dual_stereo; + $total$addr = $total; + $balance$addr = $balance; + $pulses$addr = $pulses; + $ebits$addr = $ebits; + $fine_priority$addr = $fine_priority; + $C$addr = $C; + $LM$addr = $LM; + $ec$addr = $ec; + $encode$addr = $encode; + $prev$addr = $prev; + $signalBandwidth$addr = $signalBandwidth; + $0 = $total$addr; + $cmp = ($0|0)>(0); + $1 = $total$addr; + $cond = $cmp ? $1 : 0; + $total$addr = $cond; + $2 = $m$addr; + $nbEBands = ((($2)) + 8|0); + $3 = HEAP32[$nbEBands>>2]|0; + $len = $3; + $4 = $start$addr; + $skip_start = $4; + $5 = $total$addr; + $cmp1 = ($5|0)>=(8); + $cond2 = $cmp1 ? 8 : 0; + $skip_rsv = $cond2; + $6 = $skip_rsv; + $7 = $total$addr; + $sub = (($7) - ($6))|0; + $total$addr = $sub; + $dual_stereo_rsv = 0; + $intensity_rsv = 0; + $8 = $C$addr; + $cmp3 = ($8|0)==(2); + do { + if ($cmp3) { + $9 = $end$addr; + $10 = $start$addr; + $sub4 = (($9) - ($10))|0; + $arrayidx = (22171 + ($sub4)|0); + $11 = HEAP8[$arrayidx>>0]|0; + $conv = $11&255; + $intensity_rsv = $conv; + $12 = $intensity_rsv; + $13 = $total$addr; + $cmp5 = ($12|0)>($13|0); + if ($cmp5) { + $intensity_rsv = 0; + break; + } else { + $14 = $intensity_rsv; + $15 = $total$addr; + $sub8 = (($15) - ($14))|0; + $total$addr = $sub8; + $16 = $total$addr; + $cmp9 = ($16|0)>=(8); + $cond11 = $cmp9 ? 8 : 0; + $dual_stereo_rsv = $cond11; + $17 = $dual_stereo_rsv; + $18 = $total$addr; + $sub12 = (($18) - ($17))|0; + $total$addr = $sub12; + break; + } + } + } while(0); + $19 = $len; + $20 = (_llvm_stacksave()|0); + $saved_stack = $20; + $vla$alloca_mul = $19<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $21 = $len; + $vla14$alloca_mul = $21<<2; + $vla14 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla14$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla14$alloca_mul)|0)+15)&-16)|0);; + $22 = $len; + $vla15$alloca_mul = $22<<2; + $vla15 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla15$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla15$alloca_mul)|0)+15)&-16)|0);; + $23 = $len; + $vla16$alloca_mul = $23<<2; + $vla16 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla16$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla16$alloca_mul)|0)+15)&-16)|0);; + $24 = $start$addr; + $j = $24; + while(1) { + $25 = $j; + $26 = $end$addr; + $cmp17 = ($25|0)<($26|0); + if (!($cmp17)) { + break; + } + $27 = $C$addr; + $shl = $27 << 3; + $28 = $m$addr; + $eBands = ((($28)) + 32|0); + $29 = HEAP32[$eBands>>2]|0; + $30 = $j; + $add = (($30) + 1)|0; + $arrayidx19 = (($29) + ($add<<1)|0); + $31 = HEAP16[$arrayidx19>>1]|0; + $conv20 = $31 << 16 >> 16; + $32 = $m$addr; + $eBands21 = ((($32)) + 32|0); + $33 = HEAP32[$eBands21>>2]|0; + $34 = $j; + $arrayidx22 = (($33) + ($34<<1)|0); + $35 = HEAP16[$arrayidx22>>1]|0; + $conv23 = $35 << 16 >> 16; + $sub24 = (($conv20) - ($conv23))|0; + $mul = ($sub24*3)|0; + $36 = $LM$addr; + $shl25 = $mul << $36; + $shl26 = $shl25 << 3; + $shr = $shl26 >> 4; + $cmp27 = ($shl|0)>($shr|0); + if ($cmp27) { + $37 = $C$addr; + $shl30 = $37 << 3; + $cond45 = $shl30; + } else { + $38 = $m$addr; + $eBands32 = ((($38)) + 32|0); + $39 = HEAP32[$eBands32>>2]|0; + $40 = $j; + $add33 = (($40) + 1)|0; + $arrayidx34 = (($39) + ($add33<<1)|0); + $41 = HEAP16[$arrayidx34>>1]|0; + $conv35 = $41 << 16 >> 16; + $42 = $m$addr; + $eBands36 = ((($42)) + 32|0); + $43 = HEAP32[$eBands36>>2]|0; + $44 = $j; + $arrayidx37 = (($43) + ($44<<1)|0); + $45 = HEAP16[$arrayidx37>>1]|0; + $conv38 = $45 << 16 >> 16; + $sub39 = (($conv35) - ($conv38))|0; + $mul40 = ($sub39*3)|0; + $46 = $LM$addr; + $shl41 = $mul40 << $46; + $shl42 = $shl41 << 3; + $shr43 = $shl42 >> 4; + $cond45 = $shr43; + } + $47 = $j; + $arrayidx46 = (($vla15) + ($47<<2)|0); + HEAP32[$arrayidx46>>2] = $cond45; + $48 = $C$addr; + $49 = $m$addr; + $eBands47 = ((($49)) + 32|0); + $50 = HEAP32[$eBands47>>2]|0; + $51 = $j; + $add48 = (($51) + 1)|0; + $arrayidx49 = (($50) + ($add48<<1)|0); + $52 = HEAP16[$arrayidx49>>1]|0; + $conv50 = $52 << 16 >> 16; + $53 = $m$addr; + $eBands51 = ((($53)) + 32|0); + $54 = HEAP32[$eBands51>>2]|0; + $55 = $j; + $arrayidx52 = (($54) + ($55<<1)|0); + $56 = HEAP16[$arrayidx52>>1]|0; + $conv53 = $56 << 16 >> 16; + $sub54 = (($conv50) - ($conv53))|0; + $mul55 = Math_imul($48, $sub54)|0; + $57 = $alloc_trim$addr; + $sub56 = (($57) - 5)|0; + $58 = $LM$addr; + $sub57 = (($sub56) - ($58))|0; + $mul58 = Math_imul($mul55, $sub57)|0; + $59 = $end$addr; + $60 = $j; + $sub59 = (($59) - ($60))|0; + $sub60 = (($sub59) - 1)|0; + $mul61 = Math_imul($mul58, $sub60)|0; + $61 = $LM$addr; + $add62 = (($61) + 3)|0; + $shl63 = 1 << $add62; + $mul64 = Math_imul($mul61, $shl63)|0; + $shr65 = $mul64 >> 6; + $62 = $j; + $arrayidx66 = (($vla16) + ($62<<2)|0); + HEAP32[$arrayidx66>>2] = $shr65; + $63 = $m$addr; + $eBands67 = ((($63)) + 32|0); + $64 = HEAP32[$eBands67>>2]|0; + $65 = $j; + $add68 = (($65) + 1)|0; + $arrayidx69 = (($64) + ($add68<<1)|0); + $66 = HEAP16[$arrayidx69>>1]|0; + $conv70 = $66 << 16 >> 16; + $67 = $m$addr; + $eBands71 = ((($67)) + 32|0); + $68 = HEAP32[$eBands71>>2]|0; + $69 = $j; + $arrayidx72 = (($68) + ($69<<1)|0); + $70 = HEAP16[$arrayidx72>>1]|0; + $conv73 = $70 << 16 >> 16; + $sub74 = (($conv70) - ($conv73))|0; + $71 = $LM$addr; + $shl75 = $sub74 << $71; + $cmp76 = ($shl75|0)==(1); + if ($cmp76) { + $72 = $C$addr; + $shl79 = $72 << 3; + $73 = $j; + $arrayidx80 = (($vla16) + ($73<<2)|0); + $74 = HEAP32[$arrayidx80>>2]|0; + $sub81 = (($74) - ($shl79))|0; + HEAP32[$arrayidx80>>2] = $sub81; + } + $75 = $j; + $inc = (($75) + 1)|0; + $j = $inc; + } + $lo = 1; + $76 = $m$addr; + $nbAllocVectors = ((($76)) + 48|0); + $77 = HEAP32[$nbAllocVectors>>2]|0; + $sub83 = (($77) - 1)|0; + $hi = $sub83; + while(1) { + $done = 0; + $psum = 0; + $78 = $lo; + $79 = $hi; + $add84 = (($78) + ($79))|0; + $shr85 = $add84 >> 1; + $mid = $shr85; + $80 = $end$addr; + $j = $80; + while(1) { + $81 = $j; + $dec = (($81) + -1)|0; + $j = $dec; + $82 = $start$addr; + $cmp87 = ($81|0)>($82|0); + if (!($cmp87)) { + break; + } + $83 = $m$addr; + $eBands90 = ((($83)) + 32|0); + $84 = HEAP32[$eBands90>>2]|0; + $85 = $j; + $add91 = (($85) + 1)|0; + $arrayidx92 = (($84) + ($add91<<1)|0); + $86 = HEAP16[$arrayidx92>>1]|0; + $conv93 = $86 << 16 >> 16; + $87 = $m$addr; + $eBands94 = ((($87)) + 32|0); + $88 = HEAP32[$eBands94>>2]|0; + $89 = $j; + $arrayidx95 = (($88) + ($89<<1)|0); + $90 = HEAP16[$arrayidx95>>1]|0; + $conv96 = $90 << 16 >> 16; + $sub97 = (($conv93) - ($conv96))|0; + $N = $sub97; + $91 = $C$addr; + $92 = $N; + $mul98 = Math_imul($91, $92)|0; + $93 = $m$addr; + $allocVectors = ((($93)) + 52|0); + $94 = HEAP32[$allocVectors>>2]|0; + $95 = $mid; + $96 = $len; + $mul99 = Math_imul($95, $96)|0; + $97 = $j; + $add100 = (($mul99) + ($97))|0; + $arrayidx101 = (($94) + ($add100)|0); + $98 = HEAP8[$arrayidx101>>0]|0; + $conv102 = $98&255; + $mul103 = Math_imul($mul98, $conv102)|0; + $99 = $LM$addr; + $shl104 = $mul103 << $99; + $shr105 = $shl104 >> 2; + $bitsj = $shr105; + $100 = $bitsj; + $cmp106 = ($100|0)>(0); + if ($cmp106) { + $101 = $bitsj; + $102 = $j; + $arrayidx109 = (($vla16) + ($102<<2)|0); + $103 = HEAP32[$arrayidx109>>2]|0; + $add110 = (($101) + ($103))|0; + $cmp111 = (0)>($add110|0); + if ($cmp111) { + $cond118 = 0; + } else { + $104 = $bitsj; + $105 = $j; + $arrayidx115 = (($vla16) + ($105<<2)|0); + $106 = HEAP32[$arrayidx115>>2]|0; + $add116 = (($104) + ($106))|0; + $cond118 = $add116; + } + $bitsj = $cond118; + } + $107 = $offsets$addr; + $108 = $j; + $arrayidx120 = (($107) + ($108<<2)|0); + $109 = HEAP32[$arrayidx120>>2]|0; + $110 = $bitsj; + $add121 = (($110) + ($109))|0; + $bitsj = $add121; + $111 = $bitsj; + $112 = $j; + $arrayidx122 = (($vla15) + ($112<<2)|0); + $113 = HEAP32[$arrayidx122>>2]|0; + $cmp123 = ($111|0)>=($113|0); + $114 = $done; + $tobool = ($114|0)!=(0); + $or$cond = $cmp123 | $tobool; + if (!($or$cond)) { + $124 = $bitsj; + $125 = $C$addr; + $shl136 = $125 << 3; + $cmp137 = ($124|0)>=($shl136|0); + if (!($cmp137)) { + continue; + } + $126 = $C$addr; + $shl140 = $126 << 3; + $127 = $psum; + $add141 = (($127) + ($shl140))|0; + $psum = $add141; + continue; + } + $done = 1; + $115 = $bitsj; + $116 = $cap$addr; + $117 = $j; + $arrayidx126 = (($116) + ($117<<2)|0); + $118 = HEAP32[$arrayidx126>>2]|0; + $cmp127 = ($115|0)<($118|0); + if ($cmp127) { + $119 = $bitsj; + $cond133 = $119; + } else { + $120 = $cap$addr; + $121 = $j; + $arrayidx131 = (($120) + ($121<<2)|0); + $122 = HEAP32[$arrayidx131>>2]|0; + $cond133 = $122; + } + $123 = $psum; + $add134 = (($123) + ($cond133))|0; + $psum = $add134; + } + $128 = $psum; + $129 = $total$addr; + $cmp145 = ($128|0)>($129|0); + $130 = $mid; + if ($cmp145) { + $sub148 = (($130) - 1)|0; + $hi = $sub148; + } else { + $add150 = (($130) + 1)|0; + $lo = $add150; + } + $131 = $lo; + $132 = $hi; + $cmp152 = ($131|0)<=($132|0); + if (!($cmp152)) { + break; + } + } + $133 = $lo; + $dec154 = (($133) + -1)|0; + $lo = $dec154; + $hi = $133; + $134 = $start$addr; + $j = $134; + while(1) { + $135 = $j; + $136 = $end$addr; + $cmp156 = ($135|0)<($136|0); + $137 = $m$addr; + if (!($cmp156)) { + break; + } + $eBands160 = ((($137)) + 32|0); + $138 = HEAP32[$eBands160>>2]|0; + $139 = $j; + $add161 = (($139) + 1)|0; + $arrayidx162 = (($138) + ($add161<<1)|0); + $140 = HEAP16[$arrayidx162>>1]|0; + $conv163 = $140 << 16 >> 16; + $141 = $m$addr; + $eBands164 = ((($141)) + 32|0); + $142 = HEAP32[$eBands164>>2]|0; + $143 = $j; + $arrayidx165 = (($142) + ($143<<1)|0); + $144 = HEAP16[$arrayidx165>>1]|0; + $conv166 = $144 << 16 >> 16; + $sub167 = (($conv163) - ($conv166))|0; + $N159 = $sub167; + $145 = $C$addr; + $146 = $N159; + $mul168 = Math_imul($145, $146)|0; + $147 = $m$addr; + $allocVectors169 = ((($147)) + 52|0); + $148 = HEAP32[$allocVectors169>>2]|0; + $149 = $lo; + $150 = $len; + $mul170 = Math_imul($149, $150)|0; + $151 = $j; + $add171 = (($mul170) + ($151))|0; + $arrayidx172 = (($148) + ($add171)|0); + $152 = HEAP8[$arrayidx172>>0]|0; + $conv173 = $152&255; + $mul174 = Math_imul($mul168, $conv173)|0; + $153 = $LM$addr; + $shl175 = $mul174 << $153; + $shr176 = $shl175 >> 2; + $bits1j = $shr176; + $154 = $hi; + $155 = $m$addr; + $nbAllocVectors177 = ((($155)) + 48|0); + $156 = HEAP32[$nbAllocVectors177>>2]|0; + $cmp178 = ($154|0)>=($156|0); + if ($cmp178) { + $157 = $cap$addr; + $158 = $j; + $arrayidx181 = (($157) + ($158<<2)|0); + $159 = HEAP32[$arrayidx181>>2]|0; + $cond193 = $159; + } else { + $160 = $C$addr; + $161 = $N159; + $mul183 = Math_imul($160, $161)|0; + $162 = $m$addr; + $allocVectors184 = ((($162)) + 52|0); + $163 = HEAP32[$allocVectors184>>2]|0; + $164 = $hi; + $165 = $len; + $mul185 = Math_imul($164, $165)|0; + $166 = $j; + $add186 = (($mul185) + ($166))|0; + $arrayidx187 = (($163) + ($add186)|0); + $167 = HEAP8[$arrayidx187>>0]|0; + $conv188 = $167&255; + $mul189 = Math_imul($mul183, $conv188)|0; + $168 = $LM$addr; + $shl190 = $mul189 << $168; + $shr191 = $shl190 >> 2; + $cond193 = $shr191; + } + $bits2j = $cond193; + $169 = $bits1j; + $cmp194 = ($169|0)>(0); + if ($cmp194) { + $170 = $bits1j; + $171 = $j; + $arrayidx197 = (($vla16) + ($171<<2)|0); + $172 = HEAP32[$arrayidx197>>2]|0; + $add198 = (($170) + ($172))|0; + $cmp199 = (0)>($add198|0); + if ($cmp199) { + $cond206 = 0; + } else { + $173 = $bits1j; + $174 = $j; + $arrayidx203 = (($vla16) + ($174<<2)|0); + $175 = HEAP32[$arrayidx203>>2]|0; + $add204 = (($173) + ($175))|0; + $cond206 = $add204; + } + $bits1j = $cond206; + } + $176 = $bits2j; + $cmp208 = ($176|0)>(0); + if ($cmp208) { + $177 = $bits2j; + $178 = $j; + $arrayidx211 = (($vla16) + ($178<<2)|0); + $179 = HEAP32[$arrayidx211>>2]|0; + $add212 = (($177) + ($179))|0; + $cmp213 = (0)>($add212|0); + if ($cmp213) { + $cond220 = 0; + } else { + $180 = $bits2j; + $181 = $j; + $arrayidx217 = (($vla16) + ($181<<2)|0); + $182 = HEAP32[$arrayidx217>>2]|0; + $add218 = (($180) + ($182))|0; + $cond220 = $add218; + } + $bits2j = $cond220; + } + $183 = $lo; + $cmp222 = ($183|0)>(0); + if ($cmp222) { + $184 = $offsets$addr; + $185 = $j; + $arrayidx225 = (($184) + ($185<<2)|0); + $186 = HEAP32[$arrayidx225>>2]|0; + $187 = $bits1j; + $add226 = (($187) + ($186))|0; + $bits1j = $add226; + } + $188 = $offsets$addr; + $189 = $j; + $arrayidx228 = (($188) + ($189<<2)|0); + $190 = HEAP32[$arrayidx228>>2]|0; + $191 = $bits2j; + $add229 = (($191) + ($190))|0; + $bits2j = $add229; + $192 = $offsets$addr; + $193 = $j; + $arrayidx230 = (($192) + ($193<<2)|0); + $194 = HEAP32[$arrayidx230>>2]|0; + $cmp231 = ($194|0)>(0); + if ($cmp231) { + $195 = $j; + $skip_start = $195; + } + $196 = $bits2j; + $197 = $bits1j; + $sub235 = (($196) - ($197))|0; + $cmp236 = (0)>($sub235|0); + if ($cmp236) { + $cond242 = 0; + } else { + $198 = $bits2j; + $199 = $bits1j; + $sub240 = (($198) - ($199))|0; + $cond242 = $sub240; + } + $bits2j = $cond242; + $200 = $bits1j; + $201 = $j; + $arrayidx243 = (($vla) + ($201<<2)|0); + HEAP32[$arrayidx243>>2] = $200; + $202 = $bits2j; + $203 = $j; + $arrayidx244 = (($vla14) + ($203<<2)|0); + HEAP32[$arrayidx244>>2] = $202; + $204 = $j; + $inc246 = (($204) + 1)|0; + $j = $inc246; + } + $205 = $start$addr; + $206 = $end$addr; + $207 = $skip_start; + $208 = $cap$addr; + $209 = $total$addr; + $210 = $balance$addr; + $211 = $skip_rsv; + $212 = $intensity$addr; + $213 = $intensity_rsv; + $214 = $dual_stereo$addr; + $215 = $dual_stereo_rsv; + $216 = $pulses$addr; + $217 = $ebits$addr; + $218 = $fine_priority$addr; + $219 = $C$addr; + $220 = $LM$addr; + $221 = $ec$addr; + $222 = $encode$addr; + $223 = $prev$addr; + $224 = $signalBandwidth$addr; + $call = (_interp_bits2pulses($137,$205,$206,$207,$vla,$vla14,$vla15,$208,$209,$210,$211,$212,$213,$214,$215,$216,$217,$218,$219,$220,$221,$222,$223,$224)|0); + $codedBands = $call; + $225 = $codedBands; + $226 = $saved_stack; + _llvm_stackrestore(($226|0)); + STACKTOP = sp;return ($225|0); +} +function _interp_bits2pulses($m,$start,$end,$skip_start,$bits1,$bits2,$thresh,$cap,$total,$_balance,$skip_rsv,$intensity,$intensity_rsv,$dual_stereo,$dual_stereo_rsv,$bits,$ebits,$fine_priority,$C,$LM,$ec,$encode,$prev,$signalBandwidth) { + $m = $m|0; + $start = $start|0; + $end = $end|0; + $skip_start = $skip_start|0; + $bits1 = $bits1|0; + $bits2 = $bits2|0; + $thresh = $thresh|0; + $cap = $cap|0; + $total = $total|0; + $_balance = $_balance|0; + $skip_rsv = $skip_rsv|0; + $intensity = $intensity|0; + $intensity_rsv = $intensity_rsv|0; + $dual_stereo = $dual_stereo|0; + $dual_stereo_rsv = $dual_stereo_rsv|0; + $bits = $bits|0; + $ebits = $ebits|0; + $fine_priority = $fine_priority|0; + $C = $C|0; + $LM = $LM|0; + $ec = $ec|0; + $encode = $encode|0; + $prev = $prev|0; + $signalBandwidth = $signalBandwidth|0; + var $$sink = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; + var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; + var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; + var $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0; + var $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0; + var $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0; + var $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0; + var $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0; + var $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0; + var $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0; + var $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0; + var $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0; + var $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0; + var $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0; + var $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0; + var $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0; + var $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0; + var $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0; + var $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0; + var $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; + var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; + var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; + var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $C$addr = 0, $LM$addr = 0, $N = 0, $N0 = 0, $NClogN = 0, $_balance$addr = 0, $add = 0, $add10 = 0, $add117 = 0, $add118 = 0, $add120 = 0; + var $add126 = 0, $add134 = 0, $add158 = 0, $add162 = 0, $add171 = 0, $add175 = 0, $add18 = 0, $add195 = 0, $add198 = 0, $add201 = 0, $add208 = 0, $add22 = 0, $add243 = 0, $add252 = 0, $add262 = 0, $add274 = 0, $add284 = 0, $add294 = 0, $add303 = 0, $add330 = 0; + var $add333 = 0, $add343 = 0, $add346 = 0, $add353 = 0, $add356 = 0, $add363 = 0, $add367 = 0, $add369 = 0, $add375 = 0, $add377 = 0, $add40 = 0, $add410 = 0, $add438 = 0, $add445 = 0, $add453 = 0, $add62 = 0, $add68 = 0, $alloc_floor = 0, $arrayidx = 0, $arrayidx101 = 0; + var $arrayidx109 = 0, $arrayidx11 = 0, $arrayidx112 = 0, $arrayidx115 = 0, $arrayidx119 = 0, $arrayidx124 = 0, $arrayidx14 = 0, $arrayidx161 = 0, $arrayidx168 = 0, $arrayidx17 = 0, $arrayidx176 = 0, $arrayidx178 = 0, $arrayidx178$sink = 0, $arrayidx222 = 0, $arrayidx225 = 0, $arrayidx230 = 0, $arrayidx233 = 0, $arrayidx244 = 0, $arrayidx247 = 0, $arrayidx251 = 0; + var $arrayidx263 = 0, $arrayidx266 = 0, $arrayidx275 = 0, $arrayidx278 = 0, $arrayidx283 = 0, $arrayidx295 = 0, $arrayidx298 = 0, $arrayidx302 = 0, $arrayidx307 = 0, $arrayidx312 = 0, $arrayidx318 = 0, $arrayidx331 = 0, $arrayidx345 = 0, $arrayidx355 = 0, $arrayidx36 = 0, $arrayidx366 = 0, $arrayidx37 = 0, $arrayidx374 = 0, $arrayidx380 = 0, $arrayidx381 = 0; + var $arrayidx384 = 0, $arrayidx385 = 0, $arrayidx387 = 0, $arrayidx392 = 0, $arrayidx395 = 0, $arrayidx397 = 0, $arrayidx401 = 0, $arrayidx405 = 0, $arrayidx406 = 0, $arrayidx409 = 0, $arrayidx41 = 0, $arrayidx413 = 0, $arrayidx414 = 0, $arrayidx417 = 0, $arrayidx431 = 0, $arrayidx432 = 0, $arrayidx433 = 0, $arrayidx440 = 0, $arrayidx448 = 0, $arrayidx452 = 0; + var $arrayidx459 = 0, $arrayidx469 = 0, $arrayidx472 = 0, $arrayidx473 = 0, $arrayidx474 = 0, $arrayidx477 = 0, $arrayidx53 = 0, $arrayidx58 = 0, $arrayidx61 = 0, $arrayidx71 = 0, $arrayidx74 = 0, $arrayidx78 = 0, $arrayidx8 = 0, $arrayidx81 = 0, $arrayidx87 = 0, $arrayidx90 = 0, $arrayidx98 = 0, $balance = 0, $band_bits = 0, $band_width = 0; + var $bit = 0, $bits$addr = 0, $bits1$addr = 0, $bits2$addr = 0, $call = 0, $call153 = 0, $call200 = 0, $call216 = 0, $call228 = 0, $call382 = 0, $cap$addr = 0, $cmp = 0, $cmp12 = 0, $cmp121 = 0, $cmp129 = 0, $cmp135 = 0, $cmp138 = 0, $cmp145 = 0, $cmp148 = 0, $cmp15 = 0; + var $cmp164 = 0, $cmp172 = 0, $cmp183 = 0, $cmp188 = 0, $cmp19 = 0, $cmp2 = 0, $cmp205 = 0, $cmp210 = 0, $cmp239 = 0, $cmp24 = 0, $cmp257 = 0, $cmp269 = 0, $cmp290 = 0, $cmp304 = 0, $cmp309 = 0, $cmp32 = 0, $cmp320 = 0, $cmp323 = 0, $cmp327 = 0, $cmp338 = 0; + var $cmp349 = 0, $cmp359 = 0, $cmp370 = 0, $cmp389 = 0, $cmp398 = 0, $cmp411 = 0, $cmp42 = 0, $cmp422 = 0, $cmp435 = 0, $cmp442 = 0, $cmp457 = 0, $cmp46 = 0, $cmp466 = 0, $cmp475 = 0, $cmp5 = 0, $cmp54 = 0, $cmp65 = 0, $cmp94 = 0, $codedBands = 0, $cond = 0; + var $cond107 = 0, $cond128 = 0, $cond140 = 0, $cond193 = 0, $cond282 = 0, $cond316 = 0, $cond329 = 0, $cond379 = 0, $cond404 = 0, $cond429 = 0, $cond451 = 0, $cond60 = 0, $conv = 0, $conv102 = 0, $conv110 = 0, $conv113 = 0, $conv169 = 0, $conv223 = 0, $conv226 = 0, $conv231 = 0; + var $conv234 = 0, $conv245 = 0, $conv248 = 0, $conv264 = 0, $conv267 = 0, $conv276 = 0, $conv279 = 0, $conv296 = 0, $conv299 = 0, $conv332 = 0, $conv412 = 0, $conv458 = 0, $conv476 = 0, $conv72 = 0, $conv75 = 0, $conv79 = 0, $conv82 = 0, $conv88 = 0, $conv91 = 0, $conv99 = 0; + var $dec = 0, $dec181 = 0, $dec31 = 0, $den = 0, $done = 0, $dual_stereo$addr = 0, $dual_stereo_rsv$addr = 0, $eBands = 0, $eBands100 = 0, $eBands108 = 0, $eBands111 = 0, $eBands221 = 0, $eBands224 = 0, $eBands229 = 0, $eBands232 = 0, $eBands242 = 0, $eBands246 = 0, $eBands261 = 0, $eBands265 = 0, $eBands273 = 0; + var $eBands277 = 0, $eBands293 = 0, $eBands297 = 0, $eBands73 = 0, $eBands77 = 0, $eBands80 = 0, $eBands86 = 0, $eBands89 = 0, $eBands97 = 0, $ebits$addr = 0, $ec$addr = 0, $encode$addr = 0, $end$addr = 0, $excess = 0, $extra_bits = 0, $extra_fine = 0, $fine_priority$addr = 0, $hi = 0, $i = 0, $inc = 0; + var $inc254 = 0, $inc287 = 0, $inc463 = 0, $inc479 = 0, $intensity$addr = 0, $intensity_rsv$addr = 0, $j = 0, $left = 0, $lo = 0, $logM = 0, $logN = 0, $m$addr = 0, $mid = 0, $mul = 0, $mul116 = 0, $mul141 = 0, $mul236 = 0, $mul250 = 0, $mul319 = 0, $mul334 = 0; + var $mul336 = 0, $mul347 = 0, $mul357 = 0, $mul38 = 0, $mul386 = 0, $mul408 = 0, $mul415 = 0, $mul454 = 0, $mul84 = 0, $offset = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $percoeff = 0, $prev$addr = 0, $psum = 0, $rem = 0, $shl = 0, $shl1 = 0, $shl142 = 0; + var $shl143 = 0, $shl301 = 0, $shl341 = 0, $shl348 = 0, $shl358 = 0, $shl368 = 0, $shl376 = 0, $shl407 = 0, $shl416 = 0, $shl420 = 0, $shl426 = 0, $shl455 = 0, $shr = 0, $shr144 = 0, $shr335 = 0, $shr342 = 0, $shr352 = 0, $shr362 = 0, $shr383 = 0, $shr388 = 0; + var $shr39 = 0, $shr393 = 0, $shr394 = 0, $shr439 = 0, $shr446 = 0, $shr470 = 0, $shr471 = 0, $shr9 = 0, $signalBandwidth$addr = 0, $skip_rsv$addr = 0, $skip_start$addr = 0, $start$addr = 0, $stereo = 0, $sub = 0, $sub103 = 0, $sub104 = 0, $sub114 = 0, $sub159 = 0, $sub163 = 0, $sub167 = 0; + var $sub194 = 0, $sub196 = 0, $sub199 = 0, $sub220 = 0, $sub227 = 0, $sub235 = 0, $sub237 = 0, $sub249 = 0, $sub268 = 0, $sub280 = 0, $sub285 = 0, $sub300 = 0, $sub308 = 0, $sub313 = 0, $sub317 = 0, $sub337 = 0, $sub418 = 0, $sub421 = 0, $sub427 = 0, $sub430 = 0; + var $sub441 = 0, $sub449 = 0, $sub456 = 0, $sub460 = 0, $sub70 = 0, $sub76 = 0, $sub83 = 0, $sub85 = 0, $sub92 = 0, $sub93 = 0, $thresh$addr = 0, $tmp = 0, $tmp260 = 0, $tmp35 = 0, $tobool = 0, $tobool132 = 0, $tobool154 = 0, $tobool186 = 0, $tobool213 = 0, $tobool326 = 0; + var $tobool44 = 0, $total$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 224|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(224|0); + $m$addr = $m; + $start$addr = $start; + $end$addr = $end; + $skip_start$addr = $skip_start; + $bits1$addr = $bits1; + $bits2$addr = $bits2; + $thresh$addr = $thresh; + $cap$addr = $cap; + $total$addr = $total; + $_balance$addr = $_balance; + $skip_rsv$addr = $skip_rsv; + $intensity$addr = $intensity; + $intensity_rsv$addr = $intensity_rsv; + $dual_stereo$addr = $dual_stereo; + $dual_stereo_rsv$addr = $dual_stereo_rsv; + $bits$addr = $bits; + $ebits$addr = $ebits; + $fine_priority$addr = $fine_priority; + $C$addr = $C; + $LM$addr = $LM; + $ec$addr = $ec; + $encode$addr = $encode; + $prev$addr = $prev; + $signalBandwidth$addr = $signalBandwidth; + $codedBands = -1; + $0 = $C$addr; + $shl = $0 << 3; + $alloc_floor = $shl; + $1 = $C$addr; + $cmp = ($1|0)>(1); + $conv = $cmp&1; + $stereo = $conv; + $2 = $LM$addr; + $shl1 = $2 << 3; + $logM = $shl1; + $lo = 0; + $hi = 64; + $i = 0; + while(1) { + $3 = $i; + $cmp2 = ($3|0)<(6); + if (!($cmp2)) { + break; + } + $4 = $lo; + $5 = $hi; + $add = (($4) + ($5))|0; + $shr = $add >> 1; + $mid = $shr; + $psum = 0; + $done = 0; + $6 = $end$addr; + $j = $6; + while(1) { + $7 = $j; + $dec = (($7) + -1)|0; + $j = $dec; + $8 = $start$addr; + $cmp5 = ($7|0)>($8|0); + if (!($cmp5)) { + break; + } + $9 = $bits1$addr; + $10 = $j; + $arrayidx = (($9) + ($10<<2)|0); + $11 = HEAP32[$arrayidx>>2]|0; + $12 = $mid; + $13 = $bits2$addr; + $14 = $j; + $arrayidx8 = (($13) + ($14<<2)|0); + $15 = HEAP32[$arrayidx8>>2]|0; + $mul = Math_imul($12, $15)|0; + $shr9 = $mul >> 6; + $add10 = (($11) + ($shr9))|0; + $tmp = $add10; + $16 = $tmp; + $17 = $thresh$addr; + $18 = $j; + $arrayidx11 = (($17) + ($18<<2)|0); + $19 = HEAP32[$arrayidx11>>2]|0; + $cmp12 = ($16|0)>=($19|0); + $20 = $done; + $tobool = ($20|0)!=(0); + $or$cond = $cmp12 | $tobool; + if (!($or$cond)) { + $30 = $tmp; + $31 = $alloc_floor; + $cmp19 = ($30|0)>=($31|0); + if (!($cmp19)) { + continue; + } + $32 = $alloc_floor; + $33 = $psum; + $add22 = (($33) + ($32))|0; + $psum = $add22; + continue; + } + $done = 1; + $21 = $tmp; + $22 = $cap$addr; + $23 = $j; + $arrayidx14 = (($22) + ($23<<2)|0); + $24 = HEAP32[$arrayidx14>>2]|0; + $cmp15 = ($21|0)<($24|0); + if ($cmp15) { + $25 = $tmp; + $cond = $25; + } else { + $26 = $cap$addr; + $27 = $j; + $arrayidx17 = (($26) + ($27<<2)|0); + $28 = HEAP32[$arrayidx17>>2]|0; + $cond = $28; + } + $29 = $psum; + $add18 = (($29) + ($cond))|0; + $psum = $add18; + } + $34 = $psum; + $35 = $total$addr; + $cmp24 = ($34|0)>($35|0); + $36 = $mid; + if ($cmp24) { + $hi = $36; + } else { + $lo = $36; + } + $37 = $i; + $inc = (($37) + 1)|0; + $i = $inc; + } + $psum = 0; + $done = 0; + $38 = $end$addr; + $j = $38; + while(1) { + $39 = $j; + $dec31 = (($39) + -1)|0; + $j = $dec31; + $40 = $start$addr; + $cmp32 = ($39|0)>($40|0); + if (!($cmp32)) { + break; + } + $41 = $bits1$addr; + $42 = $j; + $arrayidx36 = (($41) + ($42<<2)|0); + $43 = HEAP32[$arrayidx36>>2]|0; + $44 = $lo; + $45 = $bits2$addr; + $46 = $j; + $arrayidx37 = (($45) + ($46<<2)|0); + $47 = HEAP32[$arrayidx37>>2]|0; + $mul38 = Math_imul($44, $47)|0; + $shr39 = $mul38 >> 6; + $add40 = (($43) + ($shr39))|0; + $tmp35 = $add40; + $48 = $tmp35; + $49 = $thresh$addr; + $50 = $j; + $arrayidx41 = (($49) + ($50<<2)|0); + $51 = HEAP32[$arrayidx41>>2]|0; + $cmp42 = ($48|0)>=($51|0); + $52 = $done; + $tobool44 = ($52|0)!=(0); + $or$cond1 = $cmp42 | $tobool44; + do { + if ($or$cond1) { + $done = 1; + } else { + $53 = $tmp35; + $54 = $alloc_floor; + $cmp46 = ($53|0)>=($54|0); + if ($cmp46) { + $55 = $alloc_floor; + $tmp35 = $55; + break; + } else { + $tmp35 = 0; + break; + } + } + } while(0); + $56 = $tmp35; + $57 = $cap$addr; + $58 = $j; + $arrayidx53 = (($57) + ($58<<2)|0); + $59 = HEAP32[$arrayidx53>>2]|0; + $cmp54 = ($56|0)<($59|0); + if ($cmp54) { + $60 = $tmp35; + $cond60 = $60; + } else { + $61 = $cap$addr; + $62 = $j; + $arrayidx58 = (($61) + ($62<<2)|0); + $63 = HEAP32[$arrayidx58>>2]|0; + $cond60 = $63; + } + $tmp35 = $cond60; + $64 = $tmp35; + $65 = $bits$addr; + $66 = $j; + $arrayidx61 = (($65) + ($66<<2)|0); + HEAP32[$arrayidx61>>2] = $64; + $67 = $tmp35; + $68 = $psum; + $add62 = (($68) + ($67))|0; + $psum = $add62; + } + $69 = $end$addr; + $codedBands = $69; + while(1) { + $70 = $codedBands; + $sub = (($70) - 1)|0; + $j = $sub; + $71 = $j; + $72 = $skip_start$addr; + $cmp65 = ($71|0)<=($72|0); + if ($cmp65) { + label = 29; + break; + } + $75 = $total$addr; + $76 = $psum; + $sub70 = (($75) - ($76))|0; + $left = $sub70; + $77 = $left; + $78 = $m$addr; + $eBands = ((($78)) + 32|0); + $79 = HEAP32[$eBands>>2]|0; + $80 = $codedBands; + $arrayidx71 = (($79) + ($80<<1)|0); + $81 = HEAP16[$arrayidx71>>1]|0; + $conv72 = $81 << 16 >> 16; + $82 = $m$addr; + $eBands73 = ((($82)) + 32|0); + $83 = HEAP32[$eBands73>>2]|0; + $84 = $start$addr; + $arrayidx74 = (($83) + ($84<<1)|0); + $85 = HEAP16[$arrayidx74>>1]|0; + $conv75 = $85 << 16 >> 16; + $sub76 = (($conv72) - ($conv75))|0; + $call = (_celt_udiv_129($77,$sub76)|0); + $percoeff = $call; + $86 = $m$addr; + $eBands77 = ((($86)) + 32|0); + $87 = HEAP32[$eBands77>>2]|0; + $88 = $codedBands; + $arrayidx78 = (($87) + ($88<<1)|0); + $89 = HEAP16[$arrayidx78>>1]|0; + $conv79 = $89 << 16 >> 16; + $90 = $m$addr; + $eBands80 = ((($90)) + 32|0); + $91 = HEAP32[$eBands80>>2]|0; + $92 = $start$addr; + $arrayidx81 = (($91) + ($92<<1)|0); + $93 = HEAP16[$arrayidx81>>1]|0; + $conv82 = $93 << 16 >> 16; + $sub83 = (($conv79) - ($conv82))|0; + $94 = $percoeff; + $mul84 = Math_imul($sub83, $94)|0; + $95 = $left; + $sub85 = (($95) - ($mul84))|0; + $left = $sub85; + $96 = $left; + $97 = $m$addr; + $eBands86 = ((($97)) + 32|0); + $98 = HEAP32[$eBands86>>2]|0; + $99 = $j; + $arrayidx87 = (($98) + ($99<<1)|0); + $100 = HEAP16[$arrayidx87>>1]|0; + $conv88 = $100 << 16 >> 16; + $101 = $m$addr; + $eBands89 = ((($101)) + 32|0); + $102 = HEAP32[$eBands89>>2]|0; + $103 = $start$addr; + $arrayidx90 = (($102) + ($103<<1)|0); + $104 = HEAP16[$arrayidx90>>1]|0; + $conv91 = $104 << 16 >> 16; + $sub92 = (($conv88) - ($conv91))|0; + $sub93 = (($96) - ($sub92))|0; + $cmp94 = ($sub93|0)>(0); + if ($cmp94) { + $105 = $left; + $106 = $m$addr; + $eBands97 = ((($106)) + 32|0); + $107 = HEAP32[$eBands97>>2]|0; + $108 = $j; + $arrayidx98 = (($107) + ($108<<1)|0); + $109 = HEAP16[$arrayidx98>>1]|0; + $conv99 = $109 << 16 >> 16; + $110 = $m$addr; + $eBands100 = ((($110)) + 32|0); + $111 = HEAP32[$eBands100>>2]|0; + $112 = $start$addr; + $arrayidx101 = (($111) + ($112<<1)|0); + $113 = HEAP16[$arrayidx101>>1]|0; + $conv102 = $113 << 16 >> 16; + $sub103 = (($conv99) - ($conv102))|0; + $sub104 = (($105) - ($sub103))|0; + $cond107 = $sub104; + } else { + $cond107 = 0; + } + $rem = $cond107; + $114 = $m$addr; + $eBands108 = ((($114)) + 32|0); + $115 = HEAP32[$eBands108>>2]|0; + $116 = $codedBands; + $arrayidx109 = (($115) + ($116<<1)|0); + $117 = HEAP16[$arrayidx109>>1]|0; + $conv110 = $117 << 16 >> 16; + $118 = $m$addr; + $eBands111 = ((($118)) + 32|0); + $119 = HEAP32[$eBands111>>2]|0; + $120 = $j; + $arrayidx112 = (($119) + ($120<<1)|0); + $121 = HEAP16[$arrayidx112>>1]|0; + $conv113 = $121 << 16 >> 16; + $sub114 = (($conv110) - ($conv113))|0; + $band_width = $sub114; + $122 = $bits$addr; + $123 = $j; + $arrayidx115 = (($122) + ($123<<2)|0); + $124 = HEAP32[$arrayidx115>>2]|0; + $125 = $percoeff; + $126 = $band_width; + $mul116 = Math_imul($125, $126)|0; + $add117 = (($124) + ($mul116))|0; + $127 = $rem; + $add118 = (($add117) + ($127))|0; + $band_bits = $add118; + $128 = $band_bits; + $129 = $thresh$addr; + $130 = $j; + $arrayidx119 = (($129) + ($130<<2)|0); + $131 = HEAP32[$arrayidx119>>2]|0; + $132 = $alloc_floor; + $add120 = (($132) + 8)|0; + $cmp121 = ($131|0)>($add120|0); + if ($cmp121) { + $133 = $thresh$addr; + $134 = $j; + $arrayidx124 = (($133) + ($134<<2)|0); + $135 = HEAP32[$arrayidx124>>2]|0; + $cond128 = $135; + } else { + $136 = $alloc_floor; + $add126 = (($136) + 8)|0; + $cond128 = $add126; + } + $cmp129 = ($128|0)>=($cond128|0); + if ($cmp129) { + $137 = $encode$addr; + $tobool132 = ($137|0)!=(0); + if ($tobool132) { + $138 = $codedBands; + $139 = $start$addr; + $add134 = (($139) + 2)|0; + $cmp135 = ($138|0)<=($add134|0); + if ($cmp135) { + label = 40; + break; + } + $140 = $band_bits; + $141 = $j; + $142 = $prev$addr; + $cmp138 = ($141|0)<($142|0); + $cond140 = $cmp138 ? 7 : 9; + $143 = $band_width; + $mul141 = Math_imul($cond140, $143)|0; + $144 = $LM$addr; + $shl142 = $mul141 << $144; + $shl143 = $shl142 << 3; + $shr144 = $shl143 >> 4; + $cmp145 = ($140|0)>($shr144|0); + if ($cmp145) { + $145 = $j; + $146 = $signalBandwidth$addr; + $cmp148 = ($145|0)<=($146|0); + if ($cmp148) { + label = 40; + break; + } + } + $148 = $ec$addr; + _ec_enc_bit_logp($148,0,1); + } else { + $149 = $ec$addr; + $call153 = (_ec_dec_bit_logp($149,1)|0); + $tobool154 = ($call153|0)!=(0); + if ($tobool154) { + break; + } + } + $150 = $psum; + $add158 = (($150) + 8)|0; + $psum = $add158; + $151 = $band_bits; + $sub159 = (($151) - 8)|0; + $band_bits = $sub159; + } + $152 = $bits$addr; + $153 = $j; + $arrayidx161 = (($152) + ($153<<2)|0); + $154 = HEAP32[$arrayidx161>>2]|0; + $155 = $intensity_rsv$addr; + $add162 = (($154) + ($155))|0; + $156 = $psum; + $sub163 = (($156) - ($add162))|0; + $psum = $sub163; + $157 = $intensity_rsv$addr; + $cmp164 = ($157|0)>(0); + if ($cmp164) { + $158 = $j; + $159 = $start$addr; + $sub167 = (($158) - ($159))|0; + $arrayidx168 = (22171 + ($sub167)|0); + $160 = HEAP8[$arrayidx168>>0]|0; + $conv169 = $160&255; + $intensity_rsv$addr = $conv169; + } + $161 = $intensity_rsv$addr; + $162 = $psum; + $add171 = (($162) + ($161))|0; + $psum = $add171; + $163 = $band_bits; + $164 = $alloc_floor; + $cmp172 = ($163|0)>=($164|0); + if ($cmp172) { + $165 = $alloc_floor; + $166 = $psum; + $add175 = (($166) + ($165))|0; + $psum = $add175; + $167 = $alloc_floor; + $168 = $bits$addr; + $169 = $j; + $arrayidx176 = (($168) + ($169<<2)|0); + $$sink = $167;$arrayidx178$sink = $arrayidx176; + } else { + $170 = $bits$addr; + $171 = $j; + $arrayidx178 = (($170) + ($171<<2)|0); + $$sink = 0;$arrayidx178$sink = $arrayidx178; + } + HEAP32[$arrayidx178$sink>>2] = $$sink; + $172 = $codedBands; + $dec181 = (($172) + -1)|0; + $codedBands = $dec181; + } + if ((label|0) == 29) { + $73 = $skip_rsv$addr; + $74 = $total$addr; + $add68 = (($74) + ($73))|0; + $total$addr = $add68; + } + else if ((label|0) == 40) { + $147 = $ec$addr; + _ec_enc_bit_logp($147,1,1); + } + $173 = $intensity_rsv$addr; + $cmp183 = ($173|0)>(0); + do { + if ($cmp183) { + $174 = $encode$addr; + $tobool186 = ($174|0)!=(0); + if (!($tobool186)) { + $188 = $start$addr; + $189 = $ec$addr; + $190 = $codedBands; + $add198 = (($190) + 1)|0; + $191 = $start$addr; + $sub199 = (($add198) - ($191))|0; + $call200 = (_ec_dec_uint($189,$sub199)|0); + $add201 = (($188) + ($call200))|0; + $192 = $intensity$addr; + HEAP32[$192>>2] = $add201; + break; + } + $175 = $intensity$addr; + $176 = HEAP32[$175>>2]|0; + $177 = $codedBands; + $cmp188 = ($176|0)<($177|0); + if ($cmp188) { + $178 = $intensity$addr; + $179 = HEAP32[$178>>2]|0; + $cond193 = $179; + } else { + $180 = $codedBands; + $cond193 = $180; + } + $181 = $intensity$addr; + HEAP32[$181>>2] = $cond193; + $182 = $ec$addr; + $183 = $intensity$addr; + $184 = HEAP32[$183>>2]|0; + $185 = $start$addr; + $sub194 = (($184) - ($185))|0; + $186 = $codedBands; + $add195 = (($186) + 1)|0; + $187 = $start$addr; + $sub196 = (($add195) - ($187))|0; + _ec_enc_uint($182,$sub194,$sub196); + } else { + $193 = $intensity$addr; + HEAP32[$193>>2] = 0; + } + } while(0); + $194 = $intensity$addr; + $195 = HEAP32[$194>>2]|0; + $196 = $start$addr; + $cmp205 = ($195|0)<=($196|0); + if ($cmp205) { + $197 = $dual_stereo_rsv$addr; + $198 = $total$addr; + $add208 = (($198) + ($197))|0; + $total$addr = $add208; + $dual_stereo_rsv$addr = 0; + } + $199 = $dual_stereo_rsv$addr; + $cmp210 = ($199|0)>(0); + do { + if ($cmp210) { + $200 = $encode$addr; + $tobool213 = ($200|0)!=(0); + $201 = $ec$addr; + if ($tobool213) { + $202 = $dual_stereo$addr; + $203 = HEAP32[$202>>2]|0; + _ec_enc_bit_logp($201,$203,1); + break; + } else { + $call216 = (_ec_dec_bit_logp($201,1)|0); + $204 = $dual_stereo$addr; + HEAP32[$204>>2] = $call216; + break; + } + } else { + $205 = $dual_stereo$addr; + HEAP32[$205>>2] = 0; + } + } while(0); + $206 = $total$addr; + $207 = $psum; + $sub220 = (($206) - ($207))|0; + $left = $sub220; + $208 = $left; + $209 = $m$addr; + $eBands221 = ((($209)) + 32|0); + $210 = HEAP32[$eBands221>>2]|0; + $211 = $codedBands; + $arrayidx222 = (($210) + ($211<<1)|0); + $212 = HEAP16[$arrayidx222>>1]|0; + $conv223 = $212 << 16 >> 16; + $213 = $m$addr; + $eBands224 = ((($213)) + 32|0); + $214 = HEAP32[$eBands224>>2]|0; + $215 = $start$addr; + $arrayidx225 = (($214) + ($215<<1)|0); + $216 = HEAP16[$arrayidx225>>1]|0; + $conv226 = $216 << 16 >> 16; + $sub227 = (($conv223) - ($conv226))|0; + $call228 = (_celt_udiv_129($208,$sub227)|0); + $percoeff = $call228; + $217 = $m$addr; + $eBands229 = ((($217)) + 32|0); + $218 = HEAP32[$eBands229>>2]|0; + $219 = $codedBands; + $arrayidx230 = (($218) + ($219<<1)|0); + $220 = HEAP16[$arrayidx230>>1]|0; + $conv231 = $220 << 16 >> 16; + $221 = $m$addr; + $eBands232 = ((($221)) + 32|0); + $222 = HEAP32[$eBands232>>2]|0; + $223 = $start$addr; + $arrayidx233 = (($222) + ($223<<1)|0); + $224 = HEAP16[$arrayidx233>>1]|0; + $conv234 = $224 << 16 >> 16; + $sub235 = (($conv231) - ($conv234))|0; + $225 = $percoeff; + $mul236 = Math_imul($sub235, $225)|0; + $226 = $left; + $sub237 = (($226) - ($mul236))|0; + $left = $sub237; + $227 = $start$addr; + $j = $227; + while(1) { + $228 = $j; + $229 = $codedBands; + $cmp239 = ($228|0)<($229|0); + if (!($cmp239)) { + break; + } + $230 = $percoeff; + $231 = $m$addr; + $eBands242 = ((($231)) + 32|0); + $232 = HEAP32[$eBands242>>2]|0; + $233 = $j; + $add243 = (($233) + 1)|0; + $arrayidx244 = (($232) + ($add243<<1)|0); + $234 = HEAP16[$arrayidx244>>1]|0; + $conv245 = $234 << 16 >> 16; + $235 = $m$addr; + $eBands246 = ((($235)) + 32|0); + $236 = HEAP32[$eBands246>>2]|0; + $237 = $j; + $arrayidx247 = (($236) + ($237<<1)|0); + $238 = HEAP16[$arrayidx247>>1]|0; + $conv248 = $238 << 16 >> 16; + $sub249 = (($conv245) - ($conv248))|0; + $mul250 = Math_imul($230, $sub249)|0; + $239 = $bits$addr; + $240 = $j; + $arrayidx251 = (($239) + ($240<<2)|0); + $241 = HEAP32[$arrayidx251>>2]|0; + $add252 = (($241) + ($mul250))|0; + HEAP32[$arrayidx251>>2] = $add252; + $242 = $j; + $inc254 = (($242) + 1)|0; + $j = $inc254; + } + $243 = $start$addr; + $j = $243; + while(1) { + $244 = $j; + $245 = $codedBands; + $cmp257 = ($244|0)<($245|0); + if (!($cmp257)) { + break; + } + $246 = $left; + $247 = $m$addr; + $eBands261 = ((($247)) + 32|0); + $248 = HEAP32[$eBands261>>2]|0; + $249 = $j; + $add262 = (($249) + 1)|0; + $arrayidx263 = (($248) + ($add262<<1)|0); + $250 = HEAP16[$arrayidx263>>1]|0; + $conv264 = $250 << 16 >> 16; + $251 = $m$addr; + $eBands265 = ((($251)) + 32|0); + $252 = HEAP32[$eBands265>>2]|0; + $253 = $j; + $arrayidx266 = (($252) + ($253<<1)|0); + $254 = HEAP16[$arrayidx266>>1]|0; + $conv267 = $254 << 16 >> 16; + $sub268 = (($conv264) - ($conv267))|0; + $cmp269 = ($246|0)<($sub268|0); + if ($cmp269) { + $255 = $left; + $cond282 = $255; + } else { + $256 = $m$addr; + $eBands273 = ((($256)) + 32|0); + $257 = HEAP32[$eBands273>>2]|0; + $258 = $j; + $add274 = (($258) + 1)|0; + $arrayidx275 = (($257) + ($add274<<1)|0); + $259 = HEAP16[$arrayidx275>>1]|0; + $conv276 = $259 << 16 >> 16; + $260 = $m$addr; + $eBands277 = ((($260)) + 32|0); + $261 = HEAP32[$eBands277>>2]|0; + $262 = $j; + $arrayidx278 = (($261) + ($262<<1)|0); + $263 = HEAP16[$arrayidx278>>1]|0; + $conv279 = $263 << 16 >> 16; + $sub280 = (($conv276) - ($conv279))|0; + $cond282 = $sub280; + } + $tmp260 = $cond282; + $264 = $tmp260; + $265 = $bits$addr; + $266 = $j; + $arrayidx283 = (($265) + ($266<<2)|0); + $267 = HEAP32[$arrayidx283>>2]|0; + $add284 = (($267) + ($264))|0; + HEAP32[$arrayidx283>>2] = $add284; + $268 = $tmp260; + $269 = $left; + $sub285 = (($269) - ($268))|0; + $left = $sub285; + $270 = $j; + $inc287 = (($270) + 1)|0; + $j = $inc287; + } + $balance = 0; + $271 = $start$addr; + $j = $271; + while(1) { + $272 = $j; + $273 = $codedBands; + $cmp290 = ($272|0)<($273|0); + if (!($cmp290)) { + break; + } + $274 = $m$addr; + $eBands293 = ((($274)) + 32|0); + $275 = HEAP32[$eBands293>>2]|0; + $276 = $j; + $add294 = (($276) + 1)|0; + $arrayidx295 = (($275) + ($add294<<1)|0); + $277 = HEAP16[$arrayidx295>>1]|0; + $conv296 = $277 << 16 >> 16; + $278 = $m$addr; + $eBands297 = ((($278)) + 32|0); + $279 = HEAP32[$eBands297>>2]|0; + $280 = $j; + $arrayidx298 = (($279) + ($280<<1)|0); + $281 = HEAP16[$arrayidx298>>1]|0; + $conv299 = $281 << 16 >> 16; + $sub300 = (($conv296) - ($conv299))|0; + $N0 = $sub300; + $282 = $N0; + $283 = $LM$addr; + $shl301 = $282 << $283; + $N = $shl301; + $284 = $bits$addr; + $285 = $j; + $arrayidx302 = (($284) + ($285<<2)|0); + $286 = HEAP32[$arrayidx302>>2]|0; + $287 = $balance; + $add303 = (($286) + ($287))|0; + $bit = $add303; + $288 = $N; + $cmp304 = ($288|0)>(1); + $289 = $bit; + if ($cmp304) { + $290 = $cap$addr; + $291 = $j; + $arrayidx307 = (($290) + ($291<<2)|0); + $292 = HEAP32[$arrayidx307>>2]|0; + $sub308 = (($289) - ($292))|0; + $cmp309 = ($sub308|0)>(0); + if ($cmp309) { + $293 = $bit; + $294 = $cap$addr; + $295 = $j; + $arrayidx312 = (($294) + ($295<<2)|0); + $296 = HEAP32[$arrayidx312>>2]|0; + $sub313 = (($293) - ($296))|0; + $cond316 = $sub313; + } else { + $cond316 = 0; + } + $excess = $cond316; + $297 = $bit; + $298 = $excess; + $sub317 = (($297) - ($298))|0; + $299 = $bits$addr; + $300 = $j; + $arrayidx318 = (($299) + ($300<<2)|0); + HEAP32[$arrayidx318>>2] = $sub317; + $301 = $C$addr; + $302 = $N; + $mul319 = Math_imul($301, $302)|0; + $303 = $C$addr; + $cmp320 = ($303|0)==(2); + $304 = $N; + $cmp323 = ($304|0)>(2); + $or$cond2 = $cmp320 & $cmp323; + if ($or$cond2) { + $305 = $dual_stereo$addr; + $306 = HEAP32[$305>>2]|0; + $tobool326 = ($306|0)!=(0); + if ($tobool326) { + $310 = 0; + } else { + $307 = $j; + $308 = $intensity$addr; + $309 = HEAP32[$308>>2]|0; + $cmp327 = ($307|0)<($309|0); + $310 = $cmp327; + } + } else { + $310 = 0; + } + $cond329 = $310 ? 1 : 0; + $add330 = (($mul319) + ($cond329))|0; + $den = $add330; + $311 = $den; + $312 = $m$addr; + $logN = ((($312)) + 56|0); + $313 = HEAP32[$logN>>2]|0; + $314 = $j; + $arrayidx331 = (($313) + ($314<<1)|0); + $315 = HEAP16[$arrayidx331>>1]|0; + $conv332 = $315 << 16 >> 16; + $316 = $logM; + $add333 = (($conv332) + ($316))|0; + $mul334 = Math_imul($311, $add333)|0; + $NClogN = $mul334; + $317 = $NClogN; + $shr335 = $317 >> 1; + $318 = $den; + $mul336 = ($318*21)|0; + $sub337 = (($shr335) - ($mul336))|0; + $offset = $sub337; + $319 = $N; + $cmp338 = ($319|0)==(2); + if ($cmp338) { + $320 = $den; + $shl341 = $320 << 3; + $shr342 = $shl341 >> 2; + $321 = $offset; + $add343 = (($321) + ($shr342))|0; + $offset = $add343; + } + $322 = $bits$addr; + $323 = $j; + $arrayidx345 = (($322) + ($323<<2)|0); + $324 = HEAP32[$arrayidx345>>2]|0; + $325 = $offset; + $add346 = (($324) + ($325))|0; + $326 = $den; + $mul347 = $326<<1; + $shl348 = $mul347 << 3; + $cmp349 = ($add346|0)<($shl348|0); + if ($cmp349) { + $327 = $NClogN; + $shr352 = $327 >> 2; + $328 = $offset; + $add353 = (($328) + ($shr352))|0; + $offset = $add353; + } else { + $329 = $bits$addr; + $330 = $j; + $arrayidx355 = (($329) + ($330<<2)|0); + $331 = HEAP32[$arrayidx355>>2]|0; + $332 = $offset; + $add356 = (($331) + ($332))|0; + $333 = $den; + $mul357 = ($333*3)|0; + $shl358 = $mul357 << 3; + $cmp359 = ($add356|0)<($shl358|0); + if ($cmp359) { + $334 = $NClogN; + $shr362 = $334 >> 3; + $335 = $offset; + $add363 = (($335) + ($shr362))|0; + $offset = $add363; + } + } + $336 = $bits$addr; + $337 = $j; + $arrayidx366 = (($336) + ($337<<2)|0); + $338 = HEAP32[$arrayidx366>>2]|0; + $339 = $offset; + $add367 = (($338) + ($339))|0; + $340 = $den; + $shl368 = $340 << 2; + $add369 = (($add367) + ($shl368))|0; + $cmp370 = (0)>($add369|0); + if ($cmp370) { + $cond379 = 0; + } else { + $341 = $bits$addr; + $342 = $j; + $arrayidx374 = (($341) + ($342<<2)|0); + $343 = HEAP32[$arrayidx374>>2]|0; + $344 = $offset; + $add375 = (($343) + ($344))|0; + $345 = $den; + $shl376 = $345 << 2; + $add377 = (($add375) + ($shl376))|0; + $cond379 = $add377; + } + $346 = $ebits$addr; + $347 = $j; + $arrayidx380 = (($346) + ($347<<2)|0); + HEAP32[$arrayidx380>>2] = $cond379; + $348 = $ebits$addr; + $349 = $j; + $arrayidx381 = (($348) + ($349<<2)|0); + $350 = HEAP32[$arrayidx381>>2]|0; + $351 = $den; + $call382 = (_celt_udiv_129($350,$351)|0); + $shr383 = $call382 >>> 3; + $352 = $ebits$addr; + $353 = $j; + $arrayidx384 = (($352) + ($353<<2)|0); + HEAP32[$arrayidx384>>2] = $shr383; + $354 = $C$addr; + $355 = $ebits$addr; + $356 = $j; + $arrayidx385 = (($355) + ($356<<2)|0); + $357 = HEAP32[$arrayidx385>>2]|0; + $mul386 = Math_imul($354, $357)|0; + $358 = $bits$addr; + $359 = $j; + $arrayidx387 = (($358) + ($359<<2)|0); + $360 = HEAP32[$arrayidx387>>2]|0; + $shr388 = $360 >> 3; + $cmp389 = ($mul386|0)>($shr388|0); + if ($cmp389) { + $361 = $bits$addr; + $362 = $j; + $arrayidx392 = (($361) + ($362<<2)|0); + $363 = HEAP32[$arrayidx392>>2]|0; + $364 = $stereo; + $shr393 = $363 >> $364; + $shr394 = $shr393 >> 3; + $365 = $ebits$addr; + $366 = $j; + $arrayidx395 = (($365) + ($366<<2)|0); + HEAP32[$arrayidx395>>2] = $shr394; + } + $367 = $ebits$addr; + $368 = $j; + $arrayidx397 = (($367) + ($368<<2)|0); + $369 = HEAP32[$arrayidx397>>2]|0; + $cmp398 = ($369|0)<(8); + if ($cmp398) { + $370 = $ebits$addr; + $371 = $j; + $arrayidx401 = (($370) + ($371<<2)|0); + $372 = HEAP32[$arrayidx401>>2]|0; + $cond404 = $372; + } else { + $cond404 = 8; + } + $373 = $ebits$addr; + $374 = $j; + $arrayidx405 = (($373) + ($374<<2)|0); + HEAP32[$arrayidx405>>2] = $cond404; + $375 = $ebits$addr; + $376 = $j; + $arrayidx406 = (($375) + ($376<<2)|0); + $377 = HEAP32[$arrayidx406>>2]|0; + $378 = $den; + $shl407 = $378 << 3; + $mul408 = Math_imul($377, $shl407)|0; + $379 = $bits$addr; + $380 = $j; + $arrayidx409 = (($379) + ($380<<2)|0); + $381 = HEAP32[$arrayidx409>>2]|0; + $382 = $offset; + $add410 = (($381) + ($382))|0; + $cmp411 = ($mul408|0)>=($add410|0); + $conv412 = $cmp411&1; + $383 = $fine_priority$addr; + $384 = $j; + $arrayidx413 = (($383) + ($384<<2)|0); + HEAP32[$arrayidx413>>2] = $conv412; + $385 = $C$addr; + $386 = $ebits$addr; + $387 = $j; + $arrayidx414 = (($386) + ($387<<2)|0); + $388 = HEAP32[$arrayidx414>>2]|0; + $mul415 = Math_imul($385, $388)|0; + $shl416 = $mul415 << 3; + $389 = $bits$addr; + $390 = $j; + $arrayidx417 = (($389) + ($390<<2)|0); + $391 = HEAP32[$arrayidx417>>2]|0; + $sub418 = (($391) - ($shl416))|0; + HEAP32[$arrayidx417>>2] = $sub418; + } else { + $392 = $C$addr; + $shl420 = $392 << 3; + $sub421 = (($289) - ($shl420))|0; + $cmp422 = (0)>($sub421|0); + if ($cmp422) { + $cond429 = 0; + } else { + $393 = $bit; + $394 = $C$addr; + $shl426 = $394 << 3; + $sub427 = (($393) - ($shl426))|0; + $cond429 = $sub427; + } + $excess = $cond429; + $395 = $bit; + $396 = $excess; + $sub430 = (($395) - ($396))|0; + $397 = $bits$addr; + $398 = $j; + $arrayidx431 = (($397) + ($398<<2)|0); + HEAP32[$arrayidx431>>2] = $sub430; + $399 = $ebits$addr; + $400 = $j; + $arrayidx432 = (($399) + ($400<<2)|0); + HEAP32[$arrayidx432>>2] = 0; + $401 = $fine_priority$addr; + $402 = $j; + $arrayidx433 = (($401) + ($402<<2)|0); + HEAP32[$arrayidx433>>2] = 1; + } + $403 = $excess; + $cmp435 = ($403|0)>(0); + if ($cmp435) { + $404 = $excess; + $405 = $stereo; + $add438 = (($405) + 3)|0; + $shr439 = $404 >> $add438; + $406 = $ebits$addr; + $407 = $j; + $arrayidx440 = (($406) + ($407<<2)|0); + $408 = HEAP32[$arrayidx440>>2]|0; + $sub441 = (8 - ($408))|0; + $cmp442 = ($shr439|0)<($sub441|0); + if ($cmp442) { + $409 = $excess; + $410 = $stereo; + $add445 = (($410) + 3)|0; + $shr446 = $409 >> $add445; + $cond451 = $shr446; + } else { + $411 = $ebits$addr; + $412 = $j; + $arrayidx448 = (($411) + ($412<<2)|0); + $413 = HEAP32[$arrayidx448>>2]|0; + $sub449 = (8 - ($413))|0; + $cond451 = $sub449; + } + $extra_fine = $cond451; + $414 = $extra_fine; + $415 = $ebits$addr; + $416 = $j; + $arrayidx452 = (($415) + ($416<<2)|0); + $417 = HEAP32[$arrayidx452>>2]|0; + $add453 = (($417) + ($414))|0; + HEAP32[$arrayidx452>>2] = $add453; + $418 = $extra_fine; + $419 = $C$addr; + $mul454 = Math_imul($418, $419)|0; + $shl455 = $mul454 << 3; + $extra_bits = $shl455; + $420 = $extra_bits; + $421 = $excess; + $422 = $balance; + $sub456 = (($421) - ($422))|0; + $cmp457 = ($420|0)>=($sub456|0); + $conv458 = $cmp457&1; + $423 = $fine_priority$addr; + $424 = $j; + $arrayidx459 = (($423) + ($424<<2)|0); + HEAP32[$arrayidx459>>2] = $conv458; + $425 = $extra_bits; + $426 = $excess; + $sub460 = (($426) - ($425))|0; + $excess = $sub460; + } + $427 = $excess; + $balance = $427; + $428 = $j; + $inc463 = (($428) + 1)|0; + $j = $inc463; + } + $429 = $balance; + $430 = $_balance$addr; + HEAP32[$430>>2] = $429; + while(1) { + $431 = $j; + $432 = $end$addr; + $cmp466 = ($431|0)<($432|0); + if (!($cmp466)) { + break; + } + $433 = $bits$addr; + $434 = $j; + $arrayidx469 = (($433) + ($434<<2)|0); + $435 = HEAP32[$arrayidx469>>2]|0; + $436 = $stereo; + $shr470 = $435 >> $436; + $shr471 = $shr470 >> 3; + $437 = $ebits$addr; + $438 = $j; + $arrayidx472 = (($437) + ($438<<2)|0); + HEAP32[$arrayidx472>>2] = $shr471; + $439 = $bits$addr; + $440 = $j; + $arrayidx473 = (($439) + ($440<<2)|0); + HEAP32[$arrayidx473>>2] = 0; + $441 = $ebits$addr; + $442 = $j; + $arrayidx474 = (($441) + ($442<<2)|0); + $443 = HEAP32[$arrayidx474>>2]|0; + $cmp475 = ($443|0)<(1); + $conv476 = $cmp475&1; + $444 = $fine_priority$addr; + $445 = $j; + $arrayidx477 = (($444) + ($445<<2)|0); + HEAP32[$arrayidx477>>2] = $conv476; + $446 = $j; + $inc479 = (($446) + 1)|0; + $j = $inc479; + } + $447 = $codedBands; + STACKTOP = sp;return ($447|0); +} +function _celt_udiv_129($n,$d) { + $n = $n|0; + $d = $d|0; + var $0 = 0, $1 = 0, $d$addr = 0, $div = 0, $n$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $n$addr = $n; + $d$addr = $d; + $0 = $n$addr; + $1 = $d$addr; + $div = (($0>>>0) / ($1>>>0))&-1; + STACKTOP = sp;return ($div|0); +} +function _alg_quant($X,$N,$K,$spread,$B,$enc) { + $X = $X|0; + $N = $N|0; + $K = $K|0; + $spread = $spread|0; + $B = $B|0; + $enc = $enc|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0.0, $105 = 0.0, $106 = 0, $107 = 0.0, $108 = 0, $109 = 0, $11 = 0.0, $110 = 0, $111 = 0, $112 = 0.0, $113 = 0, $114 = 0, $115 = 0.0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $14 = 0, $15 = 0.0; + var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0; + var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0; + var $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0.0, $7 = 0; + var $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0.0, $87 = 0.0, $88 = 0.0; + var $89 = 0.0, $9 = 0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0, $B$addr = 0, $K$addr = 0, $N$addr = 0, $Rxy = 0.0, $Ryy = 0.0, $X$addr = 0, $add = 0.0, $add42 = 0.0; + var $add46 = 0.0, $add57 = 0, $add63 = 0.0, $add66 = 0.0, $add68 = 0, $add72 = 0.0, $add75 = 0.0, $add77 = 0.0, $add91 = 0.0, $add93 = 0.0, $add96 = 0.0, $arrayidx = 0, $arrayidx101 = 0, $arrayidx102 = 0, $arrayidx104 = 0, $arrayidx105 = 0, $arrayidx109 = 0, $arrayidx111 = 0, $arrayidx13 = 0, $arrayidx23 = 0; + var $arrayidx3 = 0, $arrayidx31 = 0, $arrayidx35 = 0, $arrayidx36 = 0, $arrayidx38 = 0, $arrayidx39 = 0, $arrayidx40 = 0, $arrayidx43 = 0, $arrayidx44 = 0, $arrayidx47 = 0, $arrayidx49 = 0, $arrayidx5 = 0, $arrayidx6 = 0, $arrayidx7 = 0, $arrayidx74 = 0, $arrayidx76 = 0, $arrayidx8 = 0, $arrayidx90 = 0, $arrayidx92 = 0, $arrayidx95 = 0; + var $arrayidx97 = 0, $best_den = 0.0, $best_id = 0, $best_num = 0.0, $call = 0.0, $call118 = 0, $cmp = 0, $cmp10 = 0, $cmp106 = 0, $cmp115 = 0, $cmp16 = 0, $cmp18 = 0, $cmp19 = 0, $cmp26 = 0, $cmp53 = 0, $cmp58 = 0, $cmp70 = 0, $cmp81 = 0, $cmp87 = 0, $cmp9 = 0; + var $collapse_mask = 0, $conv = 0.0, $conv33 = 0.0, $conv34 = 0, $conv37 = 0.0, $conv61 = 0.0, $div = 0.0, $enc$addr = 0, $i = 0, $inc = 0, $inc114 = 0, $inc15 = 0, $inc25 = 0, $inc52 = 0, $inc86 = 0, $inc98 = 0, $inc99 = 0, $j = 0, $mul = 0.0, $mul103 = 0.0; + var $mul32 = 0.0, $mul41 = 0.0, $mul45 = 0.0, $mul48 = 0.0, $mul62 = 0.0, $mul65 = 0.0, $mul78 = 0.0, $mul79 = 0.0, $mul80 = 0.0, $mul94 = 0.0, $or$cond = 0, $pulsesLeft = 0, $rcp = 0.0, $s = 0.0, $saved_stack = 0, $shr = 0, $spread$addr = 0, $sub = 0.0, $sub110 = 0, $sub29 = 0; + var $sub50 = 0, $sum = 0.0, $tmp = 0.0, $vla = 0, $vla$alloca_mul = 0, $vla1 = 0, $vla1$alloca_mul = 0, $vla2 = 0, $vla2$alloca_mul = 0, $xy = 0.0, $yy = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); + $X$addr = $X; + $N$addr = $N; + $K$addr = $K; + $spread$addr = $spread; + $B$addr = $B; + $enc$addr = $enc; + $0 = $N$addr; + $1 = (_llvm_stacksave()|0); + $saved_stack = $1; + $vla$alloca_mul = $0<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $2 = $N$addr; + $vla1$alloca_mul = $2<<2; + $vla1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla1$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla1$alloca_mul)|0)+15)&-16)|0);; + $3 = $N$addr; + $vla2$alloca_mul = $3<<2; + $vla2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla2$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla2$alloca_mul)|0)+15)&-16)|0);; + $4 = $X$addr; + $5 = $N$addr; + $6 = $B$addr; + $7 = $K$addr; + $8 = $spread$addr; + _exp_rotation($4,$5,1,$6,$7,$8); + $sum = 0.0; + $j = 0; + while(1) { + $9 = $X$addr; + $10 = $j; + $arrayidx = (($9) + ($10<<2)|0); + $11 = +HEAPF32[$arrayidx>>2]; + $cmp = $11 > 0.0; + $12 = $j; + $arrayidx3 = (($vla2) + ($12<<2)|0); + if ($cmp) { + HEAPF32[$arrayidx3>>2] = 1.0; + } else { + HEAPF32[$arrayidx3>>2] = -1.0; + $13 = $X$addr; + $14 = $j; + $arrayidx5 = (($13) + ($14<<2)|0); + $15 = +HEAPF32[$arrayidx5>>2]; + $sub = - $15; + $16 = $X$addr; + $17 = $j; + $arrayidx6 = (($16) + ($17<<2)|0); + HEAPF32[$arrayidx6>>2] = $sub; + } + $18 = $j; + $arrayidx7 = (($vla1) + ($18<<2)|0); + HEAP32[$arrayidx7>>2] = 0; + $19 = $j; + $arrayidx8 = (($vla) + ($19<<2)|0); + HEAPF32[$arrayidx8>>2] = 0.0; + $20 = $j; + $inc = (($20) + 1)|0; + $j = $inc; + $21 = $N$addr; + $cmp9 = ($inc|0)<($21|0); + if (!($cmp9)) { + break; + } + } + $yy = 0.0; + $xy = 0.0; + $22 = $K$addr; + $pulsesLeft = $22; + $23 = $K$addr; + $24 = $N$addr; + $shr = $24 >> 1; + $cmp10 = ($23|0)>($shr|0); + if ($cmp10) { + $j = 0; + while(1) { + $25 = $X$addr; + $26 = $j; + $arrayidx13 = (($25) + ($26<<2)|0); + $27 = +HEAPF32[$arrayidx13>>2]; + $28 = $sum; + $add = $28 + $27; + $sum = $add; + $29 = $j; + $inc15 = (($29) + 1)|0; + $j = $inc15; + $30 = $N$addr; + $cmp16 = ($inc15|0)<($30|0); + if (!($cmp16)) { + break; + } + } + $31 = $sum; + $cmp18 = $31 > 1.0000000036274937E-15; + $32 = $sum; + $cmp19 = $32 < 64.0; + $or$cond = $cmp18 & $cmp19; + if (!($or$cond)) { + $33 = $X$addr; + HEAPF32[$33>>2] = 1.0; + $j = 1; + while(1) { + $34 = $X$addr; + $35 = $j; + $arrayidx23 = (($34) + ($35<<2)|0); + HEAPF32[$arrayidx23>>2] = 0.0; + $36 = $j; + $inc25 = (($36) + 1)|0; + $j = $inc25; + $37 = $N$addr; + $cmp26 = ($inc25|0)<($37|0); + if (!($cmp26)) { + break; + } + } + $sum = 1.0; + } + $38 = $K$addr; + $sub29 = (($38) - 1)|0; + $conv = (+($sub29|0)); + $39 = $sum; + $div = 1.0 / $39; + $mul = $conv * $div; + $rcp = $mul; + $j = 0; + while(1) { + $40 = $rcp; + $41 = $X$addr; + $42 = $j; + $arrayidx31 = (($41) + ($42<<2)|0); + $43 = +HEAPF32[$arrayidx31>>2]; + $mul32 = $40 * $43; + $conv33 = $mul32; + $call = (+Math_floor((+$conv33))); + $conv34 = (~~(($call))); + $44 = $j; + $arrayidx35 = (($vla1) + ($44<<2)|0); + HEAP32[$arrayidx35>>2] = $conv34; + $45 = $j; + $arrayidx36 = (($vla1) + ($45<<2)|0); + $46 = HEAP32[$arrayidx36>>2]|0; + $conv37 = (+($46|0)); + $47 = $j; + $arrayidx38 = (($vla) + ($47<<2)|0); + HEAPF32[$arrayidx38>>2] = $conv37; + $48 = $yy; + $49 = $j; + $arrayidx39 = (($vla) + ($49<<2)|0); + $50 = +HEAPF32[$arrayidx39>>2]; + $51 = $j; + $arrayidx40 = (($vla) + ($51<<2)|0); + $52 = +HEAPF32[$arrayidx40>>2]; + $mul41 = $50 * $52; + $add42 = $48 + $mul41; + $yy = $add42; + $53 = $xy; + $54 = $X$addr; + $55 = $j; + $arrayidx43 = (($54) + ($55<<2)|0); + $56 = +HEAPF32[$arrayidx43>>2]; + $57 = $j; + $arrayidx44 = (($vla) + ($57<<2)|0); + $58 = +HEAPF32[$arrayidx44>>2]; + $mul45 = $56 * $58; + $add46 = $53 + $mul45; + $xy = $add46; + $59 = $j; + $arrayidx47 = (($vla) + ($59<<2)|0); + $60 = +HEAPF32[$arrayidx47>>2]; + $mul48 = $60 * 2.0; + HEAPF32[$arrayidx47>>2] = $mul48; + $61 = $j; + $arrayidx49 = (($vla1) + ($61<<2)|0); + $62 = HEAP32[$arrayidx49>>2]|0; + $63 = $pulsesLeft; + $sub50 = (($63) - ($62))|0; + $pulsesLeft = $sub50; + $64 = $j; + $inc52 = (($64) + 1)|0; + $j = $inc52; + $65 = $N$addr; + $cmp53 = ($inc52|0)<($65|0); + if (!($cmp53)) { + break; + } + } + } + $66 = $pulsesLeft; + $67 = $N$addr; + $add57 = (($67) + 3)|0; + $cmp58 = ($66|0)>($add57|0); + if ($cmp58) { + $68 = $pulsesLeft; + $conv61 = (+($68|0)); + $tmp = $conv61; + $69 = $yy; + $70 = $tmp; + $71 = $tmp; + $mul62 = $70 * $71; + $add63 = $69 + $mul62; + $yy = $add63; + $72 = $yy; + $73 = $tmp; + $74 = +HEAPF32[$vla>>2]; + $mul65 = $73 * $74; + $add66 = $72 + $mul65; + $yy = $add66; + $75 = $pulsesLeft; + $76 = HEAP32[$vla1>>2]|0; + $add68 = (($76) + ($75))|0; + HEAP32[$vla1>>2] = $add68; + $pulsesLeft = 0; + } + $s = 1.0; + $i = 0; + while(1) { + $77 = $i; + $78 = $pulsesLeft; + $cmp70 = ($77|0)<($78|0); + if (!($cmp70)) { + break; + } + $best_num = -999999986991104.0; + $best_den = 0.0; + $best_id = 0; + $79 = $yy; + $add72 = $79 + 1.0; + $yy = $add72; + $j = 0; + while(1) { + $80 = $xy; + $81 = $X$addr; + $82 = $j; + $arrayidx74 = (($81) + ($82<<2)|0); + $83 = +HEAPF32[$arrayidx74>>2]; + $add75 = $80 + $83; + $Rxy = $add75; + $84 = $yy; + $85 = $j; + $arrayidx76 = (($vla) + ($85<<2)|0); + $86 = +HEAPF32[$arrayidx76>>2]; + $add77 = $84 + $86; + $Ryy = $add77; + $87 = $Rxy; + $88 = $Rxy; + $mul78 = $87 * $88; + $Rxy = $mul78; + $89 = $best_den; + $90 = $Rxy; + $mul79 = $89 * $90; + $91 = $Ryy; + $92 = $best_num; + $mul80 = $91 * $92; + $cmp81 = $mul79 > $mul80; + if ($cmp81) { + $93 = $Ryy; + $best_den = $93; + $94 = $Rxy; + $best_num = $94; + $95 = $j; + $best_id = $95; + } + $96 = $j; + $inc86 = (($96) + 1)|0; + $j = $inc86; + $97 = $N$addr; + $cmp87 = ($inc86|0)<($97|0); + if (!($cmp87)) { + break; + } + } + $98 = $xy; + $99 = $X$addr; + $100 = $best_id; + $arrayidx90 = (($99) + ($100<<2)|0); + $101 = +HEAPF32[$arrayidx90>>2]; + $add91 = $98 + $101; + $xy = $add91; + $102 = $yy; + $103 = $best_id; + $arrayidx92 = (($vla) + ($103<<2)|0); + $104 = +HEAPF32[$arrayidx92>>2]; + $add93 = $102 + $104; + $yy = $add93; + $105 = $s; + $mul94 = 2.0 * $105; + $106 = $best_id; + $arrayidx95 = (($vla) + ($106<<2)|0); + $107 = +HEAPF32[$arrayidx95>>2]; + $add96 = $107 + $mul94; + HEAPF32[$arrayidx95>>2] = $add96; + $108 = $best_id; + $arrayidx97 = (($vla1) + ($108<<2)|0); + $109 = HEAP32[$arrayidx97>>2]|0; + $inc98 = (($109) + 1)|0; + HEAP32[$arrayidx97>>2] = $inc98; + $110 = $i; + $inc99 = (($110) + 1)|0; + $i = $inc99; + } + $j = 0; + while(1) { + $111 = $j; + $arrayidx101 = (($vla2) + ($111<<2)|0); + $112 = +HEAPF32[$arrayidx101>>2]; + $113 = $X$addr; + $114 = $j; + $arrayidx102 = (($113) + ($114<<2)|0); + $115 = +HEAPF32[$arrayidx102>>2]; + $mul103 = $112 * $115; + $116 = $X$addr; + $117 = $j; + $arrayidx104 = (($116) + ($117<<2)|0); + HEAPF32[$arrayidx104>>2] = $mul103; + $118 = $j; + $arrayidx105 = (($vla2) + ($118<<2)|0); + $119 = +HEAPF32[$arrayidx105>>2]; + $cmp106 = $119 < 0.0; + if ($cmp106) { + $120 = $j; + $arrayidx109 = (($vla1) + ($120<<2)|0); + $121 = HEAP32[$arrayidx109>>2]|0; + $sub110 = (0 - ($121))|0; + $122 = $j; + $arrayidx111 = (($vla1) + ($122<<2)|0); + HEAP32[$arrayidx111>>2] = $sub110; + } + $123 = $j; + $inc114 = (($123) + 1)|0; + $j = $inc114; + $124 = $N$addr; + $cmp115 = ($inc114|0)<($124|0); + if (!($cmp115)) { + break; + } + } + $125 = $N$addr; + $126 = $K$addr; + $127 = $enc$addr; + _encode_pulses($vla1,$125,$126,$127); + $128 = $N$addr; + $129 = $B$addr; + $call118 = (_extract_collapse_mask($vla1,$128,$129)|0); + $collapse_mask = $call118; + $130 = $collapse_mask; + $131 = $saved_stack; + _llvm_stackrestore(($131|0)); + STACKTOP = sp;return ($130|0); +} +function _exp_rotation($X,$len,$dir,$stride,$K,$spread) { + $X = $X|0; + $len = $len|0; + $dir = $dir|0; + $stride = $stride|0; + $K = $K|0; + $spread = $spread|0; + var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0.0, $55 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, $K$addr = 0, $X$addr = 0, $add = 0, $add$ptr = 0; + var $add$ptr36 = 0, $add$ptr38 = 0, $add$ptr43 = 0, $add20 = 0, $add22 = 0, $arrayidx = 0, $c = 0.0, $call = 0.0, $call13 = 0.0, $call26 = 0, $cmp = 0, $cmp1 = 0, $cmp16 = 0, $cmp23 = 0, $cmp27 = 0, $cmp29 = 0, $conv = 0.0, $conv12 = 0.0, $conv14 = 0.0, $conv4 = 0.0; + var $conv8 = 0.0, $conv9 = 0.0, $dir$addr = 0, $div = 0.0, $factor = 0, $gain = 0.0, $i = 0, $inc = 0, $inc47 = 0, $len$addr = 0, $mul = 0, $mul11 = 0.0, $mul15 = 0, $mul19 = 0, $mul2 = 0.0, $mul21 = 0, $mul3 = 0, $mul33 = 0, $mul35 = 0, $mul37 = 0; + var $mul42 = 0, $mul5 = 0.0, $mul6 = 0.0, $mul7 = 0.0, $or$cond = 0, $s = 0.0, $shr = 0, $spread$addr = 0, $stride$addr = 0, $stride2 = 0, $sub = 0, $sub10 = 0.0, $sub39 = 0.0, $sub44 = 0.0, $theta = 0.0, $tobool = 0, $tobool40 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $X$addr = $X; + $len$addr = $len; + $dir$addr = $dir; + $stride$addr = $stride; + $K$addr = $K; + $spread$addr = $spread; + $stride2 = 0; + $0 = $K$addr; + $mul = $0<<1; + $1 = $len$addr; + $cmp = ($mul|0)>=($1|0); + $2 = $spread$addr; + $cmp1 = ($2|0)==(0); + $or$cond = $cmp | $cmp1; + if ($or$cond) { + STACKTOP = sp;return; + } + $3 = $spread$addr; + $sub = (($3) - 1)|0; + $arrayidx = (12172 + ($sub<<2)|0); + $4 = HEAP32[$arrayidx>>2]|0; + $factor = $4; + $5 = $len$addr; + $conv = (+($5|0)); + $mul2 = 1.0 * $conv; + $6 = $len$addr; + $7 = $factor; + $8 = $K$addr; + $mul3 = Math_imul($7, $8)|0; + $add = (($6) + ($mul3))|0; + $conv4 = (+($add|0)); + $div = $mul2 / $conv4; + $gain = $div; + $9 = $gain; + $10 = $gain; + $mul5 = $9 * $10; + $mul6 = 0.5 * $mul5; + $theta = $mul6; + $11 = $theta; + $mul7 = 1.5707963705062866 * $11; + $conv8 = $mul7; + $call = (+Math_cos((+$conv8))); + $conv9 = $call; + $c = $conv9; + $12 = $theta; + $sub10 = 1.0 - $12; + $mul11 = 1.5707963705062866 * $sub10; + $conv12 = $mul11; + $call13 = (+Math_cos((+$conv12))); + $conv14 = $call13; + $s = $conv14; + $13 = $len$addr; + $14 = $stride$addr; + $mul15 = $14<<3; + $cmp16 = ($13|0)>=($mul15|0); + L4: do { + if ($cmp16) { + $stride2 = 1; + while(1) { + $15 = $stride2; + $16 = $stride2; + $mul19 = Math_imul($15, $16)|0; + $17 = $stride2; + $add20 = (($mul19) + ($17))|0; + $18 = $stride$addr; + $mul21 = Math_imul($add20, $18)|0; + $19 = $stride$addr; + $shr = $19 >> 2; + $add22 = (($mul21) + ($shr))|0; + $20 = $len$addr; + $cmp23 = ($add22|0)<($20|0); + if (!($cmp23)) { + break L4; + } + $21 = $stride2; + $inc = (($21) + 1)|0; + $stride2 = $inc; + } + } + } while(0); + $22 = $len$addr; + $23 = $stride$addr; + $call26 = (_celt_udiv_130($22,$23)|0); + $len$addr = $call26; + $i = 0; + while(1) { + $24 = $i; + $25 = $stride$addr; + $cmp27 = ($24|0)<($25|0); + if (!($cmp27)) { + break; + } + $26 = $dir$addr; + $cmp29 = ($26|0)<(0); + if ($cmp29) { + $27 = $stride2; + $tobool = ($27|0)!=(0); + if ($tobool) { + $28 = $X$addr; + $29 = $i; + $30 = $len$addr; + $mul33 = Math_imul($29, $30)|0; + $add$ptr = (($28) + ($mul33<<2)|0); + $31 = $len$addr; + $32 = $stride2; + $33 = $s; + $34 = $c; + _exp_rotation1($add$ptr,$31,$32,$33,$34); + } + $35 = $X$addr; + $36 = $i; + $37 = $len$addr; + $mul35 = Math_imul($36, $37)|0; + $add$ptr36 = (($35) + ($mul35<<2)|0); + $38 = $len$addr; + $39 = $c; + $40 = $s; + _exp_rotation1($add$ptr36,$38,1,$39,$40); + } else { + $41 = $X$addr; + $42 = $i; + $43 = $len$addr; + $mul37 = Math_imul($42, $43)|0; + $add$ptr38 = (($41) + ($mul37<<2)|0); + $44 = $len$addr; + $45 = $c; + $46 = $s; + $sub39 = - $46; + _exp_rotation1($add$ptr38,$44,1,$45,$sub39); + $47 = $stride2; + $tobool40 = ($47|0)!=(0); + if ($tobool40) { + $48 = $X$addr; + $49 = $i; + $50 = $len$addr; + $mul42 = Math_imul($49, $50)|0; + $add$ptr43 = (($48) + ($mul42<<2)|0); + $51 = $len$addr; + $52 = $stride2; + $53 = $s; + $54 = $c; + $sub44 = - $54; + _exp_rotation1($add$ptr43,$51,$52,$53,$sub44); + } + } + $55 = $i; + $inc47 = (($55) + 1)|0; + $i = $inc47; + } + STACKTOP = sp;return; +} +function _extract_collapse_mask($iy,$N,$B) { + $iy = $iy|0; + $N = $N|0; + $B = $B|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $B$addr = 0, $N$addr = 0; + var $N0 = 0, $add = 0, $arrayidx = 0, $call = 0, $cmp = 0, $cmp2 = 0, $cmp3 = 0, $cmp7 = 0, $collapse_mask = 0, $conv = 0, $i = 0, $inc = 0, $inc6 = 0, $iy$addr = 0, $j = 0, $mul = 0, $or = 0, $or4 = 0, $retval = 0, $shl = 0; + var $tmp = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $iy$addr = $iy; + $N$addr = $N; + $B$addr = $B; + $0 = $B$addr; + $cmp = ($0|0)<=(1); + if ($cmp) { + $retval = 1; + $17 = $retval; + STACKTOP = sp;return ($17|0); + } + $1 = $N$addr; + $2 = $B$addr; + $call = (_celt_udiv_130($1,$2)|0); + $N0 = $call; + $collapse_mask = 0; + $i = 0; + while(1) { + $tmp = 0; + $j = 0; + while(1) { + $3 = $iy$addr; + $4 = $i; + $5 = $N0; + $mul = Math_imul($4, $5)|0; + $6 = $j; + $add = (($mul) + ($6))|0; + $arrayidx = (($3) + ($add<<2)|0); + $7 = HEAP32[$arrayidx>>2]|0; + $8 = $tmp; + $or = $8 | $7; + $tmp = $or; + $9 = $j; + $inc = (($9) + 1)|0; + $j = $inc; + $10 = $N0; + $cmp2 = ($inc|0)<($10|0); + if (!($cmp2)) { + break; + } + } + $11 = $tmp; + $cmp3 = ($11|0)!=(0); + $conv = $cmp3&1; + $12 = $i; + $shl = $conv << $12; + $13 = $collapse_mask; + $or4 = $13 | $shl; + $collapse_mask = $or4; + $14 = $i; + $inc6 = (($14) + 1)|0; + $i = $inc6; + $15 = $B$addr; + $cmp7 = ($inc6|0)<($15|0); + if (!($cmp7)) { + break; + } + } + $16 = $collapse_mask; + $retval = $16; + $17 = $retval; + STACKTOP = sp;return ($17|0); +} +function _celt_udiv_130($n,$d) { + $n = $n|0; + $d = $d|0; + var $0 = 0, $1 = 0, $d$addr = 0, $div = 0, $n$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $n$addr = $n; + $d$addr = $d; + $0 = $n$addr; + $1 = $d$addr; + $div = (($0>>>0) / ($1>>>0))&-1; + STACKTOP = sp;return ($div|0); +} +function _exp_rotation1($X,$len,$stride,$c,$s) { + $X = $X|0; + $len = $len|0; + $stride = $stride|0; + $c = +$c; + $s = +$s; + var $0 = 0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0; + var $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, $X$addr = 0, $Xptr = 0, $add = 0.0, $add24 = 0.0, $add28 = 0.0, $add7 = 0.0, $arrayidx11 = 0, $arrayidx2 = 0, $arrayidx21 = 0, $arrayidx25 = 0, $arrayidx4 = 0, $c$addr = 0.0, $cmp = 0, $cmp16 = 0, $dec = 0; + var $i = 0, $inc = 0, $incdec$ptr = 0, $incdec$ptr29 = 0, $len$addr = 0, $ms = 0.0, $mul = 0.0, $mul12 = 0, $mul22 = 0.0, $mul23 = 0.0, $mul26 = 0.0, $mul27 = 0.0, $mul3 = 0.0, $mul5 = 0.0, $mul6 = 0.0, $mul8 = 0, $s$addr = 0.0, $stride$addr = 0, $sub = 0.0, $sub1 = 0; + var $sub10 = 0, $sub13 = 0, $sub14 = 0, $sub9 = 0, $x1 = 0.0, $x118 = 0.0, $x2 = 0.0, $x219 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $X$addr = $X; + $len$addr = $len; + $stride$addr = $stride; + $c$addr = $c; + $s$addr = $s; + $0 = $X$addr; + $Xptr = $0; + $1 = $s$addr; + $sub = - $1; + $ms = $sub; + $i = 0; + while(1) { + $2 = $i; + $3 = $len$addr; + $4 = $stride$addr; + $sub1 = (($3) - ($4))|0; + $cmp = ($2|0)<($sub1|0); + if (!($cmp)) { + break; + } + $5 = $Xptr; + $6 = +HEAPF32[$5>>2]; + $x1 = $6; + $7 = $Xptr; + $8 = $stride$addr; + $arrayidx2 = (($7) + ($8<<2)|0); + $9 = +HEAPF32[$arrayidx2>>2]; + $x2 = $9; + $10 = $c$addr; + $11 = $x2; + $mul = $10 * $11; + $12 = $s$addr; + $13 = $x1; + $mul3 = $12 * $13; + $add = $mul + $mul3; + $14 = $Xptr; + $15 = $stride$addr; + $arrayidx4 = (($14) + ($15<<2)|0); + HEAPF32[$arrayidx4>>2] = $add; + $16 = $c$addr; + $17 = $x1; + $mul5 = $16 * $17; + $18 = $ms; + $19 = $x2; + $mul6 = $18 * $19; + $add7 = $mul5 + $mul6; + $20 = $Xptr; + $incdec$ptr = ((($20)) + 4|0); + $Xptr = $incdec$ptr; + HEAPF32[$20>>2] = $add7; + $21 = $i; + $inc = (($21) + 1)|0; + $i = $inc; + } + $22 = $X$addr; + $23 = $len$addr; + $24 = $stride$addr; + $mul8 = $24<<1; + $sub9 = (($23) - ($mul8))|0; + $sub10 = (($sub9) - 1)|0; + $arrayidx11 = (($22) + ($sub10<<2)|0); + $Xptr = $arrayidx11; + $25 = $len$addr; + $26 = $stride$addr; + $mul12 = $26<<1; + $sub13 = (($25) - ($mul12))|0; + $sub14 = (($sub13) - 1)|0; + $i = $sub14; + while(1) { + $27 = $i; + $cmp16 = ($27|0)>=(0); + if (!($cmp16)) { + break; + } + $28 = $Xptr; + $29 = +HEAPF32[$28>>2]; + $x118 = $29; + $30 = $Xptr; + $31 = $stride$addr; + $arrayidx21 = (($30) + ($31<<2)|0); + $32 = +HEAPF32[$arrayidx21>>2]; + $x219 = $32; + $33 = $c$addr; + $34 = $x219; + $mul22 = $33 * $34; + $35 = $s$addr; + $36 = $x118; + $mul23 = $35 * $36; + $add24 = $mul22 + $mul23; + $37 = $Xptr; + $38 = $stride$addr; + $arrayidx25 = (($37) + ($38<<2)|0); + HEAPF32[$arrayidx25>>2] = $add24; + $39 = $c$addr; + $40 = $x118; + $mul26 = $39 * $40; + $41 = $ms; + $42 = $x219; + $mul27 = $41 * $42; + $add28 = $mul26 + $mul27; + $43 = $Xptr; + $incdec$ptr29 = ((($43)) + -4|0); + $Xptr = $incdec$ptr29; + HEAPF32[$43>>2] = $add28; + $44 = $i; + $dec = (($44) + -1)|0; + $i = $dec; + } + STACKTOP = sp;return; +} +function _alg_unquant($X,$N,$K,$spread,$B,$dec,$gain) { + $X = $X|0; + $N = $N|0; + $K = $K|0; + $spread = $spread|0; + $B = $B|0; + $dec = $dec|0; + $gain = +$gain; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, $B$addr = 0, $K$addr = 0; + var $N$addr = 0, $Ryy = 0.0, $X$addr = 0, $call = 0.0, $call1 = 0, $collapse_mask = 0, $dec$addr = 0, $gain$addr = 0.0, $saved_stack = 0, $spread$addr = 0, $vla = 0, $vla$alloca_mul = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $X$addr = $X; + $N$addr = $N; + $K$addr = $K; + $spread$addr = $spread; + $B$addr = $B; + $dec$addr = $dec; + $gain$addr = $gain; + $0 = $N$addr; + $1 = (_llvm_stacksave()|0); + $saved_stack = $1; + $vla$alloca_mul = $0<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $2 = $N$addr; + $3 = $K$addr; + $4 = $dec$addr; + $call = (+_decode_pulses($vla,$2,$3,$4)); + $Ryy = $call; + $5 = $X$addr; + $6 = $N$addr; + $7 = $Ryy; + $8 = $gain$addr; + _normalise_residual($vla,$5,$6,$7,$8); + $9 = $X$addr; + $10 = $N$addr; + $11 = $B$addr; + $12 = $K$addr; + $13 = $spread$addr; + _exp_rotation($9,$10,-1,$11,$12,$13); + $14 = $N$addr; + $15 = $B$addr; + $call1 = (_extract_collapse_mask($vla,$14,$15)|0); + $collapse_mask = $call1; + $16 = $collapse_mask; + $17 = $saved_stack; + _llvm_stackrestore(($17|0)); + STACKTOP = sp;return ($16|0); +} +function _normalise_residual($iy,$X,$N,$Ryy,$gain) { + $iy = $iy|0; + $X = $X|0; + $N = $N|0; + $Ryy = +$Ryy; + $gain = +$gain; + var $0 = 0.0, $1 = 0.0, $10 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $N$addr = 0, $Ryy$addr = 0.0, $X$addr = 0, $arrayidx = 0, $arrayidx4 = 0, $call = 0.0, $cmp = 0, $conv = 0.0, $conv1 = 0.0; + var $conv2 = 0.0, $div = 0.0, $g = 0.0, $gain$addr = 0.0, $i = 0, $inc = 0, $iy$addr = 0, $mul = 0.0, $mul3 = 0.0, $t = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $iy$addr = $iy; + $X$addr = $X; + $N$addr = $N; + $Ryy$addr = $Ryy; + $gain$addr = $gain; + $0 = $Ryy$addr; + $t = $0; + $1 = $t; + $conv = $1; + $call = (+Math_sqrt((+$conv))); + $conv1 = $call; + $div = 1.0 / $conv1; + $2 = $gain$addr; + $mul = $div * $2; + $g = $mul; + $i = 0; + while(1) { + $3 = $g; + $4 = $iy$addr; + $5 = $i; + $arrayidx = (($4) + ($5<<2)|0); + $6 = HEAP32[$arrayidx>>2]|0; + $conv2 = (+($6|0)); + $mul3 = $3 * $conv2; + $7 = $X$addr; + $8 = $i; + $arrayidx4 = (($7) + ($8<<2)|0); + HEAPF32[$arrayidx4>>2] = $mul3; + $9 = $i; + $inc = (($9) + 1)|0; + $i = $inc; + $10 = $N$addr; + $cmp = ($inc|0)<($10|0); + if (!($cmp)) { + break; + } + } + STACKTOP = sp;return; +} +function _renormalise_vector($X,$N,$gain,$arch) { + $X = $X|0; + $N = $N|0; + $gain = +$gain; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, $E = 0.0, $N$addr = 0, $X$addr = 0, $add = 0.0, $arch$addr = 0; + var $call = 0.0, $call1 = 0.0, $cmp = 0, $conv = 0.0, $conv2 = 0.0, $div = 0.0, $g = 0.0, $gain$addr = 0.0, $i = 0, $inc = 0, $incdec$ptr = 0, $mul = 0.0, $mul4 = 0.0, $t = 0.0, $xptr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $X$addr = $X; + $N$addr = $N; + $gain$addr = $gain; + $arch$addr = $arch; + $0 = $X$addr; + $1 = $X$addr; + $2 = $N$addr; + $call = (+_celt_inner_prod_c_133($0,$1,$2)); + $add = 1.0000000036274937E-15 + $call; + $E = $add; + $3 = $E; + $t = $3; + $4 = $t; + $conv = $4; + $call1 = (+Math_sqrt((+$conv))); + $conv2 = $call1; + $div = 1.0 / $conv2; + $5 = $gain$addr; + $mul = $div * $5; + $g = $mul; + $6 = $X$addr; + $xptr = $6; + $i = 0; + while(1) { + $7 = $i; + $8 = $N$addr; + $cmp = ($7|0)<($8|0); + if (!($cmp)) { + break; + } + $9 = $g; + $10 = $xptr; + $11 = +HEAPF32[$10>>2]; + $mul4 = $9 * $11; + $12 = $xptr; + HEAPF32[$12>>2] = $mul4; + $13 = $xptr; + $incdec$ptr = ((($13)) + 4|0); + $xptr = $incdec$ptr; + $14 = $i; + $inc = (($14) + 1)|0; + $i = $inc; + } + STACKTOP = sp;return; +} +function _celt_inner_prod_c_133($x,$y,$N) { + $x = $x|0; + $y = $y|0; + $N = $N|0; + var $0 = 0, $1 = 0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, $N$addr = 0, $add = 0.0, $arrayidx = 0, $arrayidx1 = 0, $cmp = 0, $i = 0, $inc = 0, $mul = 0.0, $x$addr = 0, $xy = 0.0; + var $y$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $x$addr = $x; + $y$addr = $y; + $N$addr = $N; + $xy = 0.0; + $i = 0; + while(1) { + $0 = $i; + $1 = $N$addr; + $cmp = ($0|0)<($1|0); + $2 = $xy; + if (!($cmp)) { + break; + } + $3 = $x$addr; + $4 = $i; + $arrayidx = (($3) + ($4<<2)|0); + $5 = +HEAPF32[$arrayidx>>2]; + $6 = $y$addr; + $7 = $i; + $arrayidx1 = (($6) + ($7<<2)|0); + $8 = +HEAPF32[$arrayidx1>>2]; + $mul = $5 * $8; + $add = $2 + $mul; + $xy = $add; + $9 = $i; + $inc = (($9) + 1)|0; + $i = $inc; + } + STACKTOP = sp;return (+$2); +} +function _stereo_itheta($X,$Y,$stereo,$N,$arch) { + $X = $X|0; + $Y = $Y|0; + $stereo = $stereo|0; + $N = $N|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, $Emid = 0.0, $Eside = 0.0, $N$addr = 0, $X$addr = 0, $Y$addr = 0; + var $add = 0.0, $add19 = 0.0, $add4 = 0.0, $add6 = 0.0, $add7 = 0.0, $add9 = 0.0, $arch$addr = 0, $arrayidx = 0, $arrayidx1 = 0, $arrayidx2 = 0, $arrayidx3 = 0, $call = 0.0, $call10 = 0.0, $call13 = 0.0, $call17 = 0.0, $call20 = 0.0, $call8 = 0.0, $cmp = 0, $conv = 0.0, $conv11 = 0.0; + var $conv12 = 0.0, $conv14 = 0.0, $conv15 = 0.0, $conv16 = 0.0, $conv21 = 0, $i = 0, $inc = 0, $itheta = 0, $m = 0.0, $mid = 0.0, $mul = 0.0, $mul18 = 0.0, $mul5 = 0.0, $s = 0.0, $side = 0.0, $stereo$addr = 0, $sub = 0.0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $X$addr = $X; + $Y$addr = $Y; + $stereo$addr = $stereo; + $N$addr = $N; + $arch$addr = $arch; + $Eside = 1.0000000036274937E-15; + $Emid = 1.0000000036274937E-15; + $0 = $stereo$addr; + $tobool = ($0|0)!=(0); + L1: do { + if ($tobool) { + $i = 0; + while(1) { + $1 = $i; + $2 = $N$addr; + $cmp = ($1|0)<($2|0); + if (!($cmp)) { + break L1; + } + $3 = $X$addr; + $4 = $i; + $arrayidx = (($3) + ($4<<2)|0); + $5 = +HEAPF32[$arrayidx>>2]; + $6 = $Y$addr; + $7 = $i; + $arrayidx1 = (($6) + ($7<<2)|0); + $8 = +HEAPF32[$arrayidx1>>2]; + $add = $5 + $8; + $m = $add; + $9 = $X$addr; + $10 = $i; + $arrayidx2 = (($9) + ($10<<2)|0); + $11 = +HEAPF32[$arrayidx2>>2]; + $12 = $Y$addr; + $13 = $i; + $arrayidx3 = (($12) + ($13<<2)|0); + $14 = +HEAPF32[$arrayidx3>>2]; + $sub = $11 - $14; + $s = $sub; + $15 = $Emid; + $16 = $m; + $17 = $m; + $mul = $16 * $17; + $add4 = $15 + $mul; + $Emid = $add4; + $18 = $Eside; + $19 = $s; + $20 = $s; + $mul5 = $19 * $20; + $add6 = $18 + $mul5; + $Eside = $add6; + $21 = $i; + $inc = (($21) + 1)|0; + $i = $inc; + } + } else { + $22 = $X$addr; + $23 = $X$addr; + $24 = $N$addr; + $call = (+_celt_inner_prod_c_133($22,$23,$24)); + $25 = $Emid; + $add7 = $25 + $call; + $Emid = $add7; + $26 = $Y$addr; + $27 = $Y$addr; + $28 = $N$addr; + $call8 = (+_celt_inner_prod_c_133($26,$27,$28)); + $29 = $Eside; + $add9 = $29 + $call8; + $Eside = $add9; + } + } while(0); + $30 = $Emid; + $conv = $30; + $call10 = (+Math_sqrt((+$conv))); + $conv11 = $call10; + $mid = $conv11; + $31 = $Eside; + $conv12 = $31; + $call13 = (+Math_sqrt((+$conv12))); + $conv14 = $call13; + $side = $conv14; + $32 = $side; + $conv15 = $32; + $33 = $mid; + $conv16 = $33; + $call17 = (+Math_atan2((+$conv15),(+$conv16))); + $mul18 = 10430.3818359375 * $call17; + $add19 = 0.5 + $mul18; + $call20 = (+Math_floor((+$add19))); + $conv21 = (~~(($call20))); + $itheta = $conv21; + $34 = $itheta; + STACKTOP = sp;return ($34|0); +} +function _silk_Get_Decoder_Size($decSizeBytes) { + $decSizeBytes = $decSizeBytes|0; + var $0 = 0, $1 = 0, $decSizeBytes$addr = 0, $ret = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $decSizeBytes$addr = $decSizeBytes; + $ret = 0; + $0 = $decSizeBytes$addr; + HEAP32[$0>>2] = 8544; + $1 = $ret; + STACKTOP = sp;return ($1|0); +} +function _silk_InitDecoder($decState) { + $decState = $decState|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $arrayidx = 0, $call = 0, $channel_state = 0, $cmp = 0, $decState$addr = 0, $inc = 0, $n = 0, $prev_decode_only_middle = 0, $ret = 0, $sStereo = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $decState$addr = $decState; + $ret = 0; + $0 = $decState$addr; + $channel_state = $0; + $n = 0; + while(1) { + $1 = $n; + $cmp = ($1|0)<(2); + if (!($cmp)) { + break; + } + $2 = $channel_state; + $3 = $n; + $arrayidx = (($2) + (($3*4260)|0)|0); + $call = (_silk_init_decoder($arrayidx)|0); + $ret = $call; + $4 = $n; + $inc = (($4) + 1)|0; + $n = $inc; + } + $5 = $decState$addr; + $sStereo = ((($5)) + 8520|0); + ;HEAP32[$sStereo>>2]=0|0;HEAP32[$sStereo+4>>2]=0|0;HEAP32[$sStereo+8>>2]=0|0; + $6 = $decState$addr; + $prev_decode_only_middle = ((($6)) + 8540|0); + HEAP32[$prev_decode_only_middle>>2] = 0; + $7 = $ret; + STACKTOP = sp;return ($7|0); +} +function _silk_Decode($decState,$decControl,$lostFlag,$newPacketFlag,$psRangeDec,$samplesOut,$nSamplesOut,$arch) { + $decState = $decState|0; + $decControl = $decControl|0; + $lostFlag = $lostFlag|0; + $newPacketFlag = $newPacketFlag|0; + $psRangeDec = $psRangeDec|0; + $samplesOut = $samplesOut|0; + $nSamplesOut = $nSamplesOut|0; + $arch = $arch|0; + var $$sink = 0, $$sink6 = 0, $$sink7 = 0, $$sink8 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0; + var $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0; + var $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0; + var $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0; + var $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0; + var $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0; + var $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0; + var $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0; + var $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0; + var $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0; + var $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0; + var $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0; + var $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0; + var $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0; + var $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0; + var $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0; + var $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0; + var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0; + var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0; + var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0; + var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $API_sampleRate = 0, $API_sampleRate100 = 0, $API_sampleRate103 = 0, $API_sampleRate314 = 0, $API_sampleRate442 = 0, $FrameIndex = 0, $LBRR_flag = 0, $LBRR_flag140 = 0, $LBRR_flags = 0, $LBRR_flags148 = 0, $LBRR_flags163 = 0, $LBRR_flags185 = 0, $LBRR_flags196 = 0, $LBRR_flags205 = 0, $LBRR_flags239 = 0, $LBRR_flags262 = 0; + var $LBRR_flags355 = 0, $LBRR_flags386 = 0, $LBRR_symbol = 0, $LastGainIndex = 0, $LastGainIndex599 = 0, $MS_pred_Q13 = 0, $VAD_flags = 0, $VAD_flags251 = 0, $add = 0, $add$ptr336 = 0, $add$ptr337 = 0, $add$ptr487 = 0, $add$ptr488 = 0, $add155 = 0, $add323 = 0, $add406 = 0, $add468 = 0, $add479 = 0, $add483 = 0, $add510 = 0; + var $add521 = 0, $add545 = 0, $add552 = 0, $add563 = 0, $add566 = 0, $add64 = 0, $add74 = 0, $and = 0, $arch$addr = 0, $arrayidx = 0, $arrayidx118 = 0, $arrayidx123 = 0, $arrayidx124 = 0, $arrayidx137 = 0, $arrayidx139 = 0, $arrayidx143 = 0, $arrayidx147 = 0, $arrayidx151 = 0, $arrayidx153 = 0, $arrayidx157 = 0; + var $arrayidx162 = 0, $arrayidx164 = 0, $arrayidx184 = 0, $arrayidx186 = 0, $arrayidx195 = 0, $arrayidx197 = 0, $arrayidx204 = 0, $arrayidx207 = 0, $arrayidx212 = 0, $arrayidx214 = 0, $arrayidx215 = 0, $arrayidx218 = 0, $arrayidx24 = 0, $arrayidx242 = 0, $arrayidx25 = 0, $arrayidx250 = 0, $arrayidx254 = 0, $arrayidx261 = 0, $arrayidx265 = 0, $arrayidx278 = 0; + var $arrayidx280 = 0, $arrayidx29 = 0, $arrayidx297 = 0, $arrayidx300 = 0, $arrayidx303 = 0, $arrayidx305 = 0, $arrayidx307 = 0, $arrayidx309 = 0, $arrayidx31 = 0, $arrayidx31$sink = 0, $arrayidx338 = 0, $arrayidx354 = 0, $arrayidx356 = 0, $arrayidx358 = 0, $arrayidx37 = 0, $arrayidx385 = 0, $arrayidx388 = 0, $arrayidx39 = 0, $arrayidx402 = 0, $arrayidx403 = 0; + var $arrayidx404 = 0, $arrayidx408 = 0, $arrayidx409 = 0, $arrayidx412 = 0, $arrayidx428 = 0, $arrayidx440 = 0, $arrayidx45 = 0, $arrayidx47 = 0, $arrayidx489 = 0, $arrayidx505 = 0, $arrayidx507 = 0, $arrayidx508 = 0, $arrayidx519 = 0, $arrayidx522 = 0, $arrayidx53 = 0, $arrayidx540 = 0, $arrayidx543 = 0, $arrayidx55 = 0, $arrayidx550 = 0, $arrayidx553 = 0; + var $arrayidx564 = 0, $arrayidx567 = 0, $arrayidx584 = 0, $arrayidx598 = 0, $arrayidx6 = 0, $arrayidx72 = 0, $arrayidx92 = 0, $call = 0, $call122 = 0, $call154 = 0, $call405 = 0, $call509 = 0, $call544 = 0, $call73 = 0, $channel_state = 0, $cmp = 0, $cmp101 = 0, $cmp104 = 0, $cmp107 = 0, $cmp11 = 0; + var $cmp111 = 0, $cmp115 = 0, $cmp120 = 0, $cmp13 = 0, $cmp135 = 0, $cmp145 = 0, $cmp159 = 0, $cmp16 = 0, $cmp173 = 0, $cmp178 = 0, $cmp182 = 0, $cmp190 = 0, $cmp192 = 0, $cmp198 = 0, $cmp20 = 0, $cmp202 = 0, $cmp22 = 0, $cmp229 = 0, $cmp232 = 0, $cmp235 = 0; + var $cmp243 = 0, $cmp247 = 0, $cmp255 = 0, $cmp258 = 0, $cmp266 = 0, $cmp27 = 0, $cmp273 = 0, $cmp287 = 0, $cmp290 = 0, $cmp293 = 0, $cmp317 = 0, $cmp340 = 0, $cmp348 = 0, $cmp35 = 0, $cmp351 = 0, $cmp359 = 0, $cmp366 = 0, $cmp369 = 0, $cmp378 = 0, $cmp382 = 0; + var $cmp392 = 0, $cmp4 = 0, $cmp419 = 0, $cmp423 = 0, $cmp43 = 0, $cmp450 = 0, $cmp458 = 0, $cmp494 = 0, $cmp502 = 0, $cmp51 = 0, $cmp512 = 0, $cmp516 = 0, $cmp531 = 0, $cmp535 = 0, $cmp547 = 0, $cmp559 = 0, $cmp575 = 0, $cmp589 = 0, $cmp594 = 0, $cmp65 = 0; + var $cmp67 = 0, $cmp69 = 0, $cmp79 = 0, $cmp82 = 0, $cmp85 = 0, $cmp87 = 0, $cmp9 = 0, $cond = 0, $cond390 = 0, $cond455 = 0, $cond472 = 0, $condCoding = 0, $condCoding374 = 0, $conv = 0, $conv217 = 0, $conv279 = 0, $conv318 = 0, $conv446 = 0, $conv447 = 0, $decControl$addr = 0; + var $decState$addr = 0, $decode_only_middle = 0, $delay_stack_alloc = 0, $div = 0, $first_frame_after_reset = 0, $frame_length = 0, $frame_length322 = 0, $frame_length335 = 0, $frame_length467 = 0, $frame_length478 = 0, $frame_length486 = 0, $fs_kHz = 0, $fs_kHz431 = 0, $fs_kHz445 = 0, $fs_kHz581 = 0, $fs_kHz_dec = 0, $has_side = 0, $i = 0, $inc = 0, $inc126 = 0; + var $inc131 = 0, $inc166 = 0, $inc171 = 0, $inc221 = 0, $inc224 = 0, $inc282 = 0, $inc414 = 0, $inc416 = 0, $inc524 = 0, $inc528 = 0, $inc555 = 0, $inc569 = 0, $inc601 = 0, $inc76 = 0, $indices = 0, $indices216 = 0, $internalSampleRate = 0, $internalSampleRate311 = 0, $internalSampleRate63 = 0, $lagPrev = 0; + var $lagPrev579 = 0, $land$ext = 0, $lnot = 0, $lnot$ext = 0, $lor$ext = 0, $lostFlag$addr = 0, $mul = 0, $mul313 = 0, $mul316 = 0, $mul324 = 0, $mul410 = 0, $mul443 = 0, $mul448 = 0, $mul469 = 0, $mul480 = 0, $mul481 = 0, $mul482 = 0, $mul520 = 0, $mul551 = 0, $mul562 = 0; + var $mul565 = 0, $mul585 = 0, $mult_tab = 0, $n = 0, $nChannelsAPI84 = 0, $nChannelsAPI97 = 0, $nChannelsInternal = 0, $nChannelsInternal10 = 0, $nChannelsInternal114 = 0, $nChannelsInternal134 = 0, $nChannelsInternal181 = 0, $nChannelsInternal189 = 0, $nChannelsInternal19 = 0, $nChannelsInternal2 = 0, $nChannelsInternal228 = 0, $nChannelsInternal286 = 0, $nChannelsInternal3 = 0, $nChannelsInternal312 = 0, $nChannelsInternal320 = 0, $nChannelsInternal347 = 0; + var $nChannelsInternal365 = 0, $nChannelsInternal422 = 0, $nChannelsInternal465 = 0, $nChannelsInternal476 = 0, $nChannelsInternal493 = 0, $nChannelsInternal499 = 0, $nChannelsInternal499$sink = 0, $nChannelsInternal534 = 0, $nChannelsInternal593 = 0, $nChannelsInternal8 = 0, $nChannelsInternal81 = 0, $nChannelsInternal86 = 0, $nChannelsInternal98 = 0, $nChannelsInternal99 = 0, $nFramesDecoded = 0, $nFramesDecoded110 = 0, $nFramesDecoded15 = 0, $nFramesDecoded241 = 0, $nFramesDecoded253 = 0, $nFramesDecoded264 = 0; + var $nFramesDecoded357 = 0, $nFramesDecoded376 = 0, $nFramesDecoded413 = 0, $nFramesPerPacket = 0, $nFramesPerPacket119 = 0, $nFramesPerPacket144 = 0, $nFramesPerPacket152 = 0, $nFramesPerPacket158 = 0, $nFramesPerPacket177 = 0, $nFramesPerPacket30 = 0, $nFramesPerPacket38 = 0, $nFramesPerPacket46 = 0, $nFramesPerPacket54 = 0, $nSamplesOut$addr = 0, $nSamplesOutDec = 0, $nb_subfr32 = 0, $newPacketFlag$addr = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0; + var $or$cond3 = 0, $or$cond4 = 0, $or$cond5 = 0, $outBuf = 0, $payloadSize_ms = 0, $payloadSize_ms26 = 0, $payloadSize_ms34 = 0, $payloadSize_ms42 = 0, $payloadSize_ms50 = 0, $prevPitchLag587 = 0, $prevSignalType = 0, $prevSignalType574 = 0, $prev_decode_only_middle = 0, $prev_decode_only_middle345 = 0, $prev_decode_only_middle395 = 0, $prev_decode_only_middle604 = 0, $psDec = 0, $psRangeDec$addr = 0, $pulses = 0, $quantOffsetType = 0; + var $resample_out_ptr = 0, $resampler_state = 0, $resampler_state506 = 0, $resampler_state541 = 0, $resampler_state94 = 0, $ret = 0, $retval = 0, $sLPC_Q14_buf = 0, $sMid = 0, $sMid437 = 0, $sSide = 0, $sStereo = 0, $sStereo276 = 0, $sStereo426 = 0, $sStereo434 = 0, $sStereo436 = 0, $sStereo90 = 0, $samplesOut$addr = 0, $samplesOut1_tmp = 0, $saved_stack = 0; + var $shr = 0, $shr161 = 0, $shr583 = 0, $signalType = 0, $stereo_to_mono = 0, $sub = 0, $sub$ptr$div = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0, $sub206 = 0, $sub377 = 0, $sub387 = 0, $sub582 = 0, $tobool = 0, $tobool141 = 0, $tobool187 = 0, $tobool208 = 0, $tobool319 = 0, $tobool325 = 0; + var $tobool343 = 0, $tobool346 = 0, $tobool372 = 0, $tobool389 = 0, $tobool396 = 0, $tobool463 = 0, $tobool474 = 0, $tobool538 = 0, $vla = 0, $vla$alloca_mul = 0, $vla$sink = 0, $vla456 = 0, $vla456$alloca_mul = 0, $vla473 = 0, $vla473$alloca_mul = 0, dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 784|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(784|0); + $decode_only_middle = sp + 84|0; + $nSamplesOutDec = sp + 76|0; + $samplesOut1_tmp = sp + 64|0; + $MS_pred_Q13 = sp + 56|0; + $pulses = sp + 136|0; + $mult_tab = sp; + $decState$addr = $decState; + $decControl$addr = $decControl; + $lostFlag$addr = $lostFlag; + $newPacketFlag$addr = $newPacketFlag; + $psRangeDec$addr = $psRangeDec; + $samplesOut$addr = $samplesOut; + $nSamplesOut$addr = $nSamplesOut; + $arch$addr = $arch; + HEAP32[$decode_only_middle>>2] = 0; + $ret = 0; + ;HEAP32[$MS_pred_Q13>>2]=0|0;HEAP32[$MS_pred_Q13+4>>2]=0|0; + $0 = $decState$addr; + $psDec = $0; + $1 = $psDec; + $channel_state = $1; + $2 = $newPacketFlag$addr; + $tobool = ($2|0)!=(0); + L1: do { + if ($tobool) { + $n = 0; + while(1) { + $3 = $n; + $4 = $decControl$addr; + $nChannelsInternal = ((($4)) + 4|0); + $5 = HEAP32[$nChannelsInternal>>2]|0; + $cmp = ($3|0)<($5|0); + if (!($cmp)) { + break L1; + } + $6 = $channel_state; + $7 = $n; + $arrayidx = (($6) + (($7*4260)|0)|0); + $nFramesDecoded = ((($arrayidx)) + 2388|0); + HEAP32[$nFramesDecoded>>2] = 0; + $8 = $n; + $inc = (($8) + 1)|0; + $n = $inc; + } + } + } while(0); + $9 = $decControl$addr; + $nChannelsInternal2 = ((($9)) + 4|0); + $10 = HEAP32[$nChannelsInternal2>>2]|0; + $11 = $psDec; + $nChannelsInternal3 = ((($11)) + 8536|0); + $12 = HEAP32[$nChannelsInternal3>>2]|0; + $cmp4 = ($10|0)>($12|0); + if ($cmp4) { + $13 = $channel_state; + $arrayidx6 = ((($13)) + 4260|0); + $call = (_silk_init_decoder($arrayidx6)|0); + $14 = $ret; + $add = (($14) + ($call))|0; + $ret = $add; + } + $15 = $decControl$addr; + $nChannelsInternal8 = ((($15)) + 4|0); + $16 = HEAP32[$nChannelsInternal8>>2]|0; + $cmp9 = ($16|0)==(1); + if ($cmp9) { + $17 = $psDec; + $nChannelsInternal10 = ((($17)) + 8536|0); + $18 = HEAP32[$nChannelsInternal10>>2]|0; + $cmp11 = ($18|0)==(2); + if ($cmp11) { + $19 = $decControl$addr; + $internalSampleRate = ((($19)) + 12|0); + $20 = HEAP32[$internalSampleRate>>2]|0; + $21 = $channel_state; + $fs_kHz = ((($21)) + 2316|0); + $22 = HEAP32[$fs_kHz>>2]|0; + $mul = ($22*1000)|0; + $cmp13 = ($20|0)==($mul|0); + $23 = $cmp13; + } else { + $23 = 0; + } + } else { + $23 = 0; + } + $land$ext = $23&1; + $stereo_to_mono = $land$ext; + $24 = $channel_state; + $nFramesDecoded15 = ((($24)) + 2388|0); + $25 = HEAP32[$nFramesDecoded15>>2]|0; + $cmp16 = ($25|0)==(0); + L14: do { + if ($cmp16) { + $n = 0; + L16: while(1) { + $26 = $n; + $27 = $decControl$addr; + $nChannelsInternal19 = ((($27)) + 4|0); + $28 = HEAP32[$nChannelsInternal19>>2]|0; + $cmp20 = ($26|0)<($28|0); + if (!($cmp20)) { + break L14; + } + $29 = $decControl$addr; + $payloadSize_ms = ((($29)) + 16|0); + $30 = HEAP32[$payloadSize_ms>>2]|0; + $cmp22 = ($30|0)==(0); + do { + if ($cmp22) { + $31 = $channel_state; + $32 = $n; + $arrayidx24 = (($31) + (($32*4260)|0)|0); + $nFramesPerPacket = ((($arrayidx24)) + 2392|0); + HEAP32[$nFramesPerPacket>>2] = 1; + $33 = $channel_state; + $34 = $n; + $arrayidx25 = (($33) + (($34*4260)|0)|0); + $$sink8 = 2;$arrayidx31$sink = $arrayidx25; + } else { + $35 = $decControl$addr; + $payloadSize_ms26 = ((($35)) + 16|0); + $36 = HEAP32[$payloadSize_ms26>>2]|0; + $cmp27 = ($36|0)==(10); + if ($cmp27) { + $37 = $channel_state; + $38 = $n; + $arrayidx29 = (($37) + (($38*4260)|0)|0); + $nFramesPerPacket30 = ((($arrayidx29)) + 2392|0); + HEAP32[$nFramesPerPacket30>>2] = 1; + $39 = $channel_state; + $40 = $n; + $arrayidx31 = (($39) + (($40*4260)|0)|0); + $$sink8 = 2;$arrayidx31$sink = $arrayidx31; + break; + } + $41 = $decControl$addr; + $payloadSize_ms34 = ((($41)) + 16|0); + $42 = HEAP32[$payloadSize_ms34>>2]|0; + $cmp35 = ($42|0)==(20); + if ($cmp35) { + $43 = $channel_state; + $44 = $n; + $arrayidx37 = (($43) + (($44*4260)|0)|0); + $nFramesPerPacket38 = ((($arrayidx37)) + 2392|0); + HEAP32[$nFramesPerPacket38>>2] = 1; + $45 = $channel_state; + $46 = $n; + $arrayidx39 = (($45) + (($46*4260)|0)|0); + $$sink8 = 4;$arrayidx31$sink = $arrayidx39; + break; + } + $47 = $decControl$addr; + $payloadSize_ms42 = ((($47)) + 16|0); + $48 = HEAP32[$payloadSize_ms42>>2]|0; + $cmp43 = ($48|0)==(40); + if ($cmp43) { + $49 = $channel_state; + $50 = $n; + $arrayidx45 = (($49) + (($50*4260)|0)|0); + $nFramesPerPacket46 = ((($arrayidx45)) + 2392|0); + HEAP32[$nFramesPerPacket46>>2] = 2; + $51 = $channel_state; + $52 = $n; + $arrayidx47 = (($51) + (($52*4260)|0)|0); + $$sink8 = 4;$arrayidx31$sink = $arrayidx47; + break; + } + $53 = $decControl$addr; + $payloadSize_ms50 = ((($53)) + 16|0); + $54 = HEAP32[$payloadSize_ms50>>2]|0; + $cmp51 = ($54|0)==(60); + if (!($cmp51)) { + label = 23; + break L16; + } + $55 = $channel_state; + $56 = $n; + $arrayidx53 = (($55) + (($56*4260)|0)|0); + $nFramesPerPacket54 = ((($arrayidx53)) + 2392|0); + HEAP32[$nFramesPerPacket54>>2] = 3; + $57 = $channel_state; + $58 = $n; + $arrayidx55 = (($57) + (($58*4260)|0)|0); + $$sink8 = 4;$arrayidx31$sink = $arrayidx55; + } + } while(0); + $nb_subfr32 = ((($arrayidx31$sink)) + 2324|0); + HEAP32[$nb_subfr32>>2] = $$sink8; + $59 = $decControl$addr; + $internalSampleRate63 = ((($59)) + 12|0); + $60 = HEAP32[$internalSampleRate63>>2]|0; + $shr = $60 >> 10; + $add64 = (($shr) + 1)|0; + $fs_kHz_dec = $add64; + $61 = $fs_kHz_dec; + $cmp65 = ($61|0)!=(8); + $62 = $fs_kHz_dec; + $cmp67 = ($62|0)!=(12); + $or$cond = $cmp65 & $cmp67; + $63 = $fs_kHz_dec; + $cmp69 = ($63|0)!=(16); + $or$cond1 = $or$cond & $cmp69; + if ($or$cond1) { + label = 25; + break; + } + $64 = $channel_state; + $65 = $n; + $arrayidx72 = (($64) + (($65*4260)|0)|0); + $66 = $fs_kHz_dec; + $67 = $decControl$addr; + $API_sampleRate = ((($67)) + 8|0); + $68 = HEAP32[$API_sampleRate>>2]|0; + $call73 = (_silk_decoder_set_fs($arrayidx72,$66,$68)|0); + $69 = $ret; + $add74 = (($69) + ($call73))|0; + $ret = $add74; + $70 = $n; + $inc76 = (($70) + 1)|0; + $n = $inc76; + } + if ((label|0) == 23) { + $retval = -203; + $399 = $retval; + STACKTOP = sp;return ($399|0); + } + else if ((label|0) == 25) { + $retval = -200; + $399 = $retval; + STACKTOP = sp;return ($399|0); + } + } + } while(0); + $71 = $decControl$addr; + $72 = HEAP32[$71>>2]|0; + $cmp79 = ($72|0)==(2); + do { + if ($cmp79) { + $73 = $decControl$addr; + $nChannelsInternal81 = ((($73)) + 4|0); + $74 = HEAP32[$nChannelsInternal81>>2]|0; + $cmp82 = ($74|0)==(2); + if ($cmp82) { + $75 = $psDec; + $nChannelsAPI84 = ((($75)) + 8532|0); + $76 = HEAP32[$nChannelsAPI84>>2]|0; + $cmp85 = ($76|0)==(1); + if (!($cmp85)) { + $77 = $psDec; + $nChannelsInternal86 = ((($77)) + 8536|0); + $78 = HEAP32[$nChannelsInternal86>>2]|0; + $cmp87 = ($78|0)==(1); + if (!($cmp87)) { + break; + } + } + $79 = $psDec; + $sStereo = ((($79)) + 8520|0); + ;HEAP32[$sStereo>>2]=0|0; + $80 = $psDec; + $sStereo90 = ((($80)) + 8520|0); + $sSide = ((($sStereo90)) + 8|0); + ;HEAP32[$sSide>>2]=0|0; + $81 = $channel_state; + $arrayidx92 = ((($81)) + 4260|0); + $resampler_state = ((($arrayidx92)) + 2432|0); + $82 = $channel_state; + $resampler_state94 = ((($82)) + 2432|0); + _memcpy(($resampler_state|0),($resampler_state94|0),300)|0; + } + } + } while(0); + $83 = $decControl$addr; + $84 = HEAP32[$83>>2]|0; + $85 = $psDec; + $nChannelsAPI97 = ((($85)) + 8532|0); + HEAP32[$nChannelsAPI97>>2] = $84; + $86 = $decControl$addr; + $nChannelsInternal98 = ((($86)) + 4|0); + $87 = HEAP32[$nChannelsInternal98>>2]|0; + $88 = $psDec; + $nChannelsInternal99 = ((($88)) + 8536|0); + HEAP32[$nChannelsInternal99>>2] = $87; + $89 = $decControl$addr; + $API_sampleRate100 = ((($89)) + 8|0); + $90 = HEAP32[$API_sampleRate100>>2]|0; + $cmp101 = ($90|0)>(48000); + if (!($cmp101)) { + $91 = $decControl$addr; + $API_sampleRate103 = ((($91)) + 8|0); + $92 = HEAP32[$API_sampleRate103>>2]|0; + $cmp104 = ($92|0)<(8000); + if (!($cmp104)) { + $94 = $lostFlag$addr; + $cmp107 = ($94|0)!=(1); + L50: do { + if ($cmp107) { + $95 = $channel_state; + $nFramesDecoded110 = ((($95)) + 2388|0); + $96 = HEAP32[$nFramesDecoded110>>2]|0; + $cmp111 = ($96|0)==(0); + if ($cmp111) { + $n = 0; + while(1) { + $97 = $n; + $98 = $decControl$addr; + $nChannelsInternal114 = ((($98)) + 4|0); + $99 = HEAP32[$nChannelsInternal114>>2]|0; + $cmp115 = ($97|0)<($99|0); + if (!($cmp115)) { + break; + } + $i = 0; + while(1) { + $100 = $i; + $101 = $channel_state; + $102 = $n; + $arrayidx118 = (($101) + (($102*4260)|0)|0); + $nFramesPerPacket119 = ((($arrayidx118)) + 2392|0); + $103 = HEAP32[$nFramesPerPacket119>>2]|0; + $cmp120 = ($100|0)<($103|0); + $104 = $psRangeDec$addr; + $call122 = (_ec_dec_bit_logp($104,1)|0); + $105 = $channel_state; + $106 = $n; + $arrayidx123 = (($105) + (($106*4260)|0)|0); + if (!($cmp120)) { + break; + } + $VAD_flags = ((($arrayidx123)) + 2404|0); + $107 = $i; + $arrayidx124 = (($VAD_flags) + ($107<<2)|0); + HEAP32[$arrayidx124>>2] = $call122; + $108 = $i; + $inc126 = (($108) + 1)|0; + $i = $inc126; + } + $LBRR_flag = ((($arrayidx123)) + 2416|0); + HEAP32[$LBRR_flag>>2] = $call122; + $109 = $n; + $inc131 = (($109) + 1)|0; + $n = $inc131; + } + $n = 0; + while(1) { + $110 = $n; + $111 = $decControl$addr; + $nChannelsInternal134 = ((($111)) + 4|0); + $112 = HEAP32[$nChannelsInternal134>>2]|0; + $cmp135 = ($110|0)<($112|0); + if (!($cmp135)) { + break; + } + $113 = $channel_state; + $114 = $n; + $arrayidx137 = (($113) + (($114*4260)|0)|0); + $LBRR_flags = ((($arrayidx137)) + 2420|0); + ;HEAP32[$LBRR_flags>>2]=0|0;HEAP32[$LBRR_flags+4>>2]=0|0;HEAP32[$LBRR_flags+8>>2]=0|0; + $115 = $channel_state; + $116 = $n; + $arrayidx139 = (($115) + (($116*4260)|0)|0); + $LBRR_flag140 = ((($arrayidx139)) + 2416|0); + $117 = HEAP32[$LBRR_flag140>>2]|0; + $tobool141 = ($117|0)!=(0); + L64: do { + if ($tobool141) { + $118 = $channel_state; + $119 = $n; + $arrayidx143 = (($118) + (($119*4260)|0)|0); + $nFramesPerPacket144 = ((($arrayidx143)) + 2392|0); + $120 = HEAP32[$nFramesPerPacket144>>2]|0; + $cmp145 = ($120|0)==(1); + if ($cmp145) { + $121 = $channel_state; + $122 = $n; + $arrayidx147 = (($121) + (($122*4260)|0)|0); + $LBRR_flags148 = ((($arrayidx147)) + 2420|0); + HEAP32[$LBRR_flags148>>2] = 1; + break; + } + $123 = $psRangeDec$addr; + $124 = $channel_state; + $125 = $n; + $arrayidx151 = (($124) + (($125*4260)|0)|0); + $nFramesPerPacket152 = ((($arrayidx151)) + 2392|0); + $126 = HEAP32[$nFramesPerPacket152>>2]|0; + $sub = (($126) - 2)|0; + $arrayidx153 = (12220 + ($sub<<2)|0); + $127 = HEAP32[$arrayidx153>>2]|0; + $call154 = (_ec_dec_icdf($123,$127,8)|0); + $add155 = (($call154) + 1)|0; + $LBRR_symbol = $add155; + $i = 0; + while(1) { + $128 = $i; + $129 = $channel_state; + $130 = $n; + $arrayidx157 = (($129) + (($130*4260)|0)|0); + $nFramesPerPacket158 = ((($arrayidx157)) + 2392|0); + $131 = HEAP32[$nFramesPerPacket158>>2]|0; + $cmp159 = ($128|0)<($131|0); + if (!($cmp159)) { + break L64; + } + $132 = $LBRR_symbol; + $133 = $i; + $shr161 = $132 >> $133; + $and = $shr161 & 1; + $134 = $channel_state; + $135 = $n; + $arrayidx162 = (($134) + (($135*4260)|0)|0); + $LBRR_flags163 = ((($arrayidx162)) + 2420|0); + $136 = $i; + $arrayidx164 = (($LBRR_flags163) + ($136<<2)|0); + HEAP32[$arrayidx164>>2] = $and; + $137 = $i; + $inc166 = (($137) + 1)|0; + $i = $inc166; + } + } + } while(0); + $138 = $n; + $inc171 = (($138) + 1)|0; + $n = $inc171; + } + $139 = $lostFlag$addr; + $cmp173 = ($139|0)==(0); + if ($cmp173) { + $i = 0; + while(1) { + $140 = $i; + $141 = $channel_state; + $nFramesPerPacket177 = ((($141)) + 2392|0); + $142 = HEAP32[$nFramesPerPacket177>>2]|0; + $cmp178 = ($140|0)<($142|0); + if (!($cmp178)) { + break L50; + } + $n = 0; + while(1) { + $143 = $n; + $144 = $decControl$addr; + $nChannelsInternal181 = ((($144)) + 4|0); + $145 = HEAP32[$nChannelsInternal181>>2]|0; + $cmp182 = ($143|0)<($145|0); + if (!($cmp182)) { + break; + } + $146 = $channel_state; + $147 = $n; + $arrayidx184 = (($146) + (($147*4260)|0)|0); + $LBRR_flags185 = ((($arrayidx184)) + 2420|0); + $148 = $i; + $arrayidx186 = (($LBRR_flags185) + ($148<<2)|0); + $149 = HEAP32[$arrayidx186>>2]|0; + $tobool187 = ($149|0)!=(0); + if ($tobool187) { + $150 = $decControl$addr; + $nChannelsInternal189 = ((($150)) + 4|0); + $151 = HEAP32[$nChannelsInternal189>>2]|0; + $cmp190 = ($151|0)==(2); + $152 = $n; + $cmp192 = ($152|0)==(0); + $or$cond2 = $cmp190 & $cmp192; + do { + if ($or$cond2) { + $153 = $psRangeDec$addr; + _silk_stereo_decode_pred($153,$MS_pred_Q13); + $154 = $channel_state; + $arrayidx195 = ((($154)) + 4260|0); + $LBRR_flags196 = ((($arrayidx195)) + 2420|0); + $155 = $i; + $arrayidx197 = (($LBRR_flags196) + ($155<<2)|0); + $156 = HEAP32[$arrayidx197>>2]|0; + $cmp198 = ($156|0)==(0); + if (!($cmp198)) { + break; + } + $157 = $psRangeDec$addr; + _silk_stereo_decode_mid_only($157,$decode_only_middle); + } + } while(0); + $158 = $i; + $cmp202 = ($158|0)>(0); + do { + if ($cmp202) { + $159 = $channel_state; + $160 = $n; + $arrayidx204 = (($159) + (($160*4260)|0)|0); + $LBRR_flags205 = ((($arrayidx204)) + 2420|0); + $161 = $i; + $sub206 = (($161) - 1)|0; + $arrayidx207 = (($LBRR_flags205) + ($sub206<<2)|0); + $162 = HEAP32[$arrayidx207>>2]|0; + $tobool208 = ($162|0)!=(0); + if (!($tobool208)) { + label = 64; + break; + } + $condCoding = 2; + } else { + label = 64; + } + } while(0); + if ((label|0) == 64) { + label = 0; + $condCoding = 0; + } + $163 = $channel_state; + $164 = $n; + $arrayidx212 = (($163) + (($164*4260)|0)|0); + $165 = $psRangeDec$addr; + $166 = $i; + $167 = $condCoding; + _silk_decode_indices($arrayidx212,$165,$166,1,$167); + $168 = $psRangeDec$addr; + $169 = $channel_state; + $170 = $n; + $arrayidx214 = (($169) + (($170*4260)|0)|0); + $indices = ((($arrayidx214)) + 2736|0); + $signalType = ((($indices)) + 29|0); + $171 = HEAP8[$signalType>>0]|0; + $conv = $171 << 24 >> 24; + $172 = $channel_state; + $173 = $n; + $arrayidx215 = (($172) + (($173*4260)|0)|0); + $indices216 = ((($arrayidx215)) + 2736|0); + $quantOffsetType = ((($indices216)) + 30|0); + $174 = HEAP8[$quantOffsetType>>0]|0; + $conv217 = $174 << 24 >> 24; + $175 = $channel_state; + $176 = $n; + $arrayidx218 = (($175) + (($176*4260)|0)|0); + $frame_length = ((($arrayidx218)) + 2328|0); + $177 = HEAP32[$frame_length>>2]|0; + _silk_decode_pulses($168,$pulses,$conv,$conv217,$177); + } + $178 = $n; + $inc221 = (($178) + 1)|0; + $n = $inc221; + } + $179 = $i; + $inc224 = (($179) + 1)|0; + $i = $inc224; + } + } + } + } + } while(0); + $180 = $decControl$addr; + $nChannelsInternal228 = ((($180)) + 4|0); + $181 = HEAP32[$nChannelsInternal228>>2]|0; + $cmp229 = ($181|0)==(2); + L96: do { + if ($cmp229) { + $182 = $lostFlag$addr; + $cmp232 = ($182|0)==(0); + do { + if (!($cmp232)) { + $183 = $lostFlag$addr; + $cmp235 = ($183|0)==(2); + if ($cmp235) { + $184 = $channel_state; + $LBRR_flags239 = ((($184)) + 2420|0); + $185 = $channel_state; + $nFramesDecoded241 = ((($185)) + 2388|0); + $186 = HEAP32[$nFramesDecoded241>>2]|0; + $arrayidx242 = (($LBRR_flags239) + ($186<<2)|0); + $187 = HEAP32[$arrayidx242>>2]|0; + $cmp243 = ($187|0)==(1); + if ($cmp243) { + break; + } + } + $n = 0; + while(1) { + $200 = $n; + $cmp273 = ($200|0)<(2); + if (!($cmp273)) { + break L96; + } + $201 = $psDec; + $sStereo276 = ((($201)) + 8520|0); + $202 = $n; + $arrayidx278 = (($sStereo276) + ($202<<1)|0); + $203 = HEAP16[$arrayidx278>>1]|0; + $conv279 = $203 << 16 >> 16; + $204 = $n; + $arrayidx280 = (($MS_pred_Q13) + ($204<<2)|0); + HEAP32[$arrayidx280>>2] = $conv279; + $205 = $n; + $inc282 = (($205) + 1)|0; + $n = $inc282; + } + } + } while(0); + $188 = $psRangeDec$addr; + _silk_stereo_decode_pred($188,$MS_pred_Q13); + $189 = $lostFlag$addr; + $cmp247 = ($189|0)==(0); + if ($cmp247) { + $190 = $channel_state; + $arrayidx250 = ((($190)) + 4260|0); + $VAD_flags251 = ((($arrayidx250)) + 2404|0); + $191 = $channel_state; + $nFramesDecoded253 = ((($191)) + 2388|0); + $192 = HEAP32[$nFramesDecoded253>>2]|0; + $arrayidx254 = (($VAD_flags251) + ($192<<2)|0); + $193 = HEAP32[$arrayidx254>>2]|0; + $cmp255 = ($193|0)==(0); + if (!($cmp255)) { + label = 74; + } + } else { + label = 74; + } + do { + if ((label|0) == 74) { + $194 = $lostFlag$addr; + $cmp258 = ($194|0)==(2); + if ($cmp258) { + $195 = $channel_state; + $arrayidx261 = ((($195)) + 4260|0); + $LBRR_flags262 = ((($arrayidx261)) + 2420|0); + $196 = $channel_state; + $nFramesDecoded264 = ((($196)) + 2388|0); + $197 = HEAP32[$nFramesDecoded264>>2]|0; + $arrayidx265 = (($LBRR_flags262) + ($197<<2)|0); + $198 = HEAP32[$arrayidx265>>2]|0; + $cmp266 = ($198|0)==(0); + if ($cmp266) { + break; + } + } + HEAP32[$decode_only_middle>>2] = 0; + break L96; + } + } while(0); + $199 = $psRangeDec$addr; + _silk_stereo_decode_mid_only($199,$decode_only_middle); + } + } while(0); + $206 = $decControl$addr; + $nChannelsInternal286 = ((($206)) + 4|0); + $207 = HEAP32[$nChannelsInternal286>>2]|0; + $cmp287 = ($207|0)==(2); + $208 = HEAP32[$decode_only_middle>>2]|0; + $cmp290 = ($208|0)==(0); + $or$cond3 = $cmp287 & $cmp290; + if ($or$cond3) { + $209 = $psDec; + $prev_decode_only_middle = ((($209)) + 8540|0); + $210 = HEAP32[$prev_decode_only_middle>>2]|0; + $cmp293 = ($210|0)==(1); + if ($cmp293) { + $211 = $psDec; + $arrayidx297 = ((($211)) + 4260|0); + $outBuf = ((($arrayidx297)) + 1348|0); + _memset(($outBuf|0),0,960)|0; + $212 = $psDec; + $arrayidx300 = ((($212)) + 4260|0); + $sLPC_Q14_buf = ((($arrayidx300)) + 1284|0); + dest=$sLPC_Q14_buf; stop=dest+64|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + $213 = $psDec; + $arrayidx303 = ((($213)) + 4260|0); + $lagPrev = ((($arrayidx303)) + 2308|0); + HEAP32[$lagPrev>>2] = 100; + $214 = $psDec; + $arrayidx305 = ((($214)) + 4260|0); + $LastGainIndex = ((($arrayidx305)) + 2312|0); + HEAP8[$LastGainIndex>>0] = 10; + $215 = $psDec; + $arrayidx307 = ((($215)) + 4260|0); + $prevSignalType = ((($arrayidx307)) + 4164|0); + HEAP32[$prevSignalType>>2] = 0; + $216 = $psDec; + $arrayidx309 = ((($216)) + 4260|0); + $first_frame_after_reset = ((($arrayidx309)) + 2376|0); + HEAP32[$first_frame_after_reset>>2] = 1; + } + } + $217 = $decControl$addr; + $internalSampleRate311 = ((($217)) + 12|0); + $218 = HEAP32[$internalSampleRate311>>2]|0; + $219 = $decControl$addr; + $nChannelsInternal312 = ((($219)) + 4|0); + $220 = HEAP32[$nChannelsInternal312>>2]|0; + $mul313 = Math_imul($218, $220)|0; + $221 = $decControl$addr; + $API_sampleRate314 = ((($221)) + 8|0); + $222 = HEAP32[$API_sampleRate314>>2]|0; + $223 = $decControl$addr; + $224 = HEAP32[$223>>2]|0; + $mul316 = Math_imul($222, $224)|0; + $cmp317 = ($mul313|0)<($mul316|0); + $conv318 = $cmp317&1; + $delay_stack_alloc = $conv318; + $225 = $delay_stack_alloc; + $tobool319 = ($225|0)!=(0); + if ($tobool319) { + $cond = 1; + } else { + $226 = $decControl$addr; + $nChannelsInternal320 = ((($226)) + 4|0); + $227 = HEAP32[$nChannelsInternal320>>2]|0; + $228 = $channel_state; + $frame_length322 = ((($228)) + 2328|0); + $229 = HEAP32[$frame_length322>>2]|0; + $add323 = (($229) + 2)|0; + $mul324 = Math_imul($227, $add323)|0; + $cond = $mul324; + } + $230 = (_llvm_stacksave()|0); + $saved_stack = $230; + $vla$alloca_mul = $cond<<1; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $231 = $delay_stack_alloc; + $tobool325 = ($231|0)!=(0); + if ($tobool325) { + $232 = $samplesOut$addr; + HEAP32[$samplesOut1_tmp>>2] = $232; + $233 = $samplesOut$addr; + $234 = $channel_state; + $$sink = $234;$vla$sink = $233; + } else { + HEAP32[$samplesOut1_tmp>>2] = $vla; + $235 = $channel_state; + $$sink = $235;$vla$sink = $vla; + } + $frame_length335 = ((($$sink)) + 2328|0); + $236 = HEAP32[$frame_length335>>2]|0; + $add$ptr336 = (($vla$sink) + ($236<<1)|0); + $add$ptr337 = ((($add$ptr336)) + 4|0); + $arrayidx338 = ((($samplesOut1_tmp)) + 4|0); + HEAP32[$arrayidx338>>2] = $add$ptr337; + $237 = $lostFlag$addr; + $cmp340 = ($237|0)==(0); + if ($cmp340) { + $238 = HEAP32[$decode_only_middle>>2]|0; + $tobool343 = ($238|0)!=(0); + $lnot = $tobool343 ^ 1; + $lnot$ext = $lnot&1; + $has_side = $lnot$ext; + } else { + $239 = $psDec; + $prev_decode_only_middle345 = ((($239)) + 8540|0); + $240 = HEAP32[$prev_decode_only_middle345>>2]|0; + $tobool346 = ($240|0)!=(0); + if ($tobool346) { + $241 = $decControl$addr; + $nChannelsInternal347 = ((($241)) + 4|0); + $242 = HEAP32[$nChannelsInternal347>>2]|0; + $cmp348 = ($242|0)==(2); + $243 = $lostFlag$addr; + $cmp351 = ($243|0)==(2); + $or$cond4 = $cmp348 & $cmp351; + if ($or$cond4) { + $244 = $channel_state; + $arrayidx354 = ((($244)) + 4260|0); + $LBRR_flags355 = ((($arrayidx354)) + 2420|0); + $245 = $channel_state; + $arrayidx356 = ((($245)) + 4260|0); + $nFramesDecoded357 = ((($arrayidx356)) + 2388|0); + $246 = HEAP32[$nFramesDecoded357>>2]|0; + $arrayidx358 = (($LBRR_flags355) + ($246<<2)|0); + $247 = HEAP32[$arrayidx358>>2]|0; + $cmp359 = ($247|0)==(1); + $248 = $cmp359; + } else { + $248 = 0; + } + } else { + $248 = 1; + } + $lor$ext = $248&1; + $has_side = $lor$ext; + } + $n = 0; + while(1) { + $249 = $n; + $250 = $decControl$addr; + $nChannelsInternal365 = ((($250)) + 4|0); + $251 = HEAP32[$nChannelsInternal365>>2]|0; + $cmp366 = ($249|0)<($251|0); + if (!($cmp366)) { + break; + } + $252 = $n; + $cmp369 = ($252|0)==(0); + $253 = $has_side; + $tobool372 = ($253|0)!=(0); + $or$cond5 = $cmp369 | $tobool372; + if ($or$cond5) { + $254 = $channel_state; + $nFramesDecoded376 = ((($254)) + 2388|0); + $255 = HEAP32[$nFramesDecoded376>>2]|0; + $256 = $n; + $sub377 = (($255) - ($256))|0; + $FrameIndex = $sub377; + $257 = $FrameIndex; + $cmp378 = ($257|0)<=(0); + L140: do { + if ($cmp378) { + $condCoding374 = 0; + } else { + $258 = $lostFlag$addr; + $cmp382 = ($258|0)==(2); + if ($cmp382) { + $259 = $channel_state; + $260 = $n; + $arrayidx385 = (($259) + (($260*4260)|0)|0); + $LBRR_flags386 = ((($arrayidx385)) + 2420|0); + $261 = $FrameIndex; + $sub387 = (($261) - 1)|0; + $arrayidx388 = (($LBRR_flags386) + ($sub387<<2)|0); + $262 = HEAP32[$arrayidx388>>2]|0; + $tobool389 = ($262|0)!=(0); + $cond390 = $tobool389 ? 2 : 0; + $condCoding374 = $cond390; + break; + } + $263 = $n; + $cmp392 = ($263|0)>(0); + do { + if ($cmp392) { + $264 = $psDec; + $prev_decode_only_middle395 = ((($264)) + 8540|0); + $265 = HEAP32[$prev_decode_only_middle395>>2]|0; + $tobool396 = ($265|0)!=(0); + if (!($tobool396)) { + break; + } + $condCoding374 = 1; + break L140; + } + } while(0); + $condCoding374 = 2; + } + } while(0); + $266 = $channel_state; + $267 = $n; + $arrayidx402 = (($266) + (($267*4260)|0)|0); + $268 = $psRangeDec$addr; + $269 = $n; + $arrayidx403 = (($samplesOut1_tmp) + ($269<<2)|0); + $270 = HEAP32[$arrayidx403>>2]|0; + $arrayidx404 = ((($270)) + 4|0); + $271 = $lostFlag$addr; + $272 = $condCoding374; + $273 = $arch$addr; + $call405 = (_silk_decode_frame($arrayidx402,$268,$arrayidx404,$nSamplesOutDec,$271,$272,$273)|0); + $274 = $ret; + $add406 = (($274) + ($call405))|0; + $ret = $add406; + } else { + $275 = $n; + $arrayidx408 = (($samplesOut1_tmp) + ($275<<2)|0); + $276 = HEAP32[$arrayidx408>>2]|0; + $arrayidx409 = ((($276)) + 4|0); + $277 = HEAP32[$nSamplesOutDec>>2]|0; + $mul410 = $277<<1; + _memset(($arrayidx409|0),0,($mul410|0))|0; + } + $278 = $channel_state; + $279 = $n; + $arrayidx412 = (($278) + (($279*4260)|0)|0); + $nFramesDecoded413 = ((($arrayidx412)) + 2388|0); + $280 = HEAP32[$nFramesDecoded413>>2]|0; + $inc414 = (($280) + 1)|0; + HEAP32[$nFramesDecoded413>>2] = $inc414; + $281 = $n; + $inc416 = (($281) + 1)|0; + $n = $inc416; + } + $282 = $decControl$addr; + $283 = HEAP32[$282>>2]|0; + $cmp419 = ($283|0)==(2); + if ($cmp419) { + $284 = $decControl$addr; + $nChannelsInternal422 = ((($284)) + 4|0); + $285 = HEAP32[$nChannelsInternal422>>2]|0; + $cmp423 = ($285|0)==(2); + if ($cmp423) { + $286 = $psDec; + $sStereo426 = ((($286)) + 8520|0); + $287 = HEAP32[$samplesOut1_tmp>>2]|0; + $arrayidx428 = ((($samplesOut1_tmp)) + 4|0); + $288 = HEAP32[$arrayidx428>>2]|0; + $289 = $channel_state; + $fs_kHz431 = ((($289)) + 2316|0); + $290 = HEAP32[$fs_kHz431>>2]|0; + $291 = HEAP32[$nSamplesOutDec>>2]|0; + _silk_stereo_MS_to_LR($sStereo426,$287,$288,$MS_pred_Q13,$290,$291); + } else { + label = 112; + } + } else { + label = 112; + } + if ((label|0) == 112) { + $292 = HEAP32[$samplesOut1_tmp>>2]|0; + $293 = $psDec; + $sStereo434 = ((($293)) + 8520|0); + $sMid = ((($sStereo434)) + 4|0); + ;HEAP16[$292>>1]=HEAP16[$sMid>>1]|0;HEAP16[$292+2>>1]=HEAP16[$sMid+2>>1]|0; + $294 = $psDec; + $sStereo436 = ((($294)) + 8520|0); + $sMid437 = ((($sStereo436)) + 4|0); + $295 = HEAP32[$samplesOut1_tmp>>2]|0; + $296 = HEAP32[$nSamplesOutDec>>2]|0; + $arrayidx440 = (($295) + ($296<<1)|0); + ;HEAP16[$sMid437>>1]=HEAP16[$arrayidx440>>1]|0;HEAP16[$sMid437+2>>1]=HEAP16[$arrayidx440+2>>1]|0; + } + $297 = HEAP32[$nSamplesOutDec>>2]|0; + $298 = $decControl$addr; + $API_sampleRate442 = ((($298)) + 8|0); + $299 = HEAP32[$API_sampleRate442>>2]|0; + $mul443 = Math_imul($297, $299)|0; + $300 = $channel_state; + $fs_kHz445 = ((($300)) + 2316|0); + $301 = HEAP32[$fs_kHz445>>2]|0; + $conv446 = $301&65535; + $conv447 = $conv446 << 16 >> 16; + $mul448 = ($conv447*1000)|0; + $div = (($mul443|0) / ($mul448|0))&-1; + $302 = $nSamplesOut$addr; + HEAP32[$302>>2] = $div; + $303 = $decControl$addr; + $304 = HEAP32[$303>>2]|0; + $cmp450 = ($304|0)==(2); + if ($cmp450) { + $305 = $nSamplesOut$addr; + $306 = HEAP32[$305>>2]|0; + $cond455 = $306; + } else { + $cond455 = 1; + } + $vla456$alloca_mul = $cond455<<1; + $vla456 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla456$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla456$alloca_mul)|0)+15)&-16)|0);; + $307 = $decControl$addr; + $308 = HEAP32[$307>>2]|0; + $cmp458 = ($308|0)==(2); + if ($cmp458) { + $resample_out_ptr = $vla456; + } else { + $309 = $samplesOut$addr; + $resample_out_ptr = $309; + } + $310 = $delay_stack_alloc; + $tobool463 = ($310|0)!=(0); + if ($tobool463) { + $311 = $decControl$addr; + $nChannelsInternal465 = ((($311)) + 4|0); + $312 = HEAP32[$nChannelsInternal465>>2]|0; + $313 = $channel_state; + $frame_length467 = ((($313)) + 2328|0); + $314 = HEAP32[$frame_length467>>2]|0; + $add468 = (($314) + 2)|0; + $mul469 = Math_imul($312, $add468)|0; + $cond472 = $mul469; + } else { + $cond472 = 1; + } + $vla473$alloca_mul = $cond472<<1; + $vla473 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla473$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla473$alloca_mul)|0)+15)&-16)|0);; + $315 = $delay_stack_alloc; + $tobool474 = ($315|0)!=(0); + if ($tobool474) { + $316 = $samplesOut$addr; + $317 = $decControl$addr; + $nChannelsInternal476 = ((($317)) + 4|0); + $318 = HEAP32[$nChannelsInternal476>>2]|0; + $319 = $channel_state; + $frame_length478 = ((($319)) + 2328|0); + $320 = HEAP32[$frame_length478>>2]|0; + $add479 = (($320) + 2)|0; + $mul480 = Math_imul($318, $add479)|0; + $mul481 = $mul480<<1; + $321 = $samplesOut$addr; + $sub$ptr$lhs$cast = $vla473; + $sub$ptr$rhs$cast = $321; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 2)&-1; + $mul482 = 0; + $add483 = (($mul481) + ($mul482))|0; + _memcpy(($vla473|0),($316|0),($add483|0))|0; + HEAP32[$samplesOut1_tmp>>2] = $vla473; + $322 = $channel_state; + $frame_length486 = ((($322)) + 2328|0); + $323 = HEAP32[$frame_length486>>2]|0; + $add$ptr487 = (($vla473) + ($323<<1)|0); + $add$ptr488 = ((($add$ptr487)) + 4|0); + $arrayidx489 = ((($samplesOut1_tmp)) + 4|0); + HEAP32[$arrayidx489>>2] = $add$ptr488; + } + $n = 0; + while(1) { + $324 = $n; + $325 = $decControl$addr; + $326 = HEAP32[$325>>2]|0; + $327 = $decControl$addr; + $nChannelsInternal493 = ((($327)) + 4|0); + $328 = HEAP32[$nChannelsInternal493>>2]|0; + $cmp494 = ($326|0)<($328|0); + $329 = $decControl$addr; + $nChannelsInternal499 = ((($329)) + 4|0); + $nChannelsInternal499$sink = $cmp494 ? $329 : $nChannelsInternal499; + $330 = HEAP32[$nChannelsInternal499$sink>>2]|0; + $cmp502 = ($324|0)<($330|0); + if (!($cmp502)) { + break; + } + $331 = $channel_state; + $332 = $n; + $arrayidx505 = (($331) + (($332*4260)|0)|0); + $resampler_state506 = ((($arrayidx505)) + 2432|0); + $333 = $resample_out_ptr; + $334 = $n; + $arrayidx507 = (($samplesOut1_tmp) + ($334<<2)|0); + $335 = HEAP32[$arrayidx507>>2]|0; + $arrayidx508 = ((($335)) + 2|0); + $336 = HEAP32[$nSamplesOutDec>>2]|0; + $call509 = (_silk_resampler($resampler_state506,$333,$arrayidx508,$336)|0); + $337 = $ret; + $add510 = (($337) + ($call509))|0; + $ret = $add510; + $338 = $decControl$addr; + $339 = HEAP32[$338>>2]|0; + $cmp512 = ($339|0)==(2); + L176: do { + if ($cmp512) { + $i = 0; + while(1) { + $340 = $i; + $341 = $nSamplesOut$addr; + $342 = HEAP32[$341>>2]|0; + $cmp516 = ($340|0)<($342|0); + if (!($cmp516)) { + break L176; + } + $343 = $resample_out_ptr; + $344 = $i; + $arrayidx519 = (($343) + ($344<<1)|0); + $345 = HEAP16[$arrayidx519>>1]|0; + $346 = $samplesOut$addr; + $347 = $n; + $348 = $i; + $mul520 = $348<<1; + $add521 = (($347) + ($mul520))|0; + $arrayidx522 = (($346) + ($add521<<1)|0); + HEAP16[$arrayidx522>>1] = $345; + $349 = $i; + $inc524 = (($349) + 1)|0; + $i = $inc524; + } + } + } while(0); + $350 = $n; + $inc528 = (($350) + 1)|0; + $n = $inc528; + } + $351 = $decControl$addr; + $352 = HEAP32[$351>>2]|0; + $cmp531 = ($352|0)==(2); + L183: do { + if ($cmp531) { + $353 = $decControl$addr; + $nChannelsInternal534 = ((($353)) + 4|0); + $354 = HEAP32[$nChannelsInternal534>>2]|0; + $cmp535 = ($354|0)==(1); + if (!($cmp535)) { + break; + } + $355 = $stereo_to_mono; + $tobool538 = ($355|0)!=(0); + if ($tobool538) { + $356 = $channel_state; + $arrayidx540 = ((($356)) + 4260|0); + $resampler_state541 = ((($arrayidx540)) + 2432|0); + $357 = $resample_out_ptr; + $358 = HEAP32[$samplesOut1_tmp>>2]|0; + $arrayidx543 = ((($358)) + 2|0); + $359 = HEAP32[$nSamplesOutDec>>2]|0; + $call544 = (_silk_resampler($resampler_state541,$357,$arrayidx543,$359)|0); + $360 = $ret; + $add545 = (($360) + ($call544))|0; + $ret = $add545; + $i = 0; + while(1) { + $361 = $i; + $362 = $nSamplesOut$addr; + $363 = HEAP32[$362>>2]|0; + $cmp547 = ($361|0)<($363|0); + if (!($cmp547)) { + break L183; + } + $364 = $resample_out_ptr; + $365 = $i; + $arrayidx550 = (($364) + ($365<<1)|0); + $366 = HEAP16[$arrayidx550>>1]|0; + $367 = $samplesOut$addr; + $368 = $i; + $mul551 = $368<<1; + $add552 = (1 + ($mul551))|0; + $arrayidx553 = (($367) + ($add552<<1)|0); + HEAP16[$arrayidx553>>1] = $366; + $369 = $i; + $inc555 = (($369) + 1)|0; + $i = $inc555; + } + } else { + $i = 0; + while(1) { + $370 = $i; + $371 = $nSamplesOut$addr; + $372 = HEAP32[$371>>2]|0; + $cmp559 = ($370|0)<($372|0); + if (!($cmp559)) { + break L183; + } + $373 = $samplesOut$addr; + $374 = $i; + $mul562 = $374<<1; + $add563 = (0 + ($mul562))|0; + $arrayidx564 = (($373) + ($add563<<1)|0); + $375 = HEAP16[$arrayidx564>>1]|0; + $376 = $samplesOut$addr; + $377 = $i; + $mul565 = $377<<1; + $add566 = (1 + ($mul565))|0; + $arrayidx567 = (($376) + ($add566<<1)|0); + HEAP16[$arrayidx567>>1] = $375; + $378 = $i; + $inc569 = (($378) + 1)|0; + $i = $inc569; + } + } + } + } while(0); + $379 = $channel_state; + $prevSignalType574 = ((($379)) + 4164|0); + $380 = HEAP32[$prevSignalType574>>2]|0; + $cmp575 = ($380|0)==(2); + if ($cmp575) { + ;HEAP32[$mult_tab>>2]=HEAP32[12184>>2]|0;HEAP32[$mult_tab+4>>2]=HEAP32[12184+4>>2]|0;HEAP32[$mult_tab+8>>2]=HEAP32[12184+8>>2]|0; + $381 = $channel_state; + $lagPrev579 = ((($381)) + 2308|0); + $382 = HEAP32[$lagPrev579>>2]|0; + $383 = $channel_state; + $fs_kHz581 = ((($383)) + 2316|0); + $384 = HEAP32[$fs_kHz581>>2]|0; + $sub582 = (($384) - 8)|0; + $shr583 = $sub582 >> 2; + $arrayidx584 = (($mult_tab) + ($shr583<<2)|0); + $385 = HEAP32[$arrayidx584>>2]|0; + $mul585 = Math_imul($382, $385)|0; + $386 = $decControl$addr; + $$sink6 = $mul585;$$sink7 = $386; + } else { + $387 = $decControl$addr; + $$sink6 = 0;$$sink7 = $387; + } + $prevPitchLag587 = ((($$sink7)) + 20|0); + HEAP32[$prevPitchLag587>>2] = $$sink6; + $388 = $lostFlag$addr; + $cmp589 = ($388|0)==(1); + L200: do { + if ($cmp589) { + $i = 0; + while(1) { + $389 = $i; + $390 = $psDec; + $nChannelsInternal593 = ((($390)) + 8536|0); + $391 = HEAP32[$nChannelsInternal593>>2]|0; + $cmp594 = ($389|0)<($391|0); + if (!($cmp594)) { + break L200; + } + $392 = $psDec; + $393 = $i; + $arrayidx598 = (($392) + (($393*4260)|0)|0); + $LastGainIndex599 = ((($arrayidx598)) + 2312|0); + HEAP8[$LastGainIndex599>>0] = 10; + $394 = $i; + $inc601 = (($394) + 1)|0; + $i = $inc601; + } + } else { + $395 = HEAP32[$decode_only_middle>>2]|0; + $396 = $psDec; + $prev_decode_only_middle604 = ((($396)) + 8540|0); + HEAP32[$prev_decode_only_middle604>>2] = $395; + } + } while(0); + $397 = $ret; + $retval = $397; + $398 = $saved_stack; + _llvm_stackrestore(($398|0)); + $399 = $retval; + STACKTOP = sp;return ($399|0); + } + } + $ret = -200; + $93 = $ret; + $retval = $93; + $399 = $retval; + STACKTOP = sp;return ($399|0); +} +function _silk_Get_Encoder_Size($encSizeBytes) { + $encSizeBytes = $encSizeBytes|0; + var $0 = 0, $1 = 0, $encSizeBytes$addr = 0, $ret = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $encSizeBytes$addr = $encSizeBytes; + $ret = 0; + $0 = $encSizeBytes$addr; + HEAP32[$0>>2] = 24568; + $1 = $ret; + STACKTOP = sp;return ($1|0); +} +function _silk_InitEncoder($encState,$arch,$encStatus) { + $encState = $encState|0; + $arch = $arch|0; + $encStatus = $encStatus|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add2 = 0, $arch$addr = 0, $arrayidx = 0, $call = 0, $call1 = 0, $cmp = 0; + var $encState$addr = 0, $encStatus$addr = 0, $inc = 0, $n = 0, $nChannelsAPI = 0, $nChannelsInternal = 0, $psEnc = 0, $ret = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $encState$addr = $encState; + $arch$addr = $arch; + $encStatus$addr = $encStatus; + $ret = 0; + $0 = $encState$addr; + $psEnc = $0; + $1 = $psEnc; + _memset(($1|0),0,24568)|0; + $n = 0; + while(1) { + $2 = $n; + $cmp = ($2|0)<(2); + $3 = $psEnc; + if (!($cmp)) { + break; + } + $4 = $n; + $arrayidx = (($3) + (($4*12240)|0)|0); + $5 = $arch$addr; + $call = (_silk_init_encoder($arrayidx,$5)|0); + $6 = $ret; + $add = (($6) + ($call))|0; + $ret = $add; + $7 = $n; + $inc = (($7) + 1)|0; + $n = $inc; + } + $nChannelsAPI = ((($3)) + 24544|0); + HEAP32[$nChannelsAPI>>2] = 1; + $8 = $psEnc; + $nChannelsInternal = ((($8)) + 24548|0); + HEAP32[$nChannelsInternal>>2] = 1; + $9 = $encState$addr; + $10 = $encStatus$addr; + $call1 = (_silk_QueryEncoder($9,$10)|0); + $11 = $ret; + $add2 = (($11) + ($call1))|0; + $ret = $add2; + $12 = $ret; + STACKTOP = sp;return ($12|0); +} +function _silk_QueryEncoder($encState,$encStatus) { + $encState = $encState|0; + $encStatus = $encStatus|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $API_fs_Hz = 0, $API_sampleRate = 0, $Complexity = 0, $PacketLoss_perc = 0, $PacketSize_ms = 0, $TargetRate_bps = 0; + var $allowBandwidthSwitch = 0, $allow_bandwidth_switch = 0, $bitRate = 0, $cmp = 0, $cmp38 = 0, $complexity = 0, $conv = 0, $conv29 = 0, $desiredInternalSampleRate = 0, $desiredInternal_fs_Hz = 0, $encState$addr = 0, $encStatus$addr = 0, $fs_kHz = 0, $fs_kHz34 = 0, $inWBmodeWithoutVariableLP = 0, $internalSampleRate = 0, $land$ext = 0, $maxInternalSampleRate = 0, $maxInternal_fs_Hz = 0, $minInternalSampleRate = 0; + var $minInternal_fs_Hz = 0, $mode = 0, $mul = 0, $nChannelsAPI = 0, $nChannelsInternal = 0, $nChannelsInternal3 = 0, $packetLossPercentage = 0, $payloadSize_ms = 0, $psEnc = 0, $ret = 0, $sLP = 0, $state_Fxx = 0, $useCBR = 0, $useCBR26 = 0, $useDTX = 0, $useDTX23 = 0, $useInBandFEC = 0, $useInBandFEC20 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $encState$addr = $encState; + $encStatus$addr = $encStatus; + $ret = 0; + $0 = $encState$addr; + $psEnc = $0; + $1 = $psEnc; + $state_Fxx = $1; + $2 = $psEnc; + $nChannelsAPI = ((($2)) + 24544|0); + $3 = HEAP32[$nChannelsAPI>>2]|0; + $4 = $encStatus$addr; + HEAP32[$4>>2] = $3; + $5 = $psEnc; + $nChannelsInternal = ((($5)) + 24548|0); + $6 = HEAP32[$nChannelsInternal>>2]|0; + $7 = $encStatus$addr; + $nChannelsInternal3 = ((($7)) + 4|0); + HEAP32[$nChannelsInternal3>>2] = $6; + $8 = $state_Fxx; + $API_fs_Hz = ((($8)) + 4580|0); + $9 = HEAP32[$API_fs_Hz>>2]|0; + $10 = $encStatus$addr; + $API_sampleRate = ((($10)) + 8|0); + HEAP32[$API_sampleRate>>2] = $9; + $11 = $state_Fxx; + $maxInternal_fs_Hz = ((($11)) + 4588|0); + $12 = HEAP32[$maxInternal_fs_Hz>>2]|0; + $13 = $encStatus$addr; + $maxInternalSampleRate = ((($13)) + 12|0); + HEAP32[$maxInternalSampleRate>>2] = $12; + $14 = $state_Fxx; + $minInternal_fs_Hz = ((($14)) + 4592|0); + $15 = HEAP32[$minInternal_fs_Hz>>2]|0; + $16 = $encStatus$addr; + $minInternalSampleRate = ((($16)) + 16|0); + HEAP32[$minInternalSampleRate>>2] = $15; + $17 = $state_Fxx; + $desiredInternal_fs_Hz = ((($17)) + 4596|0); + $18 = HEAP32[$desiredInternal_fs_Hz>>2]|0; + $19 = $encStatus$addr; + $desiredInternalSampleRate = ((($19)) + 20|0); + HEAP32[$desiredInternalSampleRate>>2] = $18; + $20 = $state_Fxx; + $PacketSize_ms = ((($20)) + 4636|0); + $21 = HEAP32[$PacketSize_ms>>2]|0; + $22 = $encStatus$addr; + $payloadSize_ms = ((($22)) + 24|0); + HEAP32[$payloadSize_ms>>2] = $21; + $23 = $state_Fxx; + $TargetRate_bps = ((($23)) + 4632|0); + $24 = HEAP32[$TargetRate_bps>>2]|0; + $25 = $encStatus$addr; + $bitRate = ((($25)) + 28|0); + HEAP32[$bitRate>>2] = $24; + $26 = $state_Fxx; + $PacketLoss_perc = ((($26)) + 4640|0); + $27 = HEAP32[$PacketLoss_perc>>2]|0; + $28 = $encStatus$addr; + $packetLossPercentage = ((($28)) + 32|0); + HEAP32[$packetLossPercentage>>2] = $27; + $29 = $state_Fxx; + $Complexity = ((($29)) + 4648|0); + $30 = HEAP32[$Complexity>>2]|0; + $31 = $encStatus$addr; + $complexity = ((($31)) + 36|0); + HEAP32[$complexity>>2] = $30; + $32 = $state_Fxx; + $useInBandFEC = ((($32)) + 6120|0); + $33 = HEAP32[$useInBandFEC>>2]|0; + $34 = $encStatus$addr; + $useInBandFEC20 = ((($34)) + 40|0); + HEAP32[$useInBandFEC20>>2] = $33; + $35 = $state_Fxx; + $useDTX = ((($35)) + 6108|0); + $36 = HEAP32[$useDTX>>2]|0; + $37 = $encStatus$addr; + $useDTX23 = ((($37)) + 44|0); + HEAP32[$useDTX23>>2] = $36; + $38 = $state_Fxx; + $useCBR = ((($38)) + 4708|0); + $39 = HEAP32[$useCBR>>2]|0; + $40 = $encStatus$addr; + $useCBR26 = ((($40)) + 48|0); + HEAP32[$useCBR26>>2] = $39; + $41 = $state_Fxx; + $fs_kHz = ((($41)) + 4600|0); + $42 = HEAP32[$fs_kHz>>2]|0; + $conv = $42&65535; + $conv29 = $conv << 16 >> 16; + $mul = ($conv29*1000)|0; + $43 = $encStatus$addr; + $internalSampleRate = ((($43)) + 68|0); + HEAP32[$internalSampleRate>>2] = $mul; + $44 = $state_Fxx; + $allow_bandwidth_switch = ((($44)) + 4560|0); + $45 = HEAP32[$allow_bandwidth_switch>>2]|0; + $46 = $encStatus$addr; + $allowBandwidthSwitch = ((($46)) + 72|0); + HEAP32[$allowBandwidthSwitch>>2] = $45; + $47 = $state_Fxx; + $fs_kHz34 = ((($47)) + 4600|0); + $48 = HEAP32[$fs_kHz34>>2]|0; + $cmp = ($48|0)==(16); + if (!($cmp)) { + $51 = 0; + $land$ext = $51&1; + $52 = $encStatus$addr; + $inWBmodeWithoutVariableLP = ((($52)) + 76|0); + HEAP32[$inWBmodeWithoutVariableLP>>2] = $land$ext; + $53 = $ret; + STACKTOP = sp;return ($53|0); + } + $49 = $state_Fxx; + $sLP = ((($49)) + 16|0); + $mode = ((($sLP)) + 12|0); + $50 = HEAP32[$mode>>2]|0; + $cmp38 = ($50|0)==(0); + $51 = $cmp38; + $land$ext = $51&1; + $52 = $encStatus$addr; + $inWBmodeWithoutVariableLP = ((($52)) + 76|0); + HEAP32[$inWBmodeWithoutVariableLP>>2] = $land$ext; + $53 = $ret; + STACKTOP = sp;return ($53|0); +} +function _silk_shell_decoder($pulses0,$psRangeDec,$pulses4) { + $pulses0 = $pulses0|0; + $psRangeDec = $psRangeDec|0; + $pulses4 = $pulses4|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $arrayidx1 = 0, $arrayidx10 = 0, $arrayidx13 = 0, $arrayidx14 = 0, $arrayidx15 = 0, $arrayidx17 = 0, $arrayidx18 = 0, $arrayidx19 = 0, $arrayidx21 = 0, $arrayidx22 = 0, $arrayidx23 = 0, $arrayidx25 = 0, $arrayidx26 = 0, $arrayidx27 = 0; + var $arrayidx29 = 0, $arrayidx3 = 0, $arrayidx30 = 0, $arrayidx31 = 0, $arrayidx33 = 0, $arrayidx34 = 0, $arrayidx35 = 0, $arrayidx37 = 0, $arrayidx38 = 0, $arrayidx39 = 0, $arrayidx41 = 0, $arrayidx42 = 0, $arrayidx43 = 0, $arrayidx45 = 0, $arrayidx46 = 0, $arrayidx47 = 0, $arrayidx49 = 0, $arrayidx50 = 0, $arrayidx51 = 0, $arrayidx53 = 0; + var $arrayidx54 = 0, $arrayidx55 = 0, $arrayidx6 = 0, $conv = 0, $conv12 = 0, $conv16 = 0, $conv20 = 0, $conv24 = 0, $conv28 = 0, $conv32 = 0, $conv36 = 0, $conv40 = 0, $conv44 = 0, $conv48 = 0, $conv52 = 0, $conv56 = 0, $conv8 = 0, $psRangeDec$addr = 0, $pulses0$addr = 0, $pulses1 = 0; + var $pulses2 = 0, $pulses3 = 0, $pulses4$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $pulses3 = sp + 40|0; + $pulses2 = sp + 32|0; + $pulses1 = sp + 16|0; + $pulses0$addr = $pulses0; + $psRangeDec$addr = $psRangeDec; + $pulses4$addr = $pulses4; + $arrayidx1 = ((($pulses3)) + 2|0); + $0 = $psRangeDec$addr; + $1 = $pulses4$addr; + _decode_split($pulses3,$arrayidx1,$0,$1,23452); + $arrayidx3 = ((($pulses2)) + 2|0); + $2 = $psRangeDec$addr; + $3 = HEAP16[$pulses3>>1]|0; + $conv = $3 << 16 >> 16; + _decode_split($pulses2,$arrayidx3,$2,$conv,23300); + $arrayidx6 = ((($pulses1)) + 2|0); + $4 = $psRangeDec$addr; + $5 = HEAP16[$pulses2>>1]|0; + $conv8 = $5 << 16 >> 16; + _decode_split($pulses1,$arrayidx6,$4,$conv8,23148); + $6 = $pulses0$addr; + $7 = $pulses0$addr; + $arrayidx10 = ((($7)) + 2|0); + $8 = $psRangeDec$addr; + $9 = HEAP16[$pulses1>>1]|0; + $conv12 = $9 << 16 >> 16; + _decode_split($6,$arrayidx10,$8,$conv12,22996); + $10 = $pulses0$addr; + $arrayidx13 = ((($10)) + 4|0); + $11 = $pulses0$addr; + $arrayidx14 = ((($11)) + 6|0); + $12 = $psRangeDec$addr; + $arrayidx15 = ((($pulses1)) + 2|0); + $13 = HEAP16[$arrayidx15>>1]|0; + $conv16 = $13 << 16 >> 16; + _decode_split($arrayidx13,$arrayidx14,$12,$conv16,22996); + $arrayidx17 = ((($pulses1)) + 4|0); + $arrayidx18 = ((($pulses1)) + 6|0); + $14 = $psRangeDec$addr; + $arrayidx19 = ((($pulses2)) + 2|0); + $15 = HEAP16[$arrayidx19>>1]|0; + $conv20 = $15 << 16 >> 16; + _decode_split($arrayidx17,$arrayidx18,$14,$conv20,23148); + $16 = $pulses0$addr; + $arrayidx21 = ((($16)) + 8|0); + $17 = $pulses0$addr; + $arrayidx22 = ((($17)) + 10|0); + $18 = $psRangeDec$addr; + $arrayidx23 = ((($pulses1)) + 4|0); + $19 = HEAP16[$arrayidx23>>1]|0; + $conv24 = $19 << 16 >> 16; + _decode_split($arrayidx21,$arrayidx22,$18,$conv24,22996); + $20 = $pulses0$addr; + $arrayidx25 = ((($20)) + 12|0); + $21 = $pulses0$addr; + $arrayidx26 = ((($21)) + 14|0); + $22 = $psRangeDec$addr; + $arrayidx27 = ((($pulses1)) + 6|0); + $23 = HEAP16[$arrayidx27>>1]|0; + $conv28 = $23 << 16 >> 16; + _decode_split($arrayidx25,$arrayidx26,$22,$conv28,22996); + $arrayidx29 = ((($pulses2)) + 4|0); + $arrayidx30 = ((($pulses2)) + 6|0); + $24 = $psRangeDec$addr; + $arrayidx31 = ((($pulses3)) + 2|0); + $25 = HEAP16[$arrayidx31>>1]|0; + $conv32 = $25 << 16 >> 16; + _decode_split($arrayidx29,$arrayidx30,$24,$conv32,23300); + $arrayidx33 = ((($pulses1)) + 8|0); + $arrayidx34 = ((($pulses1)) + 10|0); + $26 = $psRangeDec$addr; + $arrayidx35 = ((($pulses2)) + 4|0); + $27 = HEAP16[$arrayidx35>>1]|0; + $conv36 = $27 << 16 >> 16; + _decode_split($arrayidx33,$arrayidx34,$26,$conv36,23148); + $28 = $pulses0$addr; + $arrayidx37 = ((($28)) + 16|0); + $29 = $pulses0$addr; + $arrayidx38 = ((($29)) + 18|0); + $30 = $psRangeDec$addr; + $arrayidx39 = ((($pulses1)) + 8|0); + $31 = HEAP16[$arrayidx39>>1]|0; + $conv40 = $31 << 16 >> 16; + _decode_split($arrayidx37,$arrayidx38,$30,$conv40,22996); + $32 = $pulses0$addr; + $arrayidx41 = ((($32)) + 20|0); + $33 = $pulses0$addr; + $arrayidx42 = ((($33)) + 22|0); + $34 = $psRangeDec$addr; + $arrayidx43 = ((($pulses1)) + 10|0); + $35 = HEAP16[$arrayidx43>>1]|0; + $conv44 = $35 << 16 >> 16; + _decode_split($arrayidx41,$arrayidx42,$34,$conv44,22996); + $arrayidx45 = ((($pulses1)) + 12|0); + $arrayidx46 = ((($pulses1)) + 14|0); + $36 = $psRangeDec$addr; + $arrayidx47 = ((($pulses2)) + 6|0); + $37 = HEAP16[$arrayidx47>>1]|0; + $conv48 = $37 << 16 >> 16; + _decode_split($arrayidx45,$arrayidx46,$36,$conv48,23148); + $38 = $pulses0$addr; + $arrayidx49 = ((($38)) + 24|0); + $39 = $pulses0$addr; + $arrayidx50 = ((($39)) + 26|0); + $40 = $psRangeDec$addr; + $arrayidx51 = ((($pulses1)) + 12|0); + $41 = HEAP16[$arrayidx51>>1]|0; + $conv52 = $41 << 16 >> 16; + _decode_split($arrayidx49,$arrayidx50,$40,$conv52,22996); + $42 = $pulses0$addr; + $arrayidx53 = ((($42)) + 28|0); + $43 = $pulses0$addr; + $arrayidx54 = ((($43)) + 30|0); + $44 = $psRangeDec$addr; + $arrayidx55 = ((($pulses1)) + 14|0); + $45 = HEAP16[$arrayidx55>>1]|0; + $conv56 = $45 << 16 >> 16; + _decode_split($arrayidx53,$arrayidx54,$44,$conv56,22996); + STACKTOP = sp;return; +} +function _decode_split($p_child1,$p_child2,$psRangeDec,$p,$shell_table) { + $p_child1 = $p_child1|0; + $p_child2 = $p_child2|0; + $psRangeDec = $psRangeDec|0; + $p = $p|0; + $shell_table = $shell_table|0; + var $$sink = 0, $$sink1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $arrayidx = 0, $arrayidx1 = 0, $call = 0, $cmp = 0, $conv = 0, $conv4 = 0; + var $conv5 = 0, $idxprom = 0, $p$addr = 0, $p_child1$addr = 0, $p_child2$addr = 0, $psRangeDec$addr = 0, $shell_table$addr = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $p_child1$addr = $p_child1; + $p_child2$addr = $p_child2; + $psRangeDec$addr = $psRangeDec; + $p$addr = $p; + $shell_table$addr = $shell_table; + $0 = $p$addr; + $cmp = ($0|0)>(0); + if ($cmp) { + $1 = $psRangeDec$addr; + $2 = $shell_table$addr; + $3 = $p$addr; + $arrayidx = (23604 + ($3)|0); + $4 = HEAP8[$arrayidx>>0]|0; + $idxprom = $4&255; + $arrayidx1 = (($2) + ($idxprom)|0); + $call = (_ec_dec_icdf($1,$arrayidx1,8)|0); + $conv = $call&65535; + $5 = $p_child1$addr; + HEAP16[$5>>1] = $conv; + $6 = $p$addr; + $7 = $p_child1$addr; + $8 = HEAP16[$7>>1]|0; + $conv4 = $8 << 16 >> 16; + $sub = (($6) - ($conv4))|0; + $conv5 = $sub&65535; + $9 = $p_child2$addr; + $$sink = $conv5;$$sink1 = $9; + HEAP16[$$sink1>>1] = $$sink; + STACKTOP = sp;return; + } else { + $10 = $p_child1$addr; + HEAP16[$10>>1] = 0; + $11 = $p_child2$addr; + $$sink = 0;$$sink1 = $11; + HEAP16[$$sink1>>1] = $$sink; + STACKTOP = sp;return; + } +} +function _silk_NLSF_unpack($ec_ix,$pred_Q8,$psNLSF_CB,$CB1_index) { + $ec_ix = $ec_ix|0; + $pred_Q8 = $pred_Q8|0; + $psNLSF_CB = $psNLSF_CB|0; + $CB1_index = $CB1_index|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $CB1_index$addr = 0, $add = 0, $add26 = 0, $add36 = 0, $add37 = 0; + var $add39 = 0, $add41 = 0, $and = 0, $and13 = 0, $and21 = 0, $and31 = 0, $arrayidx = 0, $arrayidx10 = 0, $arrayidx17 = 0, $arrayidx18 = 0, $arrayidx27 = 0, $arrayidx38 = 0, $arrayidx40 = 0, $cmp = 0, $conv = 0, $conv12 = 0, $conv15 = 0, $conv19 = 0, $conv22 = 0, $conv23 = 0; + var $conv25 = 0, $conv29 = 0, $conv3 = 0, $conv33 = 0, $conv5 = 0, $conv6 = 0, $conv7 = 0, $conv9 = 0, $div = 0, $ec_ix$addr = 0, $ec_sel = 0, $ec_sel_ptr = 0, $entry1 = 0, $i = 0, $incdec$ptr = 0, $mul = 0, $mul16 = 0, $mul24 = 0, $mul35 = 0, $mul8 = 0; + var $order = 0, $order14 = 0, $order2 = 0, $order32 = 0, $pred_Q8$addr = 0, $pred_Q811 = 0, $pred_Q828 = 0, $psNLSF_CB$addr = 0, $shr = 0, $shr20 = 0, $shr30 = 0, $sub = 0, $sub34 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $ec_ix$addr = $ec_ix; + $pred_Q8$addr = $pred_Q8; + $psNLSF_CB$addr = $psNLSF_CB; + $CB1_index$addr = $CB1_index; + $0 = $psNLSF_CB$addr; + $ec_sel = ((($0)) + 20|0); + $1 = HEAP32[$ec_sel>>2]|0; + $2 = $CB1_index$addr; + $3 = $psNLSF_CB$addr; + $order = ((($3)) + 2|0); + $4 = HEAP16[$order>>1]|0; + $conv = $4 << 16 >> 16; + $mul = Math_imul($2, $conv)|0; + $div = (($mul|0) / 2)&-1; + $arrayidx = (($1) + ($div)|0); + $ec_sel_ptr = $arrayidx; + $i = 0; + while(1) { + $5 = $i; + $6 = $psNLSF_CB$addr; + $order2 = ((($6)) + 2|0); + $7 = HEAP16[$order2>>1]|0; + $conv3 = $7 << 16 >> 16; + $cmp = ($5|0)<($conv3|0); + if (!($cmp)) { + break; + } + $8 = $ec_sel_ptr; + $incdec$ptr = ((($8)) + 1|0); + $ec_sel_ptr = $incdec$ptr; + $9 = HEAP8[$8>>0]|0; + $entry1 = $9; + $10 = $entry1; + $conv5 = $10&255; + $shr = $conv5 >> 1; + $and = $shr & 7; + $conv6 = $and&65535; + $conv7 = $conv6 << 16 >> 16; + $mul8 = ($conv7*9)|0; + $conv9 = $mul8&65535; + $11 = $ec_ix$addr; + $12 = $i; + $arrayidx10 = (($11) + ($12<<1)|0); + HEAP16[$arrayidx10>>1] = $conv9; + $13 = $psNLSF_CB$addr; + $pred_Q811 = ((($13)) + 16|0); + $14 = HEAP32[$pred_Q811>>2]|0; + $15 = $i; + $16 = $entry1; + $conv12 = $16&255; + $and13 = $conv12 & 1; + $17 = $psNLSF_CB$addr; + $order14 = ((($17)) + 2|0); + $18 = HEAP16[$order14>>1]|0; + $conv15 = $18 << 16 >> 16; + $sub = (($conv15) - 1)|0; + $mul16 = Math_imul($and13, $sub)|0; + $add = (($15) + ($mul16))|0; + $arrayidx17 = (($14) + ($add)|0); + $19 = HEAP8[$arrayidx17>>0]|0; + $20 = $pred_Q8$addr; + $21 = $i; + $arrayidx18 = (($20) + ($21)|0); + HEAP8[$arrayidx18>>0] = $19; + $22 = $entry1; + $conv19 = $22&255; + $shr20 = $conv19 >> 5; + $and21 = $shr20 & 7; + $conv22 = $and21&65535; + $conv23 = $conv22 << 16 >> 16; + $mul24 = ($conv23*9)|0; + $conv25 = $mul24&65535; + $23 = $ec_ix$addr; + $24 = $i; + $add26 = (($24) + 1)|0; + $arrayidx27 = (($23) + ($add26<<1)|0); + HEAP16[$arrayidx27>>1] = $conv25; + $25 = $psNLSF_CB$addr; + $pred_Q828 = ((($25)) + 16|0); + $26 = HEAP32[$pred_Q828>>2]|0; + $27 = $i; + $28 = $entry1; + $conv29 = $28&255; + $shr30 = $conv29 >> 4; + $and31 = $shr30 & 1; + $29 = $psNLSF_CB$addr; + $order32 = ((($29)) + 2|0); + $30 = HEAP16[$order32>>1]|0; + $conv33 = $30 << 16 >> 16; + $sub34 = (($conv33) - 1)|0; + $mul35 = Math_imul($and31, $sub34)|0; + $add36 = (($27) + ($mul35))|0; + $add37 = (($add36) + 1)|0; + $arrayidx38 = (($26) + ($add37)|0); + $31 = HEAP8[$arrayidx38>>0]|0; + $32 = $pred_Q8$addr; + $33 = $i; + $add39 = (($33) + 1)|0; + $arrayidx40 = (($32) + ($add39)|0); + HEAP8[$arrayidx40>>0] = $31; + $34 = $i; + $add41 = (($34) + 2)|0; + $i = $add41; + } + STACKTOP = sp;return; +} +function _silk_stereo_MS_to_LR($state,$x1,$x2,$pred_Q13,$fs_kHz,$frame_length) { + $state = $state|0; + $x1 = $x1|0; + $x2 = $x2|0; + $pred_Q13 = $pred_Q13|0; + $fs_kHz = $fs_kHz|0; + $frame_length = $frame_length|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $14 = 0, $15 = 0, $16 = 0; + var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; + var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0; + var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; + var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; + var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $add = 0, $add100 = 0, $add111 = 0, $add114 = 0, $add115 = 0, $add119 = 0, $add121 = 0, $add134 = 0, $add135 = 0; + var $add136 = 0, $add144 = 0, $add153 = 0, $add154 = 0, $add156 = 0, $add163 = 0, $add170 = 0, $add177 = 0, $add194 = 0, $add197 = 0, $add200 = 0, $add201 = 0, $add204 = 0, $add221 = 0, $add236 = 0, $add32 = 0, $add36 = 0, $add37 = 0, $add40 = 0, $add43 = 0; + var $add44 = 0, $add47 = 0, $add49 = 0, $add61 = 0, $add62 = 0, $add63 = 0, $add71 = 0, $add80 = 0, $add81 = 0, $add83 = 0, $add88 = 0, $add95 = 0, $and = 0, $and129 = 0, $and148 = 0, $and75 = 0, $arrayidx = 0, $arrayidx101 = 0, $arrayidx103 = 0, $arrayidx109 = 0; + var $arrayidx112 = 0, $arrayidx116 = 0, $arrayidx122 = 0, $arrayidx137 = 0, $arrayidx145 = 0, $arrayidx178 = 0, $arrayidx186 = 0, $arrayidx189 = 0, $arrayidx195 = 0, $arrayidx198 = 0, $arrayidx202 = 0, $arrayidx205 = 0, $arrayidx21 = 0, $arrayidx222 = 0, $arrayidx23 = 0, $arrayidx237 = 0, $arrayidx38 = 0, $arrayidx41 = 0, $arrayidx45 = 0, $arrayidx50 = 0; + var $arrayidx6 = 0, $arrayidx64 = 0, $arrayidx72 = 0, $arrayidx9 = 0, $cmp = 0, $cmp106 = 0, $cmp158 = 0, $cmp165 = 0, $cmp191 = 0, $cmp208 = 0, $cmp212 = 0, $cmp223 = 0, $cmp227 = 0, $cmp85 = 0, $cmp90 = 0, $cond175 = 0, $cond217 = 0, $cond219 = 0, $cond232 = 0, $cond234 = 0; + var $cond98 = 0, $conv = 0, $conv10 = 0, $conv110 = 0, $conv113 = 0, $conv117 = 0, $conv123 = 0, $conv126 = 0, $conv127 = 0, $conv130 = 0, $conv131 = 0, $conv138 = 0, $conv14 = 0, $conv141 = 0, $conv142 = 0, $conv146 = 0, $conv149 = 0, $conv15 = 0, $conv150 = 0, $conv16 = 0; + var $conv17 = 0, $conv176 = 0, $conv18 = 0, $conv183 = 0, $conv187 = 0, $conv196 = 0, $conv199 = 0, $conv203 = 0, $conv206 = 0, $conv220 = 0, $conv235 = 0, $conv24 = 0, $conv26 = 0, $conv27 = 0, $conv28 = 0, $conv29 = 0, $conv39 = 0, $conv42 = 0, $conv46 = 0, $conv51 = 0; + var $conv54 = 0, $conv55 = 0, $conv57 = 0, $conv58 = 0, $conv65 = 0, $conv68 = 0, $conv69 = 0, $conv73 = 0, $conv76 = 0, $conv77 = 0, $conv99 = 0, $delta0_Q13 = 0, $delta1_Q13 = 0, $denom_Q16 = 0, $diff = 0, $div = 0, $frame_length$addr = 0, $fs_kHz$addr = 0, $inc = 0, $inc180 = 0; + var $inc239 = 0, $mul = 0, $mul104 = 0, $mul128 = 0, $mul132 = 0, $mul143 = 0, $mul151 = 0, $mul19 = 0, $mul30 = 0, $mul34 = 0, $mul56 = 0, $mul59 = 0, $mul70 = 0, $mul78 = 0, $n = 0, $pred0_Q13 = 0, $pred1_Q13 = 0, $pred_Q13$addr = 0, $sMid = 0, $sMid2 = 0; + var $sSide = 0, $sSide4 = 0, $shl = 0, $shl118 = 0, $shl120 = 0, $shl124 = 0, $shl139 = 0, $shl147 = 0, $shl48 = 0, $shl52 = 0, $shl66 = 0, $shl74 = 0, $shr = 0, $shr125 = 0, $shr133 = 0, $shr140 = 0, $shr152 = 0, $shr155 = 0, $shr157 = 0, $shr162 = 0; + var $shr164 = 0, $shr169 = 0, $shr171 = 0, $shr20 = 0, $shr31 = 0, $shr33 = 0, $shr53 = 0, $shr60 = 0, $shr67 = 0, $shr79 = 0, $shr82 = 0, $shr84 = 0, $shr87 = 0, $shr89 = 0, $shr94 = 0, $shr96 = 0, $state$addr = 0, $sub = 0, $sub207 = 0, $sub25 = 0; + var $sum = 0, $x1$addr = 0, $x2$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $state$addr = $state; + $x1$addr = $x1; + $x2$addr = $x2; + $pred_Q13$addr = $pred_Q13; + $fs_kHz$addr = $fs_kHz; + $frame_length$addr = $frame_length; + $0 = $x1$addr; + $1 = $state$addr; + $sMid = ((($1)) + 4|0); + ;HEAP16[$0>>1]=HEAP16[$sMid>>1]|0;HEAP16[$0+2>>1]=HEAP16[$sMid+2>>1]|0; + $2 = $x2$addr; + $3 = $state$addr; + $sSide = ((($3)) + 8|0); + ;HEAP16[$2>>1]=HEAP16[$sSide>>1]|0;HEAP16[$2+2>>1]=HEAP16[$sSide+2>>1]|0; + $4 = $state$addr; + $sMid2 = ((($4)) + 4|0); + $5 = $x1$addr; + $6 = $frame_length$addr; + $arrayidx = (($5) + ($6<<1)|0); + ;HEAP16[$sMid2>>1]=HEAP16[$arrayidx>>1]|0;HEAP16[$sMid2+2>>1]=HEAP16[$arrayidx+2>>1]|0; + $7 = $state$addr; + $sSide4 = ((($7)) + 8|0); + $8 = $x2$addr; + $9 = $frame_length$addr; + $arrayidx6 = (($8) + ($9<<1)|0); + ;HEAP16[$sSide4>>1]=HEAP16[$arrayidx6>>1]|0;HEAP16[$sSide4+2>>1]=HEAP16[$arrayidx6+2>>1]|0; + $10 = $state$addr; + $11 = HEAP16[$10>>1]|0; + $conv = $11 << 16 >> 16; + $pred0_Q13 = $conv; + $12 = $state$addr; + $arrayidx9 = ((($12)) + 2|0); + $13 = HEAP16[$arrayidx9>>1]|0; + $conv10 = $13 << 16 >> 16; + $pred1_Q13 = $conv10; + $14 = $fs_kHz$addr; + $mul = $14<<3; + $div = (65536 / ($mul|0))&-1; + $denom_Q16 = $div; + $15 = $pred_Q13$addr; + $16 = HEAP32[$15>>2]|0; + $17 = $state$addr; + $18 = HEAP16[$17>>1]|0; + $conv14 = $18 << 16 >> 16; + $sub = (($16) - ($conv14))|0; + $conv15 = $sub&65535; + $conv16 = $conv15 << 16 >> 16; + $19 = $denom_Q16; + $conv17 = $19&65535; + $conv18 = $conv17 << 16 >> 16; + $mul19 = Math_imul($conv16, $conv18)|0; + $shr = $mul19 >> 15; + $add = (($shr) + 1)|0; + $shr20 = $add >> 1; + $delta0_Q13 = $shr20; + $20 = $pred_Q13$addr; + $arrayidx21 = ((($20)) + 4|0); + $21 = HEAP32[$arrayidx21>>2]|0; + $22 = $state$addr; + $arrayidx23 = ((($22)) + 2|0); + $23 = HEAP16[$arrayidx23>>1]|0; + $conv24 = $23 << 16 >> 16; + $sub25 = (($21) - ($conv24))|0; + $conv26 = $sub25&65535; + $conv27 = $conv26 << 16 >> 16; + $24 = $denom_Q16; + $conv28 = $24&65535; + $conv29 = $conv28 << 16 >> 16; + $mul30 = Math_imul($conv27, $conv29)|0; + $shr31 = $mul30 >> 15; + $add32 = (($shr31) + 1)|0; + $shr33 = $add32 >> 1; + $delta1_Q13 = $shr33; + $n = 0; + while(1) { + $25 = $n; + $26 = $fs_kHz$addr; + $mul34 = $26<<3; + $cmp = ($25|0)<($mul34|0); + if (!($cmp)) { + break; + } + $27 = $delta0_Q13; + $28 = $pred0_Q13; + $add36 = (($28) + ($27))|0; + $pred0_Q13 = $add36; + $29 = $delta1_Q13; + $30 = $pred1_Q13; + $add37 = (($30) + ($29))|0; + $pred1_Q13 = $add37; + $31 = $x1$addr; + $32 = $n; + $arrayidx38 = (($31) + ($32<<1)|0); + $33 = HEAP16[$arrayidx38>>1]|0; + $conv39 = $33 << 16 >> 16; + $34 = $x1$addr; + $35 = $n; + $add40 = (($35) + 2)|0; + $arrayidx41 = (($34) + ($add40<<1)|0); + $36 = HEAP16[$arrayidx41>>1]|0; + $conv42 = $36 << 16 >> 16; + $add43 = (($conv39) + ($conv42))|0; + $37 = $x1$addr; + $38 = $n; + $add44 = (($38) + 1)|0; + $arrayidx45 = (($37) + ($add44<<1)|0); + $39 = HEAP16[$arrayidx45>>1]|0; + $conv46 = $39 << 16 >> 16; + $shl = $conv46 << 1; + $add47 = (($add43) + ($shl))|0; + $shl48 = $add47 << 9; + $sum = $shl48; + $40 = $x2$addr; + $41 = $n; + $add49 = (($41) + 1)|0; + $arrayidx50 = (($40) + ($add49<<1)|0); + $42 = HEAP16[$arrayidx50>>1]|0; + $conv51 = $42 << 16 >> 16; + $shl52 = $conv51 << 8; + $43 = $sum; + $shr53 = $43 >> 16; + $44 = $pred0_Q13; + $conv54 = $44&65535; + $conv55 = $conv54 << 16 >> 16; + $mul56 = Math_imul($shr53, $conv55)|0; + $45 = $sum; + $and = $45 & 65535; + $46 = $pred0_Q13; + $conv57 = $46&65535; + $conv58 = $conv57 << 16 >> 16; + $mul59 = Math_imul($and, $conv58)|0; + $shr60 = $mul59 >> 16; + $add61 = (($mul56) + ($shr60))|0; + $add62 = (($shl52) + ($add61))|0; + $sum = $add62; + $47 = $sum; + $48 = $x1$addr; + $49 = $n; + $add63 = (($49) + 1)|0; + $arrayidx64 = (($48) + ($add63<<1)|0); + $50 = HEAP16[$arrayidx64>>1]|0; + $conv65 = $50 << 16 >> 16; + $shl66 = $conv65 << 11; + $shr67 = $shl66 >> 16; + $51 = $pred1_Q13; + $conv68 = $51&65535; + $conv69 = $conv68 << 16 >> 16; + $mul70 = Math_imul($shr67, $conv69)|0; + $52 = $x1$addr; + $53 = $n; + $add71 = (($53) + 1)|0; + $arrayidx72 = (($52) + ($add71<<1)|0); + $54 = HEAP16[$arrayidx72>>1]|0; + $conv73 = $54 << 16 >> 16; + $shl74 = $conv73 << 11; + $and75 = $shl74 & 65535; + $55 = $pred1_Q13; + $conv76 = $55&65535; + $conv77 = $conv76 << 16 >> 16; + $mul78 = Math_imul($and75, $conv77)|0; + $shr79 = $mul78 >> 16; + $add80 = (($mul70) + ($shr79))|0; + $add81 = (($47) + ($add80))|0; + $sum = $add81; + $56 = $sum; + $shr82 = $56 >> 7; + $add83 = (($shr82) + 1)|0; + $shr84 = $add83 >> 1; + $cmp85 = ($shr84|0)>(32767); + if ($cmp85) { + $cond98 = 32767; + } else { + $57 = $sum; + $shr87 = $57 >> 7; + $add88 = (($shr87) + 1)|0; + $shr89 = $add88 >> 1; + $cmp90 = ($shr89|0)<(-32768); + if ($cmp90) { + $cond98 = -32768; + } else { + $58 = $sum; + $shr94 = $58 >> 7; + $add95 = (($shr94) + 1)|0; + $shr96 = $add95 >> 1; + $cond98 = $shr96; + } + } + $conv99 = $cond98&65535; + $59 = $x2$addr; + $60 = $n; + $add100 = (($60) + 1)|0; + $arrayidx101 = (($59) + ($add100<<1)|0); + HEAP16[$arrayidx101>>1] = $conv99; + $61 = $n; + $inc = (($61) + 1)|0; + $n = $inc; + } + $62 = $pred_Q13$addr; + $63 = HEAP32[$62>>2]|0; + $pred0_Q13 = $63; + $64 = $pred_Q13$addr; + $arrayidx103 = ((($64)) + 4|0); + $65 = HEAP32[$arrayidx103>>2]|0; + $pred1_Q13 = $65; + $66 = $fs_kHz$addr; + $mul104 = $66<<3; + $n = $mul104; + while(1) { + $67 = $n; + $68 = $frame_length$addr; + $cmp106 = ($67|0)<($68|0); + if (!($cmp106)) { + break; + } + $69 = $x1$addr; + $70 = $n; + $arrayidx109 = (($69) + ($70<<1)|0); + $71 = HEAP16[$arrayidx109>>1]|0; + $conv110 = $71 << 16 >> 16; + $72 = $x1$addr; + $73 = $n; + $add111 = (($73) + 2)|0; + $arrayidx112 = (($72) + ($add111<<1)|0); + $74 = HEAP16[$arrayidx112>>1]|0; + $conv113 = $74 << 16 >> 16; + $add114 = (($conv110) + ($conv113))|0; + $75 = $x1$addr; + $76 = $n; + $add115 = (($76) + 1)|0; + $arrayidx116 = (($75) + ($add115<<1)|0); + $77 = HEAP16[$arrayidx116>>1]|0; + $conv117 = $77 << 16 >> 16; + $shl118 = $conv117 << 1; + $add119 = (($add114) + ($shl118))|0; + $shl120 = $add119 << 9; + $sum = $shl120; + $78 = $x2$addr; + $79 = $n; + $add121 = (($79) + 1)|0; + $arrayidx122 = (($78) + ($add121<<1)|0); + $80 = HEAP16[$arrayidx122>>1]|0; + $conv123 = $80 << 16 >> 16; + $shl124 = $conv123 << 8; + $81 = $sum; + $shr125 = $81 >> 16; + $82 = $pred0_Q13; + $conv126 = $82&65535; + $conv127 = $conv126 << 16 >> 16; + $mul128 = Math_imul($shr125, $conv127)|0; + $83 = $sum; + $and129 = $83 & 65535; + $84 = $pred0_Q13; + $conv130 = $84&65535; + $conv131 = $conv130 << 16 >> 16; + $mul132 = Math_imul($and129, $conv131)|0; + $shr133 = $mul132 >> 16; + $add134 = (($mul128) + ($shr133))|0; + $add135 = (($shl124) + ($add134))|0; + $sum = $add135; + $85 = $sum; + $86 = $x1$addr; + $87 = $n; + $add136 = (($87) + 1)|0; + $arrayidx137 = (($86) + ($add136<<1)|0); + $88 = HEAP16[$arrayidx137>>1]|0; + $conv138 = $88 << 16 >> 16; + $shl139 = $conv138 << 11; + $shr140 = $shl139 >> 16; + $89 = $pred1_Q13; + $conv141 = $89&65535; + $conv142 = $conv141 << 16 >> 16; + $mul143 = Math_imul($shr140, $conv142)|0; + $90 = $x1$addr; + $91 = $n; + $add144 = (($91) + 1)|0; + $arrayidx145 = (($90) + ($add144<<1)|0); + $92 = HEAP16[$arrayidx145>>1]|0; + $conv146 = $92 << 16 >> 16; + $shl147 = $conv146 << 11; + $and148 = $shl147 & 65535; + $93 = $pred1_Q13; + $conv149 = $93&65535; + $conv150 = $conv149 << 16 >> 16; + $mul151 = Math_imul($and148, $conv150)|0; + $shr152 = $mul151 >> 16; + $add153 = (($mul143) + ($shr152))|0; + $add154 = (($85) + ($add153))|0; + $sum = $add154; + $94 = $sum; + $shr155 = $94 >> 7; + $add156 = (($shr155) + 1)|0; + $shr157 = $add156 >> 1; + $cmp158 = ($shr157|0)>(32767); + if ($cmp158) { + $cond175 = 32767; + } else { + $95 = $sum; + $shr162 = $95 >> 7; + $add163 = (($shr162) + 1)|0; + $shr164 = $add163 >> 1; + $cmp165 = ($shr164|0)<(-32768); + if ($cmp165) { + $cond175 = -32768; + } else { + $96 = $sum; + $shr169 = $96 >> 7; + $add170 = (($shr169) + 1)|0; + $shr171 = $add170 >> 1; + $cond175 = $shr171; + } + } + $conv176 = $cond175&65535; + $97 = $x2$addr; + $98 = $n; + $add177 = (($98) + 1)|0; + $arrayidx178 = (($97) + ($add177<<1)|0); + HEAP16[$arrayidx178>>1] = $conv176; + $99 = $n; + $inc180 = (($99) + 1)|0; + $n = $inc180; + } + $100 = $pred_Q13$addr; + $101 = HEAP32[$100>>2]|0; + $conv183 = $101&65535; + $102 = $state$addr; + HEAP16[$102>>1] = $conv183; + $103 = $pred_Q13$addr; + $arrayidx186 = ((($103)) + 4|0); + $104 = HEAP32[$arrayidx186>>2]|0; + $conv187 = $104&65535; + $105 = $state$addr; + $arrayidx189 = ((($105)) + 2|0); + HEAP16[$arrayidx189>>1] = $conv187; + $n = 0; + while(1) { + $106 = $n; + $107 = $frame_length$addr; + $cmp191 = ($106|0)<($107|0); + if (!($cmp191)) { + break; + } + $108 = $x1$addr; + $109 = $n; + $add194 = (($109) + 1)|0; + $arrayidx195 = (($108) + ($add194<<1)|0); + $110 = HEAP16[$arrayidx195>>1]|0; + $conv196 = $110 << 16 >> 16; + $111 = $x2$addr; + $112 = $n; + $add197 = (($112) + 1)|0; + $arrayidx198 = (($111) + ($add197<<1)|0); + $113 = HEAP16[$arrayidx198>>1]|0; + $conv199 = $113 << 16 >> 16; + $add200 = (($conv196) + ($conv199))|0; + $sum = $add200; + $114 = $x1$addr; + $115 = $n; + $add201 = (($115) + 1)|0; + $arrayidx202 = (($114) + ($add201<<1)|0); + $116 = HEAP16[$arrayidx202>>1]|0; + $conv203 = $116 << 16 >> 16; + $117 = $x2$addr; + $118 = $n; + $add204 = (($118) + 1)|0; + $arrayidx205 = (($117) + ($add204<<1)|0); + $119 = HEAP16[$arrayidx205>>1]|0; + $conv206 = $119 << 16 >> 16; + $sub207 = (($conv203) - ($conv206))|0; + $diff = $sub207; + $120 = $sum; + $cmp208 = ($120|0)>(32767); + if ($cmp208) { + $cond219 = 32767; + } else { + $121 = $sum; + $cmp212 = ($121|0)<(-32768); + $122 = $sum; + $cond217 = $cmp212 ? -32768 : $122; + $cond219 = $cond217; + } + $conv220 = $cond219&65535; + $123 = $x1$addr; + $124 = $n; + $add221 = (($124) + 1)|0; + $arrayidx222 = (($123) + ($add221<<1)|0); + HEAP16[$arrayidx222>>1] = $conv220; + $125 = $diff; + $cmp223 = ($125|0)>(32767); + if ($cmp223) { + $cond234 = 32767; + } else { + $126 = $diff; + $cmp227 = ($126|0)<(-32768); + $127 = $diff; + $cond232 = $cmp227 ? -32768 : $127; + $cond234 = $cond232; + } + $conv235 = $cond234&65535; + $128 = $x2$addr; + $129 = $n; + $add236 = (($129) + 1)|0; + $arrayidx237 = (($128) + ($add236<<1)|0); + HEAP16[$arrayidx237>>1] = $conv235; + $130 = $n; + $inc239 = (($130) + 1)|0; + $n = $inc239; + } + STACKTOP = sp;return; +} +function _silk_init_encoder($psEnc,$arch) { + $psEnc = $psEnc|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $arch$addr = 0, $arch1 = 0, $call = 0, $call8 = 0, $first_frame_after_reset = 0, $psEnc$addr = 0, $ret = 0, $sVAD = 0; + var $shl = 0, $sub = 0, $variable_HP_smth1_Q15 = 0, $variable_HP_smth1_Q154 = 0, $variable_HP_smth2_Q15 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $psEnc$addr = $psEnc; + $arch$addr = $arch; + $ret = 0; + $0 = $psEnc$addr; + _memset(($0|0),0,12240)|0; + $1 = $arch$addr; + $2 = $psEnc$addr; + $arch1 = ((($2)) + 5124|0); + HEAP32[$arch1>>2] = $1; + $call = (_silk_lin2log(3932160)|0); + $sub = (($call) - 2048)|0; + $shl = $sub << 8; + $3 = $psEnc$addr; + $variable_HP_smth1_Q15 = ((($3)) + 8|0); + HEAP32[$variable_HP_smth1_Q15>>2] = $shl; + $4 = $psEnc$addr; + $variable_HP_smth1_Q154 = ((($4)) + 8|0); + $5 = HEAP32[$variable_HP_smth1_Q154>>2]|0; + $6 = $psEnc$addr; + $variable_HP_smth2_Q15 = ((($6)) + 12|0); + HEAP32[$variable_HP_smth2_Q15>>2] = $5; + $7 = $psEnc$addr; + $first_frame_after_reset = ((($7)) + 4696|0); + HEAP32[$first_frame_after_reset>>2] = 1; + $8 = $psEnc$addr; + $sVAD = ((($8)) + 32|0); + $call8 = (_silk_VAD_Init($sVAD)|0); + $9 = $ret; + $add = (($9) + ($call8))|0; + $ret = $add; + $10 = $ret; + STACKTOP = sp;return ($10|0); +} +function _silk_lin2log($inLin) { + $inLin = $inLin|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $add = 0, $add7 = 0, $add8 = 0, $and = 0, $frac_Q7 = 0, $inLin$addr = 0, $lz = 0, $mul = 0, $mul2 = 0, $mul4 = 0, $mul5 = 0, $shl = 0, $shr = 0; + var $shr6 = 0, $sub = 0, $sub1 = 0, $sub3 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $lz = sp + 4|0; + $frac_Q7 = sp; + $inLin$addr = $inLin; + $0 = $inLin$addr; + _silk_CLZ_FRAC($0,$lz,$frac_Q7); + $1 = HEAP32[$lz>>2]|0; + $sub = (31 - ($1))|0; + $shl = $sub << 7; + $2 = HEAP32[$frac_Q7>>2]|0; + $3 = HEAP32[$frac_Q7>>2]|0; + $4 = HEAP32[$frac_Q7>>2]|0; + $sub1 = (128 - ($4))|0; + $mul = Math_imul($3, $sub1)|0; + $shr = $mul >> 16; + $mul2 = ($shr*179)|0; + $5 = HEAP32[$frac_Q7>>2]|0; + $6 = HEAP32[$frac_Q7>>2]|0; + $sub3 = (128 - ($6))|0; + $mul4 = Math_imul($5, $sub3)|0; + $and = $mul4 & 65535; + $mul5 = ($and*179)|0; + $shr6 = $mul5 >> 16; + $add = (($mul2) + ($shr6))|0; + $add7 = (($2) + ($add))|0; + $add8 = (($shl) + ($add7))|0; + STACKTOP = sp;return ($add8|0); +} +function _silk_CLZ_FRAC($in,$lz,$frac_Q7) { + $in = $in|0; + $lz = $lz|0; + $frac_Q7 = $frac_Q7|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $and = 0, $call = 0, $call1 = 0, $frac_Q7$addr = 0, $in$addr = 0, $lz$addr = 0, $lzeros = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $in$addr = $in; + $lz$addr = $lz; + $frac_Q7$addr = $frac_Q7; + $0 = $in$addr; + $call = (_silk_CLZ32_222($0)|0); + $lzeros = $call; + $1 = $lzeros; + $2 = $lz$addr; + HEAP32[$2>>2] = $1; + $3 = $in$addr; + $4 = $lzeros; + $sub = (24 - ($4))|0; + $call1 = (_silk_ROR32($3,$sub)|0); + $and = $call1 & 127; + $5 = $frac_Q7$addr; + HEAP32[$5>>2] = $and; + STACKTOP = sp;return; +} +function _silk_CLZ32_222($in32) { + $in32 = $in32|0; + var $0 = 0, $1 = 0, $2 = 0, $cond = 0, $in32$addr = 0, $sub = 0, $sub1 = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $in32$addr = $in32; + $0 = $in32$addr; + $tobool = ($0|0)!=(0); + if (!($tobool)) { + $cond = 32; + STACKTOP = sp;return ($cond|0); + } + $1 = $in32$addr; + $2 = (Math_clz32(($1|0))|0); + $sub = (32 - ($2))|0; + $sub1 = (32 - ($sub))|0; + $cond = $sub1; + STACKTOP = sp;return ($cond|0); +} +function _silk_ROR32($a32,$rot) { + $a32 = $a32|0; + $rot = $rot|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a32$addr = 0, $cmp = 0, $cmp1 = 0, $m = 0, $or = 0, $or8 = 0; + var $r = 0, $retval = 0, $rot$addr = 0, $shl = 0, $shl6 = 0, $shr = 0, $shr7 = 0, $sub = 0, $sub3 = 0, $sub5 = 0, $x = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $a32$addr = $a32; + $rot$addr = $rot; + $0 = $a32$addr; + $x = $0; + $1 = $rot$addr; + $r = $1; + $2 = $rot$addr; + $sub = (0 - ($2))|0; + $m = $sub; + $3 = $rot$addr; + $cmp = ($3|0)==(0); + if ($cmp) { + $4 = $a32$addr; + $retval = $4; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } + $5 = $rot$addr; + $cmp1 = ($5|0)<(0); + $6 = $x; + if ($cmp1) { + $7 = $m; + $shl = $6 << $7; + $8 = $x; + $9 = $m; + $sub3 = (32 - ($9))|0; + $shr = $8 >>> $sub3; + $or = $shl | $shr; + $retval = $or; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } else { + $10 = $r; + $sub5 = (32 - ($10))|0; + $shl6 = $6 << $sub5; + $11 = $x; + $12 = $r; + $shr7 = $11 >>> $12; + $or8 = $shl6 | $shr7; + $retval = $or8; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } + return (0)|0; +} +function _silk_log2lin($inLog_Q7) { + $inLog_Q7 = $inLog_Q7|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0; + var $add20 = 0, $add23 = 0, $add43 = 0, $add44 = 0, $add46 = 0, $and = 0, $and17 = 0, $and40 = 0, $cmp = 0, $cmp1 = 0, $cmp4 = 0, $conv = 0, $conv11 = 0, $conv12 = 0, $conv14 = 0, $conv15 = 0, $conv26 = 0, $conv27 = 0, $conv29 = 0, $conv30 = 0; + var $conv34 = 0, $conv35 = 0, $conv37 = 0, $conv38 = 0, $conv6 = 0, $conv7 = 0, $conv8 = 0, $frac_Q7 = 0, $inLog_Q7$addr = 0, $mul = 0, $mul10 = 0, $mul16 = 0, $mul18 = 0, $mul21 = 0, $mul31 = 0, $mul33 = 0, $mul39 = 0, $mul41 = 0, $mul45 = 0, $out = 0; + var $retval = 0, $shl = 0, $shr = 0, $shr19 = 0, $shr22 = 0, $shr25 = 0, $shr32 = 0, $shr42 = 0, $shr9 = 0, $sub = 0, $sub13 = 0, $sub28 = 0, $sub36 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $inLog_Q7$addr = $inLog_Q7; + $0 = $inLog_Q7$addr; + $cmp = ($0|0)<(0); + if ($cmp) { + $retval = 0; + $18 = $retval; + STACKTOP = sp;return ($18|0); + } + $1 = $inLog_Q7$addr; + $cmp1 = ($1|0)>=(3967); + if ($cmp1) { + $retval = 2147483647; + $18 = $retval; + STACKTOP = sp;return ($18|0); + } + $2 = $inLog_Q7$addr; + $shr = $2 >> 7; + $shl = 1 << $shr; + $out = $shl; + $3 = $inLog_Q7$addr; + $and = $3 & 127; + $frac_Q7 = $and; + $4 = $inLog_Q7$addr; + $cmp4 = ($4|0)<(2048); + $5 = $out; + $6 = $out; + if ($cmp4) { + $7 = $frac_Q7; + $8 = $frac_Q7; + $conv = $8&65535; + $conv6 = $conv << 16 >> 16; + $9 = $frac_Q7; + $sub = (128 - ($9))|0; + $conv7 = $sub&65535; + $conv8 = $conv7 << 16 >> 16; + $mul = Math_imul($conv6, $conv8)|0; + $shr9 = $mul >> 16; + $mul10 = Math_imul($shr9, -174)|0; + $10 = $frac_Q7; + $conv11 = $10&65535; + $conv12 = $conv11 << 16 >> 16; + $11 = $frac_Q7; + $sub13 = (128 - ($11))|0; + $conv14 = $sub13&65535; + $conv15 = $conv14 << 16 >> 16; + $mul16 = Math_imul($conv12, $conv15)|0; + $and17 = $mul16 & 65535; + $mul18 = Math_imul($and17, -174)|0; + $shr19 = $mul18 >> 16; + $add = (($mul10) + ($shr19))|0; + $add20 = (($7) + ($add))|0; + $mul21 = Math_imul($6, $add20)|0; + $shr22 = $mul21 >> 7; + $add23 = (($5) + ($shr22))|0; + $out = $add23; + } else { + $shr25 = $6 >> 7; + $12 = $frac_Q7; + $13 = $frac_Q7; + $conv26 = $13&65535; + $conv27 = $conv26 << 16 >> 16; + $14 = $frac_Q7; + $sub28 = (128 - ($14))|0; + $conv29 = $sub28&65535; + $conv30 = $conv29 << 16 >> 16; + $mul31 = Math_imul($conv27, $conv30)|0; + $shr32 = $mul31 >> 16; + $mul33 = Math_imul($shr32, -174)|0; + $15 = $frac_Q7; + $conv34 = $15&65535; + $conv35 = $conv34 << 16 >> 16; + $16 = $frac_Q7; + $sub36 = (128 - ($16))|0; + $conv37 = $sub36&65535; + $conv38 = $conv37 << 16 >> 16; + $mul39 = Math_imul($conv35, $conv38)|0; + $and40 = $mul39 & 65535; + $mul41 = Math_imul($and40, -174)|0; + $shr42 = $mul41 >> 16; + $add43 = (($mul33) + ($shr42))|0; + $add44 = (($12) + ($add43))|0; + $mul45 = Math_imul($shr25, $add44)|0; + $add46 = (($5) + ($mul45))|0; + $out = $add46; + } + $17 = $out; + $retval = $17; + $18 = $retval; + STACKTOP = sp;return ($18|0); +} +function _silk_resampler_init($S,$Fs_Hz_in,$Fs_Hz_out,$forEnc) { + $S = $S|0; + $Fs_Hz_in = $Fs_Hz_in|0; + $Fs_Hz_out = $Fs_Hz_out|0; + $forEnc = $forEnc|0; + var $$sink = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; + var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0; + var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0; + var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $Coefs = 0, $Coefs105 = 0, $Coefs113 = 0, $Coefs121 = 0, $Coefs129 = 0, $Coefs137 = 0, $FIR_Fracs = 0; + var $FIR_Fracs103 = 0, $FIR_Fracs111 = 0, $FIR_Fracs119 = 0, $FIR_Fracs127 = 0, $FIR_Fracs135 = 0, $FIR_Order = 0, $FIR_Order104 = 0, $FIR_Order112 = 0, $FIR_Order120 = 0, $FIR_Order128 = 0, $FIR_Order136 = 0, $Fs_Hz_in$addr = 0, $Fs_Hz_out$addr = 0, $Fs_in_kHz = 0, $Fs_in_kHz76 = 0, $Fs_out_kHz = 0, $S$addr = 0, $add = 0, $add161 = 0, $add164 = 0; + var $add167 = 0, $and = 0, $arrayidx = 0, $arrayidx27 = 0, $arrayidx62 = 0, $arrayidx71 = 0, $batchSize = 0, $cmp = 0, $cmp1 = 0, $cmp10 = 0, $cmp100 = 0, $cmp108 = 0, $cmp116 = 0, $cmp12 = 0, $cmp124 = 0, $cmp132 = 0, $cmp14 = 0, $cmp15 = 0, $cmp169 = 0, $cmp20 = 0; + var $cmp23 = 0, $cmp3 = 0, $cmp38 = 0, $cmp41 = 0, $cmp44 = 0, $cmp47 = 0, $cmp5 = 0, $cmp50 = 0, $cmp55 = 0, $cmp58 = 0, $cmp64 = 0, $cmp67 = 0, $cmp7 = 0, $cmp77 = 0, $cmp8 = 0, $cmp81 = 0, $cmp88 = 0, $cmp94 = 0, $conv = 0, $conv153 = 0; + var $conv154 = 0, $conv157 = 0, $conv158 = 0, $conv16 = 0, $conv21 = 0, $conv24 = 0, $conv28 = 0, $conv56 = 0, $conv59 = 0, $conv65 = 0, $conv68 = 0, $conv72 = 0, $conv72$sink = 0, $div = 0, $div149 = 0, $div75 = 0, $forEnc$addr = 0, $inc = 0, $inputDelay73 = 0, $invRatio_Q16 = 0; + var $invRatio_Q16151 = 0, $invRatio_Q16156 = 0, $invRatio_Q16162 = 0, $invRatio_Q16171 = 0, $mul = 0, $mul107 = 0, $mul115 = 0, $mul123 = 0, $mul131 = 0, $mul155 = 0, $mul159 = 0, $mul166 = 0, $mul80 = 0, $mul92 = 0, $mul93 = 0, $mul98 = 0, $mul99 = 0, $or$cond = 0, $or$cond1 = 0, $or$cond10 = 0; + var $or$cond11 = 0, $or$cond2 = 0, $or$cond3 = 0, $or$cond4 = 0, $or$cond5 = 0, $or$cond8 = 0, $or$cond9 = 0, $resampler_function = 0, $resampler_function91 = 0, $retval = 0, $shl = 0, $shl150 = 0, $shl168 = 0, $shr = 0, $shr152 = 0, $shr160 = 0, $shr163 = 0, $shr165 = 0, $shr17 = 0, $shr19 = 0; + var $shr25 = 0, $shr54 = 0, $shr60 = 0, $shr63 = 0, $shr69 = 0, $sub = 0, $sub18 = 0, $sub22 = 0, $sub26 = 0, $sub57 = 0, $sub61 = 0, $sub66 = 0, $sub70 = 0, $tobool = 0, $up2x = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $S$addr = $S; + $Fs_Hz_in$addr = $Fs_Hz_in; + $Fs_Hz_out$addr = $Fs_Hz_out; + $forEnc$addr = $forEnc; + $0 = $S$addr; + _memset(($0|0),0,300)|0; + $1 = $forEnc$addr; + $tobool = ($1|0)!=(0); + $2 = $Fs_Hz_in$addr; + $cmp = ($2|0)!=(8000); + $3 = $Fs_Hz_in$addr; + $cmp1 = ($3|0)!=(12000); + $or$cond = $cmp & $cmp1; + $4 = $Fs_Hz_in$addr; + $cmp3 = ($4|0)!=(16000); + $or$cond1 = $or$cond & $cmp3; + do { + if ($tobool) { + $5 = $Fs_Hz_in$addr; + $cmp5 = ($5|0)!=(24000); + $or$cond2 = $or$cond1 & $cmp5; + $6 = $Fs_Hz_in$addr; + $cmp7 = ($6|0)!=(48000); + $or$cond3 = $or$cond2 & $cmp7; + if (!($or$cond3)) { + $7 = $Fs_Hz_out$addr; + $cmp8 = ($7|0)!=(8000); + $8 = $Fs_Hz_out$addr; + $cmp10 = ($8|0)!=(12000); + $or$cond4 = $cmp8 & $cmp10; + $9 = $Fs_Hz_out$addr; + $cmp12 = ($9|0)!=(16000); + $or$cond5 = $or$cond4 & $cmp12; + if (!($or$cond5)) { + $10 = $Fs_Hz_in$addr; + $shr = $10 >> 12; + $11 = $Fs_Hz_in$addr; + $cmp14 = ($11|0)>(16000); + $conv = $cmp14&1; + $sub = (($shr) - ($conv))|0; + $12 = $Fs_Hz_in$addr; + $cmp15 = ($12|0)>(24000); + $conv16 = $cmp15&1; + $shr17 = $sub >> $conv16; + $sub18 = (($shr17) - 1)|0; + $arrayidx = (23663 + (($sub18*3)|0)|0); + $13 = $Fs_Hz_out$addr; + $shr19 = $13 >> 12; + $14 = $Fs_Hz_out$addr; + $cmp20 = ($14|0)>(16000); + $conv21 = $cmp20&1; + $sub22 = (($shr19) - ($conv21))|0; + $15 = $Fs_Hz_out$addr; + $cmp23 = ($15|0)>(24000); + $conv24 = $cmp23&1; + $shr25 = $sub22 >> $conv24; + $sub26 = (($shr25) - 1)|0; + $arrayidx27 = (($arrayidx) + ($sub26)|0); + $16 = HEAP8[$arrayidx27>>0]|0; + $conv28 = $16 << 24 >> 24; + $17 = $S$addr; + $$sink = $17;$conv72$sink = $conv28; + break; + } + } + $retval = -1; + $91 = $retval; + STACKTOP = sp;return ($91|0); + } else { + if (!($or$cond1)) { + $18 = $Fs_Hz_out$addr; + $cmp38 = ($18|0)!=(8000); + $19 = $Fs_Hz_out$addr; + $cmp41 = ($19|0)!=(12000); + $or$cond8 = $cmp38 & $cmp41; + $20 = $Fs_Hz_out$addr; + $cmp44 = ($20|0)!=(16000); + $or$cond9 = $or$cond8 & $cmp44; + $21 = $Fs_Hz_out$addr; + $cmp47 = ($21|0)!=(24000); + $or$cond10 = $or$cond9 & $cmp47; + $22 = $Fs_Hz_out$addr; + $cmp50 = ($22|0)!=(48000); + $or$cond11 = $or$cond10 & $cmp50; + if (!($or$cond11)) { + $23 = $Fs_Hz_in$addr; + $shr54 = $23 >> 12; + $24 = $Fs_Hz_in$addr; + $cmp55 = ($24|0)>(16000); + $conv56 = $cmp55&1; + $sub57 = (($shr54) - ($conv56))|0; + $25 = $Fs_Hz_in$addr; + $cmp58 = ($25|0)>(24000); + $conv59 = $cmp58&1; + $shr60 = $sub57 >> $conv59; + $sub61 = (($shr60) - 1)|0; + $arrayidx62 = (23678 + (($sub61*5)|0)|0); + $26 = $Fs_Hz_out$addr; + $shr63 = $26 >> 12; + $27 = $Fs_Hz_out$addr; + $cmp64 = ($27|0)>(16000); + $conv65 = $cmp64&1; + $sub66 = (($shr63) - ($conv65))|0; + $28 = $Fs_Hz_out$addr; + $cmp67 = ($28|0)>(24000); + $conv68 = $cmp67&1; + $shr69 = $sub66 >> $conv68; + $sub70 = (($shr69) - 1)|0; + $arrayidx71 = (($arrayidx62) + ($sub70)|0); + $29 = HEAP8[$arrayidx71>>0]|0; + $conv72 = $29 << 24 >> 24; + $30 = $S$addr; + $$sink = $30;$conv72$sink = $conv72; + break; + } + } + $retval = -1; + $91 = $retval; + STACKTOP = sp;return ($91|0); + } + } while(0); + $inputDelay73 = ((($$sink)) + 292|0); + HEAP32[$inputDelay73>>2] = $conv72$sink; + $31 = $Fs_Hz_in$addr; + $div = (($31|0) / 1000)&-1; + $32 = $S$addr; + $Fs_in_kHz = ((($32)) + 284|0); + HEAP32[$Fs_in_kHz>>2] = $div; + $33 = $Fs_Hz_out$addr; + $div75 = (($33|0) / 1000)&-1; + $34 = $S$addr; + $Fs_out_kHz = ((($34)) + 288|0); + HEAP32[$Fs_out_kHz>>2] = $div75; + $35 = $S$addr; + $Fs_in_kHz76 = ((($35)) + 284|0); + $36 = HEAP32[$Fs_in_kHz76>>2]|0; + $mul = ($36*10)|0; + $37 = $S$addr; + $batchSize = ((($37)) + 268|0); + HEAP32[$batchSize>>2] = $mul; + $up2x = 0; + $38 = $Fs_Hz_out$addr; + $39 = $Fs_Hz_in$addr; + $cmp77 = ($38|0)>($39|0); + $40 = $Fs_Hz_out$addr; + $41 = $Fs_Hz_in$addr; + do { + if ($cmp77) { + $mul80 = $41<<1; + $cmp81 = ($40|0)==($mul80|0); + $42 = $S$addr; + $resampler_function = ((($42)) + 264|0); + if ($cmp81) { + HEAP32[$resampler_function>>2] = 1; + break; + } else { + HEAP32[$resampler_function>>2] = 2; + $up2x = 1; + break; + } + } else { + $cmp88 = ($40|0)<($41|0); + $43 = $S$addr; + $resampler_function91 = ((($43)) + 264|0); + if (!($cmp88)) { + HEAP32[$resampler_function91>>2] = 0; + break; + } + HEAP32[$resampler_function91>>2] = 3; + $44 = $Fs_Hz_out$addr; + $mul92 = $44<<2; + $45 = $Fs_Hz_in$addr; + $mul93 = ($45*3)|0; + $cmp94 = ($mul92|0)==($mul93|0); + if ($cmp94) { + $46 = $S$addr; + $FIR_Fracs = ((($46)) + 280|0); + HEAP32[$FIR_Fracs>>2] = 3; + $47 = $S$addr; + $FIR_Order = ((($47)) + 276|0); + HEAP32[$FIR_Order>>2] = 18; + $48 = $S$addr; + $Coefs = ((($48)) + 296|0); + HEAP32[$Coefs>>2] = 20274; + break; + } + $49 = $Fs_Hz_out$addr; + $mul98 = ($49*3)|0; + $50 = $Fs_Hz_in$addr; + $mul99 = $50<<1; + $cmp100 = ($mul98|0)==($mul99|0); + if ($cmp100) { + $51 = $S$addr; + $FIR_Fracs103 = ((($51)) + 280|0); + HEAP32[$FIR_Fracs103>>2] = 2; + $52 = $S$addr; + $FIR_Order104 = ((($52)) + 276|0); + HEAP32[$FIR_Order104>>2] = 18; + $53 = $S$addr; + $Coefs105 = ((($53)) + 296|0); + HEAP32[$Coefs105>>2] = 20332; + break; + } + $54 = $Fs_Hz_out$addr; + $mul107 = $54<<1; + $55 = $Fs_Hz_in$addr; + $cmp108 = ($mul107|0)==($55|0); + if ($cmp108) { + $56 = $S$addr; + $FIR_Fracs111 = ((($56)) + 280|0); + HEAP32[$FIR_Fracs111>>2] = 1; + $57 = $S$addr; + $FIR_Order112 = ((($57)) + 276|0); + HEAP32[$FIR_Order112>>2] = 24; + $58 = $S$addr; + $Coefs113 = ((($58)) + 296|0); + HEAP32[$Coefs113>>2] = 20372; + break; + } + $59 = $Fs_Hz_out$addr; + $mul115 = ($59*3)|0; + $60 = $Fs_Hz_in$addr; + $cmp116 = ($mul115|0)==($60|0); + if ($cmp116) { + $61 = $S$addr; + $FIR_Fracs119 = ((($61)) + 280|0); + HEAP32[$FIR_Fracs119>>2] = 1; + $62 = $S$addr; + $FIR_Order120 = ((($62)) + 276|0); + HEAP32[$FIR_Order120>>2] = 36; + $63 = $S$addr; + $Coefs121 = ((($63)) + 296|0); + HEAP32[$Coefs121>>2] = 20400; + break; + } + $64 = $Fs_Hz_out$addr; + $mul123 = $64<<2; + $65 = $Fs_Hz_in$addr; + $cmp124 = ($mul123|0)==($65|0); + if ($cmp124) { + $66 = $S$addr; + $FIR_Fracs127 = ((($66)) + 280|0); + HEAP32[$FIR_Fracs127>>2] = 1; + $67 = $S$addr; + $FIR_Order128 = ((($67)) + 276|0); + HEAP32[$FIR_Order128>>2] = 36; + $68 = $S$addr; + $Coefs129 = ((($68)) + 296|0); + HEAP32[$Coefs129>>2] = 20440; + break; + } + $69 = $Fs_Hz_out$addr; + $mul131 = ($69*6)|0; + $70 = $Fs_Hz_in$addr; + $cmp132 = ($mul131|0)==($70|0); + if ($cmp132) { + $71 = $S$addr; + $FIR_Fracs135 = ((($71)) + 280|0); + HEAP32[$FIR_Fracs135>>2] = 1; + $72 = $S$addr; + $FIR_Order136 = ((($72)) + 276|0); + HEAP32[$FIR_Order136>>2] = 36; + $73 = $S$addr; + $Coefs137 = ((($73)) + 296|0); + HEAP32[$Coefs137>>2] = 20480; + break; + } + $retval = -1; + $91 = $retval; + STACKTOP = sp;return ($91|0); + } + } while(0); + $74 = $Fs_Hz_in$addr; + $75 = $up2x; + $add = (14 + ($75))|0; + $shl = $74 << $add; + $76 = $Fs_Hz_out$addr; + $div149 = (($shl|0) / ($76|0))&-1; + $shl150 = $div149 << 2; + $77 = $S$addr; + $invRatio_Q16 = ((($77)) + 272|0); + HEAP32[$invRatio_Q16>>2] = $shl150; + while(1) { + $78 = $S$addr; + $invRatio_Q16151 = ((($78)) + 272|0); + $79 = HEAP32[$invRatio_Q16151>>2]|0; + $shr152 = $79 >> 16; + $80 = $Fs_Hz_out$addr; + $conv153 = $80&65535; + $conv154 = $conv153 << 16 >> 16; + $mul155 = Math_imul($shr152, $conv154)|0; + $81 = $S$addr; + $invRatio_Q16156 = ((($81)) + 272|0); + $82 = HEAP32[$invRatio_Q16156>>2]|0; + $and = $82 & 65535; + $83 = $Fs_Hz_out$addr; + $conv157 = $83&65535; + $conv158 = $conv157 << 16 >> 16; + $mul159 = Math_imul($and, $conv158)|0; + $shr160 = $mul159 >> 16; + $add161 = (($mul155) + ($shr160))|0; + $84 = $S$addr; + $invRatio_Q16162 = ((($84)) + 272|0); + $85 = HEAP32[$invRatio_Q16162>>2]|0; + $86 = $Fs_Hz_out$addr; + $shr163 = $86 >> 15; + $add164 = (($shr163) + 1)|0; + $shr165 = $add164 >> 1; + $mul166 = Math_imul($85, $shr165)|0; + $add167 = (($add161) + ($mul166))|0; + $87 = $Fs_Hz_in$addr; + $88 = $up2x; + $shl168 = $87 << $88; + $cmp169 = ($add167|0)<($shl168|0); + if (!($cmp169)) { + break; + } + $89 = $S$addr; + $invRatio_Q16171 = ((($89)) + 272|0); + $90 = HEAP32[$invRatio_Q16171>>2]|0; + $inc = (($90) + 1)|0; + HEAP32[$invRatio_Q16171>>2] = $inc; + } + $retval = 0; + $91 = $retval; + STACKTOP = sp;return ($91|0); +} +function _silk_resampler($S,$out,$in,$inLen) { + $S = $S|0; + $out = $out|0; + $in = $in|0; + $inLen = $inLen|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $8 = 0, $9 = 0, $Fs_in_kHz = 0, $Fs_in_kHz11 = 0, $Fs_in_kHz15 = 0, $Fs_in_kHz20 = 0, $Fs_in_kHz24 = 0, $Fs_in_kHz28 = 0, $Fs_in_kHz3 = 0, $Fs_in_kHz33 = 0; + var $Fs_in_kHz6 = 0, $Fs_out_kHz = 0, $Fs_out_kHz12 = 0, $Fs_out_kHz21 = 0, $Fs_out_kHz30 = 0, $S$addr = 0, $arrayidx = 0, $arrayidx13 = 0, $arrayidx14 = 0, $arrayidx22 = 0, $arrayidx23 = 0, $arrayidx31 = 0, $arrayidx32 = 0, $arrayidx4 = 0, $arrayidx40 = 0, $arrayidx5 = 0, $delayBuf = 0, $delayBuf18 = 0, $delayBuf2 = 0, $delayBuf26 = 0; + var $delayBuf36 = 0, $delayBuf9 = 0, $in$addr = 0, $inLen$addr = 0, $inputDelay = 0, $inputDelay1 = 0, $inputDelay38 = 0, $inputDelay41 = 0, $mul = 0, $mul29 = 0, $mul35 = 0, $mul42 = 0, $nSamples = 0, $out$addr = 0, $resampler_function = 0, $sub = 0, $sub16 = 0, $sub25 = 0, $sub34 = 0, $sub39 = 0; + var $sub7 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $S$addr = $S; + $out$addr = $out; + $in$addr = $in; + $inLen$addr = $inLen; + $0 = $S$addr; + $Fs_in_kHz = ((($0)) + 284|0); + $1 = HEAP32[$Fs_in_kHz>>2]|0; + $2 = $S$addr; + $inputDelay = ((($2)) + 292|0); + $3 = HEAP32[$inputDelay>>2]|0; + $sub = (($1) - ($3))|0; + $nSamples = $sub; + $4 = $S$addr; + $delayBuf = ((($4)) + 168|0); + $5 = $S$addr; + $inputDelay1 = ((($5)) + 292|0); + $6 = HEAP32[$inputDelay1>>2]|0; + $arrayidx = (($delayBuf) + ($6<<1)|0); + $7 = $in$addr; + $8 = $nSamples; + $mul = $8<<1; + _memcpy(($arrayidx|0),($7|0),($mul|0))|0; + $9 = $S$addr; + $resampler_function = ((($9)) + 264|0); + $10 = HEAP32[$resampler_function>>2]|0; + switch ($10|0) { + case 1: { + $11 = $S$addr; + $12 = $out$addr; + $13 = $S$addr; + $delayBuf2 = ((($13)) + 168|0); + $14 = $S$addr; + $Fs_in_kHz3 = ((($14)) + 284|0); + $15 = HEAP32[$Fs_in_kHz3>>2]|0; + _silk_resampler_private_up2_HQ_wrapper($11,$12,$delayBuf2,$15); + $16 = $S$addr; + $17 = $out$addr; + $18 = $S$addr; + $Fs_out_kHz = ((($18)) + 288|0); + $19 = HEAP32[$Fs_out_kHz>>2]|0; + $arrayidx4 = (($17) + ($19<<1)|0); + $20 = $in$addr; + $21 = $nSamples; + $arrayidx5 = (($20) + ($21<<1)|0); + $22 = $inLen$addr; + $23 = $S$addr; + $Fs_in_kHz6 = ((($23)) + 284|0); + $24 = HEAP32[$Fs_in_kHz6>>2]|0; + $sub7 = (($22) - ($24))|0; + _silk_resampler_private_up2_HQ_wrapper($16,$arrayidx4,$arrayidx5,$sub7); + break; + } + case 2: { + $25 = $S$addr; + $26 = $out$addr; + $27 = $S$addr; + $delayBuf9 = ((($27)) + 168|0); + $28 = $S$addr; + $Fs_in_kHz11 = ((($28)) + 284|0); + $29 = HEAP32[$Fs_in_kHz11>>2]|0; + _silk_resampler_private_IIR_FIR($25,$26,$delayBuf9,$29); + $30 = $S$addr; + $31 = $out$addr; + $32 = $S$addr; + $Fs_out_kHz12 = ((($32)) + 288|0); + $33 = HEAP32[$Fs_out_kHz12>>2]|0; + $arrayidx13 = (($31) + ($33<<1)|0); + $34 = $in$addr; + $35 = $nSamples; + $arrayidx14 = (($34) + ($35<<1)|0); + $36 = $inLen$addr; + $37 = $S$addr; + $Fs_in_kHz15 = ((($37)) + 284|0); + $38 = HEAP32[$Fs_in_kHz15>>2]|0; + $sub16 = (($36) - ($38))|0; + _silk_resampler_private_IIR_FIR($30,$arrayidx13,$arrayidx14,$sub16); + break; + } + case 3: { + $39 = $S$addr; + $40 = $out$addr; + $41 = $S$addr; + $delayBuf18 = ((($41)) + 168|0); + $42 = $S$addr; + $Fs_in_kHz20 = ((($42)) + 284|0); + $43 = HEAP32[$Fs_in_kHz20>>2]|0; + _silk_resampler_private_down_FIR($39,$40,$delayBuf18,$43); + $44 = $S$addr; + $45 = $out$addr; + $46 = $S$addr; + $Fs_out_kHz21 = ((($46)) + 288|0); + $47 = HEAP32[$Fs_out_kHz21>>2]|0; + $arrayidx22 = (($45) + ($47<<1)|0); + $48 = $in$addr; + $49 = $nSamples; + $arrayidx23 = (($48) + ($49<<1)|0); + $50 = $inLen$addr; + $51 = $S$addr; + $Fs_in_kHz24 = ((($51)) + 284|0); + $52 = HEAP32[$Fs_in_kHz24>>2]|0; + $sub25 = (($50) - ($52))|0; + _silk_resampler_private_down_FIR($44,$arrayidx22,$arrayidx23,$sub25); + break; + } + default: { + $53 = $out$addr; + $54 = $S$addr; + $delayBuf26 = ((($54)) + 168|0); + $55 = $S$addr; + $Fs_in_kHz28 = ((($55)) + 284|0); + $56 = HEAP32[$Fs_in_kHz28>>2]|0; + $mul29 = $56<<1; + _memcpy(($53|0),($delayBuf26|0),($mul29|0))|0; + $57 = $out$addr; + $58 = $S$addr; + $Fs_out_kHz30 = ((($58)) + 288|0); + $59 = HEAP32[$Fs_out_kHz30>>2]|0; + $arrayidx31 = (($57) + ($59<<1)|0); + $60 = $in$addr; + $61 = $nSamples; + $arrayidx32 = (($60) + ($61<<1)|0); + $62 = $inLen$addr; + $63 = $S$addr; + $Fs_in_kHz33 = ((($63)) + 284|0); + $64 = HEAP32[$Fs_in_kHz33>>2]|0; + $sub34 = (($62) - ($64))|0; + $mul35 = $sub34<<1; + _memcpy(($arrayidx31|0),($arrayidx32|0),($mul35|0))|0; + } + } + $65 = $S$addr; + $delayBuf36 = ((($65)) + 168|0); + $66 = $in$addr; + $67 = $inLen$addr; + $68 = $S$addr; + $inputDelay38 = ((($68)) + 292|0); + $69 = HEAP32[$inputDelay38>>2]|0; + $sub39 = (($67) - ($69))|0; + $arrayidx40 = (($66) + ($sub39<<1)|0); + $70 = $S$addr; + $inputDelay41 = ((($70)) + 292|0); + $71 = HEAP32[$inputDelay41>>2]|0; + $mul42 = $71<<1; + _memcpy(($delayBuf36|0),($arrayidx40|0),($mul42|0))|0; + STACKTOP = sp;return 0; +} +function _silk_resampler_private_down_FIR($SS,$out,$in,$inLen) { + $SS = $SS|0; + $out = $out|0; + $in = $in|0; + $inLen = $inLen|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $Coefs = 0, $Coefs7 = 0, $FIR_Coefs = 0, $FIR_Fracs = 0, $FIR_Order = 0, $FIR_Order1 = 0, $FIR_Order11 = 0, $FIR_Order17 = 0, $FIR_Order5 = 0, $FIR_Order8 = 0, $S = 0, $SS$addr = 0; + var $add = 0, $add$ptr = 0, $arrayidx = 0, $arrayidx10 = 0, $arrayidx16 = 0, $arrayidx6 = 0, $batchSize = 0, $batchSize2 = 0, $batchSize3 = 0, $call = 0, $cmp = 0, $cmp9 = 0, $cond = 0, $in$addr = 0, $inLen$addr = 0, $index_increment_Q16 = 0, $invRatio_Q16 = 0, $max_index_Q16 = 0, $mul = 0, $mul12 = 0; + var $mul18 = 0, $nSamplesIn = 0, $out$addr = 0, $sFIR = 0, $sFIR13 = 0, $saved_stack = 0, $shl = 0, $sub = 0, $vla = 0, $vla$alloca_mul = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $SS$addr = $SS; + $out$addr = $out; + $in$addr = $in; + $inLen$addr = $inLen; + $0 = $SS$addr; + $S = $0; + $1 = $S; + $batchSize = ((($1)) + 268|0); + $2 = HEAP32[$batchSize>>2]|0; + $3 = $S; + $FIR_Order = ((($3)) + 276|0); + $4 = HEAP32[$FIR_Order>>2]|0; + $add = (($2) + ($4))|0; + $5 = (_llvm_stacksave()|0); + $saved_stack = $5; + $vla$alloca_mul = $add<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $6 = $S; + $sFIR = ((($6)) + 24|0); + $7 = $S; + $FIR_Order1 = ((($7)) + 276|0); + $8 = HEAP32[$FIR_Order1>>2]|0; + $mul = $8<<2; + _memcpy(($vla|0),($sFIR|0),($mul|0))|0; + $9 = $S; + $Coefs = ((($9)) + 296|0); + $10 = HEAP32[$Coefs>>2]|0; + $arrayidx = ((($10)) + 4|0); + $FIR_Coefs = $arrayidx; + $11 = $S; + $invRatio_Q16 = ((($11)) + 272|0); + $12 = HEAP32[$invRatio_Q16>>2]|0; + $index_increment_Q16 = $12; + while(1) { + $13 = $inLen$addr; + $14 = $S; + $batchSize2 = ((($14)) + 268|0); + $15 = HEAP32[$batchSize2>>2]|0; + $cmp = ($13|0)<($15|0); + if ($cmp) { + $16 = $inLen$addr; + $cond = $16; + } else { + $17 = $S; + $batchSize3 = ((($17)) + 268|0); + $18 = HEAP32[$batchSize3>>2]|0; + $cond = $18; + } + $nSamplesIn = $cond; + $19 = $S; + $20 = $S; + $FIR_Order5 = ((($20)) + 276|0); + $21 = HEAP32[$FIR_Order5>>2]|0; + $arrayidx6 = (($vla) + ($21<<2)|0); + $22 = $in$addr; + $23 = $S; + $Coefs7 = ((($23)) + 296|0); + $24 = HEAP32[$Coefs7>>2]|0; + $25 = $nSamplesIn; + _silk_resampler_private_AR2($19,$arrayidx6,$22,$24,$25); + $26 = $nSamplesIn; + $shl = $26 << 16; + $max_index_Q16 = $shl; + $27 = $out$addr; + $28 = $FIR_Coefs; + $29 = $S; + $FIR_Order8 = ((($29)) + 276|0); + $30 = HEAP32[$FIR_Order8>>2]|0; + $31 = $S; + $FIR_Fracs = ((($31)) + 280|0); + $32 = HEAP32[$FIR_Fracs>>2]|0; + $33 = $max_index_Q16; + $34 = $index_increment_Q16; + $call = (_silk_resampler_private_down_FIR_INTERPOL($27,$vla,$28,$30,$32,$33,$34)|0); + $out$addr = $call; + $35 = $nSamplesIn; + $36 = $in$addr; + $add$ptr = (($36) + ($35<<1)|0); + $in$addr = $add$ptr; + $37 = $nSamplesIn; + $38 = $inLen$addr; + $sub = (($38) - ($37))|0; + $inLen$addr = $sub; + $39 = $inLen$addr; + $cmp9 = ($39|0)>(1); + if (!($cmp9)) { + break; + } + $40 = $nSamplesIn; + $arrayidx10 = (($vla) + ($40<<2)|0); + $41 = $S; + $FIR_Order11 = ((($41)) + 276|0); + $42 = HEAP32[$FIR_Order11>>2]|0; + $mul12 = $42<<2; + _memcpy(($vla|0),($arrayidx10|0),($mul12|0))|0; + } + $43 = $S; + $sFIR13 = ((($43)) + 24|0); + $44 = $nSamplesIn; + $arrayidx16 = (($vla) + ($44<<2)|0); + $45 = $S; + $FIR_Order17 = ((($45)) + 276|0); + $46 = HEAP32[$FIR_Order17>>2]|0; + $mul18 = $46<<2; + _memcpy(($sFIR13|0),($arrayidx16|0),($mul18|0))|0; + $47 = $saved_stack; + _llvm_stackrestore(($47|0)); + STACKTOP = sp;return; +} +function _silk_resampler_private_down_FIR_INTERPOL($out,$buf,$FIR_Coefs,$FIR_Order,$FIR_Fracs,$max_index_Q16,$index_increment_Q16) { + $out = $out|0; + $buf = $buf|0; + $FIR_Coefs = $FIR_Coefs|0; + $FIR_Order = $FIR_Order|0; + $FIR_Fracs = $FIR_Fracs|0; + $max_index_Q16 = $max_index_Q16|0; + $index_increment_Q16 = $index_increment_Q16|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; + var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0; + var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0; + var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0; + var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0; + var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0; + var $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0; + var $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0; + var $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0; + var $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0; + var $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; + var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; + var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $FIR_Coefs$addr = 0, $FIR_Fracs$addr = 0, $FIR_Order$addr = 0, $add = 0, $add$ptr = 0, $add$ptr271 = 0, $add$ptr507 = 0, $add111 = 0, $add112 = 0, $add124 = 0; + var $add125 = 0, $add140 = 0, $add141 = 0, $add153 = 0, $add154 = 0, $add166 = 0, $add167 = 0, $add179 = 0, $add180 = 0, $add192 = 0, $add193 = 0, $add205 = 0, $add206 = 0, $add21 = 0, $add218 = 0, $add219 = 0, $add231 = 0, $add232 = 0, $add244 = 0, $add245 = 0; + var $add247 = 0, $add252 = 0, $add259 = 0, $add264 = 0, $add274 = 0, $add281 = 0, $add287 = 0, $add290 = 0, $add297 = 0, $add303 = 0, $add304 = 0, $add307 = 0, $add314 = 0, $add320 = 0, $add321 = 0, $add324 = 0, $add33 = 0, $add331 = 0, $add337 = 0, $add338 = 0; + var $add34 = 0, $add341 = 0, $add348 = 0, $add354 = 0, $add355 = 0, $add358 = 0, $add365 = 0, $add371 = 0, $add372 = 0, $add375 = 0, $add382 = 0, $add388 = 0, $add389 = 0, $add392 = 0, $add399 = 0, $add405 = 0, $add406 = 0, $add409 = 0, $add416 = 0, $add422 = 0; + var $add423 = 0, $add426 = 0, $add433 = 0, $add439 = 0, $add440 = 0, $add443 = 0, $add450 = 0, $add456 = 0, $add457 = 0, $add46 = 0, $add460 = 0, $add467 = 0, $add47 = 0, $add473 = 0, $add474 = 0, $add476 = 0, $add483 = 0, $add490 = 0, $add499 = 0, $add510 = 0; + var $add517 = 0, $add523 = 0, $add526 = 0, $add533 = 0, $add539 = 0, $add540 = 0, $add543 = 0, $add550 = 0, $add556 = 0, $add557 = 0, $add560 = 0, $add567 = 0, $add573 = 0, $add574 = 0, $add577 = 0, $add584 = 0, $add59 = 0, $add590 = 0, $add591 = 0, $add594 = 0; + var $add60 = 0, $add601 = 0, $add607 = 0, $add608 = 0, $add611 = 0, $add618 = 0, $add624 = 0, $add625 = 0, $add628 = 0, $add635 = 0, $add641 = 0, $add642 = 0, $add645 = 0, $add652 = 0, $add658 = 0, $add659 = 0, $add662 = 0, $add669 = 0, $add675 = 0, $add676 = 0; + var $add679 = 0, $add686 = 0, $add692 = 0, $add693 = 0, $add696 = 0, $add703 = 0, $add709 = 0, $add710 = 0, $add713 = 0, $add72 = 0, $add720 = 0, $add726 = 0, $add727 = 0, $add73 = 0, $add730 = 0, $add737 = 0, $add743 = 0, $add744 = 0, $add747 = 0, $add754 = 0; + var $add760 = 0, $add761 = 0, $add764 = 0, $add771 = 0, $add777 = 0, $add778 = 0, $add781 = 0, $add788 = 0, $add794 = 0, $add795 = 0, $add798 = 0, $add805 = 0, $add811 = 0, $add812 = 0, $add814 = 0, $add821 = 0, $add828 = 0, $add837 = 0, $add85 = 0, $add86 = 0; + var $add98 = 0, $add99 = 0, $and = 0, $and106 = 0, $and119 = 0, $and135 = 0, $and148 = 0, $and16 = 0, $and161 = 0, $and174 = 0, $and187 = 0, $and200 = 0, $and213 = 0, $and226 = 0, $and239 = 0, $and28 = 0, $and282 = 0, $and298 = 0, $and3 = 0, $and315 = 0; + var $and332 = 0, $and349 = 0, $and366 = 0, $and383 = 0, $and4 = 0, $and400 = 0, $and41 = 0, $and417 = 0, $and434 = 0, $and451 = 0, $and468 = 0, $and518 = 0, $and534 = 0, $and54 = 0, $and551 = 0, $and568 = 0, $and585 = 0, $and602 = 0, $and619 = 0, $and636 = 0; + var $and653 = 0, $and67 = 0, $and670 = 0, $and687 = 0, $and704 = 0, $and721 = 0, $and738 = 0, $and755 = 0, $and772 = 0, $and789 = 0, $and80 = 0, $and806 = 0, $and93 = 0, $arrayidx = 0, $arrayidx100 = 0, $arrayidx102 = 0, $arrayidx105 = 0, $arrayidx107 = 0, $arrayidx113 = 0, $arrayidx115 = 0; + var $arrayidx118 = 0, $arrayidx120 = 0, $arrayidx128 = 0, $arrayidx129 = 0, $arrayidx134 = 0, $arrayidx142 = 0, $arrayidx144 = 0, $arrayidx147 = 0, $arrayidx149 = 0, $arrayidx155 = 0, $arrayidx157 = 0, $arrayidx160 = 0, $arrayidx162 = 0, $arrayidx168 = 0, $arrayidx170 = 0, $arrayidx173 = 0, $arrayidx175 = 0, $arrayidx181 = 0, $arrayidx183 = 0, $arrayidx186 = 0; + var $arrayidx188 = 0, $arrayidx194 = 0, $arrayidx196 = 0, $arrayidx199 = 0, $arrayidx201 = 0, $arrayidx207 = 0, $arrayidx209 = 0, $arrayidx212 = 0, $arrayidx214 = 0, $arrayidx22 = 0, $arrayidx220 = 0, $arrayidx222 = 0, $arrayidx225 = 0, $arrayidx227 = 0, $arrayidx233 = 0, $arrayidx235 = 0, $arrayidx238 = 0, $arrayidx24 = 0, $arrayidx240 = 0, $arrayidx27 = 0; + var $arrayidx273 = 0, $arrayidx280 = 0, $arrayidx288 = 0, $arrayidx289 = 0, $arrayidx29 = 0, $arrayidx292 = 0, $arrayidx295 = 0, $arrayidx296 = 0, $arrayidx299 = 0, $arrayidx305 = 0, $arrayidx306 = 0, $arrayidx309 = 0, $arrayidx312 = 0, $arrayidx313 = 0, $arrayidx316 = 0, $arrayidx322 = 0, $arrayidx323 = 0, $arrayidx326 = 0, $arrayidx329 = 0, $arrayidx330 = 0; + var $arrayidx333 = 0, $arrayidx339 = 0, $arrayidx340 = 0, $arrayidx343 = 0, $arrayidx346 = 0, $arrayidx347 = 0, $arrayidx35 = 0, $arrayidx350 = 0, $arrayidx356 = 0, $arrayidx357 = 0, $arrayidx360 = 0, $arrayidx363 = 0, $arrayidx364 = 0, $arrayidx367 = 0, $arrayidx37 = 0, $arrayidx373 = 0, $arrayidx374 = 0, $arrayidx377 = 0, $arrayidx380 = 0, $arrayidx381 = 0; + var $arrayidx384 = 0, $arrayidx390 = 0, $arrayidx391 = 0, $arrayidx394 = 0, $arrayidx397 = 0, $arrayidx398 = 0, $arrayidx40 = 0, $arrayidx401 = 0, $arrayidx407 = 0, $arrayidx408 = 0, $arrayidx411 = 0, $arrayidx414 = 0, $arrayidx415 = 0, $arrayidx418 = 0, $arrayidx42 = 0, $arrayidx424 = 0, $arrayidx425 = 0, $arrayidx428 = 0, $arrayidx431 = 0, $arrayidx432 = 0; + var $arrayidx435 = 0, $arrayidx441 = 0, $arrayidx442 = 0, $arrayidx445 = 0, $arrayidx448 = 0, $arrayidx449 = 0, $arrayidx452 = 0, $arrayidx458 = 0, $arrayidx459 = 0, $arrayidx462 = 0, $arrayidx465 = 0, $arrayidx466 = 0, $arrayidx469 = 0, $arrayidx48 = 0, $arrayidx50 = 0, $arrayidx509 = 0, $arrayidx516 = 0, $arrayidx524 = 0, $arrayidx525 = 0, $arrayidx528 = 0; + var $arrayidx53 = 0, $arrayidx531 = 0, $arrayidx532 = 0, $arrayidx535 = 0, $arrayidx541 = 0, $arrayidx542 = 0, $arrayidx545 = 0, $arrayidx548 = 0, $arrayidx549 = 0, $arrayidx55 = 0, $arrayidx552 = 0, $arrayidx558 = 0, $arrayidx559 = 0, $arrayidx562 = 0, $arrayidx565 = 0, $arrayidx566 = 0, $arrayidx569 = 0, $arrayidx575 = 0, $arrayidx576 = 0, $arrayidx579 = 0; + var $arrayidx582 = 0, $arrayidx583 = 0, $arrayidx586 = 0, $arrayidx592 = 0, $arrayidx593 = 0, $arrayidx596 = 0, $arrayidx599 = 0, $arrayidx600 = 0, $arrayidx603 = 0, $arrayidx609 = 0, $arrayidx61 = 0, $arrayidx610 = 0, $arrayidx613 = 0, $arrayidx616 = 0, $arrayidx617 = 0, $arrayidx620 = 0, $arrayidx626 = 0, $arrayidx627 = 0, $arrayidx63 = 0, $arrayidx630 = 0; + var $arrayidx633 = 0, $arrayidx634 = 0, $arrayidx637 = 0, $arrayidx643 = 0, $arrayidx644 = 0, $arrayidx647 = 0, $arrayidx650 = 0, $arrayidx651 = 0, $arrayidx654 = 0, $arrayidx66 = 0, $arrayidx660 = 0, $arrayidx661 = 0, $arrayidx664 = 0, $arrayidx667 = 0, $arrayidx668 = 0, $arrayidx671 = 0, $arrayidx677 = 0, $arrayidx678 = 0, $arrayidx68 = 0, $arrayidx681 = 0; + var $arrayidx684 = 0, $arrayidx685 = 0, $arrayidx688 = 0, $arrayidx694 = 0, $arrayidx695 = 0, $arrayidx698 = 0, $arrayidx701 = 0, $arrayidx702 = 0, $arrayidx705 = 0, $arrayidx711 = 0, $arrayidx712 = 0, $arrayidx715 = 0, $arrayidx718 = 0, $arrayidx719 = 0, $arrayidx722 = 0, $arrayidx728 = 0, $arrayidx729 = 0, $arrayidx732 = 0, $arrayidx735 = 0, $arrayidx736 = 0; + var $arrayidx739 = 0, $arrayidx74 = 0, $arrayidx745 = 0, $arrayidx746 = 0, $arrayidx749 = 0, $arrayidx752 = 0, $arrayidx753 = 0, $arrayidx756 = 0, $arrayidx76 = 0, $arrayidx762 = 0, $arrayidx763 = 0, $arrayidx766 = 0, $arrayidx769 = 0, $arrayidx770 = 0, $arrayidx773 = 0, $arrayidx779 = 0, $arrayidx780 = 0, $arrayidx783 = 0, $arrayidx786 = 0, $arrayidx787 = 0; + var $arrayidx79 = 0, $arrayidx790 = 0, $arrayidx796 = 0, $arrayidx797 = 0, $arrayidx800 = 0, $arrayidx803 = 0, $arrayidx804 = 0, $arrayidx807 = 0, $arrayidx81 = 0, $arrayidx87 = 0, $arrayidx89 = 0, $arrayidx92 = 0, $arrayidx94 = 0, $buf$addr = 0, $buf_ptr = 0, $cmp = 0, $cmp249 = 0, $cmp254 = 0, $cmp267 = 0, $cmp478 = 0; + var $cmp485 = 0, $cmp503 = 0, $cmp816 = 0, $cmp823 = 0, $cond262 = 0, $cond495 = 0, $cond833 = 0, $conv = 0, $conv103 = 0, $conv108 = 0, $conv116 = 0, $conv121 = 0, $conv13 = 0, $conv132 = 0, $conv137 = 0, $conv145 = 0, $conv150 = 0, $conv158 = 0, $conv163 = 0, $conv171 = 0; + var $conv176 = 0, $conv18 = 0, $conv184 = 0, $conv189 = 0, $conv197 = 0, $conv2 = 0, $conv202 = 0, $conv210 = 0, $conv215 = 0, $conv223 = 0, $conv228 = 0, $conv236 = 0, $conv241 = 0, $conv25 = 0, $conv263 = 0, $conv277 = 0, $conv284 = 0, $conv293 = 0, $conv30 = 0, $conv300 = 0; + var $conv310 = 0, $conv317 = 0, $conv327 = 0, $conv334 = 0, $conv344 = 0, $conv351 = 0, $conv361 = 0, $conv368 = 0, $conv378 = 0, $conv38 = 0, $conv385 = 0, $conv395 = 0, $conv402 = 0, $conv412 = 0, $conv419 = 0, $conv429 = 0, $conv43 = 0, $conv436 = 0, $conv446 = 0, $conv453 = 0; + var $conv463 = 0, $conv470 = 0, $conv496 = 0, $conv5 = 0, $conv51 = 0, $conv513 = 0, $conv520 = 0, $conv529 = 0, $conv536 = 0, $conv546 = 0, $conv553 = 0, $conv56 = 0, $conv563 = 0, $conv570 = 0, $conv580 = 0, $conv587 = 0, $conv597 = 0, $conv6 = 0, $conv604 = 0, $conv614 = 0; + var $conv621 = 0, $conv631 = 0, $conv638 = 0, $conv64 = 0, $conv648 = 0, $conv655 = 0, $conv665 = 0, $conv672 = 0, $conv682 = 0, $conv689 = 0, $conv69 = 0, $conv699 = 0, $conv706 = 0, $conv716 = 0, $conv723 = 0, $conv733 = 0, $conv740 = 0, $conv750 = 0, $conv757 = 0, $conv767 = 0; + var $conv77 = 0, $conv774 = 0, $conv784 = 0, $conv791 = 0, $conv801 = 0, $conv808 = 0, $conv82 = 0, $conv834 = 0, $conv90 = 0, $conv95 = 0, $incdec$ptr = 0, $incdec$ptr497 = 0, $incdec$ptr835 = 0, $index_Q16 = 0, $index_increment_Q16$addr = 0, $interpol_ind = 0, $interpol_ptr = 0, $max_index_Q16$addr = 0, $mul = 0, $mul104 = 0; + var $mul109 = 0, $mul117 = 0, $mul122 = 0, $mul127 = 0, $mul133 = 0, $mul138 = 0, $mul14 = 0, $mul146 = 0, $mul151 = 0, $mul159 = 0, $mul164 = 0, $mul172 = 0, $mul177 = 0, $mul185 = 0, $mul19 = 0, $mul190 = 0, $mul198 = 0, $mul203 = 0, $mul211 = 0, $mul216 = 0; + var $mul224 = 0, $mul229 = 0, $mul237 = 0, $mul242 = 0, $mul26 = 0, $mul278 = 0, $mul285 = 0, $mul294 = 0, $mul301 = 0, $mul31 = 0, $mul311 = 0, $mul318 = 0, $mul328 = 0, $mul335 = 0, $mul345 = 0, $mul352 = 0, $mul362 = 0, $mul369 = 0, $mul379 = 0, $mul386 = 0; + var $mul39 = 0, $mul396 = 0, $mul403 = 0, $mul413 = 0, $mul420 = 0, $mul430 = 0, $mul437 = 0, $mul44 = 0, $mul447 = 0, $mul454 = 0, $mul464 = 0, $mul471 = 0, $mul514 = 0, $mul52 = 0, $mul521 = 0, $mul530 = 0, $mul537 = 0, $mul547 = 0, $mul554 = 0, $mul564 = 0; + var $mul57 = 0, $mul571 = 0, $mul581 = 0, $mul588 = 0, $mul598 = 0, $mul605 = 0, $mul615 = 0, $mul622 = 0, $mul632 = 0, $mul639 = 0, $mul649 = 0, $mul65 = 0, $mul656 = 0, $mul666 = 0, $mul673 = 0, $mul683 = 0, $mul690 = 0, $mul7 = 0, $mul70 = 0, $mul700 = 0; + var $mul707 = 0, $mul717 = 0, $mul724 = 0, $mul734 = 0, $mul741 = 0, $mul751 = 0, $mul758 = 0, $mul768 = 0, $mul775 = 0, $mul78 = 0, $mul785 = 0, $mul792 = 0, $mul802 = 0, $mul809 = 0, $mul83 = 0, $mul9 = 0, $mul91 = 0, $mul96 = 0, $out$addr = 0, $res_Q6 = 0; + var $shr = 0, $shr1 = 0, $shr101 = 0, $shr11 = 0, $shr110 = 0, $shr114 = 0, $shr123 = 0, $shr130 = 0, $shr139 = 0, $shr143 = 0, $shr152 = 0, $shr156 = 0, $shr165 = 0, $shr169 = 0, $shr178 = 0, $shr182 = 0, $shr191 = 0, $shr195 = 0, $shr20 = 0, $shr204 = 0; + var $shr208 = 0, $shr217 = 0, $shr221 = 0, $shr23 = 0, $shr230 = 0, $shr234 = 0, $shr243 = 0, $shr246 = 0, $shr248 = 0, $shr251 = 0, $shr253 = 0, $shr258 = 0, $shr260 = 0, $shr270 = 0, $shr275 = 0, $shr286 = 0, $shr291 = 0, $shr302 = 0, $shr308 = 0, $shr319 = 0; + var $shr32 = 0, $shr325 = 0, $shr336 = 0, $shr342 = 0, $shr353 = 0, $shr359 = 0, $shr36 = 0, $shr370 = 0, $shr376 = 0, $shr387 = 0, $shr393 = 0, $shr404 = 0, $shr410 = 0, $shr421 = 0, $shr427 = 0, $shr438 = 0, $shr444 = 0, $shr45 = 0, $shr455 = 0, $shr461 = 0; + var $shr472 = 0, $shr475 = 0, $shr477 = 0, $shr482 = 0, $shr484 = 0, $shr489 = 0, $shr49 = 0, $shr491 = 0, $shr506 = 0, $shr511 = 0, $shr522 = 0, $shr527 = 0, $shr538 = 0, $shr544 = 0, $shr555 = 0, $shr561 = 0, $shr572 = 0, $shr578 = 0, $shr58 = 0, $shr589 = 0; + var $shr595 = 0, $shr606 = 0, $shr612 = 0, $shr62 = 0, $shr623 = 0, $shr629 = 0, $shr640 = 0, $shr646 = 0, $shr657 = 0, $shr663 = 0, $shr674 = 0, $shr680 = 0, $shr691 = 0, $shr697 = 0, $shr708 = 0, $shr71 = 0, $shr714 = 0, $shr725 = 0, $shr731 = 0, $shr742 = 0; + var $shr748 = 0, $shr75 = 0, $shr759 = 0, $shr765 = 0, $shr776 = 0, $shr782 = 0, $shr793 = 0, $shr799 = 0, $shr8 = 0, $shr810 = 0, $shr813 = 0, $shr815 = 0, $shr820 = 0, $shr822 = 0, $shr827 = 0, $shr829 = 0, $shr84 = 0, $shr88 = 0, $shr97 = 0, $sub = 0; + var $sub126 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $out$addr = $out; + $buf$addr = $buf; + $FIR_Coefs$addr = $FIR_Coefs; + $FIR_Order$addr = $FIR_Order; + $FIR_Fracs$addr = $FIR_Fracs; + $max_index_Q16$addr = $max_index_Q16; + $index_increment_Q16$addr = $index_increment_Q16; + $0 = $FIR_Order$addr; + switch ($0|0) { + case 18: { + $index_Q16 = 0; + while(1) { + $1 = $index_Q16; + $2 = $max_index_Q16$addr; + $cmp = ($1|0)<($2|0); + if (!($cmp)) { + break; + } + $3 = $buf$addr; + $4 = $index_Q16; + $shr = $4 >> 16; + $add$ptr = (($3) + ($shr<<2)|0); + $buf_ptr = $add$ptr; + $5 = $index_Q16; + $and = $5 & 65535; + $shr1 = $and >> 16; + $6 = $FIR_Fracs$addr; + $conv = $6&65535; + $conv2 = $conv << 16 >> 16; + $mul = Math_imul($shr1, $conv2)|0; + $7 = $index_Q16; + $and3 = $7 & 65535; + $and4 = $and3 & 65535; + $8 = $FIR_Fracs$addr; + $conv5 = $8&65535; + $conv6 = $conv5 << 16 >> 16; + $mul7 = Math_imul($and4, $conv6)|0; + $shr8 = $mul7 >> 16; + $add = (($mul) + ($shr8))|0; + $interpol_ind = $add; + $9 = $FIR_Coefs$addr; + $10 = $interpol_ind; + $mul9 = ($10*9)|0; + $arrayidx = (($9) + ($mul9<<1)|0); + $interpol_ptr = $arrayidx; + $11 = $buf_ptr; + $12 = HEAP32[$11>>2]|0; + $shr11 = $12 >> 16; + $13 = $interpol_ptr; + $14 = HEAP16[$13>>1]|0; + $conv13 = $14 << 16 >> 16; + $mul14 = Math_imul($shr11, $conv13)|0; + $15 = $buf_ptr; + $16 = HEAP32[$15>>2]|0; + $and16 = $16 & 65535; + $17 = $interpol_ptr; + $18 = HEAP16[$17>>1]|0; + $conv18 = $18 << 16 >> 16; + $mul19 = Math_imul($and16, $conv18)|0; + $shr20 = $mul19 >> 16; + $add21 = (($mul14) + ($shr20))|0; + $res_Q6 = $add21; + $19 = $res_Q6; + $20 = $buf_ptr; + $arrayidx22 = ((($20)) + 4|0); + $21 = HEAP32[$arrayidx22>>2]|0; + $shr23 = $21 >> 16; + $22 = $interpol_ptr; + $arrayidx24 = ((($22)) + 2|0); + $23 = HEAP16[$arrayidx24>>1]|0; + $conv25 = $23 << 16 >> 16; + $mul26 = Math_imul($shr23, $conv25)|0; + $24 = $buf_ptr; + $arrayidx27 = ((($24)) + 4|0); + $25 = HEAP32[$arrayidx27>>2]|0; + $and28 = $25 & 65535; + $26 = $interpol_ptr; + $arrayidx29 = ((($26)) + 2|0); + $27 = HEAP16[$arrayidx29>>1]|0; + $conv30 = $27 << 16 >> 16; + $mul31 = Math_imul($and28, $conv30)|0; + $shr32 = $mul31 >> 16; + $add33 = (($mul26) + ($shr32))|0; + $add34 = (($19) + ($add33))|0; + $res_Q6 = $add34; + $28 = $res_Q6; + $29 = $buf_ptr; + $arrayidx35 = ((($29)) + 8|0); + $30 = HEAP32[$arrayidx35>>2]|0; + $shr36 = $30 >> 16; + $31 = $interpol_ptr; + $arrayidx37 = ((($31)) + 4|0); + $32 = HEAP16[$arrayidx37>>1]|0; + $conv38 = $32 << 16 >> 16; + $mul39 = Math_imul($shr36, $conv38)|0; + $33 = $buf_ptr; + $arrayidx40 = ((($33)) + 8|0); + $34 = HEAP32[$arrayidx40>>2]|0; + $and41 = $34 & 65535; + $35 = $interpol_ptr; + $arrayidx42 = ((($35)) + 4|0); + $36 = HEAP16[$arrayidx42>>1]|0; + $conv43 = $36 << 16 >> 16; + $mul44 = Math_imul($and41, $conv43)|0; + $shr45 = $mul44 >> 16; + $add46 = (($mul39) + ($shr45))|0; + $add47 = (($28) + ($add46))|0; + $res_Q6 = $add47; + $37 = $res_Q6; + $38 = $buf_ptr; + $arrayidx48 = ((($38)) + 12|0); + $39 = HEAP32[$arrayidx48>>2]|0; + $shr49 = $39 >> 16; + $40 = $interpol_ptr; + $arrayidx50 = ((($40)) + 6|0); + $41 = HEAP16[$arrayidx50>>1]|0; + $conv51 = $41 << 16 >> 16; + $mul52 = Math_imul($shr49, $conv51)|0; + $42 = $buf_ptr; + $arrayidx53 = ((($42)) + 12|0); + $43 = HEAP32[$arrayidx53>>2]|0; + $and54 = $43 & 65535; + $44 = $interpol_ptr; + $arrayidx55 = ((($44)) + 6|0); + $45 = HEAP16[$arrayidx55>>1]|0; + $conv56 = $45 << 16 >> 16; + $mul57 = Math_imul($and54, $conv56)|0; + $shr58 = $mul57 >> 16; + $add59 = (($mul52) + ($shr58))|0; + $add60 = (($37) + ($add59))|0; + $res_Q6 = $add60; + $46 = $res_Q6; + $47 = $buf_ptr; + $arrayidx61 = ((($47)) + 16|0); + $48 = HEAP32[$arrayidx61>>2]|0; + $shr62 = $48 >> 16; + $49 = $interpol_ptr; + $arrayidx63 = ((($49)) + 8|0); + $50 = HEAP16[$arrayidx63>>1]|0; + $conv64 = $50 << 16 >> 16; + $mul65 = Math_imul($shr62, $conv64)|0; + $51 = $buf_ptr; + $arrayidx66 = ((($51)) + 16|0); + $52 = HEAP32[$arrayidx66>>2]|0; + $and67 = $52 & 65535; + $53 = $interpol_ptr; + $arrayidx68 = ((($53)) + 8|0); + $54 = HEAP16[$arrayidx68>>1]|0; + $conv69 = $54 << 16 >> 16; + $mul70 = Math_imul($and67, $conv69)|0; + $shr71 = $mul70 >> 16; + $add72 = (($mul65) + ($shr71))|0; + $add73 = (($46) + ($add72))|0; + $res_Q6 = $add73; + $55 = $res_Q6; + $56 = $buf_ptr; + $arrayidx74 = ((($56)) + 20|0); + $57 = HEAP32[$arrayidx74>>2]|0; + $shr75 = $57 >> 16; + $58 = $interpol_ptr; + $arrayidx76 = ((($58)) + 10|0); + $59 = HEAP16[$arrayidx76>>1]|0; + $conv77 = $59 << 16 >> 16; + $mul78 = Math_imul($shr75, $conv77)|0; + $60 = $buf_ptr; + $arrayidx79 = ((($60)) + 20|0); + $61 = HEAP32[$arrayidx79>>2]|0; + $and80 = $61 & 65535; + $62 = $interpol_ptr; + $arrayidx81 = ((($62)) + 10|0); + $63 = HEAP16[$arrayidx81>>1]|0; + $conv82 = $63 << 16 >> 16; + $mul83 = Math_imul($and80, $conv82)|0; + $shr84 = $mul83 >> 16; + $add85 = (($mul78) + ($shr84))|0; + $add86 = (($55) + ($add85))|0; + $res_Q6 = $add86; + $64 = $res_Q6; + $65 = $buf_ptr; + $arrayidx87 = ((($65)) + 24|0); + $66 = HEAP32[$arrayidx87>>2]|0; + $shr88 = $66 >> 16; + $67 = $interpol_ptr; + $arrayidx89 = ((($67)) + 12|0); + $68 = HEAP16[$arrayidx89>>1]|0; + $conv90 = $68 << 16 >> 16; + $mul91 = Math_imul($shr88, $conv90)|0; + $69 = $buf_ptr; + $arrayidx92 = ((($69)) + 24|0); + $70 = HEAP32[$arrayidx92>>2]|0; + $and93 = $70 & 65535; + $71 = $interpol_ptr; + $arrayidx94 = ((($71)) + 12|0); + $72 = HEAP16[$arrayidx94>>1]|0; + $conv95 = $72 << 16 >> 16; + $mul96 = Math_imul($and93, $conv95)|0; + $shr97 = $mul96 >> 16; + $add98 = (($mul91) + ($shr97))|0; + $add99 = (($64) + ($add98))|0; + $res_Q6 = $add99; + $73 = $res_Q6; + $74 = $buf_ptr; + $arrayidx100 = ((($74)) + 28|0); + $75 = HEAP32[$arrayidx100>>2]|0; + $shr101 = $75 >> 16; + $76 = $interpol_ptr; + $arrayidx102 = ((($76)) + 14|0); + $77 = HEAP16[$arrayidx102>>1]|0; + $conv103 = $77 << 16 >> 16; + $mul104 = Math_imul($shr101, $conv103)|0; + $78 = $buf_ptr; + $arrayidx105 = ((($78)) + 28|0); + $79 = HEAP32[$arrayidx105>>2]|0; + $and106 = $79 & 65535; + $80 = $interpol_ptr; + $arrayidx107 = ((($80)) + 14|0); + $81 = HEAP16[$arrayidx107>>1]|0; + $conv108 = $81 << 16 >> 16; + $mul109 = Math_imul($and106, $conv108)|0; + $shr110 = $mul109 >> 16; + $add111 = (($mul104) + ($shr110))|0; + $add112 = (($73) + ($add111))|0; + $res_Q6 = $add112; + $82 = $res_Q6; + $83 = $buf_ptr; + $arrayidx113 = ((($83)) + 32|0); + $84 = HEAP32[$arrayidx113>>2]|0; + $shr114 = $84 >> 16; + $85 = $interpol_ptr; + $arrayidx115 = ((($85)) + 16|0); + $86 = HEAP16[$arrayidx115>>1]|0; + $conv116 = $86 << 16 >> 16; + $mul117 = Math_imul($shr114, $conv116)|0; + $87 = $buf_ptr; + $arrayidx118 = ((($87)) + 32|0); + $88 = HEAP32[$arrayidx118>>2]|0; + $and119 = $88 & 65535; + $89 = $interpol_ptr; + $arrayidx120 = ((($89)) + 16|0); + $90 = HEAP16[$arrayidx120>>1]|0; + $conv121 = $90 << 16 >> 16; + $mul122 = Math_imul($and119, $conv121)|0; + $shr123 = $mul122 >> 16; + $add124 = (($mul117) + ($shr123))|0; + $add125 = (($82) + ($add124))|0; + $res_Q6 = $add125; + $91 = $FIR_Coefs$addr; + $92 = $FIR_Fracs$addr; + $sub = (($92) - 1)|0; + $93 = $interpol_ind; + $sub126 = (($sub) - ($93))|0; + $mul127 = ($sub126*9)|0; + $arrayidx128 = (($91) + ($mul127<<1)|0); + $interpol_ptr = $arrayidx128; + $94 = $res_Q6; + $95 = $buf_ptr; + $arrayidx129 = ((($95)) + 68|0); + $96 = HEAP32[$arrayidx129>>2]|0; + $shr130 = $96 >> 16; + $97 = $interpol_ptr; + $98 = HEAP16[$97>>1]|0; + $conv132 = $98 << 16 >> 16; + $mul133 = Math_imul($shr130, $conv132)|0; + $99 = $buf_ptr; + $arrayidx134 = ((($99)) + 68|0); + $100 = HEAP32[$arrayidx134>>2]|0; + $and135 = $100 & 65535; + $101 = $interpol_ptr; + $102 = HEAP16[$101>>1]|0; + $conv137 = $102 << 16 >> 16; + $mul138 = Math_imul($and135, $conv137)|0; + $shr139 = $mul138 >> 16; + $add140 = (($mul133) + ($shr139))|0; + $add141 = (($94) + ($add140))|0; + $res_Q6 = $add141; + $103 = $res_Q6; + $104 = $buf_ptr; + $arrayidx142 = ((($104)) + 64|0); + $105 = HEAP32[$arrayidx142>>2]|0; + $shr143 = $105 >> 16; + $106 = $interpol_ptr; + $arrayidx144 = ((($106)) + 2|0); + $107 = HEAP16[$arrayidx144>>1]|0; + $conv145 = $107 << 16 >> 16; + $mul146 = Math_imul($shr143, $conv145)|0; + $108 = $buf_ptr; + $arrayidx147 = ((($108)) + 64|0); + $109 = HEAP32[$arrayidx147>>2]|0; + $and148 = $109 & 65535; + $110 = $interpol_ptr; + $arrayidx149 = ((($110)) + 2|0); + $111 = HEAP16[$arrayidx149>>1]|0; + $conv150 = $111 << 16 >> 16; + $mul151 = Math_imul($and148, $conv150)|0; + $shr152 = $mul151 >> 16; + $add153 = (($mul146) + ($shr152))|0; + $add154 = (($103) + ($add153))|0; + $res_Q6 = $add154; + $112 = $res_Q6; + $113 = $buf_ptr; + $arrayidx155 = ((($113)) + 60|0); + $114 = HEAP32[$arrayidx155>>2]|0; + $shr156 = $114 >> 16; + $115 = $interpol_ptr; + $arrayidx157 = ((($115)) + 4|0); + $116 = HEAP16[$arrayidx157>>1]|0; + $conv158 = $116 << 16 >> 16; + $mul159 = Math_imul($shr156, $conv158)|0; + $117 = $buf_ptr; + $arrayidx160 = ((($117)) + 60|0); + $118 = HEAP32[$arrayidx160>>2]|0; + $and161 = $118 & 65535; + $119 = $interpol_ptr; + $arrayidx162 = ((($119)) + 4|0); + $120 = HEAP16[$arrayidx162>>1]|0; + $conv163 = $120 << 16 >> 16; + $mul164 = Math_imul($and161, $conv163)|0; + $shr165 = $mul164 >> 16; + $add166 = (($mul159) + ($shr165))|0; + $add167 = (($112) + ($add166))|0; + $res_Q6 = $add167; + $121 = $res_Q6; + $122 = $buf_ptr; + $arrayidx168 = ((($122)) + 56|0); + $123 = HEAP32[$arrayidx168>>2]|0; + $shr169 = $123 >> 16; + $124 = $interpol_ptr; + $arrayidx170 = ((($124)) + 6|0); + $125 = HEAP16[$arrayidx170>>1]|0; + $conv171 = $125 << 16 >> 16; + $mul172 = Math_imul($shr169, $conv171)|0; + $126 = $buf_ptr; + $arrayidx173 = ((($126)) + 56|0); + $127 = HEAP32[$arrayidx173>>2]|0; + $and174 = $127 & 65535; + $128 = $interpol_ptr; + $arrayidx175 = ((($128)) + 6|0); + $129 = HEAP16[$arrayidx175>>1]|0; + $conv176 = $129 << 16 >> 16; + $mul177 = Math_imul($and174, $conv176)|0; + $shr178 = $mul177 >> 16; + $add179 = (($mul172) + ($shr178))|0; + $add180 = (($121) + ($add179))|0; + $res_Q6 = $add180; + $130 = $res_Q6; + $131 = $buf_ptr; + $arrayidx181 = ((($131)) + 52|0); + $132 = HEAP32[$arrayidx181>>2]|0; + $shr182 = $132 >> 16; + $133 = $interpol_ptr; + $arrayidx183 = ((($133)) + 8|0); + $134 = HEAP16[$arrayidx183>>1]|0; + $conv184 = $134 << 16 >> 16; + $mul185 = Math_imul($shr182, $conv184)|0; + $135 = $buf_ptr; + $arrayidx186 = ((($135)) + 52|0); + $136 = HEAP32[$arrayidx186>>2]|0; + $and187 = $136 & 65535; + $137 = $interpol_ptr; + $arrayidx188 = ((($137)) + 8|0); + $138 = HEAP16[$arrayidx188>>1]|0; + $conv189 = $138 << 16 >> 16; + $mul190 = Math_imul($and187, $conv189)|0; + $shr191 = $mul190 >> 16; + $add192 = (($mul185) + ($shr191))|0; + $add193 = (($130) + ($add192))|0; + $res_Q6 = $add193; + $139 = $res_Q6; + $140 = $buf_ptr; + $arrayidx194 = ((($140)) + 48|0); + $141 = HEAP32[$arrayidx194>>2]|0; + $shr195 = $141 >> 16; + $142 = $interpol_ptr; + $arrayidx196 = ((($142)) + 10|0); + $143 = HEAP16[$arrayidx196>>1]|0; + $conv197 = $143 << 16 >> 16; + $mul198 = Math_imul($shr195, $conv197)|0; + $144 = $buf_ptr; + $arrayidx199 = ((($144)) + 48|0); + $145 = HEAP32[$arrayidx199>>2]|0; + $and200 = $145 & 65535; + $146 = $interpol_ptr; + $arrayidx201 = ((($146)) + 10|0); + $147 = HEAP16[$arrayidx201>>1]|0; + $conv202 = $147 << 16 >> 16; + $mul203 = Math_imul($and200, $conv202)|0; + $shr204 = $mul203 >> 16; + $add205 = (($mul198) + ($shr204))|0; + $add206 = (($139) + ($add205))|0; + $res_Q6 = $add206; + $148 = $res_Q6; + $149 = $buf_ptr; + $arrayidx207 = ((($149)) + 44|0); + $150 = HEAP32[$arrayidx207>>2]|0; + $shr208 = $150 >> 16; + $151 = $interpol_ptr; + $arrayidx209 = ((($151)) + 12|0); + $152 = HEAP16[$arrayidx209>>1]|0; + $conv210 = $152 << 16 >> 16; + $mul211 = Math_imul($shr208, $conv210)|0; + $153 = $buf_ptr; + $arrayidx212 = ((($153)) + 44|0); + $154 = HEAP32[$arrayidx212>>2]|0; + $and213 = $154 & 65535; + $155 = $interpol_ptr; + $arrayidx214 = ((($155)) + 12|0); + $156 = HEAP16[$arrayidx214>>1]|0; + $conv215 = $156 << 16 >> 16; + $mul216 = Math_imul($and213, $conv215)|0; + $shr217 = $mul216 >> 16; + $add218 = (($mul211) + ($shr217))|0; + $add219 = (($148) + ($add218))|0; + $res_Q6 = $add219; + $157 = $res_Q6; + $158 = $buf_ptr; + $arrayidx220 = ((($158)) + 40|0); + $159 = HEAP32[$arrayidx220>>2]|0; + $shr221 = $159 >> 16; + $160 = $interpol_ptr; + $arrayidx222 = ((($160)) + 14|0); + $161 = HEAP16[$arrayidx222>>1]|0; + $conv223 = $161 << 16 >> 16; + $mul224 = Math_imul($shr221, $conv223)|0; + $162 = $buf_ptr; + $arrayidx225 = ((($162)) + 40|0); + $163 = HEAP32[$arrayidx225>>2]|0; + $and226 = $163 & 65535; + $164 = $interpol_ptr; + $arrayidx227 = ((($164)) + 14|0); + $165 = HEAP16[$arrayidx227>>1]|0; + $conv228 = $165 << 16 >> 16; + $mul229 = Math_imul($and226, $conv228)|0; + $shr230 = $mul229 >> 16; + $add231 = (($mul224) + ($shr230))|0; + $add232 = (($157) + ($add231))|0; + $res_Q6 = $add232; + $166 = $res_Q6; + $167 = $buf_ptr; + $arrayidx233 = ((($167)) + 36|0); + $168 = HEAP32[$arrayidx233>>2]|0; + $shr234 = $168 >> 16; + $169 = $interpol_ptr; + $arrayidx235 = ((($169)) + 16|0); + $170 = HEAP16[$arrayidx235>>1]|0; + $conv236 = $170 << 16 >> 16; + $mul237 = Math_imul($shr234, $conv236)|0; + $171 = $buf_ptr; + $arrayidx238 = ((($171)) + 36|0); + $172 = HEAP32[$arrayidx238>>2]|0; + $and239 = $172 & 65535; + $173 = $interpol_ptr; + $arrayidx240 = ((($173)) + 16|0); + $174 = HEAP16[$arrayidx240>>1]|0; + $conv241 = $174 << 16 >> 16; + $mul242 = Math_imul($and239, $conv241)|0; + $shr243 = $mul242 >> 16; + $add244 = (($mul237) + ($shr243))|0; + $add245 = (($166) + ($add244))|0; + $res_Q6 = $add245; + $175 = $res_Q6; + $shr246 = $175 >> 5; + $add247 = (($shr246) + 1)|0; + $shr248 = $add247 >> 1; + $cmp249 = ($shr248|0)>(32767); + if ($cmp249) { + $cond262 = 32767; + } else { + $176 = $res_Q6; + $shr251 = $176 >> 5; + $add252 = (($shr251) + 1)|0; + $shr253 = $add252 >> 1; + $cmp254 = ($shr253|0)<(-32768); + if ($cmp254) { + $cond262 = -32768; + } else { + $177 = $res_Q6; + $shr258 = $177 >> 5; + $add259 = (($shr258) + 1)|0; + $shr260 = $add259 >> 1; + $cond262 = $shr260; + } + } + $conv263 = $cond262&65535; + $178 = $out$addr; + $incdec$ptr = ((($178)) + 2|0); + $out$addr = $incdec$ptr; + HEAP16[$178>>1] = $conv263; + $179 = $index_increment_Q16$addr; + $180 = $index_Q16; + $add264 = (($180) + ($179))|0; + $index_Q16 = $add264; + } + $589 = $out$addr; + STACKTOP = sp;return ($589|0); + break; + } + case 24: { + $index_Q16 = 0; + while(1) { + $181 = $index_Q16; + $182 = $max_index_Q16$addr; + $cmp267 = ($181|0)<($182|0); + if (!($cmp267)) { + break; + } + $183 = $buf$addr; + $184 = $index_Q16; + $shr270 = $184 >> 16; + $add$ptr271 = (($183) + ($shr270<<2)|0); + $buf_ptr = $add$ptr271; + $185 = $buf_ptr; + $186 = HEAP32[$185>>2]|0; + $187 = $buf_ptr; + $arrayidx273 = ((($187)) + 92|0); + $188 = HEAP32[$arrayidx273>>2]|0; + $add274 = (($186) + ($188))|0; + $shr275 = $add274 >> 16; + $189 = $FIR_Coefs$addr; + $190 = HEAP16[$189>>1]|0; + $conv277 = $190 << 16 >> 16; + $mul278 = Math_imul($shr275, $conv277)|0; + $191 = $buf_ptr; + $192 = HEAP32[$191>>2]|0; + $193 = $buf_ptr; + $arrayidx280 = ((($193)) + 92|0); + $194 = HEAP32[$arrayidx280>>2]|0; + $add281 = (($192) + ($194))|0; + $and282 = $add281 & 65535; + $195 = $FIR_Coefs$addr; + $196 = HEAP16[$195>>1]|0; + $conv284 = $196 << 16 >> 16; + $mul285 = Math_imul($and282, $conv284)|0; + $shr286 = $mul285 >> 16; + $add287 = (($mul278) + ($shr286))|0; + $res_Q6 = $add287; + $197 = $res_Q6; + $198 = $buf_ptr; + $arrayidx288 = ((($198)) + 4|0); + $199 = HEAP32[$arrayidx288>>2]|0; + $200 = $buf_ptr; + $arrayidx289 = ((($200)) + 88|0); + $201 = HEAP32[$arrayidx289>>2]|0; + $add290 = (($199) + ($201))|0; + $shr291 = $add290 >> 16; + $202 = $FIR_Coefs$addr; + $arrayidx292 = ((($202)) + 2|0); + $203 = HEAP16[$arrayidx292>>1]|0; + $conv293 = $203 << 16 >> 16; + $mul294 = Math_imul($shr291, $conv293)|0; + $204 = $buf_ptr; + $arrayidx295 = ((($204)) + 4|0); + $205 = HEAP32[$arrayidx295>>2]|0; + $206 = $buf_ptr; + $arrayidx296 = ((($206)) + 88|0); + $207 = HEAP32[$arrayidx296>>2]|0; + $add297 = (($205) + ($207))|0; + $and298 = $add297 & 65535; + $208 = $FIR_Coefs$addr; + $arrayidx299 = ((($208)) + 2|0); + $209 = HEAP16[$arrayidx299>>1]|0; + $conv300 = $209 << 16 >> 16; + $mul301 = Math_imul($and298, $conv300)|0; + $shr302 = $mul301 >> 16; + $add303 = (($mul294) + ($shr302))|0; + $add304 = (($197) + ($add303))|0; + $res_Q6 = $add304; + $210 = $res_Q6; + $211 = $buf_ptr; + $arrayidx305 = ((($211)) + 8|0); + $212 = HEAP32[$arrayidx305>>2]|0; + $213 = $buf_ptr; + $arrayidx306 = ((($213)) + 84|0); + $214 = HEAP32[$arrayidx306>>2]|0; + $add307 = (($212) + ($214))|0; + $shr308 = $add307 >> 16; + $215 = $FIR_Coefs$addr; + $arrayidx309 = ((($215)) + 4|0); + $216 = HEAP16[$arrayidx309>>1]|0; + $conv310 = $216 << 16 >> 16; + $mul311 = Math_imul($shr308, $conv310)|0; + $217 = $buf_ptr; + $arrayidx312 = ((($217)) + 8|0); + $218 = HEAP32[$arrayidx312>>2]|0; + $219 = $buf_ptr; + $arrayidx313 = ((($219)) + 84|0); + $220 = HEAP32[$arrayidx313>>2]|0; + $add314 = (($218) + ($220))|0; + $and315 = $add314 & 65535; + $221 = $FIR_Coefs$addr; + $arrayidx316 = ((($221)) + 4|0); + $222 = HEAP16[$arrayidx316>>1]|0; + $conv317 = $222 << 16 >> 16; + $mul318 = Math_imul($and315, $conv317)|0; + $shr319 = $mul318 >> 16; + $add320 = (($mul311) + ($shr319))|0; + $add321 = (($210) + ($add320))|0; + $res_Q6 = $add321; + $223 = $res_Q6; + $224 = $buf_ptr; + $arrayidx322 = ((($224)) + 12|0); + $225 = HEAP32[$arrayidx322>>2]|0; + $226 = $buf_ptr; + $arrayidx323 = ((($226)) + 80|0); + $227 = HEAP32[$arrayidx323>>2]|0; + $add324 = (($225) + ($227))|0; + $shr325 = $add324 >> 16; + $228 = $FIR_Coefs$addr; + $arrayidx326 = ((($228)) + 6|0); + $229 = HEAP16[$arrayidx326>>1]|0; + $conv327 = $229 << 16 >> 16; + $mul328 = Math_imul($shr325, $conv327)|0; + $230 = $buf_ptr; + $arrayidx329 = ((($230)) + 12|0); + $231 = HEAP32[$arrayidx329>>2]|0; + $232 = $buf_ptr; + $arrayidx330 = ((($232)) + 80|0); + $233 = HEAP32[$arrayidx330>>2]|0; + $add331 = (($231) + ($233))|0; + $and332 = $add331 & 65535; + $234 = $FIR_Coefs$addr; + $arrayidx333 = ((($234)) + 6|0); + $235 = HEAP16[$arrayidx333>>1]|0; + $conv334 = $235 << 16 >> 16; + $mul335 = Math_imul($and332, $conv334)|0; + $shr336 = $mul335 >> 16; + $add337 = (($mul328) + ($shr336))|0; + $add338 = (($223) + ($add337))|0; + $res_Q6 = $add338; + $236 = $res_Q6; + $237 = $buf_ptr; + $arrayidx339 = ((($237)) + 16|0); + $238 = HEAP32[$arrayidx339>>2]|0; + $239 = $buf_ptr; + $arrayidx340 = ((($239)) + 76|0); + $240 = HEAP32[$arrayidx340>>2]|0; + $add341 = (($238) + ($240))|0; + $shr342 = $add341 >> 16; + $241 = $FIR_Coefs$addr; + $arrayidx343 = ((($241)) + 8|0); + $242 = HEAP16[$arrayidx343>>1]|0; + $conv344 = $242 << 16 >> 16; + $mul345 = Math_imul($shr342, $conv344)|0; + $243 = $buf_ptr; + $arrayidx346 = ((($243)) + 16|0); + $244 = HEAP32[$arrayidx346>>2]|0; + $245 = $buf_ptr; + $arrayidx347 = ((($245)) + 76|0); + $246 = HEAP32[$arrayidx347>>2]|0; + $add348 = (($244) + ($246))|0; + $and349 = $add348 & 65535; + $247 = $FIR_Coefs$addr; + $arrayidx350 = ((($247)) + 8|0); + $248 = HEAP16[$arrayidx350>>1]|0; + $conv351 = $248 << 16 >> 16; + $mul352 = Math_imul($and349, $conv351)|0; + $shr353 = $mul352 >> 16; + $add354 = (($mul345) + ($shr353))|0; + $add355 = (($236) + ($add354))|0; + $res_Q6 = $add355; + $249 = $res_Q6; + $250 = $buf_ptr; + $arrayidx356 = ((($250)) + 20|0); + $251 = HEAP32[$arrayidx356>>2]|0; + $252 = $buf_ptr; + $arrayidx357 = ((($252)) + 72|0); + $253 = HEAP32[$arrayidx357>>2]|0; + $add358 = (($251) + ($253))|0; + $shr359 = $add358 >> 16; + $254 = $FIR_Coefs$addr; + $arrayidx360 = ((($254)) + 10|0); + $255 = HEAP16[$arrayidx360>>1]|0; + $conv361 = $255 << 16 >> 16; + $mul362 = Math_imul($shr359, $conv361)|0; + $256 = $buf_ptr; + $arrayidx363 = ((($256)) + 20|0); + $257 = HEAP32[$arrayidx363>>2]|0; + $258 = $buf_ptr; + $arrayidx364 = ((($258)) + 72|0); + $259 = HEAP32[$arrayidx364>>2]|0; + $add365 = (($257) + ($259))|0; + $and366 = $add365 & 65535; + $260 = $FIR_Coefs$addr; + $arrayidx367 = ((($260)) + 10|0); + $261 = HEAP16[$arrayidx367>>1]|0; + $conv368 = $261 << 16 >> 16; + $mul369 = Math_imul($and366, $conv368)|0; + $shr370 = $mul369 >> 16; + $add371 = (($mul362) + ($shr370))|0; + $add372 = (($249) + ($add371))|0; + $res_Q6 = $add372; + $262 = $res_Q6; + $263 = $buf_ptr; + $arrayidx373 = ((($263)) + 24|0); + $264 = HEAP32[$arrayidx373>>2]|0; + $265 = $buf_ptr; + $arrayidx374 = ((($265)) + 68|0); + $266 = HEAP32[$arrayidx374>>2]|0; + $add375 = (($264) + ($266))|0; + $shr376 = $add375 >> 16; + $267 = $FIR_Coefs$addr; + $arrayidx377 = ((($267)) + 12|0); + $268 = HEAP16[$arrayidx377>>1]|0; + $conv378 = $268 << 16 >> 16; + $mul379 = Math_imul($shr376, $conv378)|0; + $269 = $buf_ptr; + $arrayidx380 = ((($269)) + 24|0); + $270 = HEAP32[$arrayidx380>>2]|0; + $271 = $buf_ptr; + $arrayidx381 = ((($271)) + 68|0); + $272 = HEAP32[$arrayidx381>>2]|0; + $add382 = (($270) + ($272))|0; + $and383 = $add382 & 65535; + $273 = $FIR_Coefs$addr; + $arrayidx384 = ((($273)) + 12|0); + $274 = HEAP16[$arrayidx384>>1]|0; + $conv385 = $274 << 16 >> 16; + $mul386 = Math_imul($and383, $conv385)|0; + $shr387 = $mul386 >> 16; + $add388 = (($mul379) + ($shr387))|0; + $add389 = (($262) + ($add388))|0; + $res_Q6 = $add389; + $275 = $res_Q6; + $276 = $buf_ptr; + $arrayidx390 = ((($276)) + 28|0); + $277 = HEAP32[$arrayidx390>>2]|0; + $278 = $buf_ptr; + $arrayidx391 = ((($278)) + 64|0); + $279 = HEAP32[$arrayidx391>>2]|0; + $add392 = (($277) + ($279))|0; + $shr393 = $add392 >> 16; + $280 = $FIR_Coefs$addr; + $arrayidx394 = ((($280)) + 14|0); + $281 = HEAP16[$arrayidx394>>1]|0; + $conv395 = $281 << 16 >> 16; + $mul396 = Math_imul($shr393, $conv395)|0; + $282 = $buf_ptr; + $arrayidx397 = ((($282)) + 28|0); + $283 = HEAP32[$arrayidx397>>2]|0; + $284 = $buf_ptr; + $arrayidx398 = ((($284)) + 64|0); + $285 = HEAP32[$arrayidx398>>2]|0; + $add399 = (($283) + ($285))|0; + $and400 = $add399 & 65535; + $286 = $FIR_Coefs$addr; + $arrayidx401 = ((($286)) + 14|0); + $287 = HEAP16[$arrayidx401>>1]|0; + $conv402 = $287 << 16 >> 16; + $mul403 = Math_imul($and400, $conv402)|0; + $shr404 = $mul403 >> 16; + $add405 = (($mul396) + ($shr404))|0; + $add406 = (($275) + ($add405))|0; + $res_Q6 = $add406; + $288 = $res_Q6; + $289 = $buf_ptr; + $arrayidx407 = ((($289)) + 32|0); + $290 = HEAP32[$arrayidx407>>2]|0; + $291 = $buf_ptr; + $arrayidx408 = ((($291)) + 60|0); + $292 = HEAP32[$arrayidx408>>2]|0; + $add409 = (($290) + ($292))|0; + $shr410 = $add409 >> 16; + $293 = $FIR_Coefs$addr; + $arrayidx411 = ((($293)) + 16|0); + $294 = HEAP16[$arrayidx411>>1]|0; + $conv412 = $294 << 16 >> 16; + $mul413 = Math_imul($shr410, $conv412)|0; + $295 = $buf_ptr; + $arrayidx414 = ((($295)) + 32|0); + $296 = HEAP32[$arrayidx414>>2]|0; + $297 = $buf_ptr; + $arrayidx415 = ((($297)) + 60|0); + $298 = HEAP32[$arrayidx415>>2]|0; + $add416 = (($296) + ($298))|0; + $and417 = $add416 & 65535; + $299 = $FIR_Coefs$addr; + $arrayidx418 = ((($299)) + 16|0); + $300 = HEAP16[$arrayidx418>>1]|0; + $conv419 = $300 << 16 >> 16; + $mul420 = Math_imul($and417, $conv419)|0; + $shr421 = $mul420 >> 16; + $add422 = (($mul413) + ($shr421))|0; + $add423 = (($288) + ($add422))|0; + $res_Q6 = $add423; + $301 = $res_Q6; + $302 = $buf_ptr; + $arrayidx424 = ((($302)) + 36|0); + $303 = HEAP32[$arrayidx424>>2]|0; + $304 = $buf_ptr; + $arrayidx425 = ((($304)) + 56|0); + $305 = HEAP32[$arrayidx425>>2]|0; + $add426 = (($303) + ($305))|0; + $shr427 = $add426 >> 16; + $306 = $FIR_Coefs$addr; + $arrayidx428 = ((($306)) + 18|0); + $307 = HEAP16[$arrayidx428>>1]|0; + $conv429 = $307 << 16 >> 16; + $mul430 = Math_imul($shr427, $conv429)|0; + $308 = $buf_ptr; + $arrayidx431 = ((($308)) + 36|0); + $309 = HEAP32[$arrayidx431>>2]|0; + $310 = $buf_ptr; + $arrayidx432 = ((($310)) + 56|0); + $311 = HEAP32[$arrayidx432>>2]|0; + $add433 = (($309) + ($311))|0; + $and434 = $add433 & 65535; + $312 = $FIR_Coefs$addr; + $arrayidx435 = ((($312)) + 18|0); + $313 = HEAP16[$arrayidx435>>1]|0; + $conv436 = $313 << 16 >> 16; + $mul437 = Math_imul($and434, $conv436)|0; + $shr438 = $mul437 >> 16; + $add439 = (($mul430) + ($shr438))|0; + $add440 = (($301) + ($add439))|0; + $res_Q6 = $add440; + $314 = $res_Q6; + $315 = $buf_ptr; + $arrayidx441 = ((($315)) + 40|0); + $316 = HEAP32[$arrayidx441>>2]|0; + $317 = $buf_ptr; + $arrayidx442 = ((($317)) + 52|0); + $318 = HEAP32[$arrayidx442>>2]|0; + $add443 = (($316) + ($318))|0; + $shr444 = $add443 >> 16; + $319 = $FIR_Coefs$addr; + $arrayidx445 = ((($319)) + 20|0); + $320 = HEAP16[$arrayidx445>>1]|0; + $conv446 = $320 << 16 >> 16; + $mul447 = Math_imul($shr444, $conv446)|0; + $321 = $buf_ptr; + $arrayidx448 = ((($321)) + 40|0); + $322 = HEAP32[$arrayidx448>>2]|0; + $323 = $buf_ptr; + $arrayidx449 = ((($323)) + 52|0); + $324 = HEAP32[$arrayidx449>>2]|0; + $add450 = (($322) + ($324))|0; + $and451 = $add450 & 65535; + $325 = $FIR_Coefs$addr; + $arrayidx452 = ((($325)) + 20|0); + $326 = HEAP16[$arrayidx452>>1]|0; + $conv453 = $326 << 16 >> 16; + $mul454 = Math_imul($and451, $conv453)|0; + $shr455 = $mul454 >> 16; + $add456 = (($mul447) + ($shr455))|0; + $add457 = (($314) + ($add456))|0; + $res_Q6 = $add457; + $327 = $res_Q6; + $328 = $buf_ptr; + $arrayidx458 = ((($328)) + 44|0); + $329 = HEAP32[$arrayidx458>>2]|0; + $330 = $buf_ptr; + $arrayidx459 = ((($330)) + 48|0); + $331 = HEAP32[$arrayidx459>>2]|0; + $add460 = (($329) + ($331))|0; + $shr461 = $add460 >> 16; + $332 = $FIR_Coefs$addr; + $arrayidx462 = ((($332)) + 22|0); + $333 = HEAP16[$arrayidx462>>1]|0; + $conv463 = $333 << 16 >> 16; + $mul464 = Math_imul($shr461, $conv463)|0; + $334 = $buf_ptr; + $arrayidx465 = ((($334)) + 44|0); + $335 = HEAP32[$arrayidx465>>2]|0; + $336 = $buf_ptr; + $arrayidx466 = ((($336)) + 48|0); + $337 = HEAP32[$arrayidx466>>2]|0; + $add467 = (($335) + ($337))|0; + $and468 = $add467 & 65535; + $338 = $FIR_Coefs$addr; + $arrayidx469 = ((($338)) + 22|0); + $339 = HEAP16[$arrayidx469>>1]|0; + $conv470 = $339 << 16 >> 16; + $mul471 = Math_imul($and468, $conv470)|0; + $shr472 = $mul471 >> 16; + $add473 = (($mul464) + ($shr472))|0; + $add474 = (($327) + ($add473))|0; + $res_Q6 = $add474; + $340 = $res_Q6; + $shr475 = $340 >> 5; + $add476 = (($shr475) + 1)|0; + $shr477 = $add476 >> 1; + $cmp478 = ($shr477|0)>(32767); + if ($cmp478) { + $cond495 = 32767; + } else { + $341 = $res_Q6; + $shr482 = $341 >> 5; + $add483 = (($shr482) + 1)|0; + $shr484 = $add483 >> 1; + $cmp485 = ($shr484|0)<(-32768); + if ($cmp485) { + $cond495 = -32768; + } else { + $342 = $res_Q6; + $shr489 = $342 >> 5; + $add490 = (($shr489) + 1)|0; + $shr491 = $add490 >> 1; + $cond495 = $shr491; + } + } + $conv496 = $cond495&65535; + $343 = $out$addr; + $incdec$ptr497 = ((($343)) + 2|0); + $out$addr = $incdec$ptr497; + HEAP16[$343>>1] = $conv496; + $344 = $index_increment_Q16$addr; + $345 = $index_Q16; + $add499 = (($345) + ($344))|0; + $index_Q16 = $add499; + } + $589 = $out$addr; + STACKTOP = sp;return ($589|0); + break; + } + case 36: { + $index_Q16 = 0; + while(1) { + $346 = $index_Q16; + $347 = $max_index_Q16$addr; + $cmp503 = ($346|0)<($347|0); + if (!($cmp503)) { + break; + } + $348 = $buf$addr; + $349 = $index_Q16; + $shr506 = $349 >> 16; + $add$ptr507 = (($348) + ($shr506<<2)|0); + $buf_ptr = $add$ptr507; + $350 = $buf_ptr; + $351 = HEAP32[$350>>2]|0; + $352 = $buf_ptr; + $arrayidx509 = ((($352)) + 140|0); + $353 = HEAP32[$arrayidx509>>2]|0; + $add510 = (($351) + ($353))|0; + $shr511 = $add510 >> 16; + $354 = $FIR_Coefs$addr; + $355 = HEAP16[$354>>1]|0; + $conv513 = $355 << 16 >> 16; + $mul514 = Math_imul($shr511, $conv513)|0; + $356 = $buf_ptr; + $357 = HEAP32[$356>>2]|0; + $358 = $buf_ptr; + $arrayidx516 = ((($358)) + 140|0); + $359 = HEAP32[$arrayidx516>>2]|0; + $add517 = (($357) + ($359))|0; + $and518 = $add517 & 65535; + $360 = $FIR_Coefs$addr; + $361 = HEAP16[$360>>1]|0; + $conv520 = $361 << 16 >> 16; + $mul521 = Math_imul($and518, $conv520)|0; + $shr522 = $mul521 >> 16; + $add523 = (($mul514) + ($shr522))|0; + $res_Q6 = $add523; + $362 = $res_Q6; + $363 = $buf_ptr; + $arrayidx524 = ((($363)) + 4|0); + $364 = HEAP32[$arrayidx524>>2]|0; + $365 = $buf_ptr; + $arrayidx525 = ((($365)) + 136|0); + $366 = HEAP32[$arrayidx525>>2]|0; + $add526 = (($364) + ($366))|0; + $shr527 = $add526 >> 16; + $367 = $FIR_Coefs$addr; + $arrayidx528 = ((($367)) + 2|0); + $368 = HEAP16[$arrayidx528>>1]|0; + $conv529 = $368 << 16 >> 16; + $mul530 = Math_imul($shr527, $conv529)|0; + $369 = $buf_ptr; + $arrayidx531 = ((($369)) + 4|0); + $370 = HEAP32[$arrayidx531>>2]|0; + $371 = $buf_ptr; + $arrayidx532 = ((($371)) + 136|0); + $372 = HEAP32[$arrayidx532>>2]|0; + $add533 = (($370) + ($372))|0; + $and534 = $add533 & 65535; + $373 = $FIR_Coefs$addr; + $arrayidx535 = ((($373)) + 2|0); + $374 = HEAP16[$arrayidx535>>1]|0; + $conv536 = $374 << 16 >> 16; + $mul537 = Math_imul($and534, $conv536)|0; + $shr538 = $mul537 >> 16; + $add539 = (($mul530) + ($shr538))|0; + $add540 = (($362) + ($add539))|0; + $res_Q6 = $add540; + $375 = $res_Q6; + $376 = $buf_ptr; + $arrayidx541 = ((($376)) + 8|0); + $377 = HEAP32[$arrayidx541>>2]|0; + $378 = $buf_ptr; + $arrayidx542 = ((($378)) + 132|0); + $379 = HEAP32[$arrayidx542>>2]|0; + $add543 = (($377) + ($379))|0; + $shr544 = $add543 >> 16; + $380 = $FIR_Coefs$addr; + $arrayidx545 = ((($380)) + 4|0); + $381 = HEAP16[$arrayidx545>>1]|0; + $conv546 = $381 << 16 >> 16; + $mul547 = Math_imul($shr544, $conv546)|0; + $382 = $buf_ptr; + $arrayidx548 = ((($382)) + 8|0); + $383 = HEAP32[$arrayidx548>>2]|0; + $384 = $buf_ptr; + $arrayidx549 = ((($384)) + 132|0); + $385 = HEAP32[$arrayidx549>>2]|0; + $add550 = (($383) + ($385))|0; + $and551 = $add550 & 65535; + $386 = $FIR_Coefs$addr; + $arrayidx552 = ((($386)) + 4|0); + $387 = HEAP16[$arrayidx552>>1]|0; + $conv553 = $387 << 16 >> 16; + $mul554 = Math_imul($and551, $conv553)|0; + $shr555 = $mul554 >> 16; + $add556 = (($mul547) + ($shr555))|0; + $add557 = (($375) + ($add556))|0; + $res_Q6 = $add557; + $388 = $res_Q6; + $389 = $buf_ptr; + $arrayidx558 = ((($389)) + 12|0); + $390 = HEAP32[$arrayidx558>>2]|0; + $391 = $buf_ptr; + $arrayidx559 = ((($391)) + 128|0); + $392 = HEAP32[$arrayidx559>>2]|0; + $add560 = (($390) + ($392))|0; + $shr561 = $add560 >> 16; + $393 = $FIR_Coefs$addr; + $arrayidx562 = ((($393)) + 6|0); + $394 = HEAP16[$arrayidx562>>1]|0; + $conv563 = $394 << 16 >> 16; + $mul564 = Math_imul($shr561, $conv563)|0; + $395 = $buf_ptr; + $arrayidx565 = ((($395)) + 12|0); + $396 = HEAP32[$arrayidx565>>2]|0; + $397 = $buf_ptr; + $arrayidx566 = ((($397)) + 128|0); + $398 = HEAP32[$arrayidx566>>2]|0; + $add567 = (($396) + ($398))|0; + $and568 = $add567 & 65535; + $399 = $FIR_Coefs$addr; + $arrayidx569 = ((($399)) + 6|0); + $400 = HEAP16[$arrayidx569>>1]|0; + $conv570 = $400 << 16 >> 16; + $mul571 = Math_imul($and568, $conv570)|0; + $shr572 = $mul571 >> 16; + $add573 = (($mul564) + ($shr572))|0; + $add574 = (($388) + ($add573))|0; + $res_Q6 = $add574; + $401 = $res_Q6; + $402 = $buf_ptr; + $arrayidx575 = ((($402)) + 16|0); + $403 = HEAP32[$arrayidx575>>2]|0; + $404 = $buf_ptr; + $arrayidx576 = ((($404)) + 124|0); + $405 = HEAP32[$arrayidx576>>2]|0; + $add577 = (($403) + ($405))|0; + $shr578 = $add577 >> 16; + $406 = $FIR_Coefs$addr; + $arrayidx579 = ((($406)) + 8|0); + $407 = HEAP16[$arrayidx579>>1]|0; + $conv580 = $407 << 16 >> 16; + $mul581 = Math_imul($shr578, $conv580)|0; + $408 = $buf_ptr; + $arrayidx582 = ((($408)) + 16|0); + $409 = HEAP32[$arrayidx582>>2]|0; + $410 = $buf_ptr; + $arrayidx583 = ((($410)) + 124|0); + $411 = HEAP32[$arrayidx583>>2]|0; + $add584 = (($409) + ($411))|0; + $and585 = $add584 & 65535; + $412 = $FIR_Coefs$addr; + $arrayidx586 = ((($412)) + 8|0); + $413 = HEAP16[$arrayidx586>>1]|0; + $conv587 = $413 << 16 >> 16; + $mul588 = Math_imul($and585, $conv587)|0; + $shr589 = $mul588 >> 16; + $add590 = (($mul581) + ($shr589))|0; + $add591 = (($401) + ($add590))|0; + $res_Q6 = $add591; + $414 = $res_Q6; + $415 = $buf_ptr; + $arrayidx592 = ((($415)) + 20|0); + $416 = HEAP32[$arrayidx592>>2]|0; + $417 = $buf_ptr; + $arrayidx593 = ((($417)) + 120|0); + $418 = HEAP32[$arrayidx593>>2]|0; + $add594 = (($416) + ($418))|0; + $shr595 = $add594 >> 16; + $419 = $FIR_Coefs$addr; + $arrayidx596 = ((($419)) + 10|0); + $420 = HEAP16[$arrayidx596>>1]|0; + $conv597 = $420 << 16 >> 16; + $mul598 = Math_imul($shr595, $conv597)|0; + $421 = $buf_ptr; + $arrayidx599 = ((($421)) + 20|0); + $422 = HEAP32[$arrayidx599>>2]|0; + $423 = $buf_ptr; + $arrayidx600 = ((($423)) + 120|0); + $424 = HEAP32[$arrayidx600>>2]|0; + $add601 = (($422) + ($424))|0; + $and602 = $add601 & 65535; + $425 = $FIR_Coefs$addr; + $arrayidx603 = ((($425)) + 10|0); + $426 = HEAP16[$arrayidx603>>1]|0; + $conv604 = $426 << 16 >> 16; + $mul605 = Math_imul($and602, $conv604)|0; + $shr606 = $mul605 >> 16; + $add607 = (($mul598) + ($shr606))|0; + $add608 = (($414) + ($add607))|0; + $res_Q6 = $add608; + $427 = $res_Q6; + $428 = $buf_ptr; + $arrayidx609 = ((($428)) + 24|0); + $429 = HEAP32[$arrayidx609>>2]|0; + $430 = $buf_ptr; + $arrayidx610 = ((($430)) + 116|0); + $431 = HEAP32[$arrayidx610>>2]|0; + $add611 = (($429) + ($431))|0; + $shr612 = $add611 >> 16; + $432 = $FIR_Coefs$addr; + $arrayidx613 = ((($432)) + 12|0); + $433 = HEAP16[$arrayidx613>>1]|0; + $conv614 = $433 << 16 >> 16; + $mul615 = Math_imul($shr612, $conv614)|0; + $434 = $buf_ptr; + $arrayidx616 = ((($434)) + 24|0); + $435 = HEAP32[$arrayidx616>>2]|0; + $436 = $buf_ptr; + $arrayidx617 = ((($436)) + 116|0); + $437 = HEAP32[$arrayidx617>>2]|0; + $add618 = (($435) + ($437))|0; + $and619 = $add618 & 65535; + $438 = $FIR_Coefs$addr; + $arrayidx620 = ((($438)) + 12|0); + $439 = HEAP16[$arrayidx620>>1]|0; + $conv621 = $439 << 16 >> 16; + $mul622 = Math_imul($and619, $conv621)|0; + $shr623 = $mul622 >> 16; + $add624 = (($mul615) + ($shr623))|0; + $add625 = (($427) + ($add624))|0; + $res_Q6 = $add625; + $440 = $res_Q6; + $441 = $buf_ptr; + $arrayidx626 = ((($441)) + 28|0); + $442 = HEAP32[$arrayidx626>>2]|0; + $443 = $buf_ptr; + $arrayidx627 = ((($443)) + 112|0); + $444 = HEAP32[$arrayidx627>>2]|0; + $add628 = (($442) + ($444))|0; + $shr629 = $add628 >> 16; + $445 = $FIR_Coefs$addr; + $arrayidx630 = ((($445)) + 14|0); + $446 = HEAP16[$arrayidx630>>1]|0; + $conv631 = $446 << 16 >> 16; + $mul632 = Math_imul($shr629, $conv631)|0; + $447 = $buf_ptr; + $arrayidx633 = ((($447)) + 28|0); + $448 = HEAP32[$arrayidx633>>2]|0; + $449 = $buf_ptr; + $arrayidx634 = ((($449)) + 112|0); + $450 = HEAP32[$arrayidx634>>2]|0; + $add635 = (($448) + ($450))|0; + $and636 = $add635 & 65535; + $451 = $FIR_Coefs$addr; + $arrayidx637 = ((($451)) + 14|0); + $452 = HEAP16[$arrayidx637>>1]|0; + $conv638 = $452 << 16 >> 16; + $mul639 = Math_imul($and636, $conv638)|0; + $shr640 = $mul639 >> 16; + $add641 = (($mul632) + ($shr640))|0; + $add642 = (($440) + ($add641))|0; + $res_Q6 = $add642; + $453 = $res_Q6; + $454 = $buf_ptr; + $arrayidx643 = ((($454)) + 32|0); + $455 = HEAP32[$arrayidx643>>2]|0; + $456 = $buf_ptr; + $arrayidx644 = ((($456)) + 108|0); + $457 = HEAP32[$arrayidx644>>2]|0; + $add645 = (($455) + ($457))|0; + $shr646 = $add645 >> 16; + $458 = $FIR_Coefs$addr; + $arrayidx647 = ((($458)) + 16|0); + $459 = HEAP16[$arrayidx647>>1]|0; + $conv648 = $459 << 16 >> 16; + $mul649 = Math_imul($shr646, $conv648)|0; + $460 = $buf_ptr; + $arrayidx650 = ((($460)) + 32|0); + $461 = HEAP32[$arrayidx650>>2]|0; + $462 = $buf_ptr; + $arrayidx651 = ((($462)) + 108|0); + $463 = HEAP32[$arrayidx651>>2]|0; + $add652 = (($461) + ($463))|0; + $and653 = $add652 & 65535; + $464 = $FIR_Coefs$addr; + $arrayidx654 = ((($464)) + 16|0); + $465 = HEAP16[$arrayidx654>>1]|0; + $conv655 = $465 << 16 >> 16; + $mul656 = Math_imul($and653, $conv655)|0; + $shr657 = $mul656 >> 16; + $add658 = (($mul649) + ($shr657))|0; + $add659 = (($453) + ($add658))|0; + $res_Q6 = $add659; + $466 = $res_Q6; + $467 = $buf_ptr; + $arrayidx660 = ((($467)) + 36|0); + $468 = HEAP32[$arrayidx660>>2]|0; + $469 = $buf_ptr; + $arrayidx661 = ((($469)) + 104|0); + $470 = HEAP32[$arrayidx661>>2]|0; + $add662 = (($468) + ($470))|0; + $shr663 = $add662 >> 16; + $471 = $FIR_Coefs$addr; + $arrayidx664 = ((($471)) + 18|0); + $472 = HEAP16[$arrayidx664>>1]|0; + $conv665 = $472 << 16 >> 16; + $mul666 = Math_imul($shr663, $conv665)|0; + $473 = $buf_ptr; + $arrayidx667 = ((($473)) + 36|0); + $474 = HEAP32[$arrayidx667>>2]|0; + $475 = $buf_ptr; + $arrayidx668 = ((($475)) + 104|0); + $476 = HEAP32[$arrayidx668>>2]|0; + $add669 = (($474) + ($476))|0; + $and670 = $add669 & 65535; + $477 = $FIR_Coefs$addr; + $arrayidx671 = ((($477)) + 18|0); + $478 = HEAP16[$arrayidx671>>1]|0; + $conv672 = $478 << 16 >> 16; + $mul673 = Math_imul($and670, $conv672)|0; + $shr674 = $mul673 >> 16; + $add675 = (($mul666) + ($shr674))|0; + $add676 = (($466) + ($add675))|0; + $res_Q6 = $add676; + $479 = $res_Q6; + $480 = $buf_ptr; + $arrayidx677 = ((($480)) + 40|0); + $481 = HEAP32[$arrayidx677>>2]|0; + $482 = $buf_ptr; + $arrayidx678 = ((($482)) + 100|0); + $483 = HEAP32[$arrayidx678>>2]|0; + $add679 = (($481) + ($483))|0; + $shr680 = $add679 >> 16; + $484 = $FIR_Coefs$addr; + $arrayidx681 = ((($484)) + 20|0); + $485 = HEAP16[$arrayidx681>>1]|0; + $conv682 = $485 << 16 >> 16; + $mul683 = Math_imul($shr680, $conv682)|0; + $486 = $buf_ptr; + $arrayidx684 = ((($486)) + 40|0); + $487 = HEAP32[$arrayidx684>>2]|0; + $488 = $buf_ptr; + $arrayidx685 = ((($488)) + 100|0); + $489 = HEAP32[$arrayidx685>>2]|0; + $add686 = (($487) + ($489))|0; + $and687 = $add686 & 65535; + $490 = $FIR_Coefs$addr; + $arrayidx688 = ((($490)) + 20|0); + $491 = HEAP16[$arrayidx688>>1]|0; + $conv689 = $491 << 16 >> 16; + $mul690 = Math_imul($and687, $conv689)|0; + $shr691 = $mul690 >> 16; + $add692 = (($mul683) + ($shr691))|0; + $add693 = (($479) + ($add692))|0; + $res_Q6 = $add693; + $492 = $res_Q6; + $493 = $buf_ptr; + $arrayidx694 = ((($493)) + 44|0); + $494 = HEAP32[$arrayidx694>>2]|0; + $495 = $buf_ptr; + $arrayidx695 = ((($495)) + 96|0); + $496 = HEAP32[$arrayidx695>>2]|0; + $add696 = (($494) + ($496))|0; + $shr697 = $add696 >> 16; + $497 = $FIR_Coefs$addr; + $arrayidx698 = ((($497)) + 22|0); + $498 = HEAP16[$arrayidx698>>1]|0; + $conv699 = $498 << 16 >> 16; + $mul700 = Math_imul($shr697, $conv699)|0; + $499 = $buf_ptr; + $arrayidx701 = ((($499)) + 44|0); + $500 = HEAP32[$arrayidx701>>2]|0; + $501 = $buf_ptr; + $arrayidx702 = ((($501)) + 96|0); + $502 = HEAP32[$arrayidx702>>2]|0; + $add703 = (($500) + ($502))|0; + $and704 = $add703 & 65535; + $503 = $FIR_Coefs$addr; + $arrayidx705 = ((($503)) + 22|0); + $504 = HEAP16[$arrayidx705>>1]|0; + $conv706 = $504 << 16 >> 16; + $mul707 = Math_imul($and704, $conv706)|0; + $shr708 = $mul707 >> 16; + $add709 = (($mul700) + ($shr708))|0; + $add710 = (($492) + ($add709))|0; + $res_Q6 = $add710; + $505 = $res_Q6; + $506 = $buf_ptr; + $arrayidx711 = ((($506)) + 48|0); + $507 = HEAP32[$arrayidx711>>2]|0; + $508 = $buf_ptr; + $arrayidx712 = ((($508)) + 92|0); + $509 = HEAP32[$arrayidx712>>2]|0; + $add713 = (($507) + ($509))|0; + $shr714 = $add713 >> 16; + $510 = $FIR_Coefs$addr; + $arrayidx715 = ((($510)) + 24|0); + $511 = HEAP16[$arrayidx715>>1]|0; + $conv716 = $511 << 16 >> 16; + $mul717 = Math_imul($shr714, $conv716)|0; + $512 = $buf_ptr; + $arrayidx718 = ((($512)) + 48|0); + $513 = HEAP32[$arrayidx718>>2]|0; + $514 = $buf_ptr; + $arrayidx719 = ((($514)) + 92|0); + $515 = HEAP32[$arrayidx719>>2]|0; + $add720 = (($513) + ($515))|0; + $and721 = $add720 & 65535; + $516 = $FIR_Coefs$addr; + $arrayidx722 = ((($516)) + 24|0); + $517 = HEAP16[$arrayidx722>>1]|0; + $conv723 = $517 << 16 >> 16; + $mul724 = Math_imul($and721, $conv723)|0; + $shr725 = $mul724 >> 16; + $add726 = (($mul717) + ($shr725))|0; + $add727 = (($505) + ($add726))|0; + $res_Q6 = $add727; + $518 = $res_Q6; + $519 = $buf_ptr; + $arrayidx728 = ((($519)) + 52|0); + $520 = HEAP32[$arrayidx728>>2]|0; + $521 = $buf_ptr; + $arrayidx729 = ((($521)) + 88|0); + $522 = HEAP32[$arrayidx729>>2]|0; + $add730 = (($520) + ($522))|0; + $shr731 = $add730 >> 16; + $523 = $FIR_Coefs$addr; + $arrayidx732 = ((($523)) + 26|0); + $524 = HEAP16[$arrayidx732>>1]|0; + $conv733 = $524 << 16 >> 16; + $mul734 = Math_imul($shr731, $conv733)|0; + $525 = $buf_ptr; + $arrayidx735 = ((($525)) + 52|0); + $526 = HEAP32[$arrayidx735>>2]|0; + $527 = $buf_ptr; + $arrayidx736 = ((($527)) + 88|0); + $528 = HEAP32[$arrayidx736>>2]|0; + $add737 = (($526) + ($528))|0; + $and738 = $add737 & 65535; + $529 = $FIR_Coefs$addr; + $arrayidx739 = ((($529)) + 26|0); + $530 = HEAP16[$arrayidx739>>1]|0; + $conv740 = $530 << 16 >> 16; + $mul741 = Math_imul($and738, $conv740)|0; + $shr742 = $mul741 >> 16; + $add743 = (($mul734) + ($shr742))|0; + $add744 = (($518) + ($add743))|0; + $res_Q6 = $add744; + $531 = $res_Q6; + $532 = $buf_ptr; + $arrayidx745 = ((($532)) + 56|0); + $533 = HEAP32[$arrayidx745>>2]|0; + $534 = $buf_ptr; + $arrayidx746 = ((($534)) + 84|0); + $535 = HEAP32[$arrayidx746>>2]|0; + $add747 = (($533) + ($535))|0; + $shr748 = $add747 >> 16; + $536 = $FIR_Coefs$addr; + $arrayidx749 = ((($536)) + 28|0); + $537 = HEAP16[$arrayidx749>>1]|0; + $conv750 = $537 << 16 >> 16; + $mul751 = Math_imul($shr748, $conv750)|0; + $538 = $buf_ptr; + $arrayidx752 = ((($538)) + 56|0); + $539 = HEAP32[$arrayidx752>>2]|0; + $540 = $buf_ptr; + $arrayidx753 = ((($540)) + 84|0); + $541 = HEAP32[$arrayidx753>>2]|0; + $add754 = (($539) + ($541))|0; + $and755 = $add754 & 65535; + $542 = $FIR_Coefs$addr; + $arrayidx756 = ((($542)) + 28|0); + $543 = HEAP16[$arrayidx756>>1]|0; + $conv757 = $543 << 16 >> 16; + $mul758 = Math_imul($and755, $conv757)|0; + $shr759 = $mul758 >> 16; + $add760 = (($mul751) + ($shr759))|0; + $add761 = (($531) + ($add760))|0; + $res_Q6 = $add761; + $544 = $res_Q6; + $545 = $buf_ptr; + $arrayidx762 = ((($545)) + 60|0); + $546 = HEAP32[$arrayidx762>>2]|0; + $547 = $buf_ptr; + $arrayidx763 = ((($547)) + 80|0); + $548 = HEAP32[$arrayidx763>>2]|0; + $add764 = (($546) + ($548))|0; + $shr765 = $add764 >> 16; + $549 = $FIR_Coefs$addr; + $arrayidx766 = ((($549)) + 30|0); + $550 = HEAP16[$arrayidx766>>1]|0; + $conv767 = $550 << 16 >> 16; + $mul768 = Math_imul($shr765, $conv767)|0; + $551 = $buf_ptr; + $arrayidx769 = ((($551)) + 60|0); + $552 = HEAP32[$arrayidx769>>2]|0; + $553 = $buf_ptr; + $arrayidx770 = ((($553)) + 80|0); + $554 = HEAP32[$arrayidx770>>2]|0; + $add771 = (($552) + ($554))|0; + $and772 = $add771 & 65535; + $555 = $FIR_Coefs$addr; + $arrayidx773 = ((($555)) + 30|0); + $556 = HEAP16[$arrayidx773>>1]|0; + $conv774 = $556 << 16 >> 16; + $mul775 = Math_imul($and772, $conv774)|0; + $shr776 = $mul775 >> 16; + $add777 = (($mul768) + ($shr776))|0; + $add778 = (($544) + ($add777))|0; + $res_Q6 = $add778; + $557 = $res_Q6; + $558 = $buf_ptr; + $arrayidx779 = ((($558)) + 64|0); + $559 = HEAP32[$arrayidx779>>2]|0; + $560 = $buf_ptr; + $arrayidx780 = ((($560)) + 76|0); + $561 = HEAP32[$arrayidx780>>2]|0; + $add781 = (($559) + ($561))|0; + $shr782 = $add781 >> 16; + $562 = $FIR_Coefs$addr; + $arrayidx783 = ((($562)) + 32|0); + $563 = HEAP16[$arrayidx783>>1]|0; + $conv784 = $563 << 16 >> 16; + $mul785 = Math_imul($shr782, $conv784)|0; + $564 = $buf_ptr; + $arrayidx786 = ((($564)) + 64|0); + $565 = HEAP32[$arrayidx786>>2]|0; + $566 = $buf_ptr; + $arrayidx787 = ((($566)) + 76|0); + $567 = HEAP32[$arrayidx787>>2]|0; + $add788 = (($565) + ($567))|0; + $and789 = $add788 & 65535; + $568 = $FIR_Coefs$addr; + $arrayidx790 = ((($568)) + 32|0); + $569 = HEAP16[$arrayidx790>>1]|0; + $conv791 = $569 << 16 >> 16; + $mul792 = Math_imul($and789, $conv791)|0; + $shr793 = $mul792 >> 16; + $add794 = (($mul785) + ($shr793))|0; + $add795 = (($557) + ($add794))|0; + $res_Q6 = $add795; + $570 = $res_Q6; + $571 = $buf_ptr; + $arrayidx796 = ((($571)) + 68|0); + $572 = HEAP32[$arrayidx796>>2]|0; + $573 = $buf_ptr; + $arrayidx797 = ((($573)) + 72|0); + $574 = HEAP32[$arrayidx797>>2]|0; + $add798 = (($572) + ($574))|0; + $shr799 = $add798 >> 16; + $575 = $FIR_Coefs$addr; + $arrayidx800 = ((($575)) + 34|0); + $576 = HEAP16[$arrayidx800>>1]|0; + $conv801 = $576 << 16 >> 16; + $mul802 = Math_imul($shr799, $conv801)|0; + $577 = $buf_ptr; + $arrayidx803 = ((($577)) + 68|0); + $578 = HEAP32[$arrayidx803>>2]|0; + $579 = $buf_ptr; + $arrayidx804 = ((($579)) + 72|0); + $580 = HEAP32[$arrayidx804>>2]|0; + $add805 = (($578) + ($580))|0; + $and806 = $add805 & 65535; + $581 = $FIR_Coefs$addr; + $arrayidx807 = ((($581)) + 34|0); + $582 = HEAP16[$arrayidx807>>1]|0; + $conv808 = $582 << 16 >> 16; + $mul809 = Math_imul($and806, $conv808)|0; + $shr810 = $mul809 >> 16; + $add811 = (($mul802) + ($shr810))|0; + $add812 = (($570) + ($add811))|0; + $res_Q6 = $add812; + $583 = $res_Q6; + $shr813 = $583 >> 5; + $add814 = (($shr813) + 1)|0; + $shr815 = $add814 >> 1; + $cmp816 = ($shr815|0)>(32767); + if ($cmp816) { + $cond833 = 32767; + } else { + $584 = $res_Q6; + $shr820 = $584 >> 5; + $add821 = (($shr820) + 1)|0; + $shr822 = $add821 >> 1; + $cmp823 = ($shr822|0)<(-32768); + if ($cmp823) { + $cond833 = -32768; + } else { + $585 = $res_Q6; + $shr827 = $585 >> 5; + $add828 = (($shr827) + 1)|0; + $shr829 = $add828 >> 1; + $cond833 = $shr829; + } + } + $conv834 = $cond833&65535; + $586 = $out$addr; + $incdec$ptr835 = ((($586)) + 2|0); + $out$addr = $incdec$ptr835; + HEAP16[$586>>1] = $conv834; + $587 = $index_increment_Q16$addr; + $588 = $index_Q16; + $add837 = (($588) + ($587))|0; + $index_Q16 = $add837; + } + $589 = $out$addr; + STACKTOP = sp;return ($589|0); + break; + } + default: { + $589 = $out$addr; + STACKTOP = sp;return ($589|0); + } + } + return (0)|0; +} +function _silk_resampler_private_IIR_FIR($SS,$out,$in,$inLen) { + $SS = $SS|0; + $out = $out|0; + $in = $in|0; + $inLen = $inLen|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $S = 0, $SS$addr = 0, $add = 0, $add$ptr = 0, $arrayidx = 0, $arrayidx11 = 0, $arrayidx6 = 0, $batchSize = 0, $batchSize1 = 0, $batchSize2 = 0, $call = 0; + var $cmp = 0, $cmp4 = 0, $cond = 0, $in$addr = 0, $inLen$addr = 0, $index_increment_Q16 = 0, $invRatio_Q16 = 0, $max_index_Q16 = 0, $mul = 0, $nSamplesIn = 0, $out$addr = 0, $sFIR = 0, $sFIR7 = 0, $saved_stack = 0, $shl = 0, $shl10 = 0, $shl5 = 0, $sub = 0, $vla = 0, $vla$alloca_mul = 0; + var label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $SS$addr = $SS; + $out$addr = $out; + $in$addr = $in; + $inLen$addr = $inLen; + $0 = $SS$addr; + $S = $0; + $1 = $S; + $batchSize = ((($1)) + 268|0); + $2 = HEAP32[$batchSize>>2]|0; + $mul = $2<<1; + $add = (($mul) + 8)|0; + $3 = (_llvm_stacksave()|0); + $saved_stack = $3; + $vla$alloca_mul = $add<<1; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $4 = $S; + $sFIR = ((($4)) + 24|0); + ;HEAP16[$vla>>1]=HEAP16[$sFIR>>1]|0;HEAP16[$vla+2>>1]=HEAP16[$sFIR+2>>1]|0;HEAP16[$vla+4>>1]=HEAP16[$sFIR+4>>1]|0;HEAP16[$vla+6>>1]=HEAP16[$sFIR+6>>1]|0;HEAP16[$vla+8>>1]=HEAP16[$sFIR+8>>1]|0;HEAP16[$vla+10>>1]=HEAP16[$sFIR+10>>1]|0;HEAP16[$vla+12>>1]=HEAP16[$sFIR+12>>1]|0;HEAP16[$vla+14>>1]=HEAP16[$sFIR+14>>1]|0; + $5 = $S; + $invRatio_Q16 = ((($5)) + 272|0); + $6 = HEAP32[$invRatio_Q16>>2]|0; + $index_increment_Q16 = $6; + while(1) { + $7 = $inLen$addr; + $8 = $S; + $batchSize1 = ((($8)) + 268|0); + $9 = HEAP32[$batchSize1>>2]|0; + $cmp = ($7|0)<($9|0); + if ($cmp) { + $10 = $inLen$addr; + $cond = $10; + } else { + $11 = $S; + $batchSize2 = ((($11)) + 268|0); + $12 = HEAP32[$batchSize2>>2]|0; + $cond = $12; + } + $nSamplesIn = $cond; + $13 = $S; + $arrayidx = ((($vla)) + 16|0); + $14 = $in$addr; + $15 = $nSamplesIn; + _silk_resampler_private_up2_HQ($13,$arrayidx,$14,$15); + $16 = $nSamplesIn; + $shl = $16 << 17; + $max_index_Q16 = $shl; + $17 = $out$addr; + $18 = $max_index_Q16; + $19 = $index_increment_Q16; + $call = (_silk_resampler_private_IIR_FIR_INTERPOL($17,$vla,$18,$19)|0); + $out$addr = $call; + $20 = $nSamplesIn; + $21 = $in$addr; + $add$ptr = (($21) + ($20<<1)|0); + $in$addr = $add$ptr; + $22 = $nSamplesIn; + $23 = $inLen$addr; + $sub = (($23) - ($22))|0; + $inLen$addr = $sub; + $24 = $inLen$addr; + $cmp4 = ($24|0)>(0); + if (!($cmp4)) { + break; + } + $25 = $nSamplesIn; + $shl5 = $25 << 1; + $arrayidx6 = (($vla) + ($shl5<<1)|0); + ;HEAP16[$vla>>1]=HEAP16[$arrayidx6>>1]|0;HEAP16[$vla+2>>1]=HEAP16[$arrayidx6+2>>1]|0;HEAP16[$vla+4>>1]=HEAP16[$arrayidx6+4>>1]|0;HEAP16[$vla+6>>1]=HEAP16[$arrayidx6+6>>1]|0;HEAP16[$vla+8>>1]=HEAP16[$arrayidx6+8>>1]|0;HEAP16[$vla+10>>1]=HEAP16[$arrayidx6+10>>1]|0;HEAP16[$vla+12>>1]=HEAP16[$arrayidx6+12>>1]|0;HEAP16[$vla+14>>1]=HEAP16[$arrayidx6+14>>1]|0; + } + $26 = $S; + $sFIR7 = ((($26)) + 24|0); + $27 = $nSamplesIn; + $shl10 = $27 << 1; + $arrayidx11 = (($vla) + ($shl10<<1)|0); + ;HEAP16[$sFIR7>>1]=HEAP16[$arrayidx11>>1]|0;HEAP16[$sFIR7+2>>1]=HEAP16[$arrayidx11+2>>1]|0;HEAP16[$sFIR7+4>>1]=HEAP16[$arrayidx11+4>>1]|0;HEAP16[$sFIR7+6>>1]=HEAP16[$arrayidx11+6>>1]|0;HEAP16[$sFIR7+8>>1]=HEAP16[$arrayidx11+8>>1]|0;HEAP16[$sFIR7+10>>1]=HEAP16[$arrayidx11+10>>1]|0;HEAP16[$sFIR7+12>>1]=HEAP16[$arrayidx11+12>>1]|0;HEAP16[$sFIR7+14>>1]=HEAP16[$arrayidx11+14>>1]|0; + $28 = $saved_stack; + _llvm_stackrestore(($28|0)); + STACKTOP = sp;return; +} +function _silk_resampler_private_IIR_FIR_INTERPOL($out,$buf,$max_index_Q16,$index_increment_Q16) { + $out = $out|0; + $buf = $buf|0; + $max_index_Q16 = $max_index_Q16|0; + $index_increment_Q16 = $index_increment_Q16|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add17 = 0, $add24 = 0, $add31 = 0, $add38 = 0, $add46 = 0, $add54 = 0, $add62 = 0; + var $add64 = 0, $add69 = 0, $add76 = 0, $add81 = 0, $and = 0, $and1 = 0, $and2 = 0, $arrayidx = 0, $arrayidx11 = 0, $arrayidx13 = 0, $arrayidx14 = 0, $arrayidx18 = 0, $arrayidx20 = 0, $arrayidx21 = 0, $arrayidx25 = 0, $arrayidx27 = 0, $arrayidx28 = 0, $arrayidx32 = 0, $arrayidx34 = 0, $arrayidx35 = 0; + var $arrayidx39 = 0, $arrayidx42 = 0, $arrayidx43 = 0, $arrayidx47 = 0, $arrayidx50 = 0, $arrayidx51 = 0, $arrayidx55 = 0, $arrayidx58 = 0, $arrayidx7 = 0, $buf$addr = 0, $buf_ptr = 0, $cmp = 0, $cmp66 = 0, $cmp71 = 0, $cond79 = 0, $conv = 0, $conv12 = 0, $conv15 = 0, $conv19 = 0, $conv22 = 0; + var $conv26 = 0, $conv29 = 0, $conv33 = 0, $conv36 = 0, $conv40 = 0, $conv44 = 0, $conv48 = 0, $conv52 = 0, $conv56 = 0, $conv60 = 0, $conv80 = 0, $conv9 = 0, $incdec$ptr = 0, $index_Q16 = 0, $index_increment_Q16$addr = 0, $max_index_Q16$addr = 0, $mul = 0, $mul10 = 0, $mul16 = 0, $mul23 = 0; + var $mul3 = 0, $mul30 = 0, $mul37 = 0, $mul45 = 0, $mul53 = 0, $mul61 = 0, $out$addr = 0, $res_Q15 = 0, $shr = 0, $shr4 = 0, $shr5 = 0, $shr63 = 0, $shr65 = 0, $shr68 = 0, $shr70 = 0, $shr75 = 0, $shr77 = 0, $sub = 0, $sub41 = 0, $sub49 = 0; + var $sub57 = 0, $table_index = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $out$addr = $out; + $buf$addr = $buf; + $max_index_Q16$addr = $max_index_Q16; + $index_increment_Q16$addr = $index_increment_Q16; + $index_Q16 = 0; + while(1) { + $0 = $index_Q16; + $1 = $max_index_Q16$addr; + $cmp = ($0|0)<($1|0); + if (!($cmp)) { + break; + } + $2 = $index_Q16; + $and = $2 & 65535; + $shr = $and >> 16; + $mul = ($shr*12)|0; + $3 = $index_Q16; + $and1 = $3 & 65535; + $and2 = $and1 & 65535; + $mul3 = ($and2*12)|0; + $shr4 = $mul3 >> 16; + $add = (($mul) + ($shr4))|0; + $table_index = $add; + $4 = $buf$addr; + $5 = $index_Q16; + $shr5 = $5 >> 16; + $arrayidx = (($4) + ($shr5<<1)|0); + $buf_ptr = $arrayidx; + $6 = $buf_ptr; + $7 = HEAP16[$6>>1]|0; + $conv = $7 << 16 >> 16; + $8 = $table_index; + $arrayidx7 = (20520 + ($8<<3)|0); + $9 = HEAP16[$arrayidx7>>1]|0; + $conv9 = $9 << 16 >> 16; + $mul10 = Math_imul($conv, $conv9)|0; + $res_Q15 = $mul10; + $10 = $res_Q15; + $11 = $buf_ptr; + $arrayidx11 = ((($11)) + 2|0); + $12 = HEAP16[$arrayidx11>>1]|0; + $conv12 = $12 << 16 >> 16; + $13 = $table_index; + $arrayidx13 = (20520 + ($13<<3)|0); + $arrayidx14 = ((($arrayidx13)) + 2|0); + $14 = HEAP16[$arrayidx14>>1]|0; + $conv15 = $14 << 16 >> 16; + $mul16 = Math_imul($conv12, $conv15)|0; + $add17 = (($10) + ($mul16))|0; + $res_Q15 = $add17; + $15 = $res_Q15; + $16 = $buf_ptr; + $arrayidx18 = ((($16)) + 4|0); + $17 = HEAP16[$arrayidx18>>1]|0; + $conv19 = $17 << 16 >> 16; + $18 = $table_index; + $arrayidx20 = (20520 + ($18<<3)|0); + $arrayidx21 = ((($arrayidx20)) + 4|0); + $19 = HEAP16[$arrayidx21>>1]|0; + $conv22 = $19 << 16 >> 16; + $mul23 = Math_imul($conv19, $conv22)|0; + $add24 = (($15) + ($mul23))|0; + $res_Q15 = $add24; + $20 = $res_Q15; + $21 = $buf_ptr; + $arrayidx25 = ((($21)) + 6|0); + $22 = HEAP16[$arrayidx25>>1]|0; + $conv26 = $22 << 16 >> 16; + $23 = $table_index; + $arrayidx27 = (20520 + ($23<<3)|0); + $arrayidx28 = ((($arrayidx27)) + 6|0); + $24 = HEAP16[$arrayidx28>>1]|0; + $conv29 = $24 << 16 >> 16; + $mul30 = Math_imul($conv26, $conv29)|0; + $add31 = (($20) + ($mul30))|0; + $res_Q15 = $add31; + $25 = $res_Q15; + $26 = $buf_ptr; + $arrayidx32 = ((($26)) + 8|0); + $27 = HEAP16[$arrayidx32>>1]|0; + $conv33 = $27 << 16 >> 16; + $28 = $table_index; + $sub = (11 - ($28))|0; + $arrayidx34 = (20520 + ($sub<<3)|0); + $arrayidx35 = ((($arrayidx34)) + 6|0); + $29 = HEAP16[$arrayidx35>>1]|0; + $conv36 = $29 << 16 >> 16; + $mul37 = Math_imul($conv33, $conv36)|0; + $add38 = (($25) + ($mul37))|0; + $res_Q15 = $add38; + $30 = $res_Q15; + $31 = $buf_ptr; + $arrayidx39 = ((($31)) + 10|0); + $32 = HEAP16[$arrayidx39>>1]|0; + $conv40 = $32 << 16 >> 16; + $33 = $table_index; + $sub41 = (11 - ($33))|0; + $arrayidx42 = (20520 + ($sub41<<3)|0); + $arrayidx43 = ((($arrayidx42)) + 4|0); + $34 = HEAP16[$arrayidx43>>1]|0; + $conv44 = $34 << 16 >> 16; + $mul45 = Math_imul($conv40, $conv44)|0; + $add46 = (($30) + ($mul45))|0; + $res_Q15 = $add46; + $35 = $res_Q15; + $36 = $buf_ptr; + $arrayidx47 = ((($36)) + 12|0); + $37 = HEAP16[$arrayidx47>>1]|0; + $conv48 = $37 << 16 >> 16; + $38 = $table_index; + $sub49 = (11 - ($38))|0; + $arrayidx50 = (20520 + ($sub49<<3)|0); + $arrayidx51 = ((($arrayidx50)) + 2|0); + $39 = HEAP16[$arrayidx51>>1]|0; + $conv52 = $39 << 16 >> 16; + $mul53 = Math_imul($conv48, $conv52)|0; + $add54 = (($35) + ($mul53))|0; + $res_Q15 = $add54; + $40 = $res_Q15; + $41 = $buf_ptr; + $arrayidx55 = ((($41)) + 14|0); + $42 = HEAP16[$arrayidx55>>1]|0; + $conv56 = $42 << 16 >> 16; + $43 = $table_index; + $sub57 = (11 - ($43))|0; + $arrayidx58 = (20520 + ($sub57<<3)|0); + $44 = HEAP16[$arrayidx58>>1]|0; + $conv60 = $44 << 16 >> 16; + $mul61 = Math_imul($conv56, $conv60)|0; + $add62 = (($40) + ($mul61))|0; + $res_Q15 = $add62; + $45 = $res_Q15; + $shr63 = $45 >> 14; + $add64 = (($shr63) + 1)|0; + $shr65 = $add64 >> 1; + $cmp66 = ($shr65|0)>(32767); + if ($cmp66) { + $cond79 = 32767; + } else { + $46 = $res_Q15; + $shr68 = $46 >> 14; + $add69 = (($shr68) + 1)|0; + $shr70 = $add69 >> 1; + $cmp71 = ($shr70|0)<(-32768); + if ($cmp71) { + $cond79 = -32768; + } else { + $47 = $res_Q15; + $shr75 = $47 >> 14; + $add76 = (($shr75) + 1)|0; + $shr77 = $add76 >> 1; + $cond79 = $shr77; + } + } + $conv80 = $cond79&65535; + $48 = $out$addr; + $incdec$ptr = ((($48)) + 2|0); + $out$addr = $incdec$ptr; + HEAP16[$48>>1] = $conv80; + $49 = $index_increment_Q16$addr; + $50 = $index_Q16; + $add81 = (($50) + ($49))|0; + $index_Q16 = $add81; + } + $51 = $out$addr; + STACKTOP = sp;return ($51|0); +} +function _silk_resampler_private_up2_HQ($S,$out,$in,$len) { + $S = $S|0; + $out = $out|0; + $in = $in|0; + $len = $len|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; + var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $S$addr = 0, $X = 0, $Y = 0, $add = 0; + var $add100 = 0, $add103 = 0, $add110 = 0, $add117 = 0, $add125 = 0, $add19 = 0, $add21 = 0, $add22 = 0, $add33 = 0, $add34 = 0, $add36 = 0, $add37 = 0, $add40 = 0, $add45 = 0, $add52 = 0, $add68 = 0, $add7 = 0, $add70 = 0, $add71 = 0, $add8 = 0; + var $add82 = 0, $add84 = 0, $add85 = 0, $add96 = 0, $add97 = 0, $add99 = 0, $and = 0, $and15 = 0, $and29 = 0, $and64 = 0, $and78 = 0, $and92 = 0, $arrayidx = 0, $arrayidx10 = 0, $arrayidx101 = 0, $arrayidx126 = 0, $arrayidx20 = 0, $arrayidx23 = 0, $arrayidx24 = 0, $arrayidx35 = 0; + var $arrayidx38 = 0, $arrayidx58 = 0, $arrayidx59 = 0, $arrayidx69 = 0, $arrayidx72 = 0, $arrayidx73 = 0, $arrayidx83 = 0, $arrayidx86 = 0, $arrayidx87 = 0, $arrayidx98 = 0, $cmp = 0, $cmp105 = 0, $cmp112 = 0, $cmp42 = 0, $cmp47 = 0, $cond122 = 0, $cond55 = 0, $conv = 0, $conv123 = 0, $conv13 = 0; + var $conv16 = 0, $conv2 = 0, $conv27 = 0, $conv3 = 0, $conv30 = 0, $conv56 = 0, $conv62 = 0, $conv65 = 0, $conv76 = 0, $conv79 = 0, $conv90 = 0, $conv93 = 0, $in$addr = 0, $in32 = 0, $inc = 0, $k = 0, $len$addr = 0, $mul = 0, $mul124 = 0, $mul14 = 0; + var $mul17 = 0, $mul28 = 0, $mul31 = 0, $mul4 = 0, $mul57 = 0, $mul63 = 0, $mul66 = 0, $mul77 = 0, $mul80 = 0, $mul91 = 0, $mul94 = 0, $out$addr = 0, $out32_1 = 0, $out32_2 = 0, $shl = 0, $shr = 0, $shr102 = 0, $shr104 = 0, $shr109 = 0, $shr111 = 0; + var $shr116 = 0, $shr118 = 0, $shr12 = 0, $shr18 = 0, $shr26 = 0, $shr32 = 0, $shr39 = 0, $shr41 = 0, $shr44 = 0, $shr46 = 0, $shr5 = 0, $shr51 = 0, $shr53 = 0, $shr61 = 0, $shr67 = 0, $shr75 = 0, $shr81 = 0, $shr89 = 0, $shr95 = 0, $sub = 0; + var $sub11 = 0, $sub25 = 0, $sub60 = 0, $sub74 = 0, $sub88 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $S$addr = $S; + $out$addr = $out; + $in$addr = $in; + $len$addr = $len; + $k = 0; + while(1) { + $0 = $k; + $1 = $len$addr; + $cmp = ($0|0)<($1|0); + if (!($cmp)) { + break; + } + $2 = $in$addr; + $3 = $k; + $arrayidx = (($2) + ($3<<1)|0); + $4 = HEAP16[$arrayidx>>1]|0; + $conv = $4 << 16 >> 16; + $shl = $conv << 10; + $in32 = $shl; + $5 = $in32; + $6 = $S$addr; + $7 = HEAP32[$6>>2]|0; + $sub = (($5) - ($7))|0; + $Y = $sub; + $8 = $Y; + $shr = $8 >> 16; + $9 = HEAP16[10131]|0; + $conv2 = $9 << 16 >> 16; + $mul = Math_imul($shr, $conv2)|0; + $10 = $Y; + $and = $10 & 65535; + $11 = HEAP16[10131]|0; + $conv3 = $11 << 16 >> 16; + $mul4 = Math_imul($and, $conv3)|0; + $shr5 = $mul4 >> 16; + $add = (($mul) + ($shr5))|0; + $X = $add; + $12 = $S$addr; + $13 = HEAP32[$12>>2]|0; + $14 = $X; + $add7 = (($13) + ($14))|0; + $out32_1 = $add7; + $15 = $in32; + $16 = $X; + $add8 = (($15) + ($16))|0; + $17 = $S$addr; + HEAP32[$17>>2] = $add8; + $18 = $out32_1; + $19 = $S$addr; + $arrayidx10 = ((($19)) + 4|0); + $20 = HEAP32[$arrayidx10>>2]|0; + $sub11 = (($18) - ($20))|0; + $Y = $sub11; + $21 = $Y; + $shr12 = $21 >> 16; + $22 = HEAP16[(20264)>>1]|0; + $conv13 = $22 << 16 >> 16; + $mul14 = Math_imul($shr12, $conv13)|0; + $23 = $Y; + $and15 = $23 & 65535; + $24 = HEAP16[(20264)>>1]|0; + $conv16 = $24 << 16 >> 16; + $mul17 = Math_imul($and15, $conv16)|0; + $shr18 = $mul17 >> 16; + $add19 = (($mul14) + ($shr18))|0; + $X = $add19; + $25 = $S$addr; + $arrayidx20 = ((($25)) + 4|0); + $26 = HEAP32[$arrayidx20>>2]|0; + $27 = $X; + $add21 = (($26) + ($27))|0; + $out32_2 = $add21; + $28 = $out32_1; + $29 = $X; + $add22 = (($28) + ($29))|0; + $30 = $S$addr; + $arrayidx23 = ((($30)) + 4|0); + HEAP32[$arrayidx23>>2] = $add22; + $31 = $out32_2; + $32 = $S$addr; + $arrayidx24 = ((($32)) + 8|0); + $33 = HEAP32[$arrayidx24>>2]|0; + $sub25 = (($31) - ($33))|0; + $Y = $sub25; + $34 = $Y; + $35 = $Y; + $shr26 = $35 >> 16; + $36 = HEAP16[(20266)>>1]|0; + $conv27 = $36 << 16 >> 16; + $mul28 = Math_imul($shr26, $conv27)|0; + $37 = $Y; + $and29 = $37 & 65535; + $38 = HEAP16[(20266)>>1]|0; + $conv30 = $38 << 16 >> 16; + $mul31 = Math_imul($and29, $conv30)|0; + $shr32 = $mul31 >> 16; + $add33 = (($mul28) + ($shr32))|0; + $add34 = (($34) + ($add33))|0; + $X = $add34; + $39 = $S$addr; + $arrayidx35 = ((($39)) + 8|0); + $40 = HEAP32[$arrayidx35>>2]|0; + $41 = $X; + $add36 = (($40) + ($41))|0; + $out32_1 = $add36; + $42 = $out32_2; + $43 = $X; + $add37 = (($42) + ($43))|0; + $44 = $S$addr; + $arrayidx38 = ((($44)) + 8|0); + HEAP32[$arrayidx38>>2] = $add37; + $45 = $out32_1; + $shr39 = $45 >> 9; + $add40 = (($shr39) + 1)|0; + $shr41 = $add40 >> 1; + $cmp42 = ($shr41|0)>(32767); + if ($cmp42) { + $cond55 = 32767; + } else { + $46 = $out32_1; + $shr44 = $46 >> 9; + $add45 = (($shr44) + 1)|0; + $shr46 = $add45 >> 1; + $cmp47 = ($shr46|0)<(-32768); + if ($cmp47) { + $cond55 = -32768; + } else { + $47 = $out32_1; + $shr51 = $47 >> 9; + $add52 = (($shr51) + 1)|0; + $shr53 = $add52 >> 1; + $cond55 = $shr53; + } + } + $conv56 = $cond55&65535; + $48 = $out$addr; + $49 = $k; + $mul57 = $49<<1; + $arrayidx58 = (($48) + ($mul57<<1)|0); + HEAP16[$arrayidx58>>1] = $conv56; + $50 = $in32; + $51 = $S$addr; + $arrayidx59 = ((($51)) + 12|0); + $52 = HEAP32[$arrayidx59>>2]|0; + $sub60 = (($50) - ($52))|0; + $Y = $sub60; + $53 = $Y; + $shr61 = $53 >> 16; + $54 = HEAP16[10134]|0; + $conv62 = $54 << 16 >> 16; + $mul63 = Math_imul($shr61, $conv62)|0; + $55 = $Y; + $and64 = $55 & 65535; + $56 = HEAP16[10134]|0; + $conv65 = $56 << 16 >> 16; + $mul66 = Math_imul($and64, $conv65)|0; + $shr67 = $mul66 >> 16; + $add68 = (($mul63) + ($shr67))|0; + $X = $add68; + $57 = $S$addr; + $arrayidx69 = ((($57)) + 12|0); + $58 = HEAP32[$arrayidx69>>2]|0; + $59 = $X; + $add70 = (($58) + ($59))|0; + $out32_1 = $add70; + $60 = $in32; + $61 = $X; + $add71 = (($60) + ($61))|0; + $62 = $S$addr; + $arrayidx72 = ((($62)) + 12|0); + HEAP32[$arrayidx72>>2] = $add71; + $63 = $out32_1; + $64 = $S$addr; + $arrayidx73 = ((($64)) + 16|0); + $65 = HEAP32[$arrayidx73>>2]|0; + $sub74 = (($63) - ($65))|0; + $Y = $sub74; + $66 = $Y; + $shr75 = $66 >> 16; + $67 = HEAP16[(20270)>>1]|0; + $conv76 = $67 << 16 >> 16; + $mul77 = Math_imul($shr75, $conv76)|0; + $68 = $Y; + $and78 = $68 & 65535; + $69 = HEAP16[(20270)>>1]|0; + $conv79 = $69 << 16 >> 16; + $mul80 = Math_imul($and78, $conv79)|0; + $shr81 = $mul80 >> 16; + $add82 = (($mul77) + ($shr81))|0; + $X = $add82; + $70 = $S$addr; + $arrayidx83 = ((($70)) + 16|0); + $71 = HEAP32[$arrayidx83>>2]|0; + $72 = $X; + $add84 = (($71) + ($72))|0; + $out32_2 = $add84; + $73 = $out32_1; + $74 = $X; + $add85 = (($73) + ($74))|0; + $75 = $S$addr; + $arrayidx86 = ((($75)) + 16|0); + HEAP32[$arrayidx86>>2] = $add85; + $76 = $out32_2; + $77 = $S$addr; + $arrayidx87 = ((($77)) + 20|0); + $78 = HEAP32[$arrayidx87>>2]|0; + $sub88 = (($76) - ($78))|0; + $Y = $sub88; + $79 = $Y; + $80 = $Y; + $shr89 = $80 >> 16; + $81 = HEAP16[(20272)>>1]|0; + $conv90 = $81 << 16 >> 16; + $mul91 = Math_imul($shr89, $conv90)|0; + $82 = $Y; + $and92 = $82 & 65535; + $83 = HEAP16[(20272)>>1]|0; + $conv93 = $83 << 16 >> 16; + $mul94 = Math_imul($and92, $conv93)|0; + $shr95 = $mul94 >> 16; + $add96 = (($mul91) + ($shr95))|0; + $add97 = (($79) + ($add96))|0; + $X = $add97; + $84 = $S$addr; + $arrayidx98 = ((($84)) + 20|0); + $85 = HEAP32[$arrayidx98>>2]|0; + $86 = $X; + $add99 = (($85) + ($86))|0; + $out32_1 = $add99; + $87 = $out32_2; + $88 = $X; + $add100 = (($87) + ($88))|0; + $89 = $S$addr; + $arrayidx101 = ((($89)) + 20|0); + HEAP32[$arrayidx101>>2] = $add100; + $90 = $out32_1; + $shr102 = $90 >> 9; + $add103 = (($shr102) + 1)|0; + $shr104 = $add103 >> 1; + $cmp105 = ($shr104|0)>(32767); + if ($cmp105) { + $cond122 = 32767; + } else { + $91 = $out32_1; + $shr109 = $91 >> 9; + $add110 = (($shr109) + 1)|0; + $shr111 = $add110 >> 1; + $cmp112 = ($shr111|0)<(-32768); + if ($cmp112) { + $cond122 = -32768; + } else { + $92 = $out32_1; + $shr116 = $92 >> 9; + $add117 = (($shr116) + 1)|0; + $shr118 = $add117 >> 1; + $cond122 = $shr118; + } + } + $conv123 = $cond122&65535; + $93 = $out$addr; + $94 = $k; + $mul124 = $94<<1; + $add125 = (($mul124) + 1)|0; + $arrayidx126 = (($93) + ($add125<<1)|0); + HEAP16[$arrayidx126>>1] = $conv123; + $95 = $k; + $inc = (($95) + 1)|0; + $k = $inc; + } + STACKTOP = sp;return; +} +function _silk_resampler_private_up2_HQ_wrapper($SS,$out,$in,$len) { + $SS = $SS|0; + $out = $out|0; + $in = $in|0; + $len = $len|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $S = 0, $SS$addr = 0, $in$addr = 0, $len$addr = 0, $out$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $SS$addr = $SS; + $out$addr = $out; + $in$addr = $in; + $len$addr = $len; + $0 = $SS$addr; + $S = $0; + $1 = $S; + $2 = $out$addr; + $3 = $in$addr; + $4 = $len$addr; + _silk_resampler_private_up2_HQ($1,$2,$3,$4); + STACKTOP = sp;return; +} +function _silk_stereo_decode_pred($psRangeDec,$pred_Q13) { + $psRangeDec = $psRangeDec|0; + $pred_Q13 = $pred_Q13|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add25 = 0, $add32 = 0; + var $add38 = 0, $add44 = 0, $add48 = 0, $and = 0, $arrayidx1 = 0, $arrayidx10 = 0, $arrayidx11 = 0, $arrayidx15 = 0, $arrayidx16 = 0, $arrayidx18 = 0, $arrayidx20 = 0, $arrayidx22 = 0, $arrayidx23 = 0, $arrayidx26 = 0, $arrayidx3 = 0, $arrayidx30 = 0, $arrayidx33 = 0, $arrayidx4 = 0, $arrayidx41 = 0, $arrayidx42 = 0; + var $arrayidx49 = 0, $arrayidx5 = 0, $arrayidx53 = 0, $arrayidx7 = 0, $call = 0, $call6 = 0, $call9 = 0, $cmp = 0, $cmp13 = 0, $conv = 0, $conv27 = 0, $conv34 = 0, $conv39 = 0, $conv40 = 0, $conv45 = 0, $conv46 = 0, $div = 0, $inc = 0, $inc51 = 0, $ix = 0; + var $low_Q13 = 0, $mul = 0, $mul17 = 0, $mul29 = 0, $mul36 = 0, $mul43 = 0, $mul47 = 0, $n = 0, $pred_Q13$addr = 0, $psRangeDec$addr = 0, $shr = 0, $shr37 = 0, $step_Q13 = 0, $sub = 0, $sub28 = 0, $sub35 = 0, $sub55 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $ix = sp + 8|0; + $psRangeDec$addr = $psRangeDec; + $pred_Q13$addr = $pred_Q13; + $0 = $psRangeDec$addr; + $call = (_ec_dec_icdf($0,22599,8)|0); + $n = $call; + $1 = $n; + $div = (($1|0) / 5)&-1; + $arrayidx1 = ((($ix)) + 8|0); + HEAP32[$arrayidx1>>2] = $div; + $2 = $n; + $arrayidx3 = ((($ix)) + 8|0); + $3 = HEAP32[$arrayidx3>>2]|0; + $mul = ($3*5)|0; + $sub = (($2) - ($mul))|0; + $arrayidx4 = ((($ix)) + 12|0); + $arrayidx5 = ((($arrayidx4)) + 8|0); + HEAP32[$arrayidx5>>2] = $sub; + $n = 0; + while(1) { + $4 = $n; + $cmp = ($4|0)<(2); + if (!($cmp)) { + break; + } + $5 = $psRangeDec$addr; + $call6 = (_ec_dec_icdf($5,22652,8)|0); + $6 = $n; + $arrayidx7 = (($ix) + (($6*12)|0)|0); + HEAP32[$arrayidx7>>2] = $call6; + $7 = $psRangeDec$addr; + $call9 = (_ec_dec_icdf($7,22659,8)|0); + $8 = $n; + $arrayidx10 = (($ix) + (($8*12)|0)|0); + $arrayidx11 = ((($arrayidx10)) + 4|0); + HEAP32[$arrayidx11>>2] = $call9; + $9 = $n; + $inc = (($9) + 1)|0; + $n = $inc; + } + $n = 0; + while(1) { + $10 = $n; + $cmp13 = ($10|0)<(2); + if (!($cmp13)) { + break; + } + $11 = $n; + $arrayidx15 = (($ix) + (($11*12)|0)|0); + $arrayidx16 = ((($arrayidx15)) + 8|0); + $12 = HEAP32[$arrayidx16>>2]|0; + $mul17 = ($12*3)|0; + $13 = $n; + $arrayidx18 = (($ix) + (($13*12)|0)|0); + $14 = HEAP32[$arrayidx18>>2]|0; + $add = (($14) + ($mul17))|0; + HEAP32[$arrayidx18>>2] = $add; + $15 = $n; + $arrayidx20 = (($ix) + (($15*12)|0)|0); + $16 = HEAP32[$arrayidx20>>2]|0; + $arrayidx22 = (20216 + ($16<<1)|0); + $17 = HEAP16[$arrayidx22>>1]|0; + $conv = $17 << 16 >> 16; + $low_Q13 = $conv; + $18 = $n; + $arrayidx23 = (($ix) + (($18*12)|0)|0); + $19 = HEAP32[$arrayidx23>>2]|0; + $add25 = (($19) + 1)|0; + $arrayidx26 = (20216 + ($add25<<1)|0); + $20 = HEAP16[$arrayidx26>>1]|0; + $conv27 = $20 << 16 >> 16; + $21 = $low_Q13; + $sub28 = (($conv27) - ($21))|0; + $shr = $sub28 >> 16; + $mul29 = ($shr*6554)|0; + $22 = $n; + $arrayidx30 = (($ix) + (($22*12)|0)|0); + $23 = HEAP32[$arrayidx30>>2]|0; + $add32 = (($23) + 1)|0; + $arrayidx33 = (20216 + ($add32<<1)|0); + $24 = HEAP16[$arrayidx33>>1]|0; + $conv34 = $24 << 16 >> 16; + $25 = $low_Q13; + $sub35 = (($conv34) - ($25))|0; + $and = $sub35 & 65535; + $mul36 = ($and*6554)|0; + $shr37 = $mul36 >> 16; + $add38 = (($mul29) + ($shr37))|0; + $step_Q13 = $add38; + $26 = $low_Q13; + $27 = $step_Q13; + $conv39 = $27&65535; + $conv40 = $conv39 << 16 >> 16; + $28 = $n; + $arrayidx41 = (($ix) + (($28*12)|0)|0); + $arrayidx42 = ((($arrayidx41)) + 4|0); + $29 = HEAP32[$arrayidx42>>2]|0; + $mul43 = $29<<1; + $add44 = (($mul43) + 1)|0; + $conv45 = $add44&65535; + $conv46 = $conv45 << 16 >> 16; + $mul47 = Math_imul($conv40, $conv46)|0; + $add48 = (($26) + ($mul47))|0; + $30 = $pred_Q13$addr; + $31 = $n; + $arrayidx49 = (($30) + ($31<<2)|0); + HEAP32[$arrayidx49>>2] = $add48; + $32 = $n; + $inc51 = (($32) + 1)|0; + $n = $inc51; + } + $33 = $pred_Q13$addr; + $arrayidx53 = ((($33)) + 4|0); + $34 = HEAP32[$arrayidx53>>2]|0; + $35 = $pred_Q13$addr; + $36 = HEAP32[$35>>2]|0; + $sub55 = (($36) - ($34))|0; + HEAP32[$35>>2] = $sub55; + STACKTOP = sp;return; +} +function _silk_stereo_decode_mid_only($psRangeDec,$decode_only_mid) { + $psRangeDec = $psRangeDec|0; + $decode_only_mid = $decode_only_mid|0; + var $0 = 0, $1 = 0, $call = 0, $decode_only_mid$addr = 0, $psRangeDec$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $psRangeDec$addr = $psRangeDec; + $decode_only_mid$addr = $decode_only_mid; + $0 = $psRangeDec$addr; + $call = (_ec_dec_icdf($0,22624,8)|0); + $1 = $decode_only_mid$addr; + HEAP32[$1>>2] = $call; + STACKTOP = sp;return; +} +function _opus_pcm_soft_clip($_x,$N,$C,$declip_mem) { + $_x = $_x|0; + $N = $N|0; + $C = $C|0; + $declip_mem = $declip_mem|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0.0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0, $114 = 0.0, $115 = 0.0; + var $116 = 0.0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0.0, $121 = 0.0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0.0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0.0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0.0, $145 = 0, $146 = 0.0, $147 = 0.0, $148 = 0, $149 = 0, $15 = 0.0, $150 = 0, $151 = 0; + var $152 = 0.0, $153 = 0.0, $154 = 0.0, $155 = 0, $156 = 0, $157 = 0, $158 = 0.0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0.0, $163 = 0, $164 = 0, $165 = 0, $166 = 0.0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0.0, $171 = 0, $172 = 0, $173 = 0, $174 = 0.0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0.0, $180 = 0, $181 = 0, $182 = 0.0, $183 = 0, $184 = 0, $185 = 0, $19 = 0, $2 = 0, $20 = 0; + var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0; + var $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0; + var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0, $63 = 0, $64 = 0, $65 = 0.0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0.0, $75 = 0; + var $76 = 0, $77 = 0, $78 = 0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0.0, $90 = 0.0, $91 = 0, $92 = 0, $93 = 0; + var $94 = 0.0, $95 = 0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0.0, $C$addr = 0, $N$addr = 0, $_x$addr = 0, $a = 0.0, $add = 0.0, $add$ptr = 0, $add140 = 0.0, $add161 = 0.0, $arrayidx = 0, $arrayidx102 = 0, $arrayidx11 = 0, $arrayidx113 = 0, $arrayidx122 = 0, $arrayidx133 = 0; + var $arrayidx135 = 0, $arrayidx138 = 0, $arrayidx142 = 0, $arrayidx15 = 0, $arrayidx160 = 0, $arrayidx163 = 0, $arrayidx169 = 0, $arrayidx177 = 0, $arrayidx183 = 0, $arrayidx189 = 0, $arrayidx199 = 0, $arrayidx20 = 0, $arrayidx24 = 0, $arrayidx29 = 0, $arrayidx35 = 0, $arrayidx37 = 0, $arrayidx40 = 0, $arrayidx43 = 0, $arrayidx52 = 0, $arrayidx56 = 0; + var $arrayidx67 = 0, $arrayidx7 = 0, $arrayidx73 = 0, $arrayidx75 = 0, $arrayidx85 = 0, $arrayidx87 = 0, $arrayidx94 = 0, $c = 0, $call = 0.0, $call104 = 0.0, $call96 = 0.0, $cmp = 0, $cmp1 = 0, $cmp109 = 0, $cmp116 = 0, $cmp12 = 0, $cmp123 = 0, $cmp129 = 0, $cmp147 = 0, $cmp155 = 0; + var $cmp164 = 0, $cmp172 = 0, $cmp178 = 0, $cmp194 = 0, $cmp22 = 0, $cmp26 = 0, $cmp31 = 0, $cmp49 = 0, $cmp5 = 0, $cmp53 = 0, $cmp57 = 0, $cmp6 = 0, $cmp63 = 0, $cmp70 = 0, $cmp77 = 0, $cmp8 = 0, $cmp81 = 0, $cmp89 = 0, $cmp98 = 0, $cond = 0.0; + var $cond171 = 0.0, $cond187 = 0.0, $cond19 = 0.0, $conv = 0.0, $conv103 = 0.0, $conv105 = 0.0, $conv152 = 0.0, $conv68 = 0.0, $conv95 = 0.0, $conv97 = 0.0, $curr = 0, $dec = 0, $declip_mem$addr = 0, $delta = 0.0, $div = 0.0, $div153 = 0.0, $end = 0, $i = 0, $inc = 0, $inc107 = 0; + var $inc144 = 0, $inc191 = 0, $inc201 = 0, $inc45 = 0, $inc61 = 0, $land$ext = 0, $maxval = 0.0, $mul = 0, $mul101 = 0, $mul112 = 0, $mul115 = 0.0, $mul120 = 0.0, $mul121 = 0, $mul132 = 0, $mul134 = 0, $mul136 = 0.0, $mul137 = 0, $mul139 = 0.0, $mul141 = 0, $mul159 = 0; + var $mul162 = 0, $mul168 = 0, $mul176 = 0, $mul182 = 0, $mul188 = 0, $mul28 = 0, $mul30 = 0.0, $mul34 = 0, $mul36 = 0, $mul38 = 0.0, $mul39 = 0, $mul41 = 0.0, $mul42 = 0, $mul51 = 0, $mul55 = 0, $mul66 = 0, $mul72 = 0, $mul74 = 0, $mul76 = 0.0, $mul84 = 0; + var $mul86 = 0, $mul88 = 0.0, $mul93 = 0, $offset = 0.0, $or$cond = 0, $or$cond$not = 0, $or$cond1 = 0, $or$cond2 = 0, $or$cond3 = 0, $peak_pos = 0, $special = 0, $start = 0, $sub = 0, $sub119 = 0.0, $sub126 = 0.0, $sub151 = 0.0, $sub158 = 0.0, $tobool = 0, $tobool146 = 0, $tobool4 = 0; + var $x = 0, $x0 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); + $_x$addr = $_x; + $N$addr = $N; + $C$addr = $C; + $declip_mem$addr = $declip_mem; + $0 = $C$addr; + $cmp = ($0|0)<(1); + $1 = $N$addr; + $cmp1 = ($1|0)<(1); + $or$cond = $cmp | $cmp1; + $or$cond$not = $or$cond ^ 1; + $2 = $_x$addr; + $tobool = ($2|0)!=(0|0); + $or$cond1 = $or$cond$not & $tobool; + $3 = $declip_mem$addr; + $tobool4 = ($3|0)!=(0|0); + $or$cond2 = $or$cond1 & $tobool4; + if (!($or$cond2)) { + STACKTOP = sp;return; + } + $i = 0; + while(1) { + $4 = $i; + $5 = $N$addr; + $6 = $C$addr; + $mul = Math_imul($5, $6)|0; + $cmp5 = ($4|0)<($mul|0); + if (!($cmp5)) { + break; + } + $7 = $_x$addr; + $8 = $i; + $arrayidx = (($7) + ($8<<2)|0); + $9 = +HEAPF32[$arrayidx>>2]; + $cmp6 = 2.0 < $9; + if ($cmp6) { + $cond = 2.0; + } else { + $10 = $_x$addr; + $11 = $i; + $arrayidx7 = (($10) + ($11<<2)|0); + $12 = +HEAPF32[$arrayidx7>>2]; + $cond = $12; + } + $cmp8 = -2.0 > $cond; + if ($cmp8) { + $cond19 = -2.0; + } else { + $13 = $_x$addr; + $14 = $i; + $arrayidx11 = (($13) + ($14<<2)|0); + $15 = +HEAPF32[$arrayidx11>>2]; + $cmp12 = 2.0 < $15; + if ($cmp12) { + $cond19 = 2.0; + } else { + $16 = $_x$addr; + $17 = $i; + $arrayidx15 = (($16) + ($17<<2)|0); + $18 = +HEAPF32[$arrayidx15>>2]; + $cond19 = $18; + } + } + $19 = $_x$addr; + $20 = $i; + $arrayidx20 = (($19) + ($20<<2)|0); + HEAPF32[$arrayidx20>>2] = $cond19; + $21 = $i; + $inc = (($21) + 1)|0; + $i = $inc; + } + $c = 0; + while(1) { + $22 = $c; + $23 = $C$addr; + $cmp22 = ($22|0)<($23|0); + if (!($cmp22)) { + break; + } + $24 = $_x$addr; + $25 = $c; + $add$ptr = (($24) + ($25<<2)|0); + $x = $add$ptr; + $26 = $declip_mem$addr; + $27 = $c; + $arrayidx24 = (($26) + ($27<<2)|0); + $28 = +HEAPF32[$arrayidx24>>2]; + $a = $28; + $i = 0; + while(1) { + $29 = $i; + $30 = $N$addr; + $cmp26 = ($29|0)<($30|0); + if (!($cmp26)) { + break; + } + $31 = $x; + $32 = $i; + $33 = $C$addr; + $mul28 = Math_imul($32, $33)|0; + $arrayidx29 = (($31) + ($mul28<<2)|0); + $34 = +HEAPF32[$arrayidx29>>2]; + $35 = $a; + $mul30 = $34 * $35; + $cmp31 = $mul30 >= 0.0; + if ($cmp31) { + break; + } + $36 = $x; + $37 = $i; + $38 = $C$addr; + $mul34 = Math_imul($37, $38)|0; + $arrayidx35 = (($36) + ($mul34<<2)|0); + $39 = +HEAPF32[$arrayidx35>>2]; + $40 = $a; + $41 = $x; + $42 = $i; + $43 = $C$addr; + $mul36 = Math_imul($42, $43)|0; + $arrayidx37 = (($41) + ($mul36<<2)|0); + $44 = +HEAPF32[$arrayidx37>>2]; + $mul38 = $40 * $44; + $45 = $x; + $46 = $i; + $47 = $C$addr; + $mul39 = Math_imul($46, $47)|0; + $arrayidx40 = (($45) + ($mul39<<2)|0); + $48 = +HEAPF32[$arrayidx40>>2]; + $mul41 = $mul38 * $48; + $add = $39 + $mul41; + $49 = $x; + $50 = $i; + $51 = $C$addr; + $mul42 = Math_imul($50, $51)|0; + $arrayidx43 = (($49) + ($mul42<<2)|0); + HEAPF32[$arrayidx43>>2] = $add; + $52 = $i; + $inc45 = (($52) + 1)|0; + $i = $inc45; + } + $curr = 0; + $53 = $x; + $54 = +HEAPF32[$53>>2]; + $x0 = $54; + while(1) { + $special = 0; + $55 = $curr; + $i = $55; + while(1) { + $56 = $i; + $57 = $N$addr; + $cmp49 = ($56|0)<($57|0); + if (!($cmp49)) { + break; + } + $58 = $x; + $59 = $i; + $60 = $C$addr; + $mul51 = Math_imul($59, $60)|0; + $arrayidx52 = (($58) + ($mul51<<2)|0); + $61 = +HEAPF32[$arrayidx52>>2]; + $cmp53 = $61 > 1.0; + if ($cmp53) { + break; + } + $62 = $x; + $63 = $i; + $64 = $C$addr; + $mul55 = Math_imul($63, $64)|0; + $arrayidx56 = (($62) + ($mul55<<2)|0); + $65 = +HEAPF32[$arrayidx56>>2]; + $cmp57 = $65 < -1.0; + if ($cmp57) { + break; + } + $66 = $i; + $inc61 = (($66) + 1)|0; + $i = $inc61; + } + $67 = $i; + $68 = $N$addr; + $cmp63 = ($67|0)==($68|0); + if ($cmp63) { + label = 23; + break; + } + $69 = $i; + $peak_pos = $69; + $70 = $i; + $end = $70; + $start = $70; + $71 = $x; + $72 = $i; + $73 = $C$addr; + $mul66 = Math_imul($72, $73)|0; + $arrayidx67 = (($71) + ($mul66<<2)|0); + $74 = +HEAPF32[$arrayidx67>>2]; + $conv = $74; + $call = (+Math_abs((+$conv))); + $conv68 = $call; + $maxval = $conv68; + while(1) { + $75 = $start; + $cmp70 = ($75|0)>(0); + if (!($cmp70)) { + break; + } + $76 = $x; + $77 = $i; + $78 = $C$addr; + $mul72 = Math_imul($77, $78)|0; + $arrayidx73 = (($76) + ($mul72<<2)|0); + $79 = +HEAPF32[$arrayidx73>>2]; + $80 = $x; + $81 = $start; + $sub = (($81) - 1)|0; + $82 = $C$addr; + $mul74 = Math_imul($sub, $82)|0; + $arrayidx75 = (($80) + ($mul74<<2)|0); + $83 = +HEAPF32[$arrayidx75>>2]; + $mul76 = $79 * $83; + $cmp77 = $mul76 >= 0.0; + if (!($cmp77)) { + break; + } + $84 = $start; + $dec = (($84) + -1)|0; + $start = $dec; + } + while(1) { + $85 = $end; + $86 = $N$addr; + $cmp81 = ($85|0)<($86|0); + if (!($cmp81)) { + break; + } + $87 = $x; + $88 = $i; + $89 = $C$addr; + $mul84 = Math_imul($88, $89)|0; + $arrayidx85 = (($87) + ($mul84<<2)|0); + $90 = +HEAPF32[$arrayidx85>>2]; + $91 = $x; + $92 = $end; + $93 = $C$addr; + $mul86 = Math_imul($92, $93)|0; + $arrayidx87 = (($91) + ($mul86<<2)|0); + $94 = +HEAPF32[$arrayidx87>>2]; + $mul88 = $90 * $94; + $cmp89 = $mul88 >= 0.0; + if (!($cmp89)) { + break; + } + $95 = $x; + $96 = $end; + $97 = $C$addr; + $mul93 = Math_imul($96, $97)|0; + $arrayidx94 = (($95) + ($mul93<<2)|0); + $98 = +HEAPF32[$arrayidx94>>2]; + $conv95 = $98; + $call96 = (+Math_abs((+$conv95))); + $conv97 = $call96; + $99 = $maxval; + $cmp98 = $conv97 > $99; + if ($cmp98) { + $100 = $x; + $101 = $end; + $102 = $C$addr; + $mul101 = Math_imul($101, $102)|0; + $arrayidx102 = (($100) + ($mul101<<2)|0); + $103 = +HEAPF32[$arrayidx102>>2]; + $conv103 = $103; + $call104 = (+Math_abs((+$conv103))); + $conv105 = $call104; + $maxval = $conv105; + $104 = $end; + $peak_pos = $104; + } + $105 = $end; + $inc107 = (($105) + 1)|0; + $end = $inc107; + } + $106 = $start; + $cmp109 = ($106|0)==(0); + if ($cmp109) { + $107 = $x; + $108 = $i; + $109 = $C$addr; + $mul112 = Math_imul($108, $109)|0; + $arrayidx113 = (($107) + ($mul112<<2)|0); + $110 = +HEAPF32[$arrayidx113>>2]; + $111 = $x; + $112 = +HEAPF32[$111>>2]; + $mul115 = $110 * $112; + $cmp116 = $mul115 >= 0.0; + $113 = $cmp116; + } else { + $113 = 0; + } + $land$ext = $113&1; + $special = $land$ext; + $114 = $maxval; + $sub119 = $114 - 1.0; + $115 = $maxval; + $116 = $maxval; + $mul120 = $115 * $116; + $div = $sub119 / $mul120; + $a = $div; + $117 = $x; + $118 = $i; + $119 = $C$addr; + $mul121 = Math_imul($118, $119)|0; + $arrayidx122 = (($117) + ($mul121<<2)|0); + $120 = +HEAPF32[$arrayidx122>>2]; + $cmp123 = $120 > 0.0; + if ($cmp123) { + $121 = $a; + $sub126 = - $121; + $a = $sub126; + } + $122 = $start; + $i = $122; + while(1) { + $123 = $i; + $124 = $end; + $cmp129 = ($123|0)<($124|0); + if (!($cmp129)) { + break; + } + $125 = $x; + $126 = $i; + $127 = $C$addr; + $mul132 = Math_imul($126, $127)|0; + $arrayidx133 = (($125) + ($mul132<<2)|0); + $128 = +HEAPF32[$arrayidx133>>2]; + $129 = $a; + $130 = $x; + $131 = $i; + $132 = $C$addr; + $mul134 = Math_imul($131, $132)|0; + $arrayidx135 = (($130) + ($mul134<<2)|0); + $133 = +HEAPF32[$arrayidx135>>2]; + $mul136 = $129 * $133; + $134 = $x; + $135 = $i; + $136 = $C$addr; + $mul137 = Math_imul($135, $136)|0; + $arrayidx138 = (($134) + ($mul137<<2)|0); + $137 = +HEAPF32[$arrayidx138>>2]; + $mul139 = $mul136 * $137; + $add140 = $128 + $mul139; + $138 = $x; + $139 = $i; + $140 = $C$addr; + $mul141 = Math_imul($139, $140)|0; + $arrayidx142 = (($138) + ($mul141<<2)|0); + HEAPF32[$arrayidx142>>2] = $add140; + $141 = $i; + $inc144 = (($141) + 1)|0; + $i = $inc144; + } + $142 = $special; + $tobool146 = ($142|0)!=(0); + $143 = $peak_pos; + $cmp147 = ($143|0)>=(2); + $or$cond3 = $tobool146 & $cmp147; + L54: do { + if ($or$cond3) { + $144 = $x0; + $145 = $x; + $146 = +HEAPF32[$145>>2]; + $sub151 = $144 - $146; + $offset = $sub151; + $147 = $offset; + $148 = $peak_pos; + $conv152 = (+($148|0)); + $div153 = $147 / $conv152; + $delta = $div153; + $149 = $curr; + $i = $149; + while(1) { + $150 = $i; + $151 = $peak_pos; + $cmp155 = ($150|0)<($151|0); + if (!($cmp155)) { + break L54; + } + $152 = $delta; + $153 = $offset; + $sub158 = $153 - $152; + $offset = $sub158; + $154 = $offset; + $155 = $x; + $156 = $i; + $157 = $C$addr; + $mul159 = Math_imul($156, $157)|0; + $arrayidx160 = (($155) + ($mul159<<2)|0); + $158 = +HEAPF32[$arrayidx160>>2]; + $add161 = $158 + $154; + HEAPF32[$arrayidx160>>2] = $add161; + $159 = $x; + $160 = $i; + $161 = $C$addr; + $mul162 = Math_imul($160, $161)|0; + $arrayidx163 = (($159) + ($mul162<<2)|0); + $162 = +HEAPF32[$arrayidx163>>2]; + $cmp164 = 1.0 < $162; + if ($cmp164) { + $cond171 = 1.0; + } else { + $163 = $x; + $164 = $i; + $165 = $C$addr; + $mul168 = Math_imul($164, $165)|0; + $arrayidx169 = (($163) + ($mul168<<2)|0); + $166 = +HEAPF32[$arrayidx169>>2]; + $cond171 = $166; + } + $cmp172 = -1.0 > $cond171; + if ($cmp172) { + $cond187 = -1.0; + } else { + $167 = $x; + $168 = $i; + $169 = $C$addr; + $mul176 = Math_imul($168, $169)|0; + $arrayidx177 = (($167) + ($mul176<<2)|0); + $170 = +HEAPF32[$arrayidx177>>2]; + $cmp178 = 1.0 < $170; + if ($cmp178) { + $cond187 = 1.0; + } else { + $171 = $x; + $172 = $i; + $173 = $C$addr; + $mul182 = Math_imul($172, $173)|0; + $arrayidx183 = (($171) + ($mul182<<2)|0); + $174 = +HEAPF32[$arrayidx183>>2]; + $cond187 = $174; + } + } + $175 = $x; + $176 = $i; + $177 = $C$addr; + $mul188 = Math_imul($176, $177)|0; + $arrayidx189 = (($175) + ($mul188<<2)|0); + HEAPF32[$arrayidx189>>2] = $cond187; + $178 = $i; + $inc191 = (($178) + 1)|0; + $i = $inc191; + } + } + } while(0); + $179 = $end; + $curr = $179; + $180 = $curr; + $181 = $N$addr; + $cmp194 = ($180|0)==($181|0); + if ($cmp194) { + break; + } + } + if ((label|0) == 23) { + label = 0; + $a = 0.0; + } + $182 = $a; + $183 = $declip_mem$addr; + $184 = $c; + $arrayidx199 = (($183) + ($184<<2)|0); + HEAPF32[$arrayidx199>>2] = $182; + $185 = $c; + $inc201 = (($185) + 1)|0; + $c = $inc201; + } + STACKTOP = sp;return; +} +function _opus_packet_get_samples_per_frame($data,$Fs) { + $data = $data|0; + $Fs = $Fs|0; + var $$sink = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $Fs$addr = 0, $and = 0, $and11 = 0, $and19 = 0, $and3 = 0, $and6 = 0; + var $audiosize = 0, $cmp = 0, $cmp20 = 0, $conv = 0, $conv10 = 0, $conv2 = 0, $data$addr = 0, $div = 0, $div14 = 0, $div23 = 0, $div26 = 0, $mul = 0, $shl = 0, $shl25 = 0, $shr = 0, $shr18 = 0, $tobool = 0, $tobool12 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $data$addr = $data; + $Fs$addr = $Fs; + $0 = $data$addr; + $1 = HEAP8[$0>>0]|0; + $conv = $1&255; + $and = $conv & 128; + $tobool = ($and|0)!=(0); + $2 = $data$addr; + $3 = HEAP8[$2>>0]|0; + $conv2 = $3&255; + if ($tobool) { + $shr = $conv2 >> 3; + $and3 = $shr & 3; + $audiosize = $and3; + $4 = $Fs$addr; + $5 = $audiosize; + $shl = $4 << $5; + $div = (($shl|0) / 400)&-1; + $audiosize = $div; + $12 = $audiosize; + STACKTOP = sp;return ($12|0); + } + $and6 = $conv2 & 96; + $cmp = ($and6|0)==(96); + $6 = $data$addr; + $7 = HEAP8[$6>>0]|0; + $conv10 = $7&255; + if ($cmp) { + $and11 = $conv10 & 8; + $tobool12 = ($and11|0)!=(0); + $8 = $Fs$addr; + $$sink = $tobool12 ? 50 : 100; + $div14 = (($8|0) / ($$sink|0))&-1; + $audiosize = $div14; + $12 = $audiosize; + STACKTOP = sp;return ($12|0); + } + $shr18 = $conv10 >> 3; + $and19 = $shr18 & 3; + $audiosize = $and19; + $9 = $audiosize; + $cmp20 = ($9|0)==(3); + $10 = $Fs$addr; + if ($cmp20) { + $mul = ($10*60)|0; + $div23 = (($mul|0) / 1000)&-1; + $audiosize = $div23; + $12 = $audiosize; + STACKTOP = sp;return ($12|0); + } else { + $11 = $audiosize; + $shl25 = $10 << $11; + $div26 = (($shl25|0) / 100)&-1; + $audiosize = $div26; + $12 = $audiosize; + STACKTOP = sp;return ($12|0); + } + return (0)|0; +} +function _opus_packet_parse_impl($data,$len,$self_delimited,$out_toc,$frames,$size,$payload_offset,$packet_offset) { + $data = $data|0; + $len = $len|0; + $self_delimited = $self_delimited|0; + $out_toc = $out_toc|0; + $frames = $frames|0; + $size = $size|0; + $payload_offset = $payload_offset|0; + $packet_offset = $packet_offset|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; + var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0; + var $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0; + var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0; + var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $add = 0, $add$ptr = 0, $add$ptr113 = 0, $add$ptr114 = 0, $add$ptr130 = 0, $add$ptr184 = 0, $add$ptr68 = 0, $add$ptr82 = 0; + var $add156 = 0, $add193 = 0, $add85 = 0, $and = 0, $and3 = 0, $and30 = 0, $and40 = 0, $and61 = 0, $arrayidx105 = 0, $arrayidx118 = 0, $arrayidx124 = 0, $arrayidx134 = 0, $arrayidx147 = 0, $arrayidx148 = 0, $arrayidx154 = 0, $arrayidx169 = 0, $arrayidx180 = 0, $arrayidx182 = 0, $arrayidx71 = 0, $arrayidx76 = 0; + var $arrayidx83 = 0, $bytes = 0, $call = 0, $call10 = 0, $call115 = 0, $call69 = 0, $cbr = 0, $ch = 0, $cmp = 0, $cmp101 = 0, $cmp120 = 0, $cmp126 = 0, $cmp13 = 0, $cmp137 = 0, $cmp143 = 0, $cmp157 = 0, $cmp163 = 0, $cmp17 = 0, $cmp175 = 0, $cmp24 = 0; + var $cmp31 = 0, $cmp34 = 0, $cmp43 = 0, $cmp50 = 0, $cmp53 = 0, $cmp56 = 0, $cmp66 = 0, $cmp73 = 0, $cmp78 = 0, $cmp87 = 0, $cmp95 = 0, $cond = 0, $conv = 0, $conv104 = 0, $conv119 = 0, $conv12 = 0, $conv125 = 0, $conv135 = 0, $conv155 = 0, $conv16 = 0; + var $conv167 = 0, $conv183 = 0, $conv22 = 0, $conv29 = 0, $conv39 = 0, $conv48 = 0, $conv60 = 0, $conv7 = 0, $conv72 = 0, $conv77 = 0, $conv84 = 0, $count = 0, $data$addr = 0, $data0 = 0, $dec = 0, $dec38 = 0, $dec49 = 0, $div = 0, $div93 = 0, $frames$addr = 0; + var $framesize = 0, $i = 0, $inc = 0, $inc107 = 0, $inc150 = 0, $inc186 = 0, $incdec$ptr = 0, $incdec$ptr28 = 0, $incdec$ptr47 = 0, $last_size = 0, $len$addr = 0, $lnot = 0, $lnot$ext = 0, $mul = 0, $mul136 = 0, $mul94 = 0, $out_toc$addr = 0, $p = 0, $packet_offset$addr = 0, $pad = 0; + var $payload_offset$addr = 0, $retval = 0, $self_delimited$addr = 0, $size$addr = 0, $sub = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$lhs$cast190 = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$rhs$cast191 = 0, $sub$ptr$sub = 0, $sub$ptr$sub192 = 0, $sub100 = 0, $sub116 = 0, $sub117 = 0, $sub123 = 0, $sub133 = 0, $sub142 = 0, $sub146 = 0, $sub153 = 0, $sub168 = 0; + var $sub23 = 0, $sub52 = 0, $sub65 = 0, $sub70 = 0, $sub86 = 0, $tmp = 0, $tobool = 0, $tobool111 = 0, $tobool131 = 0, $tobool171 = 0, $tobool178 = 0, $tobool188 = 0, $tobool195 = 0, $tobool4 = 0, $tobool41 = 0, $tobool62 = 0, $tobool63 = 0, $tobool91 = 0, $toc = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); + $data$addr = $data; + $len$addr = $len; + $self_delimited$addr = $self_delimited; + $out_toc$addr = $out_toc; + $frames$addr = $frames; + $size$addr = $size; + $payload_offset$addr = $payload_offset; + $packet_offset$addr = $packet_offset; + $pad = 0; + $0 = $data$addr; + $data0 = $0; + $1 = $size$addr; + $cmp = ($1|0)==(0|0); + if ($cmp) { + $retval = -1; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + $2 = $data$addr; + $call = (_opus_packet_get_samples_per_frame($2,48000)|0); + $framesize = $call; + $cbr = 0; + $3 = $data$addr; + $incdec$ptr = ((($3)) + 1|0); + $data$addr = $incdec$ptr; + $4 = HEAP8[$3>>0]|0; + $toc = $4; + $5 = $len$addr; + $dec = (($5) + -1)|0; + $len$addr = $dec; + $6 = $len$addr; + $last_size = $6; + $7 = $toc; + $conv = $7&255; + $and = $conv & 3; + L5: do { + switch ($and|0) { + case 0: { + $count = 1; + break; + } + case 1: { + $count = 2; + $cbr = 1; + $8 = $self_delimited$addr; + $tobool = ($8|0)!=(0); + if (!($tobool)) { + $9 = $len$addr; + $and3 = $9 & 1; + $tobool4 = ($and3|0)!=(0); + if (!($tobool4)) { + $10 = $len$addr; + $div = (($10|0) / 2)&-1; + $last_size = $div; + $11 = $last_size; + $conv7 = $11&65535; + $12 = $size$addr; + HEAP16[$12>>1] = $conv7; + break L5; + } + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + break; + } + case 2: { + $count = 2; + $13 = $data$addr; + $14 = $len$addr; + $15 = $size$addr; + $call10 = (_parse_size($13,$14,$15)|0); + $bytes = $call10; + $16 = $bytes; + $17 = $len$addr; + $sub = (($17) - ($16))|0; + $len$addr = $sub; + $18 = $size$addr; + $19 = HEAP16[$18>>1]|0; + $conv12 = $19 << 16 >> 16; + $cmp13 = ($conv12|0)<(0); + if (!($cmp13)) { + $20 = $size$addr; + $21 = HEAP16[$20>>1]|0; + $conv16 = $21 << 16 >> 16; + $22 = $len$addr; + $cmp17 = ($conv16|0)>($22|0); + if (!($cmp17)) { + $23 = $bytes; + $24 = $data$addr; + $add$ptr = (($24) + ($23)|0); + $data$addr = $add$ptr; + $25 = $len$addr; + $26 = $size$addr; + $27 = HEAP16[$26>>1]|0; + $conv22 = $27 << 16 >> 16; + $sub23 = (($25) - ($conv22))|0; + $last_size = $sub23; + break L5; + } + } + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + break; + } + default: { + $28 = $len$addr; + $cmp24 = ($28|0)<(1); + if ($cmp24) { + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + $29 = $data$addr; + $incdec$ptr28 = ((($29)) + 1|0); + $data$addr = $incdec$ptr28; + $30 = HEAP8[$29>>0]|0; + $ch = $30; + $31 = $ch; + $conv29 = $31&255; + $and30 = $conv29 & 63; + $count = $and30; + $32 = $count; + $cmp31 = ($32|0)<=(0); + if (!($cmp31)) { + $33 = $framesize; + $34 = $count; + $mul = Math_imul($33, $34)|0; + $cmp34 = ($mul|0)>(5760); + if (!($cmp34)) { + $35 = $len$addr; + $dec38 = (($35) + -1)|0; + $len$addr = $dec38; + $36 = $ch; + $conv39 = $36&255; + $and40 = $conv39 & 64; + $tobool41 = ($and40|0)!=(0); + L14: do { + if ($tobool41) { + while(1) { + $37 = $len$addr; + $cmp43 = ($37|0)<=(0); + if ($cmp43) { + break; + } + $38 = $data$addr; + $incdec$ptr47 = ((($38)) + 1|0); + $data$addr = $incdec$ptr47; + $39 = HEAP8[$38>>0]|0; + $conv48 = $39&255; + $p = $conv48; + $40 = $len$addr; + $dec49 = (($40) + -1)|0; + $len$addr = $dec49; + $41 = $p; + $cmp50 = ($41|0)==(255); + $42 = $p; + $cond = $cmp50 ? 254 : $42; + $tmp = $cond; + $43 = $tmp; + $44 = $len$addr; + $sub52 = (($44) - ($43))|0; + $len$addr = $sub52; + $45 = $tmp; + $46 = $pad; + $add = (($46) + ($45))|0; + $pad = $add; + $47 = $p; + $cmp53 = ($47|0)==(255); + if (!($cmp53)) { + break L14; + } + } + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + } while(0); + $48 = $len$addr; + $cmp56 = ($48|0)<(0); + if ($cmp56) { + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + $49 = $ch; + $conv60 = $49&255; + $and61 = $conv60 & 128; + $tobool62 = ($and61|0)!=(0); + $lnot = $tobool62 ^ 1; + $lnot$ext = $lnot&1; + $cbr = $lnot$ext; + $50 = $cbr; + $tobool63 = ($50|0)!=(0); + if ($tobool63) { + $76 = $self_delimited$addr; + $tobool91 = ($76|0)!=(0); + if ($tobool91) { + break L5; + } + $77 = $len$addr; + $78 = $count; + $div93 = (($77|0) / ($78|0))&-1; + $last_size = $div93; + $79 = $last_size; + $80 = $count; + $mul94 = Math_imul($79, $80)|0; + $81 = $len$addr; + $cmp95 = ($mul94|0)!=($81|0); + if ($cmp95) { + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + $i = 0; + while(1) { + $82 = $i; + $83 = $count; + $sub100 = (($83) - 1)|0; + $cmp101 = ($82|0)<($sub100|0); + if (!($cmp101)) { + break L5; + } + $84 = $last_size; + $conv104 = $84&65535; + $85 = $size$addr; + $86 = $i; + $arrayidx105 = (($85) + ($86<<1)|0); + HEAP16[$arrayidx105>>1] = $conv104; + $87 = $i; + $inc107 = (($87) + 1)|0; + $i = $inc107; + } + } + $51 = $len$addr; + $last_size = $51; + $i = 0; + while(1) { + $52 = $i; + $53 = $count; + $sub65 = (($53) - 1)|0; + $cmp66 = ($52|0)<($sub65|0); + if (!($cmp66)) { + break; + } + $54 = $data$addr; + $55 = $len$addr; + $56 = $size$addr; + $57 = $i; + $add$ptr68 = (($56) + ($57<<1)|0); + $call69 = (_parse_size($54,$55,$add$ptr68)|0); + $bytes = $call69; + $58 = $bytes; + $59 = $len$addr; + $sub70 = (($59) - ($58))|0; + $len$addr = $sub70; + $60 = $size$addr; + $61 = $i; + $arrayidx71 = (($60) + ($61<<1)|0); + $62 = HEAP16[$arrayidx71>>1]|0; + $conv72 = $62 << 16 >> 16; + $cmp73 = ($conv72|0)<(0); + if ($cmp73) { + label = 29; + break; + } + $63 = $size$addr; + $64 = $i; + $arrayidx76 = (($63) + ($64<<1)|0); + $65 = HEAP16[$arrayidx76>>1]|0; + $conv77 = $65 << 16 >> 16; + $66 = $len$addr; + $cmp78 = ($conv77|0)>($66|0); + if ($cmp78) { + label = 29; + break; + } + $67 = $bytes; + $68 = $data$addr; + $add$ptr82 = (($68) + ($67)|0); + $data$addr = $add$ptr82; + $69 = $bytes; + $70 = $size$addr; + $71 = $i; + $arrayidx83 = (($70) + ($71<<1)|0); + $72 = HEAP16[$arrayidx83>>1]|0; + $conv84 = $72 << 16 >> 16; + $add85 = (($69) + ($conv84))|0; + $73 = $last_size; + $sub86 = (($73) - ($add85))|0; + $last_size = $sub86; + $74 = $i; + $inc = (($74) + 1)|0; + $i = $inc; + } + if ((label|0) == 29) { + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + $75 = $last_size; + $cmp87 = ($75|0)<(0); + if (!($cmp87)) { + break L5; + } + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + } + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + } + } while(0); + $88 = $self_delimited$addr; + $tobool111 = ($88|0)!=(0); + L63: do { + if ($tobool111) { + $89 = $data$addr; + $90 = $len$addr; + $91 = $size$addr; + $92 = $count; + $add$ptr113 = (($91) + ($92<<1)|0); + $add$ptr114 = ((($add$ptr113)) + -2|0); + $call115 = (_parse_size($89,$90,$add$ptr114)|0); + $bytes = $call115; + $93 = $bytes; + $94 = $len$addr; + $sub116 = (($94) - ($93))|0; + $len$addr = $sub116; + $95 = $size$addr; + $96 = $count; + $sub117 = (($96) - 1)|0; + $arrayidx118 = (($95) + ($sub117<<1)|0); + $97 = HEAP16[$arrayidx118>>1]|0; + $conv119 = $97 << 16 >> 16; + $cmp120 = ($conv119|0)<(0); + if (!($cmp120)) { + $98 = $size$addr; + $99 = $count; + $sub123 = (($99) - 1)|0; + $arrayidx124 = (($98) + ($sub123<<1)|0); + $100 = HEAP16[$arrayidx124>>1]|0; + $conv125 = $100 << 16 >> 16; + $101 = $len$addr; + $cmp126 = ($conv125|0)>($101|0); + if (!($cmp126)) { + $102 = $bytes; + $103 = $data$addr; + $add$ptr130 = (($103) + ($102)|0); + $data$addr = $add$ptr130; + $104 = $cbr; + $tobool131 = ($104|0)!=(0); + if (!($tobool131)) { + $118 = $bytes; + $119 = $size$addr; + $120 = $count; + $sub153 = (($120) - 1)|0; + $arrayidx154 = (($119) + ($sub153<<1)|0); + $121 = HEAP16[$arrayidx154>>1]|0; + $conv155 = $121 << 16 >> 16; + $add156 = (($118) + ($conv155))|0; + $122 = $last_size; + $cmp157 = ($add156|0)>($122|0); + if (!($cmp157)) { + break; + } + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + $105 = $size$addr; + $106 = $count; + $sub133 = (($106) - 1)|0; + $arrayidx134 = (($105) + ($sub133<<1)|0); + $107 = HEAP16[$arrayidx134>>1]|0; + $conv135 = $107 << 16 >> 16; + $108 = $count; + $mul136 = Math_imul($conv135, $108)|0; + $109 = $len$addr; + $cmp137 = ($mul136|0)>($109|0); + if ($cmp137) { + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + $i = 0; + while(1) { + $110 = $i; + $111 = $count; + $sub142 = (($111) - 1)|0; + $cmp143 = ($110|0)<($sub142|0); + if (!($cmp143)) { + break L63; + } + $112 = $size$addr; + $113 = $count; + $sub146 = (($113) - 1)|0; + $arrayidx147 = (($112) + ($sub146<<1)|0); + $114 = HEAP16[$arrayidx147>>1]|0; + $115 = $size$addr; + $116 = $i; + $arrayidx148 = (($115) + ($116<<1)|0); + HEAP16[$arrayidx148>>1] = $114; + $117 = $i; + $inc150 = (($117) + 1)|0; + $i = $inc150; + } + } + } + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } else { + $123 = $last_size; + $cmp163 = ($123|0)>(1275); + if (!($cmp163)) { + $124 = $last_size; + $conv167 = $124&65535; + $125 = $size$addr; + $126 = $count; + $sub168 = (($126) - 1)|0; + $arrayidx169 = (($125) + ($sub168<<1)|0); + HEAP16[$arrayidx169>>1] = $conv167; + break; + } + $retval = -4; + $151 = $retval; + STACKTOP = sp;return ($151|0); + } + } while(0); + $127 = $payload_offset$addr; + $tobool171 = ($127|0)!=(0|0); + if ($tobool171) { + $128 = $data$addr; + $129 = $data0; + $sub$ptr$lhs$cast = $128; + $sub$ptr$rhs$cast = $129; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $130 = $payload_offset$addr; + HEAP32[$130>>2] = $sub$ptr$sub; + } + $i = 0; + while(1) { + $131 = $i; + $132 = $count; + $cmp175 = ($131|0)<($132|0); + if (!($cmp175)) { + break; + } + $133 = $frames$addr; + $tobool178 = ($133|0)!=(0|0); + if ($tobool178) { + $134 = $data$addr; + $135 = $frames$addr; + $136 = $i; + $arrayidx180 = (($135) + ($136<<2)|0); + HEAP32[$arrayidx180>>2] = $134; + } + $137 = $size$addr; + $138 = $i; + $arrayidx182 = (($137) + ($138<<1)|0); + $139 = HEAP16[$arrayidx182>>1]|0; + $conv183 = $139 << 16 >> 16; + $140 = $data$addr; + $add$ptr184 = (($140) + ($conv183)|0); + $data$addr = $add$ptr184; + $141 = $i; + $inc186 = (($141) + 1)|0; + $i = $inc186; + } + $142 = $packet_offset$addr; + $tobool188 = ($142|0)!=(0|0); + if ($tobool188) { + $143 = $pad; + $144 = $data$addr; + $145 = $data0; + $sub$ptr$lhs$cast190 = $144; + $sub$ptr$rhs$cast191 = $145; + $sub$ptr$sub192 = (($sub$ptr$lhs$cast190) - ($sub$ptr$rhs$cast191))|0; + $add193 = (($143) + ($sub$ptr$sub192))|0; + $146 = $packet_offset$addr; + HEAP32[$146>>2] = $add193; + } + $147 = $out_toc$addr; + $tobool195 = ($147|0)!=(0|0); + if ($tobool195) { + $148 = $toc; + $149 = $out_toc$addr; + HEAP8[$149>>0] = $148; + } + $150 = $count; + $retval = $150; + $151 = $retval; + STACKTOP = sp;return ($151|0); +} +function _parse_size($data,$len,$size) { + $data = $data|0; + $len = $len|0; + $size = $size|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $arrayidx11 = 0, $cmp = 0, $cmp1 = 0, $cmp7 = 0; + var $conv = 0, $conv12 = 0, $conv14 = 0, $conv15 = 0, $conv5 = 0, $data$addr = 0, $len$addr = 0, $mul = 0, $retval = 0, $size$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $data$addr = $data; + $len$addr = $len; + $size$addr = $size; + $0 = $len$addr; + $cmp = ($0|0)<(1); + if ($cmp) { + $1 = $size$addr; + HEAP16[$1>>1] = -1; + $retval = -1; + $14 = $retval; + STACKTOP = sp;return ($14|0); + } + $2 = $data$addr; + $3 = HEAP8[$2>>0]|0; + $conv = $3&255; + $cmp1 = ($conv|0)<(252); + if ($cmp1) { + $4 = $data$addr; + $5 = HEAP8[$4>>0]|0; + $conv5 = $5&255; + $6 = $size$addr; + HEAP16[$6>>1] = $conv5; + $retval = 1; + $14 = $retval; + STACKTOP = sp;return ($14|0); + } + $7 = $len$addr; + $cmp7 = ($7|0)<(2); + if ($cmp7) { + $8 = $size$addr; + HEAP16[$8>>1] = -1; + $retval = -1; + $14 = $retval; + STACKTOP = sp;return ($14|0); + } else { + $9 = $data$addr; + $arrayidx11 = ((($9)) + 1|0); + $10 = HEAP8[$arrayidx11>>0]|0; + $conv12 = $10&255; + $mul = $conv12<<2; + $11 = $data$addr; + $12 = HEAP8[$11>>0]|0; + $conv14 = $12&255; + $add = (($mul) + ($conv14))|0; + $conv15 = $add&65535; + $13 = $size$addr; + HEAP16[$13>>1] = $conv15; + $retval = 2; + $14 = $retval; + STACKTOP = sp;return ($14|0); + } + return (0)|0; +} +function _celt_lcg_rand($seed) { + $seed = $seed|0; + var $0 = 0, $add = 0, $mul = 0, $seed$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $seed$addr = $seed; + $0 = $seed$addr; + $mul = Math_imul(1664525, $0)|0; + $add = (($mul) + 1013904223)|0; + STACKTOP = sp;return ($add|0); +} +function _denormalise_bands($m,$X,$freq,$bandLogE,$start,$end,$M,$downsample,$silence) { + $m = $m|0; + $X = $X|0; + $freq = $freq|0; + $bandLogE = $bandLogE|0; + $start = $start|0; + $end = $end|0; + $M = $M|0; + $downsample = $downsample|0; + $silence = $silence|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0; + var $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $M$addr = 0, $N = 0; + var $X$addr = 0, $add = 0, $add$ptr = 0, $add29 = 0.0, $arrayidx = 0, $arrayidx12 = 0, $arrayidx21 = 0, $arrayidx24 = 0, $arrayidx27 = 0, $arrayidx28 = 0, $arrayidx42 = 0, $arrayidx9 = 0, $bandLogE$addr = 0, $band_end = 0, $bound = 0, $call = 0.0, $cmp = 0, $cmp15 = 0, $cmp18 = 0, $cmp37 = 0; + var $cmp4 = 0, $cond = 0, $conv = 0, $conv10 = 0, $conv13 = 0, $conv22 = 0, $conv25 = 0, $conv30 = 0.0, $conv32 = 0.0, $div = 0, $div6 = 0, $downsample$addr = 0, $eBands = 0, $eBands1 = 0, $end$addr = 0, $f = 0, $freq$addr = 0, $g = 0.0, $i = 0, $inc = 0; + var $inc36 = 0, $inc40 = 0, $incdec$ptr = 0, $incdec$ptr33 = 0, $incdec$ptr35 = 0, $j = 0, $lg = 0.0, $m$addr = 0, $mul = 0, $mul11 = 0, $mul14 = 0, $mul2 = 0, $mul23 = 0, $mul26 = 0, $mul31 = 0.0, $mul34 = 0.0, $mul43 = 0, $shortMdctSize = 0, $silence$addr = 0, $start$addr = 0; + var $sub = 0, $tobool = 0, $x = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); + $m$addr = $m; + $X$addr = $X; + $freq$addr = $freq; + $bandLogE$addr = $bandLogE; + $start$addr = $start; + $end$addr = $end; + $M$addr = $M; + $downsample$addr = $downsample; + $silence$addr = $silence; + $0 = $m$addr; + $eBands1 = ((($0)) + 32|0); + $1 = HEAP32[$eBands1>>2]|0; + $eBands = $1; + $2 = $M$addr; + $3 = $m$addr; + $shortMdctSize = ((($3)) + 44|0); + $4 = HEAP32[$shortMdctSize>>2]|0; + $mul = Math_imul($2, $4)|0; + $N = $mul; + $5 = $M$addr; + $6 = $eBands; + $7 = $end$addr; + $arrayidx = (($6) + ($7<<1)|0); + $8 = HEAP16[$arrayidx>>1]|0; + $conv = $8 << 16 >> 16; + $mul2 = Math_imul($5, $conv)|0; + $bound = $mul2; + $9 = $downsample$addr; + $cmp = ($9|0)!=(1); + if ($cmp) { + $10 = $bound; + $11 = $N; + $12 = $downsample$addr; + $div = (($11|0) / ($12|0))&-1; + $cmp4 = ($10|0)<($div|0); + if ($cmp4) { + $13 = $bound; + $cond = $13; + } else { + $14 = $N; + $15 = $downsample$addr; + $div6 = (($14|0) / ($15|0))&-1; + $cond = $div6; + } + $bound = $cond; + } + $16 = $silence$addr; + $tobool = ($16|0)!=(0); + if ($tobool) { + $bound = 0; + $end$addr = 0; + $start$addr = 0; + } + $17 = $freq$addr; + $f = $17; + $18 = $X$addr; + $19 = $M$addr; + $20 = $eBands; + $21 = $start$addr; + $arrayidx9 = (($20) + ($21<<1)|0); + $22 = HEAP16[$arrayidx9>>1]|0; + $conv10 = $22 << 16 >> 16; + $mul11 = Math_imul($19, $conv10)|0; + $add$ptr = (($18) + ($mul11<<2)|0); + $x = $add$ptr; + $i = 0; + while(1) { + $23 = $i; + $24 = $M$addr; + $25 = $eBands; + $26 = $start$addr; + $arrayidx12 = (($25) + ($26<<1)|0); + $27 = HEAP16[$arrayidx12>>1]|0; + $conv13 = $27 << 16 >> 16; + $mul14 = Math_imul($24, $conv13)|0; + $cmp15 = ($23|0)<($mul14|0); + if (!($cmp15)) { + break; + } + $28 = $f; + $incdec$ptr = ((($28)) + 4|0); + $f = $incdec$ptr; + HEAPF32[$28>>2] = 0.0; + $29 = $i; + $inc = (($29) + 1)|0; + $i = $inc; + } + $30 = $start$addr; + $i = $30; + while(1) { + $31 = $i; + $32 = $end$addr; + $cmp18 = ($31|0)<($32|0); + if (!($cmp18)) { + break; + } + $33 = $M$addr; + $34 = $eBands; + $35 = $i; + $arrayidx21 = (($34) + ($35<<1)|0); + $36 = HEAP16[$arrayidx21>>1]|0; + $conv22 = $36 << 16 >> 16; + $mul23 = Math_imul($33, $conv22)|0; + $j = $mul23; + $37 = $M$addr; + $38 = $eBands; + $39 = $i; + $add = (($39) + 1)|0; + $arrayidx24 = (($38) + ($add<<1)|0); + $40 = HEAP16[$arrayidx24>>1]|0; + $conv25 = $40 << 16 >> 16; + $mul26 = Math_imul($37, $conv25)|0; + $band_end = $mul26; + $41 = $bandLogE$addr; + $42 = $i; + $arrayidx27 = (($41) + ($42<<2)|0); + $43 = +HEAPF32[$arrayidx27>>2]; + $44 = $i; + $arrayidx28 = (12040 + ($44<<2)|0); + $45 = +HEAPF32[$arrayidx28>>2]; + $add29 = $43 + $45; + $lg = $add29; + $46 = $lg; + $conv30 = $46; + $mul31 = 0.69314718055994529 * $conv30; + $call = (+Math_exp((+$mul31))); + $conv32 = $call; + $g = $conv32; + while(1) { + $47 = $x; + $incdec$ptr33 = ((($47)) + 4|0); + $x = $incdec$ptr33; + $48 = +HEAPF32[$47>>2]; + $49 = $g; + $mul34 = $48 * $49; + $50 = $f; + $incdec$ptr35 = ((($50)) + 4|0); + $f = $incdec$ptr35; + HEAPF32[$50>>2] = $mul34; + $51 = $j; + $inc36 = (($51) + 1)|0; + $j = $inc36; + $52 = $band_end; + $cmp37 = ($inc36|0)<($52|0); + if (!($cmp37)) { + break; + } + } + $53 = $i; + $inc40 = (($53) + 1)|0; + $i = $inc40; + } + $54 = $freq$addr; + $55 = $bound; + $arrayidx42 = (($54) + ($55<<2)|0); + $56 = $N; + $57 = $bound; + $sub = (($56) - ($57))|0; + $mul43 = $sub<<2; + _memset(($arrayidx42|0),0,($mul43|0))|0; + STACKTOP = sp;return; +} +function _anti_collapse($m,$X_,$collapse_masks,$LM,$C,$size,$start,$end,$logE,$prev1logE,$prev2logE,$pulses,$seed,$arch) { + $m = $m|0; + $X_ = $X_|0; + $collapse_masks = $collapse_masks|0; + $LM = $LM|0; + $C = $C|0; + $size = $size|0; + $start = $start|0; + $end = $end|0; + $logE = $logE|0; + $prev1logE = $prev1logE|0; + $prev2logE = $prev2logE|0; + $pulses = $pulses|0; + $seed = $seed|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0.0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0.0; + var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0.0, $63 = 0; + var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0; + var $82 = 0.0, $83 = 0.0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $C$addr = 0; + var $Ediff = 0.0, $LM$addr = 0, $N0 = 0, $X = 0, $X_$addr = 0, $add = 0, $add$ptr = 0, $add$ptr92 = 0, $add117 = 0, $add24 = 0, $add28 = 0, $add33 = 0, $add38 = 0, $add41 = 0, $add48 = 0, $add5 = 0, $add54 = 0, $add7 = 0, $add99 = 0, $and = 0; + var $and109 = 0, $arch$addr = 0, $arrayidx = 0, $arrayidx100 = 0, $arrayidx11 = 0, $arrayidx118 = 0, $arrayidx2 = 0, $arrayidx25 = 0, $arrayidx29 = 0, $arrayidx34 = 0, $arrayidx39 = 0, $arrayidx4 = 0, $arrayidx42 = 0, $arrayidx49 = 0, $arrayidx55 = 0, $arrayidx8 = 0, $arrayidx89 = 0, $c = 0, $call = 0, $call108 = 0; + var $call17 = 0.0, $call21 = 0.0, $call72 = 0.0, $cmp = 0, $cmp105 = 0, $cmp128 = 0, $cmp30 = 0, $cmp35 = 0, $cmp43 = 0, $cmp56 = 0, $cmp63 = 0, $cmp75 = 0, $cmp80 = 0, $cmp95 = 0, $collapse_masks$addr = 0, $cond = 0.0, $cond115 = 0.0, $cond51 = 0.0, $cond61 = 0.0, $cond68 = 0.0; + var $cond85 = 0.0, $conv = 0, $conv101 = 0, $conv12 = 0, $conv14 = 0.0, $conv15 = 0.0, $conv18 = 0.0, $conv20 = 0.0, $conv22 = 0.0, $conv3 = 0, $conv70 = 0.0, $conv73 = 0.0, $conv9 = 0, $conv90 = 0, $depth = 0, $div = 0.0, $eBands = 0, $eBands1 = 0, $eBands10 = 0, $eBands6 = 0; + var $eBands88 = 0, $end$addr = 0, $i = 0, $inc = 0, $inc121 = 0, $inc127 = 0, $inc131 = 0, $j = 0, $k = 0, $logE$addr = 0, $m$addr = 0, $mul = 0.0, $mul16 = 0.0, $mul19 = 0.0, $mul23 = 0, $mul27 = 0, $mul53 = 0, $mul71 = 0.0, $mul74 = 0.0, $mul78 = 0.0; + var $mul86 = 0.0, $mul87 = 0, $mul98 = 0, $nbEBands = 0, $nbEBands26 = 0, $nbEBands32 = 0, $nbEBands37 = 0, $nbEBands40 = 0, $nbEBands47 = 0, $nbEBands52 = 0, $prev1 = 0.0, $prev1logE$addr = 0, $prev2 = 0.0, $prev2logE$addr = 0, $pulses$addr = 0, $r = 0.0, $renormalize = 0, $seed$addr = 0, $shl = 0, $shl102 = 0; + var $shl116 = 0, $shl125 = 0, $shl91 = 0, $shl94 = 0, $shr = 0, $size$addr = 0, $sqrt_1 = 0.0, $start$addr = 0, $sub = 0, $sub113 = 0.0, $sub13 = 0, $sub62 = 0.0, $sub69 = 0.0, $thresh = 0.0, $tobool = 0, $tobool110 = 0, $tobool123 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $m$addr = $m; + $X_$addr = $X_; + $collapse_masks$addr = $collapse_masks; + $LM$addr = $LM; + $C$addr = $C; + $size$addr = $size; + $start$addr = $start; + $end$addr = $end; + $logE$addr = $logE; + $prev1logE$addr = $prev1logE; + $prev2logE$addr = $prev2logE; + $pulses$addr = $pulses; + $seed$addr = $seed; + $arch$addr = $arch; + $0 = $start$addr; + $i = $0; + while(1) { + $1 = $i; + $2 = $end$addr; + $cmp = ($1|0)<($2|0); + if (!($cmp)) { + break; + } + $3 = $m$addr; + $eBands = ((($3)) + 32|0); + $4 = HEAP32[$eBands>>2]|0; + $5 = $i; + $add = (($5) + 1)|0; + $arrayidx = (($4) + ($add<<1)|0); + $6 = HEAP16[$arrayidx>>1]|0; + $conv = $6 << 16 >> 16; + $7 = $m$addr; + $eBands1 = ((($7)) + 32|0); + $8 = HEAP32[$eBands1>>2]|0; + $9 = $i; + $arrayidx2 = (($8) + ($9<<1)|0); + $10 = HEAP16[$arrayidx2>>1]|0; + $conv3 = $10 << 16 >> 16; + $sub = (($conv) - ($conv3))|0; + $N0 = $sub; + $11 = $pulses$addr; + $12 = $i; + $arrayidx4 = (($11) + ($12<<2)|0); + $13 = HEAP32[$arrayidx4>>2]|0; + $add5 = (1 + ($13))|0; + $14 = $m$addr; + $eBands6 = ((($14)) + 32|0); + $15 = HEAP32[$eBands6>>2]|0; + $16 = $i; + $add7 = (($16) + 1)|0; + $arrayidx8 = (($15) + ($add7<<1)|0); + $17 = HEAP16[$arrayidx8>>1]|0; + $conv9 = $17 << 16 >> 16; + $18 = $m$addr; + $eBands10 = ((($18)) + 32|0); + $19 = HEAP32[$eBands10>>2]|0; + $20 = $i; + $arrayidx11 = (($19) + ($20<<1)|0); + $21 = HEAP16[$arrayidx11>>1]|0; + $conv12 = $21 << 16 >> 16; + $sub13 = (($conv9) - ($conv12))|0; + $call = (_celt_udiv_350($add5,$sub13)|0); + $22 = $LM$addr; + $shr = $call >>> $22; + $depth = $shr; + $23 = $depth; + $conv14 = (+($23|0)); + $mul = -0.125 * $conv14; + $conv15 = $mul; + $mul16 = 0.69314718055994529 * $conv15; + $call17 = (+Math_exp((+$mul16))); + $conv18 = $call17; + $mul19 = 0.5 * $conv18; + $thresh = $mul19; + $24 = $N0; + $25 = $LM$addr; + $shl = $24 << $25; + $conv20 = (+($shl|0)); + $call21 = (+Math_sqrt((+$conv20))); + $conv22 = $call21; + $div = 1.0 / $conv22; + $sqrt_1 = $div; + $c = 0; + while(1) { + $renormalize = 0; + $26 = $prev1logE$addr; + $27 = $c; + $28 = $m$addr; + $nbEBands = ((($28)) + 8|0); + $29 = HEAP32[$nbEBands>>2]|0; + $mul23 = Math_imul($27, $29)|0; + $30 = $i; + $add24 = (($mul23) + ($30))|0; + $arrayidx25 = (($26) + ($add24<<2)|0); + $31 = +HEAPF32[$arrayidx25>>2]; + $prev1 = $31; + $32 = $prev2logE$addr; + $33 = $c; + $34 = $m$addr; + $nbEBands26 = ((($34)) + 8|0); + $35 = HEAP32[$nbEBands26>>2]|0; + $mul27 = Math_imul($33, $35)|0; + $36 = $i; + $add28 = (($mul27) + ($36))|0; + $arrayidx29 = (($32) + ($add28<<2)|0); + $37 = +HEAPF32[$arrayidx29>>2]; + $prev2 = $37; + $38 = $C$addr; + $cmp30 = ($38|0)==(1); + if ($cmp30) { + $39 = $prev1; + $40 = $prev1logE$addr; + $41 = $m$addr; + $nbEBands32 = ((($41)) + 8|0); + $42 = HEAP32[$nbEBands32>>2]|0; + $43 = $i; + $add33 = (($42) + ($43))|0; + $arrayidx34 = (($40) + ($add33<<2)|0); + $44 = +HEAPF32[$arrayidx34>>2]; + $cmp35 = $39 > $44; + if ($cmp35) { + $45 = $prev1; + $cond = $45; + } else { + $46 = $prev1logE$addr; + $47 = $m$addr; + $nbEBands37 = ((($47)) + 8|0); + $48 = HEAP32[$nbEBands37>>2]|0; + $49 = $i; + $add38 = (($48) + ($49))|0; + $arrayidx39 = (($46) + ($add38<<2)|0); + $50 = +HEAPF32[$arrayidx39>>2]; + $cond = $50; + } + $prev1 = $cond; + $51 = $prev2; + $52 = $prev2logE$addr; + $53 = $m$addr; + $nbEBands40 = ((($53)) + 8|0); + $54 = HEAP32[$nbEBands40>>2]|0; + $55 = $i; + $add41 = (($54) + ($55))|0; + $arrayidx42 = (($52) + ($add41<<2)|0); + $56 = +HEAPF32[$arrayidx42>>2]; + $cmp43 = $51 > $56; + if ($cmp43) { + $57 = $prev2; + $cond51 = $57; + } else { + $58 = $prev2logE$addr; + $59 = $m$addr; + $nbEBands47 = ((($59)) + 8|0); + $60 = HEAP32[$nbEBands47>>2]|0; + $61 = $i; + $add48 = (($60) + ($61))|0; + $arrayidx49 = (($58) + ($add48<<2)|0); + $62 = +HEAPF32[$arrayidx49>>2]; + $cond51 = $62; + } + $prev2 = $cond51; + } + $63 = $logE$addr; + $64 = $c; + $65 = $m$addr; + $nbEBands52 = ((($65)) + 8|0); + $66 = HEAP32[$nbEBands52>>2]|0; + $mul53 = Math_imul($64, $66)|0; + $67 = $i; + $add54 = (($mul53) + ($67))|0; + $arrayidx55 = (($63) + ($add54<<2)|0); + $68 = +HEAPF32[$arrayidx55>>2]; + $69 = $prev1; + $70 = $prev2; + $cmp56 = $69 < $70; + $71 = $prev1; + $72 = $prev2; + $cond61 = $cmp56 ? $71 : $72; + $sub62 = $68 - $cond61; + $Ediff = $sub62; + $73 = $Ediff; + $cmp63 = 0.0 > $73; + $74 = $Ediff; + $cond68 = $cmp63 ? 0.0 : $74; + $Ediff = $cond68; + $75 = $Ediff; + $sub69 = - $75; + $conv70 = $sub69; + $mul71 = 0.69314718055994529 * $conv70; + $call72 = (+Math_exp((+$mul71))); + $conv73 = $call72; + $mul74 = 2.0 * $conv73; + $r = $mul74; + $76 = $LM$addr; + $cmp75 = ($76|0)==(3); + if ($cmp75) { + $77 = $r; + $mul78 = $77 * 1.4142135381698608; + $r = $mul78; + } + $78 = $thresh; + $79 = $r; + $cmp80 = $78 < $79; + $80 = $thresh; + $81 = $r; + $cond85 = $cmp80 ? $80 : $81; + $r = $cond85; + $82 = $r; + $83 = $sqrt_1; + $mul86 = $82 * $83; + $r = $mul86; + $84 = $X_$addr; + $85 = $c; + $86 = $size$addr; + $mul87 = Math_imul($85, $86)|0; + $add$ptr = (($84) + ($mul87<<2)|0); + $87 = $m$addr; + $eBands88 = ((($87)) + 32|0); + $88 = HEAP32[$eBands88>>2]|0; + $89 = $i; + $arrayidx89 = (($88) + ($89<<1)|0); + $90 = HEAP16[$arrayidx89>>1]|0; + $conv90 = $90 << 16 >> 16; + $91 = $LM$addr; + $shl91 = $conv90 << $91; + $add$ptr92 = (($add$ptr) + ($shl91<<2)|0); + $X = $add$ptr92; + $k = 0; + while(1) { + $92 = $k; + $93 = $LM$addr; + $shl94 = 1 << $93; + $cmp95 = ($92|0)<($shl94|0); + if (!($cmp95)) { + break; + } + $94 = $collapse_masks$addr; + $95 = $i; + $96 = $C$addr; + $mul98 = Math_imul($95, $96)|0; + $97 = $c; + $add99 = (($mul98) + ($97))|0; + $arrayidx100 = (($94) + ($add99)|0); + $98 = HEAP8[$arrayidx100>>0]|0; + $conv101 = $98&255; + $99 = $k; + $shl102 = 1 << $99; + $and = $conv101 & $shl102; + $tobool = ($and|0)!=(0); + if (!($tobool)) { + $j = 0; + while(1) { + $100 = $j; + $101 = $N0; + $cmp105 = ($100|0)<($101|0); + if (!($cmp105)) { + break; + } + $102 = $seed$addr; + $call108 = (_celt_lcg_rand($102)|0); + $seed$addr = $call108; + $103 = $seed$addr; + $and109 = $103 & 32768; + $tobool110 = ($and109|0)!=(0); + $104 = $r; + $sub113 = - $104; + $cond115 = $tobool110 ? $104 : $sub113; + $105 = $X; + $106 = $j; + $107 = $LM$addr; + $shl116 = $106 << $107; + $108 = $k; + $add117 = (($shl116) + ($108))|0; + $arrayidx118 = (($105) + ($add117<<2)|0); + HEAPF32[$arrayidx118>>2] = $cond115; + $109 = $j; + $inc = (($109) + 1)|0; + $j = $inc; + } + $renormalize = 1; + } + $110 = $k; + $inc121 = (($110) + 1)|0; + $k = $inc121; + } + $111 = $renormalize; + $tobool123 = ($111|0)!=(0); + if ($tobool123) { + $112 = $X; + $113 = $N0; + $114 = $LM$addr; + $shl125 = $113 << $114; + $115 = $arch$addr; + _renormalise_vector($112,$shl125,1.0,$115); + } + $116 = $c; + $inc127 = (($116) + 1)|0; + $c = $inc127; + $117 = $C$addr; + $cmp128 = ($inc127|0)<($117|0); + if (!($cmp128)) { + break; + } + } + $118 = $i; + $inc131 = (($118) + 1)|0; + $i = $inc131; + } + STACKTOP = sp;return; +} +function _celt_udiv_350($n,$d) { + $n = $n|0; + $d = $d|0; + var $0 = 0, $1 = 0, $d$addr = 0, $div = 0, $n$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $n$addr = $n; + $d$addr = $d; + $0 = $n$addr; + $1 = $d$addr; + $div = (($0>>>0) / ($1>>>0))&-1; + STACKTOP = sp;return ($div|0); +} +function _haar1($X,$N0,$stride) { + $X = $X|0; + $N0 = $N0|0; + $stride = $stride|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, $N0$addr = 0, $X$addr = 0, $add = 0, $add12 = 0.0, $add15 = 0, $add18 = 0, $add20 = 0, $add7 = 0, $add9 = 0, $arrayidx = 0, $arrayidx10 = 0; + var $arrayidx16 = 0, $arrayidx21 = 0, $cmp = 0, $cmp2 = 0, $i = 0, $inc = 0, $inc23 = 0, $j = 0, $mul = 0, $mul11 = 0.0, $mul13 = 0, $mul14 = 0, $mul17 = 0, $mul19 = 0, $mul4 = 0, $mul5 = 0.0, $mul6 = 0, $mul8 = 0, $shr = 0, $stride$addr = 0; + var $sub = 0.0, $tmp1 = 0.0, $tmp2 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $X$addr = $X; + $N0$addr = $N0; + $stride$addr = $stride; + $0 = $N0$addr; + $shr = $0 >> 1; + $N0$addr = $shr; + $i = 0; + while(1) { + $1 = $i; + $2 = $stride$addr; + $cmp = ($1|0)<($2|0); + if (!($cmp)) { + break; + } + $j = 0; + while(1) { + $3 = $j; + $4 = $N0$addr; + $cmp2 = ($3|0)<($4|0); + if (!($cmp2)) { + break; + } + $5 = $X$addr; + $6 = $stride$addr; + $mul = $6<<1; + $7 = $j; + $mul4 = Math_imul($mul, $7)|0; + $8 = $i; + $add = (($mul4) + ($8))|0; + $arrayidx = (($5) + ($add<<2)|0); + $9 = +HEAPF32[$arrayidx>>2]; + $mul5 = 0.70710676908493042 * $9; + $tmp1 = $mul5; + $10 = $X$addr; + $11 = $stride$addr; + $12 = $j; + $mul6 = $12<<1; + $add7 = (($mul6) + 1)|0; + $mul8 = Math_imul($11, $add7)|0; + $13 = $i; + $add9 = (($mul8) + ($13))|0; + $arrayidx10 = (($10) + ($add9<<2)|0); + $14 = +HEAPF32[$arrayidx10>>2]; + $mul11 = 0.70710676908493042 * $14; + $tmp2 = $mul11; + $15 = $tmp1; + $16 = $tmp2; + $add12 = $15 + $16; + $17 = $X$addr; + $18 = $stride$addr; + $mul13 = $18<<1; + $19 = $j; + $mul14 = Math_imul($mul13, $19)|0; + $20 = $i; + $add15 = (($mul14) + ($20))|0; + $arrayidx16 = (($17) + ($add15<<2)|0); + HEAPF32[$arrayidx16>>2] = $add12; + $21 = $tmp1; + $22 = $tmp2; + $sub = $21 - $22; + $23 = $X$addr; + $24 = $stride$addr; + $25 = $j; + $mul17 = $25<<1; + $add18 = (($mul17) + 1)|0; + $mul19 = Math_imul($24, $add18)|0; + $26 = $i; + $add20 = (($mul19) + ($26))|0; + $arrayidx21 = (($23) + ($add20<<2)|0); + HEAPF32[$arrayidx21>>2] = $sub; + $27 = $j; + $inc = (($27) + 1)|0; + $j = $inc; + } + $28 = $i; + $inc23 = (($28) + 1)|0; + $i = $inc23; + } + STACKTOP = sp;return; +} +function _quant_all_bands($encode,$m,$start,$end,$X_,$Y_,$collapse_masks,$bandE,$pulses,$shortBlocks,$spread,$dual_stereo,$intensity,$tf_res,$total_bits,$balance,$ec,$LM,$codedBands,$seed,$arch) { + $encode = $encode|0; + $m = $m|0; + $start = $start|0; + $end = $end|0; + $X_ = $X_|0; + $Y_ = $Y_|0; + $collapse_masks = $collapse_masks|0; + $bandE = $bandE|0; + $pulses = $pulses|0; + $shortBlocks = $shortBlocks|0; + $spread = $spread|0; + $dual_stereo = $dual_stereo|0; + $intensity = $intensity|0; + $tf_res = $tf_res|0; + $total_bits = $total_bits|0; + $balance = $balance|0; + $ec = $ec|0; + $LM = $LM|0; + $codedBands = $codedBands|0; + $seed = $seed|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0.0, $205 = 0; + var $206 = 0, $207 = 0.0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; + var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0; + var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0; + var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0; + var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $B = 0, $C = 0, $LM$addr = 0, $M = 0, $N = 0, $X = 0, $X_$addr = 0, $Y = 0, $Y_$addr = 0, $add = 0, $add$ptr = 0, $add$ptr14 = 0, $add$ptr20 = 0, $add$ptr262 = 0, $add$ptr272 = 0, $add$ptr274 = 0; + var $add$ptr282 = 0, $add$ptr292 = 0, $add$ptr294 = 0, $add$ptr305 = 0, $add$ptr315 = 0, $add$ptr317 = 0, $add$ptr326 = 0, $add$ptr336 = 0, $add$ptr338 = 0, $add$ptr38 = 0, $add$ptr44 = 0, $add107 = 0, $add109 = 0, $add113 = 0, $add116 = 0, $add123 = 0, $add125 = 0, $add129 = 0, $add132 = 0, $add203 = 0; + var $add211 = 0, $add212 = 0, $add218 = 0, $add222 = 0, $add251 = 0.0, $add347 = 0, $add351 = 0, $add355 = 0, $add356 = 0, $add73 = 0, $add75 = 0, $add79 = 0, $add82 = 0, $add89 = 0, $add91 = 0, $add95 = 0, $add98 = 0, $arch$addr = 0, $arch28 = 0, $arrayidx = 0; + var $arrayidx108 = 0, $arrayidx11 = 0, $arrayidx115 = 0, $arrayidx124 = 0, $arrayidx131 = 0, $arrayidx142 = 0, $arrayidx146 = 0, $arrayidx157 = 0, $arrayidx17 = 0, $arrayidx184 = 0, $arrayidx193 = 0, $arrayidx200 = 0, $arrayidx208 = 0, $arrayidx219 = 0, $arrayidx224 = 0, $arrayidx242 = 0, $arrayidx249 = 0, $arrayidx250 = 0, $arrayidx253 = 0, $arrayidx269 = 0; + var $arrayidx289 = 0, $arrayidx312 = 0, $arrayidx333 = 0, $arrayidx348 = 0, $arrayidx35 = 0, $arrayidx353 = 0, $arrayidx354 = 0, $arrayidx4 = 0, $arrayidx41 = 0, $arrayidx45 = 0, $arrayidx48 = 0, $arrayidx74 = 0, $arrayidx81 = 0, $arrayidx90 = 0, $arrayidx97 = 0, $b = 0, $balance$addr = 0, $bandE$addr = 0, $bandE21 = 0, $call = 0; + var $call277 = 0, $call297 = 0, $call321 = 0, $call342 = 0, $call72 = 0, $cmp = 0, $cmp103 = 0, $cmp110 = 0, $cmp119 = 0, $cmp126 = 0, $cmp149 = 0, $cmp153 = 0, $cmp159 = 0, $cmp162 = 0, $cmp168 = 0, $cmp172 = 0, $cmp175 = 0, $cmp178 = 0, $cmp181 = 0, $cmp189 = 0; + var $cmp204 = 0, $cmp213 = 0, $cmp228 = 0, $cmp236 = 0, $cmp246 = 0, $cmp259 = 0, $cmp279 = 0, $cmp29 = 0, $cmp299 = 0, $cmp302 = 0, $cmp323 = 0, $cmp33 = 0, $cmp358 = 0, $cmp39 = 0, $cmp52 = 0, $cmp61 = 0, $cmp65 = 0, $cmp76 = 0, $cmp85 = 0, $cmp92 = 0; + var $codedBands$addr = 0, $collapse_masks$addr = 0, $cond = 0, $cond102 = 0, $cond118 = 0, $cond138 = 0, $cond199 = 0, $cond265 = 0, $cond276 = 0, $cond285 = 0, $cond296 = 0, $cond3 = 0, $cond308 = 0, $cond319 = 0, $cond329 = 0, $cond340 = 0, $cond71 = 0, $cond84 = 0, $conv = 0, $conv12 = 0; + var $conv143 = 0, $conv147 = 0, $conv18 = 0, $conv185 = 0, $conv194 = 0, $conv201 = 0, $conv209 = 0, $conv220 = 0, $conv225 = 0, $conv243 = 0, $conv270 = 0, $conv290 = 0, $conv313 = 0, $conv334 = 0, $conv34 = 0, $conv345 = 0, $conv349 = 0, $conv359 = 0, $conv36 = 0, $conv42 = 0; + var $conv46 = 0, $conv49 = 0, $conv5 = 0, $ctx = 0, $curr_balance = 0, $dec = 0, $div = 0, $div278 = 0, $dual_stereo$addr = 0, $eBands = 0, $eBands1 = 0, $ec$addr = 0, $ec22 = 0, $effEBands = 0, $effective_lowband = 0, $encode$addr = 0, $end$addr = 0, $fold_end = 0, $fold_i = 0, $fold_start = 0; + var $i = 0, $i31 = 0, $idx$neg = 0, $idx$neg273 = 0, $idx$neg293 = 0, $idx$neg316 = 0, $idx$neg337 = 0, $inc = 0, $inc227 = 0, $inc254 = 0, $inc361 = 0, $intensity$addr = 0, $intensity24 = 0, $j = 0, $last = 0, $lnot = 0, $lnot$ext = 0, $lowband_offset = 0, $lowband_scratch = 0, $m$addr = 0; + var $m25 = 0, $mul = 0, $mul13 = 0, $mul144 = 0, $mul148 = 0, $mul186 = 0, $mul19 = 0, $mul195 = 0, $mul202 = 0, $mul210 = 0, $mul217 = 0, $mul221 = 0, $mul244 = 0, $mul252 = 0.0, $mul271 = 0, $mul291 = 0, $mul314 = 0, $mul335 = 0, $mul346 = 0, $mul350 = 0; + var $mul37 = 0, $mul43 = 0, $mul47 = 0, $mul50 = 0, $mul6 = 0, $mul8 = 0, $nbEBands = 0, $nbEBands15 = 0, $nbEBands9 = 0, $norm = 0, $norm2 = 0, $norm_offset = 0, $or = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $or226 = 0, $or320 = 0, $or341 = 0, $pulses$addr = 0; + var $remaining_bits = 0, $remaining_bits59 = 0, $resynth = 0, $saved_stack = 0, $seed$addr = 0, $seed26 = 0, $seed363 = 0, $shl = 0, $shl231 = 0, $shl357 = 0, $shortBlocks$addr = 0, $spread$addr = 0, $spread27 = 0, $start$addr = 0, $sub = 0, $sub10 = 0, $sub145 = 0, $sub16 = 0, $sub167 = 0, $sub187 = 0; + var $sub188 = 0, $sub196 = 0, $sub197 = 0, $sub206 = 0, $sub223 = 0, $sub232 = 0, $sub245 = 0, $sub32 = 0, $sub352 = 0, $sub51 = 0, $sub55 = 0, $sub57 = 0, $sub58 = 0, $sub60 = 0, $sub64 = 0, $sub69 = 0, $sub7 = 0, $tell = 0, $tf_change = 0, $tf_change158 = 0; + var $tf_res$addr = 0, $tobool = 0, $tobool141 = 0, $tobool152 = 0, $tobool2 = 0, $tobool234 = 0, $tobool239 = 0, $tobool257 = 0, $tobool266 = 0, $tobool286 = 0, $tobool309 = 0, $tobool330 = 0, $total_bits$addr = 0, $update_lowband = 0, $vla = 0, $vla$alloca_mul = 0, $x_cm = 0, $y_cm = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $ctx = sp + 64|0; + $encode$addr = $encode; + $m$addr = $m; + $start$addr = $start; + $end$addr = $end; + $X_$addr = $X_; + $Y_$addr = $Y_; + $collapse_masks$addr = $collapse_masks; + $bandE$addr = $bandE; + $pulses$addr = $pulses; + $shortBlocks$addr = $shortBlocks; + $spread$addr = $spread; + $dual_stereo$addr = $dual_stereo; + $intensity$addr = $intensity; + $tf_res$addr = $tf_res; + $total_bits$addr = $total_bits; + $balance$addr = $balance; + $ec$addr = $ec; + $LM$addr = $LM; + $codedBands$addr = $codedBands; + $seed$addr = $seed; + $arch$addr = $arch; + $0 = $m$addr; + $eBands1 = ((($0)) + 32|0); + $1 = HEAP32[$eBands1>>2]|0; + $eBands = $1; + $update_lowband = 1; + $2 = $Y_$addr; + $cmp = ($2|0)!=(0|0); + $cond = $cmp ? 2 : 1; + $C = $cond; + $3 = $encode$addr; + $tobool = ($3|0)!=(0); + $lnot = $tobool ^ 1; + $lnot$ext = $lnot&1; + $resynth = $lnot$ext; + $4 = $LM$addr; + $shl = 1 << $4; + $M = $shl; + $5 = $shortBlocks$addr; + $tobool2 = ($5|0)!=(0); + $6 = $M; + $cond3 = $tobool2 ? $6 : 1; + $B = $cond3; + $7 = $M; + $8 = $eBands; + $9 = $start$addr; + $arrayidx = (($8) + ($9<<1)|0); + $10 = HEAP16[$arrayidx>>1]|0; + $conv = $10 << 16 >> 16; + $mul = Math_imul($7, $conv)|0; + $norm_offset = $mul; + $11 = $C; + $12 = $M; + $13 = $eBands; + $14 = $m$addr; + $nbEBands = ((($14)) + 8|0); + $15 = HEAP32[$nbEBands>>2]|0; + $sub = (($15) - 1)|0; + $arrayidx4 = (($13) + ($sub<<1)|0); + $16 = HEAP16[$arrayidx4>>1]|0; + $conv5 = $16 << 16 >> 16; + $mul6 = Math_imul($12, $conv5)|0; + $17 = $norm_offset; + $sub7 = (($mul6) - ($17))|0; + $mul8 = Math_imul($11, $sub7)|0; + $18 = (_llvm_stacksave()|0); + $saved_stack = $18; + $vla$alloca_mul = $mul8<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $norm = $vla; + $19 = $norm; + $20 = $M; + $21 = $eBands; + $22 = $m$addr; + $nbEBands9 = ((($22)) + 8|0); + $23 = HEAP32[$nbEBands9>>2]|0; + $sub10 = (($23) - 1)|0; + $arrayidx11 = (($21) + ($sub10<<1)|0); + $24 = HEAP16[$arrayidx11>>1]|0; + $conv12 = $24 << 16 >> 16; + $mul13 = Math_imul($20, $conv12)|0; + $add$ptr = (($19) + ($mul13<<2)|0); + $25 = $norm_offset; + $idx$neg = (0 - ($25))|0; + $add$ptr14 = (($add$ptr) + ($idx$neg<<2)|0); + $norm2 = $add$ptr14; + $26 = $X_$addr; + $27 = $M; + $28 = $eBands; + $29 = $m$addr; + $nbEBands15 = ((($29)) + 8|0); + $30 = HEAP32[$nbEBands15>>2]|0; + $sub16 = (($30) - 1)|0; + $arrayidx17 = (($28) + ($sub16<<1)|0); + $31 = HEAP16[$arrayidx17>>1]|0; + $conv18 = $31 << 16 >> 16; + $mul19 = Math_imul($27, $conv18)|0; + $add$ptr20 = (($26) + ($mul19<<2)|0); + $lowband_scratch = $add$ptr20; + $lowband_offset = 0; + $32 = $bandE$addr; + $bandE21 = ((($ctx)) + 32|0); + HEAP32[$bandE21>>2] = $32; + $33 = $ec$addr; + $ec22 = ((($ctx)) + 24|0); + HEAP32[$ec22>>2] = $33; + $34 = $encode$addr; + HEAP32[$ctx>>2] = $34; + $35 = $intensity$addr; + $intensity24 = ((($ctx)) + 12|0); + HEAP32[$intensity24>>2] = $35; + $36 = $m$addr; + $m25 = ((($ctx)) + 4|0); + HEAP32[$m25>>2] = $36; + $37 = $seed$addr; + $38 = HEAP32[$37>>2]|0; + $seed26 = ((($ctx)) + 36|0); + HEAP32[$seed26>>2] = $38; + $39 = $spread$addr; + $spread27 = ((($ctx)) + 16|0); + HEAP32[$spread27>>2] = $39; + $40 = $arch$addr; + $arch28 = ((($ctx)) + 40|0); + HEAP32[$arch28>>2] = $40; + $41 = $start$addr; + $i = $41; + while(1) { + $42 = $i; + $43 = $end$addr; + $cmp29 = ($42|0)<($43|0); + if (!($cmp29)) { + break; + } + $effective_lowband = -1; + $tf_change = 0; + $44 = $i; + $i31 = ((($ctx)) + 8|0); + HEAP32[$i31>>2] = $44; + $45 = $i; + $46 = $end$addr; + $sub32 = (($46) - 1)|0; + $cmp33 = ($45|0)==($sub32|0); + $conv34 = $cmp33&1; + $last = $conv34; + $47 = $X_$addr; + $48 = $M; + $49 = $eBands; + $50 = $i; + $arrayidx35 = (($49) + ($50<<1)|0); + $51 = HEAP16[$arrayidx35>>1]|0; + $conv36 = $51 << 16 >> 16; + $mul37 = Math_imul($48, $conv36)|0; + $add$ptr38 = (($47) + ($mul37<<2)|0); + $X = $add$ptr38; + $52 = $Y_$addr; + $cmp39 = ($52|0)!=(0|0); + if ($cmp39) { + $53 = $Y_$addr; + $54 = $M; + $55 = $eBands; + $56 = $i; + $arrayidx41 = (($55) + ($56<<1)|0); + $57 = HEAP16[$arrayidx41>>1]|0; + $conv42 = $57 << 16 >> 16; + $mul43 = Math_imul($54, $conv42)|0; + $add$ptr44 = (($53) + ($mul43<<2)|0); + $Y = $add$ptr44; + } else { + $Y = 0; + } + $58 = $M; + $59 = $eBands; + $60 = $i; + $add = (($60) + 1)|0; + $arrayidx45 = (($59) + ($add<<1)|0); + $61 = HEAP16[$arrayidx45>>1]|0; + $conv46 = $61 << 16 >> 16; + $mul47 = Math_imul($58, $conv46)|0; + $62 = $M; + $63 = $eBands; + $64 = $i; + $arrayidx48 = (($63) + ($64<<1)|0); + $65 = HEAP16[$arrayidx48>>1]|0; + $conv49 = $65 << 16 >> 16; + $mul50 = Math_imul($62, $conv49)|0; + $sub51 = (($mul47) - ($mul50))|0; + $N = $sub51; + $66 = $ec$addr; + $call = (_ec_tell_frac($66)|0); + $tell = $call; + $67 = $i; + $68 = $start$addr; + $cmp52 = ($67|0)!=($68|0); + if ($cmp52) { + $69 = $tell; + $70 = $balance$addr; + $sub55 = (($70) - ($69))|0; + $balance$addr = $sub55; + } + $71 = $total_bits$addr; + $72 = $tell; + $sub57 = (($71) - ($72))|0; + $sub58 = (($sub57) - 1)|0; + $remaining_bits = $sub58; + $73 = $remaining_bits; + $remaining_bits59 = ((($ctx)) + 28|0); + HEAP32[$remaining_bits59>>2] = $73; + $74 = $i; + $75 = $codedBands$addr; + $sub60 = (($75) - 1)|0; + $cmp61 = ($74|0)<=($sub60|0); + if ($cmp61) { + $76 = $balance$addr; + $77 = $codedBands$addr; + $78 = $i; + $sub64 = (($77) - ($78))|0; + $cmp65 = (3)<($sub64|0); + if ($cmp65) { + $cond71 = 3; + } else { + $79 = $codedBands$addr; + $80 = $i; + $sub69 = (($79) - ($80))|0; + $cond71 = $sub69; + } + $call72 = (_celt_sudiv($76,$cond71)|0); + $curr_balance = $call72; + $81 = $remaining_bits; + $add73 = (($81) + 1)|0; + $82 = $pulses$addr; + $83 = $i; + $arrayidx74 = (($82) + ($83<<2)|0); + $84 = HEAP32[$arrayidx74>>2]|0; + $85 = $curr_balance; + $add75 = (($84) + ($85))|0; + $cmp76 = ($add73|0)<($add75|0); + if ($cmp76) { + $86 = $remaining_bits; + $add79 = (($86) + 1)|0; + $cond84 = $add79; + } else { + $87 = $pulses$addr; + $88 = $i; + $arrayidx81 = (($87) + ($88<<2)|0); + $89 = HEAP32[$arrayidx81>>2]|0; + $90 = $curr_balance; + $add82 = (($89) + ($90))|0; + $cond84 = $add82; + } + $cmp85 = (16383)<($cond84|0); + do { + if ($cmp85) { + $cond102 = 16383; + } else { + $91 = $remaining_bits; + $add89 = (($91) + 1)|0; + $92 = $pulses$addr; + $93 = $i; + $arrayidx90 = (($92) + ($93<<2)|0); + $94 = HEAP32[$arrayidx90>>2]|0; + $95 = $curr_balance; + $add91 = (($94) + ($95))|0; + $cmp92 = ($add89|0)<($add91|0); + if ($cmp92) { + $96 = $remaining_bits; + $add95 = (($96) + 1)|0; + $cond102 = $add95; + break; + } else { + $97 = $pulses$addr; + $98 = $i; + $arrayidx97 = (($97) + ($98<<2)|0); + $99 = HEAP32[$arrayidx97>>2]|0; + $100 = $curr_balance; + $add98 = (($99) + ($100))|0; + $cond102 = $add98; + break; + } + } + } while(0); + $cmp103 = (0)>($cond102|0); + do { + if ($cmp103) { + $cond138 = 0; + } else { + $101 = $remaining_bits; + $add107 = (($101) + 1)|0; + $102 = $pulses$addr; + $103 = $i; + $arrayidx108 = (($102) + ($103<<2)|0); + $104 = HEAP32[$arrayidx108>>2]|0; + $105 = $curr_balance; + $add109 = (($104) + ($105))|0; + $cmp110 = ($add107|0)<($add109|0); + if ($cmp110) { + $106 = $remaining_bits; + $add113 = (($106) + 1)|0; + $cond118 = $add113; + } else { + $107 = $pulses$addr; + $108 = $i; + $arrayidx115 = (($107) + ($108<<2)|0); + $109 = HEAP32[$arrayidx115>>2]|0; + $110 = $curr_balance; + $add116 = (($109) + ($110))|0; + $cond118 = $add116; + } + $cmp119 = (16383)<($cond118|0); + if ($cmp119) { + $cond138 = 16383; + } else { + $111 = $remaining_bits; + $add123 = (($111) + 1)|0; + $112 = $pulses$addr; + $113 = $i; + $arrayidx124 = (($112) + ($113<<2)|0); + $114 = HEAP32[$arrayidx124>>2]|0; + $115 = $curr_balance; + $add125 = (($114) + ($115))|0; + $cmp126 = ($add123|0)<($add125|0); + if ($cmp126) { + $116 = $remaining_bits; + $add129 = (($116) + 1)|0; + $cond138 = $add129; + break; + } else { + $117 = $pulses$addr; + $118 = $i; + $arrayidx131 = (($117) + ($118<<2)|0); + $119 = HEAP32[$arrayidx131>>2]|0; + $120 = $curr_balance; + $add132 = (($119) + ($120))|0; + $cond138 = $add132; + break; + } + } + } + } while(0); + $b = $cond138; + } else { + $b = 0; + } + $121 = $resynth; + $tobool141 = ($121|0)!=(0); + if ($tobool141) { + $122 = $M; + $123 = $eBands; + $124 = $i; + $arrayidx142 = (($123) + ($124<<1)|0); + $125 = HEAP16[$arrayidx142>>1]|0; + $conv143 = $125 << 16 >> 16; + $mul144 = Math_imul($122, $conv143)|0; + $126 = $N; + $sub145 = (($mul144) - ($126))|0; + $127 = $M; + $128 = $eBands; + $129 = $start$addr; + $arrayidx146 = (($128) + ($129<<1)|0); + $130 = HEAP16[$arrayidx146>>1]|0; + $conv147 = $130 << 16 >> 16; + $mul148 = Math_imul($127, $conv147)|0; + $cmp149 = ($sub145|0)>=($mul148|0); + if ($cmp149) { + $131 = $update_lowband; + $tobool152 = ($131|0)!=(0); + $132 = $lowband_offset; + $cmp153 = ($132|0)==(0); + $or$cond = $tobool152 | $cmp153; + if ($or$cond) { + $133 = $i; + $lowband_offset = $133; + } + } + } + $134 = $tf_res$addr; + $135 = $i; + $arrayidx157 = (($134) + ($135<<2)|0); + $136 = HEAP32[$arrayidx157>>2]|0; + $tf_change = $136; + $137 = $tf_change; + $tf_change158 = ((($ctx)) + 20|0); + HEAP32[$tf_change158>>2] = $137; + $138 = $i; + $139 = $m$addr; + $effEBands = ((($139)) + 12|0); + $140 = HEAP32[$effEBands>>2]|0; + $cmp159 = ($138|0)>=($140|0); + if ($cmp159) { + $141 = $norm; + $X = $141; + $142 = $Y_$addr; + $cmp162 = ($142|0)!=(0|0); + if ($cmp162) { + $143 = $norm; + $Y = $143; + } + $lowband_scratch = 0; + } + $144 = $i; + $145 = $end$addr; + $sub167 = (($145) - 1)|0; + $cmp168 = ($144|0)==($sub167|0); + if ($cmp168) { + $lowband_scratch = 0; + } + $146 = $lowband_offset; + $cmp172 = ($146|0)!=(0); + if ($cmp172) { + $147 = $spread$addr; + $cmp175 = ($147|0)!=(3); + $148 = $B; + $cmp178 = ($148|0)>(1); + $or$cond1 = $cmp175 | $cmp178; + $149 = $tf_change; + $cmp181 = ($149|0)<(0); + $or$cond2 = $or$cond1 | $cmp181; + if ($or$cond2) { + $150 = $M; + $151 = $eBands; + $152 = $lowband_offset; + $arrayidx184 = (($151) + ($152<<1)|0); + $153 = HEAP16[$arrayidx184>>1]|0; + $conv185 = $153 << 16 >> 16; + $mul186 = Math_imul($150, $conv185)|0; + $154 = $norm_offset; + $sub187 = (($mul186) - ($154))|0; + $155 = $N; + $sub188 = (($sub187) - ($155))|0; + $cmp189 = (0)>($sub188|0); + if ($cmp189) { + $cond199 = 0; + } else { + $156 = $M; + $157 = $eBands; + $158 = $lowband_offset; + $arrayidx193 = (($157) + ($158<<1)|0); + $159 = HEAP16[$arrayidx193>>1]|0; + $conv194 = $159 << 16 >> 16; + $mul195 = Math_imul($156, $conv194)|0; + $160 = $norm_offset; + $sub196 = (($mul195) - ($160))|0; + $161 = $N; + $sub197 = (($sub196) - ($161))|0; + $cond199 = $sub197; + } + $effective_lowband = $cond199; + $162 = $lowband_offset; + $fold_start = $162; + while(1) { + $163 = $M; + $164 = $eBands; + $165 = $fold_start; + $dec = (($165) + -1)|0; + $fold_start = $dec; + $arrayidx200 = (($164) + ($dec<<1)|0); + $166 = HEAP16[$arrayidx200>>1]|0; + $conv201 = $166 << 16 >> 16; + $mul202 = Math_imul($163, $conv201)|0; + $167 = $effective_lowband; + $168 = $norm_offset; + $add203 = (($167) + ($168))|0; + $cmp204 = ($mul202|0)>($add203|0); + if (!($cmp204)) { + break; + } + } + $169 = $lowband_offset; + $sub206 = (($169) - 1)|0; + $fold_end = $sub206; + while(1) { + $170 = $M; + $171 = $eBands; + $172 = $fold_end; + $inc = (($172) + 1)|0; + $fold_end = $inc; + $arrayidx208 = (($171) + ($inc<<1)|0); + $173 = HEAP16[$arrayidx208>>1]|0; + $conv209 = $173 << 16 >> 16; + $mul210 = Math_imul($170, $conv209)|0; + $174 = $effective_lowband; + $175 = $norm_offset; + $add211 = (($174) + ($175))|0; + $176 = $N; + $add212 = (($add211) + ($176))|0; + $cmp213 = ($mul210|0)<($add212|0); + if (!($cmp213)) { + break; + } + } + $y_cm = 0; + $x_cm = 0; + $177 = $fold_start; + $fold_i = $177; + while(1) { + $178 = $collapse_masks$addr; + $179 = $fold_i; + $180 = $C; + $mul217 = Math_imul($179, $180)|0; + $add218 = (($mul217) + 0)|0; + $arrayidx219 = (($178) + ($add218)|0); + $181 = HEAP8[$arrayidx219>>0]|0; + $conv220 = $181&255; + $182 = $x_cm; + $or = $182 | $conv220; + $x_cm = $or; + $183 = $collapse_masks$addr; + $184 = $fold_i; + $185 = $C; + $mul221 = Math_imul($184, $185)|0; + $186 = $C; + $add222 = (($mul221) + ($186))|0; + $sub223 = (($add222) - 1)|0; + $arrayidx224 = (($183) + ($sub223)|0); + $187 = HEAP8[$arrayidx224>>0]|0; + $conv225 = $187&255; + $188 = $y_cm; + $or226 = $188 | $conv225; + $y_cm = $or226; + $189 = $fold_i; + $inc227 = (($189) + 1)|0; + $fold_i = $inc227; + $190 = $fold_end; + $cmp228 = ($inc227|0)<($190|0); + if (!($cmp228)) { + break; + } + } + } else { + label = 48; + } + } else { + label = 48; + } + if ((label|0) == 48) { + label = 0; + $191 = $B; + $shl231 = 1 << $191; + $sub232 = (($shl231) - 1)|0; + $y_cm = $sub232; + $x_cm = $sub232; + } + $192 = $dual_stereo$addr; + $tobool234 = ($192|0)!=(0); + L70: do { + if ($tobool234) { + $193 = $i; + $194 = $intensity$addr; + $cmp236 = ($193|0)==($194|0); + if ($cmp236) { + $dual_stereo$addr = 0; + $195 = $resynth; + $tobool239 = ($195|0)!=(0); + if ($tobool239) { + $j = 0; + while(1) { + $196 = $j; + $197 = $M; + $198 = $eBands; + $199 = $i; + $arrayidx242 = (($198) + ($199<<1)|0); + $200 = HEAP16[$arrayidx242>>1]|0; + $conv243 = $200 << 16 >> 16; + $mul244 = Math_imul($197, $conv243)|0; + $201 = $norm_offset; + $sub245 = (($mul244) - ($201))|0; + $cmp246 = ($196|0)<($sub245|0); + if (!($cmp246)) { + break L70; + } + $202 = $norm; + $203 = $j; + $arrayidx249 = (($202) + ($203<<2)|0); + $204 = +HEAPF32[$arrayidx249>>2]; + $205 = $norm2; + $206 = $j; + $arrayidx250 = (($205) + ($206<<2)|0); + $207 = +HEAPF32[$arrayidx250>>2]; + $add251 = $204 + $207; + $mul252 = 0.5 * $add251; + $208 = $norm; + $209 = $j; + $arrayidx253 = (($208) + ($209<<2)|0); + HEAPF32[$arrayidx253>>2] = $mul252; + $210 = $j; + $inc254 = (($210) + 1)|0; + $j = $inc254; + } + } + } + } + } while(0); + $211 = $dual_stereo$addr; + $tobool257 = ($211|0)!=(0); + if ($tobool257) { + $212 = $X; + $213 = $N; + $214 = $b; + $div = (($214|0) / 2)&-1; + $215 = $B; + $216 = $effective_lowband; + $cmp259 = ($216|0)!=(-1); + if ($cmp259) { + $217 = $norm; + $218 = $effective_lowband; + $add$ptr262 = (($217) + ($218<<2)|0); + $cond265 = $add$ptr262; + } else { + $cond265 = 0; + } + $219 = $LM$addr; + $220 = $last; + $tobool266 = ($220|0)!=(0); + if ($tobool266) { + $cond276 = 0; + } else { + $221 = $norm; + $222 = $M; + $223 = $eBands; + $224 = $i; + $arrayidx269 = (($223) + ($224<<1)|0); + $225 = HEAP16[$arrayidx269>>1]|0; + $conv270 = $225 << 16 >> 16; + $mul271 = Math_imul($222, $conv270)|0; + $add$ptr272 = (($221) + ($mul271<<2)|0); + $226 = $norm_offset; + $idx$neg273 = (0 - ($226))|0; + $add$ptr274 = (($add$ptr272) + ($idx$neg273<<2)|0); + $cond276 = $add$ptr274; + } + $227 = $lowband_scratch; + $228 = $x_cm; + $call277 = (_quant_band($ctx,$212,$213,$div,$215,$cond265,$219,$cond276,1.0,$227,$228)|0); + $x_cm = $call277; + $229 = $Y; + $230 = $N; + $231 = $b; + $div278 = (($231|0) / 2)&-1; + $232 = $B; + $233 = $effective_lowband; + $cmp279 = ($233|0)!=(-1); + if ($cmp279) { + $234 = $norm2; + $235 = $effective_lowband; + $add$ptr282 = (($234) + ($235<<2)|0); + $cond285 = $add$ptr282; + } else { + $cond285 = 0; + } + $236 = $LM$addr; + $237 = $last; + $tobool286 = ($237|0)!=(0); + if ($tobool286) { + $cond296 = 0; + } else { + $238 = $norm2; + $239 = $M; + $240 = $eBands; + $241 = $i; + $arrayidx289 = (($240) + ($241<<1)|0); + $242 = HEAP16[$arrayidx289>>1]|0; + $conv290 = $242 << 16 >> 16; + $mul291 = Math_imul($239, $conv290)|0; + $add$ptr292 = (($238) + ($mul291<<2)|0); + $243 = $norm_offset; + $idx$neg293 = (0 - ($243))|0; + $add$ptr294 = (($add$ptr292) + ($idx$neg293<<2)|0); + $cond296 = $add$ptr294; + } + $244 = $lowband_scratch; + $245 = $y_cm; + $call297 = (_quant_band($ctx,$229,$230,$div278,$232,$cond285,$236,$cond296,1.0,$244,$245)|0); + $y_cm = $call297; + } else { + $246 = $Y; + $cmp299 = ($246|0)!=(0|0); + $247 = $X; + if ($cmp299) { + $248 = $Y; + $249 = $N; + $250 = $b; + $251 = $B; + $252 = $effective_lowband; + $cmp302 = ($252|0)!=(-1); + if ($cmp302) { + $253 = $norm; + $254 = $effective_lowband; + $add$ptr305 = (($253) + ($254<<2)|0); + $cond308 = $add$ptr305; + } else { + $cond308 = 0; + } + $255 = $LM$addr; + $256 = $last; + $tobool309 = ($256|0)!=(0); + if ($tobool309) { + $cond319 = 0; + } else { + $257 = $norm; + $258 = $M; + $259 = $eBands; + $260 = $i; + $arrayidx312 = (($259) + ($260<<1)|0); + $261 = HEAP16[$arrayidx312>>1]|0; + $conv313 = $261 << 16 >> 16; + $mul314 = Math_imul($258, $conv313)|0; + $add$ptr315 = (($257) + ($mul314<<2)|0); + $262 = $norm_offset; + $idx$neg316 = (0 - ($262))|0; + $add$ptr317 = (($add$ptr315) + ($idx$neg316<<2)|0); + $cond319 = $add$ptr317; + } + $263 = $lowband_scratch; + $264 = $x_cm; + $265 = $y_cm; + $or320 = $264 | $265; + $call321 = (_quant_band_stereo($ctx,$247,$248,$249,$250,$251,$cond308,$255,$cond319,$263,$or320)|0); + $x_cm = $call321; + } else { + $266 = $N; + $267 = $b; + $268 = $B; + $269 = $effective_lowband; + $cmp323 = ($269|0)!=(-1); + if ($cmp323) { + $270 = $norm; + $271 = $effective_lowband; + $add$ptr326 = (($270) + ($271<<2)|0); + $cond329 = $add$ptr326; + } else { + $cond329 = 0; + } + $272 = $LM$addr; + $273 = $last; + $tobool330 = ($273|0)!=(0); + if ($tobool330) { + $cond340 = 0; + } else { + $274 = $norm; + $275 = $M; + $276 = $eBands; + $277 = $i; + $arrayidx333 = (($276) + ($277<<1)|0); + $278 = HEAP16[$arrayidx333>>1]|0; + $conv334 = $278 << 16 >> 16; + $mul335 = Math_imul($275, $conv334)|0; + $add$ptr336 = (($274) + ($mul335<<2)|0); + $279 = $norm_offset; + $idx$neg337 = (0 - ($279))|0; + $add$ptr338 = (($add$ptr336) + ($idx$neg337<<2)|0); + $cond340 = $add$ptr338; + } + $280 = $lowband_scratch; + $281 = $x_cm; + $282 = $y_cm; + $or341 = $281 | $282; + $call342 = (_quant_band($ctx,$247,$266,$267,$268,$cond329,$272,$cond340,1.0,$280,$or341)|0); + $x_cm = $call342; + } + $283 = $x_cm; + $y_cm = $283; + } + $284 = $x_cm; + $conv345 = $284&255; + $285 = $collapse_masks$addr; + $286 = $i; + $287 = $C; + $mul346 = Math_imul($286, $287)|0; + $add347 = (($mul346) + 0)|0; + $arrayidx348 = (($285) + ($add347)|0); + HEAP8[$arrayidx348>>0] = $conv345; + $288 = $y_cm; + $conv349 = $288&255; + $289 = $collapse_masks$addr; + $290 = $i; + $291 = $C; + $mul350 = Math_imul($290, $291)|0; + $292 = $C; + $add351 = (($mul350) + ($292))|0; + $sub352 = (($add351) - 1)|0; + $arrayidx353 = (($289) + ($sub352)|0); + HEAP8[$arrayidx353>>0] = $conv349; + $293 = $pulses$addr; + $294 = $i; + $arrayidx354 = (($293) + ($294<<2)|0); + $295 = HEAP32[$arrayidx354>>2]|0; + $296 = $tell; + $add355 = (($295) + ($296))|0; + $297 = $balance$addr; + $add356 = (($297) + ($add355))|0; + $balance$addr = $add356; + $298 = $b; + $299 = $N; + $shl357 = $299 << 3; + $cmp358 = ($298|0)>($shl357|0); + $conv359 = $cmp358&1; + $update_lowband = $conv359; + $300 = $i; + $inc361 = (($300) + 1)|0; + $i = $inc361; + } + $seed363 = ((($ctx)) + 36|0); + $301 = HEAP32[$seed363>>2]|0; + $302 = $seed$addr; + HEAP32[$302>>2] = $301; + $303 = $saved_stack; + _llvm_stackrestore(($303|0)); + STACKTOP = sp;return; +} +function _celt_sudiv($n,$d) { + $n = $n|0; + $d = $d|0; + var $0 = 0, $1 = 0, $d$addr = 0, $div = 0, $n$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $n$addr = $n; + $d$addr = $d; + $0 = $n$addr; + $1 = $d$addr; + $div = (($0|0) / ($1|0))&-1; + STACKTOP = sp;return ($div|0); +} +function _quant_band($ctx,$X,$N,$b,$B,$lowband,$LM,$lowband_out,$gain,$lowband_scratch,$fill) { + $ctx = $ctx|0; + $X = $X|0; + $N = $N|0; + $b = $b|0; + $B = $B|0; + $lowband = $lowband|0; + $LM = $LM|0; + $lowband_out = $lowband_out|0; + $gain = +$gain; + $lowband_scratch = $lowband_scratch|0; + $fill = $fill|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0.0, $133 = 0; + var $134 = 0, $135 = 0.0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; + var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; + var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0.0, $95 = 0, $96 = 0; + var $97 = 0, $98 = 0, $99 = 0, $B$addr = 0, $B0 = 0, $LM$addr = 0, $N$addr = 0, $N0 = 0, $N_B = 0, $N_B0 = 0, $X$addr = 0, $add = 0, $and = 0, $and124 = 0, $and36 = 0, $and44 = 0, $arrayidx = 0, $arrayidx116 = 0, $arrayidx118 = 0, $arrayidx39 = 0; + var $arrayidx99 = 0, $b$addr = 0, $call = 0, $call110 = 0.0, $call6 = 0, $call75 = 0, $cm = 0, $cmp = 0, $cmp113 = 0, $cmp15 = 0, $cmp18 = 0, $cmp21 = 0, $cmp26 = 0, $cmp4 = 0, $cmp45 = 0, $cmp47 = 0, $cmp61 = 0, $cmp7 = 0, $cmp78 = 0, $cmp85 = 0; + var $cmp96 = 0, $conv = 0, $conv100 = 0, $conv109 = 0.0, $conv111 = 0.0, $conv37 = 0, $conv40 = 0, $ctx$addr = 0, $encode1 = 0, $fill$addr = 0, $gain$addr = 0.0, $inc = 0, $inc104 = 0, $inc120 = 0, $inc59 = 0, $inc60 = 0, $inc93 = 0, $j = 0, $k = 0, $lnot = 0; + var $lnot$ext = 0, $longBlocks = 0, $lowband$addr = 0, $lowband_out$addr = 0, $lowband_scratch$addr = 0, $mul = 0, $mul117 = 0.0, $mul24 = 0, $n = 0.0, $or = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $or56 = 0, $or91 = 0, $recombine = 0, $resynth = 0, $retval = 0, $shl = 0, $shl102 = 0; + var $shl106 = 0, $shl123 = 0, $shl34 = 0, $shl41 = 0, $shl43 = 0, $shl55 = 0, $shl57 = 0, $shl67 = 0, $shl72 = 0, $shl82 = 0, $shl89 = 0, $shr = 0, $shr101 = 0, $shr33 = 0, $shr38 = 0, $shr42 = 0, $shr58 = 0, $shr66 = 0, $shr71 = 0, $shr81 = 0; + var $shr88 = 0, $shr90 = 0, $sub = 0, $sub$ptr$div = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0, $tf_change = 0, $tf_change3 = 0, $time_divide = 0, $tobool = 0, $tobool107 = 0, $tobool11 = 0, $tobool12 = 0, $tobool14 = 0, $tobool28 = 0, $tobool31 = 0, $tobool49 = 0, $tobool52 = 0, $tobool64 = 0; + var $tobool69 = 0, $tobool76 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $ctx$addr = $ctx; + $X$addr = $X; + $N$addr = $N; + $b$addr = $b; + $B$addr = $B; + $lowband$addr = $lowband; + $LM$addr = $LM; + $lowband_out$addr = $lowband_out; + $gain$addr = $gain; + $lowband_scratch$addr = $lowband_scratch; + $fill$addr = $fill; + $0 = $N$addr; + $N0 = $0; + $1 = $N$addr; + $N_B = $1; + $2 = $B$addr; + $B0 = $2; + $time_divide = 0; + $recombine = 0; + $cm = 0; + $3 = $ctx$addr; + $4 = HEAP32[$3>>2]|0; + $tobool = ($4|0)!=(0); + $lnot = $tobool ^ 1; + $lnot$ext = $lnot&1; + $resynth = $lnot$ext; + $5 = $ctx$addr; + $6 = HEAP32[$5>>2]|0; + $encode1 = $6; + $7 = $ctx$addr; + $tf_change3 = ((($7)) + 20|0); + $8 = HEAP32[$tf_change3>>2]|0; + $tf_change = $8; + $9 = $B0; + $cmp = ($9|0)==(1); + $conv = $cmp&1; + $longBlocks = $conv; + $10 = $N_B; + $11 = $B$addr; + $call = (_celt_udiv_350($10,$11)|0); + $N_B = $call; + $12 = $N$addr; + $cmp4 = ($12|0)==(1); + if ($cmp4) { + $13 = $ctx$addr; + $14 = $X$addr; + $15 = $b$addr; + $16 = $lowband_out$addr; + $call6 = (_quant_band_n1($13,$14,0,$15,$16)|0); + $retval = $call6; + $142 = $retval; + STACKTOP = sp;return ($142|0); + } + $17 = $tf_change; + $cmp7 = ($17|0)>(0); + if ($cmp7) { + $18 = $tf_change; + $recombine = $18; + } + $19 = $lowband_scratch$addr; + $tobool11 = ($19|0)!=(0|0); + $20 = $lowband$addr; + $tobool12 = ($20|0)!=(0|0); + $or$cond = $tobool11 & $tobool12; + do { + if ($or$cond) { + $21 = $recombine; + $tobool14 = ($21|0)!=(0); + if (!($tobool14)) { + $22 = $N_B; + $and = $22 & 1; + $cmp15 = ($and|0)==(0); + $23 = $tf_change; + $cmp18 = ($23|0)<(0); + $or$cond1 = $cmp15 & $cmp18; + $24 = $B0; + $cmp21 = ($24|0)>(1); + $or$cond2 = $or$cond1 | $cmp21; + if (!($or$cond2)) { + break; + } + } + $25 = $lowband_scratch$addr; + $26 = $lowband$addr; + $27 = $N$addr; + $mul = $27<<2; + $28 = $lowband_scratch$addr; + $29 = $lowband$addr; + $sub$ptr$lhs$cast = $28; + $sub$ptr$rhs$cast = $29; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $mul24 = 0; + $add = (($mul) + ($mul24))|0; + _memcpy(($25|0),($26|0),($add|0))|0; + $30 = $lowband_scratch$addr; + $lowband$addr = $30; + } + } while(0); + $k = 0; + while(1) { + $31 = $k; + $32 = $recombine; + $cmp26 = ($31|0)<($32|0); + if (!($cmp26)) { + break; + } + $33 = $encode1; + $tobool28 = ($33|0)!=(0); + if ($tobool28) { + $34 = $X$addr; + $35 = $N$addr; + $36 = $k; + $shr = $35 >> $36; + $37 = $k; + $shl = 1 << $37; + _haar1($34,$shr,$shl); + } + $38 = $lowband$addr; + $tobool31 = ($38|0)!=(0|0); + if ($tobool31) { + $39 = $lowband$addr; + $40 = $N$addr; + $41 = $k; + $shr33 = $40 >> $41; + $42 = $k; + $shl34 = 1 << $42; + _haar1($39,$shr33,$shl34); + } + $43 = $fill$addr; + $and36 = $43 & 15; + $arrayidx = (23693 + ($and36)|0); + $44 = HEAP8[$arrayidx>>0]|0; + $conv37 = $44&255; + $45 = $fill$addr; + $shr38 = $45 >> 4; + $arrayidx39 = (23693 + ($shr38)|0); + $46 = HEAP8[$arrayidx39>>0]|0; + $conv40 = $46&255; + $shl41 = $conv40 << 2; + $or = $conv37 | $shl41; + $fill$addr = $or; + $47 = $k; + $inc = (($47) + 1)|0; + $k = $inc; + } + $48 = $recombine; + $49 = $B$addr; + $shr42 = $49 >> $48; + $B$addr = $shr42; + $50 = $recombine; + $51 = $N_B; + $shl43 = $51 << $50; + $N_B = $shl43; + while(1) { + $52 = $N_B; + $and44 = $52 & 1; + $cmp45 = ($and44|0)==(0); + $53 = $tf_change; + $cmp47 = ($53|0)<(0); + $54 = $cmp45 ? $cmp47 : 0; + if (!($54)) { + break; + } + $55 = $encode1; + $tobool49 = ($55|0)!=(0); + if ($tobool49) { + $56 = $X$addr; + $57 = $N_B; + $58 = $B$addr; + _haar1($56,$57,$58); + } + $59 = $lowband$addr; + $tobool52 = ($59|0)!=(0|0); + if ($tobool52) { + $60 = $lowband$addr; + $61 = $N_B; + $62 = $B$addr; + _haar1($60,$61,$62); + } + $63 = $fill$addr; + $64 = $B$addr; + $shl55 = $63 << $64; + $65 = $fill$addr; + $or56 = $65 | $shl55; + $fill$addr = $or56; + $66 = $B$addr; + $shl57 = $66 << 1; + $B$addr = $shl57; + $67 = $N_B; + $shr58 = $67 >> 1; + $N_B = $shr58; + $68 = $time_divide; + $inc59 = (($68) + 1)|0; + $time_divide = $inc59; + $69 = $tf_change; + $inc60 = (($69) + 1)|0; + $tf_change = $inc60; + } + $70 = $B$addr; + $B0 = $70; + $71 = $N_B; + $N_B0 = $71; + $72 = $B0; + $cmp61 = ($72|0)>(1); + if ($cmp61) { + $73 = $encode1; + $tobool64 = ($73|0)!=(0); + if ($tobool64) { + $74 = $X$addr; + $75 = $N_B; + $76 = $recombine; + $shr66 = $75 >> $76; + $77 = $B0; + $78 = $recombine; + $shl67 = $77 << $78; + $79 = $longBlocks; + _deinterleave_hadamard($74,$shr66,$shl67,$79); + } + $80 = $lowband$addr; + $tobool69 = ($80|0)!=(0|0); + if ($tobool69) { + $81 = $lowband$addr; + $82 = $N_B; + $83 = $recombine; + $shr71 = $82 >> $83; + $84 = $B0; + $85 = $recombine; + $shl72 = $84 << $85; + $86 = $longBlocks; + _deinterleave_hadamard($81,$shr71,$shl72,$86); + } + } + $87 = $ctx$addr; + $88 = $X$addr; + $89 = $N$addr; + $90 = $b$addr; + $91 = $B$addr; + $92 = $lowband$addr; + $93 = $LM$addr; + $94 = $gain$addr; + $95 = $fill$addr; + $call75 = (_quant_partition($87,$88,$89,$90,$91,$92,$93,$94,$95)|0); + $cm = $call75; + $96 = $resynth; + $tobool76 = ($96|0)!=(0); + if ($tobool76) { + $97 = $B0; + $cmp78 = ($97|0)>(1); + if ($cmp78) { + $98 = $X$addr; + $99 = $N_B; + $100 = $recombine; + $shr81 = $99 >> $100; + $101 = $B0; + $102 = $recombine; + $shl82 = $101 << $102; + $103 = $longBlocks; + _interleave_hadamard($98,$shr81,$shl82,$103); + } + $104 = $N_B0; + $N_B = $104; + $105 = $B0; + $B$addr = $105; + $k = 0; + while(1) { + $106 = $k; + $107 = $time_divide; + $cmp85 = ($106|0)<($107|0); + if (!($cmp85)) { + break; + } + $108 = $B$addr; + $shr88 = $108 >> 1; + $B$addr = $shr88; + $109 = $N_B; + $shl89 = $109 << 1; + $N_B = $shl89; + $110 = $cm; + $111 = $B$addr; + $shr90 = $110 >>> $111; + $112 = $cm; + $or91 = $112 | $shr90; + $cm = $or91; + $113 = $X$addr; + $114 = $N_B; + $115 = $B$addr; + _haar1($113,$114,$115); + $116 = $k; + $inc93 = (($116) + 1)|0; + $k = $inc93; + } + $k = 0; + while(1) { + $117 = $k; + $118 = $recombine; + $cmp96 = ($117|0)<($118|0); + if (!($cmp96)) { + break; + } + $119 = $cm; + $arrayidx99 = (23709 + ($119)|0); + $120 = HEAP8[$arrayidx99>>0]|0; + $conv100 = $120&255; + $cm = $conv100; + $121 = $X$addr; + $122 = $N0; + $123 = $k; + $shr101 = $122 >> $123; + $124 = $k; + $shl102 = 1 << $124; + _haar1($121,$shr101,$shl102); + $125 = $k; + $inc104 = (($125) + 1)|0; + $k = $inc104; + } + $126 = $recombine; + $127 = $B$addr; + $shl106 = $127 << $126; + $B$addr = $shl106; + $128 = $lowband_out$addr; + $tobool107 = ($128|0)!=(0|0); + L54: do { + if ($tobool107) { + $129 = $N0; + $conv109 = (+($129|0)); + $call110 = (+Math_sqrt((+$conv109))); + $conv111 = $call110; + $n = $conv111; + $j = 0; + while(1) { + $130 = $j; + $131 = $N0; + $cmp113 = ($130|0)<($131|0); + if (!($cmp113)) { + break L54; + } + $132 = $n; + $133 = $X$addr; + $134 = $j; + $arrayidx116 = (($133) + ($134<<2)|0); + $135 = +HEAPF32[$arrayidx116>>2]; + $mul117 = $132 * $135; + $136 = $lowband_out$addr; + $137 = $j; + $arrayidx118 = (($136) + ($137<<2)|0); + HEAPF32[$arrayidx118>>2] = $mul117; + $138 = $j; + $inc120 = (($138) + 1)|0; + $j = $inc120; + } + } + } while(0); + $139 = $B$addr; + $shl123 = 1 << $139; + $sub = (($shl123) - 1)|0; + $140 = $cm; + $and124 = $140 & $sub; + $cm = $and124; + } + $141 = $cm; + $retval = $141; + $142 = $retval; + STACKTOP = sp;return ($142|0); +} +function _quant_band_stereo($ctx,$X,$Y,$N,$b,$B,$lowband,$LM,$lowband_out,$lowband_scratch,$fill) { + $ctx = $ctx|0; + $X = $X|0; + $Y = $Y|0; + $N = $N|0; + $b = $b|0; + $B = $B|0; + $lowband = $lowband|0; + $LM = $LM|0; + $lowband_out = $lowband_out|0; + $lowband_scratch = $lowband_scratch|0; + $fill = $fill|0; + var $$ = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0.0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0.0, $107 = 0, $108 = 0.0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0, $114 = 0; + var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; + var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; + var $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0.0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0.0, $167 = 0, $168 = 0, $169 = 0; + var $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0; + var $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0.0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0.0, $202 = 0, $203 = 0, $204 = 0; + var $205 = 0, $206 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; + var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0.0, $55 = 0; + var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0, $73 = 0; + var $74 = 0, $75 = 0.0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0.0, $85 = 0, $86 = 0.0, $87 = 0, $88 = 0.0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0; + var $92 = 0.0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0.0, $97 = 0, $98 = 0.0, $99 = 0, $B$addr = 0, $LM$addr = 0, $N$addr = 0, $X$addr = 0, $Y$addr = 0, $add = 0, $add130 = 0, $add146 = 0, $add76 = 0.0, $add83 = 0.0, $arch = 0, $arrayidx162 = 0; + var $arrayidx164 = 0, $arrayidx34 = 0, $arrayidx36 = 0, $arrayidx50 = 0, $arrayidx56 = 0, $arrayidx62 = 0, $arrayidx64 = 0, $arrayidx68 = 0, $arrayidx70 = 0, $arrayidx78 = 0, $arrayidx79 = 0, $arrayidx81 = 0, $arrayidx82 = 0, $arrayidx84 = 0, $b$addr = 0, $c = 0, $call = 0, $call119 = 0, $call132 = 0, $call135 = 0; + var $call148 = 0, $call42 = 0, $call47 = 0, $cm = 0, $cmp = 0, $cmp102 = 0, $cmp116 = 0, $cmp12 = 0, $cmp123 = 0, $cmp126 = 0, $cmp139 = 0, $cmp142 = 0, $cmp15 = 0, $cmp154 = 0, $cmp160 = 0, $cmp17 = 0, $cmp21 = 0, $cmp40 = 0, $cmp88 = 0, $cmp96 = 0; + var $cond = 0, $cond111 = 0, $cond29 = 0, $cond95 = 0, $conv = 0.0, $conv10 = 0.0, $conv22 = 0, $conv41 = 0, $conv49 = 0.0, $conv53 = 0.0, $ctx$addr = 0, $delta = 0, $delta7 = 0, $div = 0, $div101 = 0, $div107 = 0, $div93 = 0, $ec = 0, $ec3 = 0, $encode1 = 0; + var $fill$addr = 0, $imid = 0, $imid5 = 0, $inc = 0, $inv = 0, $iside = 0, $iside6 = 0, $itheta = 0, $itheta8 = 0, $j = 0, $lnot = 0, $lnot$ext = 0, $lowband$addr = 0, $lowband_out$addr = 0, $lowband_scratch$addr = 0, $mbits = 0, $mid = 0.0, $mul = 0.0, $mul11 = 0.0, $mul35 = 0.0; + var $mul38 = 0.0, $mul45 = 0, $mul51 = 0.0, $mul55 = 0.0, $mul60 = 0.0, $mul63 = 0.0, $mul66 = 0.0, $mul69 = 0.0, $or = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $or149 = 0, $orig_fill = 0, $qalloc = 0, $qalloc9 = 0, $rebalance = 0, $remaining_bits = 0, $remaining_bits113 = 0, $remaining_bits115 = 0; + var $remaining_bits120 = 0, $remaining_bits136 = 0, $resynth = 0, $retval = 0, $sbits = 0, $sctx = 0, $shr = 0, $shr134 = 0, $side = 0.0, $sign = 0, $sub = 0, $sub100 = 0, $sub106 = 0, $sub112 = 0, $sub114 = 0, $sub121 = 0, $sub122 = 0, $sub129 = 0, $sub137 = 0, $sub138 = 0; + var $sub145 = 0, $sub163 = 0.0, $sub23 = 0, $sub39 = 0.0, $sub46 = 0, $sub48 = 0, $sub73 = 0.0, $sub80 = 0.0, $sub87 = 0, $sub92 = 0, $tmp = 0.0, $tobool = 0, $tobool152 = 0, $tobool158 = 0, $tobool24 = 0, $tobool25 = 0, $tobool30 = 0, $tobool32 = 0, $tobool57 = 0, $x2 = 0; + var $y2 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(160|0); + $b$addr = sp + 136|0; + $fill$addr = sp + 112|0; + $sctx = sp + 40|0; + $ctx$addr = $ctx; + $X$addr = $X; + $Y$addr = $Y; + $N$addr = $N; + HEAP32[$b$addr>>2] = $b; + $B$addr = $B; + $lowband$addr = $lowband; + $LM$addr = $LM; + $lowband_out$addr = $lowband_out; + $lowband_scratch$addr = $lowband_scratch; + HEAP32[$fill$addr>>2] = $fill; + $imid = 0; + $iside = 0; + $inv = 0; + $mid = 0.0; + $side = 0.0; + $cm = 0; + $0 = $ctx$addr; + $1 = HEAP32[$0>>2]|0; + $tobool = ($1|0)!=(0); + $lnot = $tobool ^ 1; + $lnot$ext = $lnot&1; + $resynth = $lnot$ext; + $2 = $ctx$addr; + $3 = HEAP32[$2>>2]|0; + $encode1 = $3; + $4 = $ctx$addr; + $ec3 = ((($4)) + 24|0); + $5 = HEAP32[$ec3>>2]|0; + $ec = $5; + $6 = $N$addr; + $cmp = ($6|0)==(1); + if ($cmp) { + $7 = $ctx$addr; + $8 = $X$addr; + $9 = $Y$addr; + $10 = HEAP32[$b$addr>>2]|0; + $11 = $lowband_out$addr; + $call = (_quant_band_n1($7,$8,$9,$10,$11)|0); + $retval = $call; + $206 = $retval; + STACKTOP = sp;return ($206|0); + } + $12 = HEAP32[$fill$addr>>2]|0; + $orig_fill = $12; + $13 = $ctx$addr; + $14 = $X$addr; + $15 = $Y$addr; + $16 = $N$addr; + $17 = $B$addr; + $18 = $B$addr; + $19 = $LM$addr; + _compute_theta($13,$sctx,$14,$15,$16,$b$addr,$17,$18,$19,1,$fill$addr); + $20 = HEAP32[$sctx>>2]|0; + $inv = $20; + $imid5 = ((($sctx)) + 4|0); + $21 = HEAP32[$imid5>>2]|0; + $imid = $21; + $iside6 = ((($sctx)) + 8|0); + $22 = HEAP32[$iside6>>2]|0; + $iside = $22; + $delta7 = ((($sctx)) + 12|0); + $23 = HEAP32[$delta7>>2]|0; + $delta = $23; + $itheta8 = ((($sctx)) + 16|0); + $24 = HEAP32[$itheta8>>2]|0; + $itheta = $24; + $qalloc9 = ((($sctx)) + 20|0); + $25 = HEAP32[$qalloc9>>2]|0; + $qalloc = $25; + $26 = $imid; + $conv = (+($26|0)); + $mul = 3.0517578125E-5 * $conv; + $mid = $mul; + $27 = $iside; + $conv10 = (+($27|0)); + $mul11 = 3.0517578125E-5 * $conv10; + $side = $mul11; + $28 = $N$addr; + $cmp12 = ($28|0)==(2); + do { + if ($cmp12) { + $sign = 0; + $29 = HEAP32[$b$addr>>2]|0; + $mbits = $29; + $sbits = 0; + $30 = $itheta; + $cmp15 = ($30|0)!=(0); + $31 = $itheta; + $cmp17 = ($31|0)!=(16384); + $or$cond = $cmp15 & $cmp17; + $$ = $or$cond ? 8 : 0; + $sbits = $$; + $32 = $sbits; + $33 = $mbits; + $sub = (($33) - ($32))|0; + $mbits = $sub; + $34 = $itheta; + $cmp21 = ($34|0)>(8192); + $conv22 = $cmp21&1; + $c = $conv22; + $35 = $qalloc; + $36 = $sbits; + $add = (($35) + ($36))|0; + $37 = $ctx$addr; + $remaining_bits = ((($37)) + 28|0); + $38 = HEAP32[$remaining_bits>>2]|0; + $sub23 = (($38) - ($add))|0; + HEAP32[$remaining_bits>>2] = $sub23; + $39 = $c; + $tobool24 = ($39|0)!=(0); + $40 = $Y$addr; + $41 = $X$addr; + $cond = $tobool24 ? $40 : $41; + $x2 = $cond; + $42 = $c; + $tobool25 = ($42|0)!=(0); + $43 = $X$addr; + $44 = $Y$addr; + $cond29 = $tobool25 ? $43 : $44; + $y2 = $cond29; + $45 = $sbits; + $tobool30 = ($45|0)!=(0); + do { + if ($tobool30) { + $46 = $encode1; + $tobool32 = ($46|0)!=(0); + if ($tobool32) { + $47 = $x2; + $48 = +HEAPF32[$47>>2]; + $49 = $y2; + $arrayidx34 = ((($49)) + 4|0); + $50 = +HEAPF32[$arrayidx34>>2]; + $mul35 = $48 * $50; + $51 = $x2; + $arrayidx36 = ((($51)) + 4|0); + $52 = +HEAPF32[$arrayidx36>>2]; + $53 = $y2; + $54 = +HEAPF32[$53>>2]; + $mul38 = $52 * $54; + $sub39 = $mul35 - $mul38; + $cmp40 = $sub39 < 0.0; + $conv41 = $cmp40&1; + $sign = $conv41; + $55 = $ec; + $56 = $sign; + _ec_enc_bits($55,$56,1); + break; + } else { + $57 = $ec; + $call42 = (_ec_dec_bits($57,1)|0); + $sign = $call42; + break; + } + } + } while(0); + $58 = $sign; + $mul45 = $58<<1; + $sub46 = (1 - ($mul45))|0; + $sign = $sub46; + $59 = $ctx$addr; + $60 = $x2; + $61 = $N$addr; + $62 = $mbits; + $63 = $B$addr; + $64 = $lowband$addr; + $65 = $LM$addr; + $66 = $lowband_out$addr; + $67 = $lowband_scratch$addr; + $68 = $orig_fill; + $call47 = (_quant_band($59,$60,$61,$62,$63,$64,$65,$66,1.0,$67,$68)|0); + $cm = $call47; + $69 = $sign; + $sub48 = (0 - ($69))|0; + $conv49 = (+($sub48|0)); + $70 = $x2; + $arrayidx50 = ((($70)) + 4|0); + $71 = +HEAPF32[$arrayidx50>>2]; + $mul51 = $conv49 * $71; + $72 = $y2; + HEAPF32[$72>>2] = $mul51; + $73 = $sign; + $conv53 = (+($73|0)); + $74 = $x2; + $75 = +HEAPF32[$74>>2]; + $mul55 = $conv53 * $75; + $76 = $y2; + $arrayidx56 = ((($76)) + 4|0); + HEAPF32[$arrayidx56>>2] = $mul55; + $77 = $resynth; + $tobool57 = ($77|0)!=(0); + if ($tobool57) { + $78 = $mid; + $79 = $X$addr; + $80 = +HEAPF32[$79>>2]; + $mul60 = $78 * $80; + $81 = $X$addr; + HEAPF32[$81>>2] = $mul60; + $82 = $mid; + $83 = $X$addr; + $arrayidx62 = ((($83)) + 4|0); + $84 = +HEAPF32[$arrayidx62>>2]; + $mul63 = $82 * $84; + $85 = $X$addr; + $arrayidx64 = ((($85)) + 4|0); + HEAPF32[$arrayidx64>>2] = $mul63; + $86 = $side; + $87 = $Y$addr; + $88 = +HEAPF32[$87>>2]; + $mul66 = $86 * $88; + $89 = $Y$addr; + HEAPF32[$89>>2] = $mul66; + $90 = $side; + $91 = $Y$addr; + $arrayidx68 = ((($91)) + 4|0); + $92 = +HEAPF32[$arrayidx68>>2]; + $mul69 = $90 * $92; + $93 = $Y$addr; + $arrayidx70 = ((($93)) + 4|0); + HEAPF32[$arrayidx70>>2] = $mul69; + $94 = $X$addr; + $95 = +HEAPF32[$94>>2]; + $tmp = $95; + $96 = $tmp; + $97 = $Y$addr; + $98 = +HEAPF32[$97>>2]; + $sub73 = $96 - $98; + $99 = $X$addr; + HEAPF32[$99>>2] = $sub73; + $100 = $tmp; + $101 = $Y$addr; + $102 = +HEAPF32[$101>>2]; + $add76 = $100 + $102; + $103 = $Y$addr; + HEAPF32[$103>>2] = $add76; + $104 = $X$addr; + $arrayidx78 = ((($104)) + 4|0); + $105 = +HEAPF32[$arrayidx78>>2]; + $tmp = $105; + $106 = $tmp; + $107 = $Y$addr; + $arrayidx79 = ((($107)) + 4|0); + $108 = +HEAPF32[$arrayidx79>>2]; + $sub80 = $106 - $108; + $109 = $X$addr; + $arrayidx81 = ((($109)) + 4|0); + HEAPF32[$arrayidx81>>2] = $sub80; + $110 = $tmp; + $111 = $Y$addr; + $arrayidx82 = ((($111)) + 4|0); + $112 = +HEAPF32[$arrayidx82>>2]; + $add83 = $110 + $112; + $113 = $Y$addr; + $arrayidx84 = ((($113)) + 4|0); + HEAPF32[$arrayidx84>>2] = $add83; + } + } else { + $114 = HEAP32[$b$addr>>2]|0; + $115 = HEAP32[$b$addr>>2]|0; + $116 = $delta; + $sub87 = (($115) - ($116))|0; + $div = (($sub87|0) / 2)&-1; + $cmp88 = ($114|0)<($div|0); + $117 = HEAP32[$b$addr>>2]|0; + if ($cmp88) { + $cond95 = $117; + } else { + $118 = $delta; + $sub92 = (($117) - ($118))|0; + $div93 = (($sub92|0) / 2)&-1; + $cond95 = $div93; + } + $cmp96 = (0)>($cond95|0); + if ($cmp96) { + $cond111 = 0; + } else { + $119 = HEAP32[$b$addr>>2]|0; + $120 = HEAP32[$b$addr>>2]|0; + $121 = $delta; + $sub100 = (($120) - ($121))|0; + $div101 = (($sub100|0) / 2)&-1; + $cmp102 = ($119|0)<($div101|0); + $122 = HEAP32[$b$addr>>2]|0; + if ($cmp102) { + $cond111 = $122; + } else { + $123 = $delta; + $sub106 = (($122) - ($123))|0; + $div107 = (($sub106|0) / 2)&-1; + $cond111 = $div107; + } + } + $mbits = $cond111; + $124 = HEAP32[$b$addr>>2]|0; + $125 = $mbits; + $sub112 = (($124) - ($125))|0; + $sbits = $sub112; + $126 = $qalloc; + $127 = $ctx$addr; + $remaining_bits113 = ((($127)) + 28|0); + $128 = HEAP32[$remaining_bits113>>2]|0; + $sub114 = (($128) - ($126))|0; + HEAP32[$remaining_bits113>>2] = $sub114; + $129 = $ctx$addr; + $remaining_bits115 = ((($129)) + 28|0); + $130 = HEAP32[$remaining_bits115>>2]|0; + $rebalance = $130; + $131 = $mbits; + $132 = $sbits; + $cmp116 = ($131|0)>=($132|0); + $133 = $ctx$addr; + if ($cmp116) { + $134 = $X$addr; + $135 = $N$addr; + $136 = $mbits; + $137 = $B$addr; + $138 = $lowband$addr; + $139 = $LM$addr; + $140 = $lowband_out$addr; + $141 = $lowband_scratch$addr; + $142 = HEAP32[$fill$addr>>2]|0; + $call119 = (_quant_band($133,$134,$135,$136,$137,$138,$139,$140,1.0,$141,$142)|0); + $cm = $call119; + $143 = $mbits; + $144 = $rebalance; + $145 = $ctx$addr; + $remaining_bits120 = ((($145)) + 28|0); + $146 = HEAP32[$remaining_bits120>>2]|0; + $sub121 = (($144) - ($146))|0; + $sub122 = (($143) - ($sub121))|0; + $rebalance = $sub122; + $147 = $rebalance; + $cmp123 = ($147|0)>(24); + $148 = $itheta; + $cmp126 = ($148|0)!=(0); + $or$cond1 = $cmp123 & $cmp126; + if ($or$cond1) { + $149 = $rebalance; + $sub129 = (($149) - 24)|0; + $150 = $sbits; + $add130 = (($150) + ($sub129))|0; + $sbits = $add130; + } + $151 = $ctx$addr; + $152 = $Y$addr; + $153 = $N$addr; + $154 = $sbits; + $155 = $B$addr; + $156 = $LM$addr; + $157 = $side; + $158 = HEAP32[$fill$addr>>2]|0; + $159 = $B$addr; + $shr = $158 >> $159; + $call132 = (_quant_band($151,$152,$153,$154,$155,0,$156,0,$157,0,$shr)|0); + $160 = $cm; + $or = $160 | $call132; + $cm = $or; + break; + } else { + $161 = $Y$addr; + $162 = $N$addr; + $163 = $sbits; + $164 = $B$addr; + $165 = $LM$addr; + $166 = $side; + $167 = HEAP32[$fill$addr>>2]|0; + $168 = $B$addr; + $shr134 = $167 >> $168; + $call135 = (_quant_band($133,$161,$162,$163,$164,0,$165,0,$166,0,$shr134)|0); + $cm = $call135; + $169 = $sbits; + $170 = $rebalance; + $171 = $ctx$addr; + $remaining_bits136 = ((($171)) + 28|0); + $172 = HEAP32[$remaining_bits136>>2]|0; + $sub137 = (($170) - ($172))|0; + $sub138 = (($169) - ($sub137))|0; + $rebalance = $sub138; + $173 = $rebalance; + $cmp139 = ($173|0)>(24); + $174 = $itheta; + $cmp142 = ($174|0)!=(16384); + $or$cond2 = $cmp139 & $cmp142; + if ($or$cond2) { + $175 = $rebalance; + $sub145 = (($175) - 24)|0; + $176 = $mbits; + $add146 = (($176) + ($sub145))|0; + $mbits = $add146; + } + $177 = $ctx$addr; + $178 = $X$addr; + $179 = $N$addr; + $180 = $mbits; + $181 = $B$addr; + $182 = $lowband$addr; + $183 = $LM$addr; + $184 = $lowband_out$addr; + $185 = $lowband_scratch$addr; + $186 = HEAP32[$fill$addr>>2]|0; + $call148 = (_quant_band($177,$178,$179,$180,$181,$182,$183,$184,1.0,$185,$186)|0); + $187 = $cm; + $or149 = $187 | $call148; + $cm = $or149; + break; + } + } + } while(0); + $188 = $resynth; + $tobool152 = ($188|0)!=(0); + L32: do { + if ($tobool152) { + $189 = $N$addr; + $cmp154 = ($189|0)!=(2); + if ($cmp154) { + $190 = $X$addr; + $191 = $Y$addr; + $192 = $mid; + $193 = $N$addr; + $194 = $ctx$addr; + $arch = ((($194)) + 40|0); + $195 = HEAP32[$arch>>2]|0; + _stereo_merge($190,$191,$192,$193,$195); + } + $196 = $inv; + $tobool158 = ($196|0)!=(0); + if ($tobool158) { + $j = 0; + while(1) { + $197 = $j; + $198 = $N$addr; + $cmp160 = ($197|0)<($198|0); + if (!($cmp160)) { + break L32; + } + $199 = $Y$addr; + $200 = $j; + $arrayidx162 = (($199) + ($200<<2)|0); + $201 = +HEAPF32[$arrayidx162>>2]; + $sub163 = - $201; + $202 = $Y$addr; + $203 = $j; + $arrayidx164 = (($202) + ($203<<2)|0); + HEAPF32[$arrayidx164>>2] = $sub163; + $204 = $j; + $inc = (($204) + 1)|0; + $j = $inc; + } + } + } + } while(0); + $205 = $cm; + $retval = $205; + $206 = $retval; + STACKTOP = sp;return ($206|0); +} +function _quant_band_n1($ctx,$X,$Y,$b,$lowband_out) { + $ctx = $ctx|0; + $X = $X|0; + $Y = $Y|0; + $b = $b|0; + $lowband_out = $lowband_out|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0.0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $X$addr = 0, $Y$addr = 0, $add = 0, $b$addr = 0, $c = 0, $call = 0, $cmp = 0, $cmp18 = 0, $cmp4 = 0, $cmp8 = 0, $cond = 0.0; + var $conv = 0, $conv9 = 0, $ctx$addr = 0, $ec = 0, $ec3 = 0, $encode1 = 0, $inc = 0, $lnot = 0, $lnot$ext = 0, $lowband_out$addr = 0, $remaining_bits = 0, $remaining_bits10 = 0, $resynth = 0, $sign = 0, $stereo = 0, $sub = 0, $sub11 = 0, $tobool = 0, $tobool13 = 0, $tobool15 = 0; + var $tobool20 = 0, $tobool6 = 0, $x = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $ctx$addr = $ctx; + $X$addr = $X; + $Y$addr = $Y; + $b$addr = $b; + $lowband_out$addr = $lowband_out; + $0 = $ctx$addr; + $1 = HEAP32[$0>>2]|0; + $tobool = ($1|0)!=(0); + $lnot = $tobool ^ 1; + $lnot$ext = $lnot&1; + $resynth = $lnot$ext; + $2 = $X$addr; + $x = $2; + $3 = $ctx$addr; + $4 = HEAP32[$3>>2]|0; + $encode1 = $4; + $5 = $ctx$addr; + $ec3 = ((($5)) + 24|0); + $6 = HEAP32[$ec3>>2]|0; + $ec = $6; + $7 = $Y$addr; + $cmp = ($7|0)!=(0|0); + $conv = $cmp&1; + $stereo = $conv; + $c = 0; + while(1) { + $sign = 0; + $8 = $ctx$addr; + $remaining_bits = ((($8)) + 28|0); + $9 = HEAP32[$remaining_bits>>2]|0; + $cmp4 = ($9|0)>=(8); + if ($cmp4) { + $10 = $encode1; + $tobool6 = ($10|0)!=(0); + if ($tobool6) { + $11 = $x; + $12 = +HEAPF32[$11>>2]; + $cmp8 = $12 < 0.0; + $conv9 = $cmp8&1; + $sign = $conv9; + $13 = $ec; + $14 = $sign; + _ec_enc_bits($13,$14,1); + } else { + $15 = $ec; + $call = (_ec_dec_bits($15,1)|0); + $sign = $call; + } + $16 = $ctx$addr; + $remaining_bits10 = ((($16)) + 28|0); + $17 = HEAP32[$remaining_bits10>>2]|0; + $sub = (($17) - 8)|0; + HEAP32[$remaining_bits10>>2] = $sub; + $18 = $b$addr; + $sub11 = (($18) - 8)|0; + $b$addr = $sub11; + } + $19 = $resynth; + $tobool13 = ($19|0)!=(0); + if ($tobool13) { + $20 = $sign; + $tobool15 = ($20|0)!=(0); + $cond = $tobool15 ? -1.0 : 1.0; + $21 = $x; + HEAPF32[$21>>2] = $cond; + } + $22 = $Y$addr; + $x = $22; + $23 = $c; + $inc = (($23) + 1)|0; + $c = $inc; + $24 = $stereo; + $add = (1 + ($24))|0; + $cmp18 = ($inc|0)<($add|0); + if (!($cmp18)) { + break; + } + } + $25 = $lowband_out$addr; + $tobool20 = ($25|0)!=(0|0); + if (!($tobool20)) { + STACKTOP = sp;return 1; + } + $26 = $X$addr; + $27 = +HEAPF32[$26>>2]; + $28 = $lowband_out$addr; + HEAPF32[$28>>2] = $27; + STACKTOP = sp;return 1; +} +function _compute_theta($ctx,$sctx,$X,$Y,$N,$b,$B,$B0,$LM,$stereo,$fill) { + $ctx = $ctx|0; + $sctx = $sctx|0; + $X = $X|0; + $Y = $Y|0; + $N = $N|0; + $b = $b|0; + $B = $B|0; + $B0 = $B0|0; + $LM = $LM|0; + $stereo = $stereo|0; + $fill = $fill|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0.0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; + var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0; + var $B$addr = 0, $B0$addr = 0, $LM$addr = 0, $N$addr = 0, $X$addr = 0, $Y$addr = 0, $add = 0, $add102 = 0, $add104 = 0, $add111 = 0, $add113 = 0, $add121 = 0, $add123 = 0, $add131 = 0, $add135 = 0, $add137 = 0, $add144 = 0, $add150 = 0, $add157 = 0, $add161 = 0; + var $add162 = 0, $add166 = 0, $add171 = 0, $add175 = 0, $add177 = 0, $add179 = 0, $add185 = 0, $add22 = 0, $add263 = 0, $add30 = 0, $add32 = 0, $add40 = 0, $add42 = 0, $add47 = 0, $add51 = 0, $add53 = 0, $add57 = 0, $add64 = 0, $add65 = 0, $add68 = 0; + var $add77 = 0, $add79 = 0, $add85 = 0, $add89 = 0, $add91 = 0, $and = 0, $and246 = 0, $arch = 0, $arrayidx = 0, $arrayidx212 = 0, $arrayidx214 = 0, $b$addr = 0, $bandE = 0, $bandE6 = 0, $call = 0, $call105 = 0, $call13 = 0, $call147 = 0, $call15 = 0, $call158 = 0; + var $call172 = 0, $call190 = 0, $call226 = 0, $call232 = 0, $call249 = 0, $call253 = 0, $call259 = 0, $call56 = 0, $cmp = 0, $cmp118 = 0, $cmp128 = 0, $cmp153 = 0, $cmp16 = 0, $cmp195 = 0, $cmp206 = 0, $cmp210 = 0, $cmp217 = 0, $cmp220 = 0, $cmp235 = 0, $cmp240 = 0; + var $cmp27 = 0, $cmp35 = 0, $cmp44 = 0, $cmp59 = 0, $cmp70 = 0, $cmp82 = 0, $cmp9 = 0, $cmp96 = 0, $cond = 0, $cond126 = 0, $cond143 = 0, $cond43 = 0, $cond55 = 0, $cond81 = 0, $cond93 = 0, $conv = 0, $conv207 = 0, $conv248 = 0, $conv250 = 0, $conv252 = 0; + var $conv254 = 0, $conv257 = 0, $conv258 = 0, $conv260 = 0, $conv261 = 0, $ctx$addr = 0, $delta = 0, $delta270 = 0, $div = 0, $div62 = 0, $ec = 0, $ec5 = 0, $encode = 0, $fill$addr = 0, $fl = 0, $fl146 = 0, $fm = 0, $fs = 0, $fs108 = 0, $ft = 0; + var $ft109 = 0, $i = 0, $i3 = 0, $imid = 0, $imid268 = 0, $inc = 0, $intensity = 0, $intensity4 = 0, $inv = 0, $iside = 0, $iside269 = 0, $itheta = 0, $itheta271 = 0, $j = 0, $logN = 0, $m = 0, $m2 = 0, $mul = 0, $mul114 = 0, $mul132 = 0; + var $mul139 = 0, $mul151 = 0, $mul156 = 0, $mul163 = 0, $mul167 = 0, $mul170 = 0, $mul181 = 0, $mul189 = 0, $mul21 = 0, $mul262 = 0, $mul31 = 0, $mul37 = 0, $mul41 = 0, $mul48 = 0, $mul52 = 0, $mul58 = 0, $mul66 = 0, $mul73 = 0, $mul78 = 0, $mul86 = 0; + var $mul90 = 0, $offset = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $p0 = 0, $pulse_cap = 0, $qalloc = 0, $qalloc272 = 0, $qn = 0, $remaining_bits = 0, $sctx$addr = 0, $shl = 0, $shl243 = 0, $shl245 = 0, $shl256 = 0, $shr = 0, $shr110 = 0, $shr112 = 0, $shr117 = 0; + var $shr127 = 0, $shr133 = 0, $shr140 = 0, $shr148 = 0, $shr149 = 0, $shr152 = 0, $shr160 = 0, $shr164 = 0, $shr174 = 0, $shr182 = 0, $shr23 = 0, $shr264 = 0, $stereo$addr = 0, $sub = 0, $sub124 = 0, $sub136 = 0, $sub138 = 0, $sub141 = 0, $sub159 = 0, $sub168 = 0; + var $sub169 = 0, $sub173 = 0, $sub176 = 0, $sub178 = 0, $sub180 = 0, $sub183 = 0, $sub213 = 0.0, $sub233 = 0, $sub234 = 0, $sub238 = 0, $sub244 = 0, $sub251 = 0, $sub255 = 0, $sub38 = 0, $sub39 = 0, $sub50 = 0, $sub67 = 0, $sub75 = 0, $sub76 = 0, $sub88 = 0; + var $tell = 0, $tobool = 0, $tobool100 = 0, $tobool11 = 0, $tobool115 = 0, $tobool19 = 0, $tobool191 = 0, $tobool193 = 0, $tobool202 = 0, $tobool204 = 0, $tobool208 = 0, $tobool223 = 0, $tobool25 = 0, $tobool33 = 0, $tobool8 = 0, $tobool98 = 0, $x = 0, $x0 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(160|0); + $ctx$addr = $ctx; + $sctx$addr = $sctx; + $X$addr = $X; + $Y$addr = $Y; + $N$addr = $N; + $b$addr = $b; + $B$addr = $B; + $B0$addr = $B0; + $LM$addr = $LM; + $stereo$addr = $stereo; + $fill$addr = $fill; + $itheta = 0; + $inv = 0; + $0 = $ctx$addr; + $1 = HEAP32[$0>>2]|0; + $encode = $1; + $2 = $ctx$addr; + $m2 = ((($2)) + 4|0); + $3 = HEAP32[$m2>>2]|0; + $m = $3; + $4 = $ctx$addr; + $i3 = ((($4)) + 8|0); + $5 = HEAP32[$i3>>2]|0; + $i = $5; + $6 = $ctx$addr; + $intensity4 = ((($6)) + 12|0); + $7 = HEAP32[$intensity4>>2]|0; + $intensity = $7; + $8 = $ctx$addr; + $ec5 = ((($8)) + 24|0); + $9 = HEAP32[$ec5>>2]|0; + $ec = $9; + $10 = $ctx$addr; + $bandE6 = ((($10)) + 32|0); + $11 = HEAP32[$bandE6>>2]|0; + $bandE = $11; + $12 = $m; + $logN = ((($12)) + 56|0); + $13 = HEAP32[$logN>>2]|0; + $14 = $i; + $arrayidx = (($13) + ($14<<1)|0); + $15 = HEAP16[$arrayidx>>1]|0; + $conv = $15 << 16 >> 16; + $16 = $LM$addr; + $mul = $16<<3; + $add = (($conv) + ($mul))|0; + $pulse_cap = $add; + $17 = $pulse_cap; + $shr = $17 >> 1; + $18 = $stereo$addr; + $tobool = ($18|0)!=(0); + $19 = $N$addr; + $cmp = ($19|0)==(2); + $20 = $tobool ? $cmp : 0; + $cond = $20 ? 16 : 4; + $sub = (($shr) - ($cond))|0; + $offset = $sub; + $21 = $N$addr; + $22 = $b$addr; + $23 = HEAP32[$22>>2]|0; + $24 = $offset; + $25 = $pulse_cap; + $26 = $stereo$addr; + $call = (_compute_qn($21,$23,$24,$25,$26)|0); + $qn = $call; + $27 = $stereo$addr; + $tobool8 = ($27|0)!=(0); + if ($tobool8) { + $28 = $i; + $29 = $intensity; + $cmp9 = ($28|0)>=($29|0); + if ($cmp9) { + $qn = 1; + } + } + $30 = $encode; + $tobool11 = ($30|0)!=(0); + if ($tobool11) { + $31 = $X$addr; + $32 = $Y$addr; + $33 = $stereo$addr; + $34 = $N$addr; + $35 = $ctx$addr; + $arch = ((($35)) + 40|0); + $36 = HEAP32[$arch>>2]|0; + $call13 = (_stereo_itheta($31,$32,$33,$34,$36)|0); + $itheta = $call13; + } + $37 = $ec; + $call15 = (_ec_tell_frac($37)|0); + $tell = $call15; + $38 = $qn; + $cmp16 = ($38|0)!=(1); + do { + if ($cmp16) { + $39 = $encode; + $tobool19 = ($39|0)!=(0); + if ($tobool19) { + $40 = $itheta; + $41 = $qn; + $mul21 = Math_imul($40, $41)|0; + $add22 = (($mul21) + 8192)|0; + $shr23 = $add22 >> 14; + $itheta = $shr23; + } + $42 = $stereo$addr; + $tobool25 = ($42|0)!=(0); + $43 = $N$addr; + $cmp27 = ($43|0)>(2); + $or$cond = $tobool25 & $cmp27; + do { + if ($or$cond) { + $p0 = 3; + $44 = $itheta; + $x = $44; + $45 = $qn; + $div = (($45|0) / 2)&-1; + $x0 = $div; + $46 = $p0; + $47 = $x0; + $add30 = (($47) + 1)|0; + $mul31 = Math_imul($46, $add30)|0; + $48 = $x0; + $add32 = (($mul31) + ($48))|0; + $ft = $add32; + $49 = $encode; + $tobool33 = ($49|0)!=(0); + $50 = $ec; + if ($tobool33) { + $51 = $x; + $52 = $x0; + $cmp35 = ($51|0)<=($52|0); + if ($cmp35) { + $53 = $p0; + $54 = $x; + $mul37 = Math_imul($53, $54)|0; + $cond43 = $mul37; + } else { + $55 = $x; + $sub38 = (($55) - 1)|0; + $56 = $x0; + $sub39 = (($sub38) - ($56))|0; + $57 = $x0; + $add40 = (($57) + 1)|0; + $58 = $p0; + $mul41 = Math_imul($add40, $58)|0; + $add42 = (($sub39) + ($mul41))|0; + $cond43 = $add42; + } + $59 = $x; + $60 = $x0; + $cmp44 = ($59|0)<=($60|0); + if ($cmp44) { + $61 = $p0; + $62 = $x; + $add47 = (($62) + 1)|0; + $mul48 = Math_imul($61, $add47)|0; + $cond55 = $mul48; + } else { + $63 = $x; + $64 = $x0; + $sub50 = (($63) - ($64))|0; + $65 = $x0; + $add51 = (($65) + 1)|0; + $66 = $p0; + $mul52 = Math_imul($add51, $66)|0; + $add53 = (($sub50) + ($mul52))|0; + $cond55 = $add53; + } + $67 = $ft; + _ec_encode($50,$cond43,$cond55,$67); + break; + } + $68 = $ft; + $call56 = (_ec_decode($50,$68)|0); + $fs = $call56; + $69 = $fs; + $70 = $x0; + $add57 = (($70) + 1)|0; + $71 = $p0; + $mul58 = Math_imul($add57, $71)|0; + $cmp59 = ($69|0)<($mul58|0); + if ($cmp59) { + $72 = $fs; + $73 = $p0; + $div62 = (($72|0) / ($73|0))&-1; + $x = $div62; + } else { + $74 = $x0; + $add64 = (($74) + 1)|0; + $75 = $fs; + $76 = $x0; + $add65 = (($76) + 1)|0; + $77 = $p0; + $mul66 = Math_imul($add65, $77)|0; + $sub67 = (($75) - ($mul66))|0; + $add68 = (($add64) + ($sub67))|0; + $x = $add68; + } + $78 = $ec; + $79 = $x; + $80 = $x0; + $cmp70 = ($79|0)<=($80|0); + if ($cmp70) { + $81 = $p0; + $82 = $x; + $mul73 = Math_imul($81, $82)|0; + $cond81 = $mul73; + } else { + $83 = $x; + $sub75 = (($83) - 1)|0; + $84 = $x0; + $sub76 = (($sub75) - ($84))|0; + $85 = $x0; + $add77 = (($85) + 1)|0; + $86 = $p0; + $mul78 = Math_imul($add77, $86)|0; + $add79 = (($sub76) + ($mul78))|0; + $cond81 = $add79; + } + $87 = $x; + $88 = $x0; + $cmp82 = ($87|0)<=($88|0); + if ($cmp82) { + $89 = $p0; + $90 = $x; + $add85 = (($90) + 1)|0; + $mul86 = Math_imul($89, $add85)|0; + $cond93 = $mul86; + } else { + $91 = $x; + $92 = $x0; + $sub88 = (($91) - ($92))|0; + $93 = $x0; + $add89 = (($93) + 1)|0; + $94 = $p0; + $mul90 = Math_imul($add89, $94)|0; + $add91 = (($sub88) + ($mul90))|0; + $cond93 = $add91; + } + $95 = $ft; + _ec_dec_update($78,$cond81,$cond93,$95); + $96 = $x; + $itheta = $96; + } else { + $97 = $B0$addr; + $cmp96 = ($97|0)>(1); + $98 = $stereo$addr; + $tobool98 = ($98|0)!=(0); + $or$cond1 = $cmp96 | $tobool98; + if ($or$cond1) { + $99 = $encode; + $tobool100 = ($99|0)!=(0); + $100 = $ec; + if ($tobool100) { + $101 = $itheta; + $102 = $qn; + $add102 = (($102) + 1)|0; + _ec_enc_uint($100,$101,$add102); + break; + } else { + $103 = $qn; + $add104 = (($103) + 1)|0; + $call105 = (_ec_dec_uint($100,$add104)|0); + $itheta = $call105; + break; + } + } + $fs108 = 1; + $104 = $qn; + $shr110 = $104 >> 1; + $add111 = (($shr110) + 1)|0; + $105 = $qn; + $shr112 = $105 >> 1; + $add113 = (($shr112) + 1)|0; + $mul114 = Math_imul($add111, $add113)|0; + $ft109 = $mul114; + $106 = $encode; + $tobool115 = ($106|0)!=(0); + if (!($tobool115)) { + $fl146 = 0; + $126 = $ec; + $127 = $ft109; + $call147 = (_ec_decode($126,$127)|0); + $fm = $call147; + $128 = $fm; + $129 = $qn; + $shr148 = $129 >> 1; + $130 = $qn; + $shr149 = $130 >> 1; + $add150 = (($shr149) + 1)|0; + $mul151 = Math_imul($shr148, $add150)|0; + $shr152 = $mul151 >> 1; + $cmp153 = ($128|0)<($shr152|0); + if ($cmp153) { + $131 = $fm; + $mul156 = $131<<3; + $add157 = (($mul156) + 1)|0; + $call158 = (_isqrt32($add157)|0); + $sub159 = (($call158) - 1)|0; + $shr160 = $sub159 >>> 1; + $itheta = $shr160; + $132 = $itheta; + $add161 = (($132) + 1)|0; + $fs108 = $add161; + $133 = $itheta; + $134 = $itheta; + $add162 = (($134) + 1)|0; + $mul163 = Math_imul($133, $add162)|0; + $shr164 = $mul163 >> 1; + $fl146 = $shr164; + } else { + $135 = $qn; + $add166 = (($135) + 1)|0; + $mul167 = $add166<<1; + $136 = $ft109; + $137 = $fm; + $sub168 = (($136) - ($137))|0; + $sub169 = (($sub168) - 1)|0; + $mul170 = $sub169<<3; + $add171 = (($mul170) + 1)|0; + $call172 = (_isqrt32($add171)|0); + $sub173 = (($mul167) - ($call172))|0; + $shr174 = $sub173 >>> 1; + $itheta = $shr174; + $138 = $qn; + $add175 = (($138) + 1)|0; + $139 = $itheta; + $sub176 = (($add175) - ($139))|0; + $fs108 = $sub176; + $140 = $ft109; + $141 = $qn; + $add177 = (($141) + 1)|0; + $142 = $itheta; + $sub178 = (($add177) - ($142))|0; + $143 = $qn; + $add179 = (($143) + 2)|0; + $144 = $itheta; + $sub180 = (($add179) - ($144))|0; + $mul181 = Math_imul($sub178, $sub180)|0; + $shr182 = $mul181 >> 1; + $sub183 = (($140) - ($shr182))|0; + $fl146 = $sub183; + } + $145 = $ec; + $146 = $fl146; + $147 = $fl146; + $148 = $fs108; + $add185 = (($147) + ($148))|0; + $149 = $ft109; + _ec_dec_update($145,$146,$add185,$149); + break; + } + $107 = $itheta; + $108 = $qn; + $shr117 = $108 >> 1; + $cmp118 = ($107|0)<=($shr117|0); + if ($cmp118) { + $109 = $itheta; + $add121 = (($109) + 1)|0; + $cond126 = $add121; + } else { + $110 = $qn; + $add123 = (($110) + 1)|0; + $111 = $itheta; + $sub124 = (($add123) - ($111))|0; + $cond126 = $sub124; + } + $fs108 = $cond126; + $112 = $itheta; + $113 = $qn; + $shr127 = $113 >> 1; + $cmp128 = ($112|0)<=($shr127|0); + if ($cmp128) { + $114 = $itheta; + $115 = $itheta; + $add131 = (($115) + 1)|0; + $mul132 = Math_imul($114, $add131)|0; + $shr133 = $mul132 >> 1; + $cond143 = $shr133; + } else { + $116 = $ft109; + $117 = $qn; + $add135 = (($117) + 1)|0; + $118 = $itheta; + $sub136 = (($add135) - ($118))|0; + $119 = $qn; + $add137 = (($119) + 2)|0; + $120 = $itheta; + $sub138 = (($add137) - ($120))|0; + $mul139 = Math_imul($sub136, $sub138)|0; + $shr140 = $mul139 >> 1; + $sub141 = (($116) - ($shr140))|0; + $cond143 = $sub141; + } + $fl = $cond143; + $121 = $ec; + $122 = $fl; + $123 = $fl; + $124 = $fs108; + $add144 = (($123) + ($124))|0; + $125 = $ft109; + _ec_encode($121,$122,$add144,$125); + } + } while(0); + $150 = $itheta; + $mul189 = $150<<14; + $151 = $qn; + $call190 = (_celt_udiv_350($mul189,$151)|0); + $itheta = $call190; + $152 = $encode; + $tobool191 = ($152|0)!=(0); + $153 = $stereo$addr; + $tobool193 = ($153|0)!=(0); + $or$cond2 = $tobool191 & $tobool193; + if ($or$cond2) { + $154 = $itheta; + $cmp195 = ($154|0)==(0); + if ($cmp195) { + $155 = $m; + $156 = $X$addr; + $157 = $Y$addr; + $158 = $bandE; + $159 = $i; + $160 = $N$addr; + _intensity_stereo($155,$156,$157,$158,$159,$160); + break; + } else { + $161 = $X$addr; + $162 = $Y$addr; + $163 = $N$addr; + _stereo_split($161,$162,$163); + break; + } + } + } else { + $164 = $stereo$addr; + $tobool202 = ($164|0)!=(0); + if ($tobool202) { + $165 = $encode; + $tobool204 = ($165|0)!=(0); + if ($tobool204) { + $166 = $itheta; + $cmp206 = ($166|0)>(8192); + $conv207 = $cmp206&1; + $inv = $conv207; + $167 = $inv; + $tobool208 = ($167|0)!=(0); + L69: do { + if ($tobool208) { + $j = 0; + while(1) { + $168 = $j; + $169 = $N$addr; + $cmp210 = ($168|0)<($169|0); + if (!($cmp210)) { + break L69; + } + $170 = $Y$addr; + $171 = $j; + $arrayidx212 = (($170) + ($171<<2)|0); + $172 = +HEAPF32[$arrayidx212>>2]; + $sub213 = - $172; + $173 = $Y$addr; + $174 = $j; + $arrayidx214 = (($173) + ($174<<2)|0); + HEAPF32[$arrayidx214>>2] = $sub213; + $175 = $j; + $inc = (($175) + 1)|0; + $j = $inc; + } + } + } while(0); + $176 = $m; + $177 = $X$addr; + $178 = $Y$addr; + $179 = $bandE; + $180 = $i; + $181 = $N$addr; + _intensity_stereo($176,$177,$178,$179,$180,$181); + } + $182 = $b$addr; + $183 = HEAP32[$182>>2]|0; + $cmp217 = ($183|0)>(16); + do { + if ($cmp217) { + $184 = $ctx$addr; + $remaining_bits = ((($184)) + 28|0); + $185 = HEAP32[$remaining_bits>>2]|0; + $cmp220 = ($185|0)>(16); + if ($cmp220) { + $186 = $encode; + $tobool223 = ($186|0)!=(0); + $187 = $ec; + if ($tobool223) { + $188 = $inv; + _ec_enc_bit_logp($187,$188,2); + break; + } else { + $call226 = (_ec_dec_bit_logp($187,2)|0); + $inv = $call226; + break; + } + } else { + label = 60; + } + } else { + label = 60; + } + } while(0); + if ((label|0) == 60) { + $inv = 0; + } + $itheta = 0; + } + } + } while(0); + $189 = $ec; + $call232 = (_ec_tell_frac($189)|0); + $190 = $tell; + $sub233 = (($call232) - ($190))|0; + $qalloc = $sub233; + $191 = $qalloc; + $192 = $b$addr; + $193 = HEAP32[$192>>2]|0; + $sub234 = (($193) - ($191))|0; + HEAP32[$192>>2] = $sub234; + $194 = $itheta; + $cmp235 = ($194|0)==(0); + if ($cmp235) { + $imid = 32767; + $iside = 0; + $195 = $B$addr; + $shl = 1 << $195; + $sub238 = (($shl) - 1)|0; + $196 = $fill$addr; + $197 = HEAP32[$196>>2]|0; + $and = $197 & $sub238; + HEAP32[$196>>2] = $and; + $delta = -16384; + $208 = $inv; + $209 = $sctx$addr; + HEAP32[$209>>2] = $208; + $210 = $imid; + $211 = $sctx$addr; + $imid268 = ((($211)) + 4|0); + HEAP32[$imid268>>2] = $210; + $212 = $iside; + $213 = $sctx$addr; + $iside269 = ((($213)) + 8|0); + HEAP32[$iside269>>2] = $212; + $214 = $delta; + $215 = $sctx$addr; + $delta270 = ((($215)) + 12|0); + HEAP32[$delta270>>2] = $214; + $216 = $itheta; + $217 = $sctx$addr; + $itheta271 = ((($217)) + 16|0); + HEAP32[$itheta271>>2] = $216; + $218 = $qalloc; + $219 = $sctx$addr; + $qalloc272 = ((($219)) + 20|0); + HEAP32[$qalloc272>>2] = $218; + STACKTOP = sp;return; + } + $198 = $itheta; + $cmp240 = ($198|0)==(16384); + if ($cmp240) { + $imid = 0; + $iside = 32767; + $199 = $B$addr; + $shl243 = 1 << $199; + $sub244 = (($shl243) - 1)|0; + $200 = $B$addr; + $shl245 = $sub244 << $200; + $201 = $fill$addr; + $202 = HEAP32[$201>>2]|0; + $and246 = $202 & $shl245; + HEAP32[$201>>2] = $and246; + $delta = 16384; + $208 = $inv; + $209 = $sctx$addr; + HEAP32[$209>>2] = $208; + $210 = $imid; + $211 = $sctx$addr; + $imid268 = ((($211)) + 4|0); + HEAP32[$imid268>>2] = $210; + $212 = $iside; + $213 = $sctx$addr; + $iside269 = ((($213)) + 8|0); + HEAP32[$iside269>>2] = $212; + $214 = $delta; + $215 = $sctx$addr; + $delta270 = ((($215)) + 12|0); + HEAP32[$delta270>>2] = $214; + $216 = $itheta; + $217 = $sctx$addr; + $itheta271 = ((($217)) + 16|0); + HEAP32[$itheta271>>2] = $216; + $218 = $qalloc; + $219 = $sctx$addr; + $qalloc272 = ((($219)) + 20|0); + HEAP32[$qalloc272>>2] = $218; + STACKTOP = sp;return; + } else { + $203 = $itheta; + $conv248 = $203&65535; + $call249 = (_bitexact_cos($conv248)|0); + $conv250 = $call249 << 16 >> 16; + $imid = $conv250; + $204 = $itheta; + $sub251 = (16384 - ($204))|0; + $conv252 = $sub251&65535; + $call253 = (_bitexact_cos($conv252)|0); + $conv254 = $call253 << 16 >> 16; + $iside = $conv254; + $205 = $N$addr; + $sub255 = (($205) - 1)|0; + $shl256 = $sub255 << 7; + $conv257 = $shl256&65535; + $conv258 = $conv257 << 16 >> 16; + $206 = $iside; + $207 = $imid; + $call259 = (_bitexact_log2tan($206,$207)|0); + $conv260 = $call259&65535; + $conv261 = $conv260 << 16 >> 16; + $mul262 = Math_imul($conv258, $conv261)|0; + $add263 = (16384 + ($mul262))|0; + $shr264 = $add263 >> 15; + $delta = $shr264; + $208 = $inv; + $209 = $sctx$addr; + HEAP32[$209>>2] = $208; + $210 = $imid; + $211 = $sctx$addr; + $imid268 = ((($211)) + 4|0); + HEAP32[$imid268>>2] = $210; + $212 = $iside; + $213 = $sctx$addr; + $iside269 = ((($213)) + 8|0); + HEAP32[$iside269>>2] = $212; + $214 = $delta; + $215 = $sctx$addr; + $delta270 = ((($215)) + 12|0); + HEAP32[$delta270>>2] = $214; + $216 = $itheta; + $217 = $sctx$addr; + $itheta271 = ((($217)) + 16|0); + HEAP32[$itheta271>>2] = $216; + $218 = $qalloc; + $219 = $sctx$addr; + $qalloc272 = ((($219)) + 20|0); + HEAP32[$qalloc272>>2] = $218; + STACKTOP = sp;return; + } +} +function _stereo_merge($X,$Y,$mid,$N,$arch) { + $X = $X|0; + $Y = $Y|0; + $mid = +$mid; + $N = $N|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0; + var $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0; + var $45 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $El = 0.0, $Er = 0.0, $N$addr = 0, $X$addr = 0, $Y$addr = 0, $add = 0.0, $add10 = 0, $add23 = 0.0, $add4 = 0.0, $add6 = 0.0, $arch$addr = 0, $arrayidx = 0, $arrayidx19 = 0, $arrayidx22 = 0; + var $arrayidx25 = 0, $call = 0.0, $call13 = 0.0, $cmp = 0, $cmp16 = 0, $cmp7 = 0, $conv = 0.0, $conv11 = 0.0, $conv12 = 0.0, $conv14 = 0.0, $div = 0.0, $div15 = 0.0, $inc = 0, $j = 0, $l = 0.0, $lgain = 0.0, $mid$addr = 0.0, $mid2 = 0.0, $mul = 0.0, $mul1 = 0.0; + var $mul18 = 0.0, $mul2 = 0.0, $mul21 = 0.0, $mul24 = 0.0, $mul3 = 0.0, $mul5 = 0.0, $mul8 = 0, $mul9 = 0, $or$cond = 0, $r = 0.0, $rgain = 0.0, $side = 0, $sub = 0.0, $sub$ptr$div = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0, $sub20 = 0.0, $t = 0.0, $xp = 0; + var label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $xp = sp + 36|0; + $side = sp + 32|0; + $X$addr = $X; + $Y$addr = $Y; + $mid$addr = $mid; + $N$addr = $N; + $arch$addr = $arch; + HEAPF32[$xp>>2] = 0.0; + HEAPF32[$side>>2] = 0.0; + $0 = $Y$addr; + $1 = $X$addr; + $2 = $Y$addr; + $3 = $N$addr; + _dual_inner_prod_c_357($0,$1,$2,$3,$xp,$side); + $4 = $mid$addr; + $5 = +HEAPF32[$xp>>2]; + $mul = $4 * $5; + HEAPF32[$xp>>2] = $mul; + $6 = $mid$addr; + $mid2 = $6; + $7 = $mid2; + $8 = $mid2; + $mul1 = $7 * $8; + $9 = +HEAPF32[$side>>2]; + $add = $mul1 + $9; + $10 = +HEAPF32[$xp>>2]; + $mul2 = 2.0 * $10; + $sub = $add - $mul2; + $El = $sub; + $11 = $mid2; + $12 = $mid2; + $mul3 = $11 * $12; + $13 = +HEAPF32[$side>>2]; + $add4 = $mul3 + $13; + $14 = +HEAPF32[$xp>>2]; + $mul5 = 2.0 * $14; + $add6 = $add4 + $mul5; + $Er = $add6; + $15 = $Er; + $cmp = $15 < 6.0000002849847078E-4; + $16 = $El; + $cmp7 = $16 < 6.0000002849847078E-4; + $or$cond = $cmp | $cmp7; + if ($or$cond) { + $17 = $Y$addr; + $18 = $X$addr; + $19 = $N$addr; + $mul8 = $19<<2; + $20 = $Y$addr; + $21 = $X$addr; + $sub$ptr$lhs$cast = $20; + $sub$ptr$rhs$cast = $21; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $mul9 = 0; + $add10 = (($mul8) + ($mul9))|0; + _memcpy(($17|0),($18|0),($add10|0))|0; + STACKTOP = sp;return; + } + $22 = $El; + $t = $22; + $23 = $t; + $conv = $23; + $call = (+Math_sqrt((+$conv))); + $conv11 = $call; + $div = 1.0 / $conv11; + $lgain = $div; + $24 = $Er; + $t = $24; + $25 = $t; + $conv12 = $25; + $call13 = (+Math_sqrt((+$conv12))); + $conv14 = $call13; + $div15 = 1.0 / $conv14; + $rgain = $div15; + $j = 0; + while(1) { + $26 = $j; + $27 = $N$addr; + $cmp16 = ($26|0)<($27|0); + if (!($cmp16)) { + break; + } + $28 = $mid$addr; + $29 = $X$addr; + $30 = $j; + $arrayidx = (($29) + ($30<<2)|0); + $31 = +HEAPF32[$arrayidx>>2]; + $mul18 = $28 * $31; + $l = $mul18; + $32 = $Y$addr; + $33 = $j; + $arrayidx19 = (($32) + ($33<<2)|0); + $34 = +HEAPF32[$arrayidx19>>2]; + $r = $34; + $35 = $lgain; + $36 = $l; + $37 = $r; + $sub20 = $36 - $37; + $mul21 = $35 * $sub20; + $38 = $X$addr; + $39 = $j; + $arrayidx22 = (($38) + ($39<<2)|0); + HEAPF32[$arrayidx22>>2] = $mul21; + $40 = $rgain; + $41 = $l; + $42 = $r; + $add23 = $41 + $42; + $mul24 = $40 * $add23; + $43 = $Y$addr; + $44 = $j; + $arrayidx25 = (($43) + ($44<<2)|0); + HEAPF32[$arrayidx25>>2] = $mul24; + $45 = $j; + $inc = (($45) + 1)|0; + $j = $inc; + } + STACKTOP = sp;return; +} +function _dual_inner_prod_c_357($x,$y01,$y02,$N,$xy1,$xy2) { + $x = $x|0; + $y01 = $y01|0; + $y02 = $y02|0; + $N = $N|0; + $xy1 = $xy1|0; + $xy2 = $xy2|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0; + var $N$addr = 0, $add = 0.0, $add5 = 0.0, $arrayidx = 0, $arrayidx1 = 0, $arrayidx2 = 0, $arrayidx3 = 0, $cmp = 0, $i = 0, $inc = 0, $mul = 0.0, $mul4 = 0.0, $x$addr = 0, $xy01 = 0.0, $xy02 = 0.0, $xy1$addr = 0, $xy2$addr = 0, $y01$addr = 0, $y02$addr = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $x$addr = $x; + $y01$addr = $y01; + $y02$addr = $y02; + $N$addr = $N; + $xy1$addr = $xy1; + $xy2$addr = $xy2; + $xy01 = 0.0; + $xy02 = 0.0; + $i = 0; + while(1) { + $0 = $i; + $1 = $N$addr; + $cmp = ($0|0)<($1|0); + $2 = $xy01; + if (!($cmp)) { + break; + } + $3 = $x$addr; + $4 = $i; + $arrayidx = (($3) + ($4<<2)|0); + $5 = +HEAPF32[$arrayidx>>2]; + $6 = $y01$addr; + $7 = $i; + $arrayidx1 = (($6) + ($7<<2)|0); + $8 = +HEAPF32[$arrayidx1>>2]; + $mul = $5 * $8; + $add = $2 + $mul; + $xy01 = $add; + $9 = $xy02; + $10 = $x$addr; + $11 = $i; + $arrayidx2 = (($10) + ($11<<2)|0); + $12 = +HEAPF32[$arrayidx2>>2]; + $13 = $y02$addr; + $14 = $i; + $arrayidx3 = (($13) + ($14<<2)|0); + $15 = +HEAPF32[$arrayidx3>>2]; + $mul4 = $12 * $15; + $add5 = $9 + $mul4; + $xy02 = $add5; + $16 = $i; + $inc = (($16) + 1)|0; + $i = $inc; + } + $17 = $xy1$addr; + HEAPF32[$17>>2] = $2; + $18 = $xy02; + $19 = $xy2$addr; + HEAPF32[$19>>2] = $18; + STACKTOP = sp;return; +} +function _compute_qn($N,$b,$offset,$pulse_cap,$stereo) { + $N = $N|0; + $b = $b|0; + $offset = $offset|0; + $pulse_cap = $pulse_cap|0; + $stereo = $stereo|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + var $8 = 0, $9 = 0, $N$addr = 0, $N2 = 0, $add = 0, $add16 = 0, $and = 0, $arrayidx = 0, $b$addr = 0, $call = 0, $cmp = 0, $cmp12 = 0, $cmp4 = 0, $cmp7 = 0, $cond = 0, $cond11 = 0, $conv = 0, $dec = 0, $mul = 0, $mul1 = 0; + var $offset$addr = 0, $or$cond = 0, $pulse_cap$addr = 0, $qb = 0, $qn = 0, $shl = 0, $shr = 0, $shr15 = 0, $shr17 = 0, $stereo$addr = 0, $sub = 0, $sub14 = 0, $sub2 = 0, $sub3 = 0, $sub5 = 0, $sub6 = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $N$addr = $N; + $b$addr = $b; + $offset$addr = $offset; + $pulse_cap$addr = $pulse_cap; + $stereo$addr = $stereo; + $0 = $N$addr; + $mul = $0<<1; + $sub = (($mul) - 1)|0; + $N2 = $sub; + $1 = $stereo$addr; + $tobool = ($1|0)!=(0); + $2 = $N$addr; + $cmp = ($2|0)==(2); + $or$cond = $tobool & $cmp; + if ($or$cond) { + $3 = $N2; + $dec = (($3) + -1)|0; + $N2 = $dec; + } + $4 = $b$addr; + $5 = $N2; + $6 = $offset$addr; + $mul1 = Math_imul($5, $6)|0; + $add = (($4) + ($mul1))|0; + $7 = $N2; + $call = (_celt_sudiv($add,$7)|0); + $qb = $call; + $8 = $b$addr; + $9 = $pulse_cap$addr; + $sub2 = (($8) - ($9))|0; + $sub3 = (($sub2) - 32)|0; + $10 = $qb; + $cmp4 = ($sub3|0)<($10|0); + if ($cmp4) { + $11 = $b$addr; + $12 = $pulse_cap$addr; + $sub5 = (($11) - ($12))|0; + $sub6 = (($sub5) - 32)|0; + $cond = $sub6; + } else { + $13 = $qb; + $cond = $13; + } + $qb = $cond; + $14 = $qb; + $cmp7 = (64)<($14|0); + $15 = $qb; + $cond11 = $cmp7 ? 64 : $15; + $qb = $cond11; + $16 = $qb; + $cmp12 = ($16|0)<(4); + if ($cmp12) { + $qn = 1; + $21 = $qn; + STACKTOP = sp;return ($21|0); + } else { + $17 = $qb; + $and = $17 & 7; + $arrayidx = (20616 + ($and<<1)|0); + $18 = HEAP16[$arrayidx>>1]|0; + $conv = $18 << 16 >> 16; + $19 = $qb; + $shr = $19 >> 3; + $sub14 = (14 - ($shr))|0; + $shr15 = $conv >> $sub14; + $qn = $shr15; + $20 = $qn; + $add16 = (($20) + 1)|0; + $shr17 = $add16 >> 1; + $shl = $shr17 << 1; + $qn = $shl; + $21 = $qn; + STACKTOP = sp;return ($21|0); + } + return (0)|0; +} +function _intensity_stereo($m,$X,$Y,$bandE,$bandID,$N) { + $m = $m|0; + $X = $X|0; + $Y = $Y|0; + $bandE = $bandE|0; + $bandID = $bandID|0; + $N = $N|0; + var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0; + var $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, $N$addr = 0, $X$addr = 0, $Y$addr = 0, $a1 = 0.0, $a2 = 0.0, $add = 0, $add13 = 0.0, $add2 = 0.0; + var $add4 = 0.0, $add6 = 0.0, $arrayidx = 0, $arrayidx1 = 0, $arrayidx10 = 0, $arrayidx14 = 0, $arrayidx9 = 0, $bandE$addr = 0, $bandID$addr = 0, $call = 0.0, $cmp = 0, $conv = 0.0, $conv5 = 0.0, $div = 0.0, $div7 = 0.0, $i = 0, $inc = 0, $j = 0, $l = 0.0, $left = 0.0; + var $m$addr = 0, $mul = 0.0, $mul11 = 0.0, $mul12 = 0.0, $mul3 = 0.0, $nbEBands = 0, $norm = 0.0, $r = 0.0, $right = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $m$addr = $m; + $X$addr = $X; + $Y$addr = $Y; + $bandE$addr = $bandE; + $bandID$addr = $bandID; + $N$addr = $N; + $0 = $bandID$addr; + $i = $0; + $1 = $bandE$addr; + $2 = $i; + $arrayidx = (($1) + ($2<<2)|0); + $3 = +HEAPF32[$arrayidx>>2]; + $left = $3; + $4 = $bandE$addr; + $5 = $i; + $6 = $m$addr; + $nbEBands = ((($6)) + 8|0); + $7 = HEAP32[$nbEBands>>2]|0; + $add = (($5) + ($7))|0; + $arrayidx1 = (($4) + ($add<<2)|0); + $8 = +HEAPF32[$arrayidx1>>2]; + $right = $8; + $9 = $left; + $10 = $left; + $mul = $9 * $10; + $add2 = 1.0000000036274937E-15 + $mul; + $11 = $right; + $12 = $right; + $mul3 = $11 * $12; + $add4 = $add2 + $mul3; + $conv = $add4; + $call = (+Math_sqrt((+$conv))); + $conv5 = $call; + $add6 = 1.0000000036274937E-15 + $conv5; + $norm = $add6; + $13 = $left; + $14 = $norm; + $div = $13 / $14; + $a1 = $div; + $15 = $right; + $16 = $norm; + $div7 = $15 / $16; + $a2 = $div7; + $j = 0; + while(1) { + $17 = $j; + $18 = $N$addr; + $cmp = ($17|0)<($18|0); + if (!($cmp)) { + break; + } + $19 = $X$addr; + $20 = $j; + $arrayidx9 = (($19) + ($20<<2)|0); + $21 = +HEAPF32[$arrayidx9>>2]; + $l = $21; + $22 = $Y$addr; + $23 = $j; + $arrayidx10 = (($22) + ($23<<2)|0); + $24 = +HEAPF32[$arrayidx10>>2]; + $r = $24; + $25 = $a1; + $26 = $l; + $mul11 = $25 * $26; + $27 = $a2; + $28 = $r; + $mul12 = $27 * $28; + $add13 = $mul11 + $mul12; + $29 = $X$addr; + $30 = $j; + $arrayidx14 = (($29) + ($30<<2)|0); + HEAPF32[$arrayidx14>>2] = $add13; + $31 = $j; + $inc = (($31) + 1)|0; + $j = $inc; + } + STACKTOP = sp;return; +} +function _stereo_split($X,$Y,$N) { + $X = $X|0; + $Y = $Y|0; + $N = $N|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $N$addr = 0, $X$addr = 0, $Y$addr = 0; + var $add = 0.0, $arrayidx = 0, $arrayidx1 = 0, $arrayidx3 = 0, $arrayidx4 = 0, $cmp = 0, $inc = 0, $j = 0, $l = 0.0, $mul = 0.0, $mul2 = 0.0, $r = 0.0, $sub = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $X$addr = $X; + $Y$addr = $Y; + $N$addr = $N; + $j = 0; + while(1) { + $0 = $j; + $1 = $N$addr; + $cmp = ($0|0)<($1|0); + if (!($cmp)) { + break; + } + $2 = $X$addr; + $3 = $j; + $arrayidx = (($2) + ($3<<2)|0); + $4 = +HEAPF32[$arrayidx>>2]; + $mul = 0.70710676908493042 * $4; + $l = $mul; + $5 = $Y$addr; + $6 = $j; + $arrayidx1 = (($5) + ($6<<2)|0); + $7 = +HEAPF32[$arrayidx1>>2]; + $mul2 = 0.70710676908493042 * $7; + $r = $mul2; + $8 = $l; + $9 = $r; + $add = $8 + $9; + $10 = $X$addr; + $11 = $j; + $arrayidx3 = (($10) + ($11<<2)|0); + HEAPF32[$arrayidx3>>2] = $add; + $12 = $r; + $13 = $l; + $sub = $12 - $13; + $14 = $Y$addr; + $15 = $j; + $arrayidx4 = (($14) + ($15<<2)|0); + HEAPF32[$arrayidx4>>2] = $sub; + $16 = $j; + $inc = (($16) + 1)|0; + $j = $inc; + } + STACKTOP = sp;return; +} +function _bitexact_cos($x) { + $x = $x|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $add = 0, $add10 = 0, $add14 = 0, $add16 = 0, $add20 = 0, $add22 = 0, $add25 = 0, $add8 = 0, $conv = 0, $conv1 = 0, $conv11 = 0, $conv12 = 0; + var $conv17 = 0, $conv18 = 0, $conv2 = 0, $conv23 = 0, $conv24 = 0, $conv26 = 0, $conv3 = 0, $conv4 = 0, $conv5 = 0, $conv6 = 0, $mul = 0, $mul13 = 0, $mul19 = 0, $mul7 = 0, $shr = 0, $shr15 = 0, $shr21 = 0, $shr9 = 0, $sub = 0, $tmp = 0; + var $x$addr = 0, $x2 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $x$addr = $x; + $0 = $x$addr; + $conv = $0 << 16 >> 16; + $1 = $x$addr; + $conv1 = $1 << 16 >> 16; + $mul = Math_imul($conv, $conv1)|0; + $add = (4096 + ($mul))|0; + $shr = $add >> 13; + $tmp = $shr; + $2 = $tmp; + $conv2 = $2&65535; + $x2 = $conv2; + $3 = $x2; + $conv3 = $3 << 16 >> 16; + $sub = (32767 - ($conv3))|0; + $4 = $x2; + $conv4 = $4 << 16 >> 16; + $5 = $x2; + $conv5 = $5 << 16 >> 16; + $6 = $x2; + $conv6 = $6 << 16 >> 16; + $mul7 = Math_imul(-626, $conv6)|0; + $add8 = (16384 + ($mul7))|0; + $shr9 = $add8 >> 15; + $add10 = (8277 + ($shr9))|0; + $conv11 = $add10&65535; + $conv12 = $conv11 << 16 >> 16; + $mul13 = Math_imul($conv5, $conv12)|0; + $add14 = (16384 + ($mul13))|0; + $shr15 = $add14 >> 15; + $add16 = (-7651 + ($shr15))|0; + $conv17 = $add16&65535; + $conv18 = $conv17 << 16 >> 16; + $mul19 = Math_imul($conv4, $conv18)|0; + $add20 = (16384 + ($mul19))|0; + $shr21 = $add20 >> 15; + $add22 = (($sub) + ($shr21))|0; + $conv23 = $add22&65535; + $x2 = $conv23; + $7 = $x2; + $conv24 = $7 << 16 >> 16; + $add25 = (1 + ($conv24))|0; + $conv26 = $add25&65535; + STACKTOP = sp;return ($conv26|0); +} +function _bitexact_log2tan($isin,$icos) { + $isin = $isin|0; + $icos = $icos|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add10 = 0, $add14 = 0, $add16 = 0, $add22 = 0, $add24 = 0; + var $add28 = 0, $conv = 0, $conv11 = 0, $conv12 = 0, $conv17 = 0, $conv18 = 0, $conv19 = 0, $conv20 = 0, $conv25 = 0, $conv26 = 0, $conv6 = 0, $conv7 = 0, $conv8 = 0, $icos$addr = 0, $isin$addr = 0, $lc = 0, $ls = 0, $mul = 0, $mul13 = 0, $mul21 = 0; + var $mul27 = 0, $mul9 = 0, $shl = 0, $shl4 = 0, $shr = 0, $shr15 = 0, $shr23 = 0, $shr29 = 0, $sub = 0, $sub1 = 0, $sub2 = 0, $sub3 = 0, $sub30 = 0, $sub5 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $isin$addr = $isin; + $icos$addr = $icos; + $0 = $icos$addr; + $1 = (Math_clz32(($0|0))|0); + $sub = (32 - ($1))|0; + $lc = $sub; + $2 = $isin$addr; + $3 = (Math_clz32(($2|0))|0); + $sub1 = (32 - ($3))|0; + $ls = $sub1; + $4 = $lc; + $sub2 = (15 - ($4))|0; + $5 = $icos$addr; + $shl = $5 << $sub2; + $icos$addr = $shl; + $6 = $ls; + $sub3 = (15 - ($6))|0; + $7 = $isin$addr; + $shl4 = $7 << $sub3; + $isin$addr = $shl4; + $8 = $ls; + $9 = $lc; + $sub5 = (($8) - ($9))|0; + $mul = $sub5<<11; + $10 = $isin$addr; + $conv = $10&65535; + $conv6 = $conv << 16 >> 16; + $11 = $isin$addr; + $conv7 = $11&65535; + $conv8 = $conv7 << 16 >> 16; + $mul9 = Math_imul($conv8, -2597)|0; + $add = (16384 + ($mul9))|0; + $shr = $add >> 15; + $add10 = (($shr) + 7932)|0; + $conv11 = $add10&65535; + $conv12 = $conv11 << 16 >> 16; + $mul13 = Math_imul($conv6, $conv12)|0; + $add14 = (16384 + ($mul13))|0; + $shr15 = $add14 >> 15; + $add16 = (($mul) + ($shr15))|0; + $12 = $icos$addr; + $conv17 = $12&65535; + $conv18 = $conv17 << 16 >> 16; + $13 = $icos$addr; + $conv19 = $13&65535; + $conv20 = $conv19 << 16 >> 16; + $mul21 = Math_imul($conv20, -2597)|0; + $add22 = (16384 + ($mul21))|0; + $shr23 = $add22 >> 15; + $add24 = (($shr23) + 7932)|0; + $conv25 = $add24&65535; + $conv26 = $conv25 << 16 >> 16; + $mul27 = Math_imul($conv18, $conv26)|0; + $add28 = (16384 + ($mul27))|0; + $shr29 = $add28 >> 15; + $sub30 = (($add16) - ($shr29))|0; + STACKTOP = sp;return ($sub30|0); +} +function _deinterleave_hadamard($X,$N0,$stride,$hadamard) { + $X = $X|0; + $N0 = $N0|0; + $stride = $stride|0; + $hadamard = $hadamard|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + var $N = 0, $N0$addr = 0, $X$addr = 0, $add = 0, $add$ptr = 0, $add$ptr1 = 0, $add20 = 0, $add23 = 0, $add33 = 0, $add8 = 0, $arrayidx = 0, $arrayidx21 = 0, $arrayidx24 = 0, $arrayidx6 = 0, $arrayidx9 = 0, $cmp = 0, $cmp14 = 0, $cmp17 = 0, $cmp3 = 0, $hadamard$addr = 0; + var $i = 0, $inc = 0, $inc11 = 0, $inc26 = 0, $inc29 = 0, $j = 0, $mul = 0, $mul19 = 0, $mul22 = 0, $mul31 = 0, $mul32 = 0, $mul5 = 0, $mul7 = 0, $ordery = 0, $saved_stack = 0, $stride$addr = 0, $sub$ptr$div = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0; + var $tobool = 0, $vla = 0, $vla$alloca_mul = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $X$addr = $X; + $N0$addr = $N0; + $stride$addr = $stride; + $hadamard$addr = $hadamard; + $0 = $N0$addr; + $1 = $stride$addr; + $mul = Math_imul($0, $1)|0; + $N = $mul; + $2 = $N; + $3 = (_llvm_stacksave()|0); + $saved_stack = $3; + $vla$alloca_mul = $2<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $4 = $hadamard$addr; + $tobool = ($4|0)!=(0); + if ($tobool) { + $5 = $stride$addr; + $add$ptr = (12228 + ($5<<2)|0); + $add$ptr1 = ((($add$ptr)) + -8|0); + $ordery = $add$ptr1; + $i = 0; + while(1) { + $6 = $i; + $7 = $stride$addr; + $cmp = ($6|0)<($7|0); + if (!($cmp)) { + break; + } + $j = 0; + while(1) { + $8 = $j; + $9 = $N0$addr; + $cmp3 = ($8|0)<($9|0); + if (!($cmp3)) { + break; + } + $10 = $X$addr; + $11 = $j; + $12 = $stride$addr; + $mul5 = Math_imul($11, $12)|0; + $13 = $i; + $add = (($mul5) + ($13))|0; + $arrayidx = (($10) + ($add<<2)|0); + $14 = +HEAPF32[$arrayidx>>2]; + $15 = $ordery; + $16 = $i; + $arrayidx6 = (($15) + ($16<<2)|0); + $17 = HEAP32[$arrayidx6>>2]|0; + $18 = $N0$addr; + $mul7 = Math_imul($17, $18)|0; + $19 = $j; + $add8 = (($mul7) + ($19))|0; + $arrayidx9 = (($vla) + ($add8<<2)|0); + HEAPF32[$arrayidx9>>2] = $14; + $20 = $j; + $inc = (($20) + 1)|0; + $j = $inc; + } + $21 = $i; + $inc11 = (($21) + 1)|0; + $i = $inc11; + } + $36 = $X$addr; + $37 = $N; + $mul31 = $37<<2; + $38 = $X$addr; + $sub$ptr$lhs$cast = $38; + $sub$ptr$rhs$cast = $vla; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $mul32 = 0; + $add33 = (($mul31) + ($mul32))|0; + _memcpy(($36|0),($vla|0),($add33|0))|0; + $39 = $saved_stack; + _llvm_stackrestore(($39|0)); + STACKTOP = sp;return; + } else { + $i = 0; + while(1) { + $22 = $i; + $23 = $stride$addr; + $cmp14 = ($22|0)<($23|0); + if (!($cmp14)) { + break; + } + $j = 0; + while(1) { + $24 = $j; + $25 = $N0$addr; + $cmp17 = ($24|0)<($25|0); + if (!($cmp17)) { + break; + } + $26 = $X$addr; + $27 = $j; + $28 = $stride$addr; + $mul19 = Math_imul($27, $28)|0; + $29 = $i; + $add20 = (($mul19) + ($29))|0; + $arrayidx21 = (($26) + ($add20<<2)|0); + $30 = +HEAPF32[$arrayidx21>>2]; + $31 = $i; + $32 = $N0$addr; + $mul22 = Math_imul($31, $32)|0; + $33 = $j; + $add23 = (($mul22) + ($33))|0; + $arrayidx24 = (($vla) + ($add23<<2)|0); + HEAPF32[$arrayidx24>>2] = $30; + $34 = $j; + $inc26 = (($34) + 1)|0; + $j = $inc26; + } + $35 = $i; + $inc29 = (($35) + 1)|0; + $i = $inc29; + } + $36 = $X$addr; + $37 = $N; + $mul31 = $37<<2; + $38 = $X$addr; + $sub$ptr$lhs$cast = $38; + $sub$ptr$rhs$cast = $vla; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $mul32 = 0; + $add33 = (($mul31) + ($mul32))|0; + _memcpy(($36|0),($vla|0),($add33|0))|0; + $39 = $saved_stack; + _llvm_stackrestore(($39|0)); + STACKTOP = sp;return; + } +} +function _quant_partition($ctx,$X,$N,$b,$B,$lowband,$LM,$gain,$fill) { + $ctx = $ctx|0; + $X = $X|0; + $N = $N|0; + $b = $b|0; + $B = $B|0; + $lowband = $lowband|0; + $LM = $LM|0; + $gain = +$gain; + $fill = $fill|0; + var $$sink = 0, $$sink3 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0, $113 = 0; + var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0.0, $122 = 0.0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0; + var $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0; + var $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0; + var $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0.0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0; + var $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0; + var $204 = 0, $205 = 0, $206 = 0.0, $207 = 0, $208 = 0, $209 = 0.0, $21 = 0, $210 = 0.0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0.0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; + var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; + var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $96 = 0; + var $97 = 0, $98 = 0, $99 = 0, $B$addr = 0, $B0 = 0, $K = 0, $LM$addr = 0, $N$addr = 0, $X$addr = 0, $Y = 0, $add = 0, $add$ptr = 0, $add$ptr20 = 0, $add$ptr88 = 0, $add105 = 0, $add129 = 0, $add14 = 0, $add146 = 0, $add198 = 0.0, $add24 = 0; + var $add50 = 0, $add56 = 0, $add9 = 0, $and = 0, $and165 = 0, $and190 = 0, $and38 = 0, $arch = 0, $arrayidx = 0, $arrayidx12 = 0, $arrayidx180 = 0, $arrayidx197 = 0, $arrayidx199 = 0, $b$addr = 0, $bits = 0, $cache = 0, $cache7 = 0, $cache8 = 0, $call = 0, $call109 = 0; + var $call116 = 0, $call132 = 0, $call136 = 0, $call137 = 0, $call147 = 0, $call153 = 0, $call156 = 0, $call158 = 0, $call175 = 0, $call187 = 0, $cm = 0, $cm_mask = 0, $cmp = 0, $cmp101 = 0, $cmp122 = 0, $cmp125 = 0, $cmp141 = 0, $cmp143 = 0, $cmp15 = 0, $cmp150 = 0; + var $cmp170 = 0, $cmp173 = 0, $cmp18 = 0, $cmp183 = 0, $cmp21 = 0, $cmp35 = 0, $cmp41 = 0, $cmp51 = 0, $cmp60 = 0, $cmp68 = 0, $cmp74 = 0, $cmp91 = 0, $cmp98 = 0, $cond = 0, $cond196 = 0.0, $cond67 = 0, $cond83 = 0, $conv = 0, $conv13 = 0, $conv179 = 0.0; + var $conv31 = 0.0, $conv33 = 0.0, $ctx$addr = 0, $curr_bits = 0, $dec = 0, $delta = 0, $delta28 = 0, $div = 0, $div65 = 0, $div73 = 0, $div79 = 0, $ec = 0, $ec6 = 0, $encode1 = 0, $fill$addr = 0, $gain$addr = 0.0, $i = 0, $i4 = 0, $idxprom = 0, $imid = 0; + var $imid26 = 0, $inc = 0, $inc201 = 0, $index = 0, $iside = 0, $iside27 = 0, $itheta = 0, $itheta29 = 0, $j = 0, $lnot = 0, $lnot$ext = 0, $lowband$addr = 0, $m = 0, $m3 = 0, $mbits = 0, $mid = 0.0, $mul = 0, $mul107 = 0.0, $mul114 = 0.0, $mul131 = 0.0; + var $mul168 = 0, $mul32 = 0.0, $mul34 = 0.0, $mul94 = 0.0, $nbEBands = 0, $next_lowband2 = 0, $or = 0, $or$cond = 0, $or$cond1 = 0, $or$cond2 = 0, $or112 = 0, $or133 = 0, $q = 0, $qalloc = 0, $qalloc30 = 0, $rebalance = 0, $remaining_bits = 0, $remaining_bits119 = 0, $remaining_bits140 = 0, $remaining_bits145 = 0; + var $remaining_bits148 = 0, $remaining_bits90 = 0, $remaining_bits95 = 0, $resynth = 0, $sbits = 0, $sctx = 0, $seed = 0, $seed176 = 0, $seed177 = 0, $seed186 = 0, $seed188 = 0, $seed189 = 0, $shl = 0, $shl111 = 0, $shl118 = 0, $shl163 = 0, $shl47 = 0, $shl53 = 0, $shr = 0, $shr108 = 0; + var $shr110 = 0, $shr115 = 0, $shr117 = 0, $shr178 = 0, $shr25 = 0, $shr45 = 0, $shr49 = 0, $shr55 = 0, $side = 0.0, $spread = 0, $spread5 = 0, $sub = 0, $sub104 = 0, $sub120 = 0, $sub121 = 0, $sub128 = 0, $sub149 = 0, $sub164 = 0, $sub194 = 0.0, $sub44 = 0; + var $sub46 = 0, $sub48 = 0, $sub54 = 0, $sub59 = 0, $sub64 = 0, $sub72 = 0, $sub78 = 0, $sub84 = 0, $sub85 = 0, $sub96 = 0, $sub97 = 0, $tmp = 0.0, $tobool = 0, $tobool154 = 0, $tobool161 = 0, $tobool166 = 0, $tobool191 = 0, $tobool39 = 0, $tobool86 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 176|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(176|0); + $b$addr = sp + 152|0; + $fill$addr = sp + 132|0; + $sctx = sp + 24|0; + $ctx$addr = $ctx; + $X$addr = $X; + $N$addr = $N; + HEAP32[$b$addr>>2] = $b; + $B$addr = $B; + $lowband$addr = $lowband; + $LM$addr = $LM; + $gain$addr = $gain; + HEAP32[$fill$addr>>2] = $fill; + $imid = 0; + $iside = 0; + $0 = $B$addr; + $B0 = $0; + $mid = 0.0; + $side = 0.0; + $cm = 0; + $1 = $ctx$addr; + $2 = HEAP32[$1>>2]|0; + $tobool = ($2|0)!=(0); + $lnot = $tobool ^ 1; + $lnot$ext = $lnot&1; + $resynth = $lnot$ext; + $Y = 0; + $3 = $ctx$addr; + $4 = HEAP32[$3>>2]|0; + $encode1 = $4; + $5 = $ctx$addr; + $m3 = ((($5)) + 4|0); + $6 = HEAP32[$m3>>2]|0; + $m = $6; + $7 = $ctx$addr; + $i4 = ((($7)) + 8|0); + $8 = HEAP32[$i4>>2]|0; + $i = $8; + $9 = $ctx$addr; + $spread5 = ((($9)) + 16|0); + $10 = HEAP32[$spread5>>2]|0; + $spread = $10; + $11 = $ctx$addr; + $ec6 = ((($11)) + 24|0); + $12 = HEAP32[$ec6>>2]|0; + $ec = $12; + $13 = $m; + $cache7 = ((($13)) + 92|0); + $bits = ((($cache7)) + 8|0); + $14 = HEAP32[$bits>>2]|0; + $15 = $m; + $cache8 = ((($15)) + 92|0); + $index = ((($cache8)) + 4|0); + $16 = HEAP32[$index>>2]|0; + $17 = $LM$addr; + $add = (($17) + 1)|0; + $18 = $m; + $nbEBands = ((($18)) + 8|0); + $19 = HEAP32[$nbEBands>>2]|0; + $mul = Math_imul($add, $19)|0; + $20 = $i; + $add9 = (($mul) + ($20))|0; + $arrayidx = (($16) + ($add9<<1)|0); + $21 = HEAP16[$arrayidx>>1]|0; + $conv = $21 << 16 >> 16; + $add$ptr = (($14) + ($conv)|0); + $cache = $add$ptr; + $22 = $LM$addr; + $cmp = ($22|0)!=(-1); + if ($cmp) { + $23 = HEAP32[$b$addr>>2]|0; + $24 = $cache; + $25 = $cache; + $26 = HEAP8[$25>>0]|0; + $idxprom = $26&255; + $arrayidx12 = (($24) + ($idxprom)|0); + $27 = HEAP8[$arrayidx12>>0]|0; + $conv13 = $27&255; + $add14 = (($conv13) + 12)|0; + $cmp15 = ($23|0)>($add14|0); + $28 = $N$addr; + $cmp18 = ($28|0)>(2); + $or$cond = $cmp15 & $cmp18; + if ($or$cond) { + $next_lowband2 = 0; + $29 = $N$addr; + $shr = $29 >> 1; + $N$addr = $shr; + $30 = $X$addr; + $31 = $N$addr; + $add$ptr20 = (($30) + ($31<<2)|0); + $Y = $add$ptr20; + $32 = $LM$addr; + $sub = (($32) - 1)|0; + $LM$addr = $sub; + $33 = $B$addr; + $cmp21 = ($33|0)==(1); + if ($cmp21) { + $34 = HEAP32[$fill$addr>>2]|0; + $and = $34 & 1; + $35 = HEAP32[$fill$addr>>2]|0; + $shl = $35 << 1; + $or = $and | $shl; + HEAP32[$fill$addr>>2] = $or; + } + $36 = $B$addr; + $add24 = (($36) + 1)|0; + $shr25 = $add24 >> 1; + $B$addr = $shr25; + $37 = $ctx$addr; + $38 = $X$addr; + $39 = $Y; + $40 = $N$addr; + $41 = $B$addr; + $42 = $B0; + $43 = $LM$addr; + _compute_theta($37,$sctx,$38,$39,$40,$b$addr,$41,$42,$43,0,$fill$addr); + $imid26 = ((($sctx)) + 4|0); + $44 = HEAP32[$imid26>>2]|0; + $imid = $44; + $iside27 = ((($sctx)) + 8|0); + $45 = HEAP32[$iside27>>2]|0; + $iside = $45; + $delta28 = ((($sctx)) + 12|0); + $46 = HEAP32[$delta28>>2]|0; + $delta = $46; + $itheta29 = ((($sctx)) + 16|0); + $47 = HEAP32[$itheta29>>2]|0; + $itheta = $47; + $qalloc30 = ((($sctx)) + 20|0); + $48 = HEAP32[$qalloc30>>2]|0; + $qalloc = $48; + $49 = $imid; + $conv31 = (+($49|0)); + $mul32 = 3.0517578125E-5 * $conv31; + $mid = $mul32; + $50 = $iside; + $conv33 = (+($50|0)); + $mul34 = 3.0517578125E-5 * $conv33; + $side = $mul34; + $51 = $B0; + $cmp35 = ($51|0)>(1); + do { + if ($cmp35) { + $52 = $itheta; + $and38 = $52 & 16383; + $tobool39 = ($and38|0)!=(0); + if ($tobool39) { + $53 = $itheta; + $cmp41 = ($53|0)>(8192); + $54 = $delta; + if ($cmp41) { + $55 = $LM$addr; + $sub44 = (4 - ($55))|0; + $shr45 = $54 >> $sub44; + $56 = $delta; + $sub46 = (($56) - ($shr45))|0; + $delta = $sub46; + break; + } + $57 = $N$addr; + $shl47 = $57 << 3; + $58 = $LM$addr; + $sub48 = (5 - ($58))|0; + $shr49 = $shl47 >> $sub48; + $add50 = (($54) + ($shr49))|0; + $cmp51 = (0)<($add50|0); + if ($cmp51) { + $cond = 0; + } else { + $59 = $delta; + $60 = $N$addr; + $shl53 = $60 << 3; + $61 = $LM$addr; + $sub54 = (5 - ($61))|0; + $shr55 = $shl53 >> $sub54; + $add56 = (($59) + ($shr55))|0; + $cond = $add56; + } + $delta = $cond; + } + } + } while(0); + $62 = HEAP32[$b$addr>>2]|0; + $63 = HEAP32[$b$addr>>2]|0; + $64 = $delta; + $sub59 = (($63) - ($64))|0; + $div = (($sub59|0) / 2)&-1; + $cmp60 = ($62|0)<($div|0); + $65 = HEAP32[$b$addr>>2]|0; + if ($cmp60) { + $cond67 = $65; + } else { + $66 = $delta; + $sub64 = (($65) - ($66))|0; + $div65 = (($sub64|0) / 2)&-1; + $cond67 = $div65; + } + $cmp68 = (0)>($cond67|0); + if ($cmp68) { + $cond83 = 0; + } else { + $67 = HEAP32[$b$addr>>2]|0; + $68 = HEAP32[$b$addr>>2]|0; + $69 = $delta; + $sub72 = (($68) - ($69))|0; + $div73 = (($sub72|0) / 2)&-1; + $cmp74 = ($67|0)<($div73|0); + $70 = HEAP32[$b$addr>>2]|0; + if ($cmp74) { + $cond83 = $70; + } else { + $71 = $delta; + $sub78 = (($70) - ($71))|0; + $div79 = (($sub78|0) / 2)&-1; + $cond83 = $div79; + } + } + $mbits = $cond83; + $72 = HEAP32[$b$addr>>2]|0; + $73 = $mbits; + $sub84 = (($72) - ($73))|0; + $sbits = $sub84; + $74 = $qalloc; + $75 = $ctx$addr; + $remaining_bits = ((($75)) + 28|0); + $76 = HEAP32[$remaining_bits>>2]|0; + $sub85 = (($76) - ($74))|0; + HEAP32[$remaining_bits>>2] = $sub85; + $77 = $lowband$addr; + $tobool86 = ($77|0)!=(0|0); + if ($tobool86) { + $78 = $lowband$addr; + $79 = $N$addr; + $add$ptr88 = (($78) + ($79<<2)|0); + $next_lowband2 = $add$ptr88; + } + $80 = $ctx$addr; + $remaining_bits90 = ((($80)) + 28|0); + $81 = HEAP32[$remaining_bits90>>2]|0; + $rebalance = $81; + $82 = $mbits; + $83 = $sbits; + $cmp91 = ($82|0)>=($83|0); + $84 = $ctx$addr; + if ($cmp91) { + $85 = $X$addr; + $86 = $N$addr; + $87 = $mbits; + $88 = $B$addr; + $89 = $lowband$addr; + $90 = $LM$addr; + $91 = $gain$addr; + $92 = $mid; + $mul94 = $91 * $92; + $93 = HEAP32[$fill$addr>>2]|0; + $call = (_quant_partition($84,$85,$86,$87,$88,$89,$90,$mul94,$93)|0); + $cm = $call; + $94 = $mbits; + $95 = $rebalance; + $96 = $ctx$addr; + $remaining_bits95 = ((($96)) + 28|0); + $97 = HEAP32[$remaining_bits95>>2]|0; + $sub96 = (($95) - ($97))|0; + $sub97 = (($94) - ($sub96))|0; + $rebalance = $sub97; + $98 = $rebalance; + $cmp98 = ($98|0)>(24); + $99 = $itheta; + $cmp101 = ($99|0)!=(0); + $or$cond1 = $cmp98 & $cmp101; + if ($or$cond1) { + $100 = $rebalance; + $sub104 = (($100) - 24)|0; + $101 = $sbits; + $add105 = (($101) + ($sub104))|0; + $sbits = $add105; + } + $102 = $ctx$addr; + $103 = $Y; + $104 = $N$addr; + $105 = $sbits; + $106 = $B$addr; + $107 = $next_lowband2; + $108 = $LM$addr; + $109 = $gain$addr; + $110 = $side; + $mul107 = $109 * $110; + $111 = HEAP32[$fill$addr>>2]|0; + $112 = $B$addr; + $shr108 = $111 >> $112; + $call109 = (_quant_partition($102,$103,$104,$105,$106,$107,$108,$mul107,$shr108)|0); + $113 = $B0; + $shr110 = $113 >> 1; + $shl111 = $call109 << $shr110; + $114 = $cm; + $or112 = $114 | $shl111; + $cm = $or112; + $220 = $cm; + STACKTOP = sp;return ($220|0); + } else { + $115 = $Y; + $116 = $N$addr; + $117 = $sbits; + $118 = $B$addr; + $119 = $next_lowband2; + $120 = $LM$addr; + $121 = $gain$addr; + $122 = $side; + $mul114 = $121 * $122; + $123 = HEAP32[$fill$addr>>2]|0; + $124 = $B$addr; + $shr115 = $123 >> $124; + $call116 = (_quant_partition($84,$115,$116,$117,$118,$119,$120,$mul114,$shr115)|0); + $125 = $B0; + $shr117 = $125 >> 1; + $shl118 = $call116 << $shr117; + $cm = $shl118; + $126 = $sbits; + $127 = $rebalance; + $128 = $ctx$addr; + $remaining_bits119 = ((($128)) + 28|0); + $129 = HEAP32[$remaining_bits119>>2]|0; + $sub120 = (($127) - ($129))|0; + $sub121 = (($126) - ($sub120))|0; + $rebalance = $sub121; + $130 = $rebalance; + $cmp122 = ($130|0)>(24); + $131 = $itheta; + $cmp125 = ($131|0)!=(16384); + $or$cond2 = $cmp122 & $cmp125; + if ($or$cond2) { + $132 = $rebalance; + $sub128 = (($132) - 24)|0; + $133 = $mbits; + $add129 = (($133) + ($sub128))|0; + $mbits = $add129; + } + $134 = $ctx$addr; + $135 = $X$addr; + $136 = $N$addr; + $137 = $mbits; + $138 = $B$addr; + $139 = $lowband$addr; + $140 = $LM$addr; + $141 = $gain$addr; + $142 = $mid; + $mul131 = $141 * $142; + $143 = HEAP32[$fill$addr>>2]|0; + $call132 = (_quant_partition($134,$135,$136,$137,$138,$139,$140,$mul131,$143)|0); + $144 = $cm; + $or133 = $144 | $call132; + $cm = $or133; + $220 = $cm; + STACKTOP = sp;return ($220|0); + } + } + } + $145 = $m; + $146 = $i; + $147 = $LM$addr; + $148 = HEAP32[$b$addr>>2]|0; + $call136 = (_bits2pulses($145,$146,$147,$148)|0); + $q = $call136; + $149 = $m; + $150 = $i; + $151 = $LM$addr; + $152 = $q; + $call137 = (_pulses2bits($149,$150,$151,$152)|0); + $curr_bits = $call137; + $153 = $curr_bits; + $154 = $ctx$addr; + $$sink = $154;$$sink3 = $153; + while(1) { + $remaining_bits148 = ((($$sink)) + 28|0); + $155 = HEAP32[$remaining_bits148>>2]|0; + $sub149 = (($155) - ($$sink3))|0; + HEAP32[$remaining_bits148>>2] = $sub149; + $156 = $ctx$addr; + $remaining_bits140 = ((($156)) + 28|0); + $157 = HEAP32[$remaining_bits140>>2]|0; + $cmp141 = ($157|0)<(0); + $158 = $q; + $cmp143 = ($158|0)>(0); + $159 = $cmp141 ? $cmp143 : 0; + if (!($159)) { + break; + } + $160 = $curr_bits; + $161 = $ctx$addr; + $remaining_bits145 = ((($161)) + 28|0); + $162 = HEAP32[$remaining_bits145>>2]|0; + $add146 = (($162) + ($160))|0; + HEAP32[$remaining_bits145>>2] = $add146; + $163 = $q; + $dec = (($163) + -1)|0; + $q = $dec; + $164 = $m; + $165 = $i; + $166 = $LM$addr; + $167 = $q; + $call147 = (_pulses2bits($164,$165,$166,$167)|0); + $curr_bits = $call147; + $168 = $curr_bits; + $169 = $ctx$addr; + $$sink = $169;$$sink3 = $168; + } + $170 = $q; + $cmp150 = ($170|0)!=(0); + if ($cmp150) { + $171 = $q; + $call153 = (_get_pulses($171)|0); + $K = $call153; + $172 = $encode1; + $tobool154 = ($172|0)!=(0); + $173 = $X$addr; + $174 = $N$addr; + $175 = $K; + $176 = $spread; + $177 = $B$addr; + $178 = $ec; + if ($tobool154) { + $call156 = (_alg_quant($173,$174,$175,$176,$177,$178)|0); + $cm = $call156; + $220 = $cm; + STACKTOP = sp;return ($220|0); + } else { + $179 = $gain$addr; + $call158 = (_alg_unquant($173,$174,$175,$176,$177,$178,$179)|0); + $cm = $call158; + $220 = $cm; + STACKTOP = sp;return ($220|0); + } + } + $180 = $resynth; + $tobool161 = ($180|0)!=(0); + if (!($tobool161)) { + $220 = $cm; + STACKTOP = sp;return ($220|0); + } + $181 = $B$addr; + $shl163 = 1 << $181; + $sub164 = (($shl163) - 1)|0; + $cm_mask = $sub164; + $182 = $cm_mask; + $183 = HEAP32[$fill$addr>>2]|0; + $and165 = $183 & $182; + HEAP32[$fill$addr>>2] = $and165; + $184 = HEAP32[$fill$addr>>2]|0; + $tobool166 = ($184|0)!=(0); + if (!($tobool166)) { + $185 = $X$addr; + $186 = $N$addr; + $mul168 = $186<<2; + _memset(($185|0),0,($mul168|0))|0; + $220 = $cm; + STACKTOP = sp;return ($220|0); + } + $187 = $lowband$addr; + $cmp170 = ($187|0)==(0|0); + $j = 0; + if ($cmp170) { + while(1) { + $188 = $j; + $189 = $N$addr; + $cmp173 = ($188|0)<($189|0); + if (!($cmp173)) { + break; + } + $190 = $ctx$addr; + $seed = ((($190)) + 36|0); + $191 = HEAP32[$seed>>2]|0; + $call175 = (_celt_lcg_rand($191)|0); + $192 = $ctx$addr; + $seed176 = ((($192)) + 36|0); + HEAP32[$seed176>>2] = $call175; + $193 = $ctx$addr; + $seed177 = ((($193)) + 36|0); + $194 = HEAP32[$seed177>>2]|0; + $shr178 = $194 >> 20; + $conv179 = (+($shr178|0)); + $195 = $X$addr; + $196 = $j; + $arrayidx180 = (($195) + ($196<<2)|0); + HEAPF32[$arrayidx180>>2] = $conv179; + $197 = $j; + $inc = (($197) + 1)|0; + $j = $inc; + } + $198 = $cm_mask; + $cm = $198; + } else { + while(1) { + $199 = $j; + $200 = $N$addr; + $cmp183 = ($199|0)<($200|0); + if (!($cmp183)) { + break; + } + $201 = $ctx$addr; + $seed186 = ((($201)) + 36|0); + $202 = HEAP32[$seed186>>2]|0; + $call187 = (_celt_lcg_rand($202)|0); + $203 = $ctx$addr; + $seed188 = ((($203)) + 36|0); + HEAP32[$seed188>>2] = $call187; + $tmp = 0.00390625; + $204 = $ctx$addr; + $seed189 = ((($204)) + 36|0); + $205 = HEAP32[$seed189>>2]|0; + $and190 = $205 & 32768; + $tobool191 = ($and190|0)!=(0); + $206 = $tmp; + $sub194 = - $206; + $cond196 = $tobool191 ? $206 : $sub194; + $tmp = $cond196; + $207 = $lowband$addr; + $208 = $j; + $arrayidx197 = (($207) + ($208<<2)|0); + $209 = +HEAPF32[$arrayidx197>>2]; + $210 = $tmp; + $add198 = $209 + $210; + $211 = $X$addr; + $212 = $j; + $arrayidx199 = (($211) + ($212<<2)|0); + HEAPF32[$arrayidx199>>2] = $add198; + $213 = $j; + $inc201 = (($213) + 1)|0; + $j = $inc201; + } + $214 = HEAP32[$fill$addr>>2]|0; + $cm = $214; + } + $215 = $X$addr; + $216 = $N$addr; + $217 = $gain$addr; + $218 = $ctx$addr; + $arch = ((($218)) + 40|0); + $219 = HEAP32[$arch>>2]|0; + _renormalise_vector($215,$216,$217,$219); + $220 = $cm; + STACKTOP = sp;return ($220|0); +} +function _interleave_hadamard($X,$N0,$stride,$hadamard) { + $X = $X|0; + $N0 = $N0|0; + $stride = $stride|0; + $hadamard = $hadamard|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + var $N = 0, $N0$addr = 0, $X$addr = 0, $add = 0, $add$ptr = 0, $add$ptr1 = 0, $add20 = 0, $add23 = 0, $add33 = 0, $add8 = 0, $arrayidx = 0, $arrayidx21 = 0, $arrayidx24 = 0, $arrayidx6 = 0, $arrayidx9 = 0, $cmp = 0, $cmp14 = 0, $cmp17 = 0, $cmp3 = 0, $hadamard$addr = 0; + var $i = 0, $inc = 0, $inc11 = 0, $inc26 = 0, $inc29 = 0, $j = 0, $mul = 0, $mul19 = 0, $mul22 = 0, $mul31 = 0, $mul32 = 0, $mul5 = 0, $mul7 = 0, $ordery = 0, $saved_stack = 0, $stride$addr = 0, $sub$ptr$div = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0; + var $tobool = 0, $vla = 0, $vla$alloca_mul = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $X$addr = $X; + $N0$addr = $N0; + $stride$addr = $stride; + $hadamard$addr = $hadamard; + $0 = $N0$addr; + $1 = $stride$addr; + $mul = Math_imul($0, $1)|0; + $N = $mul; + $2 = $N; + $3 = (_llvm_stacksave()|0); + $saved_stack = $3; + $vla$alloca_mul = $2<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $4 = $hadamard$addr; + $tobool = ($4|0)!=(0); + if ($tobool) { + $5 = $stride$addr; + $add$ptr = (12228 + ($5<<2)|0); + $add$ptr1 = ((($add$ptr)) + -8|0); + $ordery = $add$ptr1; + $i = 0; + while(1) { + $6 = $i; + $7 = $stride$addr; + $cmp = ($6|0)<($7|0); + if (!($cmp)) { + break; + } + $j = 0; + while(1) { + $8 = $j; + $9 = $N0$addr; + $cmp3 = ($8|0)<($9|0); + if (!($cmp3)) { + break; + } + $10 = $X$addr; + $11 = $ordery; + $12 = $i; + $arrayidx = (($11) + ($12<<2)|0); + $13 = HEAP32[$arrayidx>>2]|0; + $14 = $N0$addr; + $mul5 = Math_imul($13, $14)|0; + $15 = $j; + $add = (($mul5) + ($15))|0; + $arrayidx6 = (($10) + ($add<<2)|0); + $16 = +HEAPF32[$arrayidx6>>2]; + $17 = $j; + $18 = $stride$addr; + $mul7 = Math_imul($17, $18)|0; + $19 = $i; + $add8 = (($mul7) + ($19))|0; + $arrayidx9 = (($vla) + ($add8<<2)|0); + HEAPF32[$arrayidx9>>2] = $16; + $20 = $j; + $inc = (($20) + 1)|0; + $j = $inc; + } + $21 = $i; + $inc11 = (($21) + 1)|0; + $i = $inc11; + } + $36 = $X$addr; + $37 = $N; + $mul31 = $37<<2; + $38 = $X$addr; + $sub$ptr$lhs$cast = $38; + $sub$ptr$rhs$cast = $vla; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $mul32 = 0; + $add33 = (($mul31) + ($mul32))|0; + _memcpy(($36|0),($vla|0),($add33|0))|0; + $39 = $saved_stack; + _llvm_stackrestore(($39|0)); + STACKTOP = sp;return; + } else { + $i = 0; + while(1) { + $22 = $i; + $23 = $stride$addr; + $cmp14 = ($22|0)<($23|0); + if (!($cmp14)) { + break; + } + $j = 0; + while(1) { + $24 = $j; + $25 = $N0$addr; + $cmp17 = ($24|0)<($25|0); + if (!($cmp17)) { + break; + } + $26 = $X$addr; + $27 = $i; + $28 = $N0$addr; + $mul19 = Math_imul($27, $28)|0; + $29 = $j; + $add20 = (($mul19) + ($29))|0; + $arrayidx21 = (($26) + ($add20<<2)|0); + $30 = +HEAPF32[$arrayidx21>>2]; + $31 = $j; + $32 = $stride$addr; + $mul22 = Math_imul($31, $32)|0; + $33 = $i; + $add23 = (($mul22) + ($33))|0; + $arrayidx24 = (($vla) + ($add23<<2)|0); + HEAPF32[$arrayidx24>>2] = $30; + $34 = $j; + $inc26 = (($34) + 1)|0; + $j = $inc26; + } + $35 = $i; + $inc29 = (($35) + 1)|0; + $i = $inc29; + } + $36 = $X$addr; + $37 = $N; + $mul31 = $37<<2; + $38 = $X$addr; + $sub$ptr$lhs$cast = $38; + $sub$ptr$rhs$cast = $vla; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $mul32 = 0; + $add33 = (($mul31) + ($mul32))|0; + _memcpy(($36|0),($vla|0),($add33|0))|0; + $39 = $saved_stack; + _llvm_stackrestore(($39|0)); + STACKTOP = sp;return; + } +} +function _bits2pulses($m,$band,$LM,$bits) { + $m = $m|0; + $band = $band|0; + $LM = $LM|0; + $bits = $bits|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $LM$addr = 0, $add = 0, $add$ptr = 0, $add7 = 0, $add8 = 0, $arrayidx = 0; + var $arrayidx16 = 0, $arrayidx18 = 0, $arrayidx9 = 0, $band$addr = 0, $bits$addr = 0, $bits2 = 0, $cache = 0, $cache1 = 0, $cache3 = 0, $cmp = 0, $cmp11 = 0, $cmp14 = 0, $cmp21 = 0, $cond = 0, $conv = 0, $conv10 = 0, $conv17 = 0, $conv19 = 0, $conv5 = 0, $dec = 0; + var $hi = 0, $i = 0, $inc = 0, $inc13 = 0, $index = 0, $lo = 0, $m$addr = 0, $mid = 0, $mul = 0, $nbEBands = 0, $retval = 0, $shr = 0, $sub = 0, $sub20 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $m$addr = $m; + $band$addr = $band; + $LM$addr = $LM; + $bits$addr = $bits; + $0 = $LM$addr; + $inc = (($0) + 1)|0; + $LM$addr = $inc; + $1 = $m$addr; + $cache1 = ((($1)) + 92|0); + $bits2 = ((($cache1)) + 8|0); + $2 = HEAP32[$bits2>>2]|0; + $3 = $m$addr; + $cache3 = ((($3)) + 92|0); + $index = ((($cache3)) + 4|0); + $4 = HEAP32[$index>>2]|0; + $5 = $LM$addr; + $6 = $m$addr; + $nbEBands = ((($6)) + 8|0); + $7 = HEAP32[$nbEBands>>2]|0; + $mul = Math_imul($5, $7)|0; + $8 = $band$addr; + $add = (($mul) + ($8))|0; + $arrayidx = (($4) + ($add<<1)|0); + $9 = HEAP16[$arrayidx>>1]|0; + $conv = $9 << 16 >> 16; + $add$ptr = (($2) + ($conv)|0); + $cache = $add$ptr; + $lo = 0; + $10 = $cache; + $11 = HEAP8[$10>>0]|0; + $conv5 = $11&255; + $hi = $conv5; + $12 = $bits$addr; + $dec = (($12) + -1)|0; + $bits$addr = $dec; + $i = 0; + while(1) { + $13 = $i; + $cmp = ($13|0)<(6); + if (!($cmp)) { + break; + } + $14 = $lo; + $15 = $hi; + $add7 = (($14) + ($15))|0; + $add8 = (($add7) + 1)|0; + $shr = $add8 >> 1; + $mid = $shr; + $16 = $cache; + $17 = $mid; + $arrayidx9 = (($16) + ($17)|0); + $18 = HEAP8[$arrayidx9>>0]|0; + $conv10 = $18&255; + $19 = $bits$addr; + $cmp11 = ($conv10|0)>=($19|0); + $20 = $mid; + if ($cmp11) { + $hi = $20; + } else { + $lo = $20; + } + $21 = $i; + $inc13 = (($21) + 1)|0; + $i = $inc13; + } + $22 = $bits$addr; + $23 = $lo; + $cmp14 = ($23|0)==(0); + if ($cmp14) { + $cond = -1; + } else { + $24 = $cache; + $25 = $lo; + $arrayidx16 = (($24) + ($25)|0); + $26 = HEAP8[$arrayidx16>>0]|0; + $conv17 = $26&255; + $cond = $conv17; + } + $sub = (($22) - ($cond))|0; + $27 = $cache; + $28 = $hi; + $arrayidx18 = (($27) + ($28)|0); + $29 = HEAP8[$arrayidx18>>0]|0; + $conv19 = $29&255; + $30 = $bits$addr; + $sub20 = (($conv19) - ($30))|0; + $cmp21 = ($sub|0)<=($sub20|0); + if ($cmp21) { + $31 = $lo; + $retval = $31; + $33 = $retval; + STACKTOP = sp;return ($33|0); + } else { + $32 = $hi; + $retval = $32; + $33 = $retval; + STACKTOP = sp;return ($33|0); + } + return (0)|0; +} +function _pulses2bits($m,$band,$LM,$pulses) { + $m = $m|0; + $band = $band|0; + $LM = $LM|0; + $pulses = $pulses|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $LM$addr = 0, $add = 0, $add$ptr = 0, $add6 = 0, $arrayidx = 0, $arrayidx4 = 0; + var $band$addr = 0, $bits = 0, $cache = 0, $cache1 = 0, $cache2 = 0, $cmp = 0, $cond = 0, $conv = 0, $conv5 = 0, $inc = 0, $index = 0, $m$addr = 0, $mul = 0, $nbEBands = 0, $pulses$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $m$addr = $m; + $band$addr = $band; + $LM$addr = $LM; + $pulses$addr = $pulses; + $0 = $LM$addr; + $inc = (($0) + 1)|0; + $LM$addr = $inc; + $1 = $m$addr; + $cache1 = ((($1)) + 92|0); + $bits = ((($cache1)) + 8|0); + $2 = HEAP32[$bits>>2]|0; + $3 = $m$addr; + $cache2 = ((($3)) + 92|0); + $index = ((($cache2)) + 4|0); + $4 = HEAP32[$index>>2]|0; + $5 = $LM$addr; + $6 = $m$addr; + $nbEBands = ((($6)) + 8|0); + $7 = HEAP32[$nbEBands>>2]|0; + $mul = Math_imul($5, $7)|0; + $8 = $band$addr; + $add = (($mul) + ($8))|0; + $arrayidx = (($4) + ($add<<1)|0); + $9 = HEAP16[$arrayidx>>1]|0; + $conv = $9 << 16 >> 16; + $add$ptr = (($2) + ($conv)|0); + $cache = $add$ptr; + $10 = $pulses$addr; + $cmp = ($10|0)==(0); + if ($cmp) { + $cond = 0; + STACKTOP = sp;return ($cond|0); + } + $11 = $cache; + $12 = $pulses$addr; + $arrayidx4 = (($11) + ($12)|0); + $13 = HEAP8[$arrayidx4>>0]|0; + $conv5 = $13&255; + $add6 = (($conv5) + 1)|0; + $cond = $add6; + STACKTOP = sp;return ($cond|0); +} +function _get_pulses($i) { + $i = $i|0; + var $0 = 0, $1 = 0, $2 = 0, $add = 0, $and = 0, $cmp = 0, $cond = 0, $i$addr = 0, $shl = 0, $shr = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $i$addr = $i; + $0 = $i$addr; + $cmp = ($0|0)<(8); + $1 = $i$addr; + if ($cmp) { + $cond = $1; + STACKTOP = sp;return ($cond|0); + } + $and = $1 & 7; + $add = (8 + ($and))|0; + $2 = $i$addr; + $shr = $2 >> 3; + $sub = (($shr) - 1)|0; + $shl = $add << $sub; + $cond = $shl; + STACKTOP = sp;return ($cond|0); +} +function _resampling_factor($rate) { + $rate = $rate|0; + var $0 = 0, $1 = 0, $rate$addr = 0, $ret = 0, $switch$split12D = 0, $switch$split2D = 0, $switch$split42D = 0, $switch$split72D = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $rate$addr = $rate; + $0 = $rate$addr; + $switch$split2D = ($0|0)<(16000); + L1: do { + if ($switch$split2D) { + $switch$split12D = ($0|0)<(12000); + if ($switch$split12D) { + switch ($0|0) { + case 8000: { + break; + } + default: { + label = 7; + break L1; + } + } + $ret = 6; + break; + } else { + switch ($0|0) { + case 12000: { + break; + } + default: { + label = 7; + break L1; + } + } + $ret = 4; + break; + } + } else { + $switch$split42D = ($0|0)<(24000); + if ($switch$split42D) { + switch ($0|0) { + case 16000: { + break; + } + default: { + label = 7; + break L1; + } + } + $ret = 3; + break; + } + $switch$split72D = ($0|0)<(48000); + if ($switch$split72D) { + switch ($0|0) { + case 24000: { + break; + } + default: { + label = 7; + break L1; + } + } + $ret = 2; + break; + } else { + switch ($0|0) { + case 48000: { + break; + } + default: { + label = 7; + break L1; + } + } + $ret = 1; + break; + } + } + } while(0); + if ((label|0) == 7) { + $ret = 0; + } + $1 = $ret; + STACKTOP = sp;return ($1|0); +} +function _comb_filter($y,$x,$T0,$T1,$N,$g0,$g1,$tapset0,$tapset1,$window,$overlap,$arch) { + $y = $y|0; + $x = $x|0; + $T0 = $T0|0; + $T1 = $T1|0; + $N = $N|0; + $g0 = +$g0; + $g1 = +$g1; + $tapset0 = $tapset0|0; + $tapset1 = $tapset1|0; + $window = $window|0; + $overlap = $overlap|0; + $arch = $arch|0; + var $0 = 0.0, $1 = 0.0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0.0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0.0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0; + var $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0.0; + var $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0; + var $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0, $63 = 0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0, $73 = 0, $74 = 0; + var $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0; + var $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0, $98 = 0, $99 = 0.0, $N$addr = 0, $T0$addr = 0, $T1$addr = 0, $add = 0, $add$ptr = 0, $add$ptr105 = 0, $add$ptr106 = 0, $add$ptr92 = 0, $add$ptr95 = 0, $add$ptr96 = 0, $add102 = 0, $add23 = 0, $add42 = 0; + var $add53 = 0.0, $add57 = 0, $add62 = 0.0, $add64 = 0.0, $add68 = 0, $add73 = 0.0, $add75 = 0.0, $add78 = 0.0, $add80 = 0.0, $add82 = 0.0, $add84 = 0.0, $add86 = 0.0, $arch$addr = 0, $arrayidx = 0, $arrayidx11 = 0, $arrayidx12 = 0, $arrayidx14 = 0, $arrayidx17 = 0, $arrayidx18 = 0, $arrayidx20 = 0; + var $arrayidx21 = 0, $arrayidx24 = 0, $arrayidx26 = 0, $arrayidx29 = 0, $arrayidx32 = 0, $arrayidx43 = 0, $arrayidx44 = 0, $arrayidx45 = 0, $arrayidx47 = 0, $arrayidx51 = 0, $arrayidx58 = 0, $arrayidx61 = 0, $arrayidx69 = 0, $arrayidx72 = 0, $arrayidx8 = 0, $arrayidx87 = 0, $arrayidx9 = 0, $cmp = 0, $cmp1 = 0, $cmp2 = 0; + var $cmp33 = 0, $cmp35 = 0, $cmp37 = 0, $cmp40 = 0, $cmp88 = 0, $cmp90 = 0, $f = 0.0, $g0$addr = 0.0, $g00 = 0.0, $g01 = 0.0, $g02 = 0.0, $g1$addr = 0.0, $g10 = 0.0, $g11 = 0.0, $g12 = 0.0, $i = 0, $inc = 0, $mul = 0, $mul10 = 0.0, $mul101 = 0; + var $mul13 = 0.0, $mul16 = 0.0, $mul19 = 0.0, $mul22 = 0.0, $mul4 = 0, $mul46 = 0.0, $mul49 = 0.0, $mul52 = 0.0, $mul55 = 0.0, $mul63 = 0.0, $mul66 = 0.0, $mul7 = 0.0, $mul74 = 0.0, $mul76 = 0.0, $mul77 = 0.0, $mul79 = 0.0, $mul81 = 0.0, $mul83 = 0.0, $mul85 = 0.0, $mul94 = 0; + var $or$cond = 0, $overlap$addr = 0, $sub = 0, $sub$ptr$div = 0, $sub$ptr$div100 = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$lhs$cast97 = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$rhs$cast98 = 0, $sub$ptr$sub = 0, $sub$ptr$sub99 = 0, $sub107 = 0, $sub25 = 0, $sub27 = 0, $sub28 = 0, $sub30 = 0, $sub31 = 0, $sub41 = 0, $sub48 = 0.0, $sub50 = 0; + var $sub54 = 0.0, $sub56 = 0, $sub59 = 0, $sub60 = 0, $sub65 = 0.0, $sub67 = 0, $sub70 = 0, $sub71 = 0, $sub93 = 0, $tapset0$addr = 0, $tapset1$addr = 0, $window$addr = 0, $x$addr = 0, $x0 = 0.0, $x1 = 0.0, $x2 = 0.0, $x3 = 0.0, $x4 = 0.0, $y$addr = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $y$addr = $y; + $x$addr = $x; + $T0$addr = $T0; + $T1$addr = $T1; + $N$addr = $N; + $g0$addr = $g0; + $g1$addr = $g1; + $tapset0$addr = $tapset0; + $tapset1$addr = $tapset1; + $window$addr = $window; + $overlap$addr = $overlap; + $arch$addr = $arch; + $0 = $g0$addr; + $cmp = $0 == 0.0; + $1 = $g1$addr; + $cmp1 = $1 == 0.0; + $or$cond = $cmp & $cmp1; + if ($or$cond) { + $2 = $x$addr; + $3 = $y$addr; + $cmp2 = ($2|0)!=($3|0); + if (!($cmp2)) { + STACKTOP = sp;return; + } + $4 = $y$addr; + $5 = $x$addr; + $6 = $N$addr; + $mul = $6<<2; + $7 = $y$addr; + $8 = $x$addr; + $sub$ptr$lhs$cast = $7; + $sub$ptr$rhs$cast = $8; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$div = (($sub$ptr$sub|0) / 4)&-1; + $mul4 = 0; + $add = (($mul) + ($mul4))|0; + _memmove(($4|0),($5|0),($add|0))|0; + STACKTOP = sp;return; + } + $9 = $g0$addr; + $10 = $tapset0$addr; + $arrayidx = (12348 + (($10*12)|0)|0); + $11 = +HEAPF32[$arrayidx>>2]; + $mul7 = $9 * $11; + $g00 = $mul7; + $12 = $g0$addr; + $13 = $tapset0$addr; + $arrayidx8 = (12348 + (($13*12)|0)|0); + $arrayidx9 = ((($arrayidx8)) + 4|0); + $14 = +HEAPF32[$arrayidx9>>2]; + $mul10 = $12 * $14; + $g01 = $mul10; + $15 = $g0$addr; + $16 = $tapset0$addr; + $arrayidx11 = (12348 + (($16*12)|0)|0); + $arrayidx12 = ((($arrayidx11)) + 8|0); + $17 = +HEAPF32[$arrayidx12>>2]; + $mul13 = $15 * $17; + $g02 = $mul13; + $18 = $g1$addr; + $19 = $tapset1$addr; + $arrayidx14 = (12348 + (($19*12)|0)|0); + $20 = +HEAPF32[$arrayidx14>>2]; + $mul16 = $18 * $20; + $g10 = $mul16; + $21 = $g1$addr; + $22 = $tapset1$addr; + $arrayidx17 = (12348 + (($22*12)|0)|0); + $arrayidx18 = ((($arrayidx17)) + 4|0); + $23 = +HEAPF32[$arrayidx18>>2]; + $mul19 = $21 * $23; + $g11 = $mul19; + $24 = $g1$addr; + $25 = $tapset1$addr; + $arrayidx20 = (12348 + (($25*12)|0)|0); + $arrayidx21 = ((($arrayidx20)) + 8|0); + $26 = +HEAPF32[$arrayidx21>>2]; + $mul22 = $24 * $26; + $g12 = $mul22; + $27 = $x$addr; + $28 = $T1$addr; + $sub = (0 - ($28))|0; + $add23 = (($sub) + 1)|0; + $arrayidx24 = (($27) + ($add23<<2)|0); + $29 = +HEAPF32[$arrayidx24>>2]; + $x1 = $29; + $30 = $x$addr; + $31 = $T1$addr; + $sub25 = (0 - ($31))|0; + $arrayidx26 = (($30) + ($sub25<<2)|0); + $32 = +HEAPF32[$arrayidx26>>2]; + $x2 = $32; + $33 = $x$addr; + $34 = $T1$addr; + $sub27 = (0 - ($34))|0; + $sub28 = (($sub27) - 1)|0; + $arrayidx29 = (($33) + ($sub28<<2)|0); + $35 = +HEAPF32[$arrayidx29>>2]; + $x3 = $35; + $36 = $x$addr; + $37 = $T1$addr; + $sub30 = (0 - ($37))|0; + $sub31 = (($sub30) - 2)|0; + $arrayidx32 = (($36) + ($sub31<<2)|0); + $38 = +HEAPF32[$arrayidx32>>2]; + $x4 = $38; + $39 = $g0$addr; + $40 = $g1$addr; + $cmp33 = $39 == $40; + if ($cmp33) { + $41 = $T0$addr; + $42 = $T1$addr; + $cmp35 = ($41|0)==($42|0); + if ($cmp35) { + $43 = $tapset0$addr; + $44 = $tapset1$addr; + $cmp37 = ($43|0)==($44|0); + if ($cmp37) { + $overlap$addr = 0; + } + } + } + $i = 0; + while(1) { + $45 = $i; + $46 = $overlap$addr; + $cmp40 = ($45|0)<($46|0); + if (!($cmp40)) { + break; + } + $47 = $x$addr; + $48 = $i; + $49 = $T1$addr; + $sub41 = (($48) - ($49))|0; + $add42 = (($sub41) + 2)|0; + $arrayidx43 = (($47) + ($add42<<2)|0); + $50 = +HEAPF32[$arrayidx43>>2]; + $x0 = $50; + $51 = $window$addr; + $52 = $i; + $arrayidx44 = (($51) + ($52<<2)|0); + $53 = +HEAPF32[$arrayidx44>>2]; + $54 = $window$addr; + $55 = $i; + $arrayidx45 = (($54) + ($55<<2)|0); + $56 = +HEAPF32[$arrayidx45>>2]; + $mul46 = $53 * $56; + $f = $mul46; + $57 = $x$addr; + $58 = $i; + $arrayidx47 = (($57) + ($58<<2)|0); + $59 = +HEAPF32[$arrayidx47>>2]; + $60 = $f; + $sub48 = 1.0 - $60; + $61 = $g00; + $mul49 = $sub48 * $61; + $62 = $x$addr; + $63 = $i; + $64 = $T0$addr; + $sub50 = (($63) - ($64))|0; + $arrayidx51 = (($62) + ($sub50<<2)|0); + $65 = +HEAPF32[$arrayidx51>>2]; + $mul52 = $mul49 * $65; + $add53 = $59 + $mul52; + $66 = $f; + $sub54 = 1.0 - $66; + $67 = $g01; + $mul55 = $sub54 * $67; + $68 = $x$addr; + $69 = $i; + $70 = $T0$addr; + $sub56 = (($69) - ($70))|0; + $add57 = (($sub56) + 1)|0; + $arrayidx58 = (($68) + ($add57<<2)|0); + $71 = +HEAPF32[$arrayidx58>>2]; + $72 = $x$addr; + $73 = $i; + $74 = $T0$addr; + $sub59 = (($73) - ($74))|0; + $sub60 = (($sub59) - 1)|0; + $arrayidx61 = (($72) + ($sub60<<2)|0); + $75 = +HEAPF32[$arrayidx61>>2]; + $add62 = $71 + $75; + $mul63 = $mul55 * $add62; + $add64 = $add53 + $mul63; + $76 = $f; + $sub65 = 1.0 - $76; + $77 = $g02; + $mul66 = $sub65 * $77; + $78 = $x$addr; + $79 = $i; + $80 = $T0$addr; + $sub67 = (($79) - ($80))|0; + $add68 = (($sub67) + 2)|0; + $arrayidx69 = (($78) + ($add68<<2)|0); + $81 = +HEAPF32[$arrayidx69>>2]; + $82 = $x$addr; + $83 = $i; + $84 = $T0$addr; + $sub70 = (($83) - ($84))|0; + $sub71 = (($sub70) - 2)|0; + $arrayidx72 = (($82) + ($sub71<<2)|0); + $85 = +HEAPF32[$arrayidx72>>2]; + $add73 = $81 + $85; + $mul74 = $mul66 * $add73; + $add75 = $add64 + $mul74; + $86 = $f; + $87 = $g10; + $mul76 = $86 * $87; + $88 = $x2; + $mul77 = $mul76 * $88; + $add78 = $add75 + $mul77; + $89 = $f; + $90 = $g11; + $mul79 = $89 * $90; + $91 = $x1; + $92 = $x3; + $add80 = $91 + $92; + $mul81 = $mul79 * $add80; + $add82 = $add78 + $mul81; + $93 = $f; + $94 = $g12; + $mul83 = $93 * $94; + $95 = $x0; + $96 = $x4; + $add84 = $95 + $96; + $mul85 = $mul83 * $add84; + $add86 = $add82 + $mul85; + $97 = $y$addr; + $98 = $i; + $arrayidx87 = (($97) + ($98<<2)|0); + HEAPF32[$arrayidx87>>2] = $add86; + $99 = $x3; + $x4 = $99; + $100 = $x2; + $x3 = $100; + $101 = $x1; + $x2 = $101; + $102 = $x0; + $x1 = $102; + $103 = $i; + $inc = (($103) + 1)|0; + $i = $inc; + } + $104 = $g1$addr; + $cmp88 = $104 == 0.0; + if (!($cmp88)) { + $117 = $y$addr; + $118 = $i; + $add$ptr105 = (($117) + ($118<<2)|0); + $119 = $x$addr; + $120 = $i; + $add$ptr106 = (($119) + ($120<<2)|0); + $121 = $T1$addr; + $122 = $N$addr; + $123 = $i; + $sub107 = (($122) - ($123))|0; + $124 = $g10; + $125 = $g11; + $126 = $g12; + _comb_filter_const_c($add$ptr105,$add$ptr106,$121,$sub107,$124,$125,$126); + STACKTOP = sp;return; + } + $105 = $x$addr; + $106 = $y$addr; + $cmp90 = ($105|0)!=($106|0); + if (!($cmp90)) { + STACKTOP = sp;return; + } + $107 = $y$addr; + $108 = $overlap$addr; + $add$ptr = (($107) + ($108<<2)|0); + $109 = $x$addr; + $110 = $overlap$addr; + $add$ptr92 = (($109) + ($110<<2)|0); + $111 = $N$addr; + $112 = $overlap$addr; + $sub93 = (($111) - ($112))|0; + $mul94 = $sub93<<2; + $113 = $y$addr; + $114 = $overlap$addr; + $add$ptr95 = (($113) + ($114<<2)|0); + $115 = $x$addr; + $116 = $overlap$addr; + $add$ptr96 = (($115) + ($116<<2)|0); + $sub$ptr$lhs$cast97 = $add$ptr95; + $sub$ptr$rhs$cast98 = $add$ptr96; + $sub$ptr$sub99 = (($sub$ptr$lhs$cast97) - ($sub$ptr$rhs$cast98))|0; + $sub$ptr$div100 = (($sub$ptr$sub99|0) / 4)&-1; + $mul101 = 0; + $add102 = (($mul94) + ($mul101))|0; + _memmove(($add$ptr|0),($add$ptr92|0),($add102|0))|0; + STACKTOP = sp;return; +} +function _comb_filter_const_c($y,$x,$T,$N,$g10,$g11,$g12) { + $y = $y|0; + $x = $x|0; + $T = $T|0; + $N = $N|0; + $g10 = +$g10; + $g11 = +$g11; + $g12 = +$g12; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0; + var $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, $N$addr = 0, $T$addr = 0, $add = 0, $add10 = 0; + var $add13 = 0.0, $add14 = 0.0, $add16 = 0.0, $add17 = 0.0, $add19 = 0.0, $arrayidx = 0, $arrayidx11 = 0, $arrayidx12 = 0, $arrayidx20 = 0, $arrayidx4 = 0, $arrayidx6 = 0, $arrayidx8 = 0, $cmp = 0, $g10$addr = 0.0, $g11$addr = 0.0, $g12$addr = 0.0, $i = 0, $inc = 0, $mul = 0.0, $mul15 = 0.0; + var $mul18 = 0.0, $sub = 0, $sub1 = 0, $sub2 = 0, $sub3 = 0, $sub5 = 0, $sub7 = 0, $sub9 = 0, $x$addr = 0, $x0 = 0.0, $x1 = 0.0, $x2 = 0.0, $x3 = 0.0, $x4 = 0.0, $y$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $y$addr = $y; + $x$addr = $x; + $T$addr = $T; + $N$addr = $N; + $g10$addr = $g10; + $g11$addr = $g11; + $g12$addr = $g12; + $0 = $x$addr; + $1 = $T$addr; + $sub = (0 - ($1))|0; + $sub1 = (($sub) - 2)|0; + $arrayidx = (($0) + ($sub1<<2)|0); + $2 = +HEAPF32[$arrayidx>>2]; + $x4 = $2; + $3 = $x$addr; + $4 = $T$addr; + $sub2 = (0 - ($4))|0; + $sub3 = (($sub2) - 1)|0; + $arrayidx4 = (($3) + ($sub3<<2)|0); + $5 = +HEAPF32[$arrayidx4>>2]; + $x3 = $5; + $6 = $x$addr; + $7 = $T$addr; + $sub5 = (0 - ($7))|0; + $arrayidx6 = (($6) + ($sub5<<2)|0); + $8 = +HEAPF32[$arrayidx6>>2]; + $x2 = $8; + $9 = $x$addr; + $10 = $T$addr; + $sub7 = (0 - ($10))|0; + $add = (($sub7) + 1)|0; + $arrayidx8 = (($9) + ($add<<2)|0); + $11 = +HEAPF32[$arrayidx8>>2]; + $x1 = $11; + $i = 0; + while(1) { + $12 = $i; + $13 = $N$addr; + $cmp = ($12|0)<($13|0); + if (!($cmp)) { + break; + } + $14 = $x$addr; + $15 = $i; + $16 = $T$addr; + $sub9 = (($15) - ($16))|0; + $add10 = (($sub9) + 2)|0; + $arrayidx11 = (($14) + ($add10<<2)|0); + $17 = +HEAPF32[$arrayidx11>>2]; + $x0 = $17; + $18 = $x$addr; + $19 = $i; + $arrayidx12 = (($18) + ($19<<2)|0); + $20 = +HEAPF32[$arrayidx12>>2]; + $21 = $g10$addr; + $22 = $x2; + $mul = $21 * $22; + $add13 = $20 + $mul; + $23 = $g11$addr; + $24 = $x1; + $25 = $x3; + $add14 = $24 + $25; + $mul15 = $23 * $add14; + $add16 = $add13 + $mul15; + $26 = $g12$addr; + $27 = $x0; + $28 = $x4; + $add17 = $27 + $28; + $mul18 = $26 * $add17; + $add19 = $add16 + $mul18; + $29 = $y$addr; + $30 = $i; + $arrayidx20 = (($29) + ($30<<2)|0); + HEAPF32[$arrayidx20>>2] = $add19; + $31 = $x3; + $x4 = $31; + $32 = $x2; + $x3 = $32; + $33 = $x1; + $x2 = $33; + $34 = $x0; + $x1 = $34; + $35 = $i; + $inc = (($35) + 1)|0; + $i = $inc; + } + STACKTOP = sp;return; +} +function _init_caps($m,$cap,$LM,$C) { + $m = $m|0; + $cap = $cap|0; + $LM = $LM|0; + $C = $C|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0; + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $C$addr = 0, $LM$addr = 0, $N = 0, $add = 0, $add11 = 0, $add5 = 0, $add8 = 0, $arrayidx = 0, $arrayidx14 = 0, $arrayidx2 = 0, $arrayidx9 = 0, $cache = 0, $cap$addr = 0, $caps = 0, $cmp = 0; + var $conv = 0, $conv10 = 0, $conv3 = 0, $eBands = 0, $eBands1 = 0, $i = 0, $inc = 0, $m$addr = 0, $mul = 0, $mul12 = 0, $mul13 = 0, $mul7 = 0, $nbEBands = 0, $nbEBands4 = 0, $shl = 0, $shr = 0, $sub = 0, $sub6 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $m$addr = $m; + $cap$addr = $cap; + $LM$addr = $LM; + $C$addr = $C; + $i = 0; + while(1) { + $0 = $i; + $1 = $m$addr; + $nbEBands = ((($1)) + 8|0); + $2 = HEAP32[$nbEBands>>2]|0; + $cmp = ($0|0)<($2|0); + if (!($cmp)) { + break; + } + $3 = $m$addr; + $eBands = ((($3)) + 32|0); + $4 = HEAP32[$eBands>>2]|0; + $5 = $i; + $add = (($5) + 1)|0; + $arrayidx = (($4) + ($add<<1)|0); + $6 = HEAP16[$arrayidx>>1]|0; + $conv = $6 << 16 >> 16; + $7 = $m$addr; + $eBands1 = ((($7)) + 32|0); + $8 = HEAP32[$eBands1>>2]|0; + $9 = $i; + $arrayidx2 = (($8) + ($9<<1)|0); + $10 = HEAP16[$arrayidx2>>1]|0; + $conv3 = $10 << 16 >> 16; + $sub = (($conv) - ($conv3))|0; + $11 = $LM$addr; + $shl = $sub << $11; + $N = $shl; + $12 = $m$addr; + $cache = ((($12)) + 92|0); + $caps = ((($cache)) + 12|0); + $13 = HEAP32[$caps>>2]|0; + $14 = $m$addr; + $nbEBands4 = ((($14)) + 8|0); + $15 = HEAP32[$nbEBands4>>2]|0; + $16 = $LM$addr; + $mul = $16<<1; + $17 = $C$addr; + $add5 = (($mul) + ($17))|0; + $sub6 = (($add5) - 1)|0; + $mul7 = Math_imul($15, $sub6)|0; + $18 = $i; + $add8 = (($mul7) + ($18))|0; + $arrayidx9 = (($13) + ($add8)|0); + $19 = HEAP8[$arrayidx9>>0]|0; + $conv10 = $19&255; + $add11 = (($conv10) + 64)|0; + $20 = $C$addr; + $mul12 = Math_imul($add11, $20)|0; + $21 = $N; + $mul13 = Math_imul($mul12, $21)|0; + $shr = $mul13 >> 2; + $22 = $cap$addr; + $23 = $i; + $arrayidx14 = (($22) + ($23<<2)|0); + HEAP32[$arrayidx14>>2] = $shr; + $24 = $i; + $inc = (($24) + 1)|0; + $i = $inc; + } + STACKTOP = sp;return; +} +function _encode_pulses($_y,$_n,$_k,$_enc) { + $_y = $_y|0; + $_n = $_n|0; + $_k = $_k|0; + $_enc = $_enc|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; + var $7 = 0, $8 = 0, $9 = 0, $_enc$addr = 0, $_k$addr = 0, $_n$addr = 0, $_y$addr = 0, $add = 0, $add10 = 0, $add14 = 0, $add18 = 0, $add22 = 0, $arrayidx = 0, $arrayidx13 = 0, $arrayidx21 = 0, $arrayidx6 = 0, $call = 0, $cmp = 0, $cmp1 = 0, $cmp15 = 0; + var $cmp7 = 0, $cond = 0, $cond12 = 0, $cond20 = 0, $cond5 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_y$addr = $_y; + $_n$addr = $_n; + $_k$addr = $_k; + $_enc$addr = $_enc; + $0 = $_enc$addr; + $1 = $_n$addr; + $2 = $_y$addr; + $call = (_icwrs($1,$2)|0); + $3 = $_n$addr; + $4 = $_k$addr; + $cmp = ($3|0)<($4|0); + $5 = $_n$addr; + $6 = $_k$addr; + $cond = $cmp ? $5 : $6; + $arrayidx = (12384 + ($cond<<2)|0); + $7 = HEAP32[$arrayidx>>2]|0; + $8 = $_n$addr; + $9 = $_k$addr; + $cmp1 = ($8|0)>($9|0); + $10 = $_n$addr; + $11 = $_k$addr; + $cond5 = $cmp1 ? $10 : $11; + $arrayidx6 = (($7) + ($cond5<<2)|0); + $12 = HEAP32[$arrayidx6>>2]|0; + $13 = $_n$addr; + $14 = $_k$addr; + $add = (($14) + 1)|0; + $cmp7 = ($13|0)<($add|0); + $15 = $_n$addr; + $16 = $_k$addr; + $add10 = (($16) + 1)|0; + $cond12 = $cmp7 ? $15 : $add10; + $arrayidx13 = (12384 + ($cond12<<2)|0); + $17 = HEAP32[$arrayidx13>>2]|0; + $18 = $_n$addr; + $19 = $_k$addr; + $add14 = (($19) + 1)|0; + $cmp15 = ($18|0)>($add14|0); + $20 = $_n$addr; + $21 = $_k$addr; + $add18 = (($21) + 1)|0; + $cond20 = $cmp15 ? $20 : $add18; + $arrayidx21 = (($17) + ($cond20<<2)|0); + $22 = HEAP32[$arrayidx21>>2]|0; + $add22 = (($12) + ($22))|0; + _ec_enc_uint($0,$call,$add22); + STACKTOP = sp;return; +} +function _icwrs($_n,$_y) { + $_n = $_n|0; + $_y = $_y|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_n$addr = 0, $_y$addr = 0, $add = 0, $add18 = 0, $add23 = 0, $add29 = 0, $add34 = 0, $add40 = 0, $add44 = 0, $arrayidx = 0, $arrayidx1 = 0, $arrayidx15 = 0, $arrayidx16 = 0; + var $arrayidx19 = 0, $arrayidx32 = 0, $arrayidx43 = 0, $arrayidx6 = 0, $call = 0, $call17 = 0, $cmp = 0, $cmp20 = 0, $cmp24 = 0, $cmp3 = 0, $cmp35 = 0, $cmp45 = 0, $cmp8 = 0, $cond = 0, $cond14 = 0, $cond31 = 0, $cond42 = 0, $conv = 0, $dec = 0, $i = 0; + var $j = 0, $k = 0, $sub = 0, $sub11 = 0, $sub2 = 0, $sub22 = 0, $sub27 = 0, $sub33 = 0, $sub38 = 0, $sub5 = 0, $sub7 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_n$addr = $_n; + $_y$addr = $_y; + $0 = $_n$addr; + $sub = (($0) - 1)|0; + $j = $sub; + $1 = $_y$addr; + $2 = $j; + $arrayidx = (($1) + ($2<<2)|0); + $3 = HEAP32[$arrayidx>>2]|0; + $cmp = ($3|0)<(0); + $conv = $cmp&1; + $i = $conv; + $4 = $_y$addr; + $5 = $j; + $arrayidx1 = (($4) + ($5<<2)|0); + $6 = HEAP32[$arrayidx1>>2]|0; + $call = (Math_abs(($6|0))|0); + $k = $call; + while(1) { + $7 = $j; + $dec = (($7) + -1)|0; + $j = $dec; + $8 = $_n$addr; + $9 = $j; + $sub2 = (($8) - ($9))|0; + $10 = $k; + $cmp3 = ($sub2|0)<($10|0); + if ($cmp3) { + $11 = $_n$addr; + $12 = $j; + $sub5 = (($11) - ($12))|0; + $cond = $sub5; + } else { + $13 = $k; + $cond = $13; + } + $arrayidx6 = (12384 + ($cond<<2)|0); + $14 = HEAP32[$arrayidx6>>2]|0; + $15 = $_n$addr; + $16 = $j; + $sub7 = (($15) - ($16))|0; + $17 = $k; + $cmp8 = ($sub7|0)>($17|0); + if ($cmp8) { + $18 = $_n$addr; + $19 = $j; + $sub11 = (($18) - ($19))|0; + $cond14 = $sub11; + } else { + $20 = $k; + $cond14 = $20; + } + $arrayidx15 = (($14) + ($cond14<<2)|0); + $21 = HEAP32[$arrayidx15>>2]|0; + $22 = $i; + $add = (($22) + ($21))|0; + $i = $add; + $23 = $_y$addr; + $24 = $j; + $arrayidx16 = (($23) + ($24<<2)|0); + $25 = HEAP32[$arrayidx16>>2]|0; + $call17 = (Math_abs(($25|0))|0); + $26 = $k; + $add18 = (($26) + ($call17))|0; + $k = $add18; + $27 = $_y$addr; + $28 = $j; + $arrayidx19 = (($27) + ($28<<2)|0); + $29 = HEAP32[$arrayidx19>>2]|0; + $cmp20 = ($29|0)<(0); + if ($cmp20) { + $30 = $_n$addr; + $31 = $j; + $sub22 = (($30) - ($31))|0; + $32 = $k; + $add23 = (($32) + 1)|0; + $cmp24 = ($sub22|0)<($add23|0); + if ($cmp24) { + $33 = $_n$addr; + $34 = $j; + $sub27 = (($33) - ($34))|0; + $cond31 = $sub27; + } else { + $35 = $k; + $add29 = (($35) + 1)|0; + $cond31 = $add29; + } + $arrayidx32 = (12384 + ($cond31<<2)|0); + $36 = HEAP32[$arrayidx32>>2]|0; + $37 = $_n$addr; + $38 = $j; + $sub33 = (($37) - ($38))|0; + $39 = $k; + $add34 = (($39) + 1)|0; + $cmp35 = ($sub33|0)>($add34|0); + if ($cmp35) { + $40 = $_n$addr; + $41 = $j; + $sub38 = (($40) - ($41))|0; + $cond42 = $sub38; + } else { + $42 = $k; + $add40 = (($42) + 1)|0; + $cond42 = $add40; + } + $arrayidx43 = (($36) + ($cond42<<2)|0); + $43 = HEAP32[$arrayidx43>>2]|0; + $44 = $i; + $add44 = (($44) + ($43))|0; + $i = $add44; + } + $45 = $j; + $cmp45 = ($45|0)>(0); + if (!($cmp45)) { + break; + } + } + $46 = $i; + STACKTOP = sp;return ($46|0); +} +function _decode_pulses($_y,$_n,$_k,$_dec) { + $_y = $_y|0; + $_n = $_n|0; + $_k = $_k|0; + $_dec = $_dec|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_dec$addr = 0, $_k$addr = 0, $_n$addr = 0, $_y$addr = 0, $add = 0, $add10 = 0, $add14 = 0, $add18 = 0, $add22 = 0, $arrayidx = 0, $arrayidx13 = 0, $arrayidx21 = 0, $arrayidx6 = 0, $call = 0, $call23 = 0.0, $cmp = 0; + var $cmp1 = 0, $cmp15 = 0, $cmp7 = 0, $cond = 0, $cond12 = 0, $cond20 = 0, $cond5 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $_y$addr = $_y; + $_n$addr = $_n; + $_k$addr = $_k; + $_dec$addr = $_dec; + $0 = $_n$addr; + $1 = $_k$addr; + $2 = $_dec$addr; + $3 = $_n$addr; + $4 = $_k$addr; + $cmp = ($3|0)<($4|0); + $5 = $_n$addr; + $6 = $_k$addr; + $cond = $cmp ? $5 : $6; + $arrayidx = (12384 + ($cond<<2)|0); + $7 = HEAP32[$arrayidx>>2]|0; + $8 = $_n$addr; + $9 = $_k$addr; + $cmp1 = ($8|0)>($9|0); + $10 = $_n$addr; + $11 = $_k$addr; + $cond5 = $cmp1 ? $10 : $11; + $arrayidx6 = (($7) + ($cond5<<2)|0); + $12 = HEAP32[$arrayidx6>>2]|0; + $13 = $_n$addr; + $14 = $_k$addr; + $add = (($14) + 1)|0; + $cmp7 = ($13|0)<($add|0); + $15 = $_n$addr; + $16 = $_k$addr; + $add10 = (($16) + 1)|0; + $cond12 = $cmp7 ? $15 : $add10; + $arrayidx13 = (12384 + ($cond12<<2)|0); + $17 = HEAP32[$arrayidx13>>2]|0; + $18 = $_n$addr; + $19 = $_k$addr; + $add14 = (($19) + 1)|0; + $cmp15 = ($18|0)>($add14|0); + $20 = $_n$addr; + $21 = $_k$addr; + $add18 = (($21) + 1)|0; + $cond20 = $cmp15 ? $20 : $add18; + $arrayidx21 = (($17) + ($cond20<<2)|0); + $22 = HEAP32[$arrayidx21>>2]|0; + $add22 = (($12) + ($22))|0; + $call = (_ec_dec_uint($2,$add22)|0); + $23 = $_y$addr; + $call23 = (+_cwrsi($0,$1,$call,$23)); + STACKTOP = sp;return (+$call23); +} +function _cwrsi($_n,$_k,$_i,$_y) { + $_n = $_n|0; + $_k = $_k|0; + $_i = $_i|0; + $_y = $_y|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0, $113 = 0.0, $12 = 0, $13 = 0; + var $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0; + var $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0; + var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0; + var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0; + var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $_i$addr = 0, $_k$addr = 0, $_n$addr = 0, $_y$addr = 0, $add = 0, $add20 = 0; + var $add25 = 0.0, $add29 = 0, $add55 = 0, $add63 = 0.0, $add68 = 0, $add74 = 0, $add81 = 0, $add89 = 0.0, $add91 = 0, $add98 = 0.0, $and = 0, $and43 = 0, $and72 = 0, $arrayidx = 0, $arrayidx10 = 0, $arrayidx13 = 0, $arrayidx17 = 0, $arrayidx2 = 0, $arrayidx27 = 0, $arrayidx28 = 0; + var $arrayidx30 = 0, $arrayidx31 = 0, $arrayidx47 = 0, $arrayidx48 = 0, $arrayidx5 = 0, $arrayidx9 = 0, $cmp = 0, $cmp1 = 0, $cmp11 = 0, $cmp14 = 0, $cmp3 = 0, $cmp32 = 0, $cmp34 = 0, $cmp40 = 0, $cmp50 = 0, $cmp6 = 0, $cmp69 = 0, $conv = 0, $conv21 = 0, $conv22 = 0; + var $conv23 = 0.0, $conv24 = 0.0, $conv41 = 0, $conv57 = 0, $conv58 = 0, $conv60 = 0.0, $conv61 = 0.0, $conv70 = 0, $conv83 = 0, $conv84 = 0, $conv86 = 0.0, $conv87 = 0.0, $conv93 = 0, $conv94 = 0, $conv95 = 0.0, $conv96 = 0.0, $dec = 0, $dec16 = 0, $dec46 = 0, $dec66 = 0; + var $incdec$ptr = 0, $incdec$ptr38 = 0, $incdec$ptr59 = 0, $incdec$ptr85 = 0, $k0 = 0, $mul = 0.0, $mul62 = 0.0, $mul67 = 0, $mul76 = 0, $mul88 = 0.0, $mul97 = 0.0, $p = 0, $q = 0, $row = 0, $s = 0, $shr = 0, $sub = 0, $sub18 = 0, $sub19 = 0, $sub37 = 0; + var $sub4 = 0, $sub42 = 0, $sub44 = 0, $sub53 = 0, $sub54 = 0, $sub71 = 0, $sub73 = 0, $sub77 = 0, $sub78 = 0, $sub80 = 0, $sub90 = 0, $tobool = 0, $val = 0, $xor = 0, $xor56 = 0, $xor82 = 0, $xor92 = 0, $yy = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $_n$addr = $_n; + $_k$addr = $_k; + $_i$addr = $_i; + $_y$addr = $_y; + $yy = 0.0; + while(1) { + $0 = $_n$addr; + $cmp = ($0|0)>(2); + $1 = $_k$addr; + if (!($cmp)) { + break; + } + $2 = $_n$addr; + $cmp1 = ($1|0)>=($2|0); + do { + if ($cmp1) { + $3 = $_n$addr; + $arrayidx = (12384 + ($3<<2)|0); + $4 = HEAP32[$arrayidx>>2]|0; + $row = $4; + $5 = $row; + $6 = $_k$addr; + $add = (($6) + 1)|0; + $arrayidx2 = (($5) + ($add<<2)|0); + $7 = HEAP32[$arrayidx2>>2]|0; + $p = $7; + $8 = $_i$addr; + $9 = $p; + $cmp3 = ($8>>>0)>=($9>>>0); + $conv = $cmp3&1; + $sub = (0 - ($conv))|0; + $s = $sub; + $10 = $p; + $11 = $s; + $and = $10 & $11; + $12 = $_i$addr; + $sub4 = (($12) - ($and))|0; + $_i$addr = $sub4; + $13 = $_k$addr; + $k0 = $13; + $14 = $row; + $15 = $_n$addr; + $arrayidx5 = (($14) + ($15<<2)|0); + $16 = HEAP32[$arrayidx5>>2]|0; + $q = $16; + $17 = $q; + $18 = $_i$addr; + $cmp6 = ($17>>>0)>($18>>>0); + L6: do { + if ($cmp6) { + $19 = $_n$addr; + $_k$addr = $19; + while(1) { + $20 = $_k$addr; + $dec = (($20) + -1)|0; + $_k$addr = $dec; + $arrayidx9 = (12384 + ($dec<<2)|0); + $21 = HEAP32[$arrayidx9>>2]|0; + $22 = $_n$addr; + $arrayidx10 = (($21) + ($22<<2)|0); + $23 = HEAP32[$arrayidx10>>2]|0; + $p = $23; + $24 = $p; + $25 = $_i$addr; + $cmp11 = ($24>>>0)>($25>>>0); + if (!($cmp11)) { + break; + } + } + } else { + $26 = $row; + $27 = $_k$addr; + $arrayidx13 = (($26) + ($27<<2)|0); + $28 = HEAP32[$arrayidx13>>2]|0; + $p = $28; + while(1) { + $29 = $p; + $30 = $_i$addr; + $cmp14 = ($29>>>0)>($30>>>0); + if (!($cmp14)) { + break L6; + } + $31 = $_k$addr; + $dec16 = (($31) + -1)|0; + $_k$addr = $dec16; + $32 = $row; + $33 = $_k$addr; + $arrayidx17 = (($32) + ($33<<2)|0); + $34 = HEAP32[$arrayidx17>>2]|0; + $p = $34; + } + } + } while(0); + $35 = $p; + $36 = $_i$addr; + $sub18 = (($36) - ($35))|0; + $_i$addr = $sub18; + $37 = $k0; + $38 = $_k$addr; + $sub19 = (($37) - ($38))|0; + $39 = $s; + $add20 = (($sub19) + ($39))|0; + $40 = $s; + $xor = $add20 ^ $40; + $conv21 = $xor&65535; + $val = $conv21; + $41 = $val; + $conv22 = $41 << 16 >> 16; + $42 = $_y$addr; + $incdec$ptr = ((($42)) + 4|0); + $_y$addr = $incdec$ptr; + HEAP32[$42>>2] = $conv22; + $43 = $yy; + $44 = $val; + $conv23 = (+($44<<16>>16)); + $45 = $val; + $conv24 = (+($45<<16>>16)); + $mul = $conv23 * $conv24; + $add25 = $43 + $mul; + $yy = $add25; + } else { + $46 = $_k$addr; + $arrayidx27 = (12384 + ($46<<2)|0); + $47 = HEAP32[$arrayidx27>>2]|0; + $48 = $_n$addr; + $arrayidx28 = (($47) + ($48<<2)|0); + $49 = HEAP32[$arrayidx28>>2]|0; + $p = $49; + $50 = $_k$addr; + $add29 = (($50) + 1)|0; + $arrayidx30 = (12384 + ($add29<<2)|0); + $51 = HEAP32[$arrayidx30>>2]|0; + $52 = $_n$addr; + $arrayidx31 = (($51) + ($52<<2)|0); + $53 = HEAP32[$arrayidx31>>2]|0; + $q = $53; + $54 = $p; + $55 = $_i$addr; + $cmp32 = ($54>>>0)<=($55>>>0); + if ($cmp32) { + $56 = $_i$addr; + $57 = $q; + $cmp34 = ($56>>>0)<($57>>>0); + if ($cmp34) { + $58 = $p; + $59 = $_i$addr; + $sub37 = (($59) - ($58))|0; + $_i$addr = $sub37; + $60 = $_y$addr; + $incdec$ptr38 = ((($60)) + 4|0); + $_y$addr = $incdec$ptr38; + HEAP32[$60>>2] = 0; + break; + } + } + $61 = $_i$addr; + $62 = $q; + $cmp40 = ($61>>>0)>=($62>>>0); + $conv41 = $cmp40&1; + $sub42 = (0 - ($conv41))|0; + $s = $sub42; + $63 = $q; + $64 = $s; + $and43 = $63 & $64; + $65 = $_i$addr; + $sub44 = (($65) - ($and43))|0; + $_i$addr = $sub44; + $66 = $_k$addr; + $k0 = $66; + while(1) { + $67 = $_k$addr; + $dec46 = (($67) + -1)|0; + $_k$addr = $dec46; + $arrayidx47 = (12384 + ($dec46<<2)|0); + $68 = HEAP32[$arrayidx47>>2]|0; + $69 = $_n$addr; + $arrayidx48 = (($68) + ($69<<2)|0); + $70 = HEAP32[$arrayidx48>>2]|0; + $p = $70; + $71 = $p; + $72 = $_i$addr; + $cmp50 = ($71>>>0)>($72>>>0); + if (!($cmp50)) { + break; + } + } + $73 = $p; + $74 = $_i$addr; + $sub53 = (($74) - ($73))|0; + $_i$addr = $sub53; + $75 = $k0; + $76 = $_k$addr; + $sub54 = (($75) - ($76))|0; + $77 = $s; + $add55 = (($sub54) + ($77))|0; + $78 = $s; + $xor56 = $add55 ^ $78; + $conv57 = $xor56&65535; + $val = $conv57; + $79 = $val; + $conv58 = $79 << 16 >> 16; + $80 = $_y$addr; + $incdec$ptr59 = ((($80)) + 4|0); + $_y$addr = $incdec$ptr59; + HEAP32[$80>>2] = $conv58; + $81 = $yy; + $82 = $val; + $conv60 = (+($82<<16>>16)); + $83 = $val; + $conv61 = (+($83<<16>>16)); + $mul62 = $conv60 * $conv61; + $add63 = $81 + $mul62; + $yy = $add63; + } + } while(0); + $84 = $_n$addr; + $dec66 = (($84) + -1)|0; + $_n$addr = $dec66; + } + $mul67 = $1<<1; + $add68 = (($mul67) + 1)|0; + $p = $add68; + $85 = $_i$addr; + $86 = $p; + $cmp69 = ($85>>>0)>=($86>>>0); + $conv70 = $cmp69&1; + $sub71 = (0 - ($conv70))|0; + $s = $sub71; + $87 = $p; + $88 = $s; + $and72 = $87 & $88; + $89 = $_i$addr; + $sub73 = (($89) - ($and72))|0; + $_i$addr = $sub73; + $90 = $_k$addr; + $k0 = $90; + $91 = $_i$addr; + $add74 = (($91) + 1)|0; + $shr = $add74 >>> 1; + $_k$addr = $shr; + $92 = $_k$addr; + $tobool = ($92|0)!=(0); + if (!($tobool)) { + $95 = $k0; + $96 = $_k$addr; + $sub80 = (($95) - ($96))|0; + $97 = $s; + $add81 = (($sub80) + ($97))|0; + $98 = $s; + $xor82 = $add81 ^ $98; + $conv83 = $xor82&65535; + $val = $conv83; + $99 = $val; + $conv84 = $99 << 16 >> 16; + $100 = $_y$addr; + $incdec$ptr85 = ((($100)) + 4|0); + $_y$addr = $incdec$ptr85; + HEAP32[$100>>2] = $conv84; + $101 = $yy; + $102 = $val; + $conv86 = (+($102<<16>>16)); + $103 = $val; + $conv87 = (+($103<<16>>16)); + $mul88 = $conv86 * $conv87; + $add89 = $101 + $mul88; + $yy = $add89; + $104 = $_i$addr; + $sub90 = (0 - ($104))|0; + $s = $sub90; + $105 = $_k$addr; + $106 = $s; + $add91 = (($105) + ($106))|0; + $107 = $s; + $xor92 = $add91 ^ $107; + $conv93 = $xor92&65535; + $val = $conv93; + $108 = $val; + $conv94 = $108 << 16 >> 16; + $109 = $_y$addr; + HEAP32[$109>>2] = $conv94; + $110 = $yy; + $111 = $val; + $conv95 = (+($111<<16>>16)); + $112 = $val; + $conv96 = (+($112<<16>>16)); + $mul97 = $conv95 * $conv96; + $add98 = $110 + $mul97; + $yy = $add98; + $113 = $yy; + STACKTOP = sp;return (+$113); + } + $93 = $_k$addr; + $mul76 = $93<<1; + $sub77 = (($mul76) - 1)|0; + $94 = $_i$addr; + $sub78 = (($94) - ($sub77))|0; + $_i$addr = $sub78; + $95 = $k0; + $96 = $_k$addr; + $sub80 = (($95) - ($96))|0; + $97 = $s; + $add81 = (($sub80) + ($97))|0; + $98 = $s; + $xor82 = $add81 ^ $98; + $conv83 = $xor82&65535; + $val = $conv83; + $99 = $val; + $conv84 = $99 << 16 >> 16; + $100 = $_y$addr; + $incdec$ptr85 = ((($100)) + 4|0); + $_y$addr = $incdec$ptr85; + HEAP32[$100>>2] = $conv84; + $101 = $yy; + $102 = $val; + $conv86 = (+($102<<16>>16)); + $103 = $val; + $conv87 = (+($103<<16>>16)); + $mul88 = $conv86 * $conv87; + $add89 = $101 + $mul88; + $yy = $add89; + $104 = $_i$addr; + $sub90 = (0 - ($104))|0; + $s = $sub90; + $105 = $_k$addr; + $106 = $s; + $add91 = (($105) + ($106))|0; + $107 = $s; + $xor92 = $add91 ^ $107; + $conv93 = $xor92&65535; + $val = $conv93; + $108 = $val; + $conv94 = $108 << 16 >> 16; + $109 = $_y$addr; + HEAP32[$109>>2] = $conv94; + $110 = $yy; + $111 = $val; + $conv95 = (+($111<<16>>16)); + $112 = $val; + $conv96 = (+($112<<16>>16)); + $mul97 = $conv95 * $conv96; + $add98 = $110 + $mul97; + $yy = $add98; + $113 = $yy; + STACKTOP = sp;return (+$113); +} +function _ec_laplace_get_freq1($fs0,$decay) { + $fs0 = $fs0|0; + $decay = $decay|0; + var $0 = 0, $1 = 0, $2 = 0, $decay$addr = 0, $fs0$addr = 0, $ft = 0, $mul = 0, $shr = 0, $sub = 0, $sub1 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $fs0$addr = $fs0; + $decay$addr = $decay; + $0 = $fs0$addr; + $sub = (32736 - ($0))|0; + $ft = $sub; + $1 = $ft; + $2 = $decay$addr; + $sub1 = (16384 - ($2))|0; + $mul = Math_imul($1, $sub1)|0; + $shr = $mul >>> 15; + STACKTOP = sp;return ($shr|0); +} +function _ec_laplace_decode($dec,$fs,$decay) { + $dec = $dec|0; + $fs = $fs|0; + $decay = $decay|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add14 = 0; + var $add17 = 0, $add18 = 0, $add22 = 0, $add25 = 0, $add27 = 0, $add3 = 0, $add6 = 0, $add8 = 0, $call = 0, $call1 = 0, $cmp = 0, $cmp10 = 0, $cmp19 = 0, $cmp2 = 0, $cmp26 = 0, $cmp4 = 0, $cond = 0, $dec$addr = 0, $decay$addr = 0, $di = 0; + var $fl = 0, $fm = 0, $fs$addr = 0, $inc = 0, $inc9 = 0, $mul = 0, $mul15 = 0, $mul16 = 0, $mul5 = 0, $mul7 = 0, $shr = 0, $shr13 = 0, $sub = 0, $sub12 = 0, $sub21 = 0, $val = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $dec$addr = $dec; + $fs$addr = $fs; + $decay$addr = $decay; + $val = 0; + $0 = $dec$addr; + $call = (_ec_decode_bin($0,15)|0); + $fm = $call; + $fl = 0; + $1 = $fm; + $2 = $fs$addr; + $cmp = ($1>>>0)>=($2>>>0); + do { + if ($cmp) { + $3 = $val; + $inc = (($3) + 1)|0; + $val = $inc; + $4 = $fs$addr; + $fl = $4; + $5 = $fs$addr; + $6 = $decay$addr; + $call1 = (_ec_laplace_get_freq1($5,$6)|0); + $add = (($call1) + 1)|0; + $fs$addr = $add; + while(1) { + $7 = $fs$addr; + $cmp2 = ($7>>>0)>(1); + if ($cmp2) { + $8 = $fm; + $9 = $fl; + $10 = $fs$addr; + $mul = $10<<1; + $add3 = (($9) + ($mul))|0; + $cmp4 = ($8>>>0)>=($add3>>>0); + $37 = $cmp4; + } else { + $37 = 0; + } + $11 = $fs$addr; + if (!($37)) { + break; + } + $mul5 = $11<<1; + $fs$addr = $mul5; + $12 = $fs$addr; + $13 = $fl; + $add6 = (($13) + ($12))|0; + $fl = $add6; + $14 = $fs$addr; + $sub = (($14) - 2)|0; + $15 = $decay$addr; + $mul7 = Math_imul($sub, $15)|0; + $shr = $mul7 >>> 15; + $fs$addr = $shr; + $16 = $fs$addr; + $add8 = (($16) + 1)|0; + $fs$addr = $add8; + $17 = $val; + $inc9 = (($17) + 1)|0; + $val = $inc9; + } + $cmp10 = ($11>>>0)<=(1); + if ($cmp10) { + $18 = $fm; + $19 = $fl; + $sub12 = (($18) - ($19))|0; + $shr13 = $sub12 >>> 1; + $di = $shr13; + $20 = $di; + $21 = $val; + $add14 = (($21) + ($20))|0; + $val = $add14; + $22 = $di; + $mul15 = $22<<1; + $mul16 = $mul15; + $23 = $fl; + $add17 = (($23) + ($mul16))|0; + $fl = $add17; + } + $24 = $fm; + $25 = $fl; + $26 = $fs$addr; + $add18 = (($25) + ($26))|0; + $cmp19 = ($24>>>0)<($add18>>>0); + if ($cmp19) { + $27 = $val; + $sub21 = (0 - ($27))|0; + $val = $sub21; + break; + } else { + $28 = $fs$addr; + $29 = $fl; + $add22 = (($29) + ($28))|0; + $fl = $add22; + break; + } + } + } while(0); + $30 = $dec$addr; + $31 = $fl; + $32 = $fl; + $33 = $fs$addr; + $add25 = (($32) + ($33))|0; + $cmp26 = ($add25>>>0)<(32768); + if (!($cmp26)) { + $cond = 32768; + _ec_dec_update($30,$31,$cond,32768); + $36 = $val; + STACKTOP = sp;return ($36|0); + } + $34 = $fl; + $35 = $fs$addr; + $add27 = (($34) + ($35))|0; + $cond = $add27; + _ec_dec_update($30,$31,$cond,32768); + $36 = $val; + STACKTOP = sp;return ($36|0); +} +function _isqrt32($_val) { + $_val = $_val|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $_val$addr = 0, $add = 0, $add4 = 0, $b = 0; + var $bshift = 0, $cmp = 0, $cmp7 = 0, $dec = 0, $g = 0, $shl = 0, $shl2 = 0, $shl3 = 0, $shr = 0, $shr6 = 0, $sub = 0, $sub1 = 0, $sub5 = 0, $t = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $_val$addr = $_val; + $g = 0; + $0 = $_val$addr; + $1 = (Math_clz32(($0|0))|0); + $sub = (32 - ($1))|0; + $sub1 = (($sub) - 1)|0; + $shr = $sub1 >> 1; + $bshift = $shr; + $2 = $bshift; + $shl = 1 << $2; + $b = $shl; + while(1) { + $3 = $g; + $shl2 = $3 << 1; + $4 = $b; + $add = (($shl2) + ($4))|0; + $5 = $bshift; + $shl3 = $add << $5; + $t = $shl3; + $6 = $t; + $7 = $_val$addr; + $cmp = ($6>>>0)<=($7>>>0); + if ($cmp) { + $8 = $b; + $9 = $g; + $add4 = (($9) + ($8))|0; + $g = $add4; + $10 = $t; + $11 = $_val$addr; + $sub5 = (($11) - ($10))|0; + $_val$addr = $sub5; + } + $12 = $b; + $shr6 = $12 >>> 1; + $b = $shr6; + $13 = $bshift; + $dec = (($13) + -1)|0; + $bshift = $dec; + $14 = $bshift; + $cmp7 = ($14|0)>=(0); + if (!($cmp7)) { + break; + } + } + $15 = $g; + STACKTOP = sp;return ($15|0); +} +function _silk_decode_signs($psRangeDec,$pulses,$length,$signalType,$quantOffsetType,$sum_pulses) { + $psRangeDec = $psRangeDec|0; + $pulses = $pulses|0; + $length = $length|0; + $signalType = $signalType|0; + $quantOffsetType = $quantOffsetType|0; + $sum_pulses = $sum_pulses|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0; + var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add$ptr = 0, $add3 = 0, $and = 0, $and10 = 0, $arrayidx = 0, $arrayidx11 = 0, $arrayidx17 = 0, $arrayidx2 = 0, $arrayidx23 = 0, $arrayidx5 = 0, $call = 0, $cmp = 0, $cmp14 = 0; + var $cmp19 = 0, $cmp6 = 0, $cmp8 = 0, $cond = 0, $conv = 0, $conv1 = 0, $conv18 = 0, $conv24 = 0, $conv26 = 0, $i = 0, $icdf = 0, $icdf_ptr = 0, $inc = 0, $inc29 = 0, $j = 0, $length$addr = 0, $mul = 0, $mul25 = 0, $p = 0, $psRangeDec$addr = 0; + var $pulses$addr = 0, $q_ptr = 0, $quantOffsetType$addr = 0, $shl = 0, $shl22 = 0, $shr = 0, $signalType$addr = 0, $sub = 0, $sum_pulses$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $icdf = sp + 44|0; + $psRangeDec$addr = $psRangeDec; + $pulses$addr = $pulses; + $length$addr = $length; + $signalType$addr = $signalType; + $quantOffsetType$addr = $quantOffsetType; + $sum_pulses$addr = $sum_pulses; + $arrayidx = ((($icdf)) + 1|0); + HEAP8[$arrayidx>>0] = 0; + $0 = $pulses$addr; + $q_ptr = $0; + $1 = $quantOffsetType$addr; + $2 = $signalType$addr; + $shl = $2 << 1; + $add = (($1) + ($shl))|0; + $conv = $add&65535; + $conv1 = $conv << 16 >> 16; + $mul = ($conv1*7)|0; + $i = $mul; + $3 = $i; + $arrayidx2 = (23621 + ($3)|0); + $icdf_ptr = $arrayidx2; + $4 = $length$addr; + $add3 = (($4) + 8)|0; + $shr = $add3 >> 4; + $length$addr = $shr; + $i = 0; + while(1) { + $5 = $i; + $6 = $length$addr; + $cmp = ($5|0)<($6|0); + if (!($cmp)) { + break; + } + $7 = $sum_pulses$addr; + $8 = $i; + $arrayidx5 = (($7) + ($8<<2)|0); + $9 = HEAP32[$arrayidx5>>2]|0; + $p = $9; + $10 = $p; + $cmp6 = ($10|0)>(0); + L4: do { + if ($cmp6) { + $11 = $icdf_ptr; + $12 = $p; + $and = $12 & 31; + $cmp8 = ($and|0)<(6); + $13 = $p; + $and10 = $13 & 31; + $cond = $cmp8 ? $and10 : 6; + $arrayidx11 = (($11) + ($cond)|0); + $14 = HEAP8[$arrayidx11>>0]|0; + HEAP8[$icdf>>0] = $14; + $j = 0; + while(1) { + $15 = $j; + $cmp14 = ($15|0)<(16); + if (!($cmp14)) { + break L4; + } + $16 = $q_ptr; + $17 = $j; + $arrayidx17 = (($16) + ($17<<1)|0); + $18 = HEAP16[$arrayidx17>>1]|0; + $conv18 = $18 << 16 >> 16; + $cmp19 = ($conv18|0)>(0); + if ($cmp19) { + $19 = $psRangeDec$addr; + $call = (_ec_dec_icdf($19,$icdf,8)|0); + $shl22 = $call << 1; + $sub = (($shl22) - 1)|0; + $20 = $q_ptr; + $21 = $j; + $arrayidx23 = (($20) + ($21<<1)|0); + $22 = HEAP16[$arrayidx23>>1]|0; + $conv24 = $22 << 16 >> 16; + $mul25 = Math_imul($conv24, $sub)|0; + $conv26 = $mul25&65535; + HEAP16[$arrayidx23>>1] = $conv26; + } + $23 = $j; + $inc = (($23) + 1)|0; + $j = $inc; + } + } + } while(0); + $24 = $q_ptr; + $add$ptr = ((($24)) + 32|0); + $q_ptr = $add$ptr; + $25 = $i; + $inc29 = (($25) + 1)|0; + $i = $inc29; + } + STACKTOP = sp;return; +} +function _silk_init_decoder($psDec) { + $psDec = $psDec|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $first_frame_after_reset = 0, $psDec$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $psDec$addr = $psDec; + $0 = $psDec$addr; + _memset(($0|0),0,4260)|0; + $1 = $psDec$addr; + $first_frame_after_reset = ((($1)) + 2376|0); + HEAP32[$first_frame_after_reset>>2] = 1; + $2 = $psDec$addr; + HEAP32[$2>>2] = 65536; + $3 = $psDec$addr; + _silk_CNG_Reset($3); + $4 = $psDec$addr; + _silk_PLC_Reset($4); + STACKTOP = sp;return 0; +} +function _silk_decode_frame($psDec,$psRangeDec,$pOut,$pN,$lostFlag,$condCoding,$arch) { + $psDec = $psDec|0; + $psRangeDec = $psRangeDec|0; + $pOut = $pOut|0; + $pN = $pN|0; + $lostFlag = $lostFlag|0; + $condCoding = $condCoding|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $7 = 0, $8 = 0, $9 = 0, $L = 0, $LBRR_flags = 0, $LTP_scale_Q14 = 0, $add = 0, $and = 0, $arch$addr = 0, $arrayidx = 0, $arrayidx19 = 0, $arrayidx21 = 0, $arrayidx27 = 0, $cmp = 0, $cmp1 = 0, $cmp2 = 0; + var $condCoding$addr = 0, $conv = 0, $conv12 = 0, $conv5 = 0, $first_frame_after_reset = 0, $frame_length = 0, $frame_length14 = 0, $frame_length18 = 0, $frame_length22 = 0, $frame_length6 = 0, $indices = 0, $indices10 = 0, $indices4 = 0, $lagPrev = 0, $lossCnt = 0, $lostFlag$addr = 0, $ltp_mem_length = 0, $mul = 0, $mul23 = 0, $mv_len = 0; + var $nFramesDecoded = 0, $nFramesDecoded3 = 0, $nb_subfr = 0, $outBuf = 0, $outBuf17 = 0, $outBuf20 = 0, $pN$addr = 0, $pOut$addr = 0, $prevSignalType = 0, $psDec$addr = 0, $psDecCtrl = 0, $psRangeDec$addr = 0, $quantOffsetType = 0, $ret = 0, $saved_stack = 0, $signalType = 0, $signalType11 = 0, $sub = 0, $sub15 = 0, $sub26 = 0; + var $vla = 0, $vla$alloca_mul = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 192|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(192|0); + $psDecCtrl = sp + 4|0; + $psDec$addr = $psDec; + $psRangeDec$addr = $psRangeDec; + $pOut$addr = $pOut; + $pN$addr = $pN; + $lostFlag$addr = $lostFlag; + $condCoding$addr = $condCoding; + $arch$addr = $arch; + $ret = 0; + $0 = $psDec$addr; + $frame_length = ((($0)) + 2328|0); + $1 = HEAP32[$frame_length>>2]|0; + $L = $1; + $LTP_scale_Q14 = ((($psDecCtrl)) + 136|0); + HEAP32[$LTP_scale_Q14>>2] = 0; + $2 = $lostFlag$addr; + $cmp = ($2|0)==(0); + do { + if ($cmp) { + label = 4; + } else { + $3 = $lostFlag$addr; + $cmp1 = ($3|0)==(2); + if ($cmp1) { + $4 = $psDec$addr; + $LBRR_flags = ((($4)) + 2420|0); + $5 = $psDec$addr; + $nFramesDecoded = ((($5)) + 2388|0); + $6 = HEAP32[$nFramesDecoded>>2]|0; + $arrayidx = (($LBRR_flags) + ($6<<2)|0); + $7 = HEAP32[$arrayidx>>2]|0; + $cmp2 = ($7|0)==(1); + if ($cmp2) { + label = 4; + break; + } + } + $37 = $psDec$addr; + $38 = $pOut$addr; + $39 = $arch$addr; + _silk_PLC($37,$psDecCtrl,$38,1,$39); + } + } while(0); + if ((label|0) == 4) { + $8 = $L; + $add = (($8) + 16)|0; + $sub = (($add) - 1)|0; + $and = $sub & -16; + $9 = (_llvm_stacksave()|0); + $saved_stack = $9; + $vla$alloca_mul = $and<<1; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $10 = $psDec$addr; + $11 = $psRangeDec$addr; + $12 = $psDec$addr; + $nFramesDecoded3 = ((($12)) + 2388|0); + $13 = HEAP32[$nFramesDecoded3>>2]|0; + $14 = $lostFlag$addr; + $15 = $condCoding$addr; + _silk_decode_indices($10,$11,$13,$14,$15); + $16 = $psRangeDec$addr; + $17 = $psDec$addr; + $indices = ((($17)) + 2736|0); + $signalType = ((($indices)) + 29|0); + $18 = HEAP8[$signalType>>0]|0; + $conv = $18 << 24 >> 24; + $19 = $psDec$addr; + $indices4 = ((($19)) + 2736|0); + $quantOffsetType = ((($indices4)) + 30|0); + $20 = HEAP8[$quantOffsetType>>0]|0; + $conv5 = $20 << 24 >> 24; + $21 = $psDec$addr; + $frame_length6 = ((($21)) + 2328|0); + $22 = HEAP32[$frame_length6>>2]|0; + _silk_decode_pulses($16,$vla,$conv,$conv5,$22); + $23 = $psDec$addr; + $24 = $condCoding$addr; + _silk_decode_parameters($23,$psDecCtrl,$24); + $25 = $psDec$addr; + $26 = $pOut$addr; + $27 = $arch$addr; + _silk_decode_core($25,$psDecCtrl,$26,$vla,$27); + $28 = $psDec$addr; + $29 = $pOut$addr; + $30 = $arch$addr; + _silk_PLC($28,$psDecCtrl,$29,0,$30); + $31 = $psDec$addr; + $lossCnt = ((($31)) + 4160|0); + HEAP32[$lossCnt>>2] = 0; + $32 = $psDec$addr; + $indices10 = ((($32)) + 2736|0); + $signalType11 = ((($indices10)) + 29|0); + $33 = HEAP8[$signalType11>>0]|0; + $conv12 = $33 << 24 >> 24; + $34 = $psDec$addr; + $prevSignalType = ((($34)) + 4164|0); + HEAP32[$prevSignalType>>2] = $conv12; + $35 = $psDec$addr; + $first_frame_after_reset = ((($35)) + 2376|0); + HEAP32[$first_frame_after_reset>>2] = 0; + $36 = $saved_stack; + _llvm_stackrestore(($36|0)); + } + $40 = $psDec$addr; + $ltp_mem_length = ((($40)) + 2336|0); + $41 = HEAP32[$ltp_mem_length>>2]|0; + $42 = $psDec$addr; + $frame_length14 = ((($42)) + 2328|0); + $43 = HEAP32[$frame_length14>>2]|0; + $sub15 = (($41) - ($43))|0; + $mv_len = $sub15; + $44 = $psDec$addr; + $outBuf = ((($44)) + 1348|0); + $45 = $psDec$addr; + $outBuf17 = ((($45)) + 1348|0); + $46 = $psDec$addr; + $frame_length18 = ((($46)) + 2328|0); + $47 = HEAP32[$frame_length18>>2]|0; + $arrayidx19 = (($outBuf17) + ($47<<1)|0); + $48 = $mv_len; + $mul = $48<<1; + _memmove(($outBuf|0),($arrayidx19|0),($mul|0))|0; + $49 = $psDec$addr; + $outBuf20 = ((($49)) + 1348|0); + $50 = $mv_len; + $arrayidx21 = (($outBuf20) + ($50<<1)|0); + $51 = $pOut$addr; + $52 = $psDec$addr; + $frame_length22 = ((($52)) + 2328|0); + $53 = HEAP32[$frame_length22>>2]|0; + $mul23 = $53<<1; + _memcpy(($arrayidx21|0),($51|0),($mul23|0))|0; + $54 = $psDec$addr; + $55 = $pOut$addr; + $56 = $L; + _silk_CNG($54,$psDecCtrl,$55,$56); + $57 = $psDec$addr; + $58 = $pOut$addr; + $59 = $L; + _silk_PLC_glue_frames($57,$58,$59); + $60 = $psDec$addr; + $nb_subfr = ((($60)) + 2324|0); + $61 = HEAP32[$nb_subfr>>2]|0; + $sub26 = (($61) - 1)|0; + $arrayidx27 = (($psDecCtrl) + ($sub26<<2)|0); + $62 = HEAP32[$arrayidx27>>2]|0; + $63 = $psDec$addr; + $lagPrev = ((($63)) + 2308|0); + HEAP32[$lagPrev>>2] = $62; + $64 = $L; + $65 = $pN$addr; + HEAP32[$65>>2] = $64; + $66 = $ret; + STACKTOP = sp;return ($66|0); +} +function _silk_decode_parameters($psDec,$psDecCtrl,$condCoding) { + $psDec = $psDec|0; + $psDecCtrl = $psDecCtrl|0; + $condCoding = $condCoding|0; + var $$sink = 0, $$sink1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; + var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; + var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; + var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; + var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $Gains_Q16 = 0, $Ix = 0, $LPC_order = 0, $LPC_order16 = 0, $LPC_order35 = 0, $LPC_order42 = 0; + var $LPC_order48 = 0, $LPC_order54 = 0, $LPC_order58 = 0, $LTPCoef_Q14 = 0, $LTPCoef_Q14106 = 0, $LTPIndex = 0, $LTP_scaleIndex = 0, $LTP_scale_Q14113 = 0, $LastGainIndex = 0, $NLSFIndices = 0, $NLSFInterpCoef_Q2 = 0, $NLSFInterpCoef_Q211 = 0, $NLSFInterpCoef_Q222 = 0, $PERIndex = 0, $PERIndex112 = 0, $PredCoef_Q12 = 0, $PredCoef_Q1231 = 0, $PredCoef_Q1236 = 0, $PredCoef_Q1239 = 0, $PredCoef_Q1251 = 0; + var $PredCoef_Q1255 = 0, $add = 0, $add84 = 0, $add89 = 0, $arrayidx = 0, $arrayidx19 = 0, $arrayidx24 = 0, $arrayidx27 = 0, $arrayidx30 = 0, $arrayidx40 = 0, $arrayidx56 = 0, $arrayidx70 = 0, $arrayidx77 = 0, $arrayidx85 = 0, $arrayidx90 = 0, $arrayidx99 = 0, $cbk_ptr_Q7 = 0, $cmp = 0, $cmp13 = 0, $cmp17 = 0; + var $cmp62 = 0, $cmp7 = 0, $cmp73 = 0, $cmp80 = 0, $condCoding$addr = 0, $contourIndex = 0, $conv = 0, $conv100 = 0, $conv12 = 0, $conv20 = 0, $conv23 = 0, $conv25 = 0, $conv28 = 0, $conv29 = 0, $conv61 = 0, $conv78 = 0, $conv86 = 0, $conv87 = 0, $conv98 = 0, $first_frame_after_reset = 0; + var $fs_kHz = 0, $i = 0, $idxprom = 0, $inc = 0, $inc92 = 0, $inc95 = 0, $indices = 0, $indices10 = 0, $indices111 = 0, $indices21 = 0, $indices3 = 0, $indices60 = 0, $indices65 = 0, $indices66 = 0, $indices69 = 0, $indices76 = 0, $indices9 = 0, $k = 0, $lagIndex = 0, $lossCnt = 0; + var $mul = 0, $mul105 = 0, $mul109 = 0, $mul110 = 0, $mul43 = 0, $mul49 = 0, $mul83 = 0, $mul88 = 0, $nb_subfr = 0, $nb_subfr104 = 0, $nb_subfr108 = 0, $nb_subfr68 = 0, $nb_subfr72 = 0, $pNLSF0_Q15 = 0, $pNLSF_Q15 = 0, $prevNLSF_Q15 = 0, $prevNLSF_Q1526 = 0, $prevNLSF_Q1545 = 0, $psDec$addr = 0, $psDecCtrl$addr = 0; + var $psNLSF_CB = 0, $shl = 0, $shr = 0, $signalType = 0, $sub = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); + $pNLSF_Q15 = sp + 64|0; + $pNLSF0_Q15 = sp + 32|0; + $psDec$addr = $psDec; + $psDecCtrl$addr = $psDecCtrl; + $condCoding$addr = $condCoding; + $0 = $psDecCtrl$addr; + $Gains_Q16 = ((($0)) + 16|0); + $1 = $psDec$addr; + $indices = ((($1)) + 2736|0); + $2 = $psDec$addr; + $LastGainIndex = ((($2)) + 2312|0); + $3 = $condCoding$addr; + $cmp = ($3|0)==(2); + $conv = $cmp&1; + $4 = $psDec$addr; + $nb_subfr = ((($4)) + 2324|0); + $5 = HEAP32[$nb_subfr>>2]|0; + _silk_gains_dequant($Gains_Q16,$indices,$LastGainIndex,$conv,$5); + $6 = $psDec$addr; + $indices3 = ((($6)) + 2736|0); + $NLSFIndices = ((($indices3)) + 8|0); + $7 = $psDec$addr; + $psNLSF_CB = ((($7)) + 2732|0); + $8 = HEAP32[$psNLSF_CB>>2]|0; + _silk_NLSF_decode($pNLSF_Q15,$NLSFIndices,$8); + $9 = $psDecCtrl$addr; + $PredCoef_Q12 = ((($9)) + 32|0); + $arrayidx = ((($PredCoef_Q12)) + 32|0); + $10 = $psDec$addr; + $LPC_order = ((($10)) + 2340|0); + $11 = HEAP32[$LPC_order>>2]|0; + _silk_NLSF2A($arrayidx,$pNLSF_Q15,$11); + $12 = $psDec$addr; + $first_frame_after_reset = ((($12)) + 2376|0); + $13 = HEAP32[$first_frame_after_reset>>2]|0; + $cmp7 = ($13|0)==(1); + if ($cmp7) { + $14 = $psDec$addr; + $indices9 = ((($14)) + 2736|0); + $NLSFInterpCoef_Q2 = ((($indices9)) + 31|0); + HEAP8[$NLSFInterpCoef_Q2>>0] = 4; + } + $15 = $psDec$addr; + $indices10 = ((($15)) + 2736|0); + $NLSFInterpCoef_Q211 = ((($indices10)) + 31|0); + $16 = HEAP8[$NLSFInterpCoef_Q211>>0]|0; + $conv12 = $16 << 24 >> 24; + $cmp13 = ($conv12|0)<(4); + if ($cmp13) { + $i = 0; + while(1) { + $17 = $i; + $18 = $psDec$addr; + $LPC_order16 = ((($18)) + 2340|0); + $19 = HEAP32[$LPC_order16>>2]|0; + $cmp17 = ($17|0)<($19|0); + if (!($cmp17)) { + break; + } + $20 = $psDec$addr; + $prevNLSF_Q15 = ((($20)) + 2344|0); + $21 = $i; + $arrayidx19 = (($prevNLSF_Q15) + ($21<<1)|0); + $22 = HEAP16[$arrayidx19>>1]|0; + $conv20 = $22 << 16 >> 16; + $23 = $psDec$addr; + $indices21 = ((($23)) + 2736|0); + $NLSFInterpCoef_Q222 = ((($indices21)) + 31|0); + $24 = HEAP8[$NLSFInterpCoef_Q222>>0]|0; + $conv23 = $24 << 24 >> 24; + $25 = $i; + $arrayidx24 = (($pNLSF_Q15) + ($25<<1)|0); + $26 = HEAP16[$arrayidx24>>1]|0; + $conv25 = $26 << 16 >> 16; + $27 = $psDec$addr; + $prevNLSF_Q1526 = ((($27)) + 2344|0); + $28 = $i; + $arrayidx27 = (($prevNLSF_Q1526) + ($28<<1)|0); + $29 = HEAP16[$arrayidx27>>1]|0; + $conv28 = $29 << 16 >> 16; + $sub = (($conv25) - ($conv28))|0; + $mul = Math_imul($conv23, $sub)|0; + $shr = $mul >> 2; + $add = (($conv20) + ($shr))|0; + $conv29 = $add&65535; + $30 = $i; + $arrayidx30 = (($pNLSF0_Q15) + ($30<<1)|0); + HEAP16[$arrayidx30>>1] = $conv29; + $31 = $i; + $inc = (($31) + 1)|0; + $i = $inc; + } + $32 = $psDecCtrl$addr; + $PredCoef_Q1231 = ((($32)) + 32|0); + $33 = $psDec$addr; + $LPC_order35 = ((($33)) + 2340|0); + $34 = HEAP32[$LPC_order35>>2]|0; + _silk_NLSF2A($PredCoef_Q1231,$pNLSF0_Q15,$34); + } else { + $35 = $psDecCtrl$addr; + $PredCoef_Q1236 = ((($35)) + 32|0); + $36 = $psDecCtrl$addr; + $PredCoef_Q1239 = ((($36)) + 32|0); + $arrayidx40 = ((($PredCoef_Q1239)) + 32|0); + $37 = $psDec$addr; + $LPC_order42 = ((($37)) + 2340|0); + $38 = HEAP32[$LPC_order42>>2]|0; + $mul43 = $38<<1; + _memcpy(($PredCoef_Q1236|0),($arrayidx40|0),($mul43|0))|0; + } + $39 = $psDec$addr; + $prevNLSF_Q1545 = ((($39)) + 2344|0); + $40 = $psDec$addr; + $LPC_order48 = ((($40)) + 2340|0); + $41 = HEAP32[$LPC_order48>>2]|0; + $mul49 = $41<<1; + _memcpy(($prevNLSF_Q1545|0),($pNLSF_Q15|0),($mul49|0))|0; + $42 = $psDec$addr; + $lossCnt = ((($42)) + 4160|0); + $43 = HEAP32[$lossCnt>>2]|0; + $tobool = ($43|0)!=(0); + if ($tobool) { + $44 = $psDecCtrl$addr; + $PredCoef_Q1251 = ((($44)) + 32|0); + $45 = $psDec$addr; + $LPC_order54 = ((($45)) + 2340|0); + $46 = HEAP32[$LPC_order54>>2]|0; + _silk_bwexpander($PredCoef_Q1251,$46,63570); + $47 = $psDecCtrl$addr; + $PredCoef_Q1255 = ((($47)) + 32|0); + $arrayidx56 = ((($PredCoef_Q1255)) + 32|0); + $48 = $psDec$addr; + $LPC_order58 = ((($48)) + 2340|0); + $49 = HEAP32[$LPC_order58>>2]|0; + _silk_bwexpander($arrayidx56,$49,63570); + } + $50 = $psDec$addr; + $indices60 = ((($50)) + 2736|0); + $signalType = ((($indices60)) + 29|0); + $51 = HEAP8[$signalType>>0]|0; + $conv61 = $51 << 24 >> 24; + $cmp62 = ($conv61|0)==(2); + if (!($cmp62)) { + $84 = $psDecCtrl$addr; + $85 = $psDec$addr; + $nb_subfr104 = ((($85)) + 2324|0); + $86 = HEAP32[$nb_subfr104>>2]|0; + $mul105 = $86<<2; + _memset(($84|0),0,($mul105|0))|0; + $87 = $psDecCtrl$addr; + $LTPCoef_Q14106 = ((($87)) + 96|0); + $88 = $psDec$addr; + $nb_subfr108 = ((($88)) + 2324|0); + $89 = HEAP32[$nb_subfr108>>2]|0; + $mul109 = ($89*5)|0; + $mul110 = $mul109<<1; + _memset(($LTPCoef_Q14106|0),0,($mul110|0))|0; + $90 = $psDec$addr; + $indices111 = ((($90)) + 2736|0); + $PERIndex112 = ((($indices111)) + 32|0); + HEAP8[$PERIndex112>>0] = 0; + $91 = $psDecCtrl$addr; + $$sink = 0;$$sink1 = $91; + $LTP_scale_Q14113 = ((($$sink1)) + 136|0); + HEAP32[$LTP_scale_Q14113>>2] = $$sink; + STACKTOP = sp;return; + } + $52 = $psDec$addr; + $indices65 = ((($52)) + 2736|0); + $lagIndex = ((($indices65)) + 26|0); + $53 = HEAP16[$lagIndex>>1]|0; + $54 = $psDec$addr; + $indices66 = ((($54)) + 2736|0); + $contourIndex = ((($indices66)) + 28|0); + $55 = HEAP8[$contourIndex>>0]|0; + $56 = $psDecCtrl$addr; + $57 = $psDec$addr; + $fs_kHz = ((($57)) + 2316|0); + $58 = HEAP32[$fs_kHz>>2]|0; + $59 = $psDec$addr; + $nb_subfr68 = ((($59)) + 2324|0); + $60 = HEAP32[$nb_subfr68>>2]|0; + _silk_decode_pitch($53,$55,$56,$58,$60); + $61 = $psDec$addr; + $indices69 = ((($61)) + 2736|0); + $PERIndex = ((($indices69)) + 32|0); + $62 = HEAP8[$PERIndex>>0]|0; + $idxprom = $62 << 24 >> 24; + $arrayidx70 = (12208 + ($idxprom<<2)|0); + $63 = HEAP32[$arrayidx70>>2]|0; + $cbk_ptr_Q7 = $63; + $k = 0; + while(1) { + $64 = $k; + $65 = $psDec$addr; + $nb_subfr72 = ((($65)) + 2324|0); + $66 = HEAP32[$nb_subfr72>>2]|0; + $cmp73 = ($64|0)<($66|0); + $67 = $psDec$addr; + $indices76 = ((($67)) + 2736|0); + if (!($cmp73)) { + break; + } + $LTPIndex = ((($indices76)) + 4|0); + $68 = $k; + $arrayidx77 = (($LTPIndex) + ($68)|0); + $69 = HEAP8[$arrayidx77>>0]|0; + $conv78 = $69 << 24 >> 24; + $Ix = $conv78; + $i = 0; + while(1) { + $70 = $i; + $cmp80 = ($70|0)<(5); + if (!($cmp80)) { + break; + } + $71 = $cbk_ptr_Q7; + $72 = $Ix; + $mul83 = ($72*5)|0; + $73 = $i; + $add84 = (($mul83) + ($73))|0; + $arrayidx85 = (($71) + ($add84)|0); + $74 = HEAP8[$arrayidx85>>0]|0; + $conv86 = $74 << 24 >> 24; + $shl = $conv86 << 7; + $conv87 = $shl&65535; + $75 = $psDecCtrl$addr; + $LTPCoef_Q14 = ((($75)) + 96|0); + $76 = $k; + $mul88 = ($76*5)|0; + $77 = $i; + $add89 = (($mul88) + ($77))|0; + $arrayidx90 = (($LTPCoef_Q14) + ($add89<<1)|0); + HEAP16[$arrayidx90>>1] = $conv87; + $78 = $i; + $inc92 = (($78) + 1)|0; + $i = $inc92; + } + $79 = $k; + $inc95 = (($79) + 1)|0; + $k = $inc95; + } + $LTP_scaleIndex = ((($indices76)) + 33|0); + $80 = HEAP8[$LTP_scaleIndex>>0]|0; + $conv98 = $80 << 24 >> 24; + $Ix = $conv98; + $81 = $Ix; + $arrayidx99 = (20256 + ($81<<1)|0); + $82 = HEAP16[$arrayidx99>>1]|0; + $conv100 = $82 << 16 >> 16; + $83 = $psDecCtrl$addr; + $$sink = $conv100;$$sink1 = $83; + $LTP_scale_Q14113 = ((($$sink1)) + 136|0); + HEAP32[$LTP_scale_Q14113>>2] = $$sink; + STACKTOP = sp;return; +} +function _silk_decode_indices($psDec,$psRangeDec,$FrameIndex,$decode_LBRR,$condCoding) { + $psDec = $psDec|0; + $psRangeDec = $psRangeDec|0; + $FrameIndex = $FrameIndex|0; + $decode_LBRR = $decode_LBRR|0; + $condCoding = $condCoding|0; + var $$sink = 0, $$sink1 = 0, $$sink2 = 0, $$sink3 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0; + var $112 = 0, $113 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $CB1_iCDF = 0, $FrameIndex$addr = 0; + var $Ix = 0, $LTPIndex = 0, $LTP_scaleIndex174 = 0, $NLSFIndices = 0, $NLSFIndices52 = 0, $NLSFIndices81 = 0, $NLSFInterpCoef_Q296 = 0, $PERIndex = 0, $PERIndex156 = 0, $Seed = 0, $VAD_flags = 0, $add = 0, $add117 = 0, $add138 = 0, $add27 = 0, $add75 = 0, $add82 = 0, $and = 0, $arrayidx = 0, $arrayidx14 = 0; + var $arrayidx158 = 0, $arrayidx162 = 0, $arrayidx36 = 0, $arrayidx43 = 0, $arrayidx62 = 0, $arrayidx64 = 0, $arrayidx83 = 0, $call = 0, $call109 = 0, $call124 = 0, $call132 = 0, $call144 = 0, $call147 = 0, $call15 = 0, $call159 = 0, $call169 = 0, $call181 = 0, $call2 = 0, $call20 = 0, $call32 = 0; + var $call44 = 0, $call65 = 0, $call69 = 0, $call7 = 0, $call74 = 0, $call91 = 0, $cmp = 0, $cmp101 = 0, $cmp104 = 0, $cmp106 = 0, $cmp112 = 0, $cmp152 = 0, $cmp166 = 0, $cmp30 = 0, $cmp58 = 0, $cmp66 = 0, $cmp71 = 0, $cmp88 = 0, $condCoding$addr = 0, $contourIndex = 0; + var $conv = 0, $conv100 = 0, $conv110 = 0, $conv111 = 0, $conv116 = 0, $conv118 = 0, $conv125 = 0, $conv126 = 0, $conv129 = 0, $conv133 = 0, $conv134 = 0, $conv137 = 0, $conv139 = 0, $conv145 = 0, $conv148 = 0, $conv16 = 0, $conv160 = 0, $conv170 = 0, $conv179 = 0, $conv182 = 0; + var $conv21 = 0, $conv22 = 0, $conv26 = 0, $conv28 = 0, $conv3 = 0, $conv33 = 0, $conv39 = 0, $conv42 = 0, $conv45 = 0, $conv54 = 0, $conv57 = 0, $conv79 = 0, $conv8 = 0, $conv92 = 0, $decode_LBRR$addr = 0, $decode_absolute_lagIndex = 0, $delta_lagIndex = 0, $ec_iCDF = 0, $ec_ix = 0, $ec_prevLagIndex = 0; + var $ec_prevLagIndex143 = 0, $ec_prevSignalType = 0, $ec_prevSignalType180 = 0, $fs_kHz = 0, $i = 0, $idxprom = 0, $idxprom157 = 0, $idxprom63 = 0, $inc = 0, $inc164 = 0, $inc85 = 0, $indices = 0, $indices119 = 0, $indices12 = 0, $indices130 = 0, $indices135 = 0, $indices141 = 0, $indices146 = 0, $indices149 = 0, $indices155 = 0; + var $indices161 = 0, $indices17 = 0, $indices173 = 0, $indices177 = 0, $indices183 = 0, $indices23 = 0, $indices34 = 0, $indices37 = 0, $indices4 = 0, $indices46 = 0, $indices51 = 0, $indices80 = 0, $indices9 = 0, $indices95 = 0, $indices98 = 0, $k = 0, $lagIndex = 0, $lagIndex131 = 0, $lagIndex136 = 0, $lagIndex142 = 0; + var $mul = 0, $mul128 = 0, $nb_subfr = 0, $nb_subfr151 = 0, $nb_subfr87 = 0, $order = 0, $pitch_contour_iCDF = 0, $pitch_lag_low_bits_iCDF = 0, $pred_Q8 = 0, $psDec$addr = 0, $psNLSF_CB = 0, $psNLSF_CB41 = 0, $psNLSF_CB50 = 0, $psNLSF_CB56 = 0, $psNLSF_CB61 = 0, $psRangeDec$addr = 0, $quantOffsetType = 0, $shl = 0, $shr = 0, $shr127 = 0; + var $shr40 = 0, $signalType = 0, $signalType13 = 0, $signalType178 = 0, $signalType38 = 0, $signalType99 = 0, $sub = 0, $sub115 = 0, $sub78 = 0, $tobool = 0, $tobool1 = 0, $tobool122 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); + $ec_ix = sp + 40|0; + $pred_Q8 = sp + 72|0; + $psDec$addr = $psDec; + $psRangeDec$addr = $psRangeDec; + $FrameIndex$addr = $FrameIndex; + $decode_LBRR$addr = $decode_LBRR; + $condCoding$addr = $condCoding; + $0 = $decode_LBRR$addr; + $tobool = ($0|0)!=(0); + if ($tobool) { + label = 3; + } else { + $1 = $psDec$addr; + $VAD_flags = ((($1)) + 2404|0); + $2 = $FrameIndex$addr; + $arrayidx = (($VAD_flags) + ($2<<2)|0); + $3 = HEAP32[$arrayidx>>2]|0; + $tobool1 = ($3|0)!=(0); + if ($tobool1) { + label = 3; + } else { + $5 = $psRangeDec$addr; + $call2 = (_ec_dec_icdf($5,22645,8)|0); + $Ix = $call2; + } + } + if ((label|0) == 3) { + $4 = $psRangeDec$addr; + $call = (_ec_dec_icdf($4,22641,8)|0); + $add = (($call) + 2)|0; + $Ix = $add; + } + $6 = $Ix; + $shr = $6 >> 1; + $conv = $shr&255; + $7 = $psDec$addr; + $indices = ((($7)) + 2736|0); + $signalType = ((($indices)) + 29|0); + HEAP8[$signalType>>0] = $conv; + $8 = $Ix; + $and = $8 & 1; + $conv3 = $and&255; + $9 = $psDec$addr; + $indices4 = ((($9)) + 2736|0); + $quantOffsetType = ((($indices4)) + 30|0); + HEAP8[$quantOffsetType>>0] = $conv3; + $10 = $condCoding$addr; + $cmp = ($10|0)==(2); + $11 = $psRangeDec$addr; + if ($cmp) { + $call7 = (_ec_dec_icdf($11,22219,8)|0); + $conv8 = $call7&255; + $12 = $psDec$addr; + $indices9 = ((($12)) + 2736|0); + HEAP8[$indices9>>0] = $conv8; + } else { + $13 = $psDec$addr; + $indices12 = ((($13)) + 2736|0); + $signalType13 = ((($indices12)) + 29|0); + $14 = HEAP8[$signalType13>>0]|0; + $idxprom = $14 << 24 >> 24; + $arrayidx14 = (22195 + ($idxprom<<3)|0); + $call15 = (_ec_dec_icdf($11,$arrayidx14,8)|0); + $shl = $call15 << 3; + $conv16 = $shl&255; + $15 = $psDec$addr; + $indices17 = ((($15)) + 2736|0); + HEAP8[$indices17>>0] = $conv16; + $16 = $psRangeDec$addr; + $call20 = (_ec_dec_icdf($16,22670,8)|0); + $conv21 = $call20&255; + $conv22 = $conv21 << 24 >> 24; + $17 = $psDec$addr; + $indices23 = ((($17)) + 2736|0); + $18 = HEAP8[$indices23>>0]|0; + $conv26 = $18 << 24 >> 24; + $add27 = (($conv26) + ($conv22))|0; + $conv28 = $add27&255; + HEAP8[$indices23>>0] = $conv28; + } + $i = 1; + while(1) { + $19 = $i; + $20 = $psDec$addr; + $nb_subfr = ((($20)) + 2324|0); + $21 = HEAP32[$nb_subfr>>2]|0; + $cmp30 = ($19|0)<($21|0); + $22 = $psRangeDec$addr; + if (!($cmp30)) { + break; + } + $call32 = (_ec_dec_icdf($22,22219,8)|0); + $conv33 = $call32&255; + $23 = $psDec$addr; + $indices34 = ((($23)) + 2736|0); + $24 = $i; + $arrayidx36 = (($indices34) + ($24)|0); + HEAP8[$arrayidx36>>0] = $conv33; + $25 = $i; + $inc = (($25) + 1)|0; + $i = $inc; + } + $26 = $psDec$addr; + $psNLSF_CB = ((($26)) + 2732|0); + $27 = HEAP32[$psNLSF_CB>>2]|0; + $CB1_iCDF = ((($27)) + 12|0); + $28 = HEAP32[$CB1_iCDF>>2]|0; + $29 = $psDec$addr; + $indices37 = ((($29)) + 2736|0); + $signalType38 = ((($indices37)) + 29|0); + $30 = HEAP8[$signalType38>>0]|0; + $conv39 = $30 << 24 >> 24; + $shr40 = $conv39 >> 1; + $31 = $psDec$addr; + $psNLSF_CB41 = ((($31)) + 2732|0); + $32 = HEAP32[$psNLSF_CB41>>2]|0; + $33 = HEAP16[$32>>1]|0; + $conv42 = $33 << 16 >> 16; + $mul = Math_imul($shr40, $conv42)|0; + $arrayidx43 = (($28) + ($mul)|0); + $call44 = (_ec_dec_icdf($22,$arrayidx43,8)|0); + $conv45 = $call44&255; + $34 = $psDec$addr; + $indices46 = ((($34)) + 2736|0); + $NLSFIndices = ((($indices46)) + 8|0); + HEAP8[$NLSFIndices>>0] = $conv45; + $35 = $psDec$addr; + $psNLSF_CB50 = ((($35)) + 2732|0); + $36 = HEAP32[$psNLSF_CB50>>2]|0; + $37 = $psDec$addr; + $indices51 = ((($37)) + 2736|0); + $NLSFIndices52 = ((($indices51)) + 8|0); + $38 = HEAP8[$NLSFIndices52>>0]|0; + $conv54 = $38 << 24 >> 24; + _silk_NLSF_unpack($ec_ix,$pred_Q8,$36,$conv54); + $i = 0; + while(1) { + $39 = $i; + $40 = $psDec$addr; + $psNLSF_CB56 = ((($40)) + 2732|0); + $41 = HEAP32[$psNLSF_CB56>>2]|0; + $order = ((($41)) + 2|0); + $42 = HEAP16[$order>>1]|0; + $conv57 = $42 << 16 >> 16; + $cmp58 = ($39|0)<($conv57|0); + if (!($cmp58)) { + break; + } + $43 = $psRangeDec$addr; + $44 = $psDec$addr; + $psNLSF_CB61 = ((($44)) + 2732|0); + $45 = HEAP32[$psNLSF_CB61>>2]|0; + $ec_iCDF = ((($45)) + 24|0); + $46 = HEAP32[$ec_iCDF>>2]|0; + $47 = $i; + $arrayidx62 = (($ec_ix) + ($47<<1)|0); + $48 = HEAP16[$arrayidx62>>1]|0; + $idxprom63 = $48 << 16 >> 16; + $arrayidx64 = (($46) + ($idxprom63)|0); + $call65 = (_ec_dec_icdf($43,$arrayidx64,8)|0); + $Ix = $call65; + $49 = $Ix; + $cmp66 = ($49|0)==(0); + if ($cmp66) { + $50 = $psRangeDec$addr; + $call69 = (_ec_dec_icdf($50,22678,8)|0); + $51 = $Ix; + $sub = (($51) - ($call69))|0; + $Ix = $sub; + } else { + $52 = $Ix; + $cmp71 = ($52|0)==(8); + if ($cmp71) { + $53 = $psRangeDec$addr; + $call74 = (_ec_dec_icdf($53,22678,8)|0); + $54 = $Ix; + $add75 = (($54) + ($call74))|0; + $Ix = $add75; + } + } + $55 = $Ix; + $sub78 = (($55) - 4)|0; + $conv79 = $sub78&255; + $56 = $psDec$addr; + $indices80 = ((($56)) + 2736|0); + $NLSFIndices81 = ((($indices80)) + 8|0); + $57 = $i; + $add82 = (($57) + 1)|0; + $arrayidx83 = (($NLSFIndices81) + ($add82)|0); + HEAP8[$arrayidx83>>0] = $conv79; + $58 = $i; + $inc85 = (($58) + 1)|0; + $i = $inc85; + } + $59 = $psDec$addr; + $nb_subfr87 = ((($59)) + 2324|0); + $60 = HEAP32[$nb_subfr87>>2]|0; + $cmp88 = ($60|0)==(4); + if ($cmp88) { + $61 = $psRangeDec$addr; + $call91 = (_ec_dec_icdf($61,22647,8)|0); + $conv92 = $call91&255; + $62 = $psDec$addr; + $$sink = $conv92;$$sink1 = $62; + } else { + $63 = $psDec$addr; + $$sink = 4;$$sink1 = $63; + } + $indices95 = ((($$sink1)) + 2736|0); + $NLSFInterpCoef_Q296 = ((($indices95)) + 31|0); + HEAP8[$NLSFInterpCoef_Q296>>0] = $$sink; + $64 = $psDec$addr; + $indices98 = ((($64)) + 2736|0); + $signalType99 = ((($indices98)) + 29|0); + $65 = HEAP8[$signalType99>>0]|0; + $conv100 = $65 << 24 >> 24; + $cmp101 = ($conv100|0)==(2); + if (!($cmp101)) { + $109 = $psDec$addr; + $indices177 = ((($109)) + 2736|0); + $signalType178 = ((($indices177)) + 29|0); + $110 = HEAP8[$signalType178>>0]|0; + $conv179 = $110 << 24 >> 24; + $111 = $psDec$addr; + $ec_prevSignalType180 = ((($111)) + 2396|0); + HEAP32[$ec_prevSignalType180>>2] = $conv179; + $112 = $psRangeDec$addr; + $call181 = (_ec_dec_icdf($112,22655,8)|0); + $conv182 = $call181&255; + $113 = $psDec$addr; + $indices183 = ((($113)) + 2736|0); + $Seed = ((($indices183)) + 34|0); + HEAP8[$Seed>>0] = $conv182; + STACKTOP = sp;return; + } + $decode_absolute_lagIndex = 1; + $66 = $condCoding$addr; + $cmp104 = ($66|0)==(2); + if ($cmp104) { + $67 = $psDec$addr; + $ec_prevSignalType = ((($67)) + 2396|0); + $68 = HEAP32[$ec_prevSignalType>>2]|0; + $cmp106 = ($68|0)==(2); + if ($cmp106) { + $69 = $psRangeDec$addr; + $call109 = (_ec_dec_icdf($69,22717,8)|0); + $conv110 = $call109&65535; + $conv111 = $conv110 << 16 >> 16; + $delta_lagIndex = $conv111; + $70 = $delta_lagIndex; + $cmp112 = ($70|0)>(0); + if ($cmp112) { + $71 = $delta_lagIndex; + $sub115 = (($71) - 9)|0; + $delta_lagIndex = $sub115; + $72 = $psDec$addr; + $ec_prevLagIndex = ((($72)) + 2400|0); + $73 = HEAP16[$ec_prevLagIndex>>1]|0; + $conv116 = $73 << 16 >> 16; + $74 = $delta_lagIndex; + $add117 = (($conv116) + ($74))|0; + $conv118 = $add117&65535; + $75 = $psDec$addr; + $indices119 = ((($75)) + 2736|0); + $lagIndex = ((($indices119)) + 26|0); + HEAP16[$lagIndex>>1] = $conv118; + $decode_absolute_lagIndex = 0; + } + } + } + $76 = $decode_absolute_lagIndex; + $tobool122 = ($76|0)!=(0); + if ($tobool122) { + $77 = $psRangeDec$addr; + $call124 = (_ec_dec_icdf($77,22685,8)|0); + $conv125 = $call124&65535; + $conv126 = $conv125 << 16 >> 16; + $78 = $psDec$addr; + $fs_kHz = ((($78)) + 2316|0); + $79 = HEAP32[$fs_kHz>>2]|0; + $shr127 = $79 >> 1; + $mul128 = Math_imul($conv126, $shr127)|0; + $conv129 = $mul128&65535; + $80 = $psDec$addr; + $indices130 = ((($80)) + 2736|0); + $lagIndex131 = ((($indices130)) + 26|0); + HEAP16[$lagIndex131>>1] = $conv129; + $81 = $psRangeDec$addr; + $82 = $psDec$addr; + $pitch_lag_low_bits_iCDF = ((($82)) + 2380|0); + $83 = HEAP32[$pitch_lag_low_bits_iCDF>>2]|0; + $call132 = (_ec_dec_icdf($81,$83,8)|0); + $conv133 = $call132&65535; + $conv134 = $conv133 << 16 >> 16; + $84 = $psDec$addr; + $indices135 = ((($84)) + 2736|0); + $lagIndex136 = ((($indices135)) + 26|0); + $85 = HEAP16[$lagIndex136>>1]|0; + $conv137 = $85 << 16 >> 16; + $add138 = (($conv137) + ($conv134))|0; + $conv139 = $add138&65535; + HEAP16[$lagIndex136>>1] = $conv139; + } + $86 = $psDec$addr; + $indices141 = ((($86)) + 2736|0); + $lagIndex142 = ((($indices141)) + 26|0); + $87 = HEAP16[$lagIndex142>>1]|0; + $88 = $psDec$addr; + $ec_prevLagIndex143 = ((($88)) + 2400|0); + HEAP16[$ec_prevLagIndex143>>1] = $87; + $89 = $psRangeDec$addr; + $90 = $psDec$addr; + $pitch_contour_iCDF = ((($90)) + 2384|0); + $91 = HEAP32[$pitch_contour_iCDF>>2]|0; + $call144 = (_ec_dec_icdf($89,$91,8)|0); + $conv145 = $call144&255; + $92 = $psDec$addr; + $indices146 = ((($92)) + 2736|0); + $contourIndex = ((($indices146)) + 28|0); + HEAP8[$contourIndex>>0] = $conv145; + $93 = $psRangeDec$addr; + $call147 = (_ec_dec_icdf($93,22260,8)|0); + $conv148 = $call147&255; + $94 = $psDec$addr; + $indices149 = ((($94)) + 2736|0); + $PERIndex = ((($indices149)) + 32|0); + HEAP8[$PERIndex>>0] = $conv148; + $k = 0; + while(1) { + $95 = $k; + $96 = $psDec$addr; + $nb_subfr151 = ((($96)) + 2324|0); + $97 = HEAP32[$nb_subfr151>>2]|0; + $cmp152 = ($95|0)<($97|0); + if (!($cmp152)) { + break; + } + $98 = $psRangeDec$addr; + $99 = $psDec$addr; + $indices155 = ((($99)) + 2736|0); + $PERIndex156 = ((($indices155)) + 32|0); + $100 = HEAP8[$PERIndex156>>0]|0; + $idxprom157 = $100 << 24 >> 24; + $arrayidx158 = (12196 + ($idxprom157<<2)|0); + $101 = HEAP32[$arrayidx158>>2]|0; + $call159 = (_ec_dec_icdf($98,$101,8)|0); + $conv160 = $call159&255; + $102 = $psDec$addr; + $indices161 = ((($102)) + 2736|0); + $LTPIndex = ((($indices161)) + 4|0); + $103 = $k; + $arrayidx162 = (($LTPIndex) + ($103)|0); + HEAP8[$arrayidx162>>0] = $conv160; + $104 = $k; + $inc164 = (($104) + 1)|0; + $k = $inc164; + } + $105 = $condCoding$addr; + $cmp166 = ($105|0)==(0); + if ($cmp166) { + $106 = $psRangeDec$addr; + $call169 = (_ec_dec_icdf($106,22638,8)|0); + $conv170 = $call169&255; + $107 = $psDec$addr; + $$sink2 = $conv170;$$sink3 = $107; + } else { + $108 = $psDec$addr; + $$sink2 = 0;$$sink3 = $108; + } + $indices173 = ((($$sink3)) + 2736|0); + $LTP_scaleIndex174 = ((($indices173)) + 33|0); + HEAP8[$LTP_scaleIndex174>>0] = $$sink2; + $109 = $psDec$addr; + $indices177 = ((($109)) + 2736|0); + $signalType178 = ((($indices177)) + 29|0); + $110 = HEAP8[$signalType178>>0]|0; + $conv179 = $110 << 24 >> 24; + $111 = $psDec$addr; + $ec_prevSignalType180 = ((($111)) + 2396|0); + HEAP32[$ec_prevSignalType180>>2] = $conv179; + $112 = $psRangeDec$addr; + $call181 = (_ec_dec_icdf($112,22655,8)|0); + $conv182 = $call181&255; + $113 = $psDec$addr; + $indices183 = ((($113)) + 2736|0); + $Seed = ((($indices183)) + 34|0); + HEAP8[$Seed>>0] = $conv182; + STACKTOP = sp;return; +} +function _silk_decode_pulses($psRangeDec,$pulses,$signalType,$quantOffsetType,$frame_length) { + $psRangeDec = $psRangeDec|0; + $pulses = $pulses|0; + $signalType = $signalType|0; + $quantOffsetType = $quantOffsetType|0; + $frame_length = $frame_length|0; + var $$sink = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; + var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $7 = 0; + var $8 = 0, $9 = 0, $RateLevelIndex = 0, $abs_q = 0, $add = 0, $add$ptr = 0, $arrayidx = 0, $arrayidx10 = 0, $arrayidx12 = 0, $arrayidx15 = 0, $arrayidx2 = 0, $arrayidx21 = 0, $arrayidx28 = 0, $arrayidx29 = 0, $arrayidx42 = 0, $arrayidx46 = 0, $arrayidx5 = 0, $arrayidx50 = 0, $arrayidx55 = 0, $arrayidx66 = 0; + var $arrayidx71 = 0, $arrayidx8 = 0, $call = 0, $call14 = 0, $call14$sink = 0, $call6 = 0, $call61 = 0, $cdf_ptr = 0, $cmp = 0, $cmp13 = 0, $cmp18 = 0, $cmp22 = 0, $cmp39 = 0, $cmp4 = 0, $cmp43 = 0, $cmp52 = 0, $cmp58 = 0, $cmp9 = 0, $conv = 0, $conv25 = 0; + var $conv26 = 0, $conv47 = 0, $conv48 = 0, $conv56 = 0, $conv65 = 0, $frame_length$addr = 0, $i = 0, $inc = 0, $inc11 = 0, $inc16 = 0, $inc36 = 0, $inc63 = 0, $inc68 = 0, $inc74 = 0, $iter = 0, $j = 0, $k = 0, $mul = 0, $mul27 = 0, $mul49 = 0; + var $nLS = 0, $nLshifts = 0, $or = 0, $psRangeDec$addr = 0, $pulses$addr = 0, $pulses_ptr = 0, $quantOffsetType$addr = 0, $shl = 0, $shl70 = 0, $shr = 0, $shr1 = 0, $signalType$addr = 0, $sum_pulses = 0, dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 224|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(224|0); + $sum_pulses = sp + 88|0; + $nLshifts = sp + 8|0; + $psRangeDec$addr = $psRangeDec; + $pulses$addr = $pulses; + $signalType$addr = $signalType; + $quantOffsetType$addr = $quantOffsetType; + $frame_length$addr = $frame_length; + $0 = $psRangeDec$addr; + $1 = $signalType$addr; + $shr = $1 >> 1; + $arrayidx = (22978 + (($shr*9)|0)|0); + $call = (_ec_dec_icdf($0,$arrayidx,8)|0); + $RateLevelIndex = $call; + $2 = $frame_length$addr; + $shr1 = $2 >> 4; + $iter = $shr1; + $3 = $iter; + $mul = $3<<4; + $4 = $frame_length$addr; + $cmp = ($mul|0)<($4|0); + if ($cmp) { + $5 = $iter; + $inc = (($5) + 1)|0; + $iter = $inc; + } + $6 = $RateLevelIndex; + $arrayidx2 = (22798 + (($6*18)|0)|0); + $cdf_ptr = $arrayidx2; + $i = 0; + while(1) { + $7 = $i; + $8 = $iter; + $cmp4 = ($7|0)<($8|0); + if (!($cmp4)) { + break; + } + $9 = $i; + $arrayidx5 = (($nLshifts) + ($9<<2)|0); + HEAP32[$arrayidx5>>2] = 0; + $10 = $psRangeDec$addr; + $11 = $cdf_ptr; + $call6 = (_ec_dec_icdf($10,$11,8)|0); + $12 = $i; + $$sink = $12;$call14$sink = $call6; + while(1) { + $arrayidx15 = (($sum_pulses) + ($$sink<<2)|0); + HEAP32[$arrayidx15>>2] = $call14$sink; + $13 = $i; + $arrayidx8 = (($sum_pulses) + ($13<<2)|0); + $14 = HEAP32[$arrayidx8>>2]|0; + $cmp9 = ($14|0)==(17); + $15 = $i; + if (!($cmp9)) { + break; + } + $arrayidx10 = (($nLshifts) + ($15<<2)|0); + $16 = HEAP32[$arrayidx10>>2]|0; + $inc11 = (($16) + 1)|0; + HEAP32[$arrayidx10>>2] = $inc11; + $17 = $psRangeDec$addr; + $18 = $i; + $arrayidx12 = (($nLshifts) + ($18<<2)|0); + $19 = HEAP32[$arrayidx12>>2]|0; + $cmp13 = ($19|0)==(10); + $conv = $cmp13&1; + $add$ptr = ((22960) + ($conv)|0); + $call14 = (_ec_dec_icdf($17,$add$ptr,8)|0); + $20 = $i; + $$sink = $20;$call14$sink = $call14; + } + $inc16 = (($15) + 1)|0; + $i = $inc16; + } + $i = 0; + while(1) { + $21 = $i; + $22 = $iter; + $cmp18 = ($21|0)<($22|0); + if (!($cmp18)) { + break; + } + $23 = $i; + $arrayidx21 = (($sum_pulses) + ($23<<2)|0); + $24 = HEAP32[$arrayidx21>>2]|0; + $cmp22 = ($24|0)>(0); + $25 = $pulses$addr; + $26 = $i; + $conv25 = $26&65535; + $conv26 = $conv25 << 16 >> 16; + $mul27 = $conv26<<4; + $arrayidx28 = (($25) + ($mul27<<1)|0); + if ($cmp22) { + $27 = $psRangeDec$addr; + $28 = $i; + $arrayidx29 = (($sum_pulses) + ($28<<2)|0); + $29 = HEAP32[$arrayidx29>>2]|0; + _silk_shell_decoder($arrayidx28,$27,$29); + } else { + dest=$arrayidx28; stop=dest+32|0; do { HEAP16[dest>>1]=0|0; dest=dest+2|0; } while ((dest|0) < (stop|0)); + } + $30 = $i; + $inc36 = (($30) + 1)|0; + $i = $inc36; + } + $i = 0; + while(1) { + $31 = $i; + $32 = $iter; + $cmp39 = ($31|0)<($32|0); + if (!($cmp39)) { + break; + } + $33 = $i; + $arrayidx42 = (($nLshifts) + ($33<<2)|0); + $34 = HEAP32[$arrayidx42>>2]|0; + $cmp43 = ($34|0)>(0); + if ($cmp43) { + $35 = $i; + $arrayidx46 = (($nLshifts) + ($35<<2)|0); + $36 = HEAP32[$arrayidx46>>2]|0; + $nLS = $36; + $37 = $pulses$addr; + $38 = $i; + $conv47 = $38&65535; + $conv48 = $conv47 << 16 >> 16; + $mul49 = $conv48<<4; + $arrayidx50 = (($37) + ($mul49<<1)|0); + $pulses_ptr = $arrayidx50; + $k = 0; + while(1) { + $39 = $k; + $cmp52 = ($39|0)<(16); + if (!($cmp52)) { + break; + } + $40 = $pulses_ptr; + $41 = $k; + $arrayidx55 = (($40) + ($41<<1)|0); + $42 = HEAP16[$arrayidx55>>1]|0; + $conv56 = $42 << 16 >> 16; + $abs_q = $conv56; + $j = 0; + while(1) { + $43 = $j; + $44 = $nLS; + $cmp58 = ($43|0)<($44|0); + $45 = $abs_q; + if (!($cmp58)) { + break; + } + $shl = $45 << 1; + $abs_q = $shl; + $46 = $psRangeDec$addr; + $call61 = (_ec_dec_icdf($46,22636,8)|0); + $47 = $abs_q; + $add = (($47) + ($call61))|0; + $abs_q = $add; + $48 = $j; + $inc63 = (($48) + 1)|0; + $j = $inc63; + } + $conv65 = $45&65535; + $49 = $pulses_ptr; + $50 = $k; + $arrayidx66 = (($49) + ($50<<1)|0); + HEAP16[$arrayidx66>>1] = $conv65; + $51 = $k; + $inc68 = (($51) + 1)|0; + $k = $inc68; + } + $52 = $nLS; + $shl70 = $52 << 5; + $53 = $i; + $arrayidx71 = (($sum_pulses) + ($53<<2)|0); + $54 = HEAP32[$arrayidx71>>2]|0; + $or = $54 | $shl70; + HEAP32[$arrayidx71>>2] = $or; + } + $55 = $i; + $inc74 = (($55) + 1)|0; + $i = $inc74; + } + $56 = $psRangeDec$addr; + $57 = $pulses$addr; + $58 = $frame_length$addr; + $59 = $signalType$addr; + $60 = $quantOffsetType$addr; + _silk_decode_signs($56,$57,$58,$59,$60,$sum_pulses); + STACKTOP = sp;return; +} +function _silk_decoder_set_fs($psDec,$fs_kHz,$fs_API_Hz) { + $psDec = $psDec|0; + $fs_kHz = $fs_kHz|0; + $fs_API_Hz = $fs_API_Hz|0; + var $$sink = 0, $$sink1 = 0, $$sink1$sink = 0, $$sink2 = 0, $$sink3 = 0, $$sink4 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; + var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; + var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, $LPC_order = 0, $LastGainIndex = 0, $add = 0, $call = 0, $cmp = 0, $cmp10 = 0, $cmp17 = 0, $cmp21 = 0, $cmp24 = 0, $cmp28 = 0, $cmp44 = 0, $cmp50 = 0, $cmp53 = 0, $cmp60 = 0, $cmp64 = 0, $cmp69 = 0, $conv = 0, $conv1 = 0, $conv12 = 0; + var $conv13 = 0, $conv2 = 0, $conv3 = 0, $conv47 = 0, $conv48 = 0, $conv5 = 0, $conv6 = 0, $first_frame_after_reset = 0, $frame_length = 0, $frame_length20 = 0, $frame_length80 = 0, $fs_API_Hz$addr = 0, $fs_API_hz = 0, $fs_API_hz15 = 0, $fs_kHz$addr = 0, $fs_kHz16 = 0, $fs_kHz43 = 0, $fs_kHz79 = 0, $fs_kHz8 = 0, $lagPrev = 0; + var $ltp_mem_length = 0, $mul = 0, $mul14 = 0, $mul49 = 0, $mul7 = 0, $nb_subfr = 0, $nb_subfr27 = 0, $or$cond = 0, $outBuf = 0, $pitch_contour_iCDF = 0, $pitch_lag_low_bits_iCDF67 = 0, $prevSignalType = 0, $psDec$addr = 0, $psNLSF_CB58 = 0, $resampler_state = 0, $ret = 0, $sLPC_Q14_buf = 0, $silk_NLSF_CB_WB$sink = 0, $subfr_length = 0, $subfr_length4 = 0; + var dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $psDec$addr = $psDec; + $fs_kHz$addr = $fs_kHz; + $fs_API_Hz$addr = $fs_API_Hz; + $ret = 0; + $0 = $fs_kHz$addr; + $conv = $0&65535; + $conv1 = $conv << 16 >> 16; + $mul = ($conv1*5)|0; + $1 = $psDec$addr; + $subfr_length = ((($1)) + 2332|0); + HEAP32[$subfr_length>>2] = $mul; + $2 = $psDec$addr; + $nb_subfr = ((($2)) + 2324|0); + $3 = HEAP32[$nb_subfr>>2]|0; + $conv2 = $3&65535; + $conv3 = $conv2 << 16 >> 16; + $4 = $psDec$addr; + $subfr_length4 = ((($4)) + 2332|0); + $5 = HEAP32[$subfr_length4>>2]|0; + $conv5 = $5&65535; + $conv6 = $conv5 << 16 >> 16; + $mul7 = Math_imul($conv3, $conv6)|0; + $frame_length = $mul7; + $6 = $psDec$addr; + $fs_kHz8 = ((($6)) + 2316|0); + $7 = HEAP32[$fs_kHz8>>2]|0; + $8 = $fs_kHz$addr; + $cmp = ($7|0)!=($8|0); + if ($cmp) { + label = 3; + } else { + $9 = $psDec$addr; + $fs_API_hz = ((($9)) + 2320|0); + $10 = HEAP32[$fs_API_hz>>2]|0; + $11 = $fs_API_Hz$addr; + $cmp10 = ($10|0)!=($11|0); + if ($cmp10) { + label = 3; + } + } + if ((label|0) == 3) { + $12 = $psDec$addr; + $resampler_state = ((($12)) + 2432|0); + $13 = $fs_kHz$addr; + $conv12 = $13&65535; + $conv13 = $conv12 << 16 >> 16; + $mul14 = ($conv13*1000)|0; + $14 = $fs_API_Hz$addr; + $call = (_silk_resampler_init($resampler_state,$mul14,$14,0)|0); + $15 = $ret; + $add = (($15) + ($call))|0; + $ret = $add; + $16 = $fs_API_Hz$addr; + $17 = $psDec$addr; + $fs_API_hz15 = ((($17)) + 2320|0); + HEAP32[$fs_API_hz15>>2] = $16; + } + $18 = $psDec$addr; + $fs_kHz16 = ((($18)) + 2316|0); + $19 = HEAP32[$fs_kHz16>>2]|0; + $20 = $fs_kHz$addr; + $cmp17 = ($19|0)!=($20|0); + if (!($cmp17)) { + $21 = $frame_length; + $22 = $psDec$addr; + $frame_length20 = ((($22)) + 2328|0); + $23 = HEAP32[$frame_length20>>2]|0; + $cmp21 = ($21|0)!=($23|0); + if (!($cmp21)) { + $54 = $ret; + STACKTOP = sp;return ($54|0); + } + } + $24 = $fs_kHz$addr; + $cmp24 = ($24|0)==(8); + $25 = $psDec$addr; + $nb_subfr27 = ((($25)) + 2324|0); + $26 = HEAP32[$nb_subfr27>>2]|0; + $cmp28 = ($26|0)==(4); + $27 = $psDec$addr; + $pitch_contour_iCDF = ((($27)) + 2384|0); + $$sink1 = $cmp28 ? 22738 : 22783; + $$sink = $cmp28 ? 22772 : 22795; + $$sink1$sink = $cmp24 ? $$sink : $$sink1; + HEAP32[$pitch_contour_iCDF>>2] = $$sink1$sink; + $28 = $psDec$addr; + $fs_kHz43 = ((($28)) + 2316|0); + $29 = HEAP32[$fs_kHz43>>2]|0; + $30 = $fs_kHz$addr; + $cmp44 = ($29|0)!=($30|0); + if ($cmp44) { + $31 = $fs_kHz$addr; + $conv47 = $31&65535; + $conv48 = $conv47 << 16 >> 16; + $mul49 = ($conv48*20)|0; + $32 = $psDec$addr; + $ltp_mem_length = ((($32)) + 2336|0); + HEAP32[$ltp_mem_length>>2] = $mul49; + $33 = $fs_kHz$addr; + $cmp50 = ($33|0)==(8); + $34 = $fs_kHz$addr; + $cmp53 = ($34|0)==(12); + $or$cond = $cmp50 | $cmp53; + $35 = $psDec$addr; + $LPC_order = ((($35)) + 2340|0); + if ($or$cond) { + HEAP32[$LPC_order>>2] = 10; + $36 = $psDec$addr; + $$sink2 = $36;$silk_NLSF_CB_WB$sink = 17532; + } else { + HEAP32[$LPC_order>>2] = 16; + $37 = $psDec$addr; + $$sink2 = $37;$silk_NLSF_CB_WB$sink = 17568; + } + $psNLSF_CB58 = ((($$sink2)) + 2732|0); + HEAP32[$psNLSF_CB58>>2] = $silk_NLSF_CB_WB$sink; + $38 = $fs_kHz$addr; + $cmp60 = ($38|0)==(16); + do { + if ($cmp60) { + $39 = $psDec$addr; + $$sink3 = 22670;$$sink4 = $39; + label = 16; + } else { + $40 = $fs_kHz$addr; + $cmp64 = ($40|0)==(12); + if ($cmp64) { + $41 = $psDec$addr; + $$sink3 = 22664;$$sink4 = $41; + label = 16; + break; + } + $42 = $fs_kHz$addr; + $cmp69 = ($42|0)==(8); + if ($cmp69) { + $43 = $psDec$addr; + $$sink3 = 22655;$$sink4 = $43; + label = 16; + } + } + } while(0); + if ((label|0) == 16) { + $pitch_lag_low_bits_iCDF67 = ((($$sink4)) + 2380|0); + HEAP32[$pitch_lag_low_bits_iCDF67>>2] = $$sink3; + } + $44 = $psDec$addr; + $first_frame_after_reset = ((($44)) + 2376|0); + HEAP32[$first_frame_after_reset>>2] = 1; + $45 = $psDec$addr; + $lagPrev = ((($45)) + 2308|0); + HEAP32[$lagPrev>>2] = 100; + $46 = $psDec$addr; + $LastGainIndex = ((($46)) + 2312|0); + HEAP8[$LastGainIndex>>0] = 10; + $47 = $psDec$addr; + $prevSignalType = ((($47)) + 4164|0); + HEAP32[$prevSignalType>>2] = 0; + $48 = $psDec$addr; + $outBuf = ((($48)) + 1348|0); + _memset(($outBuf|0),0,960)|0; + $49 = $psDec$addr; + $sLPC_Q14_buf = ((($49)) + 1284|0); + dest=$sLPC_Q14_buf; stop=dest+64|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + } + $50 = $fs_kHz$addr; + $51 = $psDec$addr; + $fs_kHz79 = ((($51)) + 2316|0); + HEAP32[$fs_kHz79>>2] = $50; + $52 = $frame_length; + $53 = $psDec$addr; + $frame_length80 = ((($53)) + 2328|0); + HEAP32[$frame_length80>>2] = $52; + $54 = $ret; + STACKTOP = sp;return ($54|0); +} +function _silk_min_32_395($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)<($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_gains_dequant($gain_Q16,$ind,$prev_ind,$conditional,$nb_subfr) { + $gain_Q16 = $gain_Q16|0; + $ind = $ind|0; + $prev_ind = $prev_ind|0; + $conditional = $conditional|0; + $nb_subfr = $nb_subfr|0; + var $$sink1 = 0, $$sink3 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; + var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add18 = 0, $add38 = 0, $add39 = 0, $add8 = 0; + var $arrayidx = 0, $arrayidx42 = 0, $call = 0, $call40 = 0, $call41 = 0, $cmp = 0, $cmp1 = 0, $cmp2 = 0, $cmp22 = 0, $cmp25 = 0, $cmp9 = 0, $cond31 = 0, $conditional$addr = 0, $conv = 0, $conv17 = 0, $conv19 = 0, $conv21 = 0, $conv24 = 0, $conv29 = 0, $conv3 = 0; + var $conv32 = 0, $conv33 = 0, $conv34 = 0, $conv35 = 0, $conv36 = 0, $conv4 = 0, $conv7 = 0, $double_step_size_threshold = 0, $gain_Q16$addr = 0, $inc = 0, $ind$addr = 0, $ind_tmp = 0, $k = 0, $mul = 0, $mul37 = 0, $nb_subfr$addr = 0, $or$cond = 0, $prev_ind$addr = 0, $shl = 0, $shr = 0; + var $sub = 0, $sub12 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $gain_Q16$addr = $gain_Q16; + $ind$addr = $ind; + $prev_ind$addr = $prev_ind; + $conditional$addr = $conditional; + $nb_subfr$addr = $nb_subfr; + $k = 0; + while(1) { + $0 = $k; + $1 = $nb_subfr$addr; + $cmp = ($0|0)<($1|0); + if (!($cmp)) { + break; + } + $2 = $k; + $cmp1 = ($2|0)==(0); + $3 = $conditional$addr; + $cmp2 = ($3|0)==(0); + $or$cond = $cmp1 & $cmp2; + $4 = $ind$addr; + $5 = $k; + $arrayidx = (($4) + ($5)|0); + $6 = HEAP8[$arrayidx>>0]|0; + $conv = $6 << 24 >> 24; + if ($or$cond) { + $7 = $prev_ind$addr; + $8 = HEAP8[$7>>0]|0; + $conv3 = $8 << 24 >> 24; + $sub = (($conv3) - 16)|0; + $call = (_silk_max_int_398($conv,$sub)|0); + $conv4 = $call&255; + $9 = $prev_ind$addr; + HEAP8[$9>>0] = $conv4; + } else { + $add = (($conv) + -4)|0; + $ind_tmp = $add; + $10 = $prev_ind$addr; + $11 = HEAP8[$10>>0]|0; + $conv7 = $11 << 24 >> 24; + $add8 = (8 + ($conv7))|0; + $double_step_size_threshold = $add8; + $12 = $ind_tmp; + $13 = $double_step_size_threshold; + $cmp9 = ($12|0)>($13|0); + $14 = $ind_tmp; + if ($cmp9) { + $shl = $14 << 1; + $15 = $double_step_size_threshold; + $sub12 = (($shl) - ($15))|0; + $16 = $prev_ind$addr; + $$sink1 = $sub12;$$sink3 = $16; + } else { + $17 = $prev_ind$addr; + $$sink1 = $14;$$sink3 = $17; + } + $18 = HEAP8[$$sink3>>0]|0; + $conv17 = $18 << 24 >> 24; + $add18 = (($conv17) + ($$sink1))|0; + $conv19 = $add18&255; + HEAP8[$$sink3>>0] = $conv19; + } + $19 = $prev_ind$addr; + $20 = HEAP8[$19>>0]|0; + $conv21 = $20 << 24 >> 24; + $cmp22 = ($conv21|0)>(63); + if ($cmp22) { + $cond31 = 63; + } else { + $21 = $prev_ind$addr; + $22 = HEAP8[$21>>0]|0; + $conv24 = $22 << 24 >> 24; + $cmp25 = ($conv24|0)<(0); + if ($cmp25) { + $cond31 = 0; + } else { + $23 = $prev_ind$addr; + $24 = HEAP8[$23>>0]|0; + $conv29 = $24 << 24 >> 24; + $cond31 = $conv29; + } + } + $conv32 = $cond31&255; + $25 = $prev_ind$addr; + HEAP8[$25>>0] = $conv32; + $26 = $prev_ind$addr; + $27 = HEAP8[$26>>0]|0; + $conv33 = $27 << 24 >> 24; + $conv34 = $conv33 << 16 >> 16; + $mul = ($conv34*29)|0; + $28 = $prev_ind$addr; + $29 = HEAP8[$28>>0]|0; + $conv35 = $29 << 24 >> 24; + $conv36 = $conv35 << 16 >> 16; + $mul37 = ($conv36*7281)|0; + $shr = $mul37 >> 16; + $add38 = (($mul) + ($shr))|0; + $add39 = (($add38) + 2090)|0; + $call40 = (_silk_min_32_395($add39,3967)|0); + $call41 = (_silk_log2lin($call40)|0); + $30 = $gain_Q16$addr; + $31 = $k; + $arrayidx42 = (($30) + ($31<<2)|0); + HEAP32[$arrayidx42>>2] = $call41; + $32 = $k; + $inc = (($32) + 1)|0; + $k = $inc; + } + STACKTOP = sp;return; +} +function _silk_max_int_398($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)>($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_NLSF_decode($pNLSF_Q15,$NLSFIndices,$psNLSF_CB) { + $pNLSF_Q15 = $pNLSF_Q15|0; + $NLSFIndices = $NLSFIndices|0; + $psNLSF_CB = $psNLSF_CB|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $CB1_NLSF_Q8 = 0, $NLSFIndices$addr = 0, $NLSF_Q15_tmp = 0, $W_tmp_Q9 = 0, $W_tmp_QW = 0, $add = 0, $arrayidx10 = 0, $arrayidx15 = 0, $arrayidx2 = 0, $arrayidx28 = 0, $arrayidx31 = 0, $arrayidx33 = 0; + var $arrayidx45 = 0, $arrayidx6 = 0, $call = 0, $cmp = 0, $cmp25 = 0, $cmp36 = 0, $cmp38 = 0, $cond = 0, $cond43 = 0, $conv = 0, $conv1 = 0, $conv13 = 0, $conv17 = 0, $conv21 = 0, $conv24 = 0, $conv29 = 0, $conv32 = 0, $conv34 = 0, $conv4 = 0, $conv44 = 0; + var $conv50 = 0, $conv7 = 0, $conv8 = 0, $conv9 = 0, $deltaMin_Q15 = 0, $div = 0, $ec_ix = 0, $i = 0, $inc = 0, $inc47 = 0, $mul = 0, $order = 0, $order18 = 0, $order20 = 0, $order23 = 0, $order3 = 0, $order49 = 0, $pCB_element = 0, $pNLSF_Q15$addr = 0, $pred_Q8 = 0; + var $psNLSF_CB$addr = 0, $quantStepSize_Q16 = 0, $res_Q10 = 0, $shl = 0, $shl30 = 0, $shl35 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); + $pred_Q8 = sp + 128|0; + $ec_ix = sp + 96|0; + $res_Q10 = sp + 64|0; + $W_tmp_QW = sp + 32|0; + $pNLSF_Q15$addr = $pNLSF_Q15; + $NLSFIndices$addr = $NLSFIndices; + $psNLSF_CB$addr = $psNLSF_CB; + $0 = $psNLSF_CB$addr; + $CB1_NLSF_Q8 = ((($0)) + 8|0); + $1 = HEAP32[$CB1_NLSF_Q8>>2]|0; + $2 = $NLSFIndices$addr; + $3 = HEAP8[$2>>0]|0; + $conv = $3 << 24 >> 24; + $4 = $psNLSF_CB$addr; + $order = ((($4)) + 2|0); + $5 = HEAP16[$order>>1]|0; + $conv1 = $5 << 16 >> 16; + $mul = Math_imul($conv, $conv1)|0; + $arrayidx2 = (($1) + ($mul)|0); + $pCB_element = $arrayidx2; + $i = 0; + while(1) { + $6 = $i; + $7 = $psNLSF_CB$addr; + $order3 = ((($7)) + 2|0); + $8 = HEAP16[$order3>>1]|0; + $conv4 = $8 << 16 >> 16; + $cmp = ($6|0)<($conv4|0); + if (!($cmp)) { + break; + } + $9 = $pCB_element; + $10 = $i; + $arrayidx6 = (($9) + ($10)|0); + $11 = HEAP8[$arrayidx6>>0]|0; + $conv7 = $11&255; + $conv8 = $conv7 << 16 >> 16; + $shl = $conv8 << 7; + $conv9 = $shl&65535; + $12 = $pNLSF_Q15$addr; + $13 = $i; + $arrayidx10 = (($12) + ($13<<1)|0); + HEAP16[$arrayidx10>>1] = $conv9; + $14 = $i; + $inc = (($14) + 1)|0; + $i = $inc; + } + $15 = $psNLSF_CB$addr; + $16 = $NLSFIndices$addr; + $17 = HEAP8[$16>>0]|0; + $conv13 = $17 << 24 >> 24; + _silk_NLSF_unpack($ec_ix,$pred_Q8,$15,$conv13); + $18 = $NLSFIndices$addr; + $arrayidx15 = ((($18)) + 1|0); + $19 = $psNLSF_CB$addr; + $quantStepSize_Q16 = ((($19)) + 4|0); + $20 = HEAP16[$quantStepSize_Q16>>1]|0; + $conv17 = $20 << 16 >> 16; + $21 = $psNLSF_CB$addr; + $order18 = ((($21)) + 2|0); + $22 = HEAP16[$order18>>1]|0; + _silk_NLSF_residual_dequant($res_Q10,$arrayidx15,$pred_Q8,$conv17,$22); + $23 = $pNLSF_Q15$addr; + $24 = $psNLSF_CB$addr; + $order20 = ((($24)) + 2|0); + $25 = HEAP16[$order20>>1]|0; + $conv21 = $25 << 16 >> 16; + _silk_NLSF_VQ_weights_laroia($W_tmp_QW,$23,$conv21); + $i = 0; + while(1) { + $26 = $i; + $27 = $psNLSF_CB$addr; + $order23 = ((($27)) + 2|0); + $28 = HEAP16[$order23>>1]|0; + $conv24 = $28 << 16 >> 16; + $cmp25 = ($26|0)<($conv24|0); + if (!($cmp25)) { + break; + } + $29 = $i; + $arrayidx28 = (($W_tmp_QW) + ($29<<1)|0); + $30 = HEAP16[$arrayidx28>>1]|0; + $conv29 = $30 << 16 >> 16; + $shl30 = $conv29 << 16; + $call = (_silk_SQRT_APPROX_405($shl30)|0); + $W_tmp_Q9 = $call; + $31 = $pNLSF_Q15$addr; + $32 = $i; + $arrayidx31 = (($31) + ($32<<1)|0); + $33 = HEAP16[$arrayidx31>>1]|0; + $conv32 = $33 << 16 >> 16; + $34 = $i; + $arrayidx33 = (($res_Q10) + ($34<<1)|0); + $35 = HEAP16[$arrayidx33>>1]|0; + $conv34 = $35 << 16 >> 16; + $shl35 = $conv34 << 14; + $36 = $W_tmp_Q9; + $div = (($shl35|0) / ($36|0))&-1; + $add = (($conv32) + ($div))|0; + $NLSF_Q15_tmp = $add; + $37 = $NLSF_Q15_tmp; + $cmp36 = ($37|0)>(32767); + if ($cmp36) { + $cond43 = 32767; + } else { + $38 = $NLSF_Q15_tmp; + $cmp38 = ($38|0)<(0); + $39 = $NLSF_Q15_tmp; + $cond = $cmp38 ? 0 : $39; + $cond43 = $cond; + } + $conv44 = $cond43&65535; + $40 = $pNLSF_Q15$addr; + $41 = $i; + $arrayidx45 = (($40) + ($41<<1)|0); + HEAP16[$arrayidx45>>1] = $conv44; + $42 = $i; + $inc47 = (($42) + 1)|0; + $i = $inc47; + } + $43 = $pNLSF_Q15$addr; + $44 = $psNLSF_CB$addr; + $deltaMin_Q15 = ((($44)) + 32|0); + $45 = HEAP32[$deltaMin_Q15>>2]|0; + $46 = $psNLSF_CB$addr; + $order49 = ((($46)) + 2|0); + $47 = HEAP16[$order49>>1]|0; + $conv50 = $47 << 16 >> 16; + _silk_NLSF_stabilize($43,$45,$conv50); + STACKTOP = sp;return; +} +function _silk_NLSF_residual_dequant($x_Q10,$indices,$pred_coef_Q8,$quant_step_size_Q16,$order) { + $x_Q10 = $x_Q10|0; + $indices = $indices|0; + $pred_coef_Q8 = $pred_coef_Q8|0; + $quant_step_size_Q16 = $quant_step_size_Q16|0; + $order = $order|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, $add = 0, $add23 = 0, $add24 = 0, $and = 0, $arrayidx = 0, $arrayidx26 = 0, $arrayidx6 = 0, $cmp = 0, $cmp11 = 0, $cmp8 = 0, $conv = 0, $conv16 = 0, $conv17 = 0, $conv19 = 0, $conv2 = 0, $conv20 = 0, $conv25 = 0, $conv3 = 0, $conv4 = 0; + var $conv5 = 0, $conv7 = 0, $dec = 0, $i = 0, $indices$addr = 0, $mul = 0, $mul18 = 0, $mul21 = 0, $order$addr = 0, $out_Q10 = 0, $pred_Q10 = 0, $pred_coef_Q8$addr = 0, $quant_step_size_Q16$addr = 0, $shl = 0, $shr = 0, $shr15 = 0, $shr22 = 0, $sub = 0, $sub10 = 0, $x_Q10$addr = 0; + var label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $x_Q10$addr = $x_Q10; + $indices$addr = $indices; + $pred_coef_Q8$addr = $pred_coef_Q8; + $quant_step_size_Q16$addr = $quant_step_size_Q16; + $order$addr = $order; + $out_Q10 = 0; + $0 = $order$addr; + $conv = $0 << 16 >> 16; + $sub = (($conv) - 1)|0; + $i = $sub; + while(1) { + $1 = $i; + $cmp = ($1|0)>=(0); + if (!($cmp)) { + break; + } + $2 = $out_Q10; + $conv2 = $2&65535; + $conv3 = $conv2 << 16 >> 16; + $3 = $pred_coef_Q8$addr; + $4 = $i; + $arrayidx = (($3) + ($4)|0); + $5 = HEAP8[$arrayidx>>0]|0; + $conv4 = $5&255; + $conv5 = $conv4 << 16 >> 16; + $mul = Math_imul($conv3, $conv5)|0; + $shr = $mul >> 8; + $pred_Q10 = $shr; + $6 = $indices$addr; + $7 = $i; + $arrayidx6 = (($6) + ($7)|0); + $8 = HEAP8[$arrayidx6>>0]|0; + $conv7 = $8 << 24 >> 24; + $shl = $conv7 << 10; + $out_Q10 = $shl; + $9 = $out_Q10; + $cmp8 = ($9|0)>(0); + $10 = $out_Q10; + if ($cmp8) { + $sub10 = (($10) - 102)|0; + $out_Q10 = $sub10; + } else { + $cmp11 = ($10|0)<(0); + if ($cmp11) { + $11 = $out_Q10; + $add = (($11) + 102)|0; + $out_Q10 = $add; + } + } + $12 = $pred_Q10; + $13 = $out_Q10; + $shr15 = $13 >> 16; + $14 = $quant_step_size_Q16$addr; + $conv16 = $14&65535; + $conv17 = $conv16 << 16 >> 16; + $mul18 = Math_imul($shr15, $conv17)|0; + $15 = $out_Q10; + $and = $15 & 65535; + $16 = $quant_step_size_Q16$addr; + $conv19 = $16&65535; + $conv20 = $conv19 << 16 >> 16; + $mul21 = Math_imul($and, $conv20)|0; + $shr22 = $mul21 >> 16; + $add23 = (($mul18) + ($shr22))|0; + $add24 = (($12) + ($add23))|0; + $out_Q10 = $add24; + $17 = $out_Q10; + $conv25 = $17&65535; + $18 = $x_Q10$addr; + $19 = $i; + $arrayidx26 = (($18) + ($19<<1)|0); + HEAP16[$arrayidx26>>1] = $conv25; + $20 = $i; + $dec = (($20) + -1)|0; + $i = $dec; + } + STACKTOP = sp;return; +} +function _silk_SQRT_APPROX_405($x) { + $x = $x|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add17 = 0, $and = 0, $and9 = 0, $cmp = 0, $conv = 0, $conv10 = 0, $conv11 = 0; + var $conv13 = 0, $conv14 = 0, $conv5 = 0, $conv6 = 0, $conv7 = 0, $frac_Q7 = 0, $lz = 0, $mul = 0, $mul12 = 0, $mul15 = 0, $mul8 = 0, $retval = 0, $shr = 0, $shr16 = 0, $shr3 = 0, $shr4 = 0, $tobool = 0, $x$addr = 0, $y = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $lz = sp + 4|0; + $frac_Q7 = sp; + $x$addr = $x; + $0 = $x$addr; + $cmp = ($0|0)<=(0); + if ($cmp) { + $retval = 0; + $11 = $retval; + STACKTOP = sp;return ($11|0); + } + $1 = $x$addr; + _silk_CLZ_FRAC_406($1,$lz,$frac_Q7); + $2 = HEAP32[$lz>>2]|0; + $and = $2 & 1; + $tobool = ($and|0)!=(0); + if ($tobool) { + $y = 32768; + } else { + $y = 46214; + } + $3 = HEAP32[$lz>>2]|0; + $shr = $3 >> 1; + $4 = $y; + $shr3 = $4 >> $shr; + $y = $shr3; + $5 = $y; + $6 = $y; + $shr4 = $6 >> 16; + $7 = HEAP32[$frac_Q7>>2]|0; + $conv = $7&65535; + $conv5 = $conv << 16 >> 16; + $mul = ($conv5*213)|0; + $conv6 = $mul&65535; + $conv7 = $conv6 << 16 >> 16; + $mul8 = Math_imul($shr4, $conv7)|0; + $8 = $y; + $and9 = $8 & 65535; + $9 = HEAP32[$frac_Q7>>2]|0; + $conv10 = $9&65535; + $conv11 = $conv10 << 16 >> 16; + $mul12 = ($conv11*213)|0; + $conv13 = $mul12&65535; + $conv14 = $conv13 << 16 >> 16; + $mul15 = Math_imul($and9, $conv14)|0; + $shr16 = $mul15 >> 16; + $add = (($mul8) + ($shr16))|0; + $add17 = (($5) + ($add))|0; + $y = $add17; + $10 = $y; + $retval = $10; + $11 = $retval; + STACKTOP = sp;return ($11|0); +} +function _silk_CLZ_FRAC_406($in,$lz,$frac_Q7) { + $in = $in|0; + $lz = $lz|0; + $frac_Q7 = $frac_Q7|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $and = 0, $call = 0, $call1 = 0, $frac_Q7$addr = 0, $in$addr = 0, $lz$addr = 0, $lzeros = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $in$addr = $in; + $lz$addr = $lz; + $frac_Q7$addr = $frac_Q7; + $0 = $in$addr; + $call = (_silk_CLZ32_407($0)|0); + $lzeros = $call; + $1 = $lzeros; + $2 = $lz$addr; + HEAP32[$2>>2] = $1; + $3 = $in$addr; + $4 = $lzeros; + $sub = (24 - ($4))|0; + $call1 = (_silk_ROR32_408($3,$sub)|0); + $and = $call1 & 127; + $5 = $frac_Q7$addr; + HEAP32[$5>>2] = $and; + STACKTOP = sp;return; +} +function _silk_CLZ32_407($in32) { + $in32 = $in32|0; + var $0 = 0, $1 = 0, $2 = 0, $cond = 0, $in32$addr = 0, $sub = 0, $sub1 = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $in32$addr = $in32; + $0 = $in32$addr; + $tobool = ($0|0)!=(0); + if (!($tobool)) { + $cond = 32; + STACKTOP = sp;return ($cond|0); + } + $1 = $in32$addr; + $2 = (Math_clz32(($1|0))|0); + $sub = (32 - ($2))|0; + $sub1 = (32 - ($sub))|0; + $cond = $sub1; + STACKTOP = sp;return ($cond|0); +} +function _silk_ROR32_408($a32,$rot) { + $a32 = $a32|0; + $rot = $rot|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a32$addr = 0, $cmp = 0, $cmp1 = 0, $m = 0, $or = 0, $or8 = 0; + var $r = 0, $retval = 0, $rot$addr = 0, $shl = 0, $shl6 = 0, $shr = 0, $shr7 = 0, $sub = 0, $sub3 = 0, $sub5 = 0, $x = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $a32$addr = $a32; + $rot$addr = $rot; + $0 = $a32$addr; + $x = $0; + $1 = $rot$addr; + $r = $1; + $2 = $rot$addr; + $sub = (0 - ($2))|0; + $m = $sub; + $3 = $rot$addr; + $cmp = ($3|0)==(0); + if ($cmp) { + $4 = $a32$addr; + $retval = $4; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } + $5 = $rot$addr; + $cmp1 = ($5|0)<(0); + $6 = $x; + if ($cmp1) { + $7 = $m; + $shl = $6 << $7; + $8 = $x; + $9 = $m; + $sub3 = (32 - ($9))|0; + $shr = $8 >>> $sub3; + $or = $shl | $shr; + $retval = $or; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } else { + $10 = $r; + $sub5 = (32 - ($10))|0; + $shl6 = $6 << $sub5; + $11 = $x; + $12 = $r; + $shr7 = $11 >>> $12; + $or8 = $shl6 | $shr7; + $retval = $or8; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } + return (0)|0; +} +function _silk_PLC_Reset($psDec) { + $psDec = $psDec|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $arrayidx4 = 0, $frame_length = 0, $nb_subfr = 0, $prevGain_Q16 = 0, $prevGain_Q163 = 0, $psDec$addr = 0, $sPLC = 0, $sPLC1 = 0, $sPLC2 = 0, $sPLC5 = 0, $sPLC6 = 0, $shl = 0, $subfr_length = 0; + var label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $psDec$addr = $psDec; + $0 = $psDec$addr; + $frame_length = ((($0)) + 2328|0); + $1 = HEAP32[$frame_length>>2]|0; + $shl = $1 << 7; + $2 = $psDec$addr; + $sPLC = ((($2)) + 4168|0); + HEAP32[$sPLC>>2] = $shl; + $3 = $psDec$addr; + $sPLC1 = ((($3)) + 4168|0); + $prevGain_Q16 = ((($sPLC1)) + 72|0); + HEAP32[$prevGain_Q16>>2] = 65536; + $4 = $psDec$addr; + $sPLC2 = ((($4)) + 4168|0); + $prevGain_Q163 = ((($sPLC2)) + 72|0); + $arrayidx4 = ((($prevGain_Q163)) + 4|0); + HEAP32[$arrayidx4>>2] = 65536; + $5 = $psDec$addr; + $sPLC5 = ((($5)) + 4168|0); + $subfr_length = ((($sPLC5)) + 88|0); + HEAP32[$subfr_length>>2] = 20; + $6 = $psDec$addr; + $sPLC6 = ((($6)) + 4168|0); + $nb_subfr = ((($sPLC6)) + 84|0); + HEAP32[$nb_subfr>>2] = 2; + STACKTOP = sp;return; +} +function _silk_PLC($psDec,$psDecCtrl,$frame,$lost,$arch) { + $psDec = $psDec|0; + $psDecCtrl = $psDecCtrl|0; + $frame = $frame|0; + $lost = $lost|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $arch$addr = 0, $cmp = 0, $frame$addr = 0, $fs_kHz = 0, $fs_kHz1 = 0; + var $fs_kHz2 = 0, $fs_kHz4 = 0, $inc = 0, $lossCnt = 0, $lost$addr = 0, $psDec$addr = 0, $psDecCtrl$addr = 0, $sPLC = 0, $sPLC3 = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $psDec$addr = $psDec; + $psDecCtrl$addr = $psDecCtrl; + $frame$addr = $frame; + $lost$addr = $lost; + $arch$addr = $arch; + $0 = $psDec$addr; + $fs_kHz = ((($0)) + 2316|0); + $1 = HEAP32[$fs_kHz>>2]|0; + $2 = $psDec$addr; + $sPLC = ((($2)) + 4168|0); + $fs_kHz1 = ((($sPLC)) + 80|0); + $3 = HEAP32[$fs_kHz1>>2]|0; + $cmp = ($1|0)!=($3|0); + if ($cmp) { + $4 = $psDec$addr; + _silk_PLC_Reset($4); + $5 = $psDec$addr; + $fs_kHz2 = ((($5)) + 2316|0); + $6 = HEAP32[$fs_kHz2>>2]|0; + $7 = $psDec$addr; + $sPLC3 = ((($7)) + 4168|0); + $fs_kHz4 = ((($sPLC3)) + 80|0); + HEAP32[$fs_kHz4>>2] = $6; + } + $8 = $lost$addr; + $tobool = ($8|0)!=(0); + $9 = $psDec$addr; + $10 = $psDecCtrl$addr; + if ($tobool) { + $11 = $frame$addr; + $12 = $arch$addr; + _silk_PLC_conceal($9,$10,$11,$12); + $13 = $psDec$addr; + $lossCnt = ((($13)) + 4160|0); + $14 = HEAP32[$lossCnt>>2]|0; + $inc = (($14) + 1)|0; + HEAP32[$lossCnt>>2] = $inc; + STACKTOP = sp;return; + } else { + _silk_PLC_update($9,$10); + STACKTOP = sp;return; + } +} +function _silk_PLC_conceal($psDec,$psDecCtrl,$frame,$arch) { + $psDec = $psDec|0; + $psDecCtrl = $psDecCtrl|0; + $frame = $frame|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; + var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0; + var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0; + var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; + var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; + var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $A_Q12 = 0, $B_Q14 = 0, $LPC_order = 0, $LPC_order104 = 0, $LPC_order110 = 0, $LPC_order285 = 0, $LPC_order458 = 0, $LPC_order47 = 0, $LPC_order73 = 0, $LPC_order96 = 0; + var $LPC_pred_Q10 = 0, $LTPCoef_Q14 = 0, $LTP_pred_Q12 = 0, $add = 0, $add111 = 0, $add126 = 0, $add137 = 0, $add155 = 0, $add156 = 0, $add168 = 0, $add169 = 0, $add181 = 0, $add182 = 0, $add194 = 0, $add195 = 0, $add207 = 0, $add208 = 0, $add210 = 0, $add222 = 0, $add223 = 0; + var $add259 = 0, $add260 = 0, $add271 = 0, $add287 = 0, $add294 = 0, $add302 = 0, $add303 = 0, $add304 = 0, $add311 = 0, $add319 = 0, $add320 = 0, $add321 = 0, $add328 = 0, $add336 = 0, $add337 = 0, $add338 = 0, $add345 = 0, $add353 = 0, $add354 = 0, $add355 = 0; + var $add362 = 0, $add370 = 0, $add371 = 0, $add372 = 0, $add379 = 0, $add387 = 0, $add388 = 0, $add389 = 0, $add396 = 0, $add404 = 0, $add405 = 0, $add406 = 0, $add413 = 0, $add421 = 0, $add422 = 0, $add423 = 0, $add430 = 0, $add438 = 0, $add439 = 0, $add440 = 0; + var $add447 = 0, $add455 = 0, $add456 = 0, $add462 = 0, $add470 = 0, $add479 = 0, $add480 = 0, $add484 = 0, $add487 = 0, $add488 = 0, $add490 = 0, $add497 = 0, $add505 = 0, $add506 = 0, $add510 = 0, $add513 = 0, $add515 = 0, $add521 = 0, $add528 = 0, $add536 = 0; + var $add537 = 0, $add541 = 0, $add544 = 0, $add546 = 0, $add552 = 0, $add559 = 0, $add567 = 0, $add568 = 0, $add572 = 0, $add575 = 0, $add577 = 0, $add587 = 0, $add594 = 0, $add602 = 0, $add603 = 0, $add607 = 0, $add610 = 0, $add612 = 0, $add618 = 0, $add625 = 0; + var $add633 = 0, $add634 = 0, $add638 = 0, $add641 = 0, $add643 = 0, $add649 = 0, $add656 = 0, $add664 = 0, $add665 = 0, $add669 = 0, $add672 = 0, $add674 = 0, $add684 = 0, $add691 = 0, $add699 = 0, $add700 = 0, $add704 = 0, $add707 = 0, $add709 = 0, $add715 = 0; + var $add722 = 0, $add730 = 0, $add731 = 0, $add735 = 0, $add738 = 0, $add740 = 0, $add746 = 0, $add753 = 0, $add761 = 0, $add762 = 0, $add766 = 0, $add769 = 0, $add771 = 0, $add85 = 0, $add91 = 0, $and = 0, $and121 = 0, $and150 = 0, $and163 = 0, $and176 = 0; + var $and189 = 0, $and202 = 0, $and212 = 0, $and218 = 0, $and256 = 0, $and297 = 0, $and314 = 0, $and331 = 0, $and348 = 0, $and365 = 0, $and382 = 0, $and399 = 0, $and416 = 0, $and433 = 0, $and450 = 0, $and474 = 0, $and499 = 0, $and530 = 0, $and561 = 0, $and596 = 0; + var $and627 = 0, $and658 = 0, $and693 = 0, $and724 = 0, $and755 = 0, $arch$addr = 0, $arrayidx100 = 0, $arrayidx106 = 0, $arrayidx118 = 0, $arrayidx122 = 0, $arrayidx127 = 0, $arrayidx138 = 0, $arrayidx157 = 0, $arrayidx159 = 0, $arrayidx162 = 0, $arrayidx164 = 0, $arrayidx17 = 0, $arrayidx170 = 0, $arrayidx172 = 0, $arrayidx175 = 0; + var $arrayidx177 = 0, $arrayidx183 = 0, $arrayidx185 = 0, $arrayidx188 = 0, $arrayidx190 = 0, $arrayidx196 = 0, $arrayidx198 = 0, $arrayidx201 = 0, $arrayidx203 = 0, $arrayidx213 = 0, $arrayidx217 = 0, $arrayidx225 = 0, $arrayidx236 = 0, $arrayidx24 = 0, $arrayidx241 = 0, $arrayidx278 = 0, $arrayidx28 = 0, $arrayidx289 = 0, $arrayidx296 = 0, $arrayidx306 = 0; + var $arrayidx308 = 0, $arrayidx313 = 0, $arrayidx315 = 0, $arrayidx323 = 0, $arrayidx325 = 0, $arrayidx330 = 0, $arrayidx332 = 0, $arrayidx34 = 0, $arrayidx340 = 0, $arrayidx342 = 0, $arrayidx347 = 0, $arrayidx349 = 0, $arrayidx357 = 0, $arrayidx359 = 0, $arrayidx364 = 0, $arrayidx366 = 0, $arrayidx374 = 0, $arrayidx376 = 0, $arrayidx381 = 0, $arrayidx383 = 0; + var $arrayidx39 = 0, $arrayidx391 = 0, $arrayidx393 = 0, $arrayidx398 = 0, $arrayidx400 = 0, $arrayidx408 = 0, $arrayidx410 = 0, $arrayidx415 = 0, $arrayidx417 = 0, $arrayidx425 = 0, $arrayidx427 = 0, $arrayidx432 = 0, $arrayidx434 = 0, $arrayidx442 = 0, $arrayidx444 = 0, $arrayidx449 = 0, $arrayidx451 = 0, $arrayidx465 = 0, $arrayidx467 = 0, $arrayidx473 = 0; + var $arrayidx475 = 0, $arrayidx485 = 0, $arrayidx489 = 0, $arrayidx491 = 0, $arrayidx493 = 0, $arrayidx498 = 0, $arrayidx5 = 0, $arrayidx500 = 0, $arrayidx507 = 0, $arrayidx508 = 0, $arrayidx522 = 0, $arrayidx524 = 0, $arrayidx529 = 0, $arrayidx531 = 0, $arrayidx538 = 0, $arrayidx539 = 0, $arrayidx553 = 0, $arrayidx555 = 0, $arrayidx560 = 0, $arrayidx562 = 0; + var $arrayidx569 = 0, $arrayidx570 = 0, $arrayidx588 = 0, $arrayidx59 = 0, $arrayidx590 = 0, $arrayidx595 = 0, $arrayidx597 = 0, $arrayidx604 = 0, $arrayidx605 = 0, $arrayidx619 = 0, $arrayidx621 = 0, $arrayidx626 = 0, $arrayidx628 = 0, $arrayidx635 = 0, $arrayidx636 = 0, $arrayidx650 = 0, $arrayidx652 = 0, $arrayidx657 = 0, $arrayidx659 = 0, $arrayidx666 = 0; + var $arrayidx667 = 0, $arrayidx685 = 0, $arrayidx687 = 0, $arrayidx692 = 0, $arrayidx694 = 0, $arrayidx7 = 0, $arrayidx701 = 0, $arrayidx702 = 0, $arrayidx716 = 0, $arrayidx718 = 0, $arrayidx723 = 0, $arrayidx725 = 0, $arrayidx732 = 0, $arrayidx733 = 0, $arrayidx747 = 0, $arrayidx749 = 0, $arrayidx754 = 0, $arrayidx756 = 0, $arrayidx763 = 0, $arrayidx764 = 0; + var $arrayidx782 = 0, $arrayidx789 = 0, $arrayidx796 = 0, $arrayidx99 = 0, $call = 0, $call107 = 0, $call23 = 0, $call267 = 0, $call27 = 0, $call33 = 0, $call64 = 0, $call74 = 0, $call75 = 0, $call76 = 0, $cmp = 0, $cmp108 = 0, $cmp114 = 0, $cmp133 = 0, $cmp141 = 0, $cmp231 = 0; + var $cmp282 = 0, $cmp29 = 0, $cmp459 = 0, $cmp50 = 0, $cmp517 = 0, $cmp54 = 0, $cmp548 = 0, $cmp57 = 0, $cmp583 = 0, $cmp614 = 0, $cmp645 = 0, $cmp680 = 0, $cmp711 = 0, $cmp742 = 0, $cmp793 = 0, $cond = 0, $cond582 = 0, $cond679 = 0, $cond780 = 0, $conv = 0; + var $conv119 = 0, $conv123 = 0, $conv147 = 0, $conv152 = 0, $conv160 = 0, $conv165 = 0, $conv173 = 0, $conv178 = 0, $conv186 = 0, $conv191 = 0, $conv199 = 0, $conv204 = 0, $conv215 = 0, $conv219 = 0, $conv234 = 0, $conv235 = 0, $conv237 = 0, $conv240 = 0, $conv245 = 0, $conv246 = 0; + var $conv247 = 0, $conv250 = 0, $conv263 = 0, $conv264 = 0, $conv292 = 0, $conv299 = 0, $conv309 = 0, $conv316 = 0, $conv326 = 0, $conv333 = 0, $conv343 = 0, $conv35 = 0, $conv350 = 0, $conv360 = 0, $conv367 = 0, $conv377 = 0, $conv384 = 0, $conv394 = 0, $conv40 = 0, $conv401 = 0; + var $conv411 = 0, $conv418 = 0, $conv428 = 0, $conv435 = 0, $conv445 = 0, $conv452 = 0, $conv468 = 0, $conv476 = 0, $conv494 = 0, $conv495 = 0, $conv501 = 0, $conv502 = 0, $conv525 = 0, $conv526 = 0, $conv532 = 0, $conv533 = 0, $conv556 = 0, $conv557 = 0, $conv563 = 0, $conv564 = 0; + var $conv591 = 0, $conv592 = 0, $conv598 = 0, $conv599 = 0, $conv60 = 0, $conv61 = 0, $conv622 = 0, $conv623 = 0, $conv629 = 0, $conv63 = 0, $conv630 = 0, $conv65 = 0, $conv653 = 0, $conv654 = 0, $conv66 = 0, $conv660 = 0, $conv661 = 0, $conv688 = 0, $conv689 = 0, $conv69 = 0; + var $conv695 = 0, $conv696 = 0, $conv719 = 0, $conv720 = 0, $conv726 = 0, $conv727 = 0, $conv750 = 0, $conv751 = 0, $conv757 = 0, $conv758 = 0, $conv78 = 0, $conv781 = 0, $conv79 = 0, $conv81 = 0, $conv82 = 0, $down_scale_Q30 = 0, $energy1 = 0, $energy2 = 0, $exc_Q14 = 0, $exc_Q1413 = 0; + var $first_frame_after_reset = 0, $frame$addr = 0, $frame_length = 0, $frame_length281 = 0, $frame_length788 = 0, $fs_kHz = 0, $harm_Gain_Q15 = 0, $i = 0, $idx = 0, $inc = 0, $inc129 = 0, $inc226 = 0, $inc228 = 0, $inc243 = 0, $inc274 = 0, $inc482 = 0, $inc784 = 0, $inc798 = 0, $incdec$ptr = 0, $invGain_Q30 = 0; + var $inv_gain_Q30 = 0, $j = 0, $k = 0, $lag = 0, $lossCnt = 0, $lossCnt32 = 0, $lossCnt49 = 0, $ltp_mem_length = 0, $ltp_mem_length1 = 0, $ltp_mem_length102 = 0, $ltp_mem_length113 = 0, $ltp_mem_length276 = 0, $ltp_mem_length93 = 0, $ltp_mem_length94 = 0, $mul = 0, $mul120 = 0, $mul124 = 0, $mul148 = 0, $mul153 = 0, $mul161 = 0; + var $mul166 = 0, $mul174 = 0, $mul179 = 0, $mul187 = 0, $mul192 = 0, $mul200 = 0, $mul205 = 0, $mul209 = 0, $mul21 = 0, $mul216 = 0, $mul220 = 0, $mul238 = 0, $mul248 = 0, $mul254 = 0, $mul257 = 0, $mul265 = 0, $mul293 = 0, $mul300 = 0, $mul310 = 0, $mul317 = 0; + var $mul327 = 0, $mul334 = 0, $mul344 = 0, $mul351 = 0, $mul361 = 0, $mul368 = 0, $mul378 = 0, $mul385 = 0, $mul395 = 0, $mul402 = 0, $mul412 = 0, $mul419 = 0, $mul429 = 0, $mul436 = 0, $mul446 = 0, $mul453 = 0, $mul469 = 0, $mul477 = 0, $mul48 = 0, $mul496 = 0; + var $mul503 = 0, $mul512 = 0, $mul527 = 0, $mul534 = 0, $mul543 = 0, $mul558 = 0, $mul565 = 0, $mul574 = 0, $mul593 = 0, $mul600 = 0, $mul609 = 0, $mul624 = 0, $mul631 = 0, $mul640 = 0, $mul655 = 0, $mul662 = 0, $mul67 = 0, $mul671 = 0, $mul690 = 0, $mul697 = 0; + var $mul706 = 0, $mul721 = 0, $mul728 = 0, $mul737 = 0, $mul752 = 0, $mul759 = 0, $mul768 = 0, $mul80 = 0, $mul83 = 0, $nb_subfr = 0, $nb_subfr132 = 0, $nb_subfr14 = 0, $outBuf = 0, $pred_lag_ptr = 0, $prevGain_Q10 = 0, $prevGain_Q16 = 0, $prevGain_Q16105 = 0, $prevGain_Q164 = 0, $prevLPC_Q12 = 0, $prevLPC_Q1242 = 0; + var $prevLPC_Q1245 = 0, $prevLPC_Q1271 = 0, $prevLTP_scale_Q14 = 0, $prevSignalType = 0, $prevSignalType53 = 0, $psDec$addr = 0, $psDecCtrl$addr = 0, $psPLC = 0, $randScale_Q14 = 0, $randScale_Q14791 = 0, $rand_Gain_Q15 = 0, $rand_ptr = 0, $rand_scale_Q14 = 0, $rand_seed = 0, $rand_seed790 = 0, $rand_seed89 = 0, $sLPC_Q14_buf = 0, $sLPC_Q14_buf786 = 0, $sLPC_Q14_ptr = 0, $sLTP_buf_idx = 0; + var $sPLC = 0, $saved_stack = 0, $shift1 = 0, $shift2 = 0, $shl = 0, $shl224 = 0, $shl266 = 0, $shl486 = 0, $shr = 0, $shr10 = 0, $shr11 = 0, $shr117 = 0, $shr125 = 0, $shr145 = 0, $shr154 = 0, $shr158 = 0, $shr167 = 0, $shr171 = 0, $shr180 = 0, $shr184 = 0; + var $shr193 = 0, $shr197 = 0, $shr206 = 0, $shr211 = 0, $shr214 = 0, $shr221 = 0, $shr239 = 0, $shr249 = 0, $shr253 = 0, $shr258 = 0, $shr270 = 0, $shr272 = 0, $shr286 = 0, $shr290 = 0, $shr301 = 0, $shr307 = 0, $shr318 = 0, $shr324 = 0, $shr335 = 0, $shr341 = 0; + var $shr352 = 0, $shr358 = 0, $shr369 = 0, $shr375 = 0, $shr386 = 0, $shr392 = 0, $shr403 = 0, $shr409 = 0, $shr420 = 0, $shr426 = 0, $shr437 = 0, $shr443 = 0, $shr454 = 0, $shr466 = 0, $shr478 = 0, $shr492 = 0, $shr504 = 0, $shr509 = 0, $shr511 = 0, $shr514 = 0; + var $shr516 = 0, $shr523 = 0, $shr535 = 0, $shr540 = 0, $shr542 = 0, $shr545 = 0, $shr547 = 0, $shr554 = 0, $shr566 = 0, $shr571 = 0, $shr573 = 0, $shr576 = 0, $shr578 = 0, $shr589 = 0, $shr6 = 0, $shr601 = 0, $shr606 = 0, $shr608 = 0, $shr611 = 0, $shr613 = 0; + var $shr620 = 0, $shr632 = 0, $shr637 = 0, $shr639 = 0, $shr642 = 0, $shr644 = 0, $shr651 = 0, $shr663 = 0, $shr668 = 0, $shr670 = 0, $shr673 = 0, $shr675 = 0, $shr68 = 0, $shr686 = 0, $shr698 = 0, $shr703 = 0, $shr705 = 0, $shr708 = 0, $shr710 = 0, $shr717 = 0; + var $shr729 = 0, $shr734 = 0, $shr736 = 0, $shr739 = 0, $shr741 = 0, $shr748 = 0, $shr760 = 0, $shr765 = 0, $shr767 = 0, $shr77 = 0, $shr770 = 0, $shr772 = 0, $shr84 = 0, $shr86 = 0, $shr90 = 0, $shr92 = 0, $sub = 0, $sub103 = 0, $sub136 = 0, $sub16 = 0; + var $sub22 = 0, $sub277 = 0, $sub288 = 0, $sub295 = 0, $sub305 = 0, $sub312 = 0, $sub322 = 0, $sub329 = 0, $sub339 = 0, $sub346 = 0, $sub356 = 0, $sub363 = 0, $sub373 = 0, $sub380 = 0, $sub390 = 0, $sub397 = 0, $sub407 = 0, $sub414 = 0, $sub424 = 0, $sub431 = 0; + var $sub441 = 0, $sub448 = 0, $sub463 = 0, $sub464 = 0, $sub471 = 0, $sub472 = 0, $sub62 = 0, $sub95 = 0, $sub97 = 0, $sub98 = 0, $subfr_length = 0, $subfr_length140 = 0, $subfr_length15 = 0, $subfr_length20 = 0, $tobool = 0, $vla = 0, $vla$alloca_mul = 0, $vla2 = 0, $vla2$alloca_mul = 0, dest = 0; + var label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 176|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(176|0); + $shift1 = sp + 80|0; + $shift2 = sp + 76|0; + $energy1 = sp + 56|0; + $energy2 = sp + 52|0; + $A_Q12 = sp + 128|0; + $prevGain_Q10 = sp + 16|0; + $psDec$addr = $psDec; + $psDecCtrl$addr = $psDecCtrl; + $frame$addr = $frame; + $arch$addr = $arch; + $0 = $psDec$addr; + $sPLC = ((($0)) + 4168|0); + $psPLC = $sPLC; + $1 = $psDec$addr; + $ltp_mem_length = ((($1)) + 2336|0); + $2 = HEAP32[$ltp_mem_length>>2]|0; + $3 = $psDec$addr; + $frame_length = ((($3)) + 2328|0); + $4 = HEAP32[$frame_length>>2]|0; + $add = (($2) + ($4))|0; + $5 = (_llvm_stacksave()|0); + $saved_stack = $5; + $vla$alloca_mul = $add<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $6 = $psDec$addr; + $ltp_mem_length1 = ((($6)) + 2336|0); + $7 = HEAP32[$ltp_mem_length1>>2]|0; + $vla2$alloca_mul = $7<<1; + $vla2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla2$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla2$alloca_mul)|0)+15)&-16)|0);; + $8 = $psPLC; + $prevGain_Q16 = ((($8)) + 72|0); + $9 = HEAP32[$prevGain_Q16>>2]|0; + $shr = $9 >> 6; + HEAP32[$prevGain_Q10>>2] = $shr; + $10 = $psPLC; + $prevGain_Q164 = ((($10)) + 72|0); + $arrayidx5 = ((($prevGain_Q164)) + 4|0); + $11 = HEAP32[$arrayidx5>>2]|0; + $shr6 = $11 >> 6; + $arrayidx7 = ((($prevGain_Q10)) + 4|0); + HEAP32[$arrayidx7>>2] = $shr6; + $12 = $psDec$addr; + $first_frame_after_reset = ((($12)) + 2376|0); + $13 = HEAP32[$first_frame_after_reset>>2]|0; + $tobool = ($13|0)!=(0); + if ($tobool) { + $14 = $psPLC; + $prevLPC_Q12 = ((($14)) + 14|0); + dest=$prevLPC_Q12; stop=dest+32|0; do { HEAP16[dest>>1]=0|0; dest=dest+2|0; } while ((dest|0) < (stop|0)); + } + $15 = $psDec$addr; + $exc_Q14 = ((($15)) + 4|0); + $16 = $psDec$addr; + $subfr_length = ((($16)) + 2332|0); + $17 = HEAP32[$subfr_length>>2]|0; + $18 = $psDec$addr; + $nb_subfr = ((($18)) + 2324|0); + $19 = HEAP32[$nb_subfr>>2]|0; + _silk_PLC_energy($energy1,$shift1,$energy2,$shift2,$exc_Q14,$prevGain_Q10,$17,$19); + $20 = HEAP32[$energy1>>2]|0; + $21 = HEAP32[$shift2>>2]|0; + $shr10 = $20 >> $21; + $22 = HEAP32[$energy2>>2]|0; + $23 = HEAP32[$shift1>>2]|0; + $shr11 = $22 >> $23; + $cmp = ($shr10|0)<($shr11|0); + $24 = $psDec$addr; + $exc_Q1413 = ((($24)) + 4|0); + $25 = $psPLC; + $nb_subfr14 = ((($25)) + 84|0); + $26 = HEAP32[$nb_subfr14>>2]|0; + if ($cmp) { + $sub = (($26) - 1)|0; + $27 = $psPLC; + $subfr_length15 = ((($27)) + 88|0); + $28 = HEAP32[$subfr_length15>>2]|0; + $mul = Math_imul($sub, $28)|0; + $sub16 = (($mul) - 128)|0; + $call = (_silk_max_int_423(0,$sub16)|0); + $arrayidx17 = (($exc_Q1413) + ($call<<2)|0); + $rand_ptr = $arrayidx17; + } else { + $29 = $psPLC; + $subfr_length20 = ((($29)) + 88|0); + $30 = HEAP32[$subfr_length20>>2]|0; + $mul21 = Math_imul($26, $30)|0; + $sub22 = (($mul21) - 128)|0; + $call23 = (_silk_max_int_423(0,$sub22)|0); + $arrayidx24 = (($exc_Q1413) + ($call23<<2)|0); + $rand_ptr = $arrayidx24; + } + $31 = $psPLC; + $LTPCoef_Q14 = ((($31)) + 4|0); + $B_Q14 = $LTPCoef_Q14; + $32 = $psPLC; + $randScale_Q14 = ((($32)) + 56|0); + $33 = HEAP16[$randScale_Q14>>1]|0; + $rand_scale_Q14 = $33; + $34 = $psDec$addr; + $lossCnt = ((($34)) + 4160|0); + $35 = HEAP32[$lossCnt>>2]|0; + $call27 = (_silk_min_int_424(1,$35)|0); + $arrayidx28 = (20632 + ($call27<<1)|0); + $36 = HEAP16[$arrayidx28>>1]|0; + $conv = $36 << 16 >> 16; + $harm_Gain_Q15 = $conv; + $37 = $psDec$addr; + $prevSignalType = ((($37)) + 4164|0); + $38 = HEAP32[$prevSignalType>>2]|0; + $cmp29 = ($38|0)==(2); + $39 = $psDec$addr; + $lossCnt32 = ((($39)) + 4160|0); + $40 = HEAP32[$lossCnt32>>2]|0; + $call33 = (_silk_min_int_424(1,$40)|0); + if ($cmp29) { + $arrayidx34 = (20636 + ($call33<<1)|0); + $41 = HEAP16[$arrayidx34>>1]|0; + $conv35 = $41 << 16 >> 16; + $rand_Gain_Q15 = $conv35; + } else { + $arrayidx39 = (20640 + ($call33<<1)|0); + $42 = HEAP16[$arrayidx39>>1]|0; + $conv40 = $42 << 16 >> 16; + $rand_Gain_Q15 = $conv40; + } + $43 = $psPLC; + $prevLPC_Q1242 = ((($43)) + 14|0); + $44 = $psDec$addr; + $LPC_order = ((($44)) + 2340|0); + $45 = HEAP32[$LPC_order>>2]|0; + _silk_bwexpander($prevLPC_Q1242,$45,64881); + $46 = $psPLC; + $prevLPC_Q1245 = ((($46)) + 14|0); + $47 = $psDec$addr; + $LPC_order47 = ((($47)) + 2340|0); + $48 = HEAP32[$LPC_order47>>2]|0; + $mul48 = $48<<1; + _memcpy(($A_Q12|0),($prevLPC_Q1245|0),($mul48|0))|0; + $49 = $psDec$addr; + $lossCnt49 = ((($49)) + 4160|0); + $50 = HEAP32[$lossCnt49>>2]|0; + $cmp50 = ($50|0)==(0); + do { + if ($cmp50) { + $rand_scale_Q14 = 16384; + $51 = $psDec$addr; + $prevSignalType53 = ((($51)) + 4164|0); + $52 = HEAP32[$prevSignalType53>>2]|0; + $cmp54 = ($52|0)==(2); + if (!($cmp54)) { + $63 = $psPLC; + $prevLPC_Q1271 = ((($63)) + 14|0); + $64 = $psDec$addr; + $LPC_order73 = ((($64)) + 2340|0); + $65 = HEAP32[$LPC_order73>>2]|0; + $call74 = (_silk_LPC_inverse_pred_gain($prevLPC_Q1271,$65)|0); + $invGain_Q30 = $call74; + $66 = $invGain_Q30; + $call75 = (_silk_min_32_425(134217728,$66)|0); + $down_scale_Q30 = $call75; + $67 = $down_scale_Q30; + $call76 = (_silk_max_32_426(4194304,$67)|0); + $down_scale_Q30 = $call76; + $68 = $down_scale_Q30; + $shl = $68 << 3; + $down_scale_Q30 = $shl; + $69 = $down_scale_Q30; + $shr77 = $69 >> 16; + $70 = $rand_Gain_Q15; + $conv78 = $70&65535; + $conv79 = $conv78 << 16 >> 16; + $mul80 = Math_imul($shr77, $conv79)|0; + $71 = $down_scale_Q30; + $and = $71 & 65535; + $72 = $rand_Gain_Q15; + $conv81 = $72&65535; + $conv82 = $conv81 << 16 >> 16; + $mul83 = Math_imul($and, $conv82)|0; + $shr84 = $mul83 >> 16; + $add85 = (($mul80) + ($shr84))|0; + $shr86 = $add85 >> 14; + $rand_Gain_Q15 = $shr86; + break; + } + $i = 0; + while(1) { + $53 = $i; + $cmp57 = ($53|0)<(5); + if (!($cmp57)) { + break; + } + $54 = $B_Q14; + $55 = $i; + $arrayidx59 = (($54) + ($55<<1)|0); + $56 = HEAP16[$arrayidx59>>1]|0; + $conv60 = $56 << 16 >> 16; + $57 = $rand_scale_Q14; + $conv61 = $57 << 16 >> 16; + $sub62 = (($conv61) - ($conv60))|0; + $conv63 = $sub62&65535; + $rand_scale_Q14 = $conv63; + $58 = $i; + $inc = (($58) + 1)|0; + $i = $inc; + } + $59 = $rand_scale_Q14; + $call64 = (_silk_max_16(3277,$59)|0); + $rand_scale_Q14 = $call64; + $60 = $rand_scale_Q14; + $conv65 = $60 << 16 >> 16; + $61 = $psPLC; + $prevLTP_scale_Q14 = ((($61)) + 68|0); + $62 = HEAP16[$prevLTP_scale_Q14>>1]|0; + $conv66 = $62 << 16 >> 16; + $mul67 = Math_imul($conv65, $conv66)|0; + $shr68 = $mul67 >> 14; + $conv69 = $shr68&65535; + $rand_scale_Q14 = $conv69; + } + } while(0); + $73 = $psPLC; + $rand_seed89 = ((($73)) + 52|0); + $74 = HEAP32[$rand_seed89>>2]|0; + $rand_seed = $74; + $75 = $psPLC; + $76 = HEAP32[$75>>2]|0; + $shr90 = $76 >> 7; + $add91 = (($shr90) + 1)|0; + $shr92 = $add91 >> 1; + $lag = $shr92; + $77 = $psDec$addr; + $ltp_mem_length93 = ((($77)) + 2336|0); + $78 = HEAP32[$ltp_mem_length93>>2]|0; + $sLTP_buf_idx = $78; + $79 = $psDec$addr; + $ltp_mem_length94 = ((($79)) + 2336|0); + $80 = HEAP32[$ltp_mem_length94>>2]|0; + $81 = $lag; + $sub95 = (($80) - ($81))|0; + $82 = $psDec$addr; + $LPC_order96 = ((($82)) + 2340|0); + $83 = HEAP32[$LPC_order96>>2]|0; + $sub97 = (($sub95) - ($83))|0; + $sub98 = (($sub97) - 2)|0; + $idx = $sub98; + $84 = $idx; + $arrayidx99 = (($vla2) + ($84<<1)|0); + $85 = $psDec$addr; + $outBuf = ((($85)) + 1348|0); + $86 = $idx; + $arrayidx100 = (($outBuf) + ($86<<1)|0); + $87 = $psDec$addr; + $ltp_mem_length102 = ((($87)) + 2336|0); + $88 = HEAP32[$ltp_mem_length102>>2]|0; + $89 = $idx; + $sub103 = (($88) - ($89))|0; + $90 = $psDec$addr; + $LPC_order104 = ((($90)) + 2340|0); + $91 = HEAP32[$LPC_order104>>2]|0; + $92 = $arch$addr; + _silk_LPC_analysis_filter($arrayidx99,$arrayidx100,$A_Q12,$sub103,$91,$92); + $93 = $psPLC; + $prevGain_Q16105 = ((($93)) + 72|0); + $arrayidx106 = ((($prevGain_Q16105)) + 4|0); + $94 = HEAP32[$arrayidx106>>2]|0; + $call107 = (_silk_INVERSE32_varQ_427($94,46)|0); + $inv_gain_Q30 = $call107; + $95 = $inv_gain_Q30; + $cmp108 = ($95|0)<(1073741823); + $96 = $inv_gain_Q30; + $cond = $cmp108 ? $96 : 1073741823; + $inv_gain_Q30 = $cond; + $97 = $idx; + $98 = $psDec$addr; + $LPC_order110 = ((($98)) + 2340|0); + $99 = HEAP32[$LPC_order110>>2]|0; + $add111 = (($97) + ($99))|0; + $i = $add111; + while(1) { + $100 = $i; + $101 = $psDec$addr; + $ltp_mem_length113 = ((($101)) + 2336|0); + $102 = HEAP32[$ltp_mem_length113>>2]|0; + $cmp114 = ($100|0)<($102|0); + if (!($cmp114)) { + break; + } + $103 = $inv_gain_Q30; + $shr117 = $103 >> 16; + $104 = $i; + $arrayidx118 = (($vla2) + ($104<<1)|0); + $105 = HEAP16[$arrayidx118>>1]|0; + $conv119 = $105 << 16 >> 16; + $mul120 = Math_imul($shr117, $conv119)|0; + $106 = $inv_gain_Q30; + $and121 = $106 & 65535; + $107 = $i; + $arrayidx122 = (($vla2) + ($107<<1)|0); + $108 = HEAP16[$arrayidx122>>1]|0; + $conv123 = $108 << 16 >> 16; + $mul124 = Math_imul($and121, $conv123)|0; + $shr125 = $mul124 >> 16; + $add126 = (($mul120) + ($shr125))|0; + $109 = $i; + $arrayidx127 = (($vla) + ($109<<2)|0); + HEAP32[$arrayidx127>>2] = $add126; + $110 = $i; + $inc129 = (($110) + 1)|0; + $i = $inc129; + } + $k = 0; + while(1) { + $111 = $k; + $112 = $psDec$addr; + $nb_subfr132 = ((($112)) + 2324|0); + $113 = HEAP32[$nb_subfr132>>2]|0; + $cmp133 = ($111|0)<($113|0); + if (!($cmp133)) { + break; + } + $114 = $sLTP_buf_idx; + $115 = $lag; + $sub136 = (($114) - ($115))|0; + $add137 = (($sub136) + 2)|0; + $arrayidx138 = (($vla) + ($add137<<2)|0); + $pred_lag_ptr = $arrayidx138; + $i = 0; + while(1) { + $116 = $i; + $117 = $psDec$addr; + $subfr_length140 = ((($117)) + 2332|0); + $118 = HEAP32[$subfr_length140>>2]|0; + $cmp141 = ($116|0)<($118|0); + if (!($cmp141)) { + break; + } + $LTP_pred_Q12 = 2; + $119 = $LTP_pred_Q12; + $120 = $pred_lag_ptr; + $121 = HEAP32[$120>>2]|0; + $shr145 = $121 >> 16; + $122 = $B_Q14; + $123 = HEAP16[$122>>1]|0; + $conv147 = $123 << 16 >> 16; + $mul148 = Math_imul($shr145, $conv147)|0; + $124 = $pred_lag_ptr; + $125 = HEAP32[$124>>2]|0; + $and150 = $125 & 65535; + $126 = $B_Q14; + $127 = HEAP16[$126>>1]|0; + $conv152 = $127 << 16 >> 16; + $mul153 = Math_imul($and150, $conv152)|0; + $shr154 = $mul153 >> 16; + $add155 = (($mul148) + ($shr154))|0; + $add156 = (($119) + ($add155))|0; + $LTP_pred_Q12 = $add156; + $128 = $LTP_pred_Q12; + $129 = $pred_lag_ptr; + $arrayidx157 = ((($129)) + -4|0); + $130 = HEAP32[$arrayidx157>>2]|0; + $shr158 = $130 >> 16; + $131 = $B_Q14; + $arrayidx159 = ((($131)) + 2|0); + $132 = HEAP16[$arrayidx159>>1]|0; + $conv160 = $132 << 16 >> 16; + $mul161 = Math_imul($shr158, $conv160)|0; + $133 = $pred_lag_ptr; + $arrayidx162 = ((($133)) + -4|0); + $134 = HEAP32[$arrayidx162>>2]|0; + $and163 = $134 & 65535; + $135 = $B_Q14; + $arrayidx164 = ((($135)) + 2|0); + $136 = HEAP16[$arrayidx164>>1]|0; + $conv165 = $136 << 16 >> 16; + $mul166 = Math_imul($and163, $conv165)|0; + $shr167 = $mul166 >> 16; + $add168 = (($mul161) + ($shr167))|0; + $add169 = (($128) + ($add168))|0; + $LTP_pred_Q12 = $add169; + $137 = $LTP_pred_Q12; + $138 = $pred_lag_ptr; + $arrayidx170 = ((($138)) + -8|0); + $139 = HEAP32[$arrayidx170>>2]|0; + $shr171 = $139 >> 16; + $140 = $B_Q14; + $arrayidx172 = ((($140)) + 4|0); + $141 = HEAP16[$arrayidx172>>1]|0; + $conv173 = $141 << 16 >> 16; + $mul174 = Math_imul($shr171, $conv173)|0; + $142 = $pred_lag_ptr; + $arrayidx175 = ((($142)) + -8|0); + $143 = HEAP32[$arrayidx175>>2]|0; + $and176 = $143 & 65535; + $144 = $B_Q14; + $arrayidx177 = ((($144)) + 4|0); + $145 = HEAP16[$arrayidx177>>1]|0; + $conv178 = $145 << 16 >> 16; + $mul179 = Math_imul($and176, $conv178)|0; + $shr180 = $mul179 >> 16; + $add181 = (($mul174) + ($shr180))|0; + $add182 = (($137) + ($add181))|0; + $LTP_pred_Q12 = $add182; + $146 = $LTP_pred_Q12; + $147 = $pred_lag_ptr; + $arrayidx183 = ((($147)) + -12|0); + $148 = HEAP32[$arrayidx183>>2]|0; + $shr184 = $148 >> 16; + $149 = $B_Q14; + $arrayidx185 = ((($149)) + 6|0); + $150 = HEAP16[$arrayidx185>>1]|0; + $conv186 = $150 << 16 >> 16; + $mul187 = Math_imul($shr184, $conv186)|0; + $151 = $pred_lag_ptr; + $arrayidx188 = ((($151)) + -12|0); + $152 = HEAP32[$arrayidx188>>2]|0; + $and189 = $152 & 65535; + $153 = $B_Q14; + $arrayidx190 = ((($153)) + 6|0); + $154 = HEAP16[$arrayidx190>>1]|0; + $conv191 = $154 << 16 >> 16; + $mul192 = Math_imul($and189, $conv191)|0; + $shr193 = $mul192 >> 16; + $add194 = (($mul187) + ($shr193))|0; + $add195 = (($146) + ($add194))|0; + $LTP_pred_Q12 = $add195; + $155 = $LTP_pred_Q12; + $156 = $pred_lag_ptr; + $arrayidx196 = ((($156)) + -16|0); + $157 = HEAP32[$arrayidx196>>2]|0; + $shr197 = $157 >> 16; + $158 = $B_Q14; + $arrayidx198 = ((($158)) + 8|0); + $159 = HEAP16[$arrayidx198>>1]|0; + $conv199 = $159 << 16 >> 16; + $mul200 = Math_imul($shr197, $conv199)|0; + $160 = $pred_lag_ptr; + $arrayidx201 = ((($160)) + -16|0); + $161 = HEAP32[$arrayidx201>>2]|0; + $and202 = $161 & 65535; + $162 = $B_Q14; + $arrayidx203 = ((($162)) + 8|0); + $163 = HEAP16[$arrayidx203>>1]|0; + $conv204 = $163 << 16 >> 16; + $mul205 = Math_imul($and202, $conv204)|0; + $shr206 = $mul205 >> 16; + $add207 = (($mul200) + ($shr206))|0; + $add208 = (($155) + ($add207))|0; + $LTP_pred_Q12 = $add208; + $164 = $pred_lag_ptr; + $incdec$ptr = ((($164)) + 4|0); + $pred_lag_ptr = $incdec$ptr; + $165 = $rand_seed; + $mul209 = Math_imul($165, 196314165)|0; + $add210 = (907633515 + ($mul209))|0; + $rand_seed = $add210; + $166 = $rand_seed; + $shr211 = $166 >> 25; + $and212 = $shr211 & 127; + $idx = $and212; + $167 = $LTP_pred_Q12; + $168 = $rand_ptr; + $169 = $idx; + $arrayidx213 = (($168) + ($169<<2)|0); + $170 = HEAP32[$arrayidx213>>2]|0; + $shr214 = $170 >> 16; + $171 = $rand_scale_Q14; + $conv215 = $171 << 16 >> 16; + $mul216 = Math_imul($shr214, $conv215)|0; + $172 = $rand_ptr; + $173 = $idx; + $arrayidx217 = (($172) + ($173<<2)|0); + $174 = HEAP32[$arrayidx217>>2]|0; + $and218 = $174 & 65535; + $175 = $rand_scale_Q14; + $conv219 = $175 << 16 >> 16; + $mul220 = Math_imul($and218, $conv219)|0; + $shr221 = $mul220 >> 16; + $add222 = (($mul216) + ($shr221))|0; + $add223 = (($167) + ($add222))|0; + $shl224 = $add223 << 2; + $176 = $sLTP_buf_idx; + $arrayidx225 = (($vla) + ($176<<2)|0); + HEAP32[$arrayidx225>>2] = $shl224; + $177 = $sLTP_buf_idx; + $inc226 = (($177) + 1)|0; + $sLTP_buf_idx = $inc226; + $178 = $i; + $inc228 = (($178) + 1)|0; + $i = $inc228; + } + $j = 0; + while(1) { + $179 = $j; + $cmp231 = ($179|0)<(5); + if (!($cmp231)) { + break; + } + $180 = $harm_Gain_Q15; + $conv234 = $180&65535; + $conv235 = $conv234 << 16 >> 16; + $181 = $B_Q14; + $182 = $j; + $arrayidx236 = (($181) + ($182<<1)|0); + $183 = HEAP16[$arrayidx236>>1]|0; + $conv237 = $183 << 16 >> 16; + $mul238 = Math_imul($conv235, $conv237)|0; + $shr239 = $mul238 >> 15; + $conv240 = $shr239&65535; + $184 = $B_Q14; + $185 = $j; + $arrayidx241 = (($184) + ($185<<1)|0); + HEAP16[$arrayidx241>>1] = $conv240; + $186 = $j; + $inc243 = (($186) + 1)|0; + $j = $inc243; + } + $187 = $rand_scale_Q14; + $conv245 = $187 << 16 >> 16; + $188 = $rand_Gain_Q15; + $conv246 = $188&65535; + $conv247 = $conv246 << 16 >> 16; + $mul248 = Math_imul($conv245, $conv247)|0; + $shr249 = $mul248 >> 15; + $conv250 = $shr249&65535; + $rand_scale_Q14 = $conv250; + $189 = $psPLC; + $190 = HEAP32[$189>>2]|0; + $191 = $psPLC; + $192 = HEAP32[$191>>2]|0; + $shr253 = $192 >> 16; + $mul254 = ($shr253*655)|0; + $193 = $psPLC; + $194 = HEAP32[$193>>2]|0; + $and256 = $194 & 65535; + $mul257 = ($and256*655)|0; + $shr258 = $mul257 >> 16; + $add259 = (($mul254) + ($shr258))|0; + $add260 = (($190) + ($add259))|0; + $195 = $psPLC; + HEAP32[$195>>2] = $add260; + $196 = $psPLC; + $197 = HEAP32[$196>>2]|0; + $198 = $psDec$addr; + $fs_kHz = ((($198)) + 2316|0); + $199 = HEAP32[$fs_kHz>>2]|0; + $conv263 = $199&65535; + $conv264 = $conv263 << 16 >> 16; + $mul265 = ($conv264*18)|0; + $shl266 = $mul265 << 8; + $call267 = (_silk_min_32_425($197,$shl266)|0); + $200 = $psPLC; + HEAP32[$200>>2] = $call267; + $201 = $psPLC; + $202 = HEAP32[$201>>2]|0; + $shr270 = $202 >> 7; + $add271 = (($shr270) + 1)|0; + $shr272 = $add271 >> 1; + $lag = $shr272; + $203 = $k; + $inc274 = (($203) + 1)|0; + $k = $inc274; + } + $204 = $psDec$addr; + $ltp_mem_length276 = ((($204)) + 2336|0); + $205 = HEAP32[$ltp_mem_length276>>2]|0; + $sub277 = (($205) - 16)|0; + $arrayidx278 = (($vla) + ($sub277<<2)|0); + $sLPC_Q14_ptr = $arrayidx278; + $206 = $sLPC_Q14_ptr; + $207 = $psDec$addr; + $sLPC_Q14_buf = ((($207)) + 1284|0); + dest=$206; src=$sLPC_Q14_buf; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $i = 0; + while(1) { + $208 = $i; + $209 = $psDec$addr; + $frame_length281 = ((($209)) + 2328|0); + $210 = HEAP32[$frame_length281>>2]|0; + $cmp282 = ($208|0)<($210|0); + $211 = $psDec$addr; + if (!($cmp282)) { + break; + } + $LPC_order285 = ((($211)) + 2340|0); + $212 = HEAP32[$LPC_order285>>2]|0; + $shr286 = $212 >> 1; + $LPC_pred_Q10 = $shr286; + $213 = $LPC_pred_Q10; + $214 = $sLPC_Q14_ptr; + $215 = $i; + $add287 = (16 + ($215))|0; + $sub288 = (($add287) - 1)|0; + $arrayidx289 = (($214) + ($sub288<<2)|0); + $216 = HEAP32[$arrayidx289>>2]|0; + $shr290 = $216 >> 16; + $217 = HEAP16[$A_Q12>>1]|0; + $conv292 = $217 << 16 >> 16; + $mul293 = Math_imul($shr290, $conv292)|0; + $218 = $sLPC_Q14_ptr; + $219 = $i; + $add294 = (16 + ($219))|0; + $sub295 = (($add294) - 1)|0; + $arrayidx296 = (($218) + ($sub295<<2)|0); + $220 = HEAP32[$arrayidx296>>2]|0; + $and297 = $220 & 65535; + $221 = HEAP16[$A_Q12>>1]|0; + $conv299 = $221 << 16 >> 16; + $mul300 = Math_imul($and297, $conv299)|0; + $shr301 = $mul300 >> 16; + $add302 = (($mul293) + ($shr301))|0; + $add303 = (($213) + ($add302))|0; + $LPC_pred_Q10 = $add303; + $222 = $LPC_pred_Q10; + $223 = $sLPC_Q14_ptr; + $224 = $i; + $add304 = (16 + ($224))|0; + $sub305 = (($add304) - 2)|0; + $arrayidx306 = (($223) + ($sub305<<2)|0); + $225 = HEAP32[$arrayidx306>>2]|0; + $shr307 = $225 >> 16; + $arrayidx308 = ((($A_Q12)) + 2|0); + $226 = HEAP16[$arrayidx308>>1]|0; + $conv309 = $226 << 16 >> 16; + $mul310 = Math_imul($shr307, $conv309)|0; + $227 = $sLPC_Q14_ptr; + $228 = $i; + $add311 = (16 + ($228))|0; + $sub312 = (($add311) - 2)|0; + $arrayidx313 = (($227) + ($sub312<<2)|0); + $229 = HEAP32[$arrayidx313>>2]|0; + $and314 = $229 & 65535; + $arrayidx315 = ((($A_Q12)) + 2|0); + $230 = HEAP16[$arrayidx315>>1]|0; + $conv316 = $230 << 16 >> 16; + $mul317 = Math_imul($and314, $conv316)|0; + $shr318 = $mul317 >> 16; + $add319 = (($mul310) + ($shr318))|0; + $add320 = (($222) + ($add319))|0; + $LPC_pred_Q10 = $add320; + $231 = $LPC_pred_Q10; + $232 = $sLPC_Q14_ptr; + $233 = $i; + $add321 = (16 + ($233))|0; + $sub322 = (($add321) - 3)|0; + $arrayidx323 = (($232) + ($sub322<<2)|0); + $234 = HEAP32[$arrayidx323>>2]|0; + $shr324 = $234 >> 16; + $arrayidx325 = ((($A_Q12)) + 4|0); + $235 = HEAP16[$arrayidx325>>1]|0; + $conv326 = $235 << 16 >> 16; + $mul327 = Math_imul($shr324, $conv326)|0; + $236 = $sLPC_Q14_ptr; + $237 = $i; + $add328 = (16 + ($237))|0; + $sub329 = (($add328) - 3)|0; + $arrayidx330 = (($236) + ($sub329<<2)|0); + $238 = HEAP32[$arrayidx330>>2]|0; + $and331 = $238 & 65535; + $arrayidx332 = ((($A_Q12)) + 4|0); + $239 = HEAP16[$arrayidx332>>1]|0; + $conv333 = $239 << 16 >> 16; + $mul334 = Math_imul($and331, $conv333)|0; + $shr335 = $mul334 >> 16; + $add336 = (($mul327) + ($shr335))|0; + $add337 = (($231) + ($add336))|0; + $LPC_pred_Q10 = $add337; + $240 = $LPC_pred_Q10; + $241 = $sLPC_Q14_ptr; + $242 = $i; + $add338 = (16 + ($242))|0; + $sub339 = (($add338) - 4)|0; + $arrayidx340 = (($241) + ($sub339<<2)|0); + $243 = HEAP32[$arrayidx340>>2]|0; + $shr341 = $243 >> 16; + $arrayidx342 = ((($A_Q12)) + 6|0); + $244 = HEAP16[$arrayidx342>>1]|0; + $conv343 = $244 << 16 >> 16; + $mul344 = Math_imul($shr341, $conv343)|0; + $245 = $sLPC_Q14_ptr; + $246 = $i; + $add345 = (16 + ($246))|0; + $sub346 = (($add345) - 4)|0; + $arrayidx347 = (($245) + ($sub346<<2)|0); + $247 = HEAP32[$arrayidx347>>2]|0; + $and348 = $247 & 65535; + $arrayidx349 = ((($A_Q12)) + 6|0); + $248 = HEAP16[$arrayidx349>>1]|0; + $conv350 = $248 << 16 >> 16; + $mul351 = Math_imul($and348, $conv350)|0; + $shr352 = $mul351 >> 16; + $add353 = (($mul344) + ($shr352))|0; + $add354 = (($240) + ($add353))|0; + $LPC_pred_Q10 = $add354; + $249 = $LPC_pred_Q10; + $250 = $sLPC_Q14_ptr; + $251 = $i; + $add355 = (16 + ($251))|0; + $sub356 = (($add355) - 5)|0; + $arrayidx357 = (($250) + ($sub356<<2)|0); + $252 = HEAP32[$arrayidx357>>2]|0; + $shr358 = $252 >> 16; + $arrayidx359 = ((($A_Q12)) + 8|0); + $253 = HEAP16[$arrayidx359>>1]|0; + $conv360 = $253 << 16 >> 16; + $mul361 = Math_imul($shr358, $conv360)|0; + $254 = $sLPC_Q14_ptr; + $255 = $i; + $add362 = (16 + ($255))|0; + $sub363 = (($add362) - 5)|0; + $arrayidx364 = (($254) + ($sub363<<2)|0); + $256 = HEAP32[$arrayidx364>>2]|0; + $and365 = $256 & 65535; + $arrayidx366 = ((($A_Q12)) + 8|0); + $257 = HEAP16[$arrayidx366>>1]|0; + $conv367 = $257 << 16 >> 16; + $mul368 = Math_imul($and365, $conv367)|0; + $shr369 = $mul368 >> 16; + $add370 = (($mul361) + ($shr369))|0; + $add371 = (($249) + ($add370))|0; + $LPC_pred_Q10 = $add371; + $258 = $LPC_pred_Q10; + $259 = $sLPC_Q14_ptr; + $260 = $i; + $add372 = (16 + ($260))|0; + $sub373 = (($add372) - 6)|0; + $arrayidx374 = (($259) + ($sub373<<2)|0); + $261 = HEAP32[$arrayidx374>>2]|0; + $shr375 = $261 >> 16; + $arrayidx376 = ((($A_Q12)) + 10|0); + $262 = HEAP16[$arrayidx376>>1]|0; + $conv377 = $262 << 16 >> 16; + $mul378 = Math_imul($shr375, $conv377)|0; + $263 = $sLPC_Q14_ptr; + $264 = $i; + $add379 = (16 + ($264))|0; + $sub380 = (($add379) - 6)|0; + $arrayidx381 = (($263) + ($sub380<<2)|0); + $265 = HEAP32[$arrayidx381>>2]|0; + $and382 = $265 & 65535; + $arrayidx383 = ((($A_Q12)) + 10|0); + $266 = HEAP16[$arrayidx383>>1]|0; + $conv384 = $266 << 16 >> 16; + $mul385 = Math_imul($and382, $conv384)|0; + $shr386 = $mul385 >> 16; + $add387 = (($mul378) + ($shr386))|0; + $add388 = (($258) + ($add387))|0; + $LPC_pred_Q10 = $add388; + $267 = $LPC_pred_Q10; + $268 = $sLPC_Q14_ptr; + $269 = $i; + $add389 = (16 + ($269))|0; + $sub390 = (($add389) - 7)|0; + $arrayidx391 = (($268) + ($sub390<<2)|0); + $270 = HEAP32[$arrayidx391>>2]|0; + $shr392 = $270 >> 16; + $arrayidx393 = ((($A_Q12)) + 12|0); + $271 = HEAP16[$arrayidx393>>1]|0; + $conv394 = $271 << 16 >> 16; + $mul395 = Math_imul($shr392, $conv394)|0; + $272 = $sLPC_Q14_ptr; + $273 = $i; + $add396 = (16 + ($273))|0; + $sub397 = (($add396) - 7)|0; + $arrayidx398 = (($272) + ($sub397<<2)|0); + $274 = HEAP32[$arrayidx398>>2]|0; + $and399 = $274 & 65535; + $arrayidx400 = ((($A_Q12)) + 12|0); + $275 = HEAP16[$arrayidx400>>1]|0; + $conv401 = $275 << 16 >> 16; + $mul402 = Math_imul($and399, $conv401)|0; + $shr403 = $mul402 >> 16; + $add404 = (($mul395) + ($shr403))|0; + $add405 = (($267) + ($add404))|0; + $LPC_pred_Q10 = $add405; + $276 = $LPC_pred_Q10; + $277 = $sLPC_Q14_ptr; + $278 = $i; + $add406 = (16 + ($278))|0; + $sub407 = (($add406) - 8)|0; + $arrayidx408 = (($277) + ($sub407<<2)|0); + $279 = HEAP32[$arrayidx408>>2]|0; + $shr409 = $279 >> 16; + $arrayidx410 = ((($A_Q12)) + 14|0); + $280 = HEAP16[$arrayidx410>>1]|0; + $conv411 = $280 << 16 >> 16; + $mul412 = Math_imul($shr409, $conv411)|0; + $281 = $sLPC_Q14_ptr; + $282 = $i; + $add413 = (16 + ($282))|0; + $sub414 = (($add413) - 8)|0; + $arrayidx415 = (($281) + ($sub414<<2)|0); + $283 = HEAP32[$arrayidx415>>2]|0; + $and416 = $283 & 65535; + $arrayidx417 = ((($A_Q12)) + 14|0); + $284 = HEAP16[$arrayidx417>>1]|0; + $conv418 = $284 << 16 >> 16; + $mul419 = Math_imul($and416, $conv418)|0; + $shr420 = $mul419 >> 16; + $add421 = (($mul412) + ($shr420))|0; + $add422 = (($276) + ($add421))|0; + $LPC_pred_Q10 = $add422; + $285 = $LPC_pred_Q10; + $286 = $sLPC_Q14_ptr; + $287 = $i; + $add423 = (16 + ($287))|0; + $sub424 = (($add423) - 9)|0; + $arrayidx425 = (($286) + ($sub424<<2)|0); + $288 = HEAP32[$arrayidx425>>2]|0; + $shr426 = $288 >> 16; + $arrayidx427 = ((($A_Q12)) + 16|0); + $289 = HEAP16[$arrayidx427>>1]|0; + $conv428 = $289 << 16 >> 16; + $mul429 = Math_imul($shr426, $conv428)|0; + $290 = $sLPC_Q14_ptr; + $291 = $i; + $add430 = (16 + ($291))|0; + $sub431 = (($add430) - 9)|0; + $arrayidx432 = (($290) + ($sub431<<2)|0); + $292 = HEAP32[$arrayidx432>>2]|0; + $and433 = $292 & 65535; + $arrayidx434 = ((($A_Q12)) + 16|0); + $293 = HEAP16[$arrayidx434>>1]|0; + $conv435 = $293 << 16 >> 16; + $mul436 = Math_imul($and433, $conv435)|0; + $shr437 = $mul436 >> 16; + $add438 = (($mul429) + ($shr437))|0; + $add439 = (($285) + ($add438))|0; + $LPC_pred_Q10 = $add439; + $294 = $LPC_pred_Q10; + $295 = $sLPC_Q14_ptr; + $296 = $i; + $add440 = (16 + ($296))|0; + $sub441 = (($add440) - 10)|0; + $arrayidx442 = (($295) + ($sub441<<2)|0); + $297 = HEAP32[$arrayidx442>>2]|0; + $shr443 = $297 >> 16; + $arrayidx444 = ((($A_Q12)) + 18|0); + $298 = HEAP16[$arrayidx444>>1]|0; + $conv445 = $298 << 16 >> 16; + $mul446 = Math_imul($shr443, $conv445)|0; + $299 = $sLPC_Q14_ptr; + $300 = $i; + $add447 = (16 + ($300))|0; + $sub448 = (($add447) - 10)|0; + $arrayidx449 = (($299) + ($sub448<<2)|0); + $301 = HEAP32[$arrayidx449>>2]|0; + $and450 = $301 & 65535; + $arrayidx451 = ((($A_Q12)) + 18|0); + $302 = HEAP16[$arrayidx451>>1]|0; + $conv452 = $302 << 16 >> 16; + $mul453 = Math_imul($and450, $conv452)|0; + $shr454 = $mul453 >> 16; + $add455 = (($mul446) + ($shr454))|0; + $add456 = (($294) + ($add455))|0; + $LPC_pred_Q10 = $add456; + $j = 10; + while(1) { + $303 = $j; + $304 = $psDec$addr; + $LPC_order458 = ((($304)) + 2340|0); + $305 = HEAP32[$LPC_order458>>2]|0; + $cmp459 = ($303|0)<($305|0); + if (!($cmp459)) { + break; + } + $306 = $LPC_pred_Q10; + $307 = $sLPC_Q14_ptr; + $308 = $i; + $add462 = (16 + ($308))|0; + $309 = $j; + $sub463 = (($add462) - ($309))|0; + $sub464 = (($sub463) - 1)|0; + $arrayidx465 = (($307) + ($sub464<<2)|0); + $310 = HEAP32[$arrayidx465>>2]|0; + $shr466 = $310 >> 16; + $311 = $j; + $arrayidx467 = (($A_Q12) + ($311<<1)|0); + $312 = HEAP16[$arrayidx467>>1]|0; + $conv468 = $312 << 16 >> 16; + $mul469 = Math_imul($shr466, $conv468)|0; + $313 = $sLPC_Q14_ptr; + $314 = $i; + $add470 = (16 + ($314))|0; + $315 = $j; + $sub471 = (($add470) - ($315))|0; + $sub472 = (($sub471) - 1)|0; + $arrayidx473 = (($313) + ($sub472<<2)|0); + $316 = HEAP32[$arrayidx473>>2]|0; + $and474 = $316 & 65535; + $317 = $j; + $arrayidx475 = (($A_Q12) + ($317<<1)|0); + $318 = HEAP16[$arrayidx475>>1]|0; + $conv476 = $318 << 16 >> 16; + $mul477 = Math_imul($and474, $conv476)|0; + $shr478 = $mul477 >> 16; + $add479 = (($mul469) + ($shr478))|0; + $add480 = (($306) + ($add479))|0; + $LPC_pred_Q10 = $add480; + $319 = $j; + $inc482 = (($319) + 1)|0; + $j = $inc482; + } + $320 = $sLPC_Q14_ptr; + $321 = $i; + $add484 = (16 + ($321))|0; + $arrayidx485 = (($320) + ($add484<<2)|0); + $322 = HEAP32[$arrayidx485>>2]|0; + $323 = $LPC_pred_Q10; + $shl486 = $323 << 4; + $add487 = (($322) + ($shl486))|0; + $324 = $sLPC_Q14_ptr; + $325 = $i; + $add488 = (16 + ($325))|0; + $arrayidx489 = (($324) + ($add488<<2)|0); + HEAP32[$arrayidx489>>2] = $add487; + $326 = $sLPC_Q14_ptr; + $327 = $i; + $add490 = (16 + ($327))|0; + $arrayidx491 = (($326) + ($add490<<2)|0); + $328 = HEAP32[$arrayidx491>>2]|0; + $shr492 = $328 >> 16; + $arrayidx493 = ((($prevGain_Q10)) + 4|0); + $329 = HEAP32[$arrayidx493>>2]|0; + $conv494 = $329&65535; + $conv495 = $conv494 << 16 >> 16; + $mul496 = Math_imul($shr492, $conv495)|0; + $330 = $sLPC_Q14_ptr; + $331 = $i; + $add497 = (16 + ($331))|0; + $arrayidx498 = (($330) + ($add497<<2)|0); + $332 = HEAP32[$arrayidx498>>2]|0; + $and499 = $332 & 65535; + $arrayidx500 = ((($prevGain_Q10)) + 4|0); + $333 = HEAP32[$arrayidx500>>2]|0; + $conv501 = $333&65535; + $conv502 = $conv501 << 16 >> 16; + $mul503 = Math_imul($and499, $conv502)|0; + $shr504 = $mul503 >> 16; + $add505 = (($mul496) + ($shr504))|0; + $334 = $sLPC_Q14_ptr; + $335 = $i; + $add506 = (16 + ($335))|0; + $arrayidx507 = (($334) + ($add506<<2)|0); + $336 = HEAP32[$arrayidx507>>2]|0; + $arrayidx508 = ((($prevGain_Q10)) + 4|0); + $337 = HEAP32[$arrayidx508>>2]|0; + $shr509 = $337 >> 15; + $add510 = (($shr509) + 1)|0; + $shr511 = $add510 >> 1; + $mul512 = Math_imul($336, $shr511)|0; + $add513 = (($add505) + ($mul512))|0; + $shr514 = $add513 >> 7; + $add515 = (($shr514) + 1)|0; + $shr516 = $add515 >> 1; + $cmp517 = ($shr516|0)>(32767); + if ($cmp517) { + $cond582 = 32767; + } else { + $338 = $sLPC_Q14_ptr; + $339 = $i; + $add521 = (16 + ($339))|0; + $arrayidx522 = (($338) + ($add521<<2)|0); + $340 = HEAP32[$arrayidx522>>2]|0; + $shr523 = $340 >> 16; + $arrayidx524 = ((($prevGain_Q10)) + 4|0); + $341 = HEAP32[$arrayidx524>>2]|0; + $conv525 = $341&65535; + $conv526 = $conv525 << 16 >> 16; + $mul527 = Math_imul($shr523, $conv526)|0; + $342 = $sLPC_Q14_ptr; + $343 = $i; + $add528 = (16 + ($343))|0; + $arrayidx529 = (($342) + ($add528<<2)|0); + $344 = HEAP32[$arrayidx529>>2]|0; + $and530 = $344 & 65535; + $arrayidx531 = ((($prevGain_Q10)) + 4|0); + $345 = HEAP32[$arrayidx531>>2]|0; + $conv532 = $345&65535; + $conv533 = $conv532 << 16 >> 16; + $mul534 = Math_imul($and530, $conv533)|0; + $shr535 = $mul534 >> 16; + $add536 = (($mul527) + ($shr535))|0; + $346 = $sLPC_Q14_ptr; + $347 = $i; + $add537 = (16 + ($347))|0; + $arrayidx538 = (($346) + ($add537<<2)|0); + $348 = HEAP32[$arrayidx538>>2]|0; + $arrayidx539 = ((($prevGain_Q10)) + 4|0); + $349 = HEAP32[$arrayidx539>>2]|0; + $shr540 = $349 >> 15; + $add541 = (($shr540) + 1)|0; + $shr542 = $add541 >> 1; + $mul543 = Math_imul($348, $shr542)|0; + $add544 = (($add536) + ($mul543))|0; + $shr545 = $add544 >> 7; + $add546 = (($shr545) + 1)|0; + $shr547 = $add546 >> 1; + $cmp548 = ($shr547|0)<(-32768); + if ($cmp548) { + $cond582 = -32768; + } else { + $350 = $sLPC_Q14_ptr; + $351 = $i; + $add552 = (16 + ($351))|0; + $arrayidx553 = (($350) + ($add552<<2)|0); + $352 = HEAP32[$arrayidx553>>2]|0; + $shr554 = $352 >> 16; + $arrayidx555 = ((($prevGain_Q10)) + 4|0); + $353 = HEAP32[$arrayidx555>>2]|0; + $conv556 = $353&65535; + $conv557 = $conv556 << 16 >> 16; + $mul558 = Math_imul($shr554, $conv557)|0; + $354 = $sLPC_Q14_ptr; + $355 = $i; + $add559 = (16 + ($355))|0; + $arrayidx560 = (($354) + ($add559<<2)|0); + $356 = HEAP32[$arrayidx560>>2]|0; + $and561 = $356 & 65535; + $arrayidx562 = ((($prevGain_Q10)) + 4|0); + $357 = HEAP32[$arrayidx562>>2]|0; + $conv563 = $357&65535; + $conv564 = $conv563 << 16 >> 16; + $mul565 = Math_imul($and561, $conv564)|0; + $shr566 = $mul565 >> 16; + $add567 = (($mul558) + ($shr566))|0; + $358 = $sLPC_Q14_ptr; + $359 = $i; + $add568 = (16 + ($359))|0; + $arrayidx569 = (($358) + ($add568<<2)|0); + $360 = HEAP32[$arrayidx569>>2]|0; + $arrayidx570 = ((($prevGain_Q10)) + 4|0); + $361 = HEAP32[$arrayidx570>>2]|0; + $shr571 = $361 >> 15; + $add572 = (($shr571) + 1)|0; + $shr573 = $add572 >> 1; + $mul574 = Math_imul($360, $shr573)|0; + $add575 = (($add567) + ($mul574))|0; + $shr576 = $add575 >> 7; + $add577 = (($shr576) + 1)|0; + $shr578 = $add577 >> 1; + $cond582 = $shr578; + } + } + $cmp583 = ($cond582|0)>(32767); + if ($cmp583) { + $cond780 = 32767; + } else { + $362 = $sLPC_Q14_ptr; + $363 = $i; + $add587 = (16 + ($363))|0; + $arrayidx588 = (($362) + ($add587<<2)|0); + $364 = HEAP32[$arrayidx588>>2]|0; + $shr589 = $364 >> 16; + $arrayidx590 = ((($prevGain_Q10)) + 4|0); + $365 = HEAP32[$arrayidx590>>2]|0; + $conv591 = $365&65535; + $conv592 = $conv591 << 16 >> 16; + $mul593 = Math_imul($shr589, $conv592)|0; + $366 = $sLPC_Q14_ptr; + $367 = $i; + $add594 = (16 + ($367))|0; + $arrayidx595 = (($366) + ($add594<<2)|0); + $368 = HEAP32[$arrayidx595>>2]|0; + $and596 = $368 & 65535; + $arrayidx597 = ((($prevGain_Q10)) + 4|0); + $369 = HEAP32[$arrayidx597>>2]|0; + $conv598 = $369&65535; + $conv599 = $conv598 << 16 >> 16; + $mul600 = Math_imul($and596, $conv599)|0; + $shr601 = $mul600 >> 16; + $add602 = (($mul593) + ($shr601))|0; + $370 = $sLPC_Q14_ptr; + $371 = $i; + $add603 = (16 + ($371))|0; + $arrayidx604 = (($370) + ($add603<<2)|0); + $372 = HEAP32[$arrayidx604>>2]|0; + $arrayidx605 = ((($prevGain_Q10)) + 4|0); + $373 = HEAP32[$arrayidx605>>2]|0; + $shr606 = $373 >> 15; + $add607 = (($shr606) + 1)|0; + $shr608 = $add607 >> 1; + $mul609 = Math_imul($372, $shr608)|0; + $add610 = (($add602) + ($mul609))|0; + $shr611 = $add610 >> 7; + $add612 = (($shr611) + 1)|0; + $shr613 = $add612 >> 1; + $cmp614 = ($shr613|0)>(32767); + if ($cmp614) { + $cond679 = 32767; + } else { + $374 = $sLPC_Q14_ptr; + $375 = $i; + $add618 = (16 + ($375))|0; + $arrayidx619 = (($374) + ($add618<<2)|0); + $376 = HEAP32[$arrayidx619>>2]|0; + $shr620 = $376 >> 16; + $arrayidx621 = ((($prevGain_Q10)) + 4|0); + $377 = HEAP32[$arrayidx621>>2]|0; + $conv622 = $377&65535; + $conv623 = $conv622 << 16 >> 16; + $mul624 = Math_imul($shr620, $conv623)|0; + $378 = $sLPC_Q14_ptr; + $379 = $i; + $add625 = (16 + ($379))|0; + $arrayidx626 = (($378) + ($add625<<2)|0); + $380 = HEAP32[$arrayidx626>>2]|0; + $and627 = $380 & 65535; + $arrayidx628 = ((($prevGain_Q10)) + 4|0); + $381 = HEAP32[$arrayidx628>>2]|0; + $conv629 = $381&65535; + $conv630 = $conv629 << 16 >> 16; + $mul631 = Math_imul($and627, $conv630)|0; + $shr632 = $mul631 >> 16; + $add633 = (($mul624) + ($shr632))|0; + $382 = $sLPC_Q14_ptr; + $383 = $i; + $add634 = (16 + ($383))|0; + $arrayidx635 = (($382) + ($add634<<2)|0); + $384 = HEAP32[$arrayidx635>>2]|0; + $arrayidx636 = ((($prevGain_Q10)) + 4|0); + $385 = HEAP32[$arrayidx636>>2]|0; + $shr637 = $385 >> 15; + $add638 = (($shr637) + 1)|0; + $shr639 = $add638 >> 1; + $mul640 = Math_imul($384, $shr639)|0; + $add641 = (($add633) + ($mul640))|0; + $shr642 = $add641 >> 7; + $add643 = (($shr642) + 1)|0; + $shr644 = $add643 >> 1; + $cmp645 = ($shr644|0)<(-32768); + if ($cmp645) { + $cond679 = -32768; + } else { + $386 = $sLPC_Q14_ptr; + $387 = $i; + $add649 = (16 + ($387))|0; + $arrayidx650 = (($386) + ($add649<<2)|0); + $388 = HEAP32[$arrayidx650>>2]|0; + $shr651 = $388 >> 16; + $arrayidx652 = ((($prevGain_Q10)) + 4|0); + $389 = HEAP32[$arrayidx652>>2]|0; + $conv653 = $389&65535; + $conv654 = $conv653 << 16 >> 16; + $mul655 = Math_imul($shr651, $conv654)|0; + $390 = $sLPC_Q14_ptr; + $391 = $i; + $add656 = (16 + ($391))|0; + $arrayidx657 = (($390) + ($add656<<2)|0); + $392 = HEAP32[$arrayidx657>>2]|0; + $and658 = $392 & 65535; + $arrayidx659 = ((($prevGain_Q10)) + 4|0); + $393 = HEAP32[$arrayidx659>>2]|0; + $conv660 = $393&65535; + $conv661 = $conv660 << 16 >> 16; + $mul662 = Math_imul($and658, $conv661)|0; + $shr663 = $mul662 >> 16; + $add664 = (($mul655) + ($shr663))|0; + $394 = $sLPC_Q14_ptr; + $395 = $i; + $add665 = (16 + ($395))|0; + $arrayidx666 = (($394) + ($add665<<2)|0); + $396 = HEAP32[$arrayidx666>>2]|0; + $arrayidx667 = ((($prevGain_Q10)) + 4|0); + $397 = HEAP32[$arrayidx667>>2]|0; + $shr668 = $397 >> 15; + $add669 = (($shr668) + 1)|0; + $shr670 = $add669 >> 1; + $mul671 = Math_imul($396, $shr670)|0; + $add672 = (($add664) + ($mul671))|0; + $shr673 = $add672 >> 7; + $add674 = (($shr673) + 1)|0; + $shr675 = $add674 >> 1; + $cond679 = $shr675; + } + } + $cmp680 = ($cond679|0)<(-32768); + if ($cmp680) { + $cond780 = -32768; + } else { + $398 = $sLPC_Q14_ptr; + $399 = $i; + $add684 = (16 + ($399))|0; + $arrayidx685 = (($398) + ($add684<<2)|0); + $400 = HEAP32[$arrayidx685>>2]|0; + $shr686 = $400 >> 16; + $arrayidx687 = ((($prevGain_Q10)) + 4|0); + $401 = HEAP32[$arrayidx687>>2]|0; + $conv688 = $401&65535; + $conv689 = $conv688 << 16 >> 16; + $mul690 = Math_imul($shr686, $conv689)|0; + $402 = $sLPC_Q14_ptr; + $403 = $i; + $add691 = (16 + ($403))|0; + $arrayidx692 = (($402) + ($add691<<2)|0); + $404 = HEAP32[$arrayidx692>>2]|0; + $and693 = $404 & 65535; + $arrayidx694 = ((($prevGain_Q10)) + 4|0); + $405 = HEAP32[$arrayidx694>>2]|0; + $conv695 = $405&65535; + $conv696 = $conv695 << 16 >> 16; + $mul697 = Math_imul($and693, $conv696)|0; + $shr698 = $mul697 >> 16; + $add699 = (($mul690) + ($shr698))|0; + $406 = $sLPC_Q14_ptr; + $407 = $i; + $add700 = (16 + ($407))|0; + $arrayidx701 = (($406) + ($add700<<2)|0); + $408 = HEAP32[$arrayidx701>>2]|0; + $arrayidx702 = ((($prevGain_Q10)) + 4|0); + $409 = HEAP32[$arrayidx702>>2]|0; + $shr703 = $409 >> 15; + $add704 = (($shr703) + 1)|0; + $shr705 = $add704 >> 1; + $mul706 = Math_imul($408, $shr705)|0; + $add707 = (($add699) + ($mul706))|0; + $shr708 = $add707 >> 7; + $add709 = (($shr708) + 1)|0; + $shr710 = $add709 >> 1; + $cmp711 = ($shr710|0)>(32767); + if ($cmp711) { + $cond780 = 32767; + } else { + $410 = $sLPC_Q14_ptr; + $411 = $i; + $add715 = (16 + ($411))|0; + $arrayidx716 = (($410) + ($add715<<2)|0); + $412 = HEAP32[$arrayidx716>>2]|0; + $shr717 = $412 >> 16; + $arrayidx718 = ((($prevGain_Q10)) + 4|0); + $413 = HEAP32[$arrayidx718>>2]|0; + $conv719 = $413&65535; + $conv720 = $conv719 << 16 >> 16; + $mul721 = Math_imul($shr717, $conv720)|0; + $414 = $sLPC_Q14_ptr; + $415 = $i; + $add722 = (16 + ($415))|0; + $arrayidx723 = (($414) + ($add722<<2)|0); + $416 = HEAP32[$arrayidx723>>2]|0; + $and724 = $416 & 65535; + $arrayidx725 = ((($prevGain_Q10)) + 4|0); + $417 = HEAP32[$arrayidx725>>2]|0; + $conv726 = $417&65535; + $conv727 = $conv726 << 16 >> 16; + $mul728 = Math_imul($and724, $conv727)|0; + $shr729 = $mul728 >> 16; + $add730 = (($mul721) + ($shr729))|0; + $418 = $sLPC_Q14_ptr; + $419 = $i; + $add731 = (16 + ($419))|0; + $arrayidx732 = (($418) + ($add731<<2)|0); + $420 = HEAP32[$arrayidx732>>2]|0; + $arrayidx733 = ((($prevGain_Q10)) + 4|0); + $421 = HEAP32[$arrayidx733>>2]|0; + $shr734 = $421 >> 15; + $add735 = (($shr734) + 1)|0; + $shr736 = $add735 >> 1; + $mul737 = Math_imul($420, $shr736)|0; + $add738 = (($add730) + ($mul737))|0; + $shr739 = $add738 >> 7; + $add740 = (($shr739) + 1)|0; + $shr741 = $add740 >> 1; + $cmp742 = ($shr741|0)<(-32768); + if ($cmp742) { + $cond780 = -32768; + } else { + $422 = $sLPC_Q14_ptr; + $423 = $i; + $add746 = (16 + ($423))|0; + $arrayidx747 = (($422) + ($add746<<2)|0); + $424 = HEAP32[$arrayidx747>>2]|0; + $shr748 = $424 >> 16; + $arrayidx749 = ((($prevGain_Q10)) + 4|0); + $425 = HEAP32[$arrayidx749>>2]|0; + $conv750 = $425&65535; + $conv751 = $conv750 << 16 >> 16; + $mul752 = Math_imul($shr748, $conv751)|0; + $426 = $sLPC_Q14_ptr; + $427 = $i; + $add753 = (16 + ($427))|0; + $arrayidx754 = (($426) + ($add753<<2)|0); + $428 = HEAP32[$arrayidx754>>2]|0; + $and755 = $428 & 65535; + $arrayidx756 = ((($prevGain_Q10)) + 4|0); + $429 = HEAP32[$arrayidx756>>2]|0; + $conv757 = $429&65535; + $conv758 = $conv757 << 16 >> 16; + $mul759 = Math_imul($and755, $conv758)|0; + $shr760 = $mul759 >> 16; + $add761 = (($mul752) + ($shr760))|0; + $430 = $sLPC_Q14_ptr; + $431 = $i; + $add762 = (16 + ($431))|0; + $arrayidx763 = (($430) + ($add762<<2)|0); + $432 = HEAP32[$arrayidx763>>2]|0; + $arrayidx764 = ((($prevGain_Q10)) + 4|0); + $433 = HEAP32[$arrayidx764>>2]|0; + $shr765 = $433 >> 15; + $add766 = (($shr765) + 1)|0; + $shr767 = $add766 >> 1; + $mul768 = Math_imul($432, $shr767)|0; + $add769 = (($add761) + ($mul768))|0; + $shr770 = $add769 >> 7; + $add771 = (($shr770) + 1)|0; + $shr772 = $add771 >> 1; + $cond780 = $shr772; + } + } + } + } + $conv781 = $cond780&65535; + $434 = $frame$addr; + $435 = $i; + $arrayidx782 = (($434) + ($435<<1)|0); + HEAP16[$arrayidx782>>1] = $conv781; + $436 = $i; + $inc784 = (($436) + 1)|0; + $i = $inc784; + } + $sLPC_Q14_buf786 = ((($211)) + 1284|0); + $437 = $sLPC_Q14_ptr; + $438 = $psDec$addr; + $frame_length788 = ((($438)) + 2328|0); + $439 = HEAP32[$frame_length788>>2]|0; + $arrayidx789 = (($437) + ($439<<2)|0); + dest=$sLPC_Q14_buf786; src=$arrayidx789; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $440 = $rand_seed; + $441 = $psPLC; + $rand_seed790 = ((($441)) + 52|0); + HEAP32[$rand_seed790>>2] = $440; + $442 = $rand_scale_Q14; + $443 = $psPLC; + $randScale_Q14791 = ((($443)) + 56|0); + HEAP16[$randScale_Q14791>>1] = $442; + $i = 0; + while(1) { + $444 = $i; + $cmp793 = ($444|0)<(4); + if (!($cmp793)) { + break; + } + $445 = $lag; + $446 = $psDecCtrl$addr; + $447 = $i; + $arrayidx796 = (($446) + ($447<<2)|0); + HEAP32[$arrayidx796>>2] = $445; + $448 = $i; + $inc798 = (($448) + 1)|0; + $i = $inc798; + } + $449 = $saved_stack; + _llvm_stackrestore(($449|0)); + STACKTOP = sp;return; +} +function _silk_PLC_update($psDec,$psDecCtrl) { + $psDec = $psDec|0; + $psDecCtrl = $psDecCtrl|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; + var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $9 = 0, $Gains_Q16 = 0, $LPC_order = 0, $LTPCoef_Q14 = 0, $LTPCoef_Q14105 = 0, $LTPCoef_Q1425 = 0, $LTPCoef_Q1426 = 0, $LTPCoef_Q1443 = 0, $LTPCoef_Q1446 = 0, $LTPCoef_Q1457 = 0, $LTPCoef_Q1464 = 0, $LTPCoef_Q1484 = 0, $LTPCoef_Q1492 = 0; + var $LTP_Gain_Q14 = 0, $LTP_scale_Q14 = 0, $PredCoef_Q12 = 0, $add = 0, $add21 = 0, $arrayidx = 0, $arrayidx109 = 0, $arrayidx116 = 0, $arrayidx19 = 0, $arrayidx33 = 0, $arrayidx38 = 0, $arrayidx47 = 0, $arrayidx58 = 0, $arrayidx65 = 0, $arrayidx85 = 0, $arrayidx93 = 0, $cmp = 0, $cmp12 = 0, $cmp22 = 0, $cmp48 = 0; + var $cmp5 = 0, $cmp51 = 0, $cmp54 = 0, $cmp69 = 0, $cmp73 = 0, $cmp8 = 0, $cmp81 = 0, $cond = 0, $cond78 = 0, $conv = 0, $conv100 = 0, $conv101 = 0, $conv112 = 0, $conv20 = 0, $conv3 = 0, $conv30 = 0, $conv31 = 0, $conv45 = 0, $conv59 = 0, $conv60 = 0; + var $conv61 = 0, $conv63 = 0, $conv86 = 0, $conv87 = 0, $conv88 = 0, $conv91 = 0, $div = 0, $div79 = 0, $fs_kHz = 0, $i = 0, $inc = 0, $inc41 = 0, $inc67 = 0, $inc95 = 0, $indices = 0, $indices1 = 0, $j = 0, $mul = 0, $mul102 = 0, $mul111 = 0; + var $mul18 = 0, $mul32 = 0, $mul62 = 0, $mul89 = 0, $nb_subfr = 0, $nb_subfr114 = 0, $nb_subfr119 = 0, $nb_subfr120 = 0, $nb_subfr15 = 0, $nb_subfr27 = 0, $nb_subfr35 = 0, $nb_subfr7 = 0, $prevGain_Q16 = 0, $prevLPC_Q12 = 0, $prevLTP_scale_Q14 = 0, $prevSignalType = 0, $psDec$addr = 0, $psDecCtrl$addr = 0, $psPLC = 0, $sPLC = 0; + var $scale_Q10 = 0, $scale_Q14 = 0, $shl = 0, $shl103 = 0, $shr = 0, $shr90 = 0, $signalType = 0, $signalType2 = 0, $sub = 0, $sub115 = 0, $sub16 = 0, $sub17 = 0, $sub28 = 0, $sub29 = 0, $sub36 = 0, $sub37 = 0, $subfr_length = 0, $subfr_length117 = 0, $subfr_length118 = 0, $temp_LTP_Gain_Q14 = 0; + var $tmp = 0, $tmp72 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $psDec$addr = $psDec; + $psDecCtrl$addr = $psDecCtrl; + $0 = $psDec$addr; + $sPLC = ((($0)) + 4168|0); + $psPLC = $sPLC; + $1 = $psDec$addr; + $indices = ((($1)) + 2736|0); + $signalType = ((($indices)) + 29|0); + $2 = HEAP8[$signalType>>0]|0; + $conv = $2 << 24 >> 24; + $3 = $psDec$addr; + $prevSignalType = ((($3)) + 4164|0); + HEAP32[$prevSignalType>>2] = $conv; + $LTP_Gain_Q14 = 0; + $4 = $psDec$addr; + $indices1 = ((($4)) + 2736|0); + $signalType2 = ((($indices1)) + 29|0); + $5 = HEAP8[$signalType2>>0]|0; + $conv3 = $5 << 24 >> 24; + $cmp = ($conv3|0)==(2); + L1: do { + if ($cmp) { + $j = 0; + while(1) { + $6 = $j; + $7 = $psDec$addr; + $subfr_length = ((($7)) + 2332|0); + $8 = HEAP32[$subfr_length>>2]|0; + $mul = Math_imul($6, $8)|0; + $9 = $psDecCtrl$addr; + $10 = $psDec$addr; + $nb_subfr = ((($10)) + 2324|0); + $11 = HEAP32[$nb_subfr>>2]|0; + $sub = (($11) - 1)|0; + $arrayidx = (($9) + ($sub<<2)|0); + $12 = HEAP32[$arrayidx>>2]|0; + $cmp5 = ($mul|0)<($12|0); + if (!($cmp5)) { + break; + } + $13 = $j; + $14 = $psDec$addr; + $nb_subfr7 = ((($14)) + 2324|0); + $15 = HEAP32[$nb_subfr7>>2]|0; + $cmp8 = ($13|0)==($15|0); + if ($cmp8) { + break; + } + $temp_LTP_Gain_Q14 = 0; + $i = 0; + while(1) { + $16 = $i; + $cmp12 = ($16|0)<(5); + if (!($cmp12)) { + break; + } + $17 = $psDecCtrl$addr; + $LTPCoef_Q14 = ((($17)) + 96|0); + $18 = $psDec$addr; + $nb_subfr15 = ((($18)) + 2324|0); + $19 = HEAP32[$nb_subfr15>>2]|0; + $sub16 = (($19) - 1)|0; + $20 = $j; + $sub17 = (($sub16) - ($20))|0; + $mul18 = ($sub17*5)|0; + $21 = $i; + $add = (($mul18) + ($21))|0; + $arrayidx19 = (($LTPCoef_Q14) + ($add<<1)|0); + $22 = HEAP16[$arrayidx19>>1]|0; + $conv20 = $22 << 16 >> 16; + $23 = $temp_LTP_Gain_Q14; + $add21 = (($23) + ($conv20))|0; + $temp_LTP_Gain_Q14 = $add21; + $24 = $i; + $inc = (($24) + 1)|0; + $i = $inc; + } + $25 = $temp_LTP_Gain_Q14; + $26 = $LTP_Gain_Q14; + $cmp22 = ($25|0)>($26|0); + if ($cmp22) { + $27 = $temp_LTP_Gain_Q14; + $LTP_Gain_Q14 = $27; + $28 = $psPLC; + $LTPCoef_Q1425 = ((($28)) + 4|0); + $29 = $psDecCtrl$addr; + $LTPCoef_Q1426 = ((($29)) + 96|0); + $30 = $psDec$addr; + $nb_subfr27 = ((($30)) + 2324|0); + $31 = HEAP32[$nb_subfr27>>2]|0; + $sub28 = (($31) - 1)|0; + $32 = $j; + $sub29 = (($sub28) - ($32))|0; + $conv30 = $sub29&65535; + $conv31 = $conv30 << 16 >> 16; + $mul32 = ($conv31*5)|0; + $arrayidx33 = (($LTPCoef_Q1426) + ($mul32<<1)|0); + ;HEAP16[$LTPCoef_Q1425>>1]=HEAP16[$arrayidx33>>1]|0;HEAP16[$LTPCoef_Q1425+2>>1]=HEAP16[$arrayidx33+2>>1]|0;HEAP16[$LTPCoef_Q1425+4>>1]=HEAP16[$arrayidx33+4>>1]|0;HEAP16[$LTPCoef_Q1425+6>>1]=HEAP16[$arrayidx33+6>>1]|0;HEAP16[$LTPCoef_Q1425+8>>1]=HEAP16[$arrayidx33+8>>1]|0; + $33 = $psDecCtrl$addr; + $34 = $psDec$addr; + $nb_subfr35 = ((($34)) + 2324|0); + $35 = HEAP32[$nb_subfr35>>2]|0; + $sub36 = (($35) - 1)|0; + $36 = $j; + $sub37 = (($sub36) - ($36))|0; + $arrayidx38 = (($33) + ($sub37<<2)|0); + $37 = HEAP32[$arrayidx38>>2]|0; + $shl = $37 << 8; + $38 = $psPLC; + HEAP32[$38>>2] = $shl; + } + $39 = $j; + $inc41 = (($39) + 1)|0; + $j = $inc41; + } + $40 = $psPLC; + $LTPCoef_Q1443 = ((($40)) + 4|0); + ;HEAP32[$LTPCoef_Q1443>>2]=0|0;HEAP32[$LTPCoef_Q1443+4>>2]=0|0;HEAP16[$LTPCoef_Q1443+8>>1]=0|0; + $41 = $LTP_Gain_Q14; + $conv45 = $41&65535; + $42 = $psPLC; + $LTPCoef_Q1446 = ((($42)) + 4|0); + $arrayidx47 = ((($LTPCoef_Q1446)) + 4|0); + HEAP16[$arrayidx47>>1] = $conv45; + $43 = $LTP_Gain_Q14; + $cmp48 = ($43|0)<(11469); + if ($cmp48) { + $tmp = 11744256; + $44 = $tmp; + $45 = $LTP_Gain_Q14; + $cmp51 = ($45|0)>(1); + $46 = $LTP_Gain_Q14; + $cond = $cmp51 ? $46 : 1; + $div = (($44|0) / ($cond|0))&-1; + $scale_Q10 = $div; + $i = 0; + while(1) { + $47 = $i; + $cmp54 = ($47|0)<(5); + if (!($cmp54)) { + break L1; + } + $48 = $psPLC; + $LTPCoef_Q1457 = ((($48)) + 4|0); + $49 = $i; + $arrayidx58 = (($LTPCoef_Q1457) + ($49<<1)|0); + $50 = HEAP16[$arrayidx58>>1]|0; + $conv59 = $50 << 16 >> 16; + $51 = $scale_Q10; + $conv60 = $51&65535; + $conv61 = $conv60 << 16 >> 16; + $mul62 = Math_imul($conv59, $conv61)|0; + $shr = $mul62 >> 10; + $conv63 = $shr&65535; + $52 = $psPLC; + $LTPCoef_Q1464 = ((($52)) + 4|0); + $53 = $i; + $arrayidx65 = (($LTPCoef_Q1464) + ($53<<1)|0); + HEAP16[$arrayidx65>>1] = $conv63; + $54 = $i; + $inc67 = (($54) + 1)|0; + $i = $inc67; + } + } + $55 = $LTP_Gain_Q14; + $cmp69 = ($55|0)>(15565); + if ($cmp69) { + $tmp72 = 255016960; + $56 = $tmp72; + $57 = $LTP_Gain_Q14; + $cmp73 = ($57|0)>(1); + $58 = $LTP_Gain_Q14; + $cond78 = $cmp73 ? $58 : 1; + $div79 = (($56|0) / ($cond78|0))&-1; + $scale_Q14 = $div79; + $i = 0; + while(1) { + $59 = $i; + $cmp81 = ($59|0)<(5); + if (!($cmp81)) { + break L1; + } + $60 = $psPLC; + $LTPCoef_Q1484 = ((($60)) + 4|0); + $61 = $i; + $arrayidx85 = (($LTPCoef_Q1484) + ($61<<1)|0); + $62 = HEAP16[$arrayidx85>>1]|0; + $conv86 = $62 << 16 >> 16; + $63 = $scale_Q14; + $conv87 = $63&65535; + $conv88 = $conv87 << 16 >> 16; + $mul89 = Math_imul($conv86, $conv88)|0; + $shr90 = $mul89 >> 14; + $conv91 = $shr90&65535; + $64 = $psPLC; + $LTPCoef_Q1492 = ((($64)) + 4|0); + $65 = $i; + $arrayidx93 = (($LTPCoef_Q1492) + ($65<<1)|0); + HEAP16[$arrayidx93>>1] = $conv91; + $66 = $i; + $inc95 = (($66) + 1)|0; + $i = $inc95; + } + } + } else { + $67 = $psDec$addr; + $fs_kHz = ((($67)) + 2316|0); + $68 = HEAP32[$fs_kHz>>2]|0; + $conv100 = $68&65535; + $conv101 = $conv100 << 16 >> 16; + $mul102 = ($conv101*18)|0; + $shl103 = $mul102 << 8; + $69 = $psPLC; + HEAP32[$69>>2] = $shl103; + $70 = $psPLC; + $LTPCoef_Q14105 = ((($70)) + 4|0); + ;HEAP32[$LTPCoef_Q14105>>2]=0|0;HEAP32[$LTPCoef_Q14105+4>>2]=0|0;HEAP16[$LTPCoef_Q14105+8>>1]=0|0; + } + } while(0); + $71 = $psPLC; + $prevLPC_Q12 = ((($71)) + 14|0); + $72 = $psDecCtrl$addr; + $PredCoef_Q12 = ((($72)) + 32|0); + $arrayidx109 = ((($PredCoef_Q12)) + 32|0); + $73 = $psDec$addr; + $LPC_order = ((($73)) + 2340|0); + $74 = HEAP32[$LPC_order>>2]|0; + $mul111 = $74<<1; + _memcpy(($prevLPC_Q12|0),($arrayidx109|0),($mul111|0))|0; + $75 = $psDecCtrl$addr; + $LTP_scale_Q14 = ((($75)) + 136|0); + $76 = HEAP32[$LTP_scale_Q14>>2]|0; + $conv112 = $76&65535; + $77 = $psPLC; + $prevLTP_scale_Q14 = ((($77)) + 68|0); + HEAP16[$prevLTP_scale_Q14>>1] = $conv112; + $78 = $psPLC; + $prevGain_Q16 = ((($78)) + 72|0); + $79 = $psDecCtrl$addr; + $Gains_Q16 = ((($79)) + 16|0); + $80 = $psDec$addr; + $nb_subfr114 = ((($80)) + 2324|0); + $81 = HEAP32[$nb_subfr114>>2]|0; + $sub115 = (($81) - 2)|0; + $arrayidx116 = (($Gains_Q16) + ($sub115<<2)|0); + ;HEAP32[$prevGain_Q16>>2]=HEAP32[$arrayidx116>>2]|0;HEAP32[$prevGain_Q16+4>>2]=HEAP32[$arrayidx116+4>>2]|0; + $82 = $psDec$addr; + $subfr_length117 = ((($82)) + 2332|0); + $83 = HEAP32[$subfr_length117>>2]|0; + $84 = $psPLC; + $subfr_length118 = ((($84)) + 88|0); + HEAP32[$subfr_length118>>2] = $83; + $85 = $psDec$addr; + $nb_subfr119 = ((($85)) + 2324|0); + $86 = HEAP32[$nb_subfr119>>2]|0; + $87 = $psPLC; + $nb_subfr120 = ((($87)) + 84|0); + HEAP32[$nb_subfr120>>2] = $86; + STACKTOP = sp;return; +} +function _silk_PLC_energy($energy1,$shift1,$energy2,$shift2,$exc_Q14,$prevGain_Q10,$subfr_length,$nb_subfr) { + $energy1 = $energy1|0; + $shift1 = $shift1|0; + $energy2 = $energy2|0; + $shift2 = $shift2|0; + $exc_Q14 = $exc_Q14|0; + $prevGain_Q10 = $prevGain_Q10|0; + $subfr_length = $subfr_length|0; + $nb_subfr = $nb_subfr|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; + var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0; + var $add = 0, $add$ptr = 0, $add101 = 0, $add104 = 0, $add12 = 0, $add19 = 0, $add20 = 0, $add23 = 0, $add27 = 0, $add30 = 0, $add34 = 0, $add37 = 0, $add44 = 0, $add47 = 0, $add5 = 0, $add55 = 0, $add56 = 0, $add59 = 0, $add63 = 0, $add66 = 0; + var $add72 = 0, $add75 = 0, $add82 = 0, $add85 = 0, $add9 = 0, $add93 = 0, $add94 = 0, $add97 = 0, $and = 0, $and49 = 0, $and87 = 0, $arrayidx = 0, $arrayidx109 = 0, $arrayidx113 = 0, $arrayidx13 = 0, $arrayidx14 = 0, $arrayidx24 = 0, $arrayidx25 = 0, $arrayidx38 = 0, $arrayidx40 = 0; + var $arrayidx48 = 0, $arrayidx50 = 0, $arrayidx6 = 0, $arrayidx60 = 0, $arrayidx61 = 0, $arrayidx76 = 0, $arrayidx78 = 0, $arrayidx86 = 0, $arrayidx88 = 0, $arrayidx98 = 0, $arrayidx99 = 0, $cmp = 0, $cmp2 = 0, $cmp32 = 0, $cmp68 = 0, $cond107 = 0, $conv = 0, $conv108 = 0, $conv15 = 0, $conv16 = 0; + var $conv41 = 0, $conv42 = 0, $conv51 = 0, $conv52 = 0, $conv7 = 0, $conv79 = 0, $conv80 = 0, $conv89 = 0, $conv90 = 0, $energy1$addr = 0, $energy2$addr = 0, $exc_Q14$addr = 0, $exc_buf_ptr = 0, $i = 0, $inc = 0, $inc111 = 0, $k = 0, $mul = 0, $mul103 = 0, $mul11 = 0; + var $mul17 = 0, $mul22 = 0, $mul29 = 0, $mul36 = 0, $mul4 = 0, $mul43 = 0, $mul46 = 0, $mul53 = 0, $mul58 = 0, $mul65 = 0, $mul74 = 0, $mul8 = 0, $mul81 = 0, $mul84 = 0, $mul91 = 0, $mul96 = 0, $nb_subfr$addr = 0, $prevGain_Q10$addr = 0, $saved_stack = 0, $shift1$addr = 0; + var $shift2$addr = 0, $shr = 0, $shr100 = 0, $shr102 = 0, $shr105 = 0, $shr18 = 0, $shr26 = 0, $shr28 = 0, $shr31 = 0, $shr39 = 0, $shr54 = 0, $shr62 = 0, $shr64 = 0, $shr67 = 0, $shr77 = 0, $shr92 = 0, $sub = 0, $sub10 = 0, $sub21 = 0, $sub35 = 0; + var $sub45 = 0, $sub57 = 0, $sub73 = 0, $sub83 = 0, $sub95 = 0, $subfr_length$addr = 0, $vla = 0, $vla$alloca_mul = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $energy1$addr = $energy1; + $shift1$addr = $shift1; + $energy2$addr = $energy2; + $shift2$addr = $shift2; + $exc_Q14$addr = $exc_Q14; + $prevGain_Q10$addr = $prevGain_Q10; + $subfr_length$addr = $subfr_length; + $nb_subfr$addr = $nb_subfr; + $0 = $subfr_length$addr; + $mul = $0<<1; + $1 = (_llvm_stacksave()|0); + $saved_stack = $1; + $vla$alloca_mul = $mul<<1; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $exc_buf_ptr = $vla; + $k = 0; + while(1) { + $2 = $k; + $cmp = ($2|0)<(2); + if (!($cmp)) { + break; + } + $i = 0; + while(1) { + $3 = $i; + $4 = $subfr_length$addr; + $cmp2 = ($3|0)<($4|0); + if (!($cmp2)) { + break; + } + $5 = $exc_Q14$addr; + $6 = $i; + $7 = $k; + $8 = $nb_subfr$addr; + $add = (($7) + ($8))|0; + $sub = (($add) - 2)|0; + $9 = $subfr_length$addr; + $mul4 = Math_imul($sub, $9)|0; + $add5 = (($6) + ($mul4))|0; + $arrayidx = (($5) + ($add5<<2)|0); + $10 = HEAP32[$arrayidx>>2]|0; + $shr = $10 >> 16; + $11 = $prevGain_Q10$addr; + $12 = $k; + $arrayidx6 = (($11) + ($12<<2)|0); + $13 = HEAP32[$arrayidx6>>2]|0; + $conv = $13&65535; + $conv7 = $conv << 16 >> 16; + $mul8 = Math_imul($shr, $conv7)|0; + $14 = $exc_Q14$addr; + $15 = $i; + $16 = $k; + $17 = $nb_subfr$addr; + $add9 = (($16) + ($17))|0; + $sub10 = (($add9) - 2)|0; + $18 = $subfr_length$addr; + $mul11 = Math_imul($sub10, $18)|0; + $add12 = (($15) + ($mul11))|0; + $arrayidx13 = (($14) + ($add12<<2)|0); + $19 = HEAP32[$arrayidx13>>2]|0; + $and = $19 & 65535; + $20 = $prevGain_Q10$addr; + $21 = $k; + $arrayidx14 = (($20) + ($21<<2)|0); + $22 = HEAP32[$arrayidx14>>2]|0; + $conv15 = $22&65535; + $conv16 = $conv15 << 16 >> 16; + $mul17 = Math_imul($and, $conv16)|0; + $shr18 = $mul17 >> 16; + $add19 = (($mul8) + ($shr18))|0; + $23 = $exc_Q14$addr; + $24 = $i; + $25 = $k; + $26 = $nb_subfr$addr; + $add20 = (($25) + ($26))|0; + $sub21 = (($add20) - 2)|0; + $27 = $subfr_length$addr; + $mul22 = Math_imul($sub21, $27)|0; + $add23 = (($24) + ($mul22))|0; + $arrayidx24 = (($23) + ($add23<<2)|0); + $28 = HEAP32[$arrayidx24>>2]|0; + $29 = $prevGain_Q10$addr; + $30 = $k; + $arrayidx25 = (($29) + ($30<<2)|0); + $31 = HEAP32[$arrayidx25>>2]|0; + $shr26 = $31 >> 15; + $add27 = (($shr26) + 1)|0; + $shr28 = $add27 >> 1; + $mul29 = Math_imul($28, $shr28)|0; + $add30 = (($add19) + ($mul29))|0; + $shr31 = $add30 >> 8; + $cmp32 = ($shr31|0)>(32767); + if ($cmp32) { + $cond107 = 32767; + } else { + $32 = $exc_Q14$addr; + $33 = $i; + $34 = $k; + $35 = $nb_subfr$addr; + $add34 = (($34) + ($35))|0; + $sub35 = (($add34) - 2)|0; + $36 = $subfr_length$addr; + $mul36 = Math_imul($sub35, $36)|0; + $add37 = (($33) + ($mul36))|0; + $arrayidx38 = (($32) + ($add37<<2)|0); + $37 = HEAP32[$arrayidx38>>2]|0; + $shr39 = $37 >> 16; + $38 = $prevGain_Q10$addr; + $39 = $k; + $arrayidx40 = (($38) + ($39<<2)|0); + $40 = HEAP32[$arrayidx40>>2]|0; + $conv41 = $40&65535; + $conv42 = $conv41 << 16 >> 16; + $mul43 = Math_imul($shr39, $conv42)|0; + $41 = $exc_Q14$addr; + $42 = $i; + $43 = $k; + $44 = $nb_subfr$addr; + $add44 = (($43) + ($44))|0; + $sub45 = (($add44) - 2)|0; + $45 = $subfr_length$addr; + $mul46 = Math_imul($sub45, $45)|0; + $add47 = (($42) + ($mul46))|0; + $arrayidx48 = (($41) + ($add47<<2)|0); + $46 = HEAP32[$arrayidx48>>2]|0; + $and49 = $46 & 65535; + $47 = $prevGain_Q10$addr; + $48 = $k; + $arrayidx50 = (($47) + ($48<<2)|0); + $49 = HEAP32[$arrayidx50>>2]|0; + $conv51 = $49&65535; + $conv52 = $conv51 << 16 >> 16; + $mul53 = Math_imul($and49, $conv52)|0; + $shr54 = $mul53 >> 16; + $add55 = (($mul43) + ($shr54))|0; + $50 = $exc_Q14$addr; + $51 = $i; + $52 = $k; + $53 = $nb_subfr$addr; + $add56 = (($52) + ($53))|0; + $sub57 = (($add56) - 2)|0; + $54 = $subfr_length$addr; + $mul58 = Math_imul($sub57, $54)|0; + $add59 = (($51) + ($mul58))|0; + $arrayidx60 = (($50) + ($add59<<2)|0); + $55 = HEAP32[$arrayidx60>>2]|0; + $56 = $prevGain_Q10$addr; + $57 = $k; + $arrayidx61 = (($56) + ($57<<2)|0); + $58 = HEAP32[$arrayidx61>>2]|0; + $shr62 = $58 >> 15; + $add63 = (($shr62) + 1)|0; + $shr64 = $add63 >> 1; + $mul65 = Math_imul($55, $shr64)|0; + $add66 = (($add55) + ($mul65))|0; + $shr67 = $add66 >> 8; + $cmp68 = ($shr67|0)<(-32768); + if ($cmp68) { + $cond107 = -32768; + } else { + $59 = $exc_Q14$addr; + $60 = $i; + $61 = $k; + $62 = $nb_subfr$addr; + $add72 = (($61) + ($62))|0; + $sub73 = (($add72) - 2)|0; + $63 = $subfr_length$addr; + $mul74 = Math_imul($sub73, $63)|0; + $add75 = (($60) + ($mul74))|0; + $arrayidx76 = (($59) + ($add75<<2)|0); + $64 = HEAP32[$arrayidx76>>2]|0; + $shr77 = $64 >> 16; + $65 = $prevGain_Q10$addr; + $66 = $k; + $arrayidx78 = (($65) + ($66<<2)|0); + $67 = HEAP32[$arrayidx78>>2]|0; + $conv79 = $67&65535; + $conv80 = $conv79 << 16 >> 16; + $mul81 = Math_imul($shr77, $conv80)|0; + $68 = $exc_Q14$addr; + $69 = $i; + $70 = $k; + $71 = $nb_subfr$addr; + $add82 = (($70) + ($71))|0; + $sub83 = (($add82) - 2)|0; + $72 = $subfr_length$addr; + $mul84 = Math_imul($sub83, $72)|0; + $add85 = (($69) + ($mul84))|0; + $arrayidx86 = (($68) + ($add85<<2)|0); + $73 = HEAP32[$arrayidx86>>2]|0; + $and87 = $73 & 65535; + $74 = $prevGain_Q10$addr; + $75 = $k; + $arrayidx88 = (($74) + ($75<<2)|0); + $76 = HEAP32[$arrayidx88>>2]|0; + $conv89 = $76&65535; + $conv90 = $conv89 << 16 >> 16; + $mul91 = Math_imul($and87, $conv90)|0; + $shr92 = $mul91 >> 16; + $add93 = (($mul81) + ($shr92))|0; + $77 = $exc_Q14$addr; + $78 = $i; + $79 = $k; + $80 = $nb_subfr$addr; + $add94 = (($79) + ($80))|0; + $sub95 = (($add94) - 2)|0; + $81 = $subfr_length$addr; + $mul96 = Math_imul($sub95, $81)|0; + $add97 = (($78) + ($mul96))|0; + $arrayidx98 = (($77) + ($add97<<2)|0); + $82 = HEAP32[$arrayidx98>>2]|0; + $83 = $prevGain_Q10$addr; + $84 = $k; + $arrayidx99 = (($83) + ($84<<2)|0); + $85 = HEAP32[$arrayidx99>>2]|0; + $shr100 = $85 >> 15; + $add101 = (($shr100) + 1)|0; + $shr102 = $add101 >> 1; + $mul103 = Math_imul($82, $shr102)|0; + $add104 = (($add93) + ($mul103))|0; + $shr105 = $add104 >> 8; + $cond107 = $shr105; + } + } + $conv108 = $cond107&65535; + $86 = $exc_buf_ptr; + $87 = $i; + $arrayidx109 = (($86) + ($87<<1)|0); + HEAP16[$arrayidx109>>1] = $conv108; + $88 = $i; + $inc = (($88) + 1)|0; + $i = $inc; + } + $89 = $subfr_length$addr; + $90 = $exc_buf_ptr; + $add$ptr = (($90) + ($89<<1)|0); + $exc_buf_ptr = $add$ptr; + $91 = $k; + $inc111 = (($91) + 1)|0; + $k = $inc111; + } + $92 = $energy1$addr; + $93 = $shift1$addr; + $94 = $subfr_length$addr; + _silk_sum_sqr_shift($92,$93,$vla,$94); + $95 = $energy2$addr; + $96 = $shift2$addr; + $97 = $subfr_length$addr; + $arrayidx113 = (($vla) + ($97<<1)|0); + $98 = $subfr_length$addr; + _silk_sum_sqr_shift($95,$96,$arrayidx113,$98); + $99 = $saved_stack; + _llvm_stackrestore(($99|0)); + STACKTOP = sp;return; +} +function _silk_max_int_423($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)>($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_min_int_424($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)<($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_max_16($a,$b) { + $a = $a|0; + $b = $b|0; + var $$sink = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $conv = 0, $conv1 = 0, $conv4 = 0, $conv5 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $conv = $0 << 16 >> 16; + $1 = $b$addr; + $conv1 = $1 << 16 >> 16; + $cmp = ($conv|0)>($conv1|0); + $2 = $b$addr; + $3 = $a$addr; + $$sink = $cmp ? $3 : $2; + $conv4 = $$sink << 16 >> 16; + $conv5 = $conv4&65535; + STACKTOP = sp;return ($conv5|0); +} +function _silk_min_32_425($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)<($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_max_32_426($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)>($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_INVERSE32_varQ_427($b32,$Qres) { + $b32 = $b32|0; + $Qres = $Qres|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $Qres$addr = 0, $add = 0; + var $add20 = 0, $add21 = 0, $add23 = 0, $add26 = 0, $and = 0, $and15 = 0, $b32$addr = 0, $b32_inv = 0, $b32_nrm = 0, $b_headrm = 0, $call = 0, $cmp = 0, $cmp29 = 0, $cmp35 = 0, $cmp40 = 0, $cmp48 = 0, $cmp61 = 0, $cmp69 = 0, $cmp83 = 0, $cond = 0; + var $cond80 = 0, $conv = 0, $conv12 = 0, $conv13 = 0, $conv16 = 0, $conv17 = 0, $conv4 = 0, $conv5 = 0, $conv6 = 0, $div = 0, $err_Q32 = 0, $lshift = 0, $mul = 0, $mul14 = 0, $mul18 = 0, $mul25 = 0, $mul7 = 0, $result = 0, $retval = 0, $shl = 0; + var $shl10 = 0, $shl2 = 0, $shl82 = 0, $shr = 0, $shr11 = 0, $shr19 = 0, $shr22 = 0, $shr24 = 0, $shr3 = 0, $shr32 = 0, $shr34 = 0, $shr39 = 0, $shr44 = 0, $shr47 = 0, $shr52 = 0, $shr60 = 0, $shr65 = 0, $shr68 = 0, $shr73 = 0, $shr8 = 0; + var $shr86 = 0, $sub = 0, $sub1 = 0, $sub27 = 0, $sub28 = 0, $sub31 = 0, $sub33 = 0, $sub38 = 0, $sub43 = 0, $sub46 = 0, $sub51 = 0, $sub64 = 0, $sub67 = 0, $sub72 = 0, $sub81 = 0, $sub9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $b32$addr = $b32; + $Qres$addr = $Qres; + $0 = $b32$addr; + $cmp = ($0|0)>(0); + $1 = $b32$addr; + $sub = (0 - ($1))|0; + $cond = $cmp ? $1 : $sub; + $call = (_silk_CLZ32_428($cond)|0); + $sub1 = (($call) - 1)|0; + $b_headrm = $sub1; + $2 = $b32$addr; + $3 = $b_headrm; + $shl = $2 << $3; + $b32_nrm = $shl; + $4 = $b32_nrm; + $shr = $4 >> 16; + $div = (536870911 / ($shr|0))&-1; + $b32_inv = $div; + $5 = $b32_inv; + $shl2 = $5 << 16; + $result = $shl2; + $6 = $b32_nrm; + $shr3 = $6 >> 16; + $7 = $b32_inv; + $conv = $7&65535; + $conv4 = $conv << 16 >> 16; + $mul = Math_imul($shr3, $conv4)|0; + $8 = $b32_nrm; + $and = $8 & 65535; + $9 = $b32_inv; + $conv5 = $9&65535; + $conv6 = $conv5 << 16 >> 16; + $mul7 = Math_imul($and, $conv6)|0; + $shr8 = $mul7 >> 16; + $add = (($mul) + ($shr8))|0; + $sub9 = (536870912 - ($add))|0; + $shl10 = $sub9 << 3; + $err_Q32 = $shl10; + $10 = $result; + $11 = $err_Q32; + $shr11 = $11 >> 16; + $12 = $b32_inv; + $conv12 = $12&65535; + $conv13 = $conv12 << 16 >> 16; + $mul14 = Math_imul($shr11, $conv13)|0; + $13 = $err_Q32; + $and15 = $13 & 65535; + $14 = $b32_inv; + $conv16 = $14&65535; + $conv17 = $conv16 << 16 >> 16; + $mul18 = Math_imul($and15, $conv17)|0; + $shr19 = $mul18 >> 16; + $add20 = (($mul14) + ($shr19))|0; + $add21 = (($10) + ($add20))|0; + $15 = $err_Q32; + $16 = $b32_inv; + $shr22 = $16 >> 15; + $add23 = (($shr22) + 1)|0; + $shr24 = $add23 >> 1; + $mul25 = Math_imul($15, $shr24)|0; + $add26 = (($add21) + ($mul25))|0; + $result = $add26; + $17 = $b_headrm; + $sub27 = (61 - ($17))|0; + $18 = $Qres$addr; + $sub28 = (($sub27) - ($18))|0; + $lshift = $sub28; + $19 = $lshift; + $cmp29 = ($19|0)<=(0); + $20 = $lshift; + if (!($cmp29)) { + $cmp83 = ($20|0)<(32); + if ($cmp83) { + $35 = $result; + $36 = $lshift; + $shr86 = $35 >> $36; + $retval = $shr86; + $37 = $retval; + STACKTOP = sp;return ($37|0); + } else { + $retval = 0; + $37 = $retval; + STACKTOP = sp;return ($37|0); + } + } + $sub31 = (0 - ($20))|0; + $shr32 = -2147483648 >> $sub31; + $21 = $lshift; + $sub33 = (0 - ($21))|0; + $shr34 = 2147483647 >> $sub33; + $cmp35 = ($shr32|0)>($shr34|0); + $22 = $result; + $23 = $lshift; + $sub38 = (0 - ($23))|0; + do { + if ($cmp35) { + $shr39 = -2147483648 >> $sub38; + $cmp40 = ($22|0)>($shr39|0); + if ($cmp40) { + $24 = $lshift; + $sub43 = (0 - ($24))|0; + $shr44 = -2147483648 >> $sub43; + $cond80 = $shr44; + break; + } + $25 = $result; + $26 = $lshift; + $sub46 = (0 - ($26))|0; + $shr47 = 2147483647 >> $sub46; + $cmp48 = ($25|0)<($shr47|0); + if ($cmp48) { + $27 = $lshift; + $sub51 = (0 - ($27))|0; + $shr52 = 2147483647 >> $sub51; + $cond80 = $shr52; + break; + } else { + $28 = $result; + $cond80 = $28; + break; + } + } else { + $shr60 = 2147483647 >> $sub38; + $cmp61 = ($22|0)>($shr60|0); + if ($cmp61) { + $29 = $lshift; + $sub64 = (0 - ($29))|0; + $shr65 = 2147483647 >> $sub64; + $cond80 = $shr65; + break; + } + $30 = $result; + $31 = $lshift; + $sub67 = (0 - ($31))|0; + $shr68 = -2147483648 >> $sub67; + $cmp69 = ($30|0)<($shr68|0); + if ($cmp69) { + $32 = $lshift; + $sub72 = (0 - ($32))|0; + $shr73 = -2147483648 >> $sub72; + $cond80 = $shr73; + break; + } else { + $33 = $result; + $cond80 = $33; + break; + } + } + } while(0); + $34 = $lshift; + $sub81 = (0 - ($34))|0; + $shl82 = $cond80 << $sub81; + $retval = $shl82; + $37 = $retval; + STACKTOP = sp;return ($37|0); +} +function _silk_CLZ32_428($in32) { + $in32 = $in32|0; + var $0 = 0, $1 = 0, $2 = 0, $cond = 0, $in32$addr = 0, $sub = 0, $sub1 = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $in32$addr = $in32; + $0 = $in32$addr; + $tobool = ($0|0)!=(0); + if (!($tobool)) { + $cond = 32; + STACKTOP = sp;return ($cond|0); + } + $1 = $in32$addr; + $2 = (Math_clz32(($1|0))|0); + $sub = (32 - ($2))|0; + $sub1 = (32 - ($sub))|0; + $cond = $sub1; + STACKTOP = sp;return ($cond|0); +} +function _silk_PLC_glue_frames($psDec,$frame,$length) { + $psDec = $psDec|0; + $frame = $frame|0; + $length = $length|0; + var $$sink = 0, $$sink1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; + var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; + var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; + var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $7 = 0, $8 = 0, $9 = 0, $LZ = 0, $add = 0, $add43 = 0, $and = 0, $arrayidx = 0, $arrayidx37 = 0, $arrayidx42 = 0, $call = 0, $call26 = 0, $call30 = 0, $cmp = 0, $cmp12 = 0, $cmp19 = 0; + var $cmp29 = 0, $cmp35 = 0, $cmp44 = 0, $conc_energy = 0, $conc_energy18 = 0, $conc_energy21 = 0, $conc_energy23 = 0, $conc_energy24 = 0, $conc_energy28 = 0, $conc_energy7 = 0, $conc_energy9 = 0, $conc_energy_shift = 0, $conc_energy_shift11 = 0, $conc_energy_shift14 = 0, $conc_energy_shift5 = 0, $conc_energy_shift8 = 0, $cond = 0, $conv = 0, $conv38 = 0, $conv41 = 0; + var $div = 0, $div33 = 0, $energy = 0, $energy_shift = 0, $frac_Q24 = 0, $frame$addr = 0, $gain_Q16 = 0, $i = 0, $inc = 0, $last_frame_lost2 = 0, $last_frame_lost50 = 0, $length$addr = 0, $lossCnt = 0, $mul = 0, $mul39 = 0, $psDec$addr = 0, $psPLC = 0, $sPLC = 0, $sPLC1 = 0, $shl = 0; + var $shl31 = 0, $shl34 = 0, $shr = 0, $shr16 = 0, $shr27 = 0, $shr36 = 0, $shr40 = 0, $slope_Q16 = 0, $sub = 0, $sub15 = 0, $sub22 = 0, $sub25 = 0, $sub32 = 0, $tobool = 0, $tobool3 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $energy_shift = sp + 24|0; + $energy = sp + 20|0; + $psDec$addr = $psDec; + $frame$addr = $frame; + $length$addr = $length; + $0 = $psDec$addr; + $sPLC = ((($0)) + 4168|0); + $psPLC = $sPLC; + $1 = $psDec$addr; + $lossCnt = ((($1)) + 4160|0); + $2 = HEAP32[$lossCnt>>2]|0; + $tobool = ($2|0)!=(0); + if ($tobool) { + $3 = $psPLC; + $conc_energy = ((($3)) + 60|0); + $4 = $psPLC; + $conc_energy_shift = ((($4)) + 64|0); + $5 = $frame$addr; + $6 = $length$addr; + _silk_sum_sqr_shift($conc_energy,$conc_energy_shift,$5,$6); + $7 = $psPLC; + $$sink = 1;$$sink1 = $7; + $last_frame_lost50 = ((($$sink1)) + 48|0); + HEAP32[$last_frame_lost50>>2] = $$sink; + STACKTOP = sp;return; + } + $8 = $psDec$addr; + $sPLC1 = ((($8)) + 4168|0); + $last_frame_lost2 = ((($sPLC1)) + 48|0); + $9 = HEAP32[$last_frame_lost2>>2]|0; + $tobool3 = ($9|0)!=(0); + L5: do { + if ($tobool3) { + $10 = $frame$addr; + $11 = $length$addr; + _silk_sum_sqr_shift($energy,$energy_shift,$10,$11); + $12 = HEAP32[$energy_shift>>2]|0; + $13 = $psPLC; + $conc_energy_shift5 = ((($13)) + 64|0); + $14 = HEAP32[$conc_energy_shift5>>2]|0; + $cmp = ($12|0)>($14|0); + if ($cmp) { + $15 = $psPLC; + $conc_energy7 = ((($15)) + 60|0); + $16 = HEAP32[$conc_energy7>>2]|0; + $17 = HEAP32[$energy_shift>>2]|0; + $18 = $psPLC; + $conc_energy_shift8 = ((($18)) + 64|0); + $19 = HEAP32[$conc_energy_shift8>>2]|0; + $sub = (($17) - ($19))|0; + $shr = $16 >> $sub; + $20 = $psPLC; + $conc_energy9 = ((($20)) + 60|0); + HEAP32[$conc_energy9>>2] = $shr; + } else { + $21 = HEAP32[$energy_shift>>2]|0; + $22 = $psPLC; + $conc_energy_shift11 = ((($22)) + 64|0); + $23 = HEAP32[$conc_energy_shift11>>2]|0; + $cmp12 = ($21|0)<($23|0); + if ($cmp12) { + $24 = HEAP32[$energy>>2]|0; + $25 = $psPLC; + $conc_energy_shift14 = ((($25)) + 64|0); + $26 = HEAP32[$conc_energy_shift14>>2]|0; + $27 = HEAP32[$energy_shift>>2]|0; + $sub15 = (($26) - ($27))|0; + $shr16 = $24 >> $sub15; + HEAP32[$energy>>2] = $shr16; + } + } + $28 = HEAP32[$energy>>2]|0; + $29 = $psPLC; + $conc_energy18 = ((($29)) + 60|0); + $30 = HEAP32[$conc_energy18>>2]|0; + $cmp19 = ($28|0)>($30|0); + if ($cmp19) { + $31 = $psPLC; + $conc_energy21 = ((($31)) + 60|0); + $32 = HEAP32[$conc_energy21>>2]|0; + $call = (_silk_CLZ32_428($32)|0); + $LZ = $call; + $33 = $LZ; + $sub22 = (($33) - 1)|0; + $LZ = $sub22; + $34 = $psPLC; + $conc_energy23 = ((($34)) + 60|0); + $35 = HEAP32[$conc_energy23>>2]|0; + $36 = $LZ; + $shl = $35 << $36; + $37 = $psPLC; + $conc_energy24 = ((($37)) + 60|0); + HEAP32[$conc_energy24>>2] = $shl; + $38 = HEAP32[$energy>>2]|0; + $39 = $LZ; + $sub25 = (24 - ($39))|0; + $call26 = (_silk_max_32_426($sub25,0)|0); + $shr27 = $38 >> $call26; + HEAP32[$energy>>2] = $shr27; + $40 = $psPLC; + $conc_energy28 = ((($40)) + 60|0); + $41 = HEAP32[$conc_energy28>>2]|0; + $42 = HEAP32[$energy>>2]|0; + $cmp29 = ($42|0)>(1); + $43 = HEAP32[$energy>>2]|0; + $cond = $cmp29 ? $43 : 1; + $div = (($41|0) / ($cond|0))&-1; + $frac_Q24 = $div; + $44 = $frac_Q24; + $call30 = (_silk_SQRT_APPROX_431($44)|0); + $shl31 = $call30 << 4; + $gain_Q16 = $shl31; + $45 = $gain_Q16; + $sub32 = (65536 - ($45))|0; + $46 = $length$addr; + $div33 = (($sub32|0) / ($46|0))&-1; + $slope_Q16 = $div33; + $47 = $slope_Q16; + $shl34 = $47 << 2; + $slope_Q16 = $shl34; + $i = 0; + while(1) { + $48 = $i; + $49 = $length$addr; + $cmp35 = ($48|0)<($49|0); + if (!($cmp35)) { + break L5; + } + $50 = $gain_Q16; + $shr36 = $50 >> 16; + $51 = $frame$addr; + $52 = $i; + $arrayidx = (($51) + ($52<<1)|0); + $53 = HEAP16[$arrayidx>>1]|0; + $conv = $53 << 16 >> 16; + $mul = Math_imul($shr36, $conv)|0; + $54 = $gain_Q16; + $and = $54 & 65535; + $55 = $frame$addr; + $56 = $i; + $arrayidx37 = (($55) + ($56<<1)|0); + $57 = HEAP16[$arrayidx37>>1]|0; + $conv38 = $57 << 16 >> 16; + $mul39 = Math_imul($and, $conv38)|0; + $shr40 = $mul39 >> 16; + $add = (($mul) + ($shr40))|0; + $conv41 = $add&65535; + $58 = $frame$addr; + $59 = $i; + $arrayidx42 = (($58) + ($59<<1)|0); + HEAP16[$arrayidx42>>1] = $conv41; + $60 = $slope_Q16; + $61 = $gain_Q16; + $add43 = (($61) + ($60))|0; + $gain_Q16 = $add43; + $62 = $gain_Q16; + $cmp44 = ($62|0)>(65536); + if ($cmp44) { + break L5; + } + $63 = $i; + $inc = (($63) + 1)|0; + $i = $inc; + } + } + } + } while(0); + $64 = $psPLC; + $$sink = 0;$$sink1 = $64; + $last_frame_lost50 = ((($$sink1)) + 48|0); + HEAP32[$last_frame_lost50>>2] = $$sink; + STACKTOP = sp;return; +} +function _silk_SQRT_APPROX_431($x) { + $x = $x|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add17 = 0, $and = 0, $and9 = 0, $cmp = 0, $conv = 0, $conv10 = 0, $conv11 = 0; + var $conv13 = 0, $conv14 = 0, $conv5 = 0, $conv6 = 0, $conv7 = 0, $frac_Q7 = 0, $lz = 0, $mul = 0, $mul12 = 0, $mul15 = 0, $mul8 = 0, $retval = 0, $shr = 0, $shr16 = 0, $shr3 = 0, $shr4 = 0, $tobool = 0, $x$addr = 0, $y = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $lz = sp + 4|0; + $frac_Q7 = sp; + $x$addr = $x; + $0 = $x$addr; + $cmp = ($0|0)<=(0); + if ($cmp) { + $retval = 0; + $11 = $retval; + STACKTOP = sp;return ($11|0); + } + $1 = $x$addr; + _silk_CLZ_FRAC_432($1,$lz,$frac_Q7); + $2 = HEAP32[$lz>>2]|0; + $and = $2 & 1; + $tobool = ($and|0)!=(0); + if ($tobool) { + $y = 32768; + } else { + $y = 46214; + } + $3 = HEAP32[$lz>>2]|0; + $shr = $3 >> 1; + $4 = $y; + $shr3 = $4 >> $shr; + $y = $shr3; + $5 = $y; + $6 = $y; + $shr4 = $6 >> 16; + $7 = HEAP32[$frac_Q7>>2]|0; + $conv = $7&65535; + $conv5 = $conv << 16 >> 16; + $mul = ($conv5*213)|0; + $conv6 = $mul&65535; + $conv7 = $conv6 << 16 >> 16; + $mul8 = Math_imul($shr4, $conv7)|0; + $8 = $y; + $and9 = $8 & 65535; + $9 = HEAP32[$frac_Q7>>2]|0; + $conv10 = $9&65535; + $conv11 = $conv10 << 16 >> 16; + $mul12 = ($conv11*213)|0; + $conv13 = $mul12&65535; + $conv14 = $conv13 << 16 >> 16; + $mul15 = Math_imul($and9, $conv14)|0; + $shr16 = $mul15 >> 16; + $add = (($mul8) + ($shr16))|0; + $add17 = (($5) + ($add))|0; + $y = $add17; + $10 = $y; + $retval = $10; + $11 = $retval; + STACKTOP = sp;return ($11|0); +} +function _silk_CLZ_FRAC_432($in,$lz,$frac_Q7) { + $in = $in|0; + $lz = $lz|0; + $frac_Q7 = $frac_Q7|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $and = 0, $call = 0, $call1 = 0, $frac_Q7$addr = 0, $in$addr = 0, $lz$addr = 0, $lzeros = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $in$addr = $in; + $lz$addr = $lz; + $frac_Q7$addr = $frac_Q7; + $0 = $in$addr; + $call = (_silk_CLZ32_428($0)|0); + $lzeros = $call; + $1 = $lzeros; + $2 = $lz$addr; + HEAP32[$2>>2] = $1; + $3 = $in$addr; + $4 = $lzeros; + $sub = (24 - ($4))|0; + $call1 = (_silk_ROR32_433($3,$sub)|0); + $and = $call1 & 127; + $5 = $frac_Q7$addr; + HEAP32[$5>>2] = $and; + STACKTOP = sp;return; +} +function _silk_ROR32_433($a32,$rot) { + $a32 = $a32|0; + $rot = $rot|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a32$addr = 0, $cmp = 0, $cmp1 = 0, $m = 0, $or = 0, $or8 = 0; + var $r = 0, $retval = 0, $rot$addr = 0, $shl = 0, $shl6 = 0, $shr = 0, $shr7 = 0, $sub = 0, $sub3 = 0, $sub5 = 0, $x = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $a32$addr = $a32; + $rot$addr = $rot; + $0 = $a32$addr; + $x = $0; + $1 = $rot$addr; + $r = $1; + $2 = $rot$addr; + $sub = (0 - ($2))|0; + $m = $sub; + $3 = $rot$addr; + $cmp = ($3|0)==(0); + if ($cmp) { + $4 = $a32$addr; + $retval = $4; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } + $5 = $rot$addr; + $cmp1 = ($5|0)<(0); + $6 = $x; + if ($cmp1) { + $7 = $m; + $shl = $6 << $7; + $8 = $x; + $9 = $m; + $sub3 = (32 - ($9))|0; + $shr = $8 >>> $sub3; + $or = $shl | $shr; + $retval = $or; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } else { + $10 = $r; + $sub5 = (32 - ($10))|0; + $shl6 = $6 << $sub5; + $11 = $x; + $12 = $r; + $shr7 = $11 >>> $12; + $or8 = $shl6 | $shr7; + $retval = $or8; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } + return (0)|0; +} +function _silk_VAD_Init($psSilk_VAD) { + $psSilk_VAD = $psSilk_VAD|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; + var $7 = 0, $8 = 0, $9 = 0, $NL = 0, $NL7 = 0, $NoiseLevelBias = 0, $NoiseLevelBias4 = 0, $NrgRatioSmth_Q8 = 0, $add = 0, $arrayidx = 0, $arrayidx10 = 0, $arrayidx17 = 0, $arrayidx5 = 0, $arrayidx6 = 0, $arrayidx8 = 0, $b = 0, $call = 0, $cmp = 0, $cmp15 = 0, $cmp2 = 0; + var $counter = 0, $div = 0, $div9 = 0, $inc = 0, $inc12 = 0, $inc19 = 0, $inv_NL = 0, $mul = 0, $psSilk_VAD$addr = 0, $ret = 0, dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $psSilk_VAD$addr = $psSilk_VAD; + $ret = 0; + $0 = $psSilk_VAD$addr; + dest=$0; stop=dest+112|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + $b = 0; + while(1) { + $1 = $b; + $cmp = ($1|0)<(4); + if (!($cmp)) { + break; + } + $2 = $b; + $add = (($2) + 1)|0; + $div = (50 / ($add|0))&-1; + $call = (_silk_max_32_440($div,1)|0); + $3 = $psSilk_VAD$addr; + $NoiseLevelBias = ((($3)) + 92|0); + $4 = $b; + $arrayidx = (($NoiseLevelBias) + ($4<<2)|0); + HEAP32[$arrayidx>>2] = $call; + $5 = $b; + $inc = (($5) + 1)|0; + $b = $inc; + } + $b = 0; + while(1) { + $6 = $b; + $cmp2 = ($6|0)<(4); + $7 = $psSilk_VAD$addr; + if (!($cmp2)) { + break; + } + $NoiseLevelBias4 = ((($7)) + 92|0); + $8 = $b; + $arrayidx5 = (($NoiseLevelBias4) + ($8<<2)|0); + $9 = HEAP32[$arrayidx5>>2]|0; + $mul = ($9*100)|0; + $10 = $psSilk_VAD$addr; + $NL = ((($10)) + 60|0); + $11 = $b; + $arrayidx6 = (($NL) + ($11<<2)|0); + HEAP32[$arrayidx6>>2] = $mul; + $12 = $psSilk_VAD$addr; + $NL7 = ((($12)) + 60|0); + $13 = $b; + $arrayidx8 = (($NL7) + ($13<<2)|0); + $14 = HEAP32[$arrayidx8>>2]|0; + $div9 = (2147483647 / ($14|0))&-1; + $15 = $psSilk_VAD$addr; + $inv_NL = ((($15)) + 76|0); + $16 = $b; + $arrayidx10 = (($inv_NL) + ($16<<2)|0); + HEAP32[$arrayidx10>>2] = $div9; + $17 = $b; + $inc12 = (($17) + 1)|0; + $b = $inc12; + } + $counter = ((($7)) + 108|0); + HEAP32[$counter>>2] = 15; + $b = 0; + while(1) { + $18 = $b; + $cmp15 = ($18|0)<(4); + if (!($cmp15)) { + break; + } + $19 = $psSilk_VAD$addr; + $NrgRatioSmth_Q8 = ((($19)) + 40|0); + $20 = $b; + $arrayidx17 = (($NrgRatioSmth_Q8) + ($20<<2)|0); + HEAP32[$arrayidx17>>2] = 25600; + $21 = $b; + $inc19 = (($21) + 1)|0; + $b = $inc19; + } + $22 = $ret; + STACKTOP = sp;return ($22|0); +} +function _silk_max_32_440($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)>($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_bwexpander_32($ar,$d,$chirp_Q16) { + $ar = $ar|0; + $d = $d|0; + $chirp_Q16 = $chirp_Q16|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add10 = 0, $add13 = 0, $add17 = 0, $add19 = 0, $add33 = 0, $add37 = 0; + var $add40 = 0, $and = 0, $and26 = 0, $ar$addr = 0, $arrayidx = 0, $arrayidx14 = 0, $arrayidx22 = 0, $arrayidx28 = 0, $arrayidx3 = 0, $arrayidx35 = 0, $arrayidx42 = 0, $arrayidx8 = 0, $chirp_Q16$addr = 0, $chirp_minus_one_Q16 = 0, $cmp = 0, $conv = 0, $conv2 = 0, $conv23 = 0, $conv24 = 0, $conv29 = 0; + var $conv30 = 0, $conv4 = 0, $conv5 = 0, $d$addr = 0, $i = 0, $inc = 0, $mul = 0, $mul12 = 0, $mul15 = 0, $mul25 = 0, $mul31 = 0, $mul39 = 0, $mul6 = 0, $shr = 0, $shr11 = 0, $shr16 = 0, $shr18 = 0, $shr32 = 0, $shr36 = 0, $shr38 = 0; + var $shr7 = 0, $shr9 = 0, $sub = 0, $sub1 = 0, $sub21 = 0, $sub27 = 0, $sub34 = 0, $sub41 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $ar$addr = $ar; + $d$addr = $d; + $chirp_Q16$addr = $chirp_Q16; + $0 = $chirp_Q16$addr; + $sub = (($0) - 65536)|0; + $chirp_minus_one_Q16 = $sub; + $i = 0; + while(1) { + $1 = $i; + $2 = $d$addr; + $sub1 = (($2) - 1)|0; + $cmp = ($1|0)<($sub1|0); + $3 = $chirp_Q16$addr; + $shr = $3 >> 16; + $4 = $ar$addr; + if (!($cmp)) { + break; + } + $5 = $i; + $arrayidx = (($4) + ($5<<2)|0); + $6 = HEAP32[$arrayidx>>2]|0; + $conv = $6&65535; + $conv2 = $conv << 16 >> 16; + $mul = Math_imul($shr, $conv2)|0; + $7 = $chirp_Q16$addr; + $and = $7 & 65535; + $8 = $ar$addr; + $9 = $i; + $arrayidx3 = (($8) + ($9<<2)|0); + $10 = HEAP32[$arrayidx3>>2]|0; + $conv4 = $10&65535; + $conv5 = $conv4 << 16 >> 16; + $mul6 = Math_imul($and, $conv5)|0; + $shr7 = $mul6 >> 16; + $add = (($mul) + ($shr7))|0; + $11 = $chirp_Q16$addr; + $12 = $ar$addr; + $13 = $i; + $arrayidx8 = (($12) + ($13<<2)|0); + $14 = HEAP32[$arrayidx8>>2]|0; + $shr9 = $14 >> 15; + $add10 = (($shr9) + 1)|0; + $shr11 = $add10 >> 1; + $mul12 = Math_imul($11, $shr11)|0; + $add13 = (($add) + ($mul12))|0; + $15 = $ar$addr; + $16 = $i; + $arrayidx14 = (($15) + ($16<<2)|0); + HEAP32[$arrayidx14>>2] = $add13; + $17 = $chirp_Q16$addr; + $18 = $chirp_minus_one_Q16; + $mul15 = Math_imul($17, $18)|0; + $shr16 = $mul15 >> 15; + $add17 = (($shr16) + 1)|0; + $shr18 = $add17 >> 1; + $19 = $chirp_Q16$addr; + $add19 = (($19) + ($shr18))|0; + $chirp_Q16$addr = $add19; + $20 = $i; + $inc = (($20) + 1)|0; + $i = $inc; + } + $21 = $d$addr; + $sub21 = (($21) - 1)|0; + $arrayidx22 = (($4) + ($sub21<<2)|0); + $22 = HEAP32[$arrayidx22>>2]|0; + $conv23 = $22&65535; + $conv24 = $conv23 << 16 >> 16; + $mul25 = Math_imul($shr, $conv24)|0; + $23 = $chirp_Q16$addr; + $and26 = $23 & 65535; + $24 = $ar$addr; + $25 = $d$addr; + $sub27 = (($25) - 1)|0; + $arrayidx28 = (($24) + ($sub27<<2)|0); + $26 = HEAP32[$arrayidx28>>2]|0; + $conv29 = $26&65535; + $conv30 = $conv29 << 16 >> 16; + $mul31 = Math_imul($and26, $conv30)|0; + $shr32 = $mul31 >> 16; + $add33 = (($mul25) + ($shr32))|0; + $27 = $chirp_Q16$addr; + $28 = $ar$addr; + $29 = $d$addr; + $sub34 = (($29) - 1)|0; + $arrayidx35 = (($28) + ($sub34<<2)|0); + $30 = HEAP32[$arrayidx35>>2]|0; + $shr36 = $30 >> 15; + $add37 = (($shr36) + 1)|0; + $shr38 = $add37 >> 1; + $mul39 = Math_imul($27, $shr38)|0; + $add40 = (($add33) + ($mul39))|0; + $31 = $ar$addr; + $32 = $d$addr; + $sub41 = (($32) - 1)|0; + $arrayidx42 = (($31) + ($sub41<<2)|0); + HEAP32[$arrayidx42>>2] = $add40; + STACKTOP = sp;return; +} +function _silk_bwexpander($ar,$d,$chirp_Q16) { + $ar = $ar|0; + $d = $d|0; + $chirp_Q16 = $chirp_Q16|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add15 = 0, $add7 = 0; + var $add9 = 0, $ar$addr = 0, $arrayidx = 0, $arrayidx11 = 0, $arrayidx19 = 0, $arrayidx4 = 0, $chirp_Q16$addr = 0, $chirp_minus_one_Q16 = 0, $cmp = 0, $conv = 0, $conv12 = 0, $conv17 = 0, $conv3 = 0, $d$addr = 0, $i = 0, $inc = 0, $mul = 0, $mul13 = 0, $mul5 = 0, $shr = 0; + var $shr14 = 0, $shr16 = 0, $shr2 = 0, $shr6 = 0, $shr8 = 0, $sub = 0, $sub1 = 0, $sub10 = 0, $sub18 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $ar$addr = $ar; + $d$addr = $d; + $chirp_Q16$addr = $chirp_Q16; + $0 = $chirp_Q16$addr; + $sub = (($0) - 65536)|0; + $chirp_minus_one_Q16 = $sub; + $i = 0; + while(1) { + $1 = $i; + $2 = $d$addr; + $sub1 = (($2) - 1)|0; + $cmp = ($1|0)<($sub1|0); + $3 = $chirp_Q16$addr; + $4 = $ar$addr; + if (!($cmp)) { + break; + } + $5 = $i; + $arrayidx = (($4) + ($5<<1)|0); + $6 = HEAP16[$arrayidx>>1]|0; + $conv = $6 << 16 >> 16; + $mul = Math_imul($3, $conv)|0; + $shr = $mul >> 15; + $add = (($shr) + 1)|0; + $shr2 = $add >> 1; + $conv3 = $shr2&65535; + $7 = $ar$addr; + $8 = $i; + $arrayidx4 = (($7) + ($8<<1)|0); + HEAP16[$arrayidx4>>1] = $conv3; + $9 = $chirp_Q16$addr; + $10 = $chirp_minus_one_Q16; + $mul5 = Math_imul($9, $10)|0; + $shr6 = $mul5 >> 15; + $add7 = (($shr6) + 1)|0; + $shr8 = $add7 >> 1; + $11 = $chirp_Q16$addr; + $add9 = (($11) + ($shr8))|0; + $chirp_Q16$addr = $add9; + $12 = $i; + $inc = (($12) + 1)|0; + $i = $inc; + } + $13 = $d$addr; + $sub10 = (($13) - 1)|0; + $arrayidx11 = (($4) + ($sub10<<1)|0); + $14 = HEAP16[$arrayidx11>>1]|0; + $conv12 = $14 << 16 >> 16; + $mul13 = Math_imul($3, $conv12)|0; + $shr14 = $mul13 >> 15; + $add15 = (($shr14) + 1)|0; + $shr16 = $add15 >> 1; + $conv17 = $shr16&65535; + $15 = $ar$addr; + $16 = $d$addr; + $sub18 = (($16) - 1)|0; + $arrayidx19 = (($15) + ($sub18<<1)|0); + HEAP16[$arrayidx19>>1] = $conv17; + STACKTOP = sp;return; +} +function _silk_decode_pitch($lagIndex,$contourIndex,$pitch_lags,$Fs_kHz,$nb_subfr) { + $lagIndex = $lagIndex|0; + $contourIndex = $contourIndex|0; + $pitch_lags = $pitch_lags|0; + $Fs_kHz = $Fs_kHz|0; + $nb_subfr = $nb_subfr|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $Fs_kHz$addr = 0, $Lag_CB_ptr = 0, $add = 0, $add$ptr = 0, $add18 = 0, $add20 = 0, $arrayidx = 0, $arrayidx23 = 0, $arrayidx27 = 0, $arrayidx32 = 0, $arrayidx41 = 0, $arrayidx46 = 0, $arrayidx53 = 0, $cbk_size = 0, $cmp = 0, $cmp1 = 0; + var $cmp14 = 0, $cmp21 = 0, $cmp24 = 0, $cmp28 = 0, $cmp37 = 0, $cmp42 = 0, $cond52 = 0, $contourIndex$addr = 0, $conv = 0, $conv10 = 0, $conv11 = 0, $conv13 = 0, $conv17 = 0, $conv19 = 0, $conv9 = 0, $inc = 0, $k = 0, $lag = 0, $lagIndex$addr = 0, $max_lag = 0; + var $min_lag = 0, $mul = 0, $mul12 = 0, $mul16 = 0, $nb_subfr$addr = 0, $pitch_lags$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $lagIndex$addr = $lagIndex; + $contourIndex$addr = $contourIndex; + $pitch_lags$addr = $pitch_lags; + $Fs_kHz$addr = $Fs_kHz; + $nb_subfr$addr = $nb_subfr; + $0 = $Fs_kHz$addr; + $cmp = ($0|0)==(8); + $1 = $nb_subfr$addr; + $cmp1 = ($1|0)==(4); + do { + if ($cmp) { + if ($cmp1) { + $Lag_CB_ptr = 25525; + $cbk_size = 11; + break; + } else { + $Lag_CB_ptr = 25495; + $cbk_size = 3; + break; + } + } else { + if ($cmp1) { + $Lag_CB_ptr = 25569; + $cbk_size = 34; + break; + } else { + $Lag_CB_ptr = 25501; + $cbk_size = 12; + break; + } + } + } while(0); + $2 = $Fs_kHz$addr; + $conv = $2&65535; + $conv9 = $conv << 16 >> 16; + $mul = $conv9<<1; + $min_lag = $mul; + $3 = $Fs_kHz$addr; + $conv10 = $3&65535; + $conv11 = $conv10 << 16 >> 16; + $mul12 = ($conv11*18)|0; + $max_lag = $mul12; + $4 = $min_lag; + $5 = $lagIndex$addr; + $conv13 = $5 << 16 >> 16; + $add = (($4) + ($conv13))|0; + $lag = $add; + $k = 0; + while(1) { + $6 = $k; + $7 = $nb_subfr$addr; + $cmp14 = ($6|0)<($7|0); + if (!($cmp14)) { + break; + } + $8 = $lag; + $9 = $Lag_CB_ptr; + $10 = $k; + $11 = $cbk_size; + $mul16 = Math_imul($10, $11)|0; + $12 = $contourIndex$addr; + $conv17 = $12 << 24 >> 24; + $add18 = (($mul16) + ($conv17))|0; + $add$ptr = (($9) + ($add18)|0); + $13 = HEAP8[$add$ptr>>0]|0; + $conv19 = $13 << 24 >> 24; + $add20 = (($8) + ($conv19))|0; + $14 = $pitch_lags$addr; + $15 = $k; + $arrayidx = (($14) + ($15<<2)|0); + HEAP32[$arrayidx>>2] = $add20; + $16 = $min_lag; + $17 = $max_lag; + $cmp21 = ($16|0)>($17|0); + $18 = $pitch_lags$addr; + $19 = $k; + $arrayidx23 = (($18) + ($19<<2)|0); + $20 = HEAP32[$arrayidx23>>2]|0; + do { + if ($cmp21) { + $21 = $min_lag; + $cmp24 = ($20|0)>($21|0); + if ($cmp24) { + $22 = $min_lag; + $cond52 = $22; + break; + } + $23 = $pitch_lags$addr; + $24 = $k; + $arrayidx27 = (($23) + ($24<<2)|0); + $25 = HEAP32[$arrayidx27>>2]|0; + $26 = $max_lag; + $cmp28 = ($25|0)<($26|0); + if ($cmp28) { + $27 = $max_lag; + $cond52 = $27; + break; + } else { + $28 = $pitch_lags$addr; + $29 = $k; + $arrayidx32 = (($28) + ($29<<2)|0); + $30 = HEAP32[$arrayidx32>>2]|0; + $cond52 = $30; + break; + } + } else { + $31 = $max_lag; + $cmp37 = ($20|0)>($31|0); + if ($cmp37) { + $32 = $max_lag; + $cond52 = $32; + break; + } + $33 = $pitch_lags$addr; + $34 = $k; + $arrayidx41 = (($33) + ($34<<2)|0); + $35 = HEAP32[$arrayidx41>>2]|0; + $36 = $min_lag; + $cmp42 = ($35|0)<($36|0); + if ($cmp42) { + $37 = $min_lag; + $cond52 = $37; + break; + } else { + $38 = $pitch_lags$addr; + $39 = $k; + $arrayidx46 = (($38) + ($39<<2)|0); + $40 = HEAP32[$arrayidx46>>2]|0; + $cond52 = $40; + break; + } + } + } while(0); + $41 = $pitch_lags$addr; + $42 = $k; + $arrayidx53 = (($41) + ($42<<2)|0); + HEAP32[$arrayidx53>>2] = $cond52; + $43 = $k; + $inc = (($43) + 1)|0; + $k = $inc; + } + STACKTOP = sp;return; +} +function _silk_LPC_analysis_filter($out,$in,$B,$len,$d,$arch) { + $out = $out|0; + $in = $in|0; + $B = $B|0; + $len = $len|0; + $d = $d|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $7 = 0, $8 = 0, $9 = 0, $B$addr = 0, $add = 0, $add14 = 0, $add20 = 0, $add26 = 0, $add32 = 0, $add43 = 0, $add48 = 0, $add52 = 0, $add53 = 0, $add57 = 0, $arch$addr = 0, $arrayidx = 0, $arrayidx11 = 0, $arrayidx15 = 0, $arrayidx17 = 0, $arrayidx21 = 0; + var $arrayidx23 = 0, $arrayidx27 = 0, $arrayidx29 = 0, $arrayidx38 = 0, $arrayidx4 = 0, $arrayidx40 = 0, $arrayidx46 = 0, $arrayidx49 = 0, $arrayidx54 = 0, $arrayidx6 = 0, $arrayidx68 = 0, $arrayidx9 = 0, $cmp = 0, $cmp34 = 0, $cmp59 = 0, $cmp61 = 0, $cond = 0, $cond66 = 0, $conv = 0, $conv10 = 0; + var $conv12 = 0, $conv16 = 0, $conv18 = 0, $conv22 = 0, $conv24 = 0, $conv28 = 0, $conv3 = 0, $conv30 = 0, $conv39 = 0, $conv41 = 0, $conv47 = 0, $conv5 = 0, $conv50 = 0, $conv55 = 0, $conv67 = 0, $conv7 = 0, $d$addr = 0, $in$addr = 0, $in_ptr = 0, $inc = 0; + var $ix = 0, $j = 0, $len$addr = 0, $mul = 0, $mul13 = 0, $mul19 = 0, $mul25 = 0, $mul31 = 0, $mul42 = 0, $mul51 = 0, $mul71 = 0, $mul8 = 0, $out$addr = 0, $out32 = 0, $out32_Q12 = 0, $shl = 0, $shr = 0, $shr58 = 0, $sub = 0, $sub37 = 0; + var $sub44 = 0, $sub45 = 0, $sub56 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $out$addr = $out; + $in$addr = $in; + $B$addr = $B; + $len$addr = $len; + $d$addr = $d; + $arch$addr = $arch; + $0 = $d$addr; + $ix = $0; + while(1) { + $1 = $ix; + $2 = $len$addr; + $cmp = ($1|0)<($2|0); + if (!($cmp)) { + break; + } + $3 = $in$addr; + $4 = $ix; + $sub = (($4) - 1)|0; + $arrayidx = (($3) + ($sub<<1)|0); + $in_ptr = $arrayidx; + $5 = $in_ptr; + $6 = HEAP16[$5>>1]|0; + $conv = $6 << 16 >> 16; + $7 = $B$addr; + $8 = HEAP16[$7>>1]|0; + $conv3 = $8 << 16 >> 16; + $mul = Math_imul($conv, $conv3)|0; + $out32_Q12 = $mul; + $9 = $out32_Q12; + $10 = $in_ptr; + $arrayidx4 = ((($10)) + -2|0); + $11 = HEAP16[$arrayidx4>>1]|0; + $conv5 = $11 << 16 >> 16; + $12 = $B$addr; + $arrayidx6 = ((($12)) + 2|0); + $13 = HEAP16[$arrayidx6>>1]|0; + $conv7 = $13 << 16 >> 16; + $mul8 = Math_imul($conv5, $conv7)|0; + $add = (($9) + ($mul8))|0; + $out32_Q12 = $add; + $14 = $out32_Q12; + $15 = $in_ptr; + $arrayidx9 = ((($15)) + -4|0); + $16 = HEAP16[$arrayidx9>>1]|0; + $conv10 = $16 << 16 >> 16; + $17 = $B$addr; + $arrayidx11 = ((($17)) + 4|0); + $18 = HEAP16[$arrayidx11>>1]|0; + $conv12 = $18 << 16 >> 16; + $mul13 = Math_imul($conv10, $conv12)|0; + $add14 = (($14) + ($mul13))|0; + $out32_Q12 = $add14; + $19 = $out32_Q12; + $20 = $in_ptr; + $arrayidx15 = ((($20)) + -6|0); + $21 = HEAP16[$arrayidx15>>1]|0; + $conv16 = $21 << 16 >> 16; + $22 = $B$addr; + $arrayidx17 = ((($22)) + 6|0); + $23 = HEAP16[$arrayidx17>>1]|0; + $conv18 = $23 << 16 >> 16; + $mul19 = Math_imul($conv16, $conv18)|0; + $add20 = (($19) + ($mul19))|0; + $out32_Q12 = $add20; + $24 = $out32_Q12; + $25 = $in_ptr; + $arrayidx21 = ((($25)) + -8|0); + $26 = HEAP16[$arrayidx21>>1]|0; + $conv22 = $26 << 16 >> 16; + $27 = $B$addr; + $arrayidx23 = ((($27)) + 8|0); + $28 = HEAP16[$arrayidx23>>1]|0; + $conv24 = $28 << 16 >> 16; + $mul25 = Math_imul($conv22, $conv24)|0; + $add26 = (($24) + ($mul25))|0; + $out32_Q12 = $add26; + $29 = $out32_Q12; + $30 = $in_ptr; + $arrayidx27 = ((($30)) + -10|0); + $31 = HEAP16[$arrayidx27>>1]|0; + $conv28 = $31 << 16 >> 16; + $32 = $B$addr; + $arrayidx29 = ((($32)) + 10|0); + $33 = HEAP16[$arrayidx29>>1]|0; + $conv30 = $33 << 16 >> 16; + $mul31 = Math_imul($conv28, $conv30)|0; + $add32 = (($29) + ($mul31))|0; + $out32_Q12 = $add32; + $j = 6; + while(1) { + $34 = $j; + $35 = $d$addr; + $cmp34 = ($34|0)<($35|0); + if (!($cmp34)) { + break; + } + $36 = $out32_Q12; + $37 = $in_ptr; + $38 = $j; + $sub37 = (0 - ($38))|0; + $arrayidx38 = (($37) + ($sub37<<1)|0); + $39 = HEAP16[$arrayidx38>>1]|0; + $conv39 = $39 << 16 >> 16; + $40 = $B$addr; + $41 = $j; + $arrayidx40 = (($40) + ($41<<1)|0); + $42 = HEAP16[$arrayidx40>>1]|0; + $conv41 = $42 << 16 >> 16; + $mul42 = Math_imul($conv39, $conv41)|0; + $add43 = (($36) + ($mul42))|0; + $out32_Q12 = $add43; + $43 = $out32_Q12; + $44 = $in_ptr; + $45 = $j; + $sub44 = (0 - ($45))|0; + $sub45 = (($sub44) - 1)|0; + $arrayidx46 = (($44) + ($sub45<<1)|0); + $46 = HEAP16[$arrayidx46>>1]|0; + $conv47 = $46 << 16 >> 16; + $47 = $B$addr; + $48 = $j; + $add48 = (($48) + 1)|0; + $arrayidx49 = (($47) + ($add48<<1)|0); + $49 = HEAP16[$arrayidx49>>1]|0; + $conv50 = $49 << 16 >> 16; + $mul51 = Math_imul($conv47, $conv50)|0; + $add52 = (($43) + ($mul51))|0; + $out32_Q12 = $add52; + $50 = $j; + $add53 = (($50) + 2)|0; + $j = $add53; + } + $51 = $in_ptr; + $arrayidx54 = ((($51)) + 2|0); + $52 = HEAP16[$arrayidx54>>1]|0; + $conv55 = $52 << 16 >> 16; + $shl = $conv55 << 12; + $53 = $out32_Q12; + $sub56 = (($shl) - ($53))|0; + $out32_Q12 = $sub56; + $54 = $out32_Q12; + $shr = $54 >> 11; + $add57 = (($shr) + 1)|0; + $shr58 = $add57 >> 1; + $out32 = $shr58; + $55 = $out32; + $cmp59 = ($55|0)>(32767); + if ($cmp59) { + $cond66 = 32767; + } else { + $56 = $out32; + $cmp61 = ($56|0)<(-32768); + $57 = $out32; + $cond = $cmp61 ? -32768 : $57; + $cond66 = $cond; + } + $conv67 = $cond66&65535; + $58 = $out$addr; + $59 = $ix; + $arrayidx68 = (($58) + ($59<<1)|0); + HEAP16[$arrayidx68>>1] = $conv67; + $60 = $ix; + $inc = (($60) + 1)|0; + $ix = $inc; + } + $61 = $out$addr; + $62 = $d$addr; + $mul71 = $62<<1; + _memset(($61|0),0,($mul71|0))|0; + STACKTOP = sp;return; +} +function _silk_LPC_inverse_pred_gain($A_Q12,$order) { + $A_Q12 = $A_Q12|0; + $order = $order|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $A_Q12$addr = 0, $Anew_QA = 0, $Atmp_QA = 0, $DC_resp = 0; + var $add = 0, $and = 0, $arrayidx = 0, $arrayidx1 = 0, $arrayidx2 = 0, $arrayidx4 = 0, $call = 0, $cmp = 0, $cmp5 = 0, $conv = 0, $conv3 = 0, $inc = 0, $k = 0, $order$addr = 0, $retval = 0, $shl = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(160|0); + $Atmp_QA = sp + 8|0; + $A_Q12$addr = $A_Q12; + $order$addr = $order; + $DC_resp = 0; + $0 = $order$addr; + $and = $0 & 1; + $arrayidx = (($Atmp_QA) + ($and<<6)|0); + $Anew_QA = $arrayidx; + $k = 0; + while(1) { + $1 = $k; + $2 = $order$addr; + $cmp = ($1|0)<($2|0); + if (!($cmp)) { + break; + } + $3 = $A_Q12$addr; + $4 = $k; + $arrayidx1 = (($3) + ($4<<1)|0); + $5 = HEAP16[$arrayidx1>>1]|0; + $conv = $5 << 16 >> 16; + $6 = $DC_resp; + $add = (($6) + ($conv))|0; + $DC_resp = $add; + $7 = $A_Q12$addr; + $8 = $k; + $arrayidx2 = (($7) + ($8<<1)|0); + $9 = HEAP16[$arrayidx2>>1]|0; + $conv3 = $9 << 16 >> 16; + $shl = $conv3 << 12; + $10 = $Anew_QA; + $11 = $k; + $arrayidx4 = (($10) + ($11<<2)|0); + HEAP32[$arrayidx4>>2] = $shl; + $12 = $k; + $inc = (($12) + 1)|0; + $k = $inc; + } + $13 = $DC_resp; + $cmp5 = ($13|0)>=(4096); + if ($cmp5) { + $retval = 0; + $15 = $retval; + STACKTOP = sp;return ($15|0); + } else { + $14 = $order$addr; + $call = (_LPC_inverse_pred_gain_QA($Atmp_QA,$14)|0); + $retval = $call; + $15 = $retval; + STACKTOP = sp;return ($15|0); + } + return (0)|0; +} +function _LPC_inverse_pred_gain_QA($A_QA,$order) { + $A_QA = $A_QA|0; + $order = $order|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; + var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0; + var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0; + var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0; + var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $A_QA$addr = 0, $Anew_QA = 0, $Aold_QA = 0, $add = 0, $and = 0, $and21 = 0, $arrayidx = 0, $arrayidx1 = 0, $arrayidx22 = 0, $arrayidx28 = 0, $arrayidx3 = 0, $arrayidx31 = 0, $arrayidx5 = 0, $arrayidx63 = 0, $call = 0, $call14 = 0; + var $cmp = 0, $cmp10 = 0, $cmp2 = 0, $cmp25 = 0, $cmp4 = 0, $cmp40 = 0, $cmp67 = 0, $cmp71 = 0, $cond = 0, $dec = 0, $inc = 0, $invGain_Q30 = 0, $k = 0, $mult2Q = 0, $n = 0, $order$addr = 0, $rc_Q31 = 0, $rc_mult1_Q30 = 0, $rc_mult2 = 0, $retval = 0; + var $shl = 0, $shl20 = 0, $shl76 = 0, $shl89 = 0, $sub = 0, $sub12 = 0, $sub13 = 0, $sub29 = 0, $sub30 = 0, $sub39 = 0, $sub56 = 0, $sub6 = 0, $sub77 = 0, $sub83 = 0, $sub9 = 0, $tmp_QA = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $A_QA$addr = $A_QA; + $order$addr = $order; + $0 = $A_QA$addr; + $1 = $order$addr; + $and = $1 & 1; + $arrayidx = (($0) + ($and<<6)|0); + $Anew_QA = $arrayidx; + $invGain_Q30 = 1073741824; + $2 = $order$addr; + $sub = (($2) - 1)|0; + $k = $sub; + while(1) { + $3 = $k; + $cmp = ($3|0)>(0); + $4 = $Anew_QA; + if (!($cmp)) { + break; + } + $5 = $k; + $arrayidx1 = (($4) + ($5<<2)|0); + $6 = HEAP32[$arrayidx1>>2]|0; + $cmp2 = ($6|0)>(16773022); + if ($cmp2) { + label = 5; + break; + } + $7 = $Anew_QA; + $8 = $k; + $arrayidx3 = (($7) + ($8<<2)|0); + $9 = HEAP32[$arrayidx3>>2]|0; + $cmp4 = ($9|0)<(-16773022); + if ($cmp4) { + label = 5; + break; + } + $10 = $Anew_QA; + $11 = $k; + $arrayidx5 = (($10) + ($11<<2)|0); + $12 = HEAP32[$arrayidx5>>2]|0; + $shl = $12 << 7; + $sub6 = (0 - ($shl))|0; + $rc_Q31 = $sub6; + $13 = $rc_Q31; + $14 = ($13|0)<(0); + $15 = $14 << 31 >> 31; + $16 = $rc_Q31; + $17 = ($16|0)<(0); + $18 = $17 << 31 >> 31; + $19 = (___muldi3(($13|0),($15|0),($16|0),($18|0))|0); + $20 = tempRet0; + $21 = (_bitshift64Ashr(($19|0),($20|0),32)|0); + $22 = tempRet0; + $sub9 = (1073741824 - ($21))|0; + $rc_mult1_Q30 = $sub9; + $23 = $rc_mult1_Q30; + $cmp10 = ($23|0)>(0); + $24 = $rc_mult1_Q30; + $sub12 = (0 - ($24))|0; + $cond = $cmp10 ? $24 : $sub12; + $call = (_silk_CLZ32_476($cond)|0); + $sub13 = (32 - ($call))|0; + $mult2Q = $sub13; + $25 = $rc_mult1_Q30; + $26 = $mult2Q; + $add = (($26) + 30)|0; + $call14 = (_silk_INVERSE32_varQ_477($25,$add)|0); + $rc_mult2 = $call14; + $27 = $invGain_Q30; + $28 = ($27|0)<(0); + $29 = $28 << 31 >> 31; + $30 = $rc_mult1_Q30; + $31 = ($30|0)<(0); + $32 = $31 << 31 >> 31; + $33 = (___muldi3(($27|0),($29|0),($30|0),($32|0))|0); + $34 = tempRet0; + $35 = (_bitshift64Ashr(($33|0),($34|0),32)|0); + $36 = tempRet0; + $shl20 = $35 << 2; + $invGain_Q30 = $shl20; + $37 = $Anew_QA; + $Aold_QA = $37; + $38 = $A_QA$addr; + $39 = $k; + $and21 = $39 & 1; + $arrayidx22 = (($38) + ($and21<<6)|0); + $Anew_QA = $arrayidx22; + $n = 0; + while(1) { + $40 = $n; + $41 = $k; + $cmp25 = ($40|0)<($41|0); + if (!($cmp25)) { + break; + } + $42 = $Aold_QA; + $43 = $n; + $arrayidx28 = (($42) + ($43<<2)|0); + $44 = HEAP32[$arrayidx28>>2]|0; + $45 = $Aold_QA; + $46 = $k; + $47 = $n; + $sub29 = (($46) - ($47))|0; + $sub30 = (($sub29) - 1)|0; + $arrayidx31 = (($45) + ($sub30<<2)|0); + $48 = HEAP32[$arrayidx31>>2]|0; + $49 = ($48|0)<(0); + $50 = $49 << 31 >> 31; + $51 = $rc_Q31; + $52 = ($51|0)<(0); + $53 = $52 << 31 >> 31; + $54 = (___muldi3(($48|0),($50|0),($51|0),($53|0))|0); + $55 = tempRet0; + $56 = (_bitshift64Ashr(($54|0),($55|0),30)|0); + $57 = tempRet0; + $58 = (_i64Add(($56|0),($57|0),1,0)|0); + $59 = tempRet0; + $60 = (_bitshift64Ashr(($58|0),($59|0),1)|0); + $61 = tempRet0; + $sub39 = (($44) - ($60))|0; + $tmp_QA = $sub39; + $62 = $mult2Q; + $cmp40 = ($62|0)==(1); + $63 = $tmp_QA; + $64 = ($63|0)<(0); + $65 = $64 << 31 >> 31; + $66 = $rc_mult2; + $67 = ($66|0)<(0); + $68 = $67 << 31 >> 31; + $69 = (___muldi3(($63|0),($65|0),($66|0),($68|0))|0); + $70 = tempRet0; + if ($cmp40) { + $71 = (_bitshift64Ashr(($69|0),($70|0),1)|0); + $72 = tempRet0; + $73 = $tmp_QA; + $74 = ($73|0)<(0); + $75 = $74 << 31 >> 31; + $76 = $rc_mult2; + $77 = ($76|0)<(0); + $78 = $77 << 31 >> 31; + $79 = (___muldi3(($73|0),($75|0),($76|0),($78|0))|0); + $80 = tempRet0; + $81 = $79 & 1; + $82 = (_i64Add(($71|0),($72|0),($81|0),0)|0); + $83 = tempRet0; + $123 = $83;$93 = $82; + } else { + $84 = $mult2Q; + $sub56 = (($84) - 1)|0; + $85 = (_bitshift64Ashr(($69|0),($70|0),($sub56|0))|0); + $86 = tempRet0; + $87 = (_i64Add(($85|0),($86|0),1,0)|0); + $88 = tempRet0; + $89 = (_bitshift64Ashr(($87|0),($88|0),1)|0); + $90 = tempRet0; + $123 = $90;$93 = $89; + } + $91 = $Anew_QA; + $92 = $n; + $arrayidx63 = (($91) + ($92<<2)|0); + HEAP32[$arrayidx63>>2] = $93; + $94 = $n; + $inc = (($94) + 1)|0; + $n = $inc; + } + $95 = $k; + $dec = (($95) + -1)|0; + $k = $dec; + } + if ((label|0) == 5) { + $retval = 0; + $122 = $retval; + STACKTOP = sp;return ($122|0); + } + $96 = HEAP32[$4>>2]|0; + $cmp67 = ($96|0)>(16773022); + if (!($cmp67)) { + $97 = $Anew_QA; + $98 = HEAP32[$97>>2]|0; + $cmp71 = ($98|0)<(-16773022); + if (!($cmp71)) { + $99 = $Anew_QA; + $100 = HEAP32[$99>>2]|0; + $shl76 = $100 << 7; + $sub77 = (0 - ($shl76))|0; + $rc_Q31 = $sub77; + $101 = $rc_Q31; + $102 = ($101|0)<(0); + $103 = $102 << 31 >> 31; + $104 = $rc_Q31; + $105 = ($104|0)<(0); + $106 = $105 << 31 >> 31; + $107 = (___muldi3(($101|0),($103|0),($104|0),($106|0))|0); + $108 = tempRet0; + $109 = (_bitshift64Ashr(($107|0),($108|0),32)|0); + $110 = tempRet0; + $sub83 = (1073741824 - ($109))|0; + $rc_mult1_Q30 = $sub83; + $111 = $invGain_Q30; + $112 = ($111|0)<(0); + $113 = $112 << 31 >> 31; + $114 = $rc_mult1_Q30; + $115 = ($114|0)<(0); + $116 = $115 << 31 >> 31; + $117 = (___muldi3(($111|0),($113|0),($114|0),($116|0))|0); + $118 = tempRet0; + $119 = (_bitshift64Ashr(($117|0),($118|0),32)|0); + $120 = tempRet0; + $shl89 = $119 << 2; + $invGain_Q30 = $shl89; + $121 = $invGain_Q30; + $retval = $121; + $122 = $retval; + STACKTOP = sp;return ($122|0); + } + } + $retval = 0; + $122 = $retval; + STACKTOP = sp;return ($122|0); +} +function _silk_CLZ32_476($in32) { + $in32 = $in32|0; + var $0 = 0, $1 = 0, $2 = 0, $cond = 0, $in32$addr = 0, $sub = 0, $sub1 = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $in32$addr = $in32; + $0 = $in32$addr; + $tobool = ($0|0)!=(0); + if (!($tobool)) { + $cond = 32; + STACKTOP = sp;return ($cond|0); + } + $1 = $in32$addr; + $2 = (Math_clz32(($1|0))|0); + $sub = (32 - ($2))|0; + $sub1 = (32 - ($sub))|0; + $cond = $sub1; + STACKTOP = sp;return ($cond|0); +} +function _silk_INVERSE32_varQ_477($b32,$Qres) { + $b32 = $b32|0; + $Qres = $Qres|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $Qres$addr = 0, $add = 0; + var $add20 = 0, $add21 = 0, $add23 = 0, $add26 = 0, $and = 0, $and15 = 0, $b32$addr = 0, $b32_inv = 0, $b32_nrm = 0, $b_headrm = 0, $call = 0, $cmp = 0, $cmp29 = 0, $cmp35 = 0, $cmp40 = 0, $cmp48 = 0, $cmp61 = 0, $cmp69 = 0, $cmp83 = 0, $cond = 0; + var $cond80 = 0, $conv = 0, $conv12 = 0, $conv13 = 0, $conv16 = 0, $conv17 = 0, $conv4 = 0, $conv5 = 0, $conv6 = 0, $div = 0, $err_Q32 = 0, $lshift = 0, $mul = 0, $mul14 = 0, $mul18 = 0, $mul25 = 0, $mul7 = 0, $result = 0, $retval = 0, $shl = 0; + var $shl10 = 0, $shl2 = 0, $shl82 = 0, $shr = 0, $shr11 = 0, $shr19 = 0, $shr22 = 0, $shr24 = 0, $shr3 = 0, $shr32 = 0, $shr34 = 0, $shr39 = 0, $shr44 = 0, $shr47 = 0, $shr52 = 0, $shr60 = 0, $shr65 = 0, $shr68 = 0, $shr73 = 0, $shr8 = 0; + var $shr86 = 0, $sub = 0, $sub1 = 0, $sub27 = 0, $sub28 = 0, $sub31 = 0, $sub33 = 0, $sub38 = 0, $sub43 = 0, $sub46 = 0, $sub51 = 0, $sub64 = 0, $sub67 = 0, $sub72 = 0, $sub81 = 0, $sub9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $b32$addr = $b32; + $Qres$addr = $Qres; + $0 = $b32$addr; + $cmp = ($0|0)>(0); + $1 = $b32$addr; + $sub = (0 - ($1))|0; + $cond = $cmp ? $1 : $sub; + $call = (_silk_CLZ32_476($cond)|0); + $sub1 = (($call) - 1)|0; + $b_headrm = $sub1; + $2 = $b32$addr; + $3 = $b_headrm; + $shl = $2 << $3; + $b32_nrm = $shl; + $4 = $b32_nrm; + $shr = $4 >> 16; + $div = (536870911 / ($shr|0))&-1; + $b32_inv = $div; + $5 = $b32_inv; + $shl2 = $5 << 16; + $result = $shl2; + $6 = $b32_nrm; + $shr3 = $6 >> 16; + $7 = $b32_inv; + $conv = $7&65535; + $conv4 = $conv << 16 >> 16; + $mul = Math_imul($shr3, $conv4)|0; + $8 = $b32_nrm; + $and = $8 & 65535; + $9 = $b32_inv; + $conv5 = $9&65535; + $conv6 = $conv5 << 16 >> 16; + $mul7 = Math_imul($and, $conv6)|0; + $shr8 = $mul7 >> 16; + $add = (($mul) + ($shr8))|0; + $sub9 = (536870912 - ($add))|0; + $shl10 = $sub9 << 3; + $err_Q32 = $shl10; + $10 = $result; + $11 = $err_Q32; + $shr11 = $11 >> 16; + $12 = $b32_inv; + $conv12 = $12&65535; + $conv13 = $conv12 << 16 >> 16; + $mul14 = Math_imul($shr11, $conv13)|0; + $13 = $err_Q32; + $and15 = $13 & 65535; + $14 = $b32_inv; + $conv16 = $14&65535; + $conv17 = $conv16 << 16 >> 16; + $mul18 = Math_imul($and15, $conv17)|0; + $shr19 = $mul18 >> 16; + $add20 = (($mul14) + ($shr19))|0; + $add21 = (($10) + ($add20))|0; + $15 = $err_Q32; + $16 = $b32_inv; + $shr22 = $16 >> 15; + $add23 = (($shr22) + 1)|0; + $shr24 = $add23 >> 1; + $mul25 = Math_imul($15, $shr24)|0; + $add26 = (($add21) + ($mul25))|0; + $result = $add26; + $17 = $b_headrm; + $sub27 = (61 - ($17))|0; + $18 = $Qres$addr; + $sub28 = (($sub27) - ($18))|0; + $lshift = $sub28; + $19 = $lshift; + $cmp29 = ($19|0)<=(0); + $20 = $lshift; + if (!($cmp29)) { + $cmp83 = ($20|0)<(32); + if ($cmp83) { + $35 = $result; + $36 = $lshift; + $shr86 = $35 >> $36; + $retval = $shr86; + $37 = $retval; + STACKTOP = sp;return ($37|0); + } else { + $retval = 0; + $37 = $retval; + STACKTOP = sp;return ($37|0); + } + } + $sub31 = (0 - ($20))|0; + $shr32 = -2147483648 >> $sub31; + $21 = $lshift; + $sub33 = (0 - ($21))|0; + $shr34 = 2147483647 >> $sub33; + $cmp35 = ($shr32|0)>($shr34|0); + $22 = $result; + $23 = $lshift; + $sub38 = (0 - ($23))|0; + do { + if ($cmp35) { + $shr39 = -2147483648 >> $sub38; + $cmp40 = ($22|0)>($shr39|0); + if ($cmp40) { + $24 = $lshift; + $sub43 = (0 - ($24))|0; + $shr44 = -2147483648 >> $sub43; + $cond80 = $shr44; + break; + } + $25 = $result; + $26 = $lshift; + $sub46 = (0 - ($26))|0; + $shr47 = 2147483647 >> $sub46; + $cmp48 = ($25|0)<($shr47|0); + if ($cmp48) { + $27 = $lshift; + $sub51 = (0 - ($27))|0; + $shr52 = 2147483647 >> $sub51; + $cond80 = $shr52; + break; + } else { + $28 = $result; + $cond80 = $28; + break; + } + } else { + $shr60 = 2147483647 >> $sub38; + $cmp61 = ($22|0)>($shr60|0); + if ($cmp61) { + $29 = $lshift; + $sub64 = (0 - ($29))|0; + $shr65 = 2147483647 >> $sub64; + $cond80 = $shr65; + break; + } + $30 = $result; + $31 = $lshift; + $sub67 = (0 - ($31))|0; + $shr68 = -2147483648 >> $sub67; + $cmp69 = ($30|0)<($shr68|0); + if ($cmp69) { + $32 = $lshift; + $sub72 = (0 - ($32))|0; + $shr73 = -2147483648 >> $sub72; + $cond80 = $shr73; + break; + } else { + $33 = $result; + $cond80 = $33; + break; + } + } + } while(0); + $34 = $lshift; + $sub81 = (0 - ($34))|0; + $shl82 = $cond80 << $sub81; + $retval = $shl82; + $37 = $retval; + STACKTOP = sp;return ($37|0); +} +function _silk_NLSF2A($a_Q12,$NLSF,$d) { + $a_Q12 = $a_Q12|0; + $NLSF = $NLSF|0; + $d = $d|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; + var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0; + var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0; + var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0; + var $99 = 0, $NLSF$addr = 0, $P = 0, $Ptmp = 0, $Q = 0, $Qtmp = 0, $a32_QA1 = 0, $a_Q12$addr = 0, $absval = 0, $add = 0, $add10 = 0, $add102 = 0, $add110 = 0, $add12 = 0, $add132 = 0, $add156 = 0, $add24 = 0, $add27 = 0, $add28 = 0, $add63 = 0; + var $add76 = 0, $add94 = 0, $arrayidx = 0, $arrayidx100 = 0, $arrayidx108 = 0, $arrayidx117 = 0, $arrayidx118 = 0, $arrayidx121 = 0, $arrayidx130 = 0, $arrayidx135 = 0, $arrayidx14 = 0, $arrayidx15 = 0, $arrayidx154 = 0, $arrayidx159 = 0, $arrayidx19 = 0, $arrayidx2 = 0, $arrayidx25 = 0, $arrayidx26 = 0, $arrayidx29 = 0, $arrayidx30 = 0; + var $arrayidx34 = 0, $arrayidx38 = 0, $arrayidx4 = 0, $arrayidx50 = 0, $arrayidx53 = 0, $arrayidx6 = 0, $arrayidx92 = 0, $call = 0, $cmp = 0, $cmp1 = 0, $cmp104 = 0, $cmp127 = 0, $cmp141 = 0, $cmp144 = 0, $cmp151 = 0, $cmp21 = 0, $cmp43 = 0, $cmp47 = 0, $cmp51 = 0, $cmp57 = 0; + var $cmp65 = 0, $cmp68 = 0, $cmp85 = 0, $cmp89 = 0, $cmp96 = 0, $cond = 0, $cond115 = 0, $cond56 = 0, $cond73 = 0, $conv = 0, $conv116 = 0, $conv119 = 0, $conv134 = 0, $conv158 = 0, $conv3 = 0, $conv5 = 0, $conv7 = 0, $cos_LSF_QA = 0, $cos_val = 0, $d$addr = 0; + var $dd = 0, $delta = 0, $div = 0, $f_frac = 0, $f_int = 0, $i = 0, $idx = 0, $idxprom = 0, $inc = 0, $inc123 = 0, $inc137 = 0, $inc161 = 0, $inc166 = 0, $inc40 = 0, $inc60 = 0, $inc83 = 0, $k = 0, $maxabs = 0, $mul = 0, $mul77 = 0; + var $ordering = 0, $sc_Q16 = 0, $shl = 0, $shl120 = 0, $shl148 = 0, $shl75 = 0, $shl9 = 0, $shr = 0, $shr101 = 0, $shr103 = 0, $shr109 = 0, $shr11 = 0, $shr111 = 0, $shr13 = 0, $shr131 = 0, $shr133 = 0, $shr155 = 0, $shr157 = 0, $shr16 = 0, $shr62 = 0; + var $shr64 = 0, $shr78 = 0, $shr93 = 0, $shr95 = 0, $sub = 0, $sub149 = 0, $sub31 = 0, $sub32 = 0, $sub33 = 0, $sub35 = 0, $sub36 = 0, $sub37 = 0, $sub55 = 0, $sub74 = 0, $sub79 = 0, $sub8 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(272|0); + $cos_LSF_QA = sp + 176|0; + $P = sp + 140|0; + $Q = sp + 104|0; + $a32_QA1 = sp + 16|0; + $a_Q12$addr = $a_Q12; + $NLSF$addr = $NLSF; + $d$addr = $d; + $idx = 0; + $0 = $d$addr; + $cmp = ($0|0)==(16); + $cond = $cmp ? 25469 : 25485; + $ordering = $cond; + $k = 0; + while(1) { + $1 = $k; + $2 = $d$addr; + $cmp1 = ($1|0)<($2|0); + if (!($cmp1)) { + break; + } + $3 = $NLSF$addr; + $4 = $k; + $arrayidx = (($3) + ($4<<1)|0); + $5 = HEAP16[$arrayidx>>1]|0; + $conv = $5 << 16 >> 16; + $shr = $conv >> 8; + $f_int = $shr; + $6 = $NLSF$addr; + $7 = $k; + $arrayidx2 = (($6) + ($7<<1)|0); + $8 = HEAP16[$arrayidx2>>1]|0; + $conv3 = $8 << 16 >> 16; + $9 = $f_int; + $shl = $9 << 8; + $sub = (($conv3) - ($shl))|0; + $f_frac = $sub; + $10 = $f_int; + $arrayidx4 = (20700 + ($10<<1)|0); + $11 = HEAP16[$arrayidx4>>1]|0; + $conv5 = $11 << 16 >> 16; + $cos_val = $conv5; + $12 = $f_int; + $add = (($12) + 1)|0; + $arrayidx6 = (20700 + ($add<<1)|0); + $13 = HEAP16[$arrayidx6>>1]|0; + $conv7 = $13 << 16 >> 16; + $14 = $cos_val; + $sub8 = (($conv7) - ($14))|0; + $delta = $sub8; + $15 = $cos_val; + $shl9 = $15 << 8; + $16 = $delta; + $17 = $f_frac; + $mul = Math_imul($16, $17)|0; + $add10 = (($shl9) + ($mul))|0; + $shr11 = $add10 >> 3; + $add12 = (($shr11) + 1)|0; + $shr13 = $add12 >> 1; + $18 = $ordering; + $19 = $k; + $arrayidx14 = (($18) + ($19)|0); + $20 = HEAP8[$arrayidx14>>0]|0; + $idxprom = $20&255; + $arrayidx15 = (($cos_LSF_QA) + ($idxprom<<2)|0); + HEAP32[$arrayidx15>>2] = $shr13; + $21 = $k; + $inc = (($21) + 1)|0; + $k = $inc; + } + $22 = $d$addr; + $shr16 = $22 >> 1; + $dd = $shr16; + $23 = $dd; + _silk_NLSF2A_find_poly($P,$cos_LSF_QA,$23); + $arrayidx19 = ((($cos_LSF_QA)) + 4|0); + $24 = $dd; + _silk_NLSF2A_find_poly($Q,$arrayidx19,$24); + $k = 0; + while(1) { + $25 = $k; + $26 = $dd; + $cmp21 = ($25|0)<($26|0); + if (!($cmp21)) { + break; + } + $27 = $k; + $add24 = (($27) + 1)|0; + $arrayidx25 = (($P) + ($add24<<2)|0); + $28 = HEAP32[$arrayidx25>>2]|0; + $29 = $k; + $arrayidx26 = (($P) + ($29<<2)|0); + $30 = HEAP32[$arrayidx26>>2]|0; + $add27 = (($28) + ($30))|0; + $Ptmp = $add27; + $31 = $k; + $add28 = (($31) + 1)|0; + $arrayidx29 = (($Q) + ($add28<<2)|0); + $32 = HEAP32[$arrayidx29>>2]|0; + $33 = $k; + $arrayidx30 = (($Q) + ($33<<2)|0); + $34 = HEAP32[$arrayidx30>>2]|0; + $sub31 = (($32) - ($34))|0; + $Qtmp = $sub31; + $35 = $Qtmp; + $sub32 = (0 - ($35))|0; + $36 = $Ptmp; + $sub33 = (($sub32) - ($36))|0; + $37 = $k; + $arrayidx34 = (($a32_QA1) + ($37<<2)|0); + HEAP32[$arrayidx34>>2] = $sub33; + $38 = $Qtmp; + $39 = $Ptmp; + $sub35 = (($38) - ($39))|0; + $40 = $d$addr; + $41 = $k; + $sub36 = (($40) - ($41))|0; + $sub37 = (($sub36) - 1)|0; + $arrayidx38 = (($a32_QA1) + ($sub37<<2)|0); + HEAP32[$arrayidx38>>2] = $sub35; + $42 = $k; + $inc40 = (($42) + 1)|0; + $k = $inc40; + } + $i = 0; + while(1) { + $43 = $i; + $cmp43 = ($43|0)<(10); + if (!($cmp43)) { + break; + } + $maxabs = 0; + $k = 0; + while(1) { + $44 = $k; + $45 = $d$addr; + $cmp47 = ($44|0)<($45|0); + if (!($cmp47)) { + break; + } + $46 = $k; + $arrayidx50 = (($a32_QA1) + ($46<<2)|0); + $47 = HEAP32[$arrayidx50>>2]|0; + $cmp51 = ($47|0)>(0); + $48 = $k; + $arrayidx53 = (($a32_QA1) + ($48<<2)|0); + $49 = HEAP32[$arrayidx53>>2]|0; + $sub55 = (0 - ($49))|0; + $cond56 = $cmp51 ? $49 : $sub55; + $absval = $cond56; + $50 = $absval; + $51 = $maxabs; + $cmp57 = ($50|0)>($51|0); + if ($cmp57) { + $52 = $absval; + $maxabs = $52; + $53 = $k; + $idx = $53; + } + $54 = $k; + $inc60 = (($54) + 1)|0; + $k = $inc60; + } + $55 = $maxabs; + $shr62 = $55 >> 4; + $add63 = (($shr62) + 1)|0; + $shr64 = $add63 >> 1; + $maxabs = $shr64; + $56 = $maxabs; + $cmp65 = ($56|0)>(32767); + if (!($cmp65)) { + break; + } + $57 = $maxabs; + $cmp68 = ($57|0)<(163838); + $58 = $maxabs; + $cond73 = $cmp68 ? $58 : 163838; + $maxabs = $cond73; + $59 = $maxabs; + $sub74 = (($59) - 32767)|0; + $shl75 = $sub74 << 14; + $60 = $maxabs; + $61 = $idx; + $add76 = (($61) + 1)|0; + $mul77 = Math_imul($60, $add76)|0; + $shr78 = $mul77 >> 2; + $div = (($shl75|0) / ($shr78|0))&-1; + $sub79 = (65470 - ($div))|0; + $sc_Q16 = $sub79; + $62 = $d$addr; + $63 = $sc_Q16; + _silk_bwexpander_32($a32_QA1,$62,$63); + $64 = $i; + $inc83 = (($64) + 1)|0; + $i = $inc83; + } + $65 = $i; + $cmp85 = ($65|0)==(10); + $k = 0; + L21: do { + if ($cmp85) { + while(1) { + $66 = $k; + $67 = $d$addr; + $cmp89 = ($66|0)<($67|0); + if (!($cmp89)) { + break L21; + } + $68 = $k; + $arrayidx92 = (($a32_QA1) + ($68<<2)|0); + $69 = HEAP32[$arrayidx92>>2]|0; + $shr93 = $69 >> 4; + $add94 = (($shr93) + 1)|0; + $shr95 = $add94 >> 1; + $cmp96 = ($shr95|0)>(32767); + if ($cmp96) { + $cond115 = 32767; + } else { + $70 = $k; + $arrayidx100 = (($a32_QA1) + ($70<<2)|0); + $71 = HEAP32[$arrayidx100>>2]|0; + $shr101 = $71 >> 4; + $add102 = (($shr101) + 1)|0; + $shr103 = $add102 >> 1; + $cmp104 = ($shr103|0)<(-32768); + if ($cmp104) { + $cond115 = -32768; + } else { + $72 = $k; + $arrayidx108 = (($a32_QA1) + ($72<<2)|0); + $73 = HEAP32[$arrayidx108>>2]|0; + $shr109 = $73 >> 4; + $add110 = (($shr109) + 1)|0; + $shr111 = $add110 >> 1; + $cond115 = $shr111; + } + } + $conv116 = $cond115&65535; + $74 = $a_Q12$addr; + $75 = $k; + $arrayidx117 = (($74) + ($75<<1)|0); + HEAP16[$arrayidx117>>1] = $conv116; + $76 = $a_Q12$addr; + $77 = $k; + $arrayidx118 = (($76) + ($77<<1)|0); + $78 = HEAP16[$arrayidx118>>1]|0; + $conv119 = $78 << 16 >> 16; + $shl120 = $conv119 << 5; + $79 = $k; + $arrayidx121 = (($a32_QA1) + ($79<<2)|0); + HEAP32[$arrayidx121>>2] = $shl120; + $80 = $k; + $inc123 = (($80) + 1)|0; + $k = $inc123; + } + } else { + while(1) { + $81 = $k; + $82 = $d$addr; + $cmp127 = ($81|0)<($82|0); + if (!($cmp127)) { + break L21; + } + $83 = $k; + $arrayidx130 = (($a32_QA1) + ($83<<2)|0); + $84 = HEAP32[$arrayidx130>>2]|0; + $shr131 = $84 >> 4; + $add132 = (($shr131) + 1)|0; + $shr133 = $add132 >> 1; + $conv134 = $shr133&65535; + $85 = $a_Q12$addr; + $86 = $k; + $arrayidx135 = (($85) + ($86<<1)|0); + HEAP16[$arrayidx135>>1] = $conv134; + $87 = $k; + $inc137 = (($87) + 1)|0; + $k = $inc137; + } + } + } while(0); + $i = 0; + while(1) { + $88 = $i; + $cmp141 = ($88|0)<(16); + if (!($cmp141)) { + label = 31; + break; + } + $89 = $a_Q12$addr; + $90 = $d$addr; + $call = (_silk_LPC_inverse_pred_gain($89,$90)|0); + $cmp144 = ($call|0)<(107374); + if (!($cmp144)) { + label = 31; + break; + } + $91 = $d$addr; + $92 = $i; + $shl148 = 2 << $92; + $sub149 = (65536 - ($shl148))|0; + _silk_bwexpander_32($a32_QA1,$91,$sub149); + $k = 0; + while(1) { + $93 = $k; + $94 = $d$addr; + $cmp151 = ($93|0)<($94|0); + if (!($cmp151)) { + break; + } + $95 = $k; + $arrayidx154 = (($a32_QA1) + ($95<<2)|0); + $96 = HEAP32[$arrayidx154>>2]|0; + $shr155 = $96 >> 4; + $add156 = (($shr155) + 1)|0; + $shr157 = $add156 >> 1; + $conv158 = $shr157&65535; + $97 = $a_Q12$addr; + $98 = $k; + $arrayidx159 = (($97) + ($98<<1)|0); + HEAP16[$arrayidx159>>1] = $conv158; + $99 = $k; + $inc161 = (($99) + 1)|0; + $k = $inc161; + } + $100 = $i; + $inc166 = (($100) + 1)|0; + $i = $inc166; + } + if ((label|0) == 31) { + STACKTOP = sp;return; + } +} +function _silk_NLSF2A_find_poly($out,$cLSF,$dd) { + $out = $out|0; + $cLSF = $cLSF|0; + $dd = $dd|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add12 = 0; + var $add31 = 0, $arrayidx13 = 0, $arrayidx19 = 0, $arrayidx2 = 0, $arrayidx22 = 0, $arrayidx3 = 0, $arrayidx30 = 0, $arrayidx32 = 0, $arrayidx5 = 0, $arrayidx6 = 0, $cLSF$addr = 0, $cmp = 0, $cmp15 = 0, $dd$addr = 0, $dec = 0, $ftmp = 0, $inc = 0, $k = 0, $mul = 0, $n = 0; + var $out$addr = 0, $shl = 0, $sub = 0, $sub11 = 0, $sub18 = 0, $sub21 = 0, $sub29 = 0, $sub33 = 0, $sub4 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $out$addr = $out; + $cLSF$addr = $cLSF; + $dd$addr = $dd; + $0 = $out$addr; + HEAP32[$0>>2] = 65536; + $1 = $cLSF$addr; + $2 = HEAP32[$1>>2]|0; + $sub = (0 - ($2))|0; + $3 = $out$addr; + $arrayidx2 = ((($3)) + 4|0); + HEAP32[$arrayidx2>>2] = $sub; + $k = 1; + while(1) { + $4 = $k; + $5 = $dd$addr; + $cmp = ($4|0)<($5|0); + if (!($cmp)) { + break; + } + $6 = $cLSF$addr; + $7 = $k; + $mul = $7<<1; + $arrayidx3 = (($6) + ($mul<<2)|0); + $8 = HEAP32[$arrayidx3>>2]|0; + $ftmp = $8; + $9 = $out$addr; + $10 = $k; + $sub4 = (($10) - 1)|0; + $arrayidx5 = (($9) + ($sub4<<2)|0); + $11 = HEAP32[$arrayidx5>>2]|0; + $shl = $11 << 1; + $12 = $ftmp; + $13 = ($12|0)<(0); + $14 = $13 << 31 >> 31; + $15 = $out$addr; + $16 = $k; + $arrayidx6 = (($15) + ($16<<2)|0); + $17 = HEAP32[$arrayidx6>>2]|0; + $18 = ($17|0)<(0); + $19 = $18 << 31 >> 31; + $20 = (___muldi3(($12|0),($14|0),($17|0),($19|0))|0); + $21 = tempRet0; + $22 = (_bitshift64Ashr(($20|0),($21|0),15)|0); + $23 = tempRet0; + $24 = (_i64Add(($22|0),($23|0),1,0)|0); + $25 = tempRet0; + $26 = (_bitshift64Ashr(($24|0),($25|0),1)|0); + $27 = tempRet0; + $sub11 = (($shl) - ($26))|0; + $28 = $out$addr; + $29 = $k; + $add12 = (($29) + 1)|0; + $arrayidx13 = (($28) + ($add12<<2)|0); + HEAP32[$arrayidx13>>2] = $sub11; + $30 = $k; + $n = $30; + while(1) { + $31 = $n; + $cmp15 = ($31|0)>(1); + if (!($cmp15)) { + break; + } + $32 = $out$addr; + $33 = $n; + $sub18 = (($33) - 2)|0; + $arrayidx19 = (($32) + ($sub18<<2)|0); + $34 = HEAP32[$arrayidx19>>2]|0; + $35 = $ftmp; + $36 = ($35|0)<(0); + $37 = $36 << 31 >> 31; + $38 = $out$addr; + $39 = $n; + $sub21 = (($39) - 1)|0; + $arrayidx22 = (($38) + ($sub21<<2)|0); + $40 = HEAP32[$arrayidx22>>2]|0; + $41 = ($40|0)<(0); + $42 = $41 << 31 >> 31; + $43 = (___muldi3(($35|0),($37|0),($40|0),($42|0))|0); + $44 = tempRet0; + $45 = (_bitshift64Ashr(($43|0),($44|0),15)|0); + $46 = tempRet0; + $47 = (_i64Add(($45|0),($46|0),1,0)|0); + $48 = tempRet0; + $49 = (_bitshift64Ashr(($47|0),($48|0),1)|0); + $50 = tempRet0; + $sub29 = (($34) - ($49))|0; + $51 = $out$addr; + $52 = $n; + $arrayidx30 = (($51) + ($52<<2)|0); + $53 = HEAP32[$arrayidx30>>2]|0; + $add31 = (($53) + ($sub29))|0; + HEAP32[$arrayidx30>>2] = $add31; + $54 = $n; + $dec = (($54) + -1)|0; + $n = $dec; + } + $55 = $ftmp; + $56 = $out$addr; + $arrayidx32 = ((($56)) + 4|0); + $57 = HEAP32[$arrayidx32>>2]|0; + $sub33 = (($57) - ($55))|0; + HEAP32[$arrayidx32>>2] = $sub33; + $58 = $k; + $inc = (($58) + 1)|0; + $k = $inc; + } + STACKTOP = sp;return; +} +function _silk_NLSF_stabilize($NLSF_Q15,$NDeltaMin_Q15,$L) { + $NLSF_Q15 = $NLSF_Q15|0; + $NDeltaMin_Q15 = $NDeltaMin_Q15|0; + $L = $L|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; + var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0; + var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; + var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; + var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $I = 0, $L$addr = 0, $NDeltaMin_Q15$addr = 0, $NLSF_Q15$addr = 0, $add = 0, $add105 = 0, $add107 = 0, $add117 = 0, $add124 = 0; + var $add126 = 0, $add154 = 0, $add161 = 0, $add163 = 0, $add173 = 0, $add180 = 0, $add182 = 0, $add203 = 0, $add23 = 0, $add232 = 0, $add256 = 0, $add259 = 0, $add54 = 0, $add60 = 0, $add81 = 0, $add88 = 0, $add89 = 0, $add98 = 0, $and = 0, $and106 = 0; + var $and125 = 0, $and162 = 0, $and181 = 0, $arrayidx101 = 0, $arrayidx103 = 0, $arrayidx11 = 0, $arrayidx113 = 0, $arrayidx115 = 0, $arrayidx120 = 0, $arrayidx122 = 0, $arrayidx13 = 0, $arrayidx150 = 0, $arrayidx152 = 0, $arrayidx157 = 0, $arrayidx159 = 0, $arrayidx169 = 0, $arrayidx171 = 0, $arrayidx176 = 0, $arrayidx178 = 0, $arrayidx19 = 0; + var $arrayidx191 = 0, $arrayidx197 = 0, $arrayidx199 = 0, $arrayidx201 = 0, $arrayidx205 = 0, $arrayidx205$sink = 0, $arrayidx21 = 0, $arrayidx225 = 0, $arrayidx228 = 0, $arrayidx230 = 0, $arrayidx235 = 0, $arrayidx240 = 0, $arrayidx242 = 0, $arrayidx248 = 0, $arrayidx254 = 0, $arrayidx257 = 0, $arrayidx260 = 0, $arrayidx265 = 0, $arrayidx41 = 0, $arrayidx46 = 0; + var $arrayidx52 = 0, $arrayidx58 = 0, $arrayidx65 = 0, $arrayidx70 = 0, $arrayidx77 = 0, $arrayidx79 = 0, $arrayidx8 = 0, $arrayidx84 = 0, $arrayidx86 = 0, $arrayidx94 = 0, $arrayidx96 = 0, $call = 0, $call233 = 0, $call245 = 0, $call263 = 0, $center_freq_Q15 = 0, $cmp = 0, $cmp108 = 0, $cmp145 = 0, $cmp16 = 0; + var $cmp164 = 0, $cmp211 = 0, $cmp222 = 0, $cmp25 = 0, $cmp251 = 0, $cmp29 = 0, $cmp33 = 0, $cmp38 = 0, $cmp49 = 0, $cmp5 = 0, $cmp62 = 0, $cmp74 = 0, $cmp90 = 0, $cond188 = 0, $conv = 0, $conv102 = 0, $conv104 = 0, $conv114 = 0, $conv116 = 0, $conv12 = 0; + var $conv121 = 0, $conv123 = 0, $conv14 = 0, $conv151 = 0, $conv153 = 0, $conv158 = 0, $conv160 = 0, $conv170 = 0, $conv172 = 0, $conv177 = 0, $conv179 = 0, $conv189 = 0, $conv190 = 0, $conv192 = 0, $conv195 = 0, $conv2 = 0, $conv20 = 0, $conv200 = 0, $conv202 = 0, $conv204 = 0; + var $conv204$sink = 0, $conv216 = 0, $conv218 = 0, $conv219 = 0, $conv22 = 0, $conv226 = 0, $conv229 = 0, $conv231 = 0, $conv234 = 0, $conv241 = 0, $conv243 = 0, $conv246 = 0, $conv255 = 0, $conv258 = 0, $conv261 = 0, $conv264 = 0, $conv42 = 0, $conv44 = 0, $conv53 = 0, $conv59 = 0; + var $conv66 = 0, $conv71 = 0, $conv78 = 0, $conv80 = 0, $conv85 = 0, $conv87 = 0, $conv9 = 0, $conv95 = 0, $conv97 = 0, $dec = 0, $dec267 = 0, $diff_Q15 = 0, $i = 0, $inc = 0, $inc209 = 0, $inc237 = 0, $inc56 = 0, $k = 0, $loops = 0, $max_center_Q15 = 0; + var $min_center_Q15 = 0, $min_diff_Q15 = 0, $shr = 0, $shr118 = 0, $shr155 = 0, $shr174 = 0, $shr193 = 0, $shr72 = 0, $shr82 = 0, $shr99 = 0, $sub = 0, $sub10 = 0, $sub100 = 0, $sub112 = 0, $sub119 = 0, $sub149 = 0, $sub15 = 0, $sub156 = 0, $sub168 = 0, $sub175 = 0; + var $sub18 = 0, $sub194 = 0, $sub196 = 0, $sub198 = 0, $sub227 = 0, $sub239 = 0, $sub24 = 0, $sub244 = 0, $sub247 = 0, $sub249 = 0, $sub262 = 0, $sub4 = 0, $sub43 = 0, $sub45 = 0, $sub67 = 0, $sub73 = 0, $sub76 = 0, $sub83 = 0, $sub93 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $NLSF_Q15$addr = $NLSF_Q15; + $NDeltaMin_Q15$addr = $NDeltaMin_Q15; + $L$addr = $L; + $I = 0; + $loops = 0; + while(1) { + $0 = $loops; + $cmp = ($0|0)<(20); + if (!($cmp)) { + break; + } + $1 = $NLSF_Q15$addr; + $2 = HEAP16[$1>>1]|0; + $conv = $2 << 16 >> 16; + $3 = $NDeltaMin_Q15$addr; + $4 = HEAP16[$3>>1]|0; + $conv2 = $4 << 16 >> 16; + $sub = (($conv) - ($conv2))|0; + $min_diff_Q15 = $sub; + $I = 0; + $i = 1; + while(1) { + $5 = $i; + $6 = $L$addr; + $sub4 = (($6) - 1)|0; + $cmp5 = ($5|0)<=($sub4|0); + $7 = $NLSF_Q15$addr; + if (!($cmp5)) { + break; + } + $8 = $i; + $arrayidx8 = (($7) + ($8<<1)|0); + $9 = HEAP16[$arrayidx8>>1]|0; + $conv9 = $9 << 16 >> 16; + $10 = $NLSF_Q15$addr; + $11 = $i; + $sub10 = (($11) - 1)|0; + $arrayidx11 = (($10) + ($sub10<<1)|0); + $12 = HEAP16[$arrayidx11>>1]|0; + $conv12 = $12 << 16 >> 16; + $13 = $NDeltaMin_Q15$addr; + $14 = $i; + $arrayidx13 = (($13) + ($14<<1)|0); + $15 = HEAP16[$arrayidx13>>1]|0; + $conv14 = $15 << 16 >> 16; + $add = (($conv12) + ($conv14))|0; + $sub15 = (($conv9) - ($add))|0; + $diff_Q15 = $sub15; + $16 = $diff_Q15; + $17 = $min_diff_Q15; + $cmp16 = ($16|0)<($17|0); + if ($cmp16) { + $18 = $diff_Q15; + $min_diff_Q15 = $18; + $19 = $i; + $I = $19; + } + $20 = $i; + $inc = (($20) + 1)|0; + $i = $inc; + } + $21 = $L$addr; + $sub18 = (($21) - 1)|0; + $arrayidx19 = (($7) + ($sub18<<1)|0); + $22 = HEAP16[$arrayidx19>>1]|0; + $conv20 = $22 << 16 >> 16; + $23 = $NDeltaMin_Q15$addr; + $24 = $L$addr; + $arrayidx21 = (($23) + ($24<<1)|0); + $25 = HEAP16[$arrayidx21>>1]|0; + $conv22 = $25 << 16 >> 16; + $add23 = (($conv20) + ($conv22))|0; + $sub24 = (32768 - ($add23))|0; + $diff_Q15 = $sub24; + $26 = $diff_Q15; + $27 = $min_diff_Q15; + $cmp25 = ($26|0)<($27|0); + if ($cmp25) { + $28 = $diff_Q15; + $min_diff_Q15 = $28; + $29 = $L$addr; + $I = $29; + } + $30 = $min_diff_Q15; + $cmp29 = ($30|0)>=(0); + if ($cmp29) { + label = 42; + break; + } + $31 = $I; + $cmp33 = ($31|0)==(0); + if ($cmp33) { + $32 = $NDeltaMin_Q15$addr; + $33 = HEAP16[$32>>1]|0; + $34 = $NLSF_Q15$addr; + HEAP16[$34>>1] = $33; + } else { + $35 = $I; + $36 = $L$addr; + $cmp38 = ($35|0)==($36|0); + if ($cmp38) { + $37 = $NDeltaMin_Q15$addr; + $38 = $L$addr; + $arrayidx41 = (($37) + ($38<<1)|0); + $39 = HEAP16[$arrayidx41>>1]|0; + $conv42 = $39 << 16 >> 16; + $sub43 = (32768 - ($conv42))|0; + $conv44 = $sub43&65535; + $40 = $NLSF_Q15$addr; + $41 = $L$addr; + $sub45 = (($41) - 1)|0; + $arrayidx46 = (($40) + ($sub45<<1)|0); + $arrayidx205$sink = $arrayidx46;$conv204$sink = $conv44; + } else { + $min_center_Q15 = 0; + $k = 0; + while(1) { + $42 = $k; + $43 = $I; + $cmp49 = ($42|0)<($43|0); + $44 = $NDeltaMin_Q15$addr; + if (!($cmp49)) { + break; + } + $45 = $k; + $arrayidx52 = (($44) + ($45<<1)|0); + $46 = HEAP16[$arrayidx52>>1]|0; + $conv53 = $46 << 16 >> 16; + $47 = $min_center_Q15; + $add54 = (($47) + ($conv53))|0; + $min_center_Q15 = $add54; + $48 = $k; + $inc56 = (($48) + 1)|0; + $k = $inc56; + } + $49 = $I; + $arrayidx58 = (($44) + ($49<<1)|0); + $50 = HEAP16[$arrayidx58>>1]|0; + $conv59 = $50 << 16 >> 16; + $shr = $conv59 >> 1; + $51 = $min_center_Q15; + $add60 = (($51) + ($shr))|0; + $min_center_Q15 = $add60; + $max_center_Q15 = 32768; + $52 = $L$addr; + $k = $52; + while(1) { + $53 = $k; + $54 = $I; + $cmp62 = ($53|0)>($54|0); + $55 = $NDeltaMin_Q15$addr; + if (!($cmp62)) { + break; + } + $56 = $k; + $arrayidx65 = (($55) + ($56<<1)|0); + $57 = HEAP16[$arrayidx65>>1]|0; + $conv66 = $57 << 16 >> 16; + $58 = $max_center_Q15; + $sub67 = (($58) - ($conv66))|0; + $max_center_Q15 = $sub67; + $59 = $k; + $dec = (($59) + -1)|0; + $k = $dec; + } + $60 = $I; + $arrayidx70 = (($55) + ($60<<1)|0); + $61 = HEAP16[$arrayidx70>>1]|0; + $conv71 = $61 << 16 >> 16; + $shr72 = $conv71 >> 1; + $62 = $max_center_Q15; + $sub73 = (($62) - ($shr72))|0; + $max_center_Q15 = $sub73; + $63 = $min_center_Q15; + $64 = $max_center_Q15; + $cmp74 = ($63|0)>($64|0); + $65 = $NLSF_Q15$addr; + $66 = $I; + $sub76 = (($66) - 1)|0; + $arrayidx77 = (($65) + ($sub76<<1)|0); + $67 = HEAP16[$arrayidx77>>1]|0; + $conv78 = $67 << 16 >> 16; + $68 = $NLSF_Q15$addr; + $69 = $I; + $arrayidx79 = (($68) + ($69<<1)|0); + $70 = HEAP16[$arrayidx79>>1]|0; + $conv80 = $70 << 16 >> 16; + $add81 = (($conv78) + ($conv80))|0; + $shr82 = $add81 >> 1; + $71 = $NLSF_Q15$addr; + $72 = $I; + $sub83 = (($72) - 1)|0; + $arrayidx84 = (($71) + ($sub83<<1)|0); + $73 = HEAP16[$arrayidx84>>1]|0; + $conv85 = $73 << 16 >> 16; + $74 = $NLSF_Q15$addr; + $75 = $I; + $arrayidx86 = (($74) + ($75<<1)|0); + $76 = HEAP16[$arrayidx86>>1]|0; + $conv87 = $76 << 16 >> 16; + $add88 = (($conv85) + ($conv87))|0; + $and = $add88 & 1; + $add89 = (($shr82) + ($and))|0; + do { + if ($cmp74) { + $77 = $min_center_Q15; + $cmp90 = ($add89|0)>($77|0); + if ($cmp90) { + $78 = $min_center_Q15; + $cond188 = $78; + break; + } + $79 = $NLSF_Q15$addr; + $80 = $I; + $sub93 = (($80) - 1)|0; + $arrayidx94 = (($79) + ($sub93<<1)|0); + $81 = HEAP16[$arrayidx94>>1]|0; + $conv95 = $81 << 16 >> 16; + $82 = $NLSF_Q15$addr; + $83 = $I; + $arrayidx96 = (($82) + ($83<<1)|0); + $84 = HEAP16[$arrayidx96>>1]|0; + $conv97 = $84 << 16 >> 16; + $add98 = (($conv95) + ($conv97))|0; + $shr99 = $add98 >> 1; + $85 = $NLSF_Q15$addr; + $86 = $I; + $sub100 = (($86) - 1)|0; + $arrayidx101 = (($85) + ($sub100<<1)|0); + $87 = HEAP16[$arrayidx101>>1]|0; + $conv102 = $87 << 16 >> 16; + $88 = $NLSF_Q15$addr; + $89 = $I; + $arrayidx103 = (($88) + ($89<<1)|0); + $90 = HEAP16[$arrayidx103>>1]|0; + $conv104 = $90 << 16 >> 16; + $add105 = (($conv102) + ($conv104))|0; + $and106 = $add105 & 1; + $add107 = (($shr99) + ($and106))|0; + $91 = $max_center_Q15; + $cmp108 = ($add107|0)<($91|0); + if ($cmp108) { + $92 = $max_center_Q15; + $cond188 = $92; + break; + } else { + $93 = $NLSF_Q15$addr; + $94 = $I; + $sub112 = (($94) - 1)|0; + $arrayidx113 = (($93) + ($sub112<<1)|0); + $95 = HEAP16[$arrayidx113>>1]|0; + $conv114 = $95 << 16 >> 16; + $96 = $NLSF_Q15$addr; + $97 = $I; + $arrayidx115 = (($96) + ($97<<1)|0); + $98 = HEAP16[$arrayidx115>>1]|0; + $conv116 = $98 << 16 >> 16; + $add117 = (($conv114) + ($conv116))|0; + $shr118 = $add117 >> 1; + $99 = $NLSF_Q15$addr; + $100 = $I; + $sub119 = (($100) - 1)|0; + $arrayidx120 = (($99) + ($sub119<<1)|0); + $101 = HEAP16[$arrayidx120>>1]|0; + $conv121 = $101 << 16 >> 16; + $102 = $NLSF_Q15$addr; + $103 = $I; + $arrayidx122 = (($102) + ($103<<1)|0); + $104 = HEAP16[$arrayidx122>>1]|0; + $conv123 = $104 << 16 >> 16; + $add124 = (($conv121) + ($conv123))|0; + $and125 = $add124 & 1; + $add126 = (($shr118) + ($and125))|0; + $cond188 = $add126; + break; + } + } else { + $105 = $max_center_Q15; + $cmp145 = ($add89|0)>($105|0); + if ($cmp145) { + $106 = $max_center_Q15; + $cond188 = $106; + break; + } + $107 = $NLSF_Q15$addr; + $108 = $I; + $sub149 = (($108) - 1)|0; + $arrayidx150 = (($107) + ($sub149<<1)|0); + $109 = HEAP16[$arrayidx150>>1]|0; + $conv151 = $109 << 16 >> 16; + $110 = $NLSF_Q15$addr; + $111 = $I; + $arrayidx152 = (($110) + ($111<<1)|0); + $112 = HEAP16[$arrayidx152>>1]|0; + $conv153 = $112 << 16 >> 16; + $add154 = (($conv151) + ($conv153))|0; + $shr155 = $add154 >> 1; + $113 = $NLSF_Q15$addr; + $114 = $I; + $sub156 = (($114) - 1)|0; + $arrayidx157 = (($113) + ($sub156<<1)|0); + $115 = HEAP16[$arrayidx157>>1]|0; + $conv158 = $115 << 16 >> 16; + $116 = $NLSF_Q15$addr; + $117 = $I; + $arrayidx159 = (($116) + ($117<<1)|0); + $118 = HEAP16[$arrayidx159>>1]|0; + $conv160 = $118 << 16 >> 16; + $add161 = (($conv158) + ($conv160))|0; + $and162 = $add161 & 1; + $add163 = (($shr155) + ($and162))|0; + $119 = $min_center_Q15; + $cmp164 = ($add163|0)<($119|0); + if ($cmp164) { + $120 = $min_center_Q15; + $cond188 = $120; + break; + } else { + $121 = $NLSF_Q15$addr; + $122 = $I; + $sub168 = (($122) - 1)|0; + $arrayidx169 = (($121) + ($sub168<<1)|0); + $123 = HEAP16[$arrayidx169>>1]|0; + $conv170 = $123 << 16 >> 16; + $124 = $NLSF_Q15$addr; + $125 = $I; + $arrayidx171 = (($124) + ($125<<1)|0); + $126 = HEAP16[$arrayidx171>>1]|0; + $conv172 = $126 << 16 >> 16; + $add173 = (($conv170) + ($conv172))|0; + $shr174 = $add173 >> 1; + $127 = $NLSF_Q15$addr; + $128 = $I; + $sub175 = (($128) - 1)|0; + $arrayidx176 = (($127) + ($sub175<<1)|0); + $129 = HEAP16[$arrayidx176>>1]|0; + $conv177 = $129 << 16 >> 16; + $130 = $NLSF_Q15$addr; + $131 = $I; + $arrayidx178 = (($130) + ($131<<1)|0); + $132 = HEAP16[$arrayidx178>>1]|0; + $conv179 = $132 << 16 >> 16; + $add180 = (($conv177) + ($conv179))|0; + $and181 = $add180 & 1; + $add182 = (($shr174) + ($and181))|0; + $cond188 = $add182; + break; + } + } + } while(0); + $conv189 = $cond188&65535; + $center_freq_Q15 = $conv189; + $133 = $center_freq_Q15; + $conv190 = $133 << 16 >> 16; + $134 = $NDeltaMin_Q15$addr; + $135 = $I; + $arrayidx191 = (($134) + ($135<<1)|0); + $136 = HEAP16[$arrayidx191>>1]|0; + $conv192 = $136 << 16 >> 16; + $shr193 = $conv192 >> 1; + $sub194 = (($conv190) - ($shr193))|0; + $conv195 = $sub194&65535; + $137 = $NLSF_Q15$addr; + $138 = $I; + $sub196 = (($138) - 1)|0; + $arrayidx197 = (($137) + ($sub196<<1)|0); + HEAP16[$arrayidx197>>1] = $conv195; + $139 = $NLSF_Q15$addr; + $140 = $I; + $sub198 = (($140) - 1)|0; + $arrayidx199 = (($139) + ($sub198<<1)|0); + $141 = HEAP16[$arrayidx199>>1]|0; + $conv200 = $141 << 16 >> 16; + $142 = $NDeltaMin_Q15$addr; + $143 = $I; + $arrayidx201 = (($142) + ($143<<1)|0); + $144 = HEAP16[$arrayidx201>>1]|0; + $conv202 = $144 << 16 >> 16; + $add203 = (($conv200) + ($conv202))|0; + $conv204 = $add203&65535; + $145 = $NLSF_Q15$addr; + $146 = $I; + $arrayidx205 = (($145) + ($146<<1)|0); + $arrayidx205$sink = $arrayidx205;$conv204$sink = $conv204; + } + HEAP16[$arrayidx205$sink>>1] = $conv204$sink; + } + $147 = $loops; + $inc209 = (($147) + 1)|0; + $loops = $inc209; + } + if ((label|0) == 42) { + STACKTOP = sp;return; + } + $148 = $loops; + $cmp211 = ($148|0)==(20); + if (!($cmp211)) { + STACKTOP = sp;return; + } + $149 = $NLSF_Q15$addr; + $150 = $L$addr; + _silk_insertion_sort_increasing_all_values_int16($149,$150); + $151 = $NLSF_Q15$addr; + $152 = HEAP16[$151>>1]|0; + $conv216 = $152 << 16 >> 16; + $153 = $NDeltaMin_Q15$addr; + $154 = HEAP16[$153>>1]|0; + $conv218 = $154 << 16 >> 16; + $call = (_silk_max_int_484($conv216,$conv218)|0); + $conv219 = $call&65535; + $155 = $NLSF_Q15$addr; + HEAP16[$155>>1] = $conv219; + $i = 1; + while(1) { + $156 = $i; + $157 = $L$addr; + $cmp222 = ($156|0)<($157|0); + $158 = $NLSF_Q15$addr; + if (!($cmp222)) { + break; + } + $159 = $i; + $arrayidx225 = (($158) + ($159<<1)|0); + $160 = HEAP16[$arrayidx225>>1]|0; + $conv226 = $160 << 16 >> 16; + $161 = $NLSF_Q15$addr; + $162 = $i; + $sub227 = (($162) - 1)|0; + $arrayidx228 = (($161) + ($sub227<<1)|0); + $163 = HEAP16[$arrayidx228>>1]|0; + $conv229 = $163 << 16 >> 16; + $164 = $NDeltaMin_Q15$addr; + $165 = $i; + $arrayidx230 = (($164) + ($165<<1)|0); + $166 = HEAP16[$arrayidx230>>1]|0; + $conv231 = $166 << 16 >> 16; + $add232 = (($conv229) + ($conv231))|0; + $call233 = (_silk_max_int_484($conv226,$add232)|0); + $conv234 = $call233&65535; + $167 = $NLSF_Q15$addr; + $168 = $i; + $arrayidx235 = (($167) + ($168<<1)|0); + HEAP16[$arrayidx235>>1] = $conv234; + $169 = $i; + $inc237 = (($169) + 1)|0; + $i = $inc237; + } + $170 = $L$addr; + $sub239 = (($170) - 1)|0; + $arrayidx240 = (($158) + ($sub239<<1)|0); + $171 = HEAP16[$arrayidx240>>1]|0; + $conv241 = $171 << 16 >> 16; + $172 = $NDeltaMin_Q15$addr; + $173 = $L$addr; + $arrayidx242 = (($172) + ($173<<1)|0); + $174 = HEAP16[$arrayidx242>>1]|0; + $conv243 = $174 << 16 >> 16; + $sub244 = (32768 - ($conv243))|0; + $call245 = (_silk_min_int_485($conv241,$sub244)|0); + $conv246 = $call245&65535; + $175 = $NLSF_Q15$addr; + $176 = $L$addr; + $sub247 = (($176) - 1)|0; + $arrayidx248 = (($175) + ($sub247<<1)|0); + HEAP16[$arrayidx248>>1] = $conv246; + $177 = $L$addr; + $sub249 = (($177) - 2)|0; + $i = $sub249; + while(1) { + $178 = $i; + $cmp251 = ($178|0)>=(0); + if (!($cmp251)) { + break; + } + $179 = $NLSF_Q15$addr; + $180 = $i; + $arrayidx254 = (($179) + ($180<<1)|0); + $181 = HEAP16[$arrayidx254>>1]|0; + $conv255 = $181 << 16 >> 16; + $182 = $NLSF_Q15$addr; + $183 = $i; + $add256 = (($183) + 1)|0; + $arrayidx257 = (($182) + ($add256<<1)|0); + $184 = HEAP16[$arrayidx257>>1]|0; + $conv258 = $184 << 16 >> 16; + $185 = $NDeltaMin_Q15$addr; + $186 = $i; + $add259 = (($186) + 1)|0; + $arrayidx260 = (($185) + ($add259<<1)|0); + $187 = HEAP16[$arrayidx260>>1]|0; + $conv261 = $187 << 16 >> 16; + $sub262 = (($conv258) - ($conv261))|0; + $call263 = (_silk_min_int_485($conv255,$sub262)|0); + $conv264 = $call263&65535; + $188 = $NLSF_Q15$addr; + $189 = $i; + $arrayidx265 = (($188) + ($189<<1)|0); + HEAP16[$arrayidx265>>1] = $conv264; + $190 = $i; + $dec267 = (($190) + -1)|0; + $i = $dec267; + } + STACKTOP = sp;return; +} +function _silk_max_int_484($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)>($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_min_int_485($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)<($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_NLSF_VQ_weights_laroia($pNLSFW_Q_OUT,$pNLSF_Q15,$D) { + $pNLSFW_Q_OUT = $pNLSFW_Q_OUT|0; + $pNLSF_Q15 = $pNLSF_Q15|0; + $D = $D|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0; + var $7 = 0, $8 = 0, $9 = 0, $D$addr = 0, $add = 0, $add12 = 0, $add20 = 0, $add24 = 0, $add27 = 0, $add33 = 0, $add36 = 0, $add38 = 0, $add45 = 0, $arrayidx1 = 0, $arrayidx13 = 0, $arrayidx15 = 0, $arrayidx23 = 0, $arrayidx25 = 0, $arrayidx28 = 0, $arrayidx37 = 0; + var $arrayidx40 = 0, $arrayidx49 = 0, $call = 0, $call18 = 0, $call21 = 0, $call31 = 0, $call34 = 0, $call43 = 0, $call46 = 0, $call5 = 0, $call7 = 0, $cmp = 0, $conv = 0, $conv14 = 0, $conv16 = 0, $conv2 = 0, $conv22 = 0, $conv26 = 0, $conv29 = 0, $conv35 = 0; + var $conv4 = 0, $conv41 = 0, $conv47 = 0, $conv8 = 0, $div = 0, $div19 = 0, $div32 = 0, $div44 = 0, $div6 = 0, $k = 0, $pNLSFW_Q_OUT$addr = 0, $pNLSF_Q15$addr = 0, $sub = 0, $sub10 = 0, $sub17 = 0, $sub30 = 0, $sub39 = 0, $sub42 = 0, $sub48 = 0, $tmp1_int = 0; + var $tmp2_int = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $pNLSFW_Q_OUT$addr = $pNLSFW_Q_OUT; + $pNLSF_Q15$addr = $pNLSF_Q15; + $D$addr = $D; + $0 = $pNLSF_Q15$addr; + $1 = HEAP16[$0>>1]|0; + $conv = $1 << 16 >> 16; + $call = (_silk_max_int_488($conv,1)|0); + $tmp1_int = $call; + $2 = $tmp1_int; + $div = (131072 / ($2|0))&-1; + $tmp1_int = $div; + $3 = $pNLSF_Q15$addr; + $arrayidx1 = ((($3)) + 2|0); + $4 = HEAP16[$arrayidx1>>1]|0; + $conv2 = $4 << 16 >> 16; + $5 = $pNLSF_Q15$addr; + $6 = HEAP16[$5>>1]|0; + $conv4 = $6 << 16 >> 16; + $sub = (($conv2) - ($conv4))|0; + $call5 = (_silk_max_int_488($sub,1)|0); + $tmp2_int = $call5; + $7 = $tmp2_int; + $div6 = (131072 / ($7|0))&-1; + $tmp2_int = $div6; + $8 = $tmp1_int; + $9 = $tmp2_int; + $add = (($8) + ($9))|0; + $call7 = (_silk_min_int_489($add,32767)|0); + $conv8 = $call7&65535; + $10 = $pNLSFW_Q_OUT$addr; + HEAP16[$10>>1] = $conv8; + $k = 1; + while(1) { + $11 = $k; + $12 = $D$addr; + $sub10 = (($12) - 1)|0; + $cmp = ($11|0)<($sub10|0); + $13 = $pNLSF_Q15$addr; + if (!($cmp)) { + break; + } + $14 = $k; + $add12 = (($14) + 1)|0; + $arrayidx13 = (($13) + ($add12<<1)|0); + $15 = HEAP16[$arrayidx13>>1]|0; + $conv14 = $15 << 16 >> 16; + $16 = $pNLSF_Q15$addr; + $17 = $k; + $arrayidx15 = (($16) + ($17<<1)|0); + $18 = HEAP16[$arrayidx15>>1]|0; + $conv16 = $18 << 16 >> 16; + $sub17 = (($conv14) - ($conv16))|0; + $call18 = (_silk_max_int_488($sub17,1)|0); + $tmp1_int = $call18; + $19 = $tmp1_int; + $div19 = (131072 / ($19|0))&-1; + $tmp1_int = $div19; + $20 = $tmp1_int; + $21 = $tmp2_int; + $add20 = (($20) + ($21))|0; + $call21 = (_silk_min_int_489($add20,32767)|0); + $conv22 = $call21&65535; + $22 = $pNLSFW_Q_OUT$addr; + $23 = $k; + $arrayidx23 = (($22) + ($23<<1)|0); + HEAP16[$arrayidx23>>1] = $conv22; + $24 = $pNLSF_Q15$addr; + $25 = $k; + $add24 = (($25) + 2)|0; + $arrayidx25 = (($24) + ($add24<<1)|0); + $26 = HEAP16[$arrayidx25>>1]|0; + $conv26 = $26 << 16 >> 16; + $27 = $pNLSF_Q15$addr; + $28 = $k; + $add27 = (($28) + 1)|0; + $arrayidx28 = (($27) + ($add27<<1)|0); + $29 = HEAP16[$arrayidx28>>1]|0; + $conv29 = $29 << 16 >> 16; + $sub30 = (($conv26) - ($conv29))|0; + $call31 = (_silk_max_int_488($sub30,1)|0); + $tmp2_int = $call31; + $30 = $tmp2_int; + $div32 = (131072 / ($30|0))&-1; + $tmp2_int = $div32; + $31 = $tmp1_int; + $32 = $tmp2_int; + $add33 = (($31) + ($32))|0; + $call34 = (_silk_min_int_489($add33,32767)|0); + $conv35 = $call34&65535; + $33 = $pNLSFW_Q_OUT$addr; + $34 = $k; + $add36 = (($34) + 1)|0; + $arrayidx37 = (($33) + ($add36<<1)|0); + HEAP16[$arrayidx37>>1] = $conv35; + $35 = $k; + $add38 = (($35) + 2)|0; + $k = $add38; + } + $36 = $D$addr; + $sub39 = (($36) - 1)|0; + $arrayidx40 = (($13) + ($sub39<<1)|0); + $37 = HEAP16[$arrayidx40>>1]|0; + $conv41 = $37 << 16 >> 16; + $sub42 = (32768 - ($conv41))|0; + $call43 = (_silk_max_int_488($sub42,1)|0); + $tmp1_int = $call43; + $38 = $tmp1_int; + $div44 = (131072 / ($38|0))&-1; + $tmp1_int = $div44; + $39 = $tmp1_int; + $40 = $tmp2_int; + $add45 = (($39) + ($40))|0; + $call46 = (_silk_min_int_489($add45,32767)|0); + $conv47 = $call46&65535; + $41 = $pNLSFW_Q_OUT$addr; + $42 = $D$addr; + $sub48 = (($42) - 1)|0; + $arrayidx49 = (($41) + ($sub48<<1)|0); + HEAP16[$arrayidx49>>1] = $conv47; + STACKTOP = sp;return; +} +function _silk_max_int_488($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)>($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_min_int_489($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $a$addr = 0, $b$addr = 0, $cmp = 0, $cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $a$addr = $a; + $b$addr = $b; + $0 = $a$addr; + $1 = $b$addr; + $cmp = ($0|0)<($1|0); + $2 = $a$addr; + $3 = $b$addr; + $cond = $cmp ? $2 : $3; + STACKTOP = sp;return ($cond|0); +} +function _silk_resampler_private_AR2($S,$out_Q8,$in,$A_Q14,$len) { + $S = $S|0; + $out_Q8 = $out_Q8|0; + $in = $in|0; + $A_Q14 = $A_Q14|0; + $len = $len|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $A_Q14$addr = 0, $S$addr = 0, $add = 0, $add11 = 0, $add12 = 0, $add23 = 0, $and = 0, $and18 = 0, $arrayidx1 = 0, $arrayidx15 = 0, $arrayidx19 = 0, $arrayidx2 = 0; + var $arrayidx24 = 0, $arrayidx4 = 0, $cmp = 0, $conv = 0, $conv16 = 0, $conv20 = 0, $conv6 = 0, $conv8 = 0, $in$addr = 0, $inc = 0, $k = 0, $len$addr = 0, $mul = 0, $mul17 = 0, $mul21 = 0, $mul9 = 0, $out32 = 0, $out_Q8$addr = 0, $shl = 0, $shl3 = 0; + var $shr = 0, $shr10 = 0, $shr14 = 0, $shr22 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $S$addr = $S; + $out_Q8$addr = $out_Q8; + $in$addr = $in; + $A_Q14$addr = $A_Q14; + $len$addr = $len; + $k = 0; + while(1) { + $0 = $k; + $1 = $len$addr; + $cmp = ($0|0)<($1|0); + if (!($cmp)) { + break; + } + $2 = $S$addr; + $3 = HEAP32[$2>>2]|0; + $4 = $in$addr; + $5 = $k; + $arrayidx1 = (($4) + ($5<<1)|0); + $6 = HEAP16[$arrayidx1>>1]|0; + $conv = $6 << 16 >> 16; + $shl = $conv << 8; + $add = (($3) + ($shl))|0; + $out32 = $add; + $7 = $out32; + $8 = $out_Q8$addr; + $9 = $k; + $arrayidx2 = (($8) + ($9<<2)|0); + HEAP32[$arrayidx2>>2] = $7; + $10 = $out32; + $shl3 = $10 << 2; + $out32 = $shl3; + $11 = $S$addr; + $arrayidx4 = ((($11)) + 4|0); + $12 = HEAP32[$arrayidx4>>2]|0; + $13 = $out32; + $shr = $13 >> 16; + $14 = $A_Q14$addr; + $15 = HEAP16[$14>>1]|0; + $conv6 = $15 << 16 >> 16; + $mul = Math_imul($shr, $conv6)|0; + $16 = $out32; + $and = $16 & 65535; + $17 = $A_Q14$addr; + $18 = HEAP16[$17>>1]|0; + $conv8 = $18 << 16 >> 16; + $mul9 = Math_imul($and, $conv8)|0; + $shr10 = $mul9 >> 16; + $add11 = (($mul) + ($shr10))|0; + $add12 = (($12) + ($add11))|0; + $19 = $S$addr; + HEAP32[$19>>2] = $add12; + $20 = $out32; + $shr14 = $20 >> 16; + $21 = $A_Q14$addr; + $arrayidx15 = ((($21)) + 2|0); + $22 = HEAP16[$arrayidx15>>1]|0; + $conv16 = $22 << 16 >> 16; + $mul17 = Math_imul($shr14, $conv16)|0; + $23 = $out32; + $and18 = $23 & 65535; + $24 = $A_Q14$addr; + $arrayidx19 = ((($24)) + 2|0); + $25 = HEAP16[$arrayidx19>>1]|0; + $conv20 = $25 << 16 >> 16; + $mul21 = Math_imul($and18, $conv20)|0; + $shr22 = $mul21 >> 16; + $add23 = (($mul17) + ($shr22))|0; + $26 = $S$addr; + $arrayidx24 = ((($26)) + 4|0); + HEAP32[$arrayidx24>>2] = $add23; + $27 = $k; + $inc = (($27) + 1)|0; + $k = $inc; + } + STACKTOP = sp;return; +} +function _silk_insertion_sort_increasing_all_values_int16($a,$L) { + $a = $a|0; + $L = $L|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, $L$addr = 0, $a$addr = 0, $add = 0, $add12 = 0, $arrayidx = 0, $arrayidx10 = 0, $arrayidx13 = 0, $arrayidx4 = 0, $arrayidx9 = 0, $cmp = 0, $cmp2 = 0, $cmp6 = 0, $conv = 0, $conv11 = 0, $conv5 = 0, $dec = 0, $i = 0, $inc = 0, $j = 0; + var $sub = 0, $value = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $a$addr = $a; + $L$addr = $L; + $i = 1; + while(1) { + $0 = $i; + $1 = $L$addr; + $cmp = ($0|0)<($1|0); + if (!($cmp)) { + break; + } + $2 = $a$addr; + $3 = $i; + $arrayidx = (($2) + ($3<<1)|0); + $4 = HEAP16[$arrayidx>>1]|0; + $conv = $4 << 16 >> 16; + $value = $conv; + $5 = $i; + $sub = (($5) - 1)|0; + $j = $sub; + while(1) { + $6 = $j; + $cmp2 = ($6|0)>=(0); + if (!($cmp2)) { + break; + } + $7 = $value; + $8 = $a$addr; + $9 = $j; + $arrayidx4 = (($8) + ($9<<1)|0); + $10 = HEAP16[$arrayidx4>>1]|0; + $conv5 = $10 << 16 >> 16; + $cmp6 = ($7|0)<($conv5|0); + if (!($cmp6)) { + break; + } + $11 = $a$addr; + $12 = $j; + $arrayidx9 = (($11) + ($12<<1)|0); + $13 = HEAP16[$arrayidx9>>1]|0; + $14 = $a$addr; + $15 = $j; + $add = (($15) + 1)|0; + $arrayidx10 = (($14) + ($add<<1)|0); + HEAP16[$arrayidx10>>1] = $13; + $16 = $j; + $dec = (($16) + -1)|0; + $j = $dec; + } + $17 = $value; + $conv11 = $17&65535; + $18 = $a$addr; + $19 = $j; + $add12 = (($19) + 1)|0; + $arrayidx13 = (($18) + ($add12<<1)|0); + HEAP16[$arrayidx13>>1] = $conv11; + $20 = $i; + $inc = (($20) + 1)|0; + $i = $inc; + } + STACKTOP = sp;return; +} +function _silk_sum_sqr_shift($energy,$shift,$x,$len) { + $energy = $energy|0; + $shift = $shift|0; + $x = $x|0; + $len = $len|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $7 = 0, $8 = 0; + var $9 = 0, $add = 0, $add10 = 0, $add13 = 0, $add14 = 0, $add24 = 0, $add27 = 0, $add3 = 0, $add31 = 0, $add33 = 0, $add38 = 0, $add41 = 0, $add52 = 0, $add56 = 0, $add6 = 0, $and = 0, $arrayidx = 0, $arrayidx1 = 0, $arrayidx19 = 0, $arrayidx21 = 0; + var $arrayidx25 = 0, $arrayidx28 = 0, $arrayidx4 = 0, $arrayidx46 = 0, $arrayidx48 = 0, $arrayidx7 = 0, $cmp = 0, $cmp11 = 0, $cmp16 = 0, $cmp34 = 0, $cmp43 = 0, $conv = 0, $conv2 = 0, $conv20 = 0, $conv22 = 0, $conv26 = 0, $conv29 = 0, $conv47 = 0, $conv49 = 0, $conv5 = 0; + var $conv8 = 0, $dec = 0, $energy$addr = 0, $i = 0, $len$addr = 0, $mul = 0, $mul23 = 0, $mul30 = 0, $mul50 = 0, $mul9 = 0, $nrg = 0, $nrg_tmp = 0, $shft = 0, $shift$addr = 0, $shr = 0, $shr32 = 0, $shr37 = 0, $shr51 = 0, $shr55 = 0, $tobool = 0; + var $x$addr = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $energy$addr = $energy; + $shift$addr = $shift; + $x$addr = $x; + $len$addr = $len; + $nrg = 0; + $shft = 0; + $0 = $len$addr; + $dec = (($0) + -1)|0; + $len$addr = $dec; + $i = 0; + while(1) { + $1 = $i; + $2 = $len$addr; + $cmp = ($1|0)<($2|0); + if (!($cmp)) { + break; + } + $3 = $nrg; + $4 = $x$addr; + $5 = $i; + $arrayidx = (($4) + ($5<<1)|0); + $6 = HEAP16[$arrayidx>>1]|0; + $conv = $6 << 16 >> 16; + $7 = $x$addr; + $8 = $i; + $arrayidx1 = (($7) + ($8<<1)|0); + $9 = HEAP16[$arrayidx1>>1]|0; + $conv2 = $9 << 16 >> 16; + $mul = Math_imul($conv, $conv2)|0; + $add = (($3) + ($mul))|0; + $nrg = $add; + $10 = $nrg; + $11 = $x$addr; + $12 = $i; + $add3 = (($12) + 1)|0; + $arrayidx4 = (($11) + ($add3<<1)|0); + $13 = HEAP16[$arrayidx4>>1]|0; + $conv5 = $13 << 16 >> 16; + $14 = $x$addr; + $15 = $i; + $add6 = (($15) + 1)|0; + $arrayidx7 = (($14) + ($add6<<1)|0); + $16 = HEAP16[$arrayidx7>>1]|0; + $conv8 = $16 << 16 >> 16; + $mul9 = Math_imul($conv5, $conv8)|0; + $add10 = (($10) + ($mul9))|0; + $nrg = $add10; + $17 = $nrg; + $cmp11 = ($17|0)<(0); + if ($cmp11) { + label = 4; + break; + } + $20 = $i; + $add14 = (($20) + 2)|0; + $i = $add14; + } + if ((label|0) == 4) { + $18 = $nrg; + $shr = $18 >>> 2; + $nrg = $shr; + $shft = 2; + $19 = $i; + $add13 = (($19) + 2)|0; + $i = $add13; + } + while(1) { + $21 = $i; + $22 = $len$addr; + $cmp16 = ($21|0)<($22|0); + if (!($cmp16)) { + break; + } + $23 = $x$addr; + $24 = $i; + $arrayidx19 = (($23) + ($24<<1)|0); + $25 = HEAP16[$arrayidx19>>1]|0; + $conv20 = $25 << 16 >> 16; + $26 = $x$addr; + $27 = $i; + $arrayidx21 = (($26) + ($27<<1)|0); + $28 = HEAP16[$arrayidx21>>1]|0; + $conv22 = $28 << 16 >> 16; + $mul23 = Math_imul($conv20, $conv22)|0; + $nrg_tmp = $mul23; + $29 = $nrg_tmp; + $30 = $x$addr; + $31 = $i; + $add24 = (($31) + 1)|0; + $arrayidx25 = (($30) + ($add24<<1)|0); + $32 = HEAP16[$arrayidx25>>1]|0; + $conv26 = $32 << 16 >> 16; + $33 = $x$addr; + $34 = $i; + $add27 = (($34) + 1)|0; + $arrayidx28 = (($33) + ($add27<<1)|0); + $35 = HEAP16[$arrayidx28>>1]|0; + $conv29 = $35 << 16 >> 16; + $mul30 = Math_imul($conv26, $conv29)|0; + $add31 = (($29) + ($mul30))|0; + $nrg_tmp = $add31; + $36 = $nrg; + $37 = $nrg_tmp; + $38 = $shft; + $shr32 = $37 >>> $38; + $add33 = (($36) + ($shr32))|0; + $nrg = $add33; + $39 = $nrg; + $cmp34 = ($39|0)<(0); + if ($cmp34) { + $40 = $nrg; + $shr37 = $40 >>> 2; + $nrg = $shr37; + $41 = $shft; + $add38 = (($41) + 2)|0; + $shft = $add38; + } + $42 = $i; + $add41 = (($42) + 2)|0; + $i = $add41; + } + $43 = $i; + $44 = $len$addr; + $cmp43 = ($43|0)==($44|0); + if ($cmp43) { + $45 = $x$addr; + $46 = $i; + $arrayidx46 = (($45) + ($46<<1)|0); + $47 = HEAP16[$arrayidx46>>1]|0; + $conv47 = $47 << 16 >> 16; + $48 = $x$addr; + $49 = $i; + $arrayidx48 = (($48) + ($49<<1)|0); + $50 = HEAP16[$arrayidx48>>1]|0; + $conv49 = $50 << 16 >> 16; + $mul50 = Math_imul($conv47, $conv49)|0; + $nrg_tmp = $mul50; + $51 = $nrg; + $52 = $nrg_tmp; + $53 = $shft; + $shr51 = $52 >> $53; + $add52 = (($51) + ($shr51))|0; + $nrg = $add52; + } + $54 = $nrg; + $and = $54 & -1073741824; + $tobool = ($and|0)!=(0); + if (!($tobool)) { + $57 = $shft; + $58 = $shift$addr; + HEAP32[$58>>2] = $57; + $59 = $nrg; + $60 = $energy$addr; + HEAP32[$60>>2] = $59; + STACKTOP = sp;return; + } + $55 = $nrg; + $shr55 = $55 >>> 2; + $nrg = $shr55; + $56 = $shft; + $add56 = (($56) + 2)|0; + $shft = $add56; + $57 = $shft; + $58 = $shift$addr; + HEAP32[$58>>2] = $57; + $59 = $nrg; + $60 = $energy$addr; + HEAP32[$60>>2] = $59; + STACKTOP = sp;return; +} +function _silk_CNG_Reset($psDec) { + $psDec = $psDec|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $CNG_smth_Gain_Q16 = 0, $CNG_smth_NLSF_Q15 = 0, $LPC_order = 0, $LPC_order1 = 0, $NLSF_acc_Q15 = 0, $NLSF_step_Q15 = 0, $add = 0; + var $add2 = 0, $arrayidx = 0, $cmp = 0, $conv = 0, $div = 0, $i = 0, $inc = 0, $psDec$addr = 0, $rand_seed = 0, $sCNG = 0, $sCNG3 = 0, $sCNG4 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $psDec$addr = $psDec; + $0 = $psDec$addr; + $LPC_order = ((($0)) + 2340|0); + $1 = HEAP32[$LPC_order>>2]|0; + $add = (($1) + 1)|0; + $div = (32767 / ($add|0))&-1; + $NLSF_step_Q15 = $div; + $NLSF_acc_Q15 = 0; + $i = 0; + while(1) { + $2 = $i; + $3 = $psDec$addr; + $LPC_order1 = ((($3)) + 2340|0); + $4 = HEAP32[$LPC_order1>>2]|0; + $cmp = ($2|0)<($4|0); + if (!($cmp)) { + break; + } + $5 = $NLSF_step_Q15; + $6 = $NLSF_acc_Q15; + $add2 = (($6) + ($5))|0; + $NLSF_acc_Q15 = $add2; + $7 = $NLSF_acc_Q15; + $conv = $7&65535; + $8 = $psDec$addr; + $sCNG = ((($8)) + 2772|0); + $CNG_smth_NLSF_Q15 = ((($sCNG)) + 1280|0); + $9 = $i; + $arrayidx = (($CNG_smth_NLSF_Q15) + ($9<<1)|0); + HEAP16[$arrayidx>>1] = $conv; + $10 = $i; + $inc = (($10) + 1)|0; + $i = $inc; + } + $11 = $psDec$addr; + $sCNG3 = ((($11)) + 2772|0); + $CNG_smth_Gain_Q16 = ((($sCNG3)) + 1376|0); + HEAP32[$CNG_smth_Gain_Q16>>2] = 0; + $12 = $psDec$addr; + $sCNG4 = ((($12)) + 2772|0); + $rand_seed = ((($sCNG4)) + 1380|0); + HEAP32[$rand_seed>>2] = 3176576; + STACKTOP = sp;return; +} +function _silk_CNG($psDec,$psDecCtrl,$frame,$length) { + $psDec = $psDec|0; + $psDecCtrl = $psDecCtrl|0; + $frame = $frame|0; + $length = $length|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $28 = 0, $29 = 0, $3 = 0; + var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0; + var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0; + var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0; + var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $A_Q12 = 0, $CNG_smth_Gain_Q16 = 0, $CNG_smth_Gain_Q16111 = 0, $CNG_smth_Gain_Q16118 = 0; + var $CNG_smth_Gain_Q16120 = 0, $CNG_smth_Gain_Q16140 = 0, $CNG_smth_Gain_Q16142 = 0, $CNG_smth_Gain_Q16146 = 0, $CNG_smth_Gain_Q16148 = 0, $CNG_smth_Gain_Q16154 = 0, $CNG_smth_Gain_Q16155 = 0, $CNG_smth_Gain_Q1664 = 0, $CNG_smth_Gain_Q1670 = 0, $CNG_smth_NLSF_Q15 = 0, $CNG_smth_NLSF_Q1513 = 0, $CNG_smth_NLSF_Q15169 = 0, $CNG_smth_NLSF_Q1519 = 0, $CNG_synth_state = 0, $CNG_synth_state499 = 0, $CNG_synth_state503 = 0, $Gains_Q16 = 0, $Gains_Q1632 = 0, $Gains_Q1657 = 0, $Gains_Q1662 = 0; + var $LPC_order = 0, $LPC_order171 = 0, $LPC_order177 = 0, $LPC_order349 = 0, $LPC_order505 = 0, $add = 0, $add$ptr = 0, $add105 = 0, $add108 = 0, $add134 = 0, $add136 = 0, $add139 = 0, $add153 = 0, $add157 = 0, $add160 = 0, $add179 = 0, $add186 = 0, $add194 = 0, $add195 = 0, $add196 = 0; + var $add203 = 0, $add211 = 0, $add212 = 0, $add213 = 0, $add22 = 0, $add220 = 0, $add228 = 0, $add229 = 0, $add230 = 0, $add237 = 0, $add245 = 0, $add246 = 0, $add247 = 0, $add254 = 0, $add262 = 0, $add263 = 0, $add264 = 0, $add271 = 0, $add279 = 0, $add280 = 0; + var $add281 = 0, $add288 = 0, $add296 = 0, $add297 = 0, $add298 = 0, $add305 = 0, $add313 = 0, $add314 = 0, $add315 = 0, $add322 = 0, $add330 = 0, $add331 = 0, $add332 = 0, $add339 = 0, $add347 = 0, $add348 = 0, $add353 = 0, $add360 = 0, $add368 = 0, $add369 = 0; + var $add370 = 0, $add377 = 0, $add385 = 0, $add386 = 0, $add387 = 0, $add394 = 0, $add402 = 0, $add403 = 0, $add404 = 0, $add411 = 0, $add419 = 0, $add420 = 0, $add421 = 0, $add428 = 0, $add436 = 0, $add437 = 0, $add438 = 0, $add445 = 0, $add453 = 0, $add454 = 0; + var $add456 = 0, $add459 = 0, $add460 = 0, $add464 = 0, $add467 = 0, $add469 = 0, $add474 = 0, $add477 = 0, $add479 = 0, $add486 = 0, $add489 = 0, $add491 = 0, $add69 = 0, $add71 = 0, $add78 = 0, $add97 = 0, $and = 0, $and129 = 0, $and147 = 0, $and189 = 0; + var $and206 = 0, $and223 = 0, $and240 = 0, $and257 = 0, $and274 = 0, $and291 = 0, $and308 = 0, $and325 = 0, $and342 = 0, $and363 = 0, $and380 = 0, $and397 = 0, $and414 = 0, $and431 = 0, $and448 = 0, $and66 = 0, $and89 = 0, $arrayidx = 0, $arrayidx103 = 0, $arrayidx11 = 0; + var $arrayidx14 = 0, $arrayidx181 = 0, $arrayidx188 = 0, $arrayidx198 = 0, $arrayidx20 = 0, $arrayidx200 = 0, $arrayidx205 = 0, $arrayidx207 = 0, $arrayidx215 = 0, $arrayidx217 = 0, $arrayidx222 = 0, $arrayidx224 = 0, $arrayidx232 = 0, $arrayidx234 = 0, $arrayidx239 = 0, $arrayidx241 = 0, $arrayidx249 = 0, $arrayidx251 = 0, $arrayidx256 = 0, $arrayidx258 = 0; + var $arrayidx266 = 0, $arrayidx268 = 0, $arrayidx273 = 0, $arrayidx275 = 0, $arrayidx28 = 0, $arrayidx283 = 0, $arrayidx285 = 0, $arrayidx290 = 0, $arrayidx292 = 0, $arrayidx300 = 0, $arrayidx302 = 0, $arrayidx307 = 0, $arrayidx309 = 0, $arrayidx317 = 0, $arrayidx319 = 0, $arrayidx324 = 0, $arrayidx326 = 0, $arrayidx33 = 0, $arrayidx334 = 0, $arrayidx336 = 0; + var $arrayidx341 = 0, $arrayidx343 = 0, $arrayidx355 = 0, $arrayidx357 = 0, $arrayidx362 = 0, $arrayidx364 = 0, $arrayidx372 = 0, $arrayidx374 = 0, $arrayidx379 = 0, $arrayidx38 = 0, $arrayidx381 = 0, $arrayidx389 = 0, $arrayidx391 = 0, $arrayidx396 = 0, $arrayidx398 = 0, $arrayidx406 = 0, $arrayidx408 = 0, $arrayidx413 = 0, $arrayidx415 = 0, $arrayidx423 = 0; + var $arrayidx425 = 0, $arrayidx430 = 0, $arrayidx432 = 0, $arrayidx440 = 0, $arrayidx442 = 0, $arrayidx447 = 0, $arrayidx449 = 0, $arrayidx457 = 0, $arrayidx461 = 0, $arrayidx462 = 0, $arrayidx465 = 0, $arrayidx472 = 0, $arrayidx475 = 0, $arrayidx484 = 0, $arrayidx487 = 0, $arrayidx49 = 0, $arrayidx495 = 0, $arrayidx501 = 0, $arrayidx58 = 0, $arrayidx63 = 0; + var $arrayidx8 = 0, $arrayidx82 = 0, $arrayidx92 = 0, $call = 0, $call163 = 0, $cmp = 0, $cmp109 = 0, $cmp112 = 0, $cmp174 = 0, $cmp25 = 0, $cmp29 = 0, $cmp350 = 0, $cmp4 = 0, $cmp470 = 0, $cmp480 = 0, $cmp5 = 0, $cmp54 = 0, $cmp7 = 0, $cond493 = 0, $conv = 0; + var $conv100 = 0, $conv12 = 0, $conv126 = 0, $conv127 = 0, $conv130 = 0, $conv131 = 0, $conv143 = 0, $conv144 = 0, $conv149 = 0, $conv15 = 0, $conv150 = 0, $conv184 = 0, $conv191 = 0, $conv201 = 0, $conv208 = 0, $conv21 = 0, $conv218 = 0, $conv225 = 0, $conv23 = 0, $conv235 = 0; + var $conv242 = 0, $conv252 = 0, $conv259 = 0, $conv269 = 0, $conv276 = 0, $conv286 = 0, $conv293 = 0, $conv303 = 0, $conv310 = 0, $conv320 = 0, $conv327 = 0, $conv337 = 0, $conv344 = 0, $conv358 = 0, $conv365 = 0, $conv375 = 0, $conv382 = 0, $conv392 = 0, $conv399 = 0, $conv409 = 0; + var $conv416 = 0, $conv426 = 0, $conv433 = 0, $conv443 = 0, $conv450 = 0, $conv463 = 0, $conv473 = 0, $conv485 = 0, $conv494 = 0, $conv79 = 0, $conv83 = 0, $conv84 = 0, $conv88 = 0, $conv9 = 0, $conv93 = 0, $conv94 = 0, $exc_Q14 = 0, $frame$addr = 0, $fs_kHz = 0, $fs_kHz1 = 0; + var $fs_kHz2 = 0, $fs_kHz3 = 0, $gain_Q16 = 0, $i = 0, $inc = 0, $inc36 = 0, $inc497 = 0, $inc73 = 0, $length$addr = 0, $lossCnt = 0, $lossCnt76 = 0, $max_Gain_Q16 = 0, $mul = 0, $mul107 = 0, $mul117 = 0, $mul122 = 0, $mul128 = 0, $mul132 = 0, $mul138 = 0, $mul145 = 0; + var $mul151 = 0, $mul159 = 0, $mul17 = 0, $mul185 = 0, $mul192 = 0, $mul202 = 0, $mul209 = 0, $mul219 = 0, $mul226 = 0, $mul236 = 0, $mul243 = 0, $mul253 = 0, $mul260 = 0, $mul270 = 0, $mul277 = 0, $mul287 = 0, $mul294 = 0, $mul304 = 0, $mul311 = 0, $mul321 = 0; + var $mul328 = 0, $mul338 = 0, $mul345 = 0, $mul359 = 0, $mul366 = 0, $mul376 = 0, $mul383 = 0, $mul393 = 0, $mul400 = 0, $mul410 = 0, $mul417 = 0, $mul427 = 0, $mul43 = 0, $mul434 = 0, $mul44 = 0, $mul444 = 0, $mul451 = 0, $mul48 = 0, $mul506 = 0, $mul51 = 0; + var $mul61 = 0, $mul67 = 0, $mul85 = 0, $mul95 = 0, $nb_subfr = 0, $nb_subfr40 = 0, $nb_subfr53 = 0, $prevGain_Q16 = 0, $prevGain_Q16102 = 0, $prevGain_Q1691 = 0, $prevNLSF_Q15 = 0, $prevNLSF_Q1510 = 0, $prevSignalType = 0, $psCNG = 0, $psDec$addr = 0, $psDecCtrl$addr = 0, $randScale_Q14 = 0, $randScale_Q1487 = 0, $randScale_Q1499 = 0, $rand_seed = 0; + var $sCNG = 0, $sPLC = 0, $sPLC101 = 0, $sPLC81 = 0, $sPLC86 = 0, $sPLC90 = 0, $sPLC98 = 0, $saved_stack = 0, $shl = 0, $shl124 = 0, $shl161 = 0, $shl164 = 0, $shl458 = 0, $shr = 0, $shr104 = 0, $shr106 = 0, $shr115 = 0, $shr116 = 0, $shr119 = 0, $shr121 = 0; + var $shr125 = 0, $shr133 = 0, $shr135 = 0, $shr137 = 0, $shr141 = 0, $shr152 = 0, $shr156 = 0, $shr158 = 0, $shr178 = 0, $shr18 = 0, $shr182 = 0, $shr193 = 0, $shr199 = 0, $shr210 = 0, $shr216 = 0, $shr227 = 0, $shr233 = 0, $shr244 = 0, $shr250 = 0, $shr261 = 0; + var $shr267 = 0, $shr278 = 0, $shr284 = 0, $shr295 = 0, $shr301 = 0, $shr312 = 0, $shr318 = 0, $shr329 = 0, $shr335 = 0, $shr346 = 0, $shr356 = 0, $shr367 = 0, $shr373 = 0, $shr384 = 0, $shr390 = 0, $shr401 = 0, $shr407 = 0, $shr418 = 0, $shr424 = 0, $shr435 = 0; + var $shr441 = 0, $shr452 = 0, $shr466 = 0, $shr468 = 0, $shr476 = 0, $shr478 = 0, $shr488 = 0, $shr490 = 0, $shr60 = 0, $shr68 = 0, $shr80 = 0, $shr96 = 0, $sub = 0, $sub123 = 0, $sub16 = 0, $sub162 = 0, $sub180 = 0, $sub187 = 0, $sub197 = 0, $sub204 = 0; + var $sub214 = 0, $sub221 = 0, $sub231 = 0, $sub238 = 0, $sub248 = 0, $sub255 = 0, $sub265 = 0, $sub272 = 0, $sub282 = 0, $sub289 = 0, $sub299 = 0, $sub306 = 0, $sub316 = 0, $sub323 = 0, $sub333 = 0, $sub340 = 0, $sub354 = 0, $sub361 = 0, $sub371 = 0, $sub378 = 0; + var $sub388 = 0, $sub395 = 0, $sub405 = 0, $sub41 = 0, $sub412 = 0, $sub422 = 0, $sub429 = 0, $sub439 = 0, $sub446 = 0, $sub59 = 0, $sub65 = 0, $subfr = 0, $subfr_length = 0, $subfr_length42 = 0, $subfr_length47 = 0, $subfr_length50 = 0, $sum_Q6 = 0, $tobool = 0, $vla = 0, $vla$alloca_mul = 0; + var dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); + $A_Q12 = sp + 48|0; + $psDec$addr = $psDec; + $psDecCtrl$addr = $psDecCtrl; + $frame$addr = $frame; + $length$addr = $length; + $0 = $psDec$addr; + $sCNG = ((($0)) + 2772|0); + $psCNG = $sCNG; + $1 = $psDec$addr; + $fs_kHz = ((($1)) + 2316|0); + $2 = HEAP32[$fs_kHz>>2]|0; + $3 = $psCNG; + $fs_kHz1 = ((($3)) + 1384|0); + $4 = HEAP32[$fs_kHz1>>2]|0; + $cmp = ($2|0)!=($4|0); + if ($cmp) { + $5 = $psDec$addr; + _silk_CNG_Reset($5); + $6 = $psDec$addr; + $fs_kHz2 = ((($6)) + 2316|0); + $7 = HEAP32[$fs_kHz2>>2]|0; + $8 = $psCNG; + $fs_kHz3 = ((($8)) + 1384|0); + HEAP32[$fs_kHz3>>2] = $7; + } + $9 = $psDec$addr; + $lossCnt = ((($9)) + 4160|0); + $10 = HEAP32[$lossCnt>>2]|0; + $cmp4 = ($10|0)==(0); + L4: do { + if ($cmp4) { + $11 = $psDec$addr; + $prevSignalType = ((($11)) + 4164|0); + $12 = HEAP32[$prevSignalType>>2]|0; + $cmp5 = ($12|0)==(0); + if ($cmp5) { + $i = 0; + while(1) { + $13 = $i; + $14 = $psDec$addr; + $LPC_order = ((($14)) + 2340|0); + $15 = HEAP32[$LPC_order>>2]|0; + $cmp7 = ($13|0)<($15|0); + if (!($cmp7)) { + break; + } + $16 = $psDec$addr; + $prevNLSF_Q15 = ((($16)) + 2344|0); + $17 = $i; + $arrayidx = (($prevNLSF_Q15) + ($17<<1)|0); + $18 = HEAP16[$arrayidx>>1]|0; + $conv = $18 << 16 >> 16; + $19 = $psCNG; + $CNG_smth_NLSF_Q15 = ((($19)) + 1280|0); + $20 = $i; + $arrayidx8 = (($CNG_smth_NLSF_Q15) + ($20<<1)|0); + $21 = HEAP16[$arrayidx8>>1]|0; + $conv9 = $21 << 16 >> 16; + $sub = (($conv) - ($conv9))|0; + $shr = $sub >> 16; + $mul = ($shr*16348)|0; + $22 = $psDec$addr; + $prevNLSF_Q1510 = ((($22)) + 2344|0); + $23 = $i; + $arrayidx11 = (($prevNLSF_Q1510) + ($23<<1)|0); + $24 = HEAP16[$arrayidx11>>1]|0; + $conv12 = $24 << 16 >> 16; + $25 = $psCNG; + $CNG_smth_NLSF_Q1513 = ((($25)) + 1280|0); + $26 = $i; + $arrayidx14 = (($CNG_smth_NLSF_Q1513) + ($26<<1)|0); + $27 = HEAP16[$arrayidx14>>1]|0; + $conv15 = $27 << 16 >> 16; + $sub16 = (($conv12) - ($conv15))|0; + $and = $sub16 & 65535; + $mul17 = ($and*16348)|0; + $shr18 = $mul17 >> 16; + $add = (($mul) + ($shr18))|0; + $28 = $psCNG; + $CNG_smth_NLSF_Q1519 = ((($28)) + 1280|0); + $29 = $i; + $arrayidx20 = (($CNG_smth_NLSF_Q1519) + ($29<<1)|0); + $30 = HEAP16[$arrayidx20>>1]|0; + $conv21 = $30 << 16 >> 16; + $add22 = (($conv21) + ($add))|0; + $conv23 = $add22&65535; + HEAP16[$arrayidx20>>1] = $conv23; + $31 = $i; + $inc = (($31) + 1)|0; + $i = $inc; + } + $max_Gain_Q16 = 0; + $subfr = 0; + $i = 0; + while(1) { + $32 = $i; + $33 = $psDec$addr; + $nb_subfr = ((($33)) + 2324|0); + $34 = HEAP32[$nb_subfr>>2]|0; + $cmp25 = ($32|0)<($34|0); + if (!($cmp25)) { + break; + } + $35 = $psDecCtrl$addr; + $Gains_Q16 = ((($35)) + 16|0); + $36 = $i; + $arrayidx28 = (($Gains_Q16) + ($36<<2)|0); + $37 = HEAP32[$arrayidx28>>2]|0; + $38 = $max_Gain_Q16; + $cmp29 = ($37|0)>($38|0); + if ($cmp29) { + $39 = $psDecCtrl$addr; + $Gains_Q1632 = ((($39)) + 16|0); + $40 = $i; + $arrayidx33 = (($Gains_Q1632) + ($40<<2)|0); + $41 = HEAP32[$arrayidx33>>2]|0; + $max_Gain_Q16 = $41; + $42 = $i; + $subfr = $42; + } + $43 = $i; + $inc36 = (($43) + 1)|0; + $i = $inc36; + } + $44 = $psCNG; + $45 = $psDec$addr; + $subfr_length = ((($45)) + 2332|0); + $46 = HEAP32[$subfr_length>>2]|0; + $arrayidx38 = (($44) + ($46<<2)|0); + $47 = $psCNG; + $48 = $psDec$addr; + $nb_subfr40 = ((($48)) + 2324|0); + $49 = HEAP32[$nb_subfr40>>2]|0; + $sub41 = (($49) - 1)|0; + $50 = $psDec$addr; + $subfr_length42 = ((($50)) + 2332|0); + $51 = HEAP32[$subfr_length42>>2]|0; + $mul43 = Math_imul($sub41, $51)|0; + $mul44 = $mul43<<2; + _memmove(($arrayidx38|0),($47|0),($mul44|0))|0; + $52 = $psCNG; + $53 = $psDec$addr; + $exc_Q14 = ((($53)) + 4|0); + $54 = $subfr; + $55 = $psDec$addr; + $subfr_length47 = ((($55)) + 2332|0); + $56 = HEAP32[$subfr_length47>>2]|0; + $mul48 = Math_imul($54, $56)|0; + $arrayidx49 = (($exc_Q14) + ($mul48<<2)|0); + $57 = $psDec$addr; + $subfr_length50 = ((($57)) + 2332|0); + $58 = HEAP32[$subfr_length50>>2]|0; + $mul51 = $58<<2; + _memcpy(($52|0),($arrayidx49|0),($mul51|0))|0; + $i = 0; + while(1) { + $59 = $i; + $60 = $psDec$addr; + $nb_subfr53 = ((($60)) + 2324|0); + $61 = HEAP32[$nb_subfr53>>2]|0; + $cmp54 = ($59|0)<($61|0); + if (!($cmp54)) { + break L4; + } + $62 = $psDecCtrl$addr; + $Gains_Q1657 = ((($62)) + 16|0); + $63 = $i; + $arrayidx58 = (($Gains_Q1657) + ($63<<2)|0); + $64 = HEAP32[$arrayidx58>>2]|0; + $65 = $psCNG; + $CNG_smth_Gain_Q16 = ((($65)) + 1376|0); + $66 = HEAP32[$CNG_smth_Gain_Q16>>2]|0; + $sub59 = (($64) - ($66))|0; + $shr60 = $sub59 >> 16; + $mul61 = ($shr60*4634)|0; + $67 = $psDecCtrl$addr; + $Gains_Q1662 = ((($67)) + 16|0); + $68 = $i; + $arrayidx63 = (($Gains_Q1662) + ($68<<2)|0); + $69 = HEAP32[$arrayidx63>>2]|0; + $70 = $psCNG; + $CNG_smth_Gain_Q1664 = ((($70)) + 1376|0); + $71 = HEAP32[$CNG_smth_Gain_Q1664>>2]|0; + $sub65 = (($69) - ($71))|0; + $and66 = $sub65 & 65535; + $mul67 = ($and66*4634)|0; + $shr68 = $mul67 >> 16; + $add69 = (($mul61) + ($shr68))|0; + $72 = $psCNG; + $CNG_smth_Gain_Q1670 = ((($72)) + 1376|0); + $73 = HEAP32[$CNG_smth_Gain_Q1670>>2]|0; + $add71 = (($73) + ($add69))|0; + HEAP32[$CNG_smth_Gain_Q1670>>2] = $add71; + $74 = $i; + $inc73 = (($74) + 1)|0; + $i = $inc73; + } + } + } + } while(0); + $75 = $psDec$addr; + $lossCnt76 = ((($75)) + 4160|0); + $76 = HEAP32[$lossCnt76>>2]|0; + $tobool = ($76|0)!=(0); + if (!($tobool)) { + $273 = $psCNG; + $CNG_synth_state503 = ((($273)) + 1312|0); + $274 = $psDec$addr; + $LPC_order505 = ((($274)) + 2340|0); + $275 = HEAP32[$LPC_order505>>2]|0; + $mul506 = $275<<2; + _memset(($CNG_synth_state503|0),0,($mul506|0))|0; + STACKTOP = sp;return; + } + $77 = $length$addr; + $add78 = (($77) + 16)|0; + $78 = (_llvm_stacksave()|0); + $saved_stack = $78; + $vla$alloca_mul = $add78<<2; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $79 = $psDec$addr; + $sPLC = ((($79)) + 4168|0); + $randScale_Q14 = ((($sPLC)) + 56|0); + $80 = HEAP16[$randScale_Q14>>1]|0; + $conv79 = $80 << 16 >> 16; + $shr80 = $conv79 >> 16; + $81 = $psDec$addr; + $sPLC81 = ((($81)) + 4168|0); + $prevGain_Q16 = ((($sPLC81)) + 72|0); + $arrayidx82 = ((($prevGain_Q16)) + 4|0); + $82 = HEAP32[$arrayidx82>>2]|0; + $conv83 = $82&65535; + $conv84 = $conv83 << 16 >> 16; + $mul85 = Math_imul($shr80, $conv84)|0; + $83 = $psDec$addr; + $sPLC86 = ((($83)) + 4168|0); + $randScale_Q1487 = ((($sPLC86)) + 56|0); + $84 = HEAP16[$randScale_Q1487>>1]|0; + $conv88 = $84 << 16 >> 16; + $and89 = $conv88 & 65535; + $85 = $psDec$addr; + $sPLC90 = ((($85)) + 4168|0); + $prevGain_Q1691 = ((($sPLC90)) + 72|0); + $arrayidx92 = ((($prevGain_Q1691)) + 4|0); + $86 = HEAP32[$arrayidx92>>2]|0; + $conv93 = $86&65535; + $conv94 = $conv93 << 16 >> 16; + $mul95 = Math_imul($and89, $conv94)|0; + $shr96 = $mul95 >> 16; + $add97 = (($mul85) + ($shr96))|0; + $87 = $psDec$addr; + $sPLC98 = ((($87)) + 4168|0); + $randScale_Q1499 = ((($sPLC98)) + 56|0); + $88 = HEAP16[$randScale_Q1499>>1]|0; + $conv100 = $88 << 16 >> 16; + $89 = $psDec$addr; + $sPLC101 = ((($89)) + 4168|0); + $prevGain_Q16102 = ((($sPLC101)) + 72|0); + $arrayidx103 = ((($prevGain_Q16102)) + 4|0); + $90 = HEAP32[$arrayidx103>>2]|0; + $shr104 = $90 >> 15; + $add105 = (($shr104) + 1)|0; + $shr106 = $add105 >> 1; + $mul107 = Math_imul($conv100, $shr106)|0; + $add108 = (($add97) + ($mul107))|0; + $gain_Q16 = $add108; + $91 = $gain_Q16; + $cmp109 = ($91|0)>=(2097152); + if ($cmp109) { + label = 19; + } else { + $92 = $psCNG; + $CNG_smth_Gain_Q16111 = ((($92)) + 1376|0); + $93 = HEAP32[$CNG_smth_Gain_Q16111>>2]|0; + $cmp112 = ($93|0)>(8388608); + if ($cmp112) { + label = 19; + } else { + $102 = $gain_Q16; + $shr125 = $102 >> 16; + $103 = $gain_Q16; + $conv126 = $103&65535; + $conv127 = $conv126 << 16 >> 16; + $mul128 = Math_imul($shr125, $conv127)|0; + $104 = $gain_Q16; + $and129 = $104 & 65535; + $105 = $gain_Q16; + $conv130 = $105&65535; + $conv131 = $conv130 << 16 >> 16; + $mul132 = Math_imul($and129, $conv131)|0; + $shr133 = $mul132 >> 16; + $add134 = (($mul128) + ($shr133))|0; + $106 = $gain_Q16; + $107 = $gain_Q16; + $shr135 = $107 >> 15; + $add136 = (($shr135) + 1)|0; + $shr137 = $add136 >> 1; + $mul138 = Math_imul($106, $shr137)|0; + $add139 = (($add134) + ($mul138))|0; + $gain_Q16 = $add139; + $108 = $psCNG; + $CNG_smth_Gain_Q16140 = ((($108)) + 1376|0); + $109 = HEAP32[$CNG_smth_Gain_Q16140>>2]|0; + $shr141 = $109 >> 16; + $110 = $psCNG; + $CNG_smth_Gain_Q16142 = ((($110)) + 1376|0); + $111 = HEAP32[$CNG_smth_Gain_Q16142>>2]|0; + $conv143 = $111&65535; + $conv144 = $conv143 << 16 >> 16; + $mul145 = Math_imul($shr141, $conv144)|0; + $112 = $psCNG; + $CNG_smth_Gain_Q16146 = ((($112)) + 1376|0); + $113 = HEAP32[$CNG_smth_Gain_Q16146>>2]|0; + $and147 = $113 & 65535; + $114 = $psCNG; + $CNG_smth_Gain_Q16148 = ((($114)) + 1376|0); + $115 = HEAP32[$CNG_smth_Gain_Q16148>>2]|0; + $conv149 = $115&65535; + $conv150 = $conv149 << 16 >> 16; + $mul151 = Math_imul($and147, $conv150)|0; + $shr152 = $mul151 >> 16; + $add153 = (($mul145) + ($shr152))|0; + $116 = $psCNG; + $CNG_smth_Gain_Q16154 = ((($116)) + 1376|0); + $117 = HEAP32[$CNG_smth_Gain_Q16154>>2]|0; + $118 = $psCNG; + $CNG_smth_Gain_Q16155 = ((($118)) + 1376|0); + $119 = HEAP32[$CNG_smth_Gain_Q16155>>2]|0; + $shr156 = $119 >> 15; + $add157 = (($shr156) + 1)|0; + $shr158 = $add157 >> 1; + $mul159 = Math_imul($117, $shr158)|0; + $add160 = (($add153) + ($mul159))|0; + $120 = $gain_Q16; + $shl161 = $120 << 5; + $sub162 = (($add160) - ($shl161))|0; + $gain_Q16 = $sub162; + $121 = $gain_Q16; + $call163 = (_silk_SQRT_APPROX_535($121)|0); + $shl164 = $call163 << 8; + $gain_Q16 = $shl164; + } + } + if ((label|0) == 19) { + $94 = $gain_Q16; + $shr115 = $94 >> 16; + $95 = $gain_Q16; + $shr116 = $95 >> 16; + $mul117 = Math_imul($shr115, $shr116)|0; + $gain_Q16 = $mul117; + $96 = $psCNG; + $CNG_smth_Gain_Q16118 = ((($96)) + 1376|0); + $97 = HEAP32[$CNG_smth_Gain_Q16118>>2]|0; + $shr119 = $97 >> 16; + $98 = $psCNG; + $CNG_smth_Gain_Q16120 = ((($98)) + 1376|0); + $99 = HEAP32[$CNG_smth_Gain_Q16120>>2]|0; + $shr121 = $99 >> 16; + $mul122 = Math_imul($shr119, $shr121)|0; + $100 = $gain_Q16; + $shl = $100 << 5; + $sub123 = (($mul122) - ($shl))|0; + $gain_Q16 = $sub123; + $101 = $gain_Q16; + $call = (_silk_SQRT_APPROX_535($101)|0); + $shl124 = $call << 16; + $gain_Q16 = $shl124; + } + $add$ptr = ((($vla)) + 64|0); + $122 = $psCNG; + $123 = $gain_Q16; + $124 = $length$addr; + $125 = $psCNG; + $rand_seed = ((($125)) + 1380|0); + _silk_CNG_exc($add$ptr,$122,$123,$124,$rand_seed); + $126 = $psCNG; + $CNG_smth_NLSF_Q15169 = ((($126)) + 1280|0); + $127 = $psDec$addr; + $LPC_order171 = ((($127)) + 2340|0); + $128 = HEAP32[$LPC_order171>>2]|0; + _silk_NLSF2A($A_Q12,$CNG_smth_NLSF_Q15169,$128); + $129 = $psCNG; + $CNG_synth_state = ((($129)) + 1312|0); + dest=$vla; src=$CNG_synth_state; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $i = 0; + while(1) { + $130 = $i; + $131 = $length$addr; + $cmp174 = ($130|0)<($131|0); + if (!($cmp174)) { + break; + } + $132 = $psDec$addr; + $LPC_order177 = ((($132)) + 2340|0); + $133 = HEAP32[$LPC_order177>>2]|0; + $shr178 = $133 >> 1; + $sum_Q6 = $shr178; + $134 = $sum_Q6; + $135 = $i; + $add179 = (16 + ($135))|0; + $sub180 = (($add179) - 1)|0; + $arrayidx181 = (($vla) + ($sub180<<2)|0); + $136 = HEAP32[$arrayidx181>>2]|0; + $shr182 = $136 >> 16; + $137 = HEAP16[$A_Q12>>1]|0; + $conv184 = $137 << 16 >> 16; + $mul185 = Math_imul($shr182, $conv184)|0; + $138 = $i; + $add186 = (16 + ($138))|0; + $sub187 = (($add186) - 1)|0; + $arrayidx188 = (($vla) + ($sub187<<2)|0); + $139 = HEAP32[$arrayidx188>>2]|0; + $and189 = $139 & 65535; + $140 = HEAP16[$A_Q12>>1]|0; + $conv191 = $140 << 16 >> 16; + $mul192 = Math_imul($and189, $conv191)|0; + $shr193 = $mul192 >> 16; + $add194 = (($mul185) + ($shr193))|0; + $add195 = (($134) + ($add194))|0; + $sum_Q6 = $add195; + $141 = $sum_Q6; + $142 = $i; + $add196 = (16 + ($142))|0; + $sub197 = (($add196) - 2)|0; + $arrayidx198 = (($vla) + ($sub197<<2)|0); + $143 = HEAP32[$arrayidx198>>2]|0; + $shr199 = $143 >> 16; + $arrayidx200 = ((($A_Q12)) + 2|0); + $144 = HEAP16[$arrayidx200>>1]|0; + $conv201 = $144 << 16 >> 16; + $mul202 = Math_imul($shr199, $conv201)|0; + $145 = $i; + $add203 = (16 + ($145))|0; + $sub204 = (($add203) - 2)|0; + $arrayidx205 = (($vla) + ($sub204<<2)|0); + $146 = HEAP32[$arrayidx205>>2]|0; + $and206 = $146 & 65535; + $arrayidx207 = ((($A_Q12)) + 2|0); + $147 = HEAP16[$arrayidx207>>1]|0; + $conv208 = $147 << 16 >> 16; + $mul209 = Math_imul($and206, $conv208)|0; + $shr210 = $mul209 >> 16; + $add211 = (($mul202) + ($shr210))|0; + $add212 = (($141) + ($add211))|0; + $sum_Q6 = $add212; + $148 = $sum_Q6; + $149 = $i; + $add213 = (16 + ($149))|0; + $sub214 = (($add213) - 3)|0; + $arrayidx215 = (($vla) + ($sub214<<2)|0); + $150 = HEAP32[$arrayidx215>>2]|0; + $shr216 = $150 >> 16; + $arrayidx217 = ((($A_Q12)) + 4|0); + $151 = HEAP16[$arrayidx217>>1]|0; + $conv218 = $151 << 16 >> 16; + $mul219 = Math_imul($shr216, $conv218)|0; + $152 = $i; + $add220 = (16 + ($152))|0; + $sub221 = (($add220) - 3)|0; + $arrayidx222 = (($vla) + ($sub221<<2)|0); + $153 = HEAP32[$arrayidx222>>2]|0; + $and223 = $153 & 65535; + $arrayidx224 = ((($A_Q12)) + 4|0); + $154 = HEAP16[$arrayidx224>>1]|0; + $conv225 = $154 << 16 >> 16; + $mul226 = Math_imul($and223, $conv225)|0; + $shr227 = $mul226 >> 16; + $add228 = (($mul219) + ($shr227))|0; + $add229 = (($148) + ($add228))|0; + $sum_Q6 = $add229; + $155 = $sum_Q6; + $156 = $i; + $add230 = (16 + ($156))|0; + $sub231 = (($add230) - 4)|0; + $arrayidx232 = (($vla) + ($sub231<<2)|0); + $157 = HEAP32[$arrayidx232>>2]|0; + $shr233 = $157 >> 16; + $arrayidx234 = ((($A_Q12)) + 6|0); + $158 = HEAP16[$arrayidx234>>1]|0; + $conv235 = $158 << 16 >> 16; + $mul236 = Math_imul($shr233, $conv235)|0; + $159 = $i; + $add237 = (16 + ($159))|0; + $sub238 = (($add237) - 4)|0; + $arrayidx239 = (($vla) + ($sub238<<2)|0); + $160 = HEAP32[$arrayidx239>>2]|0; + $and240 = $160 & 65535; + $arrayidx241 = ((($A_Q12)) + 6|0); + $161 = HEAP16[$arrayidx241>>1]|0; + $conv242 = $161 << 16 >> 16; + $mul243 = Math_imul($and240, $conv242)|0; + $shr244 = $mul243 >> 16; + $add245 = (($mul236) + ($shr244))|0; + $add246 = (($155) + ($add245))|0; + $sum_Q6 = $add246; + $162 = $sum_Q6; + $163 = $i; + $add247 = (16 + ($163))|0; + $sub248 = (($add247) - 5)|0; + $arrayidx249 = (($vla) + ($sub248<<2)|0); + $164 = HEAP32[$arrayidx249>>2]|0; + $shr250 = $164 >> 16; + $arrayidx251 = ((($A_Q12)) + 8|0); + $165 = HEAP16[$arrayidx251>>1]|0; + $conv252 = $165 << 16 >> 16; + $mul253 = Math_imul($shr250, $conv252)|0; + $166 = $i; + $add254 = (16 + ($166))|0; + $sub255 = (($add254) - 5)|0; + $arrayidx256 = (($vla) + ($sub255<<2)|0); + $167 = HEAP32[$arrayidx256>>2]|0; + $and257 = $167 & 65535; + $arrayidx258 = ((($A_Q12)) + 8|0); + $168 = HEAP16[$arrayidx258>>1]|0; + $conv259 = $168 << 16 >> 16; + $mul260 = Math_imul($and257, $conv259)|0; + $shr261 = $mul260 >> 16; + $add262 = (($mul253) + ($shr261))|0; + $add263 = (($162) + ($add262))|0; + $sum_Q6 = $add263; + $169 = $sum_Q6; + $170 = $i; + $add264 = (16 + ($170))|0; + $sub265 = (($add264) - 6)|0; + $arrayidx266 = (($vla) + ($sub265<<2)|0); + $171 = HEAP32[$arrayidx266>>2]|0; + $shr267 = $171 >> 16; + $arrayidx268 = ((($A_Q12)) + 10|0); + $172 = HEAP16[$arrayidx268>>1]|0; + $conv269 = $172 << 16 >> 16; + $mul270 = Math_imul($shr267, $conv269)|0; + $173 = $i; + $add271 = (16 + ($173))|0; + $sub272 = (($add271) - 6)|0; + $arrayidx273 = (($vla) + ($sub272<<2)|0); + $174 = HEAP32[$arrayidx273>>2]|0; + $and274 = $174 & 65535; + $arrayidx275 = ((($A_Q12)) + 10|0); + $175 = HEAP16[$arrayidx275>>1]|0; + $conv276 = $175 << 16 >> 16; + $mul277 = Math_imul($and274, $conv276)|0; + $shr278 = $mul277 >> 16; + $add279 = (($mul270) + ($shr278))|0; + $add280 = (($169) + ($add279))|0; + $sum_Q6 = $add280; + $176 = $sum_Q6; + $177 = $i; + $add281 = (16 + ($177))|0; + $sub282 = (($add281) - 7)|0; + $arrayidx283 = (($vla) + ($sub282<<2)|0); + $178 = HEAP32[$arrayidx283>>2]|0; + $shr284 = $178 >> 16; + $arrayidx285 = ((($A_Q12)) + 12|0); + $179 = HEAP16[$arrayidx285>>1]|0; + $conv286 = $179 << 16 >> 16; + $mul287 = Math_imul($shr284, $conv286)|0; + $180 = $i; + $add288 = (16 + ($180))|0; + $sub289 = (($add288) - 7)|0; + $arrayidx290 = (($vla) + ($sub289<<2)|0); + $181 = HEAP32[$arrayidx290>>2]|0; + $and291 = $181 & 65535; + $arrayidx292 = ((($A_Q12)) + 12|0); + $182 = HEAP16[$arrayidx292>>1]|0; + $conv293 = $182 << 16 >> 16; + $mul294 = Math_imul($and291, $conv293)|0; + $shr295 = $mul294 >> 16; + $add296 = (($mul287) + ($shr295))|0; + $add297 = (($176) + ($add296))|0; + $sum_Q6 = $add297; + $183 = $sum_Q6; + $184 = $i; + $add298 = (16 + ($184))|0; + $sub299 = (($add298) - 8)|0; + $arrayidx300 = (($vla) + ($sub299<<2)|0); + $185 = HEAP32[$arrayidx300>>2]|0; + $shr301 = $185 >> 16; + $arrayidx302 = ((($A_Q12)) + 14|0); + $186 = HEAP16[$arrayidx302>>1]|0; + $conv303 = $186 << 16 >> 16; + $mul304 = Math_imul($shr301, $conv303)|0; + $187 = $i; + $add305 = (16 + ($187))|0; + $sub306 = (($add305) - 8)|0; + $arrayidx307 = (($vla) + ($sub306<<2)|0); + $188 = HEAP32[$arrayidx307>>2]|0; + $and308 = $188 & 65535; + $arrayidx309 = ((($A_Q12)) + 14|0); + $189 = HEAP16[$arrayidx309>>1]|0; + $conv310 = $189 << 16 >> 16; + $mul311 = Math_imul($and308, $conv310)|0; + $shr312 = $mul311 >> 16; + $add313 = (($mul304) + ($shr312))|0; + $add314 = (($183) + ($add313))|0; + $sum_Q6 = $add314; + $190 = $sum_Q6; + $191 = $i; + $add315 = (16 + ($191))|0; + $sub316 = (($add315) - 9)|0; + $arrayidx317 = (($vla) + ($sub316<<2)|0); + $192 = HEAP32[$arrayidx317>>2]|0; + $shr318 = $192 >> 16; + $arrayidx319 = ((($A_Q12)) + 16|0); + $193 = HEAP16[$arrayidx319>>1]|0; + $conv320 = $193 << 16 >> 16; + $mul321 = Math_imul($shr318, $conv320)|0; + $194 = $i; + $add322 = (16 + ($194))|0; + $sub323 = (($add322) - 9)|0; + $arrayidx324 = (($vla) + ($sub323<<2)|0); + $195 = HEAP32[$arrayidx324>>2]|0; + $and325 = $195 & 65535; + $arrayidx326 = ((($A_Q12)) + 16|0); + $196 = HEAP16[$arrayidx326>>1]|0; + $conv327 = $196 << 16 >> 16; + $mul328 = Math_imul($and325, $conv327)|0; + $shr329 = $mul328 >> 16; + $add330 = (($mul321) + ($shr329))|0; + $add331 = (($190) + ($add330))|0; + $sum_Q6 = $add331; + $197 = $sum_Q6; + $198 = $i; + $add332 = (16 + ($198))|0; + $sub333 = (($add332) - 10)|0; + $arrayidx334 = (($vla) + ($sub333<<2)|0); + $199 = HEAP32[$arrayidx334>>2]|0; + $shr335 = $199 >> 16; + $arrayidx336 = ((($A_Q12)) + 18|0); + $200 = HEAP16[$arrayidx336>>1]|0; + $conv337 = $200 << 16 >> 16; + $mul338 = Math_imul($shr335, $conv337)|0; + $201 = $i; + $add339 = (16 + ($201))|0; + $sub340 = (($add339) - 10)|0; + $arrayidx341 = (($vla) + ($sub340<<2)|0); + $202 = HEAP32[$arrayidx341>>2]|0; + $and342 = $202 & 65535; + $arrayidx343 = ((($A_Q12)) + 18|0); + $203 = HEAP16[$arrayidx343>>1]|0; + $conv344 = $203 << 16 >> 16; + $mul345 = Math_imul($and342, $conv344)|0; + $shr346 = $mul345 >> 16; + $add347 = (($mul338) + ($shr346))|0; + $add348 = (($197) + ($add347))|0; + $sum_Q6 = $add348; + $204 = $psDec$addr; + $LPC_order349 = ((($204)) + 2340|0); + $205 = HEAP32[$LPC_order349>>2]|0; + $cmp350 = ($205|0)==(16); + if ($cmp350) { + $206 = $sum_Q6; + $207 = $i; + $add353 = (16 + ($207))|0; + $sub354 = (($add353) - 11)|0; + $arrayidx355 = (($vla) + ($sub354<<2)|0); + $208 = HEAP32[$arrayidx355>>2]|0; + $shr356 = $208 >> 16; + $arrayidx357 = ((($A_Q12)) + 20|0); + $209 = HEAP16[$arrayidx357>>1]|0; + $conv358 = $209 << 16 >> 16; + $mul359 = Math_imul($shr356, $conv358)|0; + $210 = $i; + $add360 = (16 + ($210))|0; + $sub361 = (($add360) - 11)|0; + $arrayidx362 = (($vla) + ($sub361<<2)|0); + $211 = HEAP32[$arrayidx362>>2]|0; + $and363 = $211 & 65535; + $arrayidx364 = ((($A_Q12)) + 20|0); + $212 = HEAP16[$arrayidx364>>1]|0; + $conv365 = $212 << 16 >> 16; + $mul366 = Math_imul($and363, $conv365)|0; + $shr367 = $mul366 >> 16; + $add368 = (($mul359) + ($shr367))|0; + $add369 = (($206) + ($add368))|0; + $sum_Q6 = $add369; + $213 = $sum_Q6; + $214 = $i; + $add370 = (16 + ($214))|0; + $sub371 = (($add370) - 12)|0; + $arrayidx372 = (($vla) + ($sub371<<2)|0); + $215 = HEAP32[$arrayidx372>>2]|0; + $shr373 = $215 >> 16; + $arrayidx374 = ((($A_Q12)) + 22|0); + $216 = HEAP16[$arrayidx374>>1]|0; + $conv375 = $216 << 16 >> 16; + $mul376 = Math_imul($shr373, $conv375)|0; + $217 = $i; + $add377 = (16 + ($217))|0; + $sub378 = (($add377) - 12)|0; + $arrayidx379 = (($vla) + ($sub378<<2)|0); + $218 = HEAP32[$arrayidx379>>2]|0; + $and380 = $218 & 65535; + $arrayidx381 = ((($A_Q12)) + 22|0); + $219 = HEAP16[$arrayidx381>>1]|0; + $conv382 = $219 << 16 >> 16; + $mul383 = Math_imul($and380, $conv382)|0; + $shr384 = $mul383 >> 16; + $add385 = (($mul376) + ($shr384))|0; + $add386 = (($213) + ($add385))|0; + $sum_Q6 = $add386; + $220 = $sum_Q6; + $221 = $i; + $add387 = (16 + ($221))|0; + $sub388 = (($add387) - 13)|0; + $arrayidx389 = (($vla) + ($sub388<<2)|0); + $222 = HEAP32[$arrayidx389>>2]|0; + $shr390 = $222 >> 16; + $arrayidx391 = ((($A_Q12)) + 24|0); + $223 = HEAP16[$arrayidx391>>1]|0; + $conv392 = $223 << 16 >> 16; + $mul393 = Math_imul($shr390, $conv392)|0; + $224 = $i; + $add394 = (16 + ($224))|0; + $sub395 = (($add394) - 13)|0; + $arrayidx396 = (($vla) + ($sub395<<2)|0); + $225 = HEAP32[$arrayidx396>>2]|0; + $and397 = $225 & 65535; + $arrayidx398 = ((($A_Q12)) + 24|0); + $226 = HEAP16[$arrayidx398>>1]|0; + $conv399 = $226 << 16 >> 16; + $mul400 = Math_imul($and397, $conv399)|0; + $shr401 = $mul400 >> 16; + $add402 = (($mul393) + ($shr401))|0; + $add403 = (($220) + ($add402))|0; + $sum_Q6 = $add403; + $227 = $sum_Q6; + $228 = $i; + $add404 = (16 + ($228))|0; + $sub405 = (($add404) - 14)|0; + $arrayidx406 = (($vla) + ($sub405<<2)|0); + $229 = HEAP32[$arrayidx406>>2]|0; + $shr407 = $229 >> 16; + $arrayidx408 = ((($A_Q12)) + 26|0); + $230 = HEAP16[$arrayidx408>>1]|0; + $conv409 = $230 << 16 >> 16; + $mul410 = Math_imul($shr407, $conv409)|0; + $231 = $i; + $add411 = (16 + ($231))|0; + $sub412 = (($add411) - 14)|0; + $arrayidx413 = (($vla) + ($sub412<<2)|0); + $232 = HEAP32[$arrayidx413>>2]|0; + $and414 = $232 & 65535; + $arrayidx415 = ((($A_Q12)) + 26|0); + $233 = HEAP16[$arrayidx415>>1]|0; + $conv416 = $233 << 16 >> 16; + $mul417 = Math_imul($and414, $conv416)|0; + $shr418 = $mul417 >> 16; + $add419 = (($mul410) + ($shr418))|0; + $add420 = (($227) + ($add419))|0; + $sum_Q6 = $add420; + $234 = $sum_Q6; + $235 = $i; + $add421 = (16 + ($235))|0; + $sub422 = (($add421) - 15)|0; + $arrayidx423 = (($vla) + ($sub422<<2)|0); + $236 = HEAP32[$arrayidx423>>2]|0; + $shr424 = $236 >> 16; + $arrayidx425 = ((($A_Q12)) + 28|0); + $237 = HEAP16[$arrayidx425>>1]|0; + $conv426 = $237 << 16 >> 16; + $mul427 = Math_imul($shr424, $conv426)|0; + $238 = $i; + $add428 = (16 + ($238))|0; + $sub429 = (($add428) - 15)|0; + $arrayidx430 = (($vla) + ($sub429<<2)|0); + $239 = HEAP32[$arrayidx430>>2]|0; + $and431 = $239 & 65535; + $arrayidx432 = ((($A_Q12)) + 28|0); + $240 = HEAP16[$arrayidx432>>1]|0; + $conv433 = $240 << 16 >> 16; + $mul434 = Math_imul($and431, $conv433)|0; + $shr435 = $mul434 >> 16; + $add436 = (($mul427) + ($shr435))|0; + $add437 = (($234) + ($add436))|0; + $sum_Q6 = $add437; + $241 = $sum_Q6; + $242 = $i; + $add438 = (16 + ($242))|0; + $sub439 = (($add438) - 16)|0; + $arrayidx440 = (($vla) + ($sub439<<2)|0); + $243 = HEAP32[$arrayidx440>>2]|0; + $shr441 = $243 >> 16; + $arrayidx442 = ((($A_Q12)) + 30|0); + $244 = HEAP16[$arrayidx442>>1]|0; + $conv443 = $244 << 16 >> 16; + $mul444 = Math_imul($shr441, $conv443)|0; + $245 = $i; + $add445 = (16 + ($245))|0; + $sub446 = (($add445) - 16)|0; + $arrayidx447 = (($vla) + ($sub446<<2)|0); + $246 = HEAP32[$arrayidx447>>2]|0; + $and448 = $246 & 65535; + $arrayidx449 = ((($A_Q12)) + 30|0); + $247 = HEAP16[$arrayidx449>>1]|0; + $conv450 = $247 << 16 >> 16; + $mul451 = Math_imul($and448, $conv450)|0; + $shr452 = $mul451 >> 16; + $add453 = (($mul444) + ($shr452))|0; + $add454 = (($241) + ($add453))|0; + $sum_Q6 = $add454; + } + $248 = $i; + $add456 = (16 + ($248))|0; + $arrayidx457 = (($vla) + ($add456<<2)|0); + $249 = HEAP32[$arrayidx457>>2]|0; + $250 = $sum_Q6; + $shl458 = $250 << 4; + $add459 = (($249) + ($shl458))|0; + $251 = $i; + $add460 = (16 + ($251))|0; + $arrayidx461 = (($vla) + ($add460<<2)|0); + HEAP32[$arrayidx461>>2] = $add459; + $252 = $frame$addr; + $253 = $i; + $arrayidx462 = (($252) + ($253<<1)|0); + $254 = HEAP16[$arrayidx462>>1]|0; + $conv463 = $254 << 16 >> 16; + $255 = $i; + $add464 = (16 + ($255))|0; + $arrayidx465 = (($vla) + ($add464<<2)|0); + $256 = HEAP32[$arrayidx465>>2]|0; + $shr466 = $256 >> 9; + $add467 = (($shr466) + 1)|0; + $shr468 = $add467 >> 1; + $add469 = (($conv463) + ($shr468))|0; + $cmp470 = ($add469|0)>(32767); + if ($cmp470) { + $cond493 = 32767; + } else { + $257 = $frame$addr; + $258 = $i; + $arrayidx472 = (($257) + ($258<<1)|0); + $259 = HEAP16[$arrayidx472>>1]|0; + $conv473 = $259 << 16 >> 16; + $260 = $i; + $add474 = (16 + ($260))|0; + $arrayidx475 = (($vla) + ($add474<<2)|0); + $261 = HEAP32[$arrayidx475>>2]|0; + $shr476 = $261 >> 9; + $add477 = (($shr476) + 1)|0; + $shr478 = $add477 >> 1; + $add479 = (($conv473) + ($shr478))|0; + $cmp480 = ($add479|0)<(-32768); + if ($cmp480) { + $cond493 = -32768; + } else { + $262 = $frame$addr; + $263 = $i; + $arrayidx484 = (($262) + ($263<<1)|0); + $264 = HEAP16[$arrayidx484>>1]|0; + $conv485 = $264 << 16 >> 16; + $265 = $i; + $add486 = (16 + ($265))|0; + $arrayidx487 = (($vla) + ($add486<<2)|0); + $266 = HEAP32[$arrayidx487>>2]|0; + $shr488 = $266 >> 9; + $add489 = (($shr488) + 1)|0; + $shr490 = $add489 >> 1; + $add491 = (($conv485) + ($shr490))|0; + $cond493 = $add491; + } + } + $conv494 = $cond493&65535; + $267 = $frame$addr; + $268 = $i; + $arrayidx495 = (($267) + ($268<<1)|0); + HEAP16[$arrayidx495>>1] = $conv494; + $269 = $i; + $inc497 = (($269) + 1)|0; + $i = $inc497; + } + $270 = $psCNG; + $CNG_synth_state499 = ((($270)) + 1312|0); + $271 = $length$addr; + $arrayidx501 = (($vla) + ($271<<2)|0); + dest=$CNG_synth_state499; src=$arrayidx501; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $272 = $saved_stack; + _llvm_stackrestore(($272|0)); + STACKTOP = sp;return; +} +function _silk_SQRT_APPROX_535($x) { + $x = $x|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add17 = 0, $and = 0, $and9 = 0, $cmp = 0, $conv = 0, $conv10 = 0, $conv11 = 0; + var $conv13 = 0, $conv14 = 0, $conv5 = 0, $conv6 = 0, $conv7 = 0, $frac_Q7 = 0, $lz = 0, $mul = 0, $mul12 = 0, $mul15 = 0, $mul8 = 0, $retval = 0, $shr = 0, $shr16 = 0, $shr3 = 0, $shr4 = 0, $tobool = 0, $x$addr = 0, $y = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $lz = sp + 4|0; + $frac_Q7 = sp; + $x$addr = $x; + $0 = $x$addr; + $cmp = ($0|0)<=(0); + if ($cmp) { + $retval = 0; + $11 = $retval; + STACKTOP = sp;return ($11|0); + } + $1 = $x$addr; + _silk_CLZ_FRAC_536($1,$lz,$frac_Q7); + $2 = HEAP32[$lz>>2]|0; + $and = $2 & 1; + $tobool = ($and|0)!=(0); + if ($tobool) { + $y = 32768; + } else { + $y = 46214; + } + $3 = HEAP32[$lz>>2]|0; + $shr = $3 >> 1; + $4 = $y; + $shr3 = $4 >> $shr; + $y = $shr3; + $5 = $y; + $6 = $y; + $shr4 = $6 >> 16; + $7 = HEAP32[$frac_Q7>>2]|0; + $conv = $7&65535; + $conv5 = $conv << 16 >> 16; + $mul = ($conv5*213)|0; + $conv6 = $mul&65535; + $conv7 = $conv6 << 16 >> 16; + $mul8 = Math_imul($shr4, $conv7)|0; + $8 = $y; + $and9 = $8 & 65535; + $9 = HEAP32[$frac_Q7>>2]|0; + $conv10 = $9&65535; + $conv11 = $conv10 << 16 >> 16; + $mul12 = ($conv11*213)|0; + $conv13 = $mul12&65535; + $conv14 = $conv13 << 16 >> 16; + $mul15 = Math_imul($and9, $conv14)|0; + $shr16 = $mul15 >> 16; + $add = (($mul8) + ($shr16))|0; + $add17 = (($5) + ($add))|0; + $y = $add17; + $10 = $y; + $retval = $10; + $11 = $retval; + STACKTOP = sp;return ($11|0); +} +function _silk_CNG_exc($exc_Q10,$exc_buf_Q14,$Gain_Q16,$length,$rand_seed) { + $exc_Q10 = $exc_Q10|0; + $exc_buf_Q14 = $exc_buf_Q14|0; + $Gain_Q16 = $Gain_Q16|0; + $length = $length|0; + $rand_seed = $rand_seed|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $Gain_Q16$addr = 0, $add = 0, $add14 = 0, $add18 = 0, $add21 = 0, $add37 = 0, $add41 = 0, $add44 = 0, $add62 = 0, $add66 = 0; + var $add69 = 0, $and = 0, $and31 = 0, $and56 = 0, $and8 = 0, $arrayidx = 0, $arrayidx15 = 0, $arrayidx24 = 0, $arrayidx30 = 0, $arrayidx38 = 0, $arrayidx49 = 0, $arrayidx55 = 0, $arrayidx63 = 0, $arrayidx7 = 0, $arrayidx74 = 0, $cmp = 0, $cmp1 = 0, $cmp22 = 0, $cmp45 = 0, $cond71 = 0; + var $conv = 0, $conv10 = 0, $conv11 = 0, $conv27 = 0, $conv28 = 0, $conv33 = 0, $conv34 = 0, $conv5 = 0, $conv52 = 0, $conv53 = 0, $conv58 = 0, $conv59 = 0, $conv72 = 0, $conv73 = 0, $exc_Q10$addr = 0, $exc_buf_Q14$addr = 0, $exc_mask = 0, $i = 0, $idx = 0, $inc = 0; + var $length$addr = 0, $mul = 0, $mul12 = 0, $mul20 = 0, $mul29 = 0, $mul35 = 0, $mul43 = 0, $mul54 = 0, $mul6 = 0, $mul60 = 0, $mul68 = 0, $rand_seed$addr = 0, $seed = 0, $shr = 0, $shr13 = 0, $shr16 = 0, $shr17 = 0, $shr19 = 0, $shr2 = 0, $shr25 = 0; + var $shr26 = 0, $shr3 = 0, $shr32 = 0, $shr36 = 0, $shr39 = 0, $shr4 = 0, $shr40 = 0, $shr42 = 0, $shr50 = 0, $shr51 = 0, $shr57 = 0, $shr61 = 0, $shr64 = 0, $shr65 = 0, $shr67 = 0, $shr9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $exc_Q10$addr = $exc_Q10; + $exc_buf_Q14$addr = $exc_buf_Q14; + $Gain_Q16$addr = $Gain_Q16; + $length$addr = $length; + $rand_seed$addr = $rand_seed; + $exc_mask = 255; + while(1) { + $0 = $exc_mask; + $1 = $length$addr; + $cmp = ($0|0)>($1|0); + if (!($cmp)) { + break; + } + $2 = $exc_mask; + $shr = $2 >> 1; + $exc_mask = $shr; + } + $3 = $rand_seed$addr; + $4 = HEAP32[$3>>2]|0; + $seed = $4; + $i = 0; + while(1) { + $5 = $i; + $6 = $length$addr; + $cmp1 = ($5|0)<($6|0); + $7 = $seed; + if (!($cmp1)) { + break; + } + $mul = Math_imul($7, 196314165)|0; + $add = (907633515 + ($mul))|0; + $seed = $add; + $8 = $seed; + $shr2 = $8 >> 24; + $9 = $exc_mask; + $and = $shr2 & $9; + $idx = $and; + $10 = $exc_buf_Q14$addr; + $11 = $idx; + $arrayidx = (($10) + ($11<<2)|0); + $12 = HEAP32[$arrayidx>>2]|0; + $shr3 = $12 >> 16; + $13 = $Gain_Q16$addr; + $shr4 = $13 >> 4; + $conv = $shr4&65535; + $conv5 = $conv << 16 >> 16; + $mul6 = Math_imul($shr3, $conv5)|0; + $14 = $exc_buf_Q14$addr; + $15 = $idx; + $arrayidx7 = (($14) + ($15<<2)|0); + $16 = HEAP32[$arrayidx7>>2]|0; + $and8 = $16 & 65535; + $17 = $Gain_Q16$addr; + $shr9 = $17 >> 4; + $conv10 = $shr9&65535; + $conv11 = $conv10 << 16 >> 16; + $mul12 = Math_imul($and8, $conv11)|0; + $shr13 = $mul12 >> 16; + $add14 = (($mul6) + ($shr13))|0; + $18 = $exc_buf_Q14$addr; + $19 = $idx; + $arrayidx15 = (($18) + ($19<<2)|0); + $20 = HEAP32[$arrayidx15>>2]|0; + $21 = $Gain_Q16$addr; + $shr16 = $21 >> 4; + $shr17 = $shr16 >> 15; + $add18 = (($shr17) + 1)|0; + $shr19 = $add18 >> 1; + $mul20 = Math_imul($20, $shr19)|0; + $add21 = (($add14) + ($mul20))|0; + $cmp22 = ($add21|0)>(32767); + if ($cmp22) { + $cond71 = 32767; + } else { + $22 = $exc_buf_Q14$addr; + $23 = $idx; + $arrayidx24 = (($22) + ($23<<2)|0); + $24 = HEAP32[$arrayidx24>>2]|0; + $shr25 = $24 >> 16; + $25 = $Gain_Q16$addr; + $shr26 = $25 >> 4; + $conv27 = $shr26&65535; + $conv28 = $conv27 << 16 >> 16; + $mul29 = Math_imul($shr25, $conv28)|0; + $26 = $exc_buf_Q14$addr; + $27 = $idx; + $arrayidx30 = (($26) + ($27<<2)|0); + $28 = HEAP32[$arrayidx30>>2]|0; + $and31 = $28 & 65535; + $29 = $Gain_Q16$addr; + $shr32 = $29 >> 4; + $conv33 = $shr32&65535; + $conv34 = $conv33 << 16 >> 16; + $mul35 = Math_imul($and31, $conv34)|0; + $shr36 = $mul35 >> 16; + $add37 = (($mul29) + ($shr36))|0; + $30 = $exc_buf_Q14$addr; + $31 = $idx; + $arrayidx38 = (($30) + ($31<<2)|0); + $32 = HEAP32[$arrayidx38>>2]|0; + $33 = $Gain_Q16$addr; + $shr39 = $33 >> 4; + $shr40 = $shr39 >> 15; + $add41 = (($shr40) + 1)|0; + $shr42 = $add41 >> 1; + $mul43 = Math_imul($32, $shr42)|0; + $add44 = (($add37) + ($mul43))|0; + $cmp45 = ($add44|0)<(-32768); + if ($cmp45) { + $cond71 = -32768; + } else { + $34 = $exc_buf_Q14$addr; + $35 = $idx; + $arrayidx49 = (($34) + ($35<<2)|0); + $36 = HEAP32[$arrayidx49>>2]|0; + $shr50 = $36 >> 16; + $37 = $Gain_Q16$addr; + $shr51 = $37 >> 4; + $conv52 = $shr51&65535; + $conv53 = $conv52 << 16 >> 16; + $mul54 = Math_imul($shr50, $conv53)|0; + $38 = $exc_buf_Q14$addr; + $39 = $idx; + $arrayidx55 = (($38) + ($39<<2)|0); + $40 = HEAP32[$arrayidx55>>2]|0; + $and56 = $40 & 65535; + $41 = $Gain_Q16$addr; + $shr57 = $41 >> 4; + $conv58 = $shr57&65535; + $conv59 = $conv58 << 16 >> 16; + $mul60 = Math_imul($and56, $conv59)|0; + $shr61 = $mul60 >> 16; + $add62 = (($mul54) + ($shr61))|0; + $42 = $exc_buf_Q14$addr; + $43 = $idx; + $arrayidx63 = (($42) + ($43<<2)|0); + $44 = HEAP32[$arrayidx63>>2]|0; + $45 = $Gain_Q16$addr; + $shr64 = $45 >> 4; + $shr65 = $shr64 >> 15; + $add66 = (($shr65) + 1)|0; + $shr67 = $add66 >> 1; + $mul68 = Math_imul($44, $shr67)|0; + $add69 = (($add62) + ($mul68))|0; + $cond71 = $add69; + } + } + $conv72 = $cond71&65535; + $conv73 = $conv72 << 16 >> 16; + $46 = $exc_Q10$addr; + $47 = $i; + $arrayidx74 = (($46) + ($47<<2)|0); + HEAP32[$arrayidx74>>2] = $conv73; + $48 = $i; + $inc = (($48) + 1)|0; + $i = $inc; + } + $49 = $rand_seed$addr; + HEAP32[$49>>2] = $7; + STACKTOP = sp;return; +} +function _silk_CLZ_FRAC_536($in,$lz,$frac_Q7) { + $in = $in|0; + $lz = $lz|0; + $frac_Q7 = $frac_Q7|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $and = 0, $call = 0, $call1 = 0, $frac_Q7$addr = 0, $in$addr = 0, $lz$addr = 0, $lzeros = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $in$addr = $in; + $lz$addr = $lz; + $frac_Q7$addr = $frac_Q7; + $0 = $in$addr; + $call = (_silk_CLZ32_537($0)|0); + $lzeros = $call; + $1 = $lzeros; + $2 = $lz$addr; + HEAP32[$2>>2] = $1; + $3 = $in$addr; + $4 = $lzeros; + $sub = (24 - ($4))|0; + $call1 = (_silk_ROR32_538($3,$sub)|0); + $and = $call1 & 127; + $5 = $frac_Q7$addr; + HEAP32[$5>>2] = $and; + STACKTOP = sp;return; +} +function _silk_CLZ32_537($in32) { + $in32 = $in32|0; + var $0 = 0, $1 = 0, $2 = 0, $cond = 0, $in32$addr = 0, $sub = 0, $sub1 = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $in32$addr = $in32; + $0 = $in32$addr; + $tobool = ($0|0)!=(0); + if (!($tobool)) { + $cond = 32; + STACKTOP = sp;return ($cond|0); + } + $1 = $in32$addr; + $2 = (Math_clz32(($1|0))|0); + $sub = (32 - ($2))|0; + $sub1 = (32 - ($sub))|0; + $cond = $sub1; + STACKTOP = sp;return ($cond|0); +} +function _silk_ROR32_538($a32,$rot) { + $a32 = $a32|0; + $rot = $rot|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a32$addr = 0, $cmp = 0, $cmp1 = 0, $m = 0, $or = 0, $or8 = 0; + var $r = 0, $retval = 0, $rot$addr = 0, $shl = 0, $shl6 = 0, $shr = 0, $shr7 = 0, $sub = 0, $sub3 = 0, $sub5 = 0, $x = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $a32$addr = $a32; + $rot$addr = $rot; + $0 = $a32$addr; + $x = $0; + $1 = $rot$addr; + $r = $1; + $2 = $rot$addr; + $sub = (0 - ($2))|0; + $m = $sub; + $3 = $rot$addr; + $cmp = ($3|0)==(0); + if ($cmp) { + $4 = $a32$addr; + $retval = $4; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } + $5 = $rot$addr; + $cmp1 = ($5|0)<(0); + $6 = $x; + if ($cmp1) { + $7 = $m; + $shl = $6 << $7; + $8 = $x; + $9 = $m; + $sub3 = (32 - ($9))|0; + $shr = $8 >>> $sub3; + $or = $shl | $shr; + $retval = $or; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } else { + $10 = $r; + $sub5 = (32 - ($10))|0; + $shl6 = $6 << $sub5; + $11 = $x; + $12 = $r; + $shr7 = $11 >>> $12; + $or8 = $shl6 | $shr7; + $retval = $or8; + $13 = $retval; + STACKTOP = sp;return ($13|0); + } + return (0)|0; +} +function _silk_decode_core($psDec,$psDecCtrl,$xq,$pulses,$arch) { + $psDec = $psDec|0; + $psDecCtrl = $psDecCtrl|0; + $xq = $xq|0; + $pulses = $pulses|0; + $arch = $arch|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; + var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; + var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; + var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $A_Q12 = 0, $A_Q12_tmp = 0, $B_Q14 = 0; + var $Gain_Q10 = 0, $Gains_Q16 = 0, $Gains_Q16114 = 0, $Gains_Q1676 = 0, $Gains_Q1678 = 0, $Gains_Q1684 = 0, $LPC_order = 0, $LPC_order146 = 0, $LPC_order166 = 0, $LPC_order346 = 0, $LPC_order518 = 0, $LPC_pred_Q10 = 0, $LTPCoef_Q14 = 0, $LTP_pred_Q13 = 0, $LTP_scale_Q14 = 0, $LTP_scale_Q14175 = 0, $NLSFInterpCoef_Q2 = 0, $NLSF_interpolation_flag = 0, $PredCoef_Q12 = 0, $Seed = 0; + var $add = 0, $add$ptr = 0, $add$ptr719 = 0, $add101 = 0, $add104 = 0, $add107 = 0, $add162 = 0, $add180 = 0, $add184 = 0, $add19 = 0, $add203 = 0, $add215 = 0, $add234 = 0, $add239 = 0, $add242 = 0, $add256 = 0, $add274 = 0, $add275 = 0, $add287 = 0, $add288 = 0; + var $add300 = 0, $add301 = 0, $add313 = 0, $add314 = 0, $add326 = 0, $add327 = 0, $add330 = 0, $add348 = 0, $add355 = 0, $add363 = 0, $add364 = 0, $add365 = 0, $add372 = 0, $add38 = 0, $add380 = 0, $add381 = 0, $add382 = 0, $add389 = 0, $add397 = 0, $add398 = 0; + var $add399 = 0, $add406 = 0, $add414 = 0, $add415 = 0, $add416 = 0, $add423 = 0, $add431 = 0, $add432 = 0, $add433 = 0, $add44 = 0, $add440 = 0, $add448 = 0, $add449 = 0, $add450 = 0, $add457 = 0, $add465 = 0, $add466 = 0, $add467 = 0, $add474 = 0, $add482 = 0; + var $add483 = 0, $add484 = 0, $add491 = 0, $add499 = 0, $add5 = 0, $add500 = 0, $add501 = 0, $add508 = 0, $add516 = 0, $add517 = 0, $add522 = 0, $add529 = 0, $add537 = 0, $add538 = 0, $add539 = 0, $add546 = 0, $add554 = 0, $add555 = 0, $add556 = 0, $add56 = 0; + var $add563 = 0, $add571 = 0, $add572 = 0, $add573 = 0, $add580 = 0, $add588 = 0, $add589 = 0, $add590 = 0, $add597 = 0, $add605 = 0, $add606 = 0, $add607 = 0, $add614 = 0, $add622 = 0, $add623 = 0, $add627 = 0, $add628 = 0, $add630 = 0, $add636 = 0, $add643 = 0; + var $add644 = 0, $add647 = 0, $add650 = 0, $add652 = 0, $add656 = 0, $add662 = 0, $add669 = 0, $add670 = 0, $add673 = 0, $add676 = 0, $add678 = 0, $add684 = 0, $add690 = 0, $add697 = 0, $add698 = 0, $add701 = 0, $add704 = 0, $add706 = 0, $and = 0, $and174 = 0; + var $and195 = 0, $and226 = 0, $and269 = 0, $and282 = 0, $and295 = 0, $and308 = 0, $and321 = 0, $and358 = 0, $and375 = 0, $and392 = 0, $and409 = 0, $and426 = 0, $and443 = 0, $and460 = 0, $and477 = 0, $and494 = 0, $and511 = 0, $and532 = 0, $and549 = 0, $and566 = 0; + var $and583 = 0, $and600 = 0, $and617 = 0, $and638 = 0, $and664 = 0, $and692 = 0, $arch$addr = 0, $arrayidx = 0, $arrayidx102 = 0, $arrayidx108 = 0, $arrayidx115 = 0, $arrayidx129 = 0, $arrayidx130 = 0, $arrayidx136 = 0, $arrayidx153 = 0, $arrayidx158 = 0, $arrayidx163 = 0, $arrayidx192 = 0, $arrayidx199 = 0, $arrayidx20 = 0; + var $arrayidx206 = 0, $arrayidx22 = 0, $arrayidx222 = 0, $arrayidx229 = 0, $arrayidx237 = 0, $arrayidx24 = 0, $arrayidx245 = 0, $arrayidx257 = 0, $arrayidx276 = 0, $arrayidx278 = 0, $arrayidx281 = 0, $arrayidx283 = 0, $arrayidx289 = 0, $arrayidx29 = 0, $arrayidx291 = 0, $arrayidx294 = 0, $arrayidx296 = 0, $arrayidx302 = 0, $arrayidx304 = 0, $arrayidx307 = 0; + var $arrayidx309 = 0, $arrayidx315 = 0, $arrayidx317 = 0, $arrayidx320 = 0, $arrayidx322 = 0, $arrayidx328 = 0, $arrayidx331 = 0, $arrayidx332 = 0, $arrayidx334 = 0, $arrayidx350 = 0, $arrayidx357 = 0, $arrayidx367 = 0, $arrayidx369 = 0, $arrayidx37 = 0, $arrayidx374 = 0, $arrayidx376 = 0, $arrayidx384 = 0, $arrayidx386 = 0, $arrayidx391 = 0, $arrayidx393 = 0; + var $arrayidx401 = 0, $arrayidx403 = 0, $arrayidx408 = 0, $arrayidx410 = 0, $arrayidx418 = 0, $arrayidx420 = 0, $arrayidx425 = 0, $arrayidx427 = 0, $arrayidx43 = 0, $arrayidx435 = 0, $arrayidx437 = 0, $arrayidx442 = 0, $arrayidx444 = 0, $arrayidx452 = 0, $arrayidx454 = 0, $arrayidx459 = 0, $arrayidx461 = 0, $arrayidx469 = 0, $arrayidx471 = 0, $arrayidx476 = 0; + var $arrayidx478 = 0, $arrayidx486 = 0, $arrayidx488 = 0, $arrayidx49 = 0, $arrayidx493 = 0, $arrayidx495 = 0, $arrayidx503 = 0, $arrayidx505 = 0, $arrayidx510 = 0, $arrayidx512 = 0, $arrayidx52 = 0, $arrayidx524 = 0, $arrayidx526 = 0, $arrayidx531 = 0, $arrayidx533 = 0, $arrayidx54 = 0, $arrayidx541 = 0, $arrayidx543 = 0, $arrayidx548 = 0, $arrayidx550 = 0; + var $arrayidx558 = 0, $arrayidx560 = 0, $arrayidx565 = 0, $arrayidx567 = 0, $arrayidx575 = 0, $arrayidx577 = 0, $arrayidx582 = 0, $arrayidx584 = 0, $arrayidx592 = 0, $arrayidx594 = 0, $arrayidx599 = 0, $arrayidx601 = 0, $arrayidx609 = 0, $arrayidx611 = 0, $arrayidx616 = 0, $arrayidx618 = 0, $arrayidx625 = 0, $arrayidx629 = 0, $arrayidx631 = 0, $arrayidx637 = 0; + var $arrayidx645 = 0, $arrayidx65 = 0, $arrayidx657 = 0, $arrayidx663 = 0, $arrayidx671 = 0, $arrayidx685 = 0, $arrayidx691 = 0, $arrayidx699 = 0, $arrayidx70 = 0, $arrayidx711 = 0, $arrayidx716 = 0, $arrayidx74 = 0, $arrayidx77 = 0, $arrayidx79 = 0, $arrayidx85 = 0, $arrayidx9 = 0, $arrayidx92 = 0, $arrayidx96 = 0, $call = 0, $call86 = 0; + var $cmp = 0, $cmp117 = 0, $cmp123 = 0, $cmp126 = 0, $cmp132 = 0, $cmp137 = 0, $cmp139 = 0, $cmp149 = 0, $cmp167 = 0, $cmp17 = 0, $cmp185 = 0, $cmp211 = 0, $cmp216 = 0, $cmp25 = 0, $cmp252 = 0, $cmp260 = 0, $cmp33 = 0, $cmp343 = 0, $cmp45 = 0, $cmp519 = 0; + var $cmp61 = 0, $cmp654 = 0, $cmp680 = 0, $cmp80 = 0, $cmp88 = 0, $cond709 = 0, $conv = 0, $conv10 = 0, $conv12 = 0, $conv122 = 0, $conv15 = 0, $conv171 = 0, $conv172 = 0, $conv176 = 0, $conv177 = 0, $conv193 = 0, $conv200 = 0, $conv21 = 0, $conv223 = 0, $conv224 = 0; + var $conv230 = 0, $conv231 = 0, $conv266 = 0, $conv271 = 0, $conv279 = 0, $conv284 = 0, $conv292 = 0, $conv297 = 0, $conv305 = 0, $conv310 = 0, $conv318 = 0, $conv323 = 0, $conv353 = 0, $conv360 = 0, $conv370 = 0, $conv377 = 0, $conv387 = 0, $conv394 = 0, $conv404 = 0, $conv411 = 0; + var $conv421 = 0, $conv428 = 0, $conv438 = 0, $conv445 = 0, $conv455 = 0, $conv462 = 0, $conv472 = 0, $conv479 = 0, $conv489 = 0, $conv496 = 0, $conv506 = 0, $conv513 = 0, $conv527 = 0, $conv534 = 0, $conv544 = 0, $conv55 = 0, $conv551 = 0, $conv561 = 0, $conv568 = 0, $conv578 = 0; + var $conv585 = 0, $conv595 = 0, $conv602 = 0, $conv612 = 0, $conv619 = 0, $conv633 = 0, $conv634 = 0, $conv639 = 0, $conv640 = 0, $conv659 = 0, $conv660 = 0, $conv665 = 0, $conv666 = 0, $conv687 = 0, $conv688 = 0, $conv693 = 0, $conv694 = 0, $conv710 = 0, $conv73 = 0, $conv93 = 0; + var $conv94 = 0, $conv97 = 0, $conv98 = 0, $exc_Q14 = 0, $exc_Q1423 = 0, $exc_Q1428 = 0, $exc_Q1436 = 0, $exc_Q1442 = 0, $exc_Q1448 = 0, $exc_Q1451 = 0, $exc_Q1457 = 0, $frame_length = 0, $frame_length16 = 0, $gain_adj_Q16 = 0, $i = 0, $idxprom = 0, $inc = 0, $inc110 = 0, $inc208 = 0, $inc247 = 0; + var $inc335 = 0, $inc337 = 0, $inc713 = 0, $inc721 = 0, $incdec$ptr = 0, $indices = 0, $indices11 = 0, $indices120 = 0, $indices14 = 0, $indices71 = 0, $indices8 = 0, $inv_gain_Q31 = 0, $k = 0, $lag = 0, $lagPrev = 0, $lossCnt = 0, $ltp_mem_length = 0, $ltp_mem_length1 = 0, $ltp_mem_length144 = 0, $ltp_mem_length152 = 0; + var $ltp_mem_length164 = 0, $ltp_mem_length189 = 0, $ltp_mem_length196 = 0, $ltp_mem_length59 = 0, $mul = 0, $mul106 = 0, $mul155 = 0, $mul156 = 0, $mul161 = 0, $mul173 = 0, $mul178 = 0, $mul194 = 0, $mul201 = 0, $mul225 = 0, $mul232 = 0, $mul241 = 0, $mul267 = 0, $mul272 = 0, $mul280 = 0, $mul285 = 0; + var $mul293 = 0, $mul298 = 0, $mul306 = 0, $mul311 = 0, $mul319 = 0, $mul324 = 0, $mul354 = 0, $mul361 = 0, $mul371 = 0, $mul378 = 0, $mul388 = 0, $mul395 = 0, $mul405 = 0, $mul412 = 0, $mul422 = 0, $mul429 = 0, $mul439 = 0, $mul446 = 0, $mul456 = 0, $mul463 = 0; + var $mul473 = 0, $mul480 = 0, $mul490 = 0, $mul497 = 0, $mul507 = 0, $mul514 = 0, $mul528 = 0, $mul535 = 0, $mul545 = 0, $mul552 = 0, $mul562 = 0, $mul569 = 0, $mul579 = 0, $mul586 = 0, $mul596 = 0, $mul603 = 0, $mul613 = 0, $mul620 = 0, $mul635 = 0, $mul641 = 0; + var $mul649 = 0, $mul661 = 0, $mul667 = 0, $mul675 = 0, $mul68 = 0, $mul689 = 0, $mul69 = 0, $mul695 = 0, $mul703 = 0, $mul95 = 0, $mul99 = 0, $nb_subfr = 0, $offset_Q10 = 0, $or$cond = 0, $or$cond1 = 0, $outBuf = 0, $outBuf159 = 0, $pexc_Q14 = 0, $pred_lag_ptr = 0, $pres_Q14 = 0; + var $prevSignalType = 0, $psDec$addr = 0, $psDecCtrl$addr = 0, $pulses$addr = 0, $pxq = 0, $quantOffsetType = 0, $rand_seed = 0, $sLPC_Q14_buf = 0, $sLPC_Q14_buf723 = 0, $sLTP_buf_idx = 0, $saved_stack = 0, $shl = 0, $shl181 = 0, $shl329 = 0, $shl333 = 0, $shl41 = 0, $shl626 = 0, $shr = 0, $shr100 = 0, $shr103 = 0; + var $shr105 = 0, $shr170 = 0, $shr179 = 0, $shr188 = 0, $shr202 = 0, $shr219 = 0, $shr233 = 0, $shr238 = 0, $shr240 = 0, $shr264 = 0, $shr273 = 0, $shr277 = 0, $shr286 = 0, $shr290 = 0, $shr299 = 0, $shr303 = 0, $shr312 = 0, $shr316 = 0, $shr325 = 0, $shr347 = 0; + var $shr351 = 0, $shr362 = 0, $shr368 = 0, $shr379 = 0, $shr385 = 0, $shr396 = 0, $shr402 = 0, $shr413 = 0, $shr419 = 0, $shr430 = 0, $shr436 = 0, $shr447 = 0, $shr453 = 0, $shr464 = 0, $shr470 = 0, $shr481 = 0, $shr487 = 0, $shr498 = 0, $shr504 = 0, $shr515 = 0; + var $shr525 = 0, $shr536 = 0, $shr542 = 0, $shr553 = 0, $shr559 = 0, $shr570 = 0, $shr576 = 0, $shr587 = 0, $shr593 = 0, $shr604 = 0, $shr610 = 0, $shr621 = 0, $shr632 = 0, $shr64 = 0, $shr642 = 0, $shr646 = 0, $shr648 = 0, $shr651 = 0, $shr653 = 0, $shr658 = 0; + var $shr668 = 0, $shr672 = 0, $shr674 = 0, $shr677 = 0, $shr679 = 0, $shr686 = 0, $shr696 = 0, $shr700 = 0, $shr702 = 0, $shr705 = 0, $shr707 = 0, $shr75 = 0, $shr91 = 0, $signalType = 0, $signalType121 = 0, $signalType7 = 0, $signalType72 = 0, $start_idx = 0, $sub = 0, $sub145 = 0; + var $sub147 = 0, $sub148 = 0, $sub165 = 0, $sub190 = 0, $sub191 = 0, $sub197 = 0, $sub198 = 0, $sub204 = 0, $sub205 = 0, $sub220 = 0, $sub221 = 0, $sub227 = 0, $sub228 = 0, $sub235 = 0, $sub236 = 0, $sub243 = 0, $sub244 = 0, $sub255 = 0, $sub349 = 0, $sub356 = 0; + var $sub366 = 0, $sub373 = 0, $sub383 = 0, $sub390 = 0, $sub400 = 0, $sub407 = 0, $sub417 = 0, $sub424 = 0, $sub434 = 0, $sub441 = 0, $sub451 = 0, $sub458 = 0, $sub468 = 0, $sub475 = 0, $sub485 = 0, $sub492 = 0, $sub50 = 0, $sub502 = 0, $sub509 = 0, $sub523 = 0; + var $sub530 = 0, $sub540 = 0, $sub547 = 0, $sub557 = 0, $sub564 = 0, $sub574 = 0, $sub581 = 0, $sub591 = 0, $sub598 = 0, $sub608 = 0, $sub615 = 0, $subfr_length = 0, $subfr_length154 = 0, $subfr_length160 = 0, $subfr_length259 = 0, $subfr_length342 = 0, $subfr_length4 = 0, $subfr_length715 = 0, $subfr_length717 = 0, $subfr_length718 = 0; + var $tobool = 0, $tobool142 = 0, $vla = 0, $vla$alloca_mul = 0, $vla2 = 0, $vla2$alloca_mul = 0, $vla3 = 0, $vla3$alloca_mul = 0, $vla6 = 0, $vla6$alloca_mul = 0, $xq$addr = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); + $A_Q12_tmp = sp + 104|0; + $psDec$addr = $psDec; + $psDecCtrl$addr = $psDecCtrl; + $xq$addr = $xq; + $pulses$addr = $pulses; + $arch$addr = $arch; + $lag = 0; + $0 = $psDec$addr; + $ltp_mem_length = ((($0)) + 2336|0); + $1 = HEAP32[$ltp_mem_length>>2]|0; + $2 = (_llvm_stacksave()|0); + $saved_stack = $2; + $vla$alloca_mul = $1<<1; + $vla = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla$alloca_mul)|0)+15)&-16)|0);; + $3 = $psDec$addr; + $ltp_mem_length1 = ((($3)) + 2336|0); + $4 = HEAP32[$ltp_mem_length1>>2]|0; + $5 = $psDec$addr; + $frame_length = ((($5)) + 2328|0); + $6 = HEAP32[$frame_length>>2]|0; + $add = (($4) + ($6))|0; + $vla2$alloca_mul = $add<<2; + $vla2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla2$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla2$alloca_mul)|0)+15)&-16)|0);; + $7 = $psDec$addr; + $subfr_length = ((($7)) + 2332|0); + $8 = HEAP32[$subfr_length>>2]|0; + $vla3$alloca_mul = $8<<2; + $vla3 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla3$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla3$alloca_mul)|0)+15)&-16)|0);; + $9 = $psDec$addr; + $subfr_length4 = ((($9)) + 2332|0); + $10 = HEAP32[$subfr_length4>>2]|0; + $add5 = (($10) + 16)|0; + $vla6$alloca_mul = $add5<<2; + $vla6 = STACKTOP; STACKTOP = STACKTOP + ((((1*$vla6$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$vla6$alloca_mul)|0)+15)&-16)|0);; + $11 = $psDec$addr; + $indices = ((($11)) + 2736|0); + $signalType7 = ((($indices)) + 29|0); + $12 = HEAP8[$signalType7>>0]|0; + $conv = $12 << 24 >> 24; + $shr = $conv >> 1; + $arrayidx = (20248 + ($shr<<2)|0); + $13 = $psDec$addr; + $indices8 = ((($13)) + 2736|0); + $quantOffsetType = ((($indices8)) + 30|0); + $14 = HEAP8[$quantOffsetType>>0]|0; + $idxprom = $14 << 24 >> 24; + $arrayidx9 = (($arrayidx) + ($idxprom<<1)|0); + $15 = HEAP16[$arrayidx9>>1]|0; + $conv10 = $15 << 16 >> 16; + $offset_Q10 = $conv10; + $16 = $psDec$addr; + $indices11 = ((($16)) + 2736|0); + $NLSFInterpCoef_Q2 = ((($indices11)) + 31|0); + $17 = HEAP8[$NLSFInterpCoef_Q2>>0]|0; + $conv12 = $17 << 24 >> 24; + $cmp = ($conv12|0)<(4); + if ($cmp) { + $NLSF_interpolation_flag = 1; + } else { + $NLSF_interpolation_flag = 0; + } + $18 = $psDec$addr; + $indices14 = ((($18)) + 2736|0); + $Seed = ((($indices14)) + 34|0); + $19 = HEAP8[$Seed>>0]|0; + $conv15 = $19 << 24 >> 24; + $rand_seed = $conv15; + $i = 0; + while(1) { + $20 = $i; + $21 = $psDec$addr; + $frame_length16 = ((($21)) + 2328|0); + $22 = HEAP32[$frame_length16>>2]|0; + $cmp17 = ($20|0)<($22|0); + if (!($cmp17)) { + break; + } + $23 = $rand_seed; + $mul = Math_imul($23, 196314165)|0; + $add19 = (907633515 + ($mul))|0; + $rand_seed = $add19; + $24 = $pulses$addr; + $25 = $i; + $arrayidx20 = (($24) + ($25<<1)|0); + $26 = HEAP16[$arrayidx20>>1]|0; + $conv21 = $26 << 16 >> 16; + $shl = $conv21 << 14; + $27 = $psDec$addr; + $exc_Q14 = ((($27)) + 4|0); + $28 = $i; + $arrayidx22 = (($exc_Q14) + ($28<<2)|0); + HEAP32[$arrayidx22>>2] = $shl; + $29 = $psDec$addr; + $exc_Q1423 = ((($29)) + 4|0); + $30 = $i; + $arrayidx24 = (($exc_Q1423) + ($30<<2)|0); + $31 = HEAP32[$arrayidx24>>2]|0; + $cmp25 = ($31|0)>(0); + $32 = $psDec$addr; + $exc_Q1428 = ((($32)) + 4|0); + $33 = $i; + $arrayidx29 = (($exc_Q1428) + ($33<<2)|0); + $34 = HEAP32[$arrayidx29>>2]|0; + if ($cmp25) { + $sub = (($34) - 1280)|0; + HEAP32[$arrayidx29>>2] = $sub; + } else { + $cmp33 = ($34|0)<(0); + if ($cmp33) { + $35 = $psDec$addr; + $exc_Q1436 = ((($35)) + 4|0); + $36 = $i; + $arrayidx37 = (($exc_Q1436) + ($36<<2)|0); + $37 = HEAP32[$arrayidx37>>2]|0; + $add38 = (($37) + 1280)|0; + HEAP32[$arrayidx37>>2] = $add38; + } + } + $38 = $offset_Q10; + $shl41 = $38 << 4; + $39 = $psDec$addr; + $exc_Q1442 = ((($39)) + 4|0); + $40 = $i; + $arrayidx43 = (($exc_Q1442) + ($40<<2)|0); + $41 = HEAP32[$arrayidx43>>2]|0; + $add44 = (($41) + ($shl41))|0; + HEAP32[$arrayidx43>>2] = $add44; + $42 = $rand_seed; + $cmp45 = ($42|0)<(0); + if ($cmp45) { + $43 = $psDec$addr; + $exc_Q1448 = ((($43)) + 4|0); + $44 = $i; + $arrayidx49 = (($exc_Q1448) + ($44<<2)|0); + $45 = HEAP32[$arrayidx49>>2]|0; + $sub50 = (0 - ($45))|0; + $46 = $psDec$addr; + $exc_Q1451 = ((($46)) + 4|0); + $47 = $i; + $arrayidx52 = (($exc_Q1451) + ($47<<2)|0); + HEAP32[$arrayidx52>>2] = $sub50; + } + $48 = $rand_seed; + $49 = $pulses$addr; + $50 = $i; + $arrayidx54 = (($49) + ($50<<1)|0); + $51 = HEAP16[$arrayidx54>>1]|0; + $conv55 = $51 << 16 >> 16; + $add56 = (($48) + ($conv55))|0; + $rand_seed = $add56; + $52 = $i; + $inc = (($52) + 1)|0; + $i = $inc; + } + $53 = $psDec$addr; + $sLPC_Q14_buf = ((($53)) + 1284|0); + dest=$vla6; src=$sLPC_Q14_buf; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $54 = $psDec$addr; + $exc_Q1457 = ((($54)) + 4|0); + $pexc_Q14 = $exc_Q1457; + $55 = $xq$addr; + $pxq = $55; + $56 = $psDec$addr; + $ltp_mem_length59 = ((($56)) + 2336|0); + $57 = HEAP32[$ltp_mem_length59>>2]|0; + $sLTP_buf_idx = $57; + $k = 0; + while(1) { + $58 = $k; + $59 = $psDec$addr; + $nb_subfr = ((($59)) + 2324|0); + $60 = HEAP32[$nb_subfr>>2]|0; + $cmp61 = ($58|0)<($60|0); + if (!($cmp61)) { + break; + } + $pres_Q14 = $vla3; + $61 = $psDecCtrl$addr; + $PredCoef_Q12 = ((($61)) + 32|0); + $62 = $k; + $shr64 = $62 >> 1; + $arrayidx65 = (($PredCoef_Q12) + ($shr64<<5)|0); + $A_Q12 = $arrayidx65; + $63 = $A_Q12; + $64 = $psDec$addr; + $LPC_order = ((($64)) + 2340|0); + $65 = HEAP32[$LPC_order>>2]|0; + $mul68 = $65<<1; + _memcpy(($A_Q12_tmp|0),($63|0),($mul68|0))|0; + $66 = $psDecCtrl$addr; + $LTPCoef_Q14 = ((($66)) + 96|0); + $67 = $k; + $mul69 = ($67*5)|0; + $arrayidx70 = (($LTPCoef_Q14) + ($mul69<<1)|0); + $B_Q14 = $arrayidx70; + $68 = $psDec$addr; + $indices71 = ((($68)) + 2736|0); + $signalType72 = ((($indices71)) + 29|0); + $69 = HEAP8[$signalType72>>0]|0; + $conv73 = $69 << 24 >> 24; + $signalType = $conv73; + $70 = $psDecCtrl$addr; + $Gains_Q16 = ((($70)) + 16|0); + $71 = $k; + $arrayidx74 = (($Gains_Q16) + ($71<<2)|0); + $72 = HEAP32[$arrayidx74>>2]|0; + $shr75 = $72 >> 6; + $Gain_Q10 = $shr75; + $73 = $psDecCtrl$addr; + $Gains_Q1676 = ((($73)) + 16|0); + $74 = $k; + $arrayidx77 = (($Gains_Q1676) + ($74<<2)|0); + $75 = HEAP32[$arrayidx77>>2]|0; + $call = (_silk_INVERSE32_varQ_541($75,47)|0); + $inv_gain_Q31 = $call; + $76 = $psDecCtrl$addr; + $Gains_Q1678 = ((($76)) + 16|0); + $77 = $k; + $arrayidx79 = (($Gains_Q1678) + ($77<<2)|0); + $78 = HEAP32[$arrayidx79>>2]|0; + $79 = $psDec$addr; + $80 = HEAP32[$79>>2]|0; + $cmp80 = ($78|0)!=($80|0); + L20: do { + if ($cmp80) { + $81 = $psDec$addr; + $82 = HEAP32[$81>>2]|0; + $83 = $psDecCtrl$addr; + $Gains_Q1684 = ((($83)) + 16|0); + $84 = $k; + $arrayidx85 = (($Gains_Q1684) + ($84<<2)|0); + $85 = HEAP32[$arrayidx85>>2]|0; + $call86 = (_silk_DIV32_varQ_542($82,$85,16)|0); + $gain_adj_Q16 = $call86; + $i = 0; + while(1) { + $86 = $i; + $cmp88 = ($86|0)<(16); + if (!($cmp88)) { + break L20; + } + $87 = $gain_adj_Q16; + $shr91 = $87 >> 16; + $88 = $i; + $arrayidx92 = (($vla6) + ($88<<2)|0); + $89 = HEAP32[$arrayidx92>>2]|0; + $conv93 = $89&65535; + $conv94 = $conv93 << 16 >> 16; + $mul95 = Math_imul($shr91, $conv94)|0; + $90 = $gain_adj_Q16; + $and = $90 & 65535; + $91 = $i; + $arrayidx96 = (($vla6) + ($91<<2)|0); + $92 = HEAP32[$arrayidx96>>2]|0; + $conv97 = $92&65535; + $conv98 = $conv97 << 16 >> 16; + $mul99 = Math_imul($and, $conv98)|0; + $shr100 = $mul99 >> 16; + $add101 = (($mul95) + ($shr100))|0; + $93 = $gain_adj_Q16; + $94 = $i; + $arrayidx102 = (($vla6) + ($94<<2)|0); + $95 = HEAP32[$arrayidx102>>2]|0; + $shr103 = $95 >> 15; + $add104 = (($shr103) + 1)|0; + $shr105 = $add104 >> 1; + $mul106 = Math_imul($93, $shr105)|0; + $add107 = (($add101) + ($mul106))|0; + $96 = $i; + $arrayidx108 = (($vla6) + ($96<<2)|0); + HEAP32[$arrayidx108>>2] = $add107; + $97 = $i; + $inc110 = (($97) + 1)|0; + $i = $inc110; + } + } else { + $gain_adj_Q16 = 65536; + } + } while(0); + $98 = $psDecCtrl$addr; + $Gains_Q16114 = ((($98)) + 16|0); + $99 = $k; + $arrayidx115 = (($Gains_Q16114) + ($99<<2)|0); + $100 = HEAP32[$arrayidx115>>2]|0; + $101 = $psDec$addr; + HEAP32[$101>>2] = $100; + $102 = $psDec$addr; + $lossCnt = ((($102)) + 4160|0); + $103 = HEAP32[$lossCnt>>2]|0; + $tobool = ($103|0)!=(0); + if ($tobool) { + $104 = $psDec$addr; + $prevSignalType = ((($104)) + 4164|0); + $105 = HEAP32[$prevSignalType>>2]|0; + $cmp117 = ($105|0)==(2); + if ($cmp117) { + $106 = $psDec$addr; + $indices120 = ((($106)) + 2736|0); + $signalType121 = ((($indices120)) + 29|0); + $107 = HEAP8[$signalType121>>0]|0; + $conv122 = $107 << 24 >> 24; + $cmp123 = ($conv122|0)!=(2); + $108 = $k; + $cmp126 = ($108|0)<(2); + $or$cond = $cmp123 & $cmp126; + if ($or$cond) { + $109 = $B_Q14; + ;HEAP16[$109>>1]=0|0;HEAP16[$109+2>>1]=0|0;HEAP16[$109+4>>1]=0|0;HEAP16[$109+6>>1]=0|0;HEAP16[$109+8>>1]=0|0; + $110 = $B_Q14; + $arrayidx129 = ((($110)) + 4|0); + HEAP16[$arrayidx129>>1] = 4096; + $signalType = 2; + $111 = $psDec$addr; + $lagPrev = ((($111)) + 2308|0); + $112 = HEAP32[$lagPrev>>2]|0; + $113 = $psDecCtrl$addr; + $114 = $k; + $arrayidx130 = (($113) + ($114<<2)|0); + HEAP32[$arrayidx130>>2] = $112; + } + } + } + $115 = $signalType; + $cmp132 = ($115|0)==(2); + L32: do { + if ($cmp132) { + $116 = $psDecCtrl$addr; + $117 = $k; + $arrayidx136 = (($116) + ($117<<2)|0); + $118 = HEAP32[$arrayidx136>>2]|0; + $lag = $118; + $119 = $k; + $cmp137 = ($119|0)==(0); + if (!($cmp137)) { + $120 = $k; + $cmp139 = ($120|0)==(2); + $121 = $NLSF_interpolation_flag; + $tobool142 = ($121|0)!=(0); + $or$cond1 = $cmp139 & $tobool142; + if (!($or$cond1)) { + $169 = $gain_adj_Q16; + $cmp211 = ($169|0)!=(65536); + if (!($cmp211)) { + break; + } + $i = 0; + while(1) { + $170 = $i; + $171 = $lag; + $add215 = (($171) + 2)|0; + $cmp216 = ($170|0)<($add215|0); + if (!($cmp216)) { + break L32; + } + $172 = $gain_adj_Q16; + $shr219 = $172 >> 16; + $173 = $sLTP_buf_idx; + $174 = $i; + $sub220 = (($173) - ($174))|0; + $sub221 = (($sub220) - 1)|0; + $arrayidx222 = (($vla2) + ($sub221<<2)|0); + $175 = HEAP32[$arrayidx222>>2]|0; + $conv223 = $175&65535; + $conv224 = $conv223 << 16 >> 16; + $mul225 = Math_imul($shr219, $conv224)|0; + $176 = $gain_adj_Q16; + $and226 = $176 & 65535; + $177 = $sLTP_buf_idx; + $178 = $i; + $sub227 = (($177) - ($178))|0; + $sub228 = (($sub227) - 1)|0; + $arrayidx229 = (($vla2) + ($sub228<<2)|0); + $179 = HEAP32[$arrayidx229>>2]|0; + $conv230 = $179&65535; + $conv231 = $conv230 << 16 >> 16; + $mul232 = Math_imul($and226, $conv231)|0; + $shr233 = $mul232 >> 16; + $add234 = (($mul225) + ($shr233))|0; + $180 = $gain_adj_Q16; + $181 = $sLTP_buf_idx; + $182 = $i; + $sub235 = (($181) - ($182))|0; + $sub236 = (($sub235) - 1)|0; + $arrayidx237 = (($vla2) + ($sub236<<2)|0); + $183 = HEAP32[$arrayidx237>>2]|0; + $shr238 = $183 >> 15; + $add239 = (($shr238) + 1)|0; + $shr240 = $add239 >> 1; + $mul241 = Math_imul($180, $shr240)|0; + $add242 = (($add234) + ($mul241))|0; + $184 = $sLTP_buf_idx; + $185 = $i; + $sub243 = (($184) - ($185))|0; + $sub244 = (($sub243) - 1)|0; + $arrayidx245 = (($vla2) + ($sub244<<2)|0); + HEAP32[$arrayidx245>>2] = $add242; + $186 = $i; + $inc247 = (($186) + 1)|0; + $i = $inc247; + } + } + } + $122 = $psDec$addr; + $ltp_mem_length144 = ((($122)) + 2336|0); + $123 = HEAP32[$ltp_mem_length144>>2]|0; + $124 = $lag; + $sub145 = (($123) - ($124))|0; + $125 = $psDec$addr; + $LPC_order146 = ((($125)) + 2340|0); + $126 = HEAP32[$LPC_order146>>2]|0; + $sub147 = (($sub145) - ($126))|0; + $sub148 = (($sub147) - 2)|0; + $start_idx = $sub148; + $127 = $k; + $cmp149 = ($127|0)==(2); + if ($cmp149) { + $128 = $psDec$addr; + $outBuf = ((($128)) + 1348|0); + $129 = $psDec$addr; + $ltp_mem_length152 = ((($129)) + 2336|0); + $130 = HEAP32[$ltp_mem_length152>>2]|0; + $arrayidx153 = (($outBuf) + ($130<<1)|0); + $131 = $xq$addr; + $132 = $psDec$addr; + $subfr_length154 = ((($132)) + 2332|0); + $133 = HEAP32[$subfr_length154>>2]|0; + $mul155 = $133<<1; + $mul156 = $mul155<<1; + _memcpy(($arrayidx153|0),($131|0),($mul156|0))|0; + } + $134 = $start_idx; + $arrayidx158 = (($vla) + ($134<<1)|0); + $135 = $psDec$addr; + $outBuf159 = ((($135)) + 1348|0); + $136 = $start_idx; + $137 = $k; + $138 = $psDec$addr; + $subfr_length160 = ((($138)) + 2332|0); + $139 = HEAP32[$subfr_length160>>2]|0; + $mul161 = Math_imul($137, $139)|0; + $add162 = (($136) + ($mul161))|0; + $arrayidx163 = (($outBuf159) + ($add162<<1)|0); + $140 = $A_Q12; + $141 = $psDec$addr; + $ltp_mem_length164 = ((($141)) + 2336|0); + $142 = HEAP32[$ltp_mem_length164>>2]|0; + $143 = $start_idx; + $sub165 = (($142) - ($143))|0; + $144 = $psDec$addr; + $LPC_order166 = ((($144)) + 2340|0); + $145 = HEAP32[$LPC_order166>>2]|0; + $146 = $arch$addr; + _silk_LPC_analysis_filter($arrayidx158,$arrayidx163,$140,$sub165,$145,$146); + $147 = $k; + $cmp167 = ($147|0)==(0); + if ($cmp167) { + $148 = $inv_gain_Q31; + $shr170 = $148 >> 16; + $149 = $psDecCtrl$addr; + $LTP_scale_Q14 = ((($149)) + 136|0); + $150 = HEAP32[$LTP_scale_Q14>>2]|0; + $conv171 = $150&65535; + $conv172 = $conv171 << 16 >> 16; + $mul173 = Math_imul($shr170, $conv172)|0; + $151 = $inv_gain_Q31; + $and174 = $151 & 65535; + $152 = $psDecCtrl$addr; + $LTP_scale_Q14175 = ((($152)) + 136|0); + $153 = HEAP32[$LTP_scale_Q14175>>2]|0; + $conv176 = $153&65535; + $conv177 = $conv176 << 16 >> 16; + $mul178 = Math_imul($and174, $conv177)|0; + $shr179 = $mul178 >> 16; + $add180 = (($mul173) + ($shr179))|0; + $shl181 = $add180 << 2; + $inv_gain_Q31 = $shl181; + } + $i = 0; + while(1) { + $154 = $i; + $155 = $lag; + $add184 = (($155) + 2)|0; + $cmp185 = ($154|0)<($add184|0); + if (!($cmp185)) { + break L32; + } + $156 = $inv_gain_Q31; + $shr188 = $156 >> 16; + $157 = $psDec$addr; + $ltp_mem_length189 = ((($157)) + 2336|0); + $158 = HEAP32[$ltp_mem_length189>>2]|0; + $159 = $i; + $sub190 = (($158) - ($159))|0; + $sub191 = (($sub190) - 1)|0; + $arrayidx192 = (($vla) + ($sub191<<1)|0); + $160 = HEAP16[$arrayidx192>>1]|0; + $conv193 = $160 << 16 >> 16; + $mul194 = Math_imul($shr188, $conv193)|0; + $161 = $inv_gain_Q31; + $and195 = $161 & 65535; + $162 = $psDec$addr; + $ltp_mem_length196 = ((($162)) + 2336|0); + $163 = HEAP32[$ltp_mem_length196>>2]|0; + $164 = $i; + $sub197 = (($163) - ($164))|0; + $sub198 = (($sub197) - 1)|0; + $arrayidx199 = (($vla) + ($sub198<<1)|0); + $165 = HEAP16[$arrayidx199>>1]|0; + $conv200 = $165 << 16 >> 16; + $mul201 = Math_imul($and195, $conv200)|0; + $shr202 = $mul201 >> 16; + $add203 = (($mul194) + ($shr202))|0; + $166 = $sLTP_buf_idx; + $167 = $i; + $sub204 = (($166) - ($167))|0; + $sub205 = (($sub204) - 1)|0; + $arrayidx206 = (($vla2) + ($sub205<<2)|0); + HEAP32[$arrayidx206>>2] = $add203; + $168 = $i; + $inc208 = (($168) + 1)|0; + $i = $inc208; + } + } + } while(0); + $187 = $signalType; + $cmp252 = ($187|0)==(2); + L52: do { + if ($cmp252) { + $188 = $sLTP_buf_idx; + $189 = $lag; + $sub255 = (($188) - ($189))|0; + $add256 = (($sub255) + 2)|0; + $arrayidx257 = (($vla2) + ($add256<<2)|0); + $pred_lag_ptr = $arrayidx257; + $i = 0; + while(1) { + $190 = $i; + $191 = $psDec$addr; + $subfr_length259 = ((($191)) + 2332|0); + $192 = HEAP32[$subfr_length259>>2]|0; + $cmp260 = ($190|0)<($192|0); + if (!($cmp260)) { + break L52; + } + $LTP_pred_Q13 = 2; + $193 = $LTP_pred_Q13; + $194 = $pred_lag_ptr; + $195 = HEAP32[$194>>2]|0; + $shr264 = $195 >> 16; + $196 = $B_Q14; + $197 = HEAP16[$196>>1]|0; + $conv266 = $197 << 16 >> 16; + $mul267 = Math_imul($shr264, $conv266)|0; + $198 = $pred_lag_ptr; + $199 = HEAP32[$198>>2]|0; + $and269 = $199 & 65535; + $200 = $B_Q14; + $201 = HEAP16[$200>>1]|0; + $conv271 = $201 << 16 >> 16; + $mul272 = Math_imul($and269, $conv271)|0; + $shr273 = $mul272 >> 16; + $add274 = (($mul267) + ($shr273))|0; + $add275 = (($193) + ($add274))|0; + $LTP_pred_Q13 = $add275; + $202 = $LTP_pred_Q13; + $203 = $pred_lag_ptr; + $arrayidx276 = ((($203)) + -4|0); + $204 = HEAP32[$arrayidx276>>2]|0; + $shr277 = $204 >> 16; + $205 = $B_Q14; + $arrayidx278 = ((($205)) + 2|0); + $206 = HEAP16[$arrayidx278>>1]|0; + $conv279 = $206 << 16 >> 16; + $mul280 = Math_imul($shr277, $conv279)|0; + $207 = $pred_lag_ptr; + $arrayidx281 = ((($207)) + -4|0); + $208 = HEAP32[$arrayidx281>>2]|0; + $and282 = $208 & 65535; + $209 = $B_Q14; + $arrayidx283 = ((($209)) + 2|0); + $210 = HEAP16[$arrayidx283>>1]|0; + $conv284 = $210 << 16 >> 16; + $mul285 = Math_imul($and282, $conv284)|0; + $shr286 = $mul285 >> 16; + $add287 = (($mul280) + ($shr286))|0; + $add288 = (($202) + ($add287))|0; + $LTP_pred_Q13 = $add288; + $211 = $LTP_pred_Q13; + $212 = $pred_lag_ptr; + $arrayidx289 = ((($212)) + -8|0); + $213 = HEAP32[$arrayidx289>>2]|0; + $shr290 = $213 >> 16; + $214 = $B_Q14; + $arrayidx291 = ((($214)) + 4|0); + $215 = HEAP16[$arrayidx291>>1]|0; + $conv292 = $215 << 16 >> 16; + $mul293 = Math_imul($shr290, $conv292)|0; + $216 = $pred_lag_ptr; + $arrayidx294 = ((($216)) + -8|0); + $217 = HEAP32[$arrayidx294>>2]|0; + $and295 = $217 & 65535; + $218 = $B_Q14; + $arrayidx296 = ((($218)) + 4|0); + $219 = HEAP16[$arrayidx296>>1]|0; + $conv297 = $219 << 16 >> 16; + $mul298 = Math_imul($and295, $conv297)|0; + $shr299 = $mul298 >> 16; + $add300 = (($mul293) + ($shr299))|0; + $add301 = (($211) + ($add300))|0; + $LTP_pred_Q13 = $add301; + $220 = $LTP_pred_Q13; + $221 = $pred_lag_ptr; + $arrayidx302 = ((($221)) + -12|0); + $222 = HEAP32[$arrayidx302>>2]|0; + $shr303 = $222 >> 16; + $223 = $B_Q14; + $arrayidx304 = ((($223)) + 6|0); + $224 = HEAP16[$arrayidx304>>1]|0; + $conv305 = $224 << 16 >> 16; + $mul306 = Math_imul($shr303, $conv305)|0; + $225 = $pred_lag_ptr; + $arrayidx307 = ((($225)) + -12|0); + $226 = HEAP32[$arrayidx307>>2]|0; + $and308 = $226 & 65535; + $227 = $B_Q14; + $arrayidx309 = ((($227)) + 6|0); + $228 = HEAP16[$arrayidx309>>1]|0; + $conv310 = $228 << 16 >> 16; + $mul311 = Math_imul($and308, $conv310)|0; + $shr312 = $mul311 >> 16; + $add313 = (($mul306) + ($shr312))|0; + $add314 = (($220) + ($add313))|0; + $LTP_pred_Q13 = $add314; + $229 = $LTP_pred_Q13; + $230 = $pred_lag_ptr; + $arrayidx315 = ((($230)) + -16|0); + $231 = HEAP32[$arrayidx315>>2]|0; + $shr316 = $231 >> 16; + $232 = $B_Q14; + $arrayidx317 = ((($232)) + 8|0); + $233 = HEAP16[$arrayidx317>>1]|0; + $conv318 = $233 << 16 >> 16; + $mul319 = Math_imul($shr316, $conv318)|0; + $234 = $pred_lag_ptr; + $arrayidx320 = ((($234)) + -16|0); + $235 = HEAP32[$arrayidx320>>2]|0; + $and321 = $235 & 65535; + $236 = $B_Q14; + $arrayidx322 = ((($236)) + 8|0); + $237 = HEAP16[$arrayidx322>>1]|0; + $conv323 = $237 << 16 >> 16; + $mul324 = Math_imul($and321, $conv323)|0; + $shr325 = $mul324 >> 16; + $add326 = (($mul319) + ($shr325))|0; + $add327 = (($229) + ($add326))|0; + $LTP_pred_Q13 = $add327; + $238 = $pred_lag_ptr; + $incdec$ptr = ((($238)) + 4|0); + $pred_lag_ptr = $incdec$ptr; + $239 = $pexc_Q14; + $240 = $i; + $arrayidx328 = (($239) + ($240<<2)|0); + $241 = HEAP32[$arrayidx328>>2]|0; + $242 = $LTP_pred_Q13; + $shl329 = $242 << 1; + $add330 = (($241) + ($shl329))|0; + $243 = $pres_Q14; + $244 = $i; + $arrayidx331 = (($243) + ($244<<2)|0); + HEAP32[$arrayidx331>>2] = $add330; + $245 = $pres_Q14; + $246 = $i; + $arrayidx332 = (($245) + ($246<<2)|0); + $247 = HEAP32[$arrayidx332>>2]|0; + $shl333 = $247 << 1; + $248 = $sLTP_buf_idx; + $arrayidx334 = (($vla2) + ($248<<2)|0); + HEAP32[$arrayidx334>>2] = $shl333; + $249 = $sLTP_buf_idx; + $inc335 = (($249) + 1)|0; + $sLTP_buf_idx = $inc335; + $250 = $i; + $inc337 = (($250) + 1)|0; + $i = $inc337; + } + } else { + $251 = $pexc_Q14; + $pres_Q14 = $251; + } + } while(0); + $i = 0; + while(1) { + $252 = $i; + $253 = $psDec$addr; + $subfr_length342 = ((($253)) + 2332|0); + $254 = HEAP32[$subfr_length342>>2]|0; + $cmp343 = ($252|0)<($254|0); + if (!($cmp343)) { + break; + } + $255 = $psDec$addr; + $LPC_order346 = ((($255)) + 2340|0); + $256 = HEAP32[$LPC_order346>>2]|0; + $shr347 = $256 >> 1; + $LPC_pred_Q10 = $shr347; + $257 = $LPC_pred_Q10; + $258 = $i; + $add348 = (16 + ($258))|0; + $sub349 = (($add348) - 1)|0; + $arrayidx350 = (($vla6) + ($sub349<<2)|0); + $259 = HEAP32[$arrayidx350>>2]|0; + $shr351 = $259 >> 16; + $260 = HEAP16[$A_Q12_tmp>>1]|0; + $conv353 = $260 << 16 >> 16; + $mul354 = Math_imul($shr351, $conv353)|0; + $261 = $i; + $add355 = (16 + ($261))|0; + $sub356 = (($add355) - 1)|0; + $arrayidx357 = (($vla6) + ($sub356<<2)|0); + $262 = HEAP32[$arrayidx357>>2]|0; + $and358 = $262 & 65535; + $263 = HEAP16[$A_Q12_tmp>>1]|0; + $conv360 = $263 << 16 >> 16; + $mul361 = Math_imul($and358, $conv360)|0; + $shr362 = $mul361 >> 16; + $add363 = (($mul354) + ($shr362))|0; + $add364 = (($257) + ($add363))|0; + $LPC_pred_Q10 = $add364; + $264 = $LPC_pred_Q10; + $265 = $i; + $add365 = (16 + ($265))|0; + $sub366 = (($add365) - 2)|0; + $arrayidx367 = (($vla6) + ($sub366<<2)|0); + $266 = HEAP32[$arrayidx367>>2]|0; + $shr368 = $266 >> 16; + $arrayidx369 = ((($A_Q12_tmp)) + 2|0); + $267 = HEAP16[$arrayidx369>>1]|0; + $conv370 = $267 << 16 >> 16; + $mul371 = Math_imul($shr368, $conv370)|0; + $268 = $i; + $add372 = (16 + ($268))|0; + $sub373 = (($add372) - 2)|0; + $arrayidx374 = (($vla6) + ($sub373<<2)|0); + $269 = HEAP32[$arrayidx374>>2]|0; + $and375 = $269 & 65535; + $arrayidx376 = ((($A_Q12_tmp)) + 2|0); + $270 = HEAP16[$arrayidx376>>1]|0; + $conv377 = $270 << 16 >> 16; + $mul378 = Math_imul($and375, $conv377)|0; + $shr379 = $mul378 >> 16; + $add380 = (($mul371) + ($shr379))|0; + $add381 = (($264) + ($add380))|0; + $LPC_pred_Q10 = $add381; + $271 = $LPC_pred_Q10; + $272 = $i; + $add382 = (16 + ($272))|0; + $sub383 = (($add382) - 3)|0; + $arrayidx384 = (($vla6) + ($sub383<<2)|0); + $273 = HEAP32[$arrayidx384>>2]|0; + $shr385 = $273 >> 16; + $arrayidx386 = ((($A_Q12_tmp)) + 4|0); + $274 = HEAP16[$arrayidx386>>1]|0; + $conv387 = $274 << 16 >> 16; + $mul388 = Math_imul($shr385, $conv387)|0; + $275 = $i; + $add389 = (16 + ($275))|0; + $sub390 = (($add389) - 3)|0; + $arrayidx391 = (($vla6) + ($sub390<<2)|0); + $276 = HEAP32[$arrayidx391>>2]|0; + $and392 = $276 & 65535; + $arrayidx393 = ((($A_Q12_tmp)) + 4|0); + $277 = HEAP16[$arrayidx393>>1]|0; + $conv394 = $277 << 16 >> 16; + $mul395 = Math_imul($and392, $conv394)|0; + $shr396 = $mul395 >> 16; + $add397 = (($mul388) + ($shr396))|0; + $add398 = (($271) + ($add397))|0; + $LPC_pred_Q10 = $add398; + $278 = $LPC_pred_Q10; + $279 = $i; + $add399 = (16 + ($279))|0; + $sub400 = (($add399) - 4)|0; + $arrayidx401 = (($vla6) + ($sub400<<2)|0); + $280 = HEAP32[$arrayidx401>>2]|0; + $shr402 = $280 >> 16; + $arrayidx403 = ((($A_Q12_tmp)) + 6|0); + $281 = HEAP16[$arrayidx403>>1]|0; + $conv404 = $281 << 16 >> 16; + $mul405 = Math_imul($shr402, $conv404)|0; + $282 = $i; + $add406 = (16 + ($282))|0; + $sub407 = (($add406) - 4)|0; + $arrayidx408 = (($vla6) + ($sub407<<2)|0); + $283 = HEAP32[$arrayidx408>>2]|0; + $and409 = $283 & 65535; + $arrayidx410 = ((($A_Q12_tmp)) + 6|0); + $284 = HEAP16[$arrayidx410>>1]|0; + $conv411 = $284 << 16 >> 16; + $mul412 = Math_imul($and409, $conv411)|0; + $shr413 = $mul412 >> 16; + $add414 = (($mul405) + ($shr413))|0; + $add415 = (($278) + ($add414))|0; + $LPC_pred_Q10 = $add415; + $285 = $LPC_pred_Q10; + $286 = $i; + $add416 = (16 + ($286))|0; + $sub417 = (($add416) - 5)|0; + $arrayidx418 = (($vla6) + ($sub417<<2)|0); + $287 = HEAP32[$arrayidx418>>2]|0; + $shr419 = $287 >> 16; + $arrayidx420 = ((($A_Q12_tmp)) + 8|0); + $288 = HEAP16[$arrayidx420>>1]|0; + $conv421 = $288 << 16 >> 16; + $mul422 = Math_imul($shr419, $conv421)|0; + $289 = $i; + $add423 = (16 + ($289))|0; + $sub424 = (($add423) - 5)|0; + $arrayidx425 = (($vla6) + ($sub424<<2)|0); + $290 = HEAP32[$arrayidx425>>2]|0; + $and426 = $290 & 65535; + $arrayidx427 = ((($A_Q12_tmp)) + 8|0); + $291 = HEAP16[$arrayidx427>>1]|0; + $conv428 = $291 << 16 >> 16; + $mul429 = Math_imul($and426, $conv428)|0; + $shr430 = $mul429 >> 16; + $add431 = (($mul422) + ($shr430))|0; + $add432 = (($285) + ($add431))|0; + $LPC_pred_Q10 = $add432; + $292 = $LPC_pred_Q10; + $293 = $i; + $add433 = (16 + ($293))|0; + $sub434 = (($add433) - 6)|0; + $arrayidx435 = (($vla6) + ($sub434<<2)|0); + $294 = HEAP32[$arrayidx435>>2]|0; + $shr436 = $294 >> 16; + $arrayidx437 = ((($A_Q12_tmp)) + 10|0); + $295 = HEAP16[$arrayidx437>>1]|0; + $conv438 = $295 << 16 >> 16; + $mul439 = Math_imul($shr436, $conv438)|0; + $296 = $i; + $add440 = (16 + ($296))|0; + $sub441 = (($add440) - 6)|0; + $arrayidx442 = (($vla6) + ($sub441<<2)|0); + $297 = HEAP32[$arrayidx442>>2]|0; + $and443 = $297 & 65535; + $arrayidx444 = ((($A_Q12_tmp)) + 10|0); + $298 = HEAP16[$arrayidx444>>1]|0; + $conv445 = $298 << 16 >> 16; + $mul446 = Math_imul($and443, $conv445)|0; + $shr447 = $mul446 >> 16; + $add448 = (($mul439) + ($shr447))|0; + $add449 = (($292) + ($add448))|0; + $LPC_pred_Q10 = $add449; + $299 = $LPC_pred_Q10; + $300 = $i; + $add450 = (16 + ($300))|0; + $sub451 = (($add450) - 7)|0; + $arrayidx452 = (($vla6) + ($sub451<<2)|0); + $301 = HEAP32[$arrayidx452>>2]|0; + $shr453 = $301 >> 16; + $arrayidx454 = ((($A_Q12_tmp)) + 12|0); + $302 = HEAP16[$arrayidx454>>1]|0; + $conv455 = $302 << 16 >> 16; + $mul456 = Math_imul($shr453, $conv455)|0; + $303 = $i; + $add457 = (16 + ($303))|0; + $sub458 = (($add457) - 7)|0; + $arrayidx459 = (($vla6) + ($sub458<<2)|0); + $304 = HEAP32[$arrayidx459>>2]|0; + $and460 = $304 & 65535; + $arrayidx461 = ((($A_Q12_tmp)) + 12|0); + $305 = HEAP16[$arrayidx461>>1]|0; + $conv462 = $305 << 16 >> 16; + $mul463 = Math_imul($and460, $conv462)|0; + $shr464 = $mul463 >> 16; + $add465 = (($mul456) + ($shr464))|0; + $add466 = (($299) + ($add465))|0; + $LPC_pred_Q10 = $add466; + $306 = $LPC_pred_Q10; + $307 = $i; + $add467 = (16 + ($307))|0; + $sub468 = (($add467) - 8)|0; + $arrayidx469 = (($vla6) + ($sub468<<2)|0); + $308 = HEAP32[$arrayidx469>>2]|0; + $shr470 = $308 >> 16; + $arrayidx471 = ((($A_Q12_tmp)) + 14|0); + $309 = HEAP16[$arrayidx471>>1]|0; + $conv472 = $309 << 16 >> 16; + $mul473 = Math_imul($shr470, $conv472)|0; + $310 = $i; + $add474 = (16 + ($310))|0; + $sub475 = (($add474) - 8)|0; + $arrayidx476 = (($vla6) + ($sub475<<2)|0); + $311 = HEAP32[$arrayidx476>>2]|0; + $and477 = $311 & 65535; + $arrayidx478 = ((($A_Q12_tmp)) + 14|0); + $312 = HEAP16[$arrayidx478>>1]|0; + $conv479 = $312 << 16 >> 16; + $mul480 = Math_imul($and477, $conv479)|0; + $shr481 = $mul480 >> 16; + $add482 = (($mul473) + ($shr481))|0; + $add483 = (($306) + ($add482))|0; + $LPC_pred_Q10 = $add483; + $313 = $LPC_pred_Q10; + $314 = $i; + $add484 = (16 + ($314))|0; + $sub485 = (($add484) - 9)|0; + $arrayidx486 = (($vla6) + ($sub485<<2)|0); + $315 = HEAP32[$arrayidx486>>2]|0; + $shr487 = $315 >> 16; + $arrayidx488 = ((($A_Q12_tmp)) + 16|0); + $316 = HEAP16[$arrayidx488>>1]|0; + $conv489 = $316 << 16 >> 16; + $mul490 = Math_imul($shr487, $conv489)|0; + $317 = $i; + $add491 = (16 + ($317))|0; + $sub492 = (($add491) - 9)|0; + $arrayidx493 = (($vla6) + ($sub492<<2)|0); + $318 = HEAP32[$arrayidx493>>2]|0; + $and494 = $318 & 65535; + $arrayidx495 = ((($A_Q12_tmp)) + 16|0); + $319 = HEAP16[$arrayidx495>>1]|0; + $conv496 = $319 << 16 >> 16; + $mul497 = Math_imul($and494, $conv496)|0; + $shr498 = $mul497 >> 16; + $add499 = (($mul490) + ($shr498))|0; + $add500 = (($313) + ($add499))|0; + $LPC_pred_Q10 = $add500; + $320 = $LPC_pred_Q10; + $321 = $i; + $add501 = (16 + ($321))|0; + $sub502 = (($add501) - 10)|0; + $arrayidx503 = (($vla6) + ($sub502<<2)|0); + $322 = HEAP32[$arrayidx503>>2]|0; + $shr504 = $322 >> 16; + $arrayidx505 = ((($A_Q12_tmp)) + 18|0); + $323 = HEAP16[$arrayidx505>>1]|0; + $conv506 = $323 << 16 >> 16; + $mul507 = Math_imul($shr504, $conv506)|0; + $324 = $i; + $add508 = (16 + ($324))|0; + $sub509 = (($add508) - 10)|0; + $arrayidx510 = (($vla6) + ($sub509<<2)|0); + $325 = HEAP32[$arrayidx510>>2]|0; + $and511 = $325 & 65535; + $arrayidx512 = ((($A_Q12_tmp)) + 18|0); + $326 = HEAP16[$arrayidx512>>1]|0; + $conv513 = $326 << 16 >> 16; + $mul514 = Math_imul($and511, $conv513)|0; + $shr515 = $mul514 >> 16; + $add516 = (($mul507) + ($shr515))|0; + $add517 = (($320) + ($add516))|0; + $LPC_pred_Q10 = $add517; + $327 = $psDec$addr; + $LPC_order518 = ((($327)) + 2340|0); + $328 = HEAP32[$LPC_order518>>2]|0; + $cmp519 = ($328|0)==(16); + if ($cmp519) { + $329 = $LPC_pred_Q10; + $330 = $i; + $add522 = (16 + ($330))|0; + $sub523 = (($add522) - 11)|0; + $arrayidx524 = (($vla6) + ($sub523<<2)|0); + $331 = HEAP32[$arrayidx524>>2]|0; + $shr525 = $331 >> 16; + $arrayidx526 = ((($A_Q12_tmp)) + 20|0); + $332 = HEAP16[$arrayidx526>>1]|0; + $conv527 = $332 << 16 >> 16; + $mul528 = Math_imul($shr525, $conv527)|0; + $333 = $i; + $add529 = (16 + ($333))|0; + $sub530 = (($add529) - 11)|0; + $arrayidx531 = (($vla6) + ($sub530<<2)|0); + $334 = HEAP32[$arrayidx531>>2]|0; + $and532 = $334 & 65535; + $arrayidx533 = ((($A_Q12_tmp)) + 20|0); + $335 = HEAP16[$arrayidx533>>1]|0; + $conv534 = $335 << 16 >> 16; + $mul535 = Math_imul($and532, $conv534)|0; + $shr536 = $mul535 >> 16; + $add537 = (($mul528) + ($shr536))|0; + $add538 = (($329) + ($add537))|0; + $LPC_pred_Q10 = $add538; + $336 = $LPC_pred_Q10; + $337 = $i; + $add539 = (16 + ($337))|0; + $sub540 = (($add539) - 12)|0; + $arrayidx541 = (($vla6) + ($sub540<<2)|0); + $338 = HEAP32[$arrayidx541>>2]|0; + $shr542 = $338 >> 16; + $arrayidx543 = ((($A_Q12_tmp)) + 22|0); + $339 = HEAP16[$arrayidx543>>1]|0; + $conv544 = $339 << 16 >> 16; + $mul545 = Math_imul($shr542, $conv544)|0; + $340 = $i; + $add546 = (16 + ($340))|0; + $sub547 = (($add546) - 12)|0; + $arrayidx548 = (($vla6) + ($sub547<<2)|0); + $341 = HEAP32[$arrayidx548>>2]|0; + $and549 = $341 & 65535; + $arrayidx550 = ((($A_Q12_tmp)) + 22|0); + $342 = HEAP16[$arrayidx550>>1]|0; + $conv551 = $342 << 16 >> 16; + $mul552 = Math_imul($and549, $conv551)|0; + $shr553 = $mul552 >> 16; + $add554 = (($mul545) + ($shr553))|0; + $add555 = (($336) + ($add554))|0; + $LPC_pred_Q10 = $add555; + $343 = $LPC_pred_Q10; + $344 = $i; + $add556 = (16 + ($344))|0; + $sub557 = (($add556) - 13)|0; + $arrayidx558 = (($vla6) + ($sub557<<2)|0); + $345 = HEAP32[$arrayidx558>>2]|0; + $shr559 = $345 >> 16; + $arrayidx560 = ((($A_Q12_tmp)) + 24|0); + $346 = HEAP16[$arrayidx560>>1]|0; + $conv561 = $346 << 16 >> 16; + $mul562 = Math_imul($shr559, $conv561)|0; + $347 = $i; + $add563 = (16 + ($347))|0; + $sub564 = (($add563) - 13)|0; + $arrayidx565 = (($vla6) + ($sub564<<2)|0); + $348 = HEAP32[$arrayidx565>>2]|0; + $and566 = $348 & 65535; + $arrayidx567 = ((($A_Q12_tmp)) + 24|0); + $349 = HEAP16[$arrayidx567>>1]|0; + $conv568 = $349 << 16 >> 16; + $mul569 = Math_imul($and566, $conv568)|0; + $shr570 = $mul569 >> 16; + $add571 = (($mul562) + ($shr570))|0; + $add572 = (($343) + ($add571))|0; + $LPC_pred_Q10 = $add572; + $350 = $LPC_pred_Q10; + $351 = $i; + $add573 = (16 + ($351))|0; + $sub574 = (($add573) - 14)|0; + $arrayidx575 = (($vla6) + ($sub574<<2)|0); + $352 = HEAP32[$arrayidx575>>2]|0; + $shr576 = $352 >> 16; + $arrayidx577 = ((($A_Q12_tmp)) + 26|0); + $353 = HEAP16[$arrayidx577>>1]|0; + $conv578 = $353 << 16 >> 16; + $mul579 = Math_imul($shr576, $conv578)|0; + $354 = $i; + $add580 = (16 + ($354))|0; + $sub581 = (($add580) - 14)|0; + $arrayidx582 = (($vla6) + ($sub581<<2)|0); + $355 = HEAP32[$arrayidx582>>2]|0; + $and583 = $355 & 65535; + $arrayidx584 = ((($A_Q12_tmp)) + 26|0); + $356 = HEAP16[$arrayidx584>>1]|0; + $conv585 = $356 << 16 >> 16; + $mul586 = Math_imul($and583, $conv585)|0; + $shr587 = $mul586 >> 16; + $add588 = (($mul579) + ($shr587))|0; + $add589 = (($350) + ($add588))|0; + $LPC_pred_Q10 = $add589; + $357 = $LPC_pred_Q10; + $358 = $i; + $add590 = (16 + ($358))|0; + $sub591 = (($add590) - 15)|0; + $arrayidx592 = (($vla6) + ($sub591<<2)|0); + $359 = HEAP32[$arrayidx592>>2]|0; + $shr593 = $359 >> 16; + $arrayidx594 = ((($A_Q12_tmp)) + 28|0); + $360 = HEAP16[$arrayidx594>>1]|0; + $conv595 = $360 << 16 >> 16; + $mul596 = Math_imul($shr593, $conv595)|0; + $361 = $i; + $add597 = (16 + ($361))|0; + $sub598 = (($add597) - 15)|0; + $arrayidx599 = (($vla6) + ($sub598<<2)|0); + $362 = HEAP32[$arrayidx599>>2]|0; + $and600 = $362 & 65535; + $arrayidx601 = ((($A_Q12_tmp)) + 28|0); + $363 = HEAP16[$arrayidx601>>1]|0; + $conv602 = $363 << 16 >> 16; + $mul603 = Math_imul($and600, $conv602)|0; + $shr604 = $mul603 >> 16; + $add605 = (($mul596) + ($shr604))|0; + $add606 = (($357) + ($add605))|0; + $LPC_pred_Q10 = $add606; + $364 = $LPC_pred_Q10; + $365 = $i; + $add607 = (16 + ($365))|0; + $sub608 = (($add607) - 16)|0; + $arrayidx609 = (($vla6) + ($sub608<<2)|0); + $366 = HEAP32[$arrayidx609>>2]|0; + $shr610 = $366 >> 16; + $arrayidx611 = ((($A_Q12_tmp)) + 30|0); + $367 = HEAP16[$arrayidx611>>1]|0; + $conv612 = $367 << 16 >> 16; + $mul613 = Math_imul($shr610, $conv612)|0; + $368 = $i; + $add614 = (16 + ($368))|0; + $sub615 = (($add614) - 16)|0; + $arrayidx616 = (($vla6) + ($sub615<<2)|0); + $369 = HEAP32[$arrayidx616>>2]|0; + $and617 = $369 & 65535; + $arrayidx618 = ((($A_Q12_tmp)) + 30|0); + $370 = HEAP16[$arrayidx618>>1]|0; + $conv619 = $370 << 16 >> 16; + $mul620 = Math_imul($and617, $conv619)|0; + $shr621 = $mul620 >> 16; + $add622 = (($mul613) + ($shr621))|0; + $add623 = (($364) + ($add622))|0; + $LPC_pred_Q10 = $add623; + } + $371 = $pres_Q14; + $372 = $i; + $arrayidx625 = (($371) + ($372<<2)|0); + $373 = HEAP32[$arrayidx625>>2]|0; + $374 = $LPC_pred_Q10; + $shl626 = $374 << 4; + $add627 = (($373) + ($shl626))|0; + $375 = $i; + $add628 = (16 + ($375))|0; + $arrayidx629 = (($vla6) + ($add628<<2)|0); + HEAP32[$arrayidx629>>2] = $add627; + $376 = $i; + $add630 = (16 + ($376))|0; + $arrayidx631 = (($vla6) + ($add630<<2)|0); + $377 = HEAP32[$arrayidx631>>2]|0; + $shr632 = $377 >> 16; + $378 = $Gain_Q10; + $conv633 = $378&65535; + $conv634 = $conv633 << 16 >> 16; + $mul635 = Math_imul($shr632, $conv634)|0; + $379 = $i; + $add636 = (16 + ($379))|0; + $arrayidx637 = (($vla6) + ($add636<<2)|0); + $380 = HEAP32[$arrayidx637>>2]|0; + $and638 = $380 & 65535; + $381 = $Gain_Q10; + $conv639 = $381&65535; + $conv640 = $conv639 << 16 >> 16; + $mul641 = Math_imul($and638, $conv640)|0; + $shr642 = $mul641 >> 16; + $add643 = (($mul635) + ($shr642))|0; + $382 = $i; + $add644 = (16 + ($382))|0; + $arrayidx645 = (($vla6) + ($add644<<2)|0); + $383 = HEAP32[$arrayidx645>>2]|0; + $384 = $Gain_Q10; + $shr646 = $384 >> 15; + $add647 = (($shr646) + 1)|0; + $shr648 = $add647 >> 1; + $mul649 = Math_imul($383, $shr648)|0; + $add650 = (($add643) + ($mul649))|0; + $shr651 = $add650 >> 7; + $add652 = (($shr651) + 1)|0; + $shr653 = $add652 >> 1; + $cmp654 = ($shr653|0)>(32767); + if ($cmp654) { + $cond709 = 32767; + } else { + $385 = $i; + $add656 = (16 + ($385))|0; + $arrayidx657 = (($vla6) + ($add656<<2)|0); + $386 = HEAP32[$arrayidx657>>2]|0; + $shr658 = $386 >> 16; + $387 = $Gain_Q10; + $conv659 = $387&65535; + $conv660 = $conv659 << 16 >> 16; + $mul661 = Math_imul($shr658, $conv660)|0; + $388 = $i; + $add662 = (16 + ($388))|0; + $arrayidx663 = (($vla6) + ($add662<<2)|0); + $389 = HEAP32[$arrayidx663>>2]|0; + $and664 = $389 & 65535; + $390 = $Gain_Q10; + $conv665 = $390&65535; + $conv666 = $conv665 << 16 >> 16; + $mul667 = Math_imul($and664, $conv666)|0; + $shr668 = $mul667 >> 16; + $add669 = (($mul661) + ($shr668))|0; + $391 = $i; + $add670 = (16 + ($391))|0; + $arrayidx671 = (($vla6) + ($add670<<2)|0); + $392 = HEAP32[$arrayidx671>>2]|0; + $393 = $Gain_Q10; + $shr672 = $393 >> 15; + $add673 = (($shr672) + 1)|0; + $shr674 = $add673 >> 1; + $mul675 = Math_imul($392, $shr674)|0; + $add676 = (($add669) + ($mul675))|0; + $shr677 = $add676 >> 7; + $add678 = (($shr677) + 1)|0; + $shr679 = $add678 >> 1; + $cmp680 = ($shr679|0)<(-32768); + if ($cmp680) { + $cond709 = -32768; + } else { + $394 = $i; + $add684 = (16 + ($394))|0; + $arrayidx685 = (($vla6) + ($add684<<2)|0); + $395 = HEAP32[$arrayidx685>>2]|0; + $shr686 = $395 >> 16; + $396 = $Gain_Q10; + $conv687 = $396&65535; + $conv688 = $conv687 << 16 >> 16; + $mul689 = Math_imul($shr686, $conv688)|0; + $397 = $i; + $add690 = (16 + ($397))|0; + $arrayidx691 = (($vla6) + ($add690<<2)|0); + $398 = HEAP32[$arrayidx691>>2]|0; + $and692 = $398 & 65535; + $399 = $Gain_Q10; + $conv693 = $399&65535; + $conv694 = $conv693 << 16 >> 16; + $mul695 = Math_imul($and692, $conv694)|0; + $shr696 = $mul695 >> 16; + $add697 = (($mul689) + ($shr696))|0; + $400 = $i; + $add698 = (16 + ($400))|0; + $arrayidx699 = (($vla6) + ($add698<<2)|0); + $401 = HEAP32[$arrayidx699>>2]|0; + $402 = $Gain_Q10; + $shr700 = $402 >> 15; + $add701 = (($shr700) + 1)|0; + $shr702 = $add701 >> 1; + $mul703 = Math_imul($401, $shr702)|0; + $add704 = (($add697) + ($mul703))|0; + $shr705 = $add704 >> 7; + $add706 = (($shr705) + 1)|0; + $shr707 = $add706 >> 1; + $cond709 = $shr707; + } + } + $conv710 = $cond709&65535; + $403 = $pxq; + $404 = $i; + $arrayidx711 = (($403) + ($404<<1)|0); + HEAP16[$arrayidx711>>1] = $conv710; + $405 = $i; + $inc713 = (($405) + 1)|0; + $i = $inc713; + } + $406 = $psDec$addr; + $subfr_length715 = ((($406)) + 2332|0); + $407 = HEAP32[$subfr_length715>>2]|0; + $arrayidx716 = (($vla6) + ($407<<2)|0); + dest=$vla6; src=$arrayidx716; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $408 = $psDec$addr; + $subfr_length717 = ((($408)) + 2332|0); + $409 = HEAP32[$subfr_length717>>2]|0; + $410 = $pexc_Q14; + $add$ptr = (($410) + ($409<<2)|0); + $pexc_Q14 = $add$ptr; + $411 = $psDec$addr; + $subfr_length718 = ((($411)) + 2332|0); + $412 = HEAP32[$subfr_length718>>2]|0; + $413 = $pxq; + $add$ptr719 = (($413) + ($412<<1)|0); + $pxq = $add$ptr719; + $414 = $k; + $inc721 = (($414) + 1)|0; + $k = $inc721; + } + $415 = $psDec$addr; + $sLPC_Q14_buf723 = ((($415)) + 1284|0); + dest=$sLPC_Q14_buf723; src=$vla6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $416 = $saved_stack; + _llvm_stackrestore(($416|0)); + STACKTOP = sp;return; +} +function _silk_INVERSE32_varQ_541($b32,$Qres) { + $b32 = $b32|0; + $Qres = $Qres|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $Qres$addr = 0, $add = 0; + var $add20 = 0, $add21 = 0, $add23 = 0, $add26 = 0, $and = 0, $and15 = 0, $b32$addr = 0, $b32_inv = 0, $b32_nrm = 0, $b_headrm = 0, $call = 0, $cmp = 0, $cmp29 = 0, $cmp35 = 0, $cmp40 = 0, $cmp48 = 0, $cmp61 = 0, $cmp69 = 0, $cmp83 = 0, $cond = 0; + var $cond80 = 0, $conv = 0, $conv12 = 0, $conv13 = 0, $conv16 = 0, $conv17 = 0, $conv4 = 0, $conv5 = 0, $conv6 = 0, $div = 0, $err_Q32 = 0, $lshift = 0, $mul = 0, $mul14 = 0, $mul18 = 0, $mul25 = 0, $mul7 = 0, $result = 0, $retval = 0, $shl = 0; + var $shl10 = 0, $shl2 = 0, $shl82 = 0, $shr = 0, $shr11 = 0, $shr19 = 0, $shr22 = 0, $shr24 = 0, $shr3 = 0, $shr32 = 0, $shr34 = 0, $shr39 = 0, $shr44 = 0, $shr47 = 0, $shr52 = 0, $shr60 = 0, $shr65 = 0, $shr68 = 0, $shr73 = 0, $shr8 = 0; + var $shr86 = 0, $sub = 0, $sub1 = 0, $sub27 = 0, $sub28 = 0, $sub31 = 0, $sub33 = 0, $sub38 = 0, $sub43 = 0, $sub46 = 0, $sub51 = 0, $sub64 = 0, $sub67 = 0, $sub72 = 0, $sub81 = 0, $sub9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $b32$addr = $b32; + $Qres$addr = $Qres; + $0 = $b32$addr; + $cmp = ($0|0)>(0); + $1 = $b32$addr; + $sub = (0 - ($1))|0; + $cond = $cmp ? $1 : $sub; + $call = (_silk_CLZ32_543($cond)|0); + $sub1 = (($call) - 1)|0; + $b_headrm = $sub1; + $2 = $b32$addr; + $3 = $b_headrm; + $shl = $2 << $3; + $b32_nrm = $shl; + $4 = $b32_nrm; + $shr = $4 >> 16; + $div = (536870911 / ($shr|0))&-1; + $b32_inv = $div; + $5 = $b32_inv; + $shl2 = $5 << 16; + $result = $shl2; + $6 = $b32_nrm; + $shr3 = $6 >> 16; + $7 = $b32_inv; + $conv = $7&65535; + $conv4 = $conv << 16 >> 16; + $mul = Math_imul($shr3, $conv4)|0; + $8 = $b32_nrm; + $and = $8 & 65535; + $9 = $b32_inv; + $conv5 = $9&65535; + $conv6 = $conv5 << 16 >> 16; + $mul7 = Math_imul($and, $conv6)|0; + $shr8 = $mul7 >> 16; + $add = (($mul) + ($shr8))|0; + $sub9 = (536870912 - ($add))|0; + $shl10 = $sub9 << 3; + $err_Q32 = $shl10; + $10 = $result; + $11 = $err_Q32; + $shr11 = $11 >> 16; + $12 = $b32_inv; + $conv12 = $12&65535; + $conv13 = $conv12 << 16 >> 16; + $mul14 = Math_imul($shr11, $conv13)|0; + $13 = $err_Q32; + $and15 = $13 & 65535; + $14 = $b32_inv; + $conv16 = $14&65535; + $conv17 = $conv16 << 16 >> 16; + $mul18 = Math_imul($and15, $conv17)|0; + $shr19 = $mul18 >> 16; + $add20 = (($mul14) + ($shr19))|0; + $add21 = (($10) + ($add20))|0; + $15 = $err_Q32; + $16 = $b32_inv; + $shr22 = $16 >> 15; + $add23 = (($shr22) + 1)|0; + $shr24 = $add23 >> 1; + $mul25 = Math_imul($15, $shr24)|0; + $add26 = (($add21) + ($mul25))|0; + $result = $add26; + $17 = $b_headrm; + $sub27 = (61 - ($17))|0; + $18 = $Qres$addr; + $sub28 = (($sub27) - ($18))|0; + $lshift = $sub28; + $19 = $lshift; + $cmp29 = ($19|0)<=(0); + $20 = $lshift; + if (!($cmp29)) { + $cmp83 = ($20|0)<(32); + if ($cmp83) { + $35 = $result; + $36 = $lshift; + $shr86 = $35 >> $36; + $retval = $shr86; + $37 = $retval; + STACKTOP = sp;return ($37|0); + } else { + $retval = 0; + $37 = $retval; + STACKTOP = sp;return ($37|0); + } + } + $sub31 = (0 - ($20))|0; + $shr32 = -2147483648 >> $sub31; + $21 = $lshift; + $sub33 = (0 - ($21))|0; + $shr34 = 2147483647 >> $sub33; + $cmp35 = ($shr32|0)>($shr34|0); + $22 = $result; + $23 = $lshift; + $sub38 = (0 - ($23))|0; + do { + if ($cmp35) { + $shr39 = -2147483648 >> $sub38; + $cmp40 = ($22|0)>($shr39|0); + if ($cmp40) { + $24 = $lshift; + $sub43 = (0 - ($24))|0; + $shr44 = -2147483648 >> $sub43; + $cond80 = $shr44; + break; + } + $25 = $result; + $26 = $lshift; + $sub46 = (0 - ($26))|0; + $shr47 = 2147483647 >> $sub46; + $cmp48 = ($25|0)<($shr47|0); + if ($cmp48) { + $27 = $lshift; + $sub51 = (0 - ($27))|0; + $shr52 = 2147483647 >> $sub51; + $cond80 = $shr52; + break; + } else { + $28 = $result; + $cond80 = $28; + break; + } + } else { + $shr60 = 2147483647 >> $sub38; + $cmp61 = ($22|0)>($shr60|0); + if ($cmp61) { + $29 = $lshift; + $sub64 = (0 - ($29))|0; + $shr65 = 2147483647 >> $sub64; + $cond80 = $shr65; + break; + } + $30 = $result; + $31 = $lshift; + $sub67 = (0 - ($31))|0; + $shr68 = -2147483648 >> $sub67; + $cmp69 = ($30|0)<($shr68|0); + if ($cmp69) { + $32 = $lshift; + $sub72 = (0 - ($32))|0; + $shr73 = -2147483648 >> $sub72; + $cond80 = $shr73; + break; + } else { + $33 = $result; + $cond80 = $33; + break; + } + } + } while(0); + $34 = $lshift; + $sub81 = (0 - ($34))|0; + $shl82 = $cond80 << $sub81; + $retval = $shl82; + $37 = $retval; + STACKTOP = sp;return ($37|0); +} +function _silk_DIV32_varQ_542($a32,$b32,$Qres) { + $a32 = $a32|0; + $b32 = $b32|0; + $Qres = $Qres|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $Qres$addr = 0, $a32$addr = 0, $a32_nrm = 0, $a_headrm = 0, $add = 0, $add33 = 0, $add34 = 0, $add35 = 0, $and = 0; + var $and28 = 0, $b32$addr = 0, $b32_inv = 0, $b32_nrm = 0, $b_headrm = 0, $call = 0, $call8 = 0, $cmp = 0, $cmp2 = 0, $cmp38 = 0, $cmp44 = 0, $cmp49 = 0, $cmp57 = 0, $cmp70 = 0, $cmp78 = 0, $cmp92 = 0, $cond = 0, $cond7 = 0, $cond89 = 0, $conv = 0; + var $conv12 = 0, $conv13 = 0, $conv14 = 0, $conv25 = 0, $conv26 = 0, $conv29 = 0, $conv30 = 0, $div = 0, $lshift = 0, $mul = 0, $mul15 = 0, $mul27 = 0, $mul31 = 0, $result = 0, $retval = 0, $shl = 0, $shl10 = 0, $shl22 = 0, $shl91 = 0, $shr = 0; + var $shr11 = 0, $shr16 = 0, $shr24 = 0, $shr32 = 0, $shr41 = 0, $shr43 = 0, $shr48 = 0, $shr53 = 0, $shr56 = 0, $shr61 = 0, $shr69 = 0, $shr74 = 0, $shr77 = 0, $shr82 = 0, $shr95 = 0, $sub = 0, $sub1 = 0, $sub23 = 0, $sub36 = 0, $sub37 = 0; + var $sub40 = 0, $sub42 = 0, $sub47 = 0, $sub5 = 0, $sub52 = 0, $sub55 = 0, $sub60 = 0, $sub73 = 0, $sub76 = 0, $sub81 = 0, $sub9 = 0, $sub90 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $a32$addr = $a32; + $b32$addr = $b32; + $Qres$addr = $Qres; + $0 = $a32$addr; + $cmp = ($0|0)>(0); + $1 = $a32$addr; + $sub = (0 - ($1))|0; + $cond = $cmp ? $1 : $sub; + $call = (_silk_CLZ32_543($cond)|0); + $sub1 = (($call) - 1)|0; + $a_headrm = $sub1; + $2 = $a32$addr; + $3 = $a_headrm; + $shl = $2 << $3; + $a32_nrm = $shl; + $4 = $b32$addr; + $cmp2 = ($4|0)>(0); + $5 = $b32$addr; + $sub5 = (0 - ($5))|0; + $cond7 = $cmp2 ? $5 : $sub5; + $call8 = (_silk_CLZ32_543($cond7)|0); + $sub9 = (($call8) - 1)|0; + $b_headrm = $sub9; + $6 = $b32$addr; + $7 = $b_headrm; + $shl10 = $6 << $7; + $b32_nrm = $shl10; + $8 = $b32_nrm; + $shr = $8 >> 16; + $div = (536870911 / ($shr|0))&-1; + $b32_inv = $div; + $9 = $a32_nrm; + $shr11 = $9 >> 16; + $10 = $b32_inv; + $conv = $10&65535; + $conv12 = $conv << 16 >> 16; + $mul = Math_imul($shr11, $conv12)|0; + $11 = $a32_nrm; + $and = $11 & 65535; + $12 = $b32_inv; + $conv13 = $12&65535; + $conv14 = $conv13 << 16 >> 16; + $mul15 = Math_imul($and, $conv14)|0; + $shr16 = $mul15 >> 16; + $add = (($mul) + ($shr16))|0; + $result = $add; + $13 = $a32_nrm; + $14 = $b32_nrm; + $15 = ($14|0)<(0); + $16 = $15 << 31 >> 31; + $17 = $result; + $18 = ($17|0)<(0); + $19 = $18 << 31 >> 31; + $20 = (___muldi3(($14|0),($16|0),($17|0),($19|0))|0); + $21 = tempRet0; + $22 = (_bitshift64Ashr(($20|0),($21|0),32)|0); + $23 = tempRet0; + $shl22 = $22 << 3; + $sub23 = (($13) - ($shl22))|0; + $a32_nrm = $sub23; + $24 = $result; + $25 = $a32_nrm; + $shr24 = $25 >> 16; + $26 = $b32_inv; + $conv25 = $26&65535; + $conv26 = $conv25 << 16 >> 16; + $mul27 = Math_imul($shr24, $conv26)|0; + $27 = $a32_nrm; + $and28 = $27 & 65535; + $28 = $b32_inv; + $conv29 = $28&65535; + $conv30 = $conv29 << 16 >> 16; + $mul31 = Math_imul($and28, $conv30)|0; + $shr32 = $mul31 >> 16; + $add33 = (($mul27) + ($shr32))|0; + $add34 = (($24) + ($add33))|0; + $result = $add34; + $29 = $a_headrm; + $add35 = (29 + ($29))|0; + $30 = $b_headrm; + $sub36 = (($add35) - ($30))|0; + $31 = $Qres$addr; + $sub37 = (($sub36) - ($31))|0; + $lshift = $sub37; + $32 = $lshift; + $cmp38 = ($32|0)<(0); + $33 = $lshift; + if (!($cmp38)) { + $cmp92 = ($33|0)<(32); + if ($cmp92) { + $48 = $result; + $49 = $lshift; + $shr95 = $48 >> $49; + $retval = $shr95; + $50 = $retval; + STACKTOP = sp;return ($50|0); + } else { + $retval = 0; + $50 = $retval; + STACKTOP = sp;return ($50|0); + } + } + $sub40 = (0 - ($33))|0; + $shr41 = -2147483648 >> $sub40; + $34 = $lshift; + $sub42 = (0 - ($34))|0; + $shr43 = 2147483647 >> $sub42; + $cmp44 = ($shr41|0)>($shr43|0); + $35 = $result; + $36 = $lshift; + $sub47 = (0 - ($36))|0; + do { + if ($cmp44) { + $shr48 = -2147483648 >> $sub47; + $cmp49 = ($35|0)>($shr48|0); + if ($cmp49) { + $37 = $lshift; + $sub52 = (0 - ($37))|0; + $shr53 = -2147483648 >> $sub52; + $cond89 = $shr53; + break; + } + $38 = $result; + $39 = $lshift; + $sub55 = (0 - ($39))|0; + $shr56 = 2147483647 >> $sub55; + $cmp57 = ($38|0)<($shr56|0); + if ($cmp57) { + $40 = $lshift; + $sub60 = (0 - ($40))|0; + $shr61 = 2147483647 >> $sub60; + $cond89 = $shr61; + break; + } else { + $41 = $result; + $cond89 = $41; + break; + } + } else { + $shr69 = 2147483647 >> $sub47; + $cmp70 = ($35|0)>($shr69|0); + if ($cmp70) { + $42 = $lshift; + $sub73 = (0 - ($42))|0; + $shr74 = 2147483647 >> $sub73; + $cond89 = $shr74; + break; + } + $43 = $result; + $44 = $lshift; + $sub76 = (0 - ($44))|0; + $shr77 = -2147483648 >> $sub76; + $cmp78 = ($43|0)<($shr77|0); + if ($cmp78) { + $45 = $lshift; + $sub81 = (0 - ($45))|0; + $shr82 = -2147483648 >> $sub81; + $cond89 = $shr82; + break; + } else { + $46 = $result; + $cond89 = $46; + break; + } + } + } while(0); + $47 = $lshift; + $sub90 = (0 - ($47))|0; + $shl91 = $cond89 << $sub90; + $retval = $shl91; + $50 = $retval; + STACKTOP = sp;return ($50|0); +} +function _silk_CLZ32_543($in32) { + $in32 = $in32|0; + var $0 = 0, $1 = 0, $2 = 0, $cond = 0, $in32$addr = 0, $sub = 0, $sub1 = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $in32$addr = $in32; + $0 = $in32$addr; + $tobool = ($0|0)!=(0); + if (!($tobool)) { + $cond = 32; + STACKTOP = sp;return ($cond|0); + } + $1 = $in32$addr; + $2 = (Math_clz32(($1|0))|0); + $sub = (32 - ($2))|0; + $sub1 = (32 - ($sub))|0; + $cond = $sub1; + STACKTOP = sp;return ($cond|0); +} +function _malloc($bytes) { + $bytes = $bytes|0; + var $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i179 = 0, $$pre$i182 = 0, $$pre$i44$i = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i180Z2D = 0, $$pre$phi$i45$iZ2D = 0, $$pre$phi$iZ2D = 0, $$pre$phiZ2D = 0, $$pre6$i$i = 0, $$sink$i = 0, $$sink$i$i = 0, $$sink$i158 = 0, $$sink2$i = 0, $$sink2$i176 = 0, $$sink5$i = 0, $$v$0$i = 0, $0 = 0; + var $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; + var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; + var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0; + var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0; + var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; + var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; + var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; + var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; + var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; + var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F$0$i$i = 0, $F104$0 = 0, $F197$0$i = 0; + var $F224$0$i$i = 0, $F290$0$i = 0, $I252$0$i$i = 0, $I316$0$i = 0, $I57$0$i$i = 0, $K105$0$i$i = 0, $K305$0$i$i = 0, $K373$0$i = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i169 = 0, $R$3$i = 0, $R$3$i$i = 0, $R$3$i172 = 0, $RP$1$i = 0, $RP$1$i$i = 0, $RP$1$i168 = 0, $T$0$i = 0, $T$0$i$i = 0, $T$0$i46$i = 0; + var $add$i = 0, $add$i$i = 0, $add$i148 = 0, $add$i183 = 0, $add$ptr = 0, $add$ptr$i = 0, $add$ptr$i$i = 0, $add$ptr$i$i$i = 0, $add$ptr$i13$i = 0, $add$ptr$i162 = 0, $add$ptr$i19$i = 0, $add$ptr$i196 = 0, $add$ptr$i3$i$i = 0, $add$ptr$i48$i = 0, $add$ptr14$i$i = 0, $add$ptr15$i$i = 0, $add$ptr16$i$i = 0, $add$ptr166 = 0, $add$ptr169 = 0, $add$ptr17$i$i = 0; + var $add$ptr178 = 0, $add$ptr181$i = 0, $add$ptr182 = 0, $add$ptr189$i = 0, $add$ptr190$i = 0, $add$ptr193 = 0, $add$ptr199 = 0, $add$ptr2$i$i = 0, $add$ptr205$i$i = 0, $add$ptr212$i$i = 0, $add$ptr225$i = 0, $add$ptr227$i = 0, $add$ptr24$i$i = 0, $add$ptr262$i = 0, $add$ptr269$i = 0, $add$ptr273$i = 0, $add$ptr282$i = 0, $add$ptr3$i$i = 0, $add$ptr30$i$i = 0, $add$ptr369$i$i = 0; + var $add$ptr4$i$i = 0, $add$ptr4$i$i$i = 0, $add$ptr4$i25$i = 0, $add$ptr4$i54$i = 0, $add$ptr441$i = 0, $add$ptr5$i$i = 0, $add$ptr6$i$i = 0, $add$ptr6$i$i$i = 0, $add$ptr6$i58$i = 0, $add$ptr7$i$i = 0, $add$ptr81$i$i = 0, $add$ptr95 = 0, $add$ptr98 = 0, $add10$i = 0, $add101$i = 0, $add110$i = 0, $add13$i = 0, $add14$i = 0, $add140$i = 0, $add144 = 0; + var $add150$i = 0, $add17$i = 0, $add17$i186 = 0, $add177$i = 0, $add18$i = 0, $add19$i = 0, $add2 = 0, $add20$i = 0, $add206$i$i = 0, $add212$i = 0, $add215$i = 0, $add22$i = 0, $add246$i = 0, $add26$i$i = 0, $add268$i = 0, $add269$i$i = 0, $add274$i$i = 0, $add278$i$i = 0, $add280$i$i = 0, $add283$i$i = 0; + var $add337$i = 0, $add342$i = 0, $add346$i = 0, $add348$i = 0, $add351$i = 0, $add46$i = 0, $add50 = 0, $add51$i = 0, $add54 = 0, $add54$i = 0, $add58 = 0, $add62 = 0, $add64 = 0, $add74$i$i = 0, $add77$i = 0, $add78$i = 0, $add79$i$i = 0, $add8 = 0, $add82$i = 0, $add83$i$i = 0; + var $add85$i$i = 0, $add86$i = 0, $add88$i$i = 0, $add9$i = 0, $add90$i = 0, $add92$i = 0, $and = 0, $and$i = 0, $and$i$i = 0, $and$i$i$i = 0, $and$i14$i = 0, $and$i145 = 0, $and$i20$i = 0, $and$i49$i = 0, $and100$i = 0, $and103$i = 0, $and104$i = 0, $and106 = 0, $and11$add51$i = 0, $and11$i = 0; + var $and119$i$i = 0, $and12$i = 0, $and13$i = 0, $and13$i$i = 0, $and133$i$i = 0, $and14 = 0, $and145 = 0, $and17$i = 0, $and194$i = 0, $and194$i207 = 0, $and199$i = 0, $and209$i$i = 0, $and21$i = 0, $and21$i151 = 0, $and227$i$i = 0, $and236$i = 0, $and264$i$i = 0, $and268$i$i = 0, $and273$i$i = 0, $and282$i$i = 0; + var $and29$i = 0, $and292$i = 0, $and295$i$i = 0, $and3$i = 0, $and3$i$i = 0, $and3$i$i$i = 0, $and3$i23$i = 0, $and3$i52$i = 0, $and30$i = 0, $and318$i$i = 0, $and32$i = 0, $and32$i$i = 0, $and33$i$i = 0, $and331$i = 0, $and336$i = 0, $and341$i = 0, $and350$i = 0, $and363$i = 0, $and37$i$i = 0, $and387$i = 0; + var $and4 = 0, $and40$i$i = 0, $and41 = 0, $and42$i = 0, $and43 = 0, $and46 = 0, $and49 = 0, $and49$i = 0, $and49$i$i = 0, $and53 = 0, $and57 = 0, $and6$i = 0, $and6$i$i = 0, $and6$i10$i = 0, $and6$i26$i = 0, $and61 = 0, $and64$i = 0, $and68$i = 0, $and69$i$i = 0, $and7 = 0; + var $and73$i = 0, $and73$i$i = 0, $and74 = 0, $and77$i = 0, $and78$i$i = 0, $and8$i = 0, $and80$i = 0, $and81$i = 0, $and85$i = 0, $and87$i$i = 0, $and89$i = 0, $and9$i = 0, $and96$i$i = 0, $arrayidx = 0, $arrayidx$i = 0, $arrayidx$i$i = 0, $arrayidx$i152 = 0, $arrayidx$i36$i = 0, $arrayidx103 = 0, $arrayidx103$i$i = 0; + var $arrayidx106$i = 0, $arrayidx107$i$i = 0, $arrayidx113$i = 0, $arrayidx113$i159 = 0, $arrayidx121$i = 0, $arrayidx123$i$i = 0, $arrayidx126$i$i = 0, $arrayidx137$i = 0, $arrayidx143$i$i = 0, $arrayidx148$i = 0, $arrayidx151$i = 0, $arrayidx151$i$i = 0, $arrayidx154$i = 0, $arrayidx155$i = 0, $arrayidx161$i = 0, $arrayidx165$i = 0, $arrayidx165$i170 = 0, $arrayidx178$i$i = 0, $arrayidx184$i = 0, $arrayidx184$i$i = 0; + var $arrayidx195$i$i = 0, $arrayidx196$i = 0, $arrayidx204$i = 0, $arrayidx212$i = 0, $arrayidx223$i$i = 0, $arrayidx228$i = 0, $arrayidx23$i = 0, $arrayidx233$i = 0, $arrayidx239$i = 0, $arrayidx245$i = 0, $arrayidx256$i = 0, $arrayidx27$i = 0, $arrayidx276$i = 0, $arrayidx287$i$i = 0, $arrayidx289$i = 0, $arrayidx290$i$i = 0, $arrayidx325$i$i = 0, $arrayidx355$i = 0, $arrayidx358$i = 0, $arrayidx394$i = 0; + var $arrayidx40$i = 0, $arrayidx44$i = 0, $arrayidx61$i = 0, $arrayidx65$i = 0, $arrayidx66 = 0, $arrayidx71$i = 0, $arrayidx75$i = 0, $arrayidx91$i$i = 0, $arrayidx92$i$i = 0, $arrayidx94$i = 0, $arrayidx94$i156 = 0, $arrayidx96$i$i = 0, $bk = 0, $bk$i = 0, $bk$i$i = 0, $bk$i164 = 0, $bk$i34$i = 0, $bk102$i$i = 0, $bk122 = 0, $bk124 = 0; + var $bk136$i = 0, $bk139$i$i = 0, $bk158$i$i = 0, $bk161$i$i = 0, $bk218$i = 0, $bk220$i = 0, $bk246$i$i = 0, $bk248$i$i = 0, $bk302$i$i = 0, $bk311$i = 0, $bk313$i = 0, $bk338$i$i = 0, $bk357$i$i = 0, $bk360$i$i = 0, $bk370$i = 0, $bk407$i = 0, $bk429$i = 0, $bk43$i$i = 0, $bk432$i = 0, $bk47$i = 0; + var $bk55$i$i = 0, $bk67$i$i = 0, $bk74$i$i = 0, $bk78 = 0, $bk82$i$i = 0, $br$2$ph$i = 0, $call107$i = 0, $call131$i = 0, $call132$i = 0, $call275$i = 0, $call37$i = 0, $call68$i = 0, $call83$i = 0, $child$i$i = 0, $child166$i$i = 0, $child289$i$i = 0, $child357$i = 0, $cmp = 0, $cmp$i = 0, $cmp$i$i$i = 0; + var $cmp$i11$i = 0, $cmp$i142 = 0, $cmp$i15$i = 0, $cmp$i181 = 0, $cmp$i21$i = 0, $cmp$i4$i$i = 0, $cmp$i50$i = 0, $cmp$i9$i = 0, $cmp1 = 0, $cmp1$i = 0, $cmp10 = 0, $cmp100$i$i = 0, $cmp102$i = 0, $cmp104$i$i = 0, $cmp105$i = 0, $cmp106$i$i = 0, $cmp107$i = 0, $cmp107$i157 = 0, $cmp108$i = 0, $cmp108$i$i = 0; + var $cmp112$i$i = 0, $cmp113 = 0, $cmp114$i = 0, $cmp116$i = 0, $cmp118$i = 0, $cmp119$i = 0, $cmp12$i = 0, $cmp120$i$i = 0, $cmp120$i41$i = 0, $cmp121$i = 0, $cmp123$i = 0, $cmp124$i$i = 0, $cmp126$i = 0, $cmp127$i = 0, $cmp128 = 0, $cmp128$i = 0, $cmp128$i$i = 0, $cmp130$i = 0, $cmp133$i = 0, $cmp133$i$i = 0; + var $cmp133$i199 = 0, $cmp135$i = 0, $cmp137$i = 0, $cmp137$i$i = 0, $cmp137$i200 = 0, $cmp138$i = 0, $cmp139 = 0, $cmp140$i = 0, $cmp141$i = 0, $cmp142$i = 0, $cmp144$i$i = 0, $cmp146 = 0, $cmp147$i = 0, $cmp14799$i = 0, $cmp15 = 0, $cmp15$i = 0, $cmp150$i$i = 0, $cmp151$i = 0, $cmp152$i = 0, $cmp153$i$i = 0; + var $cmp155$i = 0, $cmp156 = 0, $cmp156$i = 0, $cmp156$i$i = 0, $cmp157$i = 0, $cmp159$i = 0, $cmp159$i202 = 0, $cmp16 = 0, $cmp160$i$i = 0, $cmp162 = 0, $cmp162$i = 0, $cmp162$i203 = 0, $cmp166$i = 0, $cmp168$i$i = 0, $cmp171$i = 0, $cmp172$i$i = 0, $cmp174$i = 0, $cmp180$i = 0, $cmp185$i = 0, $cmp185$i$i = 0; + var $cmp186 = 0, $cmp186$i = 0, $cmp189$i$i = 0, $cmp19$i = 0, $cmp190$i = 0, $cmp191$i = 0, $cmp198$i = 0, $cmp2$i$i = 0, $cmp2$i$i$i = 0, $cmp20$i$i = 0, $cmp203$i = 0, $cmp205$i = 0, $cmp208$i = 0, $cmp209$i = 0, $cmp21$i = 0, $cmp215$i$i = 0, $cmp217$i = 0, $cmp218$i = 0, $cmp221$i = 0, $cmp224$i = 0; + var $cmp228$i = 0, $cmp229$i = 0, $cmp233$i = 0, $cmp236$i$i = 0, $cmp24$i = 0, $cmp24$i$i = 0, $cmp246$i = 0, $cmp250$i = 0, $cmp254$i$i = 0, $cmp257$i = 0, $cmp258$i$i = 0, $cmp26$i = 0, $cmp265$i = 0, $cmp27$i$i = 0, $cmp28$i = 0, $cmp28$i$i = 0, $cmp284$i = 0, $cmp287$i = 0, $cmp29 = 0, $cmp3$i$i = 0; + var $cmp301$i = 0, $cmp306$i$i = 0, $cmp31 = 0, $cmp319$i = 0, $cmp319$i$i = 0, $cmp32$i = 0, $cmp32$i187 = 0, $cmp323$i = 0, $cmp327$i$i = 0, $cmp33$i = 0, $cmp332$i$i = 0, $cmp34$i = 0, $cmp34$i$i = 0, $cmp346$i$i = 0, $cmp35$i = 0, $cmp350$i$i = 0, $cmp36$i = 0, $cmp36$i$i = 0, $cmp374$i = 0, $cmp38$i = 0; + var $cmp38$i$i = 0, $cmp388$i = 0, $cmp396$i = 0, $cmp4$i = 0, $cmp40$i = 0, $cmp401$i = 0, $cmp41$i$i = 0, $cmp418$i = 0, $cmp42$i$i = 0, $cmp422$i = 0, $cmp43$i = 0, $cmp44$i$i = 0, $cmp45$i = 0, $cmp45$i155 = 0, $cmp46$i = 0, $cmp46$i$i = 0, $cmp46$i37$i = 0, $cmp48$i = 0, $cmp49$i = 0, $cmp5 = 0; + var $cmp51$i = 0, $cmp54$i$i = 0, $cmp55$i = 0, $cmp55$i188 = 0, $cmp57$i = 0, $cmp57$i$i = 0, $cmp57$i189 = 0, $cmp59$i$i = 0, $cmp60$i = 0, $cmp60$i$i = 0, $cmp62$i = 0, $cmp63$i = 0, $cmp63$i$i = 0, $cmp65$i = 0, $cmp66$i = 0, $cmp66$i192 = 0, $cmp69$i = 0, $cmp7$i$i = 0, $cmp70 = 0, $cmp72$i = 0; + var $cmp75$i$i = 0, $cmp76 = 0, $cmp76$i = 0, $cmp79 = 0, $cmp81$i = 0, $cmp81$i$i = 0, $cmp81$i194 = 0, $cmp83$i$i = 0, $cmp85$i = 0, $cmp86$i$i = 0, $cmp89$i = 0, $cmp9$i$i = 0, $cmp90$i = 0, $cmp91$i = 0, $cmp93$i = 0, $cmp95$i = 0, $cmp96$i = 0, $cmp97$i = 0, $cmp97$i$i = 0, $cmp978$i = 0; + var $cmp99 = 0, $cond = 0, $cond$i = 0, $cond$i$i = 0, $cond$i$i$i = 0, $cond$i153 = 0, $cond$i17$i = 0, $cond$i24$i = 0, $cond$i53$i = 0, $cond115$i$i = 0, $cond13$i$i = 0, $cond15$i$i = 0, $cond3$i$i = 0, $cond315$i$i = 0, $cond383$i = 0, $cond4$i = 0, $fd$i = 0, $fd$i$i = 0, $fd$i165 = 0, $fd103$i$i = 0; + var $fd123 = 0, $fd139$i = 0, $fd140$i$i = 0, $fd148$i$i = 0, $fd160$i$i = 0, $fd219$i = 0, $fd247$i$i = 0, $fd303$i$i = 0, $fd312$i = 0, $fd339$i$i = 0, $fd344$i$i = 0, $fd359$i$i = 0, $fd371$i = 0, $fd408$i = 0, $fd416$i = 0, $fd431$i = 0, $fd50$i = 0, $fd54$i$i = 0, $fd59$i$i = 0, $fd68$pre$phi$i$iZ2D = 0; + var $fd69 = 0, $fd78$i$i = 0, $fd85$i$i = 0, $fd9 = 0, $head = 0, $head$i = 0, $head$i$i = 0, $head$i$i$i = 0, $head$i154 = 0, $head$i18$i = 0, $head$i30$i = 0, $head$i57$i = 0, $head118$i$i = 0, $head168 = 0, $head173 = 0, $head177 = 0, $head179 = 0, $head179$i = 0, $head182$i = 0, $head187$i = 0; + var $head189$i = 0, $head195 = 0, $head198 = 0, $head208$i$i = 0, $head211$i$i = 0, $head23$i$i = 0, $head25 = 0, $head26$i$i = 0, $head265$i = 0, $head268$i = 0, $head271$i = 0, $head274$i = 0, $head279$i = 0, $head281$i = 0, $head29$i = 0, $head29$i$i = 0, $head317$i$i = 0, $head32$i$i = 0, $head34$i$i = 0, $head386$i = 0; + var $head7$i$i = 0, $head7$i$i$i = 0, $head7$i59$i = 0, $head94 = 0, $head97 = 0, $head99$i = 0, $idx$0$i = 0, $index$i = 0, $index$i$i = 0, $index$i173 = 0, $index$i42$i = 0, $index288$i$i = 0, $index356$i = 0, $magic$i$i = 0, $nb$0 = 0, $neg = 0, $neg$i = 0, $neg$i$i = 0, $neg$i174 = 0, $neg$i185 = 0; + var $neg103$i = 0, $neg13 = 0, $neg132$i$i = 0, $neg48$i = 0, $neg73 = 0, $next$i = 0, $next$i$i = 0, $next$i$i$i = 0, $next231$i = 0, $not$cmp141$i = 0, $not$cmp495$i = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i190 = 0, $or$cond1$i = 0, $or$cond2$i = 0, $or$cond2$i193 = 0, $or$cond3$i = 0, $or$cond4$i = 0, $or$cond5$i = 0; + var $or$cond7$i = 0, $or$cond7$not$i = 0, $or$cond8$i = 0, $or$cond97$i = 0, $or$cond98$i = 0, $or$i = 0, $or$i$i = 0, $or$i$i$i = 0, $or$i198 = 0, $or$i56$i = 0, $or101$i$i = 0, $or110 = 0, $or167 = 0, $or172 = 0, $or176 = 0, $or178$i = 0, $or180 = 0, $or183$i = 0, $or186$i = 0, $or188$i = 0; + var $or19$i$i = 0, $or194 = 0, $or197 = 0, $or204$i = 0, $or210$i$i = 0, $or22$i$i = 0, $or23 = 0, $or232$i$i = 0, $or26 = 0, $or264$i = 0, $or267$i = 0, $or270$i = 0, $or275$i = 0, $or278$i = 0, $or28$i$i = 0, $or280$i = 0, $or297$i = 0, $or300$i$i = 0, $or33$i$i = 0, $or368$i = 0; + var $or40 = 0, $or44$i$i = 0, $or93 = 0, $or96 = 0, $parent$i = 0, $parent$i$i = 0, $parent$i163 = 0, $parent$i39$i = 0, $parent135$i = 0, $parent138$i$i = 0, $parent149$i = 0, $parent162$i$i = 0, $parent165$i$i = 0, $parent166$i = 0, $parent179$i$i = 0, $parent196$i$i = 0, $parent226$i = 0, $parent240$i = 0, $parent257$i = 0, $parent301$i$i = 0; + var $parent337$i$i = 0, $parent361$i$i = 0, $parent369$i = 0, $parent406$i = 0, $parent433$i = 0, $qsize$0$i$i = 0, $retval$0 = 0, $rsize$0$i = 0, $rsize$0$lcssa$i = 0, $rsize$08$i = 0, $rsize$1$i = 0, $rsize$3$i = 0, $rsize$4$lcssa$i = 0, $rsize$410$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sflags193$i = 0, $sflags235$i = 0, $shl = 0, $shl$i = 0; + var $shl$i$i = 0, $shl$i146 = 0, $shl$i35$i = 0, $shl102 = 0, $shl105 = 0, $shl116$i$i = 0, $shl12 = 0, $shl127$i$i = 0, $shl131$i$i = 0, $shl15$i = 0, $shl18$i = 0, $shl192$i = 0, $shl195$i = 0, $shl198$i = 0, $shl22 = 0, $shl222$i$i = 0, $shl226$i$i = 0, $shl265$i$i = 0, $shl270$i$i = 0, $shl276$i$i = 0; + var $shl279$i$i = 0, $shl288$i = 0, $shl291$i = 0, $shl294$i$i = 0, $shl31$i = 0, $shl316$i$i = 0, $shl326$i$i = 0, $shl333$i = 0, $shl338$i = 0, $shl344$i = 0, $shl347$i = 0, $shl35 = 0, $shl362$i = 0, $shl37 = 0, $shl384$i = 0, $shl39$i$i = 0, $shl395$i = 0, $shl48$i$i = 0, $shl52$i = 0, $shl60$i = 0; + var $shl65 = 0, $shl70$i$i = 0, $shl72 = 0, $shl75$i$i = 0, $shl81$i$i = 0, $shl84$i$i = 0, $shl9$i = 0, $shl90 = 0, $shl95$i$i = 0, $shr = 0, $shr$i = 0, $shr$i$i = 0, $shr$i141 = 0, $shr$i33$i = 0, $shr101 = 0, $shr11$i = 0, $shr11$i149 = 0, $shr110$i$i = 0, $shr12$i = 0, $shr124$i$i = 0; + var $shr15$i = 0, $shr16$i = 0, $shr16$i150 = 0, $shr19$i = 0, $shr194$i = 0, $shr20$i = 0, $shr214$i$i = 0, $shr253$i$i = 0, $shr263$i$i = 0, $shr267$i$i = 0, $shr27$i = 0, $shr272$i$i = 0, $shr277$i$i = 0, $shr281$i$i = 0, $shr283$i = 0, $shr3 = 0, $shr310$i$i = 0, $shr318$i = 0, $shr323$i$i = 0, $shr330$i = 0; + var $shr335$i = 0, $shr340$i = 0, $shr345$i = 0, $shr349$i = 0, $shr378$i = 0, $shr392$i = 0, $shr4$i = 0, $shr42$i = 0, $shr45 = 0, $shr47 = 0, $shr48 = 0, $shr5$i = 0, $shr5$i144 = 0, $shr51 = 0, $shr52 = 0, $shr55 = 0, $shr56 = 0, $shr58$i$i = 0, $shr59 = 0, $shr60 = 0; + var $shr63 = 0, $shr68$i$i = 0, $shr7$i = 0, $shr7$i147 = 0, $shr72$i = 0, $shr72$i$i = 0, $shr75$i = 0, $shr76$i = 0, $shr77$i$i = 0, $shr79$i = 0, $shr8$i = 0, $shr80$i = 0, $shr82$i$i = 0, $shr83$i = 0, $shr84$i = 0, $shr86$i$i = 0, $shr87$i = 0, $shr88$i = 0, $shr91$i = 0, $size$i$i = 0; + var $size$i$i$i = 0, $size188$i = 0, $size245$i = 0, $sizebits$0$i = 0, $sizebits$0$shl52$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$0108$i = 0, $sp$1107$i = 0, $ssize$2$ph$i = 0, $sub = 0, $sub$i = 0, $sub$i$i = 0, $sub$i$i$i = 0, $sub$i140 = 0, $sub$i16$i = 0, $sub$i184 = 0, $sub$i22$i = 0, $sub$i51$i = 0, $sub$ptr$lhs$cast$i = 0; + var $sub$ptr$lhs$cast$i$i = 0, $sub$ptr$lhs$cast$i27$i = 0, $sub$ptr$rhs$cast$i = 0, $sub$ptr$rhs$cast$i$i = 0, $sub$ptr$rhs$cast$i28$i = 0, $sub$ptr$sub$i = 0, $sub$ptr$sub$i$i = 0, $sub$ptr$sub$i29$i = 0, $sub$ptr$sub$tsize$4$i = 0, $sub10$i = 0, $sub101$i = 0, $sub101$rsize$4$i = 0, $sub112$i = 0, $sub113$i$i = 0, $sub118$i = 0, $sub12$i$i = 0, $sub14$i = 0, $sub16$i$i = 0, $sub160 = 0, $sub172$i = 0; + var $sub18$i$i = 0, $sub190 = 0, $sub2$i = 0, $sub22$i = 0, $sub260$i = 0, $sub262$i$i = 0, $sub266$i$i = 0, $sub271$i$i = 0, $sub275$i$i = 0, $sub30$i = 0, $sub31$i = 0, $sub31$rsize$0$i = 0, $sub313$i$i = 0, $sub329$i = 0, $sub33$i = 0, $sub334$i = 0, $sub339$i = 0, $sub343$i = 0, $sub381$i = 0, $sub4$i = 0; + var $sub41$i = 0, $sub42 = 0, $sub44 = 0, $sub5$i$i = 0, $sub5$i$i$i = 0, $sub5$i55$i = 0, $sub50$i = 0, $sub6$i = 0, $sub63$i = 0, $sub67$i = 0, $sub67$i$i = 0, $sub70$i = 0, $sub71$i$i = 0, $sub76$i$i = 0, $sub80$i$i = 0, $sub91 = 0, $sub99$i = 0, $t$0$i = 0, $t$2$i = 0, $t$4$ph$i = 0; + var $t$4$v$4$i = 0, $t$49$i = 0, $tbase$796$i = 0, $tobool$i$i = 0, $tobool107 = 0, $tobool195$i = 0, $tobool200$i = 0, $tobool228$i$i = 0, $tobool237$i = 0, $tobool293$i = 0, $tobool296$i$i = 0, $tobool30$i = 0, $tobool364$i = 0, $tobool97$i$i = 0, $tsize$2657583$i = 0, $tsize$4$i = 0, $tsize$795$i = 0, $v$0$i = 0, $v$0$lcssa$i = 0, $v$09$i = 0; + var $v$1$i = 0, $v$3$i = 0, $v$4$lcssa$i = 0, $v$4$ph$i = 0, $v$411$i = 0, $xor$i$i = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $magic$i$i = sp; + $cmp = ($bytes>>>0)<(245); + do { + if ($cmp) { + $cmp1 = ($bytes>>>0)<(11); + $add2 = (($bytes) + 11)|0; + $and = $add2 & -8; + $cond = $cmp1 ? 16 : $and; + $shr = $cond >>> 3; + $0 = HEAP32[7102]|0; + $shr3 = $0 >>> $shr; + $and4 = $shr3 & 3; + $cmp5 = ($and4|0)==(0); + if (!($cmp5)) { + $neg = $shr3 & 1; + $and7 = $neg ^ 1; + $add8 = (($and7) + ($shr))|0; + $shl = $add8 << 1; + $arrayidx = (28448 + ($shl<<2)|0); + $1 = ((($arrayidx)) + 8|0); + $2 = HEAP32[$1>>2]|0; + $fd9 = ((($2)) + 8|0); + $3 = HEAP32[$fd9>>2]|0; + $cmp10 = ($3|0)==($arrayidx|0); + do { + if ($cmp10) { + $shl12 = 1 << $add8; + $neg13 = $shl12 ^ -1; + $and14 = $0 & $neg13; + HEAP32[7102] = $and14; + } else { + $4 = HEAP32[(28424)>>2]|0; + $cmp15 = ($4>>>0)>($3>>>0); + if ($cmp15) { + _abort(); + // unreachable; + } + $bk = ((($3)) + 12|0); + $5 = HEAP32[$bk>>2]|0; + $cmp16 = ($5|0)==($2|0); + if ($cmp16) { + HEAP32[$bk>>2] = $arrayidx; + HEAP32[$1>>2] = $3; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $shl22 = $add8 << 3; + $or23 = $shl22 | 3; + $head = ((($2)) + 4|0); + HEAP32[$head>>2] = $or23; + $add$ptr = (($2) + ($shl22)|0); + $head25 = ((($add$ptr)) + 4|0); + $6 = HEAP32[$head25>>2]|0; + $or26 = $6 | 1; + HEAP32[$head25>>2] = $or26; + $retval$0 = $fd9; + STACKTOP = sp;return ($retval$0|0); + } + $7 = HEAP32[(28416)>>2]|0; + $cmp29 = ($cond>>>0)>($7>>>0); + if ($cmp29) { + $cmp31 = ($shr3|0)==(0); + if (!($cmp31)) { + $shl35 = $shr3 << $shr; + $shl37 = 2 << $shr; + $sub = (0 - ($shl37))|0; + $or40 = $shl37 | $sub; + $and41 = $shl35 & $or40; + $sub42 = (0 - ($and41))|0; + $and43 = $and41 & $sub42; + $sub44 = (($and43) + -1)|0; + $shr45 = $sub44 >>> 12; + $and46 = $shr45 & 16; + $shr47 = $sub44 >>> $and46; + $shr48 = $shr47 >>> 5; + $and49 = $shr48 & 8; + $add50 = $and49 | $and46; + $shr51 = $shr47 >>> $and49; + $shr52 = $shr51 >>> 2; + $and53 = $shr52 & 4; + $add54 = $add50 | $and53; + $shr55 = $shr51 >>> $and53; + $shr56 = $shr55 >>> 1; + $and57 = $shr56 & 2; + $add58 = $add54 | $and57; + $shr59 = $shr55 >>> $and57; + $shr60 = $shr59 >>> 1; + $and61 = $shr60 & 1; + $add62 = $add58 | $and61; + $shr63 = $shr59 >>> $and61; + $add64 = (($add62) + ($shr63))|0; + $shl65 = $add64 << 1; + $arrayidx66 = (28448 + ($shl65<<2)|0); + $8 = ((($arrayidx66)) + 8|0); + $9 = HEAP32[$8>>2]|0; + $fd69 = ((($9)) + 8|0); + $10 = HEAP32[$fd69>>2]|0; + $cmp70 = ($10|0)==($arrayidx66|0); + do { + if ($cmp70) { + $shl72 = 1 << $add64; + $neg73 = $shl72 ^ -1; + $and74 = $0 & $neg73; + HEAP32[7102] = $and74; + $14 = $and74; + } else { + $11 = HEAP32[(28424)>>2]|0; + $cmp76 = ($11>>>0)>($10>>>0); + if ($cmp76) { + _abort(); + // unreachable; + } + $bk78 = ((($10)) + 12|0); + $12 = HEAP32[$bk78>>2]|0; + $cmp79 = ($12|0)==($9|0); + if ($cmp79) { + HEAP32[$bk78>>2] = $arrayidx66; + HEAP32[$8>>2] = $10; + $14 = $0; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $shl90 = $add64 << 3; + $sub91 = (($shl90) - ($cond))|0; + $or93 = $cond | 3; + $head94 = ((($9)) + 4|0); + HEAP32[$head94>>2] = $or93; + $add$ptr95 = (($9) + ($cond)|0); + $or96 = $sub91 | 1; + $head97 = ((($add$ptr95)) + 4|0); + HEAP32[$head97>>2] = $or96; + $add$ptr98 = (($9) + ($shl90)|0); + HEAP32[$add$ptr98>>2] = $sub91; + $cmp99 = ($7|0)==(0); + if (!($cmp99)) { + $13 = HEAP32[(28428)>>2]|0; + $shr101 = $7 >>> 3; + $shl102 = $shr101 << 1; + $arrayidx103 = (28448 + ($shl102<<2)|0); + $shl105 = 1 << $shr101; + $and106 = $14 & $shl105; + $tobool107 = ($and106|0)==(0); + if ($tobool107) { + $or110 = $14 | $shl105; + HEAP32[7102] = $or110; + $$pre = ((($arrayidx103)) + 8|0); + $$pre$phiZ2D = $$pre;$F104$0 = $arrayidx103; + } else { + $15 = ((($arrayidx103)) + 8|0); + $16 = HEAP32[$15>>2]|0; + $17 = HEAP32[(28424)>>2]|0; + $cmp113 = ($17>>>0)>($16>>>0); + if ($cmp113) { + _abort(); + // unreachable; + } else { + $$pre$phiZ2D = $15;$F104$0 = $16; + } + } + HEAP32[$$pre$phiZ2D>>2] = $13; + $bk122 = ((($F104$0)) + 12|0); + HEAP32[$bk122>>2] = $13; + $fd123 = ((($13)) + 8|0); + HEAP32[$fd123>>2] = $F104$0; + $bk124 = ((($13)) + 12|0); + HEAP32[$bk124>>2] = $arrayidx103; + } + HEAP32[(28416)>>2] = $sub91; + HEAP32[(28428)>>2] = $add$ptr95; + $retval$0 = $fd69; + STACKTOP = sp;return ($retval$0|0); + } + $18 = HEAP32[(28412)>>2]|0; + $cmp128 = ($18|0)==(0); + if ($cmp128) { + $nb$0 = $cond; + } else { + $sub$i = (0 - ($18))|0; + $and$i = $18 & $sub$i; + $sub2$i = (($and$i) + -1)|0; + $shr$i = $sub2$i >>> 12; + $and3$i = $shr$i & 16; + $shr4$i = $sub2$i >>> $and3$i; + $shr5$i = $shr4$i >>> 5; + $and6$i = $shr5$i & 8; + $add$i = $and6$i | $and3$i; + $shr7$i = $shr4$i >>> $and6$i; + $shr8$i = $shr7$i >>> 2; + $and9$i = $shr8$i & 4; + $add10$i = $add$i | $and9$i; + $shr11$i = $shr7$i >>> $and9$i; + $shr12$i = $shr11$i >>> 1; + $and13$i = $shr12$i & 2; + $add14$i = $add10$i | $and13$i; + $shr15$i = $shr11$i >>> $and13$i; + $shr16$i = $shr15$i >>> 1; + $and17$i = $shr16$i & 1; + $add18$i = $add14$i | $and17$i; + $shr19$i = $shr15$i >>> $and17$i; + $add20$i = (($add18$i) + ($shr19$i))|0; + $arrayidx$i = (28712 + ($add20$i<<2)|0); + $19 = HEAP32[$arrayidx$i>>2]|0; + $head$i = ((($19)) + 4|0); + $20 = HEAP32[$head$i>>2]|0; + $and21$i = $20 & -8; + $sub22$i = (($and21$i) - ($cond))|0; + $arrayidx233$i = ((($19)) + 16|0); + $21 = HEAP32[$arrayidx233$i>>2]|0; + $cmp4$i = ($21|0)==(0|0); + $$sink5$i = $cmp4$i&1; + $arrayidx276$i = (((($19)) + 16|0) + ($$sink5$i<<2)|0); + $22 = HEAP32[$arrayidx276$i>>2]|0; + $cmp287$i = ($22|0)==(0|0); + if ($cmp287$i) { + $rsize$0$lcssa$i = $sub22$i;$v$0$lcssa$i = $19; + } else { + $23 = $22;$rsize$08$i = $sub22$i;$v$09$i = $19; + while(1) { + $head29$i = ((($23)) + 4|0); + $24 = HEAP32[$head29$i>>2]|0; + $and30$i = $24 & -8; + $sub31$i = (($and30$i) - ($cond))|0; + $cmp32$i = ($sub31$i>>>0)<($rsize$08$i>>>0); + $sub31$rsize$0$i = $cmp32$i ? $sub31$i : $rsize$08$i; + $$v$0$i = $cmp32$i ? $23 : $v$09$i; + $arrayidx23$i = ((($23)) + 16|0); + $25 = HEAP32[$arrayidx23$i>>2]|0; + $cmp$i = ($25|0)==(0|0); + $$sink$i = $cmp$i&1; + $arrayidx27$i = (((($23)) + 16|0) + ($$sink$i<<2)|0); + $26 = HEAP32[$arrayidx27$i>>2]|0; + $cmp28$i = ($26|0)==(0|0); + if ($cmp28$i) { + $rsize$0$lcssa$i = $sub31$rsize$0$i;$v$0$lcssa$i = $$v$0$i; + break; + } else { + $23 = $26;$rsize$08$i = $sub31$rsize$0$i;$v$09$i = $$v$0$i; + } + } + } + $27 = HEAP32[(28424)>>2]|0; + $cmp33$i = ($27>>>0)>($v$0$lcssa$i>>>0); + if ($cmp33$i) { + _abort(); + // unreachable; + } + $add$ptr$i = (($v$0$lcssa$i) + ($cond)|0); + $cmp35$i = ($add$ptr$i>>>0)>($v$0$lcssa$i>>>0); + if (!($cmp35$i)) { + _abort(); + // unreachable; + } + $parent$i = ((($v$0$lcssa$i)) + 24|0); + $28 = HEAP32[$parent$i>>2]|0; + $bk$i = ((($v$0$lcssa$i)) + 12|0); + $29 = HEAP32[$bk$i>>2]|0; + $cmp40$i = ($29|0)==($v$0$lcssa$i|0); + do { + if ($cmp40$i) { + $arrayidx61$i = ((($v$0$lcssa$i)) + 20|0); + $33 = HEAP32[$arrayidx61$i>>2]|0; + $cmp62$i = ($33|0)==(0|0); + if ($cmp62$i) { + $arrayidx65$i = ((($v$0$lcssa$i)) + 16|0); + $34 = HEAP32[$arrayidx65$i>>2]|0; + $cmp66$i = ($34|0)==(0|0); + if ($cmp66$i) { + $R$3$i = 0; + break; + } else { + $R$1$i = $34;$RP$1$i = $arrayidx65$i; + } + } else { + $R$1$i = $33;$RP$1$i = $arrayidx61$i; + } + while(1) { + $arrayidx71$i = ((($R$1$i)) + 20|0); + $35 = HEAP32[$arrayidx71$i>>2]|0; + $cmp72$i = ($35|0)==(0|0); + if (!($cmp72$i)) { + $R$1$i = $35;$RP$1$i = $arrayidx71$i; + continue; + } + $arrayidx75$i = ((($R$1$i)) + 16|0); + $36 = HEAP32[$arrayidx75$i>>2]|0; + $cmp76$i = ($36|0)==(0|0); + if ($cmp76$i) { + break; + } else { + $R$1$i = $36;$RP$1$i = $arrayidx75$i; + } + } + $cmp81$i = ($27>>>0)>($RP$1$i>>>0); + if ($cmp81$i) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$1$i>>2] = 0; + $R$3$i = $R$1$i; + break; + } + } else { + $fd$i = ((($v$0$lcssa$i)) + 8|0); + $30 = HEAP32[$fd$i>>2]|0; + $cmp45$i = ($27>>>0)>($30>>>0); + if ($cmp45$i) { + _abort(); + // unreachable; + } + $bk47$i = ((($30)) + 12|0); + $31 = HEAP32[$bk47$i>>2]|0; + $cmp48$i = ($31|0)==($v$0$lcssa$i|0); + if (!($cmp48$i)) { + _abort(); + // unreachable; + } + $fd50$i = ((($29)) + 8|0); + $32 = HEAP32[$fd50$i>>2]|0; + $cmp51$i = ($32|0)==($v$0$lcssa$i|0); + if ($cmp51$i) { + HEAP32[$bk47$i>>2] = $29; + HEAP32[$fd50$i>>2] = $30; + $R$3$i = $29; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $cmp90$i = ($28|0)==(0|0); + L73: do { + if (!($cmp90$i)) { + $index$i = ((($v$0$lcssa$i)) + 28|0); + $37 = HEAP32[$index$i>>2]|0; + $arrayidx94$i = (28712 + ($37<<2)|0); + $38 = HEAP32[$arrayidx94$i>>2]|0; + $cmp95$i = ($v$0$lcssa$i|0)==($38|0); + do { + if ($cmp95$i) { + HEAP32[$arrayidx94$i>>2] = $R$3$i; + $cond$i = ($R$3$i|0)==(0|0); + if ($cond$i) { + $shl$i = 1 << $37; + $neg$i = $shl$i ^ -1; + $and103$i = $18 & $neg$i; + HEAP32[(28412)>>2] = $and103$i; + break L73; + } + } else { + $39 = HEAP32[(28424)>>2]|0; + $cmp107$i = ($39>>>0)>($28>>>0); + if ($cmp107$i) { + _abort(); + // unreachable; + } else { + $arrayidx113$i = ((($28)) + 16|0); + $40 = HEAP32[$arrayidx113$i>>2]|0; + $cmp114$i = ($40|0)!=($v$0$lcssa$i|0); + $$sink2$i = $cmp114$i&1; + $arrayidx121$i = (((($28)) + 16|0) + ($$sink2$i<<2)|0); + HEAP32[$arrayidx121$i>>2] = $R$3$i; + $cmp126$i = ($R$3$i|0)==(0|0); + if ($cmp126$i) { + break L73; + } else { + break; + } + } + } + } while(0); + $41 = HEAP32[(28424)>>2]|0; + $cmp130$i = ($41>>>0)>($R$3$i>>>0); + if ($cmp130$i) { + _abort(); + // unreachable; + } + $parent135$i = ((($R$3$i)) + 24|0); + HEAP32[$parent135$i>>2] = $28; + $arrayidx137$i = ((($v$0$lcssa$i)) + 16|0); + $42 = HEAP32[$arrayidx137$i>>2]|0; + $cmp138$i = ($42|0)==(0|0); + do { + if (!($cmp138$i)) { + $cmp142$i = ($41>>>0)>($42>>>0); + if ($cmp142$i) { + _abort(); + // unreachable; + } else { + $arrayidx148$i = ((($R$3$i)) + 16|0); + HEAP32[$arrayidx148$i>>2] = $42; + $parent149$i = ((($42)) + 24|0); + HEAP32[$parent149$i>>2] = $R$3$i; + break; + } + } + } while(0); + $arrayidx154$i = ((($v$0$lcssa$i)) + 20|0); + $43 = HEAP32[$arrayidx154$i>>2]|0; + $cmp155$i = ($43|0)==(0|0); + if (!($cmp155$i)) { + $44 = HEAP32[(28424)>>2]|0; + $cmp159$i = ($44>>>0)>($43>>>0); + if ($cmp159$i) { + _abort(); + // unreachable; + } else { + $arrayidx165$i = ((($R$3$i)) + 20|0); + HEAP32[$arrayidx165$i>>2] = $43; + $parent166$i = ((($43)) + 24|0); + HEAP32[$parent166$i>>2] = $R$3$i; + break; + } + } + } + } while(0); + $cmp174$i = ($rsize$0$lcssa$i>>>0)<(16); + if ($cmp174$i) { + $add177$i = (($rsize$0$lcssa$i) + ($cond))|0; + $or178$i = $add177$i | 3; + $head179$i = ((($v$0$lcssa$i)) + 4|0); + HEAP32[$head179$i>>2] = $or178$i; + $add$ptr181$i = (($v$0$lcssa$i) + ($add177$i)|0); + $head182$i = ((($add$ptr181$i)) + 4|0); + $45 = HEAP32[$head182$i>>2]|0; + $or183$i = $45 | 1; + HEAP32[$head182$i>>2] = $or183$i; + } else { + $or186$i = $cond | 3; + $head187$i = ((($v$0$lcssa$i)) + 4|0); + HEAP32[$head187$i>>2] = $or186$i; + $or188$i = $rsize$0$lcssa$i | 1; + $head189$i = ((($add$ptr$i)) + 4|0); + HEAP32[$head189$i>>2] = $or188$i; + $add$ptr190$i = (($add$ptr$i) + ($rsize$0$lcssa$i)|0); + HEAP32[$add$ptr190$i>>2] = $rsize$0$lcssa$i; + $cmp191$i = ($7|0)==(0); + if (!($cmp191$i)) { + $46 = HEAP32[(28428)>>2]|0; + $shr194$i = $7 >>> 3; + $shl195$i = $shr194$i << 1; + $arrayidx196$i = (28448 + ($shl195$i<<2)|0); + $shl198$i = 1 << $shr194$i; + $and199$i = $0 & $shl198$i; + $tobool200$i = ($and199$i|0)==(0); + if ($tobool200$i) { + $or204$i = $0 | $shl198$i; + HEAP32[7102] = $or204$i; + $$pre$i = ((($arrayidx196$i)) + 8|0); + $$pre$phi$iZ2D = $$pre$i;$F197$0$i = $arrayidx196$i; + } else { + $47 = ((($arrayidx196$i)) + 8|0); + $48 = HEAP32[$47>>2]|0; + $49 = HEAP32[(28424)>>2]|0; + $cmp208$i = ($49>>>0)>($48>>>0); + if ($cmp208$i) { + _abort(); + // unreachable; + } else { + $$pre$phi$iZ2D = $47;$F197$0$i = $48; + } + } + HEAP32[$$pre$phi$iZ2D>>2] = $46; + $bk218$i = ((($F197$0$i)) + 12|0); + HEAP32[$bk218$i>>2] = $46; + $fd219$i = ((($46)) + 8|0); + HEAP32[$fd219$i>>2] = $F197$0$i; + $bk220$i = ((($46)) + 12|0); + HEAP32[$bk220$i>>2] = $arrayidx196$i; + } + HEAP32[(28416)>>2] = $rsize$0$lcssa$i; + HEAP32[(28428)>>2] = $add$ptr$i; + } + $add$ptr225$i = ((($v$0$lcssa$i)) + 8|0); + $retval$0 = $add$ptr225$i; + STACKTOP = sp;return ($retval$0|0); + } + } else { + $nb$0 = $cond; + } + } else { + $cmp139 = ($bytes>>>0)>(4294967231); + if ($cmp139) { + $nb$0 = -1; + } else { + $add144 = (($bytes) + 11)|0; + $and145 = $add144 & -8; + $50 = HEAP32[(28412)>>2]|0; + $cmp146 = ($50|0)==(0); + if ($cmp146) { + $nb$0 = $and145; + } else { + $sub$i140 = (0 - ($and145))|0; + $shr$i141 = $add144 >>> 8; + $cmp$i142 = ($shr$i141|0)==(0); + if ($cmp$i142) { + $idx$0$i = 0; + } else { + $cmp1$i = ($and145>>>0)>(16777215); + if ($cmp1$i) { + $idx$0$i = 31; + } else { + $sub4$i = (($shr$i141) + 1048320)|0; + $shr5$i144 = $sub4$i >>> 16; + $and$i145 = $shr5$i144 & 8; + $shl$i146 = $shr$i141 << $and$i145; + $sub6$i = (($shl$i146) + 520192)|0; + $shr7$i147 = $sub6$i >>> 16; + $and8$i = $shr7$i147 & 4; + $add$i148 = $and8$i | $and$i145; + $shl9$i = $shl$i146 << $and8$i; + $sub10$i = (($shl9$i) + 245760)|0; + $shr11$i149 = $sub10$i >>> 16; + $and12$i = $shr11$i149 & 2; + $add13$i = $add$i148 | $and12$i; + $sub14$i = (14 - ($add13$i))|0; + $shl15$i = $shl9$i << $and12$i; + $shr16$i150 = $shl15$i >>> 15; + $add17$i = (($sub14$i) + ($shr16$i150))|0; + $shl18$i = $add17$i << 1; + $add19$i = (($add17$i) + 7)|0; + $shr20$i = $and145 >>> $add19$i; + $and21$i151 = $shr20$i & 1; + $add22$i = $and21$i151 | $shl18$i; + $idx$0$i = $add22$i; + } + } + $arrayidx$i152 = (28712 + ($idx$0$i<<2)|0); + $51 = HEAP32[$arrayidx$i152>>2]|0; + $cmp24$i = ($51|0)==(0|0); + L117: do { + if ($cmp24$i) { + $rsize$3$i = $sub$i140;$t$2$i = 0;$v$3$i = 0; + label = 81; + } else { + $cmp26$i = ($idx$0$i|0)==(31); + $shr27$i = $idx$0$i >>> 1; + $sub30$i = (25 - ($shr27$i))|0; + $cond$i153 = $cmp26$i ? 0 : $sub30$i; + $shl31$i = $and145 << $cond$i153; + $rsize$0$i = $sub$i140;$rst$0$i = 0;$sizebits$0$i = $shl31$i;$t$0$i = $51;$v$0$i = 0; + while(1) { + $head$i154 = ((($t$0$i)) + 4|0); + $52 = HEAP32[$head$i154>>2]|0; + $and32$i = $52 & -8; + $sub33$i = (($and32$i) - ($and145))|0; + $cmp34$i = ($sub33$i>>>0)<($rsize$0$i>>>0); + if ($cmp34$i) { + $cmp36$i = ($sub33$i|0)==(0); + if ($cmp36$i) { + $rsize$410$i = 0;$t$49$i = $t$0$i;$v$411$i = $t$0$i; + label = 85; + break L117; + } else { + $rsize$1$i = $sub33$i;$v$1$i = $t$0$i; + } + } else { + $rsize$1$i = $rsize$0$i;$v$1$i = $v$0$i; + } + $arrayidx40$i = ((($t$0$i)) + 20|0); + $53 = HEAP32[$arrayidx40$i>>2]|0; + $shr42$i = $sizebits$0$i >>> 31; + $arrayidx44$i = (((($t$0$i)) + 16|0) + ($shr42$i<<2)|0); + $54 = HEAP32[$arrayidx44$i>>2]|0; + $cmp45$i155 = ($53|0)==(0|0); + $cmp46$i = ($53|0)==($54|0); + $or$cond2$i = $cmp45$i155 | $cmp46$i; + $rst$1$i = $or$cond2$i ? $rst$0$i : $53; + $cmp49$i = ($54|0)==(0|0); + $not$cmp495$i = $cmp49$i ^ 1; + $shl52$i = $not$cmp495$i&1; + $sizebits$0$shl52$i = $sizebits$0$i << $shl52$i; + if ($cmp49$i) { + $rsize$3$i = $rsize$1$i;$t$2$i = $rst$1$i;$v$3$i = $v$1$i; + label = 81; + break; + } else { + $rsize$0$i = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $sizebits$0$shl52$i;$t$0$i = $54;$v$0$i = $v$1$i; + } + } + } + } while(0); + if ((label|0) == 81) { + $cmp55$i = ($t$2$i|0)==(0|0); + $cmp57$i = ($v$3$i|0)==(0|0); + $or$cond$i = $cmp55$i & $cmp57$i; + if ($or$cond$i) { + $shl60$i = 2 << $idx$0$i; + $sub63$i = (0 - ($shl60$i))|0; + $or$i = $shl60$i | $sub63$i; + $and64$i = $50 & $or$i; + $cmp65$i = ($and64$i|0)==(0); + if ($cmp65$i) { + $nb$0 = $and145; + break; + } + $sub67$i = (0 - ($and64$i))|0; + $and68$i = $and64$i & $sub67$i; + $sub70$i = (($and68$i) + -1)|0; + $shr72$i = $sub70$i >>> 12; + $and73$i = $shr72$i & 16; + $shr75$i = $sub70$i >>> $and73$i; + $shr76$i = $shr75$i >>> 5; + $and77$i = $shr76$i & 8; + $add78$i = $and77$i | $and73$i; + $shr79$i = $shr75$i >>> $and77$i; + $shr80$i = $shr79$i >>> 2; + $and81$i = $shr80$i & 4; + $add82$i = $add78$i | $and81$i; + $shr83$i = $shr79$i >>> $and81$i; + $shr84$i = $shr83$i >>> 1; + $and85$i = $shr84$i & 2; + $add86$i = $add82$i | $and85$i; + $shr87$i = $shr83$i >>> $and85$i; + $shr88$i = $shr87$i >>> 1; + $and89$i = $shr88$i & 1; + $add90$i = $add86$i | $and89$i; + $shr91$i = $shr87$i >>> $and89$i; + $add92$i = (($add90$i) + ($shr91$i))|0; + $arrayidx94$i156 = (28712 + ($add92$i<<2)|0); + $55 = HEAP32[$arrayidx94$i156>>2]|0; + $t$4$ph$i = $55;$v$4$ph$i = 0; + } else { + $t$4$ph$i = $t$2$i;$v$4$ph$i = $v$3$i; + } + $cmp978$i = ($t$4$ph$i|0)==(0|0); + if ($cmp978$i) { + $rsize$4$lcssa$i = $rsize$3$i;$v$4$lcssa$i = $v$4$ph$i; + } else { + $rsize$410$i = $rsize$3$i;$t$49$i = $t$4$ph$i;$v$411$i = $v$4$ph$i; + label = 85; + } + } + if ((label|0) == 85) { + while(1) { + label = 0; + $head99$i = ((($t$49$i)) + 4|0); + $56 = HEAP32[$head99$i>>2]|0; + $and100$i = $56 & -8; + $sub101$i = (($and100$i) - ($and145))|0; + $cmp102$i = ($sub101$i>>>0)<($rsize$410$i>>>0); + $sub101$rsize$4$i = $cmp102$i ? $sub101$i : $rsize$410$i; + $t$4$v$4$i = $cmp102$i ? $t$49$i : $v$411$i; + $arrayidx106$i = ((($t$49$i)) + 16|0); + $57 = HEAP32[$arrayidx106$i>>2]|0; + $cmp107$i157 = ($57|0)==(0|0); + $$sink$i158 = $cmp107$i157&1; + $arrayidx113$i159 = (((($t$49$i)) + 16|0) + ($$sink$i158<<2)|0); + $58 = HEAP32[$arrayidx113$i159>>2]|0; + $cmp97$i = ($58|0)==(0|0); + if ($cmp97$i) { + $rsize$4$lcssa$i = $sub101$rsize$4$i;$v$4$lcssa$i = $t$4$v$4$i; + break; + } else { + $rsize$410$i = $sub101$rsize$4$i;$t$49$i = $58;$v$411$i = $t$4$v$4$i; + label = 85; + } + } + } + $cmp116$i = ($v$4$lcssa$i|0)==(0|0); + if ($cmp116$i) { + $nb$0 = $and145; + } else { + $59 = HEAP32[(28416)>>2]|0; + $sub118$i = (($59) - ($and145))|0; + $cmp119$i = ($rsize$4$lcssa$i>>>0)<($sub118$i>>>0); + if ($cmp119$i) { + $60 = HEAP32[(28424)>>2]|0; + $cmp121$i = ($60>>>0)>($v$4$lcssa$i>>>0); + if ($cmp121$i) { + _abort(); + // unreachable; + } + $add$ptr$i162 = (($v$4$lcssa$i) + ($and145)|0); + $cmp123$i = ($add$ptr$i162>>>0)>($v$4$lcssa$i>>>0); + if (!($cmp123$i)) { + _abort(); + // unreachable; + } + $parent$i163 = ((($v$4$lcssa$i)) + 24|0); + $61 = HEAP32[$parent$i163>>2]|0; + $bk$i164 = ((($v$4$lcssa$i)) + 12|0); + $62 = HEAP32[$bk$i164>>2]|0; + $cmp128$i = ($62|0)==($v$4$lcssa$i|0); + do { + if ($cmp128$i) { + $arrayidx151$i = ((($v$4$lcssa$i)) + 20|0); + $66 = HEAP32[$arrayidx151$i>>2]|0; + $cmp152$i = ($66|0)==(0|0); + if ($cmp152$i) { + $arrayidx155$i = ((($v$4$lcssa$i)) + 16|0); + $67 = HEAP32[$arrayidx155$i>>2]|0; + $cmp156$i = ($67|0)==(0|0); + if ($cmp156$i) { + $R$3$i172 = 0; + break; + } else { + $R$1$i169 = $67;$RP$1$i168 = $arrayidx155$i; + } + } else { + $R$1$i169 = $66;$RP$1$i168 = $arrayidx151$i; + } + while(1) { + $arrayidx161$i = ((($R$1$i169)) + 20|0); + $68 = HEAP32[$arrayidx161$i>>2]|0; + $cmp162$i = ($68|0)==(0|0); + if (!($cmp162$i)) { + $R$1$i169 = $68;$RP$1$i168 = $arrayidx161$i; + continue; + } + $arrayidx165$i170 = ((($R$1$i169)) + 16|0); + $69 = HEAP32[$arrayidx165$i170>>2]|0; + $cmp166$i = ($69|0)==(0|0); + if ($cmp166$i) { + break; + } else { + $R$1$i169 = $69;$RP$1$i168 = $arrayidx165$i170; + } + } + $cmp171$i = ($60>>>0)>($RP$1$i168>>>0); + if ($cmp171$i) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$1$i168>>2] = 0; + $R$3$i172 = $R$1$i169; + break; + } + } else { + $fd$i165 = ((($v$4$lcssa$i)) + 8|0); + $63 = HEAP32[$fd$i165>>2]|0; + $cmp133$i = ($60>>>0)>($63>>>0); + if ($cmp133$i) { + _abort(); + // unreachable; + } + $bk136$i = ((($63)) + 12|0); + $64 = HEAP32[$bk136$i>>2]|0; + $cmp137$i = ($64|0)==($v$4$lcssa$i|0); + if (!($cmp137$i)) { + _abort(); + // unreachable; + } + $fd139$i = ((($62)) + 8|0); + $65 = HEAP32[$fd139$i>>2]|0; + $cmp140$i = ($65|0)==($v$4$lcssa$i|0); + if ($cmp140$i) { + HEAP32[$bk136$i>>2] = $62; + HEAP32[$fd139$i>>2] = $63; + $R$3$i172 = $62; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $cmp180$i = ($61|0)==(0|0); + L164: do { + if ($cmp180$i) { + $83 = $50; + } else { + $index$i173 = ((($v$4$lcssa$i)) + 28|0); + $70 = HEAP32[$index$i173>>2]|0; + $arrayidx184$i = (28712 + ($70<<2)|0); + $71 = HEAP32[$arrayidx184$i>>2]|0; + $cmp185$i = ($v$4$lcssa$i|0)==($71|0); + do { + if ($cmp185$i) { + HEAP32[$arrayidx184$i>>2] = $R$3$i172; + $cond4$i = ($R$3$i172|0)==(0|0); + if ($cond4$i) { + $shl192$i = 1 << $70; + $neg$i174 = $shl192$i ^ -1; + $and194$i = $50 & $neg$i174; + HEAP32[(28412)>>2] = $and194$i; + $83 = $and194$i; + break L164; + } + } else { + $72 = HEAP32[(28424)>>2]|0; + $cmp198$i = ($72>>>0)>($61>>>0); + if ($cmp198$i) { + _abort(); + // unreachable; + } else { + $arrayidx204$i = ((($61)) + 16|0); + $73 = HEAP32[$arrayidx204$i>>2]|0; + $cmp205$i = ($73|0)!=($v$4$lcssa$i|0); + $$sink2$i176 = $cmp205$i&1; + $arrayidx212$i = (((($61)) + 16|0) + ($$sink2$i176<<2)|0); + HEAP32[$arrayidx212$i>>2] = $R$3$i172; + $cmp217$i = ($R$3$i172|0)==(0|0); + if ($cmp217$i) { + $83 = $50; + break L164; + } else { + break; + } + } + } + } while(0); + $74 = HEAP32[(28424)>>2]|0; + $cmp221$i = ($74>>>0)>($R$3$i172>>>0); + if ($cmp221$i) { + _abort(); + // unreachable; + } + $parent226$i = ((($R$3$i172)) + 24|0); + HEAP32[$parent226$i>>2] = $61; + $arrayidx228$i = ((($v$4$lcssa$i)) + 16|0); + $75 = HEAP32[$arrayidx228$i>>2]|0; + $cmp229$i = ($75|0)==(0|0); + do { + if (!($cmp229$i)) { + $cmp233$i = ($74>>>0)>($75>>>0); + if ($cmp233$i) { + _abort(); + // unreachable; + } else { + $arrayidx239$i = ((($R$3$i172)) + 16|0); + HEAP32[$arrayidx239$i>>2] = $75; + $parent240$i = ((($75)) + 24|0); + HEAP32[$parent240$i>>2] = $R$3$i172; + break; + } + } + } while(0); + $arrayidx245$i = ((($v$4$lcssa$i)) + 20|0); + $76 = HEAP32[$arrayidx245$i>>2]|0; + $cmp246$i = ($76|0)==(0|0); + if ($cmp246$i) { + $83 = $50; + } else { + $77 = HEAP32[(28424)>>2]|0; + $cmp250$i = ($77>>>0)>($76>>>0); + if ($cmp250$i) { + _abort(); + // unreachable; + } else { + $arrayidx256$i = ((($R$3$i172)) + 20|0); + HEAP32[$arrayidx256$i>>2] = $76; + $parent257$i = ((($76)) + 24|0); + HEAP32[$parent257$i>>2] = $R$3$i172; + $83 = $50; + break; + } + } + } + } while(0); + $cmp265$i = ($rsize$4$lcssa$i>>>0)<(16); + do { + if ($cmp265$i) { + $add268$i = (($rsize$4$lcssa$i) + ($and145))|0; + $or270$i = $add268$i | 3; + $head271$i = ((($v$4$lcssa$i)) + 4|0); + HEAP32[$head271$i>>2] = $or270$i; + $add$ptr273$i = (($v$4$lcssa$i) + ($add268$i)|0); + $head274$i = ((($add$ptr273$i)) + 4|0); + $78 = HEAP32[$head274$i>>2]|0; + $or275$i = $78 | 1; + HEAP32[$head274$i>>2] = $or275$i; + } else { + $or278$i = $and145 | 3; + $head279$i = ((($v$4$lcssa$i)) + 4|0); + HEAP32[$head279$i>>2] = $or278$i; + $or280$i = $rsize$4$lcssa$i | 1; + $head281$i = ((($add$ptr$i162)) + 4|0); + HEAP32[$head281$i>>2] = $or280$i; + $add$ptr282$i = (($add$ptr$i162) + ($rsize$4$lcssa$i)|0); + HEAP32[$add$ptr282$i>>2] = $rsize$4$lcssa$i; + $shr283$i = $rsize$4$lcssa$i >>> 3; + $cmp284$i = ($rsize$4$lcssa$i>>>0)<(256); + if ($cmp284$i) { + $shl288$i = $shr283$i << 1; + $arrayidx289$i = (28448 + ($shl288$i<<2)|0); + $79 = HEAP32[7102]|0; + $shl291$i = 1 << $shr283$i; + $and292$i = $79 & $shl291$i; + $tobool293$i = ($and292$i|0)==(0); + if ($tobool293$i) { + $or297$i = $79 | $shl291$i; + HEAP32[7102] = $or297$i; + $$pre$i179 = ((($arrayidx289$i)) + 8|0); + $$pre$phi$i180Z2D = $$pre$i179;$F290$0$i = $arrayidx289$i; + } else { + $80 = ((($arrayidx289$i)) + 8|0); + $81 = HEAP32[$80>>2]|0; + $82 = HEAP32[(28424)>>2]|0; + $cmp301$i = ($82>>>0)>($81>>>0); + if ($cmp301$i) { + _abort(); + // unreachable; + } else { + $$pre$phi$i180Z2D = $80;$F290$0$i = $81; + } + } + HEAP32[$$pre$phi$i180Z2D>>2] = $add$ptr$i162; + $bk311$i = ((($F290$0$i)) + 12|0); + HEAP32[$bk311$i>>2] = $add$ptr$i162; + $fd312$i = ((($add$ptr$i162)) + 8|0); + HEAP32[$fd312$i>>2] = $F290$0$i; + $bk313$i = ((($add$ptr$i162)) + 12|0); + HEAP32[$bk313$i>>2] = $arrayidx289$i; + break; + } + $shr318$i = $rsize$4$lcssa$i >>> 8; + $cmp319$i = ($shr318$i|0)==(0); + if ($cmp319$i) { + $I316$0$i = 0; + } else { + $cmp323$i = ($rsize$4$lcssa$i>>>0)>(16777215); + if ($cmp323$i) { + $I316$0$i = 31; + } else { + $sub329$i = (($shr318$i) + 1048320)|0; + $shr330$i = $sub329$i >>> 16; + $and331$i = $shr330$i & 8; + $shl333$i = $shr318$i << $and331$i; + $sub334$i = (($shl333$i) + 520192)|0; + $shr335$i = $sub334$i >>> 16; + $and336$i = $shr335$i & 4; + $add337$i = $and336$i | $and331$i; + $shl338$i = $shl333$i << $and336$i; + $sub339$i = (($shl338$i) + 245760)|0; + $shr340$i = $sub339$i >>> 16; + $and341$i = $shr340$i & 2; + $add342$i = $add337$i | $and341$i; + $sub343$i = (14 - ($add342$i))|0; + $shl344$i = $shl338$i << $and341$i; + $shr345$i = $shl344$i >>> 15; + $add346$i = (($sub343$i) + ($shr345$i))|0; + $shl347$i = $add346$i << 1; + $add348$i = (($add346$i) + 7)|0; + $shr349$i = $rsize$4$lcssa$i >>> $add348$i; + $and350$i = $shr349$i & 1; + $add351$i = $and350$i | $shl347$i; + $I316$0$i = $add351$i; + } + } + $arrayidx355$i = (28712 + ($I316$0$i<<2)|0); + $index356$i = ((($add$ptr$i162)) + 28|0); + HEAP32[$index356$i>>2] = $I316$0$i; + $child357$i = ((($add$ptr$i162)) + 16|0); + $arrayidx358$i = ((($child357$i)) + 4|0); + HEAP32[$arrayidx358$i>>2] = 0; + HEAP32[$child357$i>>2] = 0; + $shl362$i = 1 << $I316$0$i; + $and363$i = $83 & $shl362$i; + $tobool364$i = ($and363$i|0)==(0); + if ($tobool364$i) { + $or368$i = $83 | $shl362$i; + HEAP32[(28412)>>2] = $or368$i; + HEAP32[$arrayidx355$i>>2] = $add$ptr$i162; + $parent369$i = ((($add$ptr$i162)) + 24|0); + HEAP32[$parent369$i>>2] = $arrayidx355$i; + $bk370$i = ((($add$ptr$i162)) + 12|0); + HEAP32[$bk370$i>>2] = $add$ptr$i162; + $fd371$i = ((($add$ptr$i162)) + 8|0); + HEAP32[$fd371$i>>2] = $add$ptr$i162; + break; + } + $84 = HEAP32[$arrayidx355$i>>2]|0; + $cmp374$i = ($I316$0$i|0)==(31); + $shr378$i = $I316$0$i >>> 1; + $sub381$i = (25 - ($shr378$i))|0; + $cond383$i = $cmp374$i ? 0 : $sub381$i; + $shl384$i = $rsize$4$lcssa$i << $cond383$i; + $K373$0$i = $shl384$i;$T$0$i = $84; + while(1) { + $head386$i = ((($T$0$i)) + 4|0); + $85 = HEAP32[$head386$i>>2]|0; + $and387$i = $85 & -8; + $cmp388$i = ($and387$i|0)==($rsize$4$lcssa$i|0); + if ($cmp388$i) { + label = 139; + break; + } + $shr392$i = $K373$0$i >>> 31; + $arrayidx394$i = (((($T$0$i)) + 16|0) + ($shr392$i<<2)|0); + $shl395$i = $K373$0$i << 1; + $86 = HEAP32[$arrayidx394$i>>2]|0; + $cmp396$i = ($86|0)==(0|0); + if ($cmp396$i) { + label = 136; + break; + } else { + $K373$0$i = $shl395$i;$T$0$i = $86; + } + } + if ((label|0) == 136) { + $87 = HEAP32[(28424)>>2]|0; + $cmp401$i = ($87>>>0)>($arrayidx394$i>>>0); + if ($cmp401$i) { + _abort(); + // unreachable; + } else { + HEAP32[$arrayidx394$i>>2] = $add$ptr$i162; + $parent406$i = ((($add$ptr$i162)) + 24|0); + HEAP32[$parent406$i>>2] = $T$0$i; + $bk407$i = ((($add$ptr$i162)) + 12|0); + HEAP32[$bk407$i>>2] = $add$ptr$i162; + $fd408$i = ((($add$ptr$i162)) + 8|0); + HEAP32[$fd408$i>>2] = $add$ptr$i162; + break; + } + } + else if ((label|0) == 139) { + $fd416$i = ((($T$0$i)) + 8|0); + $88 = HEAP32[$fd416$i>>2]|0; + $89 = HEAP32[(28424)>>2]|0; + $cmp418$i = ($89>>>0)<=($T$0$i>>>0); + $cmp422$i = ($89>>>0)<=($88>>>0); + $90 = $cmp422$i & $cmp418$i; + if ($90) { + $bk429$i = ((($88)) + 12|0); + HEAP32[$bk429$i>>2] = $add$ptr$i162; + HEAP32[$fd416$i>>2] = $add$ptr$i162; + $fd431$i = ((($add$ptr$i162)) + 8|0); + HEAP32[$fd431$i>>2] = $88; + $bk432$i = ((($add$ptr$i162)) + 12|0); + HEAP32[$bk432$i>>2] = $T$0$i; + $parent433$i = ((($add$ptr$i162)) + 24|0); + HEAP32[$parent433$i>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } + } + } + } while(0); + $add$ptr441$i = ((($v$4$lcssa$i)) + 8|0); + $retval$0 = $add$ptr441$i; + STACKTOP = sp;return ($retval$0|0); + } else { + $nb$0 = $and145; + } + } + } + } + } + } while(0); + $91 = HEAP32[(28416)>>2]|0; + $cmp156 = ($91>>>0)<($nb$0>>>0); + if (!($cmp156)) { + $sub160 = (($91) - ($nb$0))|0; + $92 = HEAP32[(28428)>>2]|0; + $cmp162 = ($sub160>>>0)>(15); + if ($cmp162) { + $add$ptr166 = (($92) + ($nb$0)|0); + HEAP32[(28428)>>2] = $add$ptr166; + HEAP32[(28416)>>2] = $sub160; + $or167 = $sub160 | 1; + $head168 = ((($add$ptr166)) + 4|0); + HEAP32[$head168>>2] = $or167; + $add$ptr169 = (($92) + ($91)|0); + HEAP32[$add$ptr169>>2] = $sub160; + $or172 = $nb$0 | 3; + $head173 = ((($92)) + 4|0); + HEAP32[$head173>>2] = $or172; + } else { + HEAP32[(28416)>>2] = 0; + HEAP32[(28428)>>2] = 0; + $or176 = $91 | 3; + $head177 = ((($92)) + 4|0); + HEAP32[$head177>>2] = $or176; + $add$ptr178 = (($92) + ($91)|0); + $head179 = ((($add$ptr178)) + 4|0); + $93 = HEAP32[$head179>>2]|0; + $or180 = $93 | 1; + HEAP32[$head179>>2] = $or180; + } + $add$ptr182 = ((($92)) + 8|0); + $retval$0 = $add$ptr182; + STACKTOP = sp;return ($retval$0|0); + } + $94 = HEAP32[(28420)>>2]|0; + $cmp186 = ($94>>>0)>($nb$0>>>0); + if ($cmp186) { + $sub190 = (($94) - ($nb$0))|0; + HEAP32[(28420)>>2] = $sub190; + $95 = HEAP32[(28432)>>2]|0; + $add$ptr193 = (($95) + ($nb$0)|0); + HEAP32[(28432)>>2] = $add$ptr193; + $or194 = $sub190 | 1; + $head195 = ((($add$ptr193)) + 4|0); + HEAP32[$head195>>2] = $or194; + $or197 = $nb$0 | 3; + $head198 = ((($95)) + 4|0); + HEAP32[$head198>>2] = $or197; + $add$ptr199 = ((($95)) + 8|0); + $retval$0 = $add$ptr199; + STACKTOP = sp;return ($retval$0|0); + } + $96 = HEAP32[7220]|0; + $cmp$i181 = ($96|0)==(0); + if ($cmp$i181) { + HEAP32[(28888)>>2] = 4096; + HEAP32[(28884)>>2] = 4096; + HEAP32[(28892)>>2] = -1; + HEAP32[(28896)>>2] = -1; + HEAP32[(28900)>>2] = 0; + HEAP32[(28852)>>2] = 0; + $97 = $magic$i$i; + $xor$i$i = $97 & -16; + $and6$i$i = $xor$i$i ^ 1431655768; + HEAP32[7220] = $and6$i$i; + $98 = 4096; + } else { + $$pre$i182 = HEAP32[(28888)>>2]|0; + $98 = $$pre$i182; + } + $add$i183 = (($nb$0) + 48)|0; + $sub$i184 = (($nb$0) + 47)|0; + $add9$i = (($98) + ($sub$i184))|0; + $neg$i185 = (0 - ($98))|0; + $and11$i = $add9$i & $neg$i185; + $cmp12$i = ($and11$i>>>0)>($nb$0>>>0); + if (!($cmp12$i)) { + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); + } + $99 = HEAP32[(28848)>>2]|0; + $cmp15$i = ($99|0)==(0); + if (!($cmp15$i)) { + $100 = HEAP32[(28840)>>2]|0; + $add17$i186 = (($100) + ($and11$i))|0; + $cmp19$i = ($add17$i186>>>0)<=($100>>>0); + $cmp21$i = ($add17$i186>>>0)>($99>>>0); + $or$cond1$i = $cmp19$i | $cmp21$i; + if ($or$cond1$i) { + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); + } + } + $101 = HEAP32[(28852)>>2]|0; + $and29$i = $101 & 4; + $tobool30$i = ($and29$i|0)==(0); + L244: do { + if ($tobool30$i) { + $102 = HEAP32[(28432)>>2]|0; + $cmp32$i187 = ($102|0)==(0|0); + L246: do { + if ($cmp32$i187) { + label = 163; + } else { + $sp$0$i$i = (28856); + while(1) { + $103 = HEAP32[$sp$0$i$i>>2]|0; + $cmp$i11$i = ($103>>>0)>($102>>>0); + if (!($cmp$i11$i)) { + $size$i$i = ((($sp$0$i$i)) + 4|0); + $104 = HEAP32[$size$i$i>>2]|0; + $add$ptr$i$i = (($103) + ($104)|0); + $cmp2$i$i = ($add$ptr$i$i>>>0)>($102>>>0); + if ($cmp2$i$i) { + break; + } + } + $next$i$i = ((($sp$0$i$i)) + 8|0); + $105 = HEAP32[$next$i$i>>2]|0; + $cmp3$i$i = ($105|0)==(0|0); + if ($cmp3$i$i) { + label = 163; + break L246; + } else { + $sp$0$i$i = $105; + } + } + $add77$i = (($add9$i) - ($94))|0; + $and80$i = $add77$i & $neg$i185; + $cmp81$i194 = ($and80$i>>>0)<(2147483647); + if ($cmp81$i194) { + $call83$i = (_sbrk(($and80$i|0))|0); + $110 = HEAP32[$sp$0$i$i>>2]|0; + $111 = HEAP32[$size$i$i>>2]|0; + $add$ptr$i196 = (($110) + ($111)|0); + $cmp85$i = ($call83$i|0)==($add$ptr$i196|0); + if ($cmp85$i) { + $cmp89$i = ($call83$i|0)==((-1)|0); + if ($cmp89$i) { + $tsize$2657583$i = $and80$i; + } else { + $tbase$796$i = $call83$i;$tsize$795$i = $and80$i; + label = 180; + break L244; + } + } else { + $br$2$ph$i = $call83$i;$ssize$2$ph$i = $and80$i; + label = 171; + } + } else { + $tsize$2657583$i = 0; + } + } + } while(0); + do { + if ((label|0) == 163) { + $call37$i = (_sbrk(0)|0); + $cmp38$i = ($call37$i|0)==((-1)|0); + if ($cmp38$i) { + $tsize$2657583$i = 0; + } else { + $106 = $call37$i; + $107 = HEAP32[(28884)>>2]|0; + $sub41$i = (($107) + -1)|0; + $and42$i = $sub41$i & $106; + $cmp43$i = ($and42$i|0)==(0); + $add46$i = (($sub41$i) + ($106))|0; + $neg48$i = (0 - ($107))|0; + $and49$i = $add46$i & $neg48$i; + $sub50$i = (($and49$i) - ($106))|0; + $add51$i = $cmp43$i ? 0 : $sub50$i; + $and11$add51$i = (($add51$i) + ($and11$i))|0; + $108 = HEAP32[(28840)>>2]|0; + $add54$i = (($and11$add51$i) + ($108))|0; + $cmp55$i188 = ($and11$add51$i>>>0)>($nb$0>>>0); + $cmp57$i189 = ($and11$add51$i>>>0)<(2147483647); + $or$cond$i190 = $cmp55$i188 & $cmp57$i189; + if ($or$cond$i190) { + $109 = HEAP32[(28848)>>2]|0; + $cmp60$i = ($109|0)==(0); + if (!($cmp60$i)) { + $cmp63$i = ($add54$i>>>0)<=($108>>>0); + $cmp66$i192 = ($add54$i>>>0)>($109>>>0); + $or$cond2$i193 = $cmp63$i | $cmp66$i192; + if ($or$cond2$i193) { + $tsize$2657583$i = 0; + break; + } + } + $call68$i = (_sbrk(($and11$add51$i|0))|0); + $cmp69$i = ($call68$i|0)==($call37$i|0); + if ($cmp69$i) { + $tbase$796$i = $call37$i;$tsize$795$i = $and11$add51$i; + label = 180; + break L244; + } else { + $br$2$ph$i = $call68$i;$ssize$2$ph$i = $and11$add51$i; + label = 171; + } + } else { + $tsize$2657583$i = 0; + } + } + } + } while(0); + do { + if ((label|0) == 171) { + $sub112$i = (0 - ($ssize$2$ph$i))|0; + $cmp91$i = ($br$2$ph$i|0)!=((-1)|0); + $cmp93$i = ($ssize$2$ph$i>>>0)<(2147483647); + $or$cond5$i = $cmp93$i & $cmp91$i; + $cmp96$i = ($add$i183>>>0)>($ssize$2$ph$i>>>0); + $or$cond3$i = $cmp96$i & $or$cond5$i; + if (!($or$cond3$i)) { + $cmp118$i = ($br$2$ph$i|0)==((-1)|0); + if ($cmp118$i) { + $tsize$2657583$i = 0; + break; + } else { + $tbase$796$i = $br$2$ph$i;$tsize$795$i = $ssize$2$ph$i; + label = 180; + break L244; + } + } + $112 = HEAP32[(28888)>>2]|0; + $sub99$i = (($sub$i184) - ($ssize$2$ph$i))|0; + $add101$i = (($sub99$i) + ($112))|0; + $neg103$i = (0 - ($112))|0; + $and104$i = $add101$i & $neg103$i; + $cmp105$i = ($and104$i>>>0)<(2147483647); + if (!($cmp105$i)) { + $tbase$796$i = $br$2$ph$i;$tsize$795$i = $ssize$2$ph$i; + label = 180; + break L244; + } + $call107$i = (_sbrk(($and104$i|0))|0); + $cmp108$i = ($call107$i|0)==((-1)|0); + if ($cmp108$i) { + (_sbrk(($sub112$i|0))|0); + $tsize$2657583$i = 0; + break; + } else { + $add110$i = (($and104$i) + ($ssize$2$ph$i))|0; + $tbase$796$i = $br$2$ph$i;$tsize$795$i = $add110$i; + label = 180; + break L244; + } + } + } while(0); + $113 = HEAP32[(28852)>>2]|0; + $or$i198 = $113 | 4; + HEAP32[(28852)>>2] = $or$i198; + $tsize$4$i = $tsize$2657583$i; + label = 178; + } else { + $tsize$4$i = 0; + label = 178; + } + } while(0); + if ((label|0) == 178) { + $cmp127$i = ($and11$i>>>0)<(2147483647); + if ($cmp127$i) { + $call131$i = (_sbrk(($and11$i|0))|0); + $call132$i = (_sbrk(0)|0); + $cmp133$i199 = ($call131$i|0)!=((-1)|0); + $cmp135$i = ($call132$i|0)!=((-1)|0); + $or$cond4$i = $cmp133$i199 & $cmp135$i; + $cmp137$i200 = ($call131$i>>>0)<($call132$i>>>0); + $or$cond7$i = $cmp137$i200 & $or$cond4$i; + $sub$ptr$lhs$cast$i = $call132$i; + $sub$ptr$rhs$cast$i = $call131$i; + $sub$ptr$sub$i = (($sub$ptr$lhs$cast$i) - ($sub$ptr$rhs$cast$i))|0; + $add140$i = (($nb$0) + 40)|0; + $cmp141$i = ($sub$ptr$sub$i>>>0)>($add140$i>>>0); + $sub$ptr$sub$tsize$4$i = $cmp141$i ? $sub$ptr$sub$i : $tsize$4$i; + $or$cond7$not$i = $or$cond7$i ^ 1; + $cmp14799$i = ($call131$i|0)==((-1)|0); + $not$cmp141$i = $cmp141$i ^ 1; + $cmp147$i = $cmp14799$i | $not$cmp141$i; + $or$cond97$i = $cmp147$i | $or$cond7$not$i; + if (!($or$cond97$i)) { + $tbase$796$i = $call131$i;$tsize$795$i = $sub$ptr$sub$tsize$4$i; + label = 180; + } + } + } + if ((label|0) == 180) { + $114 = HEAP32[(28840)>>2]|0; + $add150$i = (($114) + ($tsize$795$i))|0; + HEAP32[(28840)>>2] = $add150$i; + $115 = HEAP32[(28844)>>2]|0; + $cmp151$i = ($add150$i>>>0)>($115>>>0); + if ($cmp151$i) { + HEAP32[(28844)>>2] = $add150$i; + } + $116 = HEAP32[(28432)>>2]|0; + $cmp157$i = ($116|0)==(0|0); + do { + if ($cmp157$i) { + $117 = HEAP32[(28424)>>2]|0; + $cmp159$i202 = ($117|0)==(0|0); + $cmp162$i203 = ($tbase$796$i>>>0)<($117>>>0); + $or$cond8$i = $cmp159$i202 | $cmp162$i203; + if ($or$cond8$i) { + HEAP32[(28424)>>2] = $tbase$796$i; + } + HEAP32[(28856)>>2] = $tbase$796$i; + HEAP32[(28860)>>2] = $tsize$795$i; + HEAP32[(28868)>>2] = 0; + $118 = HEAP32[7220]|0; + HEAP32[(28444)>>2] = $118; + HEAP32[(28440)>>2] = -1; + HEAP32[(28460)>>2] = (28448); + HEAP32[(28456)>>2] = (28448); + HEAP32[(28468)>>2] = (28456); + HEAP32[(28464)>>2] = (28456); + HEAP32[(28476)>>2] = (28464); + HEAP32[(28472)>>2] = (28464); + HEAP32[(28484)>>2] = (28472); + HEAP32[(28480)>>2] = (28472); + HEAP32[(28492)>>2] = (28480); + HEAP32[(28488)>>2] = (28480); + HEAP32[(28500)>>2] = (28488); + HEAP32[(28496)>>2] = (28488); + HEAP32[(28508)>>2] = (28496); + HEAP32[(28504)>>2] = (28496); + HEAP32[(28516)>>2] = (28504); + HEAP32[(28512)>>2] = (28504); + HEAP32[(28524)>>2] = (28512); + HEAP32[(28520)>>2] = (28512); + HEAP32[(28532)>>2] = (28520); + HEAP32[(28528)>>2] = (28520); + HEAP32[(28540)>>2] = (28528); + HEAP32[(28536)>>2] = (28528); + HEAP32[(28548)>>2] = (28536); + HEAP32[(28544)>>2] = (28536); + HEAP32[(28556)>>2] = (28544); + HEAP32[(28552)>>2] = (28544); + HEAP32[(28564)>>2] = (28552); + HEAP32[(28560)>>2] = (28552); + HEAP32[(28572)>>2] = (28560); + HEAP32[(28568)>>2] = (28560); + HEAP32[(28580)>>2] = (28568); + HEAP32[(28576)>>2] = (28568); + HEAP32[(28588)>>2] = (28576); + HEAP32[(28584)>>2] = (28576); + HEAP32[(28596)>>2] = (28584); + HEAP32[(28592)>>2] = (28584); + HEAP32[(28604)>>2] = (28592); + HEAP32[(28600)>>2] = (28592); + HEAP32[(28612)>>2] = (28600); + HEAP32[(28608)>>2] = (28600); + HEAP32[(28620)>>2] = (28608); + HEAP32[(28616)>>2] = (28608); + HEAP32[(28628)>>2] = (28616); + HEAP32[(28624)>>2] = (28616); + HEAP32[(28636)>>2] = (28624); + HEAP32[(28632)>>2] = (28624); + HEAP32[(28644)>>2] = (28632); + HEAP32[(28640)>>2] = (28632); + HEAP32[(28652)>>2] = (28640); + HEAP32[(28648)>>2] = (28640); + HEAP32[(28660)>>2] = (28648); + HEAP32[(28656)>>2] = (28648); + HEAP32[(28668)>>2] = (28656); + HEAP32[(28664)>>2] = (28656); + HEAP32[(28676)>>2] = (28664); + HEAP32[(28672)>>2] = (28664); + HEAP32[(28684)>>2] = (28672); + HEAP32[(28680)>>2] = (28672); + HEAP32[(28692)>>2] = (28680); + HEAP32[(28688)>>2] = (28680); + HEAP32[(28700)>>2] = (28688); + HEAP32[(28696)>>2] = (28688); + HEAP32[(28708)>>2] = (28696); + HEAP32[(28704)>>2] = (28696); + $sub172$i = (($tsize$795$i) + -40)|0; + $add$ptr$i13$i = ((($tbase$796$i)) + 8|0); + $119 = $add$ptr$i13$i; + $and$i14$i = $119 & 7; + $cmp$i15$i = ($and$i14$i|0)==(0); + $sub$i16$i = (0 - ($119))|0; + $and3$i$i = $sub$i16$i & 7; + $cond$i17$i = $cmp$i15$i ? 0 : $and3$i$i; + $add$ptr4$i$i = (($tbase$796$i) + ($cond$i17$i)|0); + $sub5$i$i = (($sub172$i) - ($cond$i17$i))|0; + HEAP32[(28432)>>2] = $add$ptr4$i$i; + HEAP32[(28420)>>2] = $sub5$i$i; + $or$i$i = $sub5$i$i | 1; + $head$i18$i = ((($add$ptr4$i$i)) + 4|0); + HEAP32[$head$i18$i>>2] = $or$i$i; + $add$ptr6$i$i = (($tbase$796$i) + ($sub172$i)|0); + $head7$i$i = ((($add$ptr6$i$i)) + 4|0); + HEAP32[$head7$i$i>>2] = 40; + $120 = HEAP32[(28896)>>2]|0; + HEAP32[(28436)>>2] = $120; + } else { + $sp$0108$i = (28856); + while(1) { + $121 = HEAP32[$sp$0108$i>>2]|0; + $size188$i = ((($sp$0108$i)) + 4|0); + $122 = HEAP32[$size188$i>>2]|0; + $add$ptr189$i = (($121) + ($122)|0); + $cmp190$i = ($tbase$796$i|0)==($add$ptr189$i|0); + if ($cmp190$i) { + label = 188; + break; + } + $next$i = ((($sp$0108$i)) + 8|0); + $123 = HEAP32[$next$i>>2]|0; + $cmp186$i = ($123|0)==(0|0); + if ($cmp186$i) { + break; + } else { + $sp$0108$i = $123; + } + } + if ((label|0) == 188) { + $sflags193$i = ((($sp$0108$i)) + 12|0); + $124 = HEAP32[$sflags193$i>>2]|0; + $and194$i207 = $124 & 8; + $tobool195$i = ($and194$i207|0)==(0); + if ($tobool195$i) { + $cmp203$i = ($121>>>0)<=($116>>>0); + $cmp209$i = ($tbase$796$i>>>0)>($116>>>0); + $or$cond98$i = $cmp209$i & $cmp203$i; + if ($or$cond98$i) { + $add212$i = (($122) + ($tsize$795$i))|0; + HEAP32[$size188$i>>2] = $add212$i; + $125 = HEAP32[(28420)>>2]|0; + $add215$i = (($125) + ($tsize$795$i))|0; + $add$ptr$i48$i = ((($116)) + 8|0); + $126 = $add$ptr$i48$i; + $and$i49$i = $126 & 7; + $cmp$i50$i = ($and$i49$i|0)==(0); + $sub$i51$i = (0 - ($126))|0; + $and3$i52$i = $sub$i51$i & 7; + $cond$i53$i = $cmp$i50$i ? 0 : $and3$i52$i; + $add$ptr4$i54$i = (($116) + ($cond$i53$i)|0); + $sub5$i55$i = (($add215$i) - ($cond$i53$i))|0; + HEAP32[(28432)>>2] = $add$ptr4$i54$i; + HEAP32[(28420)>>2] = $sub5$i55$i; + $or$i56$i = $sub5$i55$i | 1; + $head$i57$i = ((($add$ptr4$i54$i)) + 4|0); + HEAP32[$head$i57$i>>2] = $or$i56$i; + $add$ptr6$i58$i = (($116) + ($add215$i)|0); + $head7$i59$i = ((($add$ptr6$i58$i)) + 4|0); + HEAP32[$head7$i59$i>>2] = 40; + $127 = HEAP32[(28896)>>2]|0; + HEAP32[(28436)>>2] = $127; + break; + } + } + } + $128 = HEAP32[(28424)>>2]|0; + $cmp218$i = ($tbase$796$i>>>0)<($128>>>0); + if ($cmp218$i) { + HEAP32[(28424)>>2] = $tbase$796$i; + $141 = $tbase$796$i; + } else { + $141 = $128; + } + $add$ptr227$i = (($tbase$796$i) + ($tsize$795$i)|0); + $sp$1107$i = (28856); + while(1) { + $129 = HEAP32[$sp$1107$i>>2]|0; + $cmp228$i = ($129|0)==($add$ptr227$i|0); + if ($cmp228$i) { + label = 196; + break; + } + $next231$i = ((($sp$1107$i)) + 8|0); + $130 = HEAP32[$next231$i>>2]|0; + $cmp224$i = ($130|0)==(0|0); + if ($cmp224$i) { + $sp$0$i$i$i = (28856); + break; + } else { + $sp$1107$i = $130; + } + } + if ((label|0) == 196) { + $sflags235$i = ((($sp$1107$i)) + 12|0); + $131 = HEAP32[$sflags235$i>>2]|0; + $and236$i = $131 & 8; + $tobool237$i = ($and236$i|0)==(0); + if ($tobool237$i) { + HEAP32[$sp$1107$i>>2] = $tbase$796$i; + $size245$i = ((($sp$1107$i)) + 4|0); + $132 = HEAP32[$size245$i>>2]|0; + $add246$i = (($132) + ($tsize$795$i))|0; + HEAP32[$size245$i>>2] = $add246$i; + $add$ptr$i19$i = ((($tbase$796$i)) + 8|0); + $133 = $add$ptr$i19$i; + $and$i20$i = $133 & 7; + $cmp$i21$i = ($and$i20$i|0)==(0); + $sub$i22$i = (0 - ($133))|0; + $and3$i23$i = $sub$i22$i & 7; + $cond$i24$i = $cmp$i21$i ? 0 : $and3$i23$i; + $add$ptr4$i25$i = (($tbase$796$i) + ($cond$i24$i)|0); + $add$ptr5$i$i = ((($add$ptr227$i)) + 8|0); + $134 = $add$ptr5$i$i; + $and6$i26$i = $134 & 7; + $cmp7$i$i = ($and6$i26$i|0)==(0); + $sub12$i$i = (0 - ($134))|0; + $and13$i$i = $sub12$i$i & 7; + $cond15$i$i = $cmp7$i$i ? 0 : $and13$i$i; + $add$ptr16$i$i = (($add$ptr227$i) + ($cond15$i$i)|0); + $sub$ptr$lhs$cast$i27$i = $add$ptr16$i$i; + $sub$ptr$rhs$cast$i28$i = $add$ptr4$i25$i; + $sub$ptr$sub$i29$i = (($sub$ptr$lhs$cast$i27$i) - ($sub$ptr$rhs$cast$i28$i))|0; + $add$ptr17$i$i = (($add$ptr4$i25$i) + ($nb$0)|0); + $sub18$i$i = (($sub$ptr$sub$i29$i) - ($nb$0))|0; + $or19$i$i = $nb$0 | 3; + $head$i30$i = ((($add$ptr4$i25$i)) + 4|0); + HEAP32[$head$i30$i>>2] = $or19$i$i; + $cmp20$i$i = ($116|0)==($add$ptr16$i$i|0); + do { + if ($cmp20$i$i) { + $135 = HEAP32[(28420)>>2]|0; + $add$i$i = (($135) + ($sub18$i$i))|0; + HEAP32[(28420)>>2] = $add$i$i; + HEAP32[(28432)>>2] = $add$ptr17$i$i; + $or22$i$i = $add$i$i | 1; + $head23$i$i = ((($add$ptr17$i$i)) + 4|0); + HEAP32[$head23$i$i>>2] = $or22$i$i; + } else { + $136 = HEAP32[(28428)>>2]|0; + $cmp24$i$i = ($136|0)==($add$ptr16$i$i|0); + if ($cmp24$i$i) { + $137 = HEAP32[(28416)>>2]|0; + $add26$i$i = (($137) + ($sub18$i$i))|0; + HEAP32[(28416)>>2] = $add26$i$i; + HEAP32[(28428)>>2] = $add$ptr17$i$i; + $or28$i$i = $add26$i$i | 1; + $head29$i$i = ((($add$ptr17$i$i)) + 4|0); + HEAP32[$head29$i$i>>2] = $or28$i$i; + $add$ptr30$i$i = (($add$ptr17$i$i) + ($add26$i$i)|0); + HEAP32[$add$ptr30$i$i>>2] = $add26$i$i; + break; + } + $head32$i$i = ((($add$ptr16$i$i)) + 4|0); + $138 = HEAP32[$head32$i$i>>2]|0; + $and33$i$i = $138 & 3; + $cmp34$i$i = ($and33$i$i|0)==(1); + if ($cmp34$i$i) { + $and37$i$i = $138 & -8; + $shr$i33$i = $138 >>> 3; + $cmp38$i$i = ($138>>>0)<(256); + L311: do { + if ($cmp38$i$i) { + $fd$i$i = ((($add$ptr16$i$i)) + 8|0); + $139 = HEAP32[$fd$i$i>>2]|0; + $bk$i34$i = ((($add$ptr16$i$i)) + 12|0); + $140 = HEAP32[$bk$i34$i>>2]|0; + $shl$i35$i = $shr$i33$i << 1; + $arrayidx$i36$i = (28448 + ($shl$i35$i<<2)|0); + $cmp41$i$i = ($139|0)==($arrayidx$i36$i|0); + do { + if (!($cmp41$i$i)) { + $cmp42$i$i = ($141>>>0)>($139>>>0); + if ($cmp42$i$i) { + _abort(); + // unreachable; + } + $bk43$i$i = ((($139)) + 12|0); + $142 = HEAP32[$bk43$i$i>>2]|0; + $cmp44$i$i = ($142|0)==($add$ptr16$i$i|0); + if ($cmp44$i$i) { + break; + } + _abort(); + // unreachable; + } + } while(0); + $cmp46$i37$i = ($140|0)==($139|0); + if ($cmp46$i37$i) { + $shl48$i$i = 1 << $shr$i33$i; + $neg$i$i = $shl48$i$i ^ -1; + $143 = HEAP32[7102]|0; + $and49$i$i = $143 & $neg$i$i; + HEAP32[7102] = $and49$i$i; + break; + } + $cmp54$i$i = ($140|0)==($arrayidx$i36$i|0); + do { + if ($cmp54$i$i) { + $$pre6$i$i = ((($140)) + 8|0); + $fd68$pre$phi$i$iZ2D = $$pre6$i$i; + } else { + $cmp57$i$i = ($141>>>0)>($140>>>0); + if ($cmp57$i$i) { + _abort(); + // unreachable; + } + $fd59$i$i = ((($140)) + 8|0); + $144 = HEAP32[$fd59$i$i>>2]|0; + $cmp60$i$i = ($144|0)==($add$ptr16$i$i|0); + if ($cmp60$i$i) { + $fd68$pre$phi$i$iZ2D = $fd59$i$i; + break; + } + _abort(); + // unreachable; + } + } while(0); + $bk67$i$i = ((($139)) + 12|0); + HEAP32[$bk67$i$i>>2] = $140; + HEAP32[$fd68$pre$phi$i$iZ2D>>2] = $139; + } else { + $parent$i39$i = ((($add$ptr16$i$i)) + 24|0); + $145 = HEAP32[$parent$i39$i>>2]|0; + $bk74$i$i = ((($add$ptr16$i$i)) + 12|0); + $146 = HEAP32[$bk74$i$i>>2]|0; + $cmp75$i$i = ($146|0)==($add$ptr16$i$i|0); + do { + if ($cmp75$i$i) { + $child$i$i = ((($add$ptr16$i$i)) + 16|0); + $arrayidx96$i$i = ((($child$i$i)) + 4|0); + $150 = HEAP32[$arrayidx96$i$i>>2]|0; + $cmp97$i$i = ($150|0)==(0|0); + if ($cmp97$i$i) { + $151 = HEAP32[$child$i$i>>2]|0; + $cmp100$i$i = ($151|0)==(0|0); + if ($cmp100$i$i) { + $R$3$i$i = 0; + break; + } else { + $R$1$i$i = $151;$RP$1$i$i = $child$i$i; + } + } else { + $R$1$i$i = $150;$RP$1$i$i = $arrayidx96$i$i; + } + while(1) { + $arrayidx103$i$i = ((($R$1$i$i)) + 20|0); + $152 = HEAP32[$arrayidx103$i$i>>2]|0; + $cmp104$i$i = ($152|0)==(0|0); + if (!($cmp104$i$i)) { + $R$1$i$i = $152;$RP$1$i$i = $arrayidx103$i$i; + continue; + } + $arrayidx107$i$i = ((($R$1$i$i)) + 16|0); + $153 = HEAP32[$arrayidx107$i$i>>2]|0; + $cmp108$i$i = ($153|0)==(0|0); + if ($cmp108$i$i) { + break; + } else { + $R$1$i$i = $153;$RP$1$i$i = $arrayidx107$i$i; + } + } + $cmp112$i$i = ($141>>>0)>($RP$1$i$i>>>0); + if ($cmp112$i$i) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$1$i$i>>2] = 0; + $R$3$i$i = $R$1$i$i; + break; + } + } else { + $fd78$i$i = ((($add$ptr16$i$i)) + 8|0); + $147 = HEAP32[$fd78$i$i>>2]|0; + $cmp81$i$i = ($141>>>0)>($147>>>0); + if ($cmp81$i$i) { + _abort(); + // unreachable; + } + $bk82$i$i = ((($147)) + 12|0); + $148 = HEAP32[$bk82$i$i>>2]|0; + $cmp83$i$i = ($148|0)==($add$ptr16$i$i|0); + if (!($cmp83$i$i)) { + _abort(); + // unreachable; + } + $fd85$i$i = ((($146)) + 8|0); + $149 = HEAP32[$fd85$i$i>>2]|0; + $cmp86$i$i = ($149|0)==($add$ptr16$i$i|0); + if ($cmp86$i$i) { + HEAP32[$bk82$i$i>>2] = $146; + HEAP32[$fd85$i$i>>2] = $147; + $R$3$i$i = $146; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $cmp120$i41$i = ($145|0)==(0|0); + if ($cmp120$i41$i) { + break; + } + $index$i42$i = ((($add$ptr16$i$i)) + 28|0); + $154 = HEAP32[$index$i42$i>>2]|0; + $arrayidx123$i$i = (28712 + ($154<<2)|0); + $155 = HEAP32[$arrayidx123$i$i>>2]|0; + $cmp124$i$i = ($155|0)==($add$ptr16$i$i|0); + do { + if ($cmp124$i$i) { + HEAP32[$arrayidx123$i$i>>2] = $R$3$i$i; + $cond3$i$i = ($R$3$i$i|0)==(0|0); + if (!($cond3$i$i)) { + break; + } + $shl131$i$i = 1 << $154; + $neg132$i$i = $shl131$i$i ^ -1; + $156 = HEAP32[(28412)>>2]|0; + $and133$i$i = $156 & $neg132$i$i; + HEAP32[(28412)>>2] = $and133$i$i; + break L311; + } else { + $157 = HEAP32[(28424)>>2]|0; + $cmp137$i$i = ($157>>>0)>($145>>>0); + if ($cmp137$i$i) { + _abort(); + // unreachable; + } else { + $arrayidx143$i$i = ((($145)) + 16|0); + $158 = HEAP32[$arrayidx143$i$i>>2]|0; + $cmp144$i$i = ($158|0)!=($add$ptr16$i$i|0); + $$sink$i$i = $cmp144$i$i&1; + $arrayidx151$i$i = (((($145)) + 16|0) + ($$sink$i$i<<2)|0); + HEAP32[$arrayidx151$i$i>>2] = $R$3$i$i; + $cmp156$i$i = ($R$3$i$i|0)==(0|0); + if ($cmp156$i$i) { + break L311; + } else { + break; + } + } + } + } while(0); + $159 = HEAP32[(28424)>>2]|0; + $cmp160$i$i = ($159>>>0)>($R$3$i$i>>>0); + if ($cmp160$i$i) { + _abort(); + // unreachable; + } + $parent165$i$i = ((($R$3$i$i)) + 24|0); + HEAP32[$parent165$i$i>>2] = $145; + $child166$i$i = ((($add$ptr16$i$i)) + 16|0); + $160 = HEAP32[$child166$i$i>>2]|0; + $cmp168$i$i = ($160|0)==(0|0); + do { + if (!($cmp168$i$i)) { + $cmp172$i$i = ($159>>>0)>($160>>>0); + if ($cmp172$i$i) { + _abort(); + // unreachable; + } else { + $arrayidx178$i$i = ((($R$3$i$i)) + 16|0); + HEAP32[$arrayidx178$i$i>>2] = $160; + $parent179$i$i = ((($160)) + 24|0); + HEAP32[$parent179$i$i>>2] = $R$3$i$i; + break; + } + } + } while(0); + $arrayidx184$i$i = ((($child166$i$i)) + 4|0); + $161 = HEAP32[$arrayidx184$i$i>>2]|0; + $cmp185$i$i = ($161|0)==(0|0); + if ($cmp185$i$i) { + break; + } + $162 = HEAP32[(28424)>>2]|0; + $cmp189$i$i = ($162>>>0)>($161>>>0); + if ($cmp189$i$i) { + _abort(); + // unreachable; + } else { + $arrayidx195$i$i = ((($R$3$i$i)) + 20|0); + HEAP32[$arrayidx195$i$i>>2] = $161; + $parent196$i$i = ((($161)) + 24|0); + HEAP32[$parent196$i$i>>2] = $R$3$i$i; + break; + } + } + } while(0); + $add$ptr205$i$i = (($add$ptr16$i$i) + ($and37$i$i)|0); + $add206$i$i = (($and37$i$i) + ($sub18$i$i))|0; + $oldfirst$0$i$i = $add$ptr205$i$i;$qsize$0$i$i = $add206$i$i; + } else { + $oldfirst$0$i$i = $add$ptr16$i$i;$qsize$0$i$i = $sub18$i$i; + } + $head208$i$i = ((($oldfirst$0$i$i)) + 4|0); + $163 = HEAP32[$head208$i$i>>2]|0; + $and209$i$i = $163 & -2; + HEAP32[$head208$i$i>>2] = $and209$i$i; + $or210$i$i = $qsize$0$i$i | 1; + $head211$i$i = ((($add$ptr17$i$i)) + 4|0); + HEAP32[$head211$i$i>>2] = $or210$i$i; + $add$ptr212$i$i = (($add$ptr17$i$i) + ($qsize$0$i$i)|0); + HEAP32[$add$ptr212$i$i>>2] = $qsize$0$i$i; + $shr214$i$i = $qsize$0$i$i >>> 3; + $cmp215$i$i = ($qsize$0$i$i>>>0)<(256); + if ($cmp215$i$i) { + $shl222$i$i = $shr214$i$i << 1; + $arrayidx223$i$i = (28448 + ($shl222$i$i<<2)|0); + $164 = HEAP32[7102]|0; + $shl226$i$i = 1 << $shr214$i$i; + $and227$i$i = $164 & $shl226$i$i; + $tobool228$i$i = ($and227$i$i|0)==(0); + do { + if ($tobool228$i$i) { + $or232$i$i = $164 | $shl226$i$i; + HEAP32[7102] = $or232$i$i; + $$pre$i44$i = ((($arrayidx223$i$i)) + 8|0); + $$pre$phi$i45$iZ2D = $$pre$i44$i;$F224$0$i$i = $arrayidx223$i$i; + } else { + $165 = ((($arrayidx223$i$i)) + 8|0); + $166 = HEAP32[$165>>2]|0; + $167 = HEAP32[(28424)>>2]|0; + $cmp236$i$i = ($167>>>0)>($166>>>0); + if (!($cmp236$i$i)) { + $$pre$phi$i45$iZ2D = $165;$F224$0$i$i = $166; + break; + } + _abort(); + // unreachable; + } + } while(0); + HEAP32[$$pre$phi$i45$iZ2D>>2] = $add$ptr17$i$i; + $bk246$i$i = ((($F224$0$i$i)) + 12|0); + HEAP32[$bk246$i$i>>2] = $add$ptr17$i$i; + $fd247$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd247$i$i>>2] = $F224$0$i$i; + $bk248$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk248$i$i>>2] = $arrayidx223$i$i; + break; + } + $shr253$i$i = $qsize$0$i$i >>> 8; + $cmp254$i$i = ($shr253$i$i|0)==(0); + do { + if ($cmp254$i$i) { + $I252$0$i$i = 0; + } else { + $cmp258$i$i = ($qsize$0$i$i>>>0)>(16777215); + if ($cmp258$i$i) { + $I252$0$i$i = 31; + break; + } + $sub262$i$i = (($shr253$i$i) + 1048320)|0; + $shr263$i$i = $sub262$i$i >>> 16; + $and264$i$i = $shr263$i$i & 8; + $shl265$i$i = $shr253$i$i << $and264$i$i; + $sub266$i$i = (($shl265$i$i) + 520192)|0; + $shr267$i$i = $sub266$i$i >>> 16; + $and268$i$i = $shr267$i$i & 4; + $add269$i$i = $and268$i$i | $and264$i$i; + $shl270$i$i = $shl265$i$i << $and268$i$i; + $sub271$i$i = (($shl270$i$i) + 245760)|0; + $shr272$i$i = $sub271$i$i >>> 16; + $and273$i$i = $shr272$i$i & 2; + $add274$i$i = $add269$i$i | $and273$i$i; + $sub275$i$i = (14 - ($add274$i$i))|0; + $shl276$i$i = $shl270$i$i << $and273$i$i; + $shr277$i$i = $shl276$i$i >>> 15; + $add278$i$i = (($sub275$i$i) + ($shr277$i$i))|0; + $shl279$i$i = $add278$i$i << 1; + $add280$i$i = (($add278$i$i) + 7)|0; + $shr281$i$i = $qsize$0$i$i >>> $add280$i$i; + $and282$i$i = $shr281$i$i & 1; + $add283$i$i = $and282$i$i | $shl279$i$i; + $I252$0$i$i = $add283$i$i; + } + } while(0); + $arrayidx287$i$i = (28712 + ($I252$0$i$i<<2)|0); + $index288$i$i = ((($add$ptr17$i$i)) + 28|0); + HEAP32[$index288$i$i>>2] = $I252$0$i$i; + $child289$i$i = ((($add$ptr17$i$i)) + 16|0); + $arrayidx290$i$i = ((($child289$i$i)) + 4|0); + HEAP32[$arrayidx290$i$i>>2] = 0; + HEAP32[$child289$i$i>>2] = 0; + $168 = HEAP32[(28412)>>2]|0; + $shl294$i$i = 1 << $I252$0$i$i; + $and295$i$i = $168 & $shl294$i$i; + $tobool296$i$i = ($and295$i$i|0)==(0); + if ($tobool296$i$i) { + $or300$i$i = $168 | $shl294$i$i; + HEAP32[(28412)>>2] = $or300$i$i; + HEAP32[$arrayidx287$i$i>>2] = $add$ptr17$i$i; + $parent301$i$i = ((($add$ptr17$i$i)) + 24|0); + HEAP32[$parent301$i$i>>2] = $arrayidx287$i$i; + $bk302$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk302$i$i>>2] = $add$ptr17$i$i; + $fd303$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd303$i$i>>2] = $add$ptr17$i$i; + break; + } + $169 = HEAP32[$arrayidx287$i$i>>2]|0; + $cmp306$i$i = ($I252$0$i$i|0)==(31); + $shr310$i$i = $I252$0$i$i >>> 1; + $sub313$i$i = (25 - ($shr310$i$i))|0; + $cond315$i$i = $cmp306$i$i ? 0 : $sub313$i$i; + $shl316$i$i = $qsize$0$i$i << $cond315$i$i; + $K305$0$i$i = $shl316$i$i;$T$0$i46$i = $169; + while(1) { + $head317$i$i = ((($T$0$i46$i)) + 4|0); + $170 = HEAP32[$head317$i$i>>2]|0; + $and318$i$i = $170 & -8; + $cmp319$i$i = ($and318$i$i|0)==($qsize$0$i$i|0); + if ($cmp319$i$i) { + label = 263; + break; + } + $shr323$i$i = $K305$0$i$i >>> 31; + $arrayidx325$i$i = (((($T$0$i46$i)) + 16|0) + ($shr323$i$i<<2)|0); + $shl326$i$i = $K305$0$i$i << 1; + $171 = HEAP32[$arrayidx325$i$i>>2]|0; + $cmp327$i$i = ($171|0)==(0|0); + if ($cmp327$i$i) { + label = 260; + break; + } else { + $K305$0$i$i = $shl326$i$i;$T$0$i46$i = $171; + } + } + if ((label|0) == 260) { + $172 = HEAP32[(28424)>>2]|0; + $cmp332$i$i = ($172>>>0)>($arrayidx325$i$i>>>0); + if ($cmp332$i$i) { + _abort(); + // unreachable; + } else { + HEAP32[$arrayidx325$i$i>>2] = $add$ptr17$i$i; + $parent337$i$i = ((($add$ptr17$i$i)) + 24|0); + HEAP32[$parent337$i$i>>2] = $T$0$i46$i; + $bk338$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk338$i$i>>2] = $add$ptr17$i$i; + $fd339$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd339$i$i>>2] = $add$ptr17$i$i; + break; + } + } + else if ((label|0) == 263) { + $fd344$i$i = ((($T$0$i46$i)) + 8|0); + $173 = HEAP32[$fd344$i$i>>2]|0; + $174 = HEAP32[(28424)>>2]|0; + $cmp346$i$i = ($174>>>0)<=($T$0$i46$i>>>0); + $cmp350$i$i = ($174>>>0)<=($173>>>0); + $175 = $cmp350$i$i & $cmp346$i$i; + if ($175) { + $bk357$i$i = ((($173)) + 12|0); + HEAP32[$bk357$i$i>>2] = $add$ptr17$i$i; + HEAP32[$fd344$i$i>>2] = $add$ptr17$i$i; + $fd359$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd359$i$i>>2] = $173; + $bk360$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk360$i$i>>2] = $T$0$i46$i; + $parent361$i$i = ((($add$ptr17$i$i)) + 24|0); + HEAP32[$parent361$i$i>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } + } + } + } while(0); + $add$ptr369$i$i = ((($add$ptr4$i25$i)) + 8|0); + $retval$0 = $add$ptr369$i$i; + STACKTOP = sp;return ($retval$0|0); + } else { + $sp$0$i$i$i = (28856); + } + } + while(1) { + $176 = HEAP32[$sp$0$i$i$i>>2]|0; + $cmp$i$i$i = ($176>>>0)>($116>>>0); + if (!($cmp$i$i$i)) { + $size$i$i$i = ((($sp$0$i$i$i)) + 4|0); + $177 = HEAP32[$size$i$i$i>>2]|0; + $add$ptr$i$i$i = (($176) + ($177)|0); + $cmp2$i$i$i = ($add$ptr$i$i$i>>>0)>($116>>>0); + if ($cmp2$i$i$i) { + break; + } + } + $next$i$i$i = ((($sp$0$i$i$i)) + 8|0); + $178 = HEAP32[$next$i$i$i>>2]|0; + $sp$0$i$i$i = $178; + } + $add$ptr2$i$i = ((($add$ptr$i$i$i)) + -47|0); + $add$ptr3$i$i = ((($add$ptr2$i$i)) + 8|0); + $179 = $add$ptr3$i$i; + $and$i$i = $179 & 7; + $cmp$i9$i = ($and$i$i|0)==(0); + $sub$i$i = (0 - ($179))|0; + $and6$i10$i = $sub$i$i & 7; + $cond$i$i = $cmp$i9$i ? 0 : $and6$i10$i; + $add$ptr7$i$i = (($add$ptr2$i$i) + ($cond$i$i)|0); + $add$ptr81$i$i = ((($116)) + 16|0); + $cmp9$i$i = ($add$ptr7$i$i>>>0)<($add$ptr81$i$i>>>0); + $cond13$i$i = $cmp9$i$i ? $116 : $add$ptr7$i$i; + $add$ptr14$i$i = ((($cond13$i$i)) + 8|0); + $add$ptr15$i$i = ((($cond13$i$i)) + 24|0); + $sub16$i$i = (($tsize$795$i) + -40)|0; + $add$ptr$i3$i$i = ((($tbase$796$i)) + 8|0); + $180 = $add$ptr$i3$i$i; + $and$i$i$i = $180 & 7; + $cmp$i4$i$i = ($and$i$i$i|0)==(0); + $sub$i$i$i = (0 - ($180))|0; + $and3$i$i$i = $sub$i$i$i & 7; + $cond$i$i$i = $cmp$i4$i$i ? 0 : $and3$i$i$i; + $add$ptr4$i$i$i = (($tbase$796$i) + ($cond$i$i$i)|0); + $sub5$i$i$i = (($sub16$i$i) - ($cond$i$i$i))|0; + HEAP32[(28432)>>2] = $add$ptr4$i$i$i; + HEAP32[(28420)>>2] = $sub5$i$i$i; + $or$i$i$i = $sub5$i$i$i | 1; + $head$i$i$i = ((($add$ptr4$i$i$i)) + 4|0); + HEAP32[$head$i$i$i>>2] = $or$i$i$i; + $add$ptr6$i$i$i = (($tbase$796$i) + ($sub16$i$i)|0); + $head7$i$i$i = ((($add$ptr6$i$i$i)) + 4|0); + HEAP32[$head7$i$i$i>>2] = 40; + $181 = HEAP32[(28896)>>2]|0; + HEAP32[(28436)>>2] = $181; + $head$i$i = ((($cond13$i$i)) + 4|0); + HEAP32[$head$i$i>>2] = 27; + ;HEAP32[$add$ptr14$i$i>>2]=HEAP32[(28856)>>2]|0;HEAP32[$add$ptr14$i$i+4>>2]=HEAP32[(28856)+4>>2]|0;HEAP32[$add$ptr14$i$i+8>>2]=HEAP32[(28856)+8>>2]|0;HEAP32[$add$ptr14$i$i+12>>2]=HEAP32[(28856)+12>>2]|0; + HEAP32[(28856)>>2] = $tbase$796$i; + HEAP32[(28860)>>2] = $tsize$795$i; + HEAP32[(28868)>>2] = 0; + HEAP32[(28864)>>2] = $add$ptr14$i$i; + $182 = $add$ptr15$i$i; + while(1) { + $add$ptr24$i$i = ((($182)) + 4|0); + HEAP32[$add$ptr24$i$i>>2] = 7; + $head26$i$i = ((($182)) + 8|0); + $cmp27$i$i = ($head26$i$i>>>0)<($add$ptr$i$i$i>>>0); + if ($cmp27$i$i) { + $182 = $add$ptr24$i$i; + } else { + break; + } + } + $cmp28$i$i = ($cond13$i$i|0)==($116|0); + if (!($cmp28$i$i)) { + $sub$ptr$lhs$cast$i$i = $cond13$i$i; + $sub$ptr$rhs$cast$i$i = $116; + $sub$ptr$sub$i$i = (($sub$ptr$lhs$cast$i$i) - ($sub$ptr$rhs$cast$i$i))|0; + $183 = HEAP32[$head$i$i>>2]|0; + $and32$i$i = $183 & -2; + HEAP32[$head$i$i>>2] = $and32$i$i; + $or33$i$i = $sub$ptr$sub$i$i | 1; + $head34$i$i = ((($116)) + 4|0); + HEAP32[$head34$i$i>>2] = $or33$i$i; + HEAP32[$cond13$i$i>>2] = $sub$ptr$sub$i$i; + $shr$i$i = $sub$ptr$sub$i$i >>> 3; + $cmp36$i$i = ($sub$ptr$sub$i$i>>>0)<(256); + if ($cmp36$i$i) { + $shl$i$i = $shr$i$i << 1; + $arrayidx$i$i = (28448 + ($shl$i$i<<2)|0); + $184 = HEAP32[7102]|0; + $shl39$i$i = 1 << $shr$i$i; + $and40$i$i = $184 & $shl39$i$i; + $tobool$i$i = ($and40$i$i|0)==(0); + if ($tobool$i$i) { + $or44$i$i = $184 | $shl39$i$i; + HEAP32[7102] = $or44$i$i; + $$pre$i$i = ((($arrayidx$i$i)) + 8|0); + $$pre$phi$i$iZ2D = $$pre$i$i;$F$0$i$i = $arrayidx$i$i; + } else { + $185 = ((($arrayidx$i$i)) + 8|0); + $186 = HEAP32[$185>>2]|0; + $187 = HEAP32[(28424)>>2]|0; + $cmp46$i$i = ($187>>>0)>($186>>>0); + if ($cmp46$i$i) { + _abort(); + // unreachable; + } else { + $$pre$phi$i$iZ2D = $185;$F$0$i$i = $186; + } + } + HEAP32[$$pre$phi$i$iZ2D>>2] = $116; + $bk$i$i = ((($F$0$i$i)) + 12|0); + HEAP32[$bk$i$i>>2] = $116; + $fd54$i$i = ((($116)) + 8|0); + HEAP32[$fd54$i$i>>2] = $F$0$i$i; + $bk55$i$i = ((($116)) + 12|0); + HEAP32[$bk55$i$i>>2] = $arrayidx$i$i; + break; + } + $shr58$i$i = $sub$ptr$sub$i$i >>> 8; + $cmp59$i$i = ($shr58$i$i|0)==(0); + if ($cmp59$i$i) { + $I57$0$i$i = 0; + } else { + $cmp63$i$i = ($sub$ptr$sub$i$i>>>0)>(16777215); + if ($cmp63$i$i) { + $I57$0$i$i = 31; + } else { + $sub67$i$i = (($shr58$i$i) + 1048320)|0; + $shr68$i$i = $sub67$i$i >>> 16; + $and69$i$i = $shr68$i$i & 8; + $shl70$i$i = $shr58$i$i << $and69$i$i; + $sub71$i$i = (($shl70$i$i) + 520192)|0; + $shr72$i$i = $sub71$i$i >>> 16; + $and73$i$i = $shr72$i$i & 4; + $add74$i$i = $and73$i$i | $and69$i$i; + $shl75$i$i = $shl70$i$i << $and73$i$i; + $sub76$i$i = (($shl75$i$i) + 245760)|0; + $shr77$i$i = $sub76$i$i >>> 16; + $and78$i$i = $shr77$i$i & 2; + $add79$i$i = $add74$i$i | $and78$i$i; + $sub80$i$i = (14 - ($add79$i$i))|0; + $shl81$i$i = $shl75$i$i << $and78$i$i; + $shr82$i$i = $shl81$i$i >>> 15; + $add83$i$i = (($sub80$i$i) + ($shr82$i$i))|0; + $shl84$i$i = $add83$i$i << 1; + $add85$i$i = (($add83$i$i) + 7)|0; + $shr86$i$i = $sub$ptr$sub$i$i >>> $add85$i$i; + $and87$i$i = $shr86$i$i & 1; + $add88$i$i = $and87$i$i | $shl84$i$i; + $I57$0$i$i = $add88$i$i; + } + } + $arrayidx91$i$i = (28712 + ($I57$0$i$i<<2)|0); + $index$i$i = ((($116)) + 28|0); + HEAP32[$index$i$i>>2] = $I57$0$i$i; + $arrayidx92$i$i = ((($116)) + 20|0); + HEAP32[$arrayidx92$i$i>>2] = 0; + HEAP32[$add$ptr81$i$i>>2] = 0; + $188 = HEAP32[(28412)>>2]|0; + $shl95$i$i = 1 << $I57$0$i$i; + $and96$i$i = $188 & $shl95$i$i; + $tobool97$i$i = ($and96$i$i|0)==(0); + if ($tobool97$i$i) { + $or101$i$i = $188 | $shl95$i$i; + HEAP32[(28412)>>2] = $or101$i$i; + HEAP32[$arrayidx91$i$i>>2] = $116; + $parent$i$i = ((($116)) + 24|0); + HEAP32[$parent$i$i>>2] = $arrayidx91$i$i; + $bk102$i$i = ((($116)) + 12|0); + HEAP32[$bk102$i$i>>2] = $116; + $fd103$i$i = ((($116)) + 8|0); + HEAP32[$fd103$i$i>>2] = $116; + break; + } + $189 = HEAP32[$arrayidx91$i$i>>2]|0; + $cmp106$i$i = ($I57$0$i$i|0)==(31); + $shr110$i$i = $I57$0$i$i >>> 1; + $sub113$i$i = (25 - ($shr110$i$i))|0; + $cond115$i$i = $cmp106$i$i ? 0 : $sub113$i$i; + $shl116$i$i = $sub$ptr$sub$i$i << $cond115$i$i; + $K105$0$i$i = $shl116$i$i;$T$0$i$i = $189; + while(1) { + $head118$i$i = ((($T$0$i$i)) + 4|0); + $190 = HEAP32[$head118$i$i>>2]|0; + $and119$i$i = $190 & -8; + $cmp120$i$i = ($and119$i$i|0)==($sub$ptr$sub$i$i|0); + if ($cmp120$i$i) { + label = 289; + break; + } + $shr124$i$i = $K105$0$i$i >>> 31; + $arrayidx126$i$i = (((($T$0$i$i)) + 16|0) + ($shr124$i$i<<2)|0); + $shl127$i$i = $K105$0$i$i << 1; + $191 = HEAP32[$arrayidx126$i$i>>2]|0; + $cmp128$i$i = ($191|0)==(0|0); + if ($cmp128$i$i) { + label = 286; + break; + } else { + $K105$0$i$i = $shl127$i$i;$T$0$i$i = $191; + } + } + if ((label|0) == 286) { + $192 = HEAP32[(28424)>>2]|0; + $cmp133$i$i = ($192>>>0)>($arrayidx126$i$i>>>0); + if ($cmp133$i$i) { + _abort(); + // unreachable; + } else { + HEAP32[$arrayidx126$i$i>>2] = $116; + $parent138$i$i = ((($116)) + 24|0); + HEAP32[$parent138$i$i>>2] = $T$0$i$i; + $bk139$i$i = ((($116)) + 12|0); + HEAP32[$bk139$i$i>>2] = $116; + $fd140$i$i = ((($116)) + 8|0); + HEAP32[$fd140$i$i>>2] = $116; + break; + } + } + else if ((label|0) == 289) { + $fd148$i$i = ((($T$0$i$i)) + 8|0); + $193 = HEAP32[$fd148$i$i>>2]|0; + $194 = HEAP32[(28424)>>2]|0; + $cmp150$i$i = ($194>>>0)<=($T$0$i$i>>>0); + $cmp153$i$i = ($194>>>0)<=($193>>>0); + $195 = $cmp153$i$i & $cmp150$i$i; + if ($195) { + $bk158$i$i = ((($193)) + 12|0); + HEAP32[$bk158$i$i>>2] = $116; + HEAP32[$fd148$i$i>>2] = $116; + $fd160$i$i = ((($116)) + 8|0); + HEAP32[$fd160$i$i>>2] = $193; + $bk161$i$i = ((($116)) + 12|0); + HEAP32[$bk161$i$i>>2] = $T$0$i$i; + $parent162$i$i = ((($116)) + 24|0); + HEAP32[$parent162$i$i>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } + } + } + } + } while(0); + $196 = HEAP32[(28420)>>2]|0; + $cmp257$i = ($196>>>0)>($nb$0>>>0); + if ($cmp257$i) { + $sub260$i = (($196) - ($nb$0))|0; + HEAP32[(28420)>>2] = $sub260$i; + $197 = HEAP32[(28432)>>2]|0; + $add$ptr262$i = (($197) + ($nb$0)|0); + HEAP32[(28432)>>2] = $add$ptr262$i; + $or264$i = $sub260$i | 1; + $head265$i = ((($add$ptr262$i)) + 4|0); + HEAP32[$head265$i>>2] = $or264$i; + $or267$i = $nb$0 | 3; + $head268$i = ((($197)) + 4|0); + HEAP32[$head268$i>>2] = $or267$i; + $add$ptr269$i = ((($197)) + 8|0); + $retval$0 = $add$ptr269$i; + STACKTOP = sp;return ($retval$0|0); + } + } + $call275$i = (___errno_location()|0); + HEAP32[$call275$i>>2] = 12; + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); +} +function _free($mem) { + $mem = $mem|0; + var $$pre = 0, $$pre$phiZ2D = 0, $$pre309 = 0, $$pre310 = 0, $$sink = 0, $$sink4 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; + var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; + var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; + var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0; + var $8 = 0, $9 = 0, $F510$0 = 0, $I534$0 = 0, $K583$0 = 0, $R$1 = 0, $R$3 = 0, $R332$1 = 0, $R332$3 = 0, $RP$1 = 0, $RP360$1 = 0, $T$0 = 0, $add$ptr = 0, $add$ptr16 = 0, $add$ptr217 = 0, $add$ptr261 = 0, $add$ptr482 = 0, $add$ptr498 = 0, $add$ptr6 = 0, $add17 = 0; + var $add246 = 0, $add258 = 0, $add267 = 0, $add550 = 0, $add555 = 0, $add559 = 0, $add561 = 0, $add564 = 0, $and = 0, $and140 = 0, $and210 = 0, $and215 = 0, $and232 = 0, $and240 = 0, $and266 = 0, $and301 = 0, $and410 = 0, $and46 = 0, $and495 = 0, $and5 = 0; + var $and512 = 0, $and545 = 0, $and549 = 0, $and554 = 0, $and563 = 0, $and574 = 0, $and592 = 0, $and8 = 0, $arrayidx = 0, $arrayidx108 = 0, $arrayidx113 = 0, $arrayidx130 = 0, $arrayidx149 = 0, $arrayidx157 = 0, $arrayidx182 = 0, $arrayidx188 = 0, $arrayidx198 = 0, $arrayidx279 = 0, $arrayidx362 = 0, $arrayidx374 = 0; + var $arrayidx379 = 0, $arrayidx400 = 0, $arrayidx419 = 0, $arrayidx427 = 0, $arrayidx454 = 0, $arrayidx460 = 0, $arrayidx470 = 0, $arrayidx509 = 0, $arrayidx567 = 0, $arrayidx570 = 0, $arrayidx599 = 0, $arrayidx99 = 0, $bk = 0, $bk275 = 0, $bk286 = 0, $bk321 = 0, $bk333 = 0, $bk34 = 0, $bk343 = 0, $bk529 = 0; + var $bk531 = 0, $bk580 = 0, $bk611 = 0, $bk631 = 0, $bk634 = 0, $bk66 = 0, $bk73 = 0, $bk82 = 0, $child = 0, $child171 = 0, $child361 = 0, $child443 = 0, $child569 = 0, $cmp = 0, $cmp$i = 0, $cmp1 = 0, $cmp100 = 0, $cmp104 = 0, $cmp109 = 0, $cmp114 = 0; + var $cmp118 = 0, $cmp127 = 0, $cmp13 = 0, $cmp131 = 0, $cmp143 = 0, $cmp150 = 0, $cmp162 = 0, $cmp165 = 0, $cmp173 = 0, $cmp176 = 0, $cmp18 = 0, $cmp189 = 0, $cmp192 = 0, $cmp2 = 0, $cmp211 = 0, $cmp22 = 0, $cmp228 = 0, $cmp243 = 0, $cmp249 = 0, $cmp25 = 0; + var $cmp255 = 0, $cmp269 = 0, $cmp280 = 0, $cmp283 = 0, $cmp287 = 0, $cmp29 = 0, $cmp296 = 0, $cmp305 = 0, $cmp308 = 0, $cmp31 = 0, $cmp312 = 0, $cmp334 = 0, $cmp340 = 0, $cmp344 = 0, $cmp348 = 0, $cmp35 = 0, $cmp363 = 0, $cmp368 = 0, $cmp375 = 0, $cmp380 = 0; + var $cmp386 = 0, $cmp395 = 0, $cmp401 = 0, $cmp413 = 0, $cmp42 = 0, $cmp420 = 0, $cmp432 = 0, $cmp435 = 0, $cmp445 = 0, $cmp448 = 0, $cmp461 = 0, $cmp464 = 0, $cmp484 = 0, $cmp50 = 0, $cmp502 = 0, $cmp519 = 0, $cmp53 = 0, $cmp536 = 0, $cmp540 = 0, $cmp57 = 0; + var $cmp584 = 0, $cmp593 = 0, $cmp601 = 0, $cmp605 = 0, $cmp621 = 0, $cmp624 = 0, $cmp640 = 0, $cmp74 = 0, $cmp80 = 0, $cmp83 = 0, $cmp87 = 0, $cond = 0, $cond293 = 0, $cond294 = 0, $dec = 0, $fd = 0, $fd273 = 0, $fd311 = 0, $fd322$pre$phiZ2D = 0, $fd338 = 0; + var $fd347 = 0, $fd530 = 0, $fd56 = 0, $fd581 = 0, $fd612 = 0, $fd620 = 0, $fd633 = 0, $fd67$pre$phiZ2D = 0, $fd78 = 0, $fd86 = 0, $head = 0, $head209 = 0, $head216 = 0, $head231 = 0, $head248 = 0, $head260 = 0, $head481 = 0, $head497 = 0, $head591 = 0, $idx$neg = 0; + var $index = 0, $index399 = 0, $index568 = 0, $neg = 0, $neg139 = 0, $neg300 = 0, $neg409 = 0, $next4$i = 0, $or = 0, $or247 = 0, $or259 = 0, $or480 = 0, $or496 = 0, $or516 = 0, $or578 = 0, $p$1 = 0, $parent = 0, $parent170 = 0, $parent183 = 0, $parent199 = 0; + var $parent331 = 0, $parent442 = 0, $parent455 = 0, $parent471 = 0, $parent579 = 0, $parent610 = 0, $parent635 = 0, $psize$1 = 0, $psize$2 = 0, $shl = 0, $shl138 = 0, $shl278 = 0, $shl299 = 0, $shl408 = 0, $shl45 = 0, $shl508 = 0, $shl511 = 0, $shl546 = 0, $shl551 = 0, $shl557 = 0; + var $shl560 = 0, $shl573 = 0, $shl590 = 0, $shl600 = 0, $shr = 0, $shr268 = 0, $shr501 = 0, $shr535 = 0, $shr544 = 0, $shr548 = 0, $shr553 = 0, $shr558 = 0, $shr562 = 0, $shr586 = 0, $shr597 = 0, $sp$0$i = 0, $sp$0$in$i = 0, $sub = 0, $sub547 = 0, $sub552 = 0; + var $sub556 = 0, $sub589 = 0, $tobool233 = 0, $tobool241 = 0, $tobool513 = 0, $tobool575 = 0, $tobool9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($mem|0)==(0|0); + if ($cmp) { + return; + } + $add$ptr = ((($mem)) + -8|0); + $0 = HEAP32[(28424)>>2]|0; + $cmp1 = ($add$ptr>>>0)<($0>>>0); + if ($cmp1) { + _abort(); + // unreachable; + } + $head = ((($mem)) + -4|0); + $1 = HEAP32[$head>>2]|0; + $and = $1 & 3; + $cmp2 = ($and|0)==(1); + if ($cmp2) { + _abort(); + // unreachable; + } + $and5 = $1 & -8; + $add$ptr6 = (($add$ptr) + ($and5)|0); + $and8 = $1 & 1; + $tobool9 = ($and8|0)==(0); + L10: do { + if ($tobool9) { + $2 = HEAP32[$add$ptr>>2]|0; + $cmp13 = ($and|0)==(0); + if ($cmp13) { + return; + } + $idx$neg = (0 - ($2))|0; + $add$ptr16 = (($add$ptr) + ($idx$neg)|0); + $add17 = (($2) + ($and5))|0; + $cmp18 = ($add$ptr16>>>0)<($0>>>0); + if ($cmp18) { + _abort(); + // unreachable; + } + $3 = HEAP32[(28428)>>2]|0; + $cmp22 = ($3|0)==($add$ptr16|0); + if ($cmp22) { + $head209 = ((($add$ptr6)) + 4|0); + $27 = HEAP32[$head209>>2]|0; + $and210 = $27 & 3; + $cmp211 = ($and210|0)==(3); + if (!($cmp211)) { + $28 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + HEAP32[(28416)>>2] = $add17; + $and215 = $27 & -2; + HEAP32[$head209>>2] = $and215; + $or = $add17 | 1; + $head216 = ((($add$ptr16)) + 4|0); + HEAP32[$head216>>2] = $or; + $add$ptr217 = (($add$ptr16) + ($add17)|0); + HEAP32[$add$ptr217>>2] = $add17; + return; + } + $shr = $2 >>> 3; + $cmp25 = ($2>>>0)<(256); + if ($cmp25) { + $fd = ((($add$ptr16)) + 8|0); + $4 = HEAP32[$fd>>2]|0; + $bk = ((($add$ptr16)) + 12|0); + $5 = HEAP32[$bk>>2]|0; + $shl = $shr << 1; + $arrayidx = (28448 + ($shl<<2)|0); + $cmp29 = ($4|0)==($arrayidx|0); + if (!($cmp29)) { + $cmp31 = ($0>>>0)>($4>>>0); + if ($cmp31) { + _abort(); + // unreachable; + } + $bk34 = ((($4)) + 12|0); + $6 = HEAP32[$bk34>>2]|0; + $cmp35 = ($6|0)==($add$ptr16|0); + if (!($cmp35)) { + _abort(); + // unreachable; + } + } + $cmp42 = ($5|0)==($4|0); + if ($cmp42) { + $shl45 = 1 << $shr; + $neg = $shl45 ^ -1; + $7 = HEAP32[7102]|0; + $and46 = $7 & $neg; + HEAP32[7102] = $and46; + $28 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + $cmp50 = ($5|0)==($arrayidx|0); + if ($cmp50) { + $$pre310 = ((($5)) + 8|0); + $fd67$pre$phiZ2D = $$pre310; + } else { + $cmp53 = ($0>>>0)>($5>>>0); + if ($cmp53) { + _abort(); + // unreachable; + } + $fd56 = ((($5)) + 8|0); + $8 = HEAP32[$fd56>>2]|0; + $cmp57 = ($8|0)==($add$ptr16|0); + if ($cmp57) { + $fd67$pre$phiZ2D = $fd56; + } else { + _abort(); + // unreachable; + } + } + $bk66 = ((($4)) + 12|0); + HEAP32[$bk66>>2] = $5; + HEAP32[$fd67$pre$phiZ2D>>2] = $4; + $28 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + $parent = ((($add$ptr16)) + 24|0); + $9 = HEAP32[$parent>>2]|0; + $bk73 = ((($add$ptr16)) + 12|0); + $10 = HEAP32[$bk73>>2]|0; + $cmp74 = ($10|0)==($add$ptr16|0); + do { + if ($cmp74) { + $child = ((($add$ptr16)) + 16|0); + $arrayidx99 = ((($child)) + 4|0); + $14 = HEAP32[$arrayidx99>>2]|0; + $cmp100 = ($14|0)==(0|0); + if ($cmp100) { + $15 = HEAP32[$child>>2]|0; + $cmp104 = ($15|0)==(0|0); + if ($cmp104) { + $R$3 = 0; + break; + } else { + $R$1 = $15;$RP$1 = $child; + } + } else { + $R$1 = $14;$RP$1 = $arrayidx99; + } + while(1) { + $arrayidx108 = ((($R$1)) + 20|0); + $16 = HEAP32[$arrayidx108>>2]|0; + $cmp109 = ($16|0)==(0|0); + if (!($cmp109)) { + $R$1 = $16;$RP$1 = $arrayidx108; + continue; + } + $arrayidx113 = ((($R$1)) + 16|0); + $17 = HEAP32[$arrayidx113>>2]|0; + $cmp114 = ($17|0)==(0|0); + if ($cmp114) { + break; + } else { + $R$1 = $17;$RP$1 = $arrayidx113; + } + } + $cmp118 = ($0>>>0)>($RP$1>>>0); + if ($cmp118) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$1>>2] = 0; + $R$3 = $R$1; + break; + } + } else { + $fd78 = ((($add$ptr16)) + 8|0); + $11 = HEAP32[$fd78>>2]|0; + $cmp80 = ($0>>>0)>($11>>>0); + if ($cmp80) { + _abort(); + // unreachable; + } + $bk82 = ((($11)) + 12|0); + $12 = HEAP32[$bk82>>2]|0; + $cmp83 = ($12|0)==($add$ptr16|0); + if (!($cmp83)) { + _abort(); + // unreachable; + } + $fd86 = ((($10)) + 8|0); + $13 = HEAP32[$fd86>>2]|0; + $cmp87 = ($13|0)==($add$ptr16|0); + if ($cmp87) { + HEAP32[$bk82>>2] = $10; + HEAP32[$fd86>>2] = $11; + $R$3 = $10; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $cmp127 = ($9|0)==(0|0); + if ($cmp127) { + $28 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + } else { + $index = ((($add$ptr16)) + 28|0); + $18 = HEAP32[$index>>2]|0; + $arrayidx130 = (28712 + ($18<<2)|0); + $19 = HEAP32[$arrayidx130>>2]|0; + $cmp131 = ($19|0)==($add$ptr16|0); + do { + if ($cmp131) { + HEAP32[$arrayidx130>>2] = $R$3; + $cond293 = ($R$3|0)==(0|0); + if ($cond293) { + $shl138 = 1 << $18; + $neg139 = $shl138 ^ -1; + $20 = HEAP32[(28412)>>2]|0; + $and140 = $20 & $neg139; + HEAP32[(28412)>>2] = $and140; + $28 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break L10; + } + } else { + $21 = HEAP32[(28424)>>2]|0; + $cmp143 = ($21>>>0)>($9>>>0); + if ($cmp143) { + _abort(); + // unreachable; + } else { + $arrayidx149 = ((($9)) + 16|0); + $22 = HEAP32[$arrayidx149>>2]|0; + $cmp150 = ($22|0)!=($add$ptr16|0); + $$sink = $cmp150&1; + $arrayidx157 = (((($9)) + 16|0) + ($$sink<<2)|0); + HEAP32[$arrayidx157>>2] = $R$3; + $cmp162 = ($R$3|0)==(0|0); + if ($cmp162) { + $28 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break L10; + } else { + break; + } + } + } + } while(0); + $23 = HEAP32[(28424)>>2]|0; + $cmp165 = ($23>>>0)>($R$3>>>0); + if ($cmp165) { + _abort(); + // unreachable; + } + $parent170 = ((($R$3)) + 24|0); + HEAP32[$parent170>>2] = $9; + $child171 = ((($add$ptr16)) + 16|0); + $24 = HEAP32[$child171>>2]|0; + $cmp173 = ($24|0)==(0|0); + do { + if (!($cmp173)) { + $cmp176 = ($23>>>0)>($24>>>0); + if ($cmp176) { + _abort(); + // unreachable; + } else { + $arrayidx182 = ((($R$3)) + 16|0); + HEAP32[$arrayidx182>>2] = $24; + $parent183 = ((($24)) + 24|0); + HEAP32[$parent183>>2] = $R$3; + break; + } + } + } while(0); + $arrayidx188 = ((($child171)) + 4|0); + $25 = HEAP32[$arrayidx188>>2]|0; + $cmp189 = ($25|0)==(0|0); + if ($cmp189) { + $28 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + } else { + $26 = HEAP32[(28424)>>2]|0; + $cmp192 = ($26>>>0)>($25>>>0); + if ($cmp192) { + _abort(); + // unreachable; + } else { + $arrayidx198 = ((($R$3)) + 20|0); + HEAP32[$arrayidx198>>2] = $25; + $parent199 = ((($25)) + 24|0); + HEAP32[$parent199>>2] = $R$3; + $28 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + } + } + } else { + $28 = $add$ptr;$p$1 = $add$ptr;$psize$1 = $and5; + } + } while(0); + $cmp228 = ($28>>>0)<($add$ptr6>>>0); + if (!($cmp228)) { + _abort(); + // unreachable; + } + $head231 = ((($add$ptr6)) + 4|0); + $29 = HEAP32[$head231>>2]|0; + $and232 = $29 & 1; + $tobool233 = ($and232|0)==(0); + if ($tobool233) { + _abort(); + // unreachable; + } + $and240 = $29 & 2; + $tobool241 = ($and240|0)==(0); + if ($tobool241) { + $30 = HEAP32[(28432)>>2]|0; + $cmp243 = ($30|0)==($add$ptr6|0); + if ($cmp243) { + $31 = HEAP32[(28420)>>2]|0; + $add246 = (($31) + ($psize$1))|0; + HEAP32[(28420)>>2] = $add246; + HEAP32[(28432)>>2] = $p$1; + $or247 = $add246 | 1; + $head248 = ((($p$1)) + 4|0); + HEAP32[$head248>>2] = $or247; + $32 = HEAP32[(28428)>>2]|0; + $cmp249 = ($p$1|0)==($32|0); + if (!($cmp249)) { + return; + } + HEAP32[(28428)>>2] = 0; + HEAP32[(28416)>>2] = 0; + return; + } + $33 = HEAP32[(28428)>>2]|0; + $cmp255 = ($33|0)==($add$ptr6|0); + if ($cmp255) { + $34 = HEAP32[(28416)>>2]|0; + $add258 = (($34) + ($psize$1))|0; + HEAP32[(28416)>>2] = $add258; + HEAP32[(28428)>>2] = $28; + $or259 = $add258 | 1; + $head260 = ((($p$1)) + 4|0); + HEAP32[$head260>>2] = $or259; + $add$ptr261 = (($28) + ($add258)|0); + HEAP32[$add$ptr261>>2] = $add258; + return; + } + $and266 = $29 & -8; + $add267 = (($and266) + ($psize$1))|0; + $shr268 = $29 >>> 3; + $cmp269 = ($29>>>0)<(256); + L108: do { + if ($cmp269) { + $fd273 = ((($add$ptr6)) + 8|0); + $35 = HEAP32[$fd273>>2]|0; + $bk275 = ((($add$ptr6)) + 12|0); + $36 = HEAP32[$bk275>>2]|0; + $shl278 = $shr268 << 1; + $arrayidx279 = (28448 + ($shl278<<2)|0); + $cmp280 = ($35|0)==($arrayidx279|0); + if (!($cmp280)) { + $37 = HEAP32[(28424)>>2]|0; + $cmp283 = ($37>>>0)>($35>>>0); + if ($cmp283) { + _abort(); + // unreachable; + } + $bk286 = ((($35)) + 12|0); + $38 = HEAP32[$bk286>>2]|0; + $cmp287 = ($38|0)==($add$ptr6|0); + if (!($cmp287)) { + _abort(); + // unreachable; + } + } + $cmp296 = ($36|0)==($35|0); + if ($cmp296) { + $shl299 = 1 << $shr268; + $neg300 = $shl299 ^ -1; + $39 = HEAP32[7102]|0; + $and301 = $39 & $neg300; + HEAP32[7102] = $and301; + break; + } + $cmp305 = ($36|0)==($arrayidx279|0); + if ($cmp305) { + $$pre309 = ((($36)) + 8|0); + $fd322$pre$phiZ2D = $$pre309; + } else { + $40 = HEAP32[(28424)>>2]|0; + $cmp308 = ($40>>>0)>($36>>>0); + if ($cmp308) { + _abort(); + // unreachable; + } + $fd311 = ((($36)) + 8|0); + $41 = HEAP32[$fd311>>2]|0; + $cmp312 = ($41|0)==($add$ptr6|0); + if ($cmp312) { + $fd322$pre$phiZ2D = $fd311; + } else { + _abort(); + // unreachable; + } + } + $bk321 = ((($35)) + 12|0); + HEAP32[$bk321>>2] = $36; + HEAP32[$fd322$pre$phiZ2D>>2] = $35; + } else { + $parent331 = ((($add$ptr6)) + 24|0); + $42 = HEAP32[$parent331>>2]|0; + $bk333 = ((($add$ptr6)) + 12|0); + $43 = HEAP32[$bk333>>2]|0; + $cmp334 = ($43|0)==($add$ptr6|0); + do { + if ($cmp334) { + $child361 = ((($add$ptr6)) + 16|0); + $arrayidx362 = ((($child361)) + 4|0); + $48 = HEAP32[$arrayidx362>>2]|0; + $cmp363 = ($48|0)==(0|0); + if ($cmp363) { + $49 = HEAP32[$child361>>2]|0; + $cmp368 = ($49|0)==(0|0); + if ($cmp368) { + $R332$3 = 0; + break; + } else { + $R332$1 = $49;$RP360$1 = $child361; + } + } else { + $R332$1 = $48;$RP360$1 = $arrayidx362; + } + while(1) { + $arrayidx374 = ((($R332$1)) + 20|0); + $50 = HEAP32[$arrayidx374>>2]|0; + $cmp375 = ($50|0)==(0|0); + if (!($cmp375)) { + $R332$1 = $50;$RP360$1 = $arrayidx374; + continue; + } + $arrayidx379 = ((($R332$1)) + 16|0); + $51 = HEAP32[$arrayidx379>>2]|0; + $cmp380 = ($51|0)==(0|0); + if ($cmp380) { + break; + } else { + $R332$1 = $51;$RP360$1 = $arrayidx379; + } + } + $52 = HEAP32[(28424)>>2]|0; + $cmp386 = ($52>>>0)>($RP360$1>>>0); + if ($cmp386) { + _abort(); + // unreachable; + } else { + HEAP32[$RP360$1>>2] = 0; + $R332$3 = $R332$1; + break; + } + } else { + $fd338 = ((($add$ptr6)) + 8|0); + $44 = HEAP32[$fd338>>2]|0; + $45 = HEAP32[(28424)>>2]|0; + $cmp340 = ($45>>>0)>($44>>>0); + if ($cmp340) { + _abort(); + // unreachable; + } + $bk343 = ((($44)) + 12|0); + $46 = HEAP32[$bk343>>2]|0; + $cmp344 = ($46|0)==($add$ptr6|0); + if (!($cmp344)) { + _abort(); + // unreachable; + } + $fd347 = ((($43)) + 8|0); + $47 = HEAP32[$fd347>>2]|0; + $cmp348 = ($47|0)==($add$ptr6|0); + if ($cmp348) { + HEAP32[$bk343>>2] = $43; + HEAP32[$fd347>>2] = $44; + $R332$3 = $43; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $cmp395 = ($42|0)==(0|0); + if (!($cmp395)) { + $index399 = ((($add$ptr6)) + 28|0); + $53 = HEAP32[$index399>>2]|0; + $arrayidx400 = (28712 + ($53<<2)|0); + $54 = HEAP32[$arrayidx400>>2]|0; + $cmp401 = ($54|0)==($add$ptr6|0); + do { + if ($cmp401) { + HEAP32[$arrayidx400>>2] = $R332$3; + $cond294 = ($R332$3|0)==(0|0); + if ($cond294) { + $shl408 = 1 << $53; + $neg409 = $shl408 ^ -1; + $55 = HEAP32[(28412)>>2]|0; + $and410 = $55 & $neg409; + HEAP32[(28412)>>2] = $and410; + break L108; + } + } else { + $56 = HEAP32[(28424)>>2]|0; + $cmp413 = ($56>>>0)>($42>>>0); + if ($cmp413) { + _abort(); + // unreachable; + } else { + $arrayidx419 = ((($42)) + 16|0); + $57 = HEAP32[$arrayidx419>>2]|0; + $cmp420 = ($57|0)!=($add$ptr6|0); + $$sink4 = $cmp420&1; + $arrayidx427 = (((($42)) + 16|0) + ($$sink4<<2)|0); + HEAP32[$arrayidx427>>2] = $R332$3; + $cmp432 = ($R332$3|0)==(0|0); + if ($cmp432) { + break L108; + } else { + break; + } + } + } + } while(0); + $58 = HEAP32[(28424)>>2]|0; + $cmp435 = ($58>>>0)>($R332$3>>>0); + if ($cmp435) { + _abort(); + // unreachable; + } + $parent442 = ((($R332$3)) + 24|0); + HEAP32[$parent442>>2] = $42; + $child443 = ((($add$ptr6)) + 16|0); + $59 = HEAP32[$child443>>2]|0; + $cmp445 = ($59|0)==(0|0); + do { + if (!($cmp445)) { + $cmp448 = ($58>>>0)>($59>>>0); + if ($cmp448) { + _abort(); + // unreachable; + } else { + $arrayidx454 = ((($R332$3)) + 16|0); + HEAP32[$arrayidx454>>2] = $59; + $parent455 = ((($59)) + 24|0); + HEAP32[$parent455>>2] = $R332$3; + break; + } + } + } while(0); + $arrayidx460 = ((($child443)) + 4|0); + $60 = HEAP32[$arrayidx460>>2]|0; + $cmp461 = ($60|0)==(0|0); + if (!($cmp461)) { + $61 = HEAP32[(28424)>>2]|0; + $cmp464 = ($61>>>0)>($60>>>0); + if ($cmp464) { + _abort(); + // unreachable; + } else { + $arrayidx470 = ((($R332$3)) + 20|0); + HEAP32[$arrayidx470>>2] = $60; + $parent471 = ((($60)) + 24|0); + HEAP32[$parent471>>2] = $R332$3; + break; + } + } + } + } + } while(0); + $or480 = $add267 | 1; + $head481 = ((($p$1)) + 4|0); + HEAP32[$head481>>2] = $or480; + $add$ptr482 = (($28) + ($add267)|0); + HEAP32[$add$ptr482>>2] = $add267; + $62 = HEAP32[(28428)>>2]|0; + $cmp484 = ($p$1|0)==($62|0); + if ($cmp484) { + HEAP32[(28416)>>2] = $add267; + return; + } else { + $psize$2 = $add267; + } + } else { + $and495 = $29 & -2; + HEAP32[$head231>>2] = $and495; + $or496 = $psize$1 | 1; + $head497 = ((($p$1)) + 4|0); + HEAP32[$head497>>2] = $or496; + $add$ptr498 = (($28) + ($psize$1)|0); + HEAP32[$add$ptr498>>2] = $psize$1; + $psize$2 = $psize$1; + } + $shr501 = $psize$2 >>> 3; + $cmp502 = ($psize$2>>>0)<(256); + if ($cmp502) { + $shl508 = $shr501 << 1; + $arrayidx509 = (28448 + ($shl508<<2)|0); + $63 = HEAP32[7102]|0; + $shl511 = 1 << $shr501; + $and512 = $63 & $shl511; + $tobool513 = ($and512|0)==(0); + if ($tobool513) { + $or516 = $63 | $shl511; + HEAP32[7102] = $or516; + $$pre = ((($arrayidx509)) + 8|0); + $$pre$phiZ2D = $$pre;$F510$0 = $arrayidx509; + } else { + $64 = ((($arrayidx509)) + 8|0); + $65 = HEAP32[$64>>2]|0; + $66 = HEAP32[(28424)>>2]|0; + $cmp519 = ($66>>>0)>($65>>>0); + if ($cmp519) { + _abort(); + // unreachable; + } else { + $$pre$phiZ2D = $64;$F510$0 = $65; + } + } + HEAP32[$$pre$phiZ2D>>2] = $p$1; + $bk529 = ((($F510$0)) + 12|0); + HEAP32[$bk529>>2] = $p$1; + $fd530 = ((($p$1)) + 8|0); + HEAP32[$fd530>>2] = $F510$0; + $bk531 = ((($p$1)) + 12|0); + HEAP32[$bk531>>2] = $arrayidx509; + return; + } + $shr535 = $psize$2 >>> 8; + $cmp536 = ($shr535|0)==(0); + if ($cmp536) { + $I534$0 = 0; + } else { + $cmp540 = ($psize$2>>>0)>(16777215); + if ($cmp540) { + $I534$0 = 31; + } else { + $sub = (($shr535) + 1048320)|0; + $shr544 = $sub >>> 16; + $and545 = $shr544 & 8; + $shl546 = $shr535 << $and545; + $sub547 = (($shl546) + 520192)|0; + $shr548 = $sub547 >>> 16; + $and549 = $shr548 & 4; + $add550 = $and549 | $and545; + $shl551 = $shl546 << $and549; + $sub552 = (($shl551) + 245760)|0; + $shr553 = $sub552 >>> 16; + $and554 = $shr553 & 2; + $add555 = $add550 | $and554; + $sub556 = (14 - ($add555))|0; + $shl557 = $shl551 << $and554; + $shr558 = $shl557 >>> 15; + $add559 = (($sub556) + ($shr558))|0; + $shl560 = $add559 << 1; + $add561 = (($add559) + 7)|0; + $shr562 = $psize$2 >>> $add561; + $and563 = $shr562 & 1; + $add564 = $and563 | $shl560; + $I534$0 = $add564; + } + } + $arrayidx567 = (28712 + ($I534$0<<2)|0); + $index568 = ((($p$1)) + 28|0); + HEAP32[$index568>>2] = $I534$0; + $child569 = ((($p$1)) + 16|0); + $arrayidx570 = ((($p$1)) + 20|0); + HEAP32[$arrayidx570>>2] = 0; + HEAP32[$child569>>2] = 0; + $67 = HEAP32[(28412)>>2]|0; + $shl573 = 1 << $I534$0; + $and574 = $67 & $shl573; + $tobool575 = ($and574|0)==(0); + do { + if ($tobool575) { + $or578 = $67 | $shl573; + HEAP32[(28412)>>2] = $or578; + HEAP32[$arrayidx567>>2] = $p$1; + $parent579 = ((($p$1)) + 24|0); + HEAP32[$parent579>>2] = $arrayidx567; + $bk580 = ((($p$1)) + 12|0); + HEAP32[$bk580>>2] = $p$1; + $fd581 = ((($p$1)) + 8|0); + HEAP32[$fd581>>2] = $p$1; + } else { + $68 = HEAP32[$arrayidx567>>2]|0; + $cmp584 = ($I534$0|0)==(31); + $shr586 = $I534$0 >>> 1; + $sub589 = (25 - ($shr586))|0; + $cond = $cmp584 ? 0 : $sub589; + $shl590 = $psize$2 << $cond; + $K583$0 = $shl590;$T$0 = $68; + while(1) { + $head591 = ((($T$0)) + 4|0); + $69 = HEAP32[$head591>>2]|0; + $and592 = $69 & -8; + $cmp593 = ($and592|0)==($psize$2|0); + if ($cmp593) { + label = 124; + break; + } + $shr597 = $K583$0 >>> 31; + $arrayidx599 = (((($T$0)) + 16|0) + ($shr597<<2)|0); + $shl600 = $K583$0 << 1; + $70 = HEAP32[$arrayidx599>>2]|0; + $cmp601 = ($70|0)==(0|0); + if ($cmp601) { + label = 121; + break; + } else { + $K583$0 = $shl600;$T$0 = $70; + } + } + if ((label|0) == 121) { + $71 = HEAP32[(28424)>>2]|0; + $cmp605 = ($71>>>0)>($arrayidx599>>>0); + if ($cmp605) { + _abort(); + // unreachable; + } else { + HEAP32[$arrayidx599>>2] = $p$1; + $parent610 = ((($p$1)) + 24|0); + HEAP32[$parent610>>2] = $T$0; + $bk611 = ((($p$1)) + 12|0); + HEAP32[$bk611>>2] = $p$1; + $fd612 = ((($p$1)) + 8|0); + HEAP32[$fd612>>2] = $p$1; + break; + } + } + else if ((label|0) == 124) { + $fd620 = ((($T$0)) + 8|0); + $72 = HEAP32[$fd620>>2]|0; + $73 = HEAP32[(28424)>>2]|0; + $cmp621 = ($73>>>0)<=($T$0>>>0); + $cmp624 = ($73>>>0)<=($72>>>0); + $74 = $cmp624 & $cmp621; + if ($74) { + $bk631 = ((($72)) + 12|0); + HEAP32[$bk631>>2] = $p$1; + HEAP32[$fd620>>2] = $p$1; + $fd633 = ((($p$1)) + 8|0); + HEAP32[$fd633>>2] = $72; + $bk634 = ((($p$1)) + 12|0); + HEAP32[$bk634>>2] = $T$0; + $parent635 = ((($p$1)) + 24|0); + HEAP32[$parent635>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } + } + } + } while(0); + $75 = HEAP32[(28440)>>2]|0; + $dec = (($75) + -1)|0; + HEAP32[(28440)>>2] = $dec; + $cmp640 = ($dec|0)==(0); + if ($cmp640) { + $sp$0$in$i = (28864); + } else { + return; + } + while(1) { + $sp$0$i = HEAP32[$sp$0$in$i>>2]|0; + $cmp$i = ($sp$0$i|0)==(0|0); + $next4$i = ((($sp$0$i)) + 8|0); + if ($cmp$i) { + break; + } else { + $sp$0$in$i = $next4$i; + } + } + HEAP32[(28440)>>2] = -1; + return; +} +function ___stdio_close($f) { + $f = $f|0; + var $0 = 0, $call = 0, $call1 = 0, $call2 = 0, $fd = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $fd = ((($f)) + 60|0); + $0 = HEAP32[$fd>>2]|0; + $call = (_dummy($0)|0); + HEAP32[$vararg_buffer>>2] = $call; + $call1 = (___syscall6(6,($vararg_buffer|0))|0); + $call2 = (___syscall_ret($call1)|0); + STACKTOP = sp;return ($call2|0); +} +function ___stdio_seek($f,$off,$whence) { + $f = $f|0; + $off = $off|0; + $whence = $whence|0; + var $$pre = 0, $0 = 0, $1 = 0, $2 = 0, $call = 0, $call1 = 0, $cmp = 0, $fd = 0, $ret = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr4 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer = sp; + $ret = sp + 20|0; + $fd = ((($f)) + 60|0); + $0 = HEAP32[$fd>>2]|0; + $1 = $ret; + HEAP32[$vararg_buffer>>2] = $0; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 0; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $off; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $1; + $vararg_ptr4 = ((($vararg_buffer)) + 16|0); + HEAP32[$vararg_ptr4>>2] = $whence; + $call = (___syscall140(140,($vararg_buffer|0))|0); + $call1 = (___syscall_ret($call)|0); + $cmp = ($call1|0)<(0); + if ($cmp) { + HEAP32[$ret>>2] = -1; + $2 = -1; + } else { + $$pre = HEAP32[$ret>>2]|0; + $2 = $$pre; + } + STACKTOP = sp;return ($2|0); +} +function ___syscall_ret($r) { + $r = $r|0; + var $call = 0, $cmp = 0, $retval$0 = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($r>>>0)>(4294963200); + if ($cmp) { + $sub = (0 - ($r))|0; + $call = (___errno_location()|0); + HEAP32[$call>>2] = $sub; + $retval$0 = -1; + } else { + $retval$0 = $r; + } + return ($retval$0|0); +} +function ___errno_location() { + var label = 0, sp = 0; + sp = STACKTOP; + return (28968|0); +} +function _dummy($fd) { + $fd = $fd|0; + var label = 0, sp = 0; + sp = STACKTOP; + return ($fd|0); +} +function ___stdout_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $0 = 0, $1 = 0, $2 = 0, $and = 0, $call = 0, $call3 = 0, $fd = 0, $lbf = 0, $tobool = 0, $tobool2 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $write = 0, $wsz = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer = sp; + $wsz = sp + 16|0; + $write = ((($f)) + 36|0); + HEAP32[$write>>2] = 23; + $0 = HEAP32[$f>>2]|0; + $and = $0 & 64; + $tobool = ($and|0)==(0); + if ($tobool) { + $fd = ((($f)) + 60|0); + $1 = HEAP32[$fd>>2]|0; + $2 = $wsz; + HEAP32[$vararg_buffer>>2] = $1; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 21523; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $2; + $call = (___syscall54(54,($vararg_buffer|0))|0); + $tobool2 = ($call|0)==(0); + if (!($tobool2)) { + $lbf = ((($f)) + 75|0); + HEAP8[$lbf>>0] = -1; + } + } + $call3 = (___stdio_write($f,$buf,$len)|0); + STACKTOP = sp;return ($call3|0); +} +function ___stdio_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add$ptr = 0, $add$ptr32 = 0, $buf8 = 0, $buf_size = 0, $call = 0; + var $call40 = 0, $call7 = 0, $call741 = 0, $call746 = 0, $cmp = 0, $cmp12 = 0, $cmp17 = 0, $cmp24 = 0, $cmp42 = 0, $cnt$0 = 0, $dec = 0, $fd = 0, $incdec$ptr = 0, $iov$043 = 0, $iov$1 = 0, $iov_base2 = 0, $iov_len = 0, $iov_len19 = 0, $iov_len23 = 0, $iov_len3 = 0; + var $iov_len36 = 0, $iovcnt$045 = 0, $iovcnt$1 = 0, $iovs = 0, $or = 0, $rem$044 = 0, $retval$0 = 0, $sub = 0, $sub$ptr$sub = 0, $sub21 = 0, $sub28 = 0, $sub37 = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, $vararg_ptr7 = 0, $wbase = 0, $wend = 0; + var $wend14 = 0, $wpos = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $vararg_buffer3 = sp + 16|0; + $vararg_buffer = sp; + $iovs = sp + 32|0; + $wbase = ((($f)) + 28|0); + $0 = HEAP32[$wbase>>2]|0; + HEAP32[$iovs>>2] = $0; + $iov_len = ((($iovs)) + 4|0); + $wpos = ((($f)) + 20|0); + $1 = HEAP32[$wpos>>2]|0; + $sub$ptr$sub = (($1) - ($0))|0; + HEAP32[$iov_len>>2] = $sub$ptr$sub; + $iov_base2 = ((($iovs)) + 8|0); + HEAP32[$iov_base2>>2] = $buf; + $iov_len3 = ((($iovs)) + 12|0); + HEAP32[$iov_len3>>2] = $len; + $add = (($sub$ptr$sub) + ($len))|0; + $fd = ((($f)) + 60|0); + $2 = HEAP32[$fd>>2]|0; + $3 = $iovs; + HEAP32[$vararg_buffer>>2] = $2; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $3; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = 2; + $call40 = (___syscall146(146,($vararg_buffer|0))|0); + $call741 = (___syscall_ret($call40)|0); + $cmp42 = ($add|0)==($call741|0); + L1: do { + if ($cmp42) { + label = 3; + } else { + $call746 = $call741;$iov$043 = $iovs;$iovcnt$045 = 2;$rem$044 = $add; + while(1) { + $cmp12 = ($call746|0)<(0); + if ($cmp12) { + break; + } + $sub21 = (($rem$044) - ($call746))|0; + $iov_len23 = ((($iov$043)) + 4|0); + $9 = HEAP32[$iov_len23>>2]|0; + $cmp24 = ($call746>>>0)>($9>>>0); + $incdec$ptr = ((($iov$043)) + 8|0); + $iov$1 = $cmp24 ? $incdec$ptr : $iov$043; + $dec = $cmp24 << 31 >> 31; + $iovcnt$1 = (($iovcnt$045) + ($dec))|0; + $sub28 = $cmp24 ? $9 : 0; + $cnt$0 = (($call746) - ($sub28))|0; + $10 = HEAP32[$iov$1>>2]|0; + $add$ptr32 = (($10) + ($cnt$0)|0); + HEAP32[$iov$1>>2] = $add$ptr32; + $iov_len36 = ((($iov$1)) + 4|0); + $11 = HEAP32[$iov_len36>>2]|0; + $sub37 = (($11) - ($cnt$0))|0; + HEAP32[$iov_len36>>2] = $sub37; + $12 = HEAP32[$fd>>2]|0; + $13 = $iov$1; + HEAP32[$vararg_buffer3>>2] = $12; + $vararg_ptr6 = ((($vararg_buffer3)) + 4|0); + HEAP32[$vararg_ptr6>>2] = $13; + $vararg_ptr7 = ((($vararg_buffer3)) + 8|0); + HEAP32[$vararg_ptr7>>2] = $iovcnt$1; + $call = (___syscall146(146,($vararg_buffer3|0))|0); + $call7 = (___syscall_ret($call)|0); + $cmp = ($sub21|0)==($call7|0); + if ($cmp) { + label = 3; + break L1; + } else { + $call746 = $call7;$iov$043 = $iov$1;$iovcnt$045 = $iovcnt$1;$rem$044 = $sub21; + } + } + $wend14 = ((($f)) + 16|0); + HEAP32[$wend14>>2] = 0; + HEAP32[$wbase>>2] = 0; + HEAP32[$wpos>>2] = 0; + $7 = HEAP32[$f>>2]|0; + $or = $7 | 32; + HEAP32[$f>>2] = $or; + $cmp17 = ($iovcnt$045|0)==(2); + if ($cmp17) { + $retval$0 = 0; + } else { + $iov_len19 = ((($iov$043)) + 4|0); + $8 = HEAP32[$iov_len19>>2]|0; + $sub = (($len) - ($8))|0; + $retval$0 = $sub; + } + } + } while(0); + if ((label|0) == 3) { + $buf8 = ((($f)) + 44|0); + $4 = HEAP32[$buf8>>2]|0; + $buf_size = ((($f)) + 48|0); + $5 = HEAP32[$buf_size>>2]|0; + $add$ptr = (($4) + ($5)|0); + $wend = ((($f)) + 16|0); + HEAP32[$wend>>2] = $add$ptr; + $6 = $4; + HEAP32[$wbase>>2] = $6; + HEAP32[$wpos>>2] = $6; + $retval$0 = $len; + } + STACKTOP = sp;return ($retval$0|0); +} +function _strcmp($l,$r) { + $l = $l|0; + $r = $r|0; + var $$lcssa = 0, $$lcssa6 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $cmp = 0, $cmp7 = 0, $conv5 = 0, $conv6 = 0, $incdec$ptr = 0, $incdec$ptr4 = 0, $l$addr$010 = 0, $or$cond = 0, $or$cond9 = 0, $r$addr$011 = 0, $sub = 0, $tobool = 0, $tobool8 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $0 = HEAP8[$l>>0]|0; + $1 = HEAP8[$r>>0]|0; + $cmp7 = ($0<<24>>24)!=($1<<24>>24); + $tobool8 = ($0<<24>>24)==(0); + $or$cond9 = $tobool8 | $cmp7; + if ($or$cond9) { + $$lcssa = $1;$$lcssa6 = $0; + } else { + $l$addr$010 = $l;$r$addr$011 = $r; + while(1) { + $incdec$ptr = ((($l$addr$010)) + 1|0); + $incdec$ptr4 = ((($r$addr$011)) + 1|0); + $2 = HEAP8[$incdec$ptr>>0]|0; + $3 = HEAP8[$incdec$ptr4>>0]|0; + $cmp = ($2<<24>>24)!=($3<<24>>24); + $tobool = ($2<<24>>24)==(0); + $or$cond = $tobool | $cmp; + if ($or$cond) { + $$lcssa = $3;$$lcssa6 = $2; + break; + } else { + $l$addr$010 = $incdec$ptr;$r$addr$011 = $incdec$ptr4; + } + } + } + $conv5 = $$lcssa6&255; + $conv6 = $$lcssa&255; + $sub = (($conv5) - ($conv6))|0; + return ($sub|0); +} +function _vfprintf($f,$fmt,$ap) { + $f = $f|0; + $fmt = $fmt|0; + $ap = $ap|0; + var $$call21 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $add$ptr = 0, $and = 0, $and11 = 0, $and36 = 0, $ap2 = 0, $buf = 0, $buf_size = 0, $call = 0, $call21 = 0, $call2130 = 0, $call6 = 0; + var $cmp = 0, $cmp5 = 0, $cmp7 = 0, $cond = 0, $internal_buf = 0, $lock = 0, $mode = 0, $nl_arg = 0, $nl_type = 0, $or = 0, $ret$1 = 0, $ret$1$ = 0, $retval$0 = 0, $tobool = 0, $tobool22 = 0, $tobool26 = 0, $tobool37 = 0, $tobool41 = 0, $vacopy_currentptr = 0, $wbase = 0; + var $wend = 0, $wpos = 0, $write = 0, dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 224|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(224|0); + $ap2 = sp + 120|0; + $nl_type = sp + 80|0; + $nl_arg = sp; + $internal_buf = sp + 136|0; + dest=$nl_type; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + $vacopy_currentptr = HEAP32[$ap>>2]|0; + HEAP32[$ap2>>2] = $vacopy_currentptr; + $call = (_printf_core(0,$fmt,$ap2,$nl_arg,$nl_type)|0); + $cmp = ($call|0)<(0); + if ($cmp) { + $retval$0 = -1; + } else { + $lock = ((($f)) + 76|0); + $0 = HEAP32[$lock>>2]|0; + $cmp5 = ($0|0)>(-1); + if ($cmp5) { + $call6 = (___lockfile($f)|0); + $cond = $call6; + } else { + $cond = 0; + } + $1 = HEAP32[$f>>2]|0; + $and = $1 & 32; + $mode = ((($f)) + 74|0); + $2 = HEAP8[$mode>>0]|0; + $cmp7 = ($2<<24>>24)<(1); + if ($cmp7) { + $and11 = $1 & -33; + HEAP32[$f>>2] = $and11; + } + $buf_size = ((($f)) + 48|0); + $3 = HEAP32[$buf_size>>2]|0; + $tobool = ($3|0)==(0); + if ($tobool) { + $buf = ((($f)) + 44|0); + $4 = HEAP32[$buf>>2]|0; + HEAP32[$buf>>2] = $internal_buf; + $wbase = ((($f)) + 28|0); + HEAP32[$wbase>>2] = $internal_buf; + $wpos = ((($f)) + 20|0); + HEAP32[$wpos>>2] = $internal_buf; + HEAP32[$buf_size>>2] = 80; + $add$ptr = ((($internal_buf)) + 80|0); + $wend = ((($f)) + 16|0); + HEAP32[$wend>>2] = $add$ptr; + $call21 = (_printf_core($f,$fmt,$ap2,$nl_arg,$nl_type)|0); + $tobool22 = ($4|0)==(0|0); + if ($tobool22) { + $ret$1 = $call21; + } else { + $write = ((($f)) + 36|0); + $5 = HEAP32[$write>>2]|0; + (FUNCTION_TABLE_iiii[$5 & 31]($f,0,0)|0); + $6 = HEAP32[$wpos>>2]|0; + $tobool26 = ($6|0)==(0|0); + $$call21 = $tobool26 ? -1 : $call21; + HEAP32[$buf>>2] = $4; + HEAP32[$buf_size>>2] = 0; + HEAP32[$wend>>2] = 0; + HEAP32[$wbase>>2] = 0; + HEAP32[$wpos>>2] = 0; + $ret$1 = $$call21; + } + } else { + $call2130 = (_printf_core($f,$fmt,$ap2,$nl_arg,$nl_type)|0); + $ret$1 = $call2130; + } + $7 = HEAP32[$f>>2]|0; + $and36 = $7 & 32; + $tobool37 = ($and36|0)==(0); + $ret$1$ = $tobool37 ? $ret$1 : -1; + $or = $7 | $and; + HEAP32[$f>>2] = $or; + $tobool41 = ($cond|0)==(0); + if (!($tobool41)) { + ___unlockfile($f); + } + $retval$0 = $ret$1$; + } + STACKTOP = sp;return ($retval$0|0); +} +function _printf_core($f,$fmt,$ap,$nl_arg,$nl_type) { + $f = $f|0; + $fmt = $fmt|0; + $ap = $ap|0; + $nl_arg = $nl_arg|0; + $nl_type = $nl_type|0; + var $$ = 0, $$$ = 0, $$194$ = 0, $$197 = 0, $$add$ptr258 = 0, $$l10n$0 = 0, $$lcssa = 0, $$pre = 0, $$pre248 = 0, $$pre249 = 0, $$pre249$pre = 0, $$pre250 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0; + var $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0; + var $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0; + var $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0.0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; + var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; + var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; + var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; + var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0; + var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $a$0 = 0, $a$0$add$ptr206 = 0, $a$1 = 0, $a$2 = 0, $add = 0, $add$ptr = 0, $add$ptr139 = 0, $add$ptr206 = 0, $add$ptr258 = 0, $add$ptr341 = 0, $add$ptr360 = 0, $add$ptr43 = 0, $add$ptr43$arrayidx31 = 0, $add$ptr474 = 0, $add$ptr88 = 0; + var $add270 = 0, $add323 = 0, $add396 = 0, $add413 = 0, $add442 = 0, $and = 0, $and211 = 0, $and215 = 0, $and217 = 0, $and219 = 0, $and220 = 0, $and250 = 0, $and255 = 0, $and264 = 0, $and290 = 0, $and295 = 0, $and310 = 0, $and310$fl$4 = 0, $arg = 0, $arglist_current = 0; + var $arglist_current2 = 0, $arglist_next = 0, $arglist_next3 = 0, $argpos$0 = 0, $arrayidx114 = 0, $arrayidx119 = 0, $arrayidx124 = 0, $arrayidx132 = 0, $arrayidx16 = 0, $arrayidx174 = 0, $arrayidx193 = 0, $arrayidx31 = 0, $arrayidx35 = 0, $arrayidx371 = 0, $arrayidx470 = 0, $arrayidx482 = 0, $arrayidx68 = 0, $arrayidx73 = 0, $arrayidx81 = 0, $brmerge = 0; + var $brmerge221 = 0, $buf = 0, $call = 0, $call104 = 0, $call160 = 0, $call345 = 0, $call346 = 0, $call357 = 0, $call385 = 0, $call412 = 0, $call430 = 0, $cmp = 0, $cmp1 = 0, $cmp105 = 0, $cmp111 = 0, $cmp116 = 0, $cmp126 = 0, $cmp13 = 0, $cmp166 = 0, $cmp177 = 0; + var $cmp18 = 0, $cmp182 = 0, $cmp185 = 0, $cmp212 = 0, $cmp241 = 0, $cmp271 = 0, $cmp307 = 0, $cmp324 = 0, $cmp37 = 0, $cmp378 = 0, $cmp378226 = 0, $cmp386 = 0, $cmp391 = 0, $cmp398 = 0, $cmp405 = 0, $cmp405236 = 0, $cmp414 = 0, $cmp422 = 0, $cmp435 = 0, $cmp443 = 0; + var $cmp467 = 0, $cmp479 = 0, $cmp479206 = 0, $cmp50 = 0, $cmp50217 = 0, $cmp65 = 0, $cmp75 = 0, $cmp97 = 0, $cnt$0 = 0, $cnt$1 = 0, $cond149 = 0, $cond246 = 0, $cond355 = 0, $cond427 = 0, $conv120 = 0, $conv134 = 0, $conv164 = 0, $conv172 = 0, $conv175 = 0, $conv208 = 0; + var $conv230 = 0, $conv233 = 0, $conv32 = 0, $conv48 = 0, $conv48215 = 0, $conv58 = 0, $conv69 = 0, $conv83 = 0, $expanded = 0, $expanded10 = 0, $expanded11 = 0, $expanded13 = 0, $expanded14 = 0, $expanded15 = 0, $expanded4 = 0, $expanded6 = 0, $expanded7 = 0, $expanded8 = 0, $fl$0$lcssa = 0, $fl$0222 = 0; + var $fl$1 = 0, $fl$1$and220 = 0, $fl$3 = 0, $fl$4 = 0, $fl$6 = 0, $i$0$lcssa = 0, $i$0$lcssa257 = 0, $i$0228 = 0, $i$1237 = 0, $i$2$lcssa = 0, $i$2210 = 0, $i$3207 = 0, $i137 = 0, $i86 = 0, $inc = 0, $inc489 = 0, $incdec$ptr = 0, $incdec$ptr159 = 0, $incdec$ptr171 = 0, $incdec$ptr23 = 0; + var $incdec$ptr384 = 0, $incdec$ptr411 = 0, $incdec$ptr62 = 0, $isdigit = 0, $isdigit188 = 0, $isdigit190 = 0, $isdigittmp = 0, $isdigittmp$ = 0, $isdigittmp187 = 0, $isdigittmp189 = 0, $l$0 = 0, $l$1227 = 0, $l$2 = 0, $l10n$0 = 0, $l10n$0$phi = 0, $l10n$1 = 0, $l10n$2 = 0, $l10n$3 = 0, $lnot = 0, $lnot$ext = 0; + var $mb = 0, $or = 0, $or$cond = 0, $or$cond192 = 0, $or$cond193 = 0, $or$cond195 = 0, $or100 = 0, $or100$fl$0 = 0, $or247 = 0, $p$0 = 0, $p$0$p$0$add270 = 0, $p$1 = 0, $p$2 = 0, $p$2$add323 = 0, $p$2$add323$p$2 = 0, $p$3 = 0, $p$4254 = 0, $p$5 = 0, $pl$0 = 0, $pl$1 = 0; + var $pl$2 = 0, $prefix$0 = 0, $prefix$1 = 0, $prefix$2 = 0, $retval$0 = 0, $s = 0, $shl = 0, $shl218 = 0, $shl60 = 0, $shr = 0, $st$0 = 0, $storemerge = 0, $storemerge191 = 0, $sub = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$lhs$cast318 = 0, $sub$ptr$lhs$cast362 = 0, $sub$ptr$lhs$cast432 = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$rhs$cast268 = 0; + var $sub$ptr$rhs$cast319 = 0, $sub$ptr$rhs$cast363 = 0, $sub$ptr$rhs$cast433 = 0, $sub$ptr$sub = 0, $sub$ptr$sub269 = 0, $sub$ptr$sub320 = 0, $sub$ptr$sub364 = 0, $sub$ptr$sub434 = 0, $sub$ptr$sub434$p$5 = 0, $sub101 = 0, $sub101$w$0 = 0, $sub135 = 0, $sub165 = 0, $sub173 = 0, $sub176 = 0, $sub390 = 0, $sub49 = 0, $sub49216 = 0, $sub59 = 0, $sub84 = 0; + var $t$0 = 0, $t$1 = 0, $tobool = 0, $tobool141 = 0, $tobool179 = 0, $tobool209 = 0, $tobool218 = 0, $tobool25 = 0, $tobool256 = 0, $tobool265 = 0, $tobool28 = 0, $tobool291 = 0, $tobool296 = 0, $tobool315 = 0, $tobool350 = 0, $tobool358 = 0, $tobool381 = 0, $tobool408 = 0, $tobool460 = 0, $tobool463 = 0; + var $tobool471 = 0, $tobool483 = 0, $tobool55 = 0, $tobool55220 = 0, $tobool90 = 0, $trunc = 0, $w$0 = 0, $w$1 = 0, $w$2 = 0, $wc = 0, $ws$0229 = 0, $ws$1238 = 0, $xor = 0, $xor450 = 0, $xor458 = 0, $z$0$lcssa = 0, $z$0212 = 0, $z$1 = 0, $z$2 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $s = sp + 16|0; + $arg = sp; + $buf = sp + 24|0; + $wc = sp + 8|0; + $mb = sp + 20|0; + HEAP32[$s>>2] = $fmt; + $tobool25 = ($f|0)!=(0|0); + $add$ptr206 = ((($buf)) + 40|0); + $sub$ptr$lhs$cast318 = $add$ptr206; + $add$ptr341 = ((($buf)) + 39|0); + $arrayidx371 = ((($wc)) + 4|0); + $1 = $fmt;$cnt$0 = 0;$l$0 = 0;$l10n$0 = 0; + L1: while(1) { + $cmp = ($cnt$0|0)>(-1); + do { + if ($cmp) { + $sub = (2147483647 - ($cnt$0))|0; + $cmp1 = ($l$0|0)>($sub|0); + if ($cmp1) { + $call = (___errno_location()|0); + HEAP32[$call>>2] = 75; + $cnt$1 = -1; + break; + } else { + $add = (($l$0) + ($cnt$0))|0; + $cnt$1 = $add; + break; + } + } else { + $cnt$1 = $cnt$0; + } + } while(0); + $0 = HEAP8[$1>>0]|0; + $tobool = ($0<<24>>24)==(0); + if ($tobool) { + label = 86; + break; + } else { + $2 = $0;$3 = $1; + } + L9: while(1) { + switch ($2<<24>>24) { + case 37: { + $4 = $3;$z$0212 = $3; + label = 9; + break L9; + break; + } + case 0: { + $7 = $3;$z$0$lcssa = $3; + break L9; + break; + } + default: { + } + } + $incdec$ptr = ((($3)) + 1|0); + HEAP32[$s>>2] = $incdec$ptr; + $$pre = HEAP8[$incdec$ptr>>0]|0; + $2 = $$pre;$3 = $incdec$ptr; + } + L12: do { + if ((label|0) == 9) { + while(1) { + label = 0; + $arrayidx16 = ((($4)) + 1|0); + $5 = HEAP8[$arrayidx16>>0]|0; + $cmp18 = ($5<<24>>24)==(37); + if (!($cmp18)) { + $7 = $4;$z$0$lcssa = $z$0212; + break L12; + } + $incdec$ptr23 = ((($z$0212)) + 1|0); + $add$ptr = ((($4)) + 2|0); + HEAP32[$s>>2] = $add$ptr; + $6 = HEAP8[$add$ptr>>0]|0; + $cmp13 = ($6<<24>>24)==(37); + if ($cmp13) { + $4 = $add$ptr;$z$0212 = $incdec$ptr23; + label = 9; + } else { + $7 = $add$ptr;$z$0$lcssa = $incdec$ptr23; + break; + } + } + } + } while(0); + $sub$ptr$lhs$cast = $z$0$lcssa; + $sub$ptr$rhs$cast = $1; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + if ($tobool25) { + _out_102($f,$1,$sub$ptr$sub); + } + $tobool28 = ($sub$ptr$sub|0)==(0); + if (!($tobool28)) { + $l10n$0$phi = $l10n$0;$1 = $7;$cnt$0 = $cnt$1;$l$0 = $sub$ptr$sub;$l10n$0 = $l10n$0$phi; + continue; + } + $arrayidx31 = ((($7)) + 1|0); + $8 = HEAP8[$arrayidx31>>0]|0; + $conv32 = $8 << 24 >> 24; + $isdigittmp = (($conv32) + -48)|0; + $isdigit = ($isdigittmp>>>0)<(10); + if ($isdigit) { + $arrayidx35 = ((($7)) + 2|0); + $9 = HEAP8[$arrayidx35>>0]|0; + $cmp37 = ($9<<24>>24)==(36); + $add$ptr43 = ((($7)) + 3|0); + $add$ptr43$arrayidx31 = $cmp37 ? $add$ptr43 : $arrayidx31; + $$l10n$0 = $cmp37 ? 1 : $l10n$0; + $isdigittmp$ = $cmp37 ? $isdigittmp : -1; + $argpos$0 = $isdigittmp$;$l10n$1 = $$l10n$0;$storemerge = $add$ptr43$arrayidx31; + } else { + $argpos$0 = -1;$l10n$1 = $l10n$0;$storemerge = $arrayidx31; + } + HEAP32[$s>>2] = $storemerge; + $10 = HEAP8[$storemerge>>0]|0; + $conv48215 = $10 << 24 >> 24; + $sub49216 = (($conv48215) + -32)|0; + $cmp50217 = ($sub49216>>>0)>(31); + $shl218 = 1 << $sub49216; + $and219 = $shl218 & 75913; + $tobool55220 = ($and219|0)==(0); + $brmerge221 = $cmp50217 | $tobool55220; + if ($brmerge221) { + $$lcssa = $10;$14 = $storemerge;$fl$0$lcssa = 0; + } else { + $11 = $10;$12 = $storemerge;$fl$0222 = 0; + while(1) { + $conv58 = $11 << 24 >> 24; + $sub59 = (($conv58) + -32)|0; + $shl60 = 1 << $sub59; + $or = $shl60 | $fl$0222; + $incdec$ptr62 = ((($12)) + 1|0); + HEAP32[$s>>2] = $incdec$ptr62; + $13 = HEAP8[$incdec$ptr62>>0]|0; + $conv48 = $13 << 24 >> 24; + $sub49 = (($conv48) + -32)|0; + $cmp50 = ($sub49>>>0)>(31); + $shl = 1 << $sub49; + $and = $shl & 75913; + $tobool55 = ($and|0)==(0); + $brmerge = $cmp50 | $tobool55; + if ($brmerge) { + $$lcssa = $13;$14 = $incdec$ptr62;$fl$0$lcssa = $or; + break; + } else { + $11 = $13;$12 = $incdec$ptr62;$fl$0222 = $or; + } + } + } + $cmp65 = ($$lcssa<<24>>24)==(42); + if ($cmp65) { + $arrayidx68 = ((($14)) + 1|0); + $15 = HEAP8[$arrayidx68>>0]|0; + $conv69 = $15 << 24 >> 24; + $isdigittmp189 = (($conv69) + -48)|0; + $isdigit190 = ($isdigittmp189>>>0)<(10); + if ($isdigit190) { + $arrayidx73 = ((($14)) + 2|0); + $16 = HEAP8[$arrayidx73>>0]|0; + $cmp75 = ($16<<24>>24)==(36); + if ($cmp75) { + $arrayidx81 = (($nl_type) + ($isdigittmp189<<2)|0); + HEAP32[$arrayidx81>>2] = 10; + $17 = HEAP8[$arrayidx68>>0]|0; + $conv83 = $17 << 24 >> 24; + $sub84 = (($conv83) + -48)|0; + $i86 = (($nl_arg) + ($sub84<<3)|0); + $18 = $i86; + $19 = $18; + $20 = HEAP32[$19>>2]|0; + $21 = (($18) + 4)|0; + $22 = $21; + $23 = HEAP32[$22>>2]|0; + $add$ptr88 = ((($14)) + 3|0); + $l10n$2 = 1;$storemerge191 = $add$ptr88;$w$0 = $20; + } else { + label = 22; + } + } else { + label = 22; + } + if ((label|0) == 22) { + label = 0; + $tobool90 = ($l10n$1|0)==(0); + if (!($tobool90)) { + $retval$0 = -1; + break; + } + if ($tobool25) { + $arglist_current = HEAP32[$ap>>2]|0; + $24 = $arglist_current; + $25 = ((0) + 4|0); + $expanded4 = $25; + $expanded = (($expanded4) - 1)|0; + $26 = (($24) + ($expanded))|0; + $27 = ((0) + 4|0); + $expanded8 = $27; + $expanded7 = (($expanded8) - 1)|0; + $expanded6 = $expanded7 ^ -1; + $28 = $26 & $expanded6; + $29 = $28; + $30 = HEAP32[$29>>2]|0; + $arglist_next = ((($29)) + 4|0); + HEAP32[$ap>>2] = $arglist_next; + $l10n$2 = 0;$storemerge191 = $arrayidx68;$w$0 = $30; + } else { + $l10n$2 = 0;$storemerge191 = $arrayidx68;$w$0 = 0; + } + } + HEAP32[$s>>2] = $storemerge191; + $cmp97 = ($w$0|0)<(0); + $or100 = $fl$0$lcssa | 8192; + $sub101 = (0 - ($w$0))|0; + $or100$fl$0 = $cmp97 ? $or100 : $fl$0$lcssa; + $sub101$w$0 = $cmp97 ? $sub101 : $w$0; + $32 = $storemerge191;$fl$1 = $or100$fl$0;$l10n$3 = $l10n$2;$w$1 = $sub101$w$0; + } else { + $call104 = (_getint_103($s)|0); + $cmp105 = ($call104|0)<(0); + if ($cmp105) { + $retval$0 = -1; + break; + } + $$pre248 = HEAP32[$s>>2]|0; + $32 = $$pre248;$fl$1 = $fl$0$lcssa;$l10n$3 = $l10n$1;$w$1 = $call104; + } + $31 = HEAP8[$32>>0]|0; + $cmp111 = ($31<<24>>24)==(46); + do { + if ($cmp111) { + $arrayidx114 = ((($32)) + 1|0); + $33 = HEAP8[$arrayidx114>>0]|0; + $cmp116 = ($33<<24>>24)==(42); + if (!($cmp116)) { + $incdec$ptr159 = ((($32)) + 1|0); + HEAP32[$s>>2] = $incdec$ptr159; + $call160 = (_getint_103($s)|0); + $$pre249$pre = HEAP32[$s>>2]|0; + $$pre249 = $$pre249$pre;$p$0 = $call160; + break; + } + $arrayidx119 = ((($32)) + 2|0); + $34 = HEAP8[$arrayidx119>>0]|0; + $conv120 = $34 << 24 >> 24; + $isdigittmp187 = (($conv120) + -48)|0; + $isdigit188 = ($isdigittmp187>>>0)<(10); + if ($isdigit188) { + $arrayidx124 = ((($32)) + 3|0); + $35 = HEAP8[$arrayidx124>>0]|0; + $cmp126 = ($35<<24>>24)==(36); + if ($cmp126) { + $arrayidx132 = (($nl_type) + ($isdigittmp187<<2)|0); + HEAP32[$arrayidx132>>2] = 10; + $36 = HEAP8[$arrayidx119>>0]|0; + $conv134 = $36 << 24 >> 24; + $sub135 = (($conv134) + -48)|0; + $i137 = (($nl_arg) + ($sub135<<3)|0); + $37 = $i137; + $38 = $37; + $39 = HEAP32[$38>>2]|0; + $40 = (($37) + 4)|0; + $41 = $40; + $42 = HEAP32[$41>>2]|0; + $add$ptr139 = ((($32)) + 4|0); + HEAP32[$s>>2] = $add$ptr139; + $$pre249 = $add$ptr139;$p$0 = $39; + break; + } + } + $tobool141 = ($l10n$3|0)==(0); + if (!($tobool141)) { + $retval$0 = -1; + break L1; + } + if ($tobool25) { + $arglist_current2 = HEAP32[$ap>>2]|0; + $43 = $arglist_current2; + $44 = ((0) + 4|0); + $expanded11 = $44; + $expanded10 = (($expanded11) - 1)|0; + $45 = (($43) + ($expanded10))|0; + $46 = ((0) + 4|0); + $expanded15 = $46; + $expanded14 = (($expanded15) - 1)|0; + $expanded13 = $expanded14 ^ -1; + $47 = $45 & $expanded13; + $48 = $47; + $49 = HEAP32[$48>>2]|0; + $arglist_next3 = ((($48)) + 4|0); + HEAP32[$ap>>2] = $arglist_next3; + $cond149 = $49; + } else { + $cond149 = 0; + } + HEAP32[$s>>2] = $arrayidx119; + $$pre249 = $arrayidx119;$p$0 = $cond149; + } else { + $$pre249 = $32;$p$0 = -1; + } + } while(0); + $51 = $$pre249;$st$0 = 0; + while(1) { + $50 = HEAP8[$51>>0]|0; + $conv164 = $50 << 24 >> 24; + $sub165 = (($conv164) + -65)|0; + $cmp166 = ($sub165>>>0)>(57); + if ($cmp166) { + $retval$0 = -1; + break L1; + } + $incdec$ptr171 = ((($51)) + 1|0); + HEAP32[$s>>2] = $incdec$ptr171; + $52 = HEAP8[$51>>0]|0; + $conv172 = $52 << 24 >> 24; + $sub173 = (($conv172) + -65)|0; + $arrayidx174 = ((25705 + (($st$0*58)|0)|0) + ($sub173)|0); + $53 = HEAP8[$arrayidx174>>0]|0; + $conv175 = $53&255; + $sub176 = (($conv175) + -1)|0; + $cmp177 = ($sub176>>>0)<(8); + if ($cmp177) { + $51 = $incdec$ptr171;$st$0 = $conv175; + } else { + break; + } + } + $tobool179 = ($53<<24>>24)==(0); + if ($tobool179) { + $retval$0 = -1; + break; + } + $cmp182 = ($53<<24>>24)==(19); + $cmp185 = ($argpos$0|0)>(-1); + do { + if ($cmp182) { + if ($cmp185) { + $retval$0 = -1; + break L1; + } else { + label = 48; + } + } else { + if ($cmp185) { + $arrayidx193 = (($nl_type) + ($argpos$0<<2)|0); + HEAP32[$arrayidx193>>2] = $conv175; + $54 = (($nl_arg) + ($argpos$0<<3)|0); + $55 = $54; + $56 = $55; + $57 = HEAP32[$56>>2]|0; + $58 = (($55) + 4)|0; + $59 = $58; + $60 = HEAP32[$59>>2]|0; + $61 = $arg; + $62 = $61; + HEAP32[$62>>2] = $57; + $63 = (($61) + 4)|0; + $64 = $63; + HEAP32[$64>>2] = $60; + label = 48; + break; + } + if (!($tobool25)) { + $retval$0 = 0; + break L1; + } + _pop_arg_105($arg,$conv175,$ap); + } + } while(0); + if ((label|0) == 48) { + label = 0; + if (!($tobool25)) { + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = 0;$l10n$0 = $l10n$3; + continue; + } + } + $65 = HEAP8[$51>>0]|0; + $conv208 = $65 << 24 >> 24; + $tobool209 = ($st$0|0)!=(0); + $and211 = $conv208 & 15; + $cmp212 = ($and211|0)==(3); + $or$cond192 = $tobool209 & $cmp212; + $and215 = $conv208 & -33; + $t$0 = $or$cond192 ? $and215 : $conv208; + $and217 = $fl$1 & 8192; + $tobool218 = ($and217|0)==(0); + $and220 = $fl$1 & -65537; + $fl$1$and220 = $tobool218 ? $fl$1 : $and220; + L70: do { + switch ($t$0|0) { + case 110: { + $trunc = $st$0&255; + switch ($trunc<<24>>24) { + case 0: { + $72 = HEAP32[$arg>>2]|0; + HEAP32[$72>>2] = $cnt$1; + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = 0;$l10n$0 = $l10n$3; + continue L1; + break; + } + case 1: { + $73 = HEAP32[$arg>>2]|0; + HEAP32[$73>>2] = $cnt$1; + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = 0;$l10n$0 = $l10n$3; + continue L1; + break; + } + case 2: { + $74 = ($cnt$1|0)<(0); + $75 = $74 << 31 >> 31; + $76 = HEAP32[$arg>>2]|0; + $77 = $76; + $78 = $77; + HEAP32[$78>>2] = $cnt$1; + $79 = (($77) + 4)|0; + $80 = $79; + HEAP32[$80>>2] = $75; + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = 0;$l10n$0 = $l10n$3; + continue L1; + break; + } + case 3: { + $conv230 = $cnt$1&65535; + $81 = HEAP32[$arg>>2]|0; + HEAP16[$81>>1] = $conv230; + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = 0;$l10n$0 = $l10n$3; + continue L1; + break; + } + case 4: { + $conv233 = $cnt$1&255; + $82 = HEAP32[$arg>>2]|0; + HEAP8[$82>>0] = $conv233; + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = 0;$l10n$0 = $l10n$3; + continue L1; + break; + } + case 6: { + $83 = HEAP32[$arg>>2]|0; + HEAP32[$83>>2] = $cnt$1; + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = 0;$l10n$0 = $l10n$3; + continue L1; + break; + } + case 7: { + $84 = ($cnt$1|0)<(0); + $85 = $84 << 31 >> 31; + $86 = HEAP32[$arg>>2]|0; + $87 = $86; + $88 = $87; + HEAP32[$88>>2] = $cnt$1; + $89 = (($87) + 4)|0; + $90 = $89; + HEAP32[$90>>2] = $85; + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = 0;$l10n$0 = $l10n$3; + continue L1; + break; + } + default: { + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = 0;$l10n$0 = $l10n$3; + continue L1; + } + } + break; + } + case 112: { + $cmp241 = ($p$0>>>0)>(8); + $cond246 = $cmp241 ? $p$0 : 8; + $or247 = $fl$1$and220 | 8; + $fl$3 = $or247;$p$1 = $cond246;$t$1 = 120; + label = 60; + break; + } + case 88: case 120: { + $fl$3 = $fl$1$and220;$p$1 = $p$0;$t$1 = $t$0; + label = 60; + break; + } + case 111: { + $101 = $arg; + $102 = $101; + $103 = HEAP32[$102>>2]|0; + $104 = (($101) + 4)|0; + $105 = $104; + $106 = HEAP32[$105>>2]|0; + $107 = (_fmt_o($103,$106,$add$ptr206)|0); + $and264 = $fl$1$and220 & 8; + $tobool265 = ($and264|0)==(0); + $sub$ptr$rhs$cast268 = $107; + $sub$ptr$sub269 = (($sub$ptr$lhs$cast318) - ($sub$ptr$rhs$cast268))|0; + $cmp271 = ($p$0|0)>($sub$ptr$sub269|0); + $add270 = (($sub$ptr$sub269) + 1)|0; + $108 = $tobool265 | $cmp271; + $p$0$p$0$add270 = $108 ? $p$0 : $add270; + $127 = $103;$129 = $106;$a$0 = $107;$fl$4 = $fl$1$and220;$p$2 = $p$0$p$0$add270;$pl$1 = 0;$prefix$1 = 26169; + label = 66; + break; + } + case 105: case 100: { + $109 = $arg; + $110 = $109; + $111 = HEAP32[$110>>2]|0; + $112 = (($109) + 4)|0; + $113 = $112; + $114 = HEAP32[$113>>2]|0; + $115 = ($114|0)<(0); + if ($115) { + $116 = (_i64Subtract(0,0,($111|0),($114|0))|0); + $117 = tempRet0; + $118 = $arg; + $119 = $118; + HEAP32[$119>>2] = $116; + $120 = (($118) + 4)|0; + $121 = $120; + HEAP32[$121>>2] = $117; + $124 = $116;$125 = $117;$pl$0 = 1;$prefix$0 = 26169; + label = 65; + break L70; + } else { + $and290 = $fl$1$and220 & 2048; + $tobool291 = ($and290|0)==(0); + $and295 = $fl$1$and220 & 1; + $tobool296 = ($and295|0)==(0); + $$ = $tobool296 ? 26169 : (26171); + $$$ = $tobool291 ? $$ : (26170); + $122 = $fl$1$and220 & 2049; + $123 = ($122|0)!=(0); + $$194$ = $123&1; + $124 = $111;$125 = $114;$pl$0 = $$194$;$prefix$0 = $$$; + label = 65; + break L70; + } + break; + } + case 117: { + $66 = $arg; + $67 = $66; + $68 = HEAP32[$67>>2]|0; + $69 = (($66) + 4)|0; + $70 = $69; + $71 = HEAP32[$70>>2]|0; + $124 = $68;$125 = $71;$pl$0 = 0;$prefix$0 = 26169; + label = 65; + break; + } + case 99: { + $132 = $arg; + $133 = $132; + $134 = HEAP32[$133>>2]|0; + $135 = (($132) + 4)|0; + $136 = $135; + $137 = HEAP32[$136>>2]|0; + $138 = $134&255; + HEAP8[$add$ptr341>>0] = $138; + $a$2 = $add$ptr341;$fl$6 = $and220;$p$5 = 1;$pl$2 = 0;$prefix$2 = 26169;$z$2 = $add$ptr206; + break; + } + case 109: { + $call345 = (___errno_location()|0); + $139 = HEAP32[$call345>>2]|0; + $call346 = (_strerror($139)|0); + $a$1 = $call346; + label = 70; + break; + } + case 115: { + $140 = HEAP32[$arg>>2]|0; + $tobool350 = ($140|0)!=(0|0); + $cond355 = $tobool350 ? $140 : 26179; + $a$1 = $cond355; + label = 70; + break; + } + case 67: { + $141 = $arg; + $142 = $141; + $143 = HEAP32[$142>>2]|0; + $144 = (($141) + 4)|0; + $145 = $144; + $146 = HEAP32[$145>>2]|0; + HEAP32[$wc>>2] = $143; + HEAP32[$arrayidx371>>2] = 0; + HEAP32[$arg>>2] = $wc; + $152 = $wc;$p$4254 = -1; + label = 74; + break; + } + case 83: { + $$pre250 = HEAP32[$arg>>2]|0; + $cmp378226 = ($p$0|0)==(0); + if ($cmp378226) { + _pad_108($f,32,$w$1,0,$fl$1$and220); + $i$0$lcssa257 = 0; + label = 83; + } else { + $152 = $$pre250;$p$4254 = $p$0; + label = 74; + } + break; + } + case 65: case 71: case 70: case 69: case 97: case 103: case 102: case 101: { + $149 = +HEAPF64[$arg>>3]; + $call430 = (_fmt_fp($f,$149,$w$1,$p$0,$fl$1$and220,$t$0)|0); + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = $call430;$l10n$0 = $l10n$3; + continue L1; + break; + } + default: { + $a$2 = $1;$fl$6 = $fl$1$and220;$p$5 = $p$0;$pl$2 = 0;$prefix$2 = 26169;$z$2 = $add$ptr206; + } + } + } while(0); + L94: do { + if ((label|0) == 60) { + label = 0; + $91 = $arg; + $92 = $91; + $93 = HEAP32[$92>>2]|0; + $94 = (($91) + 4)|0; + $95 = $94; + $96 = HEAP32[$95>>2]|0; + $and250 = $t$1 & 32; + $97 = (_fmt_x($93,$96,$add$ptr206,$and250)|0); + $98 = ($93|0)==(0); + $99 = ($96|0)==(0); + $100 = $98 & $99; + $and255 = $fl$3 & 8; + $tobool256 = ($and255|0)==(0); + $or$cond193 = $tobool256 | $100; + $shr = $t$1 >> 4; + $add$ptr258 = (26169 + ($shr)|0); + $$add$ptr258 = $or$cond193 ? 26169 : $add$ptr258; + $$197 = $or$cond193 ? 0 : 2; + $127 = $93;$129 = $96;$a$0 = $97;$fl$4 = $fl$3;$p$2 = $p$1;$pl$1 = $$197;$prefix$1 = $$add$ptr258; + label = 66; + } + else if ((label|0) == 65) { + label = 0; + $126 = (_fmt_u($124,$125,$add$ptr206)|0); + $127 = $124;$129 = $125;$a$0 = $126;$fl$4 = $fl$1$and220;$p$2 = $p$0;$pl$1 = $pl$0;$prefix$1 = $prefix$0; + label = 66; + } + else if ((label|0) == 70) { + label = 0; + $call357 = (_memchr($a$1,0,$p$0)|0); + $tobool358 = ($call357|0)==(0|0); + $sub$ptr$lhs$cast362 = $call357; + $sub$ptr$rhs$cast363 = $a$1; + $sub$ptr$sub364 = (($sub$ptr$lhs$cast362) - ($sub$ptr$rhs$cast363))|0; + $add$ptr360 = (($a$1) + ($p$0)|0); + $p$3 = $tobool358 ? $p$0 : $sub$ptr$sub364; + $z$1 = $tobool358 ? $add$ptr360 : $call357; + $a$2 = $a$1;$fl$6 = $and220;$p$5 = $p$3;$pl$2 = 0;$prefix$2 = 26169;$z$2 = $z$1; + } + else if ((label|0) == 74) { + label = 0; + $i$0228 = 0;$l$1227 = 0;$ws$0229 = $152; + while(1) { + $147 = HEAP32[$ws$0229>>2]|0; + $tobool381 = ($147|0)==(0); + if ($tobool381) { + $i$0$lcssa = $i$0228;$l$2 = $l$1227; + break; + } + $call385 = (_wctomb($mb,$147)|0); + $cmp386 = ($call385|0)<(0); + $sub390 = (($p$4254) - ($i$0228))|0; + $cmp391 = ($call385>>>0)>($sub390>>>0); + $or$cond195 = $cmp386 | $cmp391; + if ($or$cond195) { + $i$0$lcssa = $i$0228;$l$2 = $call385; + break; + } + $incdec$ptr384 = ((($ws$0229)) + 4|0); + $add396 = (($call385) + ($i$0228))|0; + $cmp378 = ($p$4254>>>0)>($add396>>>0); + if ($cmp378) { + $i$0228 = $add396;$l$1227 = $call385;$ws$0229 = $incdec$ptr384; + } else { + $i$0$lcssa = $add396;$l$2 = $call385; + break; + } + } + $cmp398 = ($l$2|0)<(0); + if ($cmp398) { + $retval$0 = -1; + break L1; + } + _pad_108($f,32,$w$1,$i$0$lcssa,$fl$1$and220); + $cmp405236 = ($i$0$lcssa|0)==(0); + if ($cmp405236) { + $i$0$lcssa257 = 0; + label = 83; + } else { + $i$1237 = 0;$ws$1238 = $152; + while(1) { + $148 = HEAP32[$ws$1238>>2]|0; + $tobool408 = ($148|0)==(0); + if ($tobool408) { + $i$0$lcssa257 = $i$0$lcssa; + label = 83; + break L94; + } + $call412 = (_wctomb($mb,$148)|0); + $add413 = (($call412) + ($i$1237))|0; + $cmp414 = ($add413|0)>($i$0$lcssa|0); + if ($cmp414) { + $i$0$lcssa257 = $i$0$lcssa; + label = 83; + break L94; + } + $incdec$ptr411 = ((($ws$1238)) + 4|0); + _out_102($f,$mb,$call412); + $cmp405 = ($add413>>>0)<($i$0$lcssa>>>0); + if ($cmp405) { + $i$1237 = $add413;$ws$1238 = $incdec$ptr411; + } else { + $i$0$lcssa257 = $i$0$lcssa; + label = 83; + break; + } + } + } + } + } while(0); + if ((label|0) == 66) { + label = 0; + $cmp307 = ($p$2|0)>(-1); + $and310 = $fl$4 & -65537; + $and310$fl$4 = $cmp307 ? $and310 : $fl$4; + $128 = ($127|0)!=(0); + $130 = ($129|0)!=(0); + $131 = $128 | $130; + $tobool315 = ($p$2|0)!=(0); + $or$cond = $tobool315 | $131; + $sub$ptr$rhs$cast319 = $a$0; + $sub$ptr$sub320 = (($sub$ptr$lhs$cast318) - ($sub$ptr$rhs$cast319))|0; + $lnot = $131 ^ 1; + $lnot$ext = $lnot&1; + $add323 = (($sub$ptr$sub320) + ($lnot$ext))|0; + $cmp324 = ($p$2|0)>($add323|0); + $p$2$add323 = $cmp324 ? $p$2 : $add323; + $p$2$add323$p$2 = $or$cond ? $p$2$add323 : $p$2; + $a$0$add$ptr206 = $or$cond ? $a$0 : $add$ptr206; + $a$2 = $a$0$add$ptr206;$fl$6 = $and310$fl$4;$p$5 = $p$2$add323$p$2;$pl$2 = $pl$1;$prefix$2 = $prefix$1;$z$2 = $add$ptr206; + } + else if ((label|0) == 83) { + label = 0; + $xor = $fl$1$and220 ^ 8192; + _pad_108($f,32,$w$1,$i$0$lcssa257,$xor); + $cmp422 = ($w$1|0)>($i$0$lcssa257|0); + $cond427 = $cmp422 ? $w$1 : $i$0$lcssa257; + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = $cond427;$l10n$0 = $l10n$3; + continue; + } + $sub$ptr$lhs$cast432 = $z$2; + $sub$ptr$rhs$cast433 = $a$2; + $sub$ptr$sub434 = (($sub$ptr$lhs$cast432) - ($sub$ptr$rhs$cast433))|0; + $cmp435 = ($p$5|0)<($sub$ptr$sub434|0); + $sub$ptr$sub434$p$5 = $cmp435 ? $sub$ptr$sub434 : $p$5; + $add442 = (($sub$ptr$sub434$p$5) + ($pl$2))|0; + $cmp443 = ($w$1|0)<($add442|0); + $w$2 = $cmp443 ? $add442 : $w$1; + _pad_108($f,32,$w$2,$add442,$fl$6); + _out_102($f,$prefix$2,$pl$2); + $xor450 = $fl$6 ^ 65536; + _pad_108($f,48,$w$2,$add442,$xor450); + _pad_108($f,48,$sub$ptr$sub434$p$5,$sub$ptr$sub434,0); + _out_102($f,$a$2,$sub$ptr$sub434); + $xor458 = $fl$6 ^ 8192; + _pad_108($f,32,$w$2,$add442,$xor458); + $1 = $incdec$ptr171;$cnt$0 = $cnt$1;$l$0 = $w$2;$l10n$0 = $l10n$3; + } + L113: do { + if ((label|0) == 86) { + $tobool460 = ($f|0)==(0|0); + if ($tobool460) { + $tobool463 = ($l10n$0|0)==(0); + if ($tobool463) { + $retval$0 = 0; + } else { + $i$2210 = 1; + while(1) { + $arrayidx470 = (($nl_type) + ($i$2210<<2)|0); + $150 = HEAP32[$arrayidx470>>2]|0; + $tobool471 = ($150|0)==(0); + if ($tobool471) { + $i$2$lcssa = $i$2210; + break; + } + $add$ptr474 = (($nl_arg) + ($i$2210<<3)|0); + _pop_arg_105($add$ptr474,$150,$ap); + $inc = (($i$2210) + 1)|0; + $cmp467 = ($i$2210|0)<(9); + if ($cmp467) { + $i$2210 = $inc; + } else { + $i$2$lcssa = $inc; + break; + } + } + $cmp479206 = ($i$2$lcssa|0)<(10); + if ($cmp479206) { + $i$3207 = $i$2$lcssa; + while(1) { + $arrayidx482 = (($nl_type) + ($i$3207<<2)|0); + $151 = HEAP32[$arrayidx482>>2]|0; + $tobool483 = ($151|0)==(0); + if (!($tobool483)) { + $retval$0 = -1; + break L113; + } + $inc489 = (($i$3207) + 1)|0; + $cmp479 = ($i$3207|0)<(9); + if ($cmp479) { + $i$3207 = $inc489; + } else { + $retval$0 = 1; + break; + } + } + } else { + $retval$0 = 1; + } + } + } else { + $retval$0 = $cnt$1; + } + } + } while(0); + STACKTOP = sp;return ($retval$0|0); +} +function ___lockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function ___unlockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function _out_102($f,$s,$l) { + $f = $f|0; + $s = $s|0; + $l = $l|0; + var $0 = 0, $and = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$f>>2]|0; + $and = $0 & 32; + $tobool = ($and|0)==(0); + if ($tobool) { + (___fwritex($s,$l,$f)|0); + } + return; +} +function _getint_103($s) { + $s = $s|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $add = 0, $conv = 0, $conv4 = 0, $i$0$lcssa = 0, $i$07 = 0, $incdec$ptr = 0, $isdigit = 0, $isdigit6 = 0, $isdigittmp = 0, $isdigittmp5 = 0, $isdigittmp8 = 0, $mul = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$s>>2]|0; + $1 = HEAP8[$0>>0]|0; + $conv4 = $1 << 24 >> 24; + $isdigittmp5 = (($conv4) + -48)|0; + $isdigit6 = ($isdigittmp5>>>0)<(10); + if ($isdigit6) { + $2 = $0;$i$07 = 0;$isdigittmp8 = $isdigittmp5; + while(1) { + $mul = ($i$07*10)|0; + $add = (($isdigittmp8) + ($mul))|0; + $incdec$ptr = ((($2)) + 1|0); + HEAP32[$s>>2] = $incdec$ptr; + $3 = HEAP8[$incdec$ptr>>0]|0; + $conv = $3 << 24 >> 24; + $isdigittmp = (($conv) + -48)|0; + $isdigit = ($isdigittmp>>>0)<(10); + if ($isdigit) { + $2 = $incdec$ptr;$i$07 = $add;$isdigittmp8 = $isdigittmp; + } else { + $i$0$lcssa = $add; + break; + } + } + } else { + $i$0$lcssa = 0; + } + return ($i$0$lcssa|0); +} +function _pop_arg_105($arg,$type,$ap) { + $arg = $arg|0; + $type = $type|0; + $ap = $ap|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0.0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; + var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; + var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0; + var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; + var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; + var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $arglist_current = 0, $arglist_current11 = 0, $arglist_current14 = 0, $arglist_current17 = 0, $arglist_current2 = 0, $arglist_current20 = 0, $arglist_current23 = 0, $arglist_current26 = 0, $arglist_current5 = 0; + var $arglist_current8 = 0, $arglist_next = 0, $arglist_next12 = 0, $arglist_next15 = 0, $arglist_next18 = 0, $arglist_next21 = 0, $arglist_next24 = 0, $arglist_next27 = 0, $arglist_next3 = 0, $arglist_next6 = 0, $arglist_next9 = 0, $cmp = 0, $conv16 = 0, $conv22$mask = 0, $conv28 = 0, $conv34$mask = 0, $expanded = 0, $expanded28 = 0, $expanded30 = 0, $expanded31 = 0; + var $expanded32 = 0, $expanded34 = 0, $expanded35 = 0, $expanded37 = 0, $expanded38 = 0, $expanded39 = 0, $expanded41 = 0, $expanded42 = 0, $expanded44 = 0, $expanded45 = 0, $expanded46 = 0, $expanded48 = 0, $expanded49 = 0, $expanded51 = 0, $expanded52 = 0, $expanded53 = 0, $expanded55 = 0, $expanded56 = 0, $expanded58 = 0, $expanded59 = 0; + var $expanded60 = 0, $expanded62 = 0, $expanded63 = 0, $expanded65 = 0, $expanded66 = 0, $expanded67 = 0, $expanded69 = 0, $expanded70 = 0, $expanded72 = 0, $expanded73 = 0, $expanded74 = 0, $expanded76 = 0, $expanded77 = 0, $expanded79 = 0, $expanded80 = 0, $expanded81 = 0, $expanded83 = 0, $expanded84 = 0, $expanded86 = 0, $expanded87 = 0; + var $expanded88 = 0, $expanded90 = 0, $expanded91 = 0, $expanded93 = 0, $expanded94 = 0, $expanded95 = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($type>>>0)>(20); + L1: do { + if (!($cmp)) { + do { + switch ($type|0) { + case 9: { + $arglist_current = HEAP32[$ap>>2]|0; + $0 = $arglist_current; + $1 = ((0) + 4|0); + $expanded28 = $1; + $expanded = (($expanded28) - 1)|0; + $2 = (($0) + ($expanded))|0; + $3 = ((0) + 4|0); + $expanded32 = $3; + $expanded31 = (($expanded32) - 1)|0; + $expanded30 = $expanded31 ^ -1; + $4 = $2 & $expanded30; + $5 = $4; + $6 = HEAP32[$5>>2]|0; + $arglist_next = ((($5)) + 4|0); + HEAP32[$ap>>2] = $arglist_next; + HEAP32[$arg>>2] = $6; + break L1; + break; + } + case 10: { + $arglist_current2 = HEAP32[$ap>>2]|0; + $7 = $arglist_current2; + $8 = ((0) + 4|0); + $expanded35 = $8; + $expanded34 = (($expanded35) - 1)|0; + $9 = (($7) + ($expanded34))|0; + $10 = ((0) + 4|0); + $expanded39 = $10; + $expanded38 = (($expanded39) - 1)|0; + $expanded37 = $expanded38 ^ -1; + $11 = $9 & $expanded37; + $12 = $11; + $13 = HEAP32[$12>>2]|0; + $arglist_next3 = ((($12)) + 4|0); + HEAP32[$ap>>2] = $arglist_next3; + $14 = ($13|0)<(0); + $15 = $14 << 31 >> 31; + $16 = $arg; + $17 = $16; + HEAP32[$17>>2] = $13; + $18 = (($16) + 4)|0; + $19 = $18; + HEAP32[$19>>2] = $15; + break L1; + break; + } + case 11: { + $arglist_current5 = HEAP32[$ap>>2]|0; + $20 = $arglist_current5; + $21 = ((0) + 4|0); + $expanded42 = $21; + $expanded41 = (($expanded42) - 1)|0; + $22 = (($20) + ($expanded41))|0; + $23 = ((0) + 4|0); + $expanded46 = $23; + $expanded45 = (($expanded46) - 1)|0; + $expanded44 = $expanded45 ^ -1; + $24 = $22 & $expanded44; + $25 = $24; + $26 = HEAP32[$25>>2]|0; + $arglist_next6 = ((($25)) + 4|0); + HEAP32[$ap>>2] = $arglist_next6; + $27 = $arg; + $28 = $27; + HEAP32[$28>>2] = $26; + $29 = (($27) + 4)|0; + $30 = $29; + HEAP32[$30>>2] = 0; + break L1; + break; + } + case 12: { + $arglist_current8 = HEAP32[$ap>>2]|0; + $31 = $arglist_current8; + $32 = ((0) + 8|0); + $expanded49 = $32; + $expanded48 = (($expanded49) - 1)|0; + $33 = (($31) + ($expanded48))|0; + $34 = ((0) + 8|0); + $expanded53 = $34; + $expanded52 = (($expanded53) - 1)|0; + $expanded51 = $expanded52 ^ -1; + $35 = $33 & $expanded51; + $36 = $35; + $37 = $36; + $38 = $37; + $39 = HEAP32[$38>>2]|0; + $40 = (($37) + 4)|0; + $41 = $40; + $42 = HEAP32[$41>>2]|0; + $arglist_next9 = ((($36)) + 8|0); + HEAP32[$ap>>2] = $arglist_next9; + $43 = $arg; + $44 = $43; + HEAP32[$44>>2] = $39; + $45 = (($43) + 4)|0; + $46 = $45; + HEAP32[$46>>2] = $42; + break L1; + break; + } + case 13: { + $arglist_current11 = HEAP32[$ap>>2]|0; + $47 = $arglist_current11; + $48 = ((0) + 4|0); + $expanded56 = $48; + $expanded55 = (($expanded56) - 1)|0; + $49 = (($47) + ($expanded55))|0; + $50 = ((0) + 4|0); + $expanded60 = $50; + $expanded59 = (($expanded60) - 1)|0; + $expanded58 = $expanded59 ^ -1; + $51 = $49 & $expanded58; + $52 = $51; + $53 = HEAP32[$52>>2]|0; + $arglist_next12 = ((($52)) + 4|0); + HEAP32[$ap>>2] = $arglist_next12; + $conv16 = $53&65535; + $54 = $conv16 << 16 >> 16; + $55 = ($54|0)<(0); + $56 = $55 << 31 >> 31; + $57 = $arg; + $58 = $57; + HEAP32[$58>>2] = $54; + $59 = (($57) + 4)|0; + $60 = $59; + HEAP32[$60>>2] = $56; + break L1; + break; + } + case 14: { + $arglist_current14 = HEAP32[$ap>>2]|0; + $61 = $arglist_current14; + $62 = ((0) + 4|0); + $expanded63 = $62; + $expanded62 = (($expanded63) - 1)|0; + $63 = (($61) + ($expanded62))|0; + $64 = ((0) + 4|0); + $expanded67 = $64; + $expanded66 = (($expanded67) - 1)|0; + $expanded65 = $expanded66 ^ -1; + $65 = $63 & $expanded65; + $66 = $65; + $67 = HEAP32[$66>>2]|0; + $arglist_next15 = ((($66)) + 4|0); + HEAP32[$ap>>2] = $arglist_next15; + $conv22$mask = $67 & 65535; + $68 = $arg; + $69 = $68; + HEAP32[$69>>2] = $conv22$mask; + $70 = (($68) + 4)|0; + $71 = $70; + HEAP32[$71>>2] = 0; + break L1; + break; + } + case 15: { + $arglist_current17 = HEAP32[$ap>>2]|0; + $72 = $arglist_current17; + $73 = ((0) + 4|0); + $expanded70 = $73; + $expanded69 = (($expanded70) - 1)|0; + $74 = (($72) + ($expanded69))|0; + $75 = ((0) + 4|0); + $expanded74 = $75; + $expanded73 = (($expanded74) - 1)|0; + $expanded72 = $expanded73 ^ -1; + $76 = $74 & $expanded72; + $77 = $76; + $78 = HEAP32[$77>>2]|0; + $arglist_next18 = ((($77)) + 4|0); + HEAP32[$ap>>2] = $arglist_next18; + $conv28 = $78&255; + $79 = $conv28 << 24 >> 24; + $80 = ($79|0)<(0); + $81 = $80 << 31 >> 31; + $82 = $arg; + $83 = $82; + HEAP32[$83>>2] = $79; + $84 = (($82) + 4)|0; + $85 = $84; + HEAP32[$85>>2] = $81; + break L1; + break; + } + case 16: { + $arglist_current20 = HEAP32[$ap>>2]|0; + $86 = $arglist_current20; + $87 = ((0) + 4|0); + $expanded77 = $87; + $expanded76 = (($expanded77) - 1)|0; + $88 = (($86) + ($expanded76))|0; + $89 = ((0) + 4|0); + $expanded81 = $89; + $expanded80 = (($expanded81) - 1)|0; + $expanded79 = $expanded80 ^ -1; + $90 = $88 & $expanded79; + $91 = $90; + $92 = HEAP32[$91>>2]|0; + $arglist_next21 = ((($91)) + 4|0); + HEAP32[$ap>>2] = $arglist_next21; + $conv34$mask = $92 & 255; + $93 = $arg; + $94 = $93; + HEAP32[$94>>2] = $conv34$mask; + $95 = (($93) + 4)|0; + $96 = $95; + HEAP32[$96>>2] = 0; + break L1; + break; + } + case 17: { + $arglist_current23 = HEAP32[$ap>>2]|0; + $97 = $arglist_current23; + $98 = ((0) + 8|0); + $expanded84 = $98; + $expanded83 = (($expanded84) - 1)|0; + $99 = (($97) + ($expanded83))|0; + $100 = ((0) + 8|0); + $expanded88 = $100; + $expanded87 = (($expanded88) - 1)|0; + $expanded86 = $expanded87 ^ -1; + $101 = $99 & $expanded86; + $102 = $101; + $103 = +HEAPF64[$102>>3]; + $arglist_next24 = ((($102)) + 8|0); + HEAP32[$ap>>2] = $arglist_next24; + HEAPF64[$arg>>3] = $103; + break L1; + break; + } + case 18: { + $arglist_current26 = HEAP32[$ap>>2]|0; + $104 = $arglist_current26; + $105 = ((0) + 8|0); + $expanded91 = $105; + $expanded90 = (($expanded91) - 1)|0; + $106 = (($104) + ($expanded90))|0; + $107 = ((0) + 8|0); + $expanded95 = $107; + $expanded94 = (($expanded95) - 1)|0; + $expanded93 = $expanded94 ^ -1; + $108 = $106 & $expanded93; + $109 = $108; + $110 = +HEAPF64[$109>>3]; + $arglist_next27 = ((($109)) + 8|0); + HEAP32[$ap>>2] = $arglist_next27; + HEAPF64[$arg>>3] = $110; + break L1; + break; + } + default: { + break L1; + } + } + } while(0); + } + } while(0); + return; +} +function _fmt_x($0,$1,$s,$lower) { + $0 = $0|0; + $1 = $1|0; + $s = $s|0; + $lower = $lower|0; + var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $arrayidx = 0, $conv1 = 0, $conv4 = 0, $idxprom = 0, $incdec$ptr = 0, $or = 0, $s$addr$0$lcssa = 0, $s$addr$06 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $2 = ($0|0)==(0); + $3 = ($1|0)==(0); + $4 = $2 & $3; + if ($4) { + $s$addr$0$lcssa = $s; + } else { + $5 = $0;$7 = $1;$s$addr$06 = $s; + while(1) { + $idxprom = $5 & 15; + $arrayidx = (26221 + ($idxprom)|0); + $6 = HEAP8[$arrayidx>>0]|0; + $conv4 = $6&255; + $or = $conv4 | $lower; + $conv1 = $or&255; + $incdec$ptr = ((($s$addr$06)) + -1|0); + HEAP8[$incdec$ptr>>0] = $conv1; + $8 = (_bitshift64Lshr(($5|0),($7|0),4)|0); + $9 = tempRet0; + $10 = ($8|0)==(0); + $11 = ($9|0)==(0); + $12 = $10 & $11; + if ($12) { + $s$addr$0$lcssa = $incdec$ptr; + break; + } else { + $5 = $8;$7 = $9;$s$addr$06 = $incdec$ptr; + } + } + } + return ($s$addr$0$lcssa|0); +} +function _fmt_o($0,$1,$s) { + $0 = $0|0; + $1 = $1|0; + $s = $s|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $conv = 0, $incdec$ptr = 0, $s$addr$0$lcssa = 0, $s$addr$06 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ($0|0)==(0); + $3 = ($1|0)==(0); + $4 = $2 & $3; + if ($4) { + $s$addr$0$lcssa = $s; + } else { + $6 = $0;$8 = $1;$s$addr$06 = $s; + while(1) { + $5 = $6&255; + $7 = $5 & 7; + $conv = $7 | 48; + $incdec$ptr = ((($s$addr$06)) + -1|0); + HEAP8[$incdec$ptr>>0] = $conv; + $9 = (_bitshift64Lshr(($6|0),($8|0),3)|0); + $10 = tempRet0; + $11 = ($9|0)==(0); + $12 = ($10|0)==(0); + $13 = $11 & $12; + if ($13) { + $s$addr$0$lcssa = $incdec$ptr; + break; + } else { + $6 = $9;$8 = $10;$s$addr$06 = $incdec$ptr; + } + } + } + return ($s$addr$0$lcssa|0); +} +function _fmt_u($0,$1,$s) { + $0 = $0|0; + $1 = $1|0; + $s = $s|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add5 = 0, $conv = 0; + var $conv6 = 0, $div9 = 0, $incdec$ptr = 0, $incdec$ptr7 = 0, $rem4 = 0, $s$addr$0$lcssa = 0, $s$addr$013 = 0, $s$addr$1$lcssa = 0, $s$addr$19 = 0, $tobool8 = 0, $x$addr$0$lcssa$off0 = 0, $y$010 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ($1>>>0)>(0); + $3 = ($0>>>0)>(4294967295); + $4 = ($1|0)==(0); + $5 = $4 & $3; + $6 = $2 | $5; + if ($6) { + $7 = $0;$8 = $1;$s$addr$013 = $s; + while(1) { + $9 = (___uremdi3(($7|0),($8|0),10,0)|0); + $10 = tempRet0; + $11 = $9&255; + $conv = $11 | 48; + $incdec$ptr = ((($s$addr$013)) + -1|0); + HEAP8[$incdec$ptr>>0] = $conv; + $12 = (___udivdi3(($7|0),($8|0),10,0)|0); + $13 = tempRet0; + $14 = ($8>>>0)>(9); + $15 = ($7>>>0)>(4294967295); + $16 = ($8|0)==(9); + $17 = $16 & $15; + $18 = $14 | $17; + if ($18) { + $7 = $12;$8 = $13;$s$addr$013 = $incdec$ptr; + } else { + break; + } + } + $s$addr$0$lcssa = $incdec$ptr;$x$addr$0$lcssa$off0 = $12; + } else { + $s$addr$0$lcssa = $s;$x$addr$0$lcssa$off0 = $0; + } + $tobool8 = ($x$addr$0$lcssa$off0|0)==(0); + if ($tobool8) { + $s$addr$1$lcssa = $s$addr$0$lcssa; + } else { + $s$addr$19 = $s$addr$0$lcssa;$y$010 = $x$addr$0$lcssa$off0; + while(1) { + $rem4 = (($y$010>>>0) % 10)&-1; + $add5 = $rem4 | 48; + $conv6 = $add5&255; + $incdec$ptr7 = ((($s$addr$19)) + -1|0); + HEAP8[$incdec$ptr7>>0] = $conv6; + $div9 = (($y$010>>>0) / 10)&-1; + $19 = ($y$010>>>0)<(10); + if ($19) { + $s$addr$1$lcssa = $incdec$ptr7; + break; + } else { + $s$addr$19 = $incdec$ptr7;$y$010 = $div9; + } + } + } + return ($s$addr$1$lcssa|0); +} +function _strerror($e) { + $e = $e|0; + var $0 = 0, $call = 0, $call1 = 0, $locale = 0, label = 0, sp = 0; + sp = STACKTOP; + $call = (___pthread_self_822()|0); + $locale = ((($call)) + 188|0); + $0 = HEAP32[$locale>>2]|0; + $call1 = (___strerror_l($e,$0)|0); + return ($call1|0); +} +function _memchr($src,$c,$n) { + $src = $src|0; + $c = $c|0; + $n = $n|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $and = 0, $and15 = 0, $and16 = 0, $and39 = 0, $cmp = 0, $cmp11 = 0, $cmp1132 = 0, $cmp28 = 0, $cmp8 = 0, $cond = 0, $conv1 = 0, $dec = 0; + var $dec34 = 0, $incdec$ptr = 0, $incdec$ptr21 = 0, $incdec$ptr33 = 0, $mul = 0, $n$addr$0$lcssa = 0, $n$addr$0$lcssa52 = 0, $n$addr$043 = 0, $n$addr$1$lcssa = 0, $n$addr$133 = 0, $n$addr$227 = 0, $n$addr$3 = 0, $neg = 0, $or$cond = 0, $or$cond42 = 0, $s$0$lcssa = 0, $s$0$lcssa53 = 0, $s$044 = 0, $s$128 = 0, $s$2 = 0; + var $sub = 0, $sub22 = 0, $tobool = 0, $tobool17 = 0, $tobool2 = 0, $tobool2$lcssa = 0, $tobool241 = 0, $tobool25 = 0, $tobool2526 = 0, $tobool36 = 0, $tobool40 = 0, $w$0$lcssa = 0, $w$034 = 0, $xor = 0, label = 0, sp = 0; + sp = STACKTOP; + $conv1 = $c & 255; + $0 = $src; + $and39 = $0 & 3; + $tobool40 = ($and39|0)!=(0); + $tobool241 = ($n|0)!=(0); + $or$cond42 = $tobool241 & $tobool40; + L1: do { + if ($or$cond42) { + $1 = $c&255; + $n$addr$043 = $n;$s$044 = $src; + while(1) { + $2 = HEAP8[$s$044>>0]|0; + $cmp = ($2<<24>>24)==($1<<24>>24); + if ($cmp) { + $n$addr$0$lcssa52 = $n$addr$043;$s$0$lcssa53 = $s$044; + label = 6; + break L1; + } + $incdec$ptr = ((($s$044)) + 1|0); + $dec = (($n$addr$043) + -1)|0; + $3 = $incdec$ptr; + $and = $3 & 3; + $tobool = ($and|0)!=(0); + $tobool2 = ($dec|0)!=(0); + $or$cond = $tobool2 & $tobool; + if ($or$cond) { + $n$addr$043 = $dec;$s$044 = $incdec$ptr; + } else { + $n$addr$0$lcssa = $dec;$s$0$lcssa = $incdec$ptr;$tobool2$lcssa = $tobool2; + label = 5; + break; + } + } + } else { + $n$addr$0$lcssa = $n;$s$0$lcssa = $src;$tobool2$lcssa = $tobool241; + label = 5; + } + } while(0); + if ((label|0) == 5) { + if ($tobool2$lcssa) { + $n$addr$0$lcssa52 = $n$addr$0$lcssa;$s$0$lcssa53 = $s$0$lcssa; + label = 6; + } else { + $n$addr$3 = 0;$s$2 = $s$0$lcssa; + } + } + L8: do { + if ((label|0) == 6) { + $4 = HEAP8[$s$0$lcssa53>>0]|0; + $5 = $c&255; + $cmp8 = ($4<<24>>24)==($5<<24>>24); + if ($cmp8) { + $n$addr$3 = $n$addr$0$lcssa52;$s$2 = $s$0$lcssa53; + } else { + $mul = Math_imul($conv1, 16843009)|0; + $cmp1132 = ($n$addr$0$lcssa52>>>0)>(3); + L11: do { + if ($cmp1132) { + $n$addr$133 = $n$addr$0$lcssa52;$w$034 = $s$0$lcssa53; + while(1) { + $6 = HEAP32[$w$034>>2]|0; + $xor = $6 ^ $mul; + $sub = (($xor) + -16843009)|0; + $neg = $xor & -2139062144; + $and15 = $neg ^ -2139062144; + $and16 = $and15 & $sub; + $tobool17 = ($and16|0)==(0); + if (!($tobool17)) { + break; + } + $incdec$ptr21 = ((($w$034)) + 4|0); + $sub22 = (($n$addr$133) + -4)|0; + $cmp11 = ($sub22>>>0)>(3); + if ($cmp11) { + $n$addr$133 = $sub22;$w$034 = $incdec$ptr21; + } else { + $n$addr$1$lcssa = $sub22;$w$0$lcssa = $incdec$ptr21; + label = 11; + break L11; + } + } + $n$addr$227 = $n$addr$133;$s$128 = $w$034; + } else { + $n$addr$1$lcssa = $n$addr$0$lcssa52;$w$0$lcssa = $s$0$lcssa53; + label = 11; + } + } while(0); + if ((label|0) == 11) { + $tobool2526 = ($n$addr$1$lcssa|0)==(0); + if ($tobool2526) { + $n$addr$3 = 0;$s$2 = $w$0$lcssa; + break; + } else { + $n$addr$227 = $n$addr$1$lcssa;$s$128 = $w$0$lcssa; + } + } + while(1) { + $7 = HEAP8[$s$128>>0]|0; + $cmp28 = ($7<<24>>24)==($5<<24>>24); + if ($cmp28) { + $n$addr$3 = $n$addr$227;$s$2 = $s$128; + break L8; + } + $incdec$ptr33 = ((($s$128)) + 1|0); + $dec34 = (($n$addr$227) + -1)|0; + $tobool25 = ($dec34|0)==(0); + if ($tobool25) { + $n$addr$3 = 0;$s$2 = $incdec$ptr33; + break; + } else { + $n$addr$227 = $dec34;$s$128 = $incdec$ptr33; + } + } + } + } + } while(0); + $tobool36 = ($n$addr$3|0)!=(0); + $cond = $tobool36 ? $s$2 : 0; + return ($cond|0); +} +function _pad_108($f,$c,$w,$l,$fl) { + $f = $f|0; + $c = $c|0; + $w = $w|0; + $l = $l|0; + $fl = $fl|0; + var $0 = 0, $1 = 0, $2 = 0, $and = 0, $cmp = 0, $cmp3 = 0, $cmp38 = 0, $cond = 0, $l$addr$0$lcssa = 0, $l$addr$09 = 0, $or$cond = 0, $pad = 0, $sub = 0, $sub6 = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $pad = sp; + $and = $fl & 73728; + $tobool = ($and|0)==(0); + $cmp = ($w|0)>($l|0); + $or$cond = $cmp & $tobool; + if ($or$cond) { + $sub = (($w) - ($l))|0; + $0 = ($sub>>>0)<(256); + $cond = $0 ? $sub : 256; + _memset(($pad|0),($c|0),($cond|0))|0; + $cmp38 = ($sub>>>0)>(255); + if ($cmp38) { + $1 = (($w) - ($l))|0; + $l$addr$09 = $sub; + while(1) { + _out_102($f,$pad,256); + $sub6 = (($l$addr$09) + -256)|0; + $cmp3 = ($sub6>>>0)>(255); + if ($cmp3) { + $l$addr$09 = $sub6; + } else { + break; + } + } + $2 = $1 & 255; + $l$addr$0$lcssa = $2; + } else { + $l$addr$0$lcssa = $sub; + } + _out_102($f,$pad,$l$addr$0$lcssa); + } + STACKTOP = sp;return; +} +function _wctomb($s,$wc) { + $s = $s|0; + $wc = $wc|0; + var $call = 0, $retval$0 = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + $tobool = ($s|0)==(0|0); + if ($tobool) { + $retval$0 = 0; + } else { + $call = (_wcrtomb($s,$wc,0)|0); + $retval$0 = $call; + } + return ($retval$0|0); +} +function _fmt_fp($f,$y,$w,$p,$fl,$t) { + $f = $f|0; + $y = +$y; + $w = $w|0; + $p = $p|0; + $fl = $fl|0; + $t = $t|0; + var $$ = 0, $$$ = 0, $$$405 = 0.0, $$394$ = 0, $$396 = 0.0, $$405 = 0.0, $$p = 0, $$p$inc468 = 0, $$pr = 0, $$pr406 = 0, $$pre = 0, $$pre486 = 0, $$pre487 = 0, $$pre489 = 0, $$sub514 = 0, $$sub562 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0; + var $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0; + var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0; + var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0; + var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $8 = 0, $9 = 0, $a$1$lcssa = 0, $a$1476 = 0, $a$2$ph = 0, $a$3$lcssa = 0, $a$3466 = 0, $a$5$lcssa = 0, $a$5449 = 0, $a$6 = 0; + var $a$8 = 0, $a$9$ph = 0, $add = 0, $add$ptr213 = 0, $add$ptr311 = 0, $add$ptr311$z$4 = 0, $add$ptr354 = 0, $add$ptr358 = 0, $add$ptr373 = 0, $add$ptr442 = 0, $add$ptr442$z$3 = 0, $add$ptr65 = 0, $add$ptr671 = 0, $add$ptr742 = 0, $add$ptr756 = 0, $add113 = 0, $add150 = 0, $add163 = 0, $add165 = 0, $add273 = 0; + var $add275 = 0, $add284 = 0, $add313 = 0, $add355 = 0, $add410 = 0.0, $add414 = 0, $add477$neg = 0, $add561 = 0, $add608 = 0, $add612 = 0, $add620 = 0, $add653 = 0, $add653$sink402 = 0, $add67 = 0, $add737 = 0, $add810 = 0, $add87 = 0.0, $add90 = 0.0, $and = 0, $and12 = 0; + var $and134 = 0, $and282 = 0, $and36 = 0, $and379 = 0, $and45 = 0, $and483 = 0, $and610$pre$phiZ2D = 0, $and62 = 0, $arraydecay208$add$ptr213 = 0, $arrayidx = 0, $arrayidx117 = 0, $arrayidx251 = 0, $arrayidx453 = 0, $arrayidx489 = 0, $big = 0, $buf = 0, $call55 = 0.0, $carry$0471 = 0, $carry262$0462 = 0, $cmp103 = 0; + var $cmp127 = 0, $cmp131 = 0, $cmp147 = 0, $cmp196 = 0, $cmp205 = 0, $cmp225 = 0, $cmp225474 = 0, $cmp235 = 0, $cmp235470 = 0, $cmp249 = 0, $cmp259 = 0, $cmp259464 = 0, $cmp277 = 0, $cmp277460 = 0, $cmp299 = 0, $cmp308 = 0, $cmp315 = 0, $cmp324 = 0, $cmp324456 = 0, $cmp333 = 0; + var $cmp338 = 0, $cmp350 = 0, $cmp363 = 0, $cmp363452 = 0, $cmp374 = 0, $cmp38 = 0, $cmp385 = 0, $cmp390 = 0, $cmp403 = 0, $cmp411 = 0, $cmp416 = 0, $cmp416447 = 0, $cmp420 = 0, $cmp433 = 0, $cmp433443 = 0, $cmp443 = 0, $cmp450 = 0, $cmp450$lcssa = 0, $cmp470 = 0, $cmp473 = 0; + var $cmp495 = 0, $cmp495439 = 0, $cmp505 = 0, $cmp528 = 0, $cmp577 = 0, $cmp59 = 0, $cmp614 = 0, $cmp617 = 0, $cmp623 = 0, $cmp636 = 0, $cmp636434 = 0, $cmp660 = 0, $cmp665 = 0, $cmp673 = 0, $cmp678 = 0, $cmp678420 = 0, $cmp686 = 0, $cmp707 = 0, $cmp707415 = 0, $cmp710 = 0; + var $cmp710416 = 0, $cmp722 = 0, $cmp722412 = 0, $cmp745 = 0, $cmp748 = 0, $cmp748428 = 0, $cmp760 = 0, $cmp765 = 0, $cmp770 = 0, $cmp770424 = 0, $cmp777 = 0, $cmp790 = 0, $cmp818 = 0, $cmp82 = 0, $cmp94 = 0, $cond = 0, $cond100 = 0, $cond233 = 0, $cond271 = 0, $cond304 = 0; + var $cond43 = 0, $cond629 = 0, $cond732 = 0, $cond800 = 0, $conv111 = 0, $conv114 = 0, $conv116 = 0, $conv118393 = 0, $conv121 = 0, $conv123 = 0.0, $conv216 = 0, $conv218 = 0.0, $conv644 = 0, $conv646 = 0, $d$0 = 0, $d$0469 = 0, $d$0472 = 0, $d$1461 = 0, $d$4 = 0, $d$5423 = 0; + var $d$6417 = 0, $d$7429 = 0, $dec = 0, $dec476 = 0, $dec481 = 0, $dec78 = 0, $div274 = 0, $div356 = 0, $div378 = 0, $div384 = 0, $e$0458 = 0, $e$1 = 0, $e$2445 = 0, $e$4 = 0, $e$5$ph = 0, $e2 = 0, $ebuf0 = 0, $estr$0 = 0, $estr$1$lcssa = 0, $estr$1435 = 0; + var $estr$2 = 0, $i$0457 = 0, $i$1$lcssa = 0, $i$1453 = 0, $i$2444 = 0, $i$3440 = 0, $inc = 0, $inc425 = 0, $inc438 = 0, $inc468 = 0, $inc500 = 0, $incdec$ptr106 = 0, $incdec$ptr112 = 0, $incdec$ptr115 = 0, $incdec$ptr122 = 0, $incdec$ptr137 = 0, $incdec$ptr217 = 0, $incdec$ptr246 = 0, $incdec$ptr288 = 0, $incdec$ptr292 = 0; + var $incdec$ptr292$a$3 = 0, $incdec$ptr292$a$3494 = 0, $incdec$ptr292$a$3496 = 0, $incdec$ptr292493 = 0, $incdec$ptr296 = 0, $incdec$ptr419 = 0, $incdec$ptr419$sink$lcssa = 0, $incdec$ptr419$sink448 = 0, $incdec$ptr423 = 0, $incdec$ptr639 = 0, $incdec$ptr645 = 0, $incdec$ptr647 = 0, $incdec$ptr681 = 0, $incdec$ptr689 = 0, $incdec$ptr698 = 0, $incdec$ptr725 = 0, $incdec$ptr734 = 0, $incdec$ptr763 = 0, $incdec$ptr773 = 0, $incdec$ptr776 = 0; + var $incdec$ptr808 = 0, $j$0 = 0, $j$0$in454 = 0, $j$1441 = 0, $j$2 = 0, $l$1 = 0, $land$ext$neg = 0, $lor$ext = 0, $mul = 0.0, $mul125 = 0.0, $mul202 = 0.0, $mul220 = 0.0, $mul286 = 0, $mul322 = 0, $mul328 = 0, $mul335 = 0, $mul349 = 0, $mul367 = 0, $mul406 = 0.0, $mul406$$396 = 0.0; + var $mul407 = 0.0, $mul407$$$405 = 0.0, $mul431 = 0, $mul437 = 0, $mul499 = 0, $mul513 = 0, $mul80 = 0.0, $not$tobool341 = 0, $or = 0, $or$cond = 0, $or$cond1$not = 0, $or$cond2 = 0, $or$cond395 = 0, $or$cond397 = 0, $or$cond401 = 0, $or120 = 0, $or504 = 0, $or613 = 0, $p$addr$2 = 0, $p$addr$2$$sub514398 = 0; + var $p$addr$2$$sub562399 = 0, $p$addr$3 = 0, $p$addr$4$lcssa = 0, $p$addr$4418 = 0, $p$addr$5$lcssa = 0, $p$addr$5430 = 0, $pl$0 = 0, $prefix$0 = 0, $prefix$0$add$ptr65 = 0, $r$0$a$9 = 0, $re$1411 = 0, $rem360 = 0, $rem370 = 0, $rem494 = 0, $rem494438 = 0, $round$0410 = 0.0, $round377$1 = 0.0, $s$0 = 0, $s$1 = 0, $s35$0 = 0; + var $s668$0421 = 0, $s668$1 = 0, $s715$0$lcssa = 0, $s715$0413 = 0, $s753$0 = 0, $s753$1425 = 0, $s753$2 = 0, $scevgep483 = 0, $scevgep483484 = 0, $shl280 = 0, $shr283 = 0, $shr285 = 0, $small$1 = 0.0, $sub = 0.0, $sub$ptr$div = 0, $sub$ptr$div321 = 0, $sub$ptr$div347 = 0, $sub$ptr$div430 = 0, $sub$ptr$div511 = 0, $sub$ptr$lhs$cast = 0; + var $sub$ptr$lhs$cast160 = 0, $sub$ptr$lhs$cast305 = 0, $sub$ptr$lhs$cast318 = 0, $sub$ptr$lhs$cast344 = 0, $sub$ptr$lhs$cast508 = 0, $sub$ptr$lhs$cast633 = 0, $sub$ptr$lhs$cast694 = 0, $sub$ptr$lhs$cast787 = 0, $sub$ptr$lhs$cast811 = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$rhs$cast161 = 0, $sub$ptr$rhs$cast306 = 0, $sub$ptr$rhs$cast319 = 0, $sub$ptr$rhs$cast428 = 0, $sub$ptr$rhs$cast634 = 0, $sub$ptr$rhs$cast634432 = 0, $sub$ptr$rhs$cast649 = 0, $sub$ptr$rhs$cast695 = 0, $sub$ptr$rhs$cast788 = 0, $sub$ptr$rhs$cast812 = 0; + var $sub$ptr$sub = 0, $sub$ptr$sub145 = 0, $sub$ptr$sub159 = 0, $sub$ptr$sub159$sink = 0, $sub$ptr$sub162 = 0, $sub$ptr$sub172$pre$phiZZZ2D = 0, $sub$ptr$sub307 = 0, $sub$ptr$sub320 = 0, $sub$ptr$sub346 = 0, $sub$ptr$sub429 = 0, $sub$ptr$sub510 = 0, $sub$ptr$sub635 = 0, $sub$ptr$sub635433 = 0, $sub$ptr$sub650 = 0, $sub$ptr$sub650$pn = 0, $sub$ptr$sub696 = 0, $sub$ptr$sub789 = 0, $sub$ptr$sub813 = 0, $sub124 = 0.0, $sub146 = 0; + var $sub181 = 0, $sub203 = 0, $sub219 = 0.0, $sub256 = 0, $sub264 = 0, $sub281 = 0, $sub336 = 0, $sub343 = 0, $sub357 = 0, $sub409 = 0, $sub478 = 0, $sub480 = 0, $sub514 = 0, $sub562 = 0, $sub626$le = 0, $sub735 = 0, $sub74 = 0, $sub806 = 0, $sub85 = 0.0, $sub86 = 0.0; + var $sub88 = 0.0, $sub91 = 0.0, $sub97 = 0, $t$addr$0 = 0, $t$addr$1 = 0, $tobool129 = 0, $tobool13 = 0, $tobool135 = 0, $tobool139 = 0, $tobool140 = 0, $tobool222 = 0, $tobool244 = 0, $tobool252 = 0, $tobool290 = 0, $tobool290492 = 0, $tobool294 = 0, $tobool341 = 0, $tobool37 = 0, $tobool371 = 0, $tobool380 = 0; + var $tobool400 = 0, $tobool454 = 0, $tobool484 = 0, $tobool490 = 0, $tobool56 = 0, $tobool63 = 0, $tobool76 = 0, $tobool76490 = 0, $tobool781 = 0, $tobool79 = 0, $tobool9 = 0, $w$add653 = 0, $xor = 0, $xor167 = 0, $xor186 = 0, $xor655 = 0, $xor816 = 0, $y$addr$0 = 0.0, $y$addr$1 = 0.0, $y$addr$2 = 0.0; + var $y$addr$3 = 0.0, $y$addr$4 = 0.0, $z$0 = 0, $z$1$lcssa = 0, $z$1475 = 0, $z$2 = 0, $z$3$lcssa = 0, $z$3465 = 0, $z$4 = 0, $z$7 = 0, $z$7$add$ptr742 = 0, $z$7$ph = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 560|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(560|0); + $big = sp + 8|0; + $e2 = sp; + $buf = sp + 524|0; + $sub$ptr$rhs$cast = $buf; + $ebuf0 = sp + 512|0; + HEAP32[$e2>>2] = 0; + $arrayidx = ((($ebuf0)) + 12|0); + (___DOUBLE_BITS($y)|0); + $0 = tempRet0; + $1 = ($0|0)<(0); + if ($1) { + $sub = - $y; + $pl$0 = 1;$prefix$0 = 26186;$y$addr$0 = $sub; + } else { + $and = $fl & 2048; + $tobool9 = ($and|0)==(0); + $and12 = $fl & 1; + $tobool13 = ($and12|0)==(0); + $$ = $tobool13 ? (26187) : (26192); + $$$ = $tobool9 ? $$ : (26189); + $2 = $fl & 2049; + $3 = ($2|0)!=(0); + $$394$ = $3&1; + $pl$0 = $$394$;$prefix$0 = $$$;$y$addr$0 = $y; + } + (___DOUBLE_BITS($y$addr$0)|0); + $4 = tempRet0; + $5 = $4 & 2146435072; + $6 = (0)==(0); + $7 = ($5|0)==(2146435072); + $8 = $6 & $7; + do { + if ($8) { + $and36 = $t & 32; + $tobool37 = ($and36|0)!=(0); + $cond = $tobool37 ? 26205 : 26209; + $cmp38 = ($y$addr$0 != $y$addr$0) | (0.0 != 0.0); + $cond43 = $tobool37 ? 26213 : 26217; + $s35$0 = $cmp38 ? $cond43 : $cond; + $add = (($pl$0) + 3)|0; + $and45 = $fl & -65537; + _pad_108($f,32,$w,$add,$and45); + _out_102($f,$prefix$0,$pl$0); + _out_102($f,$s35$0,3); + $xor = $fl ^ 8192; + _pad_108($f,32,$w,$add,$xor); + $add653$sink402 = $add; + } else { + $call55 = (+_frexpl($y$addr$0,$e2)); + $mul = $call55 * 2.0; + $tobool56 = $mul != 0.0; + if ($tobool56) { + $9 = HEAP32[$e2>>2]|0; + $dec = (($9) + -1)|0; + HEAP32[$e2>>2] = $dec; + } + $or = $t | 32; + $cmp59 = ($or|0)==(97); + if ($cmp59) { + $and62 = $t & 32; + $tobool63 = ($and62|0)==(0); + $add$ptr65 = ((($prefix$0)) + 9|0); + $prefix$0$add$ptr65 = $tobool63 ? $prefix$0 : $add$ptr65; + $add67 = $pl$0 | 2; + $10 = ($p>>>0)>(11); + $sub74 = (12 - ($p))|0; + $tobool76490 = ($sub74|0)==(0); + $tobool76 = $10 | $tobool76490; + do { + if ($tobool76) { + $y$addr$1 = $mul; + } else { + $re$1411 = $sub74;$round$0410 = 8.0; + while(1) { + $dec78 = (($re$1411) + -1)|0; + $mul80 = $round$0410 * 16.0; + $tobool79 = ($dec78|0)==(0); + if ($tobool79) { + break; + } else { + $re$1411 = $dec78;$round$0410 = $mul80; + } + } + $11 = HEAP8[$prefix$0$add$ptr65>>0]|0; + $cmp82 = ($11<<24>>24)==(45); + if ($cmp82) { + $sub85 = - $mul; + $sub86 = $sub85 - $mul80; + $add87 = $mul80 + $sub86; + $sub88 = - $add87; + $y$addr$1 = $sub88; + break; + } else { + $add90 = $mul + $mul80; + $sub91 = $add90 - $mul80; + $y$addr$1 = $sub91; + break; + } + } + } while(0); + $12 = HEAP32[$e2>>2]|0; + $cmp94 = ($12|0)<(0); + $sub97 = (0 - ($12))|0; + $cond100 = $cmp94 ? $sub97 : $12; + $13 = ($cond100|0)<(0); + $14 = $13 << 31 >> 31; + $15 = (_fmt_u($cond100,$14,$arrayidx)|0); + $cmp103 = ($15|0)==($arrayidx|0); + if ($cmp103) { + $incdec$ptr106 = ((($ebuf0)) + 11|0); + HEAP8[$incdec$ptr106>>0] = 48; + $estr$0 = $incdec$ptr106; + } else { + $estr$0 = $15; + } + $16 = $12 >> 31; + $17 = $16 & 2; + $18 = (($17) + 43)|0; + $conv111 = $18&255; + $incdec$ptr112 = ((($estr$0)) + -1|0); + HEAP8[$incdec$ptr112>>0] = $conv111; + $add113 = (($t) + 15)|0; + $conv114 = $add113&255; + $incdec$ptr115 = ((($estr$0)) + -2|0); + HEAP8[$incdec$ptr115>>0] = $conv114; + $cmp131 = ($p|0)<(1); + $and134 = $fl & 8; + $tobool135 = ($and134|0)==(0); + $s$0 = $buf;$y$addr$2 = $y$addr$1; + while(1) { + $conv116 = (~~(($y$addr$2))); + $arrayidx117 = (26221 + ($conv116)|0); + $19 = HEAP8[$arrayidx117>>0]|0; + $conv118393 = $19&255; + $or120 = $and62 | $conv118393; + $conv121 = $or120&255; + $incdec$ptr122 = ((($s$0)) + 1|0); + HEAP8[$s$0>>0] = $conv121; + $conv123 = (+($conv116|0)); + $sub124 = $y$addr$2 - $conv123; + $mul125 = $sub124 * 16.0; + $sub$ptr$lhs$cast = $incdec$ptr122; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $cmp127 = ($sub$ptr$sub|0)==(1); + if ($cmp127) { + $tobool129 = $mul125 == 0.0; + $or$cond1$not = $cmp131 & $tobool129; + $or$cond = $tobool135 & $or$cond1$not; + if ($or$cond) { + $s$1 = $incdec$ptr122; + } else { + $incdec$ptr137 = ((($s$0)) + 2|0); + HEAP8[$incdec$ptr122>>0] = 46; + $s$1 = $incdec$ptr137; + } + } else { + $s$1 = $incdec$ptr122; + } + $tobool139 = $mul125 != 0.0; + if ($tobool139) { + $s$0 = $s$1;$y$addr$2 = $mul125; + } else { + break; + } + } + $tobool140 = ($p|0)==(0); + $$pre487 = $s$1; + if ($tobool140) { + label = 24; + } else { + $sub$ptr$sub145 = (-2 - ($sub$ptr$rhs$cast))|0; + $sub146 = (($sub$ptr$sub145) + ($$pre487))|0; + $cmp147 = ($sub146|0)<($p|0); + if ($cmp147) { + $add150 = (($p) + 2)|0; + $$pre486 = (($$pre487) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$sub159$sink = $add150;$sub$ptr$sub172$pre$phiZZZ2D = $$pre486; + } else { + label = 24; + } + } + if ((label|0) == 24) { + $sub$ptr$sub159 = (($$pre487) - ($sub$ptr$rhs$cast))|0; + $sub$ptr$sub159$sink = $sub$ptr$sub159;$sub$ptr$sub172$pre$phiZZZ2D = $sub$ptr$sub159; + } + $sub$ptr$lhs$cast160 = $arrayidx; + $sub$ptr$rhs$cast161 = $incdec$ptr115; + $sub$ptr$sub162 = (($sub$ptr$lhs$cast160) - ($sub$ptr$rhs$cast161))|0; + $add163 = (($sub$ptr$sub162) + ($add67))|0; + $add165 = (($add163) + ($sub$ptr$sub159$sink))|0; + _pad_108($f,32,$w,$add165,$fl); + _out_102($f,$prefix$0$add$ptr65,$add67); + $xor167 = $fl ^ 65536; + _pad_108($f,48,$w,$add165,$xor167); + _out_102($f,$buf,$sub$ptr$sub172$pre$phiZZZ2D); + $sub181 = (($sub$ptr$sub159$sink) - ($sub$ptr$sub172$pre$phiZZZ2D))|0; + _pad_108($f,48,$sub181,0,0); + _out_102($f,$incdec$ptr115,$sub$ptr$sub162); + $xor186 = $fl ^ 8192; + _pad_108($f,32,$w,$add165,$xor186); + $add653$sink402 = $add165; + break; + } + $cmp196 = ($p|0)<(0); + $$p = $cmp196 ? 6 : $p; + if ($tobool56) { + $mul202 = $mul * 268435456.0; + $20 = HEAP32[$e2>>2]|0; + $sub203 = (($20) + -28)|0; + HEAP32[$e2>>2] = $sub203; + $$pr = $sub203;$y$addr$3 = $mul202; + } else { + $$pre = HEAP32[$e2>>2]|0; + $$pr = $$pre;$y$addr$3 = $mul; + } + $cmp205 = ($$pr|0)<(0); + $add$ptr213 = ((($big)) + 288|0); + $arraydecay208$add$ptr213 = $cmp205 ? $big : $add$ptr213; + $y$addr$4 = $y$addr$3;$z$0 = $arraydecay208$add$ptr213; + while(1) { + $conv216 = (~~(($y$addr$4))>>>0); + HEAP32[$z$0>>2] = $conv216; + $incdec$ptr217 = ((($z$0)) + 4|0); + $conv218 = (+($conv216>>>0)); + $sub219 = $y$addr$4 - $conv218; + $mul220 = $sub219 * 1.0E+9; + $tobool222 = $mul220 != 0.0; + if ($tobool222) { + $y$addr$4 = $mul220;$z$0 = $incdec$ptr217; + } else { + break; + } + } + $cmp225474 = ($$pr|0)>(0); + if ($cmp225474) { + $21 = $$pr;$a$1476 = $arraydecay208$add$ptr213;$z$1475 = $incdec$ptr217; + while(1) { + $22 = ($21|0)<(29); + $cond233 = $22 ? $21 : 29; + $d$0469 = ((($z$1475)) + -4|0); + $cmp235470 = ($d$0469>>>0)<($a$1476>>>0); + if ($cmp235470) { + $a$2$ph = $a$1476; + } else { + $carry$0471 = 0;$d$0472 = $d$0469; + while(1) { + $23 = HEAP32[$d$0472>>2]|0; + $24 = (_bitshift64Shl(($23|0),0,($cond233|0))|0); + $25 = tempRet0; + $26 = (_i64Add(($24|0),($25|0),($carry$0471|0),0)|0); + $27 = tempRet0; + $28 = (___uremdi3(($26|0),($27|0),1000000000,0)|0); + $29 = tempRet0; + HEAP32[$d$0472>>2] = $28; + $30 = (___udivdi3(($26|0),($27|0),1000000000,0)|0); + $31 = tempRet0; + $d$0 = ((($d$0472)) + -4|0); + $cmp235 = ($d$0>>>0)<($a$1476>>>0); + if ($cmp235) { + break; + } else { + $carry$0471 = $30;$d$0472 = $d$0; + } + } + $tobool244 = ($30|0)==(0); + if ($tobool244) { + $a$2$ph = $a$1476; + } else { + $incdec$ptr246 = ((($a$1476)) + -4|0); + HEAP32[$incdec$ptr246>>2] = $30; + $a$2$ph = $incdec$ptr246; + } + } + $z$2 = $z$1475; + while(1) { + $cmp249 = ($z$2>>>0)>($a$2$ph>>>0); + if (!($cmp249)) { + break; + } + $arrayidx251 = ((($z$2)) + -4|0); + $32 = HEAP32[$arrayidx251>>2]|0; + $tobool252 = ($32|0)==(0); + if ($tobool252) { + $z$2 = $arrayidx251; + } else { + break; + } + } + $33 = HEAP32[$e2>>2]|0; + $sub256 = (($33) - ($cond233))|0; + HEAP32[$e2>>2] = $sub256; + $cmp225 = ($sub256|0)>(0); + if ($cmp225) { + $21 = $sub256;$a$1476 = $a$2$ph;$z$1475 = $z$2; + } else { + $$pr406 = $sub256;$a$1$lcssa = $a$2$ph;$z$1$lcssa = $z$2; + break; + } + } + } else { + $$pr406 = $$pr;$a$1$lcssa = $arraydecay208$add$ptr213;$z$1$lcssa = $incdec$ptr217; + } + $cmp259464 = ($$pr406|0)<(0); + if ($cmp259464) { + $add273 = (($$p) + 25)|0; + $div274 = (($add273|0) / 9)&-1; + $add275 = (($div274) + 1)|0; + $cmp299 = ($or|0)==(102); + $34 = $$pr406;$a$3466 = $a$1$lcssa;$z$3465 = $z$1$lcssa; + while(1) { + $sub264 = (0 - ($34))|0; + $35 = ($sub264|0)<(9); + $cond271 = $35 ? $sub264 : 9; + $cmp277460 = ($a$3466>>>0)<($z$3465>>>0); + if ($cmp277460) { + $shl280 = 1 << $cond271; + $sub281 = (($shl280) + -1)|0; + $shr285 = 1000000000 >>> $cond271; + $carry262$0462 = 0;$d$1461 = $a$3466; + while(1) { + $37 = HEAP32[$d$1461>>2]|0; + $and282 = $37 & $sub281; + $shr283 = $37 >>> $cond271; + $add284 = (($shr283) + ($carry262$0462))|0; + HEAP32[$d$1461>>2] = $add284; + $mul286 = Math_imul($and282, $shr285)|0; + $incdec$ptr288 = ((($d$1461)) + 4|0); + $cmp277 = ($incdec$ptr288>>>0)<($z$3465>>>0); + if ($cmp277) { + $carry262$0462 = $mul286;$d$1461 = $incdec$ptr288; + } else { + break; + } + } + $38 = HEAP32[$a$3466>>2]|0; + $tobool290 = ($38|0)==(0); + $incdec$ptr292 = ((($a$3466)) + 4|0); + $incdec$ptr292$a$3 = $tobool290 ? $incdec$ptr292 : $a$3466; + $tobool294 = ($mul286|0)==(0); + if ($tobool294) { + $incdec$ptr292$a$3496 = $incdec$ptr292$a$3;$z$4 = $z$3465; + } else { + $incdec$ptr296 = ((($z$3465)) + 4|0); + HEAP32[$z$3465>>2] = $mul286; + $incdec$ptr292$a$3496 = $incdec$ptr292$a$3;$z$4 = $incdec$ptr296; + } + } else { + $36 = HEAP32[$a$3466>>2]|0; + $tobool290492 = ($36|0)==(0); + $incdec$ptr292493 = ((($a$3466)) + 4|0); + $incdec$ptr292$a$3494 = $tobool290492 ? $incdec$ptr292493 : $a$3466; + $incdec$ptr292$a$3496 = $incdec$ptr292$a$3494;$z$4 = $z$3465; + } + $cond304 = $cmp299 ? $arraydecay208$add$ptr213 : $incdec$ptr292$a$3496; + $sub$ptr$lhs$cast305 = $z$4; + $sub$ptr$rhs$cast306 = $cond304; + $sub$ptr$sub307 = (($sub$ptr$lhs$cast305) - ($sub$ptr$rhs$cast306))|0; + $sub$ptr$div = $sub$ptr$sub307 >> 2; + $cmp308 = ($sub$ptr$div|0)>($add275|0); + $add$ptr311 = (($cond304) + ($add275<<2)|0); + $add$ptr311$z$4 = $cmp308 ? $add$ptr311 : $z$4; + $39 = HEAP32[$e2>>2]|0; + $add313 = (($39) + ($cond271))|0; + HEAP32[$e2>>2] = $add313; + $cmp259 = ($add313|0)<(0); + if ($cmp259) { + $34 = $add313;$a$3466 = $incdec$ptr292$a$3496;$z$3465 = $add$ptr311$z$4; + } else { + $a$3$lcssa = $incdec$ptr292$a$3496;$z$3$lcssa = $add$ptr311$z$4; + break; + } + } + } else { + $a$3$lcssa = $a$1$lcssa;$z$3$lcssa = $z$1$lcssa; + } + $cmp315 = ($a$3$lcssa>>>0)<($z$3$lcssa>>>0); + $sub$ptr$lhs$cast318 = $arraydecay208$add$ptr213; + if ($cmp315) { + $sub$ptr$rhs$cast319 = $a$3$lcssa; + $sub$ptr$sub320 = (($sub$ptr$lhs$cast318) - ($sub$ptr$rhs$cast319))|0; + $sub$ptr$div321 = $sub$ptr$sub320 >> 2; + $mul322 = ($sub$ptr$div321*9)|0; + $40 = HEAP32[$a$3$lcssa>>2]|0; + $cmp324456 = ($40>>>0)<(10); + if ($cmp324456) { + $e$1 = $mul322; + } else { + $e$0458 = $mul322;$i$0457 = 10; + while(1) { + $mul328 = ($i$0457*10)|0; + $inc = (($e$0458) + 1)|0; + $cmp324 = ($40>>>0)<($mul328>>>0); + if ($cmp324) { + $e$1 = $inc; + break; + } else { + $e$0458 = $inc;$i$0457 = $mul328; + } + } + } + } else { + $e$1 = 0; + } + $cmp333 = ($or|0)!=(102); + $mul335 = $cmp333 ? $e$1 : 0; + $sub336 = (($$p) - ($mul335))|0; + $cmp338 = ($or|0)==(103); + $tobool341 = ($$p|0)!=(0); + $41 = $tobool341 & $cmp338; + $land$ext$neg = $41 << 31 >> 31; + $sub343 = (($sub336) + ($land$ext$neg))|0; + $sub$ptr$lhs$cast344 = $z$3$lcssa; + $sub$ptr$sub346 = (($sub$ptr$lhs$cast344) - ($sub$ptr$lhs$cast318))|0; + $sub$ptr$div347 = $sub$ptr$sub346 >> 2; + $42 = ($sub$ptr$div347*9)|0; + $mul349 = (($42) + -9)|0; + $cmp350 = ($sub343|0)<($mul349|0); + if ($cmp350) { + $add$ptr354 = ((($arraydecay208$add$ptr213)) + 4|0); + $add355 = (($sub343) + 9216)|0; + $div356 = (($add355|0) / 9)&-1; + $sub357 = (($div356) + -1024)|0; + $add$ptr358 = (($add$ptr354) + ($sub357<<2)|0); + $rem360 = (($add355|0) % 9)&-1; + $cmp363452 = ($rem360|0)<(8); + if ($cmp363452) { + $i$1453 = 10;$j$0$in454 = $rem360; + while(1) { + $j$0 = (($j$0$in454) + 1)|0; + $mul367 = ($i$1453*10)|0; + $cmp363 = ($j$0$in454|0)<(7); + if ($cmp363) { + $i$1453 = $mul367;$j$0$in454 = $j$0; + } else { + $i$1$lcssa = $mul367; + break; + } + } + } else { + $i$1$lcssa = 10; + } + $43 = HEAP32[$add$ptr358>>2]|0; + $rem370 = (($43>>>0) % ($i$1$lcssa>>>0))&-1; + $tobool371 = ($rem370|0)==(0); + $add$ptr373 = ((($add$ptr358)) + 4|0); + $cmp374 = ($add$ptr373|0)==($z$3$lcssa|0); + $or$cond395 = $cmp374 & $tobool371; + if ($or$cond395) { + $a$8 = $a$3$lcssa;$d$4 = $add$ptr358;$e$4 = $e$1; + } else { + $div378 = (($43>>>0) / ($i$1$lcssa>>>0))&-1; + $and379 = $div378 & 1; + $tobool380 = ($and379|0)==(0); + $$396 = $tobool380 ? 9007199254740992.0 : 9007199254740994.0; + $div384 = (($i$1$lcssa|0) / 2)&-1; + $cmp385 = ($rem370>>>0)<($div384>>>0); + $cmp390 = ($rem370|0)==($div384|0); + $or$cond397 = $cmp374 & $cmp390; + $$405 = $or$cond397 ? 1.0 : 1.5; + $$$405 = $cmp385 ? 0.5 : $$405; + $tobool400 = ($pl$0|0)==(0); + if ($tobool400) { + $round377$1 = $$396;$small$1 = $$$405; + } else { + $44 = HEAP8[$prefix$0>>0]|0; + $cmp403 = ($44<<24>>24)==(45); + $mul406 = - $$396; + $mul407 = - $$$405; + $mul406$$396 = $cmp403 ? $mul406 : $$396; + $mul407$$$405 = $cmp403 ? $mul407 : $$$405; + $round377$1 = $mul406$$396;$small$1 = $mul407$$$405; + } + $sub409 = (($43) - ($rem370))|0; + HEAP32[$add$ptr358>>2] = $sub409; + $add410 = $round377$1 + $small$1; + $cmp411 = $add410 != $round377$1; + if ($cmp411) { + $add414 = (($sub409) + ($i$1$lcssa))|0; + HEAP32[$add$ptr358>>2] = $add414; + $cmp416447 = ($add414>>>0)>(999999999); + if ($cmp416447) { + $a$5449 = $a$3$lcssa;$incdec$ptr419$sink448 = $add$ptr358; + while(1) { + $incdec$ptr419 = ((($incdec$ptr419$sink448)) + -4|0); + HEAP32[$incdec$ptr419$sink448>>2] = 0; + $cmp420 = ($incdec$ptr419>>>0)<($a$5449>>>0); + if ($cmp420) { + $incdec$ptr423 = ((($a$5449)) + -4|0); + HEAP32[$incdec$ptr423>>2] = 0; + $a$6 = $incdec$ptr423; + } else { + $a$6 = $a$5449; + } + $45 = HEAP32[$incdec$ptr419>>2]|0; + $inc425 = (($45) + 1)|0; + HEAP32[$incdec$ptr419>>2] = $inc425; + $cmp416 = ($inc425>>>0)>(999999999); + if ($cmp416) { + $a$5449 = $a$6;$incdec$ptr419$sink448 = $incdec$ptr419; + } else { + $a$5$lcssa = $a$6;$incdec$ptr419$sink$lcssa = $incdec$ptr419; + break; + } + } + } else { + $a$5$lcssa = $a$3$lcssa;$incdec$ptr419$sink$lcssa = $add$ptr358; + } + $sub$ptr$rhs$cast428 = $a$5$lcssa; + $sub$ptr$sub429 = (($sub$ptr$lhs$cast318) - ($sub$ptr$rhs$cast428))|0; + $sub$ptr$div430 = $sub$ptr$sub429 >> 2; + $mul431 = ($sub$ptr$div430*9)|0; + $46 = HEAP32[$a$5$lcssa>>2]|0; + $cmp433443 = ($46>>>0)<(10); + if ($cmp433443) { + $a$8 = $a$5$lcssa;$d$4 = $incdec$ptr419$sink$lcssa;$e$4 = $mul431; + } else { + $e$2445 = $mul431;$i$2444 = 10; + while(1) { + $mul437 = ($i$2444*10)|0; + $inc438 = (($e$2445) + 1)|0; + $cmp433 = ($46>>>0)<($mul437>>>0); + if ($cmp433) { + $a$8 = $a$5$lcssa;$d$4 = $incdec$ptr419$sink$lcssa;$e$4 = $inc438; + break; + } else { + $e$2445 = $inc438;$i$2444 = $mul437; + } + } + } + } else { + $a$8 = $a$3$lcssa;$d$4 = $add$ptr358;$e$4 = $e$1; + } + } + $add$ptr442 = ((($d$4)) + 4|0); + $cmp443 = ($z$3$lcssa>>>0)>($add$ptr442>>>0); + $add$ptr442$z$3 = $cmp443 ? $add$ptr442 : $z$3$lcssa; + $a$9$ph = $a$8;$e$5$ph = $e$4;$z$7$ph = $add$ptr442$z$3; + } else { + $a$9$ph = $a$3$lcssa;$e$5$ph = $e$1;$z$7$ph = $z$3$lcssa; + } + $z$7 = $z$7$ph; + while(1) { + $cmp450 = ($z$7>>>0)>($a$9$ph>>>0); + if (!($cmp450)) { + $cmp450$lcssa = 0; + break; + } + $arrayidx453 = ((($z$7)) + -4|0); + $47 = HEAP32[$arrayidx453>>2]|0; + $tobool454 = ($47|0)==(0); + if ($tobool454) { + $z$7 = $arrayidx453; + } else { + $cmp450$lcssa = 1; + break; + } + } + $sub626$le = (0 - ($e$5$ph))|0; + do { + if ($cmp338) { + $not$tobool341 = $tobool341 ^ 1; + $inc468 = $not$tobool341&1; + $$p$inc468 = (($$p) + ($inc468))|0; + $cmp470 = ($$p$inc468|0)>($e$5$ph|0); + $cmp473 = ($e$5$ph|0)>(-5); + $or$cond2 = $cmp470 & $cmp473; + if ($or$cond2) { + $dec476 = (($t) + -1)|0; + $add477$neg = (($$p$inc468) + -1)|0; + $sub478 = (($add477$neg) - ($e$5$ph))|0; + $p$addr$2 = $sub478;$t$addr$0 = $dec476; + } else { + $sub480 = (($t) + -2)|0; + $dec481 = (($$p$inc468) + -1)|0; + $p$addr$2 = $dec481;$t$addr$0 = $sub480; + } + $and483 = $fl & 8; + $tobool484 = ($and483|0)==(0); + if ($tobool484) { + if ($cmp450$lcssa) { + $arrayidx489 = ((($z$7)) + -4|0); + $48 = HEAP32[$arrayidx489>>2]|0; + $tobool490 = ($48|0)==(0); + if ($tobool490) { + $j$2 = 9; + } else { + $rem494438 = (($48>>>0) % 10)&-1; + $cmp495439 = ($rem494438|0)==(0); + if ($cmp495439) { + $i$3440 = 10;$j$1441 = 0; + while(1) { + $mul499 = ($i$3440*10)|0; + $inc500 = (($j$1441) + 1)|0; + $rem494 = (($48>>>0) % ($mul499>>>0))&-1; + $cmp495 = ($rem494|0)==(0); + if ($cmp495) { + $i$3440 = $mul499;$j$1441 = $inc500; + } else { + $j$2 = $inc500; + break; + } + } + } else { + $j$2 = 0; + } + } + } else { + $j$2 = 9; + } + $or504 = $t$addr$0 | 32; + $cmp505 = ($or504|0)==(102); + $sub$ptr$lhs$cast508 = $z$7; + $sub$ptr$sub510 = (($sub$ptr$lhs$cast508) - ($sub$ptr$lhs$cast318))|0; + $sub$ptr$div511 = $sub$ptr$sub510 >> 2; + $49 = ($sub$ptr$div511*9)|0; + $mul513 = (($49) + -9)|0; + if ($cmp505) { + $sub514 = (($mul513) - ($j$2))|0; + $50 = ($sub514|0)>(0); + $$sub514 = $50 ? $sub514 : 0; + $cmp528 = ($p$addr$2|0)<($$sub514|0); + $p$addr$2$$sub514398 = $cmp528 ? $p$addr$2 : $$sub514; + $and610$pre$phiZ2D = 0;$p$addr$3 = $p$addr$2$$sub514398;$t$addr$1 = $t$addr$0; + break; + } else { + $add561 = (($mul513) + ($e$5$ph))|0; + $sub562 = (($add561) - ($j$2))|0; + $51 = ($sub562|0)>(0); + $$sub562 = $51 ? $sub562 : 0; + $cmp577 = ($p$addr$2|0)<($$sub562|0); + $p$addr$2$$sub562399 = $cmp577 ? $p$addr$2 : $$sub562; + $and610$pre$phiZ2D = 0;$p$addr$3 = $p$addr$2$$sub562399;$t$addr$1 = $t$addr$0; + break; + } + } else { + $and610$pre$phiZ2D = $and483;$p$addr$3 = $p$addr$2;$t$addr$1 = $t$addr$0; + } + } else { + $$pre489 = $fl & 8; + $and610$pre$phiZ2D = $$pre489;$p$addr$3 = $$p;$t$addr$1 = $t; + } + } while(0); + $52 = $p$addr$3 | $and610$pre$phiZ2D; + $53 = ($52|0)!=(0); + $lor$ext = $53&1; + $or613 = $t$addr$1 | 32; + $cmp614 = ($or613|0)==(102); + if ($cmp614) { + $cmp617 = ($e$5$ph|0)>(0); + $add620 = $cmp617 ? $e$5$ph : 0; + $estr$2 = 0;$sub$ptr$sub650$pn = $add620; + } else { + $cmp623 = ($e$5$ph|0)<(0); + $cond629 = $cmp623 ? $sub626$le : $e$5$ph; + $54 = ($cond629|0)<(0); + $55 = $54 << 31 >> 31; + $56 = (_fmt_u($cond629,$55,$arrayidx)|0); + $sub$ptr$lhs$cast633 = $arrayidx; + $sub$ptr$rhs$cast634432 = $56; + $sub$ptr$sub635433 = (($sub$ptr$lhs$cast633) - ($sub$ptr$rhs$cast634432))|0; + $cmp636434 = ($sub$ptr$sub635433|0)<(2); + if ($cmp636434) { + $estr$1435 = $56; + while(1) { + $incdec$ptr639 = ((($estr$1435)) + -1|0); + HEAP8[$incdec$ptr639>>0] = 48; + $sub$ptr$rhs$cast634 = $incdec$ptr639; + $sub$ptr$sub635 = (($sub$ptr$lhs$cast633) - ($sub$ptr$rhs$cast634))|0; + $cmp636 = ($sub$ptr$sub635|0)<(2); + if ($cmp636) { + $estr$1435 = $incdec$ptr639; + } else { + $estr$1$lcssa = $incdec$ptr639; + break; + } + } + } else { + $estr$1$lcssa = $56; + } + $57 = $e$5$ph >> 31; + $58 = $57 & 2; + $59 = (($58) + 43)|0; + $conv644 = $59&255; + $incdec$ptr645 = ((($estr$1$lcssa)) + -1|0); + HEAP8[$incdec$ptr645>>0] = $conv644; + $conv646 = $t$addr$1&255; + $incdec$ptr647 = ((($estr$1$lcssa)) + -2|0); + HEAP8[$incdec$ptr647>>0] = $conv646; + $sub$ptr$rhs$cast649 = $incdec$ptr647; + $sub$ptr$sub650 = (($sub$ptr$lhs$cast633) - ($sub$ptr$rhs$cast649))|0; + $estr$2 = $incdec$ptr647;$sub$ptr$sub650$pn = $sub$ptr$sub650; + } + $add608 = (($pl$0) + 1)|0; + $add612 = (($add608) + ($p$addr$3))|0; + $l$1 = (($add612) + ($lor$ext))|0; + $add653 = (($l$1) + ($sub$ptr$sub650$pn))|0; + _pad_108($f,32,$w,$add653,$fl); + _out_102($f,$prefix$0,$pl$0); + $xor655 = $fl ^ 65536; + _pad_108($f,48,$w,$add653,$xor655); + if ($cmp614) { + $cmp660 = ($a$9$ph>>>0)>($arraydecay208$add$ptr213>>>0); + $r$0$a$9 = $cmp660 ? $arraydecay208$add$ptr213 : $a$9$ph; + $add$ptr671 = ((($buf)) + 9|0); + $sub$ptr$lhs$cast694 = $add$ptr671; + $incdec$ptr689 = ((($buf)) + 8|0); + $d$5423 = $r$0$a$9; + while(1) { + $60 = HEAP32[$d$5423>>2]|0; + $61 = (_fmt_u($60,0,$add$ptr671)|0); + $cmp673 = ($d$5423|0)==($r$0$a$9|0); + if ($cmp673) { + $cmp686 = ($61|0)==($add$ptr671|0); + if ($cmp686) { + HEAP8[$incdec$ptr689>>0] = 48; + $s668$1 = $incdec$ptr689; + } else { + $s668$1 = $61; + } + } else { + $cmp678420 = ($61>>>0)>($buf>>>0); + if ($cmp678420) { + $62 = $61; + $63 = (($62) - ($sub$ptr$rhs$cast))|0; + _memset(($buf|0),48,($63|0))|0; + $s668$0421 = $61; + while(1) { + $incdec$ptr681 = ((($s668$0421)) + -1|0); + $cmp678 = ($incdec$ptr681>>>0)>($buf>>>0); + if ($cmp678) { + $s668$0421 = $incdec$ptr681; + } else { + $s668$1 = $incdec$ptr681; + break; + } + } + } else { + $s668$1 = $61; + } + } + $sub$ptr$rhs$cast695 = $s668$1; + $sub$ptr$sub696 = (($sub$ptr$lhs$cast694) - ($sub$ptr$rhs$cast695))|0; + _out_102($f,$s668$1,$sub$ptr$sub696); + $incdec$ptr698 = ((($d$5423)) + 4|0); + $cmp665 = ($incdec$ptr698>>>0)>($arraydecay208$add$ptr213>>>0); + if ($cmp665) { + break; + } else { + $d$5423 = $incdec$ptr698; + } + } + $64 = ($52|0)==(0); + if (!($64)) { + _out_102($f,26237,1); + } + $cmp707415 = ($incdec$ptr698>>>0)<($z$7>>>0); + $cmp710416 = ($p$addr$3|0)>(0); + $65 = $cmp707415 & $cmp710416; + if ($65) { + $d$6417 = $incdec$ptr698;$p$addr$4418 = $p$addr$3; + while(1) { + $66 = HEAP32[$d$6417>>2]|0; + $67 = (_fmt_u($66,0,$add$ptr671)|0); + $cmp722412 = ($67>>>0)>($buf>>>0); + if ($cmp722412) { + $68 = $67; + $69 = (($68) - ($sub$ptr$rhs$cast))|0; + _memset(($buf|0),48,($69|0))|0; + $s715$0413 = $67; + while(1) { + $incdec$ptr725 = ((($s715$0413)) + -1|0); + $cmp722 = ($incdec$ptr725>>>0)>($buf>>>0); + if ($cmp722) { + $s715$0413 = $incdec$ptr725; + } else { + $s715$0$lcssa = $incdec$ptr725; + break; + } + } + } else { + $s715$0$lcssa = $67; + } + $70 = ($p$addr$4418|0)<(9); + $cond732 = $70 ? $p$addr$4418 : 9; + _out_102($f,$s715$0$lcssa,$cond732); + $incdec$ptr734 = ((($d$6417)) + 4|0); + $sub735 = (($p$addr$4418) + -9)|0; + $cmp707 = ($incdec$ptr734>>>0)<($z$7>>>0); + $cmp710 = ($p$addr$4418|0)>(9); + $71 = $cmp707 & $cmp710; + if ($71) { + $d$6417 = $incdec$ptr734;$p$addr$4418 = $sub735; + } else { + $p$addr$4$lcssa = $sub735; + break; + } + } + } else { + $p$addr$4$lcssa = $p$addr$3; + } + $add737 = (($p$addr$4$lcssa) + 9)|0; + _pad_108($f,48,$add737,9,0); + } else { + $add$ptr742 = ((($a$9$ph)) + 4|0); + $z$7$add$ptr742 = $cmp450$lcssa ? $z$7 : $add$ptr742; + $cmp748428 = ($p$addr$3|0)>(-1); + if ($cmp748428) { + $add$ptr756 = ((($buf)) + 9|0); + $tobool781 = ($and610$pre$phiZ2D|0)==(0); + $sub$ptr$lhs$cast787 = $add$ptr756; + $72 = (0 - ($sub$ptr$rhs$cast))|0; + $incdec$ptr763 = ((($buf)) + 8|0); + $d$7429 = $a$9$ph;$p$addr$5430 = $p$addr$3; + while(1) { + $73 = HEAP32[$d$7429>>2]|0; + $74 = (_fmt_u($73,0,$add$ptr756)|0); + $cmp760 = ($74|0)==($add$ptr756|0); + if ($cmp760) { + HEAP8[$incdec$ptr763>>0] = 48; + $s753$0 = $incdec$ptr763; + } else { + $s753$0 = $74; + } + $cmp765 = ($d$7429|0)==($a$9$ph|0); + do { + if ($cmp765) { + $incdec$ptr776 = ((($s753$0)) + 1|0); + _out_102($f,$s753$0,1); + $cmp777 = ($p$addr$5430|0)<(1); + $or$cond401 = $tobool781 & $cmp777; + if ($or$cond401) { + $s753$2 = $incdec$ptr776; + break; + } + _out_102($f,26237,1); + $s753$2 = $incdec$ptr776; + } else { + $cmp770424 = ($s753$0>>>0)>($buf>>>0); + if (!($cmp770424)) { + $s753$2 = $s753$0; + break; + } + $scevgep483 = (($s753$0) + ($72)|0); + $scevgep483484 = $scevgep483; + _memset(($buf|0),48,($scevgep483484|0))|0; + $s753$1425 = $s753$0; + while(1) { + $incdec$ptr773 = ((($s753$1425)) + -1|0); + $cmp770 = ($incdec$ptr773>>>0)>($buf>>>0); + if ($cmp770) { + $s753$1425 = $incdec$ptr773; + } else { + $s753$2 = $incdec$ptr773; + break; + } + } + } + } while(0); + $sub$ptr$rhs$cast788 = $s753$2; + $sub$ptr$sub789 = (($sub$ptr$lhs$cast787) - ($sub$ptr$rhs$cast788))|0; + $cmp790 = ($p$addr$5430|0)>($sub$ptr$sub789|0); + $cond800 = $cmp790 ? $sub$ptr$sub789 : $p$addr$5430; + _out_102($f,$s753$2,$cond800); + $sub806 = (($p$addr$5430) - ($sub$ptr$sub789))|0; + $incdec$ptr808 = ((($d$7429)) + 4|0); + $cmp745 = ($incdec$ptr808>>>0)<($z$7$add$ptr742>>>0); + $cmp748 = ($sub806|0)>(-1); + $75 = $cmp745 & $cmp748; + if ($75) { + $d$7429 = $incdec$ptr808;$p$addr$5430 = $sub806; + } else { + $p$addr$5$lcssa = $sub806; + break; + } + } + } else { + $p$addr$5$lcssa = $p$addr$3; + } + $add810 = (($p$addr$5$lcssa) + 18)|0; + _pad_108($f,48,$add810,18,0); + $sub$ptr$lhs$cast811 = $arrayidx; + $sub$ptr$rhs$cast812 = $estr$2; + $sub$ptr$sub813 = (($sub$ptr$lhs$cast811) - ($sub$ptr$rhs$cast812))|0; + _out_102($f,$estr$2,$sub$ptr$sub813); + } + $xor816 = $fl ^ 8192; + _pad_108($f,32,$w,$add653,$xor816); + $add653$sink402 = $add653; + } + } while(0); + $cmp818 = ($add653$sink402|0)<($w|0); + $w$add653 = $cmp818 ? $w : $add653$sink402; + STACKTOP = sp;return ($w$add653|0); +} +function ___DOUBLE_BITS($__f) { + $__f = +$__f; + var $0 = 0, $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAPF64[tempDoublePtr>>3] = $__f;$0 = HEAP32[tempDoublePtr>>2]|0; + $1 = HEAP32[tempDoublePtr+4>>2]|0; + tempRet0 = ($1); + return ($0|0); +} +function _frexpl($x,$e) { + $x = +$x; + $e = $e|0; + var $call = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $call = (+_frexp($x,$e)); + return (+$call); +} +function _frexp($x,$e) { + $x = +$x; + $e = $e|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $call = 0.0, $conv = 0, $mul = 0.0, $retval$0 = 0.0, $storemerge = 0, $sub = 0, $sub8 = 0, $tobool1 = 0, $trunc$clear = 0, $x$addr$0 = 0.0, label = 0; + var sp = 0; + sp = STACKTOP; + HEAPF64[tempDoublePtr>>3] = $x;$0 = HEAP32[tempDoublePtr>>2]|0; + $1 = HEAP32[tempDoublePtr+4>>2]|0; + $2 = (_bitshift64Lshr(($0|0),($1|0),52)|0); + $3 = tempRet0; + $4 = $2&65535; + $trunc$clear = $4 & 2047; + switch ($trunc$clear<<16>>16) { + case 0: { + $tobool1 = $x != 0.0; + if ($tobool1) { + $mul = $x * 1.8446744073709552E+19; + $call = (+_frexp($mul,$e)); + $5 = HEAP32[$e>>2]|0; + $sub = (($5) + -64)|0; + $storemerge = $sub;$x$addr$0 = $call; + } else { + $storemerge = 0;$x$addr$0 = $x; + } + HEAP32[$e>>2] = $storemerge; + $retval$0 = $x$addr$0; + break; + } + case 2047: { + $retval$0 = $x; + break; + } + default: { + $conv = $2 & 2047; + $sub8 = (($conv) + -1022)|0; + HEAP32[$e>>2] = $sub8; + $6 = $1 & -2146435073; + $7 = $6 | 1071644672; + HEAP32[tempDoublePtr>>2] = $0;HEAP32[tempDoublePtr+4>>2] = $7;$8 = +HEAPF64[tempDoublePtr>>3]; + $retval$0 = $8; + } + } + return (+$retval$0); +} +function _wcrtomb($s,$wc,$st) { + $s = $s|0; + $wc = $wc|0; + $st = $st|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $and = 0, $and32 = 0, $and36 = 0, $and49 = 0, $and54 = 0, $and58 = 0, $call = 0, $call10 = 0, $call66 = 0, $cmp = 0; + var $cmp14 = 0, $cmp21 = 0, $cmp24 = 0, $cmp41 = 0, $cmp7 = 0, $conv = 0, $conv12 = 0, $conv17 = 0, $conv19 = 0, $conv29 = 0, $conv34 = 0, $conv38 = 0, $conv46 = 0, $conv51 = 0, $conv56 = 0, $conv60 = 0, $incdec$ptr = 0, $incdec$ptr30 = 0, $incdec$ptr35 = 0, $incdec$ptr47 = 0; + var $incdec$ptr52 = 0, $incdec$ptr57 = 0, $locale = 0, $or = 0, $or$cond = 0, $or18 = 0, $or28 = 0, $or33 = 0, $or37 = 0, $or45 = 0, $or50 = 0, $or55 = 0, $or59 = 0, $retval$0 = 0, $sub40 = 0, $tobool = 0, $tobool2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $tobool = ($s|0)==(0|0); + do { + if ($tobool) { + $retval$0 = 1; + } else { + $cmp = ($wc>>>0)<(128); + if ($cmp) { + $conv = $wc&255; + HEAP8[$s>>0] = $conv; + $retval$0 = 1; + break; + } + $call = (___pthread_self_581()|0); + $locale = ((($call)) + 188|0); + $0 = HEAP32[$locale>>2]|0; + $1 = HEAP32[$0>>2]|0; + $tobool2 = ($1|0)==(0|0); + if ($tobool2) { + $2 = $wc & -128; + $cmp7 = ($2|0)==(57216); + if ($cmp7) { + $conv12 = $wc&255; + HEAP8[$s>>0] = $conv12; + $retval$0 = 1; + break; + } else { + $call10 = (___errno_location()|0); + HEAP32[$call10>>2] = 84; + $retval$0 = -1; + break; + } + } + $cmp14 = ($wc>>>0)<(2048); + if ($cmp14) { + $3 = $wc >>> 6; + $or = $3 | 192; + $conv17 = $or&255; + $incdec$ptr = ((($s)) + 1|0); + HEAP8[$s>>0] = $conv17; + $and = $wc & 63; + $or18 = $and | 128; + $conv19 = $or18&255; + HEAP8[$incdec$ptr>>0] = $conv19; + $retval$0 = 2; + break; + } + $cmp21 = ($wc>>>0)<(55296); + $4 = $wc & -8192; + $cmp24 = ($4|0)==(57344); + $or$cond = $cmp21 | $cmp24; + if ($or$cond) { + $5 = $wc >>> 12; + $or28 = $5 | 224; + $conv29 = $or28&255; + $incdec$ptr30 = ((($s)) + 1|0); + HEAP8[$s>>0] = $conv29; + $6 = $wc >>> 6; + $and32 = $6 & 63; + $or33 = $and32 | 128; + $conv34 = $or33&255; + $incdec$ptr35 = ((($s)) + 2|0); + HEAP8[$incdec$ptr30>>0] = $conv34; + $and36 = $wc & 63; + $or37 = $and36 | 128; + $conv38 = $or37&255; + HEAP8[$incdec$ptr35>>0] = $conv38; + $retval$0 = 3; + break; + } + $sub40 = (($wc) + -65536)|0; + $cmp41 = ($sub40>>>0)<(1048576); + if ($cmp41) { + $7 = $wc >>> 18; + $or45 = $7 | 240; + $conv46 = $or45&255; + $incdec$ptr47 = ((($s)) + 1|0); + HEAP8[$s>>0] = $conv46; + $8 = $wc >>> 12; + $and49 = $8 & 63; + $or50 = $and49 | 128; + $conv51 = $or50&255; + $incdec$ptr52 = ((($s)) + 2|0); + HEAP8[$incdec$ptr47>>0] = $conv51; + $9 = $wc >>> 6; + $and54 = $9 & 63; + $or55 = $and54 | 128; + $conv56 = $or55&255; + $incdec$ptr57 = ((($s)) + 3|0); + HEAP8[$incdec$ptr52>>0] = $conv56; + $and58 = $wc & 63; + $or59 = $and58 | 128; + $conv60 = $or59&255; + HEAP8[$incdec$ptr57>>0] = $conv60; + $retval$0 = 4; + break; + } else { + $call66 = (___errno_location()|0); + HEAP32[$call66>>2] = 84; + $retval$0 = -1; + break; + } + } + } while(0); + return ($retval$0|0); +} +function ___pthread_self_581() { + var $call = 0, label = 0, sp = 0; + sp = STACKTOP; + $call = (_pthread_self()|0); + return ($call|0); +} +function _pthread_self() { + var label = 0, sp = 0; + sp = STACKTOP; + return (17736|0); +} +function ___pthread_self_822() { + var $call = 0, label = 0, sp = 0; + sp = STACKTOP; + $call = (_pthread_self()|0); + return ($call|0); +} +function ___strerror_l($e,$loc) { + $e = $e|0; + $loc = $loc|0; + var $0 = 0, $1 = 0, $2 = 0, $arrayidx = 0, $arrayidx15 = 0, $call = 0, $cmp = 0, $conv = 0, $dec = 0, $i$012 = 0, $i$111 = 0, $inc = 0, $incdec$ptr = 0, $s$0$lcssa = 0, $s$010 = 0, $s$1 = 0, $tobool = 0, $tobool5 = 0, $tobool59 = 0, $tobool8 = 0; + var label = 0, sp = 0; + sp = STACKTOP; + $i$012 = 0; + while(1) { + $arrayidx = (26239 + ($i$012)|0); + $0 = HEAP8[$arrayidx>>0]|0; + $conv = $0&255; + $cmp = ($conv|0)==($e|0); + if ($cmp) { + label = 2; + break; + } + $inc = (($i$012) + 1)|0; + $tobool = ($inc|0)==(87); + if ($tobool) { + $i$111 = 87;$s$010 = 26327; + label = 5; + break; + } else { + $i$012 = $inc; + } + } + if ((label|0) == 2) { + $tobool59 = ($i$012|0)==(0); + if ($tobool59) { + $s$0$lcssa = 26327; + } else { + $i$111 = $i$012;$s$010 = 26327; + label = 5; + } + } + if ((label|0) == 5) { + while(1) { + label = 0; + $s$1 = $s$010; + while(1) { + $1 = HEAP8[$s$1>>0]|0; + $tobool8 = ($1<<24>>24)==(0); + $incdec$ptr = ((($s$1)) + 1|0); + if ($tobool8) { + break; + } else { + $s$1 = $incdec$ptr; + } + } + $dec = (($i$111) + -1)|0; + $tobool5 = ($dec|0)==(0); + if ($tobool5) { + $s$0$lcssa = $incdec$ptr; + break; + } else { + $i$111 = $dec;$s$010 = $incdec$ptr; + label = 5; + } + } + } + $arrayidx15 = ((($loc)) + 20|0); + $2 = HEAP32[$arrayidx15>>2]|0; + $call = (___lctrans($s$0$lcssa,$2)|0); + return ($call|0); +} +function ___lctrans($msg,$lm) { + $msg = $msg|0; + $lm = $lm|0; + var $call = 0, label = 0, sp = 0; + sp = STACKTOP; + $call = (___lctrans_impl($msg,$lm)|0); + return ($call|0); +} +function ___lctrans_impl($msg,$lm) { + $msg = $msg|0; + $lm = $lm|0; + var $0 = 0, $1 = 0, $call = 0, $cond = 0, $map_size = 0, $tobool = 0, $tobool1 = 0, $trans$0 = 0, label = 0, sp = 0; + sp = STACKTOP; + $tobool = ($lm|0)==(0|0); + if ($tobool) { + $trans$0 = 0; + } else { + $0 = HEAP32[$lm>>2]|0; + $map_size = ((($lm)) + 4|0); + $1 = HEAP32[$map_size>>2]|0; + $call = (___mo_lookup($0,$1,$msg)|0); + $trans$0 = $call; + } + $tobool1 = ($trans$0|0)!=(0|0); + $cond = $tobool1 ? $trans$0 : $msg; + return ($cond|0); +} +function ___mo_lookup($p,$size,$s) { + $p = $p|0; + $size = $size|0; + $s = $s|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add$ptr = 0, $add$ptr65 = 0, $add$ptr65$ = 0, $add16 = 0, $add23 = 0, $add31 = 0, $add42 = 0, $add49 = 0, $add59 = 0; + var $arrayidx = 0, $arrayidx1 = 0, $arrayidx17 = 0, $arrayidx24 = 0, $arrayidx3 = 0, $arrayidx32 = 0, $arrayidx43 = 0, $arrayidx50 = 0, $arrayidx60 = 0, $b$0 = 0, $b$1 = 0, $call = 0, $call18 = 0, $call2 = 0, $call25 = 0, $call36 = 0, $call4 = 0, $call44 = 0, $call51 = 0, $cmp = 0; + var $cmp10 = 0, $cmp26 = 0, $cmp29 = 0, $cmp52 = 0, $cmp56 = 0, $cmp6 = 0, $cmp67 = 0, $cmp71 = 0, $div = 0, $div12 = 0, $div13 = 0, $div14 = 0, $mul = 0, $mul15 = 0, $n$0 = 0, $n$1 = 0, $or = 0, $or$cond = 0, $or$cond66 = 0, $or$cond67 = 0; + var $rem = 0, $retval$4 = 0, $sub = 0, $sub28 = 0, $sub5 = 0, $sub55 = 0, $sub79 = 0, $tobool = 0, $tobool33 = 0, $tobool37 = 0, $tobool62 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$p>>2]|0; + $sub = (($0) + 1794895138)|0; + $arrayidx = ((($p)) + 8|0); + $1 = HEAP32[$arrayidx>>2]|0; + $call = (_swapc($1,$sub)|0); + $arrayidx1 = ((($p)) + 12|0); + $2 = HEAP32[$arrayidx1>>2]|0; + $call2 = (_swapc($2,$sub)|0); + $arrayidx3 = ((($p)) + 16|0); + $3 = HEAP32[$arrayidx3>>2]|0; + $call4 = (_swapc($3,$sub)|0); + $div = $size >>> 2; + $cmp = ($call>>>0)<($div>>>0); + L1: do { + if ($cmp) { + $mul = $call << 2; + $sub5 = (($size) - ($mul))|0; + $cmp6 = ($call2>>>0)<($sub5>>>0); + $cmp10 = ($call4>>>0)<($sub5>>>0); + $or$cond = $cmp6 & $cmp10; + if ($or$cond) { + $or = $call4 | $call2; + $rem = $or & 3; + $tobool = ($rem|0)==(0); + if ($tobool) { + $div12 = $call2 >>> 2; + $div13 = $call4 >>> 2; + $b$0 = 0;$n$0 = $call; + while(1) { + $div14 = $n$0 >>> 1; + $add = (($b$0) + ($div14))|0; + $mul15 = $add << 1; + $add16 = (($mul15) + ($div12))|0; + $arrayidx17 = (($p) + ($add16<<2)|0); + $4 = HEAP32[$arrayidx17>>2]|0; + $call18 = (_swapc($4,$sub)|0); + $add23 = (($add16) + 1)|0; + $arrayidx24 = (($p) + ($add23<<2)|0); + $5 = HEAP32[$arrayidx24>>2]|0; + $call25 = (_swapc($5,$sub)|0); + $cmp26 = ($call25>>>0)<($size>>>0); + $sub28 = (($size) - ($call25))|0; + $cmp29 = ($call18>>>0)<($sub28>>>0); + $or$cond66 = $cmp26 & $cmp29; + if (!($or$cond66)) { + $retval$4 = 0; + break L1; + } + $add31 = (($call25) + ($call18))|0; + $arrayidx32 = (($p) + ($add31)|0); + $6 = HEAP8[$arrayidx32>>0]|0; + $tobool33 = ($6<<24>>24)==(0); + if (!($tobool33)) { + $retval$4 = 0; + break L1; + } + $add$ptr = (($p) + ($call25)|0); + $call36 = (_strcmp($s,$add$ptr)|0); + $tobool37 = ($call36|0)==(0); + if ($tobool37) { + break; + } + $cmp67 = ($n$0|0)==(1); + $cmp71 = ($call36|0)<(0); + $sub79 = (($n$0) - ($div14))|0; + $n$1 = $cmp71 ? $div14 : $sub79; + $b$1 = $cmp71 ? $b$0 : $add; + if ($cmp67) { + $retval$4 = 0; + break L1; + } else { + $b$0 = $b$1;$n$0 = $n$1; + } + } + $add42 = (($mul15) + ($div13))|0; + $arrayidx43 = (($p) + ($add42<<2)|0); + $7 = HEAP32[$arrayidx43>>2]|0; + $call44 = (_swapc($7,$sub)|0); + $add49 = (($add42) + 1)|0; + $arrayidx50 = (($p) + ($add49<<2)|0); + $8 = HEAP32[$arrayidx50>>2]|0; + $call51 = (_swapc($8,$sub)|0); + $cmp52 = ($call51>>>0)<($size>>>0); + $sub55 = (($size) - ($call51))|0; + $cmp56 = ($call44>>>0)<($sub55>>>0); + $or$cond67 = $cmp52 & $cmp56; + if ($or$cond67) { + $add$ptr65 = (($p) + ($call51)|0); + $add59 = (($call51) + ($call44))|0; + $arrayidx60 = (($p) + ($add59)|0); + $9 = HEAP8[$arrayidx60>>0]|0; + $tobool62 = ($9<<24>>24)==(0); + $add$ptr65$ = $tobool62 ? $add$ptr65 : 0; + $retval$4 = $add$ptr65$; + } else { + $retval$4 = 0; + } + } else { + $retval$4 = 0; + } + } else { + $retval$4 = 0; + } + } else { + $retval$4 = 0; + } + } while(0); + return ($retval$4|0); +} +function _swapc($x,$c) { + $x = $x|0; + $c = $c|0; + var $or5 = 0, $tobool = 0, $x$or5 = 0, label = 0, sp = 0; + sp = STACKTOP; + $tobool = ($c|0)==(0); + $or5 = (_llvm_bswap_i32(($x|0))|0); + $x$or5 = $tobool ? $x : $or5; + return ($x$or5|0); +} +function ___fwritex($s,$l,$f) { + $s = $s|0; + $l = $l|0; + $f = $f|0; + var $$pre = 0, $$pre33 = 0, $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add$ptr = 0, $add$ptr26 = 0, $arrayidx = 0, $call = 0, $call16 = 0, $call4 = 0; + var $cmp = 0, $cmp11 = 0, $cmp17 = 0, $cmp6 = 0, $i$0 = 0, $i$1 = 0, $l$addr$0 = 0, $l$addr$1 = 0, $lbf = 0, $retval$1 = 0, $s$addr$1 = 0, $sub = 0, $sub$ptr$sub = 0, $tobool = 0, $tobool1 = 0, $tobool9 = 0, $wend = 0, $wpos = 0, $write = 0, $write15 = 0; + var label = 0, sp = 0; + sp = STACKTOP; + $wend = ((($f)) + 16|0); + $0 = HEAP32[$wend>>2]|0; + $tobool = ($0|0)==(0|0); + if ($tobool) { + $call = (___towrite($f)|0); + $tobool1 = ($call|0)==(0); + if ($tobool1) { + $$pre = HEAP32[$wend>>2]|0; + $3 = $$pre; + label = 5; + } else { + $retval$1 = 0; + } + } else { + $1 = $0; + $3 = $1; + label = 5; + } + L5: do { + if ((label|0) == 5) { + $wpos = ((($f)) + 20|0); + $2 = HEAP32[$wpos>>2]|0; + $sub$ptr$sub = (($3) - ($2))|0; + $cmp = ($sub$ptr$sub>>>0)<($l>>>0); + $4 = $2; + if ($cmp) { + $write = ((($f)) + 36|0); + $5 = HEAP32[$write>>2]|0; + $call4 = (FUNCTION_TABLE_iiii[$5 & 31]($f,$s,$l)|0); + $retval$1 = $call4; + break; + } + $lbf = ((($f)) + 75|0); + $6 = HEAP8[$lbf>>0]|0; + $cmp6 = ($6<<24>>24)>(-1); + L10: do { + if ($cmp6) { + $i$0 = $l; + while(1) { + $tobool9 = ($i$0|0)==(0); + if ($tobool9) { + $9 = $4;$i$1 = 0;$l$addr$1 = $l;$s$addr$1 = $s; + break L10; + } + $sub = (($i$0) + -1)|0; + $arrayidx = (($s) + ($sub)|0); + $7 = HEAP8[$arrayidx>>0]|0; + $cmp11 = ($7<<24>>24)==(10); + if ($cmp11) { + break; + } else { + $i$0 = $sub; + } + } + $write15 = ((($f)) + 36|0); + $8 = HEAP32[$write15>>2]|0; + $call16 = (FUNCTION_TABLE_iiii[$8 & 31]($f,$s,$i$0)|0); + $cmp17 = ($call16>>>0)<($i$0>>>0); + if ($cmp17) { + $retval$1 = $call16; + break L5; + } + $add$ptr = (($s) + ($i$0)|0); + $l$addr$0 = (($l) - ($i$0))|0; + $$pre33 = HEAP32[$wpos>>2]|0; + $9 = $$pre33;$i$1 = $i$0;$l$addr$1 = $l$addr$0;$s$addr$1 = $add$ptr; + } else { + $9 = $4;$i$1 = 0;$l$addr$1 = $l;$s$addr$1 = $s; + } + } while(0); + _memcpy(($9|0),($s$addr$1|0),($l$addr$1|0))|0; + $10 = HEAP32[$wpos>>2]|0; + $add$ptr26 = (($10) + ($l$addr$1)|0); + HEAP32[$wpos>>2] = $add$ptr26; + $add = (($i$1) + ($l$addr$1))|0; + $retval$1 = $add; + } + } while(0); + return ($retval$1|0); +} +function ___towrite($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $add$ptr = 0, $and = 0, $buf = 0, $buf_size = 0, $conv = 0, $conv3 = 0, $mode = 0, $or = 0, $or5 = 0, $rend = 0, $retval$0 = 0, $rpos = 0, $sub = 0, $tobool = 0, $wbase = 0; + var $wend = 0, $wpos = 0, label = 0, sp = 0; + sp = STACKTOP; + $mode = ((($f)) + 74|0); + $0 = HEAP8[$mode>>0]|0; + $conv = $0 << 24 >> 24; + $sub = (($conv) + 255)|0; + $or = $sub | $conv; + $conv3 = $or&255; + HEAP8[$mode>>0] = $conv3; + $1 = HEAP32[$f>>2]|0; + $and = $1 & 8; + $tobool = ($and|0)==(0); + if ($tobool) { + $rend = ((($f)) + 8|0); + HEAP32[$rend>>2] = 0; + $rpos = ((($f)) + 4|0); + HEAP32[$rpos>>2] = 0; + $buf = ((($f)) + 44|0); + $2 = HEAP32[$buf>>2]|0; + $wbase = ((($f)) + 28|0); + HEAP32[$wbase>>2] = $2; + $wpos = ((($f)) + 20|0); + HEAP32[$wpos>>2] = $2; + $3 = $2; + $buf_size = ((($f)) + 48|0); + $4 = HEAP32[$buf_size>>2]|0; + $add$ptr = (($3) + ($4)|0); + $wend = ((($f)) + 16|0); + HEAP32[$wend>>2] = $add$ptr; + $retval$0 = 0; + } else { + $or5 = $1 | 32; + HEAP32[$f>>2] = $or5; + $retval$0 = -1; + } + return ($retval$0|0); +} +function ___ofl_lock() { + var label = 0, sp = 0; + sp = STACKTOP; + ___lock((28972|0)); + return (28980|0); +} +function ___ofl_unlock() { + var label = 0, sp = 0; + sp = STACKTOP; + ___unlock((28972|0)); + return; +} +function _strlen($s) { + $s = $s|0; + var $$pn = 0, $$pre = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $and = 0, $and3 = 0, $incdec$ptr = 0, $incdec$ptr1323 = 0, $incdec$ptr7 = 0, $neg = 0, $rem = 0, $rem13 = 0, $s$addr$0$lcssa = 0, $s$addr$015 = 0, $s$addr$1$lcssa = 0, $sub = 0; + var $sub$ptr$lhs$cast15 = 0, $sub$ptr$lhs$cast15$sink = 0, $sub$ptr$sub17 = 0, $tobool = 0, $tobool1 = 0, $tobool10 = 0, $tobool1021 = 0, $tobool14 = 0, $tobool4 = 0, $w$0 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = $s; + $rem13 = $0 & 3; + $tobool14 = ($rem13|0)==(0); + L1: do { + if ($tobool14) { + $s$addr$0$lcssa = $s; + label = 4; + } else { + $5 = $0;$s$addr$015 = $s; + while(1) { + $1 = HEAP8[$s$addr$015>>0]|0; + $tobool1 = ($1<<24>>24)==(0); + if ($tobool1) { + $sub$ptr$lhs$cast15$sink = $5; + break L1; + } + $incdec$ptr = ((($s$addr$015)) + 1|0); + $2 = $incdec$ptr; + $rem = $2 & 3; + $tobool = ($rem|0)==(0); + if ($tobool) { + $s$addr$0$lcssa = $incdec$ptr; + label = 4; + break; + } else { + $5 = $2;$s$addr$015 = $incdec$ptr; + } + } + } + } while(0); + if ((label|0) == 4) { + $w$0 = $s$addr$0$lcssa; + while(1) { + $3 = HEAP32[$w$0>>2]|0; + $sub = (($3) + -16843009)|0; + $neg = $3 & -2139062144; + $and = $neg ^ -2139062144; + $and3 = $and & $sub; + $tobool4 = ($and3|0)==(0); + $incdec$ptr7 = ((($w$0)) + 4|0); + if ($tobool4) { + $w$0 = $incdec$ptr7; + } else { + break; + } + } + $4 = $3&255; + $tobool1021 = ($4<<24>>24)==(0); + if ($tobool1021) { + $s$addr$1$lcssa = $w$0; + } else { + $$pn = $w$0; + while(1) { + $incdec$ptr1323 = ((($$pn)) + 1|0); + $$pre = HEAP8[$incdec$ptr1323>>0]|0; + $tobool10 = ($$pre<<24>>24)==(0); + if ($tobool10) { + $s$addr$1$lcssa = $incdec$ptr1323; + break; + } else { + $$pn = $incdec$ptr1323; + } + } + } + $sub$ptr$lhs$cast15 = $s$addr$1$lcssa; + $sub$ptr$lhs$cast15$sink = $sub$ptr$lhs$cast15; + } + $sub$ptr$sub17 = (($sub$ptr$lhs$cast15$sink) - ($0))|0; + return ($sub$ptr$sub17|0); +} +function _fflush($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $call = 0, $call1 = 0, $call11 = 0, $call118 = 0, $call17 = 0, $call23 = 0, $call7 = 0, $cmp = 0, $cmp15 = 0, $cmp21 = 0, $cond10 = 0, $cond20 = 0, $f$addr$0 = 0, $f$addr$019 = 0; + var $f$addr$022 = 0, $lock = 0, $lock14 = 0, $next = 0, $or = 0, $phitmp = 0, $r$0$lcssa = 0, $r$021 = 0, $r$1 = 0, $retval$0 = 0, $tobool = 0, $tobool12 = 0, $tobool1220 = 0, $tobool25 = 0, $tobool5 = 0, $wbase = 0, $wpos = 0, label = 0, sp = 0; + sp = STACKTOP; + $tobool = ($f|0)==(0|0); + do { + if ($tobool) { + $1 = HEAP32[4433]|0; + $tobool5 = ($1|0)==(0|0); + if ($tobool5) { + $cond10 = 0; + } else { + $2 = HEAP32[4433]|0; + $call7 = (_fflush($2)|0); + $cond10 = $call7; + } + $call11 = (___ofl_lock()|0); + $f$addr$019 = HEAP32[$call11>>2]|0; + $tobool1220 = ($f$addr$019|0)==(0|0); + if ($tobool1220) { + $r$0$lcssa = $cond10; + } else { + $f$addr$022 = $f$addr$019;$r$021 = $cond10; + while(1) { + $lock14 = ((($f$addr$022)) + 76|0); + $3 = HEAP32[$lock14>>2]|0; + $cmp15 = ($3|0)>(-1); + if ($cmp15) { + $call17 = (___lockfile($f$addr$022)|0); + $cond20 = $call17; + } else { + $cond20 = 0; + } + $wpos = ((($f$addr$022)) + 20|0); + $4 = HEAP32[$wpos>>2]|0; + $wbase = ((($f$addr$022)) + 28|0); + $5 = HEAP32[$wbase>>2]|0; + $cmp21 = ($4>>>0)>($5>>>0); + if ($cmp21) { + $call23 = (___fflush_unlocked($f$addr$022)|0); + $or = $call23 | $r$021; + $r$1 = $or; + } else { + $r$1 = $r$021; + } + $tobool25 = ($cond20|0)==(0); + if (!($tobool25)) { + ___unlockfile($f$addr$022); + } + $next = ((($f$addr$022)) + 56|0); + $f$addr$0 = HEAP32[$next>>2]|0; + $tobool12 = ($f$addr$0|0)==(0|0); + if ($tobool12) { + $r$0$lcssa = $r$1; + break; + } else { + $f$addr$022 = $f$addr$0;$r$021 = $r$1; + } + } + } + ___ofl_unlock(); + $retval$0 = $r$0$lcssa; + } else { + $lock = ((($f)) + 76|0); + $0 = HEAP32[$lock>>2]|0; + $cmp = ($0|0)>(-1); + if (!($cmp)) { + $call118 = (___fflush_unlocked($f)|0); + $retval$0 = $call118; + break; + } + $call = (___lockfile($f)|0); + $phitmp = ($call|0)==(0); + $call1 = (___fflush_unlocked($f)|0); + if ($phitmp) { + $retval$0 = $call1; + } else { + ___unlockfile($f); + $retval$0 = $call1; + } + } + } while(0); + return ($retval$0|0); +} +function ___fflush_unlocked($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $cmp = 0, $cmp4 = 0, $rend = 0, $retval$0 = 0, $rpos = 0, $seek = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0, $tobool = 0, $wbase = 0, $wend = 0, $wpos = 0; + var $write = 0, label = 0, sp = 0; + sp = STACKTOP; + $wpos = ((($f)) + 20|0); + $0 = HEAP32[$wpos>>2]|0; + $wbase = ((($f)) + 28|0); + $1 = HEAP32[$wbase>>2]|0; + $cmp = ($0>>>0)>($1>>>0); + if ($cmp) { + $write = ((($f)) + 36|0); + $2 = HEAP32[$write>>2]|0; + (FUNCTION_TABLE_iiii[$2 & 31]($f,0,0)|0); + $3 = HEAP32[$wpos>>2]|0; + $tobool = ($3|0)==(0|0); + if ($tobool) { + $retval$0 = -1; + } else { + label = 3; + } + } else { + label = 3; + } + if ((label|0) == 3) { + $rpos = ((($f)) + 4|0); + $4 = HEAP32[$rpos>>2]|0; + $rend = ((($f)) + 8|0); + $5 = HEAP32[$rend>>2]|0; + $cmp4 = ($4>>>0)<($5>>>0); + if ($cmp4) { + $sub$ptr$lhs$cast = $4; + $sub$ptr$rhs$cast = $5; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $seek = ((($f)) + 40|0); + $6 = HEAP32[$seek>>2]|0; + (FUNCTION_TABLE_iiii[$6 & 31]($f,$sub$ptr$sub,1)|0); + } + $wend = ((($f)) + 16|0); + HEAP32[$wend>>2] = 0; + HEAP32[$wbase>>2] = 0; + HEAP32[$wpos>>2] = 0; + HEAP32[$rend>>2] = 0; + HEAP32[$rpos>>2] = 0; + $retval$0 = 0; + } + return ($retval$0|0); +} +function _printf($fmt,$varargs) { + $fmt = $fmt|0; + $varargs = $varargs|0; + var $0 = 0, $ap = 0, $call = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $ap = sp; + HEAP32[$ap>>2] = $varargs; + $0 = HEAP32[4401]|0; + $call = (_vfprintf($0,$fmt,$ap)|0); + STACKTOP = sp;return ($call|0); +} +function __Znwj($size) { + $size = $size|0; + var $$size = 0, $call = 0, $call2 = 0, $cmp = 0, $cmp1 = 0, $exception = 0, $tobool = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($size|0)==(0); + $$size = $cmp ? 1 : $size; + while(1) { + $call = (_malloc($$size)|0); + $cmp1 = ($call|0)==(0|0); + if (!($cmp1)) { + label = 6; + break; + } + $call2 = (__ZSt15get_new_handlerv()|0); + $tobool = ($call2|0)==(0|0); + if ($tobool) { + label = 5; + break; + } + FUNCTION_TABLE_v[$call2 & 0](); + } + if ((label|0) == 5) { + $exception = (___cxa_allocate_exception(4)|0); + __ZNSt9bad_allocC2Ev($exception); + ___cxa_throw(($exception|0),(72|0),(16|0)); + // unreachable; + } + else if ((label|0) == 6) { + return ($call|0); + } + return (0)|0; +} +function __ZdlPv($ptr) { + $ptr = $ptr|0; + var label = 0, sp = 0; + sp = STACKTOP; + _free($ptr); + return; +} +function __ZNKSt3__221__basic_string_commonILb1EE20__throw_length_errorEv($this) { + $this = $this|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $exception$i = 0, label = 0, sp = 0; + sp = STACKTOP; + $exception$i = (___cxa_allocate_exception(8)|0); + __THREW__ = 0; + invoke_vii(24,($exception$i|0),(28131|0)); + $0 = __THREW__; __THREW__ = 0; + $1 = $0&1; + if ($1) { + $2 = ___cxa_find_matching_catch_2()|0; + $3 = tempRet0; + ___cxa_free_exception(($exception$i|0)); + ___resumeException($2|0); + // unreachable; + } else { + HEAP32[$exception$i>>2] = (18108); + ___cxa_throw(($exception$i|0),(104|0),(19|0)); + // unreachable; + } +} +function __ZNSt3__211char_traitsIcE4copyEPcPKcj($__s1,$__s2,$__n) { + $__s1 = $__s1|0; + $__s2 = $__s2|0; + $__n = $__n|0; + var $cmp = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($__n|0)==(0); + if (!($cmp)) { + _memcpy(($__s1|0),($__s2|0),($__n|0))|0; + } + return ($__s1|0); +} +function __ZNSt3__211char_traitsIcE6assignERcRKc($__c1,$__c2) { + $__c1 = $__c1|0; + $__c2 = $__c2|0; + var $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP8[$__c2>>0]|0; + HEAP8[$__c1>>0] = $0; + return; +} +function __ZNSt3__211char_traitsIcE6lengthEPKc($__s) { + $__s = $__s|0; + var $call = 0, label = 0, sp = 0; + sp = STACKTOP; + $call = (_strlen($__s)|0); + return ($call|0); +} +function __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcj($this,$__s,$__n) { + $this = $this|0; + $__s = $__s|0; + $__n = $__n|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $__cap_$i$i = 0, $__size_$i$i = 0, $__size_$i2$i = 0, $__size_$i3$i = 0, $and$i$i = 0, $arrayidx = 0, $cmp = 0, $cond$i = 0, $cond$i19 = 0, $cond$i25 = 0, $conv$i$i = 0, $conv$i$i29 = 0, $phitmp$i = 0, $ref$tmp = 0, $sub = 0; + var $tobool$i$i = 0, $tobool$i$i28 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $ref$tmp = sp; + $__size_$i$i = ((($this)) + 11|0); + $0 = HEAP8[$__size_$i$i>>0]|0; + $tobool$i$i = ($0<<24>>24)<(0); + if ($tobool$i$i) { + $__cap_$i$i = ((($this)) + 8|0); + $1 = HEAP32[$__cap_$i$i>>2]|0; + $and$i$i = $1 & 2147483647; + $phitmp$i = (($and$i$i) + -1)|0; + $cond$i = $phitmp$i; + } else { + $cond$i = 10; + } + $cmp = ($cond$i>>>0)<($__n>>>0); + do { + if ($cmp) { + if ($tobool$i$i) { + $__size_$i3$i = ((($this)) + 4|0); + $4 = HEAP32[$__size_$i3$i>>2]|0; + $cond$i25 = $4; + } else { + $conv$i$i = $0&255; + $cond$i25 = $conv$i$i; + } + $sub = (($__n) - ($cond$i))|0; + __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEjjjjjjPKc($this,$cond$i,$sub,$cond$i25,0,$cond$i25,$__n,$__s); + } else { + if ($tobool$i$i) { + $2 = HEAP32[$this>>2]|0; + $cond$i19 = $2; + } else { + $cond$i19 = $this; + } + (__ZNSt3__211char_traitsIcE4moveEPcPKcj($cond$i19,$__s,$__n)|0); + $arrayidx = (($cond$i19) + ($__n)|0); + HEAP8[$ref$tmp>>0] = 0; + __ZNSt3__211char_traitsIcE6assignERcRKc($arrayidx,$ref$tmp); + $3 = HEAP8[$__size_$i$i>>0]|0; + $tobool$i$i28 = ($3<<24>>24)<(0); + if ($tobool$i$i28) { + $__size_$i2$i = ((($this)) + 4|0); + HEAP32[$__size_$i2$i>>2] = $__n; + break; + } else { + $conv$i$i29 = $__n&255; + HEAP8[$__size_$i$i>>0] = $conv$i$i29; + break; + } + } + } while(0); + STACKTOP = sp;return ($this|0); +} +function __ZNSt3__211char_traitsIcE4moveEPcPKcj($__s1,$__s2,$__n) { + $__s1 = $__s1|0; + $__s2 = $__s2|0; + $__n = $__n|0; + var $cmp = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($__n|0)==(0); + if (!($cmp)) { + _memmove(($__s1|0),($__s2|0),($__n|0))|0; + } + return ($__s1|0); +} +function __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEjjjjjjPKc($this,$__old_cap,$__delta_cap,$__old_sz,$__n_copy,$__n_del,$__n_add,$__p_new_stuff) { + $this = $this|0; + $__old_cap = $__old_cap|0; + $__delta_cap = $__delta_cap|0; + $__old_sz = $__old_sz|0; + $__n_copy = $__n_copy|0; + $__n_del = $__n_del|0; + $__n_add = $__n_add|0; + $__p_new_stuff = $__p_new_stuff|0; + var $$sroa$speculated = 0, $0 = 0, $1 = 0, $__cap_$i = 0, $__size_$i = 0, $__size_$i$i = 0, $add = 0, $add$i$i = 0, $add$ptr = 0, $add$ptr33 = 0, $add$ptr34 = 0, $add$ptr36 = 0, $add$ptr37 = 0, $add48 = 0, $and$i$i = 0, $arrayidx = 0, $call$i$i$i = 0, $cmp = 0, $cmp$i = 0, $cmp$i$i$i = 0; + var $cmp17 = 0, $cmp23 = 0, $cmp30 = 0, $cmp41 = 0, $cmp5 = 0, $cond$i = 0, $cond40 = 0, $mul = 0, $or$i = 0, $phitmp = 0, $ref$tmp49 = 0, $sub2 = 0, $sub28 = 0, $sub29 = 0, $tobool$i$i = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $ref$tmp49 = sp; + $sub2 = (-18 - ($__old_cap))|0; + $cmp = ($sub2>>>0)<($__delta_cap>>>0); + if ($cmp) { + __ZNKSt3__221__basic_string_commonILb1EE20__throw_length_errorEv($this); + // unreachable; + } + $__size_$i$i = ((($this)) + 11|0); + $0 = HEAP8[$__size_$i$i>>0]|0; + $tobool$i$i = ($0<<24>>24)<(0); + if ($tobool$i$i) { + $1 = HEAP32[$this>>2]|0; + $cond$i = $1; + } else { + $cond$i = $this; + } + $cmp5 = ($__old_cap>>>0)<(2147483623); + if ($cmp5) { + $add = (($__delta_cap) + ($__old_cap))|0; + $mul = $__old_cap << 1; + $cmp$i$i$i = ($add>>>0)<($mul>>>0); + $$sroa$speculated = $cmp$i$i$i ? $mul : $add; + $cmp$i = ($$sroa$speculated>>>0)<(11); + $add$i$i = (($$sroa$speculated) + 16)|0; + $and$i$i = $add$i$i & -16; + $phitmp = $cmp$i ? 11 : $and$i$i; + $cond40 = $phitmp; + } else { + $cond40 = -17; + } + $call$i$i$i = (__Znwj($cond40)|0); + $cmp17 = ($__n_copy|0)==(0); + if (!($cmp17)) { + (__ZNSt3__211char_traitsIcE4copyEPcPKcj($call$i$i$i,$cond$i,$__n_copy)|0); + } + $cmp23 = ($__n_add|0)==(0); + if (!($cmp23)) { + $add$ptr = (($call$i$i$i) + ($__n_copy)|0); + (__ZNSt3__211char_traitsIcE4copyEPcPKcj($add$ptr,$__p_new_stuff,$__n_add)|0); + } + $sub28 = (($__old_sz) - ($__n_del))|0; + $sub29 = (($sub28) - ($__n_copy))|0; + $cmp30 = ($sub29|0)==(0); + if (!($cmp30)) { + $add$ptr33 = (($call$i$i$i) + ($__n_copy)|0); + $add$ptr34 = (($add$ptr33) + ($__n_add)|0); + $add$ptr36 = (($cond$i) + ($__n_copy)|0); + $add$ptr37 = (($add$ptr36) + ($__n_del)|0); + (__ZNSt3__211char_traitsIcE4copyEPcPKcj($add$ptr34,$add$ptr37,$sub29)|0); + } + $cmp41 = ($__old_cap|0)==(10); + if (!($cmp41)) { + __ZdlPv($cond$i); + } + HEAP32[$this>>2] = $call$i$i$i; + $or$i = $cond40 | -2147483648; + $__cap_$i = ((($this)) + 8|0); + HEAP32[$__cap_$i>>2] = $or$i; + $add48 = (($sub28) + ($__n_add))|0; + $__size_$i = ((($this)) + 4|0); + HEAP32[$__size_$i>>2] = $add48; + $arrayidx = (($call$i$i$i) + ($add48)|0); + HEAP8[$ref$tmp49>>0] = 0; + __ZNSt3__211char_traitsIcE6assignERcRKc($arrayidx,$ref$tmp49); + STACKTOP = sp;return; +} +function __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc($this,$__s) { + $this = $this|0; + $__s = $__s|0; + var $call = 0, $call2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $call = (__ZNSt3__211char_traitsIcE6lengthEPKc($__s)|0); + $call2 = (__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcj($this,$__s,$call)|0); + return ($call2|0); +} +function __ZNSt3__218__libcpp_refstringC2EPKc($this,$msg) { + $this = $this|0; + $msg = $msg|0; + var $add2 = 0, $add6 = 0, $call = 0, $call3 = 0, $call5 = 0, $cap = 0, $count = 0, label = 0, sp = 0; + sp = STACKTOP; + $call = (_strlen($msg)|0); + $add2 = (($call) + 13)|0; + $call3 = (__Znwj($add2)|0); + HEAP32[$call3>>2] = $call; + $cap = ((($call3)) + 4|0); + HEAP32[$cap>>2] = $call; + $count = ((($call3)) + 8|0); + HEAP32[$count>>2] = 0; + $call5 = (__ZNSt3__215__refstring_imp12_GLOBAL__N_113data_from_repEPNS1_9_Rep_baseE($call3)|0); + $add6 = (($call) + 1)|0; + _memcpy(($call5|0),($msg|0),($add6|0))|0; + HEAP32[$this>>2] = $call5; + return; +} +function __ZNSt3__215__refstring_imp12_GLOBAL__N_113data_from_repEPNS1_9_Rep_baseE($rep) { + $rep = $rep|0; + var $add$ptr2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $add$ptr2 = ((($rep)) + 12|0); + return ($add$ptr2|0); +} +function __ZNSt11logic_errorC2EPKc($this,$msg) { + $this = $this|0; + $msg = $msg|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $__imp_ = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAP32[$this>>2] = (18088); + $__imp_ = ((($this)) + 4|0); + __THREW__ = 0; + invoke_vii(25,($__imp_|0),($msg|0)); + $0 = __THREW__; __THREW__ = 0; + $1 = $0&1; + if ($1) { + $2 = ___cxa_find_matching_catch_2()|0; + $3 = tempRet0; + ___resumeException($2|0); + // unreachable; + } else { + return; + } +} +function __ZNKSt3__218__libcpp_refstring15__uses_refcountEv($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + return 1; +} +function __ZN10__cxxabiv116__shim_type_infoD2Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function __ZN10__cxxabiv117__class_type_infoD0Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + __ZN10__cxxabiv116__shim_type_infoD2Ev($this); + __ZdlPv($this); + return; +} +function __ZNK10__cxxabiv116__shim_type_info5noop1Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function __ZNK10__cxxabiv116__shim_type_info5noop2Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function __ZNK10__cxxabiv117__class_type_info9can_catchEPKNS_16__shim_type_infoERPv($this,$thrown_type,$adjustedPtr) { + $this = $this|0; + $thrown_type = $thrown_type|0; + $adjustedPtr = $adjustedPtr|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $call = 0, $cmp = 0, $cmp4 = 0, $dst_ptr_leading_to_static_ptr = 0, $info = 0, $number_of_dst_type = 0, $path_dst_ptr_to_static_ptr = 0, $retval$0 = 0, $retval$2 = 0, $src2dst_offset = 0, $static_type = 0, $vfn = 0, $vtable = 0; + var dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $info = sp; + $call = (__ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($this,$thrown_type,0)|0); + if ($call) { + $retval$2 = 1; + } else { + $0 = ($thrown_type|0)==(0|0); + if ($0) { + $retval$2 = 0; + } else { + $1 = (___dynamic_cast($thrown_type,32,16,0)|0); + $cmp = ($1|0)==(0|0); + if ($cmp) { + $retval$2 = 0; + } else { + $2 = ((($info)) + 4|0); + dest=$2; stop=dest+52|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$info>>2] = $1; + $static_type = ((($info)) + 8|0); + HEAP32[$static_type>>2] = $this; + $src2dst_offset = ((($info)) + 12|0); + HEAP32[$src2dst_offset>>2] = -1; + $number_of_dst_type = ((($info)) + 48|0); + HEAP32[$number_of_dst_type>>2] = 1; + $vtable = HEAP32[$1>>2]|0; + $vfn = ((($vtable)) + 28|0); + $3 = HEAP32[$vfn>>2]|0; + $4 = HEAP32[$adjustedPtr>>2]|0; + FUNCTION_TABLE_viiii[$3 & 15]($1,$info,$4,1); + $path_dst_ptr_to_static_ptr = ((($info)) + 24|0); + $5 = HEAP32[$path_dst_ptr_to_static_ptr>>2]|0; + $cmp4 = ($5|0)==(1); + if ($cmp4) { + $dst_ptr_leading_to_static_ptr = ((($info)) + 16|0); + $6 = HEAP32[$dst_ptr_leading_to_static_ptr>>2]|0; + HEAP32[$adjustedPtr>>2] = $6; + $retval$0 = 1; + } else { + $retval$0 = 0; + } + $retval$2 = $retval$0; + } + } + } + STACKTOP = sp;return ($retval$2|0); +} +function __ZNK10__cxxabiv117__class_type_info16search_above_dstEPNS_19__dynamic_cast_infoEPKvS4_ib($this,$info,$dst_ptr,$current_ptr,$path_below,$use_strcmp) { + $this = $this|0; + $info = $info|0; + $dst_ptr = $dst_ptr|0; + $current_ptr = $current_ptr|0; + $path_below = $path_below|0; + $use_strcmp = $use_strcmp|0; + var $0 = 0, $call = 0, $static_type = 0, label = 0, sp = 0; + sp = STACKTOP; + $static_type = ((($info)) + 8|0); + $0 = HEAP32[$static_type>>2]|0; + $call = (__ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($this,$0,$use_strcmp)|0); + if ($call) { + __ZNK10__cxxabiv117__class_type_info29process_static_type_above_dstEPNS_19__dynamic_cast_infoEPKvS4_i(0,$info,$dst_ptr,$current_ptr,$path_below); + } + return; +} +function __ZNK10__cxxabiv117__class_type_info16search_below_dstEPNS_19__dynamic_cast_infoEPKvib($this,$info,$current_ptr,$path_below,$use_strcmp) { + $this = $this|0; + $info = $info|0; + $current_ptr = $current_ptr|0; + $path_below = $path_below|0; + $use_strcmp = $use_strcmp|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $add = 0, $call = 0, $call3 = 0, $cmp = 0, $cmp12 = 0, $cmp13 = 0, $cmp5 = 0, $cmp7 = 0, $dst_ptr_leading_to_static_ptr = 0, $dst_ptr_not_leading_to_static_ptr = 0, $is_dst_type_derived_from_static_type = 0, $number_to_dst_ptr = 0, $number_to_static_ptr = 0; + var $path_dst_ptr_to_static_ptr = 0, $path_dynamic_ptr_to_dst_ptr = 0, $path_dynamic_ptr_to_dst_ptr10 = 0, $search_done = 0, $static_type = 0, label = 0, sp = 0; + sp = STACKTOP; + $static_type = ((($info)) + 8|0); + $0 = HEAP32[$static_type>>2]|0; + $call = (__ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($this,$0,$use_strcmp)|0); + do { + if ($call) { + __ZNK10__cxxabiv117__class_type_info29process_static_type_below_dstEPNS_19__dynamic_cast_infoEPKvi(0,$info,$current_ptr,$path_below); + } else { + $1 = HEAP32[$info>>2]|0; + $call3 = (__ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($this,$1,$use_strcmp)|0); + if ($call3) { + $dst_ptr_leading_to_static_ptr = ((($info)) + 16|0); + $2 = HEAP32[$dst_ptr_leading_to_static_ptr>>2]|0; + $cmp = ($2|0)==($current_ptr|0); + if (!($cmp)) { + $dst_ptr_not_leading_to_static_ptr = ((($info)) + 20|0); + $3 = HEAP32[$dst_ptr_not_leading_to_static_ptr>>2]|0; + $cmp5 = ($3|0)==($current_ptr|0); + if (!($cmp5)) { + $path_dynamic_ptr_to_dst_ptr10 = ((($info)) + 32|0); + HEAP32[$path_dynamic_ptr_to_dst_ptr10>>2] = $path_below; + HEAP32[$dst_ptr_not_leading_to_static_ptr>>2] = $current_ptr; + $number_to_dst_ptr = ((($info)) + 40|0); + $4 = HEAP32[$number_to_dst_ptr>>2]|0; + $add = (($4) + 1)|0; + HEAP32[$number_to_dst_ptr>>2] = $add; + $number_to_static_ptr = ((($info)) + 36|0); + $5 = HEAP32[$number_to_static_ptr>>2]|0; + $cmp12 = ($5|0)==(1); + if ($cmp12) { + $path_dst_ptr_to_static_ptr = ((($info)) + 24|0); + $6 = HEAP32[$path_dst_ptr_to_static_ptr>>2]|0; + $cmp13 = ($6|0)==(2); + if ($cmp13) { + $search_done = ((($info)) + 54|0); + HEAP8[$search_done>>0] = 1; + } + } + $is_dst_type_derived_from_static_type = ((($info)) + 44|0); + HEAP32[$is_dst_type_derived_from_static_type>>2] = 4; + break; + } + } + $cmp7 = ($path_below|0)==(1); + if ($cmp7) { + $path_dynamic_ptr_to_dst_ptr = ((($info)) + 32|0); + HEAP32[$path_dynamic_ptr_to_dst_ptr>>2] = 1; + } + } + } + } while(0); + return; +} +function __ZNK10__cxxabiv117__class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi($this,$info,$adjustedPtr,$path_below) { + $this = $this|0; + $info = $info|0; + $adjustedPtr = $adjustedPtr|0; + $path_below = $path_below|0; + var $0 = 0, $call = 0, $static_type = 0, label = 0, sp = 0; + sp = STACKTOP; + $static_type = ((($info)) + 8|0); + $0 = HEAP32[$static_type>>2]|0; + $call = (__ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($this,$0,0)|0); + if ($call) { + __ZNK10__cxxabiv117__class_type_info24process_found_base_classEPNS_19__dynamic_cast_infoEPvi(0,$info,$adjustedPtr,$path_below); + } + return; +} +function __ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($x,$y,$0) { + $x = $x|0; + $y = $y|0; + $0 = $0|0; + var $cmp = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($x|0)==($y|0); + return ($cmp|0); +} +function __ZNK10__cxxabiv117__class_type_info24process_found_base_classEPNS_19__dynamic_cast_infoEPvi($this,$info,$adjustedPtr,$path_below) { + $this = $this|0; + $info = $info|0; + $adjustedPtr = $adjustedPtr|0; + $path_below = $path_below|0; + var $0 = 0, $1 = 0, $2 = 0, $add = 0, $cmp = 0, $cmp4 = 0, $cmp7 = 0, $dst_ptr_leading_to_static_ptr = 0, $number_to_static_ptr = 0, $number_to_static_ptr11 = 0, $path_dst_ptr_to_static_ptr = 0, $path_dst_ptr_to_static_ptr12 = 0, $path_dst_ptr_to_static_ptr6 = 0, $search_done = 0, label = 0, sp = 0; + sp = STACKTOP; + $dst_ptr_leading_to_static_ptr = ((($info)) + 16|0); + $0 = HEAP32[$dst_ptr_leading_to_static_ptr>>2]|0; + $cmp = ($0|0)==(0|0); + do { + if ($cmp) { + HEAP32[$dst_ptr_leading_to_static_ptr>>2] = $adjustedPtr; + $path_dst_ptr_to_static_ptr = ((($info)) + 24|0); + HEAP32[$path_dst_ptr_to_static_ptr>>2] = $path_below; + $number_to_static_ptr = ((($info)) + 36|0); + HEAP32[$number_to_static_ptr>>2] = 1; + } else { + $cmp4 = ($0|0)==($adjustedPtr|0); + if (!($cmp4)) { + $number_to_static_ptr11 = ((($info)) + 36|0); + $2 = HEAP32[$number_to_static_ptr11>>2]|0; + $add = (($2) + 1)|0; + HEAP32[$number_to_static_ptr11>>2] = $add; + $path_dst_ptr_to_static_ptr12 = ((($info)) + 24|0); + HEAP32[$path_dst_ptr_to_static_ptr12>>2] = 2; + $search_done = ((($info)) + 54|0); + HEAP8[$search_done>>0] = 1; + break; + } + $path_dst_ptr_to_static_ptr6 = ((($info)) + 24|0); + $1 = HEAP32[$path_dst_ptr_to_static_ptr6>>2]|0; + $cmp7 = ($1|0)==(2); + if ($cmp7) { + HEAP32[$path_dst_ptr_to_static_ptr6>>2] = $path_below; + } + } + } while(0); + return; +} +function __ZNK10__cxxabiv117__class_type_info29process_static_type_below_dstEPNS_19__dynamic_cast_infoEPKvi($this,$info,$current_ptr,$path_below) { + $this = $this|0; + $info = $info|0; + $current_ptr = $current_ptr|0; + $path_below = $path_below|0; + var $0 = 0, $1 = 0, $cmp = 0, $cmp2 = 0, $path_dynamic_ptr_to_static_ptr = 0, $static_ptr = 0, label = 0, sp = 0; + sp = STACKTOP; + $static_ptr = ((($info)) + 4|0); + $0 = HEAP32[$static_ptr>>2]|0; + $cmp = ($0|0)==($current_ptr|0); + if ($cmp) { + $path_dynamic_ptr_to_static_ptr = ((($info)) + 28|0); + $1 = HEAP32[$path_dynamic_ptr_to_static_ptr>>2]|0; + $cmp2 = ($1|0)==(1); + if (!($cmp2)) { + HEAP32[$path_dynamic_ptr_to_static_ptr>>2] = $path_below; + } + } + return; +} +function __ZNK10__cxxabiv117__class_type_info29process_static_type_above_dstEPNS_19__dynamic_cast_infoEPKvS4_i($this,$info,$dst_ptr,$current_ptr,$path_below) { + $this = $this|0; + $info = $info|0; + $dst_ptr = $dst_ptr|0; + $current_ptr = $current_ptr|0; + $path_below = $path_below|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $add = 0, $cmp = 0, $cmp10 = 0, $cmp13 = 0, $cmp18 = 0, $cmp2 = 0, $cmp21 = 0, $cmp5 = 0, $cmp7 = 0, $dst_ptr_leading_to_static_ptr = 0, $found_any_static_type = 0, $found_our_static_ptr = 0, $number_of_dst_type = 0; + var $number_of_dst_type17 = 0, $number_to_static_ptr = 0, $number_to_static_ptr26 = 0, $or$cond = 0, $or$cond19 = 0, $path_dst_ptr_to_static_ptr = 0, $path_dst_ptr_to_static_ptr12 = 0, $search_done = 0, $search_done23 = 0, $search_done27 = 0, $static_ptr = 0, label = 0, sp = 0; + sp = STACKTOP; + $found_any_static_type = ((($info)) + 53|0); + HEAP8[$found_any_static_type>>0] = 1; + $static_ptr = ((($info)) + 4|0); + $0 = HEAP32[$static_ptr>>2]|0; + $cmp = ($0|0)==($current_ptr|0); + do { + if ($cmp) { + $found_our_static_ptr = ((($info)) + 52|0); + HEAP8[$found_our_static_ptr>>0] = 1; + $dst_ptr_leading_to_static_ptr = ((($info)) + 16|0); + $1 = HEAP32[$dst_ptr_leading_to_static_ptr>>2]|0; + $cmp2 = ($1|0)==(0|0); + if ($cmp2) { + HEAP32[$dst_ptr_leading_to_static_ptr>>2] = $dst_ptr; + $path_dst_ptr_to_static_ptr = ((($info)) + 24|0); + HEAP32[$path_dst_ptr_to_static_ptr>>2] = $path_below; + $number_to_static_ptr = ((($info)) + 36|0); + HEAP32[$number_to_static_ptr>>2] = 1; + $number_of_dst_type = ((($info)) + 48|0); + $2 = HEAP32[$number_of_dst_type>>2]|0; + $cmp5 = ($2|0)==(1); + $cmp7 = ($path_below|0)==(1); + $or$cond = $cmp5 & $cmp7; + if (!($or$cond)) { + break; + } + $search_done = ((($info)) + 54|0); + HEAP8[$search_done>>0] = 1; + break; + } + $cmp10 = ($1|0)==($dst_ptr|0); + if (!($cmp10)) { + $number_to_static_ptr26 = ((($info)) + 36|0); + $6 = HEAP32[$number_to_static_ptr26>>2]|0; + $add = (($6) + 1)|0; + HEAP32[$number_to_static_ptr26>>2] = $add; + $search_done27 = ((($info)) + 54|0); + HEAP8[$search_done27>>0] = 1; + break; + } + $path_dst_ptr_to_static_ptr12 = ((($info)) + 24|0); + $3 = HEAP32[$path_dst_ptr_to_static_ptr12>>2]|0; + $cmp13 = ($3|0)==(2); + if ($cmp13) { + HEAP32[$path_dst_ptr_to_static_ptr12>>2] = $path_below; + $5 = $path_below; + } else { + $5 = $3; + } + $number_of_dst_type17 = ((($info)) + 48|0); + $4 = HEAP32[$number_of_dst_type17>>2]|0; + $cmp18 = ($4|0)==(1); + $cmp21 = ($5|0)==(1); + $or$cond19 = $cmp18 & $cmp21; + if ($or$cond19) { + $search_done23 = ((($info)) + 54|0); + HEAP8[$search_done23>>0] = 1; + } + } + } while(0); + return; +} +function ___dynamic_cast($static_ptr,$static_type,$dst_type,$src2dst_offset) { + $static_ptr = $static_ptr|0; + $static_type = $static_type|0; + $dst_type = $dst_type|0; + $src2dst_offset = $src2dst_offset|0; + var $$ = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add$ptr = 0, $add$ptr$ = 0, $arrayidx = 0; + var $arrayidx1 = 0, $call = 0, $cmp = 0, $cmp14 = 0, $cmp16 = 0, $cmp19 = 0, $cmp25 = 0, $cmp27 = 0, $cmp30 = 0, $cmp33 = 0, $dst_ptr$0 = 0, $dst_ptr_leading_to_static_ptr = 0, $dst_ptr_not_leading_to_static_ptr = 0, $info = 0, $number_of_dst_type = 0, $number_to_dst_ptr = 0, $number_to_static_ptr = 0, $or$cond = 0, $or$cond15 = 0, $or$cond16 = 0; + var $or$cond17 = 0, $path_dst_ptr_to_static_ptr = 0, $path_dynamic_ptr_to_dst_ptr = 0, $path_dynamic_ptr_to_static_ptr = 0, $src2dst_offset5 = 0, $static_ptr3 = 0, $static_type4 = 0, $vfn = 0, $vfn11 = 0, $vtable10 = 0, $vtable7 = 0, dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $info = sp; + $0 = HEAP32[$static_ptr>>2]|0; + $arrayidx = ((($0)) + -8|0); + $1 = HEAP32[$arrayidx>>2]|0; + $add$ptr = (($static_ptr) + ($1)|0); + $arrayidx1 = ((($0)) + -4|0); + $2 = HEAP32[$arrayidx1>>2]|0; + HEAP32[$info>>2] = $dst_type; + $static_ptr3 = ((($info)) + 4|0); + HEAP32[$static_ptr3>>2] = $static_ptr; + $static_type4 = ((($info)) + 8|0); + HEAP32[$static_type4>>2] = $static_type; + $src2dst_offset5 = ((($info)) + 12|0); + HEAP32[$src2dst_offset5>>2] = $src2dst_offset; + $dst_ptr_leading_to_static_ptr = ((($info)) + 16|0); + $dst_ptr_not_leading_to_static_ptr = ((($info)) + 20|0); + $path_dst_ptr_to_static_ptr = ((($info)) + 24|0); + $path_dynamic_ptr_to_static_ptr = ((($info)) + 28|0); + $path_dynamic_ptr_to_dst_ptr = ((($info)) + 32|0); + $number_to_dst_ptr = ((($info)) + 40|0); + dest=$dst_ptr_leading_to_static_ptr; stop=dest+36|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0));HEAP16[$dst_ptr_leading_to_static_ptr+36>>1]=0|0;HEAP8[$dst_ptr_leading_to_static_ptr+38>>0]=0|0; + $call = (__ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($2,$dst_type,0)|0); + L1: do { + if ($call) { + $number_of_dst_type = ((($info)) + 48|0); + HEAP32[$number_of_dst_type>>2] = 1; + $vtable7 = HEAP32[$2>>2]|0; + $vfn = ((($vtable7)) + 20|0); + $3 = HEAP32[$vfn>>2]|0; + FUNCTION_TABLE_viiiiii[$3 & 15]($2,$info,$add$ptr,$add$ptr,1,0); + $4 = HEAP32[$path_dst_ptr_to_static_ptr>>2]|0; + $cmp = ($4|0)==(1); + $add$ptr$ = $cmp ? $add$ptr : 0; + $dst_ptr$0 = $add$ptr$; + } else { + $number_to_static_ptr = ((($info)) + 36|0); + $vtable10 = HEAP32[$2>>2]|0; + $vfn11 = ((($vtable10)) + 24|0); + $5 = HEAP32[$vfn11>>2]|0; + FUNCTION_TABLE_viiiii[$5 & 15]($2,$info,$add$ptr,1,0); + $6 = HEAP32[$number_to_static_ptr>>2]|0; + switch ($6|0) { + case 0: { + $7 = HEAP32[$number_to_dst_ptr>>2]|0; + $cmp14 = ($7|0)==(1); + $8 = HEAP32[$path_dynamic_ptr_to_static_ptr>>2]|0; + $cmp16 = ($8|0)==(1); + $or$cond = $cmp14 & $cmp16; + $9 = HEAP32[$path_dynamic_ptr_to_dst_ptr>>2]|0; + $cmp19 = ($9|0)==(1); + $or$cond15 = $or$cond & $cmp19; + $10 = HEAP32[$dst_ptr_not_leading_to_static_ptr>>2]|0; + $$ = $or$cond15 ? $10 : 0; + $dst_ptr$0 = $$; + break L1; + break; + } + case 1: { + break; + } + default: { + $dst_ptr$0 = 0; + break L1; + } + } + $11 = HEAP32[$path_dst_ptr_to_static_ptr>>2]|0; + $cmp25 = ($11|0)==(1); + if (!($cmp25)) { + $12 = HEAP32[$number_to_dst_ptr>>2]|0; + $cmp27 = ($12|0)==(0); + $13 = HEAP32[$path_dynamic_ptr_to_static_ptr>>2]|0; + $cmp30 = ($13|0)==(1); + $or$cond16 = $cmp27 & $cmp30; + $14 = HEAP32[$path_dynamic_ptr_to_dst_ptr>>2]|0; + $cmp33 = ($14|0)==(1); + $or$cond17 = $or$cond16 & $cmp33; + if (!($or$cond17)) { + $dst_ptr$0 = 0; + break; + } + } + $15 = HEAP32[$dst_ptr_leading_to_static_ptr>>2]|0; + $dst_ptr$0 = $15; + } + } while(0); + STACKTOP = sp;return ($dst_ptr$0|0); +} +function __ZN10__cxxabiv120__si_class_type_infoD0Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + __ZN10__cxxabiv116__shim_type_infoD2Ev($this); + __ZdlPv($this); + return; +} +function __ZNK10__cxxabiv120__si_class_type_info16search_above_dstEPNS_19__dynamic_cast_infoEPKvS4_ib($this,$info,$dst_ptr,$current_ptr,$path_below,$use_strcmp) { + $this = $this|0; + $info = $info|0; + $dst_ptr = $dst_ptr|0; + $current_ptr = $current_ptr|0; + $path_below = $path_below|0; + $use_strcmp = $use_strcmp|0; + var $0 = 0, $1 = 0, $2 = 0, $__base_type = 0, $call = 0, $static_type = 0, $vfn = 0, $vtable = 0, label = 0, sp = 0; + sp = STACKTOP; + $static_type = ((($info)) + 8|0); + $0 = HEAP32[$static_type>>2]|0; + $call = (__ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($this,$0,$use_strcmp)|0); + if ($call) { + __ZNK10__cxxabiv117__class_type_info29process_static_type_above_dstEPNS_19__dynamic_cast_infoEPKvS4_i(0,$info,$dst_ptr,$current_ptr,$path_below); + } else { + $__base_type = ((($this)) + 8|0); + $1 = HEAP32[$__base_type>>2]|0; + $vtable = HEAP32[$1>>2]|0; + $vfn = ((($vtable)) + 20|0); + $2 = HEAP32[$vfn>>2]|0; + FUNCTION_TABLE_viiiiii[$2 & 15]($1,$info,$dst_ptr,$current_ptr,$path_below,$use_strcmp); + } + return; +} +function __ZNK10__cxxabiv120__si_class_type_info16search_below_dstEPNS_19__dynamic_cast_infoEPKvib($this,$info,$current_ptr,$path_below,$use_strcmp) { + $this = $this|0; + $info = $info|0; + $current_ptr = $current_ptr|0; + $path_below = $path_below|0; + $use_strcmp = $use_strcmp|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $__base_type = 0, $__base_type40 = 0, $add = 0, $call = 0, $call3 = 0, $cmp = 0; + var $cmp11 = 0, $cmp26 = 0, $cmp27 = 0, $cmp5 = 0, $cmp7 = 0, $dst_ptr_leading_to_static_ptr = 0, $dst_ptr_not_leading_to_static_ptr = 0, $found_any_static_type = 0, $found_our_static_ptr = 0, $is_dst_type_derived_from_static_type = 0, $is_dst_type_derived_from_static_type13$0$off032 = 0, $is_dst_type_derived_from_static_type13$0$off033 = 0, $number_to_dst_ptr = 0, $number_to_static_ptr = 0, $path_dst_ptr_to_static_ptr = 0, $path_dynamic_ptr_to_dst_ptr = 0, $path_dynamic_ptr_to_dst_ptr10 = 0, $search_done = 0, $static_type = 0, $tobool16 = 0; + var $tobool19 = 0, $vfn = 0, $vfn42 = 0, $vtable = 0, $vtable41 = 0, label = 0, sp = 0; + sp = STACKTOP; + $static_type = ((($info)) + 8|0); + $0 = HEAP32[$static_type>>2]|0; + $call = (__ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($this,$0,$use_strcmp)|0); + do { + if ($call) { + __ZNK10__cxxabiv117__class_type_info29process_static_type_below_dstEPNS_19__dynamic_cast_infoEPKvi(0,$info,$current_ptr,$path_below); + } else { + $1 = HEAP32[$info>>2]|0; + $call3 = (__ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($this,$1,$use_strcmp)|0); + if (!($call3)) { + $__base_type40 = ((($this)) + 8|0); + $12 = HEAP32[$__base_type40>>2]|0; + $vtable41 = HEAP32[$12>>2]|0; + $vfn42 = ((($vtable41)) + 24|0); + $13 = HEAP32[$vfn42>>2]|0; + FUNCTION_TABLE_viiiii[$13 & 15]($12,$info,$current_ptr,$path_below,$use_strcmp); + break; + } + $dst_ptr_leading_to_static_ptr = ((($info)) + 16|0); + $2 = HEAP32[$dst_ptr_leading_to_static_ptr>>2]|0; + $cmp = ($2|0)==($current_ptr|0); + if (!($cmp)) { + $dst_ptr_not_leading_to_static_ptr = ((($info)) + 20|0); + $3 = HEAP32[$dst_ptr_not_leading_to_static_ptr>>2]|0; + $cmp5 = ($3|0)==($current_ptr|0); + if (!($cmp5)) { + $path_dynamic_ptr_to_dst_ptr10 = ((($info)) + 32|0); + HEAP32[$path_dynamic_ptr_to_dst_ptr10>>2] = $path_below; + $is_dst_type_derived_from_static_type = ((($info)) + 44|0); + $4 = HEAP32[$is_dst_type_derived_from_static_type>>2]|0; + $cmp11 = ($4|0)==(4); + if ($cmp11) { + break; + } + $found_our_static_ptr = ((($info)) + 52|0); + HEAP8[$found_our_static_ptr>>0] = 0; + $found_any_static_type = ((($info)) + 53|0); + HEAP8[$found_any_static_type>>0] = 0; + $__base_type = ((($this)) + 8|0); + $5 = HEAP32[$__base_type>>2]|0; + $vtable = HEAP32[$5>>2]|0; + $vfn = ((($vtable)) + 20|0); + $6 = HEAP32[$vfn>>2]|0; + FUNCTION_TABLE_viiiiii[$6 & 15]($5,$info,$current_ptr,$current_ptr,1,$use_strcmp); + $7 = HEAP8[$found_any_static_type>>0]|0; + $tobool16 = ($7<<24>>24)==(0); + if ($tobool16) { + $is_dst_type_derived_from_static_type13$0$off032 = 4; + label = 11; + } else { + $8 = HEAP8[$found_our_static_ptr>>0]|0; + $tobool19 = ($8<<24>>24)==(0); + if ($tobool19) { + $is_dst_type_derived_from_static_type13$0$off032 = 3; + label = 11; + } else { + $is_dst_type_derived_from_static_type13$0$off033 = 3; + } + } + if ((label|0) == 11) { + HEAP32[$dst_ptr_not_leading_to_static_ptr>>2] = $current_ptr; + $number_to_dst_ptr = ((($info)) + 40|0); + $9 = HEAP32[$number_to_dst_ptr>>2]|0; + $add = (($9) + 1)|0; + HEAP32[$number_to_dst_ptr>>2] = $add; + $number_to_static_ptr = ((($info)) + 36|0); + $10 = HEAP32[$number_to_static_ptr>>2]|0; + $cmp26 = ($10|0)==(1); + if ($cmp26) { + $path_dst_ptr_to_static_ptr = ((($info)) + 24|0); + $11 = HEAP32[$path_dst_ptr_to_static_ptr>>2]|0; + $cmp27 = ($11|0)==(2); + if ($cmp27) { + $search_done = ((($info)) + 54|0); + HEAP8[$search_done>>0] = 1; + $is_dst_type_derived_from_static_type13$0$off033 = $is_dst_type_derived_from_static_type13$0$off032; + } else { + $is_dst_type_derived_from_static_type13$0$off033 = $is_dst_type_derived_from_static_type13$0$off032; + } + } else { + $is_dst_type_derived_from_static_type13$0$off033 = $is_dst_type_derived_from_static_type13$0$off032; + } + } + HEAP32[$is_dst_type_derived_from_static_type>>2] = $is_dst_type_derived_from_static_type13$0$off033; + break; + } + } + $cmp7 = ($path_below|0)==(1); + if ($cmp7) { + $path_dynamic_ptr_to_dst_ptr = ((($info)) + 32|0); + HEAP32[$path_dynamic_ptr_to_dst_ptr>>2] = 1; + } + } + } while(0); + return; +} +function __ZNK10__cxxabiv120__si_class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi($this,$info,$adjustedPtr,$path_below) { + $this = $this|0; + $info = $info|0; + $adjustedPtr = $adjustedPtr|0; + $path_below = $path_below|0; + var $0 = 0, $1 = 0, $2 = 0, $__base_type = 0, $call = 0, $static_type = 0, $vfn = 0, $vtable = 0, label = 0, sp = 0; + sp = STACKTOP; + $static_type = ((($info)) + 8|0); + $0 = HEAP32[$static_type>>2]|0; + $call = (__ZN10__cxxabiv18is_equalEPKSt9type_infoS2_b($this,$0,0)|0); + if ($call) { + __ZNK10__cxxabiv117__class_type_info24process_found_base_classEPNS_19__dynamic_cast_infoEPvi(0,$info,$adjustedPtr,$path_below); + } else { + $__base_type = ((($this)) + 8|0); + $1 = HEAP32[$__base_type>>2]|0; + $vtable = HEAP32[$1>>2]|0; + $vfn = ((($vtable)) + 28|0); + $2 = HEAP32[$vfn>>2]|0; + FUNCTION_TABLE_viiii[$2 & 15]($1,$info,$adjustedPtr,$path_below); + } + return; +} +function __ZNSt9type_infoD2Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function __ZNSt9bad_allocD2Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function __ZNSt9bad_allocD0Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + __ZNSt9bad_allocD2Ev($this); + __ZdlPv($this); + return; +} +function __ZNKSt9bad_alloc4whatEv($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + return (28274|0); +} +function __ZNSt9exceptionD2Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function __ZNSt11logic_errorD2Ev($this) { + $this = $this|0; + var $__imp_ = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAP32[$this>>2] = (18088); + $__imp_ = ((($this)) + 4|0); + __ZNSt3__218__libcpp_refstringD2Ev($__imp_); + return; +} +function __ZNSt11logic_errorD0Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + __ZNSt11logic_errorD2Ev($this); + __ZdlPv($this); + return; +} +function __ZNKSt11logic_error4whatEv($this) { + $this = $this|0; + var $__imp_ = 0, $call = 0, label = 0, sp = 0; + sp = STACKTOP; + $__imp_ = ((($this)) + 4|0); + $call = (__ZNKSt3__218__libcpp_refstring5c_strEv($__imp_)|0); + return ($call|0); +} +function __ZNKSt3__218__libcpp_refstring5c_strEv($this) { + $this = $this|0; + var $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$this>>2]|0; + return ($0|0); +} +function __ZNSt3__218__libcpp_refstringD2Ev($this) { + $this = $this|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $call = 0, $call2 = 0, $cmp = 0, $count = 0, label = 0, sp = 0; + sp = STACKTOP; + $call = (__ZNKSt3__218__libcpp_refstring15__uses_refcountEv($this)|0); + if ($call) { + $0 = HEAP32[$this>>2]|0; + $call2 = (__ZNSt3__215__refstring_imp12_GLOBAL__N_113rep_from_dataEPKc_629($0)|0); + $count = ((($call2)) + 8|0); + $1 = HEAP32[$count>>2]|0; + $2 = (($1) + -1)|0; + HEAP32[$count>>2] = $2; + $3 = (($1) + -1)|0; + $cmp = ($3|0)<(0); + if ($cmp) { + __ZdlPv($call2); + } + } + return; +} +function __ZNSt3__215__refstring_imp12_GLOBAL__N_113rep_from_dataEPKc_629($data_) { + $data_ = $data_|0; + var $add$ptr = 0, label = 0, sp = 0; + sp = STACKTOP; + $add$ptr = ((($data_)) + -12|0); + return ($add$ptr|0); +} +function __ZNSt12length_errorD0Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + __ZNSt11logic_errorD2Ev($this); + __ZdlPv($this); + return; +} +function __ZNSt9bad_allocC2Ev($this) { + $this = $this|0; + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[$this>>2] = (18068); + return; +} +function __ZSt15get_new_handlerv() { + var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[7246]|0; + $1 = (($0) + 0)|0; + HEAP32[7246] = $1; + $2 = $0; + return ($2|0); +} +function ___cxa_can_catch($catchType,$excpType,$thrown) { + $catchType = $catchType|0; + $excpType = $excpType|0; + $thrown = $thrown|0; + var $0 = 0, $1 = 0, $2 = 0, $call = 0, $conv = 0, $temp = 0, $vfn = 0, $vtable = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $temp = sp; + $0 = HEAP32[$thrown>>2]|0; + HEAP32[$temp>>2] = $0; + $vtable = HEAP32[$catchType>>2]|0; + $vfn = ((($vtable)) + 16|0); + $1 = HEAP32[$vfn>>2]|0; + $call = (FUNCTION_TABLE_iiii[$1 & 31]($catchType,$excpType,$temp)|0); + $conv = $call&1; + if ($call) { + $2 = HEAP32[$temp>>2]|0; + HEAP32[$thrown>>2] = $2; + } + STACKTOP = sp;return ($conv|0); +} +function ___cxa_is_pointer_type($type) { + $type = $type|0; + var $0 = 0, $1 = 0, $2 = 0, $phitmp = 0, $phitmp1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ($type|0)==(0|0); + if ($0) { + $2 = 0; + } else { + $1 = (___dynamic_cast($type,32,136,0)|0); + $phitmp = ($1|0)!=(0|0); + $phitmp1 = $phitmp&1; + $2 = $phitmp1; + } + return ($2|0); +} +function runPostSets() { +} +function ___muldsi3($a, $b) { + $a = $a | 0; + $b = $b | 0; + var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0; + $1 = $a & 65535; + $2 = $b & 65535; + $3 = Math_imul($2, $1) | 0; + $6 = $a >>> 16; + $8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0; + $11 = $b >>> 16; + $12 = Math_imul($11, $1) | 0; + return (tempRet0 = (($8 >>> 16) + (Math_imul($11, $6) | 0) | 0) + ((($8 & 65535) + $12 | 0) >>> 16) | 0, 0 | ($8 + $12 << 16 | $3 & 65535)) | 0; +} +function ___muldi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $x_sroa_0_0_extract_trunc = 0, $y_sroa_0_0_extract_trunc = 0, $1$0 = 0, $1$1 = 0, $2 = 0; + $x_sroa_0_0_extract_trunc = $a$0; + $y_sroa_0_0_extract_trunc = $b$0; + $1$0 = ___muldsi3($x_sroa_0_0_extract_trunc, $y_sroa_0_0_extract_trunc) | 0; + $1$1 = tempRet0; + $2 = Math_imul($a$1, $y_sroa_0_0_extract_trunc) | 0; + return (tempRet0 = ((Math_imul($b$1, $x_sroa_0_0_extract_trunc) | 0) + $2 | 0) + $1$1 | $1$1 & 0, 0 | $1$0 & -1) | 0; +} +function _i64Add(a, b, c, d) { + /* + x = a + b*2^32 + y = c + d*2^32 + result = l + h*2^32 + */ + a = a|0; b = b|0; c = c|0; d = d|0; + var l = 0, h = 0; + l = (a + c)>>>0; + h = (b + d + (((l>>>0) < (a>>>0))|0))>>>0; // Add carry from low word to high word on overflow. + return ((tempRet0 = h,l|0)|0); +} +function _i64Subtract(a, b, c, d) { + a = a|0; b = b|0; c = c|0; d = d|0; + var l = 0, h = 0; + l = (a - c)>>>0; + h = (b - d)>>>0; + h = (b - d - (((c>>>0) > (a>>>0))|0))>>>0; // Borrow one from high word to low word on underflow. + return ((tempRet0 = h,l|0)|0); +} +function _llvm_cttz_i32(x) { + x = x|0; + var ret = 0; + ret = ((HEAP8[(((cttz_i8)+(x & 0xff))>>0)])|0); + if ((ret|0) < 8) return ret|0; + ret = ((HEAP8[(((cttz_i8)+((x >> 8)&0xff))>>0)])|0); + if ((ret|0) < 8) return (ret + 8)|0; + ret = ((HEAP8[(((cttz_i8)+((x >> 16)&0xff))>>0)])|0); + if ((ret|0) < 8) return (ret + 16)|0; + return (((HEAP8[(((cttz_i8)+(x >>> 24))>>0)])|0) + 24)|0; +} +function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + $rem = $rem | 0; + var $n_sroa_0_0_extract_trunc = 0, $n_sroa_1_4_extract_shift$0 = 0, $n_sroa_1_4_extract_trunc = 0, $d_sroa_0_0_extract_trunc = 0, $d_sroa_1_4_extract_shift$0 = 0, $d_sroa_1_4_extract_trunc = 0, $4 = 0, $17 = 0, $37 = 0, $49 = 0, $51 = 0, $57 = 0, $58 = 0, $66 = 0, $78 = 0, $86 = 0, $88 = 0, $89 = 0, $91 = 0, $92 = 0, $95 = 0, $105 = 0, $117 = 0, $119 = 0, $125 = 0, $126 = 0, $130 = 0, $q_sroa_1_1_ph = 0, $q_sroa_0_1_ph = 0, $r_sroa_1_1_ph = 0, $r_sroa_0_1_ph = 0, $sr_1_ph = 0, $d_sroa_0_0_insert_insert99$0 = 0, $d_sroa_0_0_insert_insert99$1 = 0, $137$0 = 0, $137$1 = 0, $carry_0203 = 0, $sr_1202 = 0, $r_sroa_0_1201 = 0, $r_sroa_1_1200 = 0, $q_sroa_0_1199 = 0, $q_sroa_1_1198 = 0, $147 = 0, $149 = 0, $r_sroa_0_0_insert_insert42$0 = 0, $r_sroa_0_0_insert_insert42$1 = 0, $150$1 = 0, $151$0 = 0, $152 = 0, $154$0 = 0, $r_sroa_0_0_extract_trunc = 0, $r_sroa_1_4_extract_trunc = 0, $155 = 0, $carry_0_lcssa$0 = 0, $carry_0_lcssa$1 = 0, $r_sroa_0_1_lcssa = 0, $r_sroa_1_1_lcssa = 0, $q_sroa_0_1_lcssa = 0, $q_sroa_1_1_lcssa = 0, $q_sroa_0_0_insert_ext75$0 = 0, $q_sroa_0_0_insert_ext75$1 = 0, $q_sroa_0_0_insert_insert77$1 = 0, $_0$0 = 0, $_0$1 = 0; + $n_sroa_0_0_extract_trunc = $a$0; + $n_sroa_1_4_extract_shift$0 = $a$1; + $n_sroa_1_4_extract_trunc = $n_sroa_1_4_extract_shift$0; + $d_sroa_0_0_extract_trunc = $b$0; + $d_sroa_1_4_extract_shift$0 = $b$1; + $d_sroa_1_4_extract_trunc = $d_sroa_1_4_extract_shift$0; + if (($n_sroa_1_4_extract_trunc | 0) == 0) { + $4 = ($rem | 0) != 0; + if (($d_sroa_1_4_extract_trunc | 0) == 0) { + if ($4) { + HEAP32[$rem >> 2] = ($n_sroa_0_0_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); + HEAP32[$rem + 4 >> 2] = 0; + } + $_0$1 = 0; + $_0$0 = ($n_sroa_0_0_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } else { + if (!$4) { + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + HEAP32[$rem >> 2] = $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $a$1 & 0; + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + } + $17 = ($d_sroa_1_4_extract_trunc | 0) == 0; + do { + if (($d_sroa_0_0_extract_trunc | 0) == 0) { + if ($17) { + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); + HEAP32[$rem + 4 >> 2] = 0; + } + $_0$1 = 0; + $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + if (($n_sroa_0_0_extract_trunc | 0) == 0) { + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = 0; + HEAP32[$rem + 4 >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_1_4_extract_trunc >>> 0); + } + $_0$1 = 0; + $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_1_4_extract_trunc >>> 0) >>> 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + $37 = $d_sroa_1_4_extract_trunc - 1 | 0; + if (($37 & $d_sroa_1_4_extract_trunc | 0) == 0) { + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = 0 | $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $37 & $n_sroa_1_4_extract_trunc | $a$1 & 0; + } + $_0$1 = 0; + $_0$0 = $n_sroa_1_4_extract_trunc >>> ((_llvm_cttz_i32($d_sroa_1_4_extract_trunc | 0) | 0) >>> 0); + return (tempRet0 = $_0$1, $_0$0) | 0; + } + $49 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0; + $51 = $49 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + if ($51 >>> 0 <= 30) { + $57 = $51 + 1 | 0; + $58 = 31 - $51 | 0; + $sr_1_ph = $57; + $r_sroa_0_1_ph = $n_sroa_1_4_extract_trunc << $58 | $n_sroa_0_0_extract_trunc >>> ($57 >>> 0); + $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($57 >>> 0); + $q_sroa_0_1_ph = 0; + $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $58; + break; + } + if (($rem | 0) == 0) { + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + HEAP32[$rem >> 2] = 0 | $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } else { + if (!$17) { + $117 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0; + $119 = $117 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + if ($119 >>> 0 <= 31) { + $125 = $119 + 1 | 0; + $126 = 31 - $119 | 0; + $130 = $119 - 31 >> 31; + $sr_1_ph = $125; + $r_sroa_0_1_ph = $n_sroa_0_0_extract_trunc >>> ($125 >>> 0) & $130 | $n_sroa_1_4_extract_trunc << $126; + $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($125 >>> 0) & $130; + $q_sroa_0_1_ph = 0; + $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $126; + break; + } + if (($rem | 0) == 0) { + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + HEAP32[$rem >> 2] = 0 | $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + $66 = $d_sroa_0_0_extract_trunc - 1 | 0; + if (($66 & $d_sroa_0_0_extract_trunc | 0) != 0) { + $86 = (Math_clz32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0; + $88 = $86 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + $89 = 64 - $88 | 0; + $91 = 32 - $88 | 0; + $92 = $91 >> 31; + $95 = $88 - 32 | 0; + $105 = $95 >> 31; + $sr_1_ph = $88; + $r_sroa_0_1_ph = $91 - 1 >> 31 & $n_sroa_1_4_extract_trunc >>> ($95 >>> 0) | ($n_sroa_1_4_extract_trunc << $91 | $n_sroa_0_0_extract_trunc >>> ($88 >>> 0)) & $105; + $r_sroa_1_1_ph = $105 & $n_sroa_1_4_extract_trunc >>> ($88 >>> 0); + $q_sroa_0_1_ph = $n_sroa_0_0_extract_trunc << $89 & $92; + $q_sroa_1_1_ph = ($n_sroa_1_4_extract_trunc << $89 | $n_sroa_0_0_extract_trunc >>> ($95 >>> 0)) & $92 | $n_sroa_0_0_extract_trunc << $91 & $88 - 33 >> 31; + break; + } + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = $66 & $n_sroa_0_0_extract_trunc; + HEAP32[$rem + 4 >> 2] = 0; + } + if (($d_sroa_0_0_extract_trunc | 0) == 1) { + $_0$1 = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; + $_0$0 = 0 | $a$0 & -1; + return (tempRet0 = $_0$1, $_0$0) | 0; + } else { + $78 = _llvm_cttz_i32($d_sroa_0_0_extract_trunc | 0) | 0; + $_0$1 = 0 | $n_sroa_1_4_extract_trunc >>> ($78 >>> 0); + $_0$0 = $n_sroa_1_4_extract_trunc << 32 - $78 | $n_sroa_0_0_extract_trunc >>> ($78 >>> 0) | 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + } + } while (0); + if (($sr_1_ph | 0) == 0) { + $q_sroa_1_1_lcssa = $q_sroa_1_1_ph; + $q_sroa_0_1_lcssa = $q_sroa_0_1_ph; + $r_sroa_1_1_lcssa = $r_sroa_1_1_ph; + $r_sroa_0_1_lcssa = $r_sroa_0_1_ph; + $carry_0_lcssa$1 = 0; + $carry_0_lcssa$0 = 0; + } else { + $d_sroa_0_0_insert_insert99$0 = 0 | $b$0 & -1; + $d_sroa_0_0_insert_insert99$1 = $d_sroa_1_4_extract_shift$0 | $b$1 & 0; + $137$0 = _i64Add($d_sroa_0_0_insert_insert99$0 | 0, $d_sroa_0_0_insert_insert99$1 | 0, -1, -1) | 0; + $137$1 = tempRet0; + $q_sroa_1_1198 = $q_sroa_1_1_ph; + $q_sroa_0_1199 = $q_sroa_0_1_ph; + $r_sroa_1_1200 = $r_sroa_1_1_ph; + $r_sroa_0_1201 = $r_sroa_0_1_ph; + $sr_1202 = $sr_1_ph; + $carry_0203 = 0; + while (1) { + $147 = $q_sroa_0_1199 >>> 31 | $q_sroa_1_1198 << 1; + $149 = $carry_0203 | $q_sroa_0_1199 << 1; + $r_sroa_0_0_insert_insert42$0 = 0 | ($r_sroa_0_1201 << 1 | $q_sroa_1_1198 >>> 31); + $r_sroa_0_0_insert_insert42$1 = $r_sroa_0_1201 >>> 31 | $r_sroa_1_1200 << 1 | 0; + _i64Subtract($137$0 | 0, $137$1 | 0, $r_sroa_0_0_insert_insert42$0 | 0, $r_sroa_0_0_insert_insert42$1 | 0) | 0; + $150$1 = tempRet0; + $151$0 = $150$1 >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1; + $152 = $151$0 & 1; + $154$0 = _i64Subtract($r_sroa_0_0_insert_insert42$0 | 0, $r_sroa_0_0_insert_insert42$1 | 0, $151$0 & $d_sroa_0_0_insert_insert99$0 | 0, ((($150$1 | 0) < 0 ? -1 : 0) >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1) & $d_sroa_0_0_insert_insert99$1 | 0) | 0; + $r_sroa_0_0_extract_trunc = $154$0; + $r_sroa_1_4_extract_trunc = tempRet0; + $155 = $sr_1202 - 1 | 0; + if (($155 | 0) == 0) { + break; + } else { + $q_sroa_1_1198 = $147; + $q_sroa_0_1199 = $149; + $r_sroa_1_1200 = $r_sroa_1_4_extract_trunc; + $r_sroa_0_1201 = $r_sroa_0_0_extract_trunc; + $sr_1202 = $155; + $carry_0203 = $152; + } + } + $q_sroa_1_1_lcssa = $147; + $q_sroa_0_1_lcssa = $149; + $r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc; + $r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc; + $carry_0_lcssa$1 = 0; + $carry_0_lcssa$0 = $152; + } + $q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa; + $q_sroa_0_0_insert_ext75$1 = 0; + $q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1; + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa; + HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0; + } + $_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1; + $_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0; + return (tempRet0 = $_0$1, $_0$0) | 0; +} +function ___udivdi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $1$0 = 0; + $1$0 = ___udivmoddi4($a$0, $a$1, $b$0, $b$1, 0) | 0; + return $1$0 | 0; +} +function ___uremdi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $rem = 0, __stackBase__ = 0; + __stackBase__ = STACKTOP; + STACKTOP = STACKTOP + 16 | 0; + $rem = __stackBase__ | 0; + ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) | 0; + STACKTOP = __stackBase__; + return (tempRet0 = HEAP32[$rem + 4 >> 2] | 0, HEAP32[$rem >> 2] | 0) | 0; +} +function _bitshift64Ashr(low, high, bits) { + low = low|0; high = high|0; bits = bits|0; + var ander = 0; + if ((bits|0) < 32) { + ander = ((1 << bits) - 1)|0; + tempRet0 = high >> bits; + return (low >>> bits) | ((high&ander) << (32 - bits)); + } + tempRet0 = (high|0) < 0 ? -1 : 0; + return (high >> (bits - 32))|0; +} +function _bitshift64Lshr(low, high, bits) { + low = low|0; high = high|0; bits = bits|0; + var ander = 0; + if ((bits|0) < 32) { + ander = ((1 << bits) - 1)|0; + tempRet0 = high >>> bits; + return (low >>> bits) | ((high&ander) << (32 - bits)); + } + tempRet0 = 0; + return (high >>> (bits - 32))|0; +} +function _bitshift64Shl(low, high, bits) { + low = low|0; high = high|0; bits = bits|0; + var ander = 0; + if ((bits|0) < 32) { + ander = ((1 << bits) - 1)|0; + tempRet0 = (high << bits) | ((low&(ander << (32 - bits))) >>> (32 - bits)); + return low << bits; + } + tempRet0 = low << (bits - 32); + return 0; +} +function _llvm_bswap_i32(x) { + x = x|0; + return (((x&0xff)<<24) | (((x>>8)&0xff)<<16) | (((x>>16)&0xff)<<8) | (x>>>24))|0; +} +function _memcpy(dest, src, num) { + dest = dest|0; src = src|0; num = num|0; + var ret = 0; + var aligned_dest_end = 0; + var block_aligned_dest_end = 0; + var dest_end = 0; + // Test against a benchmarked cutoff limit for when HEAPU8.set() becomes faster to use. + if ((num|0) >= + 8192 + ) { + return _emscripten_memcpy_big(dest|0, src|0, num|0)|0; + } + + ret = dest|0; + dest_end = (dest + num)|0; + if ((dest&3) == (src&3)) { + // The initial unaligned < 4-byte front. + while (dest & 3) { + if ((num|0) == 0) return ret|0; + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + dest = (dest+1)|0; + src = (src+1)|0; + num = (num-1)|0; + } + aligned_dest_end = (dest_end & -4)|0; + block_aligned_dest_end = (aligned_dest_end - 64)|0; + while ((dest|0) <= (block_aligned_dest_end|0) ) { + HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); + HEAP32[(((dest)+(4))>>2)]=((HEAP32[(((src)+(4))>>2)])|0); + HEAP32[(((dest)+(8))>>2)]=((HEAP32[(((src)+(8))>>2)])|0); + HEAP32[(((dest)+(12))>>2)]=((HEAP32[(((src)+(12))>>2)])|0); + HEAP32[(((dest)+(16))>>2)]=((HEAP32[(((src)+(16))>>2)])|0); + HEAP32[(((dest)+(20))>>2)]=((HEAP32[(((src)+(20))>>2)])|0); + HEAP32[(((dest)+(24))>>2)]=((HEAP32[(((src)+(24))>>2)])|0); + HEAP32[(((dest)+(28))>>2)]=((HEAP32[(((src)+(28))>>2)])|0); + HEAP32[(((dest)+(32))>>2)]=((HEAP32[(((src)+(32))>>2)])|0); + HEAP32[(((dest)+(36))>>2)]=((HEAP32[(((src)+(36))>>2)])|0); + HEAP32[(((dest)+(40))>>2)]=((HEAP32[(((src)+(40))>>2)])|0); + HEAP32[(((dest)+(44))>>2)]=((HEAP32[(((src)+(44))>>2)])|0); + HEAP32[(((dest)+(48))>>2)]=((HEAP32[(((src)+(48))>>2)])|0); + HEAP32[(((dest)+(52))>>2)]=((HEAP32[(((src)+(52))>>2)])|0); + HEAP32[(((dest)+(56))>>2)]=((HEAP32[(((src)+(56))>>2)])|0); + HEAP32[(((dest)+(60))>>2)]=((HEAP32[(((src)+(60))>>2)])|0); + dest = (dest+64)|0; + src = (src+64)|0; + } + while ((dest|0) < (aligned_dest_end|0) ) { + HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); + dest = (dest+4)|0; + src = (src+4)|0; + } + } else { + // In the unaligned copy case, unroll a bit as well. + aligned_dest_end = (dest_end - 4)|0; + while ((dest|0) < (aligned_dest_end|0) ) { + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + HEAP8[(((dest)+(1))>>0)]=((HEAP8[(((src)+(1))>>0)])|0); + HEAP8[(((dest)+(2))>>0)]=((HEAP8[(((src)+(2))>>0)])|0); + HEAP8[(((dest)+(3))>>0)]=((HEAP8[(((src)+(3))>>0)])|0); + dest = (dest+4)|0; + src = (src+4)|0; + } + } + // The remaining unaligned < 4 byte tail. + while ((dest|0) < (dest_end|0)) { + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + dest = (dest+1)|0; + src = (src+1)|0; + } + return ret|0; +} +function _memmove(dest, src, num) { + dest = dest|0; src = src|0; num = num|0; + var ret = 0; + if (((src|0) < (dest|0)) & ((dest|0) < ((src + num)|0))) { + // Unlikely case: Copy backwards in a safe manner + ret = dest; + src = (src + num)|0; + dest = (dest + num)|0; + while ((num|0) > 0) { + dest = (dest - 1)|0; + src = (src - 1)|0; + num = (num - 1)|0; + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + } + dest = ret; + } else { + _memcpy(dest, src, num) | 0; + } + return dest | 0; +} +function _memset(ptr, value, num) { + ptr = ptr|0; value = value|0; num = num|0; + var end = 0, aligned_end = 0, block_aligned_end = 0, value4 = 0; + end = (ptr + num)|0; + + value = value & 0xff; + if ((num|0) >= 67 /* 64 bytes for an unrolled loop + 3 bytes for unaligned head*/) { + while ((ptr&3) != 0) { + HEAP8[((ptr)>>0)]=value; + ptr = (ptr+1)|0; + } + + aligned_end = (end & -4)|0; + block_aligned_end = (aligned_end - 64)|0; + value4 = value | (value << 8) | (value << 16) | (value << 24); + + while((ptr|0) <= (block_aligned_end|0)) { + HEAP32[((ptr)>>2)]=value4; + HEAP32[(((ptr)+(4))>>2)]=value4; + HEAP32[(((ptr)+(8))>>2)]=value4; + HEAP32[(((ptr)+(12))>>2)]=value4; + HEAP32[(((ptr)+(16))>>2)]=value4; + HEAP32[(((ptr)+(20))>>2)]=value4; + HEAP32[(((ptr)+(24))>>2)]=value4; + HEAP32[(((ptr)+(28))>>2)]=value4; + HEAP32[(((ptr)+(32))>>2)]=value4; + HEAP32[(((ptr)+(36))>>2)]=value4; + HEAP32[(((ptr)+(40))>>2)]=value4; + HEAP32[(((ptr)+(44))>>2)]=value4; + HEAP32[(((ptr)+(48))>>2)]=value4; + HEAP32[(((ptr)+(52))>>2)]=value4; + HEAP32[(((ptr)+(56))>>2)]=value4; + HEAP32[(((ptr)+(60))>>2)]=value4; + ptr = (ptr + 64)|0; + } + + while ((ptr|0) < (aligned_end|0) ) { + HEAP32[((ptr)>>2)]=value4; + ptr = (ptr+4)|0; + } + } + // The remaining bytes. + while ((ptr|0) < (end|0)) { + HEAP8[((ptr)>>0)]=value; + ptr = (ptr+1)|0; + } + return (end-num)|0; +} +function _sbrk(increment) { + increment = increment|0; + var oldDynamicTop = 0; + var oldDynamicTopOnChange = 0; + var newDynamicTop = 0; + var totalMemory = 0; + increment = ((increment + 15) & -16)|0; + oldDynamicTop = HEAP32[DYNAMICTOP_PTR>>2]|0; + newDynamicTop = oldDynamicTop + increment | 0; + + if (((increment|0) > 0 & (newDynamicTop|0) < (oldDynamicTop|0)) // Detect and fail if we would wrap around signed 32-bit int. + | (newDynamicTop|0) < 0) { // Also underflow, sbrk() should be able to be used to subtract. + abortOnCannotGrowMemory()|0; + ___setErrNo(12); + return -1; + } + + HEAP32[DYNAMICTOP_PTR>>2] = newDynamicTop; + totalMemory = getTotalMemory()|0; + if ((newDynamicTop|0) > (totalMemory|0)) { + if ((enlargeMemory()|0) == 0) { + HEAP32[DYNAMICTOP_PTR>>2] = oldDynamicTop; + ___setErrNo(12); + return -1; + } + } + return oldDynamicTop|0; +} + + +function dynCall_ii(index,a1) { + index = index|0; + a1=a1|0; + return FUNCTION_TABLE_ii[index&31](a1|0)|0; +} + + +function dynCall_iiii(index,a1,a2,a3) { + index = index|0; + a1=a1|0; a2=a2|0; a3=a3|0; + return FUNCTION_TABLE_iiii[index&31](a1|0,a2|0,a3|0)|0; +} + + +function dynCall_v(index) { + index = index|0; + + FUNCTION_TABLE_v[index&0](); +} + + +function dynCall_vi(index,a1) { + index = index|0; + a1=a1|0; + FUNCTION_TABLE_vi[index&31](a1|0); +} + + +function dynCall_vii(index,a1,a2) { + index = index|0; + a1=a1|0; a2=a2|0; + FUNCTION_TABLE_vii[index&31](a1|0,a2|0); +} + + +function dynCall_viiii(index,a1,a2,a3,a4) { + index = index|0; + a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; + FUNCTION_TABLE_viiii[index&15](a1|0,a2|0,a3|0,a4|0); +} + + +function dynCall_viiiii(index,a1,a2,a3,a4,a5) { + index = index|0; + a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; a5=a5|0; + FUNCTION_TABLE_viiiii[index&15](a1|0,a2|0,a3|0,a4|0,a5|0); +} + + +function dynCall_viiiiii(index,a1,a2,a3,a4,a5,a6) { + index = index|0; + a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; a5=a5|0; a6=a6|0; + FUNCTION_TABLE_viiiiii[index&15](a1|0,a2|0,a3|0,a4|0,a5|0,a6|0); +} + +function b0(p0) { + p0 = p0|0; nullFunc_ii(0);return 0; +} +function b1(p0,p1,p2) { + p0 = p0|0;p1 = p1|0;p2 = p2|0; nullFunc_iiii(1);return 0; +} +function b2() { + ; nullFunc_v(2); +} +function b3(p0) { + p0 = p0|0; nullFunc_vi(3); +} +function b4(p0,p1) { + p0 = p0|0;p1 = p1|0; nullFunc_vii(4); +} +function b5(p0,p1,p2,p3) { + p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0; nullFunc_viiii(5); +} +function b6(p0,p1,p2,p3,p4) { + p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0;p4 = p4|0; nullFunc_viiiii(6); +} +function b7(p0,p1,p2,p3,p4,p5) { + p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0;p4 = p4|0;p5 = p5|0; nullFunc_viiiiii(7); +} + +// EMSCRIPTEN_END_FUNCS +var FUNCTION_TABLE_ii = [b0,___stdio_close,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,__ZNKSt9bad_alloc4whatEv,b0,b0,__ZNKSt11logic_error4whatEv,b0,b0,b0,b0,b0,b0,b0 +,b0,b0,b0]; +var FUNCTION_TABLE_iiii = [b1,b1,___stdout_write,___stdio_seek,b1,b1,b1,b1,__ZNK10__cxxabiv117__class_type_info9can_catchEPKNS_16__shim_type_infoERPv,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,___stdio_write,b1,b1,b1,b1,b1 +,b1,b1,b1]; +var FUNCTION_TABLE_v = [b2]; +var FUNCTION_TABLE_vi = [b3,b3,b3,b3,__ZN10__cxxabiv116__shim_type_infoD2Ev,__ZN10__cxxabiv117__class_type_infoD0Ev,__ZNK10__cxxabiv116__shim_type_info5noop1Ev,__ZNK10__cxxabiv116__shim_type_info5noop2Ev,b3,b3,b3,b3,__ZN10__cxxabiv120__si_class_type_infoD0Ev,b3,b3,b3,__ZNSt9bad_allocD2Ev,__ZNSt9bad_allocD0Ev,b3,__ZNSt11logic_errorD2Ev,__ZNSt11logic_errorD0Ev,b3,__ZNSt12length_errorD0Ev,b3,b3,b3,b3,b3,b3 +,b3,b3,b3]; +var FUNCTION_TABLE_vii = [b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,__ZNSt11logic_errorC2EPKc,__ZNSt3__218__libcpp_refstringC2EPKc,b4,b4,b4 +,b4,b4,b4]; +var FUNCTION_TABLE_viiii = [b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,__ZNK10__cxxabiv117__class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi,b5,b5,b5,__ZNK10__cxxabiv120__si_class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi]; +var FUNCTION_TABLE_viiiii = [b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,__ZNK10__cxxabiv117__class_type_info16search_below_dstEPNS_19__dynamic_cast_infoEPKvib,b6,b6,b6,__ZNK10__cxxabiv120__si_class_type_info16search_below_dstEPNS_19__dynamic_cast_infoEPKvib,b6]; +var FUNCTION_TABLE_viiiiii = [b7,b7,b7,b7,b7,b7,b7,b7,b7,__ZNK10__cxxabiv117__class_type_info16search_above_dstEPNS_19__dynamic_cast_infoEPKvS4_ib,b7,b7,b7,__ZNK10__cxxabiv120__si_class_type_info16search_above_dstEPNS_19__dynamic_cast_infoEPKvS4_ib,b7,b7]; + + return { ___cxa_can_catch: ___cxa_can_catch, ___cxa_is_pointer_type: ___cxa_is_pointer_type, ___errno_location: ___errno_location, ___muldi3: ___muldi3, ___udivdi3: ___udivdi3, ___uremdi3: ___uremdi3, _bitshift64Ashr: _bitshift64Ashr, _bitshift64Lshr: _bitshift64Lshr, _bitshift64Shl: _bitshift64Shl, _codec_opus_createNativeHandle: _codec_opus_createNativeHandle, _codec_opus_decode: _codec_opus_decode, _codec_opus_encode: _codec_opus_encode, _fflush: _fflush, _free: _free, _i64Add: _i64Add, _i64Subtract: _i64Subtract, _llvm_bswap_i32: _llvm_bswap_i32, _malloc: _malloc, _memcpy: _memcpy, _memmove: _memmove, _memset: _memset, _printCodecName: _printCodecName, _sbrk: _sbrk, dynCall_ii: dynCall_ii, dynCall_iiii: dynCall_iiii, dynCall_v: dynCall_v, dynCall_vi: dynCall_vi, dynCall_vii: dynCall_vii, dynCall_viiii: dynCall_viiii, dynCall_viiiii: dynCall_viiiii, dynCall_viiiiii: dynCall_viiiiii, establishStackSpace: establishStackSpace, getTempRet0: getTempRet0, runPostSets: runPostSets, setTempRet0: setTempRet0, setThrew: setThrew, stackAlloc: stackAlloc, stackRestore: stackRestore, stackSave: stackSave }; +}) +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg, Module.asmLibraryArg, buffer); + +var real____cxa_can_catch = asm["___cxa_can_catch"]; asm["___cxa_can_catch"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____cxa_can_catch.apply(null, arguments); +}; + +var real____cxa_is_pointer_type = asm["___cxa_is_pointer_type"]; asm["___cxa_is_pointer_type"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____cxa_is_pointer_type.apply(null, arguments); +}; + +var real____errno_location = asm["___errno_location"]; asm["___errno_location"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____errno_location.apply(null, arguments); +}; + +var real____muldi3 = asm["___muldi3"]; asm["___muldi3"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____muldi3.apply(null, arguments); +}; + +var real____udivdi3 = asm["___udivdi3"]; asm["___udivdi3"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____udivdi3.apply(null, arguments); +}; + +var real____uremdi3 = asm["___uremdi3"]; asm["___uremdi3"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____uremdi3.apply(null, arguments); +}; + +var real__bitshift64Ashr = asm["_bitshift64Ashr"]; asm["_bitshift64Ashr"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__bitshift64Ashr.apply(null, arguments); +}; + +var real__bitshift64Lshr = asm["_bitshift64Lshr"]; asm["_bitshift64Lshr"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__bitshift64Lshr.apply(null, arguments); +}; + +var real__bitshift64Shl = asm["_bitshift64Shl"]; asm["_bitshift64Shl"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__bitshift64Shl.apply(null, arguments); +}; + +var real__codec_opus_createNativeHandle = asm["_codec_opus_createNativeHandle"]; asm["_codec_opus_createNativeHandle"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__codec_opus_createNativeHandle.apply(null, arguments); +}; + +var real__codec_opus_decode = asm["_codec_opus_decode"]; asm["_codec_opus_decode"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__codec_opus_decode.apply(null, arguments); +}; + +var real__codec_opus_encode = asm["_codec_opus_encode"]; asm["_codec_opus_encode"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__codec_opus_encode.apply(null, arguments); +}; + +var real__fflush = asm["_fflush"]; asm["_fflush"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__fflush.apply(null, arguments); +}; + +var real__free = asm["_free"]; asm["_free"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__free.apply(null, arguments); +}; + +var real__i64Add = asm["_i64Add"]; asm["_i64Add"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__i64Add.apply(null, arguments); +}; + +var real__i64Subtract = asm["_i64Subtract"]; asm["_i64Subtract"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__i64Subtract.apply(null, arguments); +}; + +var real__llvm_bswap_i32 = asm["_llvm_bswap_i32"]; asm["_llvm_bswap_i32"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__llvm_bswap_i32.apply(null, arguments); +}; + +var real__malloc = asm["_malloc"]; asm["_malloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__malloc.apply(null, arguments); +}; + +var real__memmove = asm["_memmove"]; asm["_memmove"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__memmove.apply(null, arguments); +}; + +var real__printCodecName = asm["_printCodecName"]; asm["_printCodecName"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__printCodecName.apply(null, arguments); +}; + +var real__sbrk = asm["_sbrk"]; asm["_sbrk"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__sbrk.apply(null, arguments); +}; + +var real_establishStackSpace = asm["establishStackSpace"]; asm["establishStackSpace"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_establishStackSpace.apply(null, arguments); +}; + +var real_getTempRet0 = asm["getTempRet0"]; asm["getTempRet0"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_getTempRet0.apply(null, arguments); +}; + +var real_setTempRet0 = asm["setTempRet0"]; asm["setTempRet0"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_setTempRet0.apply(null, arguments); +}; + +var real_setThrew = asm["setThrew"]; asm["setThrew"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_setThrew.apply(null, arguments); +}; + +var real_stackAlloc = asm["stackAlloc"]; asm["stackAlloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackAlloc.apply(null, arguments); +}; + +var real_stackRestore = asm["stackRestore"]; asm["stackRestore"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackRestore.apply(null, arguments); +}; + +var real_stackSave = asm["stackSave"]; asm["stackSave"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackSave.apply(null, arguments); +}; +var ___cxa_can_catch = Module["___cxa_can_catch"] = asm["___cxa_can_catch"]; +var ___cxa_is_pointer_type = Module["___cxa_is_pointer_type"] = asm["___cxa_is_pointer_type"]; +var ___errno_location = Module["___errno_location"] = asm["___errno_location"]; +var ___muldi3 = Module["___muldi3"] = asm["___muldi3"]; +var ___udivdi3 = Module["___udivdi3"] = asm["___udivdi3"]; +var ___uremdi3 = Module["___uremdi3"] = asm["___uremdi3"]; +var _bitshift64Ashr = Module["_bitshift64Ashr"] = asm["_bitshift64Ashr"]; +var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"]; +var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"]; +var _codec_opus_createNativeHandle = Module["_codec_opus_createNativeHandle"] = asm["_codec_opus_createNativeHandle"]; +var _codec_opus_decode = Module["_codec_opus_decode"] = asm["_codec_opus_decode"]; +var _codec_opus_encode = Module["_codec_opus_encode"] = asm["_codec_opus_encode"]; +var _fflush = Module["_fflush"] = asm["_fflush"]; +var _free = Module["_free"] = asm["_free"]; +var _i64Add = Module["_i64Add"] = asm["_i64Add"]; +var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"]; +var _llvm_bswap_i32 = Module["_llvm_bswap_i32"] = asm["_llvm_bswap_i32"]; +var _malloc = Module["_malloc"] = asm["_malloc"]; +var _memcpy = Module["_memcpy"] = asm["_memcpy"]; +var _memmove = Module["_memmove"] = asm["_memmove"]; +var _memset = Module["_memset"] = asm["_memset"]; +var _printCodecName = Module["_printCodecName"] = asm["_printCodecName"]; +var _sbrk = Module["_sbrk"] = asm["_sbrk"]; +var establishStackSpace = Module["establishStackSpace"] = asm["establishStackSpace"]; +var getTempRet0 = Module["getTempRet0"] = asm["getTempRet0"]; +var runPostSets = Module["runPostSets"] = asm["runPostSets"]; +var setTempRet0 = Module["setTempRet0"] = asm["setTempRet0"]; +var setThrew = Module["setThrew"] = asm["setThrew"]; +var stackAlloc = Module["stackAlloc"] = asm["stackAlloc"]; +var stackRestore = Module["stackRestore"] = asm["stackRestore"]; +var stackSave = Module["stackSave"] = asm["stackSave"]; +var dynCall_ii = Module["dynCall_ii"] = asm["dynCall_ii"]; +var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"]; +var dynCall_v = Module["dynCall_v"] = asm["dynCall_v"]; +var dynCall_vi = Module["dynCall_vi"] = asm["dynCall_vi"]; +var dynCall_vii = Module["dynCall_vii"] = asm["dynCall_vii"]; +var dynCall_viiii = Module["dynCall_viiii"] = asm["dynCall_viiii"]; +var dynCall_viiiii = Module["dynCall_viiiii"] = asm["dynCall_viiiii"]; +var dynCall_viiiiii = Module["dynCall_viiiiii"] = asm["dynCall_viiiiii"]; +; + + + +// === Auto-generated postamble setup entry stuff === + +Module['asm'] = asm; + +if (!Module["intArrayFromString"]) Module["intArrayFromString"] = function() { abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["intArrayToString"]) Module["intArrayToString"] = function() { abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["ccall"] = ccall; +Module["cwrap"] = cwrap; +if (!Module["setValue"]) Module["setValue"] = function() { abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getValue"]) Module["getValue"] = function() { abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["allocate"]) Module["allocate"] = function() { abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getMemory"]) Module["getMemory"] = function() { abort("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["Pointer_stringify"]) Module["Pointer_stringify"] = function() { abort("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["AsciiToString"]) Module["AsciiToString"] = function() { abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToAscii"]) Module["stringToAscii"] = function() { abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF8ArrayToString"]) Module["UTF8ArrayToString"] = function() { abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF8ToString"]) Module["UTF8ToString"] = function() { abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF8Array"]) Module["stringToUTF8Array"] = function() { abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF8"]) Module["stringToUTF8"] = function() { abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["lengthBytesUTF8"]) Module["lengthBytesUTF8"] = function() { abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF16ToString"]) Module["UTF16ToString"] = function() { abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF16"]) Module["stringToUTF16"] = function() { abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["lengthBytesUTF16"]) Module["lengthBytesUTF16"] = function() { abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF32ToString"]) Module["UTF32ToString"] = function() { abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF32"]) Module["stringToUTF32"] = function() { abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["lengthBytesUTF32"]) Module["lengthBytesUTF32"] = function() { abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["allocateUTF8"]) Module["allocateUTF8"] = function() { abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stackTrace"]) Module["stackTrace"] = function() { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnPreRun"]) Module["addOnPreRun"] = function() { abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnInit"]) Module["addOnInit"] = function() { abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnPreMain"]) Module["addOnPreMain"] = function() { abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnExit"]) Module["addOnExit"] = function() { abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnPostRun"]) Module["addOnPostRun"] = function() { abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["writeStringToMemory"]) Module["writeStringToMemory"] = function() { abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["writeArrayToMemory"]) Module["writeArrayToMemory"] = function() { abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["writeAsciiToMemory"]) Module["writeAsciiToMemory"] = function() { abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addRunDependency"]) Module["addRunDependency"] = function() { abort("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["removeRunDependency"]) Module["removeRunDependency"] = function() { abort("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS"]) Module["FS"] = function() { abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["FS_createFolder"]) Module["FS_createFolder"] = function() { abort("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createPath"]) Module["FS_createPath"] = function() { abort("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createDataFile"]) Module["FS_createDataFile"] = function() { abort("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createPreloadedFile"]) Module["FS_createPreloadedFile"] = function() { abort("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createLazyFile"]) Module["FS_createLazyFile"] = function() { abort("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createLink"]) Module["FS_createLink"] = function() { abort("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createDevice"]) Module["FS_createDevice"] = function() { abort("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_unlink"]) Module["FS_unlink"] = function() { abort("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["GL"]) Module["GL"] = function() { abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["staticAlloc"]) Module["staticAlloc"] = function() { abort("'staticAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["dynamicAlloc"]) Module["dynamicAlloc"] = function() { abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["warnOnce"]) Module["warnOnce"] = function() { abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["loadDynamicLibrary"]) Module["loadDynamicLibrary"] = function() { abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["loadWebAssemblyModule"]) Module["loadWebAssemblyModule"] = function() { abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getLEB"]) Module["getLEB"] = function() { abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getFunctionTables"]) Module["getFunctionTables"] = function() { abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["alignFunctionTables"]) Module["alignFunctionTables"] = function() { abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["registerFunctions"]) Module["registerFunctions"] = function() { abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addFunction"]) Module["addFunction"] = function() { abort("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["removeFunction"]) Module["removeFunction"] = function() { abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getFuncWrapper"]) Module["getFuncWrapper"] = function() { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["prettyPrint"]) Module["prettyPrint"] = function() { abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["makeBigInt"]) Module["makeBigInt"] = function() { abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["dynCall"]) Module["dynCall"] = function() { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getCompilerSetting"]) Module["getCompilerSetting"] = function() { abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["intArrayFromBase64"]) Module["intArrayFromBase64"] = function() { abort("'intArrayFromBase64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["tryParseAsDataURI"]) Module["tryParseAsDataURI"] = function() { abort("'tryParseAsDataURI' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };if (!Module["ALLOC_NORMAL"]) Object.defineProperty(Module, "ALLOC_NORMAL", { get: function() { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_STACK"]) Object.defineProperty(Module, "ALLOC_STACK", { get: function() { abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_STATIC"]) Object.defineProperty(Module, "ALLOC_STATIC", { get: function() { abort("'ALLOC_STATIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_DYNAMIC"]) Object.defineProperty(Module, "ALLOC_DYNAMIC", { get: function() { abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_NONE"]) Object.defineProperty(Module, "ALLOC_NONE", { get: function() { abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); + +if (memoryInitializer) { + if (!isDataURI(memoryInitializer)) { + if (typeof Module['locateFile'] === 'function') { + memoryInitializer = Module['locateFile'](memoryInitializer); + } else if (Module['memoryInitializerPrefixURL']) { + memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer; + } + } + if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { + var data = Module['readBinary'](memoryInitializer); + HEAPU8.set(data, GLOBAL_BASE); + } else { + addRunDependency('memory initializer'); + var applyMemoryInitializer = function(data) { + if (data.byteLength) data = new Uint8Array(data); + for (var i = 0; i < data.length; i++) { + assert(HEAPU8[GLOBAL_BASE + i] === 0, "area for memory initializer should not have been touched before it's loaded"); + } + HEAPU8.set(data, GLOBAL_BASE); + // Delete the typed array that contains the large blob of the memory initializer request response so that + // we won't keep unnecessary memory lying around. However, keep the XHR object itself alive so that e.g. + // its .status field can still be accessed later. + if (Module['memoryInitializerRequest']) delete Module['memoryInitializerRequest'].response; + removeRunDependency('memory initializer'); + } + function doBrowserLoad() { + Module['readAsync'](memoryInitializer, applyMemoryInitializer, function() { + throw 'could not load memory initializer ' + memoryInitializer; + }); + } + var memoryInitializerBytes = tryParseAsDataURI(memoryInitializer); + if (memoryInitializerBytes) { + applyMemoryInitializer(memoryInitializerBytes.buffer); + } else + if (Module['memoryInitializerRequest']) { + // a network request has already been created, just use that + function useRequest() { + var request = Module['memoryInitializerRequest']; + var response = request.response; + if (request.status !== 200 && request.status !== 0) { + var data = tryParseAsDataURI(Module['memoryInitializerRequestURL']); + if (data) { + response = data.buffer; + } else { + // If you see this warning, the issue may be that you are using locateFile or memoryInitializerPrefixURL, and defining them in JS. That + // means that the HTML file doesn't know about them, and when it tries to create the mem init request early, does it to the wrong place. + // Look in your browser's devtools network console to see what's going on. + console.warn('a problem seems to have happened with Module.memoryInitializerRequest, status: ' + request.status + ', retrying ' + memoryInitializer); + doBrowserLoad(); + return; + } + } + applyMemoryInitializer(response); + } + if (Module['memoryInitializerRequest'].response) { + setTimeout(useRequest, 0); // it's already here; but, apply it asynchronously + } else { + Module['memoryInitializerRequest'].addEventListener('load', useRequest); // wait for it + } + } else { + // fetch it from the network ourselves + doBrowserLoad(); + } + } +} + + + +/** + * @constructor + * @extends {Error} + * @this {ExitStatus} + */ +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +}; +ExitStatus.prototype = new Error(); +ExitStatus.prototype.constructor = ExitStatus; + +var initialStackTop; +var calledMain = false; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!Module['calledRun']) run(); + if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +} + + + + + +/** @type {function(Array=)} */ +function run(args) { + args = args || Module['arguments']; + + if (runDependencies > 0) { + return; + } + + writeStackCookie(); + + preRun(); + + if (runDependencies > 0) return; // a preRun added a dependency, run will be called later + if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame + + function doRun() { + if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening + Module['calledRun'] = true; + + if (ABORT) return; + + ensureInitRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else { + doRun(); + } + checkStackCookie(); +} +Module['run'] = run; + +function checkUnflushedContent() { + // Compiler settings do not allow exiting the runtime, so flushing + // the streams is not possible. but in ASSERTIONS mode we check + // if there was something to flush, and if so tell the user they + // should request that the runtime be exitable. + // Normally we would not even include flush() at all, but in ASSERTIONS + // builds we do so just for this check, and here we see if there is any + // content to flush, that is, we check if there would have been + // something a non-ASSERTIONS build would have not seen. + // How we flush the streams depends on whether we are in NO_FILESYSTEM + // mode (which has its own special function for this; otherwise, all + // the code is inside libc) + var print = Module['print']; + var printErr = Module['printErr']; + var has = false; + Module['print'] = Module['printErr'] = function(x) { + has = true; + } + try { // it doesn't matter if it fails + var flush = flush_NO_FILESYSTEM; + if (flush) flush(0); + } catch(e) {} + Module['print'] = print; + Module['printErr'] = printErr; + if (has) { + warnOnce('stdio streams had content in them that was not flushed. you should set NO_EXIT_RUNTIME to 0 (see the FAQ), or make sure to emit a newline when you printf etc.'); + } +} + +function exit(status, implicit) { + checkUnflushedContent(); + + // if this is just main exit-ing implicitly, and the status is 0, then we + // don't need to do anything here and can just leave. if the status is + // non-zero, though, then we need to report it. + // (we may have warned about this earlier, if a situation justifies doing so) + if (implicit && Module['noExitRuntime'] && status === 0) { + return; + } + + if (Module['noExitRuntime']) { + // if exit() was called, we may warn the user if the runtime isn't actually being shut down + if (!implicit) { + Module.printErr('exit(' + status + ') called, but NO_EXIT_RUNTIME is set, so halting execution but not exiting the runtime or preventing further async execution (build with NO_EXIT_RUNTIME=0, if you want a true shutdown)'); + } + } else { + + ABORT = true; + EXITSTATUS = status; + STACKTOP = initialStackTop; + + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } + + if (ENVIRONMENT_IS_NODE) { + process['exit'](status); + } + Module['quit'](status, new ExitStatus(status)); +} +Module['exit'] = exit; + +var abortDecorators = []; + +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + if (what !== undefined) { + Module.print(what); + Module.printErr(what); + what = JSON.stringify(what) + } else { + what = ''; + } + + ABORT = true; + EXITSTATUS = 1; + + var extra = ''; + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; +} +Module['abort'] = abort; + +// {{PRE_RUN_ADDITIONS}} + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + + +Module["noExitRuntime"] = true; + +run(); + +// {{POST_RUN_ADDITIONS}} + + + + + +// {{MODULE_ADDITIONS}} + + + diff --git a/asm/generated/libopus.js b/asm/generated/libopus.js new file mode 100644 index 00000000..3dc84e0c --- /dev/null +++ b/asm/generated/libopus.js @@ -0,0 +1,57 @@ +var Module = function(Module) { + Module = Module || {}; + +var a;a||(a=typeof Module !== 'undefined' ? Module : {});var e={},g;for(g in a)a.hasOwnProperty(g)&&(e[g]=a[g]);a.arguments=[];a.thisProgram="./this.program";a.quit=function(b,c){throw c;};a.preRun=[];a.postRun=[];var k=!1,l=!1,m=!1,n=!1; +if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)k=!0;else if("WORKER"===a.ENVIRONMENT)l=!0;else if("NODE"===a.ENVIRONMENT)m=!0;else if("SHELL"===a.ENVIRONMENT)n=!0;else throw Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.");else k="object"===typeof window,l="function"===typeof importScripts,m="object"===typeof process&&"function"===typeof require&&!k&&!l,n=!k&&!m&&!l; +if(m){var p,q;a.read=function(b,c){var d=r(b);d||(p||(p=require("fs")),q||(q=require("path")),b=q.normalize(b),d=p.readFileSync(b));return c?d:d.toString()};a.readBinary=function(b){b=a.read(b,!0);b.buffer||(b=new Uint8Array(b));assert(b.buffer);return b};1>2]=H;D=!0;var la=!1;function v(b){for(var c=[],d=0;d>4; +h=(h&15)<<4|t>>2;var S=(t&3)<<6|J;c+=String.fromCharCode(f);64!==t&&(c+=String.fromCharCode(h));64!==J&&(c+=String.fromCharCode(S))}while(d>2]=b);return b},_emscripten_memcpy_big:function(b,c,d){z.set(z.subarray(c,c+d),b);return b},_llvm_pow_f64:ha,_llvm_stackrestore:function(b){var c=W.a[b];W.a.splice(b, +1);na(c)},_llvm_stacksave:W,DYNAMICTOP_PTR:I,tempDoublePtr:ia,ABORT:x,STACKTOP:F,STACK_MAX:G};// EMSCRIPTEN_START_ASM +var X=(/** @suppress {uselessCode} */ function(global,env,buffer) { +"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.DYNAMICTOP_PTR|0;var j=env.tempDoublePtr|0;var k=env.ABORT|0;var l=env.STACKTOP|0;var m=env.STACK_MAX|0;var n=0;var o=0;var p=0;var q=0;var r=global.NaN,s=global.Infinity;var t=0,u=0,v=0,w=0,x=0.0;var y=0;var z=global.Math.floor;var A=global.Math.abs;var B=global.Math.sqrt;var C=global.Math.pow;var D=global.Math.cos;var E=global.Math.sin;var F=global.Math.tan;var G=global.Math.acos;var H=global.Math.asin;var I=global.Math.atan;var J=global.Math.atan2;var K=global.Math.exp;var L=global.Math.log;var M=global.Math.ceil;var N=global.Math.imul;var O=global.Math.min;var P=global.Math.max;var Q=global.Math.clz32;var R=env.abort;var S=env.assert;var T=env.enlargeMemory;var U=env.getTotalMemory;var V=env.abortOnCannotGrowMemory;var W=env.invoke_viiiiiii;var X=env.___setErrNo;var Y=env._emscripten_memcpy_big;var Z=env._llvm_pow_f64;var _=env._llvm_stackrestore;var $=env._llvm_stacksave;var aa=0.0; +// EMSCRIPTEN_START_FUNCS +function hb(a,d,e,f,h,i,j,k,m,n,o,p,q){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=+n;o=o|0;p=+p;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,M=0,O=0,P=0,Q=0,R=0,S=0;S=l;l=l+96|0;I=S+92|0;u=S+88|0;E=S+84|0;G=S+80|0;s=S+76|0;D=S+72|0;t=S+68|0;P=S+64|0;J=S+60|0;O=S+56|0;v=S+52|0;M=S+48|0;H=S+40|0;K=S+36|0;F=S+32|0;R=S+28|0;Q=S+24|0;B=S+20|0;C=S+16|0;y=S+12|0;x=S+8|0;r=S+4|0;w=S;c[I>>2]=a;c[u>>2]=d;c[E>>2]=e;c[G>>2]=f;c[s>>2]=h;c[D>>2]=i;c[t>>2]=j;c[P>>2]=k;c[J>>2]=m;g[O>>2]=n;c[v>>2]=o;g[M>>2]=p;c[S+44>>2]=q;g[K>>2]=0.0;g[Q>>2]=5.0;if((c[D>>2]|0)==2){g[y>>2]=0.0;c[H>>2]=0;while(1){if((c[H>>2]|0)>=8)break;g[r>>2]=+kb((c[u>>2]|0)+(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]<>2]<<2)|0,(c[u>>2]|0)+((c[t>>2]|0)+(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]<>2])<<2)|0,(b[(c[(c[I>>2]|0)+32>>2]|0)+((c[H>>2]|0)+1<<1)>>1]|0)-(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]|0)<>2]);g[y>>2]=+g[y>>2]+ +g[r>>2];c[H>>2]=(c[H>>2]|0)+1}g[y>>2]=+g[y>>2]*.125;if(1.0<+A(+(+g[y>>2])))p=1.0;else p=+A(+(+g[y>>2]));g[y>>2]=p;g[x>>2]=+g[y>>2];c[H>>2]=8;while(1){if((c[H>>2]|0)>=(c[v>>2]|0))break;g[w>>2]=+kb((c[u>>2]|0)+(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]<>2]<<2)|0,(c[u>>2]|0)+((c[t>>2]|0)+(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]<>2])<<2)|0,(b[(c[(c[I>>2]|0)+32>>2]|0)+((c[H>>2]|0)+1<<1)>>1]|0)-(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]|0)<>2]);if(+g[x>>2]<+A(+(+g[w>>2])))p=+g[x>>2];else p=+A(+(+g[w>>2]));g[x>>2]=p;c[H>>2]=(c[H>>2]|0)+1}if(1.0<+A(+(+g[x>>2])))p=1.0;else p=+A(+(+g[x>>2]));g[x>>2]=p;g[B>>2]=+L(+(1.0010000467300415-+g[y>>2]*+g[y>>2]))*1.4426950408889634;if(+g[B>>2]*.5>+L(+(1.0010000467300415-+g[x>>2]*+g[x>>2]))*1.4426950408889634)p=+g[B>>2]*.5;else p=+L(+(1.0010000467300415-+g[x>>2]*+g[x>>2]))*1.4426950408889634;g[C>>2]=p;g[Q>>2]=+g[Q>>2]+(-4.0>+g[B>>2]*.75?-4.0:+g[B>>2]*.75);if(+g[c[J>>2]>>2]+.25<-(+g[C>>2]*.5))p=+g[c[J>>2]>>2]+.25;else p=-(+g[C>>2]*.5);g[c[J>>2]>>2]=p}c[F>>2]=0;do{c[H>>2]=0;while(1){if((c[H>>2]|0)>=((c[G>>2]|0)-1|0))break;n=+g[(c[E>>2]|0)+((c[H>>2]|0)+(N(c[F>>2]|0,c[(c[I>>2]|0)+8>>2]|0)|0)<<2)>>2];g[K>>2]=+g[K>>2]+n*+(2+(c[H>>2]<<1)-(c[G>>2]|0)|0);c[H>>2]=(c[H>>2]|0)+1}J=(c[F>>2]|0)+1|0;c[F>>2]=J}while((J|0)<(c[D>>2]|0));n=+(N(c[D>>2]|0,(c[G>>2]|0)-1|0)|0);g[K>>2]=+g[K>>2]/n;if(2.0<(+g[K>>2]+1.0)/6.0)p=2.0;else p=(+g[K>>2]+1.0)/6.0;if(!(-2.0>p))if(2.0<(+g[K>>2]+1.0)/6.0)p=2.0;else p=(+g[K>>2]+1.0)/6.0;else p=-2.0;g[Q>>2]=+g[Q>>2]-p;g[Q>>2]=+g[Q>>2]-+g[M>>2];g[Q>>2]=+g[Q>>2]-+g[O>>2]*2.0;if(c[c[P>>2]>>2]|0){if(2.0<(+g[(c[P>>2]|0)+8>>2]+.05000000074505806)*2.0)p=2.0;else p=(+g[(c[P>>2]|0)+8>>2]+.05000000074505806)*2.0;if(!(-2.0>p))if(2.0<(+g[(c[P>>2]|0)+8>>2]+.05000000074505806)*2.0)p=2.0;else p=(+g[(c[P>>2]|0)+8>>2]+.05000000074505806)*2.0;else p=-2.0;g[Q>>2]=+g[Q>>2]-p}c[R>>2]=~~+z(+(+g[Q>>2]+.5));if(0>((10<(c[R>>2]|0)?10:c[R>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]|0?c[fa>>2]|0:c[V>>2]|0;c[H>>2]=b[(c[R>>2]|0)+(c[x>>2]<<1)>>1]<>2];if((c[O>>2]|0)==2)c[H>>2]=(c[H>>2]|0)+(b[(c[R>>2]|0)+(((c[A>>2]|0)<(c[x>>2]|0)?c[A>>2]|0:c[x>>2]|0)<<1)>>1]<>2]);c[ba>>2]=c[aa>>2];if(c[c[D>>2]>>2]|0?+g[(c[D>>2]|0)+16>>2]<.4:0)c[ba>>2]=(c[ba>>2]|0)-~~(+(c[H>>2]<<3|0)*(.4000000059604645-+g[(c[D>>2]|0)+16>>2]));if((c[O>>2]|0)==2){c[y>>2]=(c[A>>2]|0)<(c[x>>2]|0)?c[A>>2]|0:c[x>>2]|0;c[z>>2]=(b[(c[R>>2]|0)+(c[y>>2]<<1)>>1]<>2])-(c[y>>2]|0);g[B>>2]=+(c[z>>2]|0)*.800000011920929/+(c[H>>2]|0);g[C>>2]=+g[C>>2]<1.0?+g[C>>2]:1.0;if(+g[B>>2]*+(c[ba>>2]|0)<(+g[C>>2]-.10000000149011612)*+(c[z>>2]<<3|0)){j=c[ba>>2]|0;r=+g[B>>2]}else{j=c[z>>2]<<3;r=+g[C>>2]-.10000000149011612}c[ba>>2]=(c[ba>>2]|0)-~~(r*+(j|0))}c[ba>>2]=(c[ba>>2]|0)+((c[F>>2]|0)-(16<>2]));g[E>>2]=(c[G>>2]|0)==5010?.019999999552965164:.03999999910593033;c[ba>>2]=(c[ba>>2]|0)+~~((+g[_>>2]-+g[E>>2])*+(c[ba>>2]|0));if(!(c[T>>2]|0?1:(c[c[D>>2]>>2]|0)==0)){if(0.0>+g[(c[D>>2]|0)+4>>2]-.15000000596046448)r=0.0;else r=+g[(c[D>>2]|0)+4>>2]-.15000000596046448;g[L>>2]=r-.09000000357627869;c[M>>2]=(c[ba>>2]|0)+~~(+(c[H>>2]<<3|0)*1.2000000476837158*+g[L>>2]);if(c[I>>2]|0)c[M>>2]=(c[M>>2]|0)+~~(+(c[H>>2]<<3|0)*.800000011920929);c[ba>>2]=c[M>>2]}if(!((c[Y>>2]|0)==0|(c[T>>2]|0)!=0)){c[K>>2]=(c[ba>>2]|0)+~~(+g[J>>2]*+(c[H>>2]<<3|0));if(((c[ba>>2]|0)/4|0|0)>(c[K>>2]|0))j=(c[ba>>2]|0)/4|0;else j=c[K>>2]|0;c[ba>>2]=j}c[Q>>2]=b[(c[R>>2]|0)+((c[V>>2]|0)-2<<1)>>1]<>2];p=+((N(c[O>>2]|0,c[Q>>2]|0)|0)<<3|0);c[S>>2]=~~(p*+g[U>>2]);c[S>>2]=(c[S>>2]|0)>(c[ba>>2]>>2|0)?c[S>>2]|0:c[ba>>2]>>2;c[ba>>2]=(c[ba>>2]|0)<(c[S>>2]|0)?c[ba>>2]|0:c[S>>2]|0;if((c[Y>>2]|0)==0|(c[T>>2]|0)!=0?(c[X>>2]|0)!=0|(c[W>>2]|0)<64e3:0){if(0.0>+((c[W>>2]|0)-32e3|0)*.000030517578125)r=0.0;else r=+((c[W>>2]|0)-32e3|0)*.000030517578125;g[Z>>2]=r;if(c[X>>2]|0)g[Z>>2]=+g[Z>>2]<.6700000166893005?+g[Z>>2]:.6700000166893005;c[ba>>2]=(c[aa>>2]|0)+~~(+g[Z>>2]*+((c[ba>>2]|0)-(c[aa>>2]|0)|0))}if(!((c[Y>>2]|0)==0&+g[_>>2]<.20000000298023224)){fa=c[aa>>2]|0;fa=fa<<1;da=c[ba>>2]|0;da=(fa|0)<(da|0);fa=c[aa>>2]|0;fa=fa<<1;ga=c[ba>>2]|0;ga=da?fa:ga;c[ba>>2]=ga;ga=c[ba>>2]|0;l=ea;return ga|0}if(0>((32e3<(96e3-(c[W>>2]|0)|0)?32e3:96e3-(c[W>>2]|0)|0)|0))j=0;else j=32e3<(96e3-(c[W>>2]|0)|0)?32e3:96e3-(c[W>>2]|0)|0;g[$>>2]=+(j|0)*3.099999958067201e-06;g[da>>2]=+g[ca>>2]*+g[$>>2];c[ba>>2]=(c[ba>>2]|0)+~~(+g[da>>2]*+(c[ba>>2]|0));fa=c[aa>>2]|0;fa=fa<<1;da=c[ba>>2]|0;da=(fa|0)<(da|0);fa=c[aa>>2]|0;fa=fa<<1;ga=c[ba>>2]|0;ga=da?fa:ga;c[ba>>2]=ga;ga=c[ba>>2]|0;l=ea;return ga|0}function jb(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+44>>2]|0}function kb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;i=m+16|0;k=m+12|0;f=m+8|0;h=m+4|0;j=m;c[i>>2]=a;c[k>>2]=b;c[f>>2]=d;g[j>>2]=0.0;c[h>>2]=0;while(1){e=+g[j>>2];if((c[h>>2]|0)>=(c[f>>2]|0))break;g[j>>2]=e+ +g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]*+g[(c[k>>2]|0)+(c[h>>2]<<2)>>2];c[h>>2]=(c[h>>2]|0)+1}l=m;return +e}function lb(a){a=a|0;var b=0,d=0,e=0,f=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0.0;n=l;l=l+48|0;b=n+32|0;m=n+28|0;d=n+24|0;e=n+20|0;f=n+16|0;h=n+12|0;i=n+8|0;j=n+4|0;k=n;c[m>>2]=a;g[f>>2]=+g[(c[m>>2]|0)+8>>2];a=c[m>>2]|0;if(+g[c[m>>2]>>2]>+g[(c[m>>2]|0)+4>>2]){g[d>>2]=+g[a+4>>2];g[e>>2]=+g[c[m>>2]>>2]}else{g[d>>2]=+g[a>>2];g[e>>2]=+g[(c[m>>2]|0)+4>>2]}a=c[m>>2]|0;if(+g[(c[m>>2]|0)+12>>2]>+g[(c[m>>2]|0)+16>>2]){g[h>>2]=+g[a+16>>2];g[i>>2]=+g[(c[m>>2]|0)+12>>2]}else{g[h>>2]=+g[a+12>>2];g[i>>2]=+g[(c[m>>2]|0)+16>>2]}if(+g[d>>2]>+g[h>>2]){g[j>>2]=+g[d>>2];g[d>>2]=+g[h>>2];g[h>>2]=+g[j>>2];g[k>>2]=+g[e>>2];g[e>>2]=+g[i>>2];g[i>>2]=+g[k>>2]}if(+g[f>>2]>+g[e>>2])if(+g[e>>2]<+g[h>>2]){g[b>>2]=+g[f>>2]<+g[h>>2]?+g[f>>2]:+g[h>>2];o=+g[b>>2];l=n;return +o}else{g[b>>2]=+g[i>>2]<+g[e>>2]?+g[i>>2]:+g[e>>2];o=+g[b>>2];l=n;return +o}else if(+g[f>>2]<+g[h>>2]){g[b>>2]=+g[e>>2]<+g[h>>2]?+g[e>>2]:+g[h>>2];o=+g[b>>2];l=n;return +o}else{g[b>>2]=+g[f>>2]<+g[i>>2]?+g[f>>2]:+g[i>>2];o=+g[b>>2];l=n;return +o}return 0.0}function mb(a){a=a|0;var b=0,d=0,e=0,f=0,h=0,i=0,j=0.0;i=l;l=l+32|0;b=i+16|0;h=i+12|0;d=i+8|0;e=i+4|0;f=i;c[h>>2]=a;a=c[h>>2]|0;if(+g[c[h>>2]>>2]>+g[(c[h>>2]|0)+4>>2]){g[d>>2]=+g[a+4>>2];g[e>>2]=+g[c[h>>2]>>2]}else{g[d>>2]=+g[a>>2];g[e>>2]=+g[(c[h>>2]|0)+4>>2]}g[f>>2]=+g[(c[h>>2]|0)+8>>2];if(+g[e>>2]<+g[f>>2]){g[b>>2]=+g[e>>2];j=+g[b>>2];l=i;return +j}if(+g[d>>2]<+g[f>>2]){g[b>>2]=+g[f>>2];j=+g[b>>2];l=i;return +j}else{g[b>>2]=+g[d>>2];j=+g[b>>2];l=i;return +j}return 0.0}function nb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=+e;var f=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n+20|0;i=n+16|0;h=n+12|0;j=n+8|0;k=n+4|0;f=n;c[m>>2]=a;c[i>>2]=b;c[h>>2]=d;g[j>>2]=e;g[f>>2]=0.0;c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[i>>2]|0))break;e=+A(+(+g[(c[m>>2]|0)+(c[k>>2]<<2)>>2]));g[f>>2]=+g[f>>2]+e;c[k>>2]=(c[k>>2]|0)+1}g[f>>2]=+g[f>>2]+ +(c[h>>2]|0)*+g[j>>2]*+g[f>>2];l=n;return +(+g[f>>2])}function ob(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=sc(48e3,960,0)|0;a=pb(c[e>>2]|0,c[d>>2]|0)|0;l=b;return a|0}function pb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;a=88+((N(c[g>>2]|0,2048+(c[(c[f>>2]|0)+4>>2]|0)|0)|0)-1<<2)|0;c[d>>2]=a+((c[g>>2]|0)*24<<2)+(c[(c[f>>2]|0)+8>>2]<<3<<2);l=e;return c[d>>2]|0}function qb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;f=i+16|0;h=i+12|0;g=i+8|0;j=i+4|0;e=i;c[h>>2]=a;c[g>>2]=b;c[j>>2]=d;b=c[h>>2]|0;a=sc(48e3,960,0)|0;c[e>>2]=rb(b,a,c[j>>2]|0)|0;if(c[e>>2]|0){c[f>>2]=c[e>>2];j=c[f>>2]|0;l=i;return j|0}j=Ma(c[g>>2]|0)|0;c[(c[h>>2]|0)+16>>2]=j;if(!(c[(c[h>>2]|0)+16>>2]|0)){c[f>>2]=-1;j=c[f>>2]|0;l=i;return j|0}else{c[f>>2]=0;j=c[f>>2]|0;l=i;return j|0}return 0}function rb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;g=i+16|0;h=i+12|0;f=i+8|0;e=i+4|0;c[h>>2]=a;c[f>>2]=b;c[e>>2]=d;if((c[e>>2]|0)<0|(c[e>>2]|0)>2){c[g>>2]=-1;h=c[g>>2]|0;l=i;return h|0}if(!(c[h>>2]|0)){c[g>>2]=-7;h=c[g>>2]|0;l=i;return h|0}else{a=c[h>>2]|0;aj(a|0,0,pb(c[f>>2]|0,c[e>>2]|0)|0)|0;c[c[h>>2]>>2]=c[f>>2];c[(c[h>>2]|0)+4>>2]=c[(c[f>>2]|0)+4>>2];a=c[e>>2]|0;c[(c[h>>2]|0)+8>>2]=a;c[(c[h>>2]|0)+12>>2]=a;c[(c[h>>2]|0)+16>>2]=1;c[(c[h>>2]|0)+20>>2]=0;c[(c[h>>2]|0)+24>>2]=c[(c[c[h>>2]>>2]|0)+12>>2];c[(c[h>>2]|0)+28>>2]=1;a=sb()|0;c[(c[h>>2]|0)+32>>2]=a;c[(c[h>>2]|0)+48>>2]=0;tb(c[h>>2]|0,4028,i)|0;c[g>>2]=0;h=c[g>>2]|0;l=i;return h|0}return 0}function sb(){return 0}function tb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;G=l;l=l+128|0;F=G+120|0;m=G+116|0;H=G+112|0;e=G+96|0;n=G+88|0;w=G+84|0;r=G+80|0;B=G+76|0;o=G+72|0;x=G+68|0;p=G+64|0;y=G+60|0;q=G+56|0;z=G+52|0;f=G+48|0;h=G+44|0;i=G+40|0;j=G+36|0;k=G+32|0;s=G+28|0;A=G+24|0;t=G+20|0;C=G+16|0;u=G+12|0;D=G+8|0;v=G+4|0;E=G;c[m>>2]=a;c[H>>2]=b;c[e>>2]=d;a:do switch(c[H>>2]|0){case 10010:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[w>>2]=H;c[n>>2]=c[w>>2];if((c[n>>2]|0)>=0?(c[n>>2]|0)<(c[(c[c[m>>2]>>2]|0)+8>>2]|0):0){c[(c[m>>2]|0)+20>>2]=c[n>>2];e=24}else e=25;break}case 10012:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[B>>2]=H;c[r>>2]=c[B>>2];if((c[r>>2]|0)>=1?(c[r>>2]|0)<=(c[(c[c[m>>2]>>2]|0)+8>>2]|0):0){c[(c[m>>2]|0)+24>>2]=c[r>>2];e=24}else e=25;break}case 10008:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[x>>2]=H;c[o>>2]=c[x>>2];if((c[o>>2]|0)<1|(c[o>>2]|0)>2)e=25;else{c[(c[m>>2]|0)+12>>2]=c[o>>2];e=24}break}case 10007:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[y>>2]=H;c[p>>2]=c[y>>2];if(!(c[p>>2]|0))e=25;else{c[c[p>>2]>>2]=c[(c[m>>2]|0)+40>>2];c[(c[m>>2]|0)+40>>2]=0;e=24}break}case 4027:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[z>>2]=H;c[q>>2]=c[z>>2];if(!(c[q>>2]|0))e=25;else{c[c[q>>2]>>2]=(c[(c[m>>2]|0)+4>>2]|0)/(c[(c[m>>2]|0)+16>>2]|0)|0;e=24}break}case 4028:{c[h>>2]=(c[m>>2]|0)+84+((N(2048+(c[(c[m>>2]|0)+4>>2]|0)|0,c[(c[m>>2]|0)+8>>2]|0)|0)<<2);c[i>>2]=(c[h>>2]|0)+((c[(c[m>>2]|0)+8>>2]|0)*24<<2);c[j>>2]=(c[i>>2]|0)+(c[(c[c[m>>2]>>2]|0)+8>>2]<<1<<2);c[k>>2]=(c[j>>2]|0)+(c[(c[c[m>>2]>>2]|0)+8>>2]<<1<<2);aj((c[m>>2]|0)+36|0,0,(pb(c[c[m>>2]>>2]|0,c[(c[m>>2]|0)+8>>2]|0)|0)-((c[m>>2]|0)+36-(c[m>>2]|0))|0)|0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[c[m>>2]>>2]|0)+8>>2]<<1|0)){e=24;break a}g[(c[k>>2]|0)+(c[f>>2]<<2)>>2]=-28.0;g[(c[j>>2]|0)+(c[f>>2]<<2)>>2]=-28.0;c[f>>2]=(c[f>>2]|0)+1}}case 4033:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[A>>2]=H;c[s>>2]=c[A>>2];if(!(c[s>>2]|0))e=25;else{c[c[s>>2]>>2]=c[(c[m>>2]|0)+52>>2];e=24}break}case 10015:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[C>>2]=H;c[t>>2]=c[C>>2];if(!(c[t>>2]|0))e=25;else{c[c[t>>2]>>2]=c[c[m>>2]>>2];e=24}break}case 10016:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[D>>2]=H;c[u>>2]=c[D>>2];c[(c[m>>2]|0)+28>>2]=c[u>>2];e=24;break}case 4031:{D=(c[e>>2]|0)+(4-1)&~(4-1);H=c[D>>2]|0;c[e>>2]=D+4;c[E>>2]=H;c[v>>2]=c[E>>2];if(!(c[v>>2]|0))e=25;else{c[c[v>>2]>>2]=c[(c[m>>2]|0)+36>>2];e=24}break}default:{c[F>>2]=-5;H=c[F>>2]|0;l=G;return H|0}}while(0);if((e|0)==24){c[F>>2]=0;H=c[F>>2]|0;l=G;return H|0}else if((e|0)==25){c[F>>2]=-1;H=c[F>>2]|0;l=G;return H|0}return 0}function ub(a,d,e,f,h,i,j){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,qa=0,ra=0,sa=0,ua=0,va=0,wa=0;va=l;l=l+304|0;qa=va+288|0;sa=va+284|0;n=va+280|0;ha=va+276|0;oa=va+272|0;fa=va+268|0;da=va+264|0;aa=va+260|0;ba=va+256|0;ga=va+252|0;Z=va+248|0;M=va+244|0;B=va+240|0;k=va+192|0;C=va+184|0;na=va+176|0;wa=va+168|0;ka=va+164|0;la=va+160|0;ma=va+156|0;W=va+152|0;K=va+148|0;R=va+144|0;q=va+140|0;Y=va+136|0;P=va+132|0;Q=va+128|0;ua=va+124|0;ea=va+120|0;I=va+116|0;G=va+112|0;A=va+108|0;U=va+104|0;T=va+100|0;J=va+96|0;H=va+92|0;z=va+88|0;F=va+84|0;y=va+80|0;s=va+76|0;V=va+72|0;E=va+68|0;D=va+64|0;L=va+60|0;O=va+56|0;ia=va+52|0;ja=va+48|0;S=va+44|0;u=va+40|0;p=va+36|0;o=va+32|0;ra=va+28|0;x=va+24|0;w=va+20|0;t=va+16|0;r=va+12|0;v=va+8|0;X=va+4|0;ca=va;c[sa>>2]=a;c[n>>2]=d;c[ha>>2]=e;c[oa>>2]=f;c[fa>>2]=h;c[da>>2]=i;c[aa>>2]=j;c[Y>>2]=c[(c[sa>>2]|0)+8>>2];c[J>>2]=0;c[H>>2]=0;c[D>>2]=0;c[O>>2]=c[(c[sa>>2]|0)+12>>2];c[ia>>2]=c[c[sa>>2]>>2];c[ja>>2]=c[(c[ia>>2]|0)+8>>2];c[S>>2]=c[(c[ia>>2]|0)+4>>2];c[u>>2]=c[(c[ia>>2]|0)+32>>2];c[ua>>2]=c[(c[sa>>2]|0)+20>>2];c[ea>>2]=c[(c[sa>>2]|0)+24>>2];c[fa>>2]=N(c[fa>>2]|0,c[(c[sa>>2]|0)+16>>2]|0)|0;c[wa>>2]=(c[sa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>2]|0)/(c[(c[sa>>2]|0)+16>>2]|0)|0;wa=c[qa>>2]|0;l=va;return wa|0}if(!(c[da>>2]|0)){Hb(k,c[n>>2]|0,c[ha>>2]|0);c[da>>2]=k}a:do if((c[O>>2]|0)==1){c[ga>>2]=0;while(1){if((c[ga>>2]|0)>=(c[ja>>2]|0))break a;if(+g[(c[ka>>2]|0)+(c[ga>>2]<<2)>>2]>+g[(c[ka>>2]|0)+((c[ja>>2]|0)+(c[ga>>2]|0)<<2)>>2])k=c[ga>>2]|0;else k=(c[ja>>2]|0)+(c[ga>>2]|0)|0;g[(c[ka>>2]|0)+(c[ga>>2]<<2)>>2]=+g[(c[ka>>2]|0)+(k<<2)>>2];c[ga>>2]=(c[ga>>2]|0)+1}}while(0);c[z>>2]=c[ha>>2]<<3;c[y>>2]=xb(c[da>>2]|0)|0;do if((c[y>>2]|0)<(c[z>>2]|0))if((c[y>>2]|0)==1){c[L>>2]=Ob(c[da>>2]|0,15)|0;break}else{c[L>>2]=0;break}else c[L>>2]=1;while(0);if(c[L>>2]|0){c[y>>2]=c[ha>>2]<<3;a=c[y>>2]|0;a=a-(xb(c[da>>2]|0)|0)|0;wa=(c[da>>2]|0)+20|0;c[wa>>2]=(c[wa>>2]|0)+a}g[T>>2]=0.0;c[U>>2]=0;c[V>>2]=0;if((c[ua>>2]|0)==0?((c[y>>2]|0)+16|0)<=(c[z>>2]|0):0){if(Ob(c[da>>2]|0,1)|0){c[o>>2]=Qb(c[da>>2]|0,6)|0;wa=16<>2];c[U>>2]=wa+(Rb(c[da>>2]|0,4+(c[o>>2]|0)|0)|0)-1;c[p>>2]=Rb(c[da>>2]|0,3)|0;wa=(xb(c[da>>2]|0)|0)+2|0;if((wa|0)<=(c[z>>2]|0))c[V>>2]=Pb(c[da>>2]|0,25571,2)|0;g[T>>2]=+((c[p>>2]|0)+1|0)*.09375}c[y>>2]=xb(c[da>>2]|0)|0}if((c[P>>2]|0)>0?((c[y>>2]|0)+3|0)<=(c[z>>2]|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ja=0,la=0,ma=0;ma=l;l=l+4608|0;la=ma+4596|0;ea=ma+4592|0;M=ma+4588|0;fa=ma+4584|0;ha=ma+4580|0;da=ma+4576|0;ga=ma+4568|0;Y=ma+4560|0;C=ma+4556|0;X=ma+4552|0;i=ma+4548|0;j=ma+4544|0;O=ma+4540|0;ca=ma+4536|0;W=ma+4532|0;ja=ma+4528|0;ba=ma+4524|0;ia=ma+4520|0;h=ma+4516|0;S=ma+4512|0;aa=ma+4508|0;U=ma+4504|0;T=ma+4500|0;R=ma+4496|0;Z=ma+4492|0;V=ma+4488|0;Q=ma+4484|0;P=ma+4480|0;L=ma+4476|0;z=ma+4472|0;F=ma+4468|0;H=ma+4464|0;v=ma+368|0;s=ma+360|0;q=ma+356|0;n=ma+352|0;r=ma+348|0;y=ma+344|0;x=ma+340|0;w=ma+336|0;A=ma+332|0;p=ma+232|0;D=ma+136|0;k=ma+128|0;m=ma+124|0;t=ma+120|0;u=ma+116|0;I=ma+112|0;E=ma+16|0;o=ma+12|0;J=ma+8|0;G=ma+4|0;K=ma;c[la>>2]=a;c[ea>>2]=d;c[M>>2]=e;c[da>>2]=c[(c[la>>2]|0)+8>>2];c[ca>>2]=c[c[la>>2]>>2];c[W>>2]=c[(c[ca>>2]|0)+8>>2];c[ja>>2]=c[(c[ca>>2]|0)+4>>2];c[S>>2]=c[(c[ca>>2]|0)+32>>2];c[fa>>2]=0;do{a=(c[la>>2]|0)+84+((N(c[fa>>2]|0,2048+(c[ja>>2]|0)|0)|0)<<2)|0;c[ga+(c[fa>>2]<<2)>>2]=a;c[Y+(c[fa>>2]<<2)>>2]=(c[ga+(c[fa>>2]<<2)>>2]|0)+8192+(0-(c[ea>>2]|0)<<2);a=(c[fa>>2]|0)+1|0;c[fa>>2]=a}while((a|0)<(c[da>>2]|0));c[C>>2]=(c[la>>2]|0)+84+((N(2048+(c[ja>>2]|0)|0,c[da>>2]|0)|0)<<2);c[X>>2]=(c[C>>2]|0)+((c[da>>2]|0)*24<<2);c[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>>2]|0)|0;c[F>>2]=ba;c[(c[la>>2]|0)+44>>2]=ba}else{c[F>>2]=c[(c[la>>2]|0)+44>>2];g[z>>2]=.800000011920929}ba=c[ja>>2]|0;c[H>>2]=$()|0;d=l;l=l+((1*(ba<<2)|0)+15&-16)|0;c[L>>2]=c[(c[ca>>2]|0)+60>>2];c[fa>>2]=0;do{g[n>>2]=0.0;c[r>>2]=c[ga+(c[fa>>2]<<2)>>2];c[ha>>2]=0;while(1){if((c[ha>>2]|0)>=1024)break;g[v+(c[ha>>2]<<2)>>2]=+g[(c[r>>2]|0)+(1024+(c[ha>>2]|0)<<2)>>2];c[ha>>2]=(c[ha>>2]|0)+1}if(!(c[ia>>2]|0)){Hc(v,p,c[L>>2]|0,c[ja>>2]|0,24,1024,c[(c[la>>2]|0)+32>>2]|0)|0;g[p>>2]=+g[p>>2]*1.000100016593933;c[ha>>2]=1;while(1){if((c[ha>>2]|0)>24)break;ca=p+(c[ha>>2]<<2)|0;g[ca>>2]=+g[ca>>2]-+g[p+(c[ha>>2]<<2)>>2]*6.400000711437315e-05*+(c[ha>>2]|0)*+(c[ha>>2]|0);c[ha>>2]=(c[ha>>2]|0)+1}Dc((c[C>>2]|0)+((c[fa>>2]|0)*24<<2)|0,p,24)}c[w>>2]=(c[F>>2]<<1|0)<1024?c[F>>2]<<1:1024;c[ha>>2]=0;while(1){if((c[ha>>2]|0)>=24)break;g[D+(c[ha>>2]<<2)>>2]=+g[(c[r>>2]|0)+(2048-(c[w>>2]|0)-1-(c[ha>>2]|0)<<2)>>2];c[ha>>2]=(c[ha>>2]|0)+1}Ec(v+4096+(0-(c[w>>2]|0)<<2)|0,(c[C>>2]|0)+((c[fa>>2]|0)*24<<2)|0,v+4096+(0-(c[w>>2]|0)<<2)|0,c[w>>2]|0,24,D,c[(c[la>>2]|0)+32>>2]|0);g[k>>2]=1.0;g[m>>2]=1.0;c[t>>2]=c[w>>2]>>1;c[ha>>2]=0;while(1){if((c[ha>>2]|0)>=(c[t>>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0-(c[ea>>2]|0)<<2)|0,c[x>>2]|0,24,E,c[(c[la>>2]|0)+32>>2]|0);g[o>>2]=0.0;c[ha>>2]=0;while(1){if((c[ha>>2]|0)>=(c[x>>2]|0))break;g[J>>2]=+g[(c[r>>2]|0)+(2048-(c[ea>>2]|0)+(c[ha>>2]|0)<<2)>>2];g[o>>2]=+g[o>>2]+ +g[J>>2]*+g[J>>2];c[ha>>2]=(c[ha>>2]|0)+1}a:do if(+g[n>>2]>+g[o>>2]*.20000000298023224){if(+g[n>>2]<+g[o>>2]){g[G>>2]=+B(+((+g[n>>2]+1.0)/(+g[o>>2]+1.0)));c[ha>>2]=0;while(1){if((c[ha>>2]|0)>=(c[ja>>2]|0))break;g[K>>2]=1.0-+g[(c[L>>2]|0)+(c[ha>>2]<<2)>>2]*(1.0-+g[G>>2]);g[(c[r>>2]|0)+(2048-(c[ea>>2]|0)+(c[ha>>2]|0)<<2)>>2]=+g[K>>2]*+g[(c[r>>2]|0)+(2048-(c[ea>>2]|0)+(c[ha>>2]|0)<<2)>>2];c[ha>>2]=(c[ha>>2]|0)+1}c[ha>>2]=c[ja>>2];while(1){if((c[ha>>2]|0)>=(c[x>>2]|0))break a;g[(c[r>>2]|0)+(2048-(c[ea>>2]|0)+(c[ha>>2]|0)<<2)>>2]=+g[G>>2]*+g[(c[r>>2]|0)+(2048-(c[ea>>2]|0)+(c[ha>>2]|0)<<2)>>2];c[ha>>2]=(c[ha>>2]|0)+1}}}else{c[ha>>2]=0;while(1){if((c[ha>>2]|0)>=(c[x>>2]|0))break a;g[(c[r>>2]|0)+(2048-(c[ea>>2]|0)+(c[ha>>2]|0)<<2)>>2]=0.0;c[ha>>2]=(c[ha>>2]|0)+1}}while(0);Na(d,(c[r>>2]|0)+8192|0,c[(c[la>>2]|0)+52>>2]|0,c[(c[la>>2]|0)+52>>2]|0,c[ja>>2]|0,-+g[(c[la>>2]|0)+60>>2],-+g[(c[la>>2]|0)+60>>2],c[(c[la>>2]|0)+68>>2]|0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2)>>2];c[B>>2]=(c[w>>2]|0)+(c[p>>2]<<2);D=(c[r>>2]|0)>1;c[t>>2]=0;a:do if(D){while(1){if((c[t>>2]|0)>=(c[m>>2]|0))break;g[y>>2]=+g[(c[A>>2]|0)+(c[t>>2]<<2)>>2]+ +g[u>>2]+1.0000000031710769e-30;g[u>>2]=+g[q>>2]*+g[y>>2];g[e+(c[t>>2]<<2)>>2]=+g[y>>2];c[t>>2]=(c[t>>2]|0)+1}c[o>>2]=1}else while(1){if((c[t>>2]|0)>=(c[m>>2]|0))break a;g[z>>2]=+g[(c[A>>2]|0)+(c[t>>2]<<2)>>2]+ +g[u>>2]+1.0000000031710769e-30;g[u>>2]=+g[q>>2]*+g[z>>2];g[(c[B>>2]|0)+((N(c[t>>2]|0,c[k>>2]|0)|0)<<2)>>2]=+g[z>>2]*.000030517578125;c[t>>2]=(c[t>>2]|0)+1}while(0);g[(c[v>>2]|0)+(c[p>>2]<<2)>>2]=+g[u>>2];b:do if(c[o>>2]|0){c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[n>>2]|0))break b;E=+g[e+((N(c[t>>2]|0,c[r>>2]|0)|0)<<2)>>2]*.000030517578125;g[(c[B>>2]|0)+((N(c[t>>2]|0,c[k>>2]|0)|0)<<2)>>2]=E;c[t>>2]=(c[t>>2]|0)+1}}while(0);D=(c[p>>2]|0)+1|0;c[p>>2]=D}while((D|0)<(c[k>>2]|0));_(c[x>>2]|0);l=C;return}function xb(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function yb(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+64|0;r=x+52|0;n=x+48|0;p=x+44|0;u=x+40|0;i=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[J>>2]>>2]|0)+(((c[K>>2]|0)/2|0)<<2);oa(c[G>>2]|0,c[x>>2]|0,i,c[I>>2]|0,c[P>>2]|0,c[C>>2]|0,c[u>>2]|0,c[B>>2]|0,c[O>>2]|0);oa(c[G>>2]|0,(c[x>>2]|0)+(c[v>>2]<<2)|0,c[E>>2]|0,(c[I>>2]|0)+(c[H>>2]<<2)|0,c[P>>2]|0,c[C>>2]|0,c[u>>2]|0,c[B>>2]|0,c[O>>2]|0);c[F>>2]=0;while(1){if((c[F>>2]|0)>=(c[v>>2]|0))break;g[i+(c[F>>2]<<2)>>2]=(+g[i+(c[F>>2]<<2)>>2]+ +g[(c[E>>2]|0)+(c[F>>2]<<2)>>2])*.5;c[F>>2]=(c[F>>2]|0)+1}c[z>>2]=0;while(1){if((c[z>>2]|0)>=(c[q>>2]|0))break;R=(c[c[J>>2]>>2]|0)+((N(c[w>>2]|0,c[z>>2]|0)|0)<<2)|0;rc((c[G>>2]|0)+64|0,i+(c[z>>2]<<2)|0,R,c[(c[G>>2]|0)+60>>2]|0,c[K>>2]|0,c[M>>2]|0,c[q>>2]|0,c[y>>2]|0);c[z>>2]=(c[z>>2]|0)+1}R=c[L>>2]|0;_(R|0);l=Q;return}function Ab(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+44>>2]|0}function Bb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;f=l;l=l+4112|0;j=f+4108|0;i=f+4104|0;g=f+4100|0;e=f+4096|0;h=f;c[j>>2]=a;c[i>>2]=b;c[g>>2]=d;tc(c[j>>2]|0,h,2048,c[i>>2]|0,c[g>>2]|0);yc(h+1440|0,h,1328,620,e,c[g>>2]|0);c[e>>2]=720-(c[e>>2]|0);l=f;return c[e>>2]|0}function Cb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;i=f+12|0;h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;c[(c[f>>2]|0)+28>>2]=128;a=Ib(c[f>>2]|0)|0;c[(c[f>>2]|0)+40>>2]=a;c[(c[f>>2]|0)+32>>2]=(c[(c[f>>2]|0)+28>>2]|0)-1-(c[(c[f>>2]|0)+40>>2]>>1);c[(c[f>>2]|0)+44>>2]=0;Jb(c[f>>2]|0);l=e;return}function Ib(a){a=a|0;var b=0,e=0,f=0;e=l;l=l+16|0;b=e;c[b>>2]=a;if((c[(c[b>>2]|0)+24>>2]|0)>>>0>=(c[(c[b>>2]|0)+4>>2]|0)>>>0){b=0;l=e;return b|0}a=c[c[b>>2]>>2]|0;f=(c[b>>2]|0)+24|0;b=c[f>>2]|0;c[f>>2]=b+1;b=d[a+b>>0]|0;l=e;return b|0}function Jb(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;while(1){if((c[(c[b>>2]|0)+28>>2]|0)>>>0>8388608)break;a=(c[b>>2]|0)+20|0;c[a>>2]=(c[a>>2]|0)+8;a=(c[b>>2]|0)+28|0;c[a>>2]=c[a>>2]<<8;c[d>>2]=c[(c[b>>2]|0)+40>>2];a=Ib(c[b>>2]|0)|0;c[(c[b>>2]|0)+40>>2]=a;c[d>>2]=(c[d>>2]<<8|c[(c[b>>2]|0)+40>>2])>>1;c[(c[b>>2]|0)+32>>2]=(c[(c[b>>2]|0)+32>>2]<<8)+(255&~c[d>>2])&2147483647}l=e;return}function Kb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+8|0;e=f+4|0;d=f;c[g>>2]=a;c[e>>2]=b;a=Lb(c[(c[g>>2]|0)+28>>2]|0,c[e>>2]|0)|0;c[(c[g>>2]|0)+36>>2]=a;c[d>>2]=((c[(c[g>>2]|0)+32>>2]|0)>>>0)/((c[(c[g>>2]|0)+36>>2]|0)>>>0)|0;l=f;return (c[e>>2]|0)-((c[d>>2]|0)+1+((c[e>>2]|0)-((c[d>>2]|0)+1)&0-((c[e>>2]|0)>>>0<((c[d>>2]|0)+1|0)>>>0&1)))|0}function Lb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>>>0)/((c[d>>2]|0)>>>0)|0|0}function Mb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+8|0;e=f+4|0;d=f;c[g>>2]=a;c[e>>2]=b;c[(c[g>>2]|0)+36>>2]=(c[(c[g>>2]|0)+28>>2]|0)>>>(c[e>>2]|0);c[d>>2]=((c[(c[g>>2]|0)+32>>2]|0)>>>0)/((c[(c[g>>2]|0)+36>>2]|0)>>>0)|0;l=f;return (1<>2])-((c[d>>2]|0)+1+((1<>2])-((c[d>>2]|0)+1)&0-(1<>2]>>>0<((c[d>>2]|0)+1|0)>>>0&1)))|0}function Nb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;h=j+16|0;g=j+12|0;f=j+8|0;k=j+4|0;i=j;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;c[k>>2]=e;c[i>>2]=N(c[(c[h>>2]|0)+36>>2]|0,(c[k>>2]|0)-(c[f>>2]|0)|0)|0;d=(c[h>>2]|0)+32|0;c[d>>2]=(c[d>>2]|0)-(c[i>>2]|0);d=c[h>>2]|0;if((c[g>>2]|0)>>>0>0){i=N(c[d+36>>2]|0,(c[f>>2]|0)-(c[g>>2]|0)|0)|0;k=c[h>>2]|0;k=k+28|0;c[k>>2]=i;k=c[h>>2]|0;Jb(k);l=j;return}else{i=(c[d+28>>2]|0)-(c[i>>2]|0)|0;k=c[h>>2]|0;k=k+28|0;c[k>>2]=i;k=c[h>>2]|0;Jb(k);l=j;return}}function Ob(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;d=i+20|0;j=i+16|0;f=i+12|0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2]|0)-(c[g>>2]|0)|0)|0;c[(c[i>>2]|0)+28>>2]=j;j=c[i>>2]|0;Wb(j);l=k;return}else{a=N(c[j>>2]|0,(c[h>>2]|0)-(c[f>>2]|0)|0)|0;j=(c[i>>2]|0)+28|0;c[j>>2]=(c[j>>2]|0)-a;j=c[i>>2]|0;Wb(j);l=k;return}}function Vb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>>>0)/((c[d>>2]|0)>>>0)|0|0}function Wb(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;while(1){if((c[(c[b>>2]|0)+28>>2]|0)>>>0>8388608)break;Xb(c[b>>2]|0,(c[(c[b>>2]|0)+32>>2]|0)>>>23);c[(c[b>>2]|0)+32>>2]=c[(c[b>>2]|0)+32>>2]<<8&2147483647;a=(c[b>>2]|0)+28|0;c[a>>2]=c[a>>2]<<8;a=(c[b>>2]|0)+20|0;c[a>>2]=(c[a>>2]|0)+8}l=d;return}function Xb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+12|0;d=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[d>>2]=b;if((c[d>>2]|0)==255){g=(c[e>>2]|0)+36|0;c[g>>2]=(c[g>>2]|0)+1;l=h;return}c[f>>2]=c[d>>2]>>8;if((c[(c[e>>2]|0)+40>>2]|0)>=0){b=Yb(c[e>>2]|0,(c[(c[e>>2]|0)+40>>2]|0)+(c[f>>2]|0)|0)|0;a=(c[e>>2]|0)+44|0;c[a>>2]=c[a>>2]|b}if((c[(c[e>>2]|0)+36>>2]|0)>>>0>0){c[g>>2]=255+(c[f>>2]|0)&255;do{f=Yb(c[e>>2]|0,c[g>>2]|0)|0;a=(c[e>>2]|0)+44|0;c[a>>2]=c[a>>2]|f;a=(c[e>>2]|0)+36|0;f=(c[a>>2]|0)+-1|0;c[a>>2]=f}while(f>>>0>0)}c[(c[e>>2]|0)+40>>2]=c[d>>2]&255;l=h;return}function Yb(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+8|0;e=h+4|0;f=h;c[e>>2]=b;c[f>>2]=d;if(((c[(c[e>>2]|0)+24>>2]|0)+(c[(c[e>>2]|0)+8>>2]|0)|0)>>>0>=(c[(c[e>>2]|0)+4>>2]|0)>>>0){c[g>>2]=-1;g=c[g>>2]|0;l=h;return g|0}else{b=c[f>>2]&255;d=c[c[e>>2]>>2]|0;e=(c[e>>2]|0)+24|0;f=c[e>>2]|0;c[e>>2]=f+1;a[d+f>>0]=b;c[g>>2]=0;g=c[g>>2]|0;l=h;return g|0}return 0}function Zb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;i=k+16|0;h=k+12|0;g=k+8|0;f=k+4|0;j=k;c[i>>2]=a;c[h>>2]=b;c[g>>2]=d;c[f>>2]=e;c[j>>2]=(c[(c[i>>2]|0)+28>>2]|0)>>>(c[f>>2]|0);if((c[h>>2]|0)>>>0>0){b=(c[(c[i>>2]|0)+28>>2]|0)-(N(c[j>>2]|0,(1<>2])-(c[h>>2]|0)|0)|0)|0;a=(c[i>>2]|0)+32|0;c[a>>2]=(c[a>>2]|0)+b;j=N(c[j>>2]|0,(c[g>>2]|0)-(c[h>>2]|0)|0)|0;c[(c[i>>2]|0)+28>>2]=j;j=c[i>>2]|0;Wb(j);l=k;return}else{a=N(c[j>>2]|0,(1<>2])-(c[g>>2]|0)|0)|0;j=(c[i>>2]|0)+28|0;c[j>>2]=(c[j>>2]|0)-a;j=c[i>>2]|0;Wb(j);l=k;return}}function _b(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+20|0;f=j+16|0;k=j+12|0;h=j+8|0;i=j+4|0;g=j;c[e>>2]=a;c[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e>>2]>>2]|0;d=c[(c[e>>2]|0)+4>>2]|0;e=(c[e>>2]|0)+8|0;f=(c[e>>2]|0)+1|0;c[e>>2]=f;a[b+(d-f)>>0]=i;c[g>>2]=0;g=c[g>>2]|0;l=h;return g|0}return 0}function dc(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;h=m+16|0;i=m+12|0;g=m+8|0;k=m+4|0;j=m;c[h>>2]=b;c[i>>2]=e;c[g>>2]=f;c[k>>2]=8-(c[g>>2]|0);c[j>>2]=(1<>2])-1<>2];f=c[h>>2]|0;if((c[(c[h>>2]|0)+24>>2]|0)>>>0>0){a[c[c[h>>2]>>2]>>0]=(d[c[f>>2]>>0]|0)&~c[j>>2]|c[i>>2]<>2];l=m;return}b=c[h>>2]|0;if((c[f+40>>2]|0)>=0){c[(c[h>>2]|0)+40>>2]=c[b+40>>2]&~c[j>>2]|c[i>>2]<>2];l=m;return}f=c[h>>2]|0;if((c[b+28>>2]|0)>>>0<=-2147483648>>>(c[g>>2]|0)>>>0){c[(c[h>>2]|0)+32>>2]=c[f+32>>2]&~(c[j>>2]<<23)|c[i>>2]<<23+(c[k>>2]|0);l=m;return}else{c[f+44>>2]=-1;l=m;return}}function ec(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;$i((c[c[e>>2]>>2]|0)+(c[f>>2]|0)+(0-(c[(c[e>>2]|0)+8>>2]|0))|0,(c[c[e>>2]>>2]|0)+(c[(c[e>>2]|0)+4>>2]|0)+(0-(c[(c[e>>2]|0)+8>>2]|0))|0,(c[(c[e>>2]|0)+8>>2]|0)+0|0)|0;c[(c[e>>2]|0)+4>>2]=c[f>>2];l=d;return}function fc(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;g=k+20|0;j=k+16|0;i=k+12|0;e=k+8|0;f=k+4|0;h=k;c[g>>2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break a}c[g>>2]=(c[g>>2]|0)+1}c[i>>2]=(c[i>>2]|0)+1}if((a|0)==7){if(c[h>>2]|0)c[c[h>>2]>>2]=0;c[j>>2]=c[5544+(c[i>>2]<<2)>>2];j=c[j>>2]|0;l=k;return j|0}else if((a|0)==12){if(c[h>>2]|0)c[c[h>>2]>>2]=-1;c[j>>2]=0;j=c[j>>2]|0;l=k;return j|0}return 0}function tc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+112|0;s=u+108|0;t=u+104|0;n=u+100|0;h=u+96|0;j=u+92|0;m=u+88|0;i=u+68|0;r=u+64|0;o=u+48|0;q=u+24|0;p=u+4|0;k=u;c[s>>2]=a;c[t>>2]=b;c[n>>2]=d;c[h>>2]=e;c[j>>2]=f;g[r>>2]=1.0;c[q>>2]=0;c[q+4>>2]=0;c[q+8>>2]=0;c[q+12>>2]=0;c[q+16>>2]=0;g[k>>2]=.800000011920929;c[m>>2]=1;while(1){e=c[c[s>>2]>>2]|0;if((c[m>>2]|0)>=(c[n>>2]>>1|0))break;g[(c[t>>2]|0)+(c[m>>2]<<2)>>2]=((+g[e+((c[m>>2]<<1)-1<<2)>>2]+ +g[(c[c[s>>2]>>2]|0)+((c[m>>2]<<1)+1<<2)>>2])*.5+ +g[(c[c[s>>2]>>2]|0)+(c[m>>2]<<1<<2)>>2])*.5;c[m>>2]=(c[m>>2]|0)+1}g[c[t>>2]>>2]=(+g[e+4>>2]*.5+ +g[c[c[s>>2]>>2]>>2])*.5;if((c[h>>2]|0)==2){c[m>>2]=1;while(1){e=c[(c[s>>2]|0)+4>>2]|0;if((c[m>>2]|0)>=(c[n>>2]>>1|0))break;h=(c[t>>2]|0)+(c[m>>2]<<2)|0;g[h>>2]=+g[h>>2]+((+g[e+((c[m>>2]<<1)-1<<2)>>2]+ +g[(c[(c[s>>2]|0)+4>>2]|0)+((c[m>>2]<<1)+1<<2)>>2])*.5+ +g[(c[(c[s>>2]|0)+4>>2]|0)+(c[m>>2]<<1<<2)>>2])*.5;c[m>>2]=(c[m>>2]|0)+1}h=c[t>>2]|0;g[h>>2]=+g[h>>2]+(+g[e+4>>2]*.5+ +g[c[(c[s>>2]|0)+4>>2]>>2])*.5}Hc(c[t>>2]|0,i,0,0,4,c[n>>2]>>1,c[j>>2]|0)|0;g[i>>2]=+g[i>>2]*1.000100016593933;c[m>>2]=1;while(1){if((c[m>>2]|0)>4)break;s=i+(c[m>>2]<<2)|0;g[s>>2]=+g[s>>2]-+g[i+(c[m>>2]<<2)>>2]*(+(c[m>>2]|0)*.00800000037997961)*(+(c[m>>2]|0)*.00800000037997961);c[m>>2]=(c[m>>2]|0)+1}Dc(o,i,4);c[m>>2]=0;while(1){if((c[m>>2]|0)>=4)break;g[r>>2]=+g[r>>2]*.8999999761581421;g[o+(c[m>>2]<<2)>>2]=+g[o+(c[m>>2]<<2)>>2]*+g[r>>2];c[m>>2]=(c[m>>2]|0)+1}g[p>>2]=+g[o>>2]+.800000011920929;g[p+4>>2]=+g[o+4>>2]+ +g[k>>2]*+g[o>>2];g[p+8>>2]=+g[o+8>>2]+ +g[k>>2]*+g[o+4>>2];g[p+12>>2]=+g[o+12>>2]+ +g[k>>2]*+g[o+8>>2];g[p+16>>2]=+g[k>>2]*+g[o+12>>2];uc(c[t>>2]|0,p,c[t>>2]|0,c[n>>2]>>1,q);l=u;return}function uc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+80|0;w=y+64|0;z=y+60|0;x=y+56|0;h=y+52|0;j=y+48|0;i=y+44|0;q=y+40|0;r=y+36|0;s=y+32|0;t=y+28|0;u=y+24|0;k=y+20|0;m=y+16|0;n=y+12|0;o=y+8|0;p=y+4|0;v=y;c[w>>2]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>2]<<1)|0}while(0);Bc(c[K>>2]|0,(c[K>>2]|0)+(0-(c[q>>2]|0)<<2)|0,(c[K>>2]|0)+(0-(c[r>>2]|0)<<2)|0,c[m>>2]|0,O,P);g[O>>2]=+g[O>>2]+ +g[P>>2];g[Q>>2]=+g[f+(c[q>>2]<<2)>>2]+ +g[f+(c[r>>2]<<2)>>2];g[x>>2]=+g[O>>2]/+B(+(+g[M>>2]*2.0*1.0*+g[Q>>2]+1.0));do if((A((c[q>>2]|0)-(c[H>>2]|0)|0)|0)<=1)g[u>>2]=+g[G>>2];else{if((A((c[q>>2]|0)-(c[H>>2]|0)|0)|0)<=2?(k=N((c[y>>2]|0)*5|0,c[y>>2]|0)|0,(k|0)<(c[o>>2]|0)):0){g[u>>2]=+g[G>>2]*.5;break}g[u>>2]=0.0}while(0);if(.30000001192092896>+g[w>>2]*.699999988079071-+g[u>>2])i=.30000001192092896;else i=+g[w>>2]*.699999988079071-+g[u>>2];g[J>>2]=i;if((c[q>>2]|0)>=((c[C>>2]|0)*3|0)){if((c[q>>2]|0)<(c[C>>2]<<1|0)){if(.5>+g[w>>2]*.8999999761581421-+g[u>>2])i=.5;else i=+g[w>>2]*.8999999761581421-+g[u>>2];g[J>>2]=i}}else{if(.4000000059604645>+g[w>>2]*.8500000238418579-+g[u>>2])i=.4000000059604645;else i=+g[w>>2]*.8500000238418579-+g[u>>2];g[J>>2]=i}if(+g[x>>2]>+g[J>>2]){g[s>>2]=+g[O>>2];g[t>>2]=+g[Q>>2];c[n>>2]=c[q>>2];g[v>>2]=+g[x>>2]}c[y>>2]=(c[y>>2]|0)+1}g[s>>2]=0.0>+g[s>>2]?0.0:+g[s>>2];if(+g[t>>2]<=+g[s>>2])g[F>>2]=1.0;else g[F>>2]=+g[s>>2]/(+g[t>>2]+1.0);c[y>>2]=0;while(1){if((c[y>>2]|0)>=3)break;i=+xc(c[K>>2]|0,(c[K>>2]|0)+(0-((c[n>>2]|0)+(c[y>>2]|0)-1)<<2)|0,c[m>>2]|0);g[L+(c[y>>2]<<2)>>2]=i;c[y>>2]=(c[y>>2]|0)+1}do if(!(+g[L+8>>2]-+g[L>>2]>(+g[L+4>>2]-+g[L>>2])*.699999988079071))if(+g[L>>2]-+g[L+8>>2]>(+g[L+4>>2]-+g[L+8>>2])*.699999988079071){c[E>>2]=-1;break}else{c[E>>2]=0;break}else c[E>>2]=1;while(0);if(+g[F>>2]>+g[v>>2])g[F>>2]=+g[v>>2];c[c[p>>2]>>2]=(c[n>>2]<<1)+(c[E>>2]|0);if((c[c[p>>2]>>2]|0)>=(c[D>>2]|0)){i=+g[F>>2];Q=c[I>>2]|0;_(Q|0);l=R;return +i}c[c[p>>2]>>2]=c[D>>2];i=+g[F>>2];Q=c[I>>2]|0;_(Q|0);l=R;return +i}function Bc(a,b,d,e,f,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;var i=0.0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;m=t+32|0;r=t+28|0;s=t+24|0;j=t+20|0;p=t+16|0;q=t+12|0;k=t+8|0;n=t+4|0;o=t;c[m>>2]=a;c[r>>2]=b;c[s>>2]=d;c[j>>2]=e;c[p>>2]=f;c[q>>2]=h;g[n>>2]=0.0;g[o>>2]=0.0;c[k>>2]=0;while(1){i=+g[n>>2];if((c[k>>2]|0)>=(c[j>>2]|0))break;g[n>>2]=i+ +g[(c[m>>2]|0)+(c[k>>2]<<2)>>2]*+g[(c[r>>2]|0)+(c[k>>2]<<2)>>2];g[o>>2]=+g[o>>2]+ +g[(c[m>>2]|0)+(c[k>>2]<<2)>>2]*+g[(c[s>>2]|0)+(c[k>>2]<<2)>>2];c[k>>2]=(c[k>>2]|0)+1}g[c[p>>2]>>2]=i;g[c[q>>2]>>2]=+g[o>>2];l=t;return}function Cc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[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>2]=(c[i>>2]|0)+1}g[f>>2]=+g[f>>2]-+g[m>>2]*+g[m>>2]*+g[f>>2];if(+g[f>>2]<+g[c[e>>2]>>2]*1.0000000474974513e-03){a=15;break}c[h>>2]=(c[h>>2]|0)+1}if((a|0)==15){l=q;return}}function Ec(a,b,d,e,f,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;k=v+60|0;q=v+56|0;m=v+52|0;j=v+48|0;r=v+44|0;p=v+40|0;n=v+32|0;o=v+28|0;s=v+24|0;t=v+8|0;u=v;c[k>>2]=a;c[q>>2]=b;c[m>>2]=d;c[j>>2]=e;c[r>>2]=f;c[p>>2]=h;c[v+36>>2]=i;a=c[r>>2]|0;c[s>>2]=$()|0;e=l;l=l+((1*(a<<2)|0)+15&-16)|0;a=l;l=l+((1*((c[j>>2]|0)+(c[r>>2]|0)<<2)|0)+15&-16)|0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[r>>2]|0))break;g[e+(c[n>>2]<<2)>>2]=+g[(c[q>>2]|0)+((c[r>>2]|0)-(c[n>>2]|0)-1<<2)>>2];c[n>>2]=(c[n>>2]|0)+1}c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[r>>2]|0))break;g[a+(c[n>>2]<<2)>>2]=+g[(c[p>>2]|0)+((c[r>>2]|0)-(c[n>>2]|0)-1<<2)>>2];c[n>>2]=(c[n>>2]|0)+1}c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[j>>2]|0))break;g[a+((c[n>>2]|0)+(c[r>>2]|0)<<2)>>2]=+g[(c[k>>2]|0)+(c[n>>2]<<2)>>2];c[n>>2]=(c[n>>2]|0)+1}c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[r>>2]|0))break;g[(c[p>>2]|0)+(c[n>>2]<<2)>>2]=+g[(c[k>>2]|0)+((c[j>>2]|0)-(c[n>>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h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0;t=l;l=l+48|0;n=t+36|0;r=t+32|0;s=t+28|0;o=t+24|0;q=t+20|0;i=t+16|0;j=t+12|0;p=t+8|0;m=t+4|0;k=t;c[n>>2]=a;c[r>>2]=b;c[s>>2]=d;c[o>>2]=e;c[q>>2]=f;c[i>>2]=h;g[m>>2]=0.0;c[j>>2]=0;do{c[p>>2]=c[s>>2];while(1){if((c[p>>2]|0)>=(c[o>>2]|0))break;u=+g[(c[n>>2]|0)+((c[p>>2]|0)+(N(c[j>>2]|0,c[q>>2]|0)|0)<<2)>>2];g[k>>2]=u-+g[(c[r>>2]|0)+((c[p>>2]|0)+(N(c[j>>2]|0,c[q>>2]|0)|0)<<2)>>2];g[m>>2]=+g[m>>2]+ +g[k>>2]*+g[k>>2];c[p>>2]=(c[p>>2]|0)+1}d=(c[j>>2]|0)+1|0;c[j>>2]=d}while((d|0)<(c[i>>2]|0));l=t;return +(200.0<+g[m>>2]?200.0:+g[m>>2])}function Kc(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0} +function gg(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+48|0;i=k+40|0;h=k+36|0;g=k+32|0;e=k+8|0;f=k+4|0;j=k;c[i>>2]=a;c[h>>2]=d;c[g>>2]=Pb(c[i>>2]|0,28974,8)|0;c[e+8>>2]=(c[g>>2]|0)/5|0;c[e+12+8>>2]=(c[g>>2]|0)-((c[e+8>>2]|0)*5|0);c[g>>2]=0;while(1){if((c[g>>2]|0)>=2)break;a=Pb(c[i>>2]|0,29027,8)|0;c[e+((c[g>>2]|0)*12|0)>>2]=a;a=Pb(c[i>>2]|0,29034,8)|0;c[e+((c[g>>2]|0)*12|0)+4>>2]=a;c[g>>2]=(c[g>>2]|0)+1}c[g>>2]=0;while(1){if((c[g>>2]|0)>=2)break;i=e+((c[g>>2]|0)*12|0)|0;c[i>>2]=(c[i>>2]|0)+((c[e+((c[g>>2]|0)*12|0)+8>>2]|0)*3|0);c[f>>2]=b[24526+(c[e+((c[g>>2]|0)*12|0)>>2]<<1)>>1];c[j>>2]=(((b[24526+((c[e+((c[g>>2]|0)*12|0)>>2]|0)+1<<1)>>1]|0)-(c[f>>2]|0)>>16)*6554|0)+(((b[24526+((c[e+((c[g>>2]|0)*12|0)>>2]|0)+1<<1)>>1]|0)-(c[f>>2]|0)&65535)*6554>>16);i=(c[f>>2]|0)+(N((c[j>>2]&65535)<<16>>16,((c[e+((c[g>>2]|0)*12|0)+4>>2]<<1)+1&65535)<<16>>16)|0)|0;c[(c[h>>2]|0)+(c[g>>2]<<2)>>2]=i;c[g>>2]=(c[g>>2]|0)+1}j=c[h>>2]|0;c[j>>2]=(c[j>>2]|0)-(c[(c[h>>2]|0)+4>>2]|0);l=k;return}function hg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;a=Pb(c[f>>2]|0,28999,8)|0;c[c[e>>2]>>2]=a;l=d;return}function ig(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+8|0;e=h+4|0;f=h;c[g>>2]=b;c[e>>2]=d;c[f>>2]=((a[(c[e>>2]|0)+2>>0]|0)*5|0)+(a[(c[e>>2]|0)+3+2>>0]|0);$b(c[g>>2]|0,c[f>>2]|0,28974,8);c[f>>2]=0;while(1){if((c[f>>2]|0)>=2)break;$b(c[g>>2]|0,a[(c[e>>2]|0)+((c[f>>2]|0)*3|0)>>0]|0,29027,8);$b(c[g>>2]|0,a[(c[e>>2]|0)+((c[f>>2]|0)*3|0)+1>>0]|0,29034,8);c[f>>2]=(c[f>>2]|0)+1}l=h;return}function jg(b,d){b=b|0;d=d|0;var e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2]|0)|0;u=w+(v+((N((u<>2])-(c[c[o>>2]>>2]|0)&65535,(c[n>>2]&65535)<<16>>16)|0)>>16))|0;c[c[o>>2]>>2]=u;u=N(c[h>>2]>>16,(c[p>>2]&65535)<<16>>16)|0;c[j>>2]=(c[j>>2]|0)-(u+((N(c[h>>2]&65535,(c[p>>2]&65535)<<16>>16)|0)>>16)<<4);u=N(c[i>>2]>>16,(c[k>>2]&65535)<<16>>16)|0;c[j>>2]=(c[j>>2]|0)+(u+((N(c[i>>2]&65535,(c[k>>2]&65535)<<16>>16)|0)>>16)<<6);u=c[(c[o>>2]|0)+4>>2]|0;v=ng(c[j>>2]|0)|0;v=N((v<>2])-(c[(c[o>>2]|0)+4>>2]|0)>>16,(c[n>>2]&65535)<<16>>16)|0;w=ng(c[j>>2]|0)|0;w=u+(v+((N((w<>2])-(c[(c[o>>2]|0)+4>>2]|0)&65535,(c[n>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[o>>2]|0)+4>>2]=w;if((c[c[o>>2]>>2]|0)>1)f=c[c[o>>2]>>2]|0;else f=1;w=mg(c[(c[o>>2]|0)+4>>2]|0,f,14)|0;c[c[q>>2]>>2]=w;if((c[c[q>>2]>>2]|0)>32767){v=32767;w=c[q>>2]|0;c[w>>2]=v;w=c[p>>2]|0;l=r;return w|0}if((c[c[q>>2]>>2]|0)<0){v=0;w=c[q>>2]|0;c[w>>2]=v;w=c[p>>2]|0;l=r;return w|0}v=c[c[q>>2]>>2]|0;w=c[q>>2]|0;c[w>>2]=v;w=c[p>>2]|0;l=r;return w|0}function lg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function mg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;h=l;l=l+48|0;g=h+40|0;q=h+36|0;p=h+32|0;i=h+28|0;k=h+24|0;j=h+20|0;f=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;e=h;c[q>>2]=a;c[p>>2]=b;c[i>>2]=d;b=c[q>>2]|0;c[k>>2]=(pg((c[q>>2]|0)>0?b:0-b|0)|0)-1;c[n>>2]=c[q>>2]<>2];b=c[p>>2]|0;c[j>>2]=(pg((c[p>>2]|0)>0?b:0-b|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;b=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=b+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);b=c[n>>2]|0;a=c[o>>2]|0;d=c[e>>2]|0;d=Xi(a|0,((a|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;d=Yi(d|0,y|0,32)|0;c[n>>2]=b-(d<<3);d=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(d+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[k>>2]|0)-(c[j>>2]|0)-(c[i>>2]|0);d=c[f>>2]|0;if((c[f>>2]|0)>=0)if((d|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];q=c[g>>2]|0;l=h;return q|0}else{c[g>>2]=0;q=c[g>>2]|0;l=h;return q|0}a=c[e>>2]|0;b=0-(c[f>>2]|0)|0;do if((-2147483648>>0-d|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>b|0)){d=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){d=2147483647>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>b|0)){d=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){d=-2147483648>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}while(0);c[g>>2]=d<<0-(c[f>>2]|0);q=c[g>>2]|0;l=h;return q|0}function ng(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}og(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function og(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=pg(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(qg(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function pg(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function qg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function rg(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;o=r+40|0;i=r+36|0;h=r+32|0;j=r+28|0;n=r+24|0;k=r+20|0;q=r+16|0;m=r+12|0;g=r+8|0;f=r+4|0;p=r;c[o>>2]=d;c[i>>2]=e;c[p>>2]=0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=2)break;c[g>>2]=2147483647;c[h>>2]=0;a:while(1){if((c[h>>2]|0)>=15)break;c[k>>2]=b[24526+(c[h>>2]<<1)>>1];c[q>>2]=(((b[24526+((c[h>>2]|0)+1<<1)>>1]|0)-(c[k>>2]|0)>>16)*6554|0)+(((b[24526+((c[h>>2]|0)+1<<1)>>1]|0)-(c[k>>2]|0)&65535)*6554>>16);c[j>>2]=0;while(1){if((c[j>>2]|0)>=5)break;c[m>>2]=(c[k>>2]|0)+(N((c[q>>2]&65535)<<16>>16,((c[j>>2]<<1)+1&65535)<<16>>16)|0);d=(c[(c[o>>2]|0)+(c[n>>2]<<2)>>2]|0)-(c[m>>2]|0)|0;c[f>>2]=((c[(c[o>>2]|0)+(c[n>>2]<<2)>>2]|0)-(c[m>>2]|0)|0)>0?d:0-d|0;if((c[f>>2]|0)>=(c[g>>2]|0))break a;c[g>>2]=c[f>>2];c[p>>2]=c[m>>2];a[(c[i>>2]|0)+((c[n>>2]|0)*3|0)>>0]=c[h>>2];a[(c[i>>2]|0)+((c[n>>2]|0)*3|0)+1>>0]=c[j>>2];c[j>>2]=(c[j>>2]|0)+1}c[h>>2]=(c[h>>2]|0)+1}a[(c[i>>2]|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0)+5800>>2];c[D>>2]=0;while(1){do if((c[z>>2]|0)!=(c[A>>2]|0)){if((c[z>>2]|0)==(c[B>>2]|0)){c[G>>2]=c[I>>2];break}if((c[D>>2]|0)>0){h=c[M>>2]|0;i=T;e=h+48|0;do{c[h>>2]=c[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(e|0));_i((c[L>>2]|0)+144|0,R|0,4380)|0;a[(c[L>>2]|0)+4768+34>>0]=c[V>>2];b[(c[L>>2]|0)+5804>>1]=b[r>>1]|0;c[(c[L>>2]|0)+5800>>2]=c[s>>2]}kh(c[L>>2]|0,Q,(c[L>>2]|0)+4768|0,(c[L>>2]|0)+144|0,(c[L>>2]|0)+4804|0,X);Gd(c[L>>2]|0,c[M>>2]|0,c[(c[L>>2]|0)+5780>>2]|0,0,c[p>>2]|0);Hd(c[M>>2]|0,a[(c[L>>2]|0)+4768+29>>0]|0,a[(c[L>>2]|0)+4768+30>>0]|0,(c[L>>2]|0)+4804|0,c[(c[L>>2]|0)+4608>>2]|0);c[G>>2]=zg(c[M>>2]|0)|0;if((c[W>>2]|0)==0&(c[D>>2]|0)==0?(c[G>>2]|0)<=(c[E>>2]|0):0)break a}else c[G>>2]=c[H>>2];while(0);if((c[D>>2]|0)==(c[F>>2]|0))break;do if((c[G>>2]|0)>(c[E>>2]|0))if((c[t>>2]|0)==0&(c[D>>2]|0)>=2){n=Q+852|0;g[n>>2]=+g[n>>2]*1.5;c[u>>2]=0;c[B>>2]=-1;break}else{c[u>>2]=1;c[I>>2]=c[G>>2];c[x>>2]=b[v>>1];c[B>>2]=c[z>>2];break}else{if((c[G>>2]|0)>=((c[E>>2]|0)-5|0))break a;c[t>>2]=1;c[H>>2]=c[G>>2];c[w>>2]=b[v>>1];if((c[z>>2]|0)!=(c[A>>2]|0)){c[A>>2]=c[z>>2];h=U;i=c[M>>2]|0;e=h+48|0;do{c[h>>2]=c[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(e|0));_i(q|0,c[c[M>>2]>>2]|0,c[(c[M>>2]|0)+24>>2]|0)|0;_i(S|0,(c[L>>2]|0)+144|0,4380)|0;a[o>>0]=a[(c[L>>2]|0)+7200>>0]|0}}while(0);do if(c[t>>2]&c[u>>2]){n=N((c[x>>2]|0)-(c[w>>2]|0)|0,(c[E>>2]|0)-(c[H>>2]|0)|0)|0;b[v>>1]=(c[w>>2]|0)+((n|0)/((c[I>>2]|0)-(c[H>>2]|0)|0)|0);if((b[v>>1]|0)>((c[w>>2]|0)+((c[x>>2]|0)-(c[w>>2]|0)>>2)|0)){b[v>>1]=(c[w>>2]|0)+((c[x>>2]|0)-(c[w>>2]|0)>>2);break}if((b[v>>1]|0)<((c[x>>2]|0)-((c[x>>2]|0)-(c[w>>2]|0)>>2)|0))b[v>>1]=(c[x>>2]|0)-((c[x>>2]|0)-(c[w>>2]|0)>>2)}else{c[y>>2]=Ff((((c[G>>2]|0)-(c[E>>2]|0)<<7|0)/(c[(c[L>>2]|0)+4608>>2]|0)|0)+2048|0)|0;c[y>>2]=Ag(c[y>>2]|0,131072)|0;if((c[G>>2]|0)>(c[E>>2]|0))c[y>>2]=Bg(c[y>>2]|0,85197)|0;n=N(c[y>>2]>>16,b[v>>1]|0)|0;b[v>>1]=n+((N(c[y>>2]&65535,b[v>>1]|0)|0)>>16)}while(0);c[C>>2]=0;while(1){if((c[C>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;n=N(c[Q+892+(c[C>>2]<<2)>>2]>>16,b[v>>1]|0)|0;if((n+((N(c[Q+892+(c[C>>2]<<2)>>2]&65535,b[v>>1]|0)|0)>>16)|0)<=8388607){n=N(c[Q+892+(c[C>>2]<<2)>>2]>>16,b[v>>1]|0)|0;if((n+((N(c[Q+892+(c[C>>2]<<2)>>2]&65535,b[v>>1]|0)|0)>>16)|0)<-8388608)h=-8388608;else{h=N(c[Q+892+(c[C>>2]<<2)>>2]>>16,b[v>>1]|0)|0;h=h+((N(c[Q+892+(c[C>>2]<<2)>>2]&65535,b[v>>1]|0)|0)>>16)|0}}else h=8388607;c[J+(c[C>>2]<<2)>>2]=h<<8;c[C>>2]=(c[C>>2]|0)+1}a[(c[L>>2]|0)+7200>>0]=a[Q+908>>0]|0;Jd((c[L>>2]|0)+4768|0,J,(c[L>>2]|0)+7200|0,(c[p>>2]|0)==2&1,c[(c[L>>2]|0)+4604>>2]|0);c[z>>2]=Nd((c[L>>2]|0)+4768|0,c[(c[L>>2]|0)+4604>>2]|0)|0;c[C>>2]=0;while(1){if((c[C>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;g[Q+(c[C>>2]<<2)>>2]=+(c[J+(c[C>>2]<<2)>>2]|0)/65536.0;c[C>>2]=(c[C>>2]|0)+1}c[D>>2]=(c[D>>2]|0)+1}if(c[t>>2]|0){if((c[z>>2]|0)!=(c[A>>2]|0)?(c[G>>2]|0)<=(c[E>>2]|0):0)break;h=c[M>>2]|0;i=U;e=h+48|0;do{c[h>>2]=c[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(e|0));_i(c[c[M>>2]>>2]|0,q|0,c[U+24>>2]|0)|0;_i((c[L>>2]|0)+144|0,S|0,4380)|0;a[(c[L>>2]|0)+7200>>0]=a[o>>0]|0}}while(0);$i((c[L>>2]|0)+9356|0,(c[L>>2]|0)+9356+(c[(c[L>>2]|0)+4608>>2]<<2)|0,(c[(c[L>>2]|0)+4616>>2]|0)+((c[(c[L>>2]|0)+4600>>2]|0)*5|0)<<2|0)|0;if(c[(c[L>>2]|0)+4712>>2]|0){c[c[K>>2]>>2]=0;c[P>>2]=c[O>>2];X=c[P>>2]|0;l=Y;return X|0}else{c[(c[L>>2]|0)+4568>>2]=c[Q+228+((c[(c[L>>2]|0)+4604>>2]|0)-1<<2)>>2];a[(c[L>>2]|0)+4565>>0]=a[(c[L>>2]|0)+4768+29>>0]|0;c[(c[L>>2]|0)+4696>>2]=0;X=(zg(c[M>>2]|0)|0)+7>>3;c[c[K>>2]>>2]=X;c[P>>2]=c[O>>2];X=c[P>>2]|0;l=Y;return X|0}return 0}function xg(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;i=j+12|0;f=j+8|0;k=j+4|0;h=j;c[i>>2]=a;c[f>>2]=d;c[k>>2]=e;c[h>>2]=(c[k>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]=+(b[(c[f>>2]|0)+(c[h>>2]<<1)>>1]|0);c[h>>2]=(c[h>>2]|0)+-1}l=j;return}function yg(d,e,f,h){d=d|0;e=e|0;f=f|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+4448|0;n=s+4432|0;o=s+4428|0;r=s+4424|0;k=s+4420|0;m=s+4416|0;i=s+4400|0;j=s+4384|0;p=s+4380|0;q=s;c[n>>2]=d;c[o>>2]=e;c[r>>2]=f;c[k>>2]=h;c[p>>2]=(c[n>>2]|0)+6132+((c[(c[n>>2]|0)+5780>>2]|0)*36|0);if(!(c[(c[n>>2]|0)+6124>>2]|0)){l=s;return}if((c[(c[n>>2]|0)+4556>>2]|0)<=77){l=s;return}c[(c[n>>2]|0)+4756+(c[(c[n>>2]|0)+5780>>2]<<2)>>2]=1;_i(q|0,(c[n>>2]|0)+144|0,4380)|0;h=c[p>>2]|0;d=(c[n>>2]|0)+4768|0;e=h+36|0;do{b[h>>1]=b[d>>1]|0;h=h+2|0;d=d+2|0}while((h|0)<(e|0));_i(j|0,c[o>>2]|0,c[(c[n>>2]|0)+4604>>2]<<2|0)|0;if(!((c[(c[n>>2]|0)+5780>>2]|0)!=0?(c[(c[n>>2]|0)+4756+((c[(c[n>>2]|0)+5780>>2]|0)-1<<2)>>2]|0)!=0:0)){a[(c[n>>2]|0)+4564>>0]=a[(c[n>>2]|0)+7200>>0]|0;f=c[p>>2]|0;a[f>>0]=(a[f>>0]|0)+(c[(c[n>>2]|0)+6128>>2]|0);f=(Cg(a[c[p>>2]>>0]|0,63)|0)&255;a[c[p>>2]>>0]=f}Ld(i,c[p>>2]|0,(c[n>>2]|0)+4564|0,(c[k>>2]|0)==2&1,c[(c[n>>2]|0)+4604>>2]|0);c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[n>>2]|0)+4604>>2]|0))break;g[(c[o>>2]|0)+(c[m>>2]<<2)>>2]=+(c[i+(c[m>>2]<<2)>>2]|0)*.0000152587890625;c[m>>2]=(c[m>>2]|0)+1}kh(c[n>>2]|0,c[o>>2]|0,c[p>>2]|0,q,(c[n>>2]|0)+6240+((c[(c[n>>2]|0)+5780>>2]|0)*320|0)|0,c[r>>2]|0);_i(c[o>>2]|0,j|0,c[(c[n>>2]|0)+4604>>2]<<2|0)|0;l=s;return}function zg(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function Ag(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Bg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Cg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Dg(b,d,e,f){b=b|0;d=d|0;e=e|0;f=+f;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+1744|0;p=v+1700|0;k=v+1696|0;u=v+1692|0;h=v+1688|0;o=v+1684|0;t=v+1680|0;m=v+1616|0;q=v+1608|0;r=v+1604|0;s=v+1600|0;j=v+1704|0;n=v+1536|0;i=v;c[p>>2]=b;c[k>>2]=d;c[u>>2]=e;g[h>>2]=f;c[t>>2]=(c[(c[p>>2]|0)+4612>>2]|0)+(c[(c[p>>2]|0)+4664>>2]|0);a[(c[p>>2]|0)+4768+31>>0]=4;g[q>>2]=+nh(m,c[u>>2]|0,+g[h>>2],c[t>>2]|0,c[(c[p>>2]|0)+4604>>2]|0,c[(c[p>>2]|0)+4664>>2]|0);a:do if((c[(c[p>>2]|0)+4656>>2]|0?(c[(c[p>>2]|0)+4696>>2]|0)==0:0)?(c[(c[p>>2]|0)+4604>>2]|0)==4:0){f=+nh(n,(c[u>>2]|0)+(c[t>>2]<<1<<2)|0,+g[h>>2],c[t>>2]|0,2,c[(c[p>>2]|0)+4664>>2]|0);g[q>>2]=+g[q>>2]-f;gh(c[k>>2]|0,n,c[(c[p>>2]|0)+4664>>2]|0);g[r>>2]=3402823466385288598117041.0e14;c[o>>2]=3;while(1){if((c[o>>2]|0)<0)break a;Od(j,(c[p>>2]|0)+4524|0,c[k>>2]|0,c[o>>2]|0,c[(c[p>>2]|0)+4664>>2]|0);ih(n,j,c[(c[p>>2]|0)+4664>>2]|0);Ig(i,n,c[u>>2]|0,c[t>>2]<<1,c[(c[p>>2]|0)+4664>>2]|0);f=+ph(i+(c[(c[p>>2]|0)+4664>>2]<<2)|0,(c[t>>2]|0)-(c[(c[p>>2]|0)+4664>>2]|0)|0);g[s>>2]=f+ +ph(i+(c[(c[p>>2]|0)+4664>>2]<<2)+(c[t>>2]<<2)|0,(c[t>>2]|0)-(c[(c[p>>2]|0)+4664>>2]|0)|0);f=+g[s>>2];if(!(+g[s>>2]<+g[q>>2])){if(f>+g[r>>2])break a}else{g[q>>2]=f;a[(c[p>>2]|0)+4768+31>>0]=c[o>>2]}g[r>>2]=+g[s>>2];c[o>>2]=(c[o>>2]|0)+-1}}while(0);if((a[(c[p>>2]|0)+4768+31>>0]|0)!=4){l=v;return}gh(c[k>>2]|0,m,c[(c[p>>2]|0)+4664>>2]|0);l=v;return}function Eg(a,b,d,e,f,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0.0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;L=l;l=l+192|0;A=L+188|0;O=L+184|0;p=L+180|0;N=L+176|0;t=L+172|0;s=L+168|0;z=L+164|0;I=L+160|0;M=L+156|0;F=L+152|0;G=L+148|0;B=L+144|0;J=L+140|0;r=L+136|0;o=L+132|0;m=L+128|0;C=L+112|0;H=L+104|0;E=L+100|0;D=L+80|0;K=L+64|0;v=L+48|0;x=L+44|0;q=L+24|0;y=L+8|0;w=L+4|0;u=L;c[A>>2]=a;c[O>>2]=b;c[p>>2]=d;c[N>>2]=e;c[t>>2]=f;c[s>>2]=h;c[z>>2]=i;c[I>>2]=j;c[M>>2]=k;c[B>>2]=c[A>>2];c[r>>2]=c[O>>2];c[w>>2]=(c[N>>2]|0)+(c[M>>2]<<2);c[G>>2]=0;while(1){if((c[G>>2]|0)>=(c[I>>2]|0))break;c[u>>2]=(c[w>>2]|0)+(0-((c[(c[t>>2]|0)+(c[G>>2]<<2)>>2]|0)+2)<<2);ug(c[u>>2]|0,c[z>>2]|0,5,c[r>>2]|0);tg(c[u>>2]|0,c[w>>2]|0,c[z>>2]|0,5,q);n=+ph(c[w>>2]|0,c[z>>2]|0);g[y+(c[G>>2]<<2)>>2]=n;g[x>>2]=+g[y+(c[G>>2]<<2)>>2]+1.0+ +g[c[r>>2]>>2]+ +g[(c[r>>2]|0)+96>>2];g[x>>2]=+g[x>>2]*.01666666753590107;_g(c[r>>2]|0,y+(c[G>>2]<<2)|0,+g[x>>2],5);bh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>2]|0)+1}g[H>>2]=0.0;c[G>>2]=0;while(1){if((c[G>>2]|0)>=(c[I>>2]|0))break;g[H>>2]=+g[H>>2]+ +g[C+(c[G>>2]<<2)>>2]*+g[K+(c[G>>2]<<2)>>2];c[G>>2]=(c[G>>2]|0)+1}g[H>>2]=+g[H>>2]/+g[J>>2];c[B>>2]=c[A>>2];c[G>>2]=0;while(1){if((c[G>>2]|0)>=(c[I>>2]|0))break;g[E>>2]=.10000000149011612/(+g[K+(c[G>>2]<<2)>>2]+.10000000149011612)*(+g[H>>2]-+g[C+(c[G>>2]<<2)>>2]);g[J>>2]=0.0;c[F>>2]=0;while(1){if((c[F>>2]|0)>=5)break;if(+g[(c[B>>2]|0)+(c[F>>2]<<2)>>2]>.10000000149011612)n=+g[(c[B>>2]|0)+(c[F>>2]<<2)>>2];else n=.10000000149011612;g[D+(c[F>>2]<<2)>>2]=n;g[J>>2]=+g[J>>2]+ +g[D+(c[F>>2]<<2)>>2];c[F>>2]=(c[F>>2]|0)+1}g[J>>2]=+g[E>>2]/+g[J>>2];c[F>>2]=0;while(1){m=c[B>>2]|0;if((c[F>>2]|0)>=5)break;g[(c[B>>2]|0)+(c[F>>2]<<2)>>2]=+g[m+(c[F>>2]<<2)>>2]+ +g[D+(c[F>>2]<<2)>>2]*+g[J>>2];c[F>>2]=(c[F>>2]|0)+1}c[B>>2]=m+20;c[G>>2]=(c[G>>2]|0)+1}l=L;return}function Fg(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;h[c>>3]=a;a=+Ti(+h[c>>3])*3.32192809488736;l=b;return +a}function Gg(d,e,f,h,i){d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;p=l;l=l+1792|0;k=p+1776|0;m=p+1772|0;n=p+1768|0;z=p+1764|0;j=p+1760|0;q=p+1756|0;o=p+1752|0;u=p+1748|0;x=p+1744|0;r=p+1740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]|0)+4672>>2]|0);if(a[(c[k>>2]|0)+4768+29>>0]|0?(c[(c[k>>2]|0)+4696>>2]|0)==0:0){g[o>>2]=.6000000238418579;g[o>>2]=+g[o>>2]-+(c[(c[k>>2]|0)+4672>>2]|0)*.004000000189989805;g[o>>2]=+g[o>>2]-+(c[(c[k>>2]|0)+4556>>2]|0)*.10000000149011612*.00390625;g[o>>2]=+g[o>>2]-+(a[(c[k>>2]|0)+4565>>0]>>1|0)*.15000000596046448;g[o>>2]=+g[o>>2]-+(c[(c[k>>2]|0)+4744>>2]|0)*.10000000149011612*.000030517578125;z=(uh(c[n>>2]|0,(c[m>>2]|0)+228|0,(c[k>>2]|0)+4768+26|0,(c[k>>2]|0)+4768+28|0,(c[k>>2]|0)+12236|0,c[(c[k>>2]|0)+4568>>2]|0,+(c[(c[k>>2]|0)+4676>>2]|0)/65536.0,+g[o>>2],c[(c[k>>2]|0)+4600>>2]|0,c[(c[k>>2]|0)+4668>>2]|0,c[(c[k>>2]|0)+4604>>2]|0,c[j>>2]|0)|0)==0;a[(c[k>>2]|0)+4768+29>>0]=z?2:1;l=p;return}z=(c[m>>2]|0)+228|0;c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;c[z+12>>2]=0;b[(c[k>>2]|0)+4768+26>>1]=0;a[(c[k>>2]|0)+4768+28>>0]=0;g[(c[k>>2]|0)+12236>>2]=0.0;l=p;return}function Hg(d,e,f,h,i){d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0.0;y=l;l=l+2048|0;s=y+2004|0;t=y+2e3|0;u=y+1996|0;v=y+1992|0;o=y+1988|0;p=y+1984|0;m=y+1584|0;q=y+1568|0;n=y+1552|0;j=y+2008|0;x=y+1548|0;w=y+1544|0;k=y+8|0;r=y;c[s>>2]=d;c[t>>2]=e;c[u>>2]=f;c[v>>2]=h;c[o>>2]=i;c[p>>2]=0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]|0)+4612>>2]<<2);c[p>>2]=(c[p>>2]|0)+1}aj((c[t>>2]|0)+144|0,0,(c[(c[s>>2]|0)+4604>>2]|0)*5<<2|0)|0;g[(c[t>>2]|0)+872>>2]=0.0;c[(c[s>>2]|0)+4688>>2]=0}if(c[(c[s>>2]|0)+4696>>2]|0){g[r>>2]=.009999999776482582;v=c[s>>2]|0;z=+g[r>>2];Dg(v,j,k,z);v=c[s>>2]|0;h=c[t>>2]|0;h=h+16|0;u=c[s>>2]|0;u=u+4524|0;jh(v,h,j,u);u=c[t>>2]|0;u=u+876|0;h=c[t>>2]|0;h=h+16|0;v=c[t>>2]|0;w=c[s>>2]|0;w=w+4612|0;w=c[w>>2]|0;x=c[s>>2]|0;x=x+4604|0;x=c[x>>2]|0;m=c[s>>2]|0;m=m+4664|0;m=c[m>>2]|0;ah(u,k,h,v,w,x,m);m=c[s>>2]|0;m=m+4524|0;k=m+32|0;do{b[m>>1]=b[j>>1]|0;m=m+2|0;j=j+2|0}while((m|0)<(k|0));l=y;return}else{g[r>>2]=+C(2.0,+(+g[(c[t>>2]|0)+872>>2]/3.0))/1.0e4;g[r>>2]=+g[r>>2]/(+g[(c[t>>2]|0)+860>>2]*.75+.25);v=c[s>>2]|0;z=+g[r>>2];Dg(v,j,k,z);v=c[s>>2]|0;h=c[t>>2]|0;h=h+16|0;u=c[s>>2]|0;u=u+4524|0;jh(v,h,j,u);u=c[t>>2]|0;u=u+876|0;h=c[t>>2]|0;h=h+16|0;v=c[t>>2]|0;w=c[s>>2]|0;w=w+4612|0;w=c[w>>2]|0;x=c[s>>2]|0;x=x+4604|0;x=c[x>>2]|0;m=c[s>>2]|0;m=m+4664|0;m=c[m>>2]|0;ah(u,k,h,v,w,x,m);m=c[s>>2]|0;m=m+4524|0;k=m+32|0;do{b[m>>1]=b[j>>1]|0;m=m+2|0;j=j+2|0}while((m|0)<(k|0));l=y;return}}function Ig(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0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+g[(c[y>>2]|0)+(c[o>>2]<<2)>>2];c[r>>2]=0;while(1){if((c[r>>2]|0)>=5)break;B=(c[n>>2]|0)+(c[o>>2]<<2)|0;g[B>>2]=+g[B>>2]-+g[m+(c[r>>2]<<2)>>2]*+g[(c[x>>2]|0)+(2-(c[r>>2]|0)<<2)>>2];c[r>>2]=(c[r>>2]|0)+1}B=(c[n>>2]|0)+(c[o>>2]<<2)|0;g[B>>2]=+g[B>>2]*+g[q>>2];c[x>>2]=(c[x>>2]|0)+4;c[o>>2]=(c[o>>2]|0)+1}c[n>>2]=(c[n>>2]|0)+((c[w>>2]|0)+(c[v>>2]|0)<<2);c[y>>2]=(c[y>>2]|0)+(c[w>>2]<<2);c[s>>2]=(c[s>>2]|0)+1}l=z;return}function Pg(d,e,f){d=d|0;e=e|0;f=f|0;var h=0.0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+16|0;j=m+12|0;k=m+8|0;n=m+4|0;i=m;c[j>>2]=d;c[k>>2]=e;c[n>>2]=f;f=c[j>>2]|0;if(!(c[n>>2]|0)){c[i>>2]=(c[f+4640>>2]|0)+(c[(c[j>>2]|0)+5776>>2]|0);if(!(+(c[i>>2]|0)*+g[(c[k>>2]|0)+872>>2]*.10000000149011612>2.0))if(+(c[i>>2]|0)*+g[(c[k>>2]|0)+872>>2]*.10000000149011612<0.0)h=0.0;else h=+(c[i>>2]|0)*+g[(c[k>>2]|0)+872>>2]*.10000000149011612;else h=2.0;d=~~h;f=c[j>>2]|0}else d=0;a[f+4768+33>>0]=d;g[(c[k>>2]|0)+224>>2]=+(b[24566+(a[(c[j>>2]|0)+4768+33>>0]<<1)>>1]|0)/16384.0;l=m;return}function Qg(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0.0,R=0;P=l;l=l+1152|0;L=P+1140|0;M=P+1136|0;v=P+1132|0;R=P+1128|0;N=P+1124|0;K=P+1120|0;t=P+1116|0;j=P+1112|0;G=P+1108|0;H=P+1104|0;I=P+1100|0;u=P+1096|0;x=P+1092|0;r=P+1088|0;s=P+1084|0;n=P+1080|0;m=P+1076|0;h=P+1072|0;i=P+1068|0;q=P+1064|0;p=P+1060|0;O=P+1056|0;J=P+1052|0;D=P+1048|0;F=P+88|0;k=P+20|0;E=P+16|0;w=P+12|0;y=P+8|0;z=P+4|0;o=P;c[L>>2]=b;c[M>>2]=d;c[v>>2]=e;c[R>>2]=f;c[N>>2]=(c[L>>2]|0)+7200;c[E>>2]=(c[R>>2]|0)+(0-(c[(c[L>>2]|0)+4624>>2]|0)<<2);g[j>>2]=+(c[(c[L>>2]|0)+4748>>2]|0)*.0078125;g[(c[M>>2]|0)+856>>2]=+((c[(c[L>>2]|0)+4728>>2]|0)+(c[(c[L>>2]|0)+4728+4>>2]|0)|0)*.5*.000030517578125;Q=+Rg((+g[j>>2]-20.0)*.25);g[(c[M>>2]|0)+860>>2]=Q;if(!(c[(c[L>>2]|0)+4708>>2]|0)){g[J>>2]=1.0-+(c[(c[L>>2]|0)+4556>>2]|0)*.00390625;g[j>>2]=+g[j>>2]-+g[(c[M>>2]|0)+860>>2]*2.0*(+g[(c[M>>2]|0)+856>>2]*.5+.5)*+g[J>>2]*+g[J>>2]}e=c[L>>2]|0;if((a[(c[L>>2]|0)+4768+29>>0]|0)==2)g[j>>2]=+g[j>>2]+ +g[e+12236>>2]*2.0;else g[j>>2]=+g[j>>2]+(+(c[e+4748>>2]|0)*-.4000000059604645*.0078125+6.0)*(1.0-+g[(c[M>>2]|0)+856>>2]);e=c[L>>2]|0;if((a[(c[L>>2]|0)+4768+29>>0]|0)==2){a[e+4768+30>>0]=0;g[(c[M>>2]|0)+864>>2]=0.0}else{c[t>>2]=c[e+4600>>2]<<1;g[n>>2]=0.0;g[s>>2]=0.0;c[w>>2]=c[v>>2];c[K>>2]=0;while(1){if((c[K>>2]|0)>=((((c[(c[L>>2]|0)+4604>>2]&65535)<<16>>16)*5|0)/2|0|0))break;Q=+(c[t>>2]|0);g[u>>2]=Q+ +ph(c[w>>2]|0,c[t>>2]|0);g[r>>2]=+Sg(+g[u>>2]);if((c[K>>2]|0)>0){Q=+A(+(+g[r>>2]-+g[s>>2]));g[n>>2]=+g[n>>2]+Q}g[s>>2]=+g[r>>2];c[w>>2]=(c[w>>2]|0)+(c[t>>2]<<2);c[K>>2]=(c[K>>2]|0)+1}Q=+Rg((+g[n>>2]-5.0)*.4000000059604645);g[(c[M>>2]|0)+864>>2]=Q;a[(c[L>>2]|0)+4768+30>>0]=+g[(c[M>>2]|0)+864>>2]>.75?0:1;g[j>>2]=+g[j>>2]+(+g[(c[M>>2]|0)+864>>2]-.5)*2.0}g[O>>2]=+g[(c[M>>2]|0)+868>>2]*1.0000000474974513e-03;Q=.949999988079071/(+g[O>>2]*+g[O>>2]+1.0);g[i>>2]=Q;g[h>>2]=Q;g[m>>2]=(1.0-+g[(c[M>>2]|0)+860>>2]*.75)*.009999999776482582;g[h>>2]=+g[h>>2]-+g[m>>2];g[i>>2]=+g[i>>2]+ +g[m>>2];g[h>>2]=+g[h>>2]/+g[i>>2];if((c[(c[L>>2]|0)+4704>>2]|0)>0)g[D>>2]=+(c[(c[L>>2]|0)+4704>>2]|0)/65536.0+ +g[(c[M>>2]|0)+860>>2]*.009999999776482582;else g[D>>2]=0.0;c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;c[o>>2]=(c[(c[L>>2]|0)+4600>>2]|0)*3;c[z>>2]=((c[(c[L>>2]|0)+4628>>2]|0)-(c[o>>2]|0)|0)/2|0;sg(F,c[E>>2]|0,1,c[z>>2]|0);c[y>>2]=c[z>>2];_i(F+(c[y>>2]<<2)|0,(c[E>>2]|0)+(c[y>>2]<<2)|0,c[o>>2]<<2|0)|0;c[y>>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(c[K>>2]<<4<<2)|0,(c[M>>2]|0)+244+(c[K>>2]<<4<<2)|0,+g[D>>2],3.999000072479248,c[(c[L>>2]|0)+4660>>2]|0);c[K>>2]=(c[K>>2]|0)+1}g[q>>2]=+C(2.0,+(+g[j>>2]*-.1599999964237213));g[p>>2]=+C(2.0,.3199999928474426);c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;R=(c[M>>2]|0)+(c[K>>2]<<2)|0;g[R>>2]=+g[R>>2]*+g[q>>2];R=(c[M>>2]|0)+(c[K>>2]<<2)|0;g[R>>2]=+g[R>>2]+ +g[p>>2];c[K>>2]=(c[K>>2]|0)+1}g[q>>2]=+g[(c[M>>2]|0)+860>>2]*.10000000149011612+1.0499999523162842;c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;R=(c[M>>2]|0)+788+(c[K>>2]<<2)|0;g[R>>2]=+g[R>>2]*+g[q>>2];c[K>>2]=(c[K>>2]|0)+1}g[O>>2]=((+(c[(c[L>>2]|0)+4728>>2]|0)*.000030517578125-1.0)*.5+1.0)*4.0;g[O>>2]=+g[O>>2]*(+(c[(c[L>>2]|0)+4556>>2]|0)*.00390625);if((a[(c[L>>2]|0)+4768+29>>0]|0)==2){c[K>>2]=0;while(1){e=c[L>>2]|0;if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;g[J>>2]=.20000000298023224/+(c[e+4600>>2]|0)+3.0/+(c[(c[M>>2]|0)+228+(c[K>>2]<<2)>>2]|0);g[(c[M>>2]|0)+756+(c[K>>2]<<2)>>2]=+g[J>>2]+-1.0;g[(c[M>>2]|0)+772+(c[K>>2]<<2)>>2]=1.0-+g[J>>2]-+g[J>>2]*+g[O>>2];c[K>>2]=(c[K>>2]|0)+1}g[I>>2]=-.25-+(c[e+4556>>2]|0)*.26249998807907104*.00390625}else{g[J>>2]=1.2999999523162842/+(c[(c[L>>2]|0)+4600>>2]|0);g[(c[M>>2]|0)+756>>2]=+g[J>>2]+-1.0;g[(c[M>>2]|0)+772>>2]=1.0-+g[J>>2]-+g[J>>2]*+g[O>>2]*.6000000238418579;c[K>>2]=1;while(1){if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;g[(c[M>>2]|0)+756+(c[K>>2]<<2)>>2]=+g[(c[M>>2]|0)+756>>2];g[(c[M>>2]|0)+772+(c[K>>2]<<2)>>2]=+g[(c[M>>2]|0)+772>>2];c[K>>2]=(c[K>>2]|0)+1}g[I>>2]=-.25}g[G>>2]=(1.0-+g[(c[M>>2]|0)+860>>2])*.10000000149011612*+g[(c[L>>2]|0)+12236>>2];g[G>>2]=+g[G>>2]+(1.0-+g[(c[M>>2]|0)+856>>2])*.10000000149011612;if((a[(c[L>>2]|0)+4768+29>>0]|0)==2){g[H>>2]=.30000001192092896;g[H>>2]=+g[H>>2]+(1.0-(1.0-+g[(c[M>>2]|0)+860>>2])*+g[(c[M>>2]|0)+856>>2])*.20000000298023224;Q=+B(+(+g[(c[L>>2]|0)+12236>>2]));g[H>>2]=+g[H>>2]*Q}else g[H>>2]=0.0;c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;R=(c[N>>2]|0)+4|0;g[R>>2]=+g[R>>2]+(+g[G>>2]-+g[(c[N>>2]|0)+4>>2])*.4000000059604645;g[(c[M>>2]|0)+804+(c[K>>2]<<2)>>2]=+g[(c[N>>2]|0)+4>>2];R=(c[N>>2]|0)+8|0;g[R>>2]=+g[R>>2]+(+g[H>>2]-+g[(c[N>>2]|0)+8>>2])*.4000000059604645;g[(c[M>>2]|0)+836+(c[K>>2]<<2)>>2]=+g[(c[N>>2]|0)+8>>2];R=(c[N>>2]|0)+12|0;g[R>>2]=+g[R>>2]+(+g[I>>2]-+g[(c[N>>2]|0)+12>>2])*.4000000059604645;g[(c[M>>2]|0)+820+(c[K>>2]<<2)>>2]=+g[(c[N>>2]|0)+12>>2];c[K>>2]=(c[K>>2]|0)+1}l=P;return}function Rg(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;g[c>>2]=a;a=1.0/(+K(+-+g[c>>2])+1.0);l=b;return +a}function Sg(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;h[c>>3]=a;a=+Ti(+h[c>>3])*3.32192809488736;l=b;return +a}function Tg(a,b,d){a=a|0;b=+b;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+16|0;i=j+12|0;k=j+8|0;h=j+4|0;f=j;c[e>>2]=a;g[i>>2]=b;c[k>>2]=d;g[i>>2]=-+g[i>>2];g[f>>2]=+g[(c[e>>2]|0)+((c[k>>2]|0)-1<<2)>>2];c[h>>2]=(c[k>>2]|0)-2;while(1){b=+g[i>>2]*+g[f>>2];if((c[h>>2]|0)<0)break;g[f>>2]=b+ +g[(c[e>>2]|0)+(c[h>>2]<<2)>>2];c[h>>2]=(c[h>>2]|0)+-1}l=j;return +(1.0/(1.0-b))}function Ug(a,b,d,e,f){a=a|0;b=b|0;d=+d;e=+e;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;j=v+48|0;i=v+44|0;q=v+40|0;r=v+36|0;t=v+32|0;n=v+28|0;p=v+24|0;o=v+20|0;u=v+16|0;s=v+12|0;h=v+8|0;m=v+4|0;k=v;c[j>>2]=a;c[i>>2]=b;g[q>>2]=d;g[r>>2]=e;c[t>>2]=f;c[o>>2]=0;c[n>>2]=(c[t>>2]|0)-1;while(1){d=+g[q>>2];if((c[n>>2]|0)<=0)break;f=(c[j>>2]|0)+((c[n>>2]|0)-1<<2)|0;g[f>>2]=+g[f>>2]-d*+g[(c[j>>2]|0)+(c[n>>2]<<2)>>2];f=(c[i>>2]|0)+((c[n>>2]|0)-1<<2)|0;g[f>>2]=+g[f>>2]-+g[q>>2]*+g[(c[i>>2]|0)+(c[n>>2]<<2)>>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]=+g[f>>2]*+g[m>>2];f=(c[i>>2]|0)+(c[n>>2]<<2)|0;g[f>>2]=+g[f>>2]*+g[k>>2];c[n>>2]=(c[n>>2]|0)+1}g[h>>2]=.9900000095367432-(+(c[p>>2]|0)*.10000000149011612+.800000011920929)*(+g[s>>2]-+g[r>>2])/(+g[s>>2]*+((c[o>>2]|0)+1|0));oh(c[j>>2]|0,c[t>>2]|0,+g[h>>2]);oh(c[i>>2]|0,c[t>>2]|0,+g[h>>2]);c[n>>2]=(c[t>>2]|0)-1;while(1){d=+g[q>>2];if((c[n>>2]|0)<=0)break;f=(c[j>>2]|0)+((c[n>>2]|0)-1<<2)|0;g[f>>2]=+g[f>>2]-d*+g[(c[j>>2]|0)+(c[n>>2]<<2)>>2];f=(c[i>>2]|0)+((c[n>>2]|0)-1<<2)|0;g[f>>2]=+g[f>>2]-+g[q>>2]*+g[(c[i>>2]|0)+(c[n>>2]<<2)>>2];c[n>>2]=(c[n>>2]|0)+-1}g[m>>2]=(1.0-d*+g[q>>2])/(+g[q>>2]*+g[c[j>>2]>>2]+1.0);g[k>>2]=(1.0-+g[q>>2]*+g[q>>2])/(+g[q>>2]*+g[c[i>>2]>>2]+1.0);c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[t>>2]|0))break;f=(c[j>>2]|0)+(c[n>>2]<<2)|0;g[f>>2]=+g[f>>2]*+g[m>>2];f=(c[i>>2]|0)+(c[n>>2]<<2)|0;g[f>>2]=+g[f>>2]*+g[k>>2];c[n>>2]=(c[n>>2]|0)+1}c[p>>2]=(c[p>>2]|0)+1}if((b|0)==31){l=v;return}}function Vg(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;y=l;l=l+464|0;t=y+460|0;u=y+456|0;z=y+452|0;A=y+448|0;o=y+444|0;q=y+440|0;r=y+436|0;s=y+432|0;k=y+428|0;p=y+424|0;n=y+420|0;m=y+416|0;i=y+408|0;h=y+404|0;v=y+400|0;w=y+396|0;j=y+384|0;x=y;c[t>>2]=b;c[u>>2]=d;c[z>>2]=e;c[A>>2]=f;c[o>>2]=(c[t>>2]|0)+7216;c[v>>2]=c[A>>2];c[w>>2]=c[z>>2];c[s>>2]=c[(c[o>>2]|0)+2136>>2];c[r>>2]=0;while(1){if((c[r>>2]|0)>=(c[(c[t>>2]|0)+4604>>2]|0))break;if((a[(c[t>>2]|0)+4768+29>>0]|0)==2)c[s>>2]=c[(c[u>>2]|0)+228+(c[r>>2]<<2)>>2];g[k>>2]=+g[(c[u>>2]|0)+836+(c[r>>2]<<2)>>2]*(1.0-+g[(c[u>>2]|0)+804+(c[r>>2]<<2)>>2]);g[j>>2]=+g[k>>2]*.25;g[j+4>>2]=+g[k>>2]*.4999847412109375;g[j+8>>2]=+g[k>>2]*.25;g[p>>2]=+g[(c[u>>2]|0)+820+(c[r>>2]<<2)>>2];g[n>>2]=+g[(c[u>>2]|0)+756+(c[r>>2]<<2)>>2];g[m>>2]=+g[(c[u>>2]|0)+772+(c[r>>2]<<2)>>2];c[h>>2]=(c[u>>2]|0)+244+(c[r>>2]<<4<<2);Wg((c[o>>2]|0)+2048|0,x,c[h>>2]|0,c[v>>2]|0,+(c[(c[t>>2]|0)+4704>>2]|0)/65536.0,c[(c[t>>2]|0)+4612>>2]|0,c[(c[t>>2]|0)+4660>>2]|0);g[i>>2]=+g[(c[u>>2]|0)+788+(c[r>>2]<<2)>>2];g[i+4>>2]=-+g[(c[u>>2]|0)+788+(c[r>>2]<<2)>>2]*(+g[(c[u>>2]|0)+804+(c[r>>2]<<2)>>2]*+g[k>>2]+.05000000074505806+ +g[(c[u>>2]|0)+860>>2]*.10000000149011612);g[c[w>>2]>>2]=+g[i>>2]*+g[x>>2]+ +g[i+4>>2]*+g[(c[o>>2]|0)+2128>>2];c[q>>2]=1;while(1){if((c[q>>2]|0)>=(c[(c[t>>2]|0)+4612>>2]|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=f;c[q>>2]=(c[o>>2]|0)+7200;a:do if((a[(c[o>>2]|0)+4768+29>>0]|0)==2){g[j>>2]=1.0-+Zg((+g[(c[p>>2]|0)+872>>2]-12.0)*.25)*.5;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[o>>2]|0)+4604>>2]|0))break a;e=(c[p>>2]|0)+(c[m>>2]<<2)|0;g[e>>2]=+g[e>>2]*+g[j>>2];c[m>>2]=(c[m>>2]|0)+1}}while(0);t=+C(2.0,+((21.0-+(c[(c[o>>2]|0)+4748>>2]|0)*.0078125)*.33000001311302185));g[h>>2]=t/+(c[(c[o>>2]|0)+4612>>2]|0);c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[o>>2]|0)+4604>>2]|0))break;g[i>>2]=+g[(c[p>>2]|0)+(c[m>>2]<<2)>>2];g[i>>2]=+B(+(+g[i>>2]*+g[i>>2]+ +g[(c[p>>2]|0)+876+(c[m>>2]<<2)>>2]*+g[h>>2]));g[(c[p>>2]|0)+(c[m>>2]<<2)>>2]=+g[i>>2]<32767.0?+g[i>>2]:32767.0;c[m>>2]=(c[m>>2]|0)+1}c[m>>2]=0;while(1){h=c[p>>2]|0;if((c[m>>2]|0)>=(c[(c[o>>2]|0)+4604>>2]|0))break;c[n+(c[m>>2]<<2)>>2]=~~(+g[h+(c[m>>2]<<2)>>2]*65536.0);c[m>>2]=(c[m>>2]|0)+1}_i(h+892|0,n|0,c[(c[o>>2]|0)+4604>>2]<<2|0)|0;a[(c[p>>2]|0)+908>>0]=a[c[q>>2]>>0]|0;Jd((c[o>>2]|0)+4768|0,n,c[q>>2]|0,(c[k>>2]|0)==2&1,c[(c[o>>2]|0)+4604>>2]|0);c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[o>>2]|0)+4604>>2]|0))break;g[(c[p>>2]|0)+(c[m>>2]<<2)>>2]=+(c[n+(c[m>>2]<<2)>>2]|0)/65536.0;c[m>>2]=(c[m>>2]|0)+1}if((a[(c[o>>2]|0)+4768+29>>0]|0)==2)a[(c[o>>2]|0)+4768+30>>0]=+g[(c[p>>2]|0)+872>>2]+ +(c[(c[o>>2]|0)+4744>>2]|0)*.000030517578125>1.0?0:1;g[r>>2]=+(b[24558+(a[(c[o>>2]|0)+4768+29>>0]>>1<<2)+(a[(c[o>>2]|0)+4768+30>>0]<<1)>>1]|0)/1024.0;g[(c[p>>2]|0)+852>>2]=+(c[(c[o>>2]|0)+4652>>2]|0)*-.05000000074505806+1.2000000476837158+ +(c[(c[o>>2]|0)+4556>>2]|0)*-.20000000298023224*.00390625+ +g[(c[p>>2]|0)+856>>2]*-.10000000149011612+ +g[(c[p>>2]|0)+860>>2]*-.20000000298023224+ +g[r>>2]*.800000011920929;l=s;return}function Zg(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;g[c>>2]=a;a=1.0/(+K(+-+g[c>>2])+1.0);l=b;return +a}function _g(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;var f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;h=m+16|0;k=m+12|0;j=m+8|0;f=m+4|0;i=m;c[h>>2]=a;c[k>>2]=b;g[j>>2]=d;c[f>>2]=e;c[i>>2]=0;while(1){d=+g[j>>2];if((c[i>>2]|0)>=(c[f>>2]|0))break;b=N(c[i>>2]|0,c[f>>2]|0)|0;b=(c[h>>2]|0)+(b+(c[i>>2]|0)<<2)|0;g[b>>2]=+g[b>>2]+d;c[i>>2]=(c[i>>2]|0)+1}k=c[k>>2]|0;g[k>>2]=+g[k>>2]+d;l=m;return}function $g(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=+e;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;i=t+40|0;q=t+36|0;r=t+32|0;s=t+28|0;h=t+24|0;j=t+20|0;k=t+16|0;m=t+12|0;p=t+8|0;n=t+4|0;o=t;c[i>>2]=a;c[q>>2]=b;c[r>>2]=d;g[s>>2]=e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n+1152|0;h=n+128|0;j=n+64|0;f=n;c[p>>2]=a;c[i>>2]=b;c[o>>2]=d;c[m>>2]=e;ch(c[p>>2]|0,c[i>>2]|0,h,f);dh(h,c[i>>2]|0,c[o>>2]|0,j);c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[i>>2]|0))break;g[j+(c[k>>2]<<2)>>2]=+g[j+(c[k>>2]<<2)>>2]*+g[f+(c[k>>2]<<2)>>2];c[k>>2]=(c[k>>2]|0)+1}eh(h,c[i>>2]|0,j,c[m>>2]|0);l=n;return}function ch(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+192|0;f=y+184|0;m=y+180|0;k=y+176|0;j=y+172|0;p=y+168|0;q=y+164|0;r=y+160|0;s=y+156|0;o=y+152|0;t=y+148|0;u=y+144|0;v=y+8|0;n=y;w=y+80|0;i=y+16|0;c[f>>2]=a;c[m>>2]=b;c[k>>2]=d;c[j>>2]=e;c[o>>2]=1;h[n>>3]=(+g[c[f>>2]>>2]+ +g[(c[f>>2]|0)+((N(c[m>>2]|0,c[m>>2]|0)|0)-1<<2)>>2])*4.999999873689376e-06;c[s>>2]=0;while(1){if(!((c[s>>2]|0)<(c[m>>2]|0)?(c[o>>2]|0)==1:0))break;c[o>>2]=0;c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[m>>2]|0))break;c[t>>2]=(c[k>>2]|0)+((N(c[q>>2]|0,c[m>>2]|0)|0)+0<<2);b=N(c[q>>2]|0,c[m>>2]|0)|0;h[v>>3]=+g[(c[f>>2]|0)+(b+(c[q>>2]|0)<<2)>>2];c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[q>>2]|0))break;g[w+(c[p>>2]<<2)>>2]=+g[(c[t>>2]|0)+(c[p>>2]<<2)>>2]*+g[i+(c[p>>2]<<2)>>2];h[v>>3]=+h[v>>3]-+g[(c[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3];c[k>>2]=(c[k>>2]|0)+1}l=u;return}function gh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0;k=l;l=l+80|0;f=k+76|0;j=k+72|0;e=k+68|0;i=k+64|0;h=k;c[f>>2]=a;c[j>>2]=b;c[e>>2]=d;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[e>>2]|0))break;b=hh(+g[(c[j>>2]|0)+(c[i>>2]<<2)>>2]*65536.0)|0;c[h+(c[i>>2]<<2)>>2]=b;c[i>>2]=(c[i>>2]|0)+1}qf(c[f>>2]|0,h,c[e>>2]|0);l=k;return}function hh(a){a=+a;var b=0,c=0;c=l;l=l+16|0;b=c;g[b>>2]=a;b=Ui(+g[b>>2])|0;l=c;return b|0}function ih(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+48|0;j=k+12|0;m=k+8|0;f=k+4|0;i=k;h=k+16|0;c[j>>2]=a;c[m>>2]=d;c[f>>2]=e;Lf(h,c[m>>2]|0,c[f>>2]|0);c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[f>>2]|0))break;g[(c[j>>2]|0)+(c[i>>2]<<2)>>2]=+(b[h+(c[i>>2]<<1)>>1]|0)*.000244140625;c[i>>2]=(c[i>>2]|0)+1}l=k;return}function jh(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;n=l;l=l+96|0;m=n+20|0;h=n+16|0;p=n+12|0;o=n+8|0;j=n+4|0;k=n;i=n+24|0;c[m>>2]=a;c[h>>2]=d;c[p>>2]=e;c[o>>2]=f;Ze(c[m>>2]|0,i,c[p>>2]|0,c[o>>2]|0);c[k>>2]=0;while(1){if((c[k>>2]|0)>=2)break;c[j>>2]=0;while(1){e=c[k>>2]|0;if((c[j>>2]|0)>=(c[(c[m>>2]|0)+4664>>2]|0))break;g[(c[h>>2]|0)+(c[k>>2]<<6)+(c[j>>2]<<2)>>2]=+(b[i+(e<<5)+(c[j>>2]<<1)>>1]|0)*.000244140625;c[j>>2]=(c[j>>2]|0)+1}c[k>>2]=e+1}l=n;return}function kh(d,e,f,h,i,j){d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=l;l=l+1632|0;w=D+1388|0;x=D+1384|0;y=D+1380|0;z=D+1376|0;A=D+1372|0;B=D+1368|0;u=D+1364|0;v=D+1360|0;C=D+80|0;m=D+64|0;s=D+1560|0;p=D+1520|0;q=D+56|0;k=D+1392|0;o=D+40|0;r=D+32|0;t=D+16|0;n=D;c[w>>2]=d;c[x>>2]=e;c[y>>2]=f;c[z>>2]=h;c[A>>2]=i;c[B>>2]=j;c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[(c[w>>2]|0)+4604>>2]|0))break;c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[(c[w>>2]|0)+4660>>2]|0))break;j=(hh(+g[(c[x>>2]|0)+500+((c[u>>2]<<4)+(c[v>>2]|0)<<2)>>2]*8192.0)|0)&65535;b[k+((c[u>>2]<<4)+(c[v>>2]|0)<<1)>>1]=j;c[v>>2]=(c[v>>2]|0)+1}c[u>>2]=(c[u>>2]|0)+1}c[u>>2]=0;while(1){d=c[x>>2]|0;if((c[u>>2]|0)>=(c[(c[w>>2]|0)+4604>>2]|0))break;j=(hh(+g[d+772+(c[u>>2]<<2)>>2]*16384.0)|0)<<16;j=j|(hh(+g[(c[x>>2]|0)+756+(c[u>>2]<<2)>>2]*16384.0)|0)&65535;c[o+(c[u>>2]<<2)>>2]=j;j=hh(+g[(c[x>>2]|0)+820+(c[u>>2]<<2)>>2]*16384.0)|0;c[t+(c[u>>2]<<2)>>2]=j;j=hh(+g[(c[x>>2]|0)+836+(c[u>>2]<<2)>>2]*16384.0)|0;c[n+(c[u>>2]<<2)>>2]=j;c[u>>2]=(c[u>>2]|0)+1}c[r>>2]=hh(+g[d+852>>2]*1024.0)|0;c[u>>2]=0;while(1){if((c[u>>2]|0)>=((c[(c[w>>2]|0)+4604>>2]|0)*5|0))break;j=(hh(+g[(c[x>>2]|0)+144+(c[u>>2]<<2)>>2]*16384.0)|0)&65535;b[p+(c[u>>2]<<1)>>1]=j;c[u>>2]=(c[u>>2]|0)+1}c[v>>2]=0;while(1){j=(c[v>>2]|0)<2;c[u>>2]=0;if(!j)break;while(1){if((c[u>>2]|0)>=(c[(c[w>>2]|0)+4664>>2]|0))break;j=(hh(+g[(c[x>>2]|0)+16+(c[v>>2]<<6)+(c[u>>2]<<2)>>2]*4096.0)|0)&65535;b[s+(c[v>>2]<<5)+(c[u>>2]<<1)>>1]=j;c[u>>2]=(c[u>>2]|0)+1}c[v>>2]=(c[v>>2]|0)+1}while(1){if((c[u>>2]|0)>=(c[(c[w>>2]|0)+4604>>2]|0))break;v=hh(+g[(c[x>>2]|0)+(c[u>>2]<<2)>>2]*65536.0)|0;c[m+(c[u>>2]<<2)>>2]=v;c[u>>2]=(c[u>>2]|0)+1}if((a[(c[y>>2]|0)+29>>0]|0)==2)c[q>>2]=b[24566+(a[(c[y>>2]|0)+33>>0]<<1)>>1];else c[q>>2]=0;c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[(c[w>>2]|0)+4608>>2]|0))break;v=hh(+g[(c[B>>2]|0)+(c[u>>2]<<2)>>2]*8.0)|0;c[C+(c[u>>2]<<2)>>2]=v;c[u>>2]=(c[u>>2]|0)+1}if((c[(c[w>>2]|0)+4652>>2]|0)<=1?(c[(c[w>>2]|0)+4704>>2]|0)<=0:0){Xd(c[w>>2]|0,c[z>>2]|0,c[y>>2]|0,C,c[A>>2]|0,s,p,k,n,t,o,m,(c[x>>2]|0)+228|0,c[r>>2]|0,c[q>>2]|0);l=D;return}be(c[w>>2]|0,c[z>>2]|0,c[y>>2]|0,C,c[A>>2]|0,s,p,k,n,t,o,m,(c[x>>2]|0)+228|0,c[r>>2]|0,c[q>>2]|0);l=D;return}function lh(a,d,e,f,h,i,j,k,m){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;z=l;l=l+480|0;n=z+436|0;s=z+432|0;x=z+428|0;y=z+424|0;p=z+420|0;v=z+416|0;u=z+412|0;w=z+408|0;r=z+404|0;t=z+400|0;o=z+440|0;q=z;c[n>>2]=a;c[s>>2]=d;c[x>>2]=e;c[y>>2]=f;c[p>>2]=h;c[v>>2]=i;c[u>>2]=j;c[w>>2]=k;c[r>>2]=m;c[t>>2]=0;while(1){if((c[t>>2]|0)>=((c[w>>2]|0)*5|0))break;f=(hh(+g[(c[n>>2]|0)+(c[t>>2]<<2)>>2]*16384.0)|0)&65535;b[o+(c[t>>2]<<1)>>1]=f;c[t>>2]=(c[t>>2]|0)+1}c[t>>2]=0;while(1){if((c[t>>2]|0)>=(((c[w>>2]|0)*5|0)*5|0))break;f=hh(+g[(c[p>>2]|0)+(c[t>>2]<<2)>>2]*262144.0)|0;c[q+(c[t>>2]<<2)>>2]=f;c[t>>2]=(c[t>>2]|0)+1}Oe(o,c[s>>2]|0,c[x>>2]|0,c[y>>2]|0,q,c[v>>2]|0,c[u>>2]|0,c[w>>2]|0,c[r>>2]|0);c[t>>2]=0;while(1){if((c[t>>2]|0)>=((c[w>>2]|0)*5|0))break;g[(c[n>>2]|0)+(c[t>>2]<<2)>>2]=+(b[o+(c[t>>2]<<1)>>1]|0)*.00006103515625;c[t>>2]=(c[t>>2]|0)+1}l=z;return}function mh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0,m=0,n=0.0;m=l;l=l+32|0;k=m+16|0;i=m+12|0;j=m+8|0;f=m+4|0;h=m;c[k>>2]=a;c[i>>2]=b;c[j>>2]=d;c[f>>2]=e;if((c[f>>2]|0)>(c[j>>2]|0))c[f>>2]=c[j>>2];c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[f>>2]|0))break;n=+qh(c[i>>2]|0,(c[i>>2]|0)+(c[h>>2]<<2)|0,(c[j>>2]|0)-(c[h>>2]|0)|0);g[(c[k>>2]|0)+(c[h>>2]<<2)>>2]=n;c[h>>2]=(c[h>>2]|0)+1}l=m;return}function nh(a,b,d,e,f,i){a=a|0;b=b|0;d=+d;e=e|0;f=f|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;L=l;l=l+784|0;j=L+768|0;I=L+764|0;v=L+760|0;F=L+756|0;x=L+752|0;s=L+748|0;u=L+744|0;w=L+740|0;E=L+736|0;D=L+732|0;n=L+720|0;t=L+712|0;A=L+704|0;z=L+696|0;y=L+688|0;C=L+680|0;m=L+672|0;G=L+664|0;H=L+656|0;J=L+728|0;q=L+528|0;r=L+400|0;p=L+264|0;o=L+128|0;k=L;c[j>>2]=a;c[I>>2]=b;g[v>>2]=d;c[F>>2]=e;c[x>>2]=f;c[s>>2]=i;h[n>>3]=+ph(c[I>>2]|0,N(c[x>>2]|0,c[F>>2]|0)|0);a=q;f=a+128|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(f|0));c[E>>2]=0;while(1){if((c[E>>2]|0)>=(c[x>>2]|0))break;c[J>>2]=(c[I>>2]|0)+((N(c[E>>2]|0,c[F>>2]|0)|0)<<2);c[w>>2]=1;while(1){if((c[w>>2]|0)>=((c[s>>2]|0)+1|0))break;d=+qh(c[J>>2]|0,(c[J>>2]|0)+(c[w>>2]<<2)|0,(c[F>>2]|0)-(c[w>>2]|0)|0);b=q+((c[w>>2]|0)-1<<3)|0;h[b>>3]=+h[b>>3]+d;c[w>>2]=(c[w>>2]|0)+1}c[E>>2]=(c[E>>2]|0)+1}a=r;i=q;f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2]=0;while(1){if((c[u>>2]|0)>=((c[w>>2]|0)+1>>1|0))break;h[G>>3]=+h[k+(c[u>>2]<<3)>>3];h[H>>3]=+h[k+((c[w>>2]|0)-(c[u>>2]|0)-1<<3)>>3];h[k+(c[u>>2]<<3)>>3]=+h[G>>3]+ +h[C>>3]*+h[H>>3];h[k+((c[w>>2]|0)-(c[u>>2]|0)-1<<3)>>3]=+h[H>>3]+ +h[C>>3]*+h[G>>3];c[u>>2]=(c[u>>2]|0)+1}h[k+(c[w>>2]<<3)>>3]=+h[C>>3];if(c[D>>2]|0){K=33;break}c[u>>2]=0;while(1){if((c[u>>2]|0)>((c[w>>2]|0)+1|0))break;h[G>>3]=+h[p+(c[u>>2]<<3)>>3];b=p+(c[u>>2]<<3)|0;h[b>>3]=+h[b>>3]+ +h[C>>3]*+h[o+((c[w>>2]|0)-(c[u>>2]|0)+1<<3)>>3];b=o+((c[w>>2]|0)-(c[u>>2]|0)+1<<3)|0;h[b>>3]=+h[b>>3]+ +h[C>>3]*+h[G>>3];c[u>>2]=(c[u>>2]|0)+1}c[w>>2]=(c[w>>2]|0)+1}a:do if((K|0)==33){c[u>>2]=(c[w>>2]|0)+1;while(1){if((c[u>>2]|0)>=(c[s>>2]|0))break a;h[k+(c[u>>2]<<3)>>3]=0.0;c[u>>2]=(c[u>>2]|0)+1}}while(0);if(!(c[D>>2]|0)){h[z>>3]=+h[p>>3];h[G>>3]=1.0;c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[s>>2]|0))break;h[m>>3]=+h[k+(c[u>>2]<<3)>>3];h[z>>3]=+h[z>>3]+ +h[p+((c[u>>2]|0)+1<<3)>>3]*+h[m>>3];h[G>>3]=+h[G>>3]+ +h[m>>3]*+h[m>>3];g[(c[j>>2]|0)+(c[u>>2]<<2)>>2]=-+h[m>>3];c[u>>2]=(c[u>>2]|0)+1}h[z>>3]=+h[z>>3]-+h[n>>3]*9.999999747378752e-06*+h[G>>3];d=+h[z>>3];l=L;return +d}c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[s>>2]|0))break;g[(c[j>>2]|0)+(c[u>>2]<<2)>>2]=-+h[k+(c[u>>2]<<3)>>3];c[u>>2]=(c[u>>2]|0)+1}c[E>>2]=0;while(1){if((c[E>>2]|0)>=(c[x>>2]|0))break;K=(c[I>>2]|0)+((N(c[E>>2]|0,c[F>>2]|0)|0)<<2)|0;d=+ph(K,c[s>>2]|0);h[n>>3]=+h[n>>3]-d;c[E>>2]=(c[E>>2]|0)+1}h[z>>3]=+h[n>>3]*+h[t>>3];d=+h[z>>3];l=L;return +d}function oh(a,b,d){a=a|0;b=b|0;d=+d;var e=0,f=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+16|0;i=k+12|0;h=k+8|0;j=k+4|0;f=k;c[e>>2]=a;c[i>>2]=b;g[h>>2]=d;g[f>>2]=+g[h>>2];c[j>>2]=0;while(1){d=+g[f>>2];a=c[e>>2]|0;if((c[j>>2]|0)>=((c[i>>2]|0)-1|0))break;b=a+(c[j>>2]<<2)|0;g[b>>2]=+g[b>>2]*d;g[f>>2]=+g[f>>2]*+g[h>>2];c[j>>2]=(c[j>>2]|0)+1}j=a+((c[i>>2]|0)-1<<2)|0;g[j>>2]=+g[j>>2]*d;l=k;return}function ph(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,i=0,j=0,k=0;k=l;l=l+32|0;d=k+20|0;e=k+16|0;i=k+12|0;f=k+8|0;j=k;c[d>>2]=a;c[e>>2]=b;h[j>>3]=0.0;c[f>>2]=c[e>>2]&65532;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[f>>2]|0))break;h[j>>3]=+h[j>>3]+(+g[(c[d>>2]|0)+((c[i>>2]|0)+0<<2)>>2]*+g[(c[d>>2]|0)+((c[i>>2]|0)+0<<2)>>2]+ +g[(c[d>>2]|0)+((c[i>>2]|0)+1<<2)>>2]*+g[(c[d>>2]|0)+((c[i>>2]|0)+1<<2)>>2]+ +g[(c[d>>2]|0)+((c[i>>2]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d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+96|0;e=m+80|0;k=m+76|0;j=m+72|0;h=m+68|0;i=m+64|0;f=m;c[e>>2]=a;c[k>>2]=b;c[j>>2]=d;c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[j>>2]|0))break;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[h>>2]|0))break;g[f+(c[i>>2]<<2)>>2]=+g[(c[e>>2]|0)+(c[i>>2]<<2)>>2];c[i>>2]=(c[i>>2]|0)+1}c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[h>>2]|0))break;b=(c[e>>2]|0)+(c[i>>2]<<2)|0;g[b>>2]=+g[b>>2]+ +g[f+((c[h>>2]|0)-(c[i>>2]|0)-1<<2)>>2]*+g[(c[k>>2]|0)+(c[h>>2]<<2)>>2];c[i>>2]=(c[i>>2]|0)+1}g[(c[e>>2]|0)+(c[h>>2]<<2)>>2]=-+g[(c[k>>2]|0)+(c[h>>2]<<2)>>2];c[h>>2]=(c[h>>2]|0)+1}l=m;return}function sh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;e=s+44|0;i=s+40|0;q=s+36|0;j=s+32|0;n=s+28|0;m=s+24|0;o=s+20|0;p=s+16|0;r=s+12|0;k=s+8|0;f=s+4|0;h=s;c[e>>2]=a;c[i>>2]=b;c[q>>2]=d;g[o>>2]=+g[c[i>>2]>>2]*9.999999960041972e-13+9.999999717180685e-10;g[p>>2]=+g[c[i>>2]>>2];g[p>>2]=+g[o>>2]>+g[p>>2]?+g[o>>2]:+g[p>>2];g[c[e>>2]>>2]=+g[(c[i>>2]|0)+4>>2]/+g[p>>2];g[p>>2]=+g[p>>2]-+g[c[e>>2]>>2]*+g[(c[i>>2]|0)+4>>2];g[p>>2]=+g[o>>2]>+g[p>>2]?+g[o>>2]:+g[p>>2];c[m>>2]=1;while(1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a;c[s>>2]=b;c[d>>2]=f+((c[s>>2]&1)<<6);_i(c[d>>2]|0,c[t>>2]|0,c[s>>2]<<2|0)|0;h[i>>3]=1.0;c[j>>2]=(c[s>>2]|0)-1;while(1){a=c[d>>2]|0;if((c[j>>2]|0)<=0)break;h[m>>3]=-+g[a+(c[j>>2]<<2)>>2];if(+h[m>>3]>.9998999834060669|+h[m>>3]<-.9998999834060669){q=4;break}h[n>>3]=1.0-+h[m>>3]*+h[m>>3];h[o>>3]=1.0/+h[n>>3];h[i>>3]=+h[i>>3]*+h[n>>3];c[e>>2]=c[d>>2];c[d>>2]=f+((c[j>>2]&1)<<6);c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[j>>2]|0))break;g[(c[d>>2]|0)+(c[k>>2]<<2)>>2]=(+g[(c[e>>2]|0)+(c[k>>2]<<2)>>2]-+g[(c[e>>2]|0)+((c[j>>2]|0)-(c[k>>2]|0)-1<<2)>>2]*+h[m>>3])*+h[o>>3];c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=(c[j>>2]|0)+-1}if((q|0)==4){g[p>>2]=0.0;u=+g[p>>2];l=r;return +u}h[m>>3]=-+g[a>>2];if(+h[m>>3]>.9998999834060669|+h[m>>3]<-.9998999834060669){g[p>>2]=0.0;u=+g[p>>2];l=r;return +u}else{h[n>>3]=1.0-+h[m>>3]*+h[m>>3];h[i>>3]=+h[i>>3]*+h[n>>3];g[p>>2]=+h[i>>3];u=+g[p>>2];l=r;return +u}return 0.0}function uh(d,e,f,i,j,k,m,n,o,p,q,r){d=d|0;e=e|0;f=f|0;i=i|0;j=j|0;k=k|0;m=+m;n=+n;o=o|0;p=p|0;q=q|0;r=r|0;var s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0;La=l;l=l+13936|0;Ka=La+10416|0;pa=La+10412|0;Ja=La+10408|0;Ha=La+10404|0;Fa=La+10400|0;S=La+10396|0;$=La+10392|0;E=La+10388|0;ba=La+10384|0;ya=La+10380|0;ga=La+10376|0;Ia=La+10372|0;fa=La+10368|0;X=La+10364|0;Ga=La+10360|0;ka=La+10356|0;qa=La+10352|0;H=La+9072|0;x=La+8432|0;y=La+13288|0;w=La+12968|0;t=La+8408|0;K=La+8404|0;ha=La+8400|0;M=La+6016|0;G=La+5756|0;P=La+5712|0;xa=La+5708|0;T=La+5704|0;ia=La+24|0;D=La+16|0;na=La+8|0;oa=La;V=La+5608|0;U=La+12664|0;_=La+5600|0;Z=La+5596|0;s=La+5592|0;da=La+5588|0;Q=La+5584|0;R=La+5580|0;ea=La+5576|0;Ca=La+5572|0;O=La+5568|0;za=La+5564|0;wa=La+5560|0;la=La+5556|0;Aa=La+5552|0;Ea=La+5548|0;Y=La+5544|0;aa=La+5540|0;W=La+5536|0;ma=La+2816|0;ja=La+96|0;ra=La+88|0;z=La+84|0;B=La+80|0;A=La+76|0;va=La+72|0;ca=La+68|0;F=La+64|0;Ba=La+60|0;ta=La+56|0;J=La+52|0;sa=La+48|0;I=La+44|0;C=La+40|0;ua=La+36|0;Da=La+32|0;v=La+11384|0;u=La+10424|0;c[pa>>2]=d;c[Ja>>2]=e;c[Ha>>2]=f;c[Fa>>2]=i;c[S>>2]=j;c[$>>2]=k;g[E>>2]=m;g[ba>>2]=n;c[ya>>2]=o;c[ga>>2]=p;c[Ia>>2]=q;c[fa>>2]=r;c[z>>2]=N(20+((c[Ia>>2]|0)*5|0)|0,c[ya>>2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2384)|0;if((c[ya>>2]|0)==8)c[xa>>2]=(c[pa>>2]|0)+640;else c[xa>>2]=H+640;c[Ga>>2]=0;while(1){if((c[Ga>>2]|0)>=(c[Ia>>2]|0))break;h[oa>>3]=+ph(c[xa>>2]|0,c[ca>>2]|0)+1.0;c[qa>>2]=0;while(1){if((c[qa>>2]|0)>=(c[Z>>2]|0))break;c[ka>>2]=b[U+(c[qa>>2]<<1)>>1];c[T>>2]=(c[xa>>2]|0)+(0-(c[ka>>2]|0)<<2);h[ia>>3]=+qh(c[T>>2]|0,c[xa>>2]|0,c[ca>>2]|0);if(+h[ia>>3]>0.0){h[na>>3]=+ph(c[T>>2]|0,c[ca>>2]|0);m=+h[ia>>3]*2.0/(+h[na>>3]+ +h[oa>>3]);s=M+((c[Ga>>2]|0)*596|0)+(c[ka>>2]<<2)|0}else{m=0.0;s=M+((c[Ga>>2]|0)*596|0)+(c[ka>>2]<<2)|0}g[s>>2]=m;c[qa>>2]=(c[qa>>2]|0)+1}c[xa>>2]=(c[xa>>2]|0)+(c[ca>>2]<<2);c[Ga>>2]=(c[Ga>>2]|0)+1}g[da>>2]=0.0;g[Q>>2]=-1.0e3;c[Ca>>2]=0;c[za>>2]=-1;if((c[$>>2]|0)>0){if((c[ya>>2]|0)!=12){if((c[ya>>2]|0)==16)c[$>>2]=c[$>>2]>>1}else c[$>>2]=(c[$>>2]<<1|0)/3|0;g[aa>>2]=+xh(+(c[$>>2]|0))}else g[aa>>2]=0.0;do if((c[Ia>>2]|0)==4){c[Ea>>2]=11;c[Da>>2]=30282;if((c[ya>>2]|0)==8&(c[ga>>2]|0)>0){c[ua>>2]=11;break}else{c[ua>>2]=3;break}}else{c[Ea>>2]=3;c[Da>>2]=30248;c[ua>>2]=3}while(0);c[Ga>>2]=0;while(1){if((c[Ga>>2]|0)>=(c[_>>2]|0))break;c[ka>>2]=c[V+(c[Ga>>2]<<2)>>2];c[qa>>2]=0;while(1){if((c[qa>>2]|0)>=(c[ua>>2]|0))break;g[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);if((c[ya>>2]|0)>8){s=c[za>>2]|0;if((c[ya>>2]|0)==12)c[za>>2]=(((s&65535)<<16>>16)*3>>1)+(((c[za>>2]&65535)<<16>>16)*3&1);else c[za>>2]=s<<1;s=c[za>>2]|0;do if((c[Ba>>2]|0)>(c[sa>>2]|0))if((s|0)>(c[Ba>>2]|0)){s=c[Ba>>2]|0;break}else{s=(c[za>>2]|0)<(c[sa>>2]|0)?c[sa>>2]|0:c[za>>2]|0;break}else if((s|0)>(c[sa>>2]|0)){s=c[sa>>2]|0;break}else{s=(c[za>>2]|0)<(c[Ba>>2]|0)?c[Ba>>2]|0:c[za>>2]|0;break}while(0);c[za>>2]=s;c[wa>>2]=yh((c[za>>2]|0)-2|0,c[Ba>>2]|0)|0;c[la>>2]=zh((c[za>>2]|0)+2|0,c[sa>>2]|0)|0;c[Aa>>2]=c[za>>2];c[Ca>>2]=0;g[da>>2]=-1.0e3;Ah(ja,c[pa>>2]|0,c[wa>>2]|0,c[va>>2]|0,c[Ia>>2]|0,c[ga>>2]|0,c[fa>>2]|0);Bh(ma,c[pa>>2]|0,c[wa>>2]|0,c[va>>2]|0,c[Ia>>2]|0,c[ga>>2]|0);c[ra>>2]=0;g[ha>>2]=.05000000074505806/+(c[za>>2]|0);if((c[Ia>>2]|0)==4){c[ua>>2]=a[30486+(c[ga>>2]|0)>>0];c[Ea>>2]=34;c[Da>>2]=30326}else{c[ua>>2]=12;c[Ea>>2]=12;c[Da>>2]=30254}c[xa>>2]=(c[pa>>2]|0)+((c[ya>>2]|0)*20<<2);h[oa>>3]=+ph(c[xa>>2]|0,N(c[Ia>>2]|0,c[va>>2]|0)|0)+1.0;c[ka>>2]=c[wa>>2];while(1){if((c[ka>>2]|0)>(c[la>>2]|0))break;c[qa>>2]=0;while(1){if((c[qa>>2]|0)>=(c[ua>>2]|0))break;h[ia>>3]=0.0;h[na>>3]=+h[oa>>3];c[Ga>>2]=0;while(1){if((c[Ga>>2]|0)>=(c[Ia>>2]|0))break;h[ia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[h>>2]<<2)>>2])|0)<-32768)d=-32768;else d=Ui(+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2])|0;else d=32767;b[(c[i>>2]|0)+(c[h>>2]<<1)>>1]=d;c[h>>2]=(c[h>>2]|0)+-1}l=j;return}function wh(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;i=j+12|0;f=j+8|0;k=j+4|0;h=j;c[i>>2]=a;c[f>>2]=d;c[k>>2]=e;c[h>>2]=(c[k>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]=+(b[(c[f>>2]|0)+(c[h>>2]<<1)>>1]|0);c[h>>2]=(c[h>>2]|0)+-1}l=j;return}function xh(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;h[c>>3]=a;a=+Ti(+h[c>>3])*3.32192809488736;l=b;return +a}function yh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function zh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Ah(b,d,e,f,h,i,j){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;H=l;l=l+256|0;q=H+252|0;s=H+248|0;E=H+244|0;D=H+240|0;B=H+236|0;p=H+232|0;n=H+228|0;F=H+224|0;t=H+220|0;v=H+216|0;w=H+212|0;x=H+208|0;z=H+204|0;y=H+200|0;A=H+196|0;r=H+192|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]=(c[F>>2]|0)+(c[D>>2]<<2);c[w>>2]=(c[w>>2]|0)+1}l=H;return}function Bh(b,d,e,f,i,j){b=b|0;d=d|0;e=e|0;f=f|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;G=l;l=l+176|0;r=G+168|0;t=G+164|0;E=G+160|0;D=G+156|0;B=G+152|0;p=G+148|0;F=G+144|0;n=G+140|0;s=G;x=G+136|0;u=G+132|0;w=G+128|0;y=G+124|0;A=G+120|0;q=G+116|0;v=G+112|0;o=G+108|0;z=G+104|0;C=G+16|0;m=G+12|0;k=G+8|0;c[r>>2]=b;c[t>>2]=d;c[E>>2]=e;c[D>>2]=f;c[B>>2]=i;c[p>>2]=j;if((c[B>>2]|0)==4){c[m>>2]=30462+(c[p>>2]<<3);c[k>>2]=30326;c[A>>2]=a[30486+(c[p>>2]|0)>>0];c[o>>2]=34}else{c[m>>2]=30278;c[k>>2]=30254;c[A>>2]=12;c[o>>2]=12}c[F>>2]=(c[t>>2]|0)+(c[D>>2]<<2<<2);c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[B>>2]|0))break;c[y>>2]=0;c[n>>2]=(c[F>>2]|0)+(0-((c[E>>2]|0)+(a[(c[m>>2]|0)+((c[x>>2]<<1)+0)>>0]|0))<<2);h[s>>3]=+ph(c[n>>2]|0,c[D>>2]|0)+.001;g[C+(c[y>>2]<<2)>>2]=+h[s>>3];c[y>>2]=(c[y>>2]|0)+1;c[z>>2]=(a[(c[m>>2]|0)+((c[x>>2]<<1)+1)>>0]|0)-(a[(c[m>>2]|0)+((c[x>>2]<<1)+0)>>0]|0)+1;c[u>>2]=1;while(1){if((c[u>>2]|0)>=(c[z>>2]|0))break;h[s>>3]=+h[s>>3]-+g[(c[n>>2]|0)+((c[D>>2]|0)-(c[u>>2]|0)<<2)>>2]*+g[(c[n>>2]|0)+((c[D>>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while(1){if((c[j>>2]|0)>=((c[m>>2]|0)+1|0))break;q=+g[(c[i>>2]|0)+(c[j>>2]<<2)>>2];g[e+(c[j>>2]<<3)+4>>2]=q;g[e+(c[j>>2]<<3)>>2]=q;c[j>>2]=(c[j>>2]|0)+1}c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[m>>2]|0))break;g[n>>2]=-+g[e+((c[j>>2]|0)+1<<3)>>2]/(+g[e+4>>2]>9.999999717180685e-10?+g[e+4>>2]:9.999999717180685e-10);g[(c[o>>2]|0)+(c[j>>2]<<2)>>2]=+g[n>>2];c[k>>2]=0;while(1){if((c[k>>2]|0)>=((c[m>>2]|0)-(c[j>>2]|0)|0))break;g[f>>2]=+g[e+((c[k>>2]|0)+(c[j>>2]|0)+1<<3)>>2];g[h>>2]=+g[e+(c[k>>2]<<3)+4>>2];g[e+((c[k>>2]|0)+(c[j>>2]|0)+1<<3)>>2]=+g[f>>2]+ +g[h>>2]*+g[n>>2];g[e+(c[k>>2]<<3)+4>>2]=+g[h>>2]+ +g[f>>2]*+g[n>>2];c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=(c[j>>2]|0)+1}l=p;return +(+g[e+4>>2])}function Fh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;i=o+24|0;k=o+20|0;h=o+16|0;f=o+12|0;n=o+8|0;j=o+4|0;m=o;c[i>>2]=a;c[k>>2]=b;c[h>>2]=d;c[f>>2]=e;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[f>>2]|0))break;c[(c[k>>2]|0)+(c[j>>2]<<2)>>2]=c[j>>2];c[j>>2]=(c[j>>2]|0)+1}c[j>>2]=1;while(1){if((c[j>>2]|0)>=(c[f>>2]|0))break;g[n>>2]=+g[(c[i>>2]|0)+(c[j>>2]<<2)>>2];c[m>>2]=(c[j>>2]|0)-1;while(1){if((c[m>>2]|0)<0)break;if(!(+g[n>>2]>+g[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>2]>>0]=e;c[g>>2]=1;h=c[g>>2]|0;l=i;return h|0}else{a[c[f>>2]>>0]=252+(e&3);a[(c[f>>2]|0)+1>>0]=(c[h>>2]|0)-(d[c[f>>2]>>0]|0)>>2;c[g>>2]=2;h=c[g>>2]|0;l=i;return h|0}return 0}function Ih(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;a=d[c[e>>2]>>0]|0;if((d[c[e>>2]>>0]|0)&128|0){c[g>>2]=a>>3&3;c[g>>2]=(c[f>>2]<>2]|0)/400|0;g=c[g>>2]|0;l=h;return g|0}b=d[c[e>>2]>>0]|0;if((a&96|0)==96){c[g>>2]=(c[f>>2]|0)/((b&8|0?50:100)|0)|0;g=c[g>>2]|0;l=h;return g|0}c[g>>2]=b>>3&3;b=c[f>>2]|0;if((c[g>>2]|0)==3){c[g>>2]=(b*60|0)/1e3|0;g=c[g>>2]|0;l=h;return g|0}else{c[g>>2]=(b<>2]|0)/100|0;g=c[g>>2]|0;l=h;return g|0}return 0}function Jh(e,f,g,h,i,j,k,m){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=l;l=l+80|0;D=J+72|0;r=J+68|0;x=J+64|0;E=J+60|0;y=J+56|0;t=J+52|0;F=J+48|0;C=J+44|0;A=J+40|0;v=J+36|0;n=J+32|0;q=J+28|0;o=J+24|0;p=J+77|0;H=J+76|0;u=J+20|0;w=J+16|0;B=J+12|0;s=J+8|0;z=J+4|0;G=J;c[r>>2]=e;c[x>>2]=f;c[E>>2]=g;c[y>>2]=h;c[t>>2]=i;c[F>>2]=j;c[C>>2]=k;c[A>>2]=m;c[B>>2]=0;c[s>>2]=c[r>>2];if(!(c[F>>2]|0)){c[D>>2]=-1;I=c[D>>2]|0;l=J;return I|0}c[u>>2]=Ih(c[r>>2]|0,48e3)|0;c[o>>2]=0;j=c[r>>2]|0;c[r>>2]=j+1;a[H>>0]=a[j>>0]|0;c[x>>2]=(c[x>>2]|0)+-1;c[w>>2]=c[x>>2];a:do switch(d[H>>0]&3|0){case 0:{c[q>>2]=1;break}case 1:{c[q>>2]=2;c[o>>2]=1;if(!(c[E>>2]|0)){if(!(c[x>>2]&1)){c[w>>2]=(c[x>>2]|0)/2|0;b[c[F>>2]>>1]=c[w>>2];break a}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}break}case 2:{c[q>>2]=2;c[n>>2]=Kh(c[r>>2]|0,c[x>>2]|0,c[F>>2]|0)|0;c[x>>2]=(c[x>>2]|0)-(c[n>>2]|0);if((b[c[F>>2]>>1]|0)>=0?(b[c[F>>2]>>1]|0)<=(c[x>>2]|0):0){c[r>>2]=(c[r>>2]|0)+(c[n>>2]|0);c[w>>2]=(c[x>>2]|0)-(b[c[F>>2]>>1]|0);break a}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}default:{if((c[x>>2]|0)<1){c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}j=c[r>>2]|0;c[r>>2]=j+1;a[p>>0]=a[j>>0]|0;c[q>>2]=d[p>>0]&63;if((c[q>>2]|0)>0?(N(c[u>>2]|0,c[q>>2]|0)|0)<=5760:0){c[x>>2]=(c[x>>2]|0)+-1;b:do if(d[p>>0]&64|0){while(1){if((c[x>>2]|0)<=0)break;j=c[r>>2]|0;c[r>>2]=j+1;c[z>>2]=d[j>>0];c[x>>2]=(c[x>>2]|0)+-1;c[G>>2]=(c[z>>2]|0)==255?254:c[z>>2]|0;c[x>>2]=(c[x>>2]|0)-(c[G>>2]|0);c[B>>2]=(c[B>>2]|0)+(c[G>>2]|0);if((c[z>>2]|0)!=255)break b}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}while(0);if((c[x>>2]|0)<0){c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}c[o>>2]=((d[p>>0]&128|0)!=0^1)&1;if(c[o>>2]|0){if(c[E>>2]|0)break a;c[w>>2]=(c[x>>2]|0)/(c[q>>2]|0)|0;I=N(c[w>>2]|0,c[q>>2]|0)|0;if((I|0)!=(c[x>>2]|0)){c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}c[v>>2]=0;while(1){if((c[v>>2]|0)>=((c[q>>2]|0)-1|0))break a;b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]=c[w>>2];c[v>>2]=(c[v>>2]|0)+1}}c[w>>2]=c[x>>2];c[v>>2]=0;while(1){if((c[v>>2]|0)>=((c[q>>2]|0)-1|0))break;c[n>>2]=Kh(c[r>>2]|0,c[x>>2]|0,(c[F>>2]|0)+(c[v>>2]<<1)|0)|0;c[x>>2]=(c[x>>2]|0)-(c[n>>2]|0);if((b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]|0)<0){I=29;break}if((b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]|0)>(c[x>>2]|0)){I=29;break}c[r>>2]=(c[r>>2]|0)+(c[n>>2]|0);c[w>>2]=(c[w>>2]|0)-((c[n>>2]|0)+(b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]|0));c[v>>2]=(c[v>>2]|0)+1}if((I|0)==29){c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}if((c[w>>2]|0)>=0)break a;c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}}while(0);c:do if(c[E>>2]|0){c[n>>2]=Kh(c[r>>2]|0,c[x>>2]|0,(c[F>>2]|0)+(c[q>>2]<<1)+-2|0)|0;c[x>>2]=(c[x>>2]|0)-(c[n>>2]|0);if((b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0)>=0?(b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0)<=(c[x>>2]|0):0){c[r>>2]=(c[r>>2]|0)+(c[n>>2]|0);if(!(c[o>>2]|0)){if(((c[n>>2]|0)+(b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0)|0)<=(c[w>>2]|0))break;c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}I=N(b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0,c[q>>2]|0)|0;if((I|0)>(c[x>>2]|0)){c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}c[v>>2]=0;while(1){if((c[v>>2]|0)>=((c[q>>2]|0)-1|0))break c;b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]=b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0;c[v>>2]=(c[v>>2]|0)+1}}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}else{if((c[w>>2]|0)<=1275){b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]=c[w>>2];break}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}while(0);if(c[C>>2]|0)c[c[C>>2]>>2]=(c[r>>2]|0)-(c[s>>2]|0);c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[q>>2]|0))break;if(c[t>>2]|0)c[(c[t>>2]|0)+(c[v>>2]<<2)>>2]=c[r>>2];c[r>>2]=(c[r>>2]|0)+(b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]|0);c[v>>2]=(c[v>>2]|0)+1}if(c[A>>2]|0)c[c[A>>2]>>2]=(c[B>>2]|0)+((c[r>>2]|0)-(c[s>>2]|0));if(c[y>>2]|0)a[c[y>>2]>>0]=a[H>>0]|0;c[D>>2]=c[q>>2];I=c[D>>2]|0;l=J;return I|0}function Kh(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;i=k+12|0;g=k+8|0;h=k+4|0;j=k;c[g>>2]=a;c[h>>2]=e;c[j>>2]=f;if((c[h>>2]|0)<1){b[c[j>>2]>>1]=-1;c[i>>2]=-1;j=c[i>>2]|0;l=k;return j|0}if((d[c[g>>2]>>0]|0|0)<252){b[c[j>>2]>>1]=d[c[g>>2]>>0]|0;c[i>>2]=1;j=c[i>>2]|0;l=k;return j|0}if((c[h>>2]|0)<2){b[c[j>>2]>>1]=-1;c[i>>2]=-1;j=c[i>>2]|0;l=k;return j|0}else{b[c[j>>2]>>1]=((d[(c[g>>2]|0)+1>>0]|0)<<2)+(d[c[g>>2]>>0]|0);c[i>>2]=2;j=c[i>>2]|0;l=k;return j|0}return 0}function Lh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;f=h+16|0;d=h+12|0;g=h+8|0;b=h+4|0;e=h;c[d>>2]=a;if((c[d>>2]|0)<1|(c[d>>2]|0)>2){c[f>>2]=0;g=c[f>>2]|0;l=h;return g|0}c[e>>2]=yd(g)|0;if(c[e>>2]|0){c[f>>2]=0;g=c[f>>2]|0;l=h;return g|0}else{c[g>>2]=Mh(c[g>>2]|0)|0;c[b>>2]=ob(c[d>>2]|0)|0;e=Mh(88)|0;c[f>>2]=e+(c[g>>2]|0)+(c[b>>2]|0);g=c[f>>2]|0;l=h;return g|0}return 0}function Mh(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=4;a=N((((c[e>>2]|0)+(c[d>>2]|0)-1|0)>>>0)/((c[d>>2]|0)>>>0)|0,c[d>>2]|0)|0;l=b;return a|0}function Nh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;n=o;i=o+32|0;m=o+28|0;e=o+24|0;g=o+20|0;k=o+16|0;f=o+12|0;h=o+8|0;j=o+4|0;c[m>>2]=a;c[e>>2]=b;c[g>>2]=d;if(!((c[e>>2]|0)!=48e3&(c[e>>2]|0)!=24e3&(c[e>>2]|0)!=16e3&(c[e>>2]|0)!=12e3&(c[e>>2]|0)!=8e3)?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0;O=l;l=l+208|0;K=O+88|0;L=O+84|0;o=O+80|0;s=O+76|0;H=O+72|0;G=O+68|0;p=O+64|0;C=O+60|0;y=O+56|0;E=O+52|0;r=O+48|0;t=O+44|0;n=O+40|0;u=O+36|0;F=O+192|0;w=O+32|0;v=O+28|0;x=O+24|0;z=O+20|0;D=O+96|0;I=O+16|0;J=O+12|0;q=O+8|0;A=O+4|0;B=O;c[L>>2]=a;c[o>>2]=d;c[s>>2]=e;c[H>>2]=f;c[G>>2]=h;c[p>>2]=i;c[C>>2]=j;c[y>>2]=k;c[E>>2]=m;if((c[p>>2]|0)<0|(c[p>>2]|0)>1){c[K>>2]=-1;M=c[K>>2]|0;l=O;return M|0}if((c[p>>2]|0)!=0|(c[s>>2]|0)==0|(c[o>>2]|0)==0?(c[G>>2]|0)%((c[(c[L>>2]|0)+12>>2]|0)/400|0|0)|0|0:0){c[K>>2]=-1;M=c[K>>2]|0;l=O;return M|0}if((c[s>>2]|0)==0|(c[o>>2]|0)==0){c[I>>2]=0;while(1){n=(c[H>>2]|0)+((N(c[I>>2]|0,c[(c[L>>2]|0)+8>>2]|0)|0)<<2)|0;c[J>>2]=Qh(c[L>>2]|0,0,0,n,(c[G>>2]|0)-(c[I>>2]|0)|0,0)|0;n=c[J>>2]|0;if((c[J>>2]|0)<0){M=9;break}c[I>>2]=(c[I>>2]|0)+n;if((c[I>>2]|0)>=(c[G>>2]|0)){M=11;break}}if((M|0)==9){c[K>>2]=n;M=c[K>>2]|0;l=O;return M|0}else if((M|0)==11){Rh()|0;c[(c[L>>2]|0)+72>>2]=c[I>>2];c[K>>2]=c[I>>2];M=c[K>>2]|0;l=O;return M|0}}if((c[s>>2]|0)<0){c[K>>2]=-1;M=c[K>>2]|0;l=O;return M|0}c[x>>2]=Sh(c[o>>2]|0)|0;c[v>>2]=Th(c[o>>2]|0)|0;c[w>>2]=Ih(c[o>>2]|0,c[(c[L>>2]|0)+12>>2]|0)|0;c[z>>2]=Uh(c[o>>2]|0)|0;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[v>>2];c[(c[L>>2]|0)+64>>2]=c[w>>2];c[(c[L>>2]|0)+48>>2]=c[z>>2];c[t>>2]=0;c[r>>2]=0;while(1){if((c[r>>2]|0)>=(c[n>>2]|0))break;J=(c[H>>2]|0)+((N(c[t>>2]|0,c[(c[L>>2]|0)+8>>2]|0)|0)<<2)|0;c[B>>2]=Qh(c[L>>2]|0,c[o>>2]|0,b[D+(c[r>>2]<<1)>>1]|0,J,(c[G>>2]|0)-(c[t>>2]|0)|0,0)|0;if((c[B>>2]|0)<0){M=31;break}c[o>>2]=(c[o>>2]|0)+(b[D+(c[r>>2]<<1)>>1]|0);c[t>>2]=(c[t>>2]|0)+(c[B>>2]|0);c[r>>2]=(c[r>>2]|0)+1}if((M|0)==31){c[K>>2]=c[B>>2];M=c[K>>2]|0;l=O;return M|0}c[(c[L>>2]|0)+72>>2]=c[t>>2];Rh()|0;if(c[E>>2]|0)Gh(c[H>>2]|0,c[t>>2]|0,c[(c[L>>2]|0)+8>>2]|0,(c[L>>2]|0)+76|0);else{g[(c[L>>2]|0)+76+4>>2]=0.0;g[(c[L>>2]|0)+76>>2]=0.0}c[K>>2]=c[t>>2];M=c[K>>2]|0;l=O;return M|0} +function ca(a){a=a|0;var b=0;b=l;l=l+a|0;l=l+15&-16;return b|0}function da(){return l|0}function ea(a){a=a|0;l=a}function fa(a,b){a=a|0;b=b|0;l=a;m=b}function ga(a,b){a=a|0;b=b|0;if(!n){n=a;o=b}}function ha(a){a=a|0;y=a}function ia(){return y|0}function ja(a,b,d,e,f){a=+a;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;n=o+20|0;m=o+16|0;i=o+12|0;h=o+8|0;k=o+4|0;j=o;g[n>>2]=a;c[m>>2]=b;c[i>>2]=d;c[h>>2]=e;c[k>>2]=f;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[h>>2]|0))break;if(+g[n>>2]<+g[(c[m>>2]|0)+(c[j>>2]<<2)>>2])break;c[j>>2]=(c[j>>2]|0)+1}if((c[j>>2]|0)>(c[k>>2]|0)?+g[n>>2]<+g[(c[m>>2]|0)+(c[k>>2]<<2)>>2]+ +g[(c[i>>2]|0)+(c[k>>2]<<2)>>2]:0)c[j>>2]=c[k>>2];if((c[j>>2]|0)>=(c[k>>2]|0)){n=c[j>>2]|0;l=o;return n|0}if(!(+g[n>>2]>+g[(c[m>>2]|0)+((c[k>>2]|0)-1<<2)>>2]-+g[(c[i>>2]|0)+((c[k>>2]|0)-1<<2)>>2])){n=c[j>>2]|0;l=o;return n|0}c[j>>2]=c[k>>2];n=c[j>>2]|0;l=o;return n|0}function ka(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(N(1664525,c[d>>2]|0)|0)+1013904223|0;l=b;return a|0}function la(a,d,e,f,h,i){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0;v=l;l=l+48|0;t=v+40|0;n=v+36|0;o=v+32|0;r=v+28|0;j=v+24|0;k=v+20|0;s=v+16|0;p=v+12|0;m=v+8|0;q=v+4|0;u=v;c[t>>2]=a;c[n>>2]=d;c[o>>2]=e;c[r>>2]=f;c[j>>2]=h;c[k>>2]=i;c[q>>2]=c[(c[t>>2]|0)+32>>2];c[m>>2]=c[(c[t>>2]|0)+44>>2]<>2];c[p>>2]=0;do{c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[r>>2]|0))break;f=N(c[p>>2]|0,c[m>>2]|0)|0;a=N(c[p>>2]|0,c[m>>2]|0)|0;g[u>>2]=+ma((c[n>>2]|0)+(f+(b[(c[q>>2]|0)+(c[s>>2]<<1)>>1]<>2])<<2)|0,(c[n>>2]|0)+(a+(b[(c[q>>2]|0)+(c[s>>2]<<1)>>1]<>2])<<2)|0,(b[(c[q>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0)-(b[(c[q>>2]|0)+(c[s>>2]<<1)>>1]|0)<>2])+1.0000000272452012e-27;w=+B(+(+g[u>>2]));g[(c[o>>2]|0)+((c[s>>2]|0)+(N(c[p>>2]|0,c[(c[t>>2]|0)+8>>2]|0)|0)<<2)>>2]=w;c[s>>2]=(c[s>>2]|0)+1}a=(c[p>>2]|0)+1|0;c[p>>2]=a}while((a|0)<(c[j>>2]|0));l=v;return}function ma(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;i=m+16|0;k=m+12|0;f=m+8|0;h=m+4|0;j=m;c[i>>2]=a;c[k>>2]=b;c[f>>2]=d;g[j>>2]=0.0;c[h>>2]=0;while(1){e=+g[j>>2];if((c[h>>2]|0)>=(c[f>>2]|0))break;g[j>>2]=e+ +g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]*+g[(c[k>>2]|0)+(c[h>>2]<<2)>>2];c[h>>2]=(c[h>>2]|0)+1}l=m;return +e}function na(a,d,e,f,h,i,j){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0.0;y=l;l=l+64|0;x=y+48|0;t=y+44|0;o=y+40|0;p=y+36|0;s=y+32|0;k=y+28|0;m=y+24|0;v=y+20|0;q=y+16|0;n=y+12|0;r=y+8|0;w=y+4|0;u=y;c[x>>2]=a;c[t>>2]=d;c[o>>2]=e;c[p>>2]=f;c[s>>2]=h;c[k>>2]=i;c[m>>2]=j;c[r>>2]=c[(c[x>>2]|0)+32>>2];c[n>>2]=N(c[m>>2]|0,c[(c[x>>2]|0)+44>>2]|0)|0;c[q>>2]=0;do{c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[s>>2]|0))break;g[u>>2]=1.0/(+g[(c[p>>2]|0)+((c[v>>2]|0)+(N(c[q>>2]|0,c[(c[x>>2]|0)+8>>2]|0)|0)<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!=2){if(!(c[c[H>>2]>>2]|0))c[z>>2]=(c[z>>2]|0)-4}else c[z>>2]=(c[z>>2]|0)+4;if((c[z>>2]|0)>22){c[c[H>>2]>>2]=2;break}else{c[c[H>>2]>>2]=(c[z>>2]|0)>18?1:0;break}}while(0);c[G>>2]=qa(c[G>>2]|0,c[E>>2]|0)|0;c[G>>2]=(c[G>>2]|0)+(c[c[t>>2]>>2]|0)>>1;c[c[t>>2]>>2]=c[G>>2];c[G>>2]=((c[G>>2]|0)*3|0)+((3-(c[C>>2]|0)<<7)+64)+2>>2;do if((c[G>>2]|0)>=80){if((c[G>>2]|0)<256){c[v>>2]=2;break}if((c[G>>2]|0)<384){c[v>>2]=1;break}else{c[v>>2]=0;break}}else c[v>>2]=3;while(0);c[F>>2]=c[v>>2];M=c[F>>2]|0;l=O;return M|0}function sa(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;f=n+24|0;e=n+20|0;j=n+16|0;h=n+12|0;i=n+8|0;k=n+4|0;m=n;c[f>>2]=a;c[e>>2]=b;c[j>>2]=d;c[e>>2]=c[e>>2]>>1;c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[j>>2]|0))break;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[e>>2]|0))break;d=N(c[j>>2]<<1,c[i>>2]|0)|0;g[k>>2]=+g[(c[f>>2]|0)+(d+(c[h>>2]|0)<<2)>>2]*.7071067690849304;d=N(c[j>>2]|0,(c[i>>2]<<1)+1|0)|0;g[m>>2]=+g[(c[f>>2]|0)+(d+(c[h>>2]|0)<<2)>>2]*.7071067690849304;d=N(c[j>>2]<<1,c[i>>2]|0)|0;g[(c[f>>2]|0)+(d+(c[h>>2]|0)<<2)>>2]=+g[k>>2]+ +g[m>>2];d=N(c[j>>2]|0,(c[i>>2]<<1)+1|0)|0;g[(c[f>>2]|0)+(d+(c[h>>2]|0)<<2)>>2]=+g[k>>2]-+g[m>>2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c[r>>2]|0,+g[D>>2],c[C>>2]|0)|0;if(c[M>>2]|0){if((c[q>>2]|0)>1)Aa(c[w>>2]|0,c[u>>2]>>c[L>>2],c[q>>2]<>2],c[G>>2]|0);c[u>>2]=c[v>>2];c[p>>2]=c[q>>2];c[F>>2]=0;while(1){if((c[F>>2]|0)>=(c[P>>2]|0))break;c[p>>2]=c[p>>2]>>1;c[u>>2]=c[u>>2]<<1;c[y>>2]=c[y>>2]|(c[y>>2]|0)>>>(c[p>>2]|0);sa(c[w>>2]|0,c[u>>2]|0,c[p>>2]|0);c[F>>2]=(c[F>>2]|0)+1}c[F>>2]=0;while(1){if((c[F>>2]|0)>=(c[L>>2]|0))break;c[y>>2]=d[25212+(c[y>>2]|0)>>0];sa(c[w>>2]|0,c[t>>2]>>c[F>>2],1<>2]);c[F>>2]=(c[F>>2]|0)+1}c[p>>2]=c[p>>2]<>2];a:do if(c[I>>2]|0){g[K>>2]=+B(+(+(c[t>>2]|0)));c[E>>2]=0;while(1){if((c[E>>2]|0)>=(c[t>>2]|0))break a;g[(c[I>>2]|0)+(c[E>>2]<<2)>>2]=+g[K>>2]*+g[(c[w>>2]|0)+(c[E>>2]<<2)>>2];c[E>>2]=(c[E>>2]|0)+1}}while(0);c[y>>2]=c[y>>2]&(1<>2])-1}c[N>>2]=c[y>>2];P=c[N>>2]|0;l=Q;return P|0}function wa(a,b,d,e,f,h,i,j,k,m,n){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;X=l;l=l+160|0;U=X+156|0;I=X+152|0;F=X+148|0;G=X+144|0;E=X+140|0;A=X+136|0;C=X+132|0;N=X+128|0;D=X+124|0;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i>>2]|0)>>0]|0)+1|0;l=j;return n|0}function Ea(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;a=c[b>>2]|0;if((c[b>>2]|0)<8){b=a;l=d;return b|0}b=8+(a&7)<<(c[b>>2]>>3)-1;l=d;return b|0}function Fa(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;o=l;l=l+32|0;p=o+28|0;i=o+24|0;j=o+20|0;k=o+16|0;q=o+12|0;n=o+8|0;m=o+4|0;h=o;c[p>>2]=a;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;c[q>>2]=g;c[h>>2]=(c[p>>2]<<1)-1;if((c[q>>2]|0)!=0&(c[p>>2]|0)==2)c[h>>2]=(c[h>>2]|0)+-1;q=(c[i>>2]|0)+(N(c[h>>2]|0,c[j>>2]|0)|0)|0;c[m>>2]=ua(q,c[h>>2]|0)|0;if(((c[i>>2]|0)-(c[k>>2]|0)-32|0)<(c[m>>2]|0))a=(c[i>>2]|0)-(c[k>>2]|0)-32|0;else a=c[m>>2]|0;c[m>>2]=a;c[m>>2]=64<(c[m>>2]|0)?64:c[m>>2]|0;if((c[m>>2]|0)<4){c[n>>2]=1;q=c[n>>2]|0;l=o;return q|0}else{c[n>>2]=b[22328+((c[m>>2]&7)<<1)>>1]>>14-(c[m>>2]>>3);c[n>>2]=(c[n>>2]|0)+1>>1<<1;q=c[n>>2]|0;l=o;return q|0}return 0}function Ga(a,b,d,e,f,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;r=l;l=l+64|0;v=r+56|0;j=r+52|0;k=r+48|0;x=r+44|0;y=r+40|0;i=r+36|0;w=r+32|0;o=r+28|0;m=r+24|0;n=r+20|0;u=r+16|0;t=r+12|0;s=r+8|0;q=r+4|0;p=r;c[v>>2]=a;c[j>>2]=b;c[k>>2]=d;c[x>>2]=e;c[y>>2]=f;c[i>>2]=h;c[w>>2]=c[y>>2];g[u>>2]=+g[(c[x>>2]|0)+(c[w>>2]<<2)>>2];g[t>>2]=+g[(c[x>>2]|0)+((c[w>>2]|0)+(c[(c[v>>2]|0)+8>>2]|0)<<2)>>2];g[s>>2]=+B(+(+g[u>>2]*+g[u>>2]+1.0000000036274937e-15+ +g[t>>2]*+g[t>>2]))+1.0000000036274937e-15;g[m>>2]=+g[u>>2]/+g[s>>2];g[n>>2]=+g[t>>2]/+g[s>>2];c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[i>>2]|0))break;g[p>>2]=+g[(c[j>>2]|0)+(c[o>>2]<<2)>>2];g[q>>2]=+g[(c[k>>2]|0)+(c[o>>2]<<2)>>2];g[(c[j>>2]|0)+(c[o>>2]<<2)>>2]=+g[m>>2]*+g[p>>2]+ +g[n>>2]*+g[q>>2];c[o>>2]=(c[o>>2]|0)+1}l=r;return}function Ha(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;h=m+16|0;e=m+12|0;i=m+8|0;k=m+4|0;j=m;c[f>>2]=a;c[h>>2]=b;c[e>>2]=d;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[e>>2]|0))break;g[j>>2]=+g[(c[f>>2]|0)+(c[i>>2]<<2)>>2]*.7071067690849304;g[k>>2]=+g[(c[h>>2]|0)+(c[i>>2]<<2)>>2]*.7071067690849304;g[(c[f>>2]|0)+(c[i>>2]<<2)>>2]=+g[j>>2]+ +g[k>>2];g[(c[h>>2]|0)+(c[i>>2]<<2)>>2]=+g[k>>2]-+g[j>>2];c[i>>2]=(c[i>>2]|0)+1}l=m;return}function Ia(a){a=a|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;g=e+6|0;f=e;d=e+4|0;b[g>>1]=a;c[f>>2]=4096+(N(b[g>>1]|0,b[g>>1]|0)|0)>>13;b[d>>1]=c[f>>2];b[d>>1]=32767-(b[d>>1]|0)+(16384+(N(b[d>>1]|0,((16384+(N(b[d>>1]|0,(8277+(16384+(N(-626,b[d>>1]|0)|0)>>15)&65535)<<16>>16)|0)>>15)+-7651&65535)<<16>>16)|0)>>15);l=e;return 1+(b[d>>1]|0)&65535|0}function Ja(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=l;l=l+16|0;f=d+12|0;e=d+8|0;g=d+4|0;h=d;c[f>>2]=a;c[e>>2]=b;c[g>>2]=32-(Q(c[e>>2]|0)|0);c[h>>2]=32-(Q(c[f>>2]|0)|0);c[e>>2]=c[e>>2]<<15-(c[g>>2]|0);c[f>>2]=c[f>>2]<<15-(c[h>>2]|0);a=((c[h>>2]|0)-(c[g>>2]|0)<<11)+(16384+(N((c[f>>2]&65535)<<16>>16,((16384+(N((c[f>>2]&65535)<<16>>16,-2597)|0)>>15)+7932&65535)<<16>>16)|0)>>15)|0;a=a-(16384+(N((c[e>>2]&65535)<<16>>16,((16384+(N((c[e>>2]&65535)<<16>>16,-2597)|0)>>15)+7932&65535)<<16>>16)|0)>>15)|0;l=d;return a|0}function Ka(a,b,d,e,f){a=a|0;b=b|0;d=+d;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;u=l;l=l+64|0;k=u+60|0;m=u+56|0;q=u+52|0;j=u+48|0;n=u+40|0;v=u+36|0;w=u+32|0;h=u+28|0;i=u+24|0;x=u+20|0;t=u+16|0;p=u+12|0;s=u+8|0;r=u+4|0;o=u;c[k>>2]=a;c[m>>2]=b;g[q>>2]=d;c[j>>2]=e;c[u+44>>2]=f;g[v>>2]=0.0;g[w>>2]=0.0;La(c[m>>2]|0,c[k>>2]|0,c[m>>2]|0,c[j>>2]|0,v,w);g[v>>2]=+g[q>>2]*+g[v>>2];g[x>>2]=+g[q>>2];g[h>>2]=+g[x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+1}g[c[p>>2]>>2]=i;g[c[q>>2]>>2]=+g[o>>2];l=t;return}function Ma(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;f=e+4|0;b=e;c[f>>2]=a;a=c[f>>2]|0;a:do if((a|0)<16e3)if((a|0)<12e3){switch(a|0){case 8e3:break;default:{d=7;break a}}c[b>>2]=6;break}else{switch(a|0){case 12e3:break;default:{d=7;break a}}c[b>>2]=4;break}else{if((a|0)<24e3){switch(a|0){case 16e3:break;default:{d=7;break a}}c[b>>2]=3;break}if((a|0)<48e3){switch(a|0){case 24e3:break;default:{d=7;break a}}c[b>>2]=2;break}else{switch(a|0){case 48e3:break;default:{d=7;break a}}c[b>>2]=1;break}}while(0);if((d|0)==7)c[b>>2]=0;l=e;return c[b>>2]|0}function Na(a,b,d,e,f,h,i,j,k,m,n,o){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=+h;i=+i;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;N=l;l=l+112|0;M=N+96|0;G=N+92|0;q=N+88|0;r=N+84|0;p=N+80|0;t=N+76|0;x=N+72|0;D=N+68|0;E=N+64|0;F=N+60|0;C=N+56|0;B=N+48|0;u=N+44|0;v=N+40|0;w=N+36|0;y=N+32|0;z=N+28|0;A=N+24|0;H=N+20|0;I=N+16|0;J=N+12|0;K=N+8|0;L=N+4|0;s=N;c[M>>2]=a;c[G>>2]=b;c[q>>2]=d;c[r>>2]=e;c[p>>2]=f;g[t>>2]=h;g[x>>2]=i;c[D>>2]=j;c[E>>2]=k;c[F>>2]=m;c[C>>2]=n;c[N+52>>2]=o;if(+g[t>>2]==0.0&+g[x>>2]==0.0){if((c[G>>2]|0)==(c[M>>2]|0)){l=N;return}$i(c[M>>2]|0,c[G>>2]|0,(c[p>>2]<<2)+0|0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;return d|0}return 0}function Ra(){return 25411}function Sa(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=sc(48e3,960,0)|0;a=Ta(c[e>>2]|0,c[d>>2]|0)|0;l=b;return a|0}function Ta(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;a=204+((N(c[g>>2]|0,c[(c[f>>2]|0)+4>>2]|0)|0)-1<<2)|0;c[d>>2]=a+(c[g>>2]<<10<<2)+((N((c[g>>2]|0)*3|0,c[(c[f>>2]|0)+8>>2]|0)|0)<<2);l=e;return c[d>>2]|0}function Ua(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+32|0;g=j+20|0;i=j+16|0;h=j+12|0;m=j+8|0;k=j+4|0;f=j;c[i>>2]=a;c[h>>2]=b;c[m>>2]=d;c[k>>2]=e;b=c[i>>2]|0;a=sc(48e3,960,0)|0;c[f>>2]=Va(b,a,c[m>>2]|0,c[k>>2]|0)|0;if(c[f>>2]|0){c[g>>2]=c[f>>2];m=c[g>>2]|0;l=j;return m|0}else{m=Ma(c[h>>2]|0)|0;c[(c[i>>2]|0)+28>>2]=m;c[g>>2]=0;m=c[g>>2]|0;l=j;return m|0}return 0}function Va(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;i=k+20|0;j=k+16|0;h=k+12|0;g=k+8|0;f=k+4|0;c[j>>2]=a;c[h>>2]=b;c[g>>2]=d;c[f>>2]=e;if((c[g>>2]|0)<0|(c[g>>2]|0)>2){c[i>>2]=-1;j=c[i>>2]|0;l=k;return j|0}if((c[j>>2]|0)==0|(c[h>>2]|0)==0){c[i>>2]=-7;j=c[i>>2]|0;l=k;return j|0}else{a=c[j>>2]|0;aj(a|0,0,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;q=Y+20|0;G=Y+16|0;r=Y+12|0;I=Y+8|0;s=Y+4|0;J=Y;c[V>>2]=a;c[Z>>2]=b;c[e>>2]=d;do switch(c[Z>>2]|0){case 4010:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[C>>2]=Z;c[m>>2]=c[C>>2];if((c[m>>2]|0)<0|(c[m>>2]|0)>10)e=41;else{c[(c[V>>2]|0)+24>>2]=c[m>>2];e=40}break}case 10010:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[Q>>2]=Z;c[w>>2]=c[Q>>2];if((c[w>>2]|0)>=0?(c[w>>2]|0)<(c[(c[c[V>>2]>>2]|0)+8>>2]|0):0){c[(c[V>>2]|0)+32>>2]=c[w>>2];e=40}else e=41;break}case 10012:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[H>>2]=Z;c[o>>2]=c[H>>2];if((c[o>>2]|0)>=1?(c[o>>2]|0)<=(c[(c[c[V>>2]>>2]|0)+8>>2]|0):0){c[(c[V>>2]|0)+36>>2]=c[o>>2];e=40}else e=41;break}case 10002:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[K>>2]=Z;c[t>>2]=c[K>>2];if((c[t>>2]|0)<0|(c[t>>2]|0)>2)e=41;else{c[(c[V>>2]|0)+20>>2]=(c[t>>2]|0)<=1&1;c[(c[V>>2]|0)+12>>2]=(c[t>>2]|0)==0&1;e=40}break}case 4014:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[L>>2]=Z;c[u>>2]=c[L>>2];if((c[u>>2]|0)<0|(c[u>>2]|0)>100)e=41;else{c[(c[V>>2]|0)+56>>2]=c[u>>2];e=40}break}case 4020:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[M>>2]=Z;c[v>>2]=c[M>>2];c[(c[V>>2]|0)+52>>2]=c[v>>2];e=40;break}case 4006:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[O>>2]=Z;c[x>>2]=c[O>>2];c[(c[V>>2]|0)+44>>2]=c[x>>2];e=40;break}case 4002:{U=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[U>>2]|0;c[e>>2]=U+4;c[P>>2]=Z;c[W>>2]=c[P>>2];if((c[W>>2]|0)<=500&(c[W>>2]|0)!=-1)e=41;else{if((c[W>>2]|0)<((c[(c[V>>2]|0)+4>>2]|0)*26e4|0))e=c[W>>2]|0;else e=(c[(c[V>>2]|0)+4>>2]|0)*26e4|0;c[W>>2]=e;c[(c[V>>2]|0)+40>>2]=c[W>>2];e=40}break}case 10008:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[R>>2]=Z;c[y>>2]=c[R>>2];if((c[y>>2]|0)<1|(c[y>>2]|0)>2)e=41;else{c[(c[V>>2]|0)+8>>2]=c[y>>2];e=40}break}case 4036:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[S>>2]=Z;c[z>>2]=c[S>>2];if((c[z>>2]|0)<8|(c[z>>2]|0)>24)e=41;else{c[(c[V>>2]|0)+60>>2]=c[z>>2];e=40}break}case 4037:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[T>>2]=Z;c[A>>2]=c[T>>2];c[c[A>>2]>>2]=c[(c[V>>2]|0)+60>>2];e=40;break}case 4040:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[U>>2]=Z;c[B>>2]=c[U>>2];c[(c[V>>2]|0)+64>>2]=c[B>>2];e=40;break}case 4028:{c[i>>2]=(c[V>>2]|0)+200+((N(c[(c[V>>2]|0)+4>>2]|0,(c[(c[c[V>>2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1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[G>>2]=Z;c[q>>2]=c[G>>2];if(!(c[q>>2]|0))e=41;else{c[c[q>>2]>>2]=c[(c[V>>2]|0)+76>>2];e=40}break}case 10024:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[I>>2]=Z;c[r>>2]=c[I>>2];c[(c[V>>2]|0)+68>>2]=c[r>>2];e=40;break}case 10026:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[J>>2]=Z;c[s>>2]=c[J>>2];c[(c[V>>2]|0)+192>>2]=c[s>>2];e=40;break}default:{c[X>>2]=-5;Z=c[X>>2]|0;l=Y;return Z|0}}while(0);if((e|0)==40){c[X>>2]=0;Z=c[X>>2]|0;l=Y;return Z|0}else if((e|0)==41){c[X>>2]=-1;Z=c[X>>2]|0;l=Y;return Z|0}return 0}function Xa(a,b,d,e,f,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;z=l;l=l+64|0;o=z+52|0;u=z+48|0;q=z+44|0;m=z+40|0;x=z+36|0;A=z+32|0;w=z+28|0;n=z+24|0;t=z+20|0;s=z+16|0;v=z+12|0;r=z+8|0;p=z+4|0;y=z;c[o>>2]=a;c[u>>2]=b;c[q>>2]=d;c[m>>2]=e;c[x>>2]=f;c[A>>2]=h;c[w>>2]=i;c[n>>2]=j;g[s>>2]=+g[c[A>>2]>>2];g[v>>2]=+g[c[w>>2]>>2];if(!(((c[x>>2]|0)==1?+g[(c[A>>2]|0)+4>>2]==0.0:0)^1|(c[n>>2]|0)!=0)){c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[q>>2]|0))break;g[p>>2]=+g[(c[o>>2]|0)+((N(c[m>>2]|0,c[t>>2]|0)|0)<<2)>>2]*32768.0;g[(c[u>>2]|0)+(c[t>>2]<<2)>>2]=+g[p>>2]-+g[v>>2];g[v>>2]=+g[s>>2]*+g[p>>2];c[t>>2]=(c[t>>2]|0)+1}g[c[w>>2]>>2]=+g[v>>2];l=z;return}c[r>>2]=(c[q>>2]|0)/(c[x>>2]|0)|0;if((c[x>>2]|0)!=1)aj(c[u>>2]|0,0,c[q>>2]<<2|0)|0;c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[r>>2]|0))break;k=+g[(c[o>>2]|0)+((N(c[m>>2]|0,c[t>>2]|0)|0)<<2)>>2]*32768.0;g[(c[u>>2]|0)+((N(c[t>>2]|0,c[x>>2]|0)|0)<<2)>>2]=k;c[t>>2]=(c[t>>2]|0)+1}a:do if(c[n>>2]|0){c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[r>>2]|0))break a;if(65536.0<+g[(c[u>>2]|0)+((N(c[t>>2]|0,c[x>>2]|0)|0)<<2)>>2])k=65536.0;else k=+g[(c[u>>2]|0)+((N(c[t>>2]|0,c[x>>2]|0)|0)<<2)>>2];if(!(-65536.0>k))if(65536.0<+g[(c[u>>2]|0)+((N(c[t>>2]|0,c[x>>2]|0)|0)<<2)>>2])k=65536.0;else k=+g[(c[u>>2]|0)+((N(c[t>>2]|0,c[x>>2]|0)|0)<<2)>>2];else k=-65536.0;g[(c[u>>2]|0)+((N(c[t>>2]|0,c[x>>2]|0)|0)<<2)>>2]=k;c[t>>2]=(c[t>>2]|0)+1}}while(0);c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[q>>2]|0))break;g[y>>2]=+g[(c[u>>2]|0)+(c[t>>2]<<2)>>2];g[(c[u>>2]|0)+(c[t>>2]<<2)>>2]=+g[y>>2]-+g[v>>2];g[v>>2]=+g[s>>2]*+g[y>>2];c[t>>2]=(c[t>>2]|0)+1}g[c[w>>2]>>2]=+g[v>>2];l=z;return}function Ya(a,d,e,f,h,i){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i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;g[p+(c[ob>>2]<<2)>>2]=m;if(+g[p+(c[ob>>2]<<2)>>2]>1.0000000036274937e-15)m=+g[p+(c[ob>>2]<<2)>>2];else m=1.0000000036274937e-15;g[p+(c[ob>>2]<<2)>>2]=m;c[ob>>2]=(c[ob>>2]|0)+1}}while(0);Tc(c[Ua>>2]|0,c[W>>2]|0,c[nb>>2]|0,p,o,c[Ka>>2]|0);z=(N(c[Ka>>2]|0,c[pb>>2]|0)|0)<<2;i=l;l=l+((1*z|0)+15&-16)|0;aj(i|0,0,c[nb>>2]<<2|0)|0;do if(!(c[tb>>2]|0)){if(!(c[(c[Bb>>2]|0)+192>>2]|0))break;if(c[(c[Bb>>2]|0)+68>>2]|0)break;g[H>>2]=0.0;g[G>>2]=0.0;c[A>>2]=0;if(2>(c[(c[Bb>>2]|0)+92>>2]|0))f=2;else f=c[(c[Bb>>2]|0)+92>>2]|0;c[I>>2]=f;c[mb>>2]=0;while(1){if((c[mb>>2]|0)>=(c[Ka>>2]|0))break;c[ob>>2]=0;while(1){if((c[ob>>2]|0)>=(c[I>>2]|0))break;z=N(c[pb>>2]|0,c[mb>>2]|0)|0;if(+g[(c[(c[Bb>>2]|0)+192>>2]|0)+(z+(c[ob>>2]|0)<<2)>>2]<.25){z=N(c[pb>>2]|0,c[mb>>2]|0)|0;m=+g[(c[(c[Bb>>2]|0)+192>>2]|0)+(z+(c[ob>>2]|0)<<2)>>2]}else m=.25;do if(m>-2.0){z=N(c[pb>>2]|0,c[mb>>2]|0)|0;if(!(+g[(c[(c[Bb>>2]|0)+192>>2]|0)+(z+(c[ob>>2]|0)<<2)>>2]<.25)){m=.25;break}z=N(c[pb>>2]|0,c[mb>>2]|0)|0;m=+g[(c[(c[Bb>>2]|0)+192>>2]|0)+(z+(c[ob>>2]|0)<<2)>>2]}else m=-2.0;while(0);g[B>>2]=m;if(+g[B>>2]>0.0)g[B>>2]=+g[B>>2]*.5;g[H>>2]=+g[H>>2]+ +g[B>>2]*+((b[(c[ba>>2]|0)+((c[ob>>2]|0)+1<<1)>>1]|0)-(b[(c[ba>>2]|0)+(c[ob>>2]<<1)>>1]|0)|0);c[A>>2]=(c[A>>2]|0)+((b[(c[ba>>2]|0)+((c[ob>>2]|0)+1<<1)>>1]|0)-(b[(c[ba>>2]|0)+(c[ob>>2]<<1)>>1]|0));g[G>>2]=+g[G>>2]+ +g[B>>2]*+(1+(c[ob>>2]<<1)-(c[I>>2]|0)|0);c[ob>>2]=(c[ob>>2]|0)+1}c[mb>>2]=(c[mb>>2]|0)+1}g[H>>2]=+g[H>>2]/+(c[A>>2]|0);g[H>>2]=+g[H>>2]+.20000000298023224;B=N(c[Ka>>2]|0,(c[I>>2]|0)-1|0)|0;B=N(B,(c[I>>2]|0)+1|0)|0;g[G>>2]=+g[G>>2]*6.0/+(N(B,c[I>>2]|0)|0);g[G>>2]=+g[G>>2]*.5;if((+g[G>>2]<.03099999949336052?+g[G>>2]:.03099999949336052)>-.03099999949336052)m=+g[G>>2]<.03099999949336052?+g[G>>2]:.03099999949336052;else m=-.03099999949336052;g[G>>2]=m;c[E>>2]=0;while(1){if((b[(c[ba>>2]|0)+((c[E>>2]|0)+1<<1)>>1]|0)>=((b[(c[ba>>2]|0)+(c[I>>2]<<1)>>1]|0)/2|0|0))break;c[E>>2]=(c[E>>2]|0)+1}c[C>>2]=0;c[ob>>2]=0;while(1){if((c[ob>>2]|0)>=(c[I>>2]|0))break;g[D>>2]=+g[H>>2]+ +g[G>>2]*+((c[ob>>2]|0)-(c[E>>2]|0)|0);m=+g[(c[(c[Bb>>2]|0)+192>>2]|0)+(c[ob>>2]<<2)>>2];if((c[Ka>>2]|0)==2){if(m>+g[(c[(c[Bb>>2]|0)+192>>2]|0)+((c[pb>>2]|0)+(c[ob>>2]|0)<<2)>>2])f=c[ob>>2]|0;else f=(c[pb>>2]|0)+(c[ob>>2]|0)|0;g[F>>2]=+g[(c[(c[Bb>>2]|0)+192>>2]|0)+(f<<2)>>2]}else g[F>>2]=m;g[F>>2]=+g[F>>2]<0.0?+g[F>>2]:0.0;g[F>>2]=+g[F>>2]-+g[D>>2];if(+g[F>>2]>.25){g[i+(c[ob>>2]<<2)>>2]=+g[F>>2]-.25;c[C>>2]=(c[C>>2]|0)+1}c[ob>>2]=(c[ob>>2]|0)+1}c:do if((c[C>>2]|0)>=3){g[H>>2]=+g[H>>2]+.25;if(+g[H>>2]>0.0){g[H>>2]=0.0;g[G>>2]=0.0;aj(i|0,0,c[I>>2]<<2|0)|0;break}c[ob>>2]=0;while(1){if((c[ob>>2]|0)>=(c[I>>2]|0))break c;if(0.0>+g[i+(c[ob>>2]<<2)>>2]-.25)m=0.0;else m=+g[i+(c[ob>>2]<<2)>>2]-.25;g[i+(c[ob>>2]<<2)>>2]=m;c[ob>>2]=(c[ob>>2]|0)+1}}while(0);g[H>>2]=+g[H>>2]+.20000000298023224;g[ga>>2]=+g[G>>2]*64.0;g[pa>>2]=+g[H>>2]}while(0);if(!(c[(c[Bb>>2]|0)+68>>2]|0)){g[J>>2]=-10.0;g[K>>2]=0.0;if(c[Ya>>2]|0)m=+(c[La>>2]|0)*.5;else m=0.0;g[L>>2]=m;c[ob>>2]=c[tb>>2];while(1){if((c[ob>>2]|0)>=(c[nb>>2]|0))break;if(+g[J>>2]-1.0>+g[o+(c[ob>>2]<<2)>>2]-+g[L>>2])m=+g[J>>2]-1.0;else m=+g[o+(c[ob>>2]<<2)>>2]-+g[L>>2];g[J>>2]=m;if((c[Ka>>2]|0)==2){if(+g[J>>2]>+g[o+((c[ob>>2]|0)+(c[pb>>2]|0)<<2)>>2]-+g[L>>2])m=+g[J>>2];else m=+g[o+((c[ob>>2]|0)+(c[pb>>2]|0)<<2)>>2]-+g[L>>2];g[J>>2]=m}g[K>>2]=+g[K>>2]+ +g[J>>2];c[ob>>2]=(c[ob>>2]|0)+1}g[K>>2]=+g[K>>2]/+((c[nb>>2]|0)-(c[tb>>2]|0)|0);g[sa>>2]=+g[K>>2]-+g[(c[Bb>>2]|0)+196>>2];if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);a=l;l=l+((1*(c[pb>>2]<<2)|0)+15&-16)|0;d:do if((c[tb>>2]|0)==0?(c[X>>2]|0)>=((c[Ka>>2]|0)*15|0):0){if((c[(c[Bb>>2]|0)+24>>2]|0)<2){S=192;break}if(c[(c[Bb>>2]|0)+68>>2]|0){S=192;break}do if((c[X>>2]|0)>=40){if((c[X>>2]|0)<60){c[O>>2]=6;break}if((c[X>>2]|0)<100){c[O>>2]=4;break}else{c[O>>2]=3;break}}else c[O>>2]=12;while(0);c[O>>2]=c[O>>2]<<1;c[U>>2]=db(c[Ua>>2]|0,c[W>>2]|0,c[ub>>2]|0,a,c[O>>2]|0,n,c[Ma>>2]|0,c[La>>2]|0,R,+g[ua>>2],c[P>>2]|0)|0;c[ob>>2]=c[W>>2];while(1){if((c[ob>>2]|0)>=(c[nb>>2]|0))break d;c[a+(c[ob>>2]<<2)>>2]=c[a+((c[W>>2]|0)-1<<2)>>2];c[ob>>2]=(c[ob>>2]|0)+1}}else S=192;while(0);if((S|0)==192){c[R>>2]=0;c[ob>>2]=0;while(1){if((c[ob>>2]|0)>=(c[nb>>2]|0))break;c[a+(c[ob>>2]<<2)>>2]=c[ub>>2];c[ob>>2]=(c[ob>>2]|0)+1}c[U>>2]=0}S=(N(c[Ka>>2]|0,c[pb>>2]|0)|0)<<2;d=l;l=l+((1*S|0)+15&-16)|0;Ic(c[Ua>>2]|0,c[tb>>2]|0,c[nb>>2]|0,c[W>>2]|0,o,c[qb>>2]|0,c[ha>>2]|0,d,c[xb>>2]|0,c[Ka>>2]|0,c[La>>2]|0,c[Ba>>2]|0,c[(c[Bb>>2]|0)+12>>2]|0,(c[Bb>>2]|0)+84|0,(c[(c[Bb>>2]|0)+24>>2]|0)>=4&1,c[(c[Bb>>2]|0)+56>>2]|0,c[(c[Bb>>2]|0)+68>>2]|0);eb(c[tb>>2]|0,c[nb>>2]|0,c[ub>>2]|0,a,c[La>>2]|0,c[U>>2]|0,c[xb>>2]|0);U=(Za(c[xb>>2]|0)|0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]=a}while((a|0)<(c[s>>2]|0));if(c[o>>2]|0){k=1024+(c[t>>2]|0)>>1;c[r>>2]=$()|0;a=l;l=l+((1*(k<<2)|0)+15&-16)|0;tc(G,a,1024+(c[t>>2]|0)|0,c[s>>2]|0,c[(c[M>>2]|0)+72>>2]|0);yc(a+2048|0,a,c[t>>2]|0,979,F,c[(c[M>>2]|0)+72>>2]|0);c[F>>2]=1024-(c[F>>2]|0);g[w>>2]=+Ac(a,1024,15,c[t>>2]|0,F,c[(c[M>>2]|0)+104>>2]|0,+g[(c[M>>2]|0)+108>>2],c[(c[M>>2]|0)+72>>2]|0);if((c[F>>2]|0)>1022)c[F>>2]=1022;g[w>>2]=+g[w>>2]*.699999988079071;if((c[(c[M>>2]|0)+56>>2]|0)>2)g[w>>2]=+g[w>>2]*.5;if((c[(c[M>>2]|0)+56>>2]|0)>4)g[w>>2]=+g[w>>2]*.5;if((c[(c[M>>2]|0)+56>>2]|0)>8)g[w>>2]=0.0;_(c[r>>2]|0)}else{g[w>>2]=0.0;c[F>>2]=15}g[q>>2]=.20000000298023224;a=(A((c[F>>2]|0)-(c[(c[M>>2]|0)+104>>2]|0)|0)|0)*10|0;if((a|0)>(c[F>>2]|0))g[q>>2]=+g[q>>2]+.20000000298023224;if((c[p>>2]|0)<25)g[q>>2]=+g[q>>2]+.10000000149011612;if((c[p>>2]|0)<35)g[q>>2]=+g[q>>2]+.10000000149011612;if(+g[(c[M>>2]|0)+108>>2]>.4000000059604645)g[q>>2]=+g[q>>2]-.10000000149011612;if(+g[(c[M>>2]|0)+108>>2]>.550000011920929)g[q>>2]=+g[q>>2]-.10000000149011612;g[q>>2]=+g[q>>2]>.20000000298023224?+g[q>>2]:.20000000298023224;if(+g[w>>2]<+g[q>>2]){g[w>>2]=0.0;c[D>>2]=0;c[J>>2]=0}else{if(+A(+(+g[w>>2]-+g[(c[M>>2]|0)+108>>2]))<.10000000149011612)g[w>>2]=+g[(c[M>>2]|0)+108>>2];c[J>>2]=~~+z(+(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0000000036274937e-15);c[y>>2]=0;c[m>>2]=12;while(1){if((c[m>>2]|0)>=((c[q>>2]|0)-5|0))break;if(127.0<+z(+(+g[w>>2]*64.0*(+g[b+(c[m>>2]<<2)>>2]+1.0000000036274937e-15))))i=127.0;else i=+z(+(+g[w>>2]*64.0*(+g[b+(c[m>>2]<<2)>>2]+1.0000000036274937e-15)));if(!(0.0>i))if(127.0<+z(+(+g[w>>2]*64.0*(+g[b+(c[m>>2]<<2)>>2]+1.0000000036274937e-15))))i=127.0;else i=+z(+(+g[w>>2]*64.0*(+g[b+(c[m>>2]<<2)>>2]+1.0000000036274937e-15)));else i=0.0;c[n>>2]=~~i;c[y>>2]=(c[y>>2]|0)+(d[25443+(c[n>>2]|0)>>0]|0);c[m>>2]=(c[m>>2]|0)+4}c[y>>2]=(c[y>>2]<<6<<2|0)/(((c[q>>2]|0)-17|0)*6|0)|0;if((c[y>>2]|0)>(c[r>>2]|0)){c[c[x>>2]>>2]=c[k>>2];c[r>>2]=c[y>>2]}c[k>>2]=(c[k>>2]|0)+1}c[E>>2]=(c[r>>2]|0)>200&1;if(0.0>+B(+(+((c[r>>2]|0)*27|0)))-42.0)i=0.0;else i=+B(+(+((c[r>>2]|0)*27|0)))-42.0;g[H>>2]=i;if(0.0>(163.0<+g[H>>2]?163.0:+g[H>>2])*.006899999920278788-.139){i=0.0;i=+B(+i);H=c[G>>2]|0;g[H>>2]=i;H=c[E>>2]|0;G=c[F>>2]|0;_(G|0);l=I;return H|0}i=(163.0<+g[H>>2]?163.0:+g[H>>2])*.006899999920278788-.139;i=+B(+i);H=c[G>>2]|0;g[H>>2]=i;H=c[E>>2]|0;G=c[F>>2]|0;_(G|0);l=I;return H|0}function bb(a,b,d,e,f,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;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2)>>2];g[d+(c[V>>2]<<2)>>2]=(w+x)*.5;c[V>>2]=(c[V>>2]|0)+1}else while(1){if((c[V>>2]|0)>=(c[U>>2]|0))break a;if(0.0>+g[(c[I>>2]|0)+(c[V>>2]<<2)>>2]-+g[d+(c[V>>2]<<2)>>2])w=0.0;else w=+g[(c[I>>2]|0)+(c[V>>2]<<2)>>2]-+g[d+(c[V>>2]<<2)>>2];g[d+(c[V>>2]<<2)>>2]=w;c[V>>2]=(c[V>>2]|0)+1}while(0);c[V>>2]=c[J>>2];while(1){if((c[V>>2]|0)>=(c[U>>2]|0))break;if(+g[d+(c[V>>2]<<2)>>2]>+g[(c[K>>2]|0)+(c[V>>2]<<2)>>2])i=d+(c[V>>2]<<2)|0;else i=(c[K>>2]|0)+(c[V>>2]<<2)|0;g[d+(c[V>>2]<<2)>>2]=+g[i>>2];c[V>>2]=(c[V>>2]|0)+1}b:do if(!(((c[ca>>2]|0)==0|(c[R>>2]|0)!=0)^1|(c[W>>2]|0)!=0)){c[V>>2]=c[J>>2];while(1){if((c[V>>2]|0)>=(c[U>>2]|0))break b;g[d+(c[V>>2]<<2)>>2]=+g[d+(c[V>>2]<<2)>>2]*.5;c[V>>2]=(c[V>>2]|0)+1}}while(0);c[V>>2]=c[J>>2];while(1){if((c[V>>2]|0)>=(c[U>>2]|0)){ea=103;break}if((c[V>>2]|0)<8){K=d+(c[V>>2]<<2)|0;g[K>>2]=+g[K>>2]*2.0}if((c[V>>2]|0)>=12)g[d+(c[V>>2]<<2)>>2]=+g[d+(c[V>>2]<<2)>>2]*.5;if(+g[d+(c[V>>2]<<2)>>2]<4.0)w=+g[d+(c[V>>2]<<2)>>2];else w=4.0;g[d+(c[V>>2]<<2)>>2]=w;K=N(c[L>>2]|0,(b[(c[S>>2]|0)+((c[V>>2]|0)+1<<1)>>1]|0)-(b[(c[S>>2]|0)+(c[V>>2]<<1)>>1]|0)|0)|0;c[da>>2]=K<>2];do if((c[da>>2]|0)>=6){w=+g[d+(c[V>>2]<<2)>>2];if((c[da>>2]|0)>48){c[O>>2]=~~(w*8.0);c[P>>2]=((N(c[O>>2]|0,c[da>>2]|0)|0)<<3|0)/8|0;break}else{c[O>>2]=~~(w*+(c[da>>2]|0)/6.0);c[P>>2]=(c[O>>2]|0)*6<<3;break}}else{c[O>>2]=~~+g[d+(c[V>>2]<<2)>>2];c[P>>2]=(N(c[O>>2]|0,c[da>>2]|0)|0)<<3}while(0);if(!(c[ca>>2]|0?(c[R>>2]|0)==0|(c[W>>2]|0)!=0:0))ea=100;if((ea|0)==100?(ea=0,((c[aa>>2]|0)+(c[P>>2]|0)>>3>>3|0)>((c[T>>2]|0)/4|0|0)):0)break;c[(c[Y>>2]|0)+(c[V>>2]<<2)>>2]=c[O>>2];c[aa>>2]=(c[aa>>2]|0)+(c[P>>2]|0);c[V>>2]=(c[V>>2]|0)+1}if((ea|0)==103){da=c[aa>>2]|0;ea=c[ba>>2]|0;c[ea>>2]=da;x=+g[X>>2];ea=c[Z>>2]|0;_(ea|0);l=fa;return +x}c[Q>>2]=((c[T>>2]|0)/4|0)<<3<<3;c[(c[Y>>2]|0)+(c[V>>2]<<2)>>2]=(c[Q>>2]|0)-(c[aa>>2]|0);c[aa>>2]=c[Q>>2];da=c[aa>>2]|0;ea=c[ba>>2]|0;c[ea>>2]=da;x=+g[X>>2];ea=c[Z>>2]|0;_(ea|0);l=fa;return +x}function gb(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0;v=l;l=l+64|0;r=v+48|0;o=v+44|0;i=v+40|0;k=v+36|0;p=v+32|0;u=v+28|0;s=v+24|0;t=v+20|0;q=v+16|0;h=v+12|0;m=v+8|0;j=v+4|0;n=v;c[r>>2]=a;c[o>>2]=d;c[i>>2]=e;c[k>>2]=f;g[s>>2]=1.0000000036274937e-15;g[t>>2]=1.0000000036274937e-15;c[p>>2]=0;while(1){if((c[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c[(c[h>>2]|0)+4728>>2];k=c[e>>2]|0;b=N(0-(c[f>>2]|0)<<2>>16,(c[f>>2]&65535)<<16>>16)|0;b=b+((N(0-(c[f>>2]|0)<<2&65535,(c[f>>2]&65535)<<16>>16)|0)>>16)>>16;d=c[e>>2]|0;d=N(b,(d-((Bf(3932160)|0)-2048)&65535)<<16>>16)|0;b=N(0-(c[f>>2]|0)<<2>>16,(c[f>>2]&65535)<<16>>16)|0;b=b+((N(0-(c[f>>2]|0)<<2&65535,(c[f>>2]&65535)<<16>>16)|0)>>16)&65535;j=c[e>>2]|0;c[e>>2]=k+(d+((N(b,(j-((Bf(3932160)|0)-2048)&65535)<<16>>16)|0)>>16));c[g>>2]=(c[e>>2]|0)-(c[(c[h>>2]|0)+8>>2]>>8);if((c[g>>2]|0)<0)c[g>>2]=(c[g>>2]|0)*3;if((c[g>>2]|0)>51)d=51;else d=(c[g>>2]|0)<-51?-51:c[g>>2]|0;c[g>>2]=d;k=((N((c[(c[h>>2]|0)+4556>>2]&65535)<<16>>16,(c[g>>2]&65535)<<16>>16)|0)>>16)*6554|0;k=(c[(c[h>>2]|0)+8>>2]|0)+(k+(((N((c[(c[h>>2]|0)+4556>>2]&65535)<<16>>16,(c[g>>2]&65535)<<16>>16)|0)&65535)*6554>>16))|0;c[(c[h>>2]|0)+8>>2]=k;k=(Bf(60)|0)<<8;k=(k|0)>((Bf(100)|0)<<8|0);d=c[(c[h>>2]|0)+8>>2]|0;do if(k){if((d|0)>((Bf(60)|0)<<8|0)){d=(Bf(60)|0)<<8;break}k=c[(c[h>>2]|0)+8>>2]|0;if((k|0)<((Bf(100)|0)<<8|0)){d=(Bf(100)|0)<<8;break}else{d=c[(c[h>>2]|0)+8>>2]|0;break}}else{if((d|0)>((Bf(100)|0)<<8|0)){d=(Bf(100)|0)<<8;break}k=c[(c[h>>2]|0)+8>>2]|0;if((k|0)<((Bf(60)|0)<<8|0)){d=(Bf(60)|0)<<8;break}else{d=c[(c[h>>2]|0)+8>>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>2]|0)+1}dg(g,t,c[z>>2]|0,1);a[c[n>>2]>>0]=c[k+(c[t>>2]<<2)>>2];_i((c[n>>2]|0)+1|0,i+(c[t>>2]<<4)|0,b[(c[F>>2]|0)+2>>1]|0)|0;Rd(c[B>>2]|0,c[n>>2]|0,c[F>>2]|0);K=c[g>>2]|0;_(c[J>>2]|0);l=L;return K|0}function Se(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}Te(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function Te(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=Ue(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(Ve(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function Ue(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function Ve(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function We(a,e,f,g,h){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;m=t+36|0;o=t+32|0;q=t+28|0;i=t+24|0;j=t+20|0;n=t+16|0;p=t+12|0;k=t+8|0;s=t+4|0;r=t;c[m>>2]=a;c[o>>2]=e;c[q>>2]=f;c[i>>2]=g;c[j>>2]=h;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[i>>2]|0))break;c[r>>2]=0;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[j>>2]|0))break;f=b[(c[o>>2]|0)+(c[p>>2]<<1)>>1]|0;e=c[q>>2]|0;c[q>>2]=e+1;c[k>>2]=f-(d[e>>0]<<7);c[s>>2]=N((c[k>>2]&65535)<<16>>16,(c[k>>2]&65535)<<16>>16)|0;e=b[(c[o>>2]|0)+((c[p>>2]|0)+1<<1)>>1]|0;f=c[q>>2]|0;c[q>>2]=f+1;c[k>>2]=e-(d[f>>0]<<7);c[s>>2]=(c[s>>2]|0)+(N((c[k>>2]&65535)<<16>>16,(c[k>>2]&65535)<<16>>16)|0);c[r>>2]=(c[r>>2]|0)+(c[s>>2]>>4);c[p>>2]=(c[p>>2]|0)+2}c[(c[m>>2]|0)+(c[n>>2]<<2)>>2]=c[r>>2];c[n>>2]=(c[n>>2]|0)+1}l=t;return}function Xe(e,f,g,h){e=e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aa+336|0;w=aa+332|0;p=aa+328|0;C=aa+378|0;F=aa+324|0;$=aa+376|0;x=aa+320|0;Z=aa+316|0;G=aa+312|0;X=aa+308|0;A=aa+304|0;z=aa+300|0;y=aa+296|0;T=aa+292|0;L=aa+288|0;u=aa+284|0;H=aa+280|0;J=aa+276|0;Q=aa+272|0;R=aa+268|0;t=aa+264|0;_=aa+260|0;E=aa+256|0;D=aa+252|0;M=aa+248|0;B=aa+232|0;W=aa+384|0;P=aa+360|0;q=aa+200|0;s=aa+184|0;r=aa+168|0;S=aa+160|0;I=aa+80|0;K=aa;c[Y>>2]=e;c[V>>2]=f;c[U>>2]=g;c[O>>2]=h;c[v>>2]=i;c[w>>2]=j;c[p>>2]=k;b[C>>1]=m;c[F>>2]=n;b[$>>1]=o;c[x>>2]=-10;while(1){if((c[x>>2]|0)>9)break;c[H>>2]=c[x>>2]<<10;c[J>>2]=(c[H>>2]|0)+1024;do if((c[x>>2]|0)<=0){if(!(c[x>>2]|0)){c[J>>2]=(c[J>>2]|0)-102;break}f=(c[x>>2]|0)==-1;c[H>>2]=(c[H>>2]|0)+102;if(!f)c[J>>2]=(c[J>>2]|0)+102}else{c[H>>2]=(c[H>>2]|0)-102;c[J>>2]=(c[J>>2]|0)-102}while(0);f=N(c[H>>2]>>16,(c[p>>2]&65535)<<16>>16)|0;f=f+((N(c[H>>2]&65535,(c[p>>2]&65535)<<16>>16)|0)>>16)|0;c[I+((c[x>>2]|0)+10<<2)>>2]=f;f=N(c[J>>2]>>16,(c[p>>2]&65535)<<16>>16)|0;f=f+((N(c[J>>2]&65535,(c[p>>2]&65535)<<16>>16)|0)>>16)|0;c[K+((c[x>>2]|0)+10<<2)>>2]=f;c[x>>2]=(c[x>>2]|0)+1}c[G>>2]=1;c[q>>2]=0;b[P>>1]=0;c[x>>2]=(b[$>>1]|0)-1;a:while(1){c[S>>2]=(c[w>>2]|0)+(b[(c[v>>2]|0)+(c[x>>2]<<1)>>1]|0);c[M>>2]=d[(c[O>>2]|0)+(c[x>>2]|0)>>0]<<8;c[y>>2]=b[(c[V>>2]|0)+(c[x>>2]<<1)>>1];c[Z>>2]=0;while(1){if((c[Z>>2]|0)>=(c[G>>2]|0))break;f=N(c[M>>2]>>16,b[P+(c[Z>>2]<<1)>>1]|0)|0;c[L>>2]=f+((N(c[M>>2]&65535,b[P+(c[Z>>2]<<1)>>1]|0)|0)>>16);c[T>>2]=(c[y>>2]|0)-(c[L>>2]|0);f=N(b[C>>1]>>16,(c[T>>2]&65535)<<16>>16)|0;c[X>>2]=f+((N(b[C>>1]&65535,(c[T>>2]&65535)<<16>>16)|0)>>16);if((c[X>>2]|0)>9)i=9;else i=(c[X>>2]|0)<-10?-10:c[X>>2]|0;c[X>>2]=i;a[W+(c[Z>>2]<<4)+(c[x>>2]|0)>>0]=c[X>>2];c[H>>2]=c[I+((c[X>>2]|0)+10<<2)>>2];c[J>>2]=c[K+((c[X>>2]|0)+10<<2)>>2];c[H>>2]=(c[H>>2]|0)+(c[L>>2]|0);c[J>>2]=(c[J>>2]|0)+(c[L>>2]|0);b[P+(c[Z>>2]<<1)>>1]=c[H>>2];b[P+((c[Z>>2]|0)+(c[G>>2]|0)<<1)>>1]=c[J>>2];i=c[X>>2]|0;do if(((c[X>>2]|0)+1|0)>=4)if((i+1|0)==4){c[Q>>2]=d[(c[S>>2]|0)+((c[X>>2]|0)+4)>>0];c[R>>2]=280;break}else{c[Q>>2]=108+(((c[X>>2]&65535)<<16>>16)*43|0);c[R>>2]=(c[Q>>2]|0)+43;break}else{if((i|0)>-4){c[Q>>2]=d[(c[S>>2]|0)+((c[X>>2]|0)+4)>>0];c[R>>2]=d[(c[S>>2]|0)+((c[X>>2]|0)+1+4)>>0];break}if((c[X>>2]|0)==-4){c[Q>>2]=280;c[R>>2]=d[(c[S>>2]|0)+((c[X>>2]|0)+1+4)>>0];break}else{c[Q>>2]=108+(N(-43,(c[X>>2]&65535)<<16>>16)|0);c[R>>2]=(c[Q>>2]|0)-43;break}}while(0);c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|0)+4768+31>>0]|0,c[(c[s>>2]|0)+4664>>2]|0);Qf(o,n,c[(c[s>>2]|0)+4664>>2]|0);c[m>>2]=(N(a[(c[s>>2]|0)+4768+31>>0]<<16>>16,a[(c[s>>2]|0)+4768+31>>0]<<16>>16)|0)<<11;c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[(c[s>>2]|0)+4664>>2]|0))break a;d=N(b[o+(c[k>>2]<<1)>>1]>>16,(c[m>>2]&65535)<<16>>16)|0;d=(b[p+(c[k>>2]<<1)>>1]>>1)+(d+((N(b[o+(c[k>>2]<<1)>>1]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16))&65535;b[p+(c[k>>2]<<1)>>1]=d;c[k>>2]=(c[k>>2]|0)+1}}while(0);Re((c[s>>2]|0)+4768+8|0,c[q>>2]|0,c[(c[s>>2]|0)+4724>>2]|0,p,c[h>>2]|0,c[(c[s>>2]|0)+4692>>2]|0,a[(c[s>>2]|0)+4768+29>>0]|0)|0;Lf((c[i>>2]|0)+32|0,c[q>>2]|0,c[(c[s>>2]|0)+4664>>2]|0);if(c[j>>2]|0){Od(n,c[r>>2]|0,c[q>>2]|0,a[(c[s>>2]|0)+4768+31>>0]|0,c[(c[s>>2]|0)+4664>>2]|0);Lf(c[i>>2]|0,n,c[(c[s>>2]|0)+4664>>2]|0);l=t;return}else{_i(c[i>>2]|0,(c[i>>2]|0)+32|0,c[(c[s>>2]|0)+4664>>2]<<1|0)|0;l=t;return}}function _e(d,e,f,g,h,i,j,k,m,n,o){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0;W=l;l=l+144|0;R=W+128|0;q=W+124|0;V=W+120|0;y=W+116|0;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16)|0)>>16);c[P>>2]=kg(s,o,g,(c[R>>2]|0)+12|0,c[J>>2]|0,c[C>>2]|0)|0;c[P+4>>2]=kg(r,n,h,(c[R>>2]|0)+12+8|0,c[J>>2]|0,c[C>>2]|0)|0;c[x>>2]=(c[r>>2]|0)+(((c[s>>2]&65535)<<16>>16)*3|0);c[x>>2]=(c[x>>2]|0)<65536?c[x>>2]|0:65536;v=(c[E>>2]|0)-(c[u>>2]|0?1200:600)|0;c[E>>2]=v;c[E>>2]=(c[E>>2]|0)<1?1:v;c[B>>2]=2e3+(((c[I>>2]&65535)<<16>>16)*900|0);c[t>>2]=(c[x>>2]|0)*3;v=$e(c[E>>2]|0,851968+(c[t>>2]|0)|0,19)|0;c[c[A>>2]>>2]=v;if((c[c[A>>2]>>2]|0)<(c[B>>2]|0)){c[c[A>>2]>>2]=c[B>>2];c[(c[A>>2]|0)+4>>2]=(c[E>>2]|0)-(c[c[A>>2]>>2]|0);v=N(65536+(c[t>>2]|0)>>16,(c[B>>2]&65535)<<16>>16)|0;c[U>>2]=$e((c[(c[A>>2]|0)+4>>2]<<1)-(c[B>>2]|0)|0,v+((N(65536+(c[t>>2]|0)&65535,(c[B>>2]&65535)<<16>>16)|0)>>16)|0,16)|0;if((c[U>>2]|0)>16384)o=16384;else o=(c[U>>2]|0)<0?0:c[U>>2]|0;c[U>>2]=o}else{c[(c[A>>2]|0)+4>>2]=(c[E>>2]|0)-(c[c[A>>2]>>2]|0);c[U>>2]=16384}v=N((c[U>>2]|0)-(b[(c[R>>2]|0)+28>>1]|0)>>16,(c[C>>2]&65535)<<16>>16)|0;C=(b[(c[R>>2]|0)+28>>1]|0)+(v+((N((c[U>>2]|0)-(b[(c[R>>2]|0)+28>>1]|0)&65535,(c[C>>2]&65535)<<16>>16)|0)>>16))&65535;b[(c[R>>2]|0)+28>>1]=C;a[c[z>>2]>>0]=0;a:do if(!(c[D>>2]|0)){do if(!(b[(c[R>>2]|0)+30>>1]|0)){if((c[E>>2]<<3|0)>=((c[B>>2]|0)*13|0)?(D=N(c[x>>2]>>16,b[(c[R>>2]|0)+28>>1]|0)|0,(D+((N(c[x>>2]&65535,b[(c[R>>2]|0)+28>>1]|0)|0)>>16)|0)>=819):0)break;c[P>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P>>2]&65535)<<16>>16)|0)>>14;c[P+4>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P+4>>2]&65535)<<16>>16)|0)>>14;rg(P,c[y>>2]|0);c[U>>2]=0;c[P>>2]=0;c[P+4>>2]=0;c[c[A>>2]>>2]=c[E>>2];c[(c[A>>2]|0)+4>>2]=0;a[c[z>>2]>>0]=1;break a}while(0);do if(b[(c[R>>2]|0)+30>>1]|0){if((c[E>>2]<<3|0)>=((c[B>>2]|0)*11|0)?(D=N(c[x>>2]>>16,b[(c[R>>2]|0)+28>>1]|0)|0,(D+((N(c[x>>2]&65535,b[(c[R>>2]|0)+28>>1]|0)|0)>>16)|0)>=328):0)break;c[P>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P>>2]&65535)<<16>>16)|0)>>14;c[P+4>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P+4>>2]&65535)<<16>>16)|0)>>14;rg(P,c[y>>2]|0);c[U>>2]=0;c[P>>2]=0;c[P+4>>2]=0;break a}while(0);if((b[(c[R>>2]|0)+28>>1]|0)>15565){rg(P,c[y>>2]|0);c[U>>2]=16384;break}else{c[P>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P>>2]&65535)<<16>>16)|0)>>14;c[P+4>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P+4>>2]&65535)<<16>>16)|0)>>14;rg(P,c[y>>2]|0);c[U>>2]=b[(c[R>>2]|0)+28>>1];break}}else{c[U>>2]=0;c[P>>2]=0;c[P+4>>2]=0;rg(P,c[y>>2]|0)}while(0);do if((a[c[z>>2]>>0]|0)==1){D=(c[R>>2]|0)+32|0;b[D>>1]=(b[D>>1]|0)+((c[J>>2]|0)-(c[I>>2]<<3));if((b[(c[R>>2]|0)+32>>1]|0)<((c[I>>2]|0)*5|0)){a[c[z>>2]>>0]=0;break}else{b[(c[R>>2]|0)+32>>1]=1e4;break}}else b[(c[R>>2]|0)+32>>1]=0;while(0);if((a[c[z>>2]>>0]|0)==0?(c[(c[A>>2]|0)+4>>2]|0)<1:0){c[(c[A>>2]|0)+4>>2]=1;E=af(1,(c[E>>2]|0)-(c[(c[A>>2]|0)+4>>2]|0)|0)|0;c[c[A>>2]>>2]=E}c[M>>2]=0-(b[c[R>>2]>>1]|0);c[O>>2]=0-(b[(c[R>>2]|0)+2>>1]|0);c[T>>2]=b[(c[R>>2]|0)+30>>1]<<10;c[w>>2]=65536/(c[I>>2]<<3|0)|0;c[F>>2]=0-(((N(((c[P>>2]|0)-(b[c[R>>2]>>1]|0)&65535)<<16>>16,(c[w>>2]&65535)<<16>>16)|0)>>15)+1>>1);c[G>>2]=0-(((N(((c[P+4>>2]|0)-(b[(c[R>>2]|0)+2>>1]|0)&65535)<<16>>16,(c[w>>2]&65535)<<16>>16)|0)>>15)+1>>1);E=N((c[U>>2]|0)-(b[(c[R>>2]|0)+30>>1]|0)>>16,(c[w>>2]&65535)<<16>>16)|0;c[H>>2]=E+((N((c[U>>2]|0)-(b[(c[R>>2]|0)+30>>1]|0)&65535,(c[w>>2]&65535)<<16>>16)|0)>>16)<<10;c[L>>2]=0;while(1){if((c[L>>2]|0)>=(c[I>>2]<<3|0))break;c[M>>2]=(c[M>>2]|0)+(c[F>>2]|0);c[O>>2]=(c[O>>2]|0)+(c[G>>2]|0);c[T>>2]=(c[T>>2]|0)+(c[H>>2]|0);c[S>>2]=(b[(c[K>>2]|0)+(c[L>>2]<<1)>>1]|0)+(b[(c[K>>2]|0)+((c[L>>2]|0)+2<<1)>>1]|0)+(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<1)<<9;D=N(c[T>>2]>>16,b[i+((c[L>>2]|0)+1<<1)>>1]|0)|0;D=D+((N(c[T>>2]&65535,b[i+((c[L>>2]|0)+1<<1)>>1]|0)|0)>>16)|0;E=N(c[S>>2]>>16,(c[M>>2]&65535)<<16>>16)|0;c[S>>2]=D+(E+((N(c[S>>2]&65535,(c[M>>2]&65535)<<16>>16)|0)>>16));E=N(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<11>>16,(c[O>>2]&65535)<<16>>16)|0;c[S>>2]=(c[S>>2]|0)+(E+((N(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<11&65535,(c[O>>2]&65535)<<16>>16)|0)>>16));if(((c[S>>2]>>7)+1>>1|0)<=32767)if(((c[S>>2]>>7)+1>>1|0)<-32768)o=-32768;else o=(c[S>>2]>>7)+1>>1;else o=32767;b[(c[V>>2]|0)+((c[L>>2]|0)-1<<1)>>1]=o;c[L>>2]=(c[L>>2]|0)+1}c[M>>2]=0-(c[P>>2]|0);c[O>>2]=0-(c[P+4>>2]|0);c[T>>2]=c[U>>2]<<10;c[L>>2]=c[I>>2]<<3;while(1){if((c[L>>2]|0)>=(c[J>>2]|0))break;c[S>>2]=(b[(c[K>>2]|0)+(c[L>>2]<<1)>>1]|0)+(b[(c[K>>2]|0)+((c[L>>2]|0)+2<<1)>>1]|0)+(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<1)<<9;H=N(c[T>>2]>>16,b[i+((c[L>>2]|0)+1<<1)>>1]|0)|0;H=H+((N(c[T>>2]&65535,b[i+((c[L>>2]|0)+1<<1)>>1]|0)|0)>>16)|0;I=N(c[S>>2]>>16,(c[M>>2]&65535)<<16>>16)|0;c[S>>2]=H+(I+((N(c[S>>2]&65535,(c[M>>2]&65535)<<16>>16)|0)>>16));I=N(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<11>>16,(c[O>>2]&65535)<<16>>16)|0;c[S>>2]=(c[S>>2]|0)+(I+((N(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<11&65535,(c[O>>2]&65535)<<16>>16)|0)>>16));if(((c[S>>2]>>7)+1>>1|0)<=32767)if(((c[S>>2]>>7)+1>>1|0)<-32768)o=-32768;else o=(c[S>>2]>>7)+1>>1;else o=32767;b[(c[V>>2]|0)+((c[L>>2]|0)-1<<1)>>1]=o;c[L>>2]=(c[L>>2]|0)+1}b[c[R>>2]>>1]=c[P>>2];b[(c[R>>2]|0)+2>>1]=c[P+4>>2];b[(c[R>>2]|0)+30>>1]=c[U>>2];_(c[Q>>2]|0);l=W;return}function $e(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;h=l;l=l+48|0;g=h+40|0;q=h+36|0;p=h+32|0;i=h+28|0;k=h+24|0;j=h+20|0;f=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;e=h;c[q>>2]=a;c[p>>2]=b;c[i>>2]=d;b=c[q>>2]|0;c[k>>2]=(bf((c[q>>2]|0)>0?b:0-b|0)|0)-1;c[n>>2]=c[q>>2]<>2];b=c[p>>2]|0;c[j>>2]=(bf((c[p>>2]|0)>0?b:0-b|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;b=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=b+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);b=c[n>>2]|0;a=c[o>>2]|0;d=c[e>>2]|0;d=Xi(a|0,((a|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;d=Yi(d|0,y|0,32)|0;c[n>>2]=b-(d<<3);d=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(d+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[k>>2]|0)-(c[j>>2]|0)-(c[i>>2]|0);d=c[f>>2]|0;if((c[f>>2]|0)>=0)if((d|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];q=c[g>>2]|0;l=h;return q|0}else{c[g>>2]=0;q=c[g>>2]|0;l=h;return q|0}a=c[e>>2]|0;b=0-(c[f>>2]|0)|0;do if((-2147483648>>0-d|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>b|0)){d=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){d=2147483647>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>b|0)){d=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){d=-2147483648>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}while(0);c[g>>2]=d<<0-(c[f>>2]|0);q=c[g>>2]|0;l=h;return q|0}function af(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function bf(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function cf(a,d,e,f,g,h){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;w=l;l=l+64|0;p=w+52|0;u=w+48|0;v=w+44|0;o=w+40|0;k=w+36|0;r=w+32|0;s=w+28|0;x=w+24|0;i=w+20|0;j=w+16|0;t=w+12|0;q=w+8|0;m=w+4|0;n=w;c[p>>2]=a;c[u>>2]=d;c[v>>2]=e;c[o>>2]=f;c[k>>2]=g;c[r>>2]=h;e=c[u>>2]|0;d=(c[p>>2]|0)+4|0;b[e>>1]=b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<<1)>>1]<<11&65535,(c[n>>2]&65535)<<16>>16)|0)>>16));if(((c[t>>2]>>7)+1>>1|0)<=32767)if(((c[t>>2]>>7)+1>>1|0)<-32768)h=-32768;else h=(c[t>>2]>>7)+1>>1;else h=32767;b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]=h;c[s>>2]=(c[s>>2]|0)+1}c[m>>2]=c[c[o>>2]>>2];c[n>>2]=c[(c[o>>2]|0)+4>>2];c[s>>2]=c[k>>2]<<3;while(1){if((c[s>>2]|0)>=(c[r>>2]|0))break;c[t>>2]=(b[(c[u>>2]|0)+(c[s>>2]<<1)>>1]|0)+(b[(c[u>>2]|0)+((c[s>>2]|0)+2<<1)>>1]|0)+(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<1)<<9;x=N(c[t>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[t>>2]=(b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<8)+(x+((N(c[t>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));x=N(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<11>>16,(c[n>>2]&65535)<<16>>16)|0;c[t>>2]=(c[t>>2]|0)+(x+((N(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<11&65535,(c[n>>2]&65535)<<16>>16)|0)>>16));if(((c[t>>2]>>7)+1>>1|0)<=32767)if(((c[t>>2]>>7)+1>>1|0)<-32768)h=-32768;else h=(c[t>>2]>>7)+1>>1;else h=32767;b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]=h;c[s>>2]=(c[s>>2]|0)+1}b[c[p>>2]>>1]=c[c[o>>2]>>2];b[(c[p>>2]|0)+2>>1]=c[(c[o>>2]|0)+4>>2];c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[r>>2]|0))break;c[t>>2]=(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0)+(b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0);c[q>>2]=(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0)-(b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0);if((c[t>>2]|0)>32767)h=32767;else h=(c[t>>2]|0)<-32768?-32768:c[t>>2]|0;b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]=h;if((c[q>>2]|0)>32767)h=32767;else h=(c[q>>2]|0)<-32768?-32768:c[q>>2]|0;b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]=h;c[s>>2]=(c[s>>2]|0)+1}l=w;return}function df(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;b=f;c[b>>2]=a;if(!(((((((c[(c[b>>2]|0)+8>>2]|0)!=8e3?(c[(c[b>>2]|0)+8>>2]|0)!=12e3:0)?(c[(c[b>>2]|0)+8>>2]|0)!=16e3:0)?(c[(c[b>>2]|0)+8>>2]|0)!=24e3:0)?(c[(c[b>>2]|0)+8>>2]|0)!=32e3:0)?(c[(c[b>>2]|0)+8>>2]|0)!=44100:0)?(c[(c[b>>2]|0)+8>>2]|0)!=48e3:0))e=8;do if((e|0)==8){if(((c[(c[b>>2]|0)+20>>2]|0)!=8e3?(c[(c[b>>2]|0)+20>>2]|0)!=12e3:0)?(c[(c[b>>2]|0)+20>>2]|0)!=16e3:0)break;if(((c[(c[b>>2]|0)+12>>2]|0)!=8e3?(c[(c[b>>2]|0)+12>>2]|0)!=12e3:0)?(c[(c[b>>2]|0)+12>>2]|0)!=16e3:0)break;if(((c[(c[b>>2]|0)+16>>2]|0)!=8e3?(c[(c[b>>2]|0)+16>>2]|0)!=12e3:0)?(c[(c[b>>2]|0)+16>>2]|0)!=16e3:0)break;if(((c[(c[b>>2]|0)+16>>2]|0)<=(c[(c[b>>2]|0)+20>>2]|0)?(c[(c[b>>2]|0)+12>>2]|0)>=(c[(c[b>>2]|0)+20>>2]|0):0)?(c[(c[b>>2]|0)+16>>2]|0)<=(c[(c[b>>2]|0)+12>>2]|0):0){if((((c[(c[b>>2]|0)+24>>2]|0)!=10?(c[(c[b>>2]|0)+24>>2]|0)!=20:0)?(c[(c[b>>2]|0)+24>>2]|0)!=40:0)?(c[(c[b>>2]|0)+24>>2]|0)!=60:0){c[d>>2]=-103;e=c[d>>2]|0;l=f;return e|0}if((c[(c[b>>2]|0)+32>>2]|0)>=0?(c[(c[b>>2]|0)+32>>2]|0)<=100:0){if((c[(c[b>>2]|0)+44>>2]|0)>=0?(c[(c[b>>2]|0)+44>>2]|0)<=1:0){if((c[(c[b>>2]|0)+48>>2]|0)>=0?(c[(c[b>>2]|0)+48>>2]|0)<=1:0){do if((c[(c[b>>2]|0)+40>>2]|0)>=0){if((c[(c[b>>2]|0)+40>>2]|0)>1)break;do if((c[c[b>>2]>>2]|0)>=1){if((c[c[b>>2]>>2]|0)>2)break;do if((c[(c[b>>2]|0)+4>>2]|0)>=1){if((c[(c[b>>2]|0)+4>>2]|0)>2)break;if((c[(c[b>>2]|0)+4>>2]|0)>(c[c[b>>2]>>2]|0)){c[d>>2]=-111;e=c[d>>2]|0;l=f;return e|0}do if((c[(c[b>>2]|0)+36>>2]|0)>=0){if((c[(c[b>>2]|0)+36>>2]|0)>10)break;c[d>>2]=0;e=c[d>>2]|0;l=f;return e|0}while(0);c[d>>2]=-106;e=c[d>>2]|0;l=f;return e|0}while(0);c[d>>2]=-111;e=c[d>>2]|0;l=f;return e|0}while(0);c[d>>2]=-111;e=c[d>>2]|0;l=f;return e|0}while(0);c[d>>2]=-107;e=c[d>>2]|0;l=f;return e|0}c[d>>2]=-109;e=c[d>>2]|0;l=f;return e|0}c[d>>2]=-108;e=c[d>>2]|0;l=f;return e|0}c[d>>2]=-105;e=c[d>>2]|0;l=f;return e|0}}while(0);c[d>>2]=-102;e=c[d>>2]|0;l=f;return e|0}function ef(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;h=m+20|0;e=m+16|0;g=m+12|0;j=m+8|0;f=m+4|0;i=m;c[h>>2]=a;c[e>>2]=d;c[j>>2]=0;if((c[e>>2]|0)>8e4)d=8e4;else d=(c[e>>2]|0)<5e3?5e3:c[e>>2]|0;c[e>>2]=d;if((c[e>>2]|0)==(c[(c[h>>2]|0)+4632>>2]|0)){k=c[j>>2]|0;l=m;return k|0}c[(c[h>>2]|0)+4632>>2]=c[e>>2];do if((c[(c[h>>2]|0)+4600>>2]|0)!=8)if((c[(c[h>>2]|0)+4600>>2]|0)==12){c[i>>2]=17772;break}else{c[i>>2]=17804;break}else c[i>>2]=17740;while(0);if((c[(c[h>>2]|0)+4604>>2]|0)==2)c[e>>2]=(c[e>>2]|0)-2200;c[g>>2]=1;while(1){if((c[g>>2]|0)>=8){k=16;break}if((c[e>>2]|0)<=(c[(c[i>>2]|0)+(c[g>>2]<<2)>>2]|0))break;c[g>>2]=(c[g>>2]|0)+1}if((k|0)==16){k=c[j>>2]|0;l=m;return k|0}c[f>>2]=((c[e>>2]|0)-(c[(c[i>>2]|0)+((c[g>>2]|0)-1<<2)>>2]|0)<<6|0)/((c[(c[i>>2]|0)+(c[g>>2]<<2)>>2]|0)-(c[(c[i>>2]|0)+((c[g>>2]|0)-1<<2)>>2]|0)|0)|0;k=(b[24510+((c[g>>2]|0)-1<<1)>>1]<<6)+(N(c[f>>2]|0,(b[24510+(c[g>>2]<<1)>>1]|0)-(b[24510+((c[g>>2]|0)-1<<1)>>1]|0)|0)|0)|0;c[(c[h>>2]|0)+4748>>2]=k;k=c[j>>2]|0;l=m;return k|0}function ff(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;c[d>>2]=0;aj(c[f>>2]|0,0,12240)|0;c[(c[f>>2]|0)+5124>>2]=c[g>>2];a=(Bf(3932160)|0)-2048<<8;c[(c[f>>2]|0)+8>>2]=a;c[(c[f>>2]|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)+4608>>2]=e;c[(c[h>>2]|0)+4572>>2]=((c[g>>2]&65535)<<16>>16)*14;e=(c[(c[h>>2]|0)+4600>>2]|0)==8?29170:29158;d=(c[h>>2]|0)+4720|0}else{c[(c[h>>2]|0)+5776>>2]=(c[f>>2]|0)/20|0;c[(c[h>>2]|0)+4604>>2]=4;c[(c[h>>2]|0)+4608>>2]=((c[g>>2]&65535)<<16>>16)*20;c[(c[h>>2]|0)+4572>>2]=((c[g>>2]&65535)<<16>>16)*24;e=(c[(c[h>>2]|0)+4600>>2]|0)==8?29147:29113;d=(c[h>>2]|0)+4720|0}c[d>>2]=e;c[(c[h>>2]|0)+4636>>2]=c[f>>2];c[(c[h>>2]|0)+4632>>2]=0}if((c[(c[h>>2]|0)+4600>>2]|0)==(c[g>>2]|0)){i=c[i>>2]|0;l=j;return i|0}f=(c[h>>2]|0)+7200|0;c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;aj((c[h>>2]|0)+7216|0,0,2140)|0;aj((c[h>>2]|0)+144|0,0,4380)|0;f=(c[h>>2]|0)+4524|0;c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;c[f+16>>2]=0;c[f+20>>2]=0;c[f+24>>2]=0;c[f+28>>2]=0;f=(c[h>>2]|0)+16|0;c[f>>2]=0;c[f+4>>2]=0;c[(c[h>>2]|0)+5772>>2]=0;c[(c[h>>2]|0)+5780>>2]=0;c[(c[h>>2]|0)+4632>>2]=0;c[(c[h>>2]|0)+4568>>2]=100;c[(c[h>>2]|0)+4696>>2]=1;c[(c[h>>2]|0)+7216+2136>>2]=100;a[(c[h>>2]|0)+7200>>0]=10;c[(c[h>>2]|0)+144+4356>>2]=100;c[(c[h>>2]|0)+144+4372>>2]=65536;a[(c[h>>2]|0)+4565>>0]=0;c[(c[h>>2]|0)+4600>>2]=c[g>>2];f=(c[(c[h>>2]|0)+4604>>2]|0)==4;c[(c[h>>2]|0)+4720>>2]=(c[(c[h>>2]|0)+4600>>2]|0)==8?(f?29147:29170):f?29113:29158;if((c[(c[h>>2]|0)+4600>>2]|0)!=8?(c[(c[h>>2]|0)+4600>>2]|0)!=12:0){c[(c[h>>2]|0)+4664>>2]=16;e=c[h>>2]|0;d=17704}else{c[(c[h>>2]|0)+4664>>2]=10;e=c[h>>2]|0;d=17668}c[e+4724>>2]=d;c[(c[h>>2]|0)+4612>>2]=(c[g>>2]|0)*5;e=N((c[(c[h>>2]|0)+4612>>2]&65535)<<16>>16,(c[(c[h>>2]|0)+4604>>2]&65535)<<16>>16)|0;c[(c[h>>2]|0)+4608>>2]=e;c[(c[h>>2]|0)+4616>>2]=((c[g>>2]&65535)<<16>>16)*20;c[(c[h>>2]|0)+4620>>2]=(c[g>>2]&65535)<<16>>16<<1;c[(c[h>>2]|0)+4576>>2]=((c[g>>2]&65535)<<16>>16)*18;e=(c[(c[h>>2]|0)+4604>>2]|0)==4;g=(c[g>>2]&65535)<<16>>16;c[(e?c[h>>2]|0:c[h>>2]|0)+4572>>2]=e?g*24|0:g*14|0;e=c[h>>2]|0;do if((c[(c[h>>2]|0)+4600>>2]|0)!=16){d=(c[h>>2]|0)+4684|0;if((c[e+4600>>2]|0)==12){c[d>>2]=13;d=29039;e=c[h>>2]|0;break}else{c[d>>2]=15;d=29030;e=c[h>>2]|0;break}}else{c[e+4684>>2]=10;d=29045;e=c[h>>2]|0}while(0);c[e+4716>>2]=d;i=c[i>>2]|0;l=j;return i|0}function kf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;e=g+8|0;d=g+4|0;f=g;c[e>>2]=a;c[d>>2]=b;c[f>>2]=0;do if((c[d>>2]|0)>=2){if((c[d>>2]|0)<4){c[(c[e>>2]|0)+4668>>2]=1;c[(c[e>>2]|0)+4676>>2]=49807;c[(c[e>>2]|0)+4672>>2]=8;c[(c[e>>2]|0)+4660>>2]=10;c[(c[e>>2]|0)+4624>>2]=(c[(c[e>>2]|0)+4600>>2]|0)*5;c[(c[e>>2]|0)+4652>>2]=1;c[(c[e>>2]|0)+4656>>2]=0;c[(c[e>>2]|0)+4680>>2]=0;c[(c[e>>2]|0)+4692>>2]=4;b=c[e>>2]|0;a=0;break}if((c[d>>2]|0)<6){c[(c[e>>2]|0)+4668>>2]=1;c[(c[e>>2]|0)+4676>>2]=48497;c[(c[e>>2]|0)+4672>>2]=10;c[(c[e>>2]|0)+4660>>2]=12;c[(c[e>>2]|0)+4624>>2]=(c[(c[e>>2]|0)+4600>>2]|0)*5;c[(c[e>>2]|0)+4652>>2]=2;c[(c[e>>2]|0)+4656>>2]=1;c[(c[e>>2]|0)+4680>>2]=0;c[(c[e>>2]|0)+4692>>2]=8;b=c[e>>2]|0;a=(c[(c[e>>2]|0)+4600>>2]|0)*983|0;break}b=(c[e>>2]|0)+4668|0;if((c[d>>2]|0)<8){c[b>>2]=1;c[(c[e>>2]|0)+4676>>2]=47186;c[(c[e>>2]|0)+4672>>2]=12;c[(c[e>>2]|0)+4660>>2]=14;c[(c[e>>2]|0)+4624>>2]=(c[(c[e>>2]|0)+4600>>2]|0)*5;c[(c[e>>2]|0)+4652>>2]=3;c[(c[e>>2]|0)+4656>>2]=1;c[(c[e>>2]|0)+4680>>2]=0;c[(c[e>>2]|0)+4692>>2]=16;b=c[e>>2]|0;a=(c[(c[e>>2]|0)+4600>>2]|0)*983|0;break}else{c[b>>2]=2;c[(c[e>>2]|0)+4676>>2]=45875;c[(c[e>>2]|0)+4672>>2]=16;c[(c[e>>2]|0)+4660>>2]=16;c[(c[e>>2]|0)+4624>>2]=(c[(c[e>>2]|0)+4600>>2]|0)*5;c[(c[e>>2]|0)+4652>>2]=4;c[(c[e>>2]|0)+4656>>2]=1;c[(c[e>>2]|0)+4680>>2]=0;c[(c[e>>2]|0)+4692>>2]=32;b=c[e>>2]|0;a=(c[(c[e>>2]|0)+4600>>2]|0)*983|0;break}}else{c[(c[e>>2]|0)+4668>>2]=0;c[(c[e>>2]|0)+4676>>2]=52429;c[(c[e>>2]|0)+4672>>2]=6;c[(c[e>>2]|0)+4660>>2]=8;c[(c[e>>2]|0)+4624>>2]=(c[(c[e>>2]|0)+4600>>2]|0)*3;c[(c[e>>2]|0)+4652>>2]=1;c[(c[e>>2]|0)+4656>>2]=0;c[(c[e>>2]|0)+4680>>2]=1;c[(c[e>>2]|0)+4692>>2]=2;b=c[e>>2]|0;a=0}while(0);c[b+4704>>2]=a;a=nf(c[(c[e>>2]|0)+4672>>2]|0,c[(c[e>>2]|0)+4664>>2]|0)|0;c[(c[e>>2]|0)+4672>>2]=a;c[(c[e>>2]|0)+4628>>2]=((c[(c[e>>2]|0)+4600>>2]|0)*5|0)+(c[(c[e>>2]|0)+4624>>2]<<1);c[(c[e>>2]|0)+4648>>2]=c[d>>2];l=g;return c[f>>2]|0}function lf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;g=i+16|0;e=i+12|0;f=i+8|0;h=i+4|0;d=i;c[g>>2]=a;c[e>>2]=b;c[h>>2]=0;c[f>>2]=c[(c[g>>2]|0)+6124>>2];c[(c[g>>2]|0)+6124>>2]=0;if(!(c[(c[g>>2]|0)+6120>>2]|0)){h=c[h>>2]|0;l=i;return h|0}if((c[(c[g>>2]|0)+4640>>2]|0)<=0){h=c[h>>2]|0;l=i;return h|0}do if((c[(c[g>>2]|0)+4600>>2]|0)!=8)if((c[(c[g>>2]|0)+4600>>2]|0)==12){c[d>>2]=14e3;break}else{c[d>>2]=16e3;break}else c[d>>2]=12e3;while(0);if((c[(c[g>>2]|0)+4640>>2]|0)<25)b=c[(c[g>>2]|0)+4640>>2]|0;else b=25;a=((N(c[d>>2]|0,125-b|0)|0)>>16)*655|0;if((c[(c[g>>2]|0)+4640>>2]|0)<25)b=c[(c[g>>2]|0)+4640>>2]|0;else b=25;c[d>>2]=a+(((N(c[d>>2]|0,125-b|0)|0)&65535)*655>>16);if((c[e>>2]|0)<=(c[d>>2]|0)){h=c[h>>2]|0;l=i;return h|0}b=c[g>>2]|0;if(!(c[f>>2]|0))a=7;else{a=mf(7-(((c[b+4640>>2]>>16)*26214|0)+((c[(c[g>>2]|0)+4640>>2]&65535)*26214>>16))|0,2)|0;b=c[g>>2]|0}c[b+6128>>2]=a;c[(c[g>>2]|0)+6124>>2]=1;h=c[h>>2]|0;l=i;return h|0}function mf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function nf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function of(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;i=j+12|0;f=j+8|0;k=j+4|0;h=j;c[i>>2]=a;c[f>>2]=d;c[k>>2]=e;c[h>>2]=(c[k>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;if((Ui(+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2])|0)<=32767)if((Ui(+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2])|0)<-32768)d=-32768;else d=Ui(+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2])|0;else d=32767;b[(c[i>>2]|0)+(c[h>>2]<<1)>>1]=d;c[h>>2]=(c[h>>2]|0)+-1}l=j;return}function pf(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;i=j+12|0;f=j+8|0;k=j+4|0;h=j;c[i>>2]=a;c[f>>2]=d;c[k>>2]=e;c[h>>2]=(c[k>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]=+(b[(c[f>>2]|0)+(c[h>>2]<<1)>>1]|0);c[h>>2]=(c[h>>2]|0)+-1}l=j;return}function qf(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=l;l=l+160|0;f=D+156|0;j=D+152|0;k=D+148|0;p=D+144|0;q=D+140|0;r=D+136|0;m=D+132|0;u=D+128|0;o=D+124|0;x=D+120|0;w=D+116|0;y=D+112|0;A=D+108|0;z=D+104|0;B=D+100|0;v=D+96|0;s=D+92|0;n=D+88|0;g=D+52|0;i=D+16|0;h=D+8|0;t=D;c[f>>2]=a;c[j>>2]=d;c[k>>2]=e;c[h>>2]=g;c[h+4>>2]=i;c[m>>2]=c[k>>2]>>1;rf(c[j>>2]|0,g,i,c[m>>2]|0);c[t>>2]=g;c[x>>2]=b[12286];c[A>>2]=sf(c[t>>2]|0,c[x>>2]|0,c[m>>2]|0)|0;if((c[A>>2]|0)<0){b[c[f>>2]>>1]=0;c[t>>2]=i;c[A>>2]=sf(c[t>>2]|0,c[x>>2]|0,c[m>>2]|0)|0;c[u>>2]=1}else c[u>>2]=0;c[q>>2]=1;c[p>>2]=0;c[v>>2]=0;a:while(1){c[w>>2]=b[24572+(c[q>>2]<<1)>>1];c[z>>2]=sf(c[t>>2]|0,c[w>>2]|0,c[m>>2]|0)|0;if(!((c[A>>2]|0)<=0?(c[z>>2]|0)>=(c[v>>2]|0):0))C=7;do if((C|0)==7){C=0;if((c[A>>2]|0)>=0?(c[z>>2]|0)<=(0-(c[v>>2]|0)|0):0)break;c[q>>2]=(c[q>>2]|0)+1;c[x>>2]=c[w>>2];c[A>>2]=c[z>>2];c[v>>2]=0;if((c[q>>2]|0)<=128)continue a;c[p>>2]=(c[p>>2]|0)+1;if((c[p>>2]|0)>30)break a;xf(c[j>>2]|0,c[k>>2]|0,65536-(N((10+(c[p>>2]|0)&65535)<<16>>16,(c[p>>2]&65535)<<16>>16)|0)|0);rf(c[j>>2]|0,g,i,c[m>>2]|0);c[t>>2]=g;c[x>>2]=b[12286];c[A>>2]=sf(c[t>>2]|0,c[x>>2]|0,c[m>>2]|0)|0;if((c[A>>2]|0)<0){b[c[f>>2]>>1]=0;c[t>>2]=i;c[A>>2]=sf(c[t>>2]|0,c[x>>2]|0,c[m>>2]|0)|0;c[u>>2]=1}else c[u>>2]=0;c[q>>2]=1;continue a}while(0);if(!(c[z>>2]|0))c[v>>2]=1;else c[v>>2]=0;c[o>>2]=-256;c[r>>2]=0;while(1){if((c[r>>2]|0)>=3)break;c[y>>2]=((c[x>>2]|0)+(c[w>>2]|0)>>1)+((c[x>>2]|0)+(c[w>>2]|0)&1);c[B>>2]=sf(c[t>>2]|0,c[y>>2]|0,c[m>>2]|0)|0;if(!((c[A>>2]|0)<=0&(c[B>>2]|0)>=0)?!((c[A>>2]|0)>=0&(c[B>>2]|0)<=0):0){c[x>>2]=c[y>>2];c[A>>2]=c[B>>2];c[o>>2]=(c[o>>2]|0)+(128>>c[r>>2])}else{c[w>>2]=c[y>>2];c[z>>2]=c[B>>2]}c[r>>2]=(c[r>>2]|0)+1}e=c[A>>2]|0;a=c[A>>2]|0;if((((c[A>>2]|0)>0?e:0-e|0)|0)<65536){c[n>>2]=a-(c[z>>2]|0);c[s>>2]=(c[A>>2]<<5)+(c[n>>2]>>1);if(c[n>>2]|0)c[o>>2]=(c[o>>2]|0)+((c[s>>2]|0)/(c[n>>2]|0)|0)}else c[o>>2]=(c[o>>2]|0)+((a|0)/((c[A>>2]|0)-(c[z>>2]|0)>>5|0)|0);e=(tf((c[q>>2]<<8)+(c[o>>2]|0)|0,32767)|0)&65535;b[(c[f>>2]|0)+(c[u>>2]<<1)>>1]=e;c[u>>2]=(c[u>>2]|0)+1;if((c[u>>2]|0)>=(c[k>>2]|0)){C=34;break}c[t>>2]=c[h+((c[u>>2]&1)<<2)>>2];c[x>>2]=b[24572+((c[q>>2]|0)-1<<1)>>1];c[A>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|0);uf(c[h>>2]|0,c[i>>2]|0);l=k;return}function sf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;g=j+20|0;k=j+16|0;e=j+12|0;f=j+8|0;h=j+4|0;i=j;c[g>>2]=a;c[k>>2]=b;c[e>>2]=d;c[i>>2]=c[(c[g>>2]|0)+(c[e>>2]<<2)>>2];c[h>>2]=c[k>>2]<<4;if(8==(c[e>>2]|0)^1^1){k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+28>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+24>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+20>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+16>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+12>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+8>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+4>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[c[g>>2]>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=c[i>>2]|0;l=j;return k|0}c[f>>2]=(c[e>>2]|0)-1;while(1){if((c[f>>2]|0)<0)break;k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+(c[f>>2]<<2)>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);c[f>>2]=(c[f>>2]|0)+-1}k=c[i>>2]|0;l=j;return k|0}function tf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function uf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+12|0;d=h+8|0;e=h+4|0;f=h;c[g>>2]=a;c[d>>2]=b;c[e>>2]=2;while(1){if((c[e>>2]|0)>(c[d>>2]|0))break;c[f>>2]=c[d>>2];while(1){b=c[g>>2]|0;if((c[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if((((c[s>>2]|0)+(c[r>>2]|0)>>10)+1>>1|0)<=32767)if((((c[s>>2]|0)+(c[r>>2]|0)>>10)+1>>1|0)<-32768)g=-32768;else g=((c[s>>2]|0)+(c[r>>2]|0)>>10)+1>>1;else g=32767;b[(c[q>>2]|0)+(c[o>>2]<<1)>>1]=g;if((((c[s>>2]|0)-(c[r>>2]|0)>>10)+1>>1|0)<=32767)if((((c[s>>2]|0)-(c[r>>2]|0)>>10)+1>>1|0)<-32768)g=-32768;else g=((c[s>>2]|0)-(c[r>>2]|0)>>10)+1>>1;else g=32767;b[(c[p>>2]|0)+(c[o>>2]<<1)>>1]=g;c[o>>2]=(c[o>>2]|0)+1}l=t;return}function wf(a,d,e,f,g,h,i){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;x=l;l=l+64|0;q=x+52|0;o=x+48|0;y=x+44|0;p=x+40|0;u=x+36|0;t=x+32|0;w=x+28|0;s=x+24|0;r=x+20|0;k=x+16|0;j=x+12|0;n=x+8|0;m=x+4|0;v=x;c[q>>2]=a;c[o>>2]=d;c[y>>2]=e;c[p>>2]=f;c[u>>2]=g;c[t>>2]=h;c[w>>2]=i;c[j>>2]=0-(c[c[y>>2]>>2]|0)&16383;c[k>>2]=0-(c[c[y>>2]>>2]|0)>>14;c[m>>2]=0-(c[(c[y>>2]|0)+4>>2]|0)&16383;c[n>>2]=0-(c[(c[y>>2]|0)+4>>2]|0)>>14;c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[t>>2]|0))break;c[r>>2]=b[(c[q>>2]|0)+((N(c[s>>2]|0,c[w>>2]|0)|0)<<1)>>1];y=N(c[c[o>>2]>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;c[v>>2]=(c[c[p>>2]>>2]|0)+(y+((N(c[c[o>>2]>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16))<<2;y=N(c[v>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;y=(c[(c[p>>2]|0)+4>>2]|0)+((y+((N(c[v>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16)>>13)+1>>1)|0;c[c[p>>2]>>2]=y;y=N(c[v>>2]>>16,(c[k>>2]&65535)<<16>>16)|0;y=(c[c[p>>2]>>2]|0)+(y+((N(c[v>>2]&65535,(c[k>>2]&65535)<<16>>16)|0)>>16))|0;c[c[p>>2]>>2]=y;y=N(c[(c[o>>2]|0)+4>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;y=(c[c[p>>2]>>2]|0)+(y+((N(c[(c[o>>2]|0)+4>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16))|0;c[c[p>>2]>>2]=y;y=N(c[v>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;y=(y+((N(c[v>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16)>>13)+1>>1;c[(c[p>>2]|0)+4>>2]=y;y=N(c[v>>2]>>16,(c[n>>2]&65535)<<16>>16)|0;y=(c[(c[p>>2]|0)+4>>2]|0)+(y+((N(c[v>>2]&65535,(c[n>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[p>>2]|0)+4>>2]=y;y=N(c[(c[o>>2]|0)+8>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;y=(c[(c[p>>2]|0)+4>>2]|0)+(y+((N(c[(c[o>>2]|0)+8>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[p>>2]|0)+4>>2]=y;if(((c[v>>2]|0)+16384-1>>14|0)<=32767)if(((c[v>>2]|0)+16384-1>>14|0)<-32768)e=-32768;else e=(c[v>>2]|0)+16384-1>>14;else e=32767;b[(c[u>>2]|0)+((N(c[s>>2]|0,c[w>>2]|0)|0)<<1)>>1]=e;c[s>>2]=(c[s>>2]|0)+1}l=x;return}function xf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=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)>>15)+1>>1;c[g>>2]=(c[g>>2]|0)+d;c[j>>2]=(c[j>>2]|0)+1}j=((N(a,b[e+((c[i>>2]|0)-1<<1)>>1]|0)|0)>>15)+1>>1&65535;b[(c[f>>2]|0)+((c[i>>2]|0)-1<<1)>>1]=j;l=k;return}function zf(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+48|0;j=u+36|0;n=u+38|0;t=u+32|0;i=u+28|0;s=u+24|0;p=u+20|0;o=u+16|0;r=u+12|0;q=u+8|0;m=u+4|0;k=u;b[j>>1]=d;a[n>>0]=e;c[t>>2]=f;c[i>>2]=g;c[s>>2]=h;g=(c[s>>2]|0)==4;do if((c[i>>2]|0)==8)if(g){c[k>>2]=30282;c[m>>2]=11;break}else{c[k>>2]=30248;c[m>>2]=3;break}else if(g){c[k>>2]=30326;c[m>>2]=34;break}else{c[k>>2]=30254;c[m>>2]=12;break}while(0);c[r>>2]=(c[i>>2]&65535)<<16>>16<<1;c[q>>2]=((c[i>>2]&65535)<<16>>16)*18;c[p>>2]=(c[r>>2]|0)+(b[j>>1]|0);c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[s>>2]|0))break;g=N(c[o>>2]|0,c[m>>2]|0)|0;c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]=(c[p>>2]|0)+(a[(c[k>>2]|0)+(g+(a[n>>0]|0))>>0]|0);g=c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]|0;do if((c[r>>2]|0)>(c[q>>2]|0)){if((g|0)>(c[r>>2]|0)){g=c[r>>2]|0;break}if((c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]|0)<(c[q>>2]|0)){g=c[q>>2]|0;break}else{g=c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]|0;break}}else{if((g|0)>(c[q>>2]|0)){g=c[q>>2]|0;break}if((c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]|0)<(c[r>>2]|0)){g=c[r>>2]|0;break}else{g=c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]|0;break}}while(0);c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]=g;c[o>>2]=(c[o>>2]|0)+1}l=u;return}function Af(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+20|0;i=n+16|0;k=n+12|0;j=n+8|0;g=n+4|0;m=n;c[h>>2]=a;c[i>>2]=d;c[k>>2]=e;c[j>>2]=f;c[m>>2]=0;c[g>>2]=0;while(1){a=c[m>>2]|0;if((c[g>>2]|0)>=(c[j>>2]|0))break;e=N(b[(c[h>>2]|0)+(c[g>>2]<<1)>>1]|0,b[(c[i>>2]|0)+(c[g>>2]<<1)>>1]|0)|0;c[m>>2]=a+(e>>c[k>>2]);c[g>>2]=(c[g>>2]|0)+1}l=n;return a|0}function Bf(a){a=a|0;var b=0,d=0,e=0,f=0;b=l;l=l+16|0;f=b+8|0;e=b+4|0;d=b;c[f>>2]=a;Cf(c[f>>2]|0,e,d);a=((N(c[d>>2]|0,128-(c[d>>2]|0)|0)|0)>>16)*179|0;a=(31-(c[e>>2]|0)<<7)+((c[d>>2]|0)+(a+(((N(c[d>>2]|0,128-(c[d>>2]|0)|0)|0)&65535)*179>>16)))|0;l=b;return a|0}function Cf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=Df(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(Ef(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function Df(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function Ef(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function Ff(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+12|0;e=h+8|0;f=h+4|0;d=h;c[e>>2]=a;if((c[e>>2]|0)<0){c[g>>2]=0;g=c[g>>2]|0;l=h;return g|0}if((c[e>>2]|0)>=3967){c[g>>2]=2147483647;g=c[g>>2]|0;l=h;return g|0}c[f>>2]=1<<(c[e>>2]>>7);c[d>>2]=c[e>>2]&127;a=c[f>>2]|0;b=c[f>>2]|0;if((c[e>>2]|0)<2048){e=N((N((c[d>>2]&65535)<<16>>16,(128-(c[d>>2]|0)&65535)<<16>>16)|0)>>16,-174)|0;c[f>>2]=a+((N(b,(c[d>>2]|0)+(e+((N((N((c[d>>2]&65535)<<16>>16,(128-(c[d>>2]|0)&65535)<<16>>16)|0)&65535,-174)|0)>>16))|0)|0)>>7)}else{e=N((N((c[d>>2]&65535)<<16>>16,(128-(c[d>>2]|0)&65535)<<16>>16)|0)>>16,-174)|0;c[f>>2]=a+(N(b>>7,(c[d>>2]|0)+(e+((N((N((c[d>>2]&65535)<<16>>16,(128-(c[d>>2]|0)&65535)<<16>>16)|0)&65535,-174)|0)>>16))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]=(c[o>>2]|0)+2}c[s>>2]=(b[(c[m>>2]|0)+2>>1]<<12)-(c[s>>2]|0);c[r>>2]=(c[s>>2]>>11)+1>>1;if((c[r>>2]|0)>32767)e=32767;else e=(c[r>>2]|0)<-32768?-32768:c[r>>2]|0;b[(c[q>>2]|0)+(c[n>>2]<<1)>>1]=e;c[n>>2]=(c[n>>2]|0)+1}aj(c[q>>2]|0,0,c[j>>2]<<1|0)|0;l=t;return}function Hf(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+160|0;k=m+148|0;e=m+144|0;j=m+140|0;i=m+136|0;g=m+8|0;f=m+4|0;h=m;c[e>>2]=a;c[j>>2]=d;c[h>>2]=0;c[f>>2]=g+((c[j>>2]&1)<<6);c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[j>>2]|0))break;c[h>>2]=(c[h>>2]|0)+(b[(c[e>>2]|0)+(c[i>>2]<<1)>>1]|0);c[(c[f>>2]|0)+(c[i>>2]<<2)>>2]=b[(c[e>>2]|0)+(c[i>>2]<<1)>>1]<<12;c[i>>2]=(c[i>>2]|0)+1}if((c[h>>2]|0)>=4096){c[k>>2]=0;k=c[k>>2]|0;l=m;return k|0}else{c[k>>2]=If(g,c[j>>2]|0)|0;k=c[k>>2]|0;l=m;return k|0}return 0}function If(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;r=l;l=l+64|0;o=r+48|0;d=r+44|0;s=r+40|0;h=r+36|0;j=r+32|0;i=r+28|0;g=r+24|0;k=r+20|0;m=r+16|0;n=r+12|0;p=r+8|0;f=r+4|0;e=r;c[d>>2]=a;c[s>>2]=b;c[e>>2]=(c[d>>2]|0)+((c[s>>2]&1)<<6);c[g>>2]=1073741824;c[h>>2]=(c[s>>2]|0)-1;while(1){a=c[e>>2]|0;if((c[h>>2]|0)<=0)break;if((c[a+(c[h>>2]<<2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)|0}c[(c[e>>2]|0)+(c[j>>2]<<2)>>2]=a;c[j>>2]=(c[j>>2]|0)+1}c[h>>2]=(c[h>>2]|0)+-1}if((q|0)==5){c[o>>2]=0;t=c[o>>2]|0;l=r;return t|0}if((c[a>>2]|0)<=16773022?(c[c[e>>2]>>2]|0)>=-16773022:0){c[k>>2]=0-(c[c[e>>2]>>2]<<7);t=c[k>>2]|0;s=c[k>>2]|0;s=Xi(t|0,((t|0)<0)<<31>>31|0,s|0,((s|0)<0)<<31>>31|0)|0;s=Yi(s|0,y|0,32)|0;c[m>>2]=1073741824-s;s=c[g>>2]|0;t=c[m>>2]|0;t=Xi(s|0,((s|0)<0)<<31>>31|0,t|0,((t|0)<0)<<31>>31|0)|0;t=Yi(t|0,y|0,32)|0;c[g>>2]=t<<2;c[o>>2]=c[g>>2];t=c[o>>2]|0;l=r;return t|0}c[o>>2]=0;t=c[o>>2]|0;l=r;return t|0}function Jf(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function Kf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+48|0;g=h+32|0;n=h+28|0;d=h+24|0;i=h+20|0;f=h+16|0;j=h+12|0;m=h+8|0;k=h+4|0;e=h;c[n>>2]=a;c[d>>2]=b;b=c[n>>2]|0;c[i>>2]=(Jf((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[j>>2]=536870911/(c[m>>2]>>16|0)|0;c[e>>2]=c[j>>2]<<16;b=N(c[m>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;c[k>>2]=536870912-(b+((N(c[m>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))<<3;b=N(c[k>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;b=(c[e>>2]|0)+(b+((N(c[k>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))|0;c[e>>2]=b+(N(c[k>>2]|0,(c[j>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[i>>2]|0)-(c[d>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0)if((b|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];n=c[g>>2]|0;l=h;return n|0}else{c[g>>2]=0;n=c[g>>2]|0;l=h;return n|0}a=c[e>>2]|0;d=0-(c[f>>2]|0)|0;do if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>d|0)){b=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){b=2147483647>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){b=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){b=-2147483648>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}while(0);c[g>>2]=b<<0-(c[f>>2]|0);n=c[g>>2]|0;l=h;return n|0}function Lf(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;C=l;l=l+272|0;y=C+264|0;g=C+260|0;z=C+256|0;v=C+252|0;B=C+248|0;A=C+244|0;p=C+240|0;n=C+176|0;h=C+140|0;j=C+104|0;i=C+100|0;k=C+96|0;s=C+92|0;r=C+88|0;o=C+84|0;q=C+80|0;x=C+16|0;u=C+12|0;m=C+8|0;t=C+4|0;w=C;c[y>>2]=a;c[g>>2]=e;c[z>>2]=f;c[t>>2]=0;c[v>>2]=(c[z>>2]|0)==16?30222:30238;c[B>>2]=0;while(1){if((c[B>>2]|0)>=(c[z>>2]|0))break;c[s>>2]=b[(c[g>>2]|0)+(c[B>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2]|0);c[A>>2]=(c[A>>2]|0)+1}w=(c[A>>2]|0)==10;c[B>>2]=0;a:do if(w)while(1){if((c[B>>2]|0)>=(c[z>>2]|0))break a;if(((c[x+(c[B>>2]<<2)>>2]>>4)+1>>1|0)<=32767)if(((c[x+(c[B>>2]<<2)>>2]>>4)+1>>1|0)<-32768)e=-32768;else e=(c[x+(c[B>>2]<<2)>>2]>>4)+1>>1;else e=32767;b[(c[y>>2]|0)+(c[B>>2]<<1)>>1]=e;c[x+(c[B>>2]<<2)>>2]=b[(c[y>>2]|0)+(c[B>>2]<<1)>>1]<<5;c[B>>2]=(c[B>>2]|0)+1}else while(1){if((c[B>>2]|0)>=(c[z>>2]|0))break a;b[(c[y>>2]|0)+(c[B>>2]<<1)>>1]=(c[x+(c[B>>2]<<2)>>2]>>4)+1>>1;c[B>>2]=(c[B>>2]|0)+1}while(0);c[A>>2]=0;while(1){if((c[A>>2]|0)>=16){e=31;break}if((Hf(c[y>>2]|0,c[z>>2]|0)|0)>=107374){e=31;break}xf(x,c[z>>2]|0,65536-(2<>2])|0);c[B>>2]=0;while(1){if((c[B>>2]|0)>=(c[z>>2]|0))break;b[(c[y>>2]|0)+(c[B>>2]<<1)>>1]=(c[x+(c[B>>2]<<2)>>2]>>4)+1>>1;c[B>>2]=(c[B>>2]|0)+1}c[A>>2]=(c[A>>2]|0)+1}if((e|0)==31){l=C;return}}function Mf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;j=k+20|0;e=k+16|0;f=k+12|0;h=k+8|0;i=k+4|0;g=k;c[j>>2]=a;c[e>>2]=b;c[f>>2]=d;c[c[j>>2]>>2]=65536;c[(c[j>>2]|0)+4>>2]=0-(c[c[e>>2]>>2]|0);c[h>>2]=1;while(1){if((c[h>>2]|0)>=(c[f>>2]|0))break;c[g>>2]=c[(c[e>>2]|0)+(c[h>>2]<<1<<2)>>2];d=c[(c[j>>2]|0)+((c[h>>2]|0)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l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Tf(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;j=m+20|0;i=m+16|0;g=m+12|0;h=m+8|0;n=m+4|0;k=m;c[i>>2]=b;c[g>>2]=d;c[h>>2]=e;c[n>>2]=f;aj(c[i>>2]|0,0,300)|0;d=(c[g>>2]|0)!=8e3&(c[g>>2]|0)!=12e3&(c[g>>2]|0)!=16e3;do if(c[n>>2]|0){if(!(d&(c[g>>2]|0)!=24e3&(c[g>>2]|0)!=48e3)?!((c[h>>2]|0)!=8e3&(c[h>>2]|0)!=12e3&(c[h>>2]|0)!=16e3):0){d=c[i>>2]|0;e=a[30489+((((c[g>>2]>>12)-((c[g>>2]|0)>16e3&1)>>((c[g>>2]|0)>24e3&1))-1|0)*3|0)+(((c[h>>2]>>12)-((c[h>>2]|0)>16e3&1)>>((c[h>>2]|0)>24e3&1))-1)>>0]|0;break}c[j>>2]=-1;n=c[j>>2]|0;l=m;return n|0}else{if(!d?!((c[h>>2]|0)!=8e3&(c[h>>2]|0)!=12e3&(c[h>>2]|0)!=16e3&(c[h>>2]|0)!=24e3&(c[h>>2]|0)!=48e3):0){d=c[i>>2]|0;e=a[30504+((((c[g>>2]>>12)-((c[g>>2]|0)>16e3&1)>>((c[g>>2]|0)>24e3&1))-1|0)*5|0)+(((c[h>>2]>>12)-((c[h>>2]|0)>16e3&1)>>((c[h>>2]|0)>24e3&1))-1)>>0]|0;break}c[j>>2]=-1;n=c[j>>2]|0;l=m;return n|0}while(0);c[d+292>>2]=e;c[(c[i>>2]|0)+284>>2]=(c[g>>2]|0)/1e3|0;c[(c[i>>2]|0)+288>>2]=(c[h>>2]|0)/1e3|0;c[(c[i>>2]|0)+268>>2]=(c[(c[i>>2]|0)+284>>2]|0)*10;c[k>>2]=0;e=c[h>>2]|0;b=c[g>>2]|0;do if((c[h>>2]|0)>(c[g>>2]|0)){d=(c[i>>2]|0)+264|0;if((e|0)==(b<<1|0)){c[d>>2]=1;break}else{c[d>>2]=2;c[k>>2]=1;break}}else{d=(c[i>>2]|0)+264|0;if((e|0)>=(b|0)){c[d>>2]=0;break}c[d>>2]=3;if((c[h>>2]<<2|0)==((c[g>>2]|0)*3|0)){c[(c[i>>2]|0)+280>>2]=3;c[(c[i>>2]|0)+276>>2]=18;c[(c[i>>2]|0)+296>>2]=24842;break}if(((c[h>>2]|0)*3|0)==(c[g>>2]<<1|0)){c[(c[i>>2]|0)+280>>2]=2;c[(c[i>>2]|0)+276>>2]=18;c[(c[i>>2]|0)+296>>2]=24900;break}if((c[h>>2]<<1|0)==(c[g>>2]|0)){c[(c[i>>2]|0)+280>>2]=1;c[(c[i>>2]|0)+276>>2]=24;c[(c[i>>2]|0)+296>>2]=24940;break}if(((c[h>>2]|0)*3|0)==(c[g>>2]|0)){c[(c[i>>2]|0)+280>>2]=1;c[(c[i>>2]|0)+276>>2]=36;c[(c[i>>2]|0)+296>>2]=24968;break}if((c[h>>2]<<2|0)==(c[g>>2]|0)){c[(c[i>>2]|0)+280>>2]=1;c[(c[i>>2]|0)+276>>2]=36;c[(c[i>>2]|0)+296>>2]=25008;break}if(((c[h>>2]|0)*6|0)==(c[g>>2]|0)){c[(c[i>>2]|0)+280>>2]=1;c[(c[i>>2]|0)+276>>2]=36;c[(c[i>>2]|0)+296>>2]=25048;break}c[j>>2]=-1;n=c[j>>2]|0;l=m;return n|0}while(0);c[(c[i>>2]|0)+272>>2]=((c[g>>2]<<14+(c[k>>2]|0)|0)/(c[h>>2]|0)|0)<<2;while(1){n=N(c[(c[i>>2]|0)+272>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;n=n+((N(c[(c[i>>2]|0)+272>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16)|0;n=n+(N(c[(c[i>>2]|0)+272>>2]|0,(c[h>>2]>>15)+1>>1)|0)|0;if((n|0)>=(c[g>>2]<>2]|0))break;n=(c[i>>2]|0)+272|0;c[n>>2]=(c[n>>2]|0)+1}c[j>>2]=0;n=c[j>>2]|0;l=m;return n|0}function Uf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;j=k+12|0;g=k+8|0;h=k+4|0;i=k;c[f>>2]=a;c[j>>2]=b;c[g>>2]=d;c[h>>2]=e;c[i>>2]=(c[(c[f>>2]|0)+284>>2]|0)-(c[(c[f>>2]|0)+292>>2]|0);_i((c[f>>2]|0)+168+(c[(c[f>>2]|0)+292>>2]<<1)|0,c[g>>2]|0,c[i>>2]<<1|0)|0;switch(c[(c[f>>2]|0)+264>>2]|0){case 1:{bg(c[f>>2]|0,c[j>>2]|0,(c[f>>2]|0)+168|0,c[(c[f>>2]|0)+284>>2]|0);bg(c[f>>2]|0,(c[j>>2]|0)+(c[(c[f>>2]|0)+288>>2]<<1)|0,(c[g>>2]|0)+(c[i>>2]<<1)|0,(c[h>>2]|0)-(c[(c[f>>2]|0)+284>>2]|0)|0);break}case 2:{_f(c[f>>2]|0,c[j>>2]|0,(c[f>>2]|0)+168|0,c[(c[f>>2]|0)+284>>2]|0);_f(c[f>>2]|0,(c[j>>2]|0)+(c[(c[f>>2]|0)+288>>2]<<1)|0,(c[g>>2]|0)+(c[i>>2]<<1)|0,(c[h>>2]|0)-(c[(c[f>>2]|0)+284>>2]|0)|0);break}case 3:{Yf(c[f>>2]|0,c[j>>2]|0,(c[f>>2]|0)+168|0,c[(c[f>>2]|0)+284>>2]|0);Yf(c[f>>2]|0,(c[j>>2]|0)+(c[(c[f>>2]|0)+288>>2]<<1)|0,(c[g>>2]|0)+(c[i>>2]<<1)|0,(c[h>>2]|0)-(c[(c[f>>2]|0)+284>>2]|0)|0);break}default:{_i(c[j>>2]|0,(c[f>>2]|0)+168|0,c[(c[f>>2]|0)+284>>2]<<1|0)|0;_i((c[j>>2]|0)+(c[(c[f>>2]|0)+288>>2]<<1)|0,(c[g>>2]|0)+(c[i>>2]<<1)|0,(c[h>>2]|0)-(c[(c[f>>2]|0)+284>>2]|0)<<1|0)|0}}_i((c[f>>2]|0)+168|0,(c[g>>2]|0)+((c[h>>2]|0)-(c[(c[f>>2]|0)+292>>2]|0)<<1)|0,c[(c[f>>2]|0)+292>>2]<<1|0)|0;l=k;return 0}function Vf(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+1968|0;g=q+1964|0;o=q+1960|0;k=q+1956|0;m=q+1952|0;n=q+1948|0;j=q+1944|0;p=q+1940|0;i=q+1936|0;h=q;c[g>>2]=a;c[o>>2]=d;c[k>>2]=e;c[m>>2]=f;d=c[g>>2]|0;c[h>>2]=c[d>>2];c[h+4>>2]=c[d+4>>2];c[h+8>>2]=c[d+8>>2];c[h+12>>2]=c[d+12>>2];while(1){c[n>>2]=(c[m>>2]|0)<480?c[m>>2]|0:480;Xf((c[g>>2]|0)+16|0,h+16|0,c[k>>2]|0,25088,c[n>>2]|0);c[i>>2]=h;c[j>>2]=c[n>>2];while(1){if((c[j>>2]|0)<=2)break;d=N(c[c[i>>2]>>2]>>16,b[12546]|0)|0;c[p>>2]=d+((N(c[c[i>>2]>>2]&65535,b[12546]|0)|0)>>16);d=N(c[(c[i>>2]|0)+4>>2]>>16,b[12547]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+4>>2]&65535,b[12547]|0)|0)>>16));d=N(c[(c[i>>2]|0)+8>>2]>>16,b[12549]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+8>>2]&65535,b[12549]|0)|0)>>16));d=N(c[(c[i>>2]|0)+12>>2]>>16,b[12548]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+12>>2]&65535,b[12548]|0)|0)>>16));if(((c[p>>2]>>5)+1>>1|0)<=32767)if(((c[p>>2]>>5)+1>>1|0)<-32768)a=-32768;else a=(c[p>>2]>>5)+1>>1;else a=32767;d=c[o>>2]|0;c[o>>2]=d+2;b[d>>1]=a;d=N(c[(c[i>>2]|0)+4>>2]>>16,b[12548]|0)|0;c[p>>2]=d+((N(c[(c[i>>2]|0)+4>>2]&65535,b[12548]|0)|0)>>16);d=N(c[(c[i>>2]|0)+8>>2]>>16,b[12549]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+8>>2]&65535,b[12549]|0)|0)>>16));d=N(c[(c[i>>2]|0)+12>>2]>>16,b[12547]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+12>>2]&65535,b[12547]|0)|0)>>16));d=N(c[(c[i>>2]|0)+16>>2]>>16,b[12546]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+16>>2]&65535,b[12546]|0)|0)>>16));if(((c[p>>2]>>5)+1>>1|0)<=32767)if(((c[p>>2]>>5)+1>>1|0)<-32768)a=-32768;else a=(c[p>>2]>>5)+1>>1;else a=32767;d=c[o>>2]|0;c[o>>2]=d+2;b[d>>1]=a;c[i>>2]=(c[i>>2]|0)+12;c[j>>2]=(c[j>>2]|0)-3}c[k>>2]=(c[k>>2]|0)+(c[n>>2]<<1);c[m>>2]=(c[m>>2]|0)-(c[n>>2]|0);if((c[m>>2]|0)<=0)break;d=h+(c[n>>2]<<2)|0;c[h>>2]=c[d>>2];c[h+4>>2]=c[d+4>>2];c[h+8>>2]=c[d+8>>2];c[h+12>>2]=c[d+12>>2]}p=c[g>>2]|0;o=h+(c[n>>2]<<2)|0;c[p>>2]=c[o>>2];c[p+4>>2]=c[o+4>>2];c[p+8>>2]=c[o+8>>2];c[p+12>>2]=c[o+12>>2];l=q;return}function Wf(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+48|0;g=q+36|0;o=q+32|0;j=q+28|0;r=q+24|0;m=q+20|0;n=q+16|0;k=q+12|0;p=q+8|0;i=q+4|0;h=q;c[g>>2]=a;c[o>>2]=d;c[j>>2]=e;c[r>>2]=f;c[n>>2]=c[r>>2]>>1;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;c[k>>2]=b[(c[j>>2]|0)+(c[m>>2]<<1<<1)>>1]<<10;c[i>>2]=(c[k>>2]|0)-(c[c[g>>2]>>2]|0);r=N(c[i>>2]>>16,-25727)|0;c[h>>2]=(c[i>>2]|0)+(r+((N(c[i>>2]&65535,-25727)|0)>>16));c[p>>2]=(c[c[g>>2]>>2]|0)+(c[h>>2]|0);c[c[g>>2]>>2]=(c[k>>2]|0)+(c[h>>2]|0);c[k>>2]=b[(c[j>>2]|0)+((c[m>>2]<<1)+1<<1)>>1]<<10;c[i>>2]=(c[k>>2]|0)-(c[(c[g>>2]|0)+4>>2]|0);c[h>>2]=((c[i>>2]>>16)*9872|0)+((c[i>>2]&65535)*9872>>16);c[p>>2]=(c[p>>2]|0)+(c[(c[g>>2]|0)+4>>2]|0);c[p>>2]=(c[p>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+4>>2]=(c[k>>2]|0)+(c[h>>2]|0);if(((c[p>>2]>>10)+1>>1|0)<=32767)if(((c[p>>2]>>10)+1>>1|0)<-32768)a=-32768;else a=(c[p>>2]>>10)+1>>1;else a=32767;b[(c[o>>2]|0)+(c[m>>2]<<1)>>1]=a;c[m>>2]=(c[m>>2]|0)+1}l=q;return}function Xf(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;i=p+24|0;o=p+20|0;j=p+16|0;h=p+12|0;m=p+8|0;k=p+4|0;n=p;c[i>>2]=a;c[o>>2]=d;c[j>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]|0)|0)>>16));w=N(c[(c[p>>2]|0)+36>>2]>>16,b[(c[m>>2]|0)+16>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N(c[(c[p>>2]|0)+36>>2]&65535,b[(c[m>>2]|0)+16>>1]|0)|0)>>16));if(((c[u>>2]>>5)+1>>1|0)<=32767)if(((c[u>>2]>>5)+1>>1|0)<-32768)e=-32768;else e=(c[u>>2]>>5)+1>>1;else e=32767;w=c[t>>2]|0;c[t>>2]=w+2;b[w>>1]=e;c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0)}w=c[t>>2]|0;l=v;return w|0}case 24:{c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[s>>2]|0))break;c[p>>2]=(c[o>>2]|0)+(c[q>>2]>>16<<2);w=N((c[c[p>>2]>>2]|0)+(c[(c[p>>2]|0)+92>>2]|0)>>16,b[c[n>>2]>>1]|0)|0;c[u>>2]=w+((N((c[c[p>>2]>>2]|0)+(c[(c[p>>2]|0)+92>>2]|0)&65535,b[c[n>>2]>>1]|0)|0)>>16);w=N((c[(c[p>>2]|0)+4>>2]|0)+(c[(c[p>>2]|0)+88>>2]|0)>>16,b[(c[n>>2]|0)+2>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+4>>2]|0)+(c[(c[p>>2]|0)+88>>2]|0)&65535,b[(c[n>>2]|0)+2>>1]|0)|0)>>16));w=N((c[(c[p>>2]|0)+8>>2]|0)+(c[(c[p>>2]|0)+84>>2]|0)>>16,b[(c[n>>2]|0)+4>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+8>>2]|0)+(c[(c[p>>2]|0)+84>>2]|0)&65535,b[(c[n>>2]|0)+4>>1]|0)|0)>>16));w=N((c[(c[p>>2]|0)+12>>2]|0)+(c[(c[p>>2]|0)+80>>2]|0)>>16,b[(c[n>>2]|0)+6>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>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p>>2]|0)+56>>2]|0)>>16,b[(c[n>>2]|0)+18>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+36>>2]|0)+(c[(c[p>>2]|0)+56>>2]|0)&65535,b[(c[n>>2]|0)+18>>1]|0)|0)>>16));w=N((c[(c[p>>2]|0)+40>>2]|0)+(c[(c[p>>2]|0)+52>>2]|0)>>16,b[(c[n>>2]|0)+20>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+40>>2]|0)+(c[(c[p>>2]|0)+52>>2]|0)&65535,b[(c[n>>2]|0)+20>>1]|0)|0)>>16));w=N((c[(c[p>>2]|0)+44>>2]|0)+(c[(c[p>>2]|0)+48>>2]|0)>>16,b[(c[n>>2]|0)+22>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+44>>2]|0)+(c[(c[p>>2]|0)+48>>2]|0)&65535,b[(c[n>>2]|0)+22>>1]|0)|0)>>16));if(((c[u>>2]>>5)+1>>1|0)<=32767)if(((c[u>>2]>>5)+1>>1|0)<-32768)e=-32768;else e=(c[u>>2]>>5)+1>>1;else e=32767;w=c[t>>2]|0;c[t>>2]=w+2;b[w>>1]=e;c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0)}w=c[t>>2]|0;l=v;return w|0}case 36:{c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[s>>2]|0))break;c[p>>2]=(c[o>>2]|0)+(c[q>>2]>>16<<2);w=N((c[c[p>>2]>>2]|0)+(c[(c[p>>2]|0)+140>>2]|0)>>16,b[c[n>>2]>>1]|0)|0;c[u>>2]=w+((N((c[c[p>>2]>>2]|0)+(c[(c[p>>2]|0)+140>>2]|0)&65535,b[c[n>>2]>>1]|0)|0)>>16);w=N((c[(c[p>>2]|0)+4>>2]|0)+(c[(c[p>>2]|0)+136>>2]|0)>>16,b[(c[n>>2]|0)+2>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((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0)<-32768)e=-32768;else e=(c[u>>2]>>5)+1>>1;else e=32767;w=c[t>>2]|0;c[t>>2]=w+2;b[w>>1]=e;c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0)}w=c[t>>2]|0;l=v;return w|0}default:{w=c[t>>2]|0;l=v;return w|0}}return 0}function _f(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+48|0;q=p+32|0;n=p+28|0;h=p+24|0;i=p+20|0;g=p+16|0;m=p+12|0;k=p+8|0;j=p+4|0;o=p;c[q>>2]=a;c[n>>2]=d;c[h>>2]=e;c[i>>2]=f;c[g>>2]=c[q>>2];d=(c[(c[g>>2]|0)+268>>2]<<1)+8|0;c[o>>2]=$()|0;e=l;l=l+((1*(d<<1)|0)+15&-16)|0;d=(c[g>>2]|0)+24|0;b[e>>1]=b[d>>1]|0;b[e+2>>1]=b[d+2>>1]|0;b[e+4>>1]=b[d+4>>1]|0;b[e+6>>1]=b[d+6>>1]|0;b[e+8>>1]=b[d+8>>1]|0;b[e+10>>1]=b[d+10>>1]|0;b[e+12>>1]=b[d+12>>1]|0;b[e+14>>1]=b[d+14>>1]|0;c[j>>2]=c[(c[g>>2]|0)+272>>2];while(1){if((c[i>>2]|0)<(c[(c[g>>2]|0)+268>>2]|0))a=c[i>>2]|0;else a=c[(c[g>>2]|0)+268>>2]|0;c[m>>2]=a;ag(c[g>>2]|0,e+16|0,c[h>>2]|0,c[m>>2]|0);c[k>>2]=c[m>>2]<<17;c[n>>2]=$f(c[n>>2]|0,e,c[k>>2]|0,c[j>>2]|0)|0;c[h>>2]=(c[h>>2]|0)+(c[m>>2]<<1);c[i>>2]=(c[i>>2]|0)-(c[m>>2]|0);if((c[i>>2]|0)<=0)break;q=e+(c[m>>2]<<1<<1)|0;b[e>>1]=b[q>>1]|0;b[e+2>>1]=b[q+2>>1]|0;b[e+4>>1]=b[q+4>>1]|0;b[e+6>>1]=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>>2]|0)+10>>1]|0,b[25100+(11-(c[o>>2]|0)<<3)+4>>1]|0)|0);c[n>>2]=(c[n>>2]|0)+(N(b[(c[h>>2]|0)+12>>1]|0,b[25100+(11-(c[o>>2]|0)<<3)+2>>1]|0)|0);c[n>>2]=(c[n>>2]|0)+(N(b[(c[h>>2]|0)+14>>1]|0,b[25100+(11-(c[o>>2]|0)<<3)>>1]|0)|0);if(((c[n>>2]>>14)+1>>1|0)<=32767)if(((c[n>>2]>>14)+1>>1|0)<-32768)d=-32768;else d=(c[n>>2]>>14)+1>>1;else d=32767;a=c[m>>2]|0;c[m>>2]=a+2;b[a>>1]=d;c[i>>2]=(c[i>>2]|0)+(c[j>>2]|0)}l=p;return c[m>>2]|0}function ag(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;g=r+36|0;o=r+32|0;j=r+28|0;n=r+24|0;m=r+20|0;k=r+16|0;p=r+12|0;q=r+8|0;i=r+4|0;h=r;c[g>>2]=a;c[o>>2]=d;c[j>>2]=e;c[n>>2]=f;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;c[k>>2]=b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]<<10;c[i>>2]=(c[k>>2]|0)-(c[c[g>>2]>>2]|0);d=N(c[i>>2]>>16,b[12415]|0)|0;c[h>>2]=d+((N(c[i>>2]&65535,b[12415]|0)|0)>>16);c[p>>2]=(c[c[g>>2]>>2]|0)+(c[h>>2]|0);c[c[g>>2]>>2]=(c[k>>2]|0)+(c[h>>2]|0);c[i>>2]=(c[p>>2]|0)-(c[(c[g>>2]|0)+4>>2]|0);d=N(c[i>>2]>>16,b[12416]|0)|0;c[h>>2]=d+((N(c[i>>2]&65535,b[12416]|0)|0)>>16);c[q>>2]=(c[(c[g>>2]|0)+4>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+4>>2]=(c[p>>2]|0)+(c[h>>2]|0);c[i>>2]=(c[q>>2]|0)-(c[(c[g>>2]|0)+8>>2]|0);d=N(c[i>>2]>>16,b[12417]|0)|0;c[h>>2]=(c[i>>2]|0)+(d+((N(c[i>>2]&65535,b[12417]|0)|0)>>16));c[p>>2]=(c[(c[g>>2]|0)+8>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+8>>2]=(c[q>>2]|0)+(c[h>>2]|0);if(((c[p>>2]>>9)+1>>1|0)<=32767)if(((c[p>>2]>>9)+1>>1|0)<-32768)a=-32768;else a=(c[p>>2]>>9)+1>>1;else a=32767;b[(c[o>>2]|0)+(c[m>>2]<<1<<1)>>1]=a;c[i>>2]=(c[k>>2]|0)-(c[(c[g>>2]|0)+12>>2]|0);d=N(c[i>>2]>>16,b[12418]|0)|0;c[h>>2]=d+((N(c[i>>2]&65535,b[12418]|0)|0)>>16);c[p>>2]=(c[(c[g>>2]|0)+12>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+12>>2]=(c[k>>2]|0)+(c[h>>2]|0);c[i>>2]=(c[p>>2]|0)-(c[(c[g>>2]|0)+16>>2]|0);d=N(c[i>>2]>>16,b[12419]|0)|0;c[h>>2]=d+((N(c[i>>2]&65535,b[12419]|0)|0)>>16);c[q>>2]=(c[(c[g>>2]|0)+16>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+16>>2]=(c[p>>2]|0)+(c[h>>2]|0);c[i>>2]=(c[q>>2]|0)-(c[(c[g>>2]|0)+20>>2]|0);d=N(c[i>>2]>>16,b[12420]|0)|0;c[h>>2]=(c[i>>2]|0)+(d+((N(c[i>>2]&65535,b[12420]|0)|0)>>16));c[p>>2]=(c[(c[g>>2]|0)+20>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+20>>2]=(c[q>>2]|0)+(c[h>>2]|0);if(((c[p>>2]>>9)+1>>1|0)<=32767)if(((c[p>>2]>>9)+1>>1|0)<-32768)a=-32768;else a=(c[p>>2]>>9)+1>>1;else a=32767;b[(c[o>>2]|0)+((c[m>>2]<<1)+1<<1)>>1]=a;c[m>>2]=(c[m>>2]|0)+1}l=r;return}function bg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=l;l=l+32|0;k=f+16|0;i=f+12|0;h=f+8|0;g=f+4|0;j=f;c[k>>2]=a;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;c[j>>2]=c[k>>2];ag(c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,c[g>>2]|0);l=f;return}function cg(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;e=f+8|0;b=f+4|0;d=f;c[b>>2]=a;a=c[b>>2]|0;if((c[b>>2]|0)<0){c[b>>2]=0-a;if((c[b>>2]|0)>=192){c[e>>2]=0;e=c[e>>2]|0;l=f;return e|0}else{c[d>>2]=c[b>>2]>>5;c[e>>2]=(c[17960+(c[d>>2]<<2)>>2]|0)-(N((c[17984+(c[d>>2]<<2)>>2]&65535)<<16>>16,(c[b>>2]&31)<<16>>16)|0);e=c[e>>2]|0;l=f;return e|0}}else if((a|0)>=192){c[e>>2]=32767;e=c[e>>2]|0;l=f;return e|0}else{c[d>>2]=c[b>>2]>>5;c[e>>2]=(c[18008+(c[d>>2]<<2)>>2]|0)+(N((c[17984+(c[d>>2]<<2)>>2]&65535)<<16>>16,(c[b>>2]&31)<<16>>16)|0);e=c[e>>2]|0;l=f;return e|0}return 0}function dg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+24|0;j=n+20|0;g=n+16|0;f=n+12|0;m=n+8|0;i=n+4|0;k=n;c[h>>2]=a;c[j>>2]=b;c[g>>2]=d;c[f>>2]=e;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[f>>2]|0))break;c[(c[j>>2]|0)+(c[i>>2]<<2)>>2]=c[i>>2];c[i>>2]=(c[i>>2]|0)+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2]|0;c[ya>>2]=m+-1;if((m|0)<=(c[ca>>2]|0))break;c[F>>2]=(c[(c[G>>2]|0)+(c[ya>>2]<<2)>>2]|0)+((N(c[E>>2]|0,c[(c[H>>2]|0)+(c[ya>>2]<<2)>>2]|0)|0)>>6);if(!(c[I>>2]|0?1:(c[F>>2]|0)>=(c[(c[V>>2]|0)+(c[ya>>2]<<2)>>2]|0))){if((c[F>>2]|0)<(c[L>>2]|0))continue;c[$>>2]=(c[$>>2]|0)+(c[L>>2]|0);continue}c[I>>2]=1;if((c[F>>2]|0)<(c[(c[na>>2]|0)+(c[ya>>2]<<2)>>2]|0))w=c[F>>2]|0;else w=c[(c[na>>2]|0)+(c[ya>>2]<<2)>>2]|0;c[$>>2]=(c[$>>2]|0)+w}w=c[E>>2]|0;if((c[$>>2]|0)>(c[aa>>2]|0))c[C>>2]=w;else c[J>>2]=w;c[D>>2]=(c[D>>2]|0)+1}c[$>>2]=0;c[I>>2]=0;c[ya>>2]=c[sa>>2];while(1){F=c[ya>>2]|0;c[ya>>2]=F+-1;if((F|0)<=(c[ca>>2]|0))break;c[K>>2]=(c[(c[G>>2]|0)+(c[ya>>2]<<2)>>2]|0)+((N(c[J>>2]|0,c[(c[H>>2]|0)+(c[ya>>2]<<2)>>2]|0)|0)>>6);do if(!(c[I>>2]|0?1:(c[K>>2]|0)>=(c[(c[V>>2]|0)+(c[ya>>2]<<2)>>2]|0)))if((c[K>>2]|0)>=(c[L>>2]|0)){c[K>>2]=c[L>>2];break}else{c[K>>2]=0;break}else c[I>>2]=1;while(0);if((c[K>>2]|0)<(c[(c[na>>2]|0)+(c[ya>>2]<<2)>>2]|0))w=c[K>>2]|0;else w=c[(c[na>>2]|0)+(c[ya>>2]<<2)>>2]|0;c[K>>2]=w;c[(c[ma>>2]|0)+(c[ya>>2]<<2)>>2]=c[K>>2];c[$>>2]=(c[$>>2]|0)+(c[K>>2]|0)}c[oa>>2]=c[sa>>2];while(1){c[ya>>2]=(c[oa>>2]|0)-1;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b=b|0;d=+d;e=e|0;var f=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;k=l;l=l+48|0;m=k+32|0;f=k+28|0;n=k+24|0;i=k+16|0;p=k+12|0;h=k+8|0;o=k+4|0;j=k;c[m>>2]=a;c[f>>2]=b;g[n>>2]=d;c[k+20>>2]=e;g[p>>2]=+dd(c[m>>2]|0,c[m>>2]|0,c[f>>2]|0)+1.0000000036274937e-15;g[o>>2]=+g[p>>2];d=1.0/+B(+(+g[o>>2]));g[h>>2]=d*+g[n>>2];c[j>>2]=c[m>>2];c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[f>>2]|0))break;g[c[j>>2]>>2]=+g[h>>2]*+g[c[j>>2]>>2];c[j>>2]=(c[j>>2]|0)+4;c[i>>2]=(c[i>>2]|0)+1}l=k;return}function dd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;i=m+16|0;k=m+12|0;f=m+8|0;h=m+4|0;j=m;c[i>>2]=a;c[k>>2]=b;c[f>>2]=d;g[j>>2]=0.0;c[h>>2]=0;while(1){e=+g[j>>2];if((c[h>>2]|0)>=(c[f>>2]|0))break;g[j>>2]=e+ +g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]*+g[(c[k>>2]|0)+(c[h>>2]<<2)>>2];c[h>>2]=(c[h>>2]|0)+1}l=m;return +e}function ed(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0.0;t=l;l=l+64|0;k=t+48|0;m=t+44|0;u=t+40|0;j=t+36|0;n=t+28|0;o=t+24|0;q=t+20|0;s=t+16|0;h=t+12|0;i=t+8|0;p=t+4|0;r=t;c[k>>2]=a;c[m>>2]=b;c[u>>2]=d;c[j>>2]=e;c[t+32>>2]=f;g[i>>2]=1.0000000036274937e-15;g[h>>2]=1.0000000036274937e-15;a:do if(c[u>>2]|0){c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[j>>2]|0))break a;g[p>>2]=+g[(c[k>>2]|0)+(c[n>>2]<<2)>>2]+ +g[(c[m>>2]|0)+(c[n>>2]<<2)>>2];g[r>>2]=+g[(c[k>>2]|0)+(c[n>>2]<<2)>>2]-+g[(c[m>>2]|0)+(c[n>>2]<<2)>>2];g[h>>2]=+g[h>>2]+ +g[p>>2]*+g[p>>2];g[i>>2]=+g[i>>2]+ +g[r>>2]*+g[r>>2];c[n>>2]=(c[n>>2]|0)+1}}else{v=+dd(c[k>>2]|0,c[k>>2]|0,c[j>>2]|0);g[h>>2]=+g[h>>2]+v;v=+dd(c[m>>2]|0,c[m>>2]|0,c[j>>2]|0);g[i>>2]=+g[i>>2]+v}while(0);g[q>>2]=+B(+(+g[h>>2]));g[s>>2]=+B(+(+g[i>>2]));c[o>>2]=~~+z(+(+J(+(+g[s>>2]),+(+g[q>>2]))*10430.3818359375+.5));l=t;return c[o>>2]|0}function fd(a){a=a|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+12|0;f=h+8|0;e=h+4|0;d=h;c[g>>2]=a;c[e>>2]=32767/((c[(c[g>>2]|0)+2340>>2]|0)+1|0)|0;c[d>>2]=0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[g>>2]|0)+2340>>2]|0))break;c[d>>2]=(c[d>>2]|0)+(c[e>>2]|0);b[(c[g>>2]|0)+2772+1280+(c[f>>2]<<1)>>1]=c[d>>2];c[f>>2]=(c[f>>2]|0)+1}c[(c[g>>2]|0)+2772+1376>>2]=0;c[(c[g>>2]|0)+2772+1380>>2]=3176576;l=h;return}function gd(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+80|0;q=t+40|0;h=t+36|0;m=t+32|0;o=t+28|0;n=t+24|0;i=t+20|0;s=t+16|0;g=t+12|0;j=t+8|0;k=t+48|0;p=t+4|0;r=t;c[q>>2]=a;c[h>>2]=d;c[m>>2]=e;c[o>>2]=f;c[p>>2]=(c[q>>2]|0)+2772;if((c[(c[q>>2]|0)+2316>>2]|0)!=(c[(c[p>>2]|0)+1384>>2]|0)){fd(c[q>>2]|0);c[(c[p>>2]|0)+1384>>2]=c[(c[q>>2]|0)+2316>>2]}a:do if((c[(c[q>>2]|0)+4160>>2]|0)==0?(c[(c[q>>2]|0)+4164>>2]|0)==0:0){c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[(c[q>>2]|0)+2340>>2]|0))break;d=(c[p>>2]|0)+1280+(c[n>>2]<<1)|0;b[d>>1]=(b[d>>1]|0)+((((b[(c[q>>2]|0)+2344+(c[n>>2]<<1)>>1]|0)-(b[(c[p>>2]|0)+1280+(c[n>>2]<<1)>>1]|0)>>16)*16348|0)+(((b[(c[q>>2]|0)+2344+(c[n>>2]<<1)>>1]|0)-(b[(c[p>>2]|0)+1280+(c[n>>2]<<1)>>1]|0)&65535)*16348>>16));c[n>>2]=(c[n>>2]|0)+1}c[g>>2]=0;c[i>>2]=0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[(c[q>>2]|0)+2324>>2]|0))break;if((c[(c[h>>2]|0)+16+(c[n>>2]<<2)>>2]|0)>(c[g>>2]|0)){c[g>>2]=c[(c[h>>2]|0)+16+(c[n>>2]<<2)>>2];c[i>>2]=c[n>>2]}c[n>>2]=(c[n>>2]|0)+1}$i((c[p>>2]|0)+(c[(c[q>>2]|0)+2332>>2]<<2)|0,c[p>>2]|0,(N((c[(c[q>>2]|0)+2324>>2]|0)-1|0,c[(c[q>>2]|0)+2332>>2]|0)|0)<<2|0)|0;i=(c[q>>2]|0)+4+((N(c[i>>2]|0,c[(c[q>>2]|0)+2332>>2]|0)|0)<<2)|0;_i(c[p>>2]|0,i|0,c[(c[q>>2]|0)+2332>>2]<<2|0)|0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[(c[q>>2]|0)+2324>>2]|0))break a;i=(c[p>>2]|0)+1376|0;c[i>>2]=(c[i>>2]|0)+((((c[(c[h>>2]|0)+16+(c[n>>2]<<2)>>2]|0)-(c[(c[p>>2]|0)+1376>>2]|0)>>16)*4634|0)+(((c[(c[h>>2]|0)+16+(c[n>>2]<<2)>>2]|0)-(c[(c[p>>2]|0)+1376>>2]|0)&65535)*4634>>16));c[n>>2]=(c[n>>2]|0)+1}}while(0);if(!(c[(c[q>>2]|0)+4160>>2]|0)){aj((c[p>>2]|0)+1312|0,0,c[(c[q>>2]|0)+2340>>2]<<2|0)|0;l=t;return}i=(c[o>>2]|0)+16|0;c[r>>2]=$()|0;a=l;l=l+((1*(i<<2)|0)+15&-16)|0;i=N(b[(c[q>>2]|0)+4168+56>>1]>>16,(c[(c[q>>2]|0)+4168+72+4>>2]&65535)<<16>>16)|0;i=i+((N(b[(c[q>>2]|0)+4168+56>>1]&65535,(c[(c[q>>2]|0)+4168+72+4>>2]&65535)<<16>>16)|0)>>16)|0;c[j>>2]=i+(N(b[(c[q>>2]|0)+4168+56>>1]|0,(c[(c[q>>2]|0)+4168+72+4>>2]>>15)+1>>1)|0);if((c[j>>2]|0)<2097152?(c[(c[p>>2]|0)+1376>>2]|0)<=8388608:0){i=N(c[j>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;i=i+((N(c[j>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16)|0;c[j>>2]=i+(N(c[j>>2]|0,(c[j>>2]>>15)+1>>1)|0);i=N(c[(c[p>>2]|0)+1376>>2]>>16,(c[(c[p>>2]|0)+1376>>2]&65535)<<16>>16)|0;i=i+((N(c[(c[p>>2]|0)+1376>>2]&65535,(c[(c[p>>2]|0)+1376>>2]&65535)<<16>>16)|0)>>16)|0;i=i+(N(c[(c[p>>2]|0)+1376>>2]|0,(c[(c[p>>2]|0)+1376>>2]>>15)+1>>1)|0)|0;c[j>>2]=i-(c[j>>2]<<5);c[j>>2]=(hd(c[j>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[k+8>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-6<<2)>>2]>>16,b[k+10>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-6<<2)>>2]&65535,b[k+10>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-7<<2)>>2]>>16,b[k+12>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-7<<2)>>2]&65535,b[k+12>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-8<<2)>>2]>>16,b[k+14>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-8<<2)>>2]&65535,b[k+14>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-9<<2)>>2]>>16,b[k+16>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-9<<2)>>2]&65535,b[k+16>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-10<<2)>>2]>>16,b[k+18>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-10<<2)>>2]&65535,b[k+18>>1]|0)|0)>>16));if((c[(c[q>>2]|0)+2340>>2]|0)==16){j=N(c[a+(16+(c[n>>2]|0)-11<<2)>>2]>>16,b[k+20>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-11<<2)>>2]&65535,b[k+20>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-12<<2)>>2]>>16,b[k+22>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-12<<2)>>2]&65535,b[k+22>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-13<<2)>>2]>>16,b[k+24>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-13<<2)>>2]&65535,b[k+24>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-14<<2)>>2]>>16,b[k+26>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-14<<2)>>2]&65535,b[k+26>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-15<<2)>>2]>>16,b[k+28>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-15<<2)>>2]&65535,b[k+28>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-16<<2)>>2]>>16,b[k+30>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-16<<2)>>2]&65535,b[k+30>>1]|0)|0)>>16))}c[a+(16+(c[n>>2]|0)<<2)>>2]=(c[a+(16+(c[n>>2]|0)<<2)>>2]|0)+(c[s>>2]<<4);if(((b[(c[m>>2]|0)+(c[n>>2]<<1)>>1]|0)+((c[a+(16+(c[n>>2]|0)<<2)>>2]>>9)+1>>1)|0)<=32767)if(((b[(c[m>>2]|0)+(c[n>>2]<<1)>>1]|0)+((c[a+(16+(c[n>>2]|0)<<2)>>2]>>9)+1>>1)|0)<-32768)e=-32768;else e=(b[(c[m>>2]|0)+(c[n>>2]<<1)>>1]|0)+((c[a+(16+(c[n>>2]|0)<<2)>>2]>>9)+1>>1)|0;else e=32767;b[(c[m>>2]|0)+(c[n>>2]<<1)>>1]=e;c[n>>2]=(c[n>>2]|0)+1}e=(c[p>>2]|0)+1312|0;f=a+(c[o>>2]<<2)|0;g=e+64|0;do{c[e>>2]=c[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));_(c[r>>2]|0);l=t;return}function hd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}jd(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function id(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;h=q+32|0;i=q+28|0;g=q+24|0;n=q+20|0;o=q+16|0;p=q+12|0;k=q+8|0;m=q+4|0;j=q;c[h>>2]=a;c[i>>2]=b;c[g>>2]=d;c[n>>2]=e;c[o>>2]=f;c[j>>2]=255;while(1){if((c[j>>2]|0)<=(c[n>>2]|0))break;c[j>>2]=c[j>>2]>>1}c[p>>2]=c[c[o>>2]>>2];c[k>>2]=0;while(1){d=c[p>>2]|0;if((c[k>>2]|0)>=(c[n>>2]|0))break;c[p>>2]=907633515+(N(d,196314165)|0);c[m>>2]=c[p>>2]>>24&c[j>>2];f=N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]>>16,(c[g>>2]>>4&65535)<<16>>16)|0;f=f+((N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]&65535,(c[g>>2]>>4&65535)<<16>>16)|0)>>16)|0;if((f+(N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]|0,(c[g>>2]>>4>>15)+1>>1)|0)|0)<=32767){f=N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]>>16,(c[g>>2]>>4&65535)<<16>>16)|0;f=f+((N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]&65535,(c[g>>2]>>4&65535)<<16>>16)|0)>>16)|0;if((f+(N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]|0,(c[g>>2]>>4>>15)+1>>1)|0)|0)<-32768)d=-32768;else{d=N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]>>16,(c[g>>2]>>4&65535)<<16>>16)|0;d=d+((N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]&65535,(c[g>>2]>>4&65535)<<16>>16)|0)>>16)|0;d=d+(N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]|0,(c[g>>2]>>4>>15)+1>>1)|0)|0}}else d=32767;c[(c[h>>2]|0)+(c[k>>2]<<2)>>2]=(d&65535)<<16>>16;c[k>>2]=(c[k>>2]|0)+1}c[c[o>>2]>>2]=d;l=q;return}function jd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=kd(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(ld(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function kd(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function ld(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function md(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;s=l;l=l+48|0;p=s+40|0;v=s+36|0;n=s+32|0;t=s+28|0;u=s+24|0;r=s+20|0;i=s+16|0;m=s+12|0;o=s+8|0;j=s+44|0;q=s+4|0;k=s;c[p>>2]=b;c[v>>2]=d;c[n>>2]=e;c[t>>2]=f;c[u>>2]=g;c[r>>2]=h;a[j+1>>0]=0;c[q>>2]=c[v>>2];c[i>>2]=(((c[u>>2]|0)+(c[t>>2]<<1)&65535)<<16>>16)*7;c[k>>2]=30180+(c[i>>2]|0);c[n>>2]=(c[n>>2]|0)+8>>4;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[n>>2]|0))break;c[o>>2]=c[(c[r>>2]|0)+(c[i>>2]<<2)>>2];a:do if((c[o>>2]|0)>0){a[j>>0]=a[(c[k>>2]|0)+((c[o>>2]&31|0)<6?c[o>>2]&31:6)>>0]|0;c[m>>2]=0;while(1){if((c[m>>2]|0)>=16)break a;if(a[(c[q>>2]|0)+(c[m>>2]|0)>>0]|0)$b(c[p>>2]|0,(a[(c[q>>2]|0)+(c[m>>2]|0)>>0]>>15)+1|0,j,8);c[m>>2]=(c[m>>2]|0)+1}}while(0);c[q>>2]=(c[q>>2]|0)+16;c[i>>2]=(c[i>>2]|0)+1}l=s;return}function nd(d,e,f,g,h,i){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;t=l;l=l+48|0;q=t+40|0;w=t+36|0;o=t+32|0;u=t+28|0;v=t+24|0;s=t+20|0;j=t+16|0;n=t+12|0;p=t+8|0;k=t+44|0;r=t+4|0;m=t;c[q>>2]=d;c[w>>2]=e;c[o>>2]=f;c[u>>2]=g;c[v>>2]=h;c[s>>2]=i;a[k+1>>0]=0;c[r>>2]=c[w>>2];c[j>>2]=(((c[v>>2]|0)+(c[u>>2]<<1)&65535)<<16>>16)*7;c[m>>2]=30180+(c[j>>2]|0);c[o>>2]=(c[o>>2]|0)+8>>4;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[o>>2]|0))break;c[p>>2]=c[(c[s>>2]|0)+(c[j>>2]<<2)>>2];a:do if((c[p>>2]|0)>0){a[k>>0]=a[(c[m>>2]|0)+((c[p>>2]&31|0)<6?c[p>>2]&31:6)>>0]|0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=16)break a;if((b[(c[r>>2]|0)+(c[n>>2]<<1)>>1]|0)>0){v=((Pb(c[q>>2]|0,k,8)|0)<<1)-1|0;w=(c[r>>2]|0)+(c[n>>2]<<1)|0;b[w>>1]=N(b[w>>1]|0,v)|0}c[n>>2]=(c[n>>2]|0)+1}}while(0);c[r>>2]=(c[r>>2]|0)+32;c[j>>2]=(c[j>>2]|0)+1}l=t;return}function od(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;aj(c[d>>2]|0,0,4260)|0;c[(c[d>>2]|0)+2376>>2]=1;c[c[d>>2]>>2]=65536;fd(c[d>>2]|0);ie(c[d>>2]|0);l=b;return 0}function pd(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=l;l=l+144|0;E=M+100|0;F=M+96|0;L=M+92|0;m=M+88|0;v=M+84|0;x=M+80|0;z=M+76|0;A=M+72|0;K=M+68|0;H=M+64|0;u=M+60|0;J=M+56|0;o=M+52|0;q=M+48|0;G=M+44|0;p=M+104|0;t=M+40|0;s=M+36|0;r=M+32|0;y=M+28|0;w=M+24|0;n=M+20|0;k=M+16|0;C=M+12|0;B=M+8|0;D=M+4|0;I=M;c[E>>2]=d;c[F>>2]=e;c[L>>2]=f;c[m>>2]=g;c[v>>2]=h;c[A>>2]=0;f=c[(c[E>>2]|0)+2336>>2]|0;c[I>>2]=$()|0;g=l;l=l+((1*(f<<1)|0)+15&-16)|0;f=l;l=l+((1*((c[(c[E>>2]|0)+2336>>2]|0)+(c[(c[E>>2]|0)+2328>>2]|0)<<2)|0)+15&-16)|0;i=l;l=l+((1*(c[(c[E>>2]|0)+2332>>2]<<2)|0)+15&-16)|0;j=l;l=l+((1*((c[(c[E>>2]|0)+2332>>2]|0)+16<<2)|0)+15&-16)|0;c[k>>2]=b[24558+(a[(c[E>>2]|0)+2736+29>>0]>>1<<2)+(a[(c[E>>2]|0)+2736+30>>0]<<1)>>1];if((a[(c[E>>2]|0)+2736+31>>0]|0)<4)c[u>>2]=1;else c[u>>2]=0;c[n>>2]=a[(c[E>>2]|0)+2736+34>>0];c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[(c[E>>2]|0)+2328>>2]|0))break;c[n>>2]=907633515+(N(c[n>>2]|0,196314165)|0);c[(c[E>>2]|0)+4+(c[x>>2]<<2)>>2]=b[(c[m>>2]|0)+(c[x>>2]<<1)>>1]<<14;d=(c[E>>2]|0)+4+(c[x>>2]<<2)|0;h=c[d>>2]|0;if((c[(c[E>>2]|0)+4+(c[x>>2]<<2)>>2]|0)<=0){if((h|0)<0){e=(c[E>>2]|0)+4+(c[x>>2]<<2)|0;c[e>>2]=(c[e>>2]|0)+1280}}else c[d>>2]=h-1280;e=(c[E>>2]|0)+4+(c[x>>2]<<2)|0;c[e>>2]=(c[e>>2]|0)+(c[k>>2]<<4);if((c[n>>2]|0)<0)c[(c[E>>2]|0)+4+(c[x>>2]<<2)>>2]=0-(c[(c[E>>2]|0)+4+(c[x>>2]<<2)>>2]|0);c[n>>2]=(c[n>>2]|0)+(b[(c[m>>2]|0)+(c[x>>2]<<1)>>1]|0);c[x>>2]=(c[x>>2]|0)+1}h=j;d=(c[E>>2]|0)+1284|0;e=h+64|0;do{c[h>>2]=c[d>>2];h=h+4|0;d=d+4|0}while((h|0)<(e|0));c[B>>2]=(c[E>>2]|0)+4;c[G>>2]=c[L>>2];c[H>>2]=c[(c[E>>2]|0)+2336>>2];c[z>>2]=0;while(1){if((c[z>>2]|0)>=(c[(c[E>>2]|0)+2324>>2]|0))break;c[D>>2]=i;c[o>>2]=(c[F>>2]|0)+32+(c[z>>2]>>1<<5);_i(p|0,c[o>>2]|0,c[(c[E>>2]|0)+2340>>2]<<1|0)|0;c[q>>2]=(c[F>>2]|0)+96+((c[z>>2]|0)*5<<1);c[J>>2]=a[(c[E>>2]|0)+2736+29>>0];c[r>>2]=c[(c[F>>2]|0)+16+(c[z>>2]<<2)>>2]>>6;c[y>>2]=qd(c[(c[F>>2]|0)+16+(c[z>>2]<<2)>>2]|0,47)|0;a:do if((c[(c[F>>2]|0)+16+(c[z>>2]<<2)>>2]|0)!=(c[c[E>>2]>>2]|0)){c[w>>2]=rd(c[c[E>>2]>>2]|0,c[(c[F>>2]|0)+16+(c[z>>2]<<2)>>2]|0,16)|0;c[x>>2]=0;while(1){if((c[x>>2]|0)>=16)break a;n=N(c[w>>2]>>16,(c[j+(c[x>>2]<<2)>>2]&65535)<<16>>16)|0;n=n+((N(c[w>>2]&65535,(c[j+(c[x>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;n=n+(N(c[w>>2]|0,(c[j+(c[x>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[j+(c[x>>2]<<2)>>2]=n;c[x>>2]=(c[x>>2]|0)+1}}else c[w>>2]=65536;while(0);c[c[E>>2]>>2]=c[(c[F>>2]|0)+16+(c[z>>2]<<2)>>2];if((c[(c[E>>2]|0)+4160>>2]|0?(c[(c[E>>2]|0)+4164>>2]|0)==2:0)?((c[z>>2]|0)<2?(a[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|0)+136>>2]&65535)<<16>>16)|0;c[y>>2]=n+((N(c[y>>2]&65535,(c[(c[F>>2]|0)+136>>2]&65535)<<16>>16)|0)>>16)<<2}c[x>>2]=0;while(1){if((c[x>>2]|0)>=((c[A>>2]|0)+2|0))break b;n=N(c[y>>2]>>16,b[g+((c[(c[E>>2]|0)+2336>>2]|0)-(c[x>>2]|0)-1<<1)>>1]|0)|0;n=n+((N(c[y>>2]&65535,b[g+((c[(c[E>>2]|0)+2336>>2]|0)-(c[x>>2]|0)-1<<1)>>1]|0)|0)>>16)|0;c[f+((c[H>>2]|0)-(c[x>>2]|0)-1<<2)>>2]=n;c[x>>2]=(c[x>>2]|0)+1}}while(0);c:do if((c[J>>2]|0)==2){c[C>>2]=f+((c[H>>2]|0)-(c[A>>2]|0)+2<<2);c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[(c[E>>2]|0)+2332>>2]|0))break c;c[t>>2]=2;n=N(c[c[C>>2]>>2]>>16,b[c[q>>2]>>1]|0)|0;c[t>>2]=(c[t>>2]|0)+(n+((N(c[c[C>>2]>>2]&65535,b[c[q>>2]>>1]|0)|0)>>16));n=N(c[(c[C>>2]|0)+-4>>2]>>16,b[(c[q>>2]|0)+2>>1]|0)|0;c[t>>2]=(c[t>>2]|0)+(n+((N(c[(c[C>>2]|0)+-4>>2]&65535,b[(c[q>>2]|0)+2>>1]|0)|0)>>16));n=N(c[(c[C>>2]|0)+-8>>2]>>16,b[(c[q>>2]|0)+4>>1]|0)|0;c[t>>2]=(c[t>>2]|0)+(n+((N(c[(c[C>>2]|0)+-8>>2]&65535,b[(c[q>>2]|0)+4>>1]|0)|0)>>16));n=N(c[(c[C>>2]|0)+-12>>2]>>16,b[(c[q>>2]|0)+6>>1]|0)|0;c[t>>2]=(c[t>>2]|0)+(n+((N(c[(c[C>>2]|0)+-12>>2]&65535,b[(c[q>>2]|0)+6>>1]|0)|0)>>16));n=N(c[(c[C>>2]|0)+-16>>2]>>16,b[(c[q>>2]|0)+8>>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)>>16));n=N(c[j+(16+(c[x>>2]|0)-6<<2)>>2]>>16,b[p+10>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-6<<2)>>2]&65535,b[p+10>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-7<<2)>>2]>>16,b[p+12>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-7<<2)>>2]&65535,b[p+12>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-8<<2)>>2]>>16,b[p+14>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-8<<2)>>2]&65535,b[p+14>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-9<<2)>>2]>>16,b[p+16>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-9<<2)>>2]&65535,b[p+16>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-10<<2)>>2]>>16,b[p+18>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-10<<2)>>2]&65535,b[p+18>>1]|0)|0)>>16));if((c[(c[E>>2]|0)+2340>>2]|0)==16){n=N(c[j+(16+(c[x>>2]|0)-11<<2)>>2]>>16,b[p+20>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-11<<2)>>2]&65535,b[p+20>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-12<<2)>>2]>>16,b[p+22>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-12<<2)>>2]&65535,b[p+22>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-13<<2)>>2]>>16,b[p+24>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-13<<2)>>2]&65535,b[p+24>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-14<<2)>>2]>>16,b[p+26>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-14<<2)>>2]&65535,b[p+26>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-15<<2)>>2]>>16,b[p+28>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-15<<2)>>2]&65535,b[p+28>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-16<<2)>>2]>>16,b[p+30>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-16<<2)>>2]&65535,b[p+30>>1]|0)|0)>>16))}c[j+(16+(c[x>>2]|0)<<2)>>2]=(c[(c[D>>2]|0)+(c[x>>2]<<2)>>2]|0)+(c[s>>2]<<4);n=N(c[j+(16+(c[x>>2]|0)<<2)>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;n=n+((N(c[j+(16+(c[x>>2]|0)<<2)>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16)|0;if(((n+(N(c[j+(16+(c[x>>2]|0)<<2)>>2]|0,(c[r>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){n=N(c[j+(16+(c[x>>2]|0)<<2)>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;n=n+((N(c[j+(16+(c[x>>2]|0)<<2)>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16)|0;if(((n+(N(c[j+(16+(c[x>>2]|0)<<2)>>2]|0,(c[r>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)h=-32768;else{h=N(c[j+(16+(c[x>>2]|0)<<2)>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;h=h+((N(c[j+(16+(c[x>>2]|0)<<2)>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16)|0;h=(h+(N(c[j+(16+(c[x>>2]|0)<<2)>>2]|0,(c[r>>2]>>15)+1>>1)|0)>>7)+1>>1}}else h=32767;b[(c[G>>2]|0)+(c[x>>2]<<1)>>1]=h;c[x>>2]=(c[x>>2]|0)+1}h=j;d=j+(c[(c[E>>2]|0)+2332>>2]<<2)|0;e=h+64|0;do{c[h>>2]=c[d>>2];h=h+4|0;d=d+4|0}while((h|0)<(e|0));c[B>>2]=(c[B>>2]|0)+(c[(c[E>>2]|0)+2332>>2]<<2);c[G>>2]=(c[G>>2]|0)+(c[(c[E>>2]|0)+2332>>2]<<1);c[z>>2]=(c[z>>2]|0)+1}h=(c[E>>2]|0)+1284|0;d=j;e=h+64|0;do{c[h>>2]=c[d>>2];h=h+4|0;d=d+4|0}while((h|0)<(e|0));_(c[I>>2]|0);l=M;return}function qd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+48|0;g=h+32|0;n=h+28|0;d=h+24|0;i=h+20|0;f=h+16|0;j=h+12|0;m=h+8|0;k=h+4|0;e=h;c[n>>2]=a;c[d>>2]=b;b=c[n>>2]|0;c[i>>2]=(sd((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[j>>2]=536870911/(c[m>>2]>>16|0)|0;c[e>>2]=c[j>>2]<<16;b=N(c[m>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;c[k>>2]=536870912-(b+((N(c[m>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))<<3;b=N(c[k>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;b=(c[e>>2]|0)+(b+((N(c[k>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))|0;c[e>>2]=b+(N(c[k>>2]|0,(c[j>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[i>>2]|0)-(c[d>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0)if((b|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];n=c[g>>2]|0;l=h;return n|0}else{c[g>>2]=0;n=c[g>>2]|0;l=h;return n|0}a=c[e>>2]|0;d=0-(c[f>>2]|0)|0;do if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>d|0)){b=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){b=2147483647>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){b=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){b=-2147483648>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}while(0);c[g>>2]=b<<0-(c[f>>2]|0);n=c[g>>2]|0;l=h;return n|0}function rd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;h=l;l=l+48|0;g=h+40|0;q=h+36|0;p=h+32|0;i=h+28|0;k=h+24|0;j=h+20|0;f=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;e=h;c[q>>2]=a;c[p>>2]=b;c[i>>2]=d;b=c[q>>2]|0;c[k>>2]=(sd((c[q>>2]|0)>0?b:0-b|0)|0)-1;c[n>>2]=c[q>>2]<>2];b=c[p>>2]|0;c[j>>2]=(sd((c[p>>2]|0)>0?b:0-b|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;b=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=b+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);b=c[n>>2]|0;a=c[o>>2]|0;d=c[e>>2]|0;d=Xi(a|0,((a|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;d=Yi(d|0,y|0,32)|0;c[n>>2]=b-(d<<3);d=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(d+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[k>>2]|0)-(c[j>>2]|0)-(c[i>>2]|0);d=c[f>>2]|0;if((c[f>>2]|0)>=0)if((d|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];q=c[g>>2]|0;l=h;return q|0}else{c[g>>2]=0;q=c[g>>2]|0;l=h;return q|0}a=c[e>>2]|0;b=0-(c[f>>2]|0)|0;do if((-2147483648>>0-d|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>b|0)){d=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){d=2147483647>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>b|0)){d=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){d=-2147483648>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}while(0);c[g>>2]=d<<0-(c[f>>2]|0);q=c[g>>2]|0;l=h;return q|0}function sd(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function td(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+192|0;r=x+180|0;t=x+176|0;q=x+172|0;p=x+168|0;n=x+164|0;m=x+160|0;k=x+156|0;j=x+152|0;o=x+148|0;u=x+144|0;s=x+4|0;v=x;c[r>>2]=b;c[t>>2]=d;c[q>>2]=e;c[p>>2]=f;c[n>>2]=g;c[m>>2]=h;c[k>>2]=i;c[u>>2]=0;c[j>>2]=c[(c[r>>2]|0)+2328>>2];c[s+136>>2]=0;do if(!(c[n>>2]|0))w=4;else{if((c[n>>2]|0)==2?(c[(c[r>>2]|0)+2420+(c[(c[r>>2]|0)+2388>>2]<<2)>>2]|0)==1:0){w=4;break}je(c[r>>2]|0,s,c[q>>2]|0,1,c[k>>2]|0)}while(0);if((w|0)==4){d=(c[j>>2]|0)+16-1&-16;c[v>>2]=$()|0;w=l;l=l+((1*(d<<1)|0)+15&-16)|0;vd(c[r>>2]|0,c[t>>2]|0,c[(c[r>>2]|0)+2388>>2]|0,c[n>>2]|0,c[m>>2]|0);wd(c[t>>2]|0,w,a[(c[r>>2]|0)+2736+29>>0]|0,a[(c[r>>2]|0)+2736+30>>0]|0,c[(c[r>>2]|0)+2328>>2]|0);ud(c[r>>2]|0,s,c[m>>2]|0);pd(c[r>>2]|0,s,c[q>>2]|0,w,c[k>>2]|0);je(c[r>>2]|0,s,c[q>>2]|0,0,c[k>>2]|0);c[(c[r>>2]|0)+4160>>2]=0;c[(c[r>>2]|0)+4164>>2]=a[(c[r>>2]|0)+2736+29>>0];c[(c[r>>2]|0)+2376>>2]=0;_(c[v>>2]|0)}c[o>>2]=(c[(c[r>>2]|0)+2336>>2]|0)-(c[(c[r>>2]|0)+2328>>2]|0);$i((c[r>>2]|0)+1348|0,(c[r>>2]|0)+1348+(c[(c[r>>2]|0)+2328>>2]<<1)|0,c[o>>2]<<1|0)|0;_i((c[r>>2]|0)+1348+(c[o>>2]<<1)|0,c[q>>2]|0,c[(c[r>>2]|0)+2328>>2]<<1|0)|0;gd(c[r>>2]|0,s,c[q>>2]|0,c[j>>2]|0);ue(c[r>>2]|0,c[q>>2]|0,c[j>>2]|0);c[(c[r>>2]|0)+2308>>2]=c[s+((c[(c[r>>2]|0)+2324>>2]|0)-1<<2)>>2];c[c[p>>2]>>2]=c[j>>2];l=x;return c[u>>2]|0}function ud(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+96|0;n=p+24|0;o=p+20|0;q=p+16|0;k=p+12|0;m=p+8|0;i=p+4|0;h=p+64|0;g=p+32|0;j=p;c[n>>2]=d;c[o>>2]=e;c[q>>2]=f;Ld((c[o>>2]|0)+16|0,(c[n>>2]|0)+2736|0,(c[n>>2]|0)+2312|0,(c[q>>2]|0)==2&1,c[(c[n>>2]|0)+2324>>2]|0);Rd(h,(c[n>>2]|0)+2736+8|0,c[(c[n>>2]|0)+2732>>2]|0);Lf((c[o>>2]|0)+32+32|0,h,c[(c[n>>2]|0)+2340>>2]|0);if((c[(c[n>>2]|0)+2376>>2]|0)==1)a[(c[n>>2]|0)+2736+31>>0]=4;if((a[(c[n>>2]|0)+2736+31>>0]|0)<4){c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[(c[n>>2]|0)+2340>>2]|0))break;q=(b[(c[n>>2]|0)+2344+(c[k>>2]<<1)>>1]|0)+((N(a[(c[n>>2]|0)+2736+31>>0]|0,(b[h+(c[k>>2]<<1)>>1]|0)-(b[(c[n>>2]|0)+2344+(c[k>>2]<<1)>>1]|0)|0)|0)>>2)&65535;b[g+(c[k>>2]<<1)>>1]=q;c[k>>2]=(c[k>>2]|0)+1}Lf((c[o>>2]|0)+32|0,g,c[(c[n>>2]|0)+2340>>2]|0)}else _i((c[o>>2]|0)+32|0,(c[o>>2]|0)+32+32|0,c[(c[n>>2]|0)+2340>>2]<<1|0)|0;_i((c[n>>2]|0)+2344|0,h|0,c[(c[n>>2]|0)+2340>>2]<<1|0)|0;if(c[(c[n>>2]|0)+4160>>2]|0){yf((c[o>>2]|0)+32|0,c[(c[n>>2]|0)+2340>>2]|0,63570);yf((c[o>>2]|0)+32+32|0,c[(c[n>>2]|0)+2340>>2]|0,63570)}if((a[(c[n>>2]|0)+2736+29>>0]|0)!=2){aj(c[o>>2]|0,0,c[(c[n>>2]|0)+2324>>2]<<2|0)|0;aj((c[o>>2]|0)+96|0,0,(c[(c[n>>2]|0)+2324>>2]|0)*5<<1|0)|0;a[(c[n>>2]|0)+2736+32>>0]=0;n=0;q=c[o>>2]|0;q=q+136|0;c[q>>2]=n;l=p;return}zf(b[(c[n>>2]|0)+2736+26>>1]|0,a[(c[n>>2]|0)+2736+28>>0]|0,c[o>>2]|0,c[(c[n>>2]|0)+2316>>2]|0,c[(c[n>>2]|0)+2324>>2]|0);c[j>>2]=c[17644+(a[(c[n>>2]|0)+2736+32>>0]<<2)>>2];c[m>>2]=0;while(1){f=(c[n>>2]|0)+2736|0;if((c[m>>2]|0)>=(c[(c[n>>2]|0)+2324>>2]|0))break;c[i>>2]=a[f+4+(c[m>>2]|0)>>0];c[k>>2]=0;while(1){if((c[k>>2]|0)>=5)break;b[(c[o>>2]|0)+96+(((c[m>>2]|0)*5|0)+(c[k>>2]|0)<<1)>>1]=a[(c[j>>2]|0)+(((c[i>>2]|0)*5|0)+(c[k>>2]|0))>>0]<<7;c[k>>2]=(c[k>>2]|0)+1}c[m>>2]=(c[m>>2]|0)+1}c[i>>2]=a[f+33>>0];n=b[24566+(c[i>>2]<<1)>>1]|0;q=c[o>>2]|0;q=q+136|0;c[q>>2]=n;l=p;return}function vd(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;t=l;l=l+96|0;r=t+36|0;s=t+32|0;u=t+28|0;v=t+24|0;n=t+20|0;k=t+16|0;q=t+12|0;i=t+8|0;o=t+4|0;p=t;j=t+40|0;m=t+72|0;c[r>>2]=d;c[s>>2]=e;c[u>>2]=f;c[v>>2]=g;c[n>>2]=h;if(!(c[v>>2]|0)?!(c[(c[r>>2]|0)+2404+(c[u>>2]<<2)>>2]|0):0)c[i>>2]=Pb(c[s>>2]|0,29020,8)|0;else c[i>>2]=(Pb(c[s>>2]|0,29016,8)|0)+2;a[(c[r>>2]|0)+2736+29>>0]=c[i>>2]>>1;a[(c[r>>2]|0)+2736+30>>0]=c[i>>2]&1;f=c[s>>2]|0;if((c[n>>2]|0)==2){v=(Pb(f,26767,8)|0)&255;a[(c[r>>2]|0)+2736>>0]=v}else{u=(Pb(f,26743+(a[(c[r>>2]|0)+2736+29>>0]<<3)|0,8)|0)<<3&255;a[(c[r>>2]|0)+2736>>0]=u;u=((Pb(c[s>>2]|0,29045,8)|0)&255)<<24>>24;v=(c[r>>2]|0)+2736|0;a[v>>0]=(a[v>>0]|0)+u}c[k>>2]=1;while(1){f=c[s>>2]|0;if((c[k>>2]|0)>=(c[(c[r>>2]|0)+2324>>2]|0))break;v=(Pb(f,26767,8)|0)&255;a[(c[r>>2]|0)+2736+(c[k>>2]|0)>>0]=v;c[k>>2]=(c[k>>2]|0)+1}v=(Pb(f,(c[(c[(c[r>>2]|0)+2732>>2]|0)+12>>2]|0)+(N(a[(c[r>>2]|0)+2736+29>>0]>>1,b[c[(c[r>>2]|0)+2732>>2]>>1]|0)|0)|0,8)|0)&255;a[(c[r>>2]|0)+2736+8>>0]=v;Xe(j,m,c[(c[r>>2]|0)+2732>>2]|0,a[(c[r>>2]|0)+2736+8>>0]|0);c[k>>2]=0;while(1){if((c[k>>2]|0)>=(b[(c[(c[r>>2]|0)+2732>>2]|0)+2>>1]|0))break;c[i>>2]=Pb(c[s>>2]|0,(c[(c[(c[r>>2]|0)+2732>>2]|0)+24>>2]|0)+(b[j+(c[k>>2]<<1)>>1]|0)|0,8)|0;if(c[i>>2]|0){if((c[i>>2]|0)==8){v=Pb(c[s>>2]|0,29053,8)|0;c[i>>2]=(c[i>>2]|0)+v}}else{v=Pb(c[s>>2]|0,29053,8)|0;c[i>>2]=(c[i>>2]|0)-v}a[(c[r>>2]|0)+2736+8+((c[k>>2]|0)+1)>>0]=(c[i>>2]|0)-4;c[k>>2]=(c[k>>2]|0)+1}if((c[(c[r>>2]|0)+2324>>2]|0)==4){f=(Pb(c[s>>2]|0,29022,8)|0)&255;h=c[r>>2]|0}else{f=4;h=c[r>>2]|0}a[h+2736+31>>0]=f;if((a[(c[r>>2]|0)+2736+29>>0]|0)!=2){v=c[r>>2]|0;v=v+2736|0;v=v+29|0;v=a[v>>0]|0;v=v<<24>>24;u=c[r>>2]|0;u=u+2396|0;c[u>>2]=v;u=c[s>>2]|0;u=Pb(u,29030,8)|0;u=u&255;v=c[r>>2]|0;v=v+2736|0;v=v+34|0;a[v>>0]=u;l=t;return}c[o>>2]=1;if(((c[n>>2]|0)==2?(c[(c[r>>2]|0)+2396>>2]|0)==2:0)?(c[p>>2]=((Pb(c[s>>2]|0,29092,8)|0)&65535)<<16>>16,(c[p>>2]|0)>0):0){c[p>>2]=(c[p>>2]|0)-9;b[(c[r>>2]|0)+2736+26>>1]=(b[(c[r>>2]|0)+2400>>1]|0)+(c[p>>2]|0);c[o>>2]=0}if(c[o>>2]|0){u=((Pb(c[s>>2]|0,29060,8)|0)&65535)<<16>>16;u=(N(u,c[(c[r>>2]|0)+2316>>2]>>1)|0)&65535;b[(c[r>>2]|0)+2736+26>>1]=u;u=((Pb(c[s>>2]|0,c[(c[r>>2]|0)+2380>>2]|0,8)|0)&65535)<<16>>16;v=(c[r>>2]|0)+2736+26|0;b[v>>1]=(b[v>>1]|0)+u}b[(c[r>>2]|0)+2400>>1]=b[(c[r>>2]|0)+2736+26>>1]|0;v=(Pb(c[s>>2]|0,c[(c[r>>2]|0)+2384>>2]|0,8)|0)&255;a[(c[r>>2]|0)+2736+28>>0]=v;v=(Pb(c[s>>2]|0,26808,8)|0)&255;a[(c[r>>2]|0)+2736+32>>0]=v;c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[(c[r>>2]|0)+2324>>2]|0))break;v=(Pb(c[s>>2]|0,c[17620+(a[(c[r>>2]|0)+2736+32>>0]<<2)>>2]|0,8)|0)&255;a[(c[r>>2]|0)+2736+4+(c[q>>2]|0)>>0]=v;c[q>>2]=(c[q>>2]|0)+1}if(!(c[n>>2]|0)){f=(Pb(c[s>>2]|0,29013,8)|0)&255;h=c[r>>2]|0}else{f=0;h=c[r>>2]|0}a[h+2736+33>>0]=f;v=c[r>>2]|0;v=v+2736|0;v=v+29|0;v=a[v>>0]|0;v=v<<24>>24;u=c[r>>2]|0;u=u+2396|0;c[u>>2]=v;u=c[s>>2]|0;u=Pb(u,29030,8)|0;u=u&255;v=c[r>>2]|0;v=v+2736|0;v=v+34|0;a[v>>0]=u;l=t;return}function wd(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+224|0;s=y+212|0;t=y+208|0;w=y+204|0;v=y+200|0;k=y+196|0;m=y+192|0;o=y+188|0;p=y+184|0;n=y+180|0;j=y+176|0;q=y+172|0;h=y+168|0;x=y+88|0;r=y+8|0;u=y+4|0;i=y;c[s>>2]=a;c[t>>2]=d;c[w>>2]=e;c[v>>2]=f;c[k>>2]=g;c[h>>2]=Pb(c[s>>2]|0,29519+((c[w>>2]>>1)*9|0)|0,8)|0;c[n>>2]=c[k>>2]>>4;if((c[n>>2]<<4|0)<(c[k>>2]|0))c[n>>2]=(c[n>>2]|0)+1;c[i>>2]=29177+((c[h>>2]|0)*18|0);c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;c[r+(c[m>>2]<<2)>>2]=0;g=Pb(c[s>>2]|0,c[i>>2]|0,8)|0;h=c[m>>2]|0;while(1){c[x+(h<<2)>>2]=g;h=c[m>>2]|0;if((c[x+(c[m>>2]<<2)>>2]|0)!=17)break;g=r+(h<<2)|0;c[g>>2]=(c[g>>2]|0)+1;g=Pb(c[s>>2]|0,29339+((c[r+(c[m>>2]<<2)>>2]|0)==10&1)|0,8)|0;h=c[m>>2]|0}c[m>>2]=h+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;h=(c[t>>2]|0)+((c[m>>2]&65535)<<16>>16<<4<<1)|0;if((c[x+(c[m>>2]<<2)>>2]|0)>0)Be(h,c[s>>2]|0,c[x+(c[m>>2]<<2)>>2]|0);else{g=h+32|0;do{b[h>>1]=0;h=h+2|0}while((h|0)<(g|0))}c[m>>2]=(c[m>>2]|0)+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;if((c[r+(c[m>>2]<<2)>>2]|0)>0){c[q>>2]=c[r+(c[m>>2]<<2)>>2];c[u>>2]=(c[t>>2]|0)+((c[m>>2]&65535)<<16>>16<<4<<1);c[p>>2]=0;while(1){if((c[p>>2]|0)>=16)break;c[j>>2]=b[(c[u>>2]|0)+(c[p>>2]<<1)>>1];c[o>>2]=0;while(1){h=c[j>>2]|0;if((c[o>>2]|0)>=(c[q>>2]|0))break;c[j>>2]=h<<1;i=Pb(c[s>>2]|0,29011,8)|0;c[j>>2]=(c[j>>2]|0)+i;c[o>>2]=(c[o>>2]|0)+1}b[(c[u>>2]|0)+(c[p>>2]<<1)>>1]=h;c[p>>2]=(c[p>>2]|0)+1}i=x+(c[m>>2]<<2)|0;c[i>>2]=c[i>>2]|c[q>>2]<<5}c[m>>2]=(c[m>>2]|0)+1}nd(c[s>>2]|0,c[t>>2]|0,c[k>>2]|0,c[w>>2]|0,c[v>>2]|0,x);l=y;return}function xd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;j=m+16|0;i=m+12|0;f=m+8|0;h=m+4|0;k=m;c[j>>2]=b;c[i>>2]=d;c[f>>2]=e;c[k>>2]=0;c[(c[j>>2]|0)+2332>>2]=((c[i>>2]&65535)<<16>>16)*5;c[h>>2]=N((c[(c[j>>2]|0)+2324>>2]&65535)<<16>>16,(c[(c[j>>2]|0)+2332>>2]&65535)<<16>>16)|0;if(!((c[(c[j>>2]|0)+2316>>2]|0)==(c[i>>2]|0)?(c[(c[j>>2]|0)+2320>>2]|0)==(c[f>>2]|0):0)){b=Tf((c[j>>2]|0)+2432|0,((c[i>>2]&65535)<<16>>16)*1e3|0,c[f>>2]|0,0)|0;c[k>>2]=(c[k>>2]|0)+b;c[(c[j>>2]|0)+2320>>2]=c[f>>2]}if((c[(c[j>>2]|0)+2316>>2]|0)==(c[i>>2]|0)?(c[h>>2]|0)==(c[(c[j>>2]|0)+2328>>2]|0):0){k=c[k>>2]|0;l=m;return k|0}b=(c[(c[j>>2]|0)+2324>>2]|0)==4;c[(c[j>>2]|0)+2384>>2]=(c[i>>2]|0)==8?(b?29147:29170):b?29113:29158;if((c[(c[j>>2]|0)+2316>>2]|0)!=(c[i>>2]|0)){c[(c[j>>2]|0)+2336>>2]=((c[i>>2]&65535)<<16>>16)*20;e=(c[j>>2]|0)+2340|0;if((c[i>>2]|0)==8|(c[i>>2]|0)==12){c[e>>2]=10;e=c[j>>2]|0;f=17668}else{c[e>>2]=16;e=c[j>>2]|0;f=17704}c[e+2732>>2]=f;do if((c[i>>2]|0)!=16){if((c[i>>2]|0)==12){e=29039;f=c[j>>2]|0;g=16;break}if((c[i>>2]|0)==8){e=29030;f=c[j>>2]|0;g=16}}else{e=29045;f=c[j>>2]|0;g=16}while(0);if((g|0)==16)c[f+2380>>2]=e;c[(c[j>>2]|0)+2376>>2]=1;c[(c[j>>2]|0)+2308>>2]=100;a[(c[j>>2]|0)+2312>>0]=10;c[(c[j>>2]|0)+4164>>2]=0;aj((c[j>>2]|0)+1348|0,0,960)|0;e=(c[j>>2]|0)+1284|0;f=e+64|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(f|0))}c[(c[j>>2]|0)+2316>>2]=c[i>>2];c[(c[j>>2]|0)+2328>>2]=c[h>>2];k=c[k>>2]|0;l=m;return k|0}function yd(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=0;c[c[e>>2]>>2]=8544;l=d;return c[b>>2]|0}function zd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+12|0;e=g+8|0;f=g+4|0;b=g;c[d>>2]=a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>>2]|0)){S=od((c[x>>2]|0)+4260|0)|0;c[M>>2]=(c[M>>2]|0)+S}if((c[(c[H>>2]|0)+4>>2]|0)==1?(c[(c[L>>2]|0)+8536>>2]|0)==2:0)k=(c[(c[H>>2]|0)+12>>2]|0)==((c[(c[x>>2]|0)+2316>>2]|0)*1e3|0);else k=0;c[G>>2]=k&1;b:do if(!(c[(c[x>>2]|0)+2388>>2]|0)){c[A>>2]=0;c:while(1){if((c[A>>2]|0)>=(c[(c[H>>2]|0)+4>>2]|0))break b;do if(!(c[(c[H>>2]|0)+16>>2]|0)){c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]=1;k=2;e=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0}else{if((c[(c[H>>2]|0)+16>>2]|0)==10){c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]=1;k=2;e=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0;break}if((c[(c[H>>2]|0)+16>>2]|0)==20){c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]=1;k=4;e=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0;break}if((c[(c[H>>2]|0)+16>>2]|0)==40){c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]=2;k=4;e=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0;break}if((c[(c[H>>2]|0)+16>>2]|0)!=60){q=23;break c}c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]=3;k=4;e=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0}while(0);c[e+2324>>2]=k;c[m>>2]=(c[(c[H>>2]|0)+12>>2]>>10)+1;if((c[m>>2]|0)!=8&(c[m>>2]|0)!=12&(c[m>>2]|0)!=16){q=25;break}S=xd((c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0,c[m>>2]|0,c[(c[H>>2]|0)+8>>2]|0)|0;c[M>>2]=(c[M>>2]|0)+S;c[A>>2]=(c[A>>2]|0)+1}if((q|0)==23){c[O>>2]=-203;S=c[O>>2]|0;l=Q;return S|0}else if((q|0)==25){c[O>>2]=-200;S=c[O>>2]|0;l=Q;return S|0}}while(0);do if((c[c[H>>2]>>2]|0)==2?(c[(c[H>>2]|0)+4>>2]|0)==2:0){if((c[(c[L>>2]|0)+8532>>2]|0)!=1?(c[(c[L>>2]|0)+8536>>2]|0)!=1:0)break;c[(c[L>>2]|0)+8520>>2]=0;c[(c[L>>2]|0)+8520+8>>2]=0;_i((c[x>>2]|0)+4260+2432|0,(c[x>>2]|0)+2432|0,300)|0}while(0);c[(c[L>>2]|0)+8532>>2]=c[c[H>>2]>>2];c[(c[L>>2]|0)+8536>>2]=c[(c[H>>2]|0)+4>>2];if((c[(c[H>>2]|0)+8>>2]|0)<=48e3?(c[(c[H>>2]|0)+8>>2]|0)>=8e3:0){d:do if((c[K>>2]|0)!=1?(c[(c[x>>2]|0)+2388>>2]|0)==0:0){c[A>>2]=0;while(1){if((c[A>>2]|0)>=(c[(c[H>>2]|0)+4>>2]|0))break;c[J>>2]=0;while(1){S=(c[J>>2]|0)<(c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]|0);e=Ob(c[w>>2]|0,1)|0;k=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0;if(!S)break;c[k+2404+(c[J>>2]<<2)>>2]=e;c[J>>2]=(c[J>>2]|0)+1}c[k+2416>>2]=e;c[A>>2]=(c[A>>2]|0)+1}c[A>>2]=0;while(1){if((c[A>>2]|0)>=(c[(c[H>>2]|0)+4>>2]|0))break;S=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420|0;c[S>>2]=0;c[S+4>>2]=0;c[S+8>>2]=0;e:do if(c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2416>>2]|0){if((c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]|0)==1){c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420>>2]=1;break}c[n>>2]=(Pb(c[w>>2]|0,c[17836+((c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]|0)-2<<2)>>2]|0,8)|0)+1;c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]|0))break e;c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420+(c[J>>2]<<2)>>2]=c[n>>2]>>c[J>>2]&1;c[J>>2]=(c[J>>2]|0)+1}}while(0);c[A>>2]=(c[A>>2]|0)+1}if(!(c[K>>2]|0)){c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[(c[x>>2]|0)+2392>>2]|0))break d;c[A>>2]=0;while(1){if((c[A>>2]|0)>=(c[(c[H>>2]|0)+4>>2]|0))break;if(c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420+(c[J>>2]<<2)>>2]|0){do if((c[A>>2]|0)==0?(c[(c[H>>2]|0)+4>>2]|0)==2:0){gg(c[w>>2]|0,s);if(c[(c[x>>2]|0)+4260+2420+(c[J>>2]<<2)>>2]|0)break;hg(c[w>>2]|0,I)}while(0);do if((c[J>>2]|0)>0){if(!(c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420+((c[J>>2]|0)-1<<2)>>2]|0)){q=64;break}c[o>>2]=2}else q=64;while(0);if((q|0)==64){q=0;c[o>>2]=0}vd((c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0,c[w>>2]|0,c[J>>2]|0,1,c[o>>2]|0);wd(c[w>>2]|0,p,a[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2736+29>>0]|0,a[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2736+30>>0]|0,c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2328>>2]|0)}c[A>>2]=(c[A>>2]|0)+1}c[J>>2]=(c[J>>2]|0)+1}}}while(0);f:do if((c[(c[H>>2]|0)+4>>2]|0)==2){do if(c[K>>2]|0){if((c[K>>2]|0)==2?(c[(c[x>>2]|0)+2420+(c[(c[x>>2]|0)+2388>>2]<<2)>>2]|0)==1:0)break;c[A>>2]=0;while(1){if((c[A>>2]|0)>=2)break f;c[s+(c[A>>2]<<2)>>2]=b[(c[L>>2]|0)+8520+(c[A>>2]<<1)>>1];c[A>>2]=(c[A>>2]|0)+1}}while(0);gg(c[w>>2]|0,s);if(!((c[K>>2]|0)==0?!(c[(c[x>>2]|0)+4260+2404+(c[(c[x>>2]|0)+2388>>2]<<2)>>2]|0):0))q=74;do if((q|0)==74){if((c[K>>2]|0)==2?(c[(c[x>>2]|0)+4260+2420+(c[(c[x>>2]|0)+2388>>2]<<2)>>2]|0)==0:0)break;c[I>>2]=0;break f}while(0);hg(c[w>>2]|0,I)}while(0);if(((c[I>>2]|0)==0?(c[(c[H>>2]|0)+4>>2]|0)==2:0)?(c[(c[L>>2]|0)+8540>>2]|0)==1:0){aj((c[L>>2]|0)+4260+1348|0,0,960)|0;k=(c[L>>2]|0)+4260+1284|0;e=k+64|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(e|0));c[(c[L>>2]|0)+4260+2308>>2]=100;a[(c[L>>2]|0)+4260+2312>>0]=10;c[(c[L>>2]|0)+4260+4164>>2]=0;c[(c[L>>2]|0)+4260+2376>>2]=1}S=N(c[(c[H>>2]|0)+12>>2]|0,c[(c[H>>2]|0)+4>>2]|0)|0;c[y>>2]=(S|0)<(N(c[(c[H>>2]|0)+8>>2]|0,c[c[H>>2]>>2]|0)|0)&1;if(c[y>>2]|0)k=1;else k=N(c[(c[H>>2]|0)+4>>2]|0,(c[(c[x>>2]|0)+2328>>2]|0)+2|0)|0;c[P>>2]=$()|0;d=l;l=l+((1*(k<<1)|0)+15&-16)|0;if(c[y>>2]|0){c[F>>2]=c[E>>2];e=c[x>>2]|0;k=c[E>>2]|0}else{c[F>>2]=d;e=c[x>>2]|0;k=d}c[F+4>>2]=k+(c[e+2328>>2]<<1)+4;if(!(c[K>>2]|0))c[v>>2]=((c[I>>2]|0)!=0^1)&1;else{if(c[(c[L>>2]|0)+8540>>2]|0)if((c[K>>2]|0)==2?(c[(c[H>>2]|0)+4>>2]|0)==2:0)k=(c[(c[x>>2]|0)+4260+2420+(c[(c[x>>2]|0)+4260+2388>>2]<<2)>>2]|0)==1;else k=0;else k=1;c[v>>2]=k&1}c[A>>2]=0;while(1){if((c[A>>2]|0)>=(c[(c[H>>2]|0)+4>>2]|0))break;if((c[A>>2]|0)==0|(c[v>>2]|0)!=0){c[r>>2]=(c[(c[x>>2]|0)+2388>>2]|0)-(c[A>>2]|0);g:do if((c[r>>2]|0)<=0)c[u>>2]=0;else{if((c[K>>2]|0)==2){c[u>>2]=c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420+((c[r>>2]|0)-1<<2)>>2]|0?2:0;break}do if((c[A>>2]|0)>0){if(!(c[(c[L>>2]|0)+8540>>2]|0))break;c[u>>2]=1;break g}while(0);c[u>>2]=2}while(0);S=td((c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0,c[w>>2]|0,(c[F+(c[A>>2]<<2)>>2]|0)+4|0,C,c[K>>2]|0,c[u>>2]|0,c[t>>2]|0)|0;c[M>>2]=(c[M>>2]|0)+S}else aj((c[F+(c[A>>2]<<2)>>2]|0)+4|0,0,c[C>>2]<<1|0)|0;S=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2388|0;c[S>>2]=(c[S>>2]|0)+1;c[A>>2]=(c[A>>2]|0)+1}if((c[c[H>>2]>>2]|0)==2?(c[(c[H>>2]|0)+4>>2]|0)==2:0)cf((c[L>>2]|0)+8520|0,c[F>>2]|0,c[F+4>>2]|0,s,c[(c[x>>2]|0)+2316>>2]|0,c[C>>2]|0);else{S=c[F>>2]|0;R=(c[L>>2]|0)+8520+4|0;b[S>>1]=b[R>>1]|0;b[S+2>>1]=b[R+2>>1]|0;S=(c[L>>2]|0)+8520+4|0;R=(c[F>>2]|0)+(c[C>>2]<<1)|0;b[S>>1]=b[R>>1]|0;b[S+2>>1]=b[R+2>>1]|0}S=N(c[C>>2]|0,c[(c[H>>2]|0)+8>>2]|0)|0;c[c[B>>2]>>2]=(S|0)/(((c[(c[x>>2]|0)+2316>>2]&65535)<<16>>16)*1e3|0)|0;if((c[c[H>>2]>>2]|0)==2)k=c[c[B>>2]>>2]|0;else k=1;e=l;l=l+((1*(k<<1)|0)+15&-16)|0;if((c[c[H>>2]>>2]|0)==2)c[D>>2]=e;else c[D>>2]=c[E>>2];if(c[y>>2]|0)k=N(c[(c[H>>2]|0)+4>>2]|0,(c[(c[x>>2]|0)+2328>>2]|0)+2|0)|0;else k=1;e=l;l=l+((1*(k<<1)|0)+15&-16)|0;if(c[y>>2]|0){S=(N(c[(c[H>>2]|0)+4>>2]|0,(c[(c[x>>2]|0)+2328>>2]|0)+2|0)|0)<<1;_i(e|0,c[E>>2]|0,S+0|0)|0;c[F>>2]=e;c[F+4>>2]=e+(c[(c[x>>2]|0)+2328>>2]<<1)+4}c[A>>2]=0;while(1){S=c[H>>2]|0;if((c[A>>2]|0)>=(c[((c[c[H>>2]>>2]|0)<(c[(c[H>>2]|0)+4>>2]|0)?S:S+4|0)>>2]|0))break;S=Uf((c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2432|0,c[D>>2]|0,(c[F+(c[A>>2]<<2)>>2]|0)+2|0,c[C>>2]|0)|0;c[M>>2]=(c[M>>2]|0)+S;h:do if((c[c[H>>2]>>2]|0)==2){c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[c[B>>2]>>2]|0))break h;b[(c[E>>2]|0)+((c[A>>2]|0)+(c[J>>2]<<1)<<1)>>1]=b[(c[D>>2]|0)+(c[J>>2]<<1)>>1]|0;c[J>>2]=(c[J>>2]|0)+1}}while(0);c[A>>2]=(c[A>>2]|0)+1}i:do if((c[c[H>>2]>>2]|0)==2){if((c[(c[H>>2]|0)+4>>2]|0)!=1)break;if(c[G>>2]|0){S=Uf((c[x>>2]|0)+4260+2432|0,c[D>>2]|0,(c[F>>2]|0)+2|0,c[C>>2]|0)|0;c[M>>2]=(c[M>>2]|0)+S;c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[c[B>>2]>>2]|0))break i;b[(c[E>>2]|0)+(1+(c[J>>2]<<1)<<1)>>1]=b[(c[D>>2]|0)+(c[J>>2]<<1)>>1]|0;c[J>>2]=(c[J>>2]|0)+1}}else{c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[c[B>>2]>>2]|0))break i;b[(c[E>>2]|0)+(1+(c[J>>2]<<1)<<1)>>1]=b[(c[E>>2]|0)+(0+(c[J>>2]<<1)<<1)>>1]|0;c[J>>2]=(c[J>>2]|0)+1}}}while(0);if((c[(c[x>>2]|0)+4164>>2]|0)==2){c[z>>2]=c[4402];c[z+4>>2]=c[4403];c[z+8>>2]=c[4404];e=N(c[(c[x>>2]|0)+2308>>2]|0,c[z+((c[(c[x>>2]|0)+2316>>2]|0)-8>>2<<2)>>2]|0)|0;k=c[H>>2]|0}else{e=0;k=c[H>>2]|0}c[k+20>>2]=e;j:do if((c[K>>2]|0)==1){c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[(c[L>>2]|0)+8536>>2]|0))break j;a[(c[L>>2]|0)+((c[J>>2]|0)*4260|0)+2312>>0]=10;c[J>>2]=(c[J>>2]|0)+1}}else c[(c[L>>2]|0)+8540>>2]=c[I>>2];while(0);c[O>>2]=c[M>>2];_(c[P>>2]|0);S=c[O>>2]|0;l=Q;return S|0}c[M>>2]=-200;c[O>>2]=c[M>>2];S=c[O>>2]|0;l=Q;return S|0}function Bd(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=0;c[c[e>>2]>>2]=24568;l=d;return c[b>>2]|0}function Cd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+20|0;e=k+16|0;g=k+12|0;i=k+8|0;h=k+4|0;j=k;c[f>>2]=a;c[e>>2]=b;c[g>>2]=d;c[j>>2]=0;c[i>>2]=c[f>>2];aj(c[i>>2]|0,0,24568)|0;c[h>>2]=0;while(1){b=c[i>>2]|0;if((c[h>>2]|0)>=2)break;d=ff(b+((c[h>>2]|0)*12240|0)|0,c[e>>2]|0)|0;c[j>>2]=(c[j>>2]|0)+d;c[h>>2]=(c[h>>2]|0)+1}c[b+24544>>2]=1;c[(c[i>>2]|0)+24548>>2]=1;i=Dd(c[f>>2]|0,c[g>>2]|0)|0;c[j>>2]=(c[j>>2]|0)+i;l=k;return c[j>>2]|0}function Dd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;g=l;l=l+32|0;i=g+16|0;d=g+12|0;e=g+8|0;f=g+4|0;h=g;c[i>>2]=a;c[d>>2]=b;c[e>>2]=0;c[h>>2]=c[i>>2];c[f>>2]=c[h>>2];c[c[d>>2]>>2]=c[(c[h>>2]|0)+24544>>2];c[(c[d>>2]|0)+4>>2]=c[(c[h>>2]|0)+24548>>2];c[(c[d>>2]|0)+8>>2]=c[(c[f>>2]|0)+4580>>2];c[(c[d>>2]|0)+12>>2]=c[(c[f>>2]|0)+4588>>2];c[(c[d>>2]|0)+16>>2]=c[(c[f>>2]|0)+4592>>2];c[(c[d>>2]|0)+20>>2]=c[(c[f>>2]|0)+4596>>2];c[(c[d>>2]|0)+24>>2]=c[(c[f>>2]|0)+4636>>2];c[(c[d>>2]|0)+28>>2]=c[(c[f>>2]|0)+4632>>2];c[(c[d>>2]|0)+32>>2]=c[(c[f>>2]|0)+4640>>2];c[(c[d>>2]|0)+36>>2]=c[(c[f>>2]|0)+4648>>2];c[(c[d>>2]|0)+40>>2]=c[(c[f>>2]|0)+6120>>2];c[(c[d>>2]|0)+44>>2]=c[(c[f>>2]|0)+6108>>2];c[(c[d>>2]|0)+48>>2]=c[(c[f>>2]|0)+4708>>2];c[(c[d>>2]|0)+68>>2]=((c[(c[f>>2]|0)+4600>>2]&65535)<<16>>16)*1e3;c[(c[d>>2]|0)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0;c[(c[T>>2]|0)+5780>>2]=0;aa=df(c[Q>>2]|0)|0;c[U>>2]=aa;if(aa|0){c[V>>2]=c[U>>2];aa=c[V>>2]|0;l=Z;return aa|0}c[(c[Q>>2]|0)+84>>2]=0;if((c[(c[Q>>2]|0)+4>>2]|0)>(c[(c[T>>2]|0)+24548>>2]|0)?(aa=ff((c[T>>2]|0)+12240|0,c[(c[T>>2]|0)+5124>>2]|0)|0,c[U>>2]=(c[U>>2]|0)+aa,c[(c[T>>2]|0)+24480>>2]=0,c[(c[T>>2]|0)+24480+8>>2]=0,c[(c[T>>2]|0)+24480+12>>2]=0,c[(c[T>>2]|0)+24480+12+4>>2]=1,c[(c[T>>2]|0)+24480+12+8>>2]=0,c[(c[T>>2]|0)+24480+12+12>>2]=1,b[(c[T>>2]|0)+24480+30>>1]=0,b[(c[T>>2]|0)+24480+28>>1]=16384,(c[(c[T>>2]|0)+24544>>2]|0)==2):0){_i((c[T>>2]|0)+12240+5808|0,(c[T>>2]|0)+5808|0,300)|0;aa=(c[T>>2]|0)+12240|0;f=c[T>>2]|0;c[aa>>2]=c[f>>2];c[aa+4>>2]=c[f+4>>2]}if((c[(c[Q>>2]|0)+24>>2]|0)!=(c[(c[T>>2]|0)+4636>>2]|0))e=1;else e=(c[(c[T>>2]|0)+24548>>2]|0)!=(c[(c[Q>>2]|0)+4>>2]|0);c[n>>2]=e&1;c[(c[T>>2]|0)+24544>>2]=c[c[Q>>2]>>2];c[(c[T>>2]|0)+24548>>2]=c[(c[Q>>2]|0)+4>>2];c[C>>2]=((c[F>>2]|0)*100|0)/(c[(c[Q>>2]|0)+8>>2]|0)|0;c[M>>2]=(c[C>>2]|0)>1?c[C>>2]>>1:1;c[v>>2]=0;e=c[C>>2]|0;a:do if(!(c[S>>2]|0)){aa=N(e,c[(c[Q>>2]|0)+8>>2]|0)|0;if((c[F>>2]|0)<0?1:(aa|0)!=((c[F>>2]|0)*100|0)){c[V>>2]=-101;aa=c[V>>2]|0;l=Z;return aa|0}if(((c[F>>2]|0)*1e3|0)>(N(c[(c[Q>>2]|0)+24>>2]|0,c[(c[Q>>2]|0)+8>>2]|0)|0)){c[V>>2]=-101;aa=c[V>>2]|0;l=Z;return aa|0}}else{if((e|0)!=1){c[V>>2]=-101;aa=c[V>>2]|0;l=Z;return aa|0}c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;c[U>>2]=ff((c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0,c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5124>>2]|0)|0;c[R>>2]=(c[R>>2]|0)+1}c[Y>>2]=c[(c[Q>>2]|0)+24>>2];c[(c[Q>>2]|0)+24>>2]=10;c[X>>2]=c[(c[Q>>2]|0)+36>>2];c[(c[Q>>2]|0)+36>>2]=0;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break a;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4700>>2]=0;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4712>>2]=1;c[R>>2]=(c[R>>2]|0)+1}}while(0);c[q>>2]=c[(c[Q>>2]|0)+28>>2]>>(c[(c[Q>>2]|0)+4>>2]|0)-1;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;if((c[R>>2]|0)==1)e=c[(c[T>>2]|0)+4600>>2]|0;else e=0;c[k>>2]=e;aa=gf((c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0,c[Q>>2]|0,c[q>>2]|0,c[(c[T>>2]|0)+24560>>2]|0,c[R>>2]|0,c[k>>2]|0)|0;c[U>>2]=aa;if(aa|0){P=28;break}b:do if(c[n>>2]|0?1:(c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4696>>2]|0)!=0){c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[(c[T>>2]|0)+5776>>2]|0))break b;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4756+(c[x>>2]<<2)>>2]=0;c[x>>2]=(c[x>>2]|0)+1}}while(0);c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+6112>>2]=c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+6108>>2];c[R>>2]=(c[R>>2]|0)+1}if((P|0)==28){c[V>>2]=c[U>>2];aa=c[V>>2]|0;l=Z;return aa|0}c[H>>2]=N((c[C>>2]|0)*10|0,c[(c[T>>2]|0)+4600>>2]|0)|0;aa=N(c[H>>2]|0,c[(c[T>>2]|0)+4580>>2]|0)|0;c[m>>2]=(aa|0)/((c[(c[T>>2]|0)+4600>>2]|0)*1e3|0)|0;aa=c[m>>2]|0;c[W>>2]=$()|0;g=l;l=l+((1*(aa<<1)|0)+15&-16)|0;while(1){c[G>>2]=(c[(c[T>>2]|0)+4608>>2]|0)-(c[(c[T>>2]|0)+5772>>2]|0);c[G>>2]=(c[G>>2]|0)<(c[H>>2]|0)?c[G>>2]|0:c[H>>2]|0;aa=N(c[G>>2]|0,c[(c[T>>2]|0)+4580>>2]|0)|0;c[E>>2]=(aa|0)/((c[(c[T>>2]|0)+4600>>2]|0)*1e3|0)|0;if((c[c[Q>>2]>>2]|0)==2?(c[(c[Q>>2]|0)+4>>2]|0)==2:0){c[z>>2]=c[(c[T>>2]|0)+5780>>2];c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[E>>2]|0))break;b[g+(c[R>>2]<<1)>>1]=b[(c[J>>2]|0)+(c[R>>2]<<1<<1)>>1]|0;c[R>>2]=(c[R>>2]|0)+1}if((c[z>>2]|0)==0?(c[(c[T>>2]|0)+24552>>2]|0)==1:0)_i((c[T>>2]|0)+12240+5808|0,(c[T>>2]|0)+5808|0,300)|0;aa=Uf((c[T>>2]|0)+5808|0,(c[T>>2]|0)+5128+((c[(c[T>>2]|0)+5772>>2]|0)+2<<1)|0,g,c[E>>2]|0)|0;c[U>>2]=(c[U>>2]|0)+aa;aa=(c[T>>2]|0)+5772|0;c[aa>>2]=(c[aa>>2]|0)+(c[G>>2]|0);c[G>>2]=(c[(c[T>>2]|0)+12240+4608>>2]|0)-(c[(c[T>>2]|0)+12240+5772>>2]|0);if((c[G>>2]|0)<(N((c[C>>2]|0)*10|0,c[(c[T>>2]|0)+12240+4600>>2]|0)|0))e=c[G>>2]|0;else e=N((c[C>>2]|0)*10|0,c[(c[T>>2]|0)+12240+4600>>2]|0)|0;c[G>>2]=e;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[E>>2]|0))break;b[g+(c[R>>2]<<1)>>1]=b[(c[J>>2]|0)+((c[R>>2]<<1)+1<<1)>>1]|0;c[R>>2]=(c[R>>2]|0)+1}e=Uf((c[T>>2]|0)+12240+5808|0,(c[T>>2]|0)+12240+5128+((c[(c[T>>2]|0)+12240+5772>>2]|0)+2<<1)|0,g,c[E>>2]|0)|0;c[U>>2]=(c[U>>2]|0)+e;e=c[T>>2]|0;d=c[G>>2]|0;i=1}else P=49;do if((P|0)==49){P=0;if((c[c[Q>>2]>>2]|0)==2?(c[(c[Q>>2]|0)+4>>2]|0)==1:0){c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[E>>2]|0))break;c[L>>2]=(b[(c[J>>2]|0)+(c[R>>2]<<1<<1)>>1]|0)+(b[(c[J>>2]|0)+((c[R>>2]<<1)+1<<1)>>1]|0);b[g+(c[R>>2]<<1)>>1]=(c[L>>2]>>1)+(c[L>>2]&1);c[R>>2]=(c[R>>2]|0)+1}aa=Uf((c[T>>2]|0)+5808|0,(c[T>>2]|0)+5128+((c[(c[T>>2]|0)+5772>>2]|0)+2<<1)|0,g,c[E>>2]|0)|0;c[U>>2]=(c[U>>2]|0)+aa;c:do if((c[(c[T>>2]|0)+24552>>2]|0)==2?(c[(c[T>>2]|0)+5780>>2]|0)==0:0){aa=Uf((c[T>>2]|0)+12240+5808|0,(c[T>>2]|0)+12240+5128+((c[(c[T>>2]|0)+12240+5772>>2]|0)+2<<1)|0,g,c[E>>2]|0)|0;c[U>>2]=(c[U>>2]|0)+aa;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[T>>2]|0)+4608>>2]|0))break c;b[(c[T>>2]|0)+5128+((c[(c[T>>2]|0)+5772>>2]|0)+(c[R>>2]|0)+2<<1)>>1]=(b[(c[T>>2]|0)+5128+((c[(c[T>>2]|0)+5772>>2]|0)+(c[R>>2]|0)+2<<1)>>1]|0)+(b[(c[T>>2]|0)+12240+5128+((c[(c[T>>2]|0)+12240+5772>>2]|0)+(c[R>>2]|0)+2<<1)>>1]|0)>>1;c[R>>2]=(c[R>>2]|0)+1}}while(0);e=c[T>>2]|0;d=c[G>>2]|0;i=0;break}_i(g|0,c[J>>2]|0,c[E>>2]<<1|0)|0;e=Uf((c[T>>2]|0)+5808|0,(c[T>>2]|0)+5128+((c[(c[T>>2]|0)+5772>>2]|0)+2<<1)|0,g,c[E>>2]|0)|0;c[U>>2]=(c[U>>2]|0)+e;e=c[T>>2]|0;d=c[G>>2]|0;i=0}while(0);aa=e+(i*12240|0)+5772|0;c[aa>>2]=(c[aa>>2]|0)+d;aa=N(c[E>>2]|0,c[c[Q>>2]>>2]|0)|0;c[J>>2]=(c[J>>2]|0)+(aa<<1);c[F>>2]=(c[F>>2]|0)-(c[E>>2]|0);c[(c[T>>2]|0)+24560>>2]=0;if((c[(c[T>>2]|0)+5772>>2]|0)<(c[(c[T>>2]|0)+4608>>2]|0))break;if(!(c[S>>2]|0?1:(c[(c[T>>2]|0)+5780>>2]|0)!=0)){a[y>>0]=0;a[y+1>>0]=0;a[y>>0]=256-(256>>(N((c[(c[T>>2]|0)+5776>>2]|0)+1|0,c[(c[Q>>2]|0)+4>>2]|0)|0));$b(c[I>>2]|0,0,y,8);c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;c[o>>2]=0;c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5776>>2]|0))break;c[o>>2]=c[o>>2]|c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4756+(c[x>>2]<<2)>>2]<>2];c[x>>2]=(c[x>>2]|0)+1}a[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4755>>0]=(c[o>>2]|0)>0?1:0;if(c[o>>2]|0?(c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5776>>2]|0)>1:0)$b(c[I>>2]|0,(c[o>>2]|0)-1|0,c[17836+((c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5776>>2]|0)-2<<2)>>2]|0,8);c[R>>2]=(c[R>>2]|0)+1}c[x>>2]=0;while(1){aa=(c[x>>2]|0)<(c[(c[T>>2]|0)+5776>>2]|0);c[R>>2]=0;if(!aa)break;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;if(c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4756+(c[x>>2]<<2)>>2]|0){if(((c[R>>2]|0)==0?(c[(c[Q>>2]|0)+4>>2]|0)==2:0)?(ig(c[I>>2]|0,(c[T>>2]|0)+24480+34+((c[x>>2]|0)*6|0)|0),(c[(c[T>>2]|0)+12240+4756+(c[x>>2]<<2)>>2]|0)==0):0)jg(c[I>>2]|0,a[(c[T>>2]|0)+24480+52+(c[x>>2]|0)>>0]|0);if((c[x>>2]|0)>0?c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4756+((c[x>>2]|0)-1<<2)>>2]|0:0)c[t>>2]=2;else c[t>>2]=0;Gd((c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0,c[I>>2]|0,c[x>>2]|0,1,c[t>>2]|0);Hd(c[I>>2]|0,a[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+6132+((c[x>>2]|0)*36|0)+29>>0]|0,a[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+6132+((c[x>>2]|0)*36|0)+30>>0]|0,(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+6240+((c[x>>2]|0)*320|0)|0,c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4608>>2]|0)}c[R>>2]=(c[R>>2]|0)+1}c[x>>2]=(c[x>>2]|0)+1}while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;aa=(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4756|0;c[aa>>2]=0;c[aa+4>>2]=0;c[aa+8>>2]=0;c[R>>2]=(c[R>>2]|0)+1}aa=Fd(c[I>>2]|0)|0;c[(c[T>>2]|0)+24536>>2]=aa}Qe(c[T>>2]|0);c[B>>2]=(N(c[(c[Q>>2]|0)+28>>2]|0,c[(c[Q>>2]|0)+24>>2]|0)|0)/1e3|0;if(!(c[S>>2]|0))c[B>>2]=(c[B>>2]|0)-(c[(c[T>>2]|0)+24536>>2]|0);c[B>>2]=(c[B>>2]|0)/(c[(c[T>>2]|0)+5776>>2]|0)|0;e=(c[B>>2]&65535)<<16>>16;if((c[(c[Q>>2]|0)+24>>2]|0)==10)c[q>>2]=e*100;else c[q>>2]=e*50;c[q>>2]=(c[q>>2]|0)-(((c[(c[T>>2]|0)+24540>>2]|0)*1e3|0)/500|0);if((c[S>>2]|0)==0?(c[(c[T>>2]|0)+5780>>2]|0)>0:0){aa=Fd(c[I>>2]|0)|0;c[r>>2]=aa-(c[(c[T>>2]|0)+24536>>2]|0)-(N(c[B>>2]|0,c[(c[T>>2]|0)+5780>>2]|0)|0);c[q>>2]=(c[q>>2]|0)-(((c[r>>2]|0)*1e3|0)/500|0)}e=c[q>>2]|0;do if((c[(c[Q>>2]|0)+28>>2]|0)>5e3)if((e|0)>(c[(c[Q>>2]|0)+28>>2]|0)){e=c[(c[Q>>2]|0)+28>>2]|0;break}else{e=(c[q>>2]|0)<5e3?5e3:c[q>>2]|0;break}else if((e|0)<=5e3)if((c[q>>2]|0)<(c[(c[Q>>2]|0)+28>>2]|0)){e=c[(c[Q>>2]|0)+28>>2]|0;break}else{e=c[q>>2]|0;break}else e=5e3;while(0);c[q>>2]=e;e=c[T>>2]|0;if((c[(c[Q>>2]|0)+4>>2]|0)==2){_e(e+24480|0,(c[T>>2]|0)+5128+4|0,(c[T>>2]|0)+12240+5128+4|0,(c[T>>2]|0)+24480+34+((c[(c[T>>2]|0)+5780>>2]|0)*6|0)|0,(c[T>>2]|0)+24480+52+(c[(c[T>>2]|0)+5780>>2]|0)|0,p,c[q>>2]|0,c[(c[T>>2]|0)+4556>>2]|0,c[(c[Q>>2]|0)+56>>2]|0,c[(c[T>>2]|0)+4600>>2]|0,c[(c[T>>2]|0)+4608>>2]|0);e=c[T>>2]|0;if(!(a[(c[T>>2]|0)+24480+52+(c[(c[T>>2]|0)+5780>>2]|0)>>0]|0)){if((c[e+24564>>2]|0)==1){aa=(c[T>>2]|0)+12240+7200|0;c[aa>>2]=0;c[aa+4>>2]=0;c[aa+8>>2]=0;c[aa+12>>2]=0;aj((c[T>>2]|0)+12240+7216|0,0,2140)|0;aj((c[T>>2]|0)+12240+144|0,0,4380)|0;aa=(c[T>>2]|0)+12240+4524|0;c[aa>>2]=0;c[aa+4>>2]=0;c[aa+8>>2]=0;c[aa+12>>2]=0;c[aa+16>>2]=0;c[aa+20>>2]=0;c[aa+24>>2]=0;c[aa+28>>2]=0;aa=(c[T>>2]|0)+12240+16|0;c[aa>>2]=0;c[aa+4>>2]=0;c[(c[T>>2]|0)+12240+4568>>2]=100;c[(c[T>>2]|0)+12240+144+4356>>2]=100;a[(c[T>>2]|0)+12240+7200>>0]=10;a[(c[T>>2]|0)+12240+4565>>0]=0;c[(c[T>>2]|0)+12240+144+4372>>2]=65536;c[(c[T>>2]|0)+12240+4696>>2]=1}vg((c[T>>2]|0)+12240|0)}else a[e+12240+4752+(c[(c[T>>2]|0)+5780>>2]|0)>>0]=0;if((c[S>>2]|0)==0?(ig(c[I>>2]|0,(c[T>>2]|0)+24480+34+((c[(c[T>>2]|0)+5780>>2]|0)*6|0)|0),(a[(c[T>>2]|0)+12240+4752+(c[(c[T>>2]|0)+5780>>2]|0)>>0]|0)==0):0)jg(c[I>>2]|0,a[(c[T>>2]|0)+24480+52+(c[(c[T>>2]|0)+5780>>2]|0)>>0]|0)}else{c[e+5128>>2]=c[(c[T>>2]|0)+24480+4>>2];aa=(c[T>>2]|0)+24480+4|0;n=(c[T>>2]|0)+5128+(c[(c[T>>2]|0)+4608>>2]<<1)|0;b[aa>>1]=b[n>>1]|0;b[aa+2>>1]=b[n+2>>1]|0}vg(c[T>>2]|0);c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;c[A>>2]=c[(c[Q>>2]|0)+52>>2];do if(!((c[M>>2]|0)==2&(c[v>>2]|0)==0)){if((c[M>>2]|0)==3){if(!(c[v>>2]|0)){c[A>>2]=(c[A>>2]<<1|0)/5|0;break}if((c[v>>2]|0)!=1)break;c[A>>2]=((c[A>>2]|0)*3|0)/4|0}}else c[A>>2]=((c[A>>2]|0)*3|0)/5|0;while(0);if(c[(c[Q>>2]|0)+48>>2]|0)e=(c[v>>2]|0)==((c[M>>2]|0)-1|0);else e=0;c[O>>2]=e&1;do if((c[(c[Q>>2]|0)+4>>2]|0)==1)c[s>>2]=c[q>>2];else{c[s>>2]=c[p+(c[R>>2]<<2)>>2];if(c[R>>2]|0)break;if((c[p+4>>2]|0)<=0)break;c[O>>2]=0;c[A>>2]=(c[A>>2]|0)-((c[(c[Q>>2]|0)+52>>2]|0)/(c[M>>2]<<1|0)|0)}while(0);if((c[s>>2]|0)>0){ef((c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0,c[s>>2]|0)|0;d:do if(((c[(c[T>>2]|0)+5780>>2]|0)-(c[R>>2]|0)|0)<=0)c[u>>2]=0;else{do if((c[R>>2]|0)>0){if(!(c[(c[T>>2]|0)+24564>>2]|0))break;c[u>>2]=1;break d}while(0);c[u>>2]=2}while(0);c[U>>2]=wg((c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0,c[D>>2]|0,c[I>>2]|0,c[u>>2]|0,c[A>>2]|0,c[O>>2]|0)|0}c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4700>>2]=0;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5772>>2]=0;aa=(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5780|0;c[aa>>2]=(c[aa>>2]|0)+1;c[R>>2]=(c[R>>2]|0)+1}c[(c[T>>2]|0)+24564>>2]=a[(c[T>>2]|0)+24480+52+((c[(c[T>>2]|0)+5780>>2]|0)-1)>>0];do if((c[c[D>>2]>>2]|0)>0?(c[(c[T>>2]|0)+5780>>2]|0)==(c[(c[T>>2]|0)+5776>>2]|0):0){c[w>>2]=0;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;c[x>>2]=0;while(1){aa=(c[x>>2]|0)<(c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5776>>2]|0);c[w>>2]=c[w>>2]<<1;e=(c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0;if(!aa)break;c[w>>2]=c[w>>2]|a[e+4752+(c[x>>2]|0)>>0];c[x>>2]=(c[x>>2]|0)+1}c[w>>2]=c[w>>2]|a[e+4755>>0];c[R>>2]=(c[R>>2]|0)+1}if(!(c[S>>2]|0))dc(c[I>>2]|0,c[w>>2]|0,N((c[(c[T>>2]|0)+5776>>2]|0)+1|0,c[(c[Q>>2]|0)+4>>2]|0)|0);do if(c[(c[T>>2]|0)+6112>>2]|0){if((c[(c[Q>>2]|0)+4>>2]|0)!=1?(c[(c[T>>2]|0)+12240+6112>>2]|0)==0:0)break;c[c[D>>2]>>2]=0}while(0);n=(c[T>>2]|0)+24540|0;c[n>>2]=(c[n>>2]|0)+(c[c[D>>2]>>2]<<3);n=(N(c[(c[Q>>2]|0)+28>>2]|0,c[(c[Q>>2]|0)+24>>2]|0)|0)/1e3|0;aa=(c[T>>2]|0)+24540|0;c[aa>>2]=(c[aa>>2]|0)-n;do if((c[(c[T>>2]|0)+24540>>2]|0)>1e4)e=1e4;else{if((c[(c[T>>2]|0)+24540>>2]|0)<0){e=0;break}e=c[(c[T>>2]|0)+24540>>2]|0}while(0);c[(c[T>>2]|0)+24540>>2]=e;c[K>>2]=13+(0+(((c[(c[T>>2]|0)+24556>>2]&65535)<<16>>16)*3188>>16));e=(c[T>>2]|0)+24560|0;if((c[(c[T>>2]|0)+4556>>2]|0)<(c[K>>2]|0)){c[e>>2]=1;c[(c[T>>2]|0)+24556>>2]=0;break}else{c[e>>2]=0;aa=(c[T>>2]|0)+24556|0;c[aa>>2]=(c[aa>>2]|0)+(c[(c[Q>>2]|0)+24>>2]|0);break}}while(0);if(!(c[F>>2]|0))break;c[v>>2]=(c[v>>2]|0)+1}c[(c[T>>2]|0)+24552>>2]=c[(c[Q>>2]|0)+4>>2];c[(c[Q>>2]|0)+72>>2]=c[(c[T>>2]|0)+24560>>2];if((c[(c[T>>2]|0)+4600>>2]|0)==16)e=(c[(c[T>>2]|0)+16+12>>2]|0)==0;else e=0;c[(c[Q>>2]|0)+76>>2]=e&1;c[(c[Q>>2]|0)+68>>2]=((c[(c[T>>2]|0)+4600>>2]&65535)<<16>>16)*1e3;if(c[(c[Q>>2]|0)+56>>2]|0)e=0;else e=b[(c[T>>2]|0)+24480+28>>1]|0;c[(c[Q>>2]|0)+80>>2]=e;e:do if(c[S>>2]|0){c[(c[Q>>2]|0)+24>>2]=c[Y>>2];c[(c[Q>>2]|0)+36>>2]=c[X>>2];c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break e;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4700>>2]=0;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4712>>2]=0;c[R>>2]=(c[R>>2]|0)+1}}while(0);c[V>>2]=c[U>>2];_(c[W>>2]|0);aa=c[V>>2]|0;l=Z;return aa|0}function Fd(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function Gd(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+112|0;v=y+48|0;x=y+44|0;i=y+40|0;j=y+36|0;n=y+32|0;r=y+28|0;s=y+24|0;k=y+20|0;q=y+16|0;o=y+12|0;p=y+56|0;m=y+88|0;w=y+8|0;t=y+4|0;u=y;c[v>>2]=d;c[x>>2]=e;c[i>>2]=f;c[j>>2]=g;c[n>>2]=h;f=c[v>>2]|0;if(c[j>>2]|0)c[w>>2]=f+6132+((c[i>>2]|0)*36|0);else c[w>>2]=f+4768;c[k>>2]=(a[(c[w>>2]|0)+29>>0]<<1)+(a[(c[w>>2]|0)+30>>0]|0);h=c[x>>2]|0;f=c[k>>2]|0;if((c[j>>2]|0)!=0|(c[k>>2]|0)>=2)$b(h,f-2|0,29016,8);else $b(h,f,29020,8);f=c[x>>2]|0;h=a[c[w>>2]>>0]|0;if((c[n>>2]|0)==2)$b(f,h,26767,8);else{$b(f,h>>3,26743+(a[(c[w>>2]|0)+29>>0]<<3)|0,8);$b(c[x>>2]|0,a[c[w>>2]>>0]&7,29045,8)}c[r>>2]=1;while(1){f=c[x>>2]|0;h=c[w>>2]|0;if((c[r>>2]|0)>=(c[(c[v>>2]|0)+4604>>2]|0))break;$b(f,a[h+(c[r>>2]|0)>>0]|0,26767,8);c[r>>2]=(c[r>>2]|0)+1}$b(f,a[h+8>>0]|0,(c[(c[(c[v>>2]|0)+4724>>2]|0)+12>>2]|0)+(N(a[(c[w>>2]|0)+29>>0]>>1,b[c[(c[v>>2]|0)+4724>>2]>>1]|0)|0)|0,8);Xe(p,m,c[(c[v>>2]|0)+4724>>2]|0,a[(c[w>>2]|0)+8>>0]|0);c[r>>2]=0;while(1){if((c[r>>2]|0)>=(b[(c[(c[v>>2]|0)+4724>>2]|0)+2>>1]|0))break;do if((a[(c[w>>2]|0)+8+((c[r>>2]|0)+1)>>0]|0)<4){f=c[x>>2]|0;if((a[(c[w>>2]|0)+8+((c[r>>2]|0)+1)>>0]|0)<=-4){$b(f,0,(c[(c[(c[v>>2]|0)+4724>>2]|0)+24>>2]|0)+(b[p+(c[r>>2]<<1)>>1]|0)|0,8);$b(c[x>>2]|0,0-(a[(c[w>>2]|0)+8+((c[r>>2]|0)+1)>>0]|0)-4|0,29053,8);break}else{$b(f,(a[(c[w>>2]|0)+8+((c[r>>2]|0)+1)>>0]|0)+4|0,(c[(c[(c[v>>2]|0)+4724>>2]|0)+24>>2]|0)+(b[p+(c[r>>2]<<1)>>1]|0)|0,8);break}}else{$b(c[x>>2]|0,8,(c[(c[(c[v>>2]|0)+4724>>2]|0)+24>>2]|0)+(b[p+(c[r>>2]<<1)>>1]|0)|0,8);$b(c[x>>2]|0,(a[(c[w>>2]|0)+8+((c[r>>2]|0)+1)>>0]|0)-4|0,29053,8)}while(0);c[r>>2]=(c[r>>2]|0)+1}if((c[(c[v>>2]|0)+4604>>2]|0)==4)$b(c[x>>2]|0,a[(c[w>>2]|0)+31>>0]|0,29022,8);if((a[(c[w>>2]|0)+29>>0]|0)!=2){u=c[w>>2]|0;u=u+29|0;u=a[u>>0]|0;u=u<<24>>24;v=c[v>>2]|0;v=v+5800|0;c[v>>2]=u;v=c[x>>2]|0;x=c[w>>2]|0;x=x+34|0;x=a[x>>0]|0;x=x<<24>>24;$b(v,x,29030,8);l=y;return}c[q>>2]=1;if((c[n>>2]|0)==2?(c[(c[v>>2]|0)+5800>>2]|0)==2:0){c[o>>2]=(b[(c[w>>2]|0)+26>>1]|0)-(b[(c[v>>2]|0)+5804>>1]|0);if((c[o>>2]|0)<-8|(c[o>>2]|0)>11)c[o>>2]=0;else{c[o>>2]=(c[o>>2]|0)+9;c[q>>2]=0}$b(c[x>>2]|0,c[o>>2]|0,29092,8)}if(c[q>>2]|0){c[t>>2]=(b[(c[w>>2]|0)+26>>1]|0)/(c[(c[v>>2]|0)+4600>>2]>>1|0)|0;c[u>>2]=(b[(c[w>>2]|0)+26>>1]|0)-(N((c[t>>2]&65535)<<16>>16,(c[(c[v>>2]|0)+4600>>2]>>1&65535)<<16>>16)|0);$b(c[x>>2]|0,c[t>>2]|0,29060,8);$b(c[x>>2]|0,c[u>>2]|0,c[(c[v>>2]|0)+4716>>2]|0,8)}b[(c[v>>2]|0)+5804>>1]=b[(c[w>>2]|0)+26>>1]|0;$b(c[x>>2]|0,a[(c[w>>2]|0)+28>>0]|0,c[(c[v>>2]|0)+4720>>2]|0,8);$b(c[x>>2]|0,a[(c[w>>2]|0)+32>>0]|0,26808,8);c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[(c[v>>2]|0)+4604>>2]|0))break;$b(c[x>>2]|0,a[(c[w>>2]|0)+4+(c[s>>2]|0)>>0]|0,c[17620+(a[(c[w>>2]|0)+32>>0]<<2)>>2]|0,8);c[s>>2]=(c[s>>2]|0)+1}if(c[n>>2]|0){u=c[w>>2]|0;u=u+29|0;u=a[u>>0]|0;u=u<<24>>24;v=c[v>>2]|0;v=v+5800|0;c[v>>2]=u;v=c[x>>2]|0;x=c[w>>2]|0;x=x+34|0;x=a[x>>0]|0;x=x<<24>>24;$b(v,x,29030,8);l=y;return}$b(c[x>>2]|0,a[(c[w>>2]|0)+33>>0]|0,29013,8);u=c[w>>2]|0;u=u+29|0;u=a[u>>0]|0;u=u<<24>>24;v=c[v>>2]|0;v=v+5800|0;c[v>>2]=u;v=c[x>>2]|0;x=c[w>>2]|0;x=x+34|0;x=a[x>>0]|0;x=x<<24>>24;$b(v,x,29030,8);l=y;return}function Hd(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;F=l;l=l+128|0;z=F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l;l=l+((1*(c[v>>2]<<2)|0)+15&-16)|0;f=l;l=l+((1*(c[v>>2]<<2)|0)+15&-16)|0;c[i>>2]=b;c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[v>>2]|0))break;c[f+(c[u>>2]<<2)>>2]=0;a:while(1){c[k>>2]=Id(j,c[i>>2]|0,d[29173]|0,8)|0;e=Id(j,j,d[29174]|0,4)|0;c[k>>2]=(c[k>>2]|0)+e;e=Id(j,j,d[29175]|0,2)|0;c[k>>2]=(c[k>>2]|0)+e;e=Id(g+(c[u>>2]<<2)|0,j,d[29176]|0,1)|0;c[k>>2]=(c[k>>2]|0)+e;if(!(c[k>>2]|0))break;e=f+(c[u>>2]<<2)|0;c[e>>2]=(c[e>>2]|0)+1;c[x>>2]=0;while(1){if((c[x>>2]|0)>=16)continue a;c[(c[i>>2]|0)+(c[x>>2]<<2)>>2]=c[(c[i>>2]|0)+(c[x>>2]<<2)>>2]>>1;c[x>>2]=(c[x>>2]|0)+1}}c[i>>2]=(c[i>>2]|0)+64;c[u>>2]=(c[u>>2]|0)+1}c[n>>2]=2147483647;c[x>>2]=0;while(1){if((c[x>>2]|0)>=9)break;c[o>>2]=29357+((c[x>>2]|0)*18|0);c[p>>2]=d[29537+((c[E>>2]>>1)*9|0)+(c[x>>2]|0)>>0];c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[v>>2]|0))break;h=c[o>>2]|0;if((c[f+(c[u>>2]<<2)>>2]|0)>0)c[p>>2]=(c[p>>2]|0)+(d[h+17>>0]|0);else c[p>>2]=(c[p>>2]|0)+(d[h+(c[g+(c[u>>2]<<2)>>2]|0)>>0]|0);c[u>>2]=(c[u>>2]|0)+1}if((c[p>>2]|0)<(c[n>>2]|0)){c[n>>2]=c[p>>2];c[m>>2]=c[x>>2]}c[x>>2]=(c[x>>2]|0)+1}$b(c[z>>2]|0,c[m>>2]|0,29519+((c[E>>2]>>1)*9|0)|0,8);c[q>>2]=29177+((c[m>>2]|0)*18|0);c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[v>>2]|0))break;h=c[z>>2]|0;if(!(c[f+(c[u>>2]<<2)>>2]|0))$b(h,c[g+(c[u>>2]<<2)>>2]|0,c[q>>2]|0,8);else{$b(h,17,c[q>>2]|0,8);c[x>>2]=0;while(1){h=c[z>>2]|0;if((c[x>>2]|0)>=((c[f+(c[u>>2]<<2)>>2]|0)-1|0))break;$b(h,17,29339,8);c[x>>2]=(c[x>>2]|0)+1}$b(h,c[g+(c[u>>2]<<2)>>2]|0,29339,8)}c[u>>2]=(c[u>>2]|0)+1}c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[v>>2]|0))break;if((c[g+(c[u>>2]<<2)>>2]|0)>0)ye(c[z>>2]|0,b+(c[u>>2]<<4<<2)|0);c[u>>2]=(c[u>>2]|0)+1}c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[v>>2]|0))break;b:do if((c[f+(c[u>>2]<<2)>>2]|0)>0){c[B>>2]=(c[A>>2]|0)+(c[u>>2]<<4);c[y>>2]=(c[f+(c[u>>2]<<2)>>2]|0)-1;c[x>>2]=0;while(1){if((c[x>>2]|0)>=16)break b;q=a[(c[B>>2]|0)+(c[x>>2]|0)>>0]|0;c[r>>2]=(((a[(c[B>>2]|0)+(c[x>>2]|0)>>0]|0)>0?q:0-q|0)&255)<<24>>24;c[w>>2]=c[y>>2];while(1){h=c[r>>2]|0;if((c[w>>2]|0)<=0)break;c[s>>2]=h>>c[w>>2]&1;$b(c[z>>2]|0,c[s>>2]|0,29011,8);c[w>>2]=(c[w>>2]|0)+-1}c[s>>2]=h&1;$b(c[z>>2]|0,c[s>>2]|0,29011,8);c[x>>2]=(c[x>>2]|0)+1}}while(0);c[u>>2]=(c[u>>2]|0)+1}md(c[z>>2]|0,c[A>>2]|0,c[t>>2]|0,c[E>>2]|0,c[C>>2]|0,g);_(c[D>>2]|0);l=F;return}function Id(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n+24|0;i=n+20|0;j=n+16|0;h=n+12|0;g=n+8|0;f=n+4|0;k=n;c[i>>2]=a;c[j>>2]=b;c[h>>2]=d;c[g>>2]=e;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[g>>2]|0)){f=6;break}c[k>>2]=(c[(c[j>>2]|0)+(c[f>>2]<<1<<2)>>2]|0)+(c[(c[j>>2]|0)+((c[f>>2]<<1)+1<<2)>>2]|0);if((c[k>>2]|0)>(c[h>>2]|0)){f=4;break}c[(c[i>>2]|0)+(c[f>>2]<<2)>>2]=c[k>>2];c[f>>2]=(c[f>>2]|0)+1}if((f|0)==4){c[m>>2]=1;m=c[m>>2]|0;l=n;return m|0}else if((f|0)==6){c[m>>2]=0;m=c[m>>2]|0;l=n;return m|0}return 0} +function Jd(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;k=p+24|0;j=p+20|0;o=p+16|0;h=p+12|0;n=p+8|0;m=p+4|0;i=p;c[k>>2]=b;c[j>>2]=d;c[o>>2]=e;c[h>>2]=f;c[n>>2]=g;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;Bf(c[(c[j>>2]|0)+(c[m>>2]<<2)>>2]|0)|0;e=0+((((Bf(c[(c[j>>2]|0)+(c[m>>2]<<2)>>2]|0)|0)-2090&65535)<<16>>16)*2251>>16)&255;a[(c[k>>2]|0)+(c[m>>2]|0)>>0]=e;if((a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0)<(a[c[o>>2]>>0]|0)){e=(c[k>>2]|0)+(c[m>>2]|0)|0;a[e>>0]=(a[e>>0]|0)+1<<24>>24}if((a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0)<=63)if((a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0)<0)f=0;else f=a[(c[k>>2]|0)+(c[m>>2]|0)>>0]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0]=(a[d>>0]|0)+f;e=(c[k>>2]|0)+(c[m>>2]|0)|0;a[e>>0]=(a[e>>0]|0)+4}e=Ff(Kd(((a[c[o>>2]>>0]<<16>>16)*29|0)+((a[c[o>>2]>>0]<<16>>16)*7281>>16)+2090|0,3967)|0)|0;c[(c[j>>2]|0)+(c[m>>2]<<2)>>2]=e;c[m>>2]=(c[m>>2]|0)+1}l=p;return}function Kd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Ld(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;j=q+28|0;k=q+24|0;p=q+20|0;h=q+16|0;o=q+12|0;n=q+8|0;m=q+4|0;i=q;c[j>>2]=b;c[k>>2]=d;c[p>>2]=e;c[h>>2]=f;c[o>>2]=g;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[o>>2]|0))break;f=a[(c[k>>2]|0)+(c[n>>2]|0)>>0]|0;if((c[n>>2]|0)==0&(c[h>>2]|0)==0){e=(Md(f,(a[c[p>>2]>>0]|0)-16|0)|0)&255;a[c[p>>2]>>0]=e}else{c[m>>2]=f+-4;c[i>>2]=8+(a[c[p>>2]>>0]|0);f=c[m>>2]|0;if((c[m>>2]|0)>(c[i>>2]|0)){f=(f<<1)-(c[i>>2]|0)|0;b=c[p>>2]|0}else b=c[p>>2]|0;a[b>>0]=(a[b>>0]|0)+f}if((a[c[p>>2]>>0]|0)<=63)if((a[c[p>>2]>>0]|0)<0)f=0;else f=a[c[p>>2]>>0]|0;else f=63;a[c[p>>2]>>0]=f;e=Ff(Kd(((a[c[p>>2]>>0]<<16>>16)*29|0)+((a[c[p>>2]>>0]<<16>>16)*7281>>16)+2090|0,3967)|0)|0;c[(c[j>>2]|0)+(c[n>>2]<<2)>>2]=e;c[n>>2]=(c[n>>2]|0)+1}l=q;return}function Md(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Nd(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+12|0;h=i+8|0;g=i+4|0;e=i;c[f>>2]=b;c[h>>2]=d;c[e>>2]=0;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[h>>2]|0))break;c[e>>2]=(a[(c[f>>2]|0)+(c[g>>2]|0)>>0]|0)+(c[e>>2]<<8);c[g>>2]=(c[g>>2]|0)+1}l=i;return c[e>>2]|0}function Od(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;n=o+20|0;k=o+16|0;m=o+12|0;j=o+8|0;h=o+4|0;i=o;c[n>>2]=a;c[k>>2]=d;c[m>>2]=e;c[j>>2]=f;c[h>>2]=g;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[h>>2]|0))break;a=(b[(c[k>>2]|0)+(c[i>>2]<<1)>>1]|0)+((N(((b[(c[m>>2]|0)+(c[i>>2]<<1)>>1]|0)-(b[(c[k>>2]|0)+(c[i>>2]<<1)>>1]|0)&65535)<<16>>16,(c[j>>2]&65535)<<16>>16)|0)>>2)&65535;b[(c[n>>2]|0)+(c[i>>2]<<1)>>1]=a;c[i>>2]=(c[i>>2]|0)+1}l=o;return}function Pd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+48|0;k=m+36|0;i=m+32|0;j=m+28|0;h=m+16|0;g=m+8|0;e=m+4|0;f=m;c[k>>2]=a;c[i>>2]=b;c[j>>2]=d;c[e>>2]=0;c[f>>2]=0;if(!(c[(c[k>>2]|0)+12>>2]|0)){l=m;return}c[e>>2]=256-(c[(c[k>>2]|0)+8>>2]|0)<<10;c[f>>2]=c[e>>2]>>16;c[e>>2]=(c[e>>2]|0)-(c[f>>2]<<16);Qd(h,g,c[f>>2]|0,c[e>>2]|0);if(((c[(c[k>>2]|0)+8>>2]|0)+(c[(c[k>>2]|0)+12>>2]|0)|0)<=256)if(((c[(c[k>>2]|0)+8>>2]|0)+(c[(c[k>>2]|0)+12>>2]|0)|0)<0)e=0;else e=(c[(c[k>>2]|0)+8>>2]|0)+(c[(c[k>>2]|0)+12>>2]|0)|0;else e=256;c[(c[k>>2]|0)+8>>2]=e;wf(c[i>>2]|0,h,g,c[k>>2]|0,c[i>>2]|0,c[j>>2]|0,1);l=m;return}function Qd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;g=m+20|0;f=m+16|0;i=m+12|0;h=m+8|0;k=m+4|0;j=m;c[g>>2]=a;c[f>>2]=b;c[i>>2]=d;c[h>>2]=e;if((c[i>>2]|0)>=4){k=c[g>>2]|0;c[k>>2]=c[4473];c[k+4>>2]=c[4474];c[k+8>>2]=c[4475];k=c[f>>2]|0;c[k>>2]=c[4484];c[k+4>>2]=c[4485];l=m;return}if((c[h>>2]|0)<=0){k=c[g>>2]|0;j=17844+((c[i>>2]|0)*12|0)|0;c[k>>2]=c[j>>2];c[k+4>>2]=c[j+4>>2];c[k+8>>2]=c[j+8>>2];k=c[f>>2]|0;j=17904+(c[i>>2]<<3)|0;c[k>>2]=c[j>>2];c[k+4>>2]=c[j+4>>2];l=m;return}d=(c[h>>2]|0)<32768;c[k>>2]=0;if(d){while(1){if((c[k>>2]|0)>=3)break;d=N((c[17844+(((c[i>>2]|0)+1|0)*12|0)+(c[k>>2]<<2)>>2]|0)-(c[17844+((c[i>>2]|0)*12|0)+(c[k>>2]<<2)>>2]|0)>>16,(c[h>>2]&65535)<<16>>16)|0;d=(c[17844+((c[i>>2]|0)*12|0)+(c[k>>2]<<2)>>2]|0)+(d+((N((c[17844+(((c[i>>2]|0)+1|0)*12|0)+(c[k>>2]<<2)>>2]|0)-(c[17844+((c[i>>2]|0)*12|0)+(c[k>>2]<<2)>>2]|0)&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[g>>2]|0)+(c[k>>2]<<2)>>2]=d;c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=0;while(1){if((c[j>>2]|0)>=2)break;k=N((c[17904+((c[i>>2]|0)+1<<3)+(c[j>>2]<<2)>>2]|0)-(c[17904+(c[i>>2]<<3)+(c[j>>2]<<2)>>2]|0)>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[17904+(c[i>>2]<<3)+(c[j>>2]<<2)>>2]|0)+(k+((N((c[17904+((c[i>>2]|0)+1<<3)+(c[j>>2]<<2)>>2]|0)-(c[17904+(c[i>>2]<<3)+(c[j>>2]<<2)>>2]|0)&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[f>>2]|0)+(c[j>>2]<<2)>>2]=k;c[j>>2]=(c[j>>2]|0)+1}l=m;return}else{while(1){if((c[k>>2]|0)>=3)break;d=N((c[17844+(((c[i>>2]|0)+1|0)*12|0)+(c[k>>2]<<2)>>2]|0)-(c[17844+((c[i>>2]|0)*12|0)+(c[k>>2]<<2)>>2]|0)>>16,((c[h>>2]|0)-65536&65535)<<16>>16)|0;d=(c[17844+(((c[i>>2]|0)+1|0)*12|0)+(c[k>>2]<<2)>>2]|0)+(d+((N((c[17844+(((c[i>>2]|0)+1|0)*12|0)+(c[k>>2]<<2)>>2]|0)-(c[17844+((c[i>>2]|0)*12|0)+(c[k>>2]<<2)>>2]|0)&65535,((c[h>>2]|0)-65536&65535)<<16>>16)|0)>>16))|0;c[(c[g>>2]|0)+(c[k>>2]<<2)>>2]=d;c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=0;while(1){if((c[j>>2]|0)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2]|0)+(c[p>>2]<<1)>>1]|0)+((b[s+(c[p>>2]<<1)>>1]<<14|0)/(c[n>>2]|0)|0);if((c[m>>2]|0)>32767)f=32767;else f=(c[m>>2]|0)<0?0:c[m>>2]|0;b[(c[q>>2]|0)+(c[p>>2]<<1)>>1]=f;c[p>>2]=(c[p>>2]|0)+1}Nf(c[q>>2]|0,c[(c[r>>2]|0)+32>>2]|0,b[(c[r>>2]|0)+2>>1]|0);l=t;return}function Sd(e,f,g,h,i){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;r=l;l=l+32|0;q=r+24|0;k=r+20|0;o=r+16|0;p=r+12|0;s=r+28|0;j=r+8|0;m=r+4|0;n=r;c[q>>2]=e;c[k>>2]=f;c[o>>2]=g;c[p>>2]=h;b[s>>1]=i;c[m>>2]=0;c[j>>2]=(b[s>>1]|0)-1;while(1){if((c[j>>2]|0)<0)break;c[n>>2]=(N((c[m>>2]&65535)<<16>>16,d[(c[o>>2]|0)+(c[j>>2]|0)>>0]|0)|0)>>8;c[m>>2]=a[(c[k>>2]|0)+(c[j>>2]|0)>>0]<<10;f=c[m>>2]|0;if((c[m>>2]|0)<=0){if((f|0)<0)c[m>>2]=(c[m>>2]|0)+102}else c[m>>2]=f-102;s=N(c[m>>2]>>16,(c[p>>2]&65535)<<16>>16)|0;c[m>>2]=(c[n>>2]|0)+(s+((N(c[m>>2]&65535,(c[p>>2]&65535)<<16>>16)|0)>>16));b[(c[q>>2]|0)+(c[j>>2]<<1)>>1]=c[m>>2];c[j>>2]=(c[j>>2]|0)+-1}l=r;return}function Td(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}Ud(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function Ud(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=Vd(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(Wd(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function Vd(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function Wd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function Xd(d,e,f,g,h,i,j,k,m,n,o,p,q,r,s){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=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]|0)>1)k=c[(c[o>>2]|0)+(c[A>>2]<<2)>>2]|0;else k=1;c[u>>2]=_d(k,47)|0;if((c[(c[o>>2]|0)+(c[A>>2]<<2)>>2]|0)!=(c[(c[q>>2]|0)+4372>>2]|0))c[r>>2]=$d(c[(c[q>>2]|0)+4372>>2]|0,c[(c[o>>2]|0)+(c[A>>2]<<2)>>2]|0,16)|0;else c[r>>2]=65536;c[t>>2]=(c[u>>2]>>7)+1>>1;c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[(c[w>>2]|0)+4612>>2]|0))break;E=N(c[(c[B>>2]|0)+(c[s>>2]<<2)>>2]>>16,(c[t>>2]&65535)<<16>>16)|0;E=E+((N(c[(c[B>>2]|0)+(c[s>>2]<<2)>>2]&65535,(c[t>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[(c[B>>2]|0)+(c[s>>2]<<2)>>2]|0,(c[t>>2]>>15)+1>>1)|0)|0;c[(c[C>>2]|0)+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}c[(c[q>>2]|0)+4372>>2]=c[(c[o>>2]|0)+(c[A>>2]<<2)>>2];a:do if(c[(c[q>>2]|0)+4376>>2]|0){if(!(c[A>>2]|0)){E=N(c[u>>2]>>16,(c[p>>2]&65535)<<16>>16)|0;c[u>>2]=E+((N(c[u>>2]&65535,(c[p>>2]&65535)<<16>>16)|0)>>16)<<2}c[s>>2]=(c[(c[q>>2]|0)+4360>>2]|0)-(c[v>>2]|0)-2;while(1){if((c[s>>2]|0)>=(c[(c[q>>2]|0)+4360>>2]|0))break a;E=N(c[u>>2]>>16,b[(c[x>>2]|0)+(c[s>>2]<<1)>>1]|0)|0;E=E+((N(c[u>>2]&65535,b[(c[x>>2]|0)+(c[s>>2]<<1)>>1]|0)|0)>>16)|0;c[(c[y>>2]|0)+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}}while(0);if((c[r>>2]|0)==65536){l=D;return}c[s>>2]=(c[(c[q>>2]|0)+4364>>2]|0)-(c[(c[w>>2]|0)+4616>>2]|0);while(1){if((c[s>>2]|0)>=(c[(c[q>>2]|0)+4364>>2]|0))break;E=N(c[r>>2]>>16,(c[(c[q>>2]|0)+1280+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0;E=E+((N(c[r>>2]&65535,(c[(c[q>>2]|0)+1280+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[r>>2]|0,(c[(c[q>>2]|0)+1280+(c[s>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[q>>2]|0)+1280+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}b:do if((c[z>>2]|0)==2?(c[(c[q>>2]|0)+4376>>2]|0)==0:0){c[s>>2]=(c[(c[q>>2]|0)+4360>>2]|0)-(c[v>>2]|0)-2;while(1){if((c[s>>2]|0)>=(c[(c[q>>2]|0)+4360>>2]|0))break b;E=N(c[r>>2]>>16,(c[(c[y>>2]|0)+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0;E=E+((N(c[r>>2]&65535,(c[(c[y>>2]|0)+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[r>>2]|0,(c[(c[y>>2]|0)+(c[s>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[y>>2]|0)+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}}while(0);E=N(c[r>>2]>>16,(c[(c[q>>2]|0)+4352>>2]&65535)<<16>>16)|0;E=E+((N(c[r>>2]&65535,(c[(c[q>>2]|0)+4352>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[r>>2]|0,(c[(c[q>>2]|0)+4352>>2]>>15)+1>>1)|0)|0;c[(c[q>>2]|0)+4352>>2]=E;c[s>>2]=0;while(1){if((c[s>>2]|0)>=32)break;E=N(c[r>>2]>>16,(c[(c[q>>2]|0)+3840+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0;E=E+((N(c[r>>2]&65535,(c[(c[q>>2]|0)+3840+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[r>>2]|0,(c[(c[q>>2]|0)+3840+(c[s>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[q>>2]|0)+3840+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}c[s>>2]=0;while(1){if((c[s>>2]|0)>=16)break;E=N(c[r>>2]>>16,(c[(c[q>>2]|0)+4288+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0;E=E+((N(c[r>>2]&65535,(c[(c[q>>2]|0)+4288+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[r>>2]|0,(c[(c[q>>2]|0)+4288+(c[s>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[q>>2]|0)+4288+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}l=D;return}function Zd(d,e,f,g,h,i,j,k,m,n,o,p,q,r,s,t,u,v,w){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;t=t|0;u=u|0;v=v|0;w=w|0;var x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0;ma=l;l=l+176|0;ka=ma+168|0;ea=ma+164|0;ha=ma+160|0;U=ma+156|0;ia=ma+152|0;ba=ma+148|0;G=ma+144|0;H=ma+140|0;x=ma+136|0;L=ma+132|0;z=ma+128|0;F=ma+124|0;A=ma+120|0;na=ma+116|0;E=ma+112|0;Q=ma+108|0;la=ma+104|0;ca=ma+100|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C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-8>>2]&65535,b[(c[G>>2]|0)+4>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-12>>2]>>16,b[(c[G>>2]|0)+6>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-12>>2]&65535,b[(c[G>>2]|0)+6>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-16>>2]>>16,b[(c[G>>2]|0)+8>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-16>>2]&65535,b[(c[G>>2]|0)+8>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-20>>2]>>16,b[(c[G>>2]|0)+10>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-20>>2]&65535,b[(c[G>>2]|0)+10>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-24>>2]>>16,b[(c[G>>2]|0)+12>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-24>>2]&65535,b[(c[G>>2]|0)+12>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-28>>2]>>16,b[(c[G>>2]|0)+14>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-28>>2]&65535,b[(c[G>>2]|0)+14>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-32>>2]>>16,b[(c[G>>2]|0)+16>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-32>>2]&65535,b[(c[G>>2]|0)+16>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-36>>2]>>16,b[(c[G>>2]|0)+18>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-36>>2]&65535,b[(c[G>>2]|0)+18>>1]|0)|0)>>16));if((c[S>>2]|0)==16){na=N(c[(c[T>>2]|0)+-40>>2]>>16,b[(c[G>>2]|0)+20>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-40>>2]&65535,b[(c[G>>2]|0)+20>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-44>>2]>>16,b[(c[G>>2]|0)+22>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-44>>2]&65535,b[(c[G>>2]|0)+22>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-48>>2]>>16,b[(c[G>>2]|0)+24>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-48>>2]&65535,b[(c[G>>2]|0)+24>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-52>>2]>>16,b[(c[G>>2]|0)+26>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-52>>2]&65535,b[(c[G>>2]|0)+26>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-56>>2]>>16,b[(c[G>>2]|0)+28>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-56>>2]&65535,b[(c[G>>2]|0)+28>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-60>>2]>>16,b[(c[G>>2]|0)+30>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-60>>2]&65535,b[(c[G>>2]|0)+30>>1]|0)|0)>>16))}if((c[ea>>2]|0)==2){c[D>>2]=2;na=N(c[c[R>>2]>>2]>>16,b[c[H>>2]>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(na+((N(c[c[R>>2]>>2]&65535,b[c[H>>2]>>1]|0)|0)>>16));na=N(c[(c[R>>2]|0)+-4>>2]>>16,b[(c[H>>2]|0)+2>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(na+((N(c[(c[R>>2]|0)+-4>>2]&65535,b[(c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2];na=N(c[ga>>2]>>16,b[(c[x>>2]|0)+(c[K>>2]<<1)>>1]|0)|0;c[M>>2]=(c[M>>2]|0)+(na+((N(c[ga>>2]&65535,b[(c[x>>2]|0)+(c[K>>2]<<1)>>1]|0)|0)>>16));c[K>>2]=(c[K>>2]|0)+2}c[(c[ka>>2]|0)+4288+((c[ca>>2]|0)-1<<2)>>2]=c[fa>>2];na=N(c[fa>>2]>>16,b[(c[x>>2]|0)+((c[ca>>2]|0)-1<<1)>>1]|0)|0;c[M>>2]=(c[M>>2]|0)+(na+((N(c[fa>>2]&65535,b[(c[x>>2]|0)+((c[ca>>2]|0)-1<<1)>>1]|0)|0)>>16));c[M>>2]=c[M>>2]<<1;na=N(c[(c[ka>>2]|0)+4352>>2]>>16,(c[F>>2]&65535)<<16>>16)|0;c[M>>2]=(c[M>>2]|0)+(na+((N(c[(c[ka>>2]|0)+4352>>2]&65535,(c[F>>2]&65535)<<16>>16)|0)>>16));na=N(c[(c[ka>>2]|0)+1280+((c[(c[ka>>2]|0)+4364>>2]|0)-1<<2)>>2]>>16,(c[A>>2]&65535)<<16>>16)|0;c[O>>2]=na+((N(c[(c[ka>>2]|0)+1280+((c[(c[ka>>2]|0)+4364>>2]|0)-1<<2)>>2]&65535,(c[A>>2]&65535)<<16>>16)|0)>>16);na=(c[O>>2]|0)+(N(c[(c[ka>>2]|0)+4352>>2]>>16,c[A>>2]>>16)|0)|0;c[O>>2]=na+((N(c[(c[ka>>2]|0)+4352>>2]&65535,c[A>>2]>>16)|0)>>16);c[fa>>2]=(c[C>>2]<<2)-(c[M>>2]|0);c[fa>>2]=(c[fa>>2]|0)-(c[O>>2]|0);if((c[L>>2]|0)>0){na=N((c[c[da>>2]>>2]|0)+(c[(c[da>>2]|0)+-8>>2]|0)>>16,(c[z>>2]&65535)<<16>>16)|0;c[P>>2]=na+((N((c[c[da>>2]>>2]|0)+(c[(c[da>>2]|0)+-8>>2]|0)&65535,(c[z>>2]&65535)<<16>>16)|0)>>16);na=(c[P>>2]|0)+(N(c[(c[da>>2]|0)+-4>>2]>>16,c[z>>2]>>16)|0)|0;c[P>>2]=na+((N(c[(c[da>>2]|0)+-4>>2]&65535,c[z>>2]>>16)|0)>>16);c[P>>2]=c[P>>2]<<1;c[da>>2]=(c[da>>2]|0)+4;c[ga>>2]=(c[D>>2]|0)-(c[P>>2]|0);c[fa>>2]=(c[ga>>2]|0)+(c[fa>>2]<<1);c[fa>>2]=(c[fa>>2]>>2)+1>>1}else c[fa>>2]=(c[fa>>2]>>1)+1>>1;c[Y>>2]=(c[(c[ha>>2]|0)+(c[J>>2]<<2)>>2]|0)-(c[fa>>2]|0);if((c[(c[ka>>2]|0)+4368>>2]|0)<0)c[Y>>2]=0-(c[Y>>2]|0);if((c[Y>>2]|0)>30720)m=30720;else m=(c[Y>>2]|0)<-31744?-31744:c[Y>>2]|0;c[Y>>2]=m;c[W>>2]=(c[Y>>2]|0)-(c[Q>>2]|0);c[V>>2]=c[W>>2]>>10;m=c[V>>2]|0;do if((c[V>>2]|0)<=0){if(!m){c[W>>2]=c[Q>>2];c[X>>2]=(c[W>>2]|0)+944;c[Z>>2]=N((c[W>>2]&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;c[_>>2]=N((c[X>>2]&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;break}if((c[V>>2]|0)==-1){c[X>>2]=c[Q>>2];c[W>>2]=(c[X>>2]|0)-944;c[Z>>2]=N((0-(c[W>>2]|0)&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;c[_>>2]=N((c[X>>2]&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;break}else{c[W>>2]=(c[V>>2]<<10)+80;c[W>>2]=(c[W>>2]|0)+(c[Q>>2]|0);c[X>>2]=(c[W>>2]|0)+1024;c[Z>>2]=N((0-(c[W>>2]|0)&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;c[_>>2]=N((0-(c[X>>2]|0)&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;break}}else{c[W>>2]=(m<<10)-80;c[W>>2]=(c[W>>2]|0)+(c[Q>>2]|0);c[X>>2]=(c[W>>2]|0)+1024;c[Z>>2]=N((c[W>>2]&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;c[_>>2]=N((c[X>>2]&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0}while(0);c[$>>2]=(c[Y>>2]|0)-(c[W>>2]|0);c[Z>>2]=(c[Z>>2]|0)+(N((c[$>>2]&65535)<<16>>16,(c[$>>2]&65535)<<16>>16)|0);c[$>>2]=(c[Y>>2]|0)-(c[X>>2]|0);c[_>>2]=(c[_>>2]|0)+(N((c[$>>2]&65535)<<16>>16,(c[$>>2]&65535)<<16>>16)|0);if((c[_>>2]|0)<(c[Z>>2]|0))c[W>>2]=c[X>>2];a[(c[U>>2]|0)+(c[J>>2]|0)>>0]=(c[W>>2]>>9)+1>>1;c[I>>2]=c[W>>2]<<4;if((c[(c[ka>>2]|0)+4368>>2]|0)<0)c[I>>2]=0-(c[I>>2]|0);c[B>>2]=(c[I>>2]|0)+(c[D>>2]<<1);c[ja>>2]=(c[B>>2]|0)+(c[C>>2]<<4);na=N(c[ja>>2]>>16,(c[y>>2]&65535)<<16>>16)|0;na=na+((N(c[ja>>2]&65535,(c[y>>2]&65535)<<16>>16)|0)>>16)|0;if(((na+(N(c[ja>>2]|0,(c[y>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){na=N(c[ja>>2]>>16,(c[y>>2]&65535)<<16>>16)|0;na=na+((N(c[ja>>2]&65535,(c[y>>2]&65535)<<16>>16)|0)>>16)|0;if(((na+(N(c[ja>>2]|0,(c[y>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)m=-32768;else{m=N(c[ja>>2]>>16,(c[y>>2]&65535)<<16>>16)|0;m=m+((N(c[ja>>2]&65535,(c[y>>2]&65535)<<16>>16)|0)>>16)|0;m=(m+(N(c[ja>>2]|0,(c[y>>2]>>15)+1>>1)|0)>>7)+1>>1}}else m=32767;b[(c[ia>>2]|0)+(c[J>>2]<<1)>>1]=m;c[T>>2]=(c[T>>2]|0)+4;c[c[T>>2]>>2]=c[ja>>2];c[aa>>2]=(c[ja>>2]|0)-(c[M>>2]<<2);c[(c[ka>>2]|0)+4352>>2]=c[aa>>2];c[(c[ka>>2]|0)+1280+(c[(c[ka>>2]|0)+4364>>2]<<2)>>2]=(c[aa>>2]|0)-(c[O>>2]<<2);c[(c[ba>>2]|0)+(c[(c[ka>>2]|0)+4360>>2]<<2)>>2]=c[B>>2]<<1;na=(c[ka>>2]|0)+4364|0;c[na>>2]=(c[na>>2]|0)+1;na=(c[ka>>2]|0)+4360|0;c[na>>2]=(c[na>>2]|0)+1;c[(c[ka>>2]|0)+4368>>2]=(c[(c[ka>>2]|0)+4368>>2]|0)+(a[(c[U>>2]|0)+(c[J>>2]|0)>>0]|0);c[J>>2]=(c[J>>2]|0)+1}o=m+3840|0;m=(c[ka>>2]|0)+3840+(c[la>>2]<<2)|0;r=o+128|0;do{c[o>>2]=c[m>>2];o=o+4|0;m=m+4|0}while((o|0)<(r|0));l=ma;return}function _d(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+48|0;g=h+32|0;n=h+28|0;d=h+24|0;i=h+20|0;f=h+16|0;j=h+12|0;m=h+8|0;k=h+4|0;e=h;c[n>>2]=a;c[d>>2]=b;b=c[n>>2]|0;c[i>>2]=(ae((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[j>>2]=536870911/(c[m>>2]>>16|0)|0;c[e>>2]=c[j>>2]<<16;b=N(c[m>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;c[k>>2]=536870912-(b+((N(c[m>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))<<3;b=N(c[k>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;b=(c[e>>2]|0)+(b+((N(c[k>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))|0;c[e>>2]=b+(N(c[k>>2]|0,(c[j>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[i>>2]|0)-(c[d>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0)if((b|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];n=c[g>>2]|0;l=h;return n|0}else{c[g>>2]=0;n=c[g>>2]|0;l=h;return n|0}a=c[e>>2]|0;d=0-(c[f>>2]|0)|0;do if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>d|0)){b=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){b=2147483647>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){b=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){b=-2147483648>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}while(0);c[g>>2]=b<<0-(c[f>>2]|0);n=c[g>>2]|0;l=h;return n|0}function $d(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;h=l;l=l+48|0;g=h+40|0;q=h+36|0;p=h+32|0;i=h+28|0;k=h+24|0;j=h+20|0;f=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;e=h;c[q>>2]=a;c[p>>2]=b;c[i>>2]=d;b=c[q>>2]|0;c[k>>2]=(ae((c[q>>2]|0)>0?b:0-b|0)|0)-1;c[n>>2]=c[q>>2]<>2];b=c[p>>2]|0;c[j>>2]=(ae((c[p>>2]|0)>0?b:0-b|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;b=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=b+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);b=c[n>>2]|0;a=c[o>>2]|0;d=c[e>>2]|0;d=Xi(a|0,((a|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;d=Yi(d|0,y|0,32)|0;c[n>>2]=b-(d<<3);d=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(d+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[k>>2]|0)-(c[j>>2]|0)-(c[i>>2]|0);d=c[f>>2]|0;if((c[f>>2]|0)>=0)if((d|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];q=c[g>>2]|0;l=h;return q|0}else{c[g>>2]=0;q=c[g>>2]|0;l=h;return q|0}a=c[e>>2]|0;b=0-(c[f>>2]|0)|0;do if((-2147483648>>0-d|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>b|0)){d=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){d=2147483647>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>b|0)){d=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){d=-2147483648>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}while(0);c[g>>2]=d<<0-(c[f>>2]|0);q=c[g>>2]|0;l=h;return q|0}function ae(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function be(d,e,f,g,h,i,j,k,m,n,o,p,q,r,s){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;var t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0;ea=l;l=l+272|0;aa=ea+264|0;U=ea+260|0;O=ea+256|0;S=ea+252|0;ba=ea+248|0;F=ea+244|0;C=ea+240|0;t=ea+236|0;z=ea+232|0;H=ea+228|0;A=ea+224|0;x=ea+220|0;Y=ea+216|0;E=ea+212|0;D=ea+208|0;W=ea+204|0;K=ea+200|0;L=ea+196|0;Q=ea+192|0;B=ea+188|0;I=ea+184|0;R=ea+180|0;X=ea+176|0;P=ea+172|0;V=ea+168|0;v=ea+164|0;w=ea+160|0;u=ea+156|0;ca=ea+152|0;y=ea+148|0;M=ea+144|0;G=ea+140|0;T=ea+136|0;Z=ea+132|0;da=ea+128|0;J=ea;c[aa>>2]=d;c[U>>2]=e;c[O>>2]=f;c[S>>2]=g;c[ba>>2]=h;c[F>>2]=i;c[C>>2]=j;c[t>>2]=k;c[z>>2]=m;c[H>>2]=n;c[A>>2]=o;c[x>>2]=p;c[Y>>2]=q;c[E>>2]=r;c[D>>2]=s;c[L>>2]=c[(c[U>>2]|0)+4356>>2];g=c[(c[aa>>2]|0)+4652>>2]|0;c[da>>2]=$()|0;j=l;l=l+((1*(g*1168|0)|0)+15&-16)|0;aj(j|0,0,(c[(c[aa>>2]|0)+4652>>2]|0)*1168|0)|0;c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[aa>>2]|0)+4652>>2]|0))break;c[Z>>2]=j+((c[K>>2]|0)*1168|0);c[(c[Z>>2]|0)+1156>>2]=(c[K>>2]|0)+(a[(c[O>>2]|0)+34>>0]|0)&3;c[(c[Z>>2]|0)+1160>>2]=c[(c[Z>>2]|0)+1156>>2];c[(c[Z>>2]|0)+1164>>2]=0;c[(c[Z>>2]|0)+1152>>2]=c[(c[U>>2]|0)+4352>>2];c[(c[Z>>2]|0)+960>>2]=c[(c[U>>2]|0)+1280+((c[(c[aa>>2]|0)+4616>>2]|0)-1<<2)>>2];k=c[Z>>2]|0;p=(c[U>>2]|0)+3840|0;m=k+128|0;do{c[k>>2]=c[p>>2];k=k+4|0;p=p+4|0}while((k|0)<(m|0));k=(c[Z>>2]|0)+1088|0;p=(c[U>>2]|0)+4288|0;m=k+64|0;do{c[k>>2]=c[p>>2];k=k+4|0;p=p+4|0}while((k|0)<(m|0));c[K>>2]=(c[K>>2]|0)+1}c[M>>2]=b[24558+(a[(c[O>>2]|0)+29>>0]>>1<<2)+(a[(c[O>>2]|0)+30>>0]<<1)>>1];c[P>>2]=0;c[V>>2]=ce(32,c[(c[aa>>2]|0)+4612>>2]|0)|0;a:do if((a[(c[O>>2]|0)+29>>0]|0)!=2){if((c[L>>2]|0)>0)c[V>>2]=ce(c[V>>2]|0,(c[L>>2]|0)-2-1|0)|0}else{c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[aa>>2]|0)+4604>>2]|0))break a;c[V>>2]=ce(c[V>>2]|0,(c[(c[Y>>2]|0)+(c[K>>2]<<2)>>2]|0)-2-1|0)|0;c[K>>2]=(c[K>>2]|0)+1}}while(0);if((a[(c[O>>2]|0)+31>>0]|0)==4)c[B>>2]=0;else c[B>>2]=1;p=l;l=l+((1*((c[(c[aa>>2]|0)+4616>>2]|0)+(c[(c[aa>>2]|0)+4608>>2]|0)<<2)|0)+15&-16)|0;m=l;l=l+((1*((c[(c[aa>>2]|0)+4616>>2]|0)+(c[(c[aa>>2]|0)+4608>>2]|0)<<1)|0)+15&-16)|0;o=l;l=l+((1*(c[(c[aa>>2]|0)+4612>>2]<<2)|0)+15&-16)|0;c[ca>>2]=(c[U>>2]|0)+(c[(c[aa>>2]|0)+4616>>2]<<1);c[(c[U>>2]|0)+4364>>2]=c[(c[aa>>2]|0)+4616>>2];c[(c[U>>2]|0)+4360>>2]=c[(c[aa>>2]|0)+4616>>2];c[R>>2]=0;c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[aa>>2]|0)+4604>>2]|0))break;c[v>>2]=(c[F>>2]|0)+((c[K>>2]>>1|1-(c[B>>2]|0))<<4<<1);c[w>>2]=(c[C>>2]|0)+((c[K>>2]|0)*5<<1);c[u>>2]=(c[t>>2]|0)+(c[K>>2]<<4<<1);c[y>>2]=c[(c[z>>2]|0)+(c[K>>2]<<2)>>2]>>2;c[y>>2]=c[y>>2]|c[(c[z>>2]|0)+(c[K>>2]<<2)>>2]>>1<<16;c[(c[U>>2]|0)+4376>>2]=0;if((a[(c[O>>2]|0)+29>>0]|0)==2?(c[L>>2]=c[(c[Y>>2]|0)+(c[K>>2]<<2)>>2],(c[K>>2]&3-(c[B>>2]<<1)|0)==0):0){if((c[K>>2]|0)==2){c[G>>2]=c[j+1164>>2];c[I>>2]=0;c[W>>2]=1;while(1){if((c[W>>2]|0)>=(c[(c[aa>>2]|0)+4652>>2]|0))break;if((c[j+((c[W>>2]|0)*1168|0)+1164>>2]|0)<(c[G>>2]|0)){c[G>>2]=c[j+((c[W>>2]|0)*1168|0)+1164>>2];c[I>>2]=c[W>>2]}c[W>>2]=(c[W>>2]|0)+1}c[W>>2]=0;while(1){if((c[W>>2]|0)>=(c[(c[aa>>2]|0)+4652>>2]|0))break;if((c[W>>2]|0)!=(c[I>>2]|0)){g=j+((c[W>>2]|0)*1168|0)+1164|0;c[g>>2]=(c[g>>2]|0)+134217727}c[W>>2]=(c[W>>2]|0)+1}c[Z>>2]=j+((c[I>>2]|0)*1168|0);c[X>>2]=(c[P>>2]|0)+(c[V>>2]|0);c[W>>2]=0;while(1){if((c[W>>2]|0)>=(c[V>>2]|0))break;c[X>>2]=(c[X>>2]|0)-1&31;a[(c[ba>>2]|0)+((c[W>>2]|0)-(c[V>>2]|0))>>0]=(c[(c[Z>>2]|0)+576+(c[X>>2]<<2)>>2]>>9)+1>>1;g=N(c[(c[Z>>2]|0)+704+(c[X>>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];c[I>>2]=0;c[K>>2]=1;while(1){if((c[K>>2]|0)>=(c[(c[aa>>2]|0)+4652>>2]|0))break;if((c[j+((c[K>>2]|0)*1168|0)+1164>>2]|0)<(c[G>>2]|0)){c[G>>2]=c[j+((c[K>>2]|0)*1168|0)+1164>>2];c[I>>2]=c[K>>2]}c[K>>2]=(c[K>>2]|0)+1}c[Z>>2]=j+((c[I>>2]|0)*1168|0);a[(c[O>>2]|0)+34>>0]=c[(c[Z>>2]|0)+1160>>2];c[X>>2]=(c[P>>2]|0)+(c[V>>2]|0);c[T>>2]=c[(c[x>>2]|0)+((c[(c[aa>>2]|0)+4604>>2]|0)-1<<2)>>2]>>6;c[W>>2]=0;while(1){if((c[W>>2]|0)>=(c[V>>2]|0))break;c[X>>2]=(c[X>>2]|0)-1&31;a[(c[ba>>2]|0)+((c[W>>2]|0)-(c[V>>2]|0))>>0]=(c[(c[Z>>2]|0)+576+(c[X>>2]<<2)>>2]>>9)+1>>1;ja=N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]>>16,(c[T>>2]&65535)<<16>>16)|0;ja=ja+((N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]&65535,(c[T>>2]&65535)<<16>>16)|0)>>16)|0;if(((ja+(N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]|0,(c[T>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){ja=N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]>>16,(c[T>>2]&65535)<<16>>16)|0;ja=ja+((N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]&65535,(c[T>>2]&65535)<<16>>16)|0)>>16)|0;if(((ja+(N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]|0,(c[T>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)k=-32768;else{k=N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]>>16,(c[T>>2]&65535)<<16>>16)|0;k=k+((N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]&65535,(c[T>>2]&65535)<<16>>16)|0)>>16)|0;k=(k+(N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]|0,(c[T>>2]>>15)+1>>1)|0)>>7)+1>>1}}else k=32767;b[(c[ca>>2]|0)+((c[W>>2]|0)-(c[V>>2]|0)<<1)>>1]=k;c[(c[U>>2]|0)+1280+((c[(c[U>>2]|0)+4364>>2]|0)-(c[V>>2]|0)+(c[W>>2]|0)<<2)>>2]=c[(c[Z>>2]|0)+960+(c[X>>2]<<2)>>2];c[W>>2]=(c[W>>2]|0)+1}k=(c[U>>2]|0)+3840|0;p=(c[Z>>2]|0)+(c[(c[aa>>2]|0)+4612>>2]<<2)|0;m=k+128|0;do{c[k>>2]=c[p>>2];k=k+4|0;p=p+4|0}while((k|0)<(m|0));k=(c[U>>2]|0)+4288|0;p=(c[Z>>2]|0)+1088|0;m=k+64|0;do{c[k>>2]=c[p>>2];k=k+4|0;p=p+4|0}while((k|0)<(m|0));c[(c[U>>2]|0)+4352>>2]=c[(c[Z>>2]|0)+1152>>2];c[(c[U>>2]|0)+4356>>2]=c[(c[Y>>2]|0)+((c[(c[aa>>2]|0)+4604>>2]|0)-1<<2)>>2];$i(c[U>>2]|0,(c[U>>2]|0)+(c[(c[aa>>2]|0)+4608>>2]<<1)|0,c[(c[aa>>2]|0)+4616>>2]<<1|0)|0;$i((c[U>>2]|0)+1280|0,(c[U>>2]|0)+1280+(c[(c[aa>>2]|0)+4608>>2]<<2)|0,c[(c[aa>>2]|0)+4616>>2]<<2|0)|0;_(c[da>>2]|0);l=ea;return}function ce(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function de(a,d,e,f,g,h,i,j,k,m,n,o,p,q){a=a|0;d=d|0;e=e|0;f=f|0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K>>2]|0)+(c[w>>2]<<2)>>2]=M;c[w>>2]=(c[w>>2]|0)+1}c[(c[t>>2]|0)+4372>>2]=c[(c[r>>2]|0)+(c[I>>2]<<2)>>2];a:do if(c[(c[t>>2]|0)+4376>>2]|0){if(!(c[I>>2]|0)){M=N(c[y>>2]>>16,(c[s>>2]&65535)<<16>>16)|0;c[y>>2]=M+((N(c[y>>2]&65535,(c[s>>2]&65535)<<16>>16)|0)>>16)<<2}c[w>>2]=(c[(c[t>>2]|0)+4360>>2]|0)-(c[A>>2]|0)-2;while(1){if((c[w>>2]|0)>=(c[(c[t>>2]|0)+4360>>2]|0))break a;M=N(c[y>>2]>>16,b[(c[F>>2]|0)+(c[w>>2]<<1)>>1]|0)|0;M=M+((N(c[y>>2]&65535,b[(c[F>>2]|0)+(c[w>>2]<<1)>>1]|0)|0)>>16)|0;c[(c[G>>2]|0)+(c[w>>2]<<2)>>2]=M;c[w>>2]=(c[w>>2]|0)+1}}while(0);if((c[v>>2]|0)==65536){l=L;return}c[w>>2]=(c[(c[t>>2]|0)+4364>>2]|0)-(c[(c[E>>2]|0)+4616>>2]|0);while(1){if((c[w>>2]|0)>=(c[(c[t>>2]|0)+4364>>2]|0))break;M=N(c[v>>2]>>16,(c[(c[t>>2]|0)+1280+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[t>>2]|0)+1280+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[t>>2]|0)+1280+(c[w>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[t>>2]|0)+1280+(c[w>>2]<<2)>>2]=M;c[w>>2]=(c[w>>2]|0)+1}b:do if((c[H>>2]|0)==2?(c[(c[t>>2]|0)+4376>>2]|0)==0:0){c[w>>2]=(c[(c[t>>2]|0)+4360>>2]|0)-(c[A>>2]|0)-2;while(1){if((c[w>>2]|0)>=((c[(c[t>>2]|0)+4360>>2]|0)-(c[u>>2]|0)|0))break b;M=N(c[v>>2]>>16,(c[(c[G>>2]|0)+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[G>>2]|0)+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[G>>2]|0)+(c[w>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[G>>2]|0)+(c[w>>2]<<2)>>2]=M;c[w>>2]=(c[w>>2]|0)+1}}while(0);c[z>>2]=0;while(1){if((c[z>>2]|0)>=(c[B>>2]|0))break;c[C>>2]=(c[D>>2]|0)+((c[z>>2]|0)*1168|0);M=N(c[v>>2]>>16,(c[(c[C>>2]|0)+1152>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[C>>2]|0)+1152>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[C>>2]|0)+1152>>2]>>15)+1>>1)|0)|0;c[(c[C>>2]|0)+1152>>2]=M;c[w>>2]=0;while(1){if((c[w>>2]|0)>=32)break;M=N(c[v>>2]>>16,(c[(c[C>>2]|0)+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[C>>2]|0)+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[C>>2]|0)+(c[w>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[C>>2]|0)+(c[w>>2]<<2)>>2]=M;c[w>>2]=(c[w>>2]|0)+1}c[w>>2]=0;while(1){if((c[w>>2]|0)>=16)break;M=N(c[v>>2]>>16,(c[(c[C>>2]|0)+1088+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[C>>2]|0)+1088+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[C>>2]|0)+1088+(c[w>>2]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c[(c[Ka>>2]|0)+1156>>2]|0)<0)c[qa>>2]=0-(c[qa>>2]|0);if((c[qa>>2]|0)>30720)o=30720;else o=(c[qa>>2]|0)<-31744?-31744:c[qa>>2]|0;c[qa>>2]=o;c[oa>>2]=(c[qa>>2]|0)-(c[ha>>2]|0);c[na>>2]=c[oa>>2]>>10;o=c[na>>2]|0;do if((c[na>>2]|0)<=0){if(!o){c[oa>>2]=c[ha>>2];c[pa>>2]=(c[oa>>2]|0)+944;c[ra>>2]=N((c[oa>>2]&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;c[sa>>2]=N((c[pa>>2]&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;break}if((c[na>>2]|0)==-1){c[pa>>2]=c[ha>>2];c[oa>>2]=(c[pa>>2]|0)-944;c[ra>>2]=N((0-(c[oa>>2]|0)&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;c[sa>>2]=N((c[pa>>2]&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;break}else{c[oa>>2]=(c[na>>2]<<10)+80;c[oa>>2]=(c[oa>>2]|0)+(c[ha>>2]|0);c[pa>>2]=(c[oa>>2]|0)+1024;c[ra>>2]=N((0-(c[oa>>2]|0)&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;c[sa>>2]=N((0-(c[pa>>2]|0)&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;break}}else{c[oa>>2]=(o<<10)-80;c[oa>>2]=(c[oa>>2]|0)+(c[ha>>2]|0);c[pa>>2]=(c[oa>>2]|0)+1024;c[ra>>2]=N((c[oa>>2]&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;c[sa>>2]=N((c[pa>>2]&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0}while(0);c[ta>>2]=(c[qa>>2]|0)-(c[oa>>2]|0);c[ra>>2]=(c[ra>>2]|0)+(N((c[ta>>2]&65535)<<16>>16,(c[ta>>2]&65535)<<16>>16)|0)>>10;c[ta>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>16))<<3;b=N(c[k>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;b=(c[e>>2]|0)+(b+((N(c[k>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))|0;c[e>>2]=b+(N(c[k>>2]|0,(c[j>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[i>>2]|0)-(c[d>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0)if((b|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];n=c[g>>2]|0;l=h;return n|0}else{c[g>>2]=0;n=c[g>>2]|0;l=h;return n|0}a=c[e>>2]|0;d=0-(c[f>>2]|0)|0;do if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>d|0)){b=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){b=2147483647>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){b=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){b=-2147483648>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}while(0);c[g>>2]=b<<0-(c[f>>2]|0);n=c[g>>2]|0;l=h;return n|0}function ge(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;h=l;l=l+48|0;g=h+40|0;q=h+36|0;p=h+32|0;i=h+28|0;k=h+24|0;j=h+20|0;f=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;e=h;c[q>>2]=a;c[p>>2]=b;c[i>>2]=d;b=c[q>>2]|0;c[k>>2]=(he((c[q>>2]|0)>0?b:0-b|0)|0)-1;c[n>>2]=c[q>>2]<>2];b=c[p>>2]|0;c[j>>2]=(he((c[p>>2]|0)>0?b:0-b|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;b=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=b+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);b=c[n>>2]|0;a=c[o>>2]|0;d=c[e>>2]|0;d=Xi(a|0,((a|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;d=Yi(d|0,y|0,32)|0;c[n>>2]=b-(d<<3);d=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(d+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[k>>2]|0)-(c[j>>2]|0)-(c[i>>2]|0);d=c[f>>2]|0;if((c[f>>2]|0)>=0)if((d|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];q=c[g>>2]|0;l=h;return q|0}else{c[g>>2]=0;q=c[g>>2]|0;l=h;return q|0}a=c[e>>2]|0;b=0-(c[f>>2]|0)|0;do if((-2147483648>>0-d|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>b|0)){d=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){d=2147483647>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>b|0)){d=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){d=-2147483648>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}while(0);c[g>>2]=d<<0-(c[f>>2]|0);q=c[g>>2]|0;l=h;return q|0}function he(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function ie(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;c[(c[d>>2]|0)+4168>>2]=c[(c[d>>2]|0)+2328>>2]<<7;c[(c[d>>2]|0)+4168+72>>2]=65536;c[(c[d>>2]|0)+4168+72+4>>2]=65536;c[(c[d>>2]|0)+4168+88>>2]=20;c[(c[d>>2]|0)+4168+84>>2]=2;l=b;return}function je(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;k=m+16|0;g=m+12|0;i=m+8|0;j=m+4|0;h=m;c[k>>2]=a;c[g>>2]=b;c[i>>2]=d;c[j>>2]=e;c[h>>2]=f;if((c[(c[k>>2]|0)+2316>>2]|0)!=(c[(c[k>>2]|0)+4168+80>>2]|0)){ie(c[k>>2]|0);c[(c[k>>2]|0)+4168+80>>2]=c[(c[k>>2]|0)+2316>>2]}d=c[k>>2]|0;f=c[g>>2]|0;if(c[j>>2]|0){ke(d,f,c[i>>2]|0,c[h>>2]|0);k=(c[k>>2]|0)+4160|0;c[k>>2]=(c[k>>2]|0)+1;l=m;return}else{le(d,f);l=m;return}}function ke(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0;O=l;l=l+176|0;G=O+120|0;H=O+116|0;B=O+112|0;o=O+108|0;C=O+104|0;D=O+100|0;u=O+96|0;E=O+92|0;r=O+88|0;y=O+84|0;j=O+80|0;k=O+76|0;K=O+72|0;q=O+68|0;w=O+64|0;t=O+60|0;h=O+56|0;i=O+52|0;x=O+48|0;v=O+44|0;A=O+40|0;n=O+36|0;J=O+160|0;m=O+32|0;L=O+28|0;z=O+128|0;I=O+24|0;F=O+16|0;M=O+8|0;s=O+4|0;p=O;c[G>>2]=a;c[H>>2]=d;c[B>>2]=e;c[o>>2]=f;c[I>>2]=(c[G>>2]|0)+4168;g=(c[(c[G>>2]|0)+2336>>2]|0)+(c[(c[G>>2]|0)+2328>>2]|0)|0;c[M>>2]=$()|0;d=l;l=l+((1*(g<<2)|0)+15&-16)|0;g=l;l=l+((1*(c[(c[G>>2]|0)+2336>>2]<<1)|0)+15&-16)|0;c[F>>2]=c[(c[I>>2]|0)+72>>2]>>6;c[F+4>>2]=c[(c[I>>2]|0)+72+4>>2]>>6;if(c[(c[G>>2]|0)+2376>>2]|0){e=(c[I>>2]|0)+14|0;a=e+32|0;do{b[e>>1]=0;e=e+2|0}while((e|0)<(a|0))}me(h,j,i,k,(c[G>>2]|0)+4|0,F,c[(c[G>>2]|0)+2332>>2]|0,c[(c[G>>2]|0)+2324>>2]|0);e=(c[G>>2]|0)+4|0;f=c[(c[I>>2]|0)+84>>2]|0;if((c[h>>2]>>c[k>>2]|0)<(c[i>>2]>>c[j>>2]|0))c[x>>2]=e+((ne(0,(N(f-1|0,c[(c[I>>2]|0)+88>>2]|0)|0)-128|0)|0)<<2);else c[x>>2]=e+((ne(0,(N(f,c[(c[I>>2]|0)+88>>2]|0)|0)-128|0)|0)<<2);c[m>>2]=(c[I>>2]|0)+4;b[J>>1]=b[(c[I>>2]|0)+56>>1]|0;c[q>>2]=b[24440+((oe(1,c[(c[G>>2]|0)+4160>>2]|0)|0)<<1)>>1];k=(c[(c[G>>2]|0)+4164>>2]|0)==2;f=oe(1,c[(c[G>>2]|0)+4160>>2]|0)|0;if(k)c[w>>2]=b[24444+(f<<1)>>1];else c[w>>2]=b[24448+(f<<1)>>1];yf((c[I>>2]|0)+14|0,c[(c[G>>2]|0)+2340>>2]|0,64881);_i(z|0,(c[I>>2]|0)+14|0,c[(c[G>>2]|0)+2340>>2]<<1|0)|0;do if(!(c[(c[G>>2]|0)+4160>>2]|0)){b[J>>1]=16384;if((c[(c[G>>2]|0)+4164>>2]|0)!=2){c[s>>2]=Hf((c[I>>2]|0)+14|0,c[(c[G>>2]|0)+2340>>2]|0)|0;c[p>>2]=qe(134217728,c[s>>2]|0)|0;c[p>>2]=re(4194304,c[p>>2]|0)|0;c[p>>2]=c[p>>2]<<3;s=N(c[p>>2]>>16,(c[w>>2]&65535)<<16>>16)|0;c[w>>2]=s+((N(c[p>>2]&65535,(c[w>>2]&65535)<<16>>16)|0)>>16)>>14;break}c[C>>2]=0;while(1){if((c[C>>2]|0)>=5)break;b[J>>1]=(b[J>>1]|0)-(b[(c[m>>2]|0)+(c[C>>2]<<1)>>1]|0);c[C>>2]=(c[C>>2]|0)+1}b[J>>1]=pe(3277,b[J>>1]|0)|0;b[J>>1]=(N(b[J>>1]|0,b[(c[I>>2]|0)+68>>1]|0)|0)>>14}while(0);c[K>>2]=c[(c[I>>2]|0)+52>>2];c[E>>2]=(c[c[I>>2]>>2]>>7)+1>>1;c[y>>2]=c[(c[G>>2]|0)+2336>>2];c[r>>2]=(c[(c[G>>2]|0)+2336>>2]|0)-(c[E>>2]|0)-(c[(c[G>>2]|0)+2340>>2]|0)-2;Gf(g+(c[r>>2]<<1)|0,(c[G>>2]|0)+1348+(c[r>>2]<<1)|0,z,(c[(c[G>>2]|0)+2336>>2]|0)-(c[r>>2]|0)|0,c[(c[G>>2]|0)+2340>>2]|0,c[o>>2]|0);c[t>>2]=se(c[(c[I>>2]|0)+72+4>>2]|0,46)|0;c[t>>2]=(c[t>>2]|0)<1073741823?c[t>>2]|0:1073741823;c[C>>2]=(c[r>>2]|0)+(c[(c[G>>2]|0)+2340>>2]|0);while(1){if((c[C>>2]|0)>=(c[(c[G>>2]|0)+2336>>2]|0))break;s=N(c[t>>2]>>16,b[g+(c[C>>2]<<1)>>1]|0)|0;s=s+((N(c[t>>2]&65535,b[g+(c[C>>2]<<1)>>1]|0)|0)>>16)|0;c[d+(c[C>>2]<<2)>>2]=s;c[C>>2]=(c[C>>2]|0)+1}c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[(c[G>>2]|0)+2324>>2]|0))break;c[v>>2]=d+((c[y>>2]|0)-(c[E>>2]|0)+2<<2);c[C>>2]=0;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15)+1>>1)|0)>>7)+1>>1}}else f=32767;if((f|0)<=32767){y=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;y=y+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((y+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){y=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;y=y+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((y+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)f=-32768;else{f=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;f=f+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;f=(f+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1}}else f=32767;if((f|0)>=-32768){y=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;y=y+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((y+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){y=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;y=y+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((y+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)f=-32768;else{f=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;f=f+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;f=(f+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1}}else f=32767}else f=-32768}else f=32767;b[(c[B>>2]|0)+(c[C>>2]<<1)>>1]=f;c[C>>2]=(c[C>>2]|0)+1}e=f+1284|0;f=(c[L>>2]|0)+(c[(c[G>>2]|0)+2328>>2]<<2)|0;a=e+64|0;do{c[e>>2]=c[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(a|0));c[(c[I>>2]|0)+52>>2]=c[K>>2];b[(c[I>>2]|0)+56>>1]=b[J>>1]|0;c[C>>2]=0;while(1){if((c[C>>2]|0)>=4)break;c[(c[H>>2]|0)+(c[C>>2]<<2)>>2]=c[E>>2];c[C>>2]=(c[C>>2]|0)+1}_(c[M>>2]|0);l=O;return}function le(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;i=r+40|0;j=r+36|0;f=r+32|0;o=r+28|0;g=r+24|0;h=r+20|0;k=r+16|0;m=r+12|0;p=r+8|0;n=r+4|0;q=r;c[i>>2]=d;c[j>>2]=e;c[k>>2]=(c[i>>2]|0)+4168;c[(c[i>>2]|0)+4164>>2]=a[(c[i>>2]|0)+2736+29>>0];c[f>>2]=0;a:do if((a[(c[i>>2]|0)+2736+29>>0]|0)==2){c[h>>2]=0;while(1){e=N(c[h>>2]|0,c[(c[i>>2]|0)+2332>>2]|0)|0;if((e|0)>=(c[(c[j>>2]|0)+((c[(c[i>>2]|0)+2324>>2]|0)-1<<2)>>2]|0))break;if((c[h>>2]|0)==(c[(c[i>>2]|0)+2324>>2]|0))break;c[o>>2]=0;c[g>>2]=0;while(1){if((c[g>>2]|0)>=5)break;c[o>>2]=(c[o>>2]|0)+(b[(c[j>>2]|0)+96+((((c[(c[i>>2]|0)+2324>>2]|0)-1-(c[h>>2]|0)|0)*5|0)+(c[g>>2]|0)<<1)>>1]|0);c[g>>2]=(c[g>>2]|0)+1}if((c[o>>2]|0)>(c[f>>2]|0)){c[f>>2]=c[o>>2];e=(c[k>>2]|0)+4|0;d=(c[j>>2]|0)+96+((((c[(c[i>>2]|0)+2324>>2]|0)-1-(c[h>>2]|0)&65535)<<16>>16)*5<<1)|0;b[e>>1]=b[d>>1]|0;b[e+2>>1]=b[d+2>>1]|0;b[e+4>>1]=b[d+4>>1]|0;b[e+6>>1]=b[d+6>>1]|0;b[e+8>>1]=b[d+8>>1]|0;c[c[k>>2]>>2]=c[(c[j>>2]|0)+((c[(c[i>>2]|0)+2324>>2]|0)-1-(c[h>>2]|0)<<2)>>2]<<8}c[h>>2]=(c[h>>2]|0)+1}o=(c[k>>2]|0)+4|0;c[o>>2]=0;c[o+4>>2]=0;b[o+8>>1]=0;b[(c[k>>2]|0)+4+4>>1]=c[f>>2];if((c[f>>2]|0)<11469){c[p>>2]=11744256;c[m>>2]=(c[p>>2]|0)/(((c[f>>2]|0)>1?c[f>>2]|0:1)|0)|0;c[g>>2]=0;while(1){if((c[g>>2]|0)>=5)break a;q=(N(b[(c[k>>2]|0)+4+(c[g>>2]<<1)>>1]|0,(c[m>>2]&65535)<<16>>16)|0)>>10&65535;b[(c[k>>2]|0)+4+(c[g>>2]<<1)>>1]=q;c[g>>2]=(c[g>>2]|0)+1}}if((c[f>>2]|0)>15565){c[q>>2]=255016960;c[n>>2]=(c[q>>2]|0)/(((c[f>>2]|0)>1?c[f>>2]|0:1)|0)|0;c[g>>2]=0;while(1){if((c[g>>2]|0)>=5)break a;q=(N(b[(c[k>>2]|0)+4+(c[g>>2]<<1)>>1]|0,(c[n>>2]&65535)<<16>>16)|0)>>14&65535;b[(c[k>>2]|0)+4+(c[g>>2]<<1)>>1]=q;c[g>>2]=(c[g>>2]|0)+1}}}else{c[c[k>>2]>>2]=((c[(c[i>>2]|0)+2316>>2]&65535)<<16>>16)*18<<8;q=(c[k>>2]|0)+4|0;c[q>>2]=0;c[q+4>>2]=0;b[q+8>>1]=0}while(0);_i((c[k>>2]|0)+14|0,(c[j>>2]|0)+32+32|0,c[(c[i>>2]|0)+2340>>2]<<1|0)|0;b[(c[k>>2]|0)+68>>1]=c[(c[j>>2]|0)+136>>2];q=(c[k>>2]|0)+72|0;p=(c[j>>2]|0)+16+((c[(c[i>>2]|0)+2324>>2]|0)-2<<2)|0;c[q>>2]=c[p>>2];c[q+4>>2]=c[p+4>>2];c[(c[k>>2]|0)+88>>2]=c[(c[i>>2]|0)+2332>>2];c[(c[k>>2]|0)+84>>2]=c[(c[i>>2]|0)+2324>>2];l=r;return}function me(a,d,e,f,g,h,i,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+48|0;k=x+44|0;u=x+40|0;m=x+36|0;v=x+32|0;n=x+28|0;s=x+24|0;w=x+20|0;r=x+16|0;p=x+12|0;q=x+8|0;o=x+4|0;t=x;c[k>>2]=a;c[u>>2]=d;c[m>>2]=e;c[v>>2]=f;c[n>>2]=g;c[s>>2]=h;c[w>>2]=i;c[r>>2]=j;i=c[w>>2]<<1;c[t>>2]=$()|0;e=l;l=l+((1*(i<<1)|0)+15&-16)|0;c[o>>2]=e;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s>>2]|0)+(c[q>>2]<<2)>>2]&65535)<<16>>16)|0;i=c[(c[n>>2]|0)+((c[p>>2]|0)+(N((c[q>>2]|0)+(c[r>>2]|0)-2|0,c[w>>2]|0)|0)<<2)>>2]&65535;i=a+((N(i,(c[(c[s>>2]|0)+(c[q>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;a=c[(c[n>>2]|0)+((c[p>>2]|0)+(N((c[q>>2]|0)+(c[r>>2]|0)-2|0,c[w>>2]|0)|0)<<2)>>2]|0;a=i+(N(a,(c[(c[s>>2]|0)+(c[q>>2]<<2)>>2]>>15)+1>>1)|0)>>8}}else a=32767;b[(c[o>>2]|0)+(c[p>>2]<<1)>>1]=a;c[p>>2]=(c[p>>2]|0)+1}c[o>>2]=(c[o>>2]|0)+(c[w>>2]<<1);c[q>>2]=(c[q>>2]|0)+1}fg(c[k>>2]|0,c[u>>2]|0,e,c[w>>2]|0);fg(c[m>>2]|0,c[v>>2]|0,e+(c[w>>2]<<1)|0,c[w>>2]|0);_(c[t>>2]|0);l=x;return}function ne(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function oe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function pe(a,c){a=a|0;c=c|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+2|0;d=f;b[e>>1]=a;b[d>>1]=c;l=f;return ((b[e>>1]|0)>(b[d>>1]|0)?b[e>>1]|0:b[d>>1]|0)&65535|0}function qe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function re(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function se(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+48|0;g=h+32|0;n=h+28|0;d=h+24|0;i=h+20|0;f=h+16|0;j=h+12|0;m=h+8|0;k=h+4|0;e=h;c[n>>2]=a;c[d>>2]=b;b=c[n>>2]|0;c[i>>2]=(te((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[j>>2]=536870911/(c[m>>2]>>16|0)|0;c[e>>2]=c[j>>2]<<16;b=N(c[m>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;c[k>>2]=536870912-(b+((N(c[m>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))<<3;b=N(c[k>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;b=(c[e>>2]|0)+(b+((N(c[k>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))|0;c[e>>2]=b+(N(c[k>>2]|0,(c[j>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[i>>2]|0)-(c[d>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0)if((b|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];n=c[g>>2]|0;l=h;return n|0}else{c[g>>2]=0;n=c[g>>2]|0;l=h;return n|0}a=c[e>>2]|0;d=0-(c[f>>2]|0)|0;do if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>d|0)){b=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){b=2147483647>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){b=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){b=-2147483648>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}while(0);c[g>>2]=b<<0-(c[f>>2]|0);n=c[g>>2]|0;l=h;return n|0}function te(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function ue(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;o=r+40|0;j=r+36|0;n=r+32|0;m=r+28|0;h=r+24|0;g=r+20|0;p=r+16|0;i=r+12|0;f=r+8|0;k=r+4|0;q=r;c[o>>2]=a;c[j>>2]=d;c[n>>2]=e;c[p>>2]=(c[o>>2]|0)+4168;if(c[(c[o>>2]|0)+4160>>2]|0){fg((c[p>>2]|0)+60|0,(c[p>>2]|0)+64|0,c[j>>2]|0,c[n>>2]|0);o=1;q=c[p>>2]|0;q=q+48|0;c[q>>2]=o;l=r;return}a:do if(c[(c[o>>2]|0)+4168+48>>2]|0){fg(g,h,c[j>>2]|0,c[n>>2]|0);if((c[h>>2]|0)<=(c[(c[p>>2]|0)+64>>2]|0)){if((c[h>>2]|0)<(c[(c[p>>2]|0)+64>>2]|0))c[g>>2]=c[g>>2]>>(c[(c[p>>2]|0)+64>>2]|0)-(c[h>>2]|0)}else c[(c[p>>2]|0)+60>>2]=c[(c[p>>2]|0)+60>>2]>>(c[h>>2]|0)-(c[(c[p>>2]|0)+64>>2]|0);if((c[g>>2]|0)>(c[(c[p>>2]|0)+60>>2]|0)){c[f>>2]=te(c[(c[p>>2]|0)+60>>2]|0)|0;c[f>>2]=(c[f>>2]|0)-1;c[(c[p>>2]|0)+60>>2]=c[(c[p>>2]|0)+60>>2]<>2];o=c[g>>2]|0;c[g>>2]=o>>(re(24-(c[f>>2]|0)|0,0)|0);c[i>>2]=(c[(c[p>>2]|0)+60>>2]|0)/(((c[g>>2]|0)>1?c[g>>2]|0:1)|0)|0;c[k>>2]=(ve(c[i>>2]|0)|0)<<4;c[q>>2]=(65536-(c[k>>2]|0)|0)/(c[n>>2]|0)|0;c[q>>2]=c[q>>2]<<2;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break a;o=N(c[k>>2]>>16,b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]|0)|0;o=o+((N(c[k>>2]&65535,b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]|0)|0)>>16)&65535;b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]=o;c[k>>2]=(c[k>>2]|0)+(c[q>>2]|0);if((c[k>>2]|0)>65536)break a;c[m>>2]=(c[m>>2]|0)+1}}}while(0);o=0;q=c[p>>2]|0;q=q+48|0;c[q>>2]=o;l=r;return}function ve(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}we(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function we(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=te(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(xe(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function xe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function ye(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=l;l=l+80|0;g=d+68|0;f=d+64|0;e=d+32|0;h=d+16|0;i=d+8|0;j=d;c[g>>2]=a;c[f>>2]=b;ze(e,c[f>>2]|0,8);ze(h,e,4);ze(i,h,2);ze(j,i,1);Ae(c[g>>2]|0,c[i>>2]|0,c[j>>2]|0,30011);Ae(c[g>>2]|0,c[h>>2]|0,c[i>>2]|0,29859);Ae(c[g>>2]|0,c[e>>2]|0,c[h>>2]|0,29707);Ae(c[g>>2]|0,c[c[f>>2]>>2]|0,c[e>>2]|0,29555);Ae(c[g>>2]|0,c[(c[f>>2]|0)+8>>2]|0,c[e+4>>2]|0,29555);Ae(c[g>>2]|0,c[e+8>>2]|0,c[h+4>>2]|0,29707);Ae(c[g>>2]|0,c[(c[f>>2]|0)+16>>2]|0,c[e+8>>2]|0,29555);Ae(c[g>>2]|0,c[(c[f>>2]|0)+24>>2]|0,c[e+12>>2]|0,29555);Ae(c[g>>2]|0,c[h+8>>2]|0,c[i+4>>2]|0,29859);Ae(c[g>>2]|0,c[e+16>>2]|0,c[h+8>>2]|0,29707);Ae(c[g>>2]|0,c[(c[f>>2]|0)+32>>2]|0,c[e+16>>2]|0,29555);Ae(c[g>>2]|0,c[(c[f>>2]|0)+40>>2]|0,c[e+20>>2]|0,29555);Ae(c[g>>2]|0,c[e+24>>2]|0,c[h+12>>2]|0,29707);Ae(c[g>>2]|0,c[(c[f>>2]|0)+48>>2]|0,c[e+24>>2]|0,29555);Ae(c[g>>2]|0,c[(c[f>>2]|0)+56>>2]|0,c[e+28>>2]|0,29555);l=d;return}function ze(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;h=i+12|0;e=i+8|0;g=i+4|0;f=i;c[h>>2]=a;c[e>>2]=b;c[g>>2]=d;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[g>>2]|0))break;c[(c[h>>2]|0)+(c[f>>2]<<2)>>2]=(c[(c[e>>2]|0)+(c[f>>2]<<1<<2)>>2]|0)+(c[(c[e>>2]|0)+((c[f>>2]<<1)+1<<2)>>2]|0);c[f>>2]=(c[f>>2]|0)+1}l=i;return}function Ae(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;i=k+12|0;h=k+8|0;g=k+4|0;j=k;c[i>>2]=a;c[h>>2]=b;c[g>>2]=e;c[j>>2]=f;if((c[g>>2]|0)<=0){l=k;return}$b(c[i>>2]|0,c[h>>2]|0,(c[j>>2]|0)+(d[30163+(c[g>>2]|0)>>0]|0)|0,8);l=k;return}function Be(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;f=l;l=l+48|0;i=f+8|0;h=f+4|0;m=f;k=f+40|0;j=f+32|0;g=f+16|0;c[i>>2]=a;c[h>>2]=d;c[m>>2]=e;Ce(k,k+2|0,c[h>>2]|0,c[m>>2]|0,30011);Ce(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>1]=h;l=o;return}else{b[c[j>>2]>>1]=0;h=0;n=c[k>>2]|0;b[n>>1]=h;l=o;return}}function De(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;e=g+8|0;d=g+4|0;f=g;c[e>>2]=a;c[f>>2]=0;a=c[e>>2]|0;b=a+112|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[d>>2]=0;while(1){if((c[d>>2]|0)>=4)break;b=Ee(50/((c[d>>2]|0)+1|0)|0,1)|0;c[(c[e>>2]|0)+92+(c[d>>2]<<2)>>2]=b;c[d>>2]=(c[d>>2]|0)+1}c[d>>2]=0;while(1){a=c[e>>2]|0;if((c[d>>2]|0)>=4)break;c[(c[e>>2]|0)+60+(c[d>>2]<<2)>>2]=(c[a+92+(c[d>>2]<<2)>>2]|0)*100;c[(c[e>>2]|0)+76+(c[d>>2]<<2)>>2]=2147483647/(c[(c[e>>2]|0)+60+(c[d>>2]<<2)>>2]|0)|0;c[d>>2]=(c[d>>2]|0)+1}c[a+108>>2]=15;c[d>>2]=0;while(1){if((c[d>>2]|0)>=4)break;c[(c[e>>2]|0)+40+(c[d>>2]<<2)>>2]=25600;c[d>>2]=(c[d>>2]|0)+1}l=g;return c[f>>2]|0}function Ee(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Fe(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;C=l;l=l+144|0;w=C+132|0;F=C+128|0;t=C+124|0;q=C+120|0;p=C+116|0;E=C+112|0;D=C+108|0;j=C+104|0;h=C+100|0;i=C+96|0;u=C+92|0;k=C+88|0;v=C+84|0;m=C+80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>>2]|0)|0,3)|0);c[h>>2]=c[j>>2]>>2;c[i>>2]=0;c[o+(c[v>>2]<<2)>>2]=c[(c[x>>2]|0)+24+(c[v>>2]<<2)>>2];c[m>>2]=0;while(1){if((c[m>>2]|0)>=4)break;c[r>>2]=0;c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[h>>2]|0))break;c[n>>2]=b[f+((c[g+(c[v>>2]<<2)>>2]|0)+(c[k>>2]|0)+(c[i>>2]|0)<<1)>>1]>>3;c[r>>2]=(c[r>>2]|0)+(N((c[n>>2]&65535)<<16>>16,(c[n>>2]&65535)<<16>>16)|0);c[k>>2]=(c[k>>2]|0)+1}d=c[o+(c[v>>2]<<2)>>2]|0;a=c[r>>2]|0;if((c[m>>2]|0)<3){if(d+a&-2147483648|0)d=2147483647;else d=(c[o+(c[v>>2]<<2)>>2]|0)+(c[r>>2]|0)|0;a=c[v>>2]|0}else{if(d+(a>>1)&-2147483648|0)d=2147483647;else d=(c[o+(c[v>>2]<<2)>>2]|0)+(c[r>>2]>>1)|0;a=c[v>>2]|0}c[o+(a<<2)>>2]=d;c[i>>2]=(c[i>>2]|0)+(c[h>>2]|0);c[m>>2]=(c[m>>2]|0)+1}c[(c[x>>2]|0)+24+(c[v>>2]<<2)>>2]=c[r>>2];c[v>>2]=(c[v>>2]|0)+1}He(o,c[x>>2]|0);c[r>>2]=0;c[p>>2]=0;c[v>>2]=0;while(1){if((c[v>>2]|0)>=4)break;c[B>>2]=(c[o+(c[v>>2]<<2)>>2]|0)-(c[(c[x>>2]|0)+60+(c[v>>2]<<2)>>2]|0);d=c[v>>2]|0;if((c[B>>2]|0)>0){e=c[o+(c[v>>2]<<2)>>2]|0;if(!(c[o+(d<<2)>>2]&-8388608)){a=c[v>>2]|0;d=(e<<8|0)/((c[(c[x>>2]|0)+60+(c[v>>2]<<2)>>2]|0)+1|0)|0}else{a=c[v>>2]|0;d=(e|0)/((c[(c[x>>2]|0)+60+(c[v>>2]<<2)>>2]>>8)+1|0)|0}c[s+(a<<2)>>2]=d;c[u>>2]=(Bf(c[s+(c[v>>2]<<2)>>2]|0)|0)-1024;c[r>>2]=(c[r>>2]|0)+(N((c[u>>2]&65535)<<16>>16,(c[u>>2]&65535)<<16>>16)|0);if((c[B>>2]|0)<1048576){E=(Ie(c[B>>2]|0)|0)<<6>>16;E=N(E,(c[u>>2]&65535)<<16>>16)|0;F=(Ie(c[B>>2]|0)|0)<<6&65535;c[u>>2]=E+((N(F,(c[u>>2]&65535)<<16>>16)|0)>>16)}F=N(c[17944+(c[v>>2]<<2)>>2]>>16,(c[u>>2]&65535)<<16>>16)|0;c[p>>2]=(c[p>>2]|0)+(F+((N(c[17944+(c[v>>2]<<2)>>2]&65535,(c[u>>2]&65535)<<16>>16)|0)>>16))}else c[s+(d<<2)>>2]=256;c[v>>2]=(c[v>>2]|0)+1}c[r>>2]=(c[r>>2]|0)/4|0;c[q>>2]=((Ie(c[r>>2]|0)|0)*3&65535)<<16>>16;c[t>>2]=cg(0+(((c[q>>2]&65535)<<16>>16)*45e3>>16)-128|0)|0;F=(cg(c[p>>2]|0)|0)-16384<<1;c[(c[w>>2]|0)+4744>>2]=F;c[B>>2]=0;c[v>>2]=0;while(1){if((c[v>>2]|0)>=4)break;F=N((c[v>>2]|0)+1|0,(c[o+(c[v>>2]<<2)>>2]|0)-(c[(c[x>>2]|0)+60+(c[v>>2]<<2)>>2]|0)>>4)|0;c[B>>2]=(c[B>>2]|0)+F;c[v>>2]=(c[v>>2]|0)+1}if((c[B>>2]|0)>0){if((c[B>>2]|0)<32768){d=c[B>>2]|0;if((c[(c[w>>2]|0)+4608>>2]|0)==((c[(c[w>>2]|0)+4600>>2]|0)*10|0)){if((d|0)>32767)d=32767;else d=(c[B>>2]|0)<-32768?-32768:c[B>>2]|0;c[B>>2]=d<<16}else{if((d|0)>65535)d=65535;else d=(c[B>>2]|0)<-65536?-65536:c[B>>2]|0;c[B>>2]=d<<15}c[B>>2]=Ie(c[B>>2]|0)|0;F=N(32768+(c[B>>2]|0)>>16,(c[t>>2]&65535)<<16>>16)|0;c[t>>2]=F+((N(32768+(c[B>>2]|0)&65535,(c[t>>2]&65535)<<16>>16)|0)>>16)}}else c[t>>2]=c[t>>2]>>1;F=Ge(c[t>>2]>>7,255)|0;c[(c[w>>2]|0)+4556>>2]=F;F=N(c[t>>2]>>16,(c[t>>2]&65535)<<16>>16)|0;c[A>>2]=0+((F+((N(c[t>>2]&65535,(c[t>>2]&65535)<<16>>16)|0)>>16)&65535)<<16>>16<<12>>16);if((c[(c[w>>2]|0)+4608>>2]|0)==((c[(c[w>>2]|0)+4600>>2]|0)*10|0))c[A>>2]=c[A>>2]>>1;c[v>>2]=0;while(1){if((c[v>>2]|0)>=4)break;F=N((c[s+(c[v>>2]<<2)>>2]|0)-(c[(c[x>>2]|0)+40+(c[v>>2]<<2)>>2]|0)>>16,(c[A>>2]&65535)<<16>>16)|0;F=(c[(c[x>>2]|0)+40+(c[v>>2]<<2)>>2]|0)+(F+((N((c[s+(c[v>>2]<<2)>>2]|0)-(c[(c[x>>2]|0)+40+(c[v>>2]<<2)>>2]|0)&65535,(c[A>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[x>>2]|0)+40+(c[v>>2]<<2)>>2]=F;c[u>>2]=((Bf(c[(c[x>>2]|0)+40+(c[v>>2]<<2)>>2]|0)|0)-1024|0)*3;F=cg((c[u>>2]|0)-2048>>4)|0;c[(c[w>>2]|0)+4728+(c[v>>2]<<2)>>2]=F;c[v>>2]=(c[v>>2]|0)+1}F=c[y>>2]|0;_(c[z>>2]|0);l=C;return F|0}function Ge(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function He(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;j=m+28|0;k=m+24|0;f=m+20|0;h=m+16|0;i=m+12|0;e=m+8|0;d=m+4|0;g=m;c[j>>2]=a;c[k>>2]=b;if((c[(c[k>>2]|0)+108>>2]|0)<1e3)c[g>>2]=32767/((c[(c[k>>2]|0)+108>>2]>>4)+1|0)|0;else c[g>>2]=0;c[f>>2]=0;while(1){a=c[k>>2]|0;if((c[f>>2]|0)>=4)break;c[h>>2]=c[a+60+(c[f>>2]<<2)>>2];if((c[(c[j>>2]|0)+(c[f>>2]<<2)>>2]|0)+(c[(c[k>>2]|0)+92+(c[f>>2]<<2)>>2]|0)&-2147483648|0)a=2147483647;else a=(c[(c[j>>2]|0)+(c[f>>2]<<2)>>2]|0)+(c[(c[k>>2]|0)+92+(c[f>>2]<<2)>>2]|0)|0;c[i>>2]=a;c[e>>2]=2147483647/(c[i>>2]|0)|0;do if((c[i>>2]|0)<=(c[h>>2]<<3|0))if((c[i>>2]|0)<(c[h>>2]|0)){c[d>>2]=1024;break}else{a=N(c[e>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;a=a+((N(c[e>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16)|0;a=a+(N(c[e>>2]|0,(c[h>>2]>>15)+1>>1)|0)>>16<<11;b=N(c[e>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;b=b+((N(c[e>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16)|0;c[d>>2]=a+((b+(N(c[e>>2]|0,(c[h>>2]>>15)+1>>1)|0)&65535)<<11>>16);break}else c[d>>2]=128;while(0);c[d>>2]=Me(c[d>>2]|0,c[g>>2]|0)|0;b=N((c[e>>2]|0)-(c[(c[k>>2]|0)+76+(c[f>>2]<<2)>>2]|0)>>16,(c[d>>2]&65535)<<16>>16)|0;b=(c[(c[k>>2]|0)+76+(c[f>>2]<<2)>>2]|0)+(b+((N((c[e>>2]|0)-(c[(c[k>>2]|0)+76+(c[f>>2]<<2)>>2]|0)&65535,(c[d>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[k>>2]|0)+76+(c[f>>2]<<2)>>2]=b;c[h>>2]=2147483647/(c[(c[k>>2]|0)+76+(c[f>>2]<<2)>>2]|0)|0;c[h>>2]=(c[h>>2]|0)<16777215?c[h>>2]|0:16777215;c[(c[k>>2]|0)+60+(c[f>>2]<<2)>>2]=c[h>>2];c[f>>2]=(c[f>>2]|0)+1}k=a+108|0;c[k>>2]=(c[k>>2]|0)+1;l=m;return}function Ie(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}Je(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function Je(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=Ke(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(Le(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function Ke(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function Le(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function Me(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Ne(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;f=h+12|0;e=h+8|0;g=h+4|0;d=h;c[f>>2]=a;c[e>>2]=b;c[g>>2]=c[(c[f>>2]|0)+4600>>2];c[d>>2]=((c[g>>2]&65535)<<16>>16)*1e3;if(!(c[d>>2]|0)){e=c[f>>2]|0;c[d>>2]=c[((c[(c[f>>2]|0)+4596>>2]|0)<(c[(c[f>>2]|0)+4580>>2]|0)?e+4596|0:e+4580|0)>>2];c[g>>2]=(c[d>>2]|0)/1e3|0;g=c[g>>2]|0;l=h;return g|0}if(((c[d>>2]|0)<=(c[(c[f>>2]|0)+4580>>2]|0)?(c[d>>2]|0)<=(c[(c[f>>2]|0)+4588>>2]|0):0)?(c[d>>2]|0)>=(c[(c[f>>2]|0)+4592>>2]|0):0){if((c[(c[f>>2]|0)+16+8>>2]|0)>=256)c[(c[f>>2]|0)+16+12>>2]=0;if((c[(c[f>>2]|0)+4560>>2]|0)==0?(c[(c[e>>2]|0)+60>>2]|0)==0:0){g=c[g>>2]|0;l=h;return g|0}b=c[f>>2]|0;if((((c[(c[f>>2]|0)+4600>>2]&65535)<<16>>16)*1e3|0)>(c[(c[f>>2]|0)+4596>>2]|0)){if(!(c[b+16+12>>2]|0)){c[(c[f>>2]|0)+16+8>>2]=256;d=(c[f>>2]|0)+16|0;c[d>>2]=0;c[d+4>>2]=0}b=(c[f>>2]|0)+16|0;if(c[(c[e>>2]|0)+60>>2]|0){c[b+12>>2]=0;c[g>>2]=(c[(c[f>>2]|0)+4600>>2]|0)==16?12:8;g=c[g>>2]|0;l=h;return g|0}if((c[b+8>>2]|0)<=0){c[(c[e>>2]|0)+84>>2]=1;f=(c[e>>2]|0)+52|0;c[f>>2]=(c[f>>2]|0)-(((c[(c[e>>2]|0)+52>>2]|0)*5|0)/((c[(c[e>>2]|0)+24>>2]|0)+5|0)|0);g=c[g>>2]|0;l=h;return g|0}else{c[(c[f>>2]|0)+16+12>>2]=-2;g=c[g>>2]|0;l=h;return g|0}}if((((c[b+4600>>2]&65535)<<16>>16)*1e3|0)>=(c[(c[f>>2]|0)+4596>>2]|0)){if((c[(c[f>>2]|0)+16+12>>2]|0)>=0){g=c[g>>2]|0;l=h;return g|0}c[(c[f>>2]|0)+16+12>>2]=1;g=c[g>>2]|0;l=h;return g|0}b=c[f>>2]|0;if(c[(c[e>>2]|0)+60>>2]|0){c[g>>2]=(c[b+4600>>2]|0)==8?12:16;c[(c[f>>2]|0)+16+8>>2]=0;e=(c[f>>2]|0)+16|0;c[e>>2]=0;c[e+4>>2]=0;c[(c[f>>2]|0)+16+12>>2]=1;g=c[g>>2]|0;l=h;return g|0}if(!(c[b+16+12>>2]|0)){c[(c[e>>2]|0)+84>>2]=1;f=(c[e>>2]|0)+52|0;c[f>>2]=(c[f>>2]|0)-(((c[(c[e>>2]|0)+52>>2]|0)*5|0)/((c[(c[e>>2]|0)+24>>2]|0)+5|0)|0);g=c[g>>2]|0;l=h;return g|0}else{c[(c[f>>2]|0)+16+12>>2]=1;g=c[g>>2]|0;l=h;return g|0}}c[d>>2]=c[(c[f>>2]|0)+4580>>2];if((c[d>>2]|0)<(c[(c[f>>2]|0)+4588>>2]|0))b=c[d>>2]|0;else b=c[(c[f>>2]|0)+4588>>2]|0;c[d>>2]=b;if((c[d>>2]|0)>(c[(c[f>>2]|0)+4592>>2]|0))b=c[d>>2]|0;else b=c[(c[f>>2]|0)+4592>>2]|0;c[d>>2]=b;c[g>>2]=(c[d>>2]|0)/1e3|0;g=c[g>>2]|0;l=h;return g|0}function Oe(d,e,f,g,h,i,j,k,m){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=l;l=l+112|0;n=M+96|0;t=M+92|0;G=M+88|0;J=M+84|0;o=M+80|0;E=M+76|0;B=M+72|0;F=M+68|0;z=M+60|0;A=M+56|0;v=M+52|0;L=M+100|0;w=M+48|0;u=M+44|0;s=M+40|0;q=M+36|0;p=M+32|0;I=M+28|0;H=M+24|0;D=M+20|0;K=M+16|0;r=M+12|0;C=M+8|0;x=M+4|0;y=M;c[n>>2]=d;c[t>>2]=e;c[G>>2]=f;c[J>>2]=g;c[o>>2]=h;c[E>>2]=i;c[B>>2]=j;c[F>>2]=k;c[M+64>>2]=m;c[D>>2]=2147483647;c[r>>2]=0;c[A>>2]=0;while(1){if((c[A>>2]|0)>=3)break;c[y>>2]=51;c[w>>2]=c[17632+(c[A>>2]<<2)>>2];c[u>>2]=c[17644+(c[A>>2]<<2)>>2];c[s>>2]=c[17656+(c[A>>2]<<2)>>2];c[v>>2]=a[27259+(c[A>>2]|0)>>0];c[p>>2]=c[o>>2];c[q>>2]=c[n>>2];c[H>>2]=0;c[K>>2]=c[c[J>>2]>>2];c[z>>2]=0;while(1){if((c[z>>2]|0)>=(c[F>>2]|0))break;g=Ff(5333-(c[K>>2]|0)+896|0)|0;c[C>>2]=g-(c[y>>2]|0);Pe(L+(c[z>>2]|0)|0,I,x,c[q>>2]|0,c[p>>2]|0,c[u>>2]|0,c[s>>2]|0,c[w>>2]|0,c[E>>2]|0,c[C>>2]|0,c[v>>2]|0);if((c[H>>2]|0)+(c[I>>2]|0)&-2147483648|0)d=2147483647;else d=(c[H>>2]|0)+(c[I>>2]|0)|0;c[H>>2]=d;g=c[K>>2]|0;if(0>(g+(Bf((c[y>>2]|0)+(c[x>>2]|0)|0)|0)-896|0))d=0;else{d=c[K>>2]|0;d=d+(Bf((c[y>>2]|0)+(c[x>>2]|0)|0)|0)-896|0}c[K>>2]=d;c[q>>2]=(c[q>>2]|0)+10;c[p>>2]=(c[p>>2]|0)+100;c[z>>2]=(c[z>>2]|0)+1}c[H>>2]=2147483646<(c[H>>2]|0)?2147483646:c[H>>2]|0;if((c[H>>2]|0)<(c[D>>2]|0)){c[D>>2]=c[H>>2];a[c[G>>2]>>0]=c[A>>2];_i(c[t>>2]|0,L|0,c[F>>2]|0)|0;c[r>>2]=c[K>>2]}if(c[B>>2]|0?(c[H>>2]|0)<(b[12226]|0):0)break;c[A>>2]=(c[A>>2]|0)+1}c[u>>2]=c[17644+(a[c[G>>2]>>0]<<2)>>2];c[z>>2]=0;while(1){if((c[z>>2]|0)>=(c[F>>2]|0))break;c[A>>2]=0;while(1){if((c[A>>2]|0)>=5)break;b[(c[n>>2]|0)+(((c[z>>2]|0)*5|0)+(c[A>>2]|0)<<1)>>1]=a[(c[u>>2]|0)+(((a[(c[t>>2]|0)+(c[z>>2]|0)>>0]|0)*5|0)+(c[A>>2]|0))>>0]<<7;c[A>>2]=(c[A>>2]|0)+1}c[z>>2]=(c[z>>2]|0)+1}c[c[J>>2]>>2]=c[r>>2];l=M;return} +function Qh(d,e,f,h,i,j){d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0;ta=l;l=l+320|0;X=ta+80|0;W=ta+72|0;V=ta+64|0;U=ta+56|0;T=ta+48|0;S=ta+40|0;R=ta+32|0;Q=ta+24|0;P=ta+16|0;y=ta+8|0;x=ta;ra=ta+308|0;sa=ta+304|0;G=ta+300|0;ca=ta+296|0;ia=ta+292|0;ha=ta+288|0;H=ta+284|0;t=ta+280|0;D=ta+276|0;ba=ta+272|0;v=ta+268|0;na=ta+264|0;ga=ta+216|0;u=ta+212|0;o=ta+208|0;z=ta+204|0;m=ta+200|0;da=ta+196|0;J=ta+192|0;qa=ta+188|0;la=ta+184|0;O=ta+180|0;M=ta+176|0;ma=ta+172|0;I=ta+168|0;ka=ta+164|0;B=ta+160|0;Z=ta+156|0;A=ta+152|0;n=ta+148|0;Y=ta+144|0;ea=ta+140|0;ja=ta+136|0;C=ta+132|0;k=ta+128|0;pa=ta+124|0;oa=ta+120|0;r=ta+116|0;p=ta+112|0;s=ta+108|0;q=ta+104|0;w=ta+100|0;E=ta+96|0;L=ta+312|0;F=ta+92|0;aa=ta+88|0;fa=ta+84|0;c[sa>>2]=d;c[G>>2]=e;c[ca>>2]=f;c[ia>>2]=h;c[ha>>2]=i;c[H>>2]=j;c[v>>2]=0;c[na>>2]=0;c[da>>2]=0;c[O>>2]=0;c[ma>>2]=0;c[I>>2]=0;c[ka>>2]=0;c[ja>>2]=0;c[t>>2]=(c[sa>>2]|0)+(c[(c[sa>>2]|0)+4>>2]|0);c[D>>2]=(c[sa>>2]|0)+(c[c[sa>>2]>>2]|0);c[Y>>2]=(c[(c[sa>>2]|0)+12>>2]|0)/50|0;c[n>>2]=c[Y>>2]>>1;c[A>>2]=c[n>>2]>>1;c[Z>>2]=c[A>>2]>>1;if((c[ha>>2]|0)<(c[Z>>2]|0)){c[ra>>2]=-2;sa=c[ra>>2]|0;l=ta;return sa|0}if((c[ha>>2]|0)<(((c[(c[sa>>2]|0)+12>>2]|0)/25|0)*3|0))e=c[ha>>2]|0;else e=((c[(c[sa>>2]|0)+12>>2]|0)/25|0)*3|0;c[ha>>2]=e;if((c[ca>>2]|0)<=1){c[G>>2]=0;if((c[ha>>2]|0)<(c[(c[sa>>2]|0)+64>>2]|0))e=c[ha>>2]|0;else e=c[(c[sa>>2]|0)+64>>2]|0;c[ha>>2]=e}do if(!(c[G>>2]|0)){c[qa>>2]=c[ha>>2];c[la>>2]=c[(c[sa>>2]|0)+60>>2];if(!(c[la>>2]|0)){c[ba>>2]=0;while(1){if((c[ba>>2]|0)>=(N(c[qa>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0))break;g[(c[ia>>2]|0)+(c[ba>>2]<<2)>>2]=0.0;c[ba>>2]=(c[ba>>2]|0)+1}c[ra>>2]=c[qa>>2];sa=c[ra>>2]|0;l=ta;return sa|0}if((c[qa>>2]|0)>(c[Y>>2]|0)){while(1){c[k>>2]=Qh(c[sa>>2]|0,0,0,c[ia>>2]|0,(c[qa>>2]|0)<(c[Y>>2]|0)?c[qa>>2]|0:c[Y>>2]|0,0)|0;e=c[k>>2]|0;if((c[k>>2]|0)<0){j=20;break}pa=N(e,c[(c[sa>>2]|0)+8>>2]|0)|0;c[ia>>2]=(c[ia>>2]|0)+(pa<<2);c[qa>>2]=(c[qa>>2]|0)-(c[k>>2]|0);if((c[qa>>2]|0)<=0){j=22;break}}if((j|0)==20){c[ra>>2]=e;sa=c[ra>>2]|0;l=ta;return sa|0}else if((j|0)==22){c[ra>>2]=c[ha>>2];sa=c[ra>>2]|0;l=ta;return sa|0}}if((c[qa>>2]|0)<(c[Y>>2]|0)){if((c[qa>>2]|0)>(c[n>>2]|0)){c[qa>>2]=c[n>>2];break}if(((c[la>>2]|0)!=1e3?(c[qa>>2]|0)>(c[A>>2]|0):0)?(c[qa>>2]|0)<(c[n>>2]|0):0)c[qa>>2]=c[A>>2]}}else{c[qa>>2]=c[(c[sa>>2]|0)+64>>2];c[la>>2]=c[(c[sa>>2]|0)+56>>2];Hb(ga,c[G>>2]|0,c[ca>>2]|0)}while(0);c[C>>2]=0;c[z>>2]=1;c[m>>2]=1;do if(c[G>>2]|0?(c[(c[sa>>2]|0)+60>>2]|0)>0:0){if(!(((c[la>>2]|0)==1002?(c[(c[sa>>2]|0)+60>>2]|0)!=1002:0)?!(c[(c[sa>>2]|0)+68>>2]|0):0)){if((c[la>>2]|0)==1002)break;if((c[(c[sa>>2]|0)+60>>2]|0)!=1002)break}c[O>>2]=1;e=N(c[A>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0;if((c[la>>2]|0)==1002){c[m>>2]=e;break}else{c[z>>2]=e;break}}while(0);m=c[m>>2]|0;c[pa>>2]=$()|0;e=l;l=l+((1*(m<<2)|0)+15&-16)|0;if((c[O>>2]|0)!=0&(c[la>>2]|0)==1002){c[da>>2]=e;Qh(c[sa>>2]|0,0,0,c[da>>2]|0,(c[A>>2]|0)<(c[qa>>2]|0)?c[A>>2]|0:c[qa>>2]|0,0)|0}a:do if((c[qa>>2]|0)>(c[ha>>2]|0)){c[ra>>2]=-1;c[oa>>2]=1}else{c[ha>>2]=c[qa>>2];if((c[la>>2]|0)==1002|(c[C>>2]|0)!=0)e=1;else e=N((c[n>>2]|0)>(c[ha>>2]|0)?c[n>>2]|0:c[ha>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0;c[o>>2]=e;f=l;l=l+((1*(c[o>>2]<<1)|0)+15&-16)|0;b:do if((c[la>>2]|0)!=1002){c[s>>2]=f;if((c[(c[sa>>2]|0)+60>>2]|0)==1002)zd(c[t>>2]|0)|0;if(10>(((c[qa>>2]|0)*1e3|0)/(c[(c[sa>>2]|0)+12>>2]|0)|0|0))e=10;else e=((c[qa>>2]|0)*1e3|0)/(c[(c[sa>>2]|0)+12>>2]|0)|0;c[(c[sa>>2]|0)+16+16>>2]=e;if(c[G>>2]|0){c[(c[sa>>2]|0)+16+4>>2]=c[(c[sa>>2]|0)+48>>2];e=c[sa>>2]|0;if((c[la>>2]|0)==1e3){j=c[sa>>2]|0;if((c[e+52>>2]|0)==1101){i=8e3;e=j}else{e=(c[j+52>>2]|0)==1102;i=e?12e3:16e3;e=e?c[sa>>2]|0:c[sa>>2]|0}}else i=16e3;c[e+16+12>>2]=i}c[r>>2]=(c[G>>2]|0)==0?1:c[H>>2]<<1;c[p>>2]=0;c:while(1){c[q>>2]=(c[p>>2]|0)==0&1;c[v>>2]=Ad(c[t>>2]|0,(c[sa>>2]|0)+16|0,c[r>>2]|0,c[q>>2]|0,ga,c[s>>2]|0,u,c[(c[sa>>2]|0)+44>>2]|0)|0;d:do if(c[v>>2]|0){if(!(c[r>>2]|0))break c;c[u>>2]=c[ha>>2];c[ba>>2]=0;while(1){if((c[ba>>2]|0)>=(N(c[ha>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0))break d;b[(c[s>>2]|0)+(c[ba>>2]<<1)>>1]=0;c[ba>>2]=(c[ba>>2]|0)+1}}while(0);o=N(c[u>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0;c[s>>2]=(c[s>>2]|0)+(o<<1);c[p>>2]=(c[p>>2]|0)+(c[u>>2]|0);if((c[p>>2]|0)>=(c[ha>>2]|0))break b}c[ra>>2]=-3;c[oa>>2]=1;break a}while(0);c[M>>2]=0;if((c[H>>2]|0)==0&(c[la>>2]|0)!=1002&(c[G>>2]|0)!=0?(v=(Vh(ga)|0)+17|0,(v+(((c[(c[sa>>2]|0)+56>>2]|0)==1001&1)*20|0)|0)<=(c[ca>>2]<<3|0)):0){if((c[la>>2]|0)==1001)c[ma>>2]=Ob(ga,12)|0;else c[ma>>2]=1;if(c[ma>>2]|0){c[ka>>2]=Ob(ga,1)|0;if((c[la>>2]|0)==1001)e=(Qb(ga,256)|0)+2|0;else{e=c[ca>>2]|0;e=e-((Vh(ga)|0)+7>>3)|0}c[I>>2]=e;c[ca>>2]=(c[ca>>2]|0)-(c[I>>2]|0);v=c[ca>>2]<<3;if((v|0)<(Vh(ga)|0)){c[ca>>2]=0;c[I>>2]=0;c[ma>>2]=0}v=ga+4|0;c[v>>2]=(c[v>>2]|0)-(c[I>>2]|0)}}if((c[la>>2]|0)!=1002)c[M>>2]=17;c[w>>2]=21;switch(c[(c[sa>>2]|0)+52>>2]|0){case 1101:{c[w>>2]=13;break}case 1103:case 1102:{c[w>>2]=17;break}case 1104:{c[w>>2]=19;break}case 1105:{c[w>>2]=21;break}default:{}}v=c[D>>2]|0;c[x>>2]=c[w>>2];tb(v,10012,x)|0;x=c[D>>2]|0;c[y>>2]=c[(c[sa>>2]|0)+48>>2];tb(x,10008,y)|0;if(c[ma>>2]|0){c[O>>2]=0;c[z>>2]=1}e=l;l=l+((1*(c[z>>2]<<2)|0)+15&-16)|0;if((c[O>>2]|0)!=0&(c[la>>2]|0)!=1002){c[da>>2]=e;Qh(c[sa>>2]|0,0,0,c[da>>2]|0,(c[A>>2]|0)<(c[qa>>2]|0)?c[A>>2]|0:c[qa>>2]|0,0)|0}if(c[ma>>2]|0)e=N(c[A>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0;else e=1;c[J>>2]=e;e=l;l=l+((1*(c[J>>2]<<2)|0)+15&-16)|0;if((c[ma>>2]|0)!=0&(c[ka>>2]|0)!=0){J=c[D>>2]|0;c[P>>2]=0;tb(J,10010,P)|0;ub(c[D>>2]|0,(c[G>>2]|0)+(c[ca>>2]|0)|0,c[I>>2]|0,e,c[A>>2]|0,0,0)|0;P=c[D>>2]|0;c[Q>>2]=ja+(((ja-ja|0)/4|0)<<2);tb(P,4031,Q)|0}Q=c[D>>2]|0;c[R>>2]=c[M>>2];tb(Q,10010,R)|0;do if((c[la>>2]|0)==1e3){a[L>>0]=a[30519]|0;a[L+1>>0]=a[30520]|0;e:do if(!(c[C>>2]|0)){c[ba>>2]=0;while(1){if((c[ba>>2]|0)>=(N(c[ha>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0))break e;g[(c[ia>>2]|0)+(c[ba>>2]<<2)>>2]=0.0;c[ba>>2]=(c[ba>>2]|0)+1}}while(0);if((c[(c[sa>>2]|0)+60>>2]|0)==1001){if((c[ma>>2]|0)!=0&(c[ka>>2]|0)!=0?c[(c[sa>>2]|0)+68>>2]|0:0)break;Y=c[D>>2]|0;c[T>>2]=0;tb(Y,10010,T)|0;ub(c[D>>2]|0,L,2,c[ia>>2]|0,c[Z>>2]|0,0,c[C>>2]|0)|0}}else{c[E>>2]=(c[Y>>2]|0)<(c[ha>>2]|0)?c[Y>>2]|0:c[ha>>2]|0;do if((c[la>>2]|0)!=(c[(c[sa>>2]|0)+60>>2]|0)){if((c[(c[sa>>2]|0)+60>>2]|0)<=0)break;if(c[(c[sa>>2]|0)+68>>2]|0)break;tb(c[D>>2]|0,4028,S)|0}while(0);c[na>>2]=ub(c[D>>2]|0,c[H>>2]|0?0:c[G>>2]|0,c[ca>>2]|0,c[ia>>2]|0,c[E>>2]|0,ga,c[C>>2]|0)|0}while(0);f:do if(!((c[la>>2]|0)==1002|(c[C>>2]|0)!=0)){c[ba>>2]=0;while(1){if((c[ba>>2]|0)>=(N(c[ha>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0))break f;g[(c[ia>>2]|0)+(c[ba>>2]<<2)>>2]=+g[(c[ia>>2]|0)+(c[ba>>2]<<2)>>2]+ +(b[f+(c[ba>>2]<<1)>>1]|0)*.000030517578125;c[ba>>2]=(c[ba>>2]|0)+1}}while(0);Y=c[D>>2]|0;c[U>>2]=F+(((F-F|0)/4|0)<<2);tb(Y,10015,U)|0;c[ea>>2]=c[(c[F>>2]|0)+60>>2];if(!((c[ma>>2]|0)==0|(c[ka>>2]|0)!=0)){tb(c[D>>2]|0,4028,V)|0;Y=c[D>>2]|0;c[W>>2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c[na>>2]|0)>=0)Rh()|0;c[ra>>2]=(c[na>>2]|0)<0?c[na>>2]|0:c[qa>>2]|0;c[oa>>2]=1}while(0);_(c[pa>>2]|0);sa=c[ra>>2]|0;l=ta;return sa|0}function Rh(){return 0}function Sh(a){a=a|0;var b=0,e=0,f=0;f=l;l=l+16|0;b=f+4|0;e=f;c[b>>2]=a;do if(!((d[c[b>>2]>>0]|0)&128|0))if(((d[c[b>>2]>>0]|0)&96|0)==96){c[e>>2]=1001;break}else{c[e>>2]=1e3;break}else c[e>>2]=1002;while(0);l=f;return c[e>>2]|0}function Th(a){a=a|0;var b=0,e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=a;b=d[c[e>>2]>>0]|0;if((d[c[e>>2]>>0]|0)&128|0){e=1102+(b>>5&3)|0;c[f>>2]=e;c[f>>2]=(c[f>>2]|0)==1102?1101:e;f=c[f>>2]|0;l=g;return f|0}a=d[c[e>>2]>>0]|0;if((b&96|0)==96){c[f>>2]=a&16|0?1105:1104;f=c[f>>2]|0;l=g;return f|0}else{c[f>>2]=1101+(a>>5&3);f=c[f>>2]|0;l=g;return f|0}return 0}function Uh(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return ((d[c[b>>2]>>0]|0)&4|0?2:1)|0}function Vh(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function Wh(a,b,d,e,f,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0;u=l;l=l+48|0;n=u+40|0;o=u+36|0;q=u+32|0;r=u+28|0;k=u+24|0;t=u+20|0;v=u+16|0;m=u+12|0;j=u+8|0;p=u+4|0;s=u;c[n>>2]=a;c[o>>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[s>>2]|0;l=v;return u|0}while(0);a=N(c[n>>2]|0,c[(c[u>>2]|0)+8>>2]|0)|0;c[t>>2]=$()|0;d=l;l=l+((1*(a<<2)|0)+15&-16)|0;c[r>>2]=Ph(c[u>>2]|0,c[k>>2]|0,c[p>>2]|0,d,c[n>>2]|0,c[m>>2]|0,0,0,1)|0;a:do if((c[r>>2]|0)>0){c[o>>2]=0;while(1){if((c[o>>2]|0)>=(N(c[r>>2]|0,c[(c[u>>2]|0)+8>>2]|0)|0))break a;p=Zh(+g[d+(c[o>>2]<<2)>>2])|0;b[(c[q>>2]|0)+(c[o>>2]<<1)>>1]=p;c[o>>2]=(c[o>>2]|0)+1}}while(0);c[s>>2]=c[r>>2];_(c[t>>2]|0);u=c[s>>2]|0;l=v;return u|0}function Yh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;f=e+8|0;h=e+4|0;g=e;c[f>>2]=a;c[h>>2]=b;c[g>>2]=d;b=_h(c[h>>2]|0,c[g>>2]|0,c[(c[f>>2]|0)+12>>2]|0)|0;l=e;return b|0}function Zh(a){a=+a;var b=0,c=0;c=l;l=l+16|0;b=c;g[b>>2]=a;g[b>>2]=+g[b>>2]*32768.0;g[b>>2]=+g[b>>2]>-32768.0?+g[b>>2]:-32768.0;g[b>>2]=+g[b>>2]<32767.0?+g[b>>2]:32767.0;b=(Ui(+g[b>>2])|0)&65535;l=c;return b|0}function _h(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=l;l=l+32|0;g=i+20|0;f=i+16|0;k=i+12|0;e=i+8|0;h=i+4|0;j=i;c[f>>2]=a;c[k>>2]=b;c[e>>2]=d;c[j>>2]=$h(c[f>>2]|0,c[k>>2]|0)|0;d=c[j>>2]|0;if((c[j>>2]|0)<0){c[g>>2]=d;k=c[g>>2]|0;l=i;return k|0}c[h>>2]=N(d,Ih(c[f>>2]|0,c[e>>2]|0)|0)|0;if(((c[h>>2]|0)*25|0)>((c[e>>2]|0)*3|0)){c[g>>2]=-4;k=c[g>>2]|0;l=i;return k|0}else{c[g>>2]=c[h>>2];k=c[g>>2]|0;l=i;return k|0}return 0}function $h(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;h=i+12|0;g=i+8|0;f=i+4|0;e=i;c[g>>2]=a;c[f>>2]=b;do if((c[f>>2]|0)>=1){c[e>>2]=(d[c[g>>2]>>0]|0)&3;if(!(c[e>>2]|0)){c[h>>2]=1;break}if((c[e>>2]|0)!=3){c[h>>2]=2;break}if((c[f>>2]|0)<2){c[h>>2]=-4;break}else{c[h>>2]=(d[(c[g>>2]|0)+1>>0]|0)&63;break}}else c[h>>2]=-1;while(0);l=i;return c[h>>2]|0}function ai(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;n=p+24|0;o=p+20|0;h=p+16|0;k=p+12|0;m=p+8|0;j=p+4|0;i=p;c[o>>2]=a;c[h>>2]=b;c[k>>2]=d;c[m>>2]=e;c[j>>2]=f;c[i>>2]=g;if((c[j>>2]|0)<=0){c[n>>2]=-1;o=c[n>>2]|0;l=p;return o|0}else{c[n>>2]=Ph(c[o>>2]|0,c[h>>2]|0,c[k>>2]|0,c[m>>2]|0,c[j>>2]|0,c[i>>2]|0,0,0,0)|0;o=c[n>>2]|0;l=p;return o|0}return 0}function bi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;A=l;l=l+112|0;q=A+8|0;z=A+108|0;h=A+104|0;B=A+100|0;y=A+96|0;e=A+80|0;g=A+72|0;f=A+68|0;i=A+64|0;r=A+60|0;o=A+56|0;x=A+52|0;j=A+48|0;s=A+44|0;k=A+40|0;t=A+36|0;m=A+32|0;u=A+28|0;n=A+24|0;v=A+20|0;p=A+16|0;w=A+12|0;c[h>>2]=a;c[B>>2]=b;c[y>>2]=0;c[g>>2]=(c[h>>2]|0)+(c[(c[h>>2]|0)+4>>2]|0);c[f>>2]=(c[h>>2]|0)+(c[c[h>>2]>>2]|0);c[e>>2]=d;a:do switch(c[B>>2]|0){case 4009:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[r>>2]=B;c[i>>2]=c[r>>2];if(c[i>>2]|0){c[c[i>>2]>>2]=c[(c[h>>2]|0)+52>>2];e=20}else e=21;break}case 4031:{w=(c[e>>2]|0)+(4-1)&~(4-1);B=c[w>>2]|0;c[e>>2]=w+4;c[x>>2]=B;c[o>>2]=c[x>>2];if(c[o>>2]|0){c[c[o>>2]>>2]=c[(c[h>>2]|0)+84>>2];e=20}else e=21;break}case 4028:{aj((c[h>>2]|0)+48|0,0,88-((c[h>>2]|0)+48-(c[h>>2]|0))|0)|0;tb(c[f>>2]|0,4028,A)|0;zd(c[g>>2]|0)|0;c[(c[h>>2]|0)+48>>2]=c[(c[h>>2]|0)+8>>2];c[(c[h>>2]|0)+64>>2]=(c[(c[h>>2]|0)+12>>2]|0)/400|0;e=20;break}case 4029:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[s>>2]=B;c[j>>2]=c[s>>2];if(c[j>>2]|0){c[c[j>>2]>>2]=c[(c[h>>2]|0)+12>>2];e=20}else e=21;break}case 4033:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[t>>2]=B;c[k>>2]=c[t>>2];if(c[k>>2]|0)if((c[(c[h>>2]|0)+60>>2]|0)==1002){e=c[f>>2]|0;c[q>>2]=(c[k>>2]|0)+((((c[k>>2]|0)-(c[k>>2]|0)|0)/4|0)<<2);tb(e,4033,q)|0;e=20;break a}else{c[c[k>>2]>>2]=c[(c[h>>2]|0)+16+20>>2];e=20;break a}else e=21;break}case 4045:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[u>>2]=B;c[m>>2]=c[u>>2];if(c[m>>2]|0){c[c[m>>2]>>2]=c[(c[h>>2]|0)+40>>2];e=20}else e=21;break}case 4034:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[v>>2]=B;c[n>>2]=c[v>>2];if((c[n>>2]|0)<-32768|(c[n>>2]|0)>32767)e=21;else{c[(c[h>>2]|0)+40>>2]=c[n>>2];e=20}break}case 4039:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[w>>2]=B;c[p>>2]=c[w>>2];if(c[p>>2]|0){c[c[p>>2]>>2]=c[(c[h>>2]|0)+72>>2];e=20}else e=21;break}default:{c[y>>2]=-5;e=20}}while(0);if((e|0)==20){c[z>>2]=c[y>>2];B=c[z>>2]|0;l=A;return B|0}else if((e|0)==21){c[z>>2]=-1;B=c[z>>2]|0;l=A;return B|0}return 0}function ci(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;f=h+16|0;d=h+12|0;g=h+8|0;b=h+4|0;e=h;c[d>>2]=a;if((c[d>>2]|0)<1|(c[d>>2]|0)>2){c[f>>2]=0;g=c[f>>2]|0;l=h;return g|0}c[e>>2]=Bd(g)|0;if(c[e>>2]|0){c[f>>2]=0;g=c[f>>2]|0;l=h;return g|0}else{c[g>>2]=di(c[g>>2]|0)|0;c[b>>2]=Sa(c[d>>2]|0)|0;e=di(18220)|0;c[f>>2]=e+(c[g>>2]|0)+(c[b>>2]|0);g=c[f>>2]|0;l=h;return g|0}return 0}function di(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=4;a=N((((c[e>>2]|0)+(c[d>>2]|0)-1|0)>>>0)/((c[d>>2]|0)>>>0)|0,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0)+14344>>2]=1;c[(c[r>>2]|0)+14320>>2]=1001;c[(c[r>>2]|0)+14336>>2]=1105;Hi((c[r>>2]|0)+172|0);c[o>>2]=0;t=c[o>>2]|0;l=u;return t|0}}c[o>>2]=-1;t=c[o>>2]|0;l=u;return t|0}function fi(){return 0}function gi(a,b,d,e,f,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+48|0;v=u+40|0;r=u+36|0;s=u+32|0;p=u+28|0;m=u+24|0;n=u+20|0;j=u+16|0;t=u+12|0;q=u+8|0;o=u+4|0;k=u;c[v>>2]=a;c[r>>2]=b;c[s>>2]=d;c[p>>2]=e;c[m>>2]=f;c[n>>2]=h;c[j>>2]=i;c[t>>2]=c[v>>2];c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[s>>2]|0))break;v=N((c[o>>2]|0)+(c[p>>2]|0)|0,c[j>>2]|0)|0;g[(c[r>>2]|0)+(c[o>>2]<<2)>>2]=+g[(c[t>>2]|0)+(v+(c[m>>2]|0)<<2)>>2]*32768.0;c[o>>2]=(c[o>>2]|0)+1}a:do if((c[n>>2]|0)<=-1){if((c[n>>2]|0)==-2){c[k>>2]=1;while(1){if((c[k>>2]|0)>=(c[j>>2]|0))break a;c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[s>>2]|0))break;d=N((c[o>>2]|0)+(c[p>>2]|0)|0,c[j>>2]|0)|0;v=(c[r>>2]|0)+(c[o>>2]<<2)|0;g[v>>2]=+g[v>>2]+ +g[(c[t>>2]|0)+(d+(c[k>>2]|0)<<2)>>2]*32768.0;c[o>>2]=(c[o>>2]|0)+1}c[k>>2]=(c[k>>2]|0)+1}}}else{c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[s>>2]|0))break a;d=N((c[o>>2]|0)+(c[p>>2]|0)|0,c[j>>2]|0)|0;v=(c[r>>2]|0)+(c[o>>2]<<2)|0;g[v>>2]=+g[v>>2]+ +g[(c[t>>2]|0)+(d+(c[n>>2]|0)<<2)>>2]*32768.0;c[o>>2]=(c[o>>2]|0)+1}}while(0);g[q>>2]=1.0;if((c[j>>2]|0)==-2)g[q>>2]=+g[q>>2]/+(c[j>>2]|0);else g[q>>2]=+g[q>>2]/2.0;c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[s>>2]|0))break;v=(c[r>>2]|0)+(c[o>>2]<<2)|0;g[v>>2]=+g[v>>2]*+g[q>>2];c[o>>2]=(c[o>>2]|0)+1}l=u;return}function hi(a,d,e,f,h,i,j){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;v=l;l=l+48|0;w=v+40|0;s=v+36|0;t=v+32|0;q=v+28|0;n=v+24|0;o=v+20|0;k=v+16|0;u=v+12|0;r=v+8|0;p=v+4|0;m=v;c[w>>2]=a;c[s>>2]=d;c[t>>2]=e;c[q>>2]=f;c[n>>2]=h;c[o>>2]=i;c[k>>2]=j;c[u>>2]=c[w>>2];c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))break;w=N((c[p>>2]|0)+(c[q>>2]|0)|0,c[k>>2]|0)|0;g[(c[s>>2]|0)+(c[p>>2]<<2)>>2]=+(b[(c[u>>2]|0)+(w+(c[n>>2]|0)<<1)>>1]|0);c[p>>2]=(c[p>>2]|0)+1}a:do if((c[o>>2]|0)<=-1){if((c[o>>2]|0)==-2){c[m>>2]=1;while(1){if((c[m>>2]|0)>=(c[k>>2]|0))break a;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))break;e=N((c[p>>2]|0)+(c[q>>2]|0)|0,c[k>>2]|0)|0;w=(c[s>>2]|0)+(c[p>>2]<<2)|0;g[w>>2]=+g[w>>2]+ +(b[(c[u>>2]|0)+(e+(c[m>>2]|0)<<1)>>1]|0);c[p>>2]=(c[p>>2]|0)+1}c[m>>2]=(c[m>>2]|0)+1}}}else{c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))break a;e=N((c[p>>2]|0)+(c[q>>2]|0)|0,c[k>>2]|0)|0;w=(c[s>>2]|0)+(c[p>>2]<<2)|0;g[w>>2]=+g[w>>2]+ +(b[(c[u>>2]|0)+(e+(c[o>>2]|0)<<1)>>1]|0);c[p>>2]=(c[p>>2]|0)+1}}while(0);g[r>>2]=.000030517578125;if((c[k>>2]|0)==-2)g[r>>2]=+g[r>>2]/+(c[k>>2]|0);else g[r>>2]=+g[r>>2]/2.0;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))break;w=(c[s>>2]|0)+(c[p>>2]<<2)|0;g[w>>2]=+g[w>>2]*+g[r>>2];c[p>>2]=(c[p>>2]|0)+1}l=v;return}function ii(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;i=j+16|0;g=j+12|0;e=j+8|0;f=j+4|0;h=j;c[g>>2]=a;c[e>>2]=b;c[f>>2]=d;if((c[g>>2]|0)<((c[f>>2]|0)/400|0|0)){c[i>>2]=-1;i=c[i>>2]|0;l=j;return i|0}do if((c[e>>2]|0)==5e3)c[h>>2]=c[g>>2];else{if((c[e>>2]|0)==5010){c[h>>2]=(c[f>>2]|0)/50|0;break}if(!((c[e>>2]|0)>=5001&(c[e>>2]|0)<=5006)){c[i>>2]=-1;i=c[i>>2]|0;l=j;return i|0}d=c[f>>2]|0;if((((c[f>>2]|0)*3|0)/50|0|0)<(((c[f>>2]|0)/400|0)<<(c[e>>2]|0)-5001|0))d=(d*3|0)/50|0;else d=((d|0)/400|0)<<(c[e>>2]|0)-5001;c[h>>2]=d}while(0);if((c[h>>2]|0)>(c[g>>2]|0)){c[i>>2]=-1;i=c[i>>2]|0;l=j;return i|0}if(((((((c[h>>2]|0)*400|0)!=(c[f>>2]|0)?((c[h>>2]|0)*200|0)!=(c[f>>2]|0):0)?((c[h>>2]|0)*100|0)!=(c[f>>2]|0):0)?((c[h>>2]|0)*50|0)!=(c[f>>2]|0):0)?((c[h>>2]|0)*25|0)!=(c[f>>2]|0):0)?((c[h>>2]|0)*50|0)!=((c[f>>2]|0)*3|0):0){c[i>>2]=-1;i=c[i>>2]|0;l=j;return i|0}c[i>>2]=c[h>>2];i=c[i>>2]|0;l=j;return i|0}function ji(a,b,d,e,f,g,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=l;l=l+48|0;t=w+40|0;o=w+36|0;s=w+32|0;v=w+28|0;k=w+24|0;m=w+20|0;p=w+16|0;q=w+12|0;r=w+8|0;u=w+4|0;n=w;c[o>>2]=a;c[s>>2]=b;c[v>>2]=d;c[k>>2]=e;c[m>>2]=f;c[p>>2]=g;c[q>>2]=h;c[r>>2]=i;c[u>>2]=j;if((c[v>>2]|0)==5010?(c[s>>2]|0)>=((c[m>>2]|0)/200|0|0):0){c[n>>2]=3;c[n>>2]=ki(c[o>>2]|0,c[s>>2]|0,c[k>>2]|0,c[m>>2]|0,c[p>>2]|0,0.0,c[u>>2]|0,c[q>>2]|0,c[r>>2]|0)|0;while(1){if((((c[m>>2]|0)/400|0)<>2]|0)<=(c[s>>2]|0))break;c[n>>2]=(c[n>>2]|0)+-1}c[s>>2]=((c[m>>2]|0)/400|0)<>2]}else c[s>>2]=ii(c[s>>2]|0,c[v>>2]|0,c[m>>2]|0)|0;if((c[s>>2]|0)<0){c[t>>2]=-1;v=c[t>>2]|0;l=w;return v|0}else{c[t>>2]=c[s>>2];v=c[t>>2]|0;l=w;return v|0}return 0}function ki(a,b,d,e,f,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=+h;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;H=l;l=l+304|0;G=H+296|0;m=H+292|0;n=H+288|0;I=H+284|0;q=H+280|0;F=H+276|0;x=H+272|0;r=H+268|0;s=H+264|0;o=H+260|0;v=H+256|0;t=H+144|0;u=H+36|0;y=H+32|0;p=H+28|0;C=H+24|0;A=H+20|0;z=H+16|0;B=H+12|0;D=H+8|0;E=H+4|0;w=H;c[G>>2]=a;c[m>>2]=b;c[n>>2]=d;c[I>>2]=e;c[q>>2]=f;g[F>>2]=h;c[x>>2]=i;c[r>>2]=j;c[s>>2]=k;c[p>>2]=0;c[C>>2]=(c[I>>2]|0)/400|0;a=c[C>>2]|0;c[B>>2]=$()|0;e=l;l=l+((1*(a<<2)|0)+15&-16)|0;g[t>>2]=+g[c[x>>2]>>2];g[u>>2]=1.0/(+g[c[x>>2]>>2]+1.0000000036274937e-15);if(c[r>>2]|0){c[z>>2]=(c[C>>2]<<1)-(c[r>>2]|0);c[m>>2]=(c[m>>2]|0)-(c[z>>2]|0);g[t+4>>2]=+g[(c[x>>2]|0)+4>>2];g[u+4>>2]=1.0/(+g[(c[x>>2]|0)+4>>2]+1.0000000036274937e-15);g[t+8>>2]=+g[(c[x>>2]|0)+8>>2];g[u+8>>2]=1.0/(+g[(c[x>>2]|0)+8>>2]+1.0000000036274937e-15);c[A>>2]=3}else{c[A>>2]=1;c[z>>2]=0}if(((c[m>>2]|0)/(c[C>>2]|0)|0|0)<24)d=(c[m>>2]|0)/(c[C>>2]|0)|0;else d=24;c[o>>2]=d;g[y>>2]=0.0;c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[o>>2]|0))break;g[D>>2]=1.0000000036274937e-15;I=N(c[v>>2]|0,c[C>>2]|0)|0;ba[c[s>>2]&3](c[G>>2]|0,e,c[C>>2]|0,I+(c[z>>2]|0)|0,0,-2,c[n>>2]|0);if(!(c[v>>2]|0))g[y>>2]=+g[e>>2];c[w>>2]=0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)>=80)if((c[r>>2]|0)>160){g[m>>2]=1.0;break}else{g[m>>2]=(+(c[r>>2]|0)-80.0)/80.0;break}else g[m>>2]=0.0;while(0);c[x>>2]=0;while(1){if((c[x>>2]|0)>=16)break;c[y+(c[x>>2]<<2)>>2]=-1;g[w+(c[x>>2]<<2)>>2]=1.0e10;c[x>>2]=(c[x>>2]|0)+1}c[x>>2]=0;while(1){if((c[x>>2]|0)>=4)break;A=+((c[n>>2]|0)+(N(c[r>>2]|0,1<>2])|0)|0);h=+g[m>>2];h=A*(h*+mi(c[i>>2]|0,c[j>>2]|0,c[x>>2]|0,(c[t>>2]|0)+1|0)+1.0);g[w+(1<>2]<<2)>>2]=h;c[y+(1<>2]<<2)>>2]=c[x>>2];c[x>>2]=(c[x>>2]|0)+1}c[x>>2]=1;while(1){if((c[x>>2]|0)>=(c[t>>2]|0))break;c[o>>2]=2;while(1){if((c[o>>2]|0)>=16)break;g[w+(c[x>>2]<<6)+(c[o>>2]<<2)>>2]=+g[w+((c[x>>2]|0)-1<<6)+((c[o>>2]|0)-1<<2)>>2];c[y+(c[x>>2]<<6)+(c[o>>2]<<2)>>2]=(c[o>>2]|0)-1;c[o>>2]=(c[o>>2]|0)+1}c[o>>2]=0;while(1){a=c[x>>2]|0;if((c[o>>2]|0)>=4)break;c[y+(a<<6)+(1<>2]<<2)>>2]=1;g[q>>2]=+g[w+((c[x>>2]|0)-1<<6)+4>>2];c[p>>2]=1;while(1){if((c[p>>2]|0)>=4)break;g[s>>2]=+g[w+((c[x>>2]|0)-1<<6)+((1<<(c[p>>2]|0)+1)-1<<2)>>2];if(+g[s>>2]<+g[q>>2]){c[y+(c[x>>2]<<6)+(1<>2]<<2)>>2]=(1<<(c[p>>2]|0)+1)-1;g[q>>2]=+g[s>>2]}c[p>>2]=(c[p>>2]|0)+1}A=+((c[n>>2]|0)+(N(c[r>>2]|0,1<>2])|0)|0);h=+g[m>>2];g[k>>2]=A*(h*+mi((c[i>>2]|0)+(c[x>>2]<<2)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<<2)>>2];g[p>>2]=+g[p>>2]+ +g[(c[k>>2]|0)+(c[n>>2]<<2)>>2];c[n>>2]=(c[n>>2]|0)+1}g[q>>2]=+g[o>>2]*+g[p>>2]/+(N(c[m>>2]|0,c[m>>2]|0)|0);if(0.0>(+g[q>>2]-2.0)*.05000000074505806)f=0.0;else f=(+g[q>>2]-2.0)*.05000000074505806;if(1.0<+B(+f)){f=1.0;l=r;return +f}if(0.0>(+g[q>>2]-2.0)*.05000000074505806)f=0.0;else f=(+g[q>>2]-2.0)*.05000000074505806;f=+B(+f);l=r;return +f}function ni(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0.0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,C=0,D=0,E=0,F=0,G=0;F=l;l=l+96|0;j=F+84|0;h=F+80|0;G=F+76|0;E=F+72|0;u=F+68|0;v=F+64|0;C=F+60|0;q=F+56|0;r=F+52|0;t=F+48|0;y=F+44|0;z=F+40|0;w=F+36|0;x=F+32|0;D=F+28|0;i=F+24|0;o=F+20|0;k=F+16|0;m=F+12|0;n=F+8|0;p=F+4|0;s=F;c[j>>2]=a;c[h>>2]=b;c[G>>2]=d;c[E>>2]=e;c[D>>2]=(c[G>>2]|0)/(c[h>>2]|0)|0;g[o>>2]=1.0-25.0/+((50>(c[D>>2]|0)?50:c[D>>2]|0)|0);g[t>>2]=0.0;g[r>>2]=0.0;g[q>>2]=0.0;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[h>>2]|0))break;g[k>>2]=0.0;g[m>>2]=0.0;g[n>>2]=0.0;g[p>>2]=+g[(c[j>>2]|0)+(c[i>>2]<<1<<2)>>2];g[s>>2]=+g[(c[j>>2]|0)+((c[i>>2]<<1)+1<<2)>>2];g[k>>2]=+g[p>>2]*+g[p>>2];g[m>>2]=+g[p>>2]*+g[s>>2];g[n>>2]=+g[s>>2]*+g[s>>2];g[p>>2]=+g[(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;if(0.0>+g[(c[E>>2]|0)+8>>2])f=0.0;else f=+g[(c[E>>2]|0)+8>>2];g[(c[E>>2]|0)+8>>2]=f;G=c[E>>2]|0;if(+g[(+g[c[E>>2]>>2]>+g[(c[E>>2]|0)+8>>2]?G:G+8|0)>>2]>7.999999797903001e-04){g[y>>2]=+B(+(+g[c[E>>2]>>2]));g[z>>2]=+B(+(+g[(c[E>>2]|0)+8>>2]));g[w>>2]=+B(+(+g[y>>2]));g[x>>2]=+B(+(+g[z>>2]));if(+g[(c[E>>2]|0)+4>>2]<+g[y>>2]*+g[z>>2])f=+g[(c[E>>2]|0)+4>>2];else f=+g[y>>2]*+g[z>>2];g[(c[E>>2]|0)+4>>2]=f;g[u>>2]=+g[(c[E>>2]|0)+4>>2]/(+g[y>>2]*+g[z>>2]+1.0000000036274937e-15);f=+A(+(+g[w>>2]-+g[x>>2]))*1.0;g[v>>2]=f/(+g[w>>2]+1.0000000036274937e-15+ +g[x>>2]);f=+B(+(1.0-+g[u>>2]*+g[u>>2]));g[C>>2]=f*+g[v>>2];d=(c[E>>2]|0)+12|0;g[d>>2]=+g[d>>2]+(+g[C>>2]-+g[(c[E>>2]|0)+12>>2])/+(c[D>>2]|0);d=c[E>>2]|0;if(+g[(c[E>>2]|0)+16>>2]-.019999999552965164/+(c[D>>2]|0)>+g[(c[E>>2]|0)+12>>2])f=+g[d+16>>2]-.019999999552965164/+(c[D>>2]|0);else f=+g[d+12>>2];g[(c[E>>2]|0)+16>>2]=f}else{g[C>>2]=0.0;g[u>>2]=1.0;g[v>>2]=0.0}if(1.0<+g[(c[E>>2]|0)+16>>2]*20.0){f=1.0;l=F;return +f}f=+g[(c[E>>2]|0)+16>>2]*20.0;l=F;return +f}function oi(e,f,h,i,j,k,m,n,o,p,q,r,s){e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;var t=0.0,u=0,v=0,w=0,x=0,y=0,A=0,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>>2]|0)>=7?(c[(c[Qb>>2]|0)+132>>2]|0)==48e3:0){c[T>>2]=c[(c[Qb>>2]|0)+172+8508>>2];c[U>>2]=c[(c[Qb>>2]|0)+172+8512>>2];Li((c[Qb>>2]|0)+172|0,c[bb>>2]|0,c[v>>2]|0,c[w>>2]|0,c[Gb>>2]|0,c[ba>>2]|0,c[ca>>2]|0,c[Z>>2]|0,c[(c[Qb>>2]|0)+132>>2]|0,c[ea>>2]|0,c[da>>2]|0,hb)}c[(c[Qb>>2]|0)+128>>2]=-1;c[(c[Qb>>2]|0)+18212>>2]=0;do if(c[hb>>2]|0){if((c[(c[Qb>>2]|0)+112>>2]|0)==-1e3){y=~~+z(+((1.0-+g[hb+20>>2])*100.0+.5));c[(c[Qb>>2]|0)+128>>2]=y}c[u>>2]=c[hb+24>>2];if((c[u>>2]|0)<=12){c[(c[Qb>>2]|0)+18212>>2]=1101;break}if((c[u>>2]|0)<=14){c[(c[Qb>>2]|0)+18212>>2]=1102;break}if((c[u>>2]|0)<=16){c[(c[Qb>>2]|0)+18212>>2]=1103;break}else{c[(c[Qb>>2]|0)+18212>>2]=(c[u>>2]|0)<=18?1104:1105;break}}while(0);if((c[(c[Qb>>2]|0)+100>>2]|0)==2?(c[(c[Qb>>2]|0)+108>>2]|0)!=1:0)g[G>>2]=+ni(c[pa>>2]|0,c[Gb>>2]|0,c[(c[Qb>>2]|0)+132>>2]|0,(c[Qb>>2]|0)+14352|0);else g[G>>2]=0.0;c[ab>>2]=c[x>>2];y=pi(c[Qb>>2]|0,c[Gb>>2]|0,c[Hb>>2]|0)|0;c[(c[Qb>>2]|0)+148>>2]=y;c[Da>>2]=(c[(c[Qb>>2]|0)+132>>2]|0)/(c[Gb>>2]|0)|0;do if((c[Hb>>2]|0)>=3?(c[(c[Qb>>2]|0)+148>>2]|0)>=((c[Da>>2]|0)*3<<3|0):0){if((c[Da>>2]|0)<50){if((N(c[Hb>>2]|0,c[Da>>2]|0)|0)<300)break;if((c[(c[Qb>>2]|0)+148>>2]|0)<2400)break}if(!(c[(c[Qb>>2]|0)+136>>2]|0)){if((((c[(c[Qb>>2]|0)+148>>2]|0)+(c[Da>>2]<<2)|0)/(c[Da>>2]<<3|0)|0|0)<(c[Hb>>2]|0))q=((c[(c[Qb>>2]|0)+148>>2]|0)+(c[Da>>2]<<2)|0)/(c[Da>>2]<<3|0)|0;else q=c[Hb>>2]|0;c[B>>2]=q;C=N(c[B>>2]|0,c[Da>>2]<<3)|0;c[(c[Qb>>2]|0)+148>>2]=C;c[Hb>>2]=c[B>>2]}c[Aa>>2]=(N(c[Da>>2]|0,c[Hb>>2]|0)|0)<<3;c[$a>>2]=(c[(c[Qb>>2]|0)+148>>2]|0)-(N(((c[(c[Qb>>2]|0)+100>>2]|0)*40|0)+20|0,((c[(c[Qb>>2]|0)+132>>2]|0)/(c[Gb>>2]|0)|0)-50|0)|0);do if((c[(c[Qb>>2]|0)+112>>2]|0)!=3001){if((c[(c[Qb>>2]|0)+112>>2]|0)==3002){c[L>>2]=0;break}q=c[Qb>>2]|0;if((c[(c[Qb>>2]|0)+128>>2]|0)>=0){c[L>>2]=(c[q+128>>2]|0)*327>>8;if((c[(c[Qb>>2]|0)+96>>2]|0)!=2049)break;c[L>>2]=(c[L>>2]|0)<115?c[L>>2]|0:115;break}if((c[q+96>>2]|0)==2048){c[L>>2]=115;break}else{c[L>>2]=48;break}}else c[L>>2]=127;while(0);if((c[(c[Qb>>2]|0)+108>>2]|0)!=-1e3?(c[(c[Qb>>2]|0)+100>>2]|0)==2:0){q=c[(c[Qb>>2]|0)+108>>2]|0;m=c[Qb>>2]|0}else Eb=71;do if((Eb|0)==71){if((c[(c[Qb>>2]|0)+100>>2]|0)!=2){q=c[(c[Qb>>2]|0)+100>>2]|0;m=c[Qb>>2]|0;break}c[D>>2]=3e4;q=c[D>>2]|0;if((c[(c[Qb>>2]|0)+14288>>2]|0)==2)c[D>>2]=q-1e3;else c[D>>2]=q+1e3;q=(c[$a>>2]|0)>(c[D>>2]|0)?2:1;m=c[Qb>>2]|0}while(0);c[m+14288>>2]=q;c[$a>>2]=(c[(c[Qb>>2]|0)+148>>2]|0)-(N(((c[(c[Qb>>2]|0)+14288>>2]|0)*40|0)+20|0,((c[(c[Qb>>2]|0)+132>>2]|0)/(c[Gb>>2]|0)|0)-50|0)|0);q=c[Qb>>2]|0;do if((c[(c[Qb>>2]|0)+96>>2]|0)==2051){m=1002;Eb=91}else{if((c[q+124>>2]|0)!=-1e3){m=c[(c[Qb>>2]|0)+124>>2]|0;q=c[Qb>>2]|0;Eb=91;break}c[F>>2]=~~((1.0-+g[G>>2])*+(c[4508]|0)+ +g[G>>2]*+(c[4510]|0));c[E>>2]=~~((1.0-+g[G>>2])*+(c[4511]|0)+ +g[G>>2]*+(c[4511]|0));G=N(c[L>>2]|0,c[L>>2]|0)|0;c[H>>2]=(c[E>>2]|0)+((N(G,(c[F>>2]|0)-(c[E>>2]|0)|0)|0)>>14);if((c[(c[Qb>>2]|0)+96>>2]|0)==2048)c[H>>2]=(c[H>>2]|0)+8e3;do if((c[(c[Qb>>2]|0)+14324>>2]|0)==1002)c[H>>2]=(c[H>>2]|0)-4e3;else{if((c[(c[Qb>>2]|0)+14324>>2]|0)<=0)break;c[H>>2]=(c[H>>2]|0)+4e3}while(0);c[(c[Qb>>2]|0)+14320>>2]=(c[$a>>2]|0)>=(c[H>>2]|0)?1002:1e3;do if(c[(c[Qb>>2]|0)+8+40>>2]|0){if((c[(c[Qb>>2]|0)+8+32>>2]|0)<=(128-(c[L>>2]|0)>>4|0))break;c[(c[Qb>>2]|0)+14320>>2]=1e3}while(0);if(!((c[L>>2]|0)>100?(c[(c[Qb>>2]|0)+8+44>>2]|0)!=0:0))break;m=1e3;q=c[Qb>>2]|0;Eb=91}while(0);if((Eb|0)==91)c[q+14320>>2]=m;if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002?(c[Gb>>2]|0)<((c[(c[Qb>>2]|0)+132>>2]|0)/100|0|0):0)c[(c[Qb>>2]|0)+14320>>2]=1002;if(c[(c[Qb>>2]|0)+164>>2]|0)c[(c[Qb>>2]|0)+14320>>2]=1002;H=N((c[Da>>2]|0)>50?12e3:8e3,c[Gb>>2]|0)|0;if((c[Hb>>2]|0)<((H|0)/(c[(c[Qb>>2]|0)+132>>2]<<3|0)|0|0))c[(c[Qb>>2]|0)+14320>>2]=1002;do if((c[(c[Qb>>2]|0)+14288>>2]|0)==1){if((c[(c[Qb>>2]|0)+14328>>2]|0)!=2){Eb=105;break}if(c[(c[Qb>>2]|0)+8+56>>2]|0){Eb=105;break}if((c[(c[Qb>>2]|0)+14320>>2]|0)==1002){Eb=105;break}if((c[(c[Qb>>2]|0)+14324>>2]|0)==1002){Eb=105;break}c[(c[Qb>>2]|0)+8+56>>2]=1;c[(c[Qb>>2]|0)+14288>>2]=2}else Eb=105;while(0);if((Eb|0)==105)c[(c[Qb>>2]|0)+8+56>>2]=0;do if((c[(c[Qb>>2]|0)+14324>>2]|0)>0){if(!((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002?(c[(c[Qb>>2]|0)+14324>>2]|0)==1002:0)){if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002)break;if((c[(c[Qb>>2]|0)+14324>>2]|0)==1002)break}c[Ib>>2]=1;c[jb>>2]=(c[(c[Qb>>2]|0)+14320>>2]|0)!=1002&1;if(c[jb>>2]|0)break;if((c[Gb>>2]|0)>=((c[(c[Qb>>2]|0)+132>>2]|0)/100|0|0)){c[(c[Qb>>2]|0)+14320>>2]=c[(c[Qb>>2]|0)+14324>>2];c[Lb>>2]=1;break}else{c[Ib>>2]=0;break}}while(0);if(c[(c[Qb>>2]|0)+14340>>2]|0){c[Ib>>2]=1;c[jb>>2]=1;c[(c[Qb>>2]|0)+14340>>2]=0;c[Ea>>2]=1}do if(c[Ib>>2]|0){H=N(c[Hb>>2]|0,(c[(c[Qb>>2]|0)+132>>2]|0)/200|0)|0;if(257<((H|0)/((c[Gb>>2]|0)+((c[(c[Qb>>2]|0)+132>>2]|0)/200|0)|0)|0|0))q=257;else{q=N(c[Hb>>2]|0,(c[(c[Qb>>2]|0)+132>>2]|0)/200|0)|0;q=(q|0)/((c[Gb>>2]|0)+((c[(c[Qb>>2]|0)+132>>2]|0)/200|0)|0)|0}c[Jb>>2]=q;if(!(c[(c[Qb>>2]|0)+136>>2]|0))break;if((c[Jb>>2]|0)<((c[(c[Qb>>2]|0)+148>>2]|0)/1600|0|0))q=c[Jb>>2]|0;else q=(c[(c[Qb>>2]|0)+148>>2]|0)/1600|0;c[Jb>>2]=q}while(0);do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002){if((c[(c[Qb>>2]|0)+14324>>2]|0)!=1002)break;Cd(c[Ga>>2]|0,c[(c[Qb>>2]|0)+168>>2]|0,I)|0;c[Ea>>2]=1}while(0);do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002){if(c[(c[Qb>>2]|0)+14344>>2]|0){Eb=131;break}if(c[(c[Qb>>2]|0)+8+72>>2]|0)Eb=131}else Eb=131;while(0);do if((Eb|0)==131){c[M>>2]=1105;c[P>>2]=c[$a>>2];do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002){c[P>>2]=(N(c[P>>2]|0,45+(c[(c[Qb>>2]|0)+8+36>>2]|0)|0)|0)/50|0;if(c[(c[Qb>>2]|0)+136>>2]|0)break;c[P>>2]=(c[P>>2]|0)-1e3}while(0);do if((c[(c[Qb>>2]|0)+100>>2]|0)==2){if((c[(c[Qb>>2]|0)+108>>2]|0)==1){Eb=137;break}c[K>>2]=18048;c[J>>2]=18080}else Eb=137;while(0);if((Eb|0)==137){c[K>>2]=18112;c[J>>2]=18144}c[Za>>2]=0;while(1){if((c[Za>>2]|0)>=8)break;I=N(c[L>>2]|0,c[L>>2]|0)|0;I=(c[(c[J>>2]|0)+(c[Za>>2]<<2)>>2]|0)+((N(I,(c[(c[K>>2]|0)+(c[Za>>2]<<2)>>2]|0)-(c[(c[J>>2]|0)+(c[Za>>2]<<2)>>2]|0)|0)|0)>>14)|0;c[O+(c[Za>>2]<<2)>>2]=I;c[Za>>2]=(c[Za>>2]|0)+1}do{c[R>>2]=c[O+((c[M>>2]|0)-1102<<1<<2)>>2];c[Q>>2]=c[O+(((c[M>>2]|0)-1102<<1)+1<<2)>>2];do if(!(c[(c[Qb>>2]|0)+14344>>2]|0)){q=c[Q>>2]|0;m=c[R>>2]|0;if((c[(c[Qb>>2]|0)+14336>>2]|0)>=(c[M>>2]|0)){c[R>>2]=m-q;break}else{c[R>>2]=m+q;break}}while(0);if((c[P>>2]|0)>=(c[R>>2]|0))break;L=(c[M>>2]|0)+-1|0;c[M>>2]=L}while((L|0)>1101);c[(c[Qb>>2]|0)+14336>>2]=c[M>>2];if(c[(c[Qb>>2]|0)+14344>>2]|0)break;if((c[(c[Qb>>2]|0)+14320>>2]|0)==1002)break;if(c[(c[Qb>>2]|0)+8+76>>2]|0)break;if((c[(c[Qb>>2]|0)+14336>>2]|0)<=1103)break;c[(c[Qb>>2]|0)+14336>>2]=1103}while(0);if((c[(c[Qb>>2]|0)+14336>>2]|0)>(c[(c[Qb>>2]|0)+120>>2]|0))c[(c[Qb>>2]|0)+14336>>2]=c[(c[Qb>>2]|0)+120>>2];if((c[(c[Qb>>2]|0)+116>>2]|0)!=-1e3)c[(c[Qb>>2]|0)+14336>>2]=c[(c[Qb>>2]|0)+116>>2];if((c[Aa>>2]|0)<15e3?(c[(c[Qb>>2]|0)+14320>>2]|0)!=1002:0){if((c[(c[Qb>>2]|0)+14336>>2]|0)<1103)q=c[(c[Qb>>2]|0)+14336>>2]|0;else q=1103;c[(c[Qb>>2]|0)+14336>>2]=q}do if((c[(c[Qb>>2]|0)+132>>2]|0)<=24e3){if((c[(c[Qb>>2]|0)+14336>>2]|0)<=1104)break;c[(c[Qb>>2]|0)+14336>>2]=1104}while(0);do if((c[(c[Qb>>2]|0)+132>>2]|0)<=16e3){if((c[(c[Qb>>2]|0)+14336>>2]|0)<=1103)break;c[(c[Qb>>2]|0)+14336>>2]=1103}while(0);do if((c[(c[Qb>>2]|0)+132>>2]|0)<=12e3){if((c[(c[Qb>>2]|0)+14336>>2]|0)<=1102)break;c[(c[Qb>>2]|0)+14336>>2]=1102}while(0);do if((c[(c[Qb>>2]|0)+132>>2]|0)<=8e3){if((c[(c[Qb>>2]|0)+14336>>2]|0)<=1101)break;c[(c[Qb>>2]|0)+14336>>2]=1101}while(0);do if(c[(c[Qb>>2]|0)+18212>>2]|0){if((c[(c[Qb>>2]|0)+116>>2]|0)!=-1e3)break;do if((c[$a>>2]|0)<=((c[(c[Qb>>2]|0)+14288>>2]|0)*18e3|0)){if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002){Eb=177;break}c[S>>2]=1101}else Eb=177;while(0);a:do if((Eb|0)==177){do if((c[$a>>2]|0)<=((c[(c[Qb>>2]|0)+14288>>2]|0)*24e3|0)){if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002)break;c[S>>2]=1102;break a}while(0);if((c[$a>>2]|0)<=((c[(c[Qb>>2]|0)+14288>>2]|0)*3e4|0)){c[S>>2]=1103;break}if((c[$a>>2]|0)<=((c[(c[Qb>>2]|0)+14288>>2]|0)*44e3|0)){c[S>>2]=1104;break}else{c[S>>2]=1105;break}}while(0);if((c[(c[Qb>>2]|0)+18212>>2]|0)>(c[S>>2]|0))q=c[(c[Qb>>2]|0)+18212>>2]|0;else q=c[S>>2]|0;c[(c[Qb>>2]|0)+18212>>2]=q;S=c[Qb>>2]|0;c[(c[Qb>>2]|0)+14336>>2]=c[((c[(c[Qb>>2]|0)+14336>>2]|0)<(c[(c[Qb>>2]|0)+18212>>2]|0)?S+14336|0:S+18212|0)>>2]}while(0);S=c[ib>>2]|0;c[V>>2]=c[ea>>2];Wa(S,4036,V)|0;do if((c[(c[Qb>>2]|0)+14320>>2]|0)==1002){if((c[(c[Qb>>2]|0)+14336>>2]|0)!=1102)break;c[(c[Qb>>2]|0)+14336>>2]=1103}while(0);if(c[(c[Qb>>2]|0)+164>>2]|0)c[(c[Qb>>2]|0)+14336>>2]=1101;do if((c[Gb>>2]|0)>((c[(c[Qb>>2]|0)+132>>2]|0)/50|0|0)){if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002?(c[(c[Qb>>2]|0)+14336>>2]|0)<=1103:0)break;if((c[T>>2]|0)!=-1){c[(c[Qb>>2]|0)+172+8508>>2]=c[T>>2];c[(c[Qb>>2]|0)+172+8512>>2]=c[U>>2]}c[la>>2]=(c[Gb>>2]|0)>((c[(c[Qb>>2]|0)+132>>2]|0)/25|0|0)?3:2;if(1276<(((c[fa>>2]|0)-3|0)/(c[la>>2]|0)|0|0))q=1276;else q=((c[fa>>2]|0)-3|0)/(c[la>>2]|0)|0;c[aa>>2]=q;q=N(c[la>>2]|0,c[aa>>2]|0)|0;c[oa>>2]=$()|0;m=l;l=l+((1*q|0)+15&-16)|0;Ci(na)|0;c[ja>>2]=c[(c[Qb>>2]|0)+124>>2];c[ha>>2]=c[(c[Qb>>2]|0)+116>>2];c[ia>>2]=c[(c[Qb>>2]|0)+108>>2];c[(c[Qb>>2]|0)+124>>2]=c[(c[Qb>>2]|0)+14320>>2];c[(c[Qb>>2]|0)+116>>2]=c[(c[Qb>>2]|0)+14336>>2];c[(c[Qb>>2]|0)+108>>2]=c[(c[Qb>>2]|0)+14288>>2];c[ka>>2]=c[(c[Qb>>2]|0)+8+56>>2];q=c[Qb>>2]|0;if(c[ka>>2]|0)c[q+108>>2]=1;else c[(c[Qb>>2]|0)+14328>>2]=c[q+14288>>2];c[Za>>2]=0;while(1){q=c[Qb>>2]|0;if((c[Za>>2]|0)>=(c[la>>2]|0)){Eb=214;break}c[q+8+56>>2]=0;do if(c[Lb>>2]|0){if((c[Za>>2]|0)!=((c[la>>2]|0)-1|0))break;c[(c[Qb>>2]|0)+124>>2]=1002}while(0);Jb=(c[pa>>2]|0)+((N(c[Za>>2]|0,(N(c[(c[Qb>>2]|0)+100>>2]|0,c[(c[Qb>>2]|0)+132>>2]|0)|0)/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|0)|0;c[(c[Qb>>2]|0)+8+28>>2]=q;q=(c[ta>>2]|0)-(c[(c[Qb>>2]|0)+8+28>>2]|0)|0;if((c[kb>>2]|0)==1104){m=c[Qb>>2]|0;q=(q<<1|0)/3|0}else{m=c[Qb>>2]|0;q=(q*3|0)/5|0}sa=m+8+28|0;c[sa>>2]=(c[sa>>2]|0)+q;if((c[(c[Qb>>2]|0)+8+28>>2]|0)>((c[ta>>2]<<2|0)/5|0|0))c[(c[Qb>>2]|0)+8+28>>2]=(c[ta>>2]<<2|0)/5|0;if(c[(c[Qb>>2]|0)+14348>>2]|0)break;c[ra>>2]=(c[ta>>2]|0)-(c[(c[Qb>>2]|0)+8+28>>2]|0);c[qa>>2]=(c[kb>>2]|0)==1104?3e3:3600;g[_a>>2]=+(c[ra>>2]|0)/(+(c[ra>>2]|0)+ +(N(c[(c[Qb>>2]|0)+14288>>2]|0,c[qa>>2]|0)|0));g[_a>>2]=+g[_a>>2]<.8571428656578064?+g[_a>>2]+.1428571492433548:1.0}else c[(c[Qb>>2]|0)+8+28>>2]=c[ta>>2];while(0);do if(c[(c[Qb>>2]|0)+14348>>2]|0){if(!(c[(c[Qb>>2]|0)+136>>2]|0))break;if(c[(c[Qb>>2]|0)+164>>2]|0)break;g[xa>>2]=0.0;c[va>>2]=17;b[za>>1]=16e3;do if((c[(c[Qb>>2]|0)+14336>>2]|0)==1101){c[va>>2]=13;b[za>>1]=8e3}else{if((c[(c[Qb>>2]|0)+14336>>2]|0)!=1102)break;c[va>>2]=15;b[za>>1]=12e3}while(0);c[ua>>2]=0;while(1){if((c[ua>>2]|0)>=(c[(c[Qb>>2]|0)+100>>2]|0))break;c[Za>>2]=0;while(1){if((c[Za>>2]|0)>=(c[va>>2]|0))break;if(+g[(c[(c[Qb>>2]|0)+14348>>2]|0)+(((c[ua>>2]|0)*21|0)+(c[Za>>2]|0)<<2)>>2]<.5)t=+g[(c[(c[Qb>>2]|0)+14348>>2]|0)+(((c[ua>>2]|0)*21|0)+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;do if(c[Nb>>2]|0){c[Pb>>2]=-3;c[Mb>>2]=1}else{q=c[Qb>>2]|0;if(!(c[La>>2]|0)){c[q+18216>>2]=0;Za=qi(c[(c[Qb>>2]|0)+14320>>2]|0,(c[(c[Qb>>2]|0)+132>>2]|0)/(c[Gb>>2]|0)|0,c[kb>>2]|0,c[(c[Qb>>2]|0)+14288>>2]|0)|0;a[(c[Ob>>2]|0)+-1>>0]=Za;c[Pb>>2]=1;c[Mb>>2]=1;break}do if((c[q+14320>>2]|0)==1e3){if((c[(c[Qb>>2]|0)+8+68>>2]|0)==8e3){c[kb>>2]=1101;break}if((c[(c[Qb>>2]|0)+8+68>>2]|0)==12e3){c[kb>>2]=1102;break}if((c[(c[Qb>>2]|0)+8+68>>2]|0)!=16e3)break;c[kb>>2]=1103}while(0);c[(c[Qb>>2]|0)+8+60>>2]=c[(c[Qb>>2]|0)+8+84>>2];if(c[(c[Qb>>2]|0)+8+60>>2]|0){c[Ib>>2]=1;c[jb>>2]=0;c[(c[Qb>>2]|0)+14340>>2]=1}c[Mb>>2]=0}while(0);_(c[Ma>>2]|0);if(!(c[Mb>>2]|0))Eb=325}else Eb=325;b:do if((Eb|0)==325){c[Ka>>2]=21;switch(c[kb>>2]|0){case 1101:{c[Ka>>2]=13;break}case 1103:case 1102:{c[Ka>>2]=17;break}case 1104:{c[Ka>>2]=19;break}case 1105:{c[Ka>>2]=21;break}default:{}}Za=c[ib>>2]|0;c[Na>>2]=c[Ka>>2];Wa(Za,10012,Na)|0;Za=c[ib>>2]|0;c[Oa>>2]=c[(c[Qb>>2]|0)+14288>>2];Wa(Za,10008,Oa)|0;Za=c[ib>>2]|0;c[Pa>>2]=-1;Wa(Za,4002,Pa)|0;do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1e3){g[Ja>>2]=2.0;Za=c[ib>>2]|0;c[Qa>>2]=0;Wa(Za,4006,Qa)|0;if(c[(c[Qb>>2]|0)+8+64>>2]|0)g[Ja>>2]=0.0;Za=c[ib>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a>>2]<1.0?1:+g[(c[Qb>>2]|0)+14300>>2]<1.0)ui(o,o,+g[(c[Qb>>2]|0)+14300>>2],+g[_a>>2],c[(c[bb>>2]|0)+4>>2]|0,c[Gb>>2]|0,c[(c[Qb>>2]|0)+100>>2]|0,c[(c[bb>>2]|0)+60>>2]|0,c[(c[Qb>>2]|0)+132>>2]|0);g[(c[Qb>>2]|0)+14300>>2]=+g[_a>>2];if(!((c[(c[Qb>>2]|0)+14320>>2]|0)==1001?(c[(c[Qb>>2]|0)+14288>>2]|0)!=1:0)){if(16384<((0>((c[$a>>2]|0)-3e4|0)?0:(c[$a>>2]|0)-3e4|0)<<1|0))q=16384;else q=(0>((c[$a>>2]|0)-3e4|0)?0:(c[$a>>2]|0)-3e4|0)<<1;c[(c[Qb>>2]|0)+8+80>>2]=q}do if(!(c[(c[Qb>>2]|0)+14348>>2]|0)){if((c[(c[Qb>>2]|0)+100>>2]|0)!=2)break;if((b[(c[Qb>>2]|0)+14292>>1]|0)>=16384?(c[(c[Qb>>2]|0)+8+80>>2]|0)>=16384:0)break;g[cb>>2]=+(b[(c[Qb>>2]|0)+14292>>1]|0);g[db>>2]=+(c[(c[Qb>>2]|0)+8+80>>2]|0);g[cb>>2]=+g[cb>>2]*.00006103515625;g[db>>2]=+g[db>>2]*.00006103515625;xi(o,o,+g[cb>>2],+g[db>>2],c[(c[bb>>2]|0)+4>>2]|0,c[Gb>>2]|0,c[(c[Qb>>2]|0)+100>>2]|0,c[(c[bb>>2]|0)+60>>2]|0,c[(c[Qb>>2]|0)+132>>2]|0);b[(c[Qb>>2]|0)+14292>>1]=c[(c[Qb>>2]|0)+8+80>>2]}while(0);do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002){db=(wi(Fb)|0)+17|0;if((db+(((c[(c[Qb>>2]|0)+14320>>2]|0)==1001&1)*20|0)|0)>((c[Hb>>2]|0)-1<<3|0)){Eb=383;break}do if((c[(c[Qb>>2]|0)+14320>>2]|0)==1001){if((c[Ib>>2]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)}while(0);c[Nb>>2]=(c[Nb>>2]|0)+(1+(c[Jb>>2]|0));do if(!(c[(c[Qb>>2]|0)+136>>2]|0))if(Gi(c[Ob>>2]|0,c[Nb>>2]|0,c[Hb>>2]|0)|0){c[Pb>>2]=-3;c[Mb>>2]=1;break b}else{c[Nb>>2]=c[Hb>>2];break}while(0);c[Pb>>2]=c[Nb>>2];c[Mb>>2]=1}while(0);_(c[Kb>>2]|0);Qb=c[Pb>>2]|0;l=Rb;return Qb|0}while(0);c[C>>2]=c[(c[Qb>>2]|0)+14320>>2];if(!(c[(c[Qb>>2]|0)+14336>>2]|0))q=1101;else q=c[(c[Qb>>2]|0)+14336>>2]|0;c[A>>2]=q;if(!(c[C>>2]|0))c[C>>2]=1e3;if((c[Da>>2]|0)>100)c[C>>2]=1002;if((c[Da>>2]|0)<50)c[C>>2]=1e3;do if(!((c[C>>2]|0)==1e3&(c[A>>2]|0)>1103)){if((c[C>>2]|0)==1002&(c[A>>2]|0)==1102){c[A>>2]=1101;break}if((c[A>>2]|0)<=1104)c[A>>2]=1104}else c[A>>2]=1103;while(0);Qb=qi(c[C>>2]|0,c[Da>>2]|0,c[A>>2]|0,c[(c[Qb>>2]|0)+14288>>2]|0)|0;a[c[Ob>>2]>>0]=Qb;c[Pb>>2]=1;Qb=c[Pb>>2]|0;l=Rb;return Qb|0}c[Pb>>2]=-1;Qb=c[Pb>>2]|0;l=Rb;return Qb|0}function pi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;g=i+12|0;h=i+8|0;e=i+4|0;f=i;c[h>>2]=a;c[e>>2]=b;c[f>>2]=d;if(!(c[e>>2]|0))c[e>>2]=(c[(c[h>>2]|0)+132>>2]|0)/400|0;b=c[h>>2]|0;if((c[(c[h>>2]|0)+152>>2]|0)==-1e3){c[g>>2]=(((c[b+132>>2]|0)*60|0)/(c[e>>2]|0)|0)+(N(c[(c[h>>2]|0)+132>>2]|0,c[(c[h>>2]|0)+100>>2]|0)|0);h=c[g>>2]|0;l=i;return h|0}if((c[b+152>>2]|0)==-1){h=N(c[f>>2]<<3,c[(c[h>>2]|0)+132>>2]|0)|0;c[g>>2]=(h|0)/(c[e>>2]|0)|0;h=c[g>>2]|0;l=i;return h|0}else{c[g>>2]=c[(c[h>>2]|0)+152>>2];h=c[g>>2]|0;l=i;return h|0}return 0}function qi(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;k=p+20|0;j=p+16|0;h=p+12|0;i=p+8|0;m=p+4|0;o=p+24|0;n=p;c[k>>2]=b;c[j>>2]=e;c[h>>2]=f;c[i>>2]=g;c[m>>2]=0;while(1){if((c[j>>2]|0)>=400)break;c[j>>2]=c[j>>2]<<1;c[m>>2]=(c[m>>2]|0)+1}do if((c[k>>2]|0)!=1e3)if((c[k>>2]|0)==1002){k=(c[h>>2]|0)-1102|0;c[n>>2]=k;c[n>>2]=(c[n>>2]|0)<0?0:k;a[o>>0]=-128;a[o>>0]=d[o>>0]|0|c[n>>2]<<5;a[o>>0]=d[o>>0]|0|c[m>>2]<<3;break}else{a[o>>0]=96;a[o>>0]=d[o>>0]|0|(c[h>>2]|0)-1104<<4;a[o>>0]=d[o>>0]|0|(c[m>>2]|0)-2<<3;break}else{a[o>>0]=(c[h>>2]|0)-1101<<5;a[o>>0]=d[o>>0]|0|(c[m>>2]|0)-2<<3}while(0);a[o>>0]=d[o>>0]|0|((c[i>>2]|0)==2&1)<<2;l=p;return a[o>>0]|0}function ri(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;q=l;l=l+64|0;n=q+60|0;v=q+56|0;p=q+52|0;m=q+48|0;o=q+44|0;k=q+40|0;u=q+36|0;j=q+24|0;i=q+16|0;s=q+8|0;t=q+4|0;r=q;c[n>>2]=a;c[v>>2]=b;c[p>>2]=d;c[m>>2]=e;c[o>>2]=f;c[k>>2]=g;c[u>>2]=h;c[s>>2]=(((c[v>>2]&65535)<<16>>16)*2471|0)/((c[u>>2]|0)/1e3|0|0)|0;c[t>>2]=268435456-((c[s>>2]|0)*471|0);c[j>>2]=c[t>>2];c[j+4>>2]=0-(c[t>>2]|0)<<1;c[j+8>>2]=c[t>>2];c[r>>2]=c[t>>2]>>6;d=N(c[s>>2]>>16,(c[s>>2]&65535)<<16>>16)|0;d=d+((N(c[s>>2]&65535,(c[s>>2]&65535)<<16>>16)|0)>>16)|0;d=N(c[r>>2]>>16,(d+(N(c[s>>2]|0,(c[s>>2]>>15)+1>>1)|0)-8388608&65535)<<16>>16)|0;f=N(c[s>>2]>>16,(c[s>>2]&65535)<<16>>16)|0;f=f+((N(c[s>>2]&65535,(c[s>>2]&65535)<<16>>16)|0)>>16)|0;f=d+((N(c[r>>2]&65535,(f+(N(c[s>>2]|0,(c[s>>2]>>15)+1>>1)|0)-8388608&65535)<<16>>16)|0)>>16)|0;d=N(c[s>>2]>>16,(c[s>>2]&65535)<<16>>16)|0;d=d+((N(c[s>>2]&65535,(c[s>>2]&65535)<<16>>16)|0)>>16)|0;c[i>>2]=f+(N(c[r>>2]|0,(d+(N(c[s>>2]|0,(c[s>>2]>>15)+1>>1)|0)-8388608>>15)+1>>1)|0);d=N(c[r>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;d=d+((N(c[r>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16)|0;c[i+4>>2]=d+(N(c[r>>2]|0,(c[r>>2]>>15)+1>>1)|0);yi(c[n>>2]|0,j,i,c[m>>2]|0,c[p>>2]|0,c[o>>2]|0,c[k>>2]|0);if((c[k>>2]|0)!=2){l=q;return}yi((c[n>>2]|0)+4|0,j,i,(c[m>>2]|0)+8|0,(c[p>>2]|0)+4|0,c[o>>2]|0,c[k>>2]|0);l=q;return}function si(a,b,d,e,f,h,i){a=a|0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2]|0)>=(c[x>>2]|0))break a;e=+g[(c[A>>2]|0)+((N(c[t>>2]|0,c[v>>2]|0)|0)<<2)>>2];g[z>>2]=e*+g[(c[A>>2]|0)+((N(c[t>>2]|0,c[v>>2]|0)|0)<<2)>>2];g[r>>2]=+g[z>>2]*+g[s>>2]+(1.0-+g[z>>2])*+g[q>>2];g[(c[w>>2]|0)+(c[t>>2]<<1<<2)>>2]=+g[r>>2]*+g[(c[u>>2]|0)+(c[t>>2]<<1<<2)>>2];g[(c[w>>2]|0)+((c[t>>2]<<1)+1<<2)>>2]=+g[r>>2]*+g[(c[u>>2]|0)+((c[t>>2]<<1)+1<<2)>>2];c[t>>2]=(c[t>>2]|0)+1}while(0);c[m>>2]=0;do{c[t>>2]=c[x>>2];while(1){if((c[t>>2]|0)>=(c[o>>2]|0))break;C=N(c[t>>2]|0,c[n>>2]|0)|0;D=N(c[t>>2]|0,c[n>>2]|0)|0;g[(c[w>>2]|0)+(D+(c[m>>2]|0)<<2)>>2]=+g[s>>2]*+g[(c[u>>2]|0)+(C+(c[m>>2]|0)<<2)>>2];c[t>>2]=(c[t>>2]|0)+1}D=(c[m>>2]|0)+1|0;c[m>>2]=D}while((D|0)<(c[n>>2]|0));l=B;return}function vi(a){a=+a;var b=0,c=0;c=l;l=l+16|0;b=c;g[b>>2]=a;g[b>>2]=+g[b>>2]*32768.0;g[b>>2]=+g[b>>2]>-32768.0?+g[b>>2]:-32768.0;g[b>>2]=+g[b>>2]<32767.0?+g[b>>2]:32767.0;b=(Ui(+g[b>>2])|0)&65535;l=c;return b|0}function wi(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function xi(a,b,d,e,f,h,i,j,k){a=a|0;b=b|0;d=+d;e=+e;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s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]|0)|0)<<2)>>2];g[o>>2]=(e-+g[(c[u>>2]|0)+((N(c[t>>2]|0,c[m>>2]|0)|0)+1<<2)>>2])*.5;g[o>>2]=+g[s>>2]*+g[o>>2];e=+g[(c[w>>2]|0)+((N(c[t>>2]|0,c[m>>2]|0)|0)<<2)>>2];g[(c[w>>2]|0)+((N(c[t>>2]|0,c[m>>2]|0)|0)<<2)>>2]=e-+g[o>>2];e=+g[(c[w>>2]|0)+((N(c[t>>2]|0,c[m>>2]|0)|0)+1<<2)>>2];g[(c[w>>2]|0)+((N(c[t>>2]|0,c[m>>2]|0)|0)+1<<2)>>2]=e+ +g[o>>2];c[t>>2]=(c[t>>2]|0)+1}l=A;return}function yi(a,b,d,e,f,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;u=l;l=l+64|0;n=u+60|0;v=u+56|0;w=u+52|0;m=u+48|0;r=u+44|0;q=u+40|0;s=u+36|0;p=u+32|0;t=u+28|0;o=u+24|0;j=u+16|0;k=u;c[n>>2]=a;c[v>>2]=b;c[w>>2]=d;c[m>>2]=e;c[r>>2]=f;c[q>>2]=h;c[s>>2]=i;g[j>>2]=+(c[c[w>>2]>>2]|0)*3.725290298461914e-09;g[j+4>>2]=+(c[(c[w>>2]|0)+4>>2]|0)*3.725290298461914e-09;g[k>>2]=+(c[c[v>>2]>>2]|0)*3.725290298461914e-09;g[k+4>>2]=+(c[(c[v>>2]|0)+4>>2]|0)*3.725290298461914e-09;g[k+8>>2]=+(c[(c[v>>2]|0)+8>>2]|0)*3.725290298461914e-09;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[q>>2]|0))break;g[o>>2]=+g[(c[n>>2]|0)+((N(c[p>>2]|0,c[s>>2]|0)|0)<<2)>>2];g[t>>2]=+g[c[m>>2]>>2]+ +g[k>>2]*+g[o>>2];g[c[m>>2]>>2]=+g[(c[m>>2]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a>>2]=0;c[f>>2]=e;c[h>>2]=(c[Ra>>2]|0)+(c[c[Ra>>2]>>2]|0);a:do switch(c[Va>>2]|0){case 4e3:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[da>>2]=Va;c[m>>2]=c[da>>2];do if(!((c[m>>2]|0)!=2048&(c[m>>2]|0)!=2049&(c[m>>2]|0)!=2051)){if((c[(c[Ra>>2]|0)+14344>>2]|0)==0?(c[(c[Ra>>2]|0)+96>>2]|0)!=(c[m>>2]|0):0)break;c[(c[Ra>>2]|0)+96>>2]=c[m>>2];f=95;break a}while(0);c[Sa>>2]=-1;f=95;break}case 4001:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ea>>2]=Va;c[n>>2]=c[ea>>2];if(c[n>>2]|0){c[c[n>>2]>>2]=c[(c[Ra>>2]|0)+96>>2];f=95}else f=96;break}case 4002:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[na>>2]=Va;c[u>>2]=c[na>>2];do if((c[u>>2]|0)!=-1e3&(c[u>>2]|0)!=-1){if((c[u>>2]|0)<=0){f=96;break a}if((c[u>>2]|0)<=500){c[u>>2]=500;break}if((c[u>>2]|0)>((c[(c[Ra>>2]|0)+100>>2]|0)*3e5|0))c[u>>2]=(c[(c[Ra>>2]|0)+100>>2]|0)*3e5}while(0);c[(c[Ra>>2]|0)+152>>2]=c[u>>2];f=95;break}case 4003:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ga>>2]=Va;c[O>>2]=c[Ga>>2];if(c[O>>2]|0){f=pi(c[Ra>>2]|0,c[(c[Ra>>2]|0)+14332>>2]|0,1276)|0;c[c[O>>2]>>2]=f;f=95}else f=96;break}case 4022:{Pa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Pa>>2]|0;c[f>>2]=Pa+4;c[La>>2]=Va;c[Qa>>2]=c[La>>2];f=c[Qa>>2]|0;if((c[Qa>>2]|0)<1){if((f|0)!=-1e3){f=96;break a}}else if((c[Qa>>2]|0)!=-1e3?(f|0)>(c[(c[Ra>>2]|0)+100>>2]|0):0){f=96;break a}c[(c[Ra>>2]|0)+108>>2]=c[Qa>>2];f=95;break}case 4023:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ma>>2]=Va;c[U>>2]=c[Ma>>2];if(c[U>>2]|0){c[c[U>>2]>>2]=c[(c[Ra>>2]|0)+108>>2];f=95}else f=96;break}case 4004:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Na>>2]=Va;c[V>>2]=c[Na>>2];if(!((c[V>>2]|0)<1101|(c[V>>2]|0)>1105)){c[(c[Ra>>2]|0)+120>>2]=c[V>>2];f=c[Ra>>2]|0;if((c[(c[Ra>>2]|0)+120>>2]|0)==1101){c[f+8+12>>2]=8e3;f=95;break a}else{c[(c[Ra>>2]|0)+8+12>>2]=(c[f+120>>2]|0)==1102?12e3:16e3;f=95;break a}}else f=96;break}case 4005:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Oa>>2]=Va;c[W>>2]=c[Oa>>2];if(c[W>>2]|0){c[c[W>>2]>>2]=c[(c[Ra>>2]|0)+120>>2];f=95}else f=96;break}case 4008:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Pa>>2]=Va;c[X>>2]=c[Pa>>2];if(!(((c[X>>2]|0)<1101|(c[X>>2]|0)>1105)&(c[X>>2]|0)!=-1e3)){c[(c[Ra>>2]|0)+116>>2]=c[X>>2];f=c[Ra>>2]|0;if((c[(c[Ra>>2]|0)+116>>2]|0)==1101){c[f+8+12>>2]=8e3;f=95;break a}else{c[(c[Ra>>2]|0)+8+12>>2]=(c[f+116>>2]|0)==1102?12e3:16e3;f=95;break a}}else f=96;break}case 4009:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[fa>>2]=Va;c[o>>2]=c[fa>>2];if(c[o>>2]|0){c[c[o>>2]>>2]=c[(c[Ra>>2]|0)+14336>>2];f=95}else f=96;break}case 4016:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ga>>2]=Va;c[p>>2]=c[ga>>2];if((c[p>>2]|0)<0|(c[p>>2]|0)>1)f=96;else{c[(c[Ra>>2]|0)+8+44>>2]=c[p>>2];f=95}break}case 4017:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ha>>2]=Va;c[q>>2]=c[ha>>2];if(c[q>>2]|0){c[c[q>>2]>>2]=c[(c[Ra>>2]|0)+8+44>>2];f=95}else f=96;break}case 4010:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ia>>2]=Va;c[r>>2]=c[ia>>2];if((c[r>>2]|0)<0|(c[r>>2]|0)>10)f=96;else{c[(c[Ra>>2]|0)+8+36>>2]=c[r>>2];f=c[h>>2]|0;c[Y>>2]=c[r>>2];Wa(f,4010,Y)|0;f=95}break}case 4011:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ja>>2]=Va;c[s>>2]=c[ja>>2];if(c[s>>2]|0){c[c[s>>2]>>2]=c[(c[Ra>>2]|0)+8+36>>2];f=95}else f=96;break}case 4012:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ka>>2]=Va;c[t>>2]=c[ka>>2];if((c[t>>2]|0)<0|(c[t>>2]|0)>1)f=96;else{c[(c[Ra>>2]|0)+8+40>>2]=c[t>>2];f=95}break}case 4013:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[la>>2]=Va;c[v>>2]=c[la>>2];if(c[v>>2]|0){c[c[v>>2]>>2]=c[(c[Ra>>2]|0)+8+40>>2];f=95}else f=96;break}case 4014:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ma>>2]=Va;c[w>>2]=c[ma>>2];if((c[w>>2]|0)<0|(c[w>>2]|0)>100)f=96;else{c[(c[Ra>>2]|0)+8+32>>2]=c[w>>2];f=c[h>>2]|0;c[ca>>2]=c[w>>2];Wa(f,4014,ca)|0;f=95}break}case 4015:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[oa>>2]=Va;c[x>>2]=c[oa>>2];if(c[x>>2]|0){c[c[x>>2]>>2]=c[(c[Ra>>2]|0)+8+32>>2];f=95}else f=96;break}case 4006:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[pa>>2]=Va;c[y>>2]=c[pa>>2];if((c[y>>2]|0)<0|(c[y>>2]|0)>1)f=96;else{c[(c[Ra>>2]|0)+136>>2]=c[y>>2];c[(c[Ra>>2]|0)+8+48>>2]=1-(c[y>>2]|0);f=95}break}case 4007:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[qa>>2]=Va;c[z>>2]=c[qa>>2];if(c[z>>2]|0){c[c[z>>2]>>2]=c[(c[Ra>>2]|0)+136>>2];f=95}else f=96;break}case 11018:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ra>>2]=Va;c[A>>2]=c[ra>>2];if((c[A>>2]|0)<-1|(c[A>>2]|0)>100)f=96;else{c[(c[Ra>>2]|0)+128>>2]=c[A>>2];f=95}break}case 11019:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[sa>>2]=Va;c[B>>2]=c[sa>>2];if(c[B>>2]|0){c[c[B>>2]>>2]=c[(c[Ra>>2]|0)+128>>2];f=95}else f=96;break}case 4020:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ta>>2]=Va;c[C>>2]=c[ta>>2];if((c[C>>2]|0)<0|(c[C>>2]|0)>1)f=96;else{c[(c[Ra>>2]|0)+140>>2]=c[C>>2];f=95}break}case 4021:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ua>>2]=Va;c[D>>2]=c[ua>>2];if(c[D>>2]|0){c[c[D>>2]>>2]=c[(c[Ra>>2]|0)+140>>2];f=95}else f=96;break}case 4024:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[va>>2]=Va;c[E>>2]=c[va>>2];if((c[E>>2]|0)!=-1e3&(c[E>>2]|0)!=3001&(c[E>>2]|0)!=3002)f=96;else{c[(c[Ra>>2]|0)+112>>2]=c[E>>2];f=95}break}case 4025:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[wa>>2]=Va;c[F>>2]=c[wa>>2];if(c[F>>2]|0){c[c[F>>2]>>2]=c[(c[Ra>>2]|0)+112>>2];f=95}else f=96;break}case 4027:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[xa>>2]=Va;c[G>>2]=c[xa>>2];if(c[G>>2]|0){c[c[G>>2]>>2]=(c[(c[Ra>>2]|0)+132>>2]|0)/400|0;if((c[(c[Ra>>2]|0)+96>>2]|0)!=2051){f=c[G>>2]|0;c[f>>2]=(c[f>>2]|0)+(c[(c[Ra>>2]|0)+104>>2]|0);f=95}else f=95}else f=96;break}case 4029:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ya>>2]=Va;c[H>>2]=c[ya>>2];if(c[H>>2]|0){c[c[H>>2]>>2]=c[(c[Ra>>2]|0)+132>>2];f=95}else f=96;break}case 4031:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[za>>2]=Va;c[I>>2]=c[za>>2];if(c[I>>2]|0){c[c[I>>2]>>2]=c[(c[Ra>>2]|0)+18216>>2];f=95}else f=96;break}case 4036:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Aa>>2]=Va;c[J>>2]=c[Aa>>2];if((c[J>>2]|0)<8|(c[J>>2]|0)>24)f=96;else{c[(c[Ra>>2]|0)+156>>2]=c[J>>2];f=95}break}case 4037:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ba>>2]=Va;c[K>>2]=c[Ba>>2];if(c[K>>2]|0){c[c[K>>2]>>2]=c[(c[Ra>>2]|0)+156>>2];f=95}else f=96;break}case 4040:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ca>>2]=Va;c[L>>2]=c[Ca>>2];if((c[L>>2]|0)!=5e3&(c[L>>2]|0)!=5001&(c[L>>2]|0)!=5002&(c[L>>2]|0)!=5003&(c[L>>2]|0)!=5004&(c[L>>2]|0)!=5005&(c[L>>2]|0)!=5006&(c[L>>2]|0)!=5010)f=96;else{c[(c[Ra>>2]|0)+144>>2]=c[L>>2];f=c[h>>2]|0;c[Z>>2]=c[L>>2];Wa(f,4040,Z)|0;f=95}break}case 4041:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Da>>2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10024:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ia>>2]=Va;c[R>>2]=c[Ia>>2];c[(c[Ra>>2]|0)+164>>2]=c[R>>2];f=c[h>>2]|0;c[$>>2]=c[R>>2];c[Sa>>2]=Wa(f,10024,$)|0;f=95;break}case 10026:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ja>>2]=Va;c[S>>2]=c[Ja>>2];c[(c[Ra>>2]|0)+14348>>2]=c[S>>2];f=c[h>>2]|0;c[aa>>2]=(c[S>>2]|0)+((((c[S>>2]|0)-(c[S>>2]|0)|0)/4|0)<<2);c[Sa>>2]=Wa(f,10026,aa)|0;f=95;break}case 10015:{Ra=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Ra>>2]|0;c[f>>2]=Ra+4;c[Ka>>2]=Va;c[T>>2]=c[Ka>>2];if(c[T>>2]|0){f=c[h>>2]|0;c[ba>>2]=(c[T>>2]|0)+((((c[T>>2]|0)-(c[T>>2]|0)|0)/4|0)<<2);c[Sa>>2]=Wa(f,10015,ba)|0;f=95}else f=96;break}default:{c[Sa>>2]=-5;f=95}}while(0);if((f|0)==95){c[Ta>>2]=c[Sa>>2];Va=c[Ta>>2]|0;l=Ua;return Va|0}else if((f|0)==96){c[Ta>>2]=-1;Va=c[Ta>>2]|0;l=Ua;return Va|0}return 0}function Ci(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;c[(c[b>>2]|0)+4>>2]=0;l=d;return c[b>>2]|0}function Di(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;a=Ei(c[h>>2]|0,c[g>>2]|0,c[f>>2]|0,0)|0;l=e;return a|0}function Ei(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var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z>>2]|0;c[z>>2]=j+1;a[j>>0]=e;break}c[A>>2]=-2;E=c[A>>2]|0;l=F;return E|0}while(0);if((c[q>>2]|0)<=2){if(c[x>>2]|0?(c[D>>2]|0)<(c[v>>2]|0):0)o=23}else o=23;a:do if((o|0)==23){c[y>>2]=0;c[z>>2]=c[r>>2];if(c[C>>2]|0)c[D>>2]=1+((b[(c[u>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0)>=252&1);else c[D>>2]=0;c[E>>2]=0;c[t>>2]=1;while(1){if((c[t>>2]|0)>=(c[q>>2]|0))break;if((b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]|0)!=(b[c[u>>2]>>1]|0)){o=29;break}c[t>>2]=(c[t>>2]|0)+1}if((o|0)==29)c[E>>2]=1;do if(c[E>>2]|0){c[D>>2]=(c[D>>2]|0)+2;c[t>>2]=0;while(1){f=c[u>>2]|0;if((c[t>>2]|0)>=((c[q>>2]|0)-1|0))break;c[D>>2]=(c[D>>2]|0)+(1+((b[f+(c[t>>2]<<1)>>1]|0)>=252&1)+(b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]|0));c[t>>2]=(c[t>>2]|0)+1}c[D>>2]=(c[D>>2]|0)+(b[f+((c[q>>2]|0)-1<<1)>>1]|0);if((c[D>>2]|0)<=(c[v>>2]|0)){p=(d[c[p>>2]>>0]&252|3)&255;o=c[z>>2]|0;c[z>>2]=o+1;a[o>>0]=p;o=(c[q>>2]|128)&255;p=c[z>>2]|0;c[z>>2]=p+1;a[p>>0]=o;break}c[A>>2]=-2;E=c[A>>2]|0;l=F;return E|0}else{o=(N(c[q>>2]|0,b[c[u>>2]>>1]|0)|0)+2|0;c[D>>2]=(c[D>>2]|0)+o;if((c[D>>2]|0)<=(c[v>>2]|0)){p=(d[c[p>>2]>>0]&252|3)&255;o=c[z>>2]|0;c[z>>2]=o+1;a[o>>0]=p;o=c[q>>2]&255;p=c[z>>2]|0;c[z>>2]=p+1;a[p>>0]=o;break}c[A>>2]=-2;E=c[A>>2]|0;l=F;return E|0}while(0);if(c[x>>2]|0)f=(c[v>>2]|0)-(c[D>>2]|0)|0;else f=0;c[y>>2]=f;if(c[y>>2]|0){p=(c[r>>2]|0)+1|0;a[p>>0]=d[p>>0]|64;c[w>>2]=((c[y>>2]|0)-1|0)/255|0;c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[w>>2]|0))break;p=c[z>>2]|0;c[z>>2]=p+1;a[p>>0]=-1;c[t>>2]=(c[t>>2]|0)+1}p=(c[y>>2]|0)-((c[w>>2]|0)*255|0)-1&255;w=c[z>>2]|0;c[z>>2]=w+1;a[w>>0]=p;c[D>>2]=(c[D>>2]|0)+(c[y>>2]|0)}if(c[E>>2]|0){c[t>>2]=0;while(1){if((c[t>>2]|0)>=((c[q>>2]|0)-1|0))break a;E=Hh(b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]|0,c[z>>2]|0)|0;c[z>>2]=(c[z>>2]|0)+E;c[t>>2]=(c[t>>2]|0)+1}}}while(0);if(c[C>>2]|0){c[B>>2]=Hh(b[(c[u>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0,c[z>>2]|0)|0;c[z>>2]=(c[z>>2]|0)+(c[B>>2]|0)}c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[q>>2]|0))break;$i(c[z>>2]|0,c[(c[s>>2]|0)+(c[t>>2]<<2)>>2]|0,(b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]|0)+0|0)|0;c[z>>2]=(c[z>>2]|0)+(b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]|0);c[t>>2]=(c[t>>2]|0)+1}b:do if(c[x>>2]|0)while(1){if((c[z>>2]|0)>>>0>=((c[r>>2]|0)+(c[v>>2]|0)|0)>>>0)break b;E=c[z>>2]|0;c[z>>2]=E+1;a[E>>0]=0}while(0);c[A>>2]=c[D>>2];E=c[A>>2]|0;l=F;return E|0}c[A>>2]=-1;E=c[A>>2]|0;l=F;return E|0}function Gi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+320|0;i=k+316|0;e=k+312|0;f=k+308|0;g=k+304|0;j=k+4|0;h=k;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if((c[f>>2]|0)<1){c[i>>2]=-1;j=c[i>>2]|0;l=k;return j|0}if((c[f>>2]|0)==(c[g>>2]|0)){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}if((c[f>>2]|0)>(c[g>>2]|0)){c[i>>2]=-1;j=c[i>>2]|0;l=k;return j|0}Ci(j)|0;$i((c[e>>2]|0)+(c[g>>2]|0)+(0-(c[f>>2]|0))|0,c[e>>2]|0,(c[f>>2]|0)+0|0)|0;Di(j,(c[e>>2]|0)+(c[g>>2]|0)+(0-(c[f>>2]|0))|0,c[f>>2]|0)|0;c[h>>2]=Fi(j,0,c[j+4>>2]|0,c[e>>2]|0,c[g>>2]|0,0,1)|0;if((c[h>>2]|0)>0){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}else{c[i>>2]=c[h>>2];j=c[i>>2]|0;l=k;return j|0}return 0}function Hi(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=Ii()|0;c[c[d>>2]>>2]=a;Ji(c[d>>2]|0);l=b;return}function Ii(){return 0}function Ji(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=(c[d>>2]|0)+4;aj(c[e>>2]|0,0,14116-((c[e>>2]|0)-(c[d>>2]|0))|0)|0;l=b;return}function Ki(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n+24|0;j=n+20|0;e=n+16|0;f=n+12|0;h=n+8|0;k=n+4|0;i=n;c[m>>2]=a;c[j>>2]=b;c[e>>2]=d;c[f>>2]=c[(c[m>>2]|0)+8508>>2];c[h>>2]=(c[(c[m>>2]|0)+8504>>2]|0)-(c[(c[m>>2]|0)+8508>>2]|0);if((c[h>>2]|0)<0)c[h>>2]=(c[h>>2]|0)+200;if((c[e>>2]|0)>480?(c[f>>2]|0)!=(c[(c[m>>2]|0)+8504>>2]|0):0){a=(c[f>>2]|0)+1|0;c[f>>2]=a;c[f>>2]=(c[f>>2]|0)==200?0:a}if((c[f>>2]|0)==(c[(c[m>>2]|0)+8504>>2]|0))c[f>>2]=(c[f>>2]|0)+-1;if((c[f>>2]|0)<0)c[f>>2]=199;_i(c[j>>2]|0,(c[m>>2]|0)+8516+((c[f>>2]|0)*28|0)|0,28|0)|0;b=(c[e>>2]|0)/120|0;d=(c[m>>2]|0)+8512|0;while(1){c[d>>2]=(c[d>>2]|0)+b;b=c[m>>2]|0;if((c[(c[m>>2]|0)+8512>>2]|0)<4)break;b=b+8512|0;c[b>>2]=(c[b>>2]|0)-4;b=1;d=(c[m>>2]|0)+8508|0}if((c[b+8508>>2]|0)>=200){a=(c[m>>2]|0)+8508|0;c[a>>2]=(c[a>>2]|0)-200}c[h>>2]=((c[h>>2]|0)-10|0)>0?(c[h>>2]|0)-10|0:0;g[k>>2]=0.0;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(200-(c[h>>2]|0)|0))break;g[k>>2]=+g[k>>2]+ +g[(c[m>>2]|0)+7688+(c[i>>2]<<2)>>2];c[i>>2]=(c[i>>2]|0)+1}while(1){if((c[i>>2]|0)>=200)break;g[k>>2]=+g[k>>2]+ +g[(c[m>>2]|0)+6888+(c[i>>2]<<2)>>2];c[i>>2]=(c[i>>2]|0)+1}g[k>>2]=+g[k>>2]*+g[(c[m>>2]|0)+8492>>2]+(1.0-+g[k>>2])*+g[(c[m>>2]|0)+8488>>2];g[(c[j>>2]|0)+20>>2]=+g[k>>2];l=n;return}function Li(a,b,d,e,f,g,h,i,j,k,m,n){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=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|0)<<3)+4>>2];g[W>>2]=+g[W>>2]+ +g[_>>2];g[ea>>2]=+g[ea>>2]+ +g[_>>2]*+g[fa+(c[Fa>>2]<<2)>>2];g[aa>>2]=+g[aa>>2]+ +g[_>>2]*2.0*(.5-+g[ca+(c[Fa>>2]<<2)>>2]);c[Fa>>2]=(c[Fa>>2]|0)+1}if(!(+g[W>>2]<1.0e9)){ga=37;break}if(+g[W>>2]!=+g[W>>2]){ga=37;break}g[(c[Wa>>2]|0)+5844+((c[(c[Wa>>2]|0)+6856>>2]|0)*72|0)+(c[sa>>2]<<2)>>2]=+g[W>>2];g[Ua>>2]=+g[Ua>>2]+ +g[aa>>2]/(+g[W>>2]+1.0000000036274937e-15);n=+B(+(+g[W>>2]+1.000000013351432e-10));g[ta>>2]=+g[ta>>2]+n;n=+L(+(+g[W>>2]+1.000000013351432e-10));g[ua+(c[sa>>2]<<2)>>2]=n;if(+g[ua+(c[sa>>2]<<2)>>2]<+g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2]+.009999999776482582)n=+g[ua+(c[sa>>2]<<2)>>2];else n=+g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2]+.009999999776482582;g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2]=n;if(+g[ua+(c[sa>>2]<<2)>>2]>+g[(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)>>2]-.10000000149011612)n=+g[ua+(c[sa>>2]<<2)>>2];else n=+g[(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)>>2]-.10000000149011612;g[(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)>>2]=n;if(+g[(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)>>2]<+g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2]+1.0){V=(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)|0;g[V>>2]=+g[V>>2]+.5;V=(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)|0;g[V>>2]=+g[V>>2]-.5}g[wa>>2]=+g[wa>>2]+(+g[ua+(c[sa>>2]<<2)>>2]-+g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2])/(+g[(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)>>2]+1.0000000036274937e-15-+g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2]);g[Y>>2]=0.0;g[X>>2]=0.0;c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=8)break;n=+B(+(+g[(c[Wa>>2]|0)+5844+((c[Fa>>2]|0)*72|0)+(c[sa>>2]<<2)>>2]));g[X>>2]=+g[X>>2]+n;g[Y>>2]=+g[Y>>2]+ +g[(c[Wa>>2]|0)+5844+((c[Fa>>2]|0)*72|0)+(c[sa>>2]<<2)>>2];c[Fa>>2]=(c[Fa>>2]|0)+1}if(.9900000095367432<+g[X>>2]/+B(+(+g[Y>>2]*8.0+1.0e-15)))n=.9900000095367432;else n=+g[X>>2]/+B(+(+g[Y>>2]*8.0+1.0e-15));g[da>>2]=n;g[da>>2]=+g[da>>2]*+g[da>>2];g[da>>2]=+g[da>>2]*+g[da>>2];g[Ba>>2]=+g[Ba>>2]+ +g[da>>2];if(+g[ea>>2]/(+g[W>>2]+1.0000000036274937e-15)>+g[da>>2]*+g[(c[Wa>>2]|0)+5768+(c[sa>>2]<<2)>>2])n=+g[ea>>2]/(+g[W>>2]+1.0000000036274937e-15);else n=+g[da>>2]*+g[(c[Wa>>2]|0)+5768+(c[sa>>2]<<2)>>2];g[Z+(c[sa>>2]<<2)>>2]=n;g[Ca>>2]=+g[Ca>>2]+ +g[Z+(c[sa>>2]<<2)>>2];if((c[sa>>2]|0)>=9)g[Ca>>2]=+g[Ca>>2]-+g[Z+((c[sa>>2]|0)-18+9<<2)>>2];if(+g[va>>2]>(+((c[sa>>2]|0)-18|0)*.029999999329447746+1.0)*+g[Ca>>2])n=+g[va>>2];else n=(+((c[sa>>2]|0)-18|0)*.029999999329447746+1.0)*+g[Ca>>2];g[va>>2]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)>>2]=n;if(+g[ha>>2]>+g[(c[Wa>>2]|0)+6564+(c[sa>>2]<<2)>>2])n=+g[ha>>2];else n=+g[(c[Wa>>2]|0)+6564+(c[sa>>2]<<2)>>2];g[ha>>2]=n;g[ma>>2]=+g[ma>>2]*.05000000074505806>+g[ha>>2]?+g[ma>>2]*.05000000074505806:+g[ha>>2];if((+g[ha>>2]>+g[ma>>2]*.1?+g[ha>>2]*1.0e9>+g[oa>>2]:0)?+g[ha>>2]>+g[pa>>2]*+((c[ka>>2]|0)-(c[la>>2]|0)|0):0)c[Ta>>2]=c[sa>>2];c[sa>>2]=(c[sa>>2]|0)+1}if((c[(c[Wa>>2]|0)+6868>>2]|0)<=2)c[Ta>>2]=20;g[ta>>2]=+Ti(+g[ta>>2])*20.0;if(+g[(c[Wa>>2]|0)+6848>>2]-.029999999329447746>+g[ta>>2])n=+g[(c[Wa>>2]|0)+6848>>2]-.029999999329447746;else n=+g[ta>>2];g[(c[Wa>>2]|0)+6848>>2]=n;qa=(c[Wa>>2]|0)+6852|0;g[qa>>2]=+g[qa>>2]*(1.0-+g[ra>>2]);if(+g[ta>>2]<+g[(c[Wa>>2]|0)+6848>>2]-30.0){ta=(c[Wa>>2]|0)+6852|0;g[ta>>2]=+g[ta>>2]+ +g[ra>>2]}c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=8)break;g[xa>>2]=0.0;c[sa>>2]=0;while(1){if((c[sa>>2]|0)>=16)break;g[xa>>2]=+g[xa>>2]+ +g[19300+((c[Fa>>2]<<4)+(c[sa>>2]|0)<<2)>>2]*+g[ua+(c[sa>>2]<<2)>>2];c[sa>>2]=(c[sa>>2]|0)+1}g[ya+(c[Fa>>2]<<2)>>2]=+g[xa>>2];c[Fa>>2]=(c[Fa>>2]|0)+1}g[Ba>>2]=+g[Ba>>2]/18.0;n=+g[wa>>2]/18.0;g[wa>>2]=n;g[wa>>2]=(c[(c[Wa>>2]|0)+6868>>2]|0)<10?.5:n;g[Ua>>2]=+g[Ua>>2]/18.0;g[(c[Va>>2]|0)+16>>2]=+g[Ua>>2]+(1.0-+g[Ua>>2])*+g[wa>>2];g[Ca>>2]=+g[va>>2]/9.0;if(+g[Ca>>2]>+g[(c[Wa>>2]|0)+5840>>2]*.800000011920929)n=+g[Ca>>2];else n=+g[(c[Wa>>2]|0)+5840>>2]*.800000011920929;g[Ca>>2]=n;g[(c[Wa>>2]|0)+5840>>2]=+g[Ca>>2];g[Da>>2]=+g[Da>>2]/64.0;g[(c[Va>>2]|0)+8>>2]=+g[Da>>2];c[(c[Wa>>2]|0)+6856>>2]=((c[(c[Wa>>2]|0)+6856>>2]|0)+1|0)%8|0;Da=(c[Wa>>2]|0)+6868|0;c[Da>>2]=(c[Da>>2]|0)+1;g[(c[Va>>2]|0)+4>>2]=+g[Ca>>2];c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=4)break;g[Aa+(c[Fa>>2]<<2)>>2]=(+g[ya+(c[Fa>>2]<<2)>>2]+ +g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+24<<2)>>2])*-.12298999726772308+(+g[(c[Wa>>2]|0)+6648+(c[Fa>>2]<<2)>>2]+ +g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+16<<2)>>2])*.49195000529289246+ +g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+8<<2)>>2]*.6969299912452698-+g[(c[Wa>>2]|0)+6776+(c[Fa>>2]<<2)>>2]*1.4349000453948975;c[Fa>>2]=(c[Fa>>2]|0)+1}c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=4)break;g[(c[Wa>>2]|0)+6776+(c[Fa>>2]<<2)>>2]=(1.0-+g[za>>2])*+g[(c[Wa>>2]|0)+6776+(c[Fa>>2]<<2)>>2]+ +g[za>>2]*+g[ya+(c[Fa>>2]<<2)>>2];c[Fa>>2]=(c[Fa>>2]|0)+1}c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=4)break;g[Aa+(4+(c[Fa>>2]|0)<<2)>>2]=(+g[ya+(c[Fa>>2]<<2)>>2]-+g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+24<<2)>>2])*.6324599981307983+(+g[(c[Wa>>2]|0)+6648+(c[Fa>>2]<<2)>>2]-+g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+16<<2)>>2])*.31622999906539917;c[Fa>>2]=(c[Fa>>2]|0)+1}c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=3)break;g[Aa+(8+(c[Fa>>2]|0)<<2)>>2]=(+g[ya+(c[Fa>>2]<<2)>>2]+ +g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+24<<2)>>2])*.5345199704170227-(+g[(c[Wa>>2]|0)+6648+(c[Fa>>2]<<2)>>2]+ +g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+16<<2)>>2])*.26725998520851135-+g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+8<<2)>>2]*.5345199704170227;c[Fa>>2]=(c[Fa>>2]|0)+1}b:do if((c[(c[Wa>>2]|0)+6868>>2]|0)>5){c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=9)break b;g[(c[Wa>>2]|0)+6808+(c[Fa>>2]<<2)>>2]=(1.0-+g[za>>2])*+g[(c[Wa>>2]|0)+6808+(c[Fa>>2]<<2)>>2]+ +g[za>>2]*+g[Aa+(c[Fa>>2]<<2)>>2]*+g[Aa+(c[Fa>>2]<<2)>>2];c[Fa>>2]=(c[Fa>>2]|0)+1}}while(0);c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=8)break;g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+24<<2)>>2]=+g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+16<<2)>>2];g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+16<<2)>>2]=+g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+8<<2)>>2];g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+8<<2)>>2]=+g[(c[Wa>>2]|0)+6648+(c[Fa>>2]<<2)>>2];g[(c[Wa>>2]|0)+6648+(c[Fa>>2]<<2)>>2]=+g[ya+(c[Fa>>2]<<2)>>2];c[Fa>>2]=(c[Fa>>2]|0)+1}c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=9)break;n=+B(+(+g[(c[Wa>>2]|0)+6808+(c[Fa>>2]<<2)>>2]));g[Aa+(11+(c[Fa>>2]|0)<<2)>>2]=n;c[Fa>>2]=(c[Fa>>2]|0)+1}g[Aa+80>>2]=+g[(c[Va>>2]|0)+4>>2];g[Aa+84>>2]=+g[(c[Va>>2]|0)+16>>2];g[Aa+88>>2]=+g[Ba>>2];g[Aa+92>>2]=+g[(c[Va>>2]|0)+8>>2];g[Aa+96>>2]=+g[(c[Wa>>2]|0)+6852>>2];Oi(20616,Aa,Ra);g[Ra>>2]=(+g[Ra>>2]+1.0)*.5;g[Ra>>2]=+g[Ra>>2]*1.2100000381469727*+g[Ra>>2]+.009999999776482582-+C(+(+g[Ra>>2]),10.0)*.23000000417232513;g[Ra+4>>2]=+g[Ra+4>>2]*.5+.5;g[Ra>>2]=+g[Ra+4>>2]*+g[Ra>>2]+(1.0-+g[Ra+4>>2])*.5;g[Pa>>2]=+g[Ra+4>>2]*4.999999873689376e-05;g[Ea>>2]=.05000000074505806;if(.05000000074505806>(.949999988079071<+g[Ra>>2]?.949999988079071:+g[Ra>>2]))n=.05000000074505806;else n=.949999988079071<+g[Ra>>2]?.949999988079071:+g[Ra>>2];g[Ia>>2]=n;if(.949999988079071<+g[(c[Wa>>2]|0)+6844>>2])n=.949999988079071;else n=+g[(c[Wa>>2]|0)+6844>>2];if(!(.05000000074505806>n))if(.949999988079071<+g[(c[Wa>>2]|0)+6844>>2])n=.949999988079071;else n=+g[(c[Wa>>2]|0)+6844>>2];else n=.05000000074505806;g[Ma>>2]=n;n=+A(+(+g[Ia>>2]-+g[Ma>>2]))*.05000000074505806;g[Ea>>2]=n/(+g[Ia>>2]*(1.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|0)+8492>>2];Pa=(c[Wa>>2]|0)+8492|0;g[Pa>>2]=+g[Pa>>2]+ +g[Qa>>2]*n}if(!(+g[(c[Wa>>2]|0)+6844>>2]<.1))break;Pa=(c[Wa>>2]|0)+8496|0;Qa=(c[Pa>>2]|0)+1|0;c[Pa>>2]=Qa;g[Sa>>2]=1.0/+(Qa|0);if((c[(c[Wa>>2]|0)+8496>>2]|0)<500)j=c[(c[Wa>>2]|0)+8496>>2]|0;else j=500;c[(c[Wa>>2]|0)+8496>>2]=j;if(.20000000298023224<+g[Ra>>2]-+g[(c[Wa>>2]|0)+8488>>2])n=.20000000298023224;else n=+g[Ra>>2]-+g[(c[Wa>>2]|0)+8488>>2];Ra=(c[Wa>>2]|0)+8488|0;g[Ra>>2]=+g[Ra>>2]+ +g[Sa>>2]*n}else{if(!(c[j+8500>>2]|0))g[(c[Wa>>2]|0)+8492>>2]=.8999999761581421;if(c[(c[Wa>>2]|0)+8496>>2]|0)break;g[(c[Wa>>2]|0)+8488>>2]=.10000000149011612}while(0);if((c[(c[Wa>>2]|0)+6860>>2]|0)!=(+g[(c[Wa>>2]|0)+6844>>2]>.5|0))c[(c[Wa>>2]|0)+6864>>2]=0;c[(c[Wa>>2]|0)+6860>>2]=+g[(c[Wa>>2]|0)+6844>>2]>.5&1;c[(c[Va>>2]|0)+24>>2]=c[Ta>>2];g[(c[Va>>2]|0)+12>>2]=+g[Ua>>2];c[c[Va>>2]>>2]=1;l=Xa;return}function Ni(a,b){a=+a;b=+b;var c=0,d=0,e=0,f=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+24|0;i=k+20|0;f=k+16|0;h=k+12|0;j=k+8|0;c=k+4|0;d=k;g[i>>2]=a;g[f>>2]=b;a=+A(+(+g[f>>2]));if(a+ +A(+(+g[i>>2]))<9.999999717180685e-10){g[f>>2]=+g[f>>2]*999999995904.0;g[i>>2]=+g[i>>2]*999999995904.0}g[h>>2]=+g[f>>2]*+g[f>>2];g[j>>2]=+g[i>>2]*+g[i>>2];if(+g[h>>2]<+g[j>>2]){g[c>>2]=(+g[j>>2]+ +g[h>>2]*.6784840226173401)*(+g[j>>2]+ +g[h>>2]*.0859554186463356);if(+g[c>>2]!=0.0){g[e>>2]=-+g[f>>2]*+g[i>>2]*(+g[j>>2]+ +g[h>>2]*.43157973885536194)/+g[c>>2]+(+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866);a=+g[e>>2];l=k;return +a}else{g[e>>2]=+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866;a=+g[e>>2];l=k;return +a}}else{g[d>>2]=(+g[h>>2]+ +g[j>>2]*.6784840226173401)*(+g[h>>2]+ +g[j>>2]*.0859554186463356);if(+g[d>>2]!=0.0){g[e>>2]=+g[f>>2]*+g[i>>2]*(+g[h>>2]+ +g[j>>2]*.43157973885536194)/+g[d>>2]+(+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866)-(+g[f>>2]*+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866);a=+g[e>>2];l=k;return +a}else{g[e>>2]=(+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866)-(+g[f>>2]*+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866);a=+g[e>>2];l=k;return +a}}return 0.0}function Oi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0;r=l;l=l+448|0;o=r+436|0;f=r+432|0;p=r+428|0;m=r+424|0;k=r+24|0;j=r+16|0;h=r+12|0;i=r+8|0;n=r+4|0;q=r;c[o>>2]=a;c[f>>2]=b;c[p>>2]=d;c[j>>2]=c[(c[o>>2]|0)+8>>2];c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[(c[o>>2]|0)+4>>2]|0)+4>>2]|0))break;d=c[j>>2]|0;c[j>>2]=d+4;g[i>>2]=+g[d>>2];c[h>>2]=0;while(1){e=+g[i>>2];if((c[h>>2]|0)>=(c[c[(c[o>>2]|0)+4>>2]>>2]|0))break;s=+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2];d=c[j>>2]|0;c[j>>2]=d+4;g[i>>2]=e+s*+g[d>>2];c[h>>2]=(c[h>>2]|0)+1}s=+Pi(e);g[k+(c[m>>2]<<2)>>2]=s;c[m>>2]=(c[m>>2]|0)+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[(c[o>>2]|0)+4>>2]|0)+8>>2]|0))break;i=c[j>>2]|0;c[j>>2]=i+4;g[q>>2]=+g[i>>2];c[n>>2]=0;while(1){e=+g[q>>2];if((c[n>>2]|0)>=(c[(c[(c[o>>2]|0)+4>>2]|0)+4>>2]|0))break;s=+g[k+(c[n>>2]<<2)>>2];i=c[j>>2]|0;c[j>>2]=i+4;g[q>>2]=e+s*+g[i>>2];c[n>>2]=(c[n>>2]|0)+1}s=+Pi(e);g[(c[p>>2]|0)+(c[m>>2]<<2)>>2]=s;c[m>>2]=(c[m>>2]|0)+1}l=r;return}function Pi(a){a=+a;var b=0,d=0,e=0,f=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+20|0;h=j+16|0;d=j+12|0;i=j+8|0;b=j+4|0;f=j;g[h>>2]=a;g[f>>2]=1.0;if(!(+g[h>>2]<8.0)){g[e>>2]=1.0;a=+g[e>>2];l=j;return +a}if(!(+g[h>>2]>-8.0)){g[e>>2]=-1.0;a=+g[e>>2];l=j;return +a}if(+g[h>>2]!=+g[h>>2]){g[e>>2]=0.0;a=+g[e>>2];l=j;return +a}if(+g[h>>2]<0.0){g[h>>2]=-+g[h>>2];g[f>>2]=-1.0}c[d>>2]=~~+z(+(+g[h>>2]*25.0+.5));g[h>>2]=+g[h>>2]-+(c[d>>2]|0)*.03999999910593033;g[i>>2]=+g[19812+(c[d>>2]<<2)>>2];g[b>>2]=1.0-+g[i>>2]*+g[i>>2];g[i>>2]=+g[i>>2]+ +g[h>>2]*+g[b>>2]*(1.0-+g[i>>2]*+g[h>>2]);g[e>>2]=+g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=e}else{do{h=(c[a+4>>2]&-8)-k|0;j=h>>>0>>0;d=j?h:d;e=j?a:e;a=c[a+16+(((c[a+16>>2]|0)==0&1)<<2)>>2]|0}while((a|0)!=0);j=d;h=e}g=h+k|0;if(g>>>0>h>>>0){f=c[h+24>>2]|0;b=c[h+12>>2]|0;do if((b|0)==(h|0)){a=h+20|0;b=c[a>>2]|0;if(!b){a=h+16|0;b=c[a>>2]|0;if(!b){d=0;break}}while(1){e=b+20|0;d=c[e>>2]|0;if(d|0){b=d;a=e;continue}e=b+16|0;d=c[e>>2]|0;if(!d)break;else{b=d;a=e}}c[a>>2]=0;d=b}else{d=c[h+8>>2]|0;c[d+12>>2]=b;c[b+8>>2]=d;d=b}while(0);do if(f|0){b=c[h+28>>2]|0;a=30828+(b<<2)|0;if((h|0)==(c[a>>2]|0)){c[a>>2]=d;if(!d){c[7632]=i&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=d;if(!d)break}c[d+24>>2]=f;b=c[h+16>>2]|0;if(b|0){c[d+16>>2]=b;c[b+24>>2]=d}b=c[h+20>>2]|0;if(b|0){c[d+20>>2]=b;c[b+24>>2]=d}}while(0);if(j>>>0<16){w=j+k|0;c[h+4>>2]=w|3;w=h+w+4|0;c[w>>2]=c[w>>2]|1}else{c[h+4>>2]=k|3;c[g+4>>2]=j|1;c[g+j>>2]=j;if(m|0){e=c[7636]|0;b=m>>>3;d=30564+(b<<1<<2)|0;b=1<>2]|0}c[b>>2]=e;c[a+12>>2]=e;c[e+8>>2]=a;c[e+12>>2]=d}c[7633]=j;c[7636]=g}w=h+8|0;l=x;return w|0}else n=k}else n=k}else n=k}else if(a>>>0<=4294967231){a=a+11|0;k=a&-8;e=c[7632]|0;if(e){d=0-k|0;a=a>>>8;if(a)if(k>>>0>16777215)j=31;else{n=(a+1048320|0)>>>16&8;v=a<>>16&4;v=v<>>16&2;j=14-(m|n|j)+(v<>>15)|0;j=k>>>(j+7|0)&1|j<<1}else j=0;a=c[30828+(j<<2)>>2]|0;a:do if(!a){f=0;a=0;v=57}else{f=0;h=k<<((j|0)==31?0:25-(j>>>1)|0);i=a;a=0;while(1){g=(c[i+4>>2]&-8)-k|0;if(g>>>0>>0)if(!g){d=0;f=i;a=i;v=61;break a}else{d=g;a=i}g=c[i+20>>2]|0;i=c[i+16+(h>>>31<<2)>>2]|0;f=(g|0)==0|(g|0)==(i|0)?f:g;g=(i|0)==0;if(g){v=57;break}else h=h<<((g^1)&1)}}while(0);if((v|0)==57){if((f|0)==0&(a|0)==0){a=2<>>12&16;a=a>>>j;i=a>>>5&8;a=a>>>i;m=a>>>2&4;a=a>>>m;n=a>>>1&2;a=a>>>n;f=a>>>1&1;f=c[30828+((i|j|m|n|f)+(a>>>f)<<2)>>2]|0;a=0}if(!f){i=d;j=a}else v=61}if((v|0)==61)while(1){v=0;m=(c[f+4>>2]&-8)-k|0;n=m>>>0>>0;d=n?m:d;a=n?f:a;f=c[f+16+(((c[f+16>>2]|0)==0&1)<<2)>>2]|0;if(!f){i=d;j=a;break}else v=61}if((j|0)!=0?i>>>0<((c[7633]|0)-k|0)>>>0:0){h=j+k|0;if(h>>>0<=j>>>0){w=0;l=x;return w|0}g=c[j+24>>2]|0;b=c[j+12>>2]|0;do if((b|0)==(j|0)){a=j+20|0;b=c[a>>2]|0;if(!b){a=j+16|0;b=c[a>>2]|0;if(!b){b=0;break}}while(1){f=b+20|0;d=c[f>>2]|0;if(d|0){b=d;a=f;continue}f=b+16|0;d=c[f>>2]|0;if(!d)break;else{b=d;a=f}}c[a>>2]=0}else{w=c[j+8>>2]|0;c[w+12>>2]=b;c[b+8>>2]=w}while(0);do if(g){a=c[j+28>>2]|0;d=30828+(a<<2)|0;if((j|0)==(c[d>>2]|0)){c[d>>2]=b;if(!b){e=e&~(1<>2]|0)!=(j|0)&1)<<2)>>2]=b;if(!b)break}c[b+24>>2]=g;a=c[j+16>>2]|0;if(a|0){c[b+16>>2]=a;c[a+24>>2]=b}a=c[j+20>>2]|0;if(a){c[b+20>>2]=a;c[a+24>>2]=b}}while(0);do if(i>>>0>=16){c[j+4>>2]=k|3;c[h+4>>2]=i|1;c[h+i>>2]=i;b=i>>>3;if(i>>>0<256){d=30564+(b<<1<<2)|0;a=c[7631]|0;b=1<>2]|0}c[b>>2]=h;c[a+12>>2]=h;c[h+8>>2]=a;c[h+12>>2]=d;break}b=i>>>8;if(b)if(i>>>0>16777215)b=31;else{v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;b=14-(u|v|b)+(w<>>15)|0;b=i>>>(b+7|0)&1|b<<1}else b=0;d=30828+(b<<2)|0;c[h+28>>2]=b;a=h+16|0;c[a+4>>2]=0;c[a>>2]=0;a=1<>2]=h;c[h+24>>2]=d;c[h+12>>2]=h;c[h+8>>2]=h;break}a=i<<((b|0)==31?0:25-(b>>>1)|0);d=c[d>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(i|0)){v=97;break}e=d+16+(a>>>31<<2)|0;b=c[e>>2]|0;if(!b){v=96;break}else{a=a<<1;d=b}}if((v|0)==96){c[e>>2]=h;c[h+24>>2]=d;c[h+12>>2]=h;c[h+8>>2]=h;break}else if((v|0)==97){v=d+8|0;w=c[v>>2]|0;c[w+12>>2]=h;c[v>>2]=h;c[h+8>>2]=w;c[h+12>>2]=d;c[h+24>>2]=0;break}}else{w=i+k|0;c[j+4>>2]=w|3;w=j+w+4|0;c[w>>2]=c[w>>2]|1}while(0);w=j+8|0;l=x;return w|0}else n=k}else n=k}else n=-1;while(0);d=c[7633]|0;if(d>>>0>=n>>>0){a=d-n|0;b=c[7636]|0;if(a>>>0>15){w=b+n|0;c[7636]=w;c[7633]=a;c[w+4>>2]=a|1;c[b+d>>2]=a;c[b+4>>2]=n|3}else{c[7633]=0;c[7636]=0;c[b+4>>2]=d|3;w=b+d+4|0;c[w>>2]=c[w>>2]|1}w=b+8|0;l=x;return w|0}h=c[7634]|0;if(h>>>0>n>>>0){u=h-n|0;c[7634]=u;w=c[7637]|0;v=w+n|0;c[7637]=v;c[v+4>>2]=u|1;c[w+4>>2]=n|3;w=w+8|0;l=x;return w|0}if(!(c[7749]|0)){c[7751]=4096;c[7750]=4096;c[7752]=-1;c[7753]=-1;c[7754]=0;c[7742]=0;c[7749]=o&-16^1431655768;a=4096}else a=c[7751]|0;i=n+48|0;j=n+47|0;g=a+j|0;e=0-a|0;k=g&e;if(k>>>0<=n>>>0){w=0;l=x;return w|0}a=c[7741]|0;if(a|0?(m=c[7739]|0,o=m+k|0,o>>>0<=m>>>0|o>>>0>a>>>0):0){w=0;l=x;return w|0}b:do if(!(c[7742]&4)){d=c[7637]|0;c:do if(d){f=30972;while(1){a=c[f>>2]|0;if(a>>>0<=d>>>0?(r=f+4|0,(a+(c[r>>2]|0)|0)>>>0>d>>>0):0)break;a=c[f+8>>2]|0;if(!a){v=118;break c}else f=a}b=g-h&e;if(b>>>0<2147483647){a=dj(b|0)|0;if((a|0)==((c[f>>2]|0)+(c[r>>2]|0)|0)){if((a|0)!=(-1|0)){h=a;g=b;v=135;break b}}else{e=a;v=126}}else b=0}else v=118;while(0);do if((v|0)==118){d=dj(0)|0;if((d|0)!=(-1|0)?(b=d,p=c[7750]|0,q=p+-1|0,b=((q&b|0)==0?0:(q+b&0-p)-b|0)+k|0,p=c[7739]|0,q=b+p|0,b>>>0>n>>>0&b>>>0<2147483647):0){r=c[7741]|0;if(r|0?q>>>0<=p>>>0|q>>>0>r>>>0:0){b=0;break}a=dj(b|0)|0;if((a|0)==(d|0)){h=d;g=b;v=135;break b}else{e=a;v=126}}else b=0}while(0);do if((v|0)==126){d=0-b|0;if(!(i>>>0>b>>>0&(b>>>0<2147483647&(e|0)!=(-1|0))))if((e|0)==(-1|0)){b=0;break}else{h=e;g=b;v=135;break b}a=c[7751]|0;a=j-b+a&0-a;if(a>>>0>=2147483647){h=e;g=b;v=135;break b}if((dj(a|0)|0)==(-1|0)){dj(d|0)|0;b=0;break}else{h=e;g=a+b|0;v=135;break b}}while(0);c[7742]=c[7742]|4;v=133}else{b=0;v=133}while(0);if(((v|0)==133?k>>>0<2147483647:0)?(s=dj(k|0)|0,r=dj(0)|0,u=r-s|0,t=u>>>0>(n+40|0)>>>0,!((s|0)==(-1|0)|t^1|s>>>0>>0&((s|0)!=(-1|0)&(r|0)!=(-1|0))^1)):0){h=s;g=t?u:b;v=135}if((v|0)==135){b=(c[7739]|0)+g|0;c[7739]=b;if(b>>>0>(c[7740]|0)>>>0)c[7740]=b;j=c[7637]|0;do if(j){f=30972;while(1){d=c[f>>2]|0;e=f+4|0;b=c[e>>2]|0;if((h|0)==(d+b|0)){v=143;break}a=c[f+8>>2]|0;if(!a)break;else f=a}if(((v|0)==143?(c[f+12>>2]&8|0)==0:0)?h>>>0>j>>>0&d>>>0<=j>>>0:0){c[e>>2]=b+g;w=(c[7634]|0)+g|0;u=j+8|0;u=(u&7|0)==0?0:0-u&7;v=j+u|0;u=w-u|0;c[7637]=v;c[7634]=u;c[v+4>>2]=u|1;c[j+w+4>>2]=40;c[7638]=c[7753];break}if(h>>>0<(c[7635]|0)>>>0)c[7635]=h;a=h+g|0;b=30972;while(1){if((c[b>>2]|0)==(a|0)){v=151;break}b=c[b+8>>2]|0;if(!b){a=30972;break}}if((v|0)==151)if(!(c[b+12>>2]&8)){c[b>>2]=h;m=b+4|0;c[m>>2]=(c[m>>2]|0)+g;m=h+8|0;m=h+((m&7|0)==0?0:0-m&7)|0;b=a+8|0;b=a+((b&7|0)==0?0:0-b&7)|0;k=m+n|0;i=b-m-n|0;c[m+4>>2]=n|3;do if((j|0)!=(b|0)){if((c[7636]|0)==(b|0)){w=(c[7633]|0)+i|0;c[7633]=w;c[7636]=k;c[k+4>>2]=w|1;c[k+w>>2]=w;break}a=c[b+4>>2]|0;if((a&3|0)==1){h=a&-8;e=a>>>3;d:do if(a>>>0<256){a=c[b+8>>2]|0;d=c[b+12>>2]|0;if((d|0)==(a|0)){c[7631]=c[7631]&~(1<>2]=d;c[d+8>>2]=a;break}}else{g=c[b+24>>2]|0;a=c[b+12>>2]|0;do if((a|0)==(b|0)){e=b+16|0;d=e+4|0;a=c[d>>2]|0;if(!a){a=c[e>>2]|0;if(!a){a=0;break}else f=e}else f=d;while(1){e=a+20|0;d=c[e>>2]|0;if(d|0){a=d;f=e;continue}e=a+16|0;d=c[e>>2]|0;if(!d)break;else{a=d;f=e}}c[f>>2]=0}else{w=c[b+8>>2]|0;c[w+12>>2]=a;c[a+8>>2]=w}while(0);if(!g)break;d=c[b+28>>2]|0;e=30828+(d<<2)|0;do if((c[e>>2]|0)!=(b|0)){c[g+16+(((c[g+16>>2]|0)!=(b|0)&1)<<2)>>2]=a;if(!a)break d}else{c[e>>2]=a;if(a|0)break;c[7632]=c[7632]&~(1<>2]=g;e=b+16|0;d=c[e>>2]|0;if(d|0){c[a+16>>2]=d;c[d+24>>2]=a}d=c[e+4>>2]|0;if(!d)break;c[a+20>>2]=d;c[d+24>>2]=a}while(0);b=b+h|0;f=h+i|0}else f=i;b=b+4|0;c[b>>2]=c[b>>2]&-2;c[k+4>>2]=f|1;c[k+f>>2]=f;b=f>>>3;if(f>>>0<256){d=30564+(b<<1<<2)|0;a=c[7631]|0;b=1<>2]|0}c[b>>2]=k;c[a+12>>2]=k;c[k+8>>2]=a;c[k+12>>2]=d;break}b=f>>>8;do if(!b)a=0;else{if(f>>>0>16777215){a=31;break}v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;a=14-(u|v|a)+(w<>>15)|0;a=f>>>(a+7|0)&1|a<<1}while(0);e=30828+(a<<2)|0;c[k+28>>2]=a;b=k+16|0;c[b+4>>2]=0;c[b>>2]=0;b=c[7632]|0;d=1<>2]=k;c[k+24>>2]=e;c[k+12>>2]=k;c[k+8>>2]=k;break}a=f<<((a|0)==31?0:25-(a>>>1)|0);d=c[e>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(f|0)){v=192;break}e=d+16+(a>>>31<<2)|0;b=c[e>>2]|0;if(!b){v=191;break}else{a=a<<1;d=b}}if((v|0)==191){c[e>>2]=k;c[k+24>>2]=d;c[k+12>>2]=k;c[k+8>>2]=k;break}else if((v|0)==192){v=d+8|0;w=c[v>>2]|0;c[w+12>>2]=k;c[v>>2]=k;c[k+8>>2]=w;c[k+12>>2]=d;c[k+24>>2]=0;break}}else{w=(c[7634]|0)+i|0;c[7634]=w;c[7637]=k;c[k+4>>2]=w|1}while(0);w=m+8|0;l=x;return w|0}else a=30972;while(1){b=c[a>>2]|0;if(b>>>0<=j>>>0?(w=b+(c[a+4>>2]|0)|0,w>>>0>j>>>0):0)break;a=c[a+8>>2]|0}f=w+-47|0;a=f+8|0;a=f+((a&7|0)==0?0:0-a&7)|0;f=j+16|0;a=a>>>0>>0?j:a;b=a+8|0;d=g+-40|0;u=h+8|0;u=(u&7|0)==0?0:0-u&7;v=h+u|0;u=d-u|0;c[7637]=v;c[7634]=u;c[v+4>>2]=u|1;c[h+d+4>>2]=40;c[7638]=c[7753];d=a+4|0;c[d>>2]=27;c[b>>2]=c[7743];c[b+4>>2]=c[7744];c[b+8>>2]=c[7745];c[b+12>>2]=c[7746];c[7743]=h;c[7744]=g;c[7746]=0;c[7745]=b;b=a+24|0;do{v=b;b=b+4|0;c[b>>2]=7}while((v+8|0)>>>0>>0);if((a|0)!=(j|0)){g=a-j|0;c[d>>2]=c[d>>2]&-2;c[j+4>>2]=g|1;c[a>>2]=g;b=g>>>3;if(g>>>0<256){d=30564+(b<<1<<2)|0;a=c[7631]|0;b=1<>2]|0}c[b>>2]=j;c[a+12>>2]=j;c[j+8>>2]=a;c[j+12>>2]=d;break}b=g>>>8;if(b)if(g>>>0>16777215)d=31;else{v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;d=14-(u|v|d)+(w<>>15)|0;d=g>>>(d+7|0)&1|d<<1}else d=0;e=30828+(d<<2)|0;c[j+28>>2]=d;c[j+20>>2]=0;c[f>>2]=0;b=c[7632]|0;a=1<>2]=j;c[j+24>>2]=e;c[j+12>>2]=j;c[j+8>>2]=j;break}a=g<<((d|0)==31?0:25-(d>>>1)|0);d=c[e>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(g|0)){v=213;break}e=d+16+(a>>>31<<2)|0;b=c[e>>2]|0;if(!b){v=212;break}else{a=a<<1;d=b}}if((v|0)==212){c[e>>2]=j;c[j+24>>2]=d;c[j+12>>2]=j;c[j+8>>2]=j;break}else if((v|0)==213){v=d+8|0;w=c[v>>2]|0;c[w+12>>2]=j;c[v>>2]=j;c[j+8>>2]=w;c[j+12>>2]=d;c[j+24>>2]=0;break}}}else{w=c[7635]|0;if((w|0)==0|h>>>0>>0)c[7635]=h;c[7743]=h;c[7744]=g;c[7746]=0;c[7640]=c[7749];c[7639]=-1;c[7644]=30564;c[7643]=30564;c[7646]=30572;c[7645]=30572;c[7648]=30580;c[7647]=30580;c[7650]=30588;c[7649]=30588;c[7652]=30596;c[7651]=30596;c[7654]=30604;c[7653]=30604;c[7656]=30612;c[7655]=30612;c[7658]=30620;c[7657]=30620;c[7660]=30628;c[7659]=30628;c[7662]=30636;c[7661]=30636;c[7664]=30644;c[7663]=30644;c[7666]=30652;c[7665]=30652;c[7668]=30660;c[7667]=30660;c[7670]=30668;c[7669]=30668;c[7672]=30676;c[7671]=30676;c[7674]=30684;c[7673]=30684;c[7676]=30692;c[7675]=30692;c[7678]=30700;c[7677]=30700;c[7680]=30708;c[7679]=30708;c[7682]=30716;c[7681]=30716;c[7684]=30724;c[7683]=30724;c[7686]=30732;c[7685]=30732;c[7688]=30740;c[7687]=30740;c[7690]=30748;c[7689]=30748;c[7692]=30756;c[7691]=30756;c[7694]=30764;c[7693]=30764;c[7696]=30772;c[7695]=30772;c[7698]=30780;c[7697]=30780;c[7700]=30788;c[7699]=30788;c[7702]=30796;c[7701]=30796;c[7704]=30804;c[7703]=30804;c[7706]=30812;c[7705]=30812;w=g+-40|0;u=h+8|0;u=(u&7|0)==0?0:0-u&7;v=h+u|0;u=w-u|0;c[7637]=v;c[7634]=u;c[v+4>>2]=u|1;c[h+w+4>>2]=40;c[7638]=c[7753]}while(0);b=c[7634]|0;if(b>>>0>n>>>0){u=b-n|0;c[7634]=u;w=c[7637]|0;v=w+n|0;c[7637]=v;c[v+4>>2]=u|1;c[w+4>>2]=n|3;w=w+8|0;l=x;return w|0}}c[(Si()|0)>>2]=12;w=0;l=x;return w|0}function Ri(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if(!a)return;d=a+-8|0;e=c[7635]|0;a=c[a+-4>>2]|0;b=a&-8;k=d+b|0;do if(!(a&1)){f=c[d>>2]|0;if(!(a&3))return;g=d+(0-f)|0;h=f+b|0;if(g>>>0>>0)return;if((c[7636]|0)==(g|0)){b=k+4|0;a=c[b>>2]|0;if((a&3|0)!=3){i=g;j=g;b=h;break}c[7633]=h;c[b>>2]=a&-2;c[g+4>>2]=h|1;c[g+h>>2]=h;return}d=f>>>3;if(f>>>0<256){a=c[g+8>>2]|0;b=c[g+12>>2]|0;if((b|0)==(a|0)){c[7631]=c[7631]&~(1<>2]=b;c[b+8>>2]=a;i=g;j=g;b=h;break}}f=c[g+24>>2]|0;a=c[g+12>>2]|0;do if((a|0)==(g|0)){d=g+16|0;b=d+4|0;a=c[b>>2]|0;if(!a){a=c[d>>2]|0;if(!a){d=0;break}else e=d}else e=b;while(1){d=a+20|0;b=c[d>>2]|0;if(b|0){a=b;e=d;continue}d=a+16|0;b=c[d>>2]|0;if(!b)break;else{a=b;e=d}}c[e>>2]=0;d=a}else{d=c[g+8>>2]|0;c[d+12>>2]=a;c[a+8>>2]=d;d=a}while(0);if(f){a=c[g+28>>2]|0;b=30828+(a<<2)|0;if((c[b>>2]|0)==(g|0)){c[b>>2]=d;if(!d){c[7632]=c[7632]&~(1<>2]|0)!=(g|0)&1)<<2)>>2]=d;if(!d){i=g;j=g;b=h;break}}c[d+24>>2]=f;b=g+16|0;a=c[b>>2]|0;if(a|0){c[d+16>>2]=a;c[a+24>>2]=d}a=c[b+4>>2]|0;if(a){c[d+20>>2]=a;c[a+24>>2]=d;i=g;j=g;b=h}else{i=g;j=g;b=h}}else{i=g;j=g;b=h}}else{i=d;j=d}while(0);if(i>>>0>=k>>>0)return;a=k+4|0;d=c[a>>2]|0;if(!(d&1))return;if(!(d&2)){if((c[7637]|0)==(k|0)){k=(c[7634]|0)+b|0;c[7634]=k;c[7637]=j;c[j+4>>2]=k|1;if((j|0)!=(c[7636]|0))return;c[7636]=0;c[7633]=0;return}if((c[7636]|0)==(k|0)){k=(c[7633]|0)+b|0;c[7633]=k;c[7636]=i;c[j+4>>2]=k|1;c[i+k>>2]=k;return}f=(d&-8)+b|0;e=d>>>3;do if(d>>>0<256){b=c[k+8>>2]|0;a=c[k+12>>2]|0;if((a|0)==(b|0)){c[7631]=c[7631]&~(1<>2]=a;c[a+8>>2]=b;break}}else{g=c[k+24>>2]|0;a=c[k+12>>2]|0;do if((a|0)==(k|0)){d=k+16|0;b=d+4|0;a=c[b>>2]|0;if(!a){a=c[d>>2]|0;if(!a){d=0;break}else e=d}else e=b;while(1){d=a+20|0;b=c[d>>2]|0;if(b|0){a=b;e=d;continue}d=a+16|0;b=c[d>>2]|0;if(!b)break;else{a=b;e=d}}c[e>>2]=0;d=a}else{d=c[k+8>>2]|0;c[d+12>>2]=a;c[a+8>>2]=d;d=a}while(0);if(g|0){a=c[k+28>>2]|0;b=30828+(a<<2)|0;if((c[b>>2]|0)==(k|0)){c[b>>2]=d;if(!d){c[7632]=c[7632]&~(1<>2]|0)!=(k|0)&1)<<2)>>2]=d;if(!d)break}c[d+24>>2]=g;b=k+16|0;a=c[b>>2]|0;if(a|0){c[d+16>>2]=a;c[a+24>>2]=d}a=c[b+4>>2]|0;if(a|0){c[d+20>>2]=a;c[a+24>>2]=d}}}while(0);c[j+4>>2]=f|1;c[i+f>>2]=f;if((j|0)==(c[7636]|0)){c[7633]=f;return}}else{c[a>>2]=d&-2;c[j+4>>2]=b|1;c[i+b>>2]=b;f=b}a=f>>>3;if(f>>>0<256){d=30564+(a<<1<<2)|0;b=c[7631]|0;a=1<>2]|0}c[a>>2]=j;c[b+12>>2]=j;c[j+8>>2]=b;c[j+12>>2]=d;return}a=f>>>8;if(a)if(f>>>0>16777215)b=31;else{i=(a+1048320|0)>>>16&8;k=a<>>16&4;k=k<>>16&2;b=14-(h|i|b)+(k<>>15)|0;b=f>>>(b+7|0)&1|b<<1}else b=0;e=30828+(b<<2)|0;c[j+28>>2]=b;c[j+20>>2]=0;c[j+16>>2]=0;a=c[7632]|0;d=1<>>1)|0);d=c[e>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(f|0)){a=73;break}e=d+16+(b>>>31<<2)|0;a=c[e>>2]|0;if(!a){a=72;break}else{b=b<<1;d=a}}if((a|0)==72){c[e>>2]=j;c[j+24>>2]=d;c[j+12>>2]=j;c[j+8>>2]=j;break}else if((a|0)==73){i=d+8|0;k=c[i>>2]|0;c[k+12>>2]=j;c[i>>2]=j;c[j+8>>2]=k;c[j+12>>2]=d;c[j+24>>2]=0;break}}else{c[7632]=a|d;c[e>>2]=j;c[j+24>>2]=e;c[j+12>>2]=j;c[j+8>>2]=j}while(0);k=(c[7639]|0)+-1|0;c[7639]=k;if(!k)a=30980;else return;while(1){a=c[a>>2]|0;if(!a)break;else a=a+8|0}c[7639]=-1;return}function Si(){return 31020}function Ti(a){a=+a;var b=0,d=0,e=0,f=0,g=0.0,i=0.0,k=0.0,l=0.0,m=0.0;h[j>>3]=a;d=c[j>>2]|0;b=c[j+4>>2]|0;e=(b|0)<0;do if(e|b>>>0<1048576){if((d|0)==0&(b&2147483647|0)==0){a=-1.0/(a*a);break}if(e){a=(a-a)/0.0;break}else{h[j>>3]=a*18014398509481984.0;b=c[j+4>>2]|0;e=c[j>>2]|0;d=-1077;f=9;break}}else if(b>>>0<=2146435071)if((d|0)==0&0==0&(b|0)==1072693248)a=0.0;else{e=d;d=-1023;f=9}while(0);if((f|0)==9){f=b+614242|0;c[j>>2]=e;c[j+4>>2]=(f&1048575)+1072079006;k=+h[j>>3]+-1.0;i=k*(k*.5);l=k/(k+2.0);m=l*l;g=m*m;h[j>>3]=k-i;e=c[j+4>>2]|0;c[j>>2]=0;c[j+4>>2]=e;a=+h[j>>3];g=k-a-i+l*(i+(g*(g*(g*.15313837699209373+.22222198432149784)+.3999999999940942)+m*(g*(g*(g*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)));m=a*.4342944818781689;i=+(d+(f>>>20)|0);l=i*.30102999566361177;k=l+m;a=k+(m+(l-k)+(g*.4342944818781689+(i*3.694239077158931e-13+(g+a)*2.5082946711645275e-11)))}return +a}function Ui(a){a=+a;return ~~+cj(+a)|0}function Vi(){}function Wi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=N(e,f)|0;d=a>>>16;a=(c>>>16)+(N(e,d)|0)|0;e=b>>>16;b=N(e,f)|0;return (y=(a>>>16)+(N(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function Xi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=Wi(e,f)|0;a=y;return (y=(N(b,f)|0)+(N(d,e)|0)+a|a&0,c|0|0)|0}function Yi(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){y=b>>c;return a>>>c|(b&(1<>c-32|0}function Zi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return (y=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function _i(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192)return Y(b|0,d|0,e|0)|0;h=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return h|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}e=g&-4|0;f=e-64|0;while((b|0)<=(f|0)){c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];c[b+32>>2]=c[d+32>>2];c[b+36>>2]=c[d+36>>2];c[b+40>>2]=c[d+40>>2];c[b+44>>2]=c[d+44>>2];c[b+48>>2]=c[d+48>>2];c[b+52>>2]=c[d+52>>2];c[b+56>>2]=c[d+56>>2];c[b+60>>2]=c[d+60>>2];b=b+64|0;d=d+64|0}while((b|0)<(e|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{e=g-4|0;while((b|0)<(e|0)){a[b>>0]=a[d>>0]|0;a[b+1>>0]=a[d+1>>0]|0;a[b+2>>0]=a[d+2>>0]|0;a[b+3>>0]=a[d+3>>0]|0;b=b+4|0;d=d+4|0}}while((b|0)<(g|0)){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}return h|0}function $i(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b>>0]=a[c>>0]|0}b=e}else _i(b,c,d)|0;return b|0}function aj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}f=h&-4|0;g=f-64|0;i=d|d<<8|d<<16|d<<24;while((b|0)<=(g|0)){c[b>>2]=i;c[b+4>>2]=i;c[b+8>>2]=i;c[b+12>>2]=i;c[b+16>>2]=i;c[b+20>>2]=i;c[b+24>>2]=i;c[b+28>>2]=i;c[b+32>>2]=i;c[b+36>>2]=i;c[b+40>>2]=i;c[b+44>>2]=i;c[b+48>>2]=i;c[b+52>>2]=i;c[b+56>>2]=i;c[b+60>>2]=i;b=b+64|0}while((b|0)<(f|0)){c[b>>2]=i;b=b+4|0}}while((b|0)<(h|0)){a[b>>0]=d;b=b+1|0}return h-e|0}function bj(a){a=+a;return a>=0.0?+z(a+.5):+M(a-.5)}function cj(a){a=+a;return a-+z(a)!=.5?+bj(a):+bj(a/2.0)*2.0}function dj(a){a=a|0;var b=0,d=0;d=a+15&-16|0;b=c[i>>2]|0;a=b+d|0;if((d|0)>0&(a|0)<(b|0)|(a|0)<0){V()|0;X(12);return -1}c[i>>2]=a;if((a|0)>(U()|0)?(T()|0)==0:0){c[i>>2]=b;X(12);return -1}return b|0}function ej(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;ba[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function fj(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;R(0)} + +// EMSCRIPTEN_END_FUNCS +var ba=[fj,hi,gi,fj];return{___muldi3:Xi,_bitshift64Ashr:Yi,_free:Ri,_i64Add:Zi,_malloc:Qi,_memcpy:_i,_memmove:$i,_memset:aj,_opus_decode:Xh,_opus_decode_float:ai,_opus_decoder_ctl:bi,_opus_decoder_get_size:Lh,_opus_decoder_init:Nh,_opus_encode:zi,_opus_encode_float:Ai,_opus_encoder_ctl:Bi,_opus_encoder_get_size:ci,_opus_encoder_init:ei,_opus_get_version_string:Ra,_opus_packet_get_nb_samples:_h,_opus_strerror:Qa,_rintf:cj,_sbrk:dj,dynCall_viiiiiii:ej,establishStackSpace:fa,getTempRet0:ia,runPostSets:Vi,setTempRet0:ha,setThrew:ga,stackAlloc:ca,stackRestore:ea,stackSave:da}}) + + +// EMSCRIPTEN_END_ASM +(a.c,a.f,buffer);a.___muldi3=X.___muldi3;a._bitshift64Ashr=X._bitshift64Ashr;a._free=X._free;a._i64Add=X._i64Add;a._malloc=X._malloc;a._memcpy=X._memcpy;a._memmove=X._memmove;a._memset=X._memset;a._opus_decode=X._opus_decode;a._opus_decode_float=X._opus_decode_float;a._opus_decoder_ctl=X._opus_decoder_ctl;a._opus_decoder_get_size=X._opus_decoder_get_size; +a._opus_decoder_init=X._opus_decoder_init;a._opus_encode=X._opus_encode;a._opus_encode_float=X._opus_encode_float;a._opus_encoder_ctl=X._opus_encoder_ctl;a._opus_encoder_get_size=X._opus_encoder_get_size;a._opus_encoder_init=X._opus_encoder_init;a._opus_get_version_string=X._opus_get_version_string;a._opus_packet_get_nb_samples=X._opus_packet_get_nb_samples;a._opus_strerror=X._opus_strerror;a._rintf=X._rintf;a._sbrk=X._sbrk;a.establishStackSpace=X.establishStackSpace;a.getTempRet0=X.getTempRet0; +a.runPostSets=X.runPostSets;a.setTempRet0=X.setTempRet0;a.setThrew=X.setThrew;a.stackAlloc=X.stackAlloc;var na=a.stackRestore=X.stackRestore,ja=a.stackSave=X.stackSave;a.dynCall_viiiiiii=X.dynCall_viiiiiii;a.asm=X; +if(U)if((String.prototype.startsWith?U.startsWith(V):0===U.indexOf(V))||("function"===typeof a.locateFile?U=a.locateFile(U):a.memoryInitializerPrefixURL&&(U=a.memoryInitializerPrefixURL+U)),m||n){var oa=a.readBinary(U);z.set(oa,8)}else{var pa=function(){a.readAsync(U,Y,function(){throw"could not load memory initializer "+U;})};P++;a.monitorRunDependencies&&a.monitorRunDependencies(P);var Y=function(b){b.byteLength&&(b=new Uint8Array(b));z.set(b,8);a.memoryInitializerRequest&&delete a.memoryInitializerRequest.response; +P--;a.monitorRunDependencies&&a.monitorRunDependencies(P);0==P&&(null!==Q&&(clearInterval(Q),Q=null),R&&(b=R,R=null,b()))},qa=r(U);if(qa)Y(qa.buffer);else if(a.memoryInitializerRequest){var ra=function(){var b=a.memoryInitializerRequest,c=b.response;if(200!==b.status&&0!==b.status)if(c=r(a.memoryInitializerRequestURL))c=c.buffer;else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+b.status+", retrying "+U);pa();return}Y(c)};a.memoryInitializerRequest.response? +setTimeout(ra,0):a.memoryInitializerRequest.addEventListener("load",ra)}else pa()}a.then=function(b){if(a.calledRun)b(a);else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();b(a)}}return a};function u(b){this.name="ExitStatus";this.message="Program terminated with exit("+b+")";this.status=b}u.prototype=Error();u.prototype.constructor=u;R=function sa(){a.calledRun||Z();a.calledRun||(R=sa)}; +function Z(){function b(){if(!a.calledRun&&(a.calledRun=!0,!x)){ea||(ea=!0,N(aa));N(ba);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;){var b=a.postRun.shift();da.unshift(b)}N(da)}}if(!(0 /dev/null; then \ + if [ ! -e $(top_srcdir)/package_version ]; then \ + echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \ + fi; \ + . $(top_srcdir)/package_version || exit 1; \ + [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \ + fi; \ + touch $@ + +force: + +# Create a minimal package_version file when make dist is run. +dist-hook: + echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version + + +.PHONY: opus check-opus install-opus docs install-docs + +# automake doesn't do dependency tracking for asm files, that I can tell +$(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): celt/arm/armopts-gnu.S +$(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): $(top_srcdir)/celt/arm/arm2gnu.pl + +# convert ARM asm to GNU as format +%-gnu.S: $(top_srcdir)/%.s + $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@ +# For autoconf-modified sources (e.g., armopts.s) +%-gnu.S: %.s + $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@ + +OPT_UNIT_TEST_OBJ = $(celt_tests_test_unit_mathops_SOURCES:.c=.o) \ + $(celt_tests_test_unit_rotation_SOURCES:.c=.o) \ + $(celt_tests_test_unit_mdct_SOURCES:.c=.o) \ + $(celt_tests_test_unit_dft_SOURCES:.c=.o) + +if HAVE_SSE +SSE_OBJ = $(CELT_SOURCES_SSE:.c=.lo) +$(SSE_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_X86_SSE_CFLAGS) +endif + +if HAVE_SSE2 +SSE2_OBJ = $(CELT_SOURCES_SSE2:.c=.lo) +$(SSE2_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_X86_SSE2_CFLAGS) +endif + +if HAVE_SSE4_1 +SSE4_1_OBJ = $(CELT_SOURCES_SSE4_1:.c=.lo) \ + $(SILK_SOURCES_SSE4_1:.c=.lo) \ + $(SILK_SOURCES_FIXED_SSE4_1:.c=.lo) +$(SSE4_1_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_X86_SSE4_1_CFLAGS) +endif + +if OPUS_ARM_NEON_INTR +CELT_ARM_NEON_INTR_OBJ = $(CELT_SOURCES_ARM_NEON_INTR:.c=.lo) +$(CELT_ARM_NEON_INTR_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += \ + $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS) +endif diff --git a/asm/libs/opus/Makefile.mips b/asm/libs/opus/Makefile.mips new file mode 100644 index 00000000..56a50623 --- /dev/null +++ b/asm/libs/opus/Makefile.mips @@ -0,0 +1,161 @@ +#################### COMPILE OPTIONS ####################### + +# Uncomment this for fixed-point build +FIXED_POINT=1 + +# It is strongly recommended to uncomment one of these +# VAR_ARRAYS: Use C99 variable-length arrays for stack allocation +# USE_ALLOCA: Use alloca() for stack allocation +# If none is defined, then the fallback is a non-threadsafe global array +CFLAGS := -DUSE_ALLOCA $(CFLAGS) +#CFLAGS := -DVAR_ARRAYS $(CFLAGS) + +# These options affect performance +# HAVE_LRINTF: Use C99 intrinsics to speed up float-to-int conversion +#CFLAGS := -DHAVE_LRINTF $(CFLAGS) + +###################### END OF OPTIONS ###################### + +-include package_version + +include silk_sources.mk +include celt_sources.mk +include opus_sources.mk + +ifdef FIXED_POINT +SILK_SOURCES += $(SILK_SOURCES_FIXED) +else +SILK_SOURCES += $(SILK_SOURCES_FLOAT) +OPUS_SOURCES += $(OPUS_SOURCES_FLOAT) +endif + +EXESUFFIX = +LIBPREFIX = lib +LIBSUFFIX = .a +OBJSUFFIX = .o + +CC = $(TOOLCHAIN_PREFIX)cc$(TOOLCHAIN_SUFFIX) +AR = $(TOOLCHAIN_PREFIX)ar +RANLIB = $(TOOLCHAIN_PREFIX)ranlib +CP = $(TOOLCHAIN_PREFIX)cp + +cppflags-from-defines = $(addprefix -D,$(1)) +cppflags-from-includes = $(addprefix -I,$(1)) +ldflags-from-ldlibdirs = $(addprefix -L,$(1)) +ldlibs-from-libs = $(addprefix -l,$(1)) + +WARNINGS = -Wall -W -Wstrict-prototypes -Wextra -Wcast-align -Wnested-externs -Wshadow + +CFLAGS += -mips32r2 -mno-mips16 -std=gnu99 -O2 -g $(WARNINGS) -DENABLE_ASSERTIONS -DMIPSr1_ASM -DOPUS_BUILD -mdspr2 -march=74kc -mtune=74kc -mmt -mgp32 + +CINCLUDES = include silk celt + +ifdef FIXED_POINT +CFLAGS += -DFIXED_POINT=1 -DDISABLE_FLOAT_API +CINCLUDES += silk/fixed +else +CINCLUDES += silk/float +endif + + +LIBS = m + +LDLIBDIRS = ./ + +CFLAGS += $(call cppflags-from-defines,$(CDEFINES)) +CFLAGS += $(call cppflags-from-includes,$(CINCLUDES)) +LDFLAGS += $(call ldflags-from-ldlibdirs,$(LDLIBDIRS)) +LDLIBS += $(call ldlibs-from-libs,$(LIBS)) + +COMPILE.c.cmdline = $(CC) -c $(CFLAGS) -o $@ $< +LINK.o = $(CC) $(LDPREFLAGS) $(LDFLAGS) +LINK.o.cmdline = $(LINK.o) $^ $(LDLIBS) -o $@$(EXESUFFIX) + +ARCHIVE.cmdline = $(AR) $(ARFLAGS) $@ $^ && $(RANLIB) $@ + +%$(OBJSUFFIX):%.c + $(COMPILE.c.cmdline) + +%$(OBJSUFFIX):%.cpp + $(COMPILE.cpp.cmdline) + +# Directives + + +# Variable definitions +LIB_NAME = opus +TARGET = $(LIBPREFIX)$(LIB_NAME)$(LIBSUFFIX) + +SRCS_C = $(SILK_SOURCES) $(CELT_SOURCES) $(OPUS_SOURCES) + +OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C)) + +OPUSDEMO_SRCS_C = src/opus_demo.c +OPUSDEMO_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSDEMO_SRCS_C)) + +TESTOPUSAPI_SRCS_C = tests/test_opus_api.c +TESTOPUSAPI_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSAPI_SRCS_C)) + +TESTOPUSDECODE_SRCS_C = tests/test_opus_decode.c +TESTOPUSDECODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSDECODE_SRCS_C)) + +TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c +TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C)) + +TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c +TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C)) + +OPUSCOMPARE_SRCS_C = src/opus_compare.c +OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C)) + +TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_padding + +# Rules +all: lib opus_demo opus_compare $(TESTS) + +lib: $(TARGET) + +check: all + for test in $(TESTS); do ./$$test; done + +$(TARGET): $(OBJS) + $(ARCHIVE.cmdline) + +opus_demo$(EXESUFFIX): $(OPUSDEMO_OBJS) $(TARGET) + $(LINK.o.cmdline) + +test_opus_api$(EXESUFFIX): $(TESTOPUSAPI_OBJS) $(TARGET) + $(LINK.o.cmdline) + +test_opus_decode$(EXESUFFIX): $(TESTOPUSDECODE_OBJS) $(TARGET) + $(LINK.o.cmdline) + +test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET) + $(LINK.o.cmdline) + +test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET) + $(LINK.o.cmdline) + +opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS) + $(LINK.o.cmdline) + +celt/celt.o: CFLAGS += -DPACKAGE_VERSION='$(PACKAGE_VERSION)' +celt/celt.o: package_version + +package_version: force + @if [ -x ./update_version ]; then \ + ./update_version || true; \ + elif [ ! -e ./package_version ]; then \ + echo 'PACKAGE_VERSION="unknown"' > ./package_version; \ + fi + +force: + +clean: + rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ + test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \ + test_opus_encode$(EXESUFFIX) test_opus_padding$(EXESUFFIX) \ + $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \ + $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS) + +.PHONY: all lib clean force check diff --git a/asm/libs/opus/Makefile.unix b/asm/libs/opus/Makefile.unix new file mode 100644 index 00000000..b13230e8 --- /dev/null +++ b/asm/libs/opus/Makefile.unix @@ -0,0 +1,159 @@ +#################### COMPILE OPTIONS ####################### + +# Uncomment this for fixed-point build +#FIXED_POINT=1 + +# It is strongly recommended to uncomment one of these +# VAR_ARRAYS: Use C99 variable-length arrays for stack allocation +# USE_ALLOCA: Use alloca() for stack allocation +# If none is defined, then the fallback is a non-threadsafe global array +CFLAGS := -DUSE_ALLOCA $(CFLAGS) +#CFLAGS := -DVAR_ARRAYS $(CFLAGS) + +# These options affect performance +# HAVE_LRINTF: Use C99 intrinsics to speed up float-to-int conversion +#CFLAGS := -DHAVE_LRINTF $(CFLAGS) + +###################### END OF OPTIONS ###################### + +-include package_version + +include silk_sources.mk +include celt_sources.mk +include opus_sources.mk + +ifdef FIXED_POINT +SILK_SOURCES += $(SILK_SOURCES_FIXED) +else +SILK_SOURCES += $(SILK_SOURCES_FLOAT) +OPUS_SOURCES += $(OPUS_SOURCES_FLOAT) +endif + +EXESUFFIX = +LIBPREFIX = lib +LIBSUFFIX = .a +OBJSUFFIX = .o + +CC = $(TOOLCHAIN_PREFIX)cc$(TOOLCHAIN_SUFFIX) +AR = $(TOOLCHAIN_PREFIX)ar +RANLIB = $(TOOLCHAIN_PREFIX)ranlib +CP = $(TOOLCHAIN_PREFIX)cp + +cppflags-from-defines = $(addprefix -D,$(1)) +cppflags-from-includes = $(addprefix -I,$(1)) +ldflags-from-ldlibdirs = $(addprefix -L,$(1)) +ldlibs-from-libs = $(addprefix -l,$(1)) + +WARNINGS = -Wall -W -Wstrict-prototypes -Wextra -Wcast-align -Wnested-externs -Wshadow +CFLAGS += -O2 -g $(WARNINGS) -DOPUS_BUILD +CINCLUDES = include silk celt + +ifdef FIXED_POINT +CFLAGS += -DFIXED_POINT=1 -DDISABLE_FLOAT_API +CINCLUDES += silk/fixed +else +CINCLUDES += silk/float +endif + + +LIBS = m + +LDLIBDIRS = ./ + +CFLAGS += $(call cppflags-from-defines,$(CDEFINES)) +CFLAGS += $(call cppflags-from-includes,$(CINCLUDES)) +LDFLAGS += $(call ldflags-from-ldlibdirs,$(LDLIBDIRS)) +LDLIBS += $(call ldlibs-from-libs,$(LIBS)) + +COMPILE.c.cmdline = $(CC) -c $(CFLAGS) -o $@ $< +LINK.o = $(CC) $(LDPREFLAGS) $(LDFLAGS) +LINK.o.cmdline = $(LINK.o) $^ $(LDLIBS) -o $@$(EXESUFFIX) + +ARCHIVE.cmdline = $(AR) $(ARFLAGS) $@ $^ && $(RANLIB) $@ + +%$(OBJSUFFIX):%.c + $(COMPILE.c.cmdline) + +%$(OBJSUFFIX):%.cpp + $(COMPILE.cpp.cmdline) + +# Directives + + +# Variable definitions +LIB_NAME = opus +TARGET = $(LIBPREFIX)$(LIB_NAME)$(LIBSUFFIX) + +SRCS_C = $(SILK_SOURCES) $(CELT_SOURCES) $(OPUS_SOURCES) + +OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C)) + +OPUSDEMO_SRCS_C = src/opus_demo.c +OPUSDEMO_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSDEMO_SRCS_C)) + +TESTOPUSAPI_SRCS_C = tests/test_opus_api.c +TESTOPUSAPI_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSAPI_SRCS_C)) + +TESTOPUSDECODE_SRCS_C = tests/test_opus_decode.c +TESTOPUSDECODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSDECODE_SRCS_C)) + +TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c +TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C)) + +TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c +TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C)) + +OPUSCOMPARE_SRCS_C = src/opus_compare.c +OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C)) + +TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_padding + +# Rules +all: lib opus_demo opus_compare $(TESTS) + +lib: $(TARGET) + +check: all + for test in $(TESTS); do ./$$test; done + +$(TARGET): $(OBJS) + $(ARCHIVE.cmdline) + +opus_demo$(EXESUFFIX): $(OPUSDEMO_OBJS) $(TARGET) + $(LINK.o.cmdline) + +test_opus_api$(EXESUFFIX): $(TESTOPUSAPI_OBJS) $(TARGET) + $(LINK.o.cmdline) + +test_opus_decode$(EXESUFFIX): $(TESTOPUSDECODE_OBJS) $(TARGET) + $(LINK.o.cmdline) + +test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET) + $(LINK.o.cmdline) + +test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET) + $(LINK.o.cmdline) + +opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS) + $(LINK.o.cmdline) + +celt/celt.o: CFLAGS += -DPACKAGE_VERSION='$(PACKAGE_VERSION)' +celt/celt.o: package_version + +package_version: force + @if [ -x ./update_version ]; then \ + ./update_version || true; \ + elif [ ! -e ./package_version ]; then \ + echo 'PACKAGE_VERSION="unknown"' > ./package_version; \ + fi + +force: + +clean: + rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ + test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \ + test_opus_encode$(EXESUFFIX) test_opus_padding$(EXESUFFIX) \ + $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \ + $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS) + +.PHONY: all lib clean force check diff --git a/asm/libs/opus/NEWS b/asm/libs/opus/NEWS new file mode 100644 index 00000000..e69de29b diff --git a/asm/libs/opus/README b/asm/libs/opus/README new file mode 100644 index 00000000..ac6264ec --- /dev/null +++ b/asm/libs/opus/README @@ -0,0 +1,142 @@ +== Opus audio codec == + +Opus is a codec for interactive speech and audio transmission over the Internet. + + Opus can handle a wide range of interactive audio applications, including +Voice over IP, videoconferencing, in-game chat, and even remote live music +performances. It can scale from low bit-rate narrowband speech to very high +quality stereo music. + + Opus, when coupled with an appropriate container format, is also suitable +for non-realtime stored-file applications such as music distribution, game +soundtracks, portable music players, jukeboxes, and other applications that +have historically used high latency formats such as MP3, AAC, or Vorbis. + + Opus is specified by IETF RFC 6716: + https://tools.ietf.org/html/rfc6716 + + The Opus format and this implementation of it are subject to the royalty- +free patent and copyright licenses specified in the file COPYING. + +This package implements a shared library for encoding and decoding raw Opus +bitstreams. Raw Opus bitstreams should be used over RTP according to + https://tools.ietf.org/html/rfc7587 + +The package also includes a number of test tools used for testing the +correct operation of the library. The bitstreams read/written by these +tools should not be used for Opus file distribution: They include +additional debugging data and cannot support seeking. + +Opus stored in files should use the Ogg encapsulation for Opus which is +described at: + https://wiki.xiph.org/OggOpus + +An opus-tools package is available which provides encoding and decoding of +Ogg encapsulated Opus files and includes a number of useful features. + +Opus-tools can be found at: + https://git.xiph.org/?p=opus-tools.git +or on the main Opus website: + https://opus-codec.org/ + +== Compiling libopus == + +To build from a distribution tarball, you only need to do the following: + +% ./configure +% make + +To build from the git repository, the following steps are necessary: + +1) Clone the repository: + +% git clone https://git.xiph.org/opus.git +% cd opus + +2) Compiling the source + +% ./autogen.sh +% ./configure +% make + +3) Install the codec libraries (optional) + +% sudo make install + +Once you have compiled the codec, there will be a opus_demo executable +in the top directory. + +Usage: opus_demo [-e] + [options] + opus_demo -d [options] + + +mode: voip | audio | restricted-lowdelay +options: + -e : only runs the encoder (output the bit-stream) + -d : only runs the decoder (reads the bit-stream as input) + -cbr : enable constant bitrate; default: variable bitrate + -cvbr : enable constrained variable bitrate; default: + unconstrained + -bandwidth + : audio bandwidth (from narrowband to fullband); + default: sampling rate + -framesize <2.5|5|10|20|40|60> + : frame size in ms; default: 20 + -max_payload + : maximum payload size in bytes, default: 1024 + -complexity + : complexity, 0 (lowest) ... 10 (highest); default: 10 + -inbandfec : enable SILK inband FEC + -forcemono : force mono encoding, even for stereo input + -dtx : enable SILK DTX + -loss : simulate packet loss, in percent (0-100); default: 0 + +input and output are little-endian signed 16-bit PCM files or opus +bitstreams with simple opus_demo proprietary framing. + +== Testing == + +This package includes a collection of automated unit and system tests +which SHOULD be run after compiling the package especially the first +time it is run on a new platform. + +To run the integrated tests: +% make check + +There is also collection of standard test vectors which are not +included in this package for size reasons but can be obtained from: +https://opus-codec.org/testvectors/opus_testvectors.tar.gz + +To run compare the code to these test vectors: + +% curl -O https://opus-codec.org/testvectors/opus_testvectors.tar.gz +% tar -zxf opus_testvectors.tar.gz +% ./tests/run_vectors.sh ./ opus_testvectors 48000 + +== Portability notes == + +This implementation uses floating-point by default but can be compiled to +use only fixed-point arithmetic by setting --enable-fixed-point (if using +autoconf) or by defining the FIXED_POINT macro (if building manually). +The fixed point implementation has somewhat lower audio quality and is +slower on platforms with fast FPUs, it is normally only used in embedded +environments. + +The implementation can be compiled with either a C89 or a C99 compiler. +While it does not rely on any _undefined behavior_ as defined by C89 or +C99, it relies on common _implementation-defined behavior_ for two's +complement architectures: + +o Right shifts of negative values are consistent with two's + complement arithmetic, so that a>>b is equivalent to + floor(a/(2^b)), + +o For conversion to a signed integer of N bits, the value is reduced + modulo 2^N to be within range of the type, + +o The result of integer division of a negative value is truncated + towards zero, and + +o The compiler provides a 64-bit integer type (a C99 requirement + which is supported by most C89 compilers). diff --git a/asm/libs/opus/README.draft b/asm/libs/opus/README.draft new file mode 100644 index 00000000..8d8e24df --- /dev/null +++ b/asm/libs/opus/README.draft @@ -0,0 +1,54 @@ +To build this source code, simply type: + +% make + +If this does not work, or if you want to change the default configuration +(e.g., to compile for a fixed-point architecture), simply edit the options +in the Makefile. + +An up-to-date implementation conforming to this standard is available in a +Git repository at https://git.xiph.org/opus.git or on a website at: +https://opus-codec.org/ +However, although that implementation is expected to remain conformant +with the standard, it is the code in this RFC that shall remain normative. +To build from the git repository instead of using this RFC, follow these +steps: + +1) Clone the repository (latest implementation of this standard at the time +of publication) + +% git clone https://git.xiph.org/opus.git +% cd opus + +2) Compile + +% ./autogen.sh +% ./configure +% make + +Once you have compiled the codec, there will be a opus_demo executable in +the top directory. + +Usage: opus_demo [-e] + [options] + opus_demo -d [options] + + +mode: voip | audio | restricted-lowdelay +options: +-e : only runs the encoder (output the bit-stream) +-d : only runs the decoder (reads the bit-stream as input) +-cbr : enable constant bitrate; default: variable bitrate +-cvbr : enable constrained variable bitrate; default: unconstrained +-bandwidth : audio bandwidth (from narrowband to fullband); + default: sampling rate +-framesize <2.5|5|10|20|40|60> : frame size in ms; default: 20 +-max_payload : maximum payload size in bytes, default: 1024 +-complexity : complexity, 0 (lowest) ... 10 (highest); default: 10 +-inbandfec : enable SILK inband FEC +-forcemono : force mono encoding, even for stereo input +-dtx : enable SILK DTX +-loss : simulate packet loss, in percent (0-100); default: 0 + +input and output are little endian signed 16-bit PCM files or opus bitstreams +with simple opus_demo proprietary framing. diff --git a/asm/libs/opus/a.out b/asm/libs/opus/a.out new file mode 100755 index 00000000..532443ac --- /dev/null +++ b/asm/libs/opus/a.out @@ -0,0 +1,5470 @@ +#!/usr/bin/nodejs +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module !== 'undefined' ? Module : {}; + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) +// {{PRE_JSES}} + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = {}; +var key; +for (key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +Module['arguments'] = []; +Module['thisProgram'] = './this.program'; +Module['quit'] = function(status, toThrow) { + throw toThrow; +}; +Module['preRun'] = []; +Module['postRun'] = []; + +// The environment setup code below is customized to use Module. +// *** Environment setup code *** +var ENVIRONMENT_IS_WEB = false; +var ENVIRONMENT_IS_WORKER = false; +var ENVIRONMENT_IS_NODE = false; +var ENVIRONMENT_IS_SHELL = false; + +// Three configurations we can be running in: +// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) +// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) +// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) + +if (Module['ENVIRONMENT']) { + if (Module['ENVIRONMENT'] === 'WEB') { + ENVIRONMENT_IS_WEB = true; + } else if (Module['ENVIRONMENT'] === 'WORKER') { + ENVIRONMENT_IS_WORKER = true; + } else if (Module['ENVIRONMENT'] === 'NODE') { + ENVIRONMENT_IS_NODE = true; + } else if (Module['ENVIRONMENT'] === 'SHELL') { + ENVIRONMENT_IS_SHELL = true; + } else { + throw new Error('Module[\'ENVIRONMENT\'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.'); + } +} else { + ENVIRONMENT_IS_WEB = typeof window === 'object'; + ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; + ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function' && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER; + ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; +} + + +if (ENVIRONMENT_IS_NODE) { + // Expose functionality in the same simple way that the shells work + // Note that we pollute the global namespace here, otherwise we break in node + var nodeFS; + var nodePath; + + Module['read'] = function shell_read(filename, binary) { + var ret; + ret = tryParseAsDataURI(filename); + if (!ret) { + if (!nodeFS) nodeFS = require('fs'); + if (!nodePath) nodePath = require('path'); + filename = nodePath['normalize'](filename); + ret = nodeFS['readFileSync'](filename); + } + return binary ? ret : ret.toString(); + }; + + Module['readBinary'] = function readBinary(filename) { + var ret = Module['read'](filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; + + if (process['argv'].length > 1) { + Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); + } + + Module['arguments'] = process['argv'].slice(2); + + if (typeof module !== 'undefined') { + module['exports'] = Module; + } + + process['on']('uncaughtException', function(ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + // Currently node will swallow unhandled rejections, but this behavior is + // deprecated, and in the future it will exit with error status. + process['on']('unhandledRejection', function(reason, p) { + Module['printErr']('node.js exiting due to unhandled promise rejection'); + process['exit'](1); + }); + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; +} +else if (ENVIRONMENT_IS_SHELL) { + if (typeof read != 'undefined') { + Module['read'] = function shell_read(f) { + var data = tryParseAsDataURI(f); + if (data) { + return intArrayToString(data); + } + return read(f); + }; + } + + Module['readBinary'] = function readBinary(f) { + var data; + data = tryParseAsDataURI(f); + if (data) { + return data; + } + if (typeof readbuffer === 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data === 'object'); + return data; + }; + + if (typeof scriptArgs != 'undefined') { + Module['arguments'] = scriptArgs; + } else if (typeof arguments != 'undefined') { + Module['arguments'] = arguments; + } + + if (typeof quit === 'function') { + Module['quit'] = function(status, toThrow) { + quit(status); + } + } +} +else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + Module['read'] = function shell_read(url) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + } catch (err) { + var data = tryParseAsDataURI(url); + if (data) { + return intArrayToString(data); + } + throw err; + } + }; + + if (ENVIRONMENT_IS_WORKER) { + Module['readBinary'] = function readBinary(url) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(xhr.response); + } catch (err) { + var data = tryParseAsDataURI(url); + if (data) { + return data; + } + throw err; + } + }; + } + + Module['readAsync'] = function readAsync(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = function xhr_onload() { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + var data = tryParseAsDataURI(url); + if (data) { + onload(data.buffer); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + + if (typeof arguments != 'undefined') { + Module['arguments'] = arguments; + } + + Module['setWindowTitle'] = function(title) { document.title = title }; +} +else { + // Unreachable because SHELL is dependent on the others + throw new Error('unknown runtime environment'); +} + +// console.log is checked first, as 'print' on the web will open a print dialogue +// printErr is preferable to console.warn (works better in shells) +// bind(console) is necessary to fix IE/Edge closed dev tools panel behavior. +Module['print'] = typeof console !== 'undefined' ? console.log.bind(console) : (typeof print !== 'undefined' ? print : null); +Module['printErr'] = typeof printErr !== 'undefined' ? printErr : ((typeof console !== 'undefined' && console.warn.bind(console)) || Module['print']); + +// *** Environment setup code *** + +// Closure helpers +Module.print = Module['print']; +Module.printErr = Module['printErr']; + +// Merge back in the overrides +for (key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = undefined; + + + +// {{PREAMBLE_ADDITIONS}} + +var STACK_ALIGN = 16; + +// stack management, and other functionality that is provided by the compiled code, +// should not be used before it is ready +stackSave = stackRestore = stackAlloc = setTempRet0 = getTempRet0 = function() { + abort('cannot use the stack before compiled code is ready to run, and has provided stack access'); +}; + +function staticAlloc(size) { + assert(!staticSealed); + var ret = STATICTOP; + STATICTOP = (STATICTOP + size + 15) & -16; + return ret; +} + +function dynamicAlloc(size) { + assert(DYNAMICTOP_PTR); + var ret = HEAP32[DYNAMICTOP_PTR>>2]; + var end = (ret + size + 15) & -16; + HEAP32[DYNAMICTOP_PTR>>2] = end; + if (end >= TOTAL_MEMORY) { + var success = enlargeMemory(); + if (!success) { + HEAP32[DYNAMICTOP_PTR>>2] = ret; + return 0; + } + } + return ret; +} + +function alignMemory(size, factor) { + if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default + var ret = size = Math.ceil(size / factor) * factor; + return ret; +} + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': return 1; + case 'i16': return 2; + case 'i32': return 4; + case 'i64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length-1] === '*') { + return 4; // A pointer + } else if (type[0] === 'i') { + var bits = parseInt(type.substr(1)); + assert(bits % 8 === 0); + return bits / 8; + } else { + return 0; + } + } + } +} + +function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + Module.printErr(text); + } +} + + + +var jsCallStartIndex = 1; +var functionPointers = new Array(0); + +// 'sig' parameter is only used on LLVM wasm backend +function addFunction(func, sig) { + if (typeof sig === 'undefined') { + Module.printErr('Warning: addFunction: Provide a wasm function signature ' + + 'string as a second argument'); + } + var base = 0; + for (var i = base; i < base + 0; i++) { + if (!functionPointers[i]) { + functionPointers[i] = func; + return jsCallStartIndex + i; + } + } + throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; +} + +function removeFunction(index) { + functionPointers[index-jsCallStartIndex] = null; +} + +var funcWrappers = {}; + +function getFuncWrapper(func, sig) { + if (!func) return; // on null pointer, return undefined + assert(sig); + if (!funcWrappers[sig]) { + funcWrappers[sig] = {}; + } + var sigCache = funcWrappers[sig]; + if (!sigCache[func]) { + // optimize away arguments usage in common cases + if (sig.length === 1) { + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func); + }; + } else if (sig.length === 2) { + sigCache[func] = function dynCall_wrapper(arg) { + return dynCall(sig, func, [arg]); + }; + } else { + // general case + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func, Array.prototype.slice.call(arguments)); + }; + } + } + return sigCache[func]; +} + + +function makeBigInt(low, high, unsigned) { + return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0)); +} + +function dynCall(sig, ptr, args) { + if (args && args.length) { + assert(args.length == sig.length-1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); + } else { + assert(sig.length == 1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].call(null, ptr); + } +} + + +function getCompilerSetting(name) { + throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for getCompilerSetting or emscripten_get_compiler_setting to work'; +} + +var Runtime = { + // FIXME backwards compatibility layer for ports. Support some Runtime.* + // for now, fix it there, then remove it from here. That way we + // can minimize any period of breakage. + dynCall: dynCall, // for SDL2 port + // helpful errors + getTempRet0: function() { abort('getTempRet0() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + staticAlloc: function() { abort('staticAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + stackAlloc: function() { abort('stackAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, +}; + +// The address globals begin at. Very low in memory, for code size and optimization opportunities. +// Above 0 is static memory, starting with globals. +// Then the stack. +// Then 'dynamic' memory for sbrk. +var GLOBAL_BASE = 8; + + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + + + +//======================================== +// Runtime essentials +//======================================== + +var ABORT = 0; // whether we are quitting the application. no code should run after this. set in exit() and abort() +var EXITSTATUS = 0; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +var globalScope = this; + +// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) +function getCFunc(ident) { + var func = Module['_' + ident]; // closure exported function + assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); + return func; +} + +var JSfuncs = { + // Helpers for cwrap -- it can't refer to Runtime directly because it might + // be renamed by closure, instead it calls JSfuncs['stackSave'].body to find + // out what the minified function name is. + 'stackSave': function() { + stackSave() + }, + 'stackRestore': function() { + stackRestore() + }, + // type conversion from js to c + 'arrayToC' : function(arr) { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + }, + 'stringToC' : function(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { // null string + // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' + var len = (str.length << 2) + 1; + ret = stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + } +}; +// For fast lookup of conversion functions +var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']}; + +// C calling interface. +function ccall (ident, returnType, argTypes, args, opts) { + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + assert(returnType !== 'array', 'Return type should not be "array".'); + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + if (returnType === 'string') ret = Pointer_stringify(ret); + if (stack !== 0) { + stackRestore(stack); + } + return ret; +} + +function cwrap (ident, returnType, argTypes) { + argTypes = argTypes || []; + var cfunc = getCFunc(ident); + // When the function takes numbers and returns a number, we can just return + // the original function + var numericArgs = argTypes.every(function(type){ return type === 'number'}); + var numericRet = returnType !== 'string'; + if (numericRet && numericArgs) { + return cfunc; + } + return function() { + return ccall(ident, returnType, argTypes, arguments); + } +} + +/** @type {function(number, number, string, boolean=)} */ +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': HEAP8[((ptr)>>0)]=value; break; + case 'i8': HEAP8[((ptr)>>0)]=value; break; + case 'i16': HEAP16[((ptr)>>1)]=value; break; + case 'i32': HEAP32[((ptr)>>2)]=value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)]=value; break; + case 'double': HEAPF64[((ptr)>>3)]=value; break; + default: abort('invalid type for setValue: ' + type); + } +} + +/** @type {function(number, string, boolean=)} */ +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + default: abort('invalid type for getValue: ' + type); + } + return null; +} + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_STATIC = 2; // Cannot be freed +var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk +var ALLOC_NONE = 4; // Do not allocate + +// allocate(): This is for internal use. You can use it yourself as well, but the interface +// is a little tricky (see docs right below). The reason is that it is optimized +// for multiple syntaxes to save space in generated code. So you should +// normally not use allocate(), and instead allocate memory using _malloc(), +// initialize it with setValue(), and so forth. +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block. This only matters if there +// is initial data - if @slab is a number, then this does not matter at all and is +// ignored. +// @allocator: How to allocate memory, see ALLOC_* +/** @type {function((TypedArray|Array|number), string, number, number=)} */ +function allocate(slab, types, allocator, ptr) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret; + if (allocator == ALLOC_NONE) { + ret = ptr; + } else { + ret = [typeof _malloc === 'function' ? _malloc : staticAlloc, stackAlloc, staticAlloc, dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length)); + } + + if (zeroinit) { + var stop; + ptr = ret; + assert((ret & 3) == 0); + stop = ret + (size & ~3); + for (; ptr < stop; ptr += 4) { + HEAP32[((ptr)>>2)]=0; + } + stop = ret + size; + while (ptr < stop) { + HEAP8[((ptr++)>>0)]=0; + } + return ret; + } + + if (singleType === 'i8') { + if (slab.subarray || slab.slice) { + HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; + } + + var i = 0, type, typeSize, previousType; + while (i < size) { + var curr = slab[i]; + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + assert(type, 'Must know what type to store in allocate!'); + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret+i, curr, type); + + // no need to look up size unless type changes, so cache it + if (previousType !== type) { + typeSize = getNativeTypeSize(type); + previousType = type; + } + i += typeSize; + } + + return ret; +} + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!staticSealed) return staticAlloc(size); + if (!runtimeInitialized) return dynamicAlloc(size); + return _malloc(size); +} + +/** @type {function(number, number=)} */ +function Pointer_stringify(ptr, length) { + if (length === 0 || !ptr) return ''; + // TODO: use TextDecoder + // Find the length, and check for UTF while doing so + var hasUtf = 0; + var t; + var i = 0; + while (1) { + assert(ptr + i < TOTAL_MEMORY); + t = HEAPU8[(((ptr)+(i))>>0)]; + hasUtf |= t; + if (t == 0 && !length) break; + i++; + if (length && i == length) break; + } + if (!length) length = i; + + var ret = ''; + + if (hasUtf < 128) { + var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack + var curr; + while (length > 0) { + curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK))); + ret = ret ? ret + curr : curr; + ptr += MAX_CHUNK; + length -= MAX_CHUNK; + } + return ret; + } + return UTF8ToString(ptr); +} + +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAP8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; +function UTF8ArrayToString(u8Array, idx) { + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + while (u8Array[endPtr]) ++endPtr; + + if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) { + return UTF8Decoder.decode(u8Array.subarray(idx, endPtr)); + } else { + var u0, u1, u2, u3, u4, u5; + + var str = ''; + while (1) { + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + u0 = u8Array[idx++]; + if (!u0) return str; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + u3 = u8Array[idx++] & 63; + if ((u0 & 0xF8) == 0xF0) { + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3; + } else { + u4 = u8Array[idx++] & 63; + if ((u0 & 0xFC) == 0xF8) { + u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4; + } else { + u5 = u8Array[idx++] & 63; + u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5; + } + } + } + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + } +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function UTF8ToString(ptr) { + return UTF8ArrayToString(HEAPU8,ptr); +} + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x1FFFFF) { + if (outIdx + 3 >= endIdx) break; + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x3FFFFFF) { + if (outIdx + 4 >= endIdx) break; + outU8Array[outIdx++] = 0xF8 | (u >> 24); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 5 >= endIdx) break; + outU8Array[outIdx++] = 0xFC | (u >> 30); + outU8Array[outIdx++] = 0x80 | ((u >> 24) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + ++len; + } else if (u <= 0x7FF) { + len += 2; + } else if (u <= 0xFFFF) { + len += 3; + } else if (u <= 0x1FFFFF) { + len += 4; + } else if (u <= 0x3FFFFFF) { + len += 5; + } else { + len += 6; + } + } + return len; +} + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; +function UTF16ToString(ptr) { + assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!'); + var endPtr = ptr; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + var idx = endPtr >> 1; + while (HEAP16[idx]) ++idx; + endPtr = idx << 1; + + if (endPtr - ptr > 32 && UTF16Decoder) { + return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); + } else { + var i = 0; + + var str = ''; + while (1) { + var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; + if (codeUnit == 0) return str; + ++i; + // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. + str += String.fromCharCode(codeUnit); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; + } + // Null-terminate the pointer to the HEAP. + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} + +function UTF32ToString(ptr) { + assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!'); + var i = 0; + + var str = ''; + while (1) { + var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; + if (utf32 == 0) + return str; + ++i; + // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + if (utf32 >= 0x10000) { + var ch = utf32 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } else { + str += String.fromCharCode(utf32); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + assert(outPtr % 4 == 0, 'Pointer passed to stringToUTF32 must be aligned to four bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + // 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. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); + } + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + // Null-terminate the pointer to the HEAP. + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // 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. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} + +// Allocate heap space for a JS string, and write it there. +// It is the responsibility of the caller to free() that memory. +function allocateUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Allocate stack space for a JS string, and write it there. +function allocateUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +function demangle(func) { + warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); + return func; +} + +function demangleAll(text) { + var regex = + /__Z[\w\d_]+/g; + return text.replace(regex, + function(x) { + var y = demangle(x); + return x === y ? x : (x + ' [' + y + ']'); + }); +} + +function jsStackTrace() { + var err = new Error(); + if (!err.stack) { + // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, + // so try that as a special-case. + try { + throw new Error(0); + } catch(e) { + err = e; + } + if (!err.stack) { + return '(no stack trace available)'; + } + } + return err.stack.toString(); +} + +function stackTrace() { + var js = jsStackTrace(); + if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); + return demangleAll(js); +} + +// Memory management + +var PAGE_SIZE = 16384; +var WASM_PAGE_SIZE = 65536; +var ASMJS_PAGE_SIZE = 16777216; +var MIN_TOTAL_MEMORY = 16777216; + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - (x % multiple); + } + return x; +} + +var HEAP, +/** @type {ArrayBuffer} */ + buffer, +/** @type {Int8Array} */ + HEAP8, +/** @type {Uint8Array} */ + HEAPU8, +/** @type {Int16Array} */ + HEAP16, +/** @type {Uint16Array} */ + HEAPU16, +/** @type {Int32Array} */ + HEAP32, +/** @type {Uint32Array} */ + HEAPU32, +/** @type {Float32Array} */ + HEAPF32, +/** @type {Float64Array} */ + HEAPF64; + +function updateGlobalBuffer(buf) { + Module['buffer'] = buffer = buf; +} + +function updateGlobalBufferViews() { + Module['HEAP8'] = HEAP8 = new Int8Array(buffer); + Module['HEAP16'] = HEAP16 = new Int16Array(buffer); + Module['HEAP32'] = HEAP32 = new Int32Array(buffer); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buffer); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buffer); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buffer); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buffer); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buffer); +} + +var STATIC_BASE, STATICTOP, staticSealed; // static area +var STACK_BASE, STACKTOP, STACK_MAX; // stack area +var DYNAMIC_BASE, DYNAMICTOP_PTR; // dynamic area handled by sbrk + + STATIC_BASE = STATICTOP = STACK_BASE = STACKTOP = STACK_MAX = DYNAMIC_BASE = DYNAMICTOP_PTR = 0; + staticSealed = false; + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + assert((STACK_MAX & 3) == 0); + HEAPU32[(STACK_MAX >> 2)-1] = 0x02135467; + HEAPU32[(STACK_MAX >> 2)-2] = 0x89BACDFE; +} + +function checkStackCookie() { + if (HEAPU32[(STACK_MAX >> 2)-1] != 0x02135467 || HEAPU32[(STACK_MAX >> 2)-2] != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x' + HEAPU32[(STACK_MAX >> 2)-2].toString(16) + ' ' + HEAPU32[(STACK_MAX >> 2)-1].toString(16)); + } + // Also test the global address 0 for integrity. This check is not compatible with SAFE_SPLIT_MEMORY though, since that mode already tests all address 0 accesses on its own. + if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) throw 'Runtime error: The application has corrupted its heap memory area (address zero)!'; +} + +function abortStackOverflow(allocSize) { + abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!'); +} + +function abortOnCannotGrowMemory() { + 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 -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); +} + + +function enlargeMemory() { + abortOnCannotGrowMemory(); +} + + +var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; +var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; +if (TOTAL_MEMORY < TOTAL_STACK) Module.printErr('TOTAL_MEMORY should be larger than TOTAL_STACK, was ' + TOTAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); + +// Initialize the runtime's memory +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, + 'JS engine does not provide full typed array support'); + + + +// Use a provided buffer, if there is one, or else allocate a new one +if (Module['buffer']) { + buffer = Module['buffer']; + assert(buffer.byteLength === TOTAL_MEMORY, 'provided buffer should be ' + TOTAL_MEMORY + ' bytes, but it is ' + buffer.byteLength); +} else { + // Use a WebAssembly memory where available + { + buffer = new ArrayBuffer(TOTAL_MEMORY); + } + assert(buffer.byteLength === TOTAL_MEMORY); + Module['buffer'] = buffer; +} +updateGlobalBufferViews(); + + +function getTotalMemory() { + return TOTAL_MEMORY; +} + +// Endianness check (note: assumes compiler arch was little-endian) + HEAP32[0] = 0x63736d65; /* 'emsc' */ +HEAP16[1] = 0x6373; +if (HEAPU8[2] !== 0x73 || HEAPU8[3] !== 0x63) throw 'Runtime error: expected the system to be little-endian!'; + +function callRuntimeCallbacks(callbacks) { + while(callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(); + continue; + } + var func = callback.func; + if (typeof func === 'number') { + if (callback.arg === undefined) { + Module['dynCall_v'](func); + } else { + Module['dynCall_vi'](func, callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the runtime has exited + +var runtimeInitialized = false; +var runtimeExited = false; + + +function preRun() { + // compatibility - merge in anything from Module['preRun'] at this time + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + callRuntimeCallbacks(__ATPRERUN__); +} + +function ensureInitRuntime() { + checkStackCookie(); + if (runtimeInitialized) return; + runtimeInitialized = true; + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + checkStackCookie(); + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + checkStackCookie(); + callRuntimeCallbacks(__ATEXIT__); + runtimeExited = true; +} + +function postRun() { + checkStackCookie(); + // compatibility - merge in anything from Module['postRun'] at this time + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { + __ATEXIT__.unshift(cb); +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +// Deprecated: This function should not be called because it is unsafe and does not provide +// a maximum length limit of how many bytes it is allowed to write. Prefer calling the +// function stringToUTF8Array() instead, which takes in a maximum length that can be used +// to be secure from out of bounds writes. +/** @deprecated */ +function writeStringToMemory(string, buffer, dontAddNull) { + warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); + + var /** @type {number} */ lastChar, /** @type {number} */ end; + if (dontAddNull) { + // stringToUTF8Array always appends null. If we don't want to do that, remember the + // character that existed at the location where the null will be placed, and restore + // that after the write (below). + end = buffer + lengthBytesUTF8(string); + lastChar = HEAP8[end]; + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. +} + +function writeArrayToMemory(array, buffer) { + assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)') + HEAP8.set(array, buffer); +} + +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + assert(str.charCodeAt(i) === str.charCodeAt(i)&0xff); + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); + } + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; +} + +function unSign(value, bits, ignore) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; +} +function reSign(value, bits, ignore) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 + : Math.pow(2, bits-1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + +assert(Math['imul'] && Math['fround'] && Math['clz32'] && Math['trunc'], 'this is a legacy browser, build with LEGACY_VM_SUPPORT'); + +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_fround = Math.fround; +var Math_round = Math.round; +var Math_min = Math.min; +var Math_max = Math.max; +var Math_clz32 = Math.clz32; +var Math_trunc = Math.trunc; + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// PRE_RUN_ADDITIONS (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } + return id; +} + +function addRunDependency(id) { + runDependencies++; + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval !== 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function() { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + Module.printErr('still waiting on run dependencies:'); + } + Module.printErr('dependency: ' + dep); + } + if (shown) { + Module.printErr('(end of list)'); + } + }, 10000); + } + } else { + Module.printErr('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + Module.printErr('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +Module["preloadedImages"] = {}; // maps url to image data +Module["preloadedAudios"] = {}; // maps url to audio data + + + +var memoryInitializer = null; + + + +var /* show errors on likely calls to FS when it was not included */ FS = { + error: function() { + abort('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1'); + }, + init: function() { FS.error() }, + createDataFile: function() { FS.error() }, + createPreloadedFile: function() { FS.error() }, + createLazyFile: function() { FS.error() }, + open: function() { FS.error() }, + mkdev: function() { FS.error() }, + registerDevice: function() { FS.error() }, + analyzePath: function() { FS.error() }, + loadFilesFromDB: function() { FS.error() }, + + ErrnoError: function ErrnoError() { FS.error() }, +}; +Module['FS_createDataFile'] = FS.createDataFile; +Module['FS_createPreloadedFile'] = FS.createPreloadedFile; + + + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + return String.prototype.startsWith ? + filename.startsWith(dataURIPrefix) : + filename.indexOf(dataURIPrefix) === 0; +} + + + + + +// === Body === + +var ASM_CONSTS = []; + + + + +STATIC_BASE = GLOBAL_BASE; + +STATICTOP = STATIC_BASE + 1680; +/* global initializers */ __ATINIT__.push(); + + +memoryInitializer = "data:application/octet-stream;base64,BQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAMAAACQAgAAAAQAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACv////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAg="; + + + + + +/* no memory initializer */ +var tempDoublePtr = STATICTOP; STATICTOP += 16; + +assert(tempDoublePtr % 8 == 0); + +function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much + + HEAP8[tempDoublePtr] = HEAP8[ptr]; + + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + +} + +function copyTempDouble(ptr) { + + HEAP8[tempDoublePtr] = HEAP8[ptr]; + + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + + HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; + + HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; + + HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; + + HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; + +} + +// {{PRE_LIBRARY}} + + + function ___lock() {} + + + var SYSCALLS={varargs:0,get:function (varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function () { + var ret = Pointer_stringify(SYSCALLS.get()); + return ret; + },get64:function () { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function () { + assert(SYSCALLS.get() === 0); + }};function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + // NOTE: offset_high is unused - Emscripten's off_t is 32-bit + var offset = offset_low; + FS.llseek(stream, offset, whence); + HEAP32[((result)>>2)]=stream.position; + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + function flush_NO_FILESYSTEM() { + // flush anything remaining in the buffers during shutdown + var fflush = Module["_fflush"]; + if (fflush) fflush(0); + var printChar = ___syscall146.printChar; + if (!printChar) return; + var buffers = ___syscall146.buffers; + if (buffers[1].length) printChar(1, 10); + if (buffers[2].length) printChar(2, 10); + }function ___syscall146(which, varargs) {SYSCALLS.varargs = varargs; + try { + // writev + // hack to support printf in NO_FILESYSTEM + var stream = SYSCALLS.get(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + var ret = 0; + if (!___syscall146.buffers) { + ___syscall146.buffers = [null, [], []]; // 1 => stdout, 2 => stderr + ___syscall146.printChar = function(stream, curr) { + var buffer = ___syscall146.buffers[stream]; + assert(buffer); + if (curr === 0 || curr === 10) { + (stream === 1 ? Module['print'] : Module['printErr'])(UTF8ArrayToString(buffer, 0)); + buffer.length = 0; + } else { + buffer.push(curr); + } + }; + } + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + for (var j = 0; j < len; j++) { + ___syscall146.printChar(stream, HEAPU8[ptr+j]); + } + ret += len; + } + return ret; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs; + try { + // ioctl + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___unlock() {} + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + return dest; + } + + + + + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; + else Module.printErr('failed to set errno from JS'); + return value; + } +__ATEXIT__.push(flush_NO_FILESYSTEM);; +DYNAMICTOP_PTR = staticAlloc(4); + +STACK_BASE = STACKTOP = alignMemory(STATICTOP); + +STACK_MAX = STACK_BASE + TOTAL_STACK; + +DYNAMIC_BASE = alignMemory(STACK_MAX); + +HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE; + +staticSealed = true; // seal the static portion of memory + +assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack"); + +var ASSERTIONS = true; + +/** @type {function(string, boolean=, number=)} */ +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + if (ASSERTIONS) { + assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); + } + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} + + +// Copied from https://github.com/strophe/strophejs/blob/e06d027/src/polyfills.js#L149 + +// This code was written by Tyler Akins and has been placed in the +// public domain. It would be nice if you left this header intact. +// Base64 code from Tyler Akins -- http://rumkin.com + +/** + * Decodes a base64 string. + * @param {String} input The string to decode. + */ +var decodeBase64 = typeof atob === 'function' ? atob : function (input) { + var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + var output = ''; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + // remove all characters that are not A-Z, a-z, 0-9, +, /, or = + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); + do { + enc1 = keyStr.indexOf(input.charAt(i++)); + enc2 = keyStr.indexOf(input.charAt(i++)); + enc3 = keyStr.indexOf(input.charAt(i++)); + enc4 = keyStr.indexOf(input.charAt(i++)); + + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + + output = output + String.fromCharCode(chr1); + + if (enc3 !== 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 !== 64) { + output = output + String.fromCharCode(chr3); + } + } while (i < input.length); + return output; +}; + +// Converts a string of base64 into a byte array. +// Throws error on invalid input. +function intArrayFromBase64(s) { + if (typeof ENVIRONMENT_IS_NODE === 'boolean' && ENVIRONMENT_IS_NODE) { + var buf; + try { + buf = Buffer.from(s, 'base64'); + } catch (_) { + buf = new Buffer(s, 'base64'); + } + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + + try { + var decoded = decodeBase64(s); + var bytes = new Uint8Array(decoded.length); + for (var i = 0 ; i < decoded.length ; ++i) { + bytes[i] = decoded.charCodeAt(i); + } + return bytes; + } catch (_) { + throw new Error('Converting base64 string to bytes failed.'); + } +} + +// If filename is a base64 data URI, parses and returns data (Buffer on node, +// Uint8Array otherwise). If filename is not a base64 data URI, returns undefined. +function tryParseAsDataURI(filename) { + if (!isDataURI(filename)) { + return; + } + + return intArrayFromBase64(filename.slice(dataURIPrefix.length)); +} + + + +function nullFunc_ii(x) { Module["printErr"]("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function nullFunc_iiii(x) { Module["printErr"]("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function invoke_ii(index,a1) { + try { + return Module["dynCall_ii"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_iiii(index,a1,a2,a3) { + try { + return Module["dynCall_iiii"](index,a1,a2,a3); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity }; + +Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "abortStackOverflow": abortStackOverflow, "nullFunc_ii": nullFunc_ii, "nullFunc_iiii": nullFunc_iiii, "invoke_ii": invoke_ii, "invoke_iiii": invoke_iiii, "___lock": ___lock, "___setErrNo": ___setErrNo, "___syscall140": ___syscall140, "___syscall146": ___syscall146, "___syscall54": ___syscall54, "___syscall6": ___syscall6, "___unlock": ___unlock, "_emscripten_memcpy_big": _emscripten_memcpy_big, "flush_NO_FILESYSTEM": flush_NO_FILESYSTEM, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX }; +// EMSCRIPTEN_START_ASM +var asm = (/** @suppress {uselessCode} */ function(global, env, buffer) { +'almost asm'; + + + var HEAP8 = new global.Int8Array(buffer); + var HEAP16 = new global.Int16Array(buffer); + var HEAP32 = new global.Int32Array(buffer); + var HEAPU8 = new global.Uint8Array(buffer); + var HEAPU16 = new global.Uint16Array(buffer); + var HEAPU32 = new global.Uint32Array(buffer); + var HEAPF32 = new global.Float32Array(buffer); + var HEAPF64 = new global.Float64Array(buffer); + + var DYNAMICTOP_PTR=env.DYNAMICTOP_PTR|0; + var tempDoublePtr=env.tempDoublePtr|0; + var ABORT=env.ABORT|0; + var STACKTOP=env.STACKTOP|0; + var STACK_MAX=env.STACK_MAX|0; + + var __THREW__ = 0; + var threwValue = 0; + var setjmpId = 0; + var undef = 0; + var nan = global.NaN, inf = global.Infinity; + var tempInt = 0, tempBigInt = 0, tempBigIntS = 0, tempValue = 0, tempDouble = 0.0; + var tempRet0 = 0; + + var Math_floor=global.Math.floor; + var Math_abs=global.Math.abs; + var Math_sqrt=global.Math.sqrt; + var Math_pow=global.Math.pow; + var Math_cos=global.Math.cos; + var Math_sin=global.Math.sin; + var Math_tan=global.Math.tan; + var Math_acos=global.Math.acos; + var Math_asin=global.Math.asin; + var Math_atan=global.Math.atan; + var Math_atan2=global.Math.atan2; + var Math_exp=global.Math.exp; + var Math_log=global.Math.log; + var Math_ceil=global.Math.ceil; + var Math_imul=global.Math.imul; + var Math_min=global.Math.min; + var Math_max=global.Math.max; + var Math_clz32=global.Math.clz32; + var abort=env.abort; + var assert=env.assert; + var enlargeMemory=env.enlargeMemory; + var getTotalMemory=env.getTotalMemory; + var abortOnCannotGrowMemory=env.abortOnCannotGrowMemory; + var abortStackOverflow=env.abortStackOverflow; + var nullFunc_ii=env.nullFunc_ii; + var nullFunc_iiii=env.nullFunc_iiii; + var invoke_ii=env.invoke_ii; + var invoke_iiii=env.invoke_iiii; + var ___lock=env.___lock; + var ___setErrNo=env.___setErrNo; + var ___syscall140=env.___syscall140; + var ___syscall146=env.___syscall146; + var ___syscall54=env.___syscall54; + var ___syscall6=env.___syscall6; + var ___unlock=env.___unlock; + var _emscripten_memcpy_big=env._emscripten_memcpy_big; + var flush_NO_FILESYSTEM=env.flush_NO_FILESYSTEM; + var tempFloat = 0.0; + +// EMSCRIPTEN_START_FUNCS + +function stackAlloc(size) { + size = size|0; + var ret = 0; + ret = STACKTOP; + STACKTOP = (STACKTOP + size)|0; + STACKTOP = (STACKTOP + 15)&-16; + if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(size|0); + + return ret|0; +} +function stackSave() { + return STACKTOP|0; +} +function stackRestore(top) { + top = top|0; + STACKTOP = top; +} +function establishStackSpace(stackBase, stackMax) { + stackBase = stackBase|0; + stackMax = stackMax|0; + STACKTOP = stackBase; + STACK_MAX = stackMax; +} + +function setThrew(threw, value) { + threw = threw|0; + value = value|0; + if ((__THREW__|0) == 0) { + __THREW__ = threw; + threwValue = value; + } +} + +function setTempRet0(value) { + value = value|0; + tempRet0 = value; +} +function getTempRet0() { + return tempRet0|0; +} + +function _main() { + var $retval = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $retval = 0; + STACKTOP = sp;return 0; +} +function _malloc($bytes) { + $bytes = $bytes|0; + var $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i134 = 0, $$pre$i187 = 0, $$pre$i28$i = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i188Z2D = 0, $$pre$phi$i29$iZ2D = 0, $$pre$phi$iZ2D = 0, $$pre$phiZ2D = 0, $$sink$i = 0, $$sink$i$i = 0, $$sink$i167 = 0, $$sink2$i = 0, $$sink2$i184 = 0, $$sink4$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0; + var $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0; + var $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0; + var $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0; + var $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F$0$i$i = 0, $F104$0 = 0; + var $F197$0$i = 0, $F224$0$i$i = 0, $F290$0$i = 0, $I252$0$i$i = 0, $I316$0$i = 0, $I57$0$i$i = 0, $K105$0$i$i = 0, $K305$0$i$i = 0, $K373$0$i = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i176 = 0, $R$3$i = 0, $R$3$i$i = 0, $R$3$i180 = 0, $RP$1$i = 0, $RP$1$i$i = 0, $RP$1$i175 = 0, $T$0$i = 0, $T$0$i$i = 0; + var $T$0$i30$i = 0, $add$i = 0, $add$i$i = 0, $add$i135 = 0, $add$i153 = 0, $add$ptr = 0, $add$ptr$i = 0, $add$ptr$i$i = 0, $add$ptr$i$i$i = 0, $add$ptr$i141 = 0, $add$ptr$i170 = 0, $add$ptr$i2$i$i = 0, $add$ptr$i32$i = 0, $add$ptr$i40$i = 0, $add$ptr$i54$i = 0, $add$ptr14$i$i = 0, $add$ptr15$i$i = 0, $add$ptr16$i$i = 0, $add$ptr166 = 0, $add$ptr169 = 0; + var $add$ptr17$i$i = 0, $add$ptr178 = 0, $add$ptr181$i = 0, $add$ptr182 = 0, $add$ptr189$i = 0, $add$ptr190$i = 0, $add$ptr193 = 0, $add$ptr199 = 0, $add$ptr2$i$i = 0, $add$ptr205$i$i = 0, $add$ptr212$i$i = 0, $add$ptr225$i = 0, $add$ptr227$i = 0, $add$ptr24$i$i = 0, $add$ptr262$i = 0, $add$ptr269$i = 0, $add$ptr273$i = 0, $add$ptr282$i = 0, $add$ptr3$i$i = 0, $add$ptr30$i$i = 0; + var $add$ptr369$i$i = 0, $add$ptr4$i$i = 0, $add$ptr4$i$i$i = 0, $add$ptr4$i38$i = 0, $add$ptr4$i46$i = 0, $add$ptr441$i = 0, $add$ptr5$i$i = 0, $add$ptr6$i$i = 0, $add$ptr6$i$i$i = 0, $add$ptr6$i50$i = 0, $add$ptr7$i$i = 0, $add$ptr81$i$i = 0, $add$ptr95 = 0, $add$ptr98 = 0, $add10$i = 0, $add101$i = 0, $add110$i = 0, $add13$i = 0, $add14$i = 0, $add140$i = 0; + var $add144 = 0, $add150$i = 0, $add17$i = 0, $add17$i156 = 0, $add177$i = 0, $add18$i = 0, $add19$i = 0, $add2 = 0, $add20$i = 0, $add206$i$i = 0, $add212$i = 0, $add215$i = 0, $add22$i = 0, $add246$i = 0, $add26$i$i = 0, $add268$i = 0, $add269$i$i = 0, $add274$i$i = 0, $add278$i$i = 0, $add280$i$i = 0; + var $add283$i$i = 0, $add337$i = 0, $add342$i = 0, $add346$i = 0, $add348$i = 0, $add351$i = 0, $add46$i = 0, $add50 = 0, $add51$i = 0, $add54 = 0, $add54$i = 0, $add58 = 0, $add62 = 0, $add64 = 0, $add74$i$i = 0, $add77$i = 0, $add78$i = 0, $add79$i$i = 0, $add8 = 0, $add82$i = 0; + var $add83$i$i = 0, $add85$i$i = 0, $add86$i = 0, $add88$i$i = 0, $add9$i = 0, $add90$i = 0, $add92$i = 0, $and = 0, $and$i = 0, $and$i$i = 0, $and$i$i$i = 0, $and$i11$i = 0, $and$i150 = 0, $and$i33$i = 0, $and$i41$i = 0, $and100$i = 0, $and103$i = 0, $and104$i = 0, $and106 = 0, $and11$add51$i = 0; + var $and11$i = 0, $and119$i$i = 0, $and12$i = 0, $and13$i = 0, $and13$i$i = 0, $and133$i$i = 0, $and14 = 0, $and145 = 0, $and17$i = 0, $and194$i = 0, $and194$i183 = 0, $and199$i = 0, $and209$i$i = 0, $and21$i = 0, $and21$i157 = 0, $and227$i$i = 0, $and236$i = 0, $and264$i$i = 0, $and268$i$i = 0, $and273$i$i = 0; + var $and282$i$i = 0, $and29$i = 0, $and292$i = 0, $and295$i$i = 0, $and3$i = 0, $and3$i$i = 0, $and3$i$i$i = 0, $and3$i36$i = 0, $and3$i44$i = 0, $and30$i = 0, $and318$i$i = 0, $and32$i = 0, $and32$i$i = 0, $and33$i$i = 0, $and331$i = 0, $and336$i = 0, $and341$i = 0, $and350$i = 0, $and363$i = 0, $and37$i$i = 0; + var $and387$i = 0, $and4 = 0, $and40$i$i = 0, $and41 = 0, $and42$i = 0, $and43 = 0, $and46 = 0, $and49 = 0, $and49$i = 0, $and49$i$i = 0, $and53 = 0, $and57 = 0, $and6$i = 0, $and6$i$i = 0, $and6$i10$i = 0, $and6$i15$i = 0, $and61 = 0, $and64$i = 0, $and68$i = 0, $and69$i$i = 0; + var $and7 = 0, $and73$i = 0, $and73$i$i = 0, $and74 = 0, $and77$i = 0, $and78$i$i = 0, $and8$i = 0, $and80$i = 0, $and81$i = 0, $and85$i = 0, $and87$i$i = 0, $and89$i = 0, $and9$i = 0, $and96$i$i = 0, $arrayidx = 0, $arrayidx$i = 0, $arrayidx$i$i = 0, $arrayidx$i158 = 0, $arrayidx103 = 0, $arrayidx103$i$i = 0; + var $arrayidx106$i = 0, $arrayidx107$i$i = 0, $arrayidx113$i = 0, $arrayidx113$i168 = 0, $arrayidx121$i = 0, $arrayidx123$i$i = 0, $arrayidx126$i$i = 0, $arrayidx137$i = 0, $arrayidx143$i$i = 0, $arrayidx148$i = 0, $arrayidx151$i = 0, $arrayidx151$i$i = 0, $arrayidx154$i = 0, $arrayidx155$i = 0, $arrayidx161$i = 0, $arrayidx165$i = 0, $arrayidx165$i178 = 0, $arrayidx178$i$i = 0, $arrayidx184$i = 0, $arrayidx184$i$i = 0; + var $arrayidx195$i$i = 0, $arrayidx196$i = 0, $arrayidx204$i = 0, $arrayidx212$i = 0, $arrayidx223$i$i = 0, $arrayidx228$i = 0, $arrayidx23$i = 0, $arrayidx232$i = 0, $arrayidx239$i = 0, $arrayidx245$i = 0, $arrayidx256$i = 0, $arrayidx27$i = 0, $arrayidx275$i = 0, $arrayidx287$i$i = 0, $arrayidx289$i = 0, $arrayidx290$i$i = 0, $arrayidx325$i$i = 0, $arrayidx355$i = 0, $arrayidx358$i = 0, $arrayidx394$i = 0; + var $arrayidx40$i = 0, $arrayidx44$i = 0, $arrayidx61$i = 0, $arrayidx65$i = 0, $arrayidx66 = 0, $arrayidx71$i = 0, $arrayidx75$i = 0, $arrayidx91$i$i = 0, $arrayidx92$i$i = 0, $arrayidx94$i = 0, $arrayidx94$i166 = 0, $arrayidx96$i$i = 0, $bk$i = 0, $bk$i$i = 0, $bk$i172 = 0, $bk$i23$i = 0, $bk102$i$i = 0, $bk122 = 0, $bk124 = 0, $bk139$i$i = 0; + var $bk145$i = 0, $bk158$i$i = 0, $bk161$i$i = 0, $bk18 = 0, $bk218$i = 0, $bk220$i = 0, $bk246$i$i = 0, $bk248$i$i = 0, $bk302$i$i = 0, $bk311$i = 0, $bk313$i = 0, $bk338$i$i = 0, $bk357$i$i = 0, $bk360$i$i = 0, $bk370$i = 0, $bk407$i = 0, $bk429$i = 0, $bk432$i = 0, $bk55$i$i = 0, $bk56$i = 0; + var $bk67$i$i = 0, $bk74$i$i = 0, $bk85 = 0, $bk91$i$i = 0, $br$2$ph$i = 0, $call107$i = 0, $call131$i = 0, $call132$i = 0, $call275$i = 0, $call37$i = 0, $call68$i = 0, $call83$i = 0, $child$i$i = 0, $child166$i$i = 0, $child289$i$i = 0, $child357$i = 0, $cmp = 0, $cmp$i = 0, $cmp$i$i$i = 0, $cmp$i12$i = 0; + var $cmp$i133 = 0, $cmp$i147 = 0, $cmp$i3$i$i = 0, $cmp$i34$i = 0, $cmp$i42$i = 0, $cmp$i52$i = 0, $cmp$i9$i = 0, $cmp1 = 0, $cmp1$i = 0, $cmp10 = 0, $cmp100$i$i = 0, $cmp102$i = 0, $cmp104$i$i = 0, $cmp105$i = 0, $cmp106$i$i = 0, $cmp107$i = 0, $cmp108$i = 0, $cmp108$i$i = 0, $cmp114$i = 0, $cmp116$i = 0; + var $cmp118$i = 0, $cmp119$i = 0, $cmp12$i = 0, $cmp120$i$i = 0, $cmp120$i25$i = 0, $cmp123$i = 0, $cmp124$i$i = 0, $cmp126$i = 0, $cmp127$i = 0, $cmp128 = 0, $cmp128$i = 0, $cmp128$i$i = 0, $cmp133$i = 0, $cmp135$i = 0, $cmp137$i = 0, $cmp138$i = 0, $cmp139 = 0, $cmp141$i = 0, $cmp144$i$i = 0, $cmp146 = 0; + var $cmp147$i = 0, $cmp14795$i = 0, $cmp15$i = 0, $cmp151$i = 0, $cmp152$i = 0, $cmp155$i = 0, $cmp156 = 0, $cmp156$i = 0, $cmp156$i$i = 0, $cmp157$i = 0, $cmp159$i = 0, $cmp162 = 0, $cmp162$i = 0, $cmp162$i177 = 0, $cmp166$i = 0, $cmp168$i$i = 0, $cmp174$i = 0, $cmp180$i = 0, $cmp185$i = 0, $cmp185$i$i = 0; + var $cmp186 = 0, $cmp186$i = 0, $cmp19$i = 0, $cmp190$i = 0, $cmp191$i = 0, $cmp2$i$i = 0, $cmp2$i$i$i = 0, $cmp20$i$i = 0, $cmp203$i = 0, $cmp205$i = 0, $cmp209$i = 0, $cmp21$i = 0, $cmp215$i$i = 0, $cmp217$i = 0, $cmp218$i = 0, $cmp224$i = 0, $cmp228$i = 0, $cmp229$i = 0, $cmp24$i = 0, $cmp24$i$i = 0; + var $cmp246$i = 0, $cmp254$i$i = 0, $cmp257$i = 0, $cmp258$i$i = 0, $cmp26$i = 0, $cmp265$i = 0, $cmp27$i$i = 0, $cmp28$i = 0, $cmp28$i$i = 0, $cmp284$i = 0, $cmp286$i = 0, $cmp29 = 0, $cmp3$i = 0, $cmp3$i$i = 0, $cmp306$i$i = 0, $cmp31 = 0, $cmp319$i = 0, $cmp319$i$i = 0, $cmp32$i = 0, $cmp32$i138 = 0; + var $cmp323$i = 0, $cmp327$i$i = 0, $cmp34$i = 0, $cmp34$i$i = 0, $cmp35$i = 0, $cmp36$i = 0, $cmp36$i$i = 0, $cmp374$i = 0, $cmp38$i = 0, $cmp38$i$i = 0, $cmp388$i = 0, $cmp396$i = 0, $cmp40$i = 0, $cmp43$i = 0, $cmp45$i = 0, $cmp46$i = 0, $cmp46$i$i = 0, $cmp49$i = 0, $cmp5 = 0, $cmp55$i = 0; + var $cmp55$i162 = 0, $cmp57$i = 0, $cmp57$i163 = 0, $cmp59$i$i = 0, $cmp60$i = 0, $cmp62$i = 0, $cmp63$i = 0, $cmp63$i$i = 0, $cmp65$i = 0, $cmp66$i = 0, $cmp66$i140 = 0, $cmp69$i = 0, $cmp7$i$i = 0, $cmp70 = 0, $cmp72$i = 0, $cmp75$i$i = 0, $cmp76$i = 0, $cmp81$i = 0, $cmp85$i = 0, $cmp89$i = 0; + var $cmp9$i$i = 0, $cmp90$i = 0, $cmp91$i = 0, $cmp93$i = 0, $cmp95$i = 0, $cmp96$i = 0, $cmp97$i = 0, $cmp97$i$i = 0, $cmp976$i = 0, $cmp99 = 0, $cond = 0, $cond$i = 0, $cond$i$i = 0, $cond$i$i$i = 0, $cond$i14$i = 0, $cond$i159 = 0, $cond$i37$i = 0, $cond$i45$i = 0, $cond1$i$i = 0, $cond115$i$i = 0; + var $cond13$i$i = 0, $cond15$i$i = 0, $cond2$i = 0, $cond315$i$i = 0, $cond383$i = 0, $fd$i = 0, $fd$i$i = 0, $fd$i173 = 0, $fd103$i$i = 0, $fd123 = 0, $fd140$i$i = 0, $fd146$i = 0, $fd148$i$i = 0, $fd160$i$i = 0, $fd219$i = 0, $fd247$i$i = 0, $fd303$i$i = 0, $fd312$i = 0, $fd339$i$i = 0, $fd344$i$i = 0; + var $fd359$i$i = 0, $fd371$i = 0, $fd408$i = 0, $fd416$i = 0, $fd431$i = 0, $fd54$i$i = 0, $fd57$i = 0, $fd68$i$i = 0, $fd69 = 0, $fd78$i$i = 0, $fd9 = 0, $fd92$i$i = 0, $head = 0, $head$i = 0, $head$i$i = 0, $head$i$i$i = 0, $head$i160 = 0, $head$i19$i = 0, $head$i39$i = 0, $head$i49$i = 0; + var $head118$i$i = 0, $head168 = 0, $head173 = 0, $head177 = 0, $head179 = 0, $head179$i = 0, $head182$i = 0, $head187$i = 0, $head189$i = 0, $head195 = 0, $head198 = 0, $head208$i$i = 0, $head211$i$i = 0, $head23$i$i = 0, $head25 = 0, $head26$i$i = 0, $head265$i = 0, $head268$i = 0, $head271$i = 0, $head274$i = 0; + var $head279$i = 0, $head281$i = 0, $head29$i = 0, $head29$i$i = 0, $head317$i$i = 0, $head32$i$i = 0, $head34$i$i = 0, $head386$i = 0, $head7$i$i = 0, $head7$i$i$i = 0, $head7$i51$i = 0, $head94 = 0, $head97 = 0, $head99$i = 0, $idx$0$i = 0, $index$i = 0, $index$i$i = 0, $index$i181 = 0, $index$i26$i = 0, $index288$i$i = 0; + var $index356$i = 0, $magic$i$i = 0, $nb$0 = 0, $neg = 0, $neg$i = 0, $neg$i$i = 0, $neg$i137 = 0, $neg$i182 = 0, $neg103$i = 0, $neg13 = 0, $neg132$i$i = 0, $neg48$i = 0, $neg73 = 0, $next$i = 0, $next$i$i = 0, $next$i$i$i = 0, $next231$i = 0, $not$cmp141$i = 0, $not$cmp493$i = 0, $oldfirst$0$i$i = 0; + var $or$cond$i = 0, $or$cond$i164 = 0, $or$cond1$i = 0, $or$cond1$i161 = 0, $or$cond2$i = 0, $or$cond3$i = 0, $or$cond4$i = 0, $or$cond5$i = 0, $or$cond7$i = 0, $or$cond7$not$i = 0, $or$cond8$i = 0, $or$cond93$i = 0, $or$cond94$i = 0, $or$i = 0, $or$i$i = 0, $or$i$i$i = 0, $or$i165 = 0, $or$i48$i = 0, $or101$i$i = 0, $or110 = 0; + var $or167 = 0, $or172 = 0, $or176 = 0, $or178$i = 0, $or180 = 0, $or183$i = 0, $or186$i = 0, $or188$i = 0, $or19$i$i = 0, $or194 = 0, $or197 = 0, $or204$i = 0, $or210$i$i = 0, $or22$i$i = 0, $or23 = 0, $or232$i$i = 0, $or26 = 0, $or264$i = 0, $or267$i = 0, $or270$i = 0; + var $or275$i = 0, $or278$i = 0, $or28$i$i = 0, $or280$i = 0, $or297$i = 0, $or300$i$i = 0, $or33$i$i = 0, $or368$i = 0, $or40 = 0, $or44$i$i = 0, $or93 = 0, $or96 = 0, $parent$i = 0, $parent$i$i = 0, $parent$i171 = 0, $parent$i24$i = 0, $parent135$i = 0, $parent138$i$i = 0, $parent149$i = 0, $parent162$i$i = 0; + var $parent165$i$i = 0, $parent166$i = 0, $parent179$i$i = 0, $parent196$i$i = 0, $parent226$i = 0, $parent240$i = 0, $parent257$i = 0, $parent301$i$i = 0, $parent337$i$i = 0, $parent361$i$i = 0, $parent369$i = 0, $parent406$i = 0, $parent433$i = 0, $qsize$0$i$i = 0, $retval$0 = 0, $rsize$0$i = 0, $rsize$0$lcssa$i = 0, $rsize$07$i = 0, $rsize$1$i = 0, $rsize$3$i = 0; + var $rsize$4$lcssa$i = 0, $rsize$48$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sflags193$i = 0, $sflags235$i = 0, $shl = 0, $shl$i = 0, $shl$i$i = 0, $shl$i151 = 0, $shl102 = 0, $shl105 = 0, $shl116$i$i = 0, $shl12 = 0, $shl127$i$i = 0, $shl131$i$i = 0, $shl15$i = 0, $shl18$i = 0, $shl192$i = 0, $shl195$i = 0; + var $shl198$i = 0, $shl22 = 0, $shl222$i$i = 0, $shl226$i$i = 0, $shl265$i$i = 0, $shl270$i$i = 0, $shl276$i$i = 0, $shl279$i$i = 0, $shl288$i = 0, $shl291$i = 0, $shl294$i$i = 0, $shl31$i = 0, $shl316$i$i = 0, $shl326$i$i = 0, $shl333$i = 0, $shl338$i = 0, $shl344$i = 0, $shl347$i = 0, $shl35 = 0, $shl362$i = 0; + var $shl37 = 0, $shl384$i = 0, $shl39$i$i = 0, $shl395$i = 0, $shl48$i$i = 0, $shl52$i = 0, $shl60$i = 0, $shl65 = 0, $shl70$i$i = 0, $shl72 = 0, $shl75$i$i = 0, $shl81$i$i = 0, $shl84$i$i = 0, $shl9$i = 0, $shl90 = 0, $shl95$i$i = 0, $shr = 0, $shr$i = 0, $shr$i$i = 0, $shr$i146 = 0; + var $shr$i22$i = 0, $shr101 = 0, $shr11$i = 0, $shr11$i154 = 0, $shr110$i$i = 0, $shr12$i = 0, $shr124$i$i = 0, $shr15$i = 0, $shr16$i = 0, $shr16$i155 = 0, $shr19$i = 0, $shr194$i = 0, $shr20$i = 0, $shr214$i$i = 0, $shr253$i$i = 0, $shr263$i$i = 0, $shr267$i$i = 0, $shr27$i = 0, $shr272$i$i = 0, $shr277$i$i = 0; + var $shr281$i$i = 0, $shr283$i = 0, $shr3 = 0, $shr310$i$i = 0, $shr318$i = 0, $shr323$i$i = 0, $shr330$i = 0, $shr335$i = 0, $shr340$i = 0, $shr345$i = 0, $shr349$i = 0, $shr378$i = 0, $shr392$i = 0, $shr4$i = 0, $shr42$i = 0, $shr45 = 0, $shr47 = 0, $shr48 = 0, $shr5$i = 0, $shr5$i149 = 0; + var $shr51 = 0, $shr52 = 0, $shr55 = 0, $shr56 = 0, $shr58$i$i = 0, $shr59 = 0, $shr60 = 0, $shr63 = 0, $shr68$i$i = 0, $shr7$i = 0, $shr7$i152 = 0, $shr72$i = 0, $shr72$i$i = 0, $shr75$i = 0, $shr76$i = 0, $shr77$i$i = 0, $shr79$i = 0, $shr8$i = 0, $shr80$i = 0, $shr82$i$i = 0; + var $shr83$i = 0, $shr84$i = 0, $shr86$i$i = 0, $shr87$i = 0, $shr88$i = 0, $shr91$i = 0, $size$i$i = 0, $size$i$i$i = 0, $size188$i = 0, $size245$i = 0, $sizebits$0$i = 0, $sizebits$0$shl52$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$0104$i = 0, $sp$1103$i = 0, $ssize$2$ph$i = 0, $sub = 0, $sub$i = 0, $sub$i$i = 0; + var $sub$i$i$i = 0, $sub$i13$i = 0, $sub$i136 = 0, $sub$i145 = 0, $sub$i35$i = 0, $sub$i43$i = 0, $sub$ptr$lhs$cast$i = 0, $sub$ptr$lhs$cast$i$i = 0, $sub$ptr$lhs$cast$i16$i = 0, $sub$ptr$rhs$cast$i = 0, $sub$ptr$rhs$cast$i$i = 0, $sub$ptr$rhs$cast$i17$i = 0, $sub$ptr$sub$i = 0, $sub$ptr$sub$i$i = 0, $sub$ptr$sub$i18$i = 0, $sub$ptr$sub$tsize$4$i = 0, $sub10$i = 0, $sub101$i = 0, $sub101$rsize$4$i = 0, $sub112$i = 0; + var $sub113$i$i = 0, $sub118$i = 0, $sub12$i$i = 0, $sub14$i = 0, $sub16$i$i = 0, $sub160 = 0, $sub172$i = 0, $sub18$i$i = 0, $sub190 = 0, $sub2$i = 0, $sub22$i = 0, $sub260$i = 0, $sub262$i$i = 0, $sub266$i$i = 0, $sub271$i$i = 0, $sub275$i$i = 0, $sub30$i = 0, $sub31$i = 0, $sub31$rsize$0$i = 0, $sub313$i$i = 0; + var $sub329$i = 0, $sub33$i = 0, $sub334$i = 0, $sub339$i = 0, $sub343$i = 0, $sub381$i = 0, $sub4$i = 0, $sub41$i = 0, $sub42 = 0, $sub44 = 0, $sub5$i$i = 0, $sub5$i$i$i = 0, $sub5$i47$i = 0, $sub50$i = 0, $sub6$i = 0, $sub63$i = 0, $sub67$i = 0, $sub67$i$i = 0, $sub70$i = 0, $sub71$i$i = 0; + var $sub76$i$i = 0, $sub80$i$i = 0, $sub91 = 0, $sub99$i = 0, $t$0$i = 0, $t$2$i = 0, $t$4$ph$i = 0, $t$4$v$4$i = 0, $t$47$i = 0, $tbase$792$i = 0, $tobool$i$i = 0, $tobool107 = 0, $tobool195$i = 0, $tobool200$i = 0, $tobool228$i$i = 0, $tobool237$i = 0, $tobool293$i = 0, $tobool296$i$i = 0, $tobool30$i = 0, $tobool364$i = 0; + var $tobool97$i$i = 0, $tsize$2617179$i = 0, $tsize$4$i = 0, $tsize$791$i = 0, $v$0$i = 0, $v$0$lcssa$i = 0, $v$08$i = 0, $v$1$i = 0, $v$3$i = 0, $v$4$lcssa$i = 0, $v$4$ph$i = 0, $v$49$i = 0, $xor$i$i = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $magic$i$i = sp; + $cmp = ($bytes>>>0)<(245); + do { + if ($cmp) { + $cmp1 = ($bytes>>>0)<(11); + $add2 = (($bytes) + 11)|0; + $and = $add2 & -8; + $cond = $cmp1 ? 16 : $and; + $shr = $cond >>> 3; + $0 = HEAP32[34]|0; + $shr3 = $0 >>> $shr; + $and4 = $shr3 & 3; + $cmp5 = ($and4|0)==(0); + if (!($cmp5)) { + $neg = $shr3 & 1; + $and7 = $neg ^ 1; + $add8 = (($and7) + ($shr))|0; + $shl = $add8 << 1; + $arrayidx = (176 + ($shl<<2)|0); + $1 = ((($arrayidx)) + 8|0); + $2 = HEAP32[$1>>2]|0; + $fd9 = ((($2)) + 8|0); + $3 = HEAP32[$fd9>>2]|0; + $cmp10 = ($3|0)==($arrayidx|0); + if ($cmp10) { + $shl12 = 1 << $add8; + $neg13 = $shl12 ^ -1; + $and14 = $0 & $neg13; + HEAP32[34] = $and14; + } else { + $bk18 = ((($3)) + 12|0); + HEAP32[$bk18>>2] = $arrayidx; + HEAP32[$1>>2] = $3; + } + $shl22 = $add8 << 3; + $or23 = $shl22 | 3; + $head = ((($2)) + 4|0); + HEAP32[$head>>2] = $or23; + $add$ptr = (($2) + ($shl22)|0); + $head25 = ((($add$ptr)) + 4|0); + $4 = HEAP32[$head25>>2]|0; + $or26 = $4 | 1; + HEAP32[$head25>>2] = $or26; + $retval$0 = $fd9; + STACKTOP = sp;return ($retval$0|0); + } + $5 = HEAP32[(144)>>2]|0; + $cmp29 = ($cond>>>0)>($5>>>0); + if ($cmp29) { + $cmp31 = ($shr3|0)==(0); + if (!($cmp31)) { + $shl35 = $shr3 << $shr; + $shl37 = 2 << $shr; + $sub = (0 - ($shl37))|0; + $or40 = $shl37 | $sub; + $and41 = $shl35 & $or40; + $sub42 = (0 - ($and41))|0; + $and43 = $and41 & $sub42; + $sub44 = (($and43) + -1)|0; + $shr45 = $sub44 >>> 12; + $and46 = $shr45 & 16; + $shr47 = $sub44 >>> $and46; + $shr48 = $shr47 >>> 5; + $and49 = $shr48 & 8; + $add50 = $and49 | $and46; + $shr51 = $shr47 >>> $and49; + $shr52 = $shr51 >>> 2; + $and53 = $shr52 & 4; + $add54 = $add50 | $and53; + $shr55 = $shr51 >>> $and53; + $shr56 = $shr55 >>> 1; + $and57 = $shr56 & 2; + $add58 = $add54 | $and57; + $shr59 = $shr55 >>> $and57; + $shr60 = $shr59 >>> 1; + $and61 = $shr60 & 1; + $add62 = $add58 | $and61; + $shr63 = $shr59 >>> $and61; + $add64 = (($add62) + ($shr63))|0; + $shl65 = $add64 << 1; + $arrayidx66 = (176 + ($shl65<<2)|0); + $6 = ((($arrayidx66)) + 8|0); + $7 = HEAP32[$6>>2]|0; + $fd69 = ((($7)) + 8|0); + $8 = HEAP32[$fd69>>2]|0; + $cmp70 = ($8|0)==($arrayidx66|0); + if ($cmp70) { + $shl72 = 1 << $add64; + $neg73 = $shl72 ^ -1; + $and74 = $0 & $neg73; + HEAP32[34] = $and74; + $10 = $and74; + } else { + $bk85 = ((($8)) + 12|0); + HEAP32[$bk85>>2] = $arrayidx66; + HEAP32[$6>>2] = $8; + $10 = $0; + } + $shl90 = $add64 << 3; + $sub91 = (($shl90) - ($cond))|0; + $or93 = $cond | 3; + $head94 = ((($7)) + 4|0); + HEAP32[$head94>>2] = $or93; + $add$ptr95 = (($7) + ($cond)|0); + $or96 = $sub91 | 1; + $head97 = ((($add$ptr95)) + 4|0); + HEAP32[$head97>>2] = $or96; + $add$ptr98 = (($7) + ($shl90)|0); + HEAP32[$add$ptr98>>2] = $sub91; + $cmp99 = ($5|0)==(0); + if (!($cmp99)) { + $9 = HEAP32[(156)>>2]|0; + $shr101 = $5 >>> 3; + $shl102 = $shr101 << 1; + $arrayidx103 = (176 + ($shl102<<2)|0); + $shl105 = 1 << $shr101; + $and106 = $10 & $shl105; + $tobool107 = ($and106|0)==(0); + if ($tobool107) { + $or110 = $10 | $shl105; + HEAP32[34] = $or110; + $$pre = ((($arrayidx103)) + 8|0); + $$pre$phiZ2D = $$pre;$F104$0 = $arrayidx103; + } else { + $11 = ((($arrayidx103)) + 8|0); + $12 = HEAP32[$11>>2]|0; + $$pre$phiZ2D = $11;$F104$0 = $12; + } + HEAP32[$$pre$phiZ2D>>2] = $9; + $bk122 = ((($F104$0)) + 12|0); + HEAP32[$bk122>>2] = $9; + $fd123 = ((($9)) + 8|0); + HEAP32[$fd123>>2] = $F104$0; + $bk124 = ((($9)) + 12|0); + HEAP32[$bk124>>2] = $arrayidx103; + } + HEAP32[(144)>>2] = $sub91; + HEAP32[(156)>>2] = $add$ptr95; + $retval$0 = $fd69; + STACKTOP = sp;return ($retval$0|0); + } + $13 = HEAP32[(140)>>2]|0; + $cmp128 = ($13|0)==(0); + if ($cmp128) { + $nb$0 = $cond; + } else { + $sub$i = (0 - ($13))|0; + $and$i = $13 & $sub$i; + $sub2$i = (($and$i) + -1)|0; + $shr$i = $sub2$i >>> 12; + $and3$i = $shr$i & 16; + $shr4$i = $sub2$i >>> $and3$i; + $shr5$i = $shr4$i >>> 5; + $and6$i = $shr5$i & 8; + $add$i = $and6$i | $and3$i; + $shr7$i = $shr4$i >>> $and6$i; + $shr8$i = $shr7$i >>> 2; + $and9$i = $shr8$i & 4; + $add10$i = $add$i | $and9$i; + $shr11$i = $shr7$i >>> $and9$i; + $shr12$i = $shr11$i >>> 1; + $and13$i = $shr12$i & 2; + $add14$i = $add10$i | $and13$i; + $shr15$i = $shr11$i >>> $and13$i; + $shr16$i = $shr15$i >>> 1; + $and17$i = $shr16$i & 1; + $add18$i = $add14$i | $and17$i; + $shr19$i = $shr15$i >>> $and17$i; + $add20$i = (($add18$i) + ($shr19$i))|0; + $arrayidx$i = (440 + ($add20$i<<2)|0); + $14 = HEAP32[$arrayidx$i>>2]|0; + $head$i = ((($14)) + 4|0); + $15 = HEAP32[$head$i>>2]|0; + $and21$i = $15 & -8; + $sub22$i = (($and21$i) - ($cond))|0; + $arrayidx232$i = ((($14)) + 16|0); + $16 = HEAP32[$arrayidx232$i>>2]|0; + $cmp3$i = ($16|0)==(0|0); + $$sink4$i = $cmp3$i&1; + $arrayidx275$i = (((($14)) + 16|0) + ($$sink4$i<<2)|0); + $17 = HEAP32[$arrayidx275$i>>2]|0; + $cmp286$i = ($17|0)==(0|0); + if ($cmp286$i) { + $rsize$0$lcssa$i = $sub22$i;$v$0$lcssa$i = $14; + } else { + $18 = $17;$rsize$07$i = $sub22$i;$v$08$i = $14; + while(1) { + $head29$i = ((($18)) + 4|0); + $19 = HEAP32[$head29$i>>2]|0; + $and30$i = $19 & -8; + $sub31$i = (($and30$i) - ($cond))|0; + $cmp32$i = ($sub31$i>>>0)<($rsize$07$i>>>0); + $sub31$rsize$0$i = $cmp32$i ? $sub31$i : $rsize$07$i; + $$v$0$i = $cmp32$i ? $18 : $v$08$i; + $arrayidx23$i = ((($18)) + 16|0); + $20 = HEAP32[$arrayidx23$i>>2]|0; + $cmp$i = ($20|0)==(0|0); + $$sink$i = $cmp$i&1; + $arrayidx27$i = (((($18)) + 16|0) + ($$sink$i<<2)|0); + $21 = HEAP32[$arrayidx27$i>>2]|0; + $cmp28$i = ($21|0)==(0|0); + if ($cmp28$i) { + $rsize$0$lcssa$i = $sub31$rsize$0$i;$v$0$lcssa$i = $$v$0$i; + break; + } else { + $18 = $21;$rsize$07$i = $sub31$rsize$0$i;$v$08$i = $$v$0$i; + } + } + } + $add$ptr$i = (($v$0$lcssa$i) + ($cond)|0); + $cmp35$i = ($add$ptr$i>>>0)>($v$0$lcssa$i>>>0); + if ($cmp35$i) { + $parent$i = ((($v$0$lcssa$i)) + 24|0); + $22 = HEAP32[$parent$i>>2]|0; + $bk$i = ((($v$0$lcssa$i)) + 12|0); + $23 = HEAP32[$bk$i>>2]|0; + $cmp40$i = ($23|0)==($v$0$lcssa$i|0); + do { + if ($cmp40$i) { + $arrayidx61$i = ((($v$0$lcssa$i)) + 20|0); + $25 = HEAP32[$arrayidx61$i>>2]|0; + $cmp62$i = ($25|0)==(0|0); + if ($cmp62$i) { + $arrayidx65$i = ((($v$0$lcssa$i)) + 16|0); + $26 = HEAP32[$arrayidx65$i>>2]|0; + $cmp66$i = ($26|0)==(0|0); + if ($cmp66$i) { + $R$3$i = 0; + break; + } else { + $R$1$i = $26;$RP$1$i = $arrayidx65$i; + } + } else { + $R$1$i = $25;$RP$1$i = $arrayidx61$i; + } + while(1) { + $arrayidx71$i = ((($R$1$i)) + 20|0); + $27 = HEAP32[$arrayidx71$i>>2]|0; + $cmp72$i = ($27|0)==(0|0); + if (!($cmp72$i)) { + $R$1$i = $27;$RP$1$i = $arrayidx71$i; + continue; + } + $arrayidx75$i = ((($R$1$i)) + 16|0); + $28 = HEAP32[$arrayidx75$i>>2]|0; + $cmp76$i = ($28|0)==(0|0); + if ($cmp76$i) { + break; + } else { + $R$1$i = $28;$RP$1$i = $arrayidx75$i; + } + } + HEAP32[$RP$1$i>>2] = 0; + $R$3$i = $R$1$i; + } else { + $fd$i = ((($v$0$lcssa$i)) + 8|0); + $24 = HEAP32[$fd$i>>2]|0; + $bk56$i = ((($24)) + 12|0); + HEAP32[$bk56$i>>2] = $23; + $fd57$i = ((($23)) + 8|0); + HEAP32[$fd57$i>>2] = $24; + $R$3$i = $23; + } + } while(0); + $cmp90$i = ($22|0)==(0|0); + do { + if (!($cmp90$i)) { + $index$i = ((($v$0$lcssa$i)) + 28|0); + $29 = HEAP32[$index$i>>2]|0; + $arrayidx94$i = (440 + ($29<<2)|0); + $30 = HEAP32[$arrayidx94$i>>2]|0; + $cmp95$i = ($v$0$lcssa$i|0)==($30|0); + if ($cmp95$i) { + HEAP32[$arrayidx94$i>>2] = $R$3$i; + $cond$i = ($R$3$i|0)==(0|0); + if ($cond$i) { + $shl$i = 1 << $29; + $neg$i = $shl$i ^ -1; + $and103$i = $13 & $neg$i; + HEAP32[(140)>>2] = $and103$i; + break; + } + } else { + $arrayidx113$i = ((($22)) + 16|0); + $31 = HEAP32[$arrayidx113$i>>2]|0; + $cmp114$i = ($31|0)!=($v$0$lcssa$i|0); + $$sink2$i = $cmp114$i&1; + $arrayidx121$i = (((($22)) + 16|0) + ($$sink2$i<<2)|0); + HEAP32[$arrayidx121$i>>2] = $R$3$i; + $cmp126$i = ($R$3$i|0)==(0|0); + if ($cmp126$i) { + break; + } + } + $parent135$i = ((($R$3$i)) + 24|0); + HEAP32[$parent135$i>>2] = $22; + $arrayidx137$i = ((($v$0$lcssa$i)) + 16|0); + $32 = HEAP32[$arrayidx137$i>>2]|0; + $cmp138$i = ($32|0)==(0|0); + if (!($cmp138$i)) { + $arrayidx148$i = ((($R$3$i)) + 16|0); + HEAP32[$arrayidx148$i>>2] = $32; + $parent149$i = ((($32)) + 24|0); + HEAP32[$parent149$i>>2] = $R$3$i; + } + $arrayidx154$i = ((($v$0$lcssa$i)) + 20|0); + $33 = HEAP32[$arrayidx154$i>>2]|0; + $cmp155$i = ($33|0)==(0|0); + if (!($cmp155$i)) { + $arrayidx165$i = ((($R$3$i)) + 20|0); + HEAP32[$arrayidx165$i>>2] = $33; + $parent166$i = ((($33)) + 24|0); + HEAP32[$parent166$i>>2] = $R$3$i; + } + } + } while(0); + $cmp174$i = ($rsize$0$lcssa$i>>>0)<(16); + if ($cmp174$i) { + $add177$i = (($rsize$0$lcssa$i) + ($cond))|0; + $or178$i = $add177$i | 3; + $head179$i = ((($v$0$lcssa$i)) + 4|0); + HEAP32[$head179$i>>2] = $or178$i; + $add$ptr181$i = (($v$0$lcssa$i) + ($add177$i)|0); + $head182$i = ((($add$ptr181$i)) + 4|0); + $34 = HEAP32[$head182$i>>2]|0; + $or183$i = $34 | 1; + HEAP32[$head182$i>>2] = $or183$i; + } else { + $or186$i = $cond | 3; + $head187$i = ((($v$0$lcssa$i)) + 4|0); + HEAP32[$head187$i>>2] = $or186$i; + $or188$i = $rsize$0$lcssa$i | 1; + $head189$i = ((($add$ptr$i)) + 4|0); + HEAP32[$head189$i>>2] = $or188$i; + $add$ptr190$i = (($add$ptr$i) + ($rsize$0$lcssa$i)|0); + HEAP32[$add$ptr190$i>>2] = $rsize$0$lcssa$i; + $cmp191$i = ($5|0)==(0); + if (!($cmp191$i)) { + $35 = HEAP32[(156)>>2]|0; + $shr194$i = $5 >>> 3; + $shl195$i = $shr194$i << 1; + $arrayidx196$i = (176 + ($shl195$i<<2)|0); + $shl198$i = 1 << $shr194$i; + $and199$i = $0 & $shl198$i; + $tobool200$i = ($and199$i|0)==(0); + if ($tobool200$i) { + $or204$i = $0 | $shl198$i; + HEAP32[34] = $or204$i; + $$pre$i = ((($arrayidx196$i)) + 8|0); + $$pre$phi$iZ2D = $$pre$i;$F197$0$i = $arrayidx196$i; + } else { + $36 = ((($arrayidx196$i)) + 8|0); + $37 = HEAP32[$36>>2]|0; + $$pre$phi$iZ2D = $36;$F197$0$i = $37; + } + HEAP32[$$pre$phi$iZ2D>>2] = $35; + $bk218$i = ((($F197$0$i)) + 12|0); + HEAP32[$bk218$i>>2] = $35; + $fd219$i = ((($35)) + 8|0); + HEAP32[$fd219$i>>2] = $F197$0$i; + $bk220$i = ((($35)) + 12|0); + HEAP32[$bk220$i>>2] = $arrayidx196$i; + } + HEAP32[(144)>>2] = $rsize$0$lcssa$i; + HEAP32[(156)>>2] = $add$ptr$i; + } + $add$ptr225$i = ((($v$0$lcssa$i)) + 8|0); + $retval$0 = $add$ptr225$i; + STACKTOP = sp;return ($retval$0|0); + } else { + $nb$0 = $cond; + } + } + } else { + $nb$0 = $cond; + } + } else { + $cmp139 = ($bytes>>>0)>(4294967231); + if ($cmp139) { + $nb$0 = -1; + } else { + $add144 = (($bytes) + 11)|0; + $and145 = $add144 & -8; + $38 = HEAP32[(140)>>2]|0; + $cmp146 = ($38|0)==(0); + if ($cmp146) { + $nb$0 = $and145; + } else { + $sub$i145 = (0 - ($and145))|0; + $shr$i146 = $add144 >>> 8; + $cmp$i147 = ($shr$i146|0)==(0); + if ($cmp$i147) { + $idx$0$i = 0; + } else { + $cmp1$i = ($and145>>>0)>(16777215); + if ($cmp1$i) { + $idx$0$i = 31; + } else { + $sub4$i = (($shr$i146) + 1048320)|0; + $shr5$i149 = $sub4$i >>> 16; + $and$i150 = $shr5$i149 & 8; + $shl$i151 = $shr$i146 << $and$i150; + $sub6$i = (($shl$i151) + 520192)|0; + $shr7$i152 = $sub6$i >>> 16; + $and8$i = $shr7$i152 & 4; + $add$i153 = $and8$i | $and$i150; + $shl9$i = $shl$i151 << $and8$i; + $sub10$i = (($shl9$i) + 245760)|0; + $shr11$i154 = $sub10$i >>> 16; + $and12$i = $shr11$i154 & 2; + $add13$i = $add$i153 | $and12$i; + $sub14$i = (14 - ($add13$i))|0; + $shl15$i = $shl9$i << $and12$i; + $shr16$i155 = $shl15$i >>> 15; + $add17$i156 = (($sub14$i) + ($shr16$i155))|0; + $shl18$i = $add17$i156 << 1; + $add19$i = (($add17$i156) + 7)|0; + $shr20$i = $and145 >>> $add19$i; + $and21$i157 = $shr20$i & 1; + $add22$i = $and21$i157 | $shl18$i; + $idx$0$i = $add22$i; + } + } + $arrayidx$i158 = (440 + ($idx$0$i<<2)|0); + $39 = HEAP32[$arrayidx$i158>>2]|0; + $cmp24$i = ($39|0)==(0|0); + L74: do { + if ($cmp24$i) { + $rsize$3$i = $sub$i145;$t$2$i = 0;$v$3$i = 0; + label = 57; + } else { + $cmp26$i = ($idx$0$i|0)==(31); + $shr27$i = $idx$0$i >>> 1; + $sub30$i = (25 - ($shr27$i))|0; + $cond$i159 = $cmp26$i ? 0 : $sub30$i; + $shl31$i = $and145 << $cond$i159; + $rsize$0$i = $sub$i145;$rst$0$i = 0;$sizebits$0$i = $shl31$i;$t$0$i = $39;$v$0$i = 0; + while(1) { + $head$i160 = ((($t$0$i)) + 4|0); + $40 = HEAP32[$head$i160>>2]|0; + $and32$i = $40 & -8; + $sub33$i = (($and32$i) - ($and145))|0; + $cmp34$i = ($sub33$i>>>0)<($rsize$0$i>>>0); + if ($cmp34$i) { + $cmp36$i = ($sub33$i|0)==(0); + if ($cmp36$i) { + $rsize$48$i = 0;$t$47$i = $t$0$i;$v$49$i = $t$0$i; + label = 61; + break L74; + } else { + $rsize$1$i = $sub33$i;$v$1$i = $t$0$i; + } + } else { + $rsize$1$i = $rsize$0$i;$v$1$i = $v$0$i; + } + $arrayidx40$i = ((($t$0$i)) + 20|0); + $41 = HEAP32[$arrayidx40$i>>2]|0; + $shr42$i = $sizebits$0$i >>> 31; + $arrayidx44$i = (((($t$0$i)) + 16|0) + ($shr42$i<<2)|0); + $42 = HEAP32[$arrayidx44$i>>2]|0; + $cmp45$i = ($41|0)==(0|0); + $cmp46$i = ($41|0)==($42|0); + $or$cond1$i161 = $cmp45$i | $cmp46$i; + $rst$1$i = $or$cond1$i161 ? $rst$0$i : $41; + $cmp49$i = ($42|0)==(0|0); + $not$cmp493$i = $cmp49$i ^ 1; + $shl52$i = $not$cmp493$i&1; + $sizebits$0$shl52$i = $sizebits$0$i << $shl52$i; + if ($cmp49$i) { + $rsize$3$i = $rsize$1$i;$t$2$i = $rst$1$i;$v$3$i = $v$1$i; + label = 57; + break; + } else { + $rsize$0$i = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $sizebits$0$shl52$i;$t$0$i = $42;$v$0$i = $v$1$i; + } + } + } + } while(0); + if ((label|0) == 57) { + $cmp55$i162 = ($t$2$i|0)==(0|0); + $cmp57$i163 = ($v$3$i|0)==(0|0); + $or$cond$i164 = $cmp55$i162 & $cmp57$i163; + if ($or$cond$i164) { + $shl60$i = 2 << $idx$0$i; + $sub63$i = (0 - ($shl60$i))|0; + $or$i165 = $shl60$i | $sub63$i; + $and64$i = $38 & $or$i165; + $cmp65$i = ($and64$i|0)==(0); + if ($cmp65$i) { + $nb$0 = $and145; + break; + } + $sub67$i = (0 - ($and64$i))|0; + $and68$i = $and64$i & $sub67$i; + $sub70$i = (($and68$i) + -1)|0; + $shr72$i = $sub70$i >>> 12; + $and73$i = $shr72$i & 16; + $shr75$i = $sub70$i >>> $and73$i; + $shr76$i = $shr75$i >>> 5; + $and77$i = $shr76$i & 8; + $add78$i = $and77$i | $and73$i; + $shr79$i = $shr75$i >>> $and77$i; + $shr80$i = $shr79$i >>> 2; + $and81$i = $shr80$i & 4; + $add82$i = $add78$i | $and81$i; + $shr83$i = $shr79$i >>> $and81$i; + $shr84$i = $shr83$i >>> 1; + $and85$i = $shr84$i & 2; + $add86$i = $add82$i | $and85$i; + $shr87$i = $shr83$i >>> $and85$i; + $shr88$i = $shr87$i >>> 1; + $and89$i = $shr88$i & 1; + $add90$i = $add86$i | $and89$i; + $shr91$i = $shr87$i >>> $and89$i; + $add92$i = (($add90$i) + ($shr91$i))|0; + $arrayidx94$i166 = (440 + ($add92$i<<2)|0); + $43 = HEAP32[$arrayidx94$i166>>2]|0; + $t$4$ph$i = $43;$v$4$ph$i = 0; + } else { + $t$4$ph$i = $t$2$i;$v$4$ph$i = $v$3$i; + } + $cmp976$i = ($t$4$ph$i|0)==(0|0); + if ($cmp976$i) { + $rsize$4$lcssa$i = $rsize$3$i;$v$4$lcssa$i = $v$4$ph$i; + } else { + $rsize$48$i = $rsize$3$i;$t$47$i = $t$4$ph$i;$v$49$i = $v$4$ph$i; + label = 61; + } + } + if ((label|0) == 61) { + while(1) { + label = 0; + $head99$i = ((($t$47$i)) + 4|0); + $44 = HEAP32[$head99$i>>2]|0; + $and100$i = $44 & -8; + $sub101$i = (($and100$i) - ($and145))|0; + $cmp102$i = ($sub101$i>>>0)<($rsize$48$i>>>0); + $sub101$rsize$4$i = $cmp102$i ? $sub101$i : $rsize$48$i; + $t$4$v$4$i = $cmp102$i ? $t$47$i : $v$49$i; + $arrayidx106$i = ((($t$47$i)) + 16|0); + $45 = HEAP32[$arrayidx106$i>>2]|0; + $cmp107$i = ($45|0)==(0|0); + $$sink$i167 = $cmp107$i&1; + $arrayidx113$i168 = (((($t$47$i)) + 16|0) + ($$sink$i167<<2)|0); + $46 = HEAP32[$arrayidx113$i168>>2]|0; + $cmp97$i = ($46|0)==(0|0); + if ($cmp97$i) { + $rsize$4$lcssa$i = $sub101$rsize$4$i;$v$4$lcssa$i = $t$4$v$4$i; + break; + } else { + $rsize$48$i = $sub101$rsize$4$i;$t$47$i = $46;$v$49$i = $t$4$v$4$i; + label = 61; + } + } + } + $cmp116$i = ($v$4$lcssa$i|0)==(0|0); + if ($cmp116$i) { + $nb$0 = $and145; + } else { + $47 = HEAP32[(144)>>2]|0; + $sub118$i = (($47) - ($and145))|0; + $cmp119$i = ($rsize$4$lcssa$i>>>0)<($sub118$i>>>0); + if ($cmp119$i) { + $add$ptr$i170 = (($v$4$lcssa$i) + ($and145)|0); + $cmp123$i = ($add$ptr$i170>>>0)>($v$4$lcssa$i>>>0); + if (!($cmp123$i)) { + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); + } + $parent$i171 = ((($v$4$lcssa$i)) + 24|0); + $48 = HEAP32[$parent$i171>>2]|0; + $bk$i172 = ((($v$4$lcssa$i)) + 12|0); + $49 = HEAP32[$bk$i172>>2]|0; + $cmp128$i = ($49|0)==($v$4$lcssa$i|0); + do { + if ($cmp128$i) { + $arrayidx151$i = ((($v$4$lcssa$i)) + 20|0); + $51 = HEAP32[$arrayidx151$i>>2]|0; + $cmp152$i = ($51|0)==(0|0); + if ($cmp152$i) { + $arrayidx155$i = ((($v$4$lcssa$i)) + 16|0); + $52 = HEAP32[$arrayidx155$i>>2]|0; + $cmp156$i = ($52|0)==(0|0); + if ($cmp156$i) { + $R$3$i180 = 0; + break; + } else { + $R$1$i176 = $52;$RP$1$i175 = $arrayidx155$i; + } + } else { + $R$1$i176 = $51;$RP$1$i175 = $arrayidx151$i; + } + while(1) { + $arrayidx161$i = ((($R$1$i176)) + 20|0); + $53 = HEAP32[$arrayidx161$i>>2]|0; + $cmp162$i177 = ($53|0)==(0|0); + if (!($cmp162$i177)) { + $R$1$i176 = $53;$RP$1$i175 = $arrayidx161$i; + continue; + } + $arrayidx165$i178 = ((($R$1$i176)) + 16|0); + $54 = HEAP32[$arrayidx165$i178>>2]|0; + $cmp166$i = ($54|0)==(0|0); + if ($cmp166$i) { + break; + } else { + $R$1$i176 = $54;$RP$1$i175 = $arrayidx165$i178; + } + } + HEAP32[$RP$1$i175>>2] = 0; + $R$3$i180 = $R$1$i176; + } else { + $fd$i173 = ((($v$4$lcssa$i)) + 8|0); + $50 = HEAP32[$fd$i173>>2]|0; + $bk145$i = ((($50)) + 12|0); + HEAP32[$bk145$i>>2] = $49; + $fd146$i = ((($49)) + 8|0); + HEAP32[$fd146$i>>2] = $50; + $R$3$i180 = $49; + } + } while(0); + $cmp180$i = ($48|0)==(0|0); + do { + if ($cmp180$i) { + $64 = $38; + } else { + $index$i181 = ((($v$4$lcssa$i)) + 28|0); + $55 = HEAP32[$index$i181>>2]|0; + $arrayidx184$i = (440 + ($55<<2)|0); + $56 = HEAP32[$arrayidx184$i>>2]|0; + $cmp185$i = ($v$4$lcssa$i|0)==($56|0); + if ($cmp185$i) { + HEAP32[$arrayidx184$i>>2] = $R$3$i180; + $cond2$i = ($R$3$i180|0)==(0|0); + if ($cond2$i) { + $shl192$i = 1 << $55; + $neg$i182 = $shl192$i ^ -1; + $and194$i183 = $38 & $neg$i182; + HEAP32[(140)>>2] = $and194$i183; + $64 = $and194$i183; + break; + } + } else { + $arrayidx204$i = ((($48)) + 16|0); + $57 = HEAP32[$arrayidx204$i>>2]|0; + $cmp205$i = ($57|0)!=($v$4$lcssa$i|0); + $$sink2$i184 = $cmp205$i&1; + $arrayidx212$i = (((($48)) + 16|0) + ($$sink2$i184<<2)|0); + HEAP32[$arrayidx212$i>>2] = $R$3$i180; + $cmp217$i = ($R$3$i180|0)==(0|0); + if ($cmp217$i) { + $64 = $38; + break; + } + } + $parent226$i = ((($R$3$i180)) + 24|0); + HEAP32[$parent226$i>>2] = $48; + $arrayidx228$i = ((($v$4$lcssa$i)) + 16|0); + $58 = HEAP32[$arrayidx228$i>>2]|0; + $cmp229$i = ($58|0)==(0|0); + if (!($cmp229$i)) { + $arrayidx239$i = ((($R$3$i180)) + 16|0); + HEAP32[$arrayidx239$i>>2] = $58; + $parent240$i = ((($58)) + 24|0); + HEAP32[$parent240$i>>2] = $R$3$i180; + } + $arrayidx245$i = ((($v$4$lcssa$i)) + 20|0); + $59 = HEAP32[$arrayidx245$i>>2]|0; + $cmp246$i = ($59|0)==(0|0); + if ($cmp246$i) { + $64 = $38; + } else { + $arrayidx256$i = ((($R$3$i180)) + 20|0); + HEAP32[$arrayidx256$i>>2] = $59; + $parent257$i = ((($59)) + 24|0); + HEAP32[$parent257$i>>2] = $R$3$i180; + $64 = $38; + } + } + } while(0); + $cmp265$i = ($rsize$4$lcssa$i>>>0)<(16); + do { + if ($cmp265$i) { + $add268$i = (($rsize$4$lcssa$i) + ($and145))|0; + $or270$i = $add268$i | 3; + $head271$i = ((($v$4$lcssa$i)) + 4|0); + HEAP32[$head271$i>>2] = $or270$i; + $add$ptr273$i = (($v$4$lcssa$i) + ($add268$i)|0); + $head274$i = ((($add$ptr273$i)) + 4|0); + $60 = HEAP32[$head274$i>>2]|0; + $or275$i = $60 | 1; + HEAP32[$head274$i>>2] = $or275$i; + } else { + $or278$i = $and145 | 3; + $head279$i = ((($v$4$lcssa$i)) + 4|0); + HEAP32[$head279$i>>2] = $or278$i; + $or280$i = $rsize$4$lcssa$i | 1; + $head281$i = ((($add$ptr$i170)) + 4|0); + HEAP32[$head281$i>>2] = $or280$i; + $add$ptr282$i = (($add$ptr$i170) + ($rsize$4$lcssa$i)|0); + HEAP32[$add$ptr282$i>>2] = $rsize$4$lcssa$i; + $shr283$i = $rsize$4$lcssa$i >>> 3; + $cmp284$i = ($rsize$4$lcssa$i>>>0)<(256); + if ($cmp284$i) { + $shl288$i = $shr283$i << 1; + $arrayidx289$i = (176 + ($shl288$i<<2)|0); + $61 = HEAP32[34]|0; + $shl291$i = 1 << $shr283$i; + $and292$i = $61 & $shl291$i; + $tobool293$i = ($and292$i|0)==(0); + if ($tobool293$i) { + $or297$i = $61 | $shl291$i; + HEAP32[34] = $or297$i; + $$pre$i187 = ((($arrayidx289$i)) + 8|0); + $$pre$phi$i188Z2D = $$pre$i187;$F290$0$i = $arrayidx289$i; + } else { + $62 = ((($arrayidx289$i)) + 8|0); + $63 = HEAP32[$62>>2]|0; + $$pre$phi$i188Z2D = $62;$F290$0$i = $63; + } + HEAP32[$$pre$phi$i188Z2D>>2] = $add$ptr$i170; + $bk311$i = ((($F290$0$i)) + 12|0); + HEAP32[$bk311$i>>2] = $add$ptr$i170; + $fd312$i = ((($add$ptr$i170)) + 8|0); + HEAP32[$fd312$i>>2] = $F290$0$i; + $bk313$i = ((($add$ptr$i170)) + 12|0); + HEAP32[$bk313$i>>2] = $arrayidx289$i; + break; + } + $shr318$i = $rsize$4$lcssa$i >>> 8; + $cmp319$i = ($shr318$i|0)==(0); + if ($cmp319$i) { + $I316$0$i = 0; + } else { + $cmp323$i = ($rsize$4$lcssa$i>>>0)>(16777215); + if ($cmp323$i) { + $I316$0$i = 31; + } else { + $sub329$i = (($shr318$i) + 1048320)|0; + $shr330$i = $sub329$i >>> 16; + $and331$i = $shr330$i & 8; + $shl333$i = $shr318$i << $and331$i; + $sub334$i = (($shl333$i) + 520192)|0; + $shr335$i = $sub334$i >>> 16; + $and336$i = $shr335$i & 4; + $add337$i = $and336$i | $and331$i; + $shl338$i = $shl333$i << $and336$i; + $sub339$i = (($shl338$i) + 245760)|0; + $shr340$i = $sub339$i >>> 16; + $and341$i = $shr340$i & 2; + $add342$i = $add337$i | $and341$i; + $sub343$i = (14 - ($add342$i))|0; + $shl344$i = $shl338$i << $and341$i; + $shr345$i = $shl344$i >>> 15; + $add346$i = (($sub343$i) + ($shr345$i))|0; + $shl347$i = $add346$i << 1; + $add348$i = (($add346$i) + 7)|0; + $shr349$i = $rsize$4$lcssa$i >>> $add348$i; + $and350$i = $shr349$i & 1; + $add351$i = $and350$i | $shl347$i; + $I316$0$i = $add351$i; + } + } + $arrayidx355$i = (440 + ($I316$0$i<<2)|0); + $index356$i = ((($add$ptr$i170)) + 28|0); + HEAP32[$index356$i>>2] = $I316$0$i; + $child357$i = ((($add$ptr$i170)) + 16|0); + $arrayidx358$i = ((($child357$i)) + 4|0); + HEAP32[$arrayidx358$i>>2] = 0; + HEAP32[$child357$i>>2] = 0; + $shl362$i = 1 << $I316$0$i; + $and363$i = $64 & $shl362$i; + $tobool364$i = ($and363$i|0)==(0); + if ($tobool364$i) { + $or368$i = $64 | $shl362$i; + HEAP32[(140)>>2] = $or368$i; + HEAP32[$arrayidx355$i>>2] = $add$ptr$i170; + $parent369$i = ((($add$ptr$i170)) + 24|0); + HEAP32[$parent369$i>>2] = $arrayidx355$i; + $bk370$i = ((($add$ptr$i170)) + 12|0); + HEAP32[$bk370$i>>2] = $add$ptr$i170; + $fd371$i = ((($add$ptr$i170)) + 8|0); + HEAP32[$fd371$i>>2] = $add$ptr$i170; + break; + } + $65 = HEAP32[$arrayidx355$i>>2]|0; + $cmp374$i = ($I316$0$i|0)==(31); + $shr378$i = $I316$0$i >>> 1; + $sub381$i = (25 - ($shr378$i))|0; + $cond383$i = $cmp374$i ? 0 : $sub381$i; + $shl384$i = $rsize$4$lcssa$i << $cond383$i; + $K373$0$i = $shl384$i;$T$0$i = $65; + while(1) { + $head386$i = ((($T$0$i)) + 4|0); + $66 = HEAP32[$head386$i>>2]|0; + $and387$i = $66 & -8; + $cmp388$i = ($and387$i|0)==($rsize$4$lcssa$i|0); + if ($cmp388$i) { + label = 97; + break; + } + $shr392$i = $K373$0$i >>> 31; + $arrayidx394$i = (((($T$0$i)) + 16|0) + ($shr392$i<<2)|0); + $shl395$i = $K373$0$i << 1; + $67 = HEAP32[$arrayidx394$i>>2]|0; + $cmp396$i = ($67|0)==(0|0); + if ($cmp396$i) { + label = 96; + break; + } else { + $K373$0$i = $shl395$i;$T$0$i = $67; + } + } + if ((label|0) == 96) { + HEAP32[$arrayidx394$i>>2] = $add$ptr$i170; + $parent406$i = ((($add$ptr$i170)) + 24|0); + HEAP32[$parent406$i>>2] = $T$0$i; + $bk407$i = ((($add$ptr$i170)) + 12|0); + HEAP32[$bk407$i>>2] = $add$ptr$i170; + $fd408$i = ((($add$ptr$i170)) + 8|0); + HEAP32[$fd408$i>>2] = $add$ptr$i170; + break; + } + else if ((label|0) == 97) { + $fd416$i = ((($T$0$i)) + 8|0); + $68 = HEAP32[$fd416$i>>2]|0; + $bk429$i = ((($68)) + 12|0); + HEAP32[$bk429$i>>2] = $add$ptr$i170; + HEAP32[$fd416$i>>2] = $add$ptr$i170; + $fd431$i = ((($add$ptr$i170)) + 8|0); + HEAP32[$fd431$i>>2] = $68; + $bk432$i = ((($add$ptr$i170)) + 12|0); + HEAP32[$bk432$i>>2] = $T$0$i; + $parent433$i = ((($add$ptr$i170)) + 24|0); + HEAP32[$parent433$i>>2] = 0; + break; + } + } + } while(0); + $add$ptr441$i = ((($v$4$lcssa$i)) + 8|0); + $retval$0 = $add$ptr441$i; + STACKTOP = sp;return ($retval$0|0); + } else { + $nb$0 = $and145; + } + } + } + } + } + } while(0); + $69 = HEAP32[(144)>>2]|0; + $cmp156 = ($69>>>0)<($nb$0>>>0); + if (!($cmp156)) { + $sub160 = (($69) - ($nb$0))|0; + $70 = HEAP32[(156)>>2]|0; + $cmp162 = ($sub160>>>0)>(15); + if ($cmp162) { + $add$ptr166 = (($70) + ($nb$0)|0); + HEAP32[(156)>>2] = $add$ptr166; + HEAP32[(144)>>2] = $sub160; + $or167 = $sub160 | 1; + $head168 = ((($add$ptr166)) + 4|0); + HEAP32[$head168>>2] = $or167; + $add$ptr169 = (($70) + ($69)|0); + HEAP32[$add$ptr169>>2] = $sub160; + $or172 = $nb$0 | 3; + $head173 = ((($70)) + 4|0); + HEAP32[$head173>>2] = $or172; + } else { + HEAP32[(144)>>2] = 0; + HEAP32[(156)>>2] = 0; + $or176 = $69 | 3; + $head177 = ((($70)) + 4|0); + HEAP32[$head177>>2] = $or176; + $add$ptr178 = (($70) + ($69)|0); + $head179 = ((($add$ptr178)) + 4|0); + $71 = HEAP32[$head179>>2]|0; + $or180 = $71 | 1; + HEAP32[$head179>>2] = $or180; + } + $add$ptr182 = ((($70)) + 8|0); + $retval$0 = $add$ptr182; + STACKTOP = sp;return ($retval$0|0); + } + $72 = HEAP32[(148)>>2]|0; + $cmp186 = ($72>>>0)>($nb$0>>>0); + if ($cmp186) { + $sub190 = (($72) - ($nb$0))|0; + HEAP32[(148)>>2] = $sub190; + $73 = HEAP32[(160)>>2]|0; + $add$ptr193 = (($73) + ($nb$0)|0); + HEAP32[(160)>>2] = $add$ptr193; + $or194 = $sub190 | 1; + $head195 = ((($add$ptr193)) + 4|0); + HEAP32[$head195>>2] = $or194; + $or197 = $nb$0 | 3; + $head198 = ((($73)) + 4|0); + HEAP32[$head198>>2] = $or197; + $add$ptr199 = ((($73)) + 8|0); + $retval$0 = $add$ptr199; + STACKTOP = sp;return ($retval$0|0); + } + $74 = HEAP32[152]|0; + $cmp$i133 = ($74|0)==(0); + if ($cmp$i133) { + HEAP32[(616)>>2] = 4096; + HEAP32[(612)>>2] = 4096; + HEAP32[(620)>>2] = -1; + HEAP32[(624)>>2] = -1; + HEAP32[(628)>>2] = 0; + HEAP32[(580)>>2] = 0; + $75 = $magic$i$i; + $xor$i$i = $75 & -16; + $and6$i$i = $xor$i$i ^ 1431655768; + HEAP32[152] = $and6$i$i; + $76 = 4096; + } else { + $$pre$i134 = HEAP32[(616)>>2]|0; + $76 = $$pre$i134; + } + $add$i135 = (($nb$0) + 48)|0; + $sub$i136 = (($nb$0) + 47)|0; + $add9$i = (($76) + ($sub$i136))|0; + $neg$i137 = (0 - ($76))|0; + $and11$i = $add9$i & $neg$i137; + $cmp12$i = ($and11$i>>>0)>($nb$0>>>0); + if (!($cmp12$i)) { + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); + } + $77 = HEAP32[(576)>>2]|0; + $cmp15$i = ($77|0)==(0); + if (!($cmp15$i)) { + $78 = HEAP32[(568)>>2]|0; + $add17$i = (($78) + ($and11$i))|0; + $cmp19$i = ($add17$i>>>0)<=($78>>>0); + $cmp21$i = ($add17$i>>>0)>($77>>>0); + $or$cond1$i = $cmp19$i | $cmp21$i; + if ($or$cond1$i) { + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); + } + } + $79 = HEAP32[(580)>>2]|0; + $and29$i = $79 & 4; + $tobool30$i = ($and29$i|0)==(0); + L167: do { + if ($tobool30$i) { + $80 = HEAP32[(160)>>2]|0; + $cmp32$i138 = ($80|0)==(0|0); + L169: do { + if ($cmp32$i138) { + label = 118; + } else { + $sp$0$i$i = (584); + while(1) { + $81 = HEAP32[$sp$0$i$i>>2]|0; + $cmp$i52$i = ($81>>>0)>($80>>>0); + if (!($cmp$i52$i)) { + $size$i$i = ((($sp$0$i$i)) + 4|0); + $82 = HEAP32[$size$i$i>>2]|0; + $add$ptr$i54$i = (($81) + ($82)|0); + $cmp2$i$i = ($add$ptr$i54$i>>>0)>($80>>>0); + if ($cmp2$i$i) { + break; + } + } + $next$i$i = ((($sp$0$i$i)) + 8|0); + $83 = HEAP32[$next$i$i>>2]|0; + $cmp3$i$i = ($83|0)==(0|0); + if ($cmp3$i$i) { + label = 118; + break L169; + } else { + $sp$0$i$i = $83; + } + } + $add77$i = (($add9$i) - ($72))|0; + $and80$i = $add77$i & $neg$i137; + $cmp81$i = ($and80$i>>>0)<(2147483647); + if ($cmp81$i) { + $call83$i = (_sbrk(($and80$i|0))|0); + $88 = HEAP32[$sp$0$i$i>>2]|0; + $89 = HEAP32[$size$i$i>>2]|0; + $add$ptr$i141 = (($88) + ($89)|0); + $cmp85$i = ($call83$i|0)==($add$ptr$i141|0); + if ($cmp85$i) { + $cmp89$i = ($call83$i|0)==((-1)|0); + if ($cmp89$i) { + $tsize$2617179$i = $and80$i; + } else { + $tbase$792$i = $call83$i;$tsize$791$i = $and80$i; + label = 135; + break L167; + } + } else { + $br$2$ph$i = $call83$i;$ssize$2$ph$i = $and80$i; + label = 126; + } + } else { + $tsize$2617179$i = 0; + } + } + } while(0); + do { + if ((label|0) == 118) { + $call37$i = (_sbrk(0)|0); + $cmp38$i = ($call37$i|0)==((-1)|0); + if ($cmp38$i) { + $tsize$2617179$i = 0; + } else { + $84 = $call37$i; + $85 = HEAP32[(612)>>2]|0; + $sub41$i = (($85) + -1)|0; + $and42$i = $sub41$i & $84; + $cmp43$i = ($and42$i|0)==(0); + $add46$i = (($sub41$i) + ($84))|0; + $neg48$i = (0 - ($85))|0; + $and49$i = $add46$i & $neg48$i; + $sub50$i = (($and49$i) - ($84))|0; + $add51$i = $cmp43$i ? 0 : $sub50$i; + $and11$add51$i = (($add51$i) + ($and11$i))|0; + $86 = HEAP32[(568)>>2]|0; + $add54$i = (($and11$add51$i) + ($86))|0; + $cmp55$i = ($and11$add51$i>>>0)>($nb$0>>>0); + $cmp57$i = ($and11$add51$i>>>0)<(2147483647); + $or$cond$i = $cmp55$i & $cmp57$i; + if ($or$cond$i) { + $87 = HEAP32[(576)>>2]|0; + $cmp60$i = ($87|0)==(0); + if (!($cmp60$i)) { + $cmp63$i = ($add54$i>>>0)<=($86>>>0); + $cmp66$i140 = ($add54$i>>>0)>($87>>>0); + $or$cond2$i = $cmp63$i | $cmp66$i140; + if ($or$cond2$i) { + $tsize$2617179$i = 0; + break; + } + } + $call68$i = (_sbrk(($and11$add51$i|0))|0); + $cmp69$i = ($call68$i|0)==($call37$i|0); + if ($cmp69$i) { + $tbase$792$i = $call37$i;$tsize$791$i = $and11$add51$i; + label = 135; + break L167; + } else { + $br$2$ph$i = $call68$i;$ssize$2$ph$i = $and11$add51$i; + label = 126; + } + } else { + $tsize$2617179$i = 0; + } + } + } + } while(0); + do { + if ((label|0) == 126) { + $sub112$i = (0 - ($ssize$2$ph$i))|0; + $cmp91$i = ($br$2$ph$i|0)!=((-1)|0); + $cmp93$i = ($ssize$2$ph$i>>>0)<(2147483647); + $or$cond5$i = $cmp93$i & $cmp91$i; + $cmp96$i = ($add$i135>>>0)>($ssize$2$ph$i>>>0); + $or$cond3$i = $cmp96$i & $or$cond5$i; + if (!($or$cond3$i)) { + $cmp118$i = ($br$2$ph$i|0)==((-1)|0); + if ($cmp118$i) { + $tsize$2617179$i = 0; + break; + } else { + $tbase$792$i = $br$2$ph$i;$tsize$791$i = $ssize$2$ph$i; + label = 135; + break L167; + } + } + $90 = HEAP32[(616)>>2]|0; + $sub99$i = (($sub$i136) - ($ssize$2$ph$i))|0; + $add101$i = (($sub99$i) + ($90))|0; + $neg103$i = (0 - ($90))|0; + $and104$i = $add101$i & $neg103$i; + $cmp105$i = ($and104$i>>>0)<(2147483647); + if (!($cmp105$i)) { + $tbase$792$i = $br$2$ph$i;$tsize$791$i = $ssize$2$ph$i; + label = 135; + break L167; + } + $call107$i = (_sbrk(($and104$i|0))|0); + $cmp108$i = ($call107$i|0)==((-1)|0); + if ($cmp108$i) { + (_sbrk(($sub112$i|0))|0); + $tsize$2617179$i = 0; + break; + } else { + $add110$i = (($and104$i) + ($ssize$2$ph$i))|0; + $tbase$792$i = $br$2$ph$i;$tsize$791$i = $add110$i; + label = 135; + break L167; + } + } + } while(0); + $91 = HEAP32[(580)>>2]|0; + $or$i = $91 | 4; + HEAP32[(580)>>2] = $or$i; + $tsize$4$i = $tsize$2617179$i; + label = 133; + } else { + $tsize$4$i = 0; + label = 133; + } + } while(0); + if ((label|0) == 133) { + $cmp127$i = ($and11$i>>>0)<(2147483647); + if ($cmp127$i) { + $call131$i = (_sbrk(($and11$i|0))|0); + $call132$i = (_sbrk(0)|0); + $cmp133$i = ($call131$i|0)!=((-1)|0); + $cmp135$i = ($call132$i|0)!=((-1)|0); + $or$cond4$i = $cmp133$i & $cmp135$i; + $cmp137$i = ($call131$i>>>0)<($call132$i>>>0); + $or$cond7$i = $cmp137$i & $or$cond4$i; + $sub$ptr$lhs$cast$i = $call132$i; + $sub$ptr$rhs$cast$i = $call131$i; + $sub$ptr$sub$i = (($sub$ptr$lhs$cast$i) - ($sub$ptr$rhs$cast$i))|0; + $add140$i = (($nb$0) + 40)|0; + $cmp141$i = ($sub$ptr$sub$i>>>0)>($add140$i>>>0); + $sub$ptr$sub$tsize$4$i = $cmp141$i ? $sub$ptr$sub$i : $tsize$4$i; + $or$cond7$not$i = $or$cond7$i ^ 1; + $cmp14795$i = ($call131$i|0)==((-1)|0); + $not$cmp141$i = $cmp141$i ^ 1; + $cmp147$i = $cmp14795$i | $not$cmp141$i; + $or$cond93$i = $cmp147$i | $or$cond7$not$i; + if (!($or$cond93$i)) { + $tbase$792$i = $call131$i;$tsize$791$i = $sub$ptr$sub$tsize$4$i; + label = 135; + } + } + } + if ((label|0) == 135) { + $92 = HEAP32[(568)>>2]|0; + $add150$i = (($92) + ($tsize$791$i))|0; + HEAP32[(568)>>2] = $add150$i; + $93 = HEAP32[(572)>>2]|0; + $cmp151$i = ($add150$i>>>0)>($93>>>0); + if ($cmp151$i) { + HEAP32[(572)>>2] = $add150$i; + } + $94 = HEAP32[(160)>>2]|0; + $cmp157$i = ($94|0)==(0|0); + do { + if ($cmp157$i) { + $95 = HEAP32[(152)>>2]|0; + $cmp159$i = ($95|0)==(0|0); + $cmp162$i = ($tbase$792$i>>>0)<($95>>>0); + $or$cond8$i = $cmp159$i | $cmp162$i; + if ($or$cond8$i) { + HEAP32[(152)>>2] = $tbase$792$i; + } + HEAP32[(584)>>2] = $tbase$792$i; + HEAP32[(588)>>2] = $tsize$791$i; + HEAP32[(596)>>2] = 0; + $96 = HEAP32[152]|0; + HEAP32[(172)>>2] = $96; + HEAP32[(168)>>2] = -1; + HEAP32[(188)>>2] = (176); + HEAP32[(184)>>2] = (176); + HEAP32[(196)>>2] = (184); + HEAP32[(192)>>2] = (184); + HEAP32[(204)>>2] = (192); + HEAP32[(200)>>2] = (192); + HEAP32[(212)>>2] = (200); + HEAP32[(208)>>2] = (200); + HEAP32[(220)>>2] = (208); + HEAP32[(216)>>2] = (208); + HEAP32[(228)>>2] = (216); + HEAP32[(224)>>2] = (216); + HEAP32[(236)>>2] = (224); + HEAP32[(232)>>2] = (224); + HEAP32[(244)>>2] = (232); + HEAP32[(240)>>2] = (232); + HEAP32[(252)>>2] = (240); + HEAP32[(248)>>2] = (240); + HEAP32[(260)>>2] = (248); + HEAP32[(256)>>2] = (248); + HEAP32[(268)>>2] = (256); + HEAP32[(264)>>2] = (256); + HEAP32[(276)>>2] = (264); + HEAP32[(272)>>2] = (264); + HEAP32[(284)>>2] = (272); + HEAP32[(280)>>2] = (272); + HEAP32[(292)>>2] = (280); + HEAP32[(288)>>2] = (280); + HEAP32[(300)>>2] = (288); + HEAP32[(296)>>2] = (288); + HEAP32[(308)>>2] = (296); + HEAP32[(304)>>2] = (296); + HEAP32[(316)>>2] = (304); + HEAP32[(312)>>2] = (304); + HEAP32[(324)>>2] = (312); + HEAP32[(320)>>2] = (312); + HEAP32[(332)>>2] = (320); + HEAP32[(328)>>2] = (320); + HEAP32[(340)>>2] = (328); + HEAP32[(336)>>2] = (328); + HEAP32[(348)>>2] = (336); + HEAP32[(344)>>2] = (336); + HEAP32[(356)>>2] = (344); + HEAP32[(352)>>2] = (344); + HEAP32[(364)>>2] = (352); + HEAP32[(360)>>2] = (352); + HEAP32[(372)>>2] = (360); + HEAP32[(368)>>2] = (360); + HEAP32[(380)>>2] = (368); + HEAP32[(376)>>2] = (368); + HEAP32[(388)>>2] = (376); + HEAP32[(384)>>2] = (376); + HEAP32[(396)>>2] = (384); + HEAP32[(392)>>2] = (384); + HEAP32[(404)>>2] = (392); + HEAP32[(400)>>2] = (392); + HEAP32[(412)>>2] = (400); + HEAP32[(408)>>2] = (400); + HEAP32[(420)>>2] = (408); + HEAP32[(416)>>2] = (408); + HEAP32[(428)>>2] = (416); + HEAP32[(424)>>2] = (416); + HEAP32[(436)>>2] = (424); + HEAP32[(432)>>2] = (424); + $sub172$i = (($tsize$791$i) + -40)|0; + $add$ptr$i40$i = ((($tbase$792$i)) + 8|0); + $97 = $add$ptr$i40$i; + $and$i41$i = $97 & 7; + $cmp$i42$i = ($and$i41$i|0)==(0); + $sub$i43$i = (0 - ($97))|0; + $and3$i44$i = $sub$i43$i & 7; + $cond$i45$i = $cmp$i42$i ? 0 : $and3$i44$i; + $add$ptr4$i46$i = (($tbase$792$i) + ($cond$i45$i)|0); + $sub5$i47$i = (($sub172$i) - ($cond$i45$i))|0; + HEAP32[(160)>>2] = $add$ptr4$i46$i; + HEAP32[(148)>>2] = $sub5$i47$i; + $or$i48$i = $sub5$i47$i | 1; + $head$i49$i = ((($add$ptr4$i46$i)) + 4|0); + HEAP32[$head$i49$i>>2] = $or$i48$i; + $add$ptr6$i50$i = (($tbase$792$i) + ($sub172$i)|0); + $head7$i51$i = ((($add$ptr6$i50$i)) + 4|0); + HEAP32[$head7$i51$i>>2] = 40; + $98 = HEAP32[(624)>>2]|0; + HEAP32[(164)>>2] = $98; + } else { + $sp$0104$i = (584); + while(1) { + $99 = HEAP32[$sp$0104$i>>2]|0; + $size188$i = ((($sp$0104$i)) + 4|0); + $100 = HEAP32[$size188$i>>2]|0; + $add$ptr189$i = (($99) + ($100)|0); + $cmp190$i = ($tbase$792$i|0)==($add$ptr189$i|0); + if ($cmp190$i) { + label = 143; + break; + } + $next$i = ((($sp$0104$i)) + 8|0); + $101 = HEAP32[$next$i>>2]|0; + $cmp186$i = ($101|0)==(0|0); + if ($cmp186$i) { + break; + } else { + $sp$0104$i = $101; + } + } + if ((label|0) == 143) { + $sflags193$i = ((($sp$0104$i)) + 12|0); + $102 = HEAP32[$sflags193$i>>2]|0; + $and194$i = $102 & 8; + $tobool195$i = ($and194$i|0)==(0); + if ($tobool195$i) { + $cmp203$i = ($99>>>0)<=($94>>>0); + $cmp209$i = ($tbase$792$i>>>0)>($94>>>0); + $or$cond94$i = $cmp209$i & $cmp203$i; + if ($or$cond94$i) { + $add212$i = (($100) + ($tsize$791$i))|0; + HEAP32[$size188$i>>2] = $add212$i; + $103 = HEAP32[(148)>>2]|0; + $add215$i = (($103) + ($tsize$791$i))|0; + $add$ptr$i32$i = ((($94)) + 8|0); + $104 = $add$ptr$i32$i; + $and$i33$i = $104 & 7; + $cmp$i34$i = ($and$i33$i|0)==(0); + $sub$i35$i = (0 - ($104))|0; + $and3$i36$i = $sub$i35$i & 7; + $cond$i37$i = $cmp$i34$i ? 0 : $and3$i36$i; + $add$ptr4$i38$i = (($94) + ($cond$i37$i)|0); + $sub5$i$i = (($add215$i) - ($cond$i37$i))|0; + HEAP32[(160)>>2] = $add$ptr4$i38$i; + HEAP32[(148)>>2] = $sub5$i$i; + $or$i$i = $sub5$i$i | 1; + $head$i39$i = ((($add$ptr4$i38$i)) + 4|0); + HEAP32[$head$i39$i>>2] = $or$i$i; + $add$ptr6$i$i = (($94) + ($add215$i)|0); + $head7$i$i = ((($add$ptr6$i$i)) + 4|0); + HEAP32[$head7$i$i>>2] = 40; + $105 = HEAP32[(624)>>2]|0; + HEAP32[(164)>>2] = $105; + break; + } + } + } + $106 = HEAP32[(152)>>2]|0; + $cmp218$i = ($tbase$792$i>>>0)<($106>>>0); + if ($cmp218$i) { + HEAP32[(152)>>2] = $tbase$792$i; + } + $add$ptr227$i = (($tbase$792$i) + ($tsize$791$i)|0); + $sp$1103$i = (584); + while(1) { + $107 = HEAP32[$sp$1103$i>>2]|0; + $cmp228$i = ($107|0)==($add$ptr227$i|0); + if ($cmp228$i) { + label = 151; + break; + } + $next231$i = ((($sp$1103$i)) + 8|0); + $108 = HEAP32[$next231$i>>2]|0; + $cmp224$i = ($108|0)==(0|0); + if ($cmp224$i) { + $sp$0$i$i$i = (584); + break; + } else { + $sp$1103$i = $108; + } + } + if ((label|0) == 151) { + $sflags235$i = ((($sp$1103$i)) + 12|0); + $109 = HEAP32[$sflags235$i>>2]|0; + $and236$i = $109 & 8; + $tobool237$i = ($and236$i|0)==(0); + if ($tobool237$i) { + HEAP32[$sp$1103$i>>2] = $tbase$792$i; + $size245$i = ((($sp$1103$i)) + 4|0); + $110 = HEAP32[$size245$i>>2]|0; + $add246$i = (($110) + ($tsize$791$i))|0; + HEAP32[$size245$i>>2] = $add246$i; + $add$ptr$i$i = ((($tbase$792$i)) + 8|0); + $111 = $add$ptr$i$i; + $and$i11$i = $111 & 7; + $cmp$i12$i = ($and$i11$i|0)==(0); + $sub$i13$i = (0 - ($111))|0; + $and3$i$i = $sub$i13$i & 7; + $cond$i14$i = $cmp$i12$i ? 0 : $and3$i$i; + $add$ptr4$i$i = (($tbase$792$i) + ($cond$i14$i)|0); + $add$ptr5$i$i = ((($add$ptr227$i)) + 8|0); + $112 = $add$ptr5$i$i; + $and6$i15$i = $112 & 7; + $cmp7$i$i = ($and6$i15$i|0)==(0); + $sub12$i$i = (0 - ($112))|0; + $and13$i$i = $sub12$i$i & 7; + $cond15$i$i = $cmp7$i$i ? 0 : $and13$i$i; + $add$ptr16$i$i = (($add$ptr227$i) + ($cond15$i$i)|0); + $sub$ptr$lhs$cast$i16$i = $add$ptr16$i$i; + $sub$ptr$rhs$cast$i17$i = $add$ptr4$i$i; + $sub$ptr$sub$i18$i = (($sub$ptr$lhs$cast$i16$i) - ($sub$ptr$rhs$cast$i17$i))|0; + $add$ptr17$i$i = (($add$ptr4$i$i) + ($nb$0)|0); + $sub18$i$i = (($sub$ptr$sub$i18$i) - ($nb$0))|0; + $or19$i$i = $nb$0 | 3; + $head$i19$i = ((($add$ptr4$i$i)) + 4|0); + HEAP32[$head$i19$i>>2] = $or19$i$i; + $cmp20$i$i = ($94|0)==($add$ptr16$i$i|0); + do { + if ($cmp20$i$i) { + $113 = HEAP32[(148)>>2]|0; + $add$i$i = (($113) + ($sub18$i$i))|0; + HEAP32[(148)>>2] = $add$i$i; + HEAP32[(160)>>2] = $add$ptr17$i$i; + $or22$i$i = $add$i$i | 1; + $head23$i$i = ((($add$ptr17$i$i)) + 4|0); + HEAP32[$head23$i$i>>2] = $or22$i$i; + } else { + $114 = HEAP32[(156)>>2]|0; + $cmp24$i$i = ($114|0)==($add$ptr16$i$i|0); + if ($cmp24$i$i) { + $115 = HEAP32[(144)>>2]|0; + $add26$i$i = (($115) + ($sub18$i$i))|0; + HEAP32[(144)>>2] = $add26$i$i; + HEAP32[(156)>>2] = $add$ptr17$i$i; + $or28$i$i = $add26$i$i | 1; + $head29$i$i = ((($add$ptr17$i$i)) + 4|0); + HEAP32[$head29$i$i>>2] = $or28$i$i; + $add$ptr30$i$i = (($add$ptr17$i$i) + ($add26$i$i)|0); + HEAP32[$add$ptr30$i$i>>2] = $add26$i$i; + break; + } + $head32$i$i = ((($add$ptr16$i$i)) + 4|0); + $116 = HEAP32[$head32$i$i>>2]|0; + $and33$i$i = $116 & 3; + $cmp34$i$i = ($and33$i$i|0)==(1); + if ($cmp34$i$i) { + $and37$i$i = $116 & -8; + $shr$i22$i = $116 >>> 3; + $cmp38$i$i = ($116>>>0)<(256); + L234: do { + if ($cmp38$i$i) { + $fd$i$i = ((($add$ptr16$i$i)) + 8|0); + $117 = HEAP32[$fd$i$i>>2]|0; + $bk$i23$i = ((($add$ptr16$i$i)) + 12|0); + $118 = HEAP32[$bk$i23$i>>2]|0; + $cmp46$i$i = ($118|0)==($117|0); + if ($cmp46$i$i) { + $shl48$i$i = 1 << $shr$i22$i; + $neg$i$i = $shl48$i$i ^ -1; + $119 = HEAP32[34]|0; + $and49$i$i = $119 & $neg$i$i; + HEAP32[34] = $and49$i$i; + break; + } else { + $bk67$i$i = ((($117)) + 12|0); + HEAP32[$bk67$i$i>>2] = $118; + $fd68$i$i = ((($118)) + 8|0); + HEAP32[$fd68$i$i>>2] = $117; + break; + } + } else { + $parent$i24$i = ((($add$ptr16$i$i)) + 24|0); + $120 = HEAP32[$parent$i24$i>>2]|0; + $bk74$i$i = ((($add$ptr16$i$i)) + 12|0); + $121 = HEAP32[$bk74$i$i>>2]|0; + $cmp75$i$i = ($121|0)==($add$ptr16$i$i|0); + do { + if ($cmp75$i$i) { + $child$i$i = ((($add$ptr16$i$i)) + 16|0); + $arrayidx96$i$i = ((($child$i$i)) + 4|0); + $123 = HEAP32[$arrayidx96$i$i>>2]|0; + $cmp97$i$i = ($123|0)==(0|0); + if ($cmp97$i$i) { + $124 = HEAP32[$child$i$i>>2]|0; + $cmp100$i$i = ($124|0)==(0|0); + if ($cmp100$i$i) { + $R$3$i$i = 0; + break; + } else { + $R$1$i$i = $124;$RP$1$i$i = $child$i$i; + } + } else { + $R$1$i$i = $123;$RP$1$i$i = $arrayidx96$i$i; + } + while(1) { + $arrayidx103$i$i = ((($R$1$i$i)) + 20|0); + $125 = HEAP32[$arrayidx103$i$i>>2]|0; + $cmp104$i$i = ($125|0)==(0|0); + if (!($cmp104$i$i)) { + $R$1$i$i = $125;$RP$1$i$i = $arrayidx103$i$i; + continue; + } + $arrayidx107$i$i = ((($R$1$i$i)) + 16|0); + $126 = HEAP32[$arrayidx107$i$i>>2]|0; + $cmp108$i$i = ($126|0)==(0|0); + if ($cmp108$i$i) { + break; + } else { + $R$1$i$i = $126;$RP$1$i$i = $arrayidx107$i$i; + } + } + HEAP32[$RP$1$i$i>>2] = 0; + $R$3$i$i = $R$1$i$i; + } else { + $fd78$i$i = ((($add$ptr16$i$i)) + 8|0); + $122 = HEAP32[$fd78$i$i>>2]|0; + $bk91$i$i = ((($122)) + 12|0); + HEAP32[$bk91$i$i>>2] = $121; + $fd92$i$i = ((($121)) + 8|0); + HEAP32[$fd92$i$i>>2] = $122; + $R$3$i$i = $121; + } + } while(0); + $cmp120$i25$i = ($120|0)==(0|0); + if ($cmp120$i25$i) { + break; + } + $index$i26$i = ((($add$ptr16$i$i)) + 28|0); + $127 = HEAP32[$index$i26$i>>2]|0; + $arrayidx123$i$i = (440 + ($127<<2)|0); + $128 = HEAP32[$arrayidx123$i$i>>2]|0; + $cmp124$i$i = ($128|0)==($add$ptr16$i$i|0); + do { + if ($cmp124$i$i) { + HEAP32[$arrayidx123$i$i>>2] = $R$3$i$i; + $cond1$i$i = ($R$3$i$i|0)==(0|0); + if (!($cond1$i$i)) { + break; + } + $shl131$i$i = 1 << $127; + $neg132$i$i = $shl131$i$i ^ -1; + $129 = HEAP32[(140)>>2]|0; + $and133$i$i = $129 & $neg132$i$i; + HEAP32[(140)>>2] = $and133$i$i; + break L234; + } else { + $arrayidx143$i$i = ((($120)) + 16|0); + $130 = HEAP32[$arrayidx143$i$i>>2]|0; + $cmp144$i$i = ($130|0)!=($add$ptr16$i$i|0); + $$sink$i$i = $cmp144$i$i&1; + $arrayidx151$i$i = (((($120)) + 16|0) + ($$sink$i$i<<2)|0); + HEAP32[$arrayidx151$i$i>>2] = $R$3$i$i; + $cmp156$i$i = ($R$3$i$i|0)==(0|0); + if ($cmp156$i$i) { + break L234; + } + } + } while(0); + $parent165$i$i = ((($R$3$i$i)) + 24|0); + HEAP32[$parent165$i$i>>2] = $120; + $child166$i$i = ((($add$ptr16$i$i)) + 16|0); + $131 = HEAP32[$child166$i$i>>2]|0; + $cmp168$i$i = ($131|0)==(0|0); + if (!($cmp168$i$i)) { + $arrayidx178$i$i = ((($R$3$i$i)) + 16|0); + HEAP32[$arrayidx178$i$i>>2] = $131; + $parent179$i$i = ((($131)) + 24|0); + HEAP32[$parent179$i$i>>2] = $R$3$i$i; + } + $arrayidx184$i$i = ((($child166$i$i)) + 4|0); + $132 = HEAP32[$arrayidx184$i$i>>2]|0; + $cmp185$i$i = ($132|0)==(0|0); + if ($cmp185$i$i) { + break; + } + $arrayidx195$i$i = ((($R$3$i$i)) + 20|0); + HEAP32[$arrayidx195$i$i>>2] = $132; + $parent196$i$i = ((($132)) + 24|0); + HEAP32[$parent196$i$i>>2] = $R$3$i$i; + } + } while(0); + $add$ptr205$i$i = (($add$ptr16$i$i) + ($and37$i$i)|0); + $add206$i$i = (($and37$i$i) + ($sub18$i$i))|0; + $oldfirst$0$i$i = $add$ptr205$i$i;$qsize$0$i$i = $add206$i$i; + } else { + $oldfirst$0$i$i = $add$ptr16$i$i;$qsize$0$i$i = $sub18$i$i; + } + $head208$i$i = ((($oldfirst$0$i$i)) + 4|0); + $133 = HEAP32[$head208$i$i>>2]|0; + $and209$i$i = $133 & -2; + HEAP32[$head208$i$i>>2] = $and209$i$i; + $or210$i$i = $qsize$0$i$i | 1; + $head211$i$i = ((($add$ptr17$i$i)) + 4|0); + HEAP32[$head211$i$i>>2] = $or210$i$i; + $add$ptr212$i$i = (($add$ptr17$i$i) + ($qsize$0$i$i)|0); + HEAP32[$add$ptr212$i$i>>2] = $qsize$0$i$i; + $shr214$i$i = $qsize$0$i$i >>> 3; + $cmp215$i$i = ($qsize$0$i$i>>>0)<(256); + if ($cmp215$i$i) { + $shl222$i$i = $shr214$i$i << 1; + $arrayidx223$i$i = (176 + ($shl222$i$i<<2)|0); + $134 = HEAP32[34]|0; + $shl226$i$i = 1 << $shr214$i$i; + $and227$i$i = $134 & $shl226$i$i; + $tobool228$i$i = ($and227$i$i|0)==(0); + if ($tobool228$i$i) { + $or232$i$i = $134 | $shl226$i$i; + HEAP32[34] = $or232$i$i; + $$pre$i28$i = ((($arrayidx223$i$i)) + 8|0); + $$pre$phi$i29$iZ2D = $$pre$i28$i;$F224$0$i$i = $arrayidx223$i$i; + } else { + $135 = ((($arrayidx223$i$i)) + 8|0); + $136 = HEAP32[$135>>2]|0; + $$pre$phi$i29$iZ2D = $135;$F224$0$i$i = $136; + } + HEAP32[$$pre$phi$i29$iZ2D>>2] = $add$ptr17$i$i; + $bk246$i$i = ((($F224$0$i$i)) + 12|0); + HEAP32[$bk246$i$i>>2] = $add$ptr17$i$i; + $fd247$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd247$i$i>>2] = $F224$0$i$i; + $bk248$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk248$i$i>>2] = $arrayidx223$i$i; + break; + } + $shr253$i$i = $qsize$0$i$i >>> 8; + $cmp254$i$i = ($shr253$i$i|0)==(0); + do { + if ($cmp254$i$i) { + $I252$0$i$i = 0; + } else { + $cmp258$i$i = ($qsize$0$i$i>>>0)>(16777215); + if ($cmp258$i$i) { + $I252$0$i$i = 31; + break; + } + $sub262$i$i = (($shr253$i$i) + 1048320)|0; + $shr263$i$i = $sub262$i$i >>> 16; + $and264$i$i = $shr263$i$i & 8; + $shl265$i$i = $shr253$i$i << $and264$i$i; + $sub266$i$i = (($shl265$i$i) + 520192)|0; + $shr267$i$i = $sub266$i$i >>> 16; + $and268$i$i = $shr267$i$i & 4; + $add269$i$i = $and268$i$i | $and264$i$i; + $shl270$i$i = $shl265$i$i << $and268$i$i; + $sub271$i$i = (($shl270$i$i) + 245760)|0; + $shr272$i$i = $sub271$i$i >>> 16; + $and273$i$i = $shr272$i$i & 2; + $add274$i$i = $add269$i$i | $and273$i$i; + $sub275$i$i = (14 - ($add274$i$i))|0; + $shl276$i$i = $shl270$i$i << $and273$i$i; + $shr277$i$i = $shl276$i$i >>> 15; + $add278$i$i = (($sub275$i$i) + ($shr277$i$i))|0; + $shl279$i$i = $add278$i$i << 1; + $add280$i$i = (($add278$i$i) + 7)|0; + $shr281$i$i = $qsize$0$i$i >>> $add280$i$i; + $and282$i$i = $shr281$i$i & 1; + $add283$i$i = $and282$i$i | $shl279$i$i; + $I252$0$i$i = $add283$i$i; + } + } while(0); + $arrayidx287$i$i = (440 + ($I252$0$i$i<<2)|0); + $index288$i$i = ((($add$ptr17$i$i)) + 28|0); + HEAP32[$index288$i$i>>2] = $I252$0$i$i; + $child289$i$i = ((($add$ptr17$i$i)) + 16|0); + $arrayidx290$i$i = ((($child289$i$i)) + 4|0); + HEAP32[$arrayidx290$i$i>>2] = 0; + HEAP32[$child289$i$i>>2] = 0; + $137 = HEAP32[(140)>>2]|0; + $shl294$i$i = 1 << $I252$0$i$i; + $and295$i$i = $137 & $shl294$i$i; + $tobool296$i$i = ($and295$i$i|0)==(0); + if ($tobool296$i$i) { + $or300$i$i = $137 | $shl294$i$i; + HEAP32[(140)>>2] = $or300$i$i; + HEAP32[$arrayidx287$i$i>>2] = $add$ptr17$i$i; + $parent301$i$i = ((($add$ptr17$i$i)) + 24|0); + HEAP32[$parent301$i$i>>2] = $arrayidx287$i$i; + $bk302$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk302$i$i>>2] = $add$ptr17$i$i; + $fd303$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd303$i$i>>2] = $add$ptr17$i$i; + break; + } + $138 = HEAP32[$arrayidx287$i$i>>2]|0; + $cmp306$i$i = ($I252$0$i$i|0)==(31); + $shr310$i$i = $I252$0$i$i >>> 1; + $sub313$i$i = (25 - ($shr310$i$i))|0; + $cond315$i$i = $cmp306$i$i ? 0 : $sub313$i$i; + $shl316$i$i = $qsize$0$i$i << $cond315$i$i; + $K305$0$i$i = $shl316$i$i;$T$0$i30$i = $138; + while(1) { + $head317$i$i = ((($T$0$i30$i)) + 4|0); + $139 = HEAP32[$head317$i$i>>2]|0; + $and318$i$i = $139 & -8; + $cmp319$i$i = ($and318$i$i|0)==($qsize$0$i$i|0); + if ($cmp319$i$i) { + label = 192; + break; + } + $shr323$i$i = $K305$0$i$i >>> 31; + $arrayidx325$i$i = (((($T$0$i30$i)) + 16|0) + ($shr323$i$i<<2)|0); + $shl326$i$i = $K305$0$i$i << 1; + $140 = HEAP32[$arrayidx325$i$i>>2]|0; + $cmp327$i$i = ($140|0)==(0|0); + if ($cmp327$i$i) { + label = 191; + break; + } else { + $K305$0$i$i = $shl326$i$i;$T$0$i30$i = $140; + } + } + if ((label|0) == 191) { + HEAP32[$arrayidx325$i$i>>2] = $add$ptr17$i$i; + $parent337$i$i = ((($add$ptr17$i$i)) + 24|0); + HEAP32[$parent337$i$i>>2] = $T$0$i30$i; + $bk338$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk338$i$i>>2] = $add$ptr17$i$i; + $fd339$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd339$i$i>>2] = $add$ptr17$i$i; + break; + } + else if ((label|0) == 192) { + $fd344$i$i = ((($T$0$i30$i)) + 8|0); + $141 = HEAP32[$fd344$i$i>>2]|0; + $bk357$i$i = ((($141)) + 12|0); + HEAP32[$bk357$i$i>>2] = $add$ptr17$i$i; + HEAP32[$fd344$i$i>>2] = $add$ptr17$i$i; + $fd359$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd359$i$i>>2] = $141; + $bk360$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk360$i$i>>2] = $T$0$i30$i; + $parent361$i$i = ((($add$ptr17$i$i)) + 24|0); + HEAP32[$parent361$i$i>>2] = 0; + break; + } + } + } while(0); + $add$ptr369$i$i = ((($add$ptr4$i$i)) + 8|0); + $retval$0 = $add$ptr369$i$i; + STACKTOP = sp;return ($retval$0|0); + } else { + $sp$0$i$i$i = (584); + } + } + while(1) { + $142 = HEAP32[$sp$0$i$i$i>>2]|0; + $cmp$i$i$i = ($142>>>0)>($94>>>0); + if (!($cmp$i$i$i)) { + $size$i$i$i = ((($sp$0$i$i$i)) + 4|0); + $143 = HEAP32[$size$i$i$i>>2]|0; + $add$ptr$i$i$i = (($142) + ($143)|0); + $cmp2$i$i$i = ($add$ptr$i$i$i>>>0)>($94>>>0); + if ($cmp2$i$i$i) { + break; + } + } + $next$i$i$i = ((($sp$0$i$i$i)) + 8|0); + $144 = HEAP32[$next$i$i$i>>2]|0; + $sp$0$i$i$i = $144; + } + $add$ptr2$i$i = ((($add$ptr$i$i$i)) + -47|0); + $add$ptr3$i$i = ((($add$ptr2$i$i)) + 8|0); + $145 = $add$ptr3$i$i; + $and$i$i = $145 & 7; + $cmp$i9$i = ($and$i$i|0)==(0); + $sub$i$i = (0 - ($145))|0; + $and6$i10$i = $sub$i$i & 7; + $cond$i$i = $cmp$i9$i ? 0 : $and6$i10$i; + $add$ptr7$i$i = (($add$ptr2$i$i) + ($cond$i$i)|0); + $add$ptr81$i$i = ((($94)) + 16|0); + $cmp9$i$i = ($add$ptr7$i$i>>>0)<($add$ptr81$i$i>>>0); + $cond13$i$i = $cmp9$i$i ? $94 : $add$ptr7$i$i; + $add$ptr14$i$i = ((($cond13$i$i)) + 8|0); + $add$ptr15$i$i = ((($cond13$i$i)) + 24|0); + $sub16$i$i = (($tsize$791$i) + -40)|0; + $add$ptr$i2$i$i = ((($tbase$792$i)) + 8|0); + $146 = $add$ptr$i2$i$i; + $and$i$i$i = $146 & 7; + $cmp$i3$i$i = ($and$i$i$i|0)==(0); + $sub$i$i$i = (0 - ($146))|0; + $and3$i$i$i = $sub$i$i$i & 7; + $cond$i$i$i = $cmp$i3$i$i ? 0 : $and3$i$i$i; + $add$ptr4$i$i$i = (($tbase$792$i) + ($cond$i$i$i)|0); + $sub5$i$i$i = (($sub16$i$i) - ($cond$i$i$i))|0; + HEAP32[(160)>>2] = $add$ptr4$i$i$i; + HEAP32[(148)>>2] = $sub5$i$i$i; + $or$i$i$i = $sub5$i$i$i | 1; + $head$i$i$i = ((($add$ptr4$i$i$i)) + 4|0); + HEAP32[$head$i$i$i>>2] = $or$i$i$i; + $add$ptr6$i$i$i = (($tbase$792$i) + ($sub16$i$i)|0); + $head7$i$i$i = ((($add$ptr6$i$i$i)) + 4|0); + HEAP32[$head7$i$i$i>>2] = 40; + $147 = HEAP32[(624)>>2]|0; + HEAP32[(164)>>2] = $147; + $head$i$i = ((($cond13$i$i)) + 4|0); + HEAP32[$head$i$i>>2] = 27; + ;HEAP32[$add$ptr14$i$i>>2]=HEAP32[(584)>>2]|0;HEAP32[$add$ptr14$i$i+4>>2]=HEAP32[(584)+4>>2]|0;HEAP32[$add$ptr14$i$i+8>>2]=HEAP32[(584)+8>>2]|0;HEAP32[$add$ptr14$i$i+12>>2]=HEAP32[(584)+12>>2]|0; + HEAP32[(584)>>2] = $tbase$792$i; + HEAP32[(588)>>2] = $tsize$791$i; + HEAP32[(596)>>2] = 0; + HEAP32[(592)>>2] = $add$ptr14$i$i; + $148 = $add$ptr15$i$i; + while(1) { + $add$ptr24$i$i = ((($148)) + 4|0); + HEAP32[$add$ptr24$i$i>>2] = 7; + $head26$i$i = ((($148)) + 8|0); + $cmp27$i$i = ($head26$i$i>>>0)<($add$ptr$i$i$i>>>0); + if ($cmp27$i$i) { + $148 = $add$ptr24$i$i; + } else { + break; + } + } + $cmp28$i$i = ($cond13$i$i|0)==($94|0); + if (!($cmp28$i$i)) { + $sub$ptr$lhs$cast$i$i = $cond13$i$i; + $sub$ptr$rhs$cast$i$i = $94; + $sub$ptr$sub$i$i = (($sub$ptr$lhs$cast$i$i) - ($sub$ptr$rhs$cast$i$i))|0; + $149 = HEAP32[$head$i$i>>2]|0; + $and32$i$i = $149 & -2; + HEAP32[$head$i$i>>2] = $and32$i$i; + $or33$i$i = $sub$ptr$sub$i$i | 1; + $head34$i$i = ((($94)) + 4|0); + HEAP32[$head34$i$i>>2] = $or33$i$i; + HEAP32[$cond13$i$i>>2] = $sub$ptr$sub$i$i; + $shr$i$i = $sub$ptr$sub$i$i >>> 3; + $cmp36$i$i = ($sub$ptr$sub$i$i>>>0)<(256); + if ($cmp36$i$i) { + $shl$i$i = $shr$i$i << 1; + $arrayidx$i$i = (176 + ($shl$i$i<<2)|0); + $150 = HEAP32[34]|0; + $shl39$i$i = 1 << $shr$i$i; + $and40$i$i = $150 & $shl39$i$i; + $tobool$i$i = ($and40$i$i|0)==(0); + if ($tobool$i$i) { + $or44$i$i = $150 | $shl39$i$i; + HEAP32[34] = $or44$i$i; + $$pre$i$i = ((($arrayidx$i$i)) + 8|0); + $$pre$phi$i$iZ2D = $$pre$i$i;$F$0$i$i = $arrayidx$i$i; + } else { + $151 = ((($arrayidx$i$i)) + 8|0); + $152 = HEAP32[$151>>2]|0; + $$pre$phi$i$iZ2D = $151;$F$0$i$i = $152; + } + HEAP32[$$pre$phi$i$iZ2D>>2] = $94; + $bk$i$i = ((($F$0$i$i)) + 12|0); + HEAP32[$bk$i$i>>2] = $94; + $fd54$i$i = ((($94)) + 8|0); + HEAP32[$fd54$i$i>>2] = $F$0$i$i; + $bk55$i$i = ((($94)) + 12|0); + HEAP32[$bk55$i$i>>2] = $arrayidx$i$i; + break; + } + $shr58$i$i = $sub$ptr$sub$i$i >>> 8; + $cmp59$i$i = ($shr58$i$i|0)==(0); + if ($cmp59$i$i) { + $I57$0$i$i = 0; + } else { + $cmp63$i$i = ($sub$ptr$sub$i$i>>>0)>(16777215); + if ($cmp63$i$i) { + $I57$0$i$i = 31; + } else { + $sub67$i$i = (($shr58$i$i) + 1048320)|0; + $shr68$i$i = $sub67$i$i >>> 16; + $and69$i$i = $shr68$i$i & 8; + $shl70$i$i = $shr58$i$i << $and69$i$i; + $sub71$i$i = (($shl70$i$i) + 520192)|0; + $shr72$i$i = $sub71$i$i >>> 16; + $and73$i$i = $shr72$i$i & 4; + $add74$i$i = $and73$i$i | $and69$i$i; + $shl75$i$i = $shl70$i$i << $and73$i$i; + $sub76$i$i = (($shl75$i$i) + 245760)|0; + $shr77$i$i = $sub76$i$i >>> 16; + $and78$i$i = $shr77$i$i & 2; + $add79$i$i = $add74$i$i | $and78$i$i; + $sub80$i$i = (14 - ($add79$i$i))|0; + $shl81$i$i = $shl75$i$i << $and78$i$i; + $shr82$i$i = $shl81$i$i >>> 15; + $add83$i$i = (($sub80$i$i) + ($shr82$i$i))|0; + $shl84$i$i = $add83$i$i << 1; + $add85$i$i = (($add83$i$i) + 7)|0; + $shr86$i$i = $sub$ptr$sub$i$i >>> $add85$i$i; + $and87$i$i = $shr86$i$i & 1; + $add88$i$i = $and87$i$i | $shl84$i$i; + $I57$0$i$i = $add88$i$i; + } + } + $arrayidx91$i$i = (440 + ($I57$0$i$i<<2)|0); + $index$i$i = ((($94)) + 28|0); + HEAP32[$index$i$i>>2] = $I57$0$i$i; + $arrayidx92$i$i = ((($94)) + 20|0); + HEAP32[$arrayidx92$i$i>>2] = 0; + HEAP32[$add$ptr81$i$i>>2] = 0; + $153 = HEAP32[(140)>>2]|0; + $shl95$i$i = 1 << $I57$0$i$i; + $and96$i$i = $153 & $shl95$i$i; + $tobool97$i$i = ($and96$i$i|0)==(0); + if ($tobool97$i$i) { + $or101$i$i = $153 | $shl95$i$i; + HEAP32[(140)>>2] = $or101$i$i; + HEAP32[$arrayidx91$i$i>>2] = $94; + $parent$i$i = ((($94)) + 24|0); + HEAP32[$parent$i$i>>2] = $arrayidx91$i$i; + $bk102$i$i = ((($94)) + 12|0); + HEAP32[$bk102$i$i>>2] = $94; + $fd103$i$i = ((($94)) + 8|0); + HEAP32[$fd103$i$i>>2] = $94; + break; + } + $154 = HEAP32[$arrayidx91$i$i>>2]|0; + $cmp106$i$i = ($I57$0$i$i|0)==(31); + $shr110$i$i = $I57$0$i$i >>> 1; + $sub113$i$i = (25 - ($shr110$i$i))|0; + $cond115$i$i = $cmp106$i$i ? 0 : $sub113$i$i; + $shl116$i$i = $sub$ptr$sub$i$i << $cond115$i$i; + $K105$0$i$i = $shl116$i$i;$T$0$i$i = $154; + while(1) { + $head118$i$i = ((($T$0$i$i)) + 4|0); + $155 = HEAP32[$head118$i$i>>2]|0; + $and119$i$i = $155 & -8; + $cmp120$i$i = ($and119$i$i|0)==($sub$ptr$sub$i$i|0); + if ($cmp120$i$i) { + label = 213; + break; + } + $shr124$i$i = $K105$0$i$i >>> 31; + $arrayidx126$i$i = (((($T$0$i$i)) + 16|0) + ($shr124$i$i<<2)|0); + $shl127$i$i = $K105$0$i$i << 1; + $156 = HEAP32[$arrayidx126$i$i>>2]|0; + $cmp128$i$i = ($156|0)==(0|0); + if ($cmp128$i$i) { + label = 212; + break; + } else { + $K105$0$i$i = $shl127$i$i;$T$0$i$i = $156; + } + } + if ((label|0) == 212) { + HEAP32[$arrayidx126$i$i>>2] = $94; + $parent138$i$i = ((($94)) + 24|0); + HEAP32[$parent138$i$i>>2] = $T$0$i$i; + $bk139$i$i = ((($94)) + 12|0); + HEAP32[$bk139$i$i>>2] = $94; + $fd140$i$i = ((($94)) + 8|0); + HEAP32[$fd140$i$i>>2] = $94; + break; + } + else if ((label|0) == 213) { + $fd148$i$i = ((($T$0$i$i)) + 8|0); + $157 = HEAP32[$fd148$i$i>>2]|0; + $bk158$i$i = ((($157)) + 12|0); + HEAP32[$bk158$i$i>>2] = $94; + HEAP32[$fd148$i$i>>2] = $94; + $fd160$i$i = ((($94)) + 8|0); + HEAP32[$fd160$i$i>>2] = $157; + $bk161$i$i = ((($94)) + 12|0); + HEAP32[$bk161$i$i>>2] = $T$0$i$i; + $parent162$i$i = ((($94)) + 24|0); + HEAP32[$parent162$i$i>>2] = 0; + break; + } + } + } + } while(0); + $158 = HEAP32[(148)>>2]|0; + $cmp257$i = ($158>>>0)>($nb$0>>>0); + if ($cmp257$i) { + $sub260$i = (($158) - ($nb$0))|0; + HEAP32[(148)>>2] = $sub260$i; + $159 = HEAP32[(160)>>2]|0; + $add$ptr262$i = (($159) + ($nb$0)|0); + HEAP32[(160)>>2] = $add$ptr262$i; + $or264$i = $sub260$i | 1; + $head265$i = ((($add$ptr262$i)) + 4|0); + HEAP32[$head265$i>>2] = $or264$i; + $or267$i = $nb$0 | 3; + $head268$i = ((($159)) + 4|0); + HEAP32[$head268$i>>2] = $or267$i; + $add$ptr269$i = ((($159)) + 8|0); + $retval$0 = $add$ptr269$i; + STACKTOP = sp;return ($retval$0|0); + } + } + $call275$i = (___errno_location()|0); + HEAP32[$call275$i>>2] = 12; + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); +} +function _free($mem) { + $mem = $mem|0; + var $$pre = 0, $$pre$phiZ2D = 0, $$sink = 0, $$sink4 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; + var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $F510$0 = 0, $I534$0 = 0; + var $K583$0 = 0, $R$1 = 0, $R$3 = 0, $R332$1 = 0, $R332$3 = 0, $RP$1 = 0, $RP360$1 = 0, $T$0 = 0, $add$ptr = 0, $add$ptr16 = 0, $add$ptr217 = 0, $add$ptr261 = 0, $add$ptr482 = 0, $add$ptr498 = 0, $add$ptr6 = 0, $add17 = 0, $add246 = 0, $add258 = 0, $add267 = 0, $add550 = 0; + var $add555 = 0, $add559 = 0, $add561 = 0, $add564 = 0, $and12 = 0, $and140 = 0, $and210 = 0, $and215 = 0, $and232 = 0, $and240 = 0, $and266 = 0, $and301 = 0, $and410 = 0, $and46 = 0, $and495 = 0, $and5 = 0, $and512 = 0, $and545 = 0, $and549 = 0, $and554 = 0; + var $and563 = 0, $and574 = 0, $and592 = 0, $and8 = 0, $arrayidx108 = 0, $arrayidx113 = 0, $arrayidx130 = 0, $arrayidx149 = 0, $arrayidx157 = 0, $arrayidx182 = 0, $arrayidx188 = 0, $arrayidx198 = 0, $arrayidx362 = 0, $arrayidx374 = 0, $arrayidx379 = 0, $arrayidx400 = 0, $arrayidx419 = 0, $arrayidx427 = 0, $arrayidx454 = 0, $arrayidx460 = 0; + var $arrayidx470 = 0, $arrayidx509 = 0, $arrayidx567 = 0, $arrayidx570 = 0, $arrayidx599 = 0, $arrayidx99 = 0, $bk = 0, $bk275 = 0, $bk321 = 0, $bk333 = 0, $bk355 = 0, $bk529 = 0, $bk531 = 0, $bk580 = 0, $bk611 = 0, $bk631 = 0, $bk634 = 0, $bk66 = 0, $bk73 = 0, $bk94 = 0; + var $child = 0, $child171 = 0, $child361 = 0, $child443 = 0, $child569 = 0, $cmp = 0, $cmp$i = 0, $cmp100 = 0, $cmp104 = 0, $cmp109 = 0, $cmp114 = 0, $cmp127 = 0, $cmp13 = 0, $cmp131 = 0, $cmp150 = 0, $cmp162 = 0, $cmp173 = 0, $cmp18 = 0, $cmp189 = 0, $cmp211 = 0; + var $cmp22 = 0, $cmp228 = 0, $cmp243 = 0, $cmp249 = 0, $cmp25 = 0, $cmp255 = 0, $cmp269 = 0, $cmp296 = 0, $cmp334 = 0, $cmp363 = 0, $cmp368 = 0, $cmp375 = 0, $cmp380 = 0, $cmp395 = 0, $cmp401 = 0, $cmp42 = 0, $cmp420 = 0, $cmp432 = 0, $cmp445 = 0, $cmp461 = 0; + var $cmp484 = 0, $cmp502 = 0, $cmp536 = 0, $cmp540 = 0, $cmp584 = 0, $cmp593 = 0, $cmp601 = 0, $cmp640 = 0, $cmp74 = 0, $cond = 0, $cond255 = 0, $cond256 = 0, $dec = 0, $fd = 0, $fd273 = 0, $fd322 = 0, $fd338 = 0, $fd356 = 0, $fd530 = 0, $fd581 = 0; + var $fd612 = 0, $fd620 = 0, $fd633 = 0, $fd67 = 0, $fd78 = 0, $fd95 = 0, $head209 = 0, $head216 = 0, $head231 = 0, $head248 = 0, $head260 = 0, $head4 = 0, $head481 = 0, $head497 = 0, $head591 = 0, $idx$neg = 0, $index = 0, $index399 = 0, $index568 = 0, $neg = 0; + var $neg139 = 0, $neg300 = 0, $neg409 = 0, $next4$i = 0, $or = 0, $or247 = 0, $or259 = 0, $or480 = 0, $or496 = 0, $or516 = 0, $or578 = 0, $p$1 = 0, $parent = 0, $parent170 = 0, $parent183 = 0, $parent199 = 0, $parent331 = 0, $parent442 = 0, $parent455 = 0, $parent471 = 0; + var $parent579 = 0, $parent610 = 0, $parent635 = 0, $psize$1 = 0, $psize$2 = 0, $shl138 = 0, $shl299 = 0, $shl408 = 0, $shl45 = 0, $shl508 = 0, $shl511 = 0, $shl546 = 0, $shl551 = 0, $shl557 = 0, $shl560 = 0, $shl573 = 0, $shl590 = 0, $shl600 = 0, $shr = 0, $shr268 = 0; + var $shr501 = 0, $shr535 = 0, $shr544 = 0, $shr548 = 0, $shr553 = 0, $shr558 = 0, $shr562 = 0, $shr586 = 0, $shr597 = 0, $sp$0$i = 0, $sp$0$in$i = 0, $sub = 0, $sub547 = 0, $sub552 = 0, $sub556 = 0, $sub589 = 0, $tobool233 = 0, $tobool241 = 0, $tobool513 = 0, $tobool575 = 0; + var $tobool9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($mem|0)==(0|0); + if ($cmp) { + return; + } + $add$ptr = ((($mem)) + -8|0); + $0 = HEAP32[(152)>>2]|0; + $head4 = ((($mem)) + -4|0); + $1 = HEAP32[$head4>>2]|0; + $and5 = $1 & -8; + $add$ptr6 = (($add$ptr) + ($and5)|0); + $and8 = $1 & 1; + $tobool9 = ($and8|0)==(0); + do { + if ($tobool9) { + $2 = HEAP32[$add$ptr>>2]|0; + $and12 = $1 & 3; + $cmp13 = ($and12|0)==(0); + if ($cmp13) { + return; + } + $idx$neg = (0 - ($2))|0; + $add$ptr16 = (($add$ptr) + ($idx$neg)|0); + $add17 = (($2) + ($and5))|0; + $cmp18 = ($add$ptr16>>>0)<($0>>>0); + if ($cmp18) { + return; + } + $3 = HEAP32[(156)>>2]|0; + $cmp22 = ($3|0)==($add$ptr16|0); + if ($cmp22) { + $head209 = ((($add$ptr6)) + 4|0); + $20 = HEAP32[$head209>>2]|0; + $and210 = $20 & 3; + $cmp211 = ($and210|0)==(3); + if (!($cmp211)) { + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + HEAP32[(144)>>2] = $add17; + $and215 = $20 & -2; + HEAP32[$head209>>2] = $and215; + $or = $add17 | 1; + $head216 = ((($add$ptr16)) + 4|0); + HEAP32[$head216>>2] = $or; + $add$ptr217 = (($add$ptr16) + ($add17)|0); + HEAP32[$add$ptr217>>2] = $add17; + return; + } + $shr = $2 >>> 3; + $cmp25 = ($2>>>0)<(256); + if ($cmp25) { + $fd = ((($add$ptr16)) + 8|0); + $4 = HEAP32[$fd>>2]|0; + $bk = ((($add$ptr16)) + 12|0); + $5 = HEAP32[$bk>>2]|0; + $cmp42 = ($5|0)==($4|0); + if ($cmp42) { + $shl45 = 1 << $shr; + $neg = $shl45 ^ -1; + $6 = HEAP32[34]|0; + $and46 = $6 & $neg; + HEAP32[34] = $and46; + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } else { + $bk66 = ((($4)) + 12|0); + HEAP32[$bk66>>2] = $5; + $fd67 = ((($5)) + 8|0); + HEAP32[$fd67>>2] = $4; + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + } + $parent = ((($add$ptr16)) + 24|0); + $7 = HEAP32[$parent>>2]|0; + $bk73 = ((($add$ptr16)) + 12|0); + $8 = HEAP32[$bk73>>2]|0; + $cmp74 = ($8|0)==($add$ptr16|0); + do { + if ($cmp74) { + $child = ((($add$ptr16)) + 16|0); + $arrayidx99 = ((($child)) + 4|0); + $10 = HEAP32[$arrayidx99>>2]|0; + $cmp100 = ($10|0)==(0|0); + if ($cmp100) { + $11 = HEAP32[$child>>2]|0; + $cmp104 = ($11|0)==(0|0); + if ($cmp104) { + $R$3 = 0; + break; + } else { + $R$1 = $11;$RP$1 = $child; + } + } else { + $R$1 = $10;$RP$1 = $arrayidx99; + } + while(1) { + $arrayidx108 = ((($R$1)) + 20|0); + $12 = HEAP32[$arrayidx108>>2]|0; + $cmp109 = ($12|0)==(0|0); + if (!($cmp109)) { + $R$1 = $12;$RP$1 = $arrayidx108; + continue; + } + $arrayidx113 = ((($R$1)) + 16|0); + $13 = HEAP32[$arrayidx113>>2]|0; + $cmp114 = ($13|0)==(0|0); + if ($cmp114) { + break; + } else { + $R$1 = $13;$RP$1 = $arrayidx113; + } + } + HEAP32[$RP$1>>2] = 0; + $R$3 = $R$1; + } else { + $fd78 = ((($add$ptr16)) + 8|0); + $9 = HEAP32[$fd78>>2]|0; + $bk94 = ((($9)) + 12|0); + HEAP32[$bk94>>2] = $8; + $fd95 = ((($8)) + 8|0); + HEAP32[$fd95>>2] = $9; + $R$3 = $8; + } + } while(0); + $cmp127 = ($7|0)==(0|0); + if ($cmp127) { + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + } else { + $index = ((($add$ptr16)) + 28|0); + $14 = HEAP32[$index>>2]|0; + $arrayidx130 = (440 + ($14<<2)|0); + $15 = HEAP32[$arrayidx130>>2]|0; + $cmp131 = ($15|0)==($add$ptr16|0); + if ($cmp131) { + HEAP32[$arrayidx130>>2] = $R$3; + $cond255 = ($R$3|0)==(0|0); + if ($cond255) { + $shl138 = 1 << $14; + $neg139 = $shl138 ^ -1; + $16 = HEAP32[(140)>>2]|0; + $and140 = $16 & $neg139; + HEAP32[(140)>>2] = $and140; + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + } else { + $arrayidx149 = ((($7)) + 16|0); + $17 = HEAP32[$arrayidx149>>2]|0; + $cmp150 = ($17|0)!=($add$ptr16|0); + $$sink = $cmp150&1; + $arrayidx157 = (((($7)) + 16|0) + ($$sink<<2)|0); + HEAP32[$arrayidx157>>2] = $R$3; + $cmp162 = ($R$3|0)==(0|0); + if ($cmp162) { + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + } + $parent170 = ((($R$3)) + 24|0); + HEAP32[$parent170>>2] = $7; + $child171 = ((($add$ptr16)) + 16|0); + $18 = HEAP32[$child171>>2]|0; + $cmp173 = ($18|0)==(0|0); + if (!($cmp173)) { + $arrayidx182 = ((($R$3)) + 16|0); + HEAP32[$arrayidx182>>2] = $18; + $parent183 = ((($18)) + 24|0); + HEAP32[$parent183>>2] = $R$3; + } + $arrayidx188 = ((($child171)) + 4|0); + $19 = HEAP32[$arrayidx188>>2]|0; + $cmp189 = ($19|0)==(0|0); + if ($cmp189) { + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + } else { + $arrayidx198 = ((($R$3)) + 20|0); + HEAP32[$arrayidx198>>2] = $19; + $parent199 = ((($19)) + 24|0); + HEAP32[$parent199>>2] = $R$3; + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + } + } + } else { + $21 = $add$ptr;$p$1 = $add$ptr;$psize$1 = $and5; + } + } while(0); + $cmp228 = ($21>>>0)<($add$ptr6>>>0); + if (!($cmp228)) { + return; + } + $head231 = ((($add$ptr6)) + 4|0); + $22 = HEAP32[$head231>>2]|0; + $and232 = $22 & 1; + $tobool233 = ($and232|0)==(0); + if ($tobool233) { + return; + } + $and240 = $22 & 2; + $tobool241 = ($and240|0)==(0); + if ($tobool241) { + $23 = HEAP32[(160)>>2]|0; + $cmp243 = ($23|0)==($add$ptr6|0); + if ($cmp243) { + $24 = HEAP32[(148)>>2]|0; + $add246 = (($24) + ($psize$1))|0; + HEAP32[(148)>>2] = $add246; + HEAP32[(160)>>2] = $p$1; + $or247 = $add246 | 1; + $head248 = ((($p$1)) + 4|0); + HEAP32[$head248>>2] = $or247; + $25 = HEAP32[(156)>>2]|0; + $cmp249 = ($p$1|0)==($25|0); + if (!($cmp249)) { + return; + } + HEAP32[(156)>>2] = 0; + HEAP32[(144)>>2] = 0; + return; + } + $26 = HEAP32[(156)>>2]|0; + $cmp255 = ($26|0)==($add$ptr6|0); + if ($cmp255) { + $27 = HEAP32[(144)>>2]|0; + $add258 = (($27) + ($psize$1))|0; + HEAP32[(144)>>2] = $add258; + HEAP32[(156)>>2] = $21; + $or259 = $add258 | 1; + $head260 = ((($p$1)) + 4|0); + HEAP32[$head260>>2] = $or259; + $add$ptr261 = (($21) + ($add258)|0); + HEAP32[$add$ptr261>>2] = $add258; + return; + } + $and266 = $22 & -8; + $add267 = (($and266) + ($psize$1))|0; + $shr268 = $22 >>> 3; + $cmp269 = ($22>>>0)<(256); + do { + if ($cmp269) { + $fd273 = ((($add$ptr6)) + 8|0); + $28 = HEAP32[$fd273>>2]|0; + $bk275 = ((($add$ptr6)) + 12|0); + $29 = HEAP32[$bk275>>2]|0; + $cmp296 = ($29|0)==($28|0); + if ($cmp296) { + $shl299 = 1 << $shr268; + $neg300 = $shl299 ^ -1; + $30 = HEAP32[34]|0; + $and301 = $30 & $neg300; + HEAP32[34] = $and301; + break; + } else { + $bk321 = ((($28)) + 12|0); + HEAP32[$bk321>>2] = $29; + $fd322 = ((($29)) + 8|0); + HEAP32[$fd322>>2] = $28; + break; + } + } else { + $parent331 = ((($add$ptr6)) + 24|0); + $31 = HEAP32[$parent331>>2]|0; + $bk333 = ((($add$ptr6)) + 12|0); + $32 = HEAP32[$bk333>>2]|0; + $cmp334 = ($32|0)==($add$ptr6|0); + do { + if ($cmp334) { + $child361 = ((($add$ptr6)) + 16|0); + $arrayidx362 = ((($child361)) + 4|0); + $34 = HEAP32[$arrayidx362>>2]|0; + $cmp363 = ($34|0)==(0|0); + if ($cmp363) { + $35 = HEAP32[$child361>>2]|0; + $cmp368 = ($35|0)==(0|0); + if ($cmp368) { + $R332$3 = 0; + break; + } else { + $R332$1 = $35;$RP360$1 = $child361; + } + } else { + $R332$1 = $34;$RP360$1 = $arrayidx362; + } + while(1) { + $arrayidx374 = ((($R332$1)) + 20|0); + $36 = HEAP32[$arrayidx374>>2]|0; + $cmp375 = ($36|0)==(0|0); + if (!($cmp375)) { + $R332$1 = $36;$RP360$1 = $arrayidx374; + continue; + } + $arrayidx379 = ((($R332$1)) + 16|0); + $37 = HEAP32[$arrayidx379>>2]|0; + $cmp380 = ($37|0)==(0|0); + if ($cmp380) { + break; + } else { + $R332$1 = $37;$RP360$1 = $arrayidx379; + } + } + HEAP32[$RP360$1>>2] = 0; + $R332$3 = $R332$1; + } else { + $fd338 = ((($add$ptr6)) + 8|0); + $33 = HEAP32[$fd338>>2]|0; + $bk355 = ((($33)) + 12|0); + HEAP32[$bk355>>2] = $32; + $fd356 = ((($32)) + 8|0); + HEAP32[$fd356>>2] = $33; + $R332$3 = $32; + } + } while(0); + $cmp395 = ($31|0)==(0|0); + if (!($cmp395)) { + $index399 = ((($add$ptr6)) + 28|0); + $38 = HEAP32[$index399>>2]|0; + $arrayidx400 = (440 + ($38<<2)|0); + $39 = HEAP32[$arrayidx400>>2]|0; + $cmp401 = ($39|0)==($add$ptr6|0); + if ($cmp401) { + HEAP32[$arrayidx400>>2] = $R332$3; + $cond256 = ($R332$3|0)==(0|0); + if ($cond256) { + $shl408 = 1 << $38; + $neg409 = $shl408 ^ -1; + $40 = HEAP32[(140)>>2]|0; + $and410 = $40 & $neg409; + HEAP32[(140)>>2] = $and410; + break; + } + } else { + $arrayidx419 = ((($31)) + 16|0); + $41 = HEAP32[$arrayidx419>>2]|0; + $cmp420 = ($41|0)!=($add$ptr6|0); + $$sink4 = $cmp420&1; + $arrayidx427 = (((($31)) + 16|0) + ($$sink4<<2)|0); + HEAP32[$arrayidx427>>2] = $R332$3; + $cmp432 = ($R332$3|0)==(0|0); + if ($cmp432) { + break; + } + } + $parent442 = ((($R332$3)) + 24|0); + HEAP32[$parent442>>2] = $31; + $child443 = ((($add$ptr6)) + 16|0); + $42 = HEAP32[$child443>>2]|0; + $cmp445 = ($42|0)==(0|0); + if (!($cmp445)) { + $arrayidx454 = ((($R332$3)) + 16|0); + HEAP32[$arrayidx454>>2] = $42; + $parent455 = ((($42)) + 24|0); + HEAP32[$parent455>>2] = $R332$3; + } + $arrayidx460 = ((($child443)) + 4|0); + $43 = HEAP32[$arrayidx460>>2]|0; + $cmp461 = ($43|0)==(0|0); + if (!($cmp461)) { + $arrayidx470 = ((($R332$3)) + 20|0); + HEAP32[$arrayidx470>>2] = $43; + $parent471 = ((($43)) + 24|0); + HEAP32[$parent471>>2] = $R332$3; + } + } + } + } while(0); + $or480 = $add267 | 1; + $head481 = ((($p$1)) + 4|0); + HEAP32[$head481>>2] = $or480; + $add$ptr482 = (($21) + ($add267)|0); + HEAP32[$add$ptr482>>2] = $add267; + $44 = HEAP32[(156)>>2]|0; + $cmp484 = ($p$1|0)==($44|0); + if ($cmp484) { + HEAP32[(144)>>2] = $add267; + return; + } else { + $psize$2 = $add267; + } + } else { + $and495 = $22 & -2; + HEAP32[$head231>>2] = $and495; + $or496 = $psize$1 | 1; + $head497 = ((($p$1)) + 4|0); + HEAP32[$head497>>2] = $or496; + $add$ptr498 = (($21) + ($psize$1)|0); + HEAP32[$add$ptr498>>2] = $psize$1; + $psize$2 = $psize$1; + } + $shr501 = $psize$2 >>> 3; + $cmp502 = ($psize$2>>>0)<(256); + if ($cmp502) { + $shl508 = $shr501 << 1; + $arrayidx509 = (176 + ($shl508<<2)|0); + $45 = HEAP32[34]|0; + $shl511 = 1 << $shr501; + $and512 = $45 & $shl511; + $tobool513 = ($and512|0)==(0); + if ($tobool513) { + $or516 = $45 | $shl511; + HEAP32[34] = $or516; + $$pre = ((($arrayidx509)) + 8|0); + $$pre$phiZ2D = $$pre;$F510$0 = $arrayidx509; + } else { + $46 = ((($arrayidx509)) + 8|0); + $47 = HEAP32[$46>>2]|0; + $$pre$phiZ2D = $46;$F510$0 = $47; + } + HEAP32[$$pre$phiZ2D>>2] = $p$1; + $bk529 = ((($F510$0)) + 12|0); + HEAP32[$bk529>>2] = $p$1; + $fd530 = ((($p$1)) + 8|0); + HEAP32[$fd530>>2] = $F510$0; + $bk531 = ((($p$1)) + 12|0); + HEAP32[$bk531>>2] = $arrayidx509; + return; + } + $shr535 = $psize$2 >>> 8; + $cmp536 = ($shr535|0)==(0); + if ($cmp536) { + $I534$0 = 0; + } else { + $cmp540 = ($psize$2>>>0)>(16777215); + if ($cmp540) { + $I534$0 = 31; + } else { + $sub = (($shr535) + 1048320)|0; + $shr544 = $sub >>> 16; + $and545 = $shr544 & 8; + $shl546 = $shr535 << $and545; + $sub547 = (($shl546) + 520192)|0; + $shr548 = $sub547 >>> 16; + $and549 = $shr548 & 4; + $add550 = $and549 | $and545; + $shl551 = $shl546 << $and549; + $sub552 = (($shl551) + 245760)|0; + $shr553 = $sub552 >>> 16; + $and554 = $shr553 & 2; + $add555 = $add550 | $and554; + $sub556 = (14 - ($add555))|0; + $shl557 = $shl551 << $and554; + $shr558 = $shl557 >>> 15; + $add559 = (($sub556) + ($shr558))|0; + $shl560 = $add559 << 1; + $add561 = (($add559) + 7)|0; + $shr562 = $psize$2 >>> $add561; + $and563 = $shr562 & 1; + $add564 = $and563 | $shl560; + $I534$0 = $add564; + } + } + $arrayidx567 = (440 + ($I534$0<<2)|0); + $index568 = ((($p$1)) + 28|0); + HEAP32[$index568>>2] = $I534$0; + $child569 = ((($p$1)) + 16|0); + $arrayidx570 = ((($p$1)) + 20|0); + HEAP32[$arrayidx570>>2] = 0; + HEAP32[$child569>>2] = 0; + $48 = HEAP32[(140)>>2]|0; + $shl573 = 1 << $I534$0; + $and574 = $48 & $shl573; + $tobool575 = ($and574|0)==(0); + do { + if ($tobool575) { + $or578 = $48 | $shl573; + HEAP32[(140)>>2] = $or578; + HEAP32[$arrayidx567>>2] = $p$1; + $parent579 = ((($p$1)) + 24|0); + HEAP32[$parent579>>2] = $arrayidx567; + $bk580 = ((($p$1)) + 12|0); + HEAP32[$bk580>>2] = $p$1; + $fd581 = ((($p$1)) + 8|0); + HEAP32[$fd581>>2] = $p$1; + } else { + $49 = HEAP32[$arrayidx567>>2]|0; + $cmp584 = ($I534$0|0)==(31); + $shr586 = $I534$0 >>> 1; + $sub589 = (25 - ($shr586))|0; + $cond = $cmp584 ? 0 : $sub589; + $shl590 = $psize$2 << $cond; + $K583$0 = $shl590;$T$0 = $49; + while(1) { + $head591 = ((($T$0)) + 4|0); + $50 = HEAP32[$head591>>2]|0; + $and592 = $50 & -8; + $cmp593 = ($and592|0)==($psize$2|0); + if ($cmp593) { + label = 73; + break; + } + $shr597 = $K583$0 >>> 31; + $arrayidx599 = (((($T$0)) + 16|0) + ($shr597<<2)|0); + $shl600 = $K583$0 << 1; + $51 = HEAP32[$arrayidx599>>2]|0; + $cmp601 = ($51|0)==(0|0); + if ($cmp601) { + label = 72; + break; + } else { + $K583$0 = $shl600;$T$0 = $51; + } + } + if ((label|0) == 72) { + HEAP32[$arrayidx599>>2] = $p$1; + $parent610 = ((($p$1)) + 24|0); + HEAP32[$parent610>>2] = $T$0; + $bk611 = ((($p$1)) + 12|0); + HEAP32[$bk611>>2] = $p$1; + $fd612 = ((($p$1)) + 8|0); + HEAP32[$fd612>>2] = $p$1; + break; + } + else if ((label|0) == 73) { + $fd620 = ((($T$0)) + 8|0); + $52 = HEAP32[$fd620>>2]|0; + $bk631 = ((($52)) + 12|0); + HEAP32[$bk631>>2] = $p$1; + HEAP32[$fd620>>2] = $p$1; + $fd633 = ((($p$1)) + 8|0); + HEAP32[$fd633>>2] = $52; + $bk634 = ((($p$1)) + 12|0); + HEAP32[$bk634>>2] = $T$0; + $parent635 = ((($p$1)) + 24|0); + HEAP32[$parent635>>2] = 0; + break; + } + } + } while(0); + $53 = HEAP32[(168)>>2]|0; + $dec = (($53) + -1)|0; + HEAP32[(168)>>2] = $dec; + $cmp640 = ($dec|0)==(0); + if ($cmp640) { + $sp$0$in$i = (592); + } else { + return; + } + while(1) { + $sp$0$i = HEAP32[$sp$0$in$i>>2]|0; + $cmp$i = ($sp$0$i|0)==(0|0); + $next4$i = ((($sp$0$i)) + 8|0); + if ($cmp$i) { + break; + } else { + $sp$0$in$i = $next4$i; + } + } + HEAP32[(168)>>2] = -1; + return; +} +function ___stdio_close($f) { + $f = $f|0; + var $0 = 0, $call = 0, $call1 = 0, $call2 = 0, $fd = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $fd = ((($f)) + 60|0); + $0 = HEAP32[$fd>>2]|0; + $call = (_dummy($0)|0); + HEAP32[$vararg_buffer>>2] = $call; + $call1 = (___syscall6(6,($vararg_buffer|0))|0); + $call2 = (___syscall_ret($call1)|0); + STACKTOP = sp;return ($call2|0); +} +function ___stdio_seek($f,$off,$whence) { + $f = $f|0; + $off = $off|0; + $whence = $whence|0; + var $$pre = 0, $0 = 0, $1 = 0, $2 = 0, $call = 0, $call1 = 0, $cmp = 0, $fd = 0, $ret = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr4 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer = sp; + $ret = sp + 20|0; + $fd = ((($f)) + 60|0); + $0 = HEAP32[$fd>>2]|0; + $1 = $ret; + HEAP32[$vararg_buffer>>2] = $0; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 0; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $off; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $1; + $vararg_ptr4 = ((($vararg_buffer)) + 16|0); + HEAP32[$vararg_ptr4>>2] = $whence; + $call = (___syscall140(140,($vararg_buffer|0))|0); + $call1 = (___syscall_ret($call)|0); + $cmp = ($call1|0)<(0); + if ($cmp) { + HEAP32[$ret>>2] = -1; + $2 = -1; + } else { + $$pre = HEAP32[$ret>>2]|0; + $2 = $$pre; + } + STACKTOP = sp;return ($2|0); +} +function ___syscall_ret($r) { + $r = $r|0; + var $call = 0, $cmp = 0, $retval$0 = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($r>>>0)>(4294963200); + if ($cmp) { + $sub = (0 - ($r))|0; + $call = (___errno_location()|0); + HEAP32[$call>>2] = $sub; + $retval$0 = -1; + } else { + $retval$0 = $r; + } + return ($retval$0|0); +} +function ___errno_location() { + var label = 0, sp = 0; + sp = STACKTOP; + return (632|0); +} +function _dummy($fd) { + $fd = $fd|0; + var label = 0, sp = 0; + sp = STACKTOP; + return ($fd|0); +} +function ___stdout_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $0 = 0, $1 = 0, $2 = 0, $and = 0, $call = 0, $call3 = 0, $fd = 0, $lbf = 0, $tobool = 0, $tobool2 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $write = 0, $wsz = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer = sp; + $wsz = sp + 16|0; + $write = ((($f)) + 36|0); + HEAP32[$write>>2] = 4; + $0 = HEAP32[$f>>2]|0; + $and = $0 & 64; + $tobool = ($and|0)==(0); + if ($tobool) { + $fd = ((($f)) + 60|0); + $1 = HEAP32[$fd>>2]|0; + $2 = $wsz; + HEAP32[$vararg_buffer>>2] = $1; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 21523; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $2; + $call = (___syscall54(54,($vararg_buffer|0))|0); + $tobool2 = ($call|0)==(0); + if (!($tobool2)) { + $lbf = ((($f)) + 75|0); + HEAP8[$lbf>>0] = -1; + } + } + $call3 = (___stdio_write($f,$buf,$len)|0); + STACKTOP = sp;return ($call3|0); +} +function ___stdio_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add$ptr = 0, $add$ptr32 = 0, $buf8 = 0, $buf_size = 0, $call = 0; + var $call40 = 0, $call7 = 0, $call741 = 0, $call746 = 0, $cmp = 0, $cmp12 = 0, $cmp17 = 0, $cmp24 = 0, $cmp42 = 0, $cnt$0 = 0, $dec = 0, $fd = 0, $incdec$ptr = 0, $iov$043 = 0, $iov$1 = 0, $iov_base2 = 0, $iov_len = 0, $iov_len19 = 0, $iov_len23 = 0, $iov_len3 = 0; + var $iov_len36 = 0, $iovcnt$045 = 0, $iovcnt$1 = 0, $iovs = 0, $or = 0, $rem$044 = 0, $retval$0 = 0, $sub = 0, $sub$ptr$sub = 0, $sub21 = 0, $sub28 = 0, $sub37 = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, $vararg_ptr7 = 0, $wbase = 0, $wend = 0; + var $wend14 = 0, $wpos = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $vararg_buffer3 = sp + 16|0; + $vararg_buffer = sp; + $iovs = sp + 32|0; + $wbase = ((($f)) + 28|0); + $0 = HEAP32[$wbase>>2]|0; + HEAP32[$iovs>>2] = $0; + $iov_len = ((($iovs)) + 4|0); + $wpos = ((($f)) + 20|0); + $1 = HEAP32[$wpos>>2]|0; + $sub$ptr$sub = (($1) - ($0))|0; + HEAP32[$iov_len>>2] = $sub$ptr$sub; + $iov_base2 = ((($iovs)) + 8|0); + HEAP32[$iov_base2>>2] = $buf; + $iov_len3 = ((($iovs)) + 12|0); + HEAP32[$iov_len3>>2] = $len; + $add = (($sub$ptr$sub) + ($len))|0; + $fd = ((($f)) + 60|0); + $2 = HEAP32[$fd>>2]|0; + $3 = $iovs; + HEAP32[$vararg_buffer>>2] = $2; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $3; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = 2; + $call40 = (___syscall146(146,($vararg_buffer|0))|0); + $call741 = (___syscall_ret($call40)|0); + $cmp42 = ($add|0)==($call741|0); + L1: do { + if ($cmp42) { + label = 3; + } else { + $call746 = $call741;$iov$043 = $iovs;$iovcnt$045 = 2;$rem$044 = $add; + while(1) { + $cmp12 = ($call746|0)<(0); + if ($cmp12) { + break; + } + $sub21 = (($rem$044) - ($call746))|0; + $iov_len23 = ((($iov$043)) + 4|0); + $9 = HEAP32[$iov_len23>>2]|0; + $cmp24 = ($call746>>>0)>($9>>>0); + $incdec$ptr = ((($iov$043)) + 8|0); + $iov$1 = $cmp24 ? $incdec$ptr : $iov$043; + $dec = $cmp24 << 31 >> 31; + $iovcnt$1 = (($iovcnt$045) + ($dec))|0; + $sub28 = $cmp24 ? $9 : 0; + $cnt$0 = (($call746) - ($sub28))|0; + $10 = HEAP32[$iov$1>>2]|0; + $add$ptr32 = (($10) + ($cnt$0)|0); + HEAP32[$iov$1>>2] = $add$ptr32; + $iov_len36 = ((($iov$1)) + 4|0); + $11 = HEAP32[$iov_len36>>2]|0; + $sub37 = (($11) - ($cnt$0))|0; + HEAP32[$iov_len36>>2] = $sub37; + $12 = HEAP32[$fd>>2]|0; + $13 = $iov$1; + HEAP32[$vararg_buffer3>>2] = $12; + $vararg_ptr6 = ((($vararg_buffer3)) + 4|0); + HEAP32[$vararg_ptr6>>2] = $13; + $vararg_ptr7 = ((($vararg_buffer3)) + 8|0); + HEAP32[$vararg_ptr7>>2] = $iovcnt$1; + $call = (___syscall146(146,($vararg_buffer3|0))|0); + $call7 = (___syscall_ret($call)|0); + $cmp = ($sub21|0)==($call7|0); + if ($cmp) { + label = 3; + break L1; + } else { + $call746 = $call7;$iov$043 = $iov$1;$iovcnt$045 = $iovcnt$1;$rem$044 = $sub21; + } + } + $wend14 = ((($f)) + 16|0); + HEAP32[$wend14>>2] = 0; + HEAP32[$wbase>>2] = 0; + HEAP32[$wpos>>2] = 0; + $7 = HEAP32[$f>>2]|0; + $or = $7 | 32; + HEAP32[$f>>2] = $or; + $cmp17 = ($iovcnt$045|0)==(2); + if ($cmp17) { + $retval$0 = 0; + } else { + $iov_len19 = ((($iov$043)) + 4|0); + $8 = HEAP32[$iov_len19>>2]|0; + $sub = (($len) - ($8))|0; + $retval$0 = $sub; + } + } + } while(0); + if ((label|0) == 3) { + $buf8 = ((($f)) + 44|0); + $4 = HEAP32[$buf8>>2]|0; + $buf_size = ((($f)) + 48|0); + $5 = HEAP32[$buf_size>>2]|0; + $add$ptr = (($4) + ($5)|0); + $wend = ((($f)) + 16|0); + HEAP32[$wend>>2] = $add$ptr; + $6 = $4; + HEAP32[$wbase>>2] = $6; + HEAP32[$wpos>>2] = $6; + $retval$0 = $len; + } + STACKTOP = sp;return ($retval$0|0); +} +function ___lockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function ___unlockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function ___ofl_lock() { + var label = 0, sp = 0; + sp = STACKTOP; + ___lock((636|0)); + return (644|0); +} +function ___ofl_unlock() { + var label = 0, sp = 0; + sp = STACKTOP; + ___unlock((636|0)); + return; +} +function _fflush($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $call = 0, $call1 = 0, $call11 = 0, $call118 = 0, $call17 = 0, $call23 = 0, $call7 = 0, $cmp = 0, $cmp15 = 0, $cmp21 = 0, $cond10 = 0, $cond20 = 0, $f$addr$0 = 0, $f$addr$019 = 0; + var $f$addr$022 = 0, $lock = 0, $lock14 = 0, $next = 0, $or = 0, $phitmp = 0, $r$0$lcssa = 0, $r$021 = 0, $r$1 = 0, $retval$0 = 0, $tobool = 0, $tobool12 = 0, $tobool1220 = 0, $tobool25 = 0, $tobool5 = 0, $wbase = 0, $wpos = 0, label = 0, sp = 0; + sp = STACKTOP; + $tobool = ($f|0)==(0|0); + do { + if ($tobool) { + $1 = HEAP32[33]|0; + $tobool5 = ($1|0)==(0|0); + if ($tobool5) { + $cond10 = 0; + } else { + $2 = HEAP32[33]|0; + $call7 = (_fflush($2)|0); + $cond10 = $call7; + } + $call11 = (___ofl_lock()|0); + $f$addr$019 = HEAP32[$call11>>2]|0; + $tobool1220 = ($f$addr$019|0)==(0|0); + if ($tobool1220) { + $r$0$lcssa = $cond10; + } else { + $f$addr$022 = $f$addr$019;$r$021 = $cond10; + while(1) { + $lock14 = ((($f$addr$022)) + 76|0); + $3 = HEAP32[$lock14>>2]|0; + $cmp15 = ($3|0)>(-1); + if ($cmp15) { + $call17 = (___lockfile($f$addr$022)|0); + $cond20 = $call17; + } else { + $cond20 = 0; + } + $wpos = ((($f$addr$022)) + 20|0); + $4 = HEAP32[$wpos>>2]|0; + $wbase = ((($f$addr$022)) + 28|0); + $5 = HEAP32[$wbase>>2]|0; + $cmp21 = ($4>>>0)>($5>>>0); + if ($cmp21) { + $call23 = (___fflush_unlocked($f$addr$022)|0); + $or = $call23 | $r$021; + $r$1 = $or; + } else { + $r$1 = $r$021; + } + $tobool25 = ($cond20|0)==(0); + if (!($tobool25)) { + ___unlockfile($f$addr$022); + } + $next = ((($f$addr$022)) + 56|0); + $f$addr$0 = HEAP32[$next>>2]|0; + $tobool12 = ($f$addr$0|0)==(0|0); + if ($tobool12) { + $r$0$lcssa = $r$1; + break; + } else { + $f$addr$022 = $f$addr$0;$r$021 = $r$1; + } + } + } + ___ofl_unlock(); + $retval$0 = $r$0$lcssa; + } else { + $lock = ((($f)) + 76|0); + $0 = HEAP32[$lock>>2]|0; + $cmp = ($0|0)>(-1); + if (!($cmp)) { + $call118 = (___fflush_unlocked($f)|0); + $retval$0 = $call118; + break; + } + $call = (___lockfile($f)|0); + $phitmp = ($call|0)==(0); + $call1 = (___fflush_unlocked($f)|0); + if ($phitmp) { + $retval$0 = $call1; + } else { + ___unlockfile($f); + $retval$0 = $call1; + } + } + } while(0); + return ($retval$0|0); +} +function ___fflush_unlocked($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $cmp = 0, $cmp4 = 0, $rend = 0, $retval$0 = 0, $rpos = 0, $seek = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0, $tobool = 0, $wbase = 0, $wend = 0, $wpos = 0; + var $write = 0, label = 0, sp = 0; + sp = STACKTOP; + $wpos = ((($f)) + 20|0); + $0 = HEAP32[$wpos>>2]|0; + $wbase = ((($f)) + 28|0); + $1 = HEAP32[$wbase>>2]|0; + $cmp = ($0>>>0)>($1>>>0); + if ($cmp) { + $write = ((($f)) + 36|0); + $2 = HEAP32[$write>>2]|0; + (FUNCTION_TABLE_iiii[$2 & 7]($f,0,0)|0); + $3 = HEAP32[$wpos>>2]|0; + $tobool = ($3|0)==(0|0); + if ($tobool) { + $retval$0 = -1; + } else { + label = 3; + } + } else { + label = 3; + } + if ((label|0) == 3) { + $rpos = ((($f)) + 4|0); + $4 = HEAP32[$rpos>>2]|0; + $rend = ((($f)) + 8|0); + $5 = HEAP32[$rend>>2]|0; + $cmp4 = ($4>>>0)<($5>>>0); + if ($cmp4) { + $sub$ptr$lhs$cast = $4; + $sub$ptr$rhs$cast = $5; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $seek = ((($f)) + 40|0); + $6 = HEAP32[$seek>>2]|0; + (FUNCTION_TABLE_iiii[$6 & 7]($f,$sub$ptr$sub,1)|0); + } + $wend = ((($f)) + 16|0); + HEAP32[$wend>>2] = 0; + HEAP32[$wbase>>2] = 0; + HEAP32[$wpos>>2] = 0; + HEAP32[$rend>>2] = 0; + HEAP32[$rpos>>2] = 0; + $retval$0 = 0; + } + return ($retval$0|0); +} +function runPostSets() { +} +function _memcpy(dest, src, num) { + dest = dest|0; src = src|0; num = num|0; + var ret = 0; + var aligned_dest_end = 0; + var block_aligned_dest_end = 0; + var dest_end = 0; + // Test against a benchmarked cutoff limit for when HEAPU8.set() becomes faster to use. + if ((num|0) >= + 8192 + ) { + return _emscripten_memcpy_big(dest|0, src|0, num|0)|0; + } + + ret = dest|0; + dest_end = (dest + num)|0; + if ((dest&3) == (src&3)) { + // The initial unaligned < 4-byte front. + while (dest & 3) { + if ((num|0) == 0) return ret|0; + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + dest = (dest+1)|0; + src = (src+1)|0; + num = (num-1)|0; + } + aligned_dest_end = (dest_end & -4)|0; + block_aligned_dest_end = (aligned_dest_end - 64)|0; + while ((dest|0) <= (block_aligned_dest_end|0) ) { + HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); + HEAP32[(((dest)+(4))>>2)]=((HEAP32[(((src)+(4))>>2)])|0); + HEAP32[(((dest)+(8))>>2)]=((HEAP32[(((src)+(8))>>2)])|0); + HEAP32[(((dest)+(12))>>2)]=((HEAP32[(((src)+(12))>>2)])|0); + HEAP32[(((dest)+(16))>>2)]=((HEAP32[(((src)+(16))>>2)])|0); + HEAP32[(((dest)+(20))>>2)]=((HEAP32[(((src)+(20))>>2)])|0); + HEAP32[(((dest)+(24))>>2)]=((HEAP32[(((src)+(24))>>2)])|0); + HEAP32[(((dest)+(28))>>2)]=((HEAP32[(((src)+(28))>>2)])|0); + HEAP32[(((dest)+(32))>>2)]=((HEAP32[(((src)+(32))>>2)])|0); + HEAP32[(((dest)+(36))>>2)]=((HEAP32[(((src)+(36))>>2)])|0); + HEAP32[(((dest)+(40))>>2)]=((HEAP32[(((src)+(40))>>2)])|0); + HEAP32[(((dest)+(44))>>2)]=((HEAP32[(((src)+(44))>>2)])|0); + HEAP32[(((dest)+(48))>>2)]=((HEAP32[(((src)+(48))>>2)])|0); + HEAP32[(((dest)+(52))>>2)]=((HEAP32[(((src)+(52))>>2)])|0); + HEAP32[(((dest)+(56))>>2)]=((HEAP32[(((src)+(56))>>2)])|0); + HEAP32[(((dest)+(60))>>2)]=((HEAP32[(((src)+(60))>>2)])|0); + dest = (dest+64)|0; + src = (src+64)|0; + } + while ((dest|0) < (aligned_dest_end|0) ) { + HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); + dest = (dest+4)|0; + src = (src+4)|0; + } + } else { + // In the unaligned copy case, unroll a bit as well. + aligned_dest_end = (dest_end - 4)|0; + while ((dest|0) < (aligned_dest_end|0) ) { + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + HEAP8[(((dest)+(1))>>0)]=((HEAP8[(((src)+(1))>>0)])|0); + HEAP8[(((dest)+(2))>>0)]=((HEAP8[(((src)+(2))>>0)])|0); + HEAP8[(((dest)+(3))>>0)]=((HEAP8[(((src)+(3))>>0)])|0); + dest = (dest+4)|0; + src = (src+4)|0; + } + } + // The remaining unaligned < 4 byte tail. + while ((dest|0) < (dest_end|0)) { + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + dest = (dest+1)|0; + src = (src+1)|0; + } + return ret|0; +} +function _memset(ptr, value, num) { + ptr = ptr|0; value = value|0; num = num|0; + var end = 0, aligned_end = 0, block_aligned_end = 0, value4 = 0; + end = (ptr + num)|0; + + value = value & 0xff; + if ((num|0) >= 67 /* 64 bytes for an unrolled loop + 3 bytes for unaligned head*/) { + while ((ptr&3) != 0) { + HEAP8[((ptr)>>0)]=value; + ptr = (ptr+1)|0; + } + + aligned_end = (end & -4)|0; + block_aligned_end = (aligned_end - 64)|0; + value4 = value | (value << 8) | (value << 16) | (value << 24); + + while((ptr|0) <= (block_aligned_end|0)) { + HEAP32[((ptr)>>2)]=value4; + HEAP32[(((ptr)+(4))>>2)]=value4; + HEAP32[(((ptr)+(8))>>2)]=value4; + HEAP32[(((ptr)+(12))>>2)]=value4; + HEAP32[(((ptr)+(16))>>2)]=value4; + HEAP32[(((ptr)+(20))>>2)]=value4; + HEAP32[(((ptr)+(24))>>2)]=value4; + HEAP32[(((ptr)+(28))>>2)]=value4; + HEAP32[(((ptr)+(32))>>2)]=value4; + HEAP32[(((ptr)+(36))>>2)]=value4; + HEAP32[(((ptr)+(40))>>2)]=value4; + HEAP32[(((ptr)+(44))>>2)]=value4; + HEAP32[(((ptr)+(48))>>2)]=value4; + HEAP32[(((ptr)+(52))>>2)]=value4; + HEAP32[(((ptr)+(56))>>2)]=value4; + HEAP32[(((ptr)+(60))>>2)]=value4; + ptr = (ptr + 64)|0; + } + + while ((ptr|0) < (aligned_end|0) ) { + HEAP32[((ptr)>>2)]=value4; + ptr = (ptr+4)|0; + } + } + // The remaining bytes. + while ((ptr|0) < (end|0)) { + HEAP8[((ptr)>>0)]=value; + ptr = (ptr+1)|0; + } + return (end-num)|0; +} +function _sbrk(increment) { + increment = increment|0; + var oldDynamicTop = 0; + var oldDynamicTopOnChange = 0; + var newDynamicTop = 0; + var totalMemory = 0; + increment = ((increment + 15) & -16)|0; + oldDynamicTop = HEAP32[DYNAMICTOP_PTR>>2]|0; + newDynamicTop = oldDynamicTop + increment | 0; + + if (((increment|0) > 0 & (newDynamicTop|0) < (oldDynamicTop|0)) // Detect and fail if we would wrap around signed 32-bit int. + | (newDynamicTop|0) < 0) { // Also underflow, sbrk() should be able to be used to subtract. + abortOnCannotGrowMemory()|0; + ___setErrNo(12); + return -1; + } + + HEAP32[DYNAMICTOP_PTR>>2] = newDynamicTop; + totalMemory = getTotalMemory()|0; + if ((newDynamicTop|0) > (totalMemory|0)) { + if ((enlargeMemory()|0) == 0) { + HEAP32[DYNAMICTOP_PTR>>2] = oldDynamicTop; + ___setErrNo(12); + return -1; + } + } + return oldDynamicTop|0; +} + + +function dynCall_ii(index,a1) { + index = index|0; + a1=a1|0; + return FUNCTION_TABLE_ii[index&1](a1|0)|0; +} + + +function dynCall_iiii(index,a1,a2,a3) { + index = index|0; + a1=a1|0; a2=a2|0; a3=a3|0; + return FUNCTION_TABLE_iiii[index&7](a1|0,a2|0,a3|0)|0; +} + +function b0(p0) { + p0 = p0|0; nullFunc_ii(0);return 0; +} +function b1(p0,p1,p2) { + p0 = p0|0;p1 = p1|0;p2 = p2|0; nullFunc_iiii(1);return 0; +} + +// EMSCRIPTEN_END_FUNCS +var FUNCTION_TABLE_ii = [b0,___stdio_close]; +var FUNCTION_TABLE_iiii = [b1,b1,___stdout_write,___stdio_seek,___stdio_write,b1,b1,b1]; + + return { ___errno_location: ___errno_location, _fflush: _fflush, _free: _free, _main: _main, _malloc: _malloc, _memcpy: _memcpy, _memset: _memset, _sbrk: _sbrk, dynCall_ii: dynCall_ii, dynCall_iiii: dynCall_iiii, establishStackSpace: establishStackSpace, getTempRet0: getTempRet0, runPostSets: runPostSets, setTempRet0: setTempRet0, setThrew: setThrew, stackAlloc: stackAlloc, stackRestore: stackRestore, stackSave: stackSave }; +}) +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg, Module.asmLibraryArg, buffer); + +var real____errno_location = asm["___errno_location"]; asm["___errno_location"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____errno_location.apply(null, arguments); +}; + +var real__fflush = asm["_fflush"]; asm["_fflush"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__fflush.apply(null, arguments); +}; + +var real__free = asm["_free"]; asm["_free"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__free.apply(null, arguments); +}; + +var real__main = asm["_main"]; asm["_main"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__main.apply(null, arguments); +}; + +var real__malloc = asm["_malloc"]; asm["_malloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__malloc.apply(null, arguments); +}; + +var real__sbrk = asm["_sbrk"]; asm["_sbrk"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__sbrk.apply(null, arguments); +}; + +var real_establishStackSpace = asm["establishStackSpace"]; asm["establishStackSpace"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_establishStackSpace.apply(null, arguments); +}; + +var real_getTempRet0 = asm["getTempRet0"]; asm["getTempRet0"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_getTempRet0.apply(null, arguments); +}; + +var real_setTempRet0 = asm["setTempRet0"]; asm["setTempRet0"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_setTempRet0.apply(null, arguments); +}; + +var real_setThrew = asm["setThrew"]; asm["setThrew"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_setThrew.apply(null, arguments); +}; + +var real_stackAlloc = asm["stackAlloc"]; asm["stackAlloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackAlloc.apply(null, arguments); +}; + +var real_stackRestore = asm["stackRestore"]; asm["stackRestore"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackRestore.apply(null, arguments); +}; + +var real_stackSave = asm["stackSave"]; asm["stackSave"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackSave.apply(null, arguments); +}; +var ___errno_location = Module["___errno_location"] = asm["___errno_location"]; +var _fflush = Module["_fflush"] = asm["_fflush"]; +var _free = Module["_free"] = asm["_free"]; +var _main = Module["_main"] = asm["_main"]; +var _malloc = Module["_malloc"] = asm["_malloc"]; +var _memcpy = Module["_memcpy"] = asm["_memcpy"]; +var _memset = Module["_memset"] = asm["_memset"]; +var _sbrk = Module["_sbrk"] = asm["_sbrk"]; +var establishStackSpace = Module["establishStackSpace"] = asm["establishStackSpace"]; +var getTempRet0 = Module["getTempRet0"] = asm["getTempRet0"]; +var runPostSets = Module["runPostSets"] = asm["runPostSets"]; +var setTempRet0 = Module["setTempRet0"] = asm["setTempRet0"]; +var setThrew = Module["setThrew"] = asm["setThrew"]; +var stackAlloc = Module["stackAlloc"] = asm["stackAlloc"]; +var stackRestore = Module["stackRestore"] = asm["stackRestore"]; +var stackSave = Module["stackSave"] = asm["stackSave"]; +var dynCall_ii = Module["dynCall_ii"] = asm["dynCall_ii"]; +var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"]; +; + + + +// === Auto-generated postamble setup entry stuff === + +Module['asm'] = asm; + +if (!Module["intArrayFromString"]) Module["intArrayFromString"] = function() { abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["intArrayToString"]) Module["intArrayToString"] = function() { abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["ccall"]) Module["ccall"] = function() { abort("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["cwrap"]) Module["cwrap"] = function() { abort("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["setValue"]) Module["setValue"] = function() { abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getValue"]) Module["getValue"] = function() { abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["allocate"]) Module["allocate"] = function() { abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getMemory"]) Module["getMemory"] = function() { abort("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["Pointer_stringify"]) Module["Pointer_stringify"] = function() { abort("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["AsciiToString"]) Module["AsciiToString"] = function() { abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToAscii"]) Module["stringToAscii"] = function() { abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF8ArrayToString"]) Module["UTF8ArrayToString"] = function() { abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF8ToString"]) Module["UTF8ToString"] = function() { abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF8Array"]) Module["stringToUTF8Array"] = function() { abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF8"]) Module["stringToUTF8"] = function() { abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["lengthBytesUTF8"]) Module["lengthBytesUTF8"] = function() { abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF16ToString"]) Module["UTF16ToString"] = function() { abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF16"]) Module["stringToUTF16"] = function() { abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["lengthBytesUTF16"]) Module["lengthBytesUTF16"] = function() { abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF32ToString"]) Module["UTF32ToString"] = function() { abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF32"]) Module["stringToUTF32"] = function() { abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["lengthBytesUTF32"]) Module["lengthBytesUTF32"] = function() { abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["allocateUTF8"]) Module["allocateUTF8"] = function() { abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stackTrace"]) Module["stackTrace"] = function() { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnPreRun"]) Module["addOnPreRun"] = function() { abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnInit"]) Module["addOnInit"] = function() { abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnPreMain"]) Module["addOnPreMain"] = function() { abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnExit"]) Module["addOnExit"] = function() { abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnPostRun"]) Module["addOnPostRun"] = function() { abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["writeStringToMemory"]) Module["writeStringToMemory"] = function() { abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["writeArrayToMemory"]) Module["writeArrayToMemory"] = function() { abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["writeAsciiToMemory"]) Module["writeAsciiToMemory"] = function() { abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addRunDependency"]) Module["addRunDependency"] = function() { abort("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["removeRunDependency"]) Module["removeRunDependency"] = function() { abort("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS"]) Module["FS"] = function() { abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["FS_createFolder"]) Module["FS_createFolder"] = function() { abort("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createPath"]) Module["FS_createPath"] = function() { abort("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createDataFile"]) Module["FS_createDataFile"] = function() { abort("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createPreloadedFile"]) Module["FS_createPreloadedFile"] = function() { abort("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createLazyFile"]) Module["FS_createLazyFile"] = function() { abort("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createLink"]) Module["FS_createLink"] = function() { abort("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createDevice"]) Module["FS_createDevice"] = function() { abort("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_unlink"]) Module["FS_unlink"] = function() { abort("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["GL"]) Module["GL"] = function() { abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["staticAlloc"]) Module["staticAlloc"] = function() { abort("'staticAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["dynamicAlloc"]) Module["dynamicAlloc"] = function() { abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["warnOnce"]) Module["warnOnce"] = function() { abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["loadDynamicLibrary"]) Module["loadDynamicLibrary"] = function() { abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["loadWebAssemblyModule"]) Module["loadWebAssemblyModule"] = function() { abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getLEB"]) Module["getLEB"] = function() { abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getFunctionTables"]) Module["getFunctionTables"] = function() { abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["alignFunctionTables"]) Module["alignFunctionTables"] = function() { abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["registerFunctions"]) Module["registerFunctions"] = function() { abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addFunction"]) Module["addFunction"] = function() { abort("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["removeFunction"]) Module["removeFunction"] = function() { abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getFuncWrapper"]) Module["getFuncWrapper"] = function() { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["prettyPrint"]) Module["prettyPrint"] = function() { abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["makeBigInt"]) Module["makeBigInt"] = function() { abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["dynCall"]) Module["dynCall"] = function() { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getCompilerSetting"]) Module["getCompilerSetting"] = function() { abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["intArrayFromBase64"]) Module["intArrayFromBase64"] = function() { abort("'intArrayFromBase64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["tryParseAsDataURI"]) Module["tryParseAsDataURI"] = function() { abort("'tryParseAsDataURI' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };if (!Module["ALLOC_NORMAL"]) Object.defineProperty(Module, "ALLOC_NORMAL", { get: function() { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_STACK"]) Object.defineProperty(Module, "ALLOC_STACK", { get: function() { abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_STATIC"]) Object.defineProperty(Module, "ALLOC_STATIC", { get: function() { abort("'ALLOC_STATIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_DYNAMIC"]) Object.defineProperty(Module, "ALLOC_DYNAMIC", { get: function() { abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_NONE"]) Object.defineProperty(Module, "ALLOC_NONE", { get: function() { abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); + +if (memoryInitializer) { + if (!isDataURI(memoryInitializer)) { + if (typeof Module['locateFile'] === 'function') { + memoryInitializer = Module['locateFile'](memoryInitializer); + } else if (Module['memoryInitializerPrefixURL']) { + memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer; + } + } + if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { + var data = Module['readBinary'](memoryInitializer); + HEAPU8.set(data, GLOBAL_BASE); + } else { + addRunDependency('memory initializer'); + var applyMemoryInitializer = function(data) { + if (data.byteLength) data = new Uint8Array(data); + for (var i = 0; i < data.length; i++) { + assert(HEAPU8[GLOBAL_BASE + i] === 0, "area for memory initializer should not have been touched before it's loaded"); + } + HEAPU8.set(data, GLOBAL_BASE); + // Delete the typed array that contains the large blob of the memory initializer request response so that + // we won't keep unnecessary memory lying around. However, keep the XHR object itself alive so that e.g. + // its .status field can still be accessed later. + if (Module['memoryInitializerRequest']) delete Module['memoryInitializerRequest'].response; + removeRunDependency('memory initializer'); + } + function doBrowserLoad() { + Module['readAsync'](memoryInitializer, applyMemoryInitializer, function() { + throw 'could not load memory initializer ' + memoryInitializer; + }); + } + var memoryInitializerBytes = tryParseAsDataURI(memoryInitializer); + if (memoryInitializerBytes) { + applyMemoryInitializer(memoryInitializerBytes.buffer); + } else + if (Module['memoryInitializerRequest']) { + // a network request has already been created, just use that + function useRequest() { + var request = Module['memoryInitializerRequest']; + var response = request.response; + if (request.status !== 200 && request.status !== 0) { + var data = tryParseAsDataURI(Module['memoryInitializerRequestURL']); + if (data) { + response = data.buffer; + } else { + // If you see this warning, the issue may be that you are using locateFile or memoryInitializerPrefixURL, and defining them in JS. That + // means that the HTML file doesn't know about them, and when it tries to create the mem init request early, does it to the wrong place. + // Look in your browser's devtools network console to see what's going on. + console.warn('a problem seems to have happened with Module.memoryInitializerRequest, status: ' + request.status + ', retrying ' + memoryInitializer); + doBrowserLoad(); + return; + } + } + applyMemoryInitializer(response); + } + if (Module['memoryInitializerRequest'].response) { + setTimeout(useRequest, 0); // it's already here; but, apply it asynchronously + } else { + Module['memoryInitializerRequest'].addEventListener('load', useRequest); // wait for it + } + } else { + // fetch it from the network ourselves + doBrowserLoad(); + } + } +} + + + +/** + * @constructor + * @extends {Error} + * @this {ExitStatus} + */ +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +}; +ExitStatus.prototype = new Error(); +ExitStatus.prototype.constructor = ExitStatus; + +var initialStackTop; +var calledMain = false; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!Module['calledRun']) run(); + if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +} + +Module['callMain'] = function callMain(args) { + assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on __ATMAIN__)'); + assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); + + args = args || []; + + ensureInitRuntime(); + + var argc = args.length+1; + var argv = stackAlloc((argc + 1) * 4); + HEAP32[argv >> 2] = allocateUTF8OnStack(Module['thisProgram']); + for (var i = 1; i < argc; i++) { + HEAP32[(argv >> 2) + i] = allocateUTF8OnStack(args[i - 1]); + } + HEAP32[(argv >> 2) + argc] = 0; + + + try { + + var ret = Module['_main'](argc, argv, 0); + + + // if we're not running an evented main loop, it's time to exit + exit(ret, /* implicit = */ true); + } + catch(e) { + if (e instanceof ExitStatus) { + // exit() throws this once it's done to make sure execution + // has been stopped completely + return; + } else if (e == 'SimulateInfiniteLoop') { + // running an evented main loop, don't immediately exit + Module['noExitRuntime'] = true; + return; + } else { + var toLog = e; + if (e && typeof e === 'object' && e.stack) { + toLog = [e, e.stack]; + } + Module.printErr('exception thrown: ' + toLog); + Module['quit'](1, e); + } + } finally { + calledMain = true; + } +} + + + + +/** @type {function(Array=)} */ +function run(args) { + args = args || Module['arguments']; + + if (runDependencies > 0) { + return; + } + + writeStackCookie(); + + preRun(); + + if (runDependencies > 0) return; // a preRun added a dependency, run will be called later + if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame + + function doRun() { + if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening + Module['calledRun'] = true; + + if (ABORT) return; + + ensureInitRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + if (Module['_main'] && shouldRunNow) Module['callMain'](args); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else { + doRun(); + } + checkStackCookie(); +} +Module['run'] = run; + + +function exit(status, implicit) { + + // if this is just main exit-ing implicitly, and the status is 0, then we + // don't need to do anything here and can just leave. if the status is + // non-zero, though, then we need to report it. + // (we may have warned about this earlier, if a situation justifies doing so) + if (implicit && Module['noExitRuntime'] && status === 0) { + return; + } + + if (Module['noExitRuntime']) { + // if exit() was called, we may warn the user if the runtime isn't actually being shut down + if (!implicit) { + Module.printErr('exit(' + status + ') called, but noExitRuntime is set due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)'); + } + } else { + + ABORT = true; + EXITSTATUS = status; + STACKTOP = initialStackTop; + + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } + + if (ENVIRONMENT_IS_NODE) { + process['exit'](status); + } + Module['quit'](status, new ExitStatus(status)); +} +Module['exit'] = exit; + +var abortDecorators = []; + +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + if (what !== undefined) { + Module.print(what); + Module.printErr(what); + what = JSON.stringify(what) + } else { + what = ''; + } + + ABORT = true; + EXITSTATUS = 1; + + var extra = ''; + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; +} +Module['abort'] = abort; + +// {{PRE_RUN_ADDITIONS}} + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + +// shouldRunNow refers to calling main(), not run(). +var shouldRunNow = true; +if (Module['noInitialRun']) { + shouldRunNow = false; +} + + +run(); + +// {{POST_RUN_ADDITIONS}} + + + + + +// {{MODULE_ADDITIONS}} + + + diff --git a/asm/libs/opus/a.out.js b/asm/libs/opus/a.out.js new file mode 100644 index 00000000..df5a6eb8 --- /dev/null +++ b/asm/libs/opus/a.out.js @@ -0,0 +1,5469 @@ +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module !== 'undefined' ? Module : {}; + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) +// {{PRE_JSES}} + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = {}; +var key; +for (key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +Module['arguments'] = []; +Module['thisProgram'] = './this.program'; +Module['quit'] = function(status, toThrow) { + throw toThrow; +}; +Module['preRun'] = []; +Module['postRun'] = []; + +// The environment setup code below is customized to use Module. +// *** Environment setup code *** +var ENVIRONMENT_IS_WEB = false; +var ENVIRONMENT_IS_WORKER = false; +var ENVIRONMENT_IS_NODE = false; +var ENVIRONMENT_IS_SHELL = false; + +// Three configurations we can be running in: +// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) +// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) +// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) + +if (Module['ENVIRONMENT']) { + if (Module['ENVIRONMENT'] === 'WEB') { + ENVIRONMENT_IS_WEB = true; + } else if (Module['ENVIRONMENT'] === 'WORKER') { + ENVIRONMENT_IS_WORKER = true; + } else if (Module['ENVIRONMENT'] === 'NODE') { + ENVIRONMENT_IS_NODE = true; + } else if (Module['ENVIRONMENT'] === 'SHELL') { + ENVIRONMENT_IS_SHELL = true; + } else { + throw new Error('Module[\'ENVIRONMENT\'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.'); + } +} else { + ENVIRONMENT_IS_WEB = typeof window === 'object'; + ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; + ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function' && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER; + ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; +} + + +if (ENVIRONMENT_IS_NODE) { + // Expose functionality in the same simple way that the shells work + // Note that we pollute the global namespace here, otherwise we break in node + var nodeFS; + var nodePath; + + Module['read'] = function shell_read(filename, binary) { + var ret; + ret = tryParseAsDataURI(filename); + if (!ret) { + if (!nodeFS) nodeFS = require('fs'); + if (!nodePath) nodePath = require('path'); + filename = nodePath['normalize'](filename); + ret = nodeFS['readFileSync'](filename); + } + return binary ? ret : ret.toString(); + }; + + Module['readBinary'] = function readBinary(filename) { + var ret = Module['read'](filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; + + if (process['argv'].length > 1) { + Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); + } + + Module['arguments'] = process['argv'].slice(2); + + if (typeof module !== 'undefined') { + module['exports'] = Module; + } + + process['on']('uncaughtException', function(ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + // Currently node will swallow unhandled rejections, but this behavior is + // deprecated, and in the future it will exit with error status. + process['on']('unhandledRejection', function(reason, p) { + Module['printErr']('node.js exiting due to unhandled promise rejection'); + process['exit'](1); + }); + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; +} +else if (ENVIRONMENT_IS_SHELL) { + if (typeof read != 'undefined') { + Module['read'] = function shell_read(f) { + var data = tryParseAsDataURI(f); + if (data) { + return intArrayToString(data); + } + return read(f); + }; + } + + Module['readBinary'] = function readBinary(f) { + var data; + data = tryParseAsDataURI(f); + if (data) { + return data; + } + if (typeof readbuffer === 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data === 'object'); + return data; + }; + + if (typeof scriptArgs != 'undefined') { + Module['arguments'] = scriptArgs; + } else if (typeof arguments != 'undefined') { + Module['arguments'] = arguments; + } + + if (typeof quit === 'function') { + Module['quit'] = function(status, toThrow) { + quit(status); + } + } +} +else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + Module['read'] = function shell_read(url) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + } catch (err) { + var data = tryParseAsDataURI(url); + if (data) { + return intArrayToString(data); + } + throw err; + } + }; + + if (ENVIRONMENT_IS_WORKER) { + Module['readBinary'] = function readBinary(url) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(xhr.response); + } catch (err) { + var data = tryParseAsDataURI(url); + if (data) { + return data; + } + throw err; + } + }; + } + + Module['readAsync'] = function readAsync(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = function xhr_onload() { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + var data = tryParseAsDataURI(url); + if (data) { + onload(data.buffer); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + + if (typeof arguments != 'undefined') { + Module['arguments'] = arguments; + } + + Module['setWindowTitle'] = function(title) { document.title = title }; +} +else { + // Unreachable because SHELL is dependent on the others + throw new Error('unknown runtime environment'); +} + +// console.log is checked first, as 'print' on the web will open a print dialogue +// printErr is preferable to console.warn (works better in shells) +// bind(console) is necessary to fix IE/Edge closed dev tools panel behavior. +Module['print'] = typeof console !== 'undefined' ? console.log.bind(console) : (typeof print !== 'undefined' ? print : null); +Module['printErr'] = typeof printErr !== 'undefined' ? printErr : ((typeof console !== 'undefined' && console.warn.bind(console)) || Module['print']); + +// *** Environment setup code *** + +// Closure helpers +Module.print = Module['print']; +Module.printErr = Module['printErr']; + +// Merge back in the overrides +for (key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = undefined; + + + +// {{PREAMBLE_ADDITIONS}} + +var STACK_ALIGN = 16; + +// stack management, and other functionality that is provided by the compiled code, +// should not be used before it is ready +stackSave = stackRestore = stackAlloc = setTempRet0 = getTempRet0 = function() { + abort('cannot use the stack before compiled code is ready to run, and has provided stack access'); +}; + +function staticAlloc(size) { + assert(!staticSealed); + var ret = STATICTOP; + STATICTOP = (STATICTOP + size + 15) & -16; + return ret; +} + +function dynamicAlloc(size) { + assert(DYNAMICTOP_PTR); + var ret = HEAP32[DYNAMICTOP_PTR>>2]; + var end = (ret + size + 15) & -16; + HEAP32[DYNAMICTOP_PTR>>2] = end; + if (end >= TOTAL_MEMORY) { + var success = enlargeMemory(); + if (!success) { + HEAP32[DYNAMICTOP_PTR>>2] = ret; + return 0; + } + } + return ret; +} + +function alignMemory(size, factor) { + if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default + var ret = size = Math.ceil(size / factor) * factor; + return ret; +} + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': return 1; + case 'i16': return 2; + case 'i32': return 4; + case 'i64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length-1] === '*') { + return 4; // A pointer + } else if (type[0] === 'i') { + var bits = parseInt(type.substr(1)); + assert(bits % 8 === 0); + return bits / 8; + } else { + return 0; + } + } + } +} + +function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + Module.printErr(text); + } +} + + + +var jsCallStartIndex = 1; +var functionPointers = new Array(0); + +// 'sig' parameter is only used on LLVM wasm backend +function addFunction(func, sig) { + if (typeof sig === 'undefined') { + Module.printErr('Warning: addFunction: Provide a wasm function signature ' + + 'string as a second argument'); + } + var base = 0; + for (var i = base; i < base + 0; i++) { + if (!functionPointers[i]) { + functionPointers[i] = func; + return jsCallStartIndex + i; + } + } + throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; +} + +function removeFunction(index) { + functionPointers[index-jsCallStartIndex] = null; +} + +var funcWrappers = {}; + +function getFuncWrapper(func, sig) { + if (!func) return; // on null pointer, return undefined + assert(sig); + if (!funcWrappers[sig]) { + funcWrappers[sig] = {}; + } + var sigCache = funcWrappers[sig]; + if (!sigCache[func]) { + // optimize away arguments usage in common cases + if (sig.length === 1) { + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func); + }; + } else if (sig.length === 2) { + sigCache[func] = function dynCall_wrapper(arg) { + return dynCall(sig, func, [arg]); + }; + } else { + // general case + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func, Array.prototype.slice.call(arguments)); + }; + } + } + return sigCache[func]; +} + + +function makeBigInt(low, high, unsigned) { + return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0)); +} + +function dynCall(sig, ptr, args) { + if (args && args.length) { + assert(args.length == sig.length-1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); + } else { + assert(sig.length == 1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].call(null, ptr); + } +} + + +function getCompilerSetting(name) { + throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for getCompilerSetting or emscripten_get_compiler_setting to work'; +} + +var Runtime = { + // FIXME backwards compatibility layer for ports. Support some Runtime.* + // for now, fix it there, then remove it from here. That way we + // can minimize any period of breakage. + dynCall: dynCall, // for SDL2 port + // helpful errors + getTempRet0: function() { abort('getTempRet0() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + staticAlloc: function() { abort('staticAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + stackAlloc: function() { abort('stackAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, +}; + +// The address globals begin at. Very low in memory, for code size and optimization opportunities. +// Above 0 is static memory, starting with globals. +// Then the stack. +// Then 'dynamic' memory for sbrk. +var GLOBAL_BASE = 8; + + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + + + +//======================================== +// Runtime essentials +//======================================== + +var ABORT = 0; // whether we are quitting the application. no code should run after this. set in exit() and abort() +var EXITSTATUS = 0; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +var globalScope = this; + +// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) +function getCFunc(ident) { + var func = Module['_' + ident]; // closure exported function + assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); + return func; +} + +var JSfuncs = { + // Helpers for cwrap -- it can't refer to Runtime directly because it might + // be renamed by closure, instead it calls JSfuncs['stackSave'].body to find + // out what the minified function name is. + 'stackSave': function() { + stackSave() + }, + 'stackRestore': function() { + stackRestore() + }, + // type conversion from js to c + 'arrayToC' : function(arr) { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + }, + 'stringToC' : function(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { // null string + // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' + var len = (str.length << 2) + 1; + ret = stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + } +}; +// For fast lookup of conversion functions +var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']}; + +// C calling interface. +function ccall (ident, returnType, argTypes, args, opts) { + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + assert(returnType !== 'array', 'Return type should not be "array".'); + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + if (returnType === 'string') ret = Pointer_stringify(ret); + if (stack !== 0) { + stackRestore(stack); + } + return ret; +} + +function cwrap (ident, returnType, argTypes) { + argTypes = argTypes || []; + var cfunc = getCFunc(ident); + // When the function takes numbers and returns a number, we can just return + // the original function + var numericArgs = argTypes.every(function(type){ return type === 'number'}); + var numericRet = returnType !== 'string'; + if (numericRet && numericArgs) { + return cfunc; + } + return function() { + return ccall(ident, returnType, argTypes, arguments); + } +} + +/** @type {function(number, number, string, boolean=)} */ +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': HEAP8[((ptr)>>0)]=value; break; + case 'i8': HEAP8[((ptr)>>0)]=value; break; + case 'i16': HEAP16[((ptr)>>1)]=value; break; + case 'i32': HEAP32[((ptr)>>2)]=value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)]=value; break; + case 'double': HEAPF64[((ptr)>>3)]=value; break; + default: abort('invalid type for setValue: ' + type); + } +} + +/** @type {function(number, string, boolean=)} */ +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + default: abort('invalid type for getValue: ' + type); + } + return null; +} + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_STATIC = 2; // Cannot be freed +var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk +var ALLOC_NONE = 4; // Do not allocate + +// allocate(): This is for internal use. You can use it yourself as well, but the interface +// is a little tricky (see docs right below). The reason is that it is optimized +// for multiple syntaxes to save space in generated code. So you should +// normally not use allocate(), and instead allocate memory using _malloc(), +// initialize it with setValue(), and so forth. +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block. This only matters if there +// is initial data - if @slab is a number, then this does not matter at all and is +// ignored. +// @allocator: How to allocate memory, see ALLOC_* +/** @type {function((TypedArray|Array|number), string, number, number=)} */ +function allocate(slab, types, allocator, ptr) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret; + if (allocator == ALLOC_NONE) { + ret = ptr; + } else { + ret = [typeof _malloc === 'function' ? _malloc : staticAlloc, stackAlloc, staticAlloc, dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length)); + } + + if (zeroinit) { + var stop; + ptr = ret; + assert((ret & 3) == 0); + stop = ret + (size & ~3); + for (; ptr < stop; ptr += 4) { + HEAP32[((ptr)>>2)]=0; + } + stop = ret + size; + while (ptr < stop) { + HEAP8[((ptr++)>>0)]=0; + } + return ret; + } + + if (singleType === 'i8') { + if (slab.subarray || slab.slice) { + HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; + } + + var i = 0, type, typeSize, previousType; + while (i < size) { + var curr = slab[i]; + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + assert(type, 'Must know what type to store in allocate!'); + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret+i, curr, type); + + // no need to look up size unless type changes, so cache it + if (previousType !== type) { + typeSize = getNativeTypeSize(type); + previousType = type; + } + i += typeSize; + } + + return ret; +} + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!staticSealed) return staticAlloc(size); + if (!runtimeInitialized) return dynamicAlloc(size); + return _malloc(size); +} + +/** @type {function(number, number=)} */ +function Pointer_stringify(ptr, length) { + if (length === 0 || !ptr) return ''; + // TODO: use TextDecoder + // Find the length, and check for UTF while doing so + var hasUtf = 0; + var t; + var i = 0; + while (1) { + assert(ptr + i < TOTAL_MEMORY); + t = HEAPU8[(((ptr)+(i))>>0)]; + hasUtf |= t; + if (t == 0 && !length) break; + i++; + if (length && i == length) break; + } + if (!length) length = i; + + var ret = ''; + + if (hasUtf < 128) { + var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack + var curr; + while (length > 0) { + curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK))); + ret = ret ? ret + curr : curr; + ptr += MAX_CHUNK; + length -= MAX_CHUNK; + } + return ret; + } + return UTF8ToString(ptr); +} + +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAP8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; +function UTF8ArrayToString(u8Array, idx) { + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + while (u8Array[endPtr]) ++endPtr; + + if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) { + return UTF8Decoder.decode(u8Array.subarray(idx, endPtr)); + } else { + var u0, u1, u2, u3, u4, u5; + + var str = ''; + while (1) { + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + u0 = u8Array[idx++]; + if (!u0) return str; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + u3 = u8Array[idx++] & 63; + if ((u0 & 0xF8) == 0xF0) { + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3; + } else { + u4 = u8Array[idx++] & 63; + if ((u0 & 0xFC) == 0xF8) { + u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4; + } else { + u5 = u8Array[idx++] & 63; + u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5; + } + } + } + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + } +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function UTF8ToString(ptr) { + return UTF8ArrayToString(HEAPU8,ptr); +} + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x1FFFFF) { + if (outIdx + 3 >= endIdx) break; + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x3FFFFFF) { + if (outIdx + 4 >= endIdx) break; + outU8Array[outIdx++] = 0xF8 | (u >> 24); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 5 >= endIdx) break; + outU8Array[outIdx++] = 0xFC | (u >> 30); + outU8Array[outIdx++] = 0x80 | ((u >> 24) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + ++len; + } else if (u <= 0x7FF) { + len += 2; + } else if (u <= 0xFFFF) { + len += 3; + } else if (u <= 0x1FFFFF) { + len += 4; + } else if (u <= 0x3FFFFFF) { + len += 5; + } else { + len += 6; + } + } + return len; +} + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; +function UTF16ToString(ptr) { + assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!'); + var endPtr = ptr; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + var idx = endPtr >> 1; + while (HEAP16[idx]) ++idx; + endPtr = idx << 1; + + if (endPtr - ptr > 32 && UTF16Decoder) { + return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); + } else { + var i = 0; + + var str = ''; + while (1) { + var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; + if (codeUnit == 0) return str; + ++i; + // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. + str += String.fromCharCode(codeUnit); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; + } + // Null-terminate the pointer to the HEAP. + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} + +function UTF32ToString(ptr) { + assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!'); + var i = 0; + + var str = ''; + while (1) { + var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; + if (utf32 == 0) + return str; + ++i; + // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + if (utf32 >= 0x10000) { + var ch = utf32 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } else { + str += String.fromCharCode(utf32); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + assert(outPtr % 4 == 0, 'Pointer passed to stringToUTF32 must be aligned to four bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + // 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. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); + } + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + // Null-terminate the pointer to the HEAP. + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // 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. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} + +// Allocate heap space for a JS string, and write it there. +// It is the responsibility of the caller to free() that memory. +function allocateUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Allocate stack space for a JS string, and write it there. +function allocateUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +function demangle(func) { + warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); + return func; +} + +function demangleAll(text) { + var regex = + /__Z[\w\d_]+/g; + return text.replace(regex, + function(x) { + var y = demangle(x); + return x === y ? x : (x + ' [' + y + ']'); + }); +} + +function jsStackTrace() { + var err = new Error(); + if (!err.stack) { + // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, + // so try that as a special-case. + try { + throw new Error(0); + } catch(e) { + err = e; + } + if (!err.stack) { + return '(no stack trace available)'; + } + } + return err.stack.toString(); +} + +function stackTrace() { + var js = jsStackTrace(); + if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); + return demangleAll(js); +} + +// Memory management + +var PAGE_SIZE = 16384; +var WASM_PAGE_SIZE = 65536; +var ASMJS_PAGE_SIZE = 16777216; +var MIN_TOTAL_MEMORY = 16777216; + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - (x % multiple); + } + return x; +} + +var HEAP, +/** @type {ArrayBuffer} */ + buffer, +/** @type {Int8Array} */ + HEAP8, +/** @type {Uint8Array} */ + HEAPU8, +/** @type {Int16Array} */ + HEAP16, +/** @type {Uint16Array} */ + HEAPU16, +/** @type {Int32Array} */ + HEAP32, +/** @type {Uint32Array} */ + HEAPU32, +/** @type {Float32Array} */ + HEAPF32, +/** @type {Float64Array} */ + HEAPF64; + +function updateGlobalBuffer(buf) { + Module['buffer'] = buffer = buf; +} + +function updateGlobalBufferViews() { + Module['HEAP8'] = HEAP8 = new Int8Array(buffer); + Module['HEAP16'] = HEAP16 = new Int16Array(buffer); + Module['HEAP32'] = HEAP32 = new Int32Array(buffer); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buffer); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buffer); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buffer); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buffer); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buffer); +} + +var STATIC_BASE, STATICTOP, staticSealed; // static area +var STACK_BASE, STACKTOP, STACK_MAX; // stack area +var DYNAMIC_BASE, DYNAMICTOP_PTR; // dynamic area handled by sbrk + + STATIC_BASE = STATICTOP = STACK_BASE = STACKTOP = STACK_MAX = DYNAMIC_BASE = DYNAMICTOP_PTR = 0; + staticSealed = false; + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + assert((STACK_MAX & 3) == 0); + HEAPU32[(STACK_MAX >> 2)-1] = 0x02135467; + HEAPU32[(STACK_MAX >> 2)-2] = 0x89BACDFE; +} + +function checkStackCookie() { + if (HEAPU32[(STACK_MAX >> 2)-1] != 0x02135467 || HEAPU32[(STACK_MAX >> 2)-2] != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x' + HEAPU32[(STACK_MAX >> 2)-2].toString(16) + ' ' + HEAPU32[(STACK_MAX >> 2)-1].toString(16)); + } + // Also test the global address 0 for integrity. This check is not compatible with SAFE_SPLIT_MEMORY though, since that mode already tests all address 0 accesses on its own. + if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) throw 'Runtime error: The application has corrupted its heap memory area (address zero)!'; +} + +function abortStackOverflow(allocSize) { + abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!'); +} + +function abortOnCannotGrowMemory() { + 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 -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); +} + + +function enlargeMemory() { + abortOnCannotGrowMemory(); +} + + +var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; +var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; +if (TOTAL_MEMORY < TOTAL_STACK) Module.printErr('TOTAL_MEMORY should be larger than TOTAL_STACK, was ' + TOTAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); + +// Initialize the runtime's memory +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, + 'JS engine does not provide full typed array support'); + + + +// Use a provided buffer, if there is one, or else allocate a new one +if (Module['buffer']) { + buffer = Module['buffer']; + assert(buffer.byteLength === TOTAL_MEMORY, 'provided buffer should be ' + TOTAL_MEMORY + ' bytes, but it is ' + buffer.byteLength); +} else { + // Use a WebAssembly memory where available + { + buffer = new ArrayBuffer(TOTAL_MEMORY); + } + assert(buffer.byteLength === TOTAL_MEMORY); + Module['buffer'] = buffer; +} +updateGlobalBufferViews(); + + +function getTotalMemory() { + return TOTAL_MEMORY; +} + +// Endianness check (note: assumes compiler arch was little-endian) + HEAP32[0] = 0x63736d65; /* 'emsc' */ +HEAP16[1] = 0x6373; +if (HEAPU8[2] !== 0x73 || HEAPU8[3] !== 0x63) throw 'Runtime error: expected the system to be little-endian!'; + +function callRuntimeCallbacks(callbacks) { + while(callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(); + continue; + } + var func = callback.func; + if (typeof func === 'number') { + if (callback.arg === undefined) { + Module['dynCall_v'](func); + } else { + Module['dynCall_vi'](func, callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the runtime has exited + +var runtimeInitialized = false; +var runtimeExited = false; + + +function preRun() { + // compatibility - merge in anything from Module['preRun'] at this time + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + callRuntimeCallbacks(__ATPRERUN__); +} + +function ensureInitRuntime() { + checkStackCookie(); + if (runtimeInitialized) return; + runtimeInitialized = true; + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + checkStackCookie(); + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + checkStackCookie(); + callRuntimeCallbacks(__ATEXIT__); + runtimeExited = true; +} + +function postRun() { + checkStackCookie(); + // compatibility - merge in anything from Module['postRun'] at this time + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { + __ATEXIT__.unshift(cb); +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +// Deprecated: This function should not be called because it is unsafe and does not provide +// a maximum length limit of how many bytes it is allowed to write. Prefer calling the +// function stringToUTF8Array() instead, which takes in a maximum length that can be used +// to be secure from out of bounds writes. +/** @deprecated */ +function writeStringToMemory(string, buffer, dontAddNull) { + warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); + + var /** @type {number} */ lastChar, /** @type {number} */ end; + if (dontAddNull) { + // stringToUTF8Array always appends null. If we don't want to do that, remember the + // character that existed at the location where the null will be placed, and restore + // that after the write (below). + end = buffer + lengthBytesUTF8(string); + lastChar = HEAP8[end]; + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. +} + +function writeArrayToMemory(array, buffer) { + assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)') + HEAP8.set(array, buffer); +} + +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + assert(str.charCodeAt(i) === str.charCodeAt(i)&0xff); + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); + } + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; +} + +function unSign(value, bits, ignore) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; +} +function reSign(value, bits, ignore) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 + : Math.pow(2, bits-1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + +assert(Math['imul'] && Math['fround'] && Math['clz32'] && Math['trunc'], 'this is a legacy browser, build with LEGACY_VM_SUPPORT'); + +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_fround = Math.fround; +var Math_round = Math.round; +var Math_min = Math.min; +var Math_max = Math.max; +var Math_clz32 = Math.clz32; +var Math_trunc = Math.trunc; + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// PRE_RUN_ADDITIONS (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } + return id; +} + +function addRunDependency(id) { + runDependencies++; + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval !== 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function() { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + Module.printErr('still waiting on run dependencies:'); + } + Module.printErr('dependency: ' + dep); + } + if (shown) { + Module.printErr('(end of list)'); + } + }, 10000); + } + } else { + Module.printErr('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + Module.printErr('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +Module["preloadedImages"] = {}; // maps url to image data +Module["preloadedAudios"] = {}; // maps url to audio data + + + +var memoryInitializer = null; + + + +var /* show errors on likely calls to FS when it was not included */ FS = { + error: function() { + abort('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1'); + }, + init: function() { FS.error() }, + createDataFile: function() { FS.error() }, + createPreloadedFile: function() { FS.error() }, + createLazyFile: function() { FS.error() }, + open: function() { FS.error() }, + mkdev: function() { FS.error() }, + registerDevice: function() { FS.error() }, + analyzePath: function() { FS.error() }, + loadFilesFromDB: function() { FS.error() }, + + ErrnoError: function ErrnoError() { FS.error() }, +}; +Module['FS_createDataFile'] = FS.createDataFile; +Module['FS_createPreloadedFile'] = FS.createPreloadedFile; + + + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + return String.prototype.startsWith ? + filename.startsWith(dataURIPrefix) : + filename.indexOf(dataURIPrefix) === 0; +} + + + + + +// === Body === + +var ASM_CONSTS = []; + + + + +STATIC_BASE = GLOBAL_BASE; + +STATICTOP = STATIC_BASE + 1680; +/* global initializers */ __ATINIT__.push(); + + +memoryInitializer = "data:application/octet-stream;base64,BQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAMAAACQAgAAAAQAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACv////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAg="; + + + + + +/* no memory initializer */ +var tempDoublePtr = STATICTOP; STATICTOP += 16; + +assert(tempDoublePtr % 8 == 0); + +function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much + + HEAP8[tempDoublePtr] = HEAP8[ptr]; + + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + +} + +function copyTempDouble(ptr) { + + HEAP8[tempDoublePtr] = HEAP8[ptr]; + + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + + HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; + + HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; + + HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; + + HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; + +} + +// {{PRE_LIBRARY}} + + + function ___lock() {} + + + var SYSCALLS={varargs:0,get:function (varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function () { + var ret = Pointer_stringify(SYSCALLS.get()); + return ret; + },get64:function () { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function () { + assert(SYSCALLS.get() === 0); + }};function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + // NOTE: offset_high is unused - Emscripten's off_t is 32-bit + var offset = offset_low; + FS.llseek(stream, offset, whence); + HEAP32[((result)>>2)]=stream.position; + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + function flush_NO_FILESYSTEM() { + // flush anything remaining in the buffers during shutdown + var fflush = Module["_fflush"]; + if (fflush) fflush(0); + var printChar = ___syscall146.printChar; + if (!printChar) return; + var buffers = ___syscall146.buffers; + if (buffers[1].length) printChar(1, 10); + if (buffers[2].length) printChar(2, 10); + }function ___syscall146(which, varargs) {SYSCALLS.varargs = varargs; + try { + // writev + // hack to support printf in NO_FILESYSTEM + var stream = SYSCALLS.get(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + var ret = 0; + if (!___syscall146.buffers) { + ___syscall146.buffers = [null, [], []]; // 1 => stdout, 2 => stderr + ___syscall146.printChar = function(stream, curr) { + var buffer = ___syscall146.buffers[stream]; + assert(buffer); + if (curr === 0 || curr === 10) { + (stream === 1 ? Module['print'] : Module['printErr'])(UTF8ArrayToString(buffer, 0)); + buffer.length = 0; + } else { + buffer.push(curr); + } + }; + } + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + for (var j = 0; j < len; j++) { + ___syscall146.printChar(stream, HEAPU8[ptr+j]); + } + ret += len; + } + return ret; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs; + try { + // ioctl + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___unlock() {} + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + return dest; + } + + + + + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; + else Module.printErr('failed to set errno from JS'); + return value; + } +__ATEXIT__.push(flush_NO_FILESYSTEM);; +DYNAMICTOP_PTR = staticAlloc(4); + +STACK_BASE = STACKTOP = alignMemory(STATICTOP); + +STACK_MAX = STACK_BASE + TOTAL_STACK; + +DYNAMIC_BASE = alignMemory(STACK_MAX); + +HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE; + +staticSealed = true; // seal the static portion of memory + +assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack"); + +var ASSERTIONS = true; + +/** @type {function(string, boolean=, number=)} */ +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + if (ASSERTIONS) { + assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); + } + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} + + +// Copied from https://github.com/strophe/strophejs/blob/e06d027/src/polyfills.js#L149 + +// This code was written by Tyler Akins and has been placed in the +// public domain. It would be nice if you left this header intact. +// Base64 code from Tyler Akins -- http://rumkin.com + +/** + * Decodes a base64 string. + * @param {String} input The string to decode. + */ +var decodeBase64 = typeof atob === 'function' ? atob : function (input) { + var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + var output = ''; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + // remove all characters that are not A-Z, a-z, 0-9, +, /, or = + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); + do { + enc1 = keyStr.indexOf(input.charAt(i++)); + enc2 = keyStr.indexOf(input.charAt(i++)); + enc3 = keyStr.indexOf(input.charAt(i++)); + enc4 = keyStr.indexOf(input.charAt(i++)); + + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + + output = output + String.fromCharCode(chr1); + + if (enc3 !== 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 !== 64) { + output = output + String.fromCharCode(chr3); + } + } while (i < input.length); + return output; +}; + +// Converts a string of base64 into a byte array. +// Throws error on invalid input. +function intArrayFromBase64(s) { + if (typeof ENVIRONMENT_IS_NODE === 'boolean' && ENVIRONMENT_IS_NODE) { + var buf; + try { + buf = Buffer.from(s, 'base64'); + } catch (_) { + buf = new Buffer(s, 'base64'); + } + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + + try { + var decoded = decodeBase64(s); + var bytes = new Uint8Array(decoded.length); + for (var i = 0 ; i < decoded.length ; ++i) { + bytes[i] = decoded.charCodeAt(i); + } + return bytes; + } catch (_) { + throw new Error('Converting base64 string to bytes failed.'); + } +} + +// If filename is a base64 data URI, parses and returns data (Buffer on node, +// Uint8Array otherwise). If filename is not a base64 data URI, returns undefined. +function tryParseAsDataURI(filename) { + if (!isDataURI(filename)) { + return; + } + + return intArrayFromBase64(filename.slice(dataURIPrefix.length)); +} + + + +function nullFunc_ii(x) { Module["printErr"]("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function nullFunc_iiii(x) { Module["printErr"]("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) } + +function invoke_ii(index,a1) { + try { + return Module["dynCall_ii"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_iiii(index,a1,a2,a3) { + try { + return Module["dynCall_iiii"](index,a1,a2,a3); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity }; + +Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "abortStackOverflow": abortStackOverflow, "nullFunc_ii": nullFunc_ii, "nullFunc_iiii": nullFunc_iiii, "invoke_ii": invoke_ii, "invoke_iiii": invoke_iiii, "___lock": ___lock, "___setErrNo": ___setErrNo, "___syscall140": ___syscall140, "___syscall146": ___syscall146, "___syscall54": ___syscall54, "___syscall6": ___syscall6, "___unlock": ___unlock, "_emscripten_memcpy_big": _emscripten_memcpy_big, "flush_NO_FILESYSTEM": flush_NO_FILESYSTEM, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX }; +// EMSCRIPTEN_START_ASM +var asm = (/** @suppress {uselessCode} */ function(global, env, buffer) { +'almost asm'; + + + var HEAP8 = new global.Int8Array(buffer); + var HEAP16 = new global.Int16Array(buffer); + var HEAP32 = new global.Int32Array(buffer); + var HEAPU8 = new global.Uint8Array(buffer); + var HEAPU16 = new global.Uint16Array(buffer); + var HEAPU32 = new global.Uint32Array(buffer); + var HEAPF32 = new global.Float32Array(buffer); + var HEAPF64 = new global.Float64Array(buffer); + + var DYNAMICTOP_PTR=env.DYNAMICTOP_PTR|0; + var tempDoublePtr=env.tempDoublePtr|0; + var ABORT=env.ABORT|0; + var STACKTOP=env.STACKTOP|0; + var STACK_MAX=env.STACK_MAX|0; + + var __THREW__ = 0; + var threwValue = 0; + var setjmpId = 0; + var undef = 0; + var nan = global.NaN, inf = global.Infinity; + var tempInt = 0, tempBigInt = 0, tempBigIntS = 0, tempValue = 0, tempDouble = 0.0; + var tempRet0 = 0; + + var Math_floor=global.Math.floor; + var Math_abs=global.Math.abs; + var Math_sqrt=global.Math.sqrt; + var Math_pow=global.Math.pow; + var Math_cos=global.Math.cos; + var Math_sin=global.Math.sin; + var Math_tan=global.Math.tan; + var Math_acos=global.Math.acos; + var Math_asin=global.Math.asin; + var Math_atan=global.Math.atan; + var Math_atan2=global.Math.atan2; + var Math_exp=global.Math.exp; + var Math_log=global.Math.log; + var Math_ceil=global.Math.ceil; + var Math_imul=global.Math.imul; + var Math_min=global.Math.min; + var Math_max=global.Math.max; + var Math_clz32=global.Math.clz32; + var abort=env.abort; + var assert=env.assert; + var enlargeMemory=env.enlargeMemory; + var getTotalMemory=env.getTotalMemory; + var abortOnCannotGrowMemory=env.abortOnCannotGrowMemory; + var abortStackOverflow=env.abortStackOverflow; + var nullFunc_ii=env.nullFunc_ii; + var nullFunc_iiii=env.nullFunc_iiii; + var invoke_ii=env.invoke_ii; + var invoke_iiii=env.invoke_iiii; + var ___lock=env.___lock; + var ___setErrNo=env.___setErrNo; + var ___syscall140=env.___syscall140; + var ___syscall146=env.___syscall146; + var ___syscall54=env.___syscall54; + var ___syscall6=env.___syscall6; + var ___unlock=env.___unlock; + var _emscripten_memcpy_big=env._emscripten_memcpy_big; + var flush_NO_FILESYSTEM=env.flush_NO_FILESYSTEM; + var tempFloat = 0.0; + +// EMSCRIPTEN_START_FUNCS + +function stackAlloc(size) { + size = size|0; + var ret = 0; + ret = STACKTOP; + STACKTOP = (STACKTOP + size)|0; + STACKTOP = (STACKTOP + 15)&-16; + if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(size|0); + + return ret|0; +} +function stackSave() { + return STACKTOP|0; +} +function stackRestore(top) { + top = top|0; + STACKTOP = top; +} +function establishStackSpace(stackBase, stackMax) { + stackBase = stackBase|0; + stackMax = stackMax|0; + STACKTOP = stackBase; + STACK_MAX = stackMax; +} + +function setThrew(threw, value) { + threw = threw|0; + value = value|0; + if ((__THREW__|0) == 0) { + __THREW__ = threw; + threwValue = value; + } +} + +function setTempRet0(value) { + value = value|0; + tempRet0 = value; +} +function getTempRet0() { + return tempRet0|0; +} + +function _main() { + var $retval = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $retval = 0; + STACKTOP = sp;return 0; +} +function _malloc($bytes) { + $bytes = $bytes|0; + var $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i134 = 0, $$pre$i187 = 0, $$pre$i28$i = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i188Z2D = 0, $$pre$phi$i29$iZ2D = 0, $$pre$phi$iZ2D = 0, $$pre$phiZ2D = 0, $$sink$i = 0, $$sink$i$i = 0, $$sink$i167 = 0, $$sink2$i = 0, $$sink2$i184 = 0, $$sink4$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0; + var $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0; + var $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0; + var $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0; + var $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F$0$i$i = 0, $F104$0 = 0; + var $F197$0$i = 0, $F224$0$i$i = 0, $F290$0$i = 0, $I252$0$i$i = 0, $I316$0$i = 0, $I57$0$i$i = 0, $K105$0$i$i = 0, $K305$0$i$i = 0, $K373$0$i = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i176 = 0, $R$3$i = 0, $R$3$i$i = 0, $R$3$i180 = 0, $RP$1$i = 0, $RP$1$i$i = 0, $RP$1$i175 = 0, $T$0$i = 0, $T$0$i$i = 0; + var $T$0$i30$i = 0, $add$i = 0, $add$i$i = 0, $add$i135 = 0, $add$i153 = 0, $add$ptr = 0, $add$ptr$i = 0, $add$ptr$i$i = 0, $add$ptr$i$i$i = 0, $add$ptr$i141 = 0, $add$ptr$i170 = 0, $add$ptr$i2$i$i = 0, $add$ptr$i32$i = 0, $add$ptr$i40$i = 0, $add$ptr$i54$i = 0, $add$ptr14$i$i = 0, $add$ptr15$i$i = 0, $add$ptr16$i$i = 0, $add$ptr166 = 0, $add$ptr169 = 0; + var $add$ptr17$i$i = 0, $add$ptr178 = 0, $add$ptr181$i = 0, $add$ptr182 = 0, $add$ptr189$i = 0, $add$ptr190$i = 0, $add$ptr193 = 0, $add$ptr199 = 0, $add$ptr2$i$i = 0, $add$ptr205$i$i = 0, $add$ptr212$i$i = 0, $add$ptr225$i = 0, $add$ptr227$i = 0, $add$ptr24$i$i = 0, $add$ptr262$i = 0, $add$ptr269$i = 0, $add$ptr273$i = 0, $add$ptr282$i = 0, $add$ptr3$i$i = 0, $add$ptr30$i$i = 0; + var $add$ptr369$i$i = 0, $add$ptr4$i$i = 0, $add$ptr4$i$i$i = 0, $add$ptr4$i38$i = 0, $add$ptr4$i46$i = 0, $add$ptr441$i = 0, $add$ptr5$i$i = 0, $add$ptr6$i$i = 0, $add$ptr6$i$i$i = 0, $add$ptr6$i50$i = 0, $add$ptr7$i$i = 0, $add$ptr81$i$i = 0, $add$ptr95 = 0, $add$ptr98 = 0, $add10$i = 0, $add101$i = 0, $add110$i = 0, $add13$i = 0, $add14$i = 0, $add140$i = 0; + var $add144 = 0, $add150$i = 0, $add17$i = 0, $add17$i156 = 0, $add177$i = 0, $add18$i = 0, $add19$i = 0, $add2 = 0, $add20$i = 0, $add206$i$i = 0, $add212$i = 0, $add215$i = 0, $add22$i = 0, $add246$i = 0, $add26$i$i = 0, $add268$i = 0, $add269$i$i = 0, $add274$i$i = 0, $add278$i$i = 0, $add280$i$i = 0; + var $add283$i$i = 0, $add337$i = 0, $add342$i = 0, $add346$i = 0, $add348$i = 0, $add351$i = 0, $add46$i = 0, $add50 = 0, $add51$i = 0, $add54 = 0, $add54$i = 0, $add58 = 0, $add62 = 0, $add64 = 0, $add74$i$i = 0, $add77$i = 0, $add78$i = 0, $add79$i$i = 0, $add8 = 0, $add82$i = 0; + var $add83$i$i = 0, $add85$i$i = 0, $add86$i = 0, $add88$i$i = 0, $add9$i = 0, $add90$i = 0, $add92$i = 0, $and = 0, $and$i = 0, $and$i$i = 0, $and$i$i$i = 0, $and$i11$i = 0, $and$i150 = 0, $and$i33$i = 0, $and$i41$i = 0, $and100$i = 0, $and103$i = 0, $and104$i = 0, $and106 = 0, $and11$add51$i = 0; + var $and11$i = 0, $and119$i$i = 0, $and12$i = 0, $and13$i = 0, $and13$i$i = 0, $and133$i$i = 0, $and14 = 0, $and145 = 0, $and17$i = 0, $and194$i = 0, $and194$i183 = 0, $and199$i = 0, $and209$i$i = 0, $and21$i = 0, $and21$i157 = 0, $and227$i$i = 0, $and236$i = 0, $and264$i$i = 0, $and268$i$i = 0, $and273$i$i = 0; + var $and282$i$i = 0, $and29$i = 0, $and292$i = 0, $and295$i$i = 0, $and3$i = 0, $and3$i$i = 0, $and3$i$i$i = 0, $and3$i36$i = 0, $and3$i44$i = 0, $and30$i = 0, $and318$i$i = 0, $and32$i = 0, $and32$i$i = 0, $and33$i$i = 0, $and331$i = 0, $and336$i = 0, $and341$i = 0, $and350$i = 0, $and363$i = 0, $and37$i$i = 0; + var $and387$i = 0, $and4 = 0, $and40$i$i = 0, $and41 = 0, $and42$i = 0, $and43 = 0, $and46 = 0, $and49 = 0, $and49$i = 0, $and49$i$i = 0, $and53 = 0, $and57 = 0, $and6$i = 0, $and6$i$i = 0, $and6$i10$i = 0, $and6$i15$i = 0, $and61 = 0, $and64$i = 0, $and68$i = 0, $and69$i$i = 0; + var $and7 = 0, $and73$i = 0, $and73$i$i = 0, $and74 = 0, $and77$i = 0, $and78$i$i = 0, $and8$i = 0, $and80$i = 0, $and81$i = 0, $and85$i = 0, $and87$i$i = 0, $and89$i = 0, $and9$i = 0, $and96$i$i = 0, $arrayidx = 0, $arrayidx$i = 0, $arrayidx$i$i = 0, $arrayidx$i158 = 0, $arrayidx103 = 0, $arrayidx103$i$i = 0; + var $arrayidx106$i = 0, $arrayidx107$i$i = 0, $arrayidx113$i = 0, $arrayidx113$i168 = 0, $arrayidx121$i = 0, $arrayidx123$i$i = 0, $arrayidx126$i$i = 0, $arrayidx137$i = 0, $arrayidx143$i$i = 0, $arrayidx148$i = 0, $arrayidx151$i = 0, $arrayidx151$i$i = 0, $arrayidx154$i = 0, $arrayidx155$i = 0, $arrayidx161$i = 0, $arrayidx165$i = 0, $arrayidx165$i178 = 0, $arrayidx178$i$i = 0, $arrayidx184$i = 0, $arrayidx184$i$i = 0; + var $arrayidx195$i$i = 0, $arrayidx196$i = 0, $arrayidx204$i = 0, $arrayidx212$i = 0, $arrayidx223$i$i = 0, $arrayidx228$i = 0, $arrayidx23$i = 0, $arrayidx232$i = 0, $arrayidx239$i = 0, $arrayidx245$i = 0, $arrayidx256$i = 0, $arrayidx27$i = 0, $arrayidx275$i = 0, $arrayidx287$i$i = 0, $arrayidx289$i = 0, $arrayidx290$i$i = 0, $arrayidx325$i$i = 0, $arrayidx355$i = 0, $arrayidx358$i = 0, $arrayidx394$i = 0; + var $arrayidx40$i = 0, $arrayidx44$i = 0, $arrayidx61$i = 0, $arrayidx65$i = 0, $arrayidx66 = 0, $arrayidx71$i = 0, $arrayidx75$i = 0, $arrayidx91$i$i = 0, $arrayidx92$i$i = 0, $arrayidx94$i = 0, $arrayidx94$i166 = 0, $arrayidx96$i$i = 0, $bk$i = 0, $bk$i$i = 0, $bk$i172 = 0, $bk$i23$i = 0, $bk102$i$i = 0, $bk122 = 0, $bk124 = 0, $bk139$i$i = 0; + var $bk145$i = 0, $bk158$i$i = 0, $bk161$i$i = 0, $bk18 = 0, $bk218$i = 0, $bk220$i = 0, $bk246$i$i = 0, $bk248$i$i = 0, $bk302$i$i = 0, $bk311$i = 0, $bk313$i = 0, $bk338$i$i = 0, $bk357$i$i = 0, $bk360$i$i = 0, $bk370$i = 0, $bk407$i = 0, $bk429$i = 0, $bk432$i = 0, $bk55$i$i = 0, $bk56$i = 0; + var $bk67$i$i = 0, $bk74$i$i = 0, $bk85 = 0, $bk91$i$i = 0, $br$2$ph$i = 0, $call107$i = 0, $call131$i = 0, $call132$i = 0, $call275$i = 0, $call37$i = 0, $call68$i = 0, $call83$i = 0, $child$i$i = 0, $child166$i$i = 0, $child289$i$i = 0, $child357$i = 0, $cmp = 0, $cmp$i = 0, $cmp$i$i$i = 0, $cmp$i12$i = 0; + var $cmp$i133 = 0, $cmp$i147 = 0, $cmp$i3$i$i = 0, $cmp$i34$i = 0, $cmp$i42$i = 0, $cmp$i52$i = 0, $cmp$i9$i = 0, $cmp1 = 0, $cmp1$i = 0, $cmp10 = 0, $cmp100$i$i = 0, $cmp102$i = 0, $cmp104$i$i = 0, $cmp105$i = 0, $cmp106$i$i = 0, $cmp107$i = 0, $cmp108$i = 0, $cmp108$i$i = 0, $cmp114$i = 0, $cmp116$i = 0; + var $cmp118$i = 0, $cmp119$i = 0, $cmp12$i = 0, $cmp120$i$i = 0, $cmp120$i25$i = 0, $cmp123$i = 0, $cmp124$i$i = 0, $cmp126$i = 0, $cmp127$i = 0, $cmp128 = 0, $cmp128$i = 0, $cmp128$i$i = 0, $cmp133$i = 0, $cmp135$i = 0, $cmp137$i = 0, $cmp138$i = 0, $cmp139 = 0, $cmp141$i = 0, $cmp144$i$i = 0, $cmp146 = 0; + var $cmp147$i = 0, $cmp14795$i = 0, $cmp15$i = 0, $cmp151$i = 0, $cmp152$i = 0, $cmp155$i = 0, $cmp156 = 0, $cmp156$i = 0, $cmp156$i$i = 0, $cmp157$i = 0, $cmp159$i = 0, $cmp162 = 0, $cmp162$i = 0, $cmp162$i177 = 0, $cmp166$i = 0, $cmp168$i$i = 0, $cmp174$i = 0, $cmp180$i = 0, $cmp185$i = 0, $cmp185$i$i = 0; + var $cmp186 = 0, $cmp186$i = 0, $cmp19$i = 0, $cmp190$i = 0, $cmp191$i = 0, $cmp2$i$i = 0, $cmp2$i$i$i = 0, $cmp20$i$i = 0, $cmp203$i = 0, $cmp205$i = 0, $cmp209$i = 0, $cmp21$i = 0, $cmp215$i$i = 0, $cmp217$i = 0, $cmp218$i = 0, $cmp224$i = 0, $cmp228$i = 0, $cmp229$i = 0, $cmp24$i = 0, $cmp24$i$i = 0; + var $cmp246$i = 0, $cmp254$i$i = 0, $cmp257$i = 0, $cmp258$i$i = 0, $cmp26$i = 0, $cmp265$i = 0, $cmp27$i$i = 0, $cmp28$i = 0, $cmp28$i$i = 0, $cmp284$i = 0, $cmp286$i = 0, $cmp29 = 0, $cmp3$i = 0, $cmp3$i$i = 0, $cmp306$i$i = 0, $cmp31 = 0, $cmp319$i = 0, $cmp319$i$i = 0, $cmp32$i = 0, $cmp32$i138 = 0; + var $cmp323$i = 0, $cmp327$i$i = 0, $cmp34$i = 0, $cmp34$i$i = 0, $cmp35$i = 0, $cmp36$i = 0, $cmp36$i$i = 0, $cmp374$i = 0, $cmp38$i = 0, $cmp38$i$i = 0, $cmp388$i = 0, $cmp396$i = 0, $cmp40$i = 0, $cmp43$i = 0, $cmp45$i = 0, $cmp46$i = 0, $cmp46$i$i = 0, $cmp49$i = 0, $cmp5 = 0, $cmp55$i = 0; + var $cmp55$i162 = 0, $cmp57$i = 0, $cmp57$i163 = 0, $cmp59$i$i = 0, $cmp60$i = 0, $cmp62$i = 0, $cmp63$i = 0, $cmp63$i$i = 0, $cmp65$i = 0, $cmp66$i = 0, $cmp66$i140 = 0, $cmp69$i = 0, $cmp7$i$i = 0, $cmp70 = 0, $cmp72$i = 0, $cmp75$i$i = 0, $cmp76$i = 0, $cmp81$i = 0, $cmp85$i = 0, $cmp89$i = 0; + var $cmp9$i$i = 0, $cmp90$i = 0, $cmp91$i = 0, $cmp93$i = 0, $cmp95$i = 0, $cmp96$i = 0, $cmp97$i = 0, $cmp97$i$i = 0, $cmp976$i = 0, $cmp99 = 0, $cond = 0, $cond$i = 0, $cond$i$i = 0, $cond$i$i$i = 0, $cond$i14$i = 0, $cond$i159 = 0, $cond$i37$i = 0, $cond$i45$i = 0, $cond1$i$i = 0, $cond115$i$i = 0; + var $cond13$i$i = 0, $cond15$i$i = 0, $cond2$i = 0, $cond315$i$i = 0, $cond383$i = 0, $fd$i = 0, $fd$i$i = 0, $fd$i173 = 0, $fd103$i$i = 0, $fd123 = 0, $fd140$i$i = 0, $fd146$i = 0, $fd148$i$i = 0, $fd160$i$i = 0, $fd219$i = 0, $fd247$i$i = 0, $fd303$i$i = 0, $fd312$i = 0, $fd339$i$i = 0, $fd344$i$i = 0; + var $fd359$i$i = 0, $fd371$i = 0, $fd408$i = 0, $fd416$i = 0, $fd431$i = 0, $fd54$i$i = 0, $fd57$i = 0, $fd68$i$i = 0, $fd69 = 0, $fd78$i$i = 0, $fd9 = 0, $fd92$i$i = 0, $head = 0, $head$i = 0, $head$i$i = 0, $head$i$i$i = 0, $head$i160 = 0, $head$i19$i = 0, $head$i39$i = 0, $head$i49$i = 0; + var $head118$i$i = 0, $head168 = 0, $head173 = 0, $head177 = 0, $head179 = 0, $head179$i = 0, $head182$i = 0, $head187$i = 0, $head189$i = 0, $head195 = 0, $head198 = 0, $head208$i$i = 0, $head211$i$i = 0, $head23$i$i = 0, $head25 = 0, $head26$i$i = 0, $head265$i = 0, $head268$i = 0, $head271$i = 0, $head274$i = 0; + var $head279$i = 0, $head281$i = 0, $head29$i = 0, $head29$i$i = 0, $head317$i$i = 0, $head32$i$i = 0, $head34$i$i = 0, $head386$i = 0, $head7$i$i = 0, $head7$i$i$i = 0, $head7$i51$i = 0, $head94 = 0, $head97 = 0, $head99$i = 0, $idx$0$i = 0, $index$i = 0, $index$i$i = 0, $index$i181 = 0, $index$i26$i = 0, $index288$i$i = 0; + var $index356$i = 0, $magic$i$i = 0, $nb$0 = 0, $neg = 0, $neg$i = 0, $neg$i$i = 0, $neg$i137 = 0, $neg$i182 = 0, $neg103$i = 0, $neg13 = 0, $neg132$i$i = 0, $neg48$i = 0, $neg73 = 0, $next$i = 0, $next$i$i = 0, $next$i$i$i = 0, $next231$i = 0, $not$cmp141$i = 0, $not$cmp493$i = 0, $oldfirst$0$i$i = 0; + var $or$cond$i = 0, $or$cond$i164 = 0, $or$cond1$i = 0, $or$cond1$i161 = 0, $or$cond2$i = 0, $or$cond3$i = 0, $or$cond4$i = 0, $or$cond5$i = 0, $or$cond7$i = 0, $or$cond7$not$i = 0, $or$cond8$i = 0, $or$cond93$i = 0, $or$cond94$i = 0, $or$i = 0, $or$i$i = 0, $or$i$i$i = 0, $or$i165 = 0, $or$i48$i = 0, $or101$i$i = 0, $or110 = 0; + var $or167 = 0, $or172 = 0, $or176 = 0, $or178$i = 0, $or180 = 0, $or183$i = 0, $or186$i = 0, $or188$i = 0, $or19$i$i = 0, $or194 = 0, $or197 = 0, $or204$i = 0, $or210$i$i = 0, $or22$i$i = 0, $or23 = 0, $or232$i$i = 0, $or26 = 0, $or264$i = 0, $or267$i = 0, $or270$i = 0; + var $or275$i = 0, $or278$i = 0, $or28$i$i = 0, $or280$i = 0, $or297$i = 0, $or300$i$i = 0, $or33$i$i = 0, $or368$i = 0, $or40 = 0, $or44$i$i = 0, $or93 = 0, $or96 = 0, $parent$i = 0, $parent$i$i = 0, $parent$i171 = 0, $parent$i24$i = 0, $parent135$i = 0, $parent138$i$i = 0, $parent149$i = 0, $parent162$i$i = 0; + var $parent165$i$i = 0, $parent166$i = 0, $parent179$i$i = 0, $parent196$i$i = 0, $parent226$i = 0, $parent240$i = 0, $parent257$i = 0, $parent301$i$i = 0, $parent337$i$i = 0, $parent361$i$i = 0, $parent369$i = 0, $parent406$i = 0, $parent433$i = 0, $qsize$0$i$i = 0, $retval$0 = 0, $rsize$0$i = 0, $rsize$0$lcssa$i = 0, $rsize$07$i = 0, $rsize$1$i = 0, $rsize$3$i = 0; + var $rsize$4$lcssa$i = 0, $rsize$48$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sflags193$i = 0, $sflags235$i = 0, $shl = 0, $shl$i = 0, $shl$i$i = 0, $shl$i151 = 0, $shl102 = 0, $shl105 = 0, $shl116$i$i = 0, $shl12 = 0, $shl127$i$i = 0, $shl131$i$i = 0, $shl15$i = 0, $shl18$i = 0, $shl192$i = 0, $shl195$i = 0; + var $shl198$i = 0, $shl22 = 0, $shl222$i$i = 0, $shl226$i$i = 0, $shl265$i$i = 0, $shl270$i$i = 0, $shl276$i$i = 0, $shl279$i$i = 0, $shl288$i = 0, $shl291$i = 0, $shl294$i$i = 0, $shl31$i = 0, $shl316$i$i = 0, $shl326$i$i = 0, $shl333$i = 0, $shl338$i = 0, $shl344$i = 0, $shl347$i = 0, $shl35 = 0, $shl362$i = 0; + var $shl37 = 0, $shl384$i = 0, $shl39$i$i = 0, $shl395$i = 0, $shl48$i$i = 0, $shl52$i = 0, $shl60$i = 0, $shl65 = 0, $shl70$i$i = 0, $shl72 = 0, $shl75$i$i = 0, $shl81$i$i = 0, $shl84$i$i = 0, $shl9$i = 0, $shl90 = 0, $shl95$i$i = 0, $shr = 0, $shr$i = 0, $shr$i$i = 0, $shr$i146 = 0; + var $shr$i22$i = 0, $shr101 = 0, $shr11$i = 0, $shr11$i154 = 0, $shr110$i$i = 0, $shr12$i = 0, $shr124$i$i = 0, $shr15$i = 0, $shr16$i = 0, $shr16$i155 = 0, $shr19$i = 0, $shr194$i = 0, $shr20$i = 0, $shr214$i$i = 0, $shr253$i$i = 0, $shr263$i$i = 0, $shr267$i$i = 0, $shr27$i = 0, $shr272$i$i = 0, $shr277$i$i = 0; + var $shr281$i$i = 0, $shr283$i = 0, $shr3 = 0, $shr310$i$i = 0, $shr318$i = 0, $shr323$i$i = 0, $shr330$i = 0, $shr335$i = 0, $shr340$i = 0, $shr345$i = 0, $shr349$i = 0, $shr378$i = 0, $shr392$i = 0, $shr4$i = 0, $shr42$i = 0, $shr45 = 0, $shr47 = 0, $shr48 = 0, $shr5$i = 0, $shr5$i149 = 0; + var $shr51 = 0, $shr52 = 0, $shr55 = 0, $shr56 = 0, $shr58$i$i = 0, $shr59 = 0, $shr60 = 0, $shr63 = 0, $shr68$i$i = 0, $shr7$i = 0, $shr7$i152 = 0, $shr72$i = 0, $shr72$i$i = 0, $shr75$i = 0, $shr76$i = 0, $shr77$i$i = 0, $shr79$i = 0, $shr8$i = 0, $shr80$i = 0, $shr82$i$i = 0; + var $shr83$i = 0, $shr84$i = 0, $shr86$i$i = 0, $shr87$i = 0, $shr88$i = 0, $shr91$i = 0, $size$i$i = 0, $size$i$i$i = 0, $size188$i = 0, $size245$i = 0, $sizebits$0$i = 0, $sizebits$0$shl52$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$0104$i = 0, $sp$1103$i = 0, $ssize$2$ph$i = 0, $sub = 0, $sub$i = 0, $sub$i$i = 0; + var $sub$i$i$i = 0, $sub$i13$i = 0, $sub$i136 = 0, $sub$i145 = 0, $sub$i35$i = 0, $sub$i43$i = 0, $sub$ptr$lhs$cast$i = 0, $sub$ptr$lhs$cast$i$i = 0, $sub$ptr$lhs$cast$i16$i = 0, $sub$ptr$rhs$cast$i = 0, $sub$ptr$rhs$cast$i$i = 0, $sub$ptr$rhs$cast$i17$i = 0, $sub$ptr$sub$i = 0, $sub$ptr$sub$i$i = 0, $sub$ptr$sub$i18$i = 0, $sub$ptr$sub$tsize$4$i = 0, $sub10$i = 0, $sub101$i = 0, $sub101$rsize$4$i = 0, $sub112$i = 0; + var $sub113$i$i = 0, $sub118$i = 0, $sub12$i$i = 0, $sub14$i = 0, $sub16$i$i = 0, $sub160 = 0, $sub172$i = 0, $sub18$i$i = 0, $sub190 = 0, $sub2$i = 0, $sub22$i = 0, $sub260$i = 0, $sub262$i$i = 0, $sub266$i$i = 0, $sub271$i$i = 0, $sub275$i$i = 0, $sub30$i = 0, $sub31$i = 0, $sub31$rsize$0$i = 0, $sub313$i$i = 0; + var $sub329$i = 0, $sub33$i = 0, $sub334$i = 0, $sub339$i = 0, $sub343$i = 0, $sub381$i = 0, $sub4$i = 0, $sub41$i = 0, $sub42 = 0, $sub44 = 0, $sub5$i$i = 0, $sub5$i$i$i = 0, $sub5$i47$i = 0, $sub50$i = 0, $sub6$i = 0, $sub63$i = 0, $sub67$i = 0, $sub67$i$i = 0, $sub70$i = 0, $sub71$i$i = 0; + var $sub76$i$i = 0, $sub80$i$i = 0, $sub91 = 0, $sub99$i = 0, $t$0$i = 0, $t$2$i = 0, $t$4$ph$i = 0, $t$4$v$4$i = 0, $t$47$i = 0, $tbase$792$i = 0, $tobool$i$i = 0, $tobool107 = 0, $tobool195$i = 0, $tobool200$i = 0, $tobool228$i$i = 0, $tobool237$i = 0, $tobool293$i = 0, $tobool296$i$i = 0, $tobool30$i = 0, $tobool364$i = 0; + var $tobool97$i$i = 0, $tsize$2617179$i = 0, $tsize$4$i = 0, $tsize$791$i = 0, $v$0$i = 0, $v$0$lcssa$i = 0, $v$08$i = 0, $v$1$i = 0, $v$3$i = 0, $v$4$lcssa$i = 0, $v$4$ph$i = 0, $v$49$i = 0, $xor$i$i = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $magic$i$i = sp; + $cmp = ($bytes>>>0)<(245); + do { + if ($cmp) { + $cmp1 = ($bytes>>>0)<(11); + $add2 = (($bytes) + 11)|0; + $and = $add2 & -8; + $cond = $cmp1 ? 16 : $and; + $shr = $cond >>> 3; + $0 = HEAP32[34]|0; + $shr3 = $0 >>> $shr; + $and4 = $shr3 & 3; + $cmp5 = ($and4|0)==(0); + if (!($cmp5)) { + $neg = $shr3 & 1; + $and7 = $neg ^ 1; + $add8 = (($and7) + ($shr))|0; + $shl = $add8 << 1; + $arrayidx = (176 + ($shl<<2)|0); + $1 = ((($arrayidx)) + 8|0); + $2 = HEAP32[$1>>2]|0; + $fd9 = ((($2)) + 8|0); + $3 = HEAP32[$fd9>>2]|0; + $cmp10 = ($3|0)==($arrayidx|0); + if ($cmp10) { + $shl12 = 1 << $add8; + $neg13 = $shl12 ^ -1; + $and14 = $0 & $neg13; + HEAP32[34] = $and14; + } else { + $bk18 = ((($3)) + 12|0); + HEAP32[$bk18>>2] = $arrayidx; + HEAP32[$1>>2] = $3; + } + $shl22 = $add8 << 3; + $or23 = $shl22 | 3; + $head = ((($2)) + 4|0); + HEAP32[$head>>2] = $or23; + $add$ptr = (($2) + ($shl22)|0); + $head25 = ((($add$ptr)) + 4|0); + $4 = HEAP32[$head25>>2]|0; + $or26 = $4 | 1; + HEAP32[$head25>>2] = $or26; + $retval$0 = $fd9; + STACKTOP = sp;return ($retval$0|0); + } + $5 = HEAP32[(144)>>2]|0; + $cmp29 = ($cond>>>0)>($5>>>0); + if ($cmp29) { + $cmp31 = ($shr3|0)==(0); + if (!($cmp31)) { + $shl35 = $shr3 << $shr; + $shl37 = 2 << $shr; + $sub = (0 - ($shl37))|0; + $or40 = $shl37 | $sub; + $and41 = $shl35 & $or40; + $sub42 = (0 - ($and41))|0; + $and43 = $and41 & $sub42; + $sub44 = (($and43) + -1)|0; + $shr45 = $sub44 >>> 12; + $and46 = $shr45 & 16; + $shr47 = $sub44 >>> $and46; + $shr48 = $shr47 >>> 5; + $and49 = $shr48 & 8; + $add50 = $and49 | $and46; + $shr51 = $shr47 >>> $and49; + $shr52 = $shr51 >>> 2; + $and53 = $shr52 & 4; + $add54 = $add50 | $and53; + $shr55 = $shr51 >>> $and53; + $shr56 = $shr55 >>> 1; + $and57 = $shr56 & 2; + $add58 = $add54 | $and57; + $shr59 = $shr55 >>> $and57; + $shr60 = $shr59 >>> 1; + $and61 = $shr60 & 1; + $add62 = $add58 | $and61; + $shr63 = $shr59 >>> $and61; + $add64 = (($add62) + ($shr63))|0; + $shl65 = $add64 << 1; + $arrayidx66 = (176 + ($shl65<<2)|0); + $6 = ((($arrayidx66)) + 8|0); + $7 = HEAP32[$6>>2]|0; + $fd69 = ((($7)) + 8|0); + $8 = HEAP32[$fd69>>2]|0; + $cmp70 = ($8|0)==($arrayidx66|0); + if ($cmp70) { + $shl72 = 1 << $add64; + $neg73 = $shl72 ^ -1; + $and74 = $0 & $neg73; + HEAP32[34] = $and74; + $10 = $and74; + } else { + $bk85 = ((($8)) + 12|0); + HEAP32[$bk85>>2] = $arrayidx66; + HEAP32[$6>>2] = $8; + $10 = $0; + } + $shl90 = $add64 << 3; + $sub91 = (($shl90) - ($cond))|0; + $or93 = $cond | 3; + $head94 = ((($7)) + 4|0); + HEAP32[$head94>>2] = $or93; + $add$ptr95 = (($7) + ($cond)|0); + $or96 = $sub91 | 1; + $head97 = ((($add$ptr95)) + 4|0); + HEAP32[$head97>>2] = $or96; + $add$ptr98 = (($7) + ($shl90)|0); + HEAP32[$add$ptr98>>2] = $sub91; + $cmp99 = ($5|0)==(0); + if (!($cmp99)) { + $9 = HEAP32[(156)>>2]|0; + $shr101 = $5 >>> 3; + $shl102 = $shr101 << 1; + $arrayidx103 = (176 + ($shl102<<2)|0); + $shl105 = 1 << $shr101; + $and106 = $10 & $shl105; + $tobool107 = ($and106|0)==(0); + if ($tobool107) { + $or110 = $10 | $shl105; + HEAP32[34] = $or110; + $$pre = ((($arrayidx103)) + 8|0); + $$pre$phiZ2D = $$pre;$F104$0 = $arrayidx103; + } else { + $11 = ((($arrayidx103)) + 8|0); + $12 = HEAP32[$11>>2]|0; + $$pre$phiZ2D = $11;$F104$0 = $12; + } + HEAP32[$$pre$phiZ2D>>2] = $9; + $bk122 = ((($F104$0)) + 12|0); + HEAP32[$bk122>>2] = $9; + $fd123 = ((($9)) + 8|0); + HEAP32[$fd123>>2] = $F104$0; + $bk124 = ((($9)) + 12|0); + HEAP32[$bk124>>2] = $arrayidx103; + } + HEAP32[(144)>>2] = $sub91; + HEAP32[(156)>>2] = $add$ptr95; + $retval$0 = $fd69; + STACKTOP = sp;return ($retval$0|0); + } + $13 = HEAP32[(140)>>2]|0; + $cmp128 = ($13|0)==(0); + if ($cmp128) { + $nb$0 = $cond; + } else { + $sub$i = (0 - ($13))|0; + $and$i = $13 & $sub$i; + $sub2$i = (($and$i) + -1)|0; + $shr$i = $sub2$i >>> 12; + $and3$i = $shr$i & 16; + $shr4$i = $sub2$i >>> $and3$i; + $shr5$i = $shr4$i >>> 5; + $and6$i = $shr5$i & 8; + $add$i = $and6$i | $and3$i; + $shr7$i = $shr4$i >>> $and6$i; + $shr8$i = $shr7$i >>> 2; + $and9$i = $shr8$i & 4; + $add10$i = $add$i | $and9$i; + $shr11$i = $shr7$i >>> $and9$i; + $shr12$i = $shr11$i >>> 1; + $and13$i = $shr12$i & 2; + $add14$i = $add10$i | $and13$i; + $shr15$i = $shr11$i >>> $and13$i; + $shr16$i = $shr15$i >>> 1; + $and17$i = $shr16$i & 1; + $add18$i = $add14$i | $and17$i; + $shr19$i = $shr15$i >>> $and17$i; + $add20$i = (($add18$i) + ($shr19$i))|0; + $arrayidx$i = (440 + ($add20$i<<2)|0); + $14 = HEAP32[$arrayidx$i>>2]|0; + $head$i = ((($14)) + 4|0); + $15 = HEAP32[$head$i>>2]|0; + $and21$i = $15 & -8; + $sub22$i = (($and21$i) - ($cond))|0; + $arrayidx232$i = ((($14)) + 16|0); + $16 = HEAP32[$arrayidx232$i>>2]|0; + $cmp3$i = ($16|0)==(0|0); + $$sink4$i = $cmp3$i&1; + $arrayidx275$i = (((($14)) + 16|0) + ($$sink4$i<<2)|0); + $17 = HEAP32[$arrayidx275$i>>2]|0; + $cmp286$i = ($17|0)==(0|0); + if ($cmp286$i) { + $rsize$0$lcssa$i = $sub22$i;$v$0$lcssa$i = $14; + } else { + $18 = $17;$rsize$07$i = $sub22$i;$v$08$i = $14; + while(1) { + $head29$i = ((($18)) + 4|0); + $19 = HEAP32[$head29$i>>2]|0; + $and30$i = $19 & -8; + $sub31$i = (($and30$i) - ($cond))|0; + $cmp32$i = ($sub31$i>>>0)<($rsize$07$i>>>0); + $sub31$rsize$0$i = $cmp32$i ? $sub31$i : $rsize$07$i; + $$v$0$i = $cmp32$i ? $18 : $v$08$i; + $arrayidx23$i = ((($18)) + 16|0); + $20 = HEAP32[$arrayidx23$i>>2]|0; + $cmp$i = ($20|0)==(0|0); + $$sink$i = $cmp$i&1; + $arrayidx27$i = (((($18)) + 16|0) + ($$sink$i<<2)|0); + $21 = HEAP32[$arrayidx27$i>>2]|0; + $cmp28$i = ($21|0)==(0|0); + if ($cmp28$i) { + $rsize$0$lcssa$i = $sub31$rsize$0$i;$v$0$lcssa$i = $$v$0$i; + break; + } else { + $18 = $21;$rsize$07$i = $sub31$rsize$0$i;$v$08$i = $$v$0$i; + } + } + } + $add$ptr$i = (($v$0$lcssa$i) + ($cond)|0); + $cmp35$i = ($add$ptr$i>>>0)>($v$0$lcssa$i>>>0); + if ($cmp35$i) { + $parent$i = ((($v$0$lcssa$i)) + 24|0); + $22 = HEAP32[$parent$i>>2]|0; + $bk$i = ((($v$0$lcssa$i)) + 12|0); + $23 = HEAP32[$bk$i>>2]|0; + $cmp40$i = ($23|0)==($v$0$lcssa$i|0); + do { + if ($cmp40$i) { + $arrayidx61$i = ((($v$0$lcssa$i)) + 20|0); + $25 = HEAP32[$arrayidx61$i>>2]|0; + $cmp62$i = ($25|0)==(0|0); + if ($cmp62$i) { + $arrayidx65$i = ((($v$0$lcssa$i)) + 16|0); + $26 = HEAP32[$arrayidx65$i>>2]|0; + $cmp66$i = ($26|0)==(0|0); + if ($cmp66$i) { + $R$3$i = 0; + break; + } else { + $R$1$i = $26;$RP$1$i = $arrayidx65$i; + } + } else { + $R$1$i = $25;$RP$1$i = $arrayidx61$i; + } + while(1) { + $arrayidx71$i = ((($R$1$i)) + 20|0); + $27 = HEAP32[$arrayidx71$i>>2]|0; + $cmp72$i = ($27|0)==(0|0); + if (!($cmp72$i)) { + $R$1$i = $27;$RP$1$i = $arrayidx71$i; + continue; + } + $arrayidx75$i = ((($R$1$i)) + 16|0); + $28 = HEAP32[$arrayidx75$i>>2]|0; + $cmp76$i = ($28|0)==(0|0); + if ($cmp76$i) { + break; + } else { + $R$1$i = $28;$RP$1$i = $arrayidx75$i; + } + } + HEAP32[$RP$1$i>>2] = 0; + $R$3$i = $R$1$i; + } else { + $fd$i = ((($v$0$lcssa$i)) + 8|0); + $24 = HEAP32[$fd$i>>2]|0; + $bk56$i = ((($24)) + 12|0); + HEAP32[$bk56$i>>2] = $23; + $fd57$i = ((($23)) + 8|0); + HEAP32[$fd57$i>>2] = $24; + $R$3$i = $23; + } + } while(0); + $cmp90$i = ($22|0)==(0|0); + do { + if (!($cmp90$i)) { + $index$i = ((($v$0$lcssa$i)) + 28|0); + $29 = HEAP32[$index$i>>2]|0; + $arrayidx94$i = (440 + ($29<<2)|0); + $30 = HEAP32[$arrayidx94$i>>2]|0; + $cmp95$i = ($v$0$lcssa$i|0)==($30|0); + if ($cmp95$i) { + HEAP32[$arrayidx94$i>>2] = $R$3$i; + $cond$i = ($R$3$i|0)==(0|0); + if ($cond$i) { + $shl$i = 1 << $29; + $neg$i = $shl$i ^ -1; + $and103$i = $13 & $neg$i; + HEAP32[(140)>>2] = $and103$i; + break; + } + } else { + $arrayidx113$i = ((($22)) + 16|0); + $31 = HEAP32[$arrayidx113$i>>2]|0; + $cmp114$i = ($31|0)!=($v$0$lcssa$i|0); + $$sink2$i = $cmp114$i&1; + $arrayidx121$i = (((($22)) + 16|0) + ($$sink2$i<<2)|0); + HEAP32[$arrayidx121$i>>2] = $R$3$i; + $cmp126$i = ($R$3$i|0)==(0|0); + if ($cmp126$i) { + break; + } + } + $parent135$i = ((($R$3$i)) + 24|0); + HEAP32[$parent135$i>>2] = $22; + $arrayidx137$i = ((($v$0$lcssa$i)) + 16|0); + $32 = HEAP32[$arrayidx137$i>>2]|0; + $cmp138$i = ($32|0)==(0|0); + if (!($cmp138$i)) { + $arrayidx148$i = ((($R$3$i)) + 16|0); + HEAP32[$arrayidx148$i>>2] = $32; + $parent149$i = ((($32)) + 24|0); + HEAP32[$parent149$i>>2] = $R$3$i; + } + $arrayidx154$i = ((($v$0$lcssa$i)) + 20|0); + $33 = HEAP32[$arrayidx154$i>>2]|0; + $cmp155$i = ($33|0)==(0|0); + if (!($cmp155$i)) { + $arrayidx165$i = ((($R$3$i)) + 20|0); + HEAP32[$arrayidx165$i>>2] = $33; + $parent166$i = ((($33)) + 24|0); + HEAP32[$parent166$i>>2] = $R$3$i; + } + } + } while(0); + $cmp174$i = ($rsize$0$lcssa$i>>>0)<(16); + if ($cmp174$i) { + $add177$i = (($rsize$0$lcssa$i) + ($cond))|0; + $or178$i = $add177$i | 3; + $head179$i = ((($v$0$lcssa$i)) + 4|0); + HEAP32[$head179$i>>2] = $or178$i; + $add$ptr181$i = (($v$0$lcssa$i) + ($add177$i)|0); + $head182$i = ((($add$ptr181$i)) + 4|0); + $34 = HEAP32[$head182$i>>2]|0; + $or183$i = $34 | 1; + HEAP32[$head182$i>>2] = $or183$i; + } else { + $or186$i = $cond | 3; + $head187$i = ((($v$0$lcssa$i)) + 4|0); + HEAP32[$head187$i>>2] = $or186$i; + $or188$i = $rsize$0$lcssa$i | 1; + $head189$i = ((($add$ptr$i)) + 4|0); + HEAP32[$head189$i>>2] = $or188$i; + $add$ptr190$i = (($add$ptr$i) + ($rsize$0$lcssa$i)|0); + HEAP32[$add$ptr190$i>>2] = $rsize$0$lcssa$i; + $cmp191$i = ($5|0)==(0); + if (!($cmp191$i)) { + $35 = HEAP32[(156)>>2]|0; + $shr194$i = $5 >>> 3; + $shl195$i = $shr194$i << 1; + $arrayidx196$i = (176 + ($shl195$i<<2)|0); + $shl198$i = 1 << $shr194$i; + $and199$i = $0 & $shl198$i; + $tobool200$i = ($and199$i|0)==(0); + if ($tobool200$i) { + $or204$i = $0 | $shl198$i; + HEAP32[34] = $or204$i; + $$pre$i = ((($arrayidx196$i)) + 8|0); + $$pre$phi$iZ2D = $$pre$i;$F197$0$i = $arrayidx196$i; + } else { + $36 = ((($arrayidx196$i)) + 8|0); + $37 = HEAP32[$36>>2]|0; + $$pre$phi$iZ2D = $36;$F197$0$i = $37; + } + HEAP32[$$pre$phi$iZ2D>>2] = $35; + $bk218$i = ((($F197$0$i)) + 12|0); + HEAP32[$bk218$i>>2] = $35; + $fd219$i = ((($35)) + 8|0); + HEAP32[$fd219$i>>2] = $F197$0$i; + $bk220$i = ((($35)) + 12|0); + HEAP32[$bk220$i>>2] = $arrayidx196$i; + } + HEAP32[(144)>>2] = $rsize$0$lcssa$i; + HEAP32[(156)>>2] = $add$ptr$i; + } + $add$ptr225$i = ((($v$0$lcssa$i)) + 8|0); + $retval$0 = $add$ptr225$i; + STACKTOP = sp;return ($retval$0|0); + } else { + $nb$0 = $cond; + } + } + } else { + $nb$0 = $cond; + } + } else { + $cmp139 = ($bytes>>>0)>(4294967231); + if ($cmp139) { + $nb$0 = -1; + } else { + $add144 = (($bytes) + 11)|0; + $and145 = $add144 & -8; + $38 = HEAP32[(140)>>2]|0; + $cmp146 = ($38|0)==(0); + if ($cmp146) { + $nb$0 = $and145; + } else { + $sub$i145 = (0 - ($and145))|0; + $shr$i146 = $add144 >>> 8; + $cmp$i147 = ($shr$i146|0)==(0); + if ($cmp$i147) { + $idx$0$i = 0; + } else { + $cmp1$i = ($and145>>>0)>(16777215); + if ($cmp1$i) { + $idx$0$i = 31; + } else { + $sub4$i = (($shr$i146) + 1048320)|0; + $shr5$i149 = $sub4$i >>> 16; + $and$i150 = $shr5$i149 & 8; + $shl$i151 = $shr$i146 << $and$i150; + $sub6$i = (($shl$i151) + 520192)|0; + $shr7$i152 = $sub6$i >>> 16; + $and8$i = $shr7$i152 & 4; + $add$i153 = $and8$i | $and$i150; + $shl9$i = $shl$i151 << $and8$i; + $sub10$i = (($shl9$i) + 245760)|0; + $shr11$i154 = $sub10$i >>> 16; + $and12$i = $shr11$i154 & 2; + $add13$i = $add$i153 | $and12$i; + $sub14$i = (14 - ($add13$i))|0; + $shl15$i = $shl9$i << $and12$i; + $shr16$i155 = $shl15$i >>> 15; + $add17$i156 = (($sub14$i) + ($shr16$i155))|0; + $shl18$i = $add17$i156 << 1; + $add19$i = (($add17$i156) + 7)|0; + $shr20$i = $and145 >>> $add19$i; + $and21$i157 = $shr20$i & 1; + $add22$i = $and21$i157 | $shl18$i; + $idx$0$i = $add22$i; + } + } + $arrayidx$i158 = (440 + ($idx$0$i<<2)|0); + $39 = HEAP32[$arrayidx$i158>>2]|0; + $cmp24$i = ($39|0)==(0|0); + L74: do { + if ($cmp24$i) { + $rsize$3$i = $sub$i145;$t$2$i = 0;$v$3$i = 0; + label = 57; + } else { + $cmp26$i = ($idx$0$i|0)==(31); + $shr27$i = $idx$0$i >>> 1; + $sub30$i = (25 - ($shr27$i))|0; + $cond$i159 = $cmp26$i ? 0 : $sub30$i; + $shl31$i = $and145 << $cond$i159; + $rsize$0$i = $sub$i145;$rst$0$i = 0;$sizebits$0$i = $shl31$i;$t$0$i = $39;$v$0$i = 0; + while(1) { + $head$i160 = ((($t$0$i)) + 4|0); + $40 = HEAP32[$head$i160>>2]|0; + $and32$i = $40 & -8; + $sub33$i = (($and32$i) - ($and145))|0; + $cmp34$i = ($sub33$i>>>0)<($rsize$0$i>>>0); + if ($cmp34$i) { + $cmp36$i = ($sub33$i|0)==(0); + if ($cmp36$i) { + $rsize$48$i = 0;$t$47$i = $t$0$i;$v$49$i = $t$0$i; + label = 61; + break L74; + } else { + $rsize$1$i = $sub33$i;$v$1$i = $t$0$i; + } + } else { + $rsize$1$i = $rsize$0$i;$v$1$i = $v$0$i; + } + $arrayidx40$i = ((($t$0$i)) + 20|0); + $41 = HEAP32[$arrayidx40$i>>2]|0; + $shr42$i = $sizebits$0$i >>> 31; + $arrayidx44$i = (((($t$0$i)) + 16|0) + ($shr42$i<<2)|0); + $42 = HEAP32[$arrayidx44$i>>2]|0; + $cmp45$i = ($41|0)==(0|0); + $cmp46$i = ($41|0)==($42|0); + $or$cond1$i161 = $cmp45$i | $cmp46$i; + $rst$1$i = $or$cond1$i161 ? $rst$0$i : $41; + $cmp49$i = ($42|0)==(0|0); + $not$cmp493$i = $cmp49$i ^ 1; + $shl52$i = $not$cmp493$i&1; + $sizebits$0$shl52$i = $sizebits$0$i << $shl52$i; + if ($cmp49$i) { + $rsize$3$i = $rsize$1$i;$t$2$i = $rst$1$i;$v$3$i = $v$1$i; + label = 57; + break; + } else { + $rsize$0$i = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $sizebits$0$shl52$i;$t$0$i = $42;$v$0$i = $v$1$i; + } + } + } + } while(0); + if ((label|0) == 57) { + $cmp55$i162 = ($t$2$i|0)==(0|0); + $cmp57$i163 = ($v$3$i|0)==(0|0); + $or$cond$i164 = $cmp55$i162 & $cmp57$i163; + if ($or$cond$i164) { + $shl60$i = 2 << $idx$0$i; + $sub63$i = (0 - ($shl60$i))|0; + $or$i165 = $shl60$i | $sub63$i; + $and64$i = $38 & $or$i165; + $cmp65$i = ($and64$i|0)==(0); + if ($cmp65$i) { + $nb$0 = $and145; + break; + } + $sub67$i = (0 - ($and64$i))|0; + $and68$i = $and64$i & $sub67$i; + $sub70$i = (($and68$i) + -1)|0; + $shr72$i = $sub70$i >>> 12; + $and73$i = $shr72$i & 16; + $shr75$i = $sub70$i >>> $and73$i; + $shr76$i = $shr75$i >>> 5; + $and77$i = $shr76$i & 8; + $add78$i = $and77$i | $and73$i; + $shr79$i = $shr75$i >>> $and77$i; + $shr80$i = $shr79$i >>> 2; + $and81$i = $shr80$i & 4; + $add82$i = $add78$i | $and81$i; + $shr83$i = $shr79$i >>> $and81$i; + $shr84$i = $shr83$i >>> 1; + $and85$i = $shr84$i & 2; + $add86$i = $add82$i | $and85$i; + $shr87$i = $shr83$i >>> $and85$i; + $shr88$i = $shr87$i >>> 1; + $and89$i = $shr88$i & 1; + $add90$i = $add86$i | $and89$i; + $shr91$i = $shr87$i >>> $and89$i; + $add92$i = (($add90$i) + ($shr91$i))|0; + $arrayidx94$i166 = (440 + ($add92$i<<2)|0); + $43 = HEAP32[$arrayidx94$i166>>2]|0; + $t$4$ph$i = $43;$v$4$ph$i = 0; + } else { + $t$4$ph$i = $t$2$i;$v$4$ph$i = $v$3$i; + } + $cmp976$i = ($t$4$ph$i|0)==(0|0); + if ($cmp976$i) { + $rsize$4$lcssa$i = $rsize$3$i;$v$4$lcssa$i = $v$4$ph$i; + } else { + $rsize$48$i = $rsize$3$i;$t$47$i = $t$4$ph$i;$v$49$i = $v$4$ph$i; + label = 61; + } + } + if ((label|0) == 61) { + while(1) { + label = 0; + $head99$i = ((($t$47$i)) + 4|0); + $44 = HEAP32[$head99$i>>2]|0; + $and100$i = $44 & -8; + $sub101$i = (($and100$i) - ($and145))|0; + $cmp102$i = ($sub101$i>>>0)<($rsize$48$i>>>0); + $sub101$rsize$4$i = $cmp102$i ? $sub101$i : $rsize$48$i; + $t$4$v$4$i = $cmp102$i ? $t$47$i : $v$49$i; + $arrayidx106$i = ((($t$47$i)) + 16|0); + $45 = HEAP32[$arrayidx106$i>>2]|0; + $cmp107$i = ($45|0)==(0|0); + $$sink$i167 = $cmp107$i&1; + $arrayidx113$i168 = (((($t$47$i)) + 16|0) + ($$sink$i167<<2)|0); + $46 = HEAP32[$arrayidx113$i168>>2]|0; + $cmp97$i = ($46|0)==(0|0); + if ($cmp97$i) { + $rsize$4$lcssa$i = $sub101$rsize$4$i;$v$4$lcssa$i = $t$4$v$4$i; + break; + } else { + $rsize$48$i = $sub101$rsize$4$i;$t$47$i = $46;$v$49$i = $t$4$v$4$i; + label = 61; + } + } + } + $cmp116$i = ($v$4$lcssa$i|0)==(0|0); + if ($cmp116$i) { + $nb$0 = $and145; + } else { + $47 = HEAP32[(144)>>2]|0; + $sub118$i = (($47) - ($and145))|0; + $cmp119$i = ($rsize$4$lcssa$i>>>0)<($sub118$i>>>0); + if ($cmp119$i) { + $add$ptr$i170 = (($v$4$lcssa$i) + ($and145)|0); + $cmp123$i = ($add$ptr$i170>>>0)>($v$4$lcssa$i>>>0); + if (!($cmp123$i)) { + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); + } + $parent$i171 = ((($v$4$lcssa$i)) + 24|0); + $48 = HEAP32[$parent$i171>>2]|0; + $bk$i172 = ((($v$4$lcssa$i)) + 12|0); + $49 = HEAP32[$bk$i172>>2]|0; + $cmp128$i = ($49|0)==($v$4$lcssa$i|0); + do { + if ($cmp128$i) { + $arrayidx151$i = ((($v$4$lcssa$i)) + 20|0); + $51 = HEAP32[$arrayidx151$i>>2]|0; + $cmp152$i = ($51|0)==(0|0); + if ($cmp152$i) { + $arrayidx155$i = ((($v$4$lcssa$i)) + 16|0); + $52 = HEAP32[$arrayidx155$i>>2]|0; + $cmp156$i = ($52|0)==(0|0); + if ($cmp156$i) { + $R$3$i180 = 0; + break; + } else { + $R$1$i176 = $52;$RP$1$i175 = $arrayidx155$i; + } + } else { + $R$1$i176 = $51;$RP$1$i175 = $arrayidx151$i; + } + while(1) { + $arrayidx161$i = ((($R$1$i176)) + 20|0); + $53 = HEAP32[$arrayidx161$i>>2]|0; + $cmp162$i177 = ($53|0)==(0|0); + if (!($cmp162$i177)) { + $R$1$i176 = $53;$RP$1$i175 = $arrayidx161$i; + continue; + } + $arrayidx165$i178 = ((($R$1$i176)) + 16|0); + $54 = HEAP32[$arrayidx165$i178>>2]|0; + $cmp166$i = ($54|0)==(0|0); + if ($cmp166$i) { + break; + } else { + $R$1$i176 = $54;$RP$1$i175 = $arrayidx165$i178; + } + } + HEAP32[$RP$1$i175>>2] = 0; + $R$3$i180 = $R$1$i176; + } else { + $fd$i173 = ((($v$4$lcssa$i)) + 8|0); + $50 = HEAP32[$fd$i173>>2]|0; + $bk145$i = ((($50)) + 12|0); + HEAP32[$bk145$i>>2] = $49; + $fd146$i = ((($49)) + 8|0); + HEAP32[$fd146$i>>2] = $50; + $R$3$i180 = $49; + } + } while(0); + $cmp180$i = ($48|0)==(0|0); + do { + if ($cmp180$i) { + $64 = $38; + } else { + $index$i181 = ((($v$4$lcssa$i)) + 28|0); + $55 = HEAP32[$index$i181>>2]|0; + $arrayidx184$i = (440 + ($55<<2)|0); + $56 = HEAP32[$arrayidx184$i>>2]|0; + $cmp185$i = ($v$4$lcssa$i|0)==($56|0); + if ($cmp185$i) { + HEAP32[$arrayidx184$i>>2] = $R$3$i180; + $cond2$i = ($R$3$i180|0)==(0|0); + if ($cond2$i) { + $shl192$i = 1 << $55; + $neg$i182 = $shl192$i ^ -1; + $and194$i183 = $38 & $neg$i182; + HEAP32[(140)>>2] = $and194$i183; + $64 = $and194$i183; + break; + } + } else { + $arrayidx204$i = ((($48)) + 16|0); + $57 = HEAP32[$arrayidx204$i>>2]|0; + $cmp205$i = ($57|0)!=($v$4$lcssa$i|0); + $$sink2$i184 = $cmp205$i&1; + $arrayidx212$i = (((($48)) + 16|0) + ($$sink2$i184<<2)|0); + HEAP32[$arrayidx212$i>>2] = $R$3$i180; + $cmp217$i = ($R$3$i180|0)==(0|0); + if ($cmp217$i) { + $64 = $38; + break; + } + } + $parent226$i = ((($R$3$i180)) + 24|0); + HEAP32[$parent226$i>>2] = $48; + $arrayidx228$i = ((($v$4$lcssa$i)) + 16|0); + $58 = HEAP32[$arrayidx228$i>>2]|0; + $cmp229$i = ($58|0)==(0|0); + if (!($cmp229$i)) { + $arrayidx239$i = ((($R$3$i180)) + 16|0); + HEAP32[$arrayidx239$i>>2] = $58; + $parent240$i = ((($58)) + 24|0); + HEAP32[$parent240$i>>2] = $R$3$i180; + } + $arrayidx245$i = ((($v$4$lcssa$i)) + 20|0); + $59 = HEAP32[$arrayidx245$i>>2]|0; + $cmp246$i = ($59|0)==(0|0); + if ($cmp246$i) { + $64 = $38; + } else { + $arrayidx256$i = ((($R$3$i180)) + 20|0); + HEAP32[$arrayidx256$i>>2] = $59; + $parent257$i = ((($59)) + 24|0); + HEAP32[$parent257$i>>2] = $R$3$i180; + $64 = $38; + } + } + } while(0); + $cmp265$i = ($rsize$4$lcssa$i>>>0)<(16); + do { + if ($cmp265$i) { + $add268$i = (($rsize$4$lcssa$i) + ($and145))|0; + $or270$i = $add268$i | 3; + $head271$i = ((($v$4$lcssa$i)) + 4|0); + HEAP32[$head271$i>>2] = $or270$i; + $add$ptr273$i = (($v$4$lcssa$i) + ($add268$i)|0); + $head274$i = ((($add$ptr273$i)) + 4|0); + $60 = HEAP32[$head274$i>>2]|0; + $or275$i = $60 | 1; + HEAP32[$head274$i>>2] = $or275$i; + } else { + $or278$i = $and145 | 3; + $head279$i = ((($v$4$lcssa$i)) + 4|0); + HEAP32[$head279$i>>2] = $or278$i; + $or280$i = $rsize$4$lcssa$i | 1; + $head281$i = ((($add$ptr$i170)) + 4|0); + HEAP32[$head281$i>>2] = $or280$i; + $add$ptr282$i = (($add$ptr$i170) + ($rsize$4$lcssa$i)|0); + HEAP32[$add$ptr282$i>>2] = $rsize$4$lcssa$i; + $shr283$i = $rsize$4$lcssa$i >>> 3; + $cmp284$i = ($rsize$4$lcssa$i>>>0)<(256); + if ($cmp284$i) { + $shl288$i = $shr283$i << 1; + $arrayidx289$i = (176 + ($shl288$i<<2)|0); + $61 = HEAP32[34]|0; + $shl291$i = 1 << $shr283$i; + $and292$i = $61 & $shl291$i; + $tobool293$i = ($and292$i|0)==(0); + if ($tobool293$i) { + $or297$i = $61 | $shl291$i; + HEAP32[34] = $or297$i; + $$pre$i187 = ((($arrayidx289$i)) + 8|0); + $$pre$phi$i188Z2D = $$pre$i187;$F290$0$i = $arrayidx289$i; + } else { + $62 = ((($arrayidx289$i)) + 8|0); + $63 = HEAP32[$62>>2]|0; + $$pre$phi$i188Z2D = $62;$F290$0$i = $63; + } + HEAP32[$$pre$phi$i188Z2D>>2] = $add$ptr$i170; + $bk311$i = ((($F290$0$i)) + 12|0); + HEAP32[$bk311$i>>2] = $add$ptr$i170; + $fd312$i = ((($add$ptr$i170)) + 8|0); + HEAP32[$fd312$i>>2] = $F290$0$i; + $bk313$i = ((($add$ptr$i170)) + 12|0); + HEAP32[$bk313$i>>2] = $arrayidx289$i; + break; + } + $shr318$i = $rsize$4$lcssa$i >>> 8; + $cmp319$i = ($shr318$i|0)==(0); + if ($cmp319$i) { + $I316$0$i = 0; + } else { + $cmp323$i = ($rsize$4$lcssa$i>>>0)>(16777215); + if ($cmp323$i) { + $I316$0$i = 31; + } else { + $sub329$i = (($shr318$i) + 1048320)|0; + $shr330$i = $sub329$i >>> 16; + $and331$i = $shr330$i & 8; + $shl333$i = $shr318$i << $and331$i; + $sub334$i = (($shl333$i) + 520192)|0; + $shr335$i = $sub334$i >>> 16; + $and336$i = $shr335$i & 4; + $add337$i = $and336$i | $and331$i; + $shl338$i = $shl333$i << $and336$i; + $sub339$i = (($shl338$i) + 245760)|0; + $shr340$i = $sub339$i >>> 16; + $and341$i = $shr340$i & 2; + $add342$i = $add337$i | $and341$i; + $sub343$i = (14 - ($add342$i))|0; + $shl344$i = $shl338$i << $and341$i; + $shr345$i = $shl344$i >>> 15; + $add346$i = (($sub343$i) + ($shr345$i))|0; + $shl347$i = $add346$i << 1; + $add348$i = (($add346$i) + 7)|0; + $shr349$i = $rsize$4$lcssa$i >>> $add348$i; + $and350$i = $shr349$i & 1; + $add351$i = $and350$i | $shl347$i; + $I316$0$i = $add351$i; + } + } + $arrayidx355$i = (440 + ($I316$0$i<<2)|0); + $index356$i = ((($add$ptr$i170)) + 28|0); + HEAP32[$index356$i>>2] = $I316$0$i; + $child357$i = ((($add$ptr$i170)) + 16|0); + $arrayidx358$i = ((($child357$i)) + 4|0); + HEAP32[$arrayidx358$i>>2] = 0; + HEAP32[$child357$i>>2] = 0; + $shl362$i = 1 << $I316$0$i; + $and363$i = $64 & $shl362$i; + $tobool364$i = ($and363$i|0)==(0); + if ($tobool364$i) { + $or368$i = $64 | $shl362$i; + HEAP32[(140)>>2] = $or368$i; + HEAP32[$arrayidx355$i>>2] = $add$ptr$i170; + $parent369$i = ((($add$ptr$i170)) + 24|0); + HEAP32[$parent369$i>>2] = $arrayidx355$i; + $bk370$i = ((($add$ptr$i170)) + 12|0); + HEAP32[$bk370$i>>2] = $add$ptr$i170; + $fd371$i = ((($add$ptr$i170)) + 8|0); + HEAP32[$fd371$i>>2] = $add$ptr$i170; + break; + } + $65 = HEAP32[$arrayidx355$i>>2]|0; + $cmp374$i = ($I316$0$i|0)==(31); + $shr378$i = $I316$0$i >>> 1; + $sub381$i = (25 - ($shr378$i))|0; + $cond383$i = $cmp374$i ? 0 : $sub381$i; + $shl384$i = $rsize$4$lcssa$i << $cond383$i; + $K373$0$i = $shl384$i;$T$0$i = $65; + while(1) { + $head386$i = ((($T$0$i)) + 4|0); + $66 = HEAP32[$head386$i>>2]|0; + $and387$i = $66 & -8; + $cmp388$i = ($and387$i|0)==($rsize$4$lcssa$i|0); + if ($cmp388$i) { + label = 97; + break; + } + $shr392$i = $K373$0$i >>> 31; + $arrayidx394$i = (((($T$0$i)) + 16|0) + ($shr392$i<<2)|0); + $shl395$i = $K373$0$i << 1; + $67 = HEAP32[$arrayidx394$i>>2]|0; + $cmp396$i = ($67|0)==(0|0); + if ($cmp396$i) { + label = 96; + break; + } else { + $K373$0$i = $shl395$i;$T$0$i = $67; + } + } + if ((label|0) == 96) { + HEAP32[$arrayidx394$i>>2] = $add$ptr$i170; + $parent406$i = ((($add$ptr$i170)) + 24|0); + HEAP32[$parent406$i>>2] = $T$0$i; + $bk407$i = ((($add$ptr$i170)) + 12|0); + HEAP32[$bk407$i>>2] = $add$ptr$i170; + $fd408$i = ((($add$ptr$i170)) + 8|0); + HEAP32[$fd408$i>>2] = $add$ptr$i170; + break; + } + else if ((label|0) == 97) { + $fd416$i = ((($T$0$i)) + 8|0); + $68 = HEAP32[$fd416$i>>2]|0; + $bk429$i = ((($68)) + 12|0); + HEAP32[$bk429$i>>2] = $add$ptr$i170; + HEAP32[$fd416$i>>2] = $add$ptr$i170; + $fd431$i = ((($add$ptr$i170)) + 8|0); + HEAP32[$fd431$i>>2] = $68; + $bk432$i = ((($add$ptr$i170)) + 12|0); + HEAP32[$bk432$i>>2] = $T$0$i; + $parent433$i = ((($add$ptr$i170)) + 24|0); + HEAP32[$parent433$i>>2] = 0; + break; + } + } + } while(0); + $add$ptr441$i = ((($v$4$lcssa$i)) + 8|0); + $retval$0 = $add$ptr441$i; + STACKTOP = sp;return ($retval$0|0); + } else { + $nb$0 = $and145; + } + } + } + } + } + } while(0); + $69 = HEAP32[(144)>>2]|0; + $cmp156 = ($69>>>0)<($nb$0>>>0); + if (!($cmp156)) { + $sub160 = (($69) - ($nb$0))|0; + $70 = HEAP32[(156)>>2]|0; + $cmp162 = ($sub160>>>0)>(15); + if ($cmp162) { + $add$ptr166 = (($70) + ($nb$0)|0); + HEAP32[(156)>>2] = $add$ptr166; + HEAP32[(144)>>2] = $sub160; + $or167 = $sub160 | 1; + $head168 = ((($add$ptr166)) + 4|0); + HEAP32[$head168>>2] = $or167; + $add$ptr169 = (($70) + ($69)|0); + HEAP32[$add$ptr169>>2] = $sub160; + $or172 = $nb$0 | 3; + $head173 = ((($70)) + 4|0); + HEAP32[$head173>>2] = $or172; + } else { + HEAP32[(144)>>2] = 0; + HEAP32[(156)>>2] = 0; + $or176 = $69 | 3; + $head177 = ((($70)) + 4|0); + HEAP32[$head177>>2] = $or176; + $add$ptr178 = (($70) + ($69)|0); + $head179 = ((($add$ptr178)) + 4|0); + $71 = HEAP32[$head179>>2]|0; + $or180 = $71 | 1; + HEAP32[$head179>>2] = $or180; + } + $add$ptr182 = ((($70)) + 8|0); + $retval$0 = $add$ptr182; + STACKTOP = sp;return ($retval$0|0); + } + $72 = HEAP32[(148)>>2]|0; + $cmp186 = ($72>>>0)>($nb$0>>>0); + if ($cmp186) { + $sub190 = (($72) - ($nb$0))|0; + HEAP32[(148)>>2] = $sub190; + $73 = HEAP32[(160)>>2]|0; + $add$ptr193 = (($73) + ($nb$0)|0); + HEAP32[(160)>>2] = $add$ptr193; + $or194 = $sub190 | 1; + $head195 = ((($add$ptr193)) + 4|0); + HEAP32[$head195>>2] = $or194; + $or197 = $nb$0 | 3; + $head198 = ((($73)) + 4|0); + HEAP32[$head198>>2] = $or197; + $add$ptr199 = ((($73)) + 8|0); + $retval$0 = $add$ptr199; + STACKTOP = sp;return ($retval$0|0); + } + $74 = HEAP32[152]|0; + $cmp$i133 = ($74|0)==(0); + if ($cmp$i133) { + HEAP32[(616)>>2] = 4096; + HEAP32[(612)>>2] = 4096; + HEAP32[(620)>>2] = -1; + HEAP32[(624)>>2] = -1; + HEAP32[(628)>>2] = 0; + HEAP32[(580)>>2] = 0; + $75 = $magic$i$i; + $xor$i$i = $75 & -16; + $and6$i$i = $xor$i$i ^ 1431655768; + HEAP32[152] = $and6$i$i; + $76 = 4096; + } else { + $$pre$i134 = HEAP32[(616)>>2]|0; + $76 = $$pre$i134; + } + $add$i135 = (($nb$0) + 48)|0; + $sub$i136 = (($nb$0) + 47)|0; + $add9$i = (($76) + ($sub$i136))|0; + $neg$i137 = (0 - ($76))|0; + $and11$i = $add9$i & $neg$i137; + $cmp12$i = ($and11$i>>>0)>($nb$0>>>0); + if (!($cmp12$i)) { + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); + } + $77 = HEAP32[(576)>>2]|0; + $cmp15$i = ($77|0)==(0); + if (!($cmp15$i)) { + $78 = HEAP32[(568)>>2]|0; + $add17$i = (($78) + ($and11$i))|0; + $cmp19$i = ($add17$i>>>0)<=($78>>>0); + $cmp21$i = ($add17$i>>>0)>($77>>>0); + $or$cond1$i = $cmp19$i | $cmp21$i; + if ($or$cond1$i) { + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); + } + } + $79 = HEAP32[(580)>>2]|0; + $and29$i = $79 & 4; + $tobool30$i = ($and29$i|0)==(0); + L167: do { + if ($tobool30$i) { + $80 = HEAP32[(160)>>2]|0; + $cmp32$i138 = ($80|0)==(0|0); + L169: do { + if ($cmp32$i138) { + label = 118; + } else { + $sp$0$i$i = (584); + while(1) { + $81 = HEAP32[$sp$0$i$i>>2]|0; + $cmp$i52$i = ($81>>>0)>($80>>>0); + if (!($cmp$i52$i)) { + $size$i$i = ((($sp$0$i$i)) + 4|0); + $82 = HEAP32[$size$i$i>>2]|0; + $add$ptr$i54$i = (($81) + ($82)|0); + $cmp2$i$i = ($add$ptr$i54$i>>>0)>($80>>>0); + if ($cmp2$i$i) { + break; + } + } + $next$i$i = ((($sp$0$i$i)) + 8|0); + $83 = HEAP32[$next$i$i>>2]|0; + $cmp3$i$i = ($83|0)==(0|0); + if ($cmp3$i$i) { + label = 118; + break L169; + } else { + $sp$0$i$i = $83; + } + } + $add77$i = (($add9$i) - ($72))|0; + $and80$i = $add77$i & $neg$i137; + $cmp81$i = ($and80$i>>>0)<(2147483647); + if ($cmp81$i) { + $call83$i = (_sbrk(($and80$i|0))|0); + $88 = HEAP32[$sp$0$i$i>>2]|0; + $89 = HEAP32[$size$i$i>>2]|0; + $add$ptr$i141 = (($88) + ($89)|0); + $cmp85$i = ($call83$i|0)==($add$ptr$i141|0); + if ($cmp85$i) { + $cmp89$i = ($call83$i|0)==((-1)|0); + if ($cmp89$i) { + $tsize$2617179$i = $and80$i; + } else { + $tbase$792$i = $call83$i;$tsize$791$i = $and80$i; + label = 135; + break L167; + } + } else { + $br$2$ph$i = $call83$i;$ssize$2$ph$i = $and80$i; + label = 126; + } + } else { + $tsize$2617179$i = 0; + } + } + } while(0); + do { + if ((label|0) == 118) { + $call37$i = (_sbrk(0)|0); + $cmp38$i = ($call37$i|0)==((-1)|0); + if ($cmp38$i) { + $tsize$2617179$i = 0; + } else { + $84 = $call37$i; + $85 = HEAP32[(612)>>2]|0; + $sub41$i = (($85) + -1)|0; + $and42$i = $sub41$i & $84; + $cmp43$i = ($and42$i|0)==(0); + $add46$i = (($sub41$i) + ($84))|0; + $neg48$i = (0 - ($85))|0; + $and49$i = $add46$i & $neg48$i; + $sub50$i = (($and49$i) - ($84))|0; + $add51$i = $cmp43$i ? 0 : $sub50$i; + $and11$add51$i = (($add51$i) + ($and11$i))|0; + $86 = HEAP32[(568)>>2]|0; + $add54$i = (($and11$add51$i) + ($86))|0; + $cmp55$i = ($and11$add51$i>>>0)>($nb$0>>>0); + $cmp57$i = ($and11$add51$i>>>0)<(2147483647); + $or$cond$i = $cmp55$i & $cmp57$i; + if ($or$cond$i) { + $87 = HEAP32[(576)>>2]|0; + $cmp60$i = ($87|0)==(0); + if (!($cmp60$i)) { + $cmp63$i = ($add54$i>>>0)<=($86>>>0); + $cmp66$i140 = ($add54$i>>>0)>($87>>>0); + $or$cond2$i = $cmp63$i | $cmp66$i140; + if ($or$cond2$i) { + $tsize$2617179$i = 0; + break; + } + } + $call68$i = (_sbrk(($and11$add51$i|0))|0); + $cmp69$i = ($call68$i|0)==($call37$i|0); + if ($cmp69$i) { + $tbase$792$i = $call37$i;$tsize$791$i = $and11$add51$i; + label = 135; + break L167; + } else { + $br$2$ph$i = $call68$i;$ssize$2$ph$i = $and11$add51$i; + label = 126; + } + } else { + $tsize$2617179$i = 0; + } + } + } + } while(0); + do { + if ((label|0) == 126) { + $sub112$i = (0 - ($ssize$2$ph$i))|0; + $cmp91$i = ($br$2$ph$i|0)!=((-1)|0); + $cmp93$i = ($ssize$2$ph$i>>>0)<(2147483647); + $or$cond5$i = $cmp93$i & $cmp91$i; + $cmp96$i = ($add$i135>>>0)>($ssize$2$ph$i>>>0); + $or$cond3$i = $cmp96$i & $or$cond5$i; + if (!($or$cond3$i)) { + $cmp118$i = ($br$2$ph$i|0)==((-1)|0); + if ($cmp118$i) { + $tsize$2617179$i = 0; + break; + } else { + $tbase$792$i = $br$2$ph$i;$tsize$791$i = $ssize$2$ph$i; + label = 135; + break L167; + } + } + $90 = HEAP32[(616)>>2]|0; + $sub99$i = (($sub$i136) - ($ssize$2$ph$i))|0; + $add101$i = (($sub99$i) + ($90))|0; + $neg103$i = (0 - ($90))|0; + $and104$i = $add101$i & $neg103$i; + $cmp105$i = ($and104$i>>>0)<(2147483647); + if (!($cmp105$i)) { + $tbase$792$i = $br$2$ph$i;$tsize$791$i = $ssize$2$ph$i; + label = 135; + break L167; + } + $call107$i = (_sbrk(($and104$i|0))|0); + $cmp108$i = ($call107$i|0)==((-1)|0); + if ($cmp108$i) { + (_sbrk(($sub112$i|0))|0); + $tsize$2617179$i = 0; + break; + } else { + $add110$i = (($and104$i) + ($ssize$2$ph$i))|0; + $tbase$792$i = $br$2$ph$i;$tsize$791$i = $add110$i; + label = 135; + break L167; + } + } + } while(0); + $91 = HEAP32[(580)>>2]|0; + $or$i = $91 | 4; + HEAP32[(580)>>2] = $or$i; + $tsize$4$i = $tsize$2617179$i; + label = 133; + } else { + $tsize$4$i = 0; + label = 133; + } + } while(0); + if ((label|0) == 133) { + $cmp127$i = ($and11$i>>>0)<(2147483647); + if ($cmp127$i) { + $call131$i = (_sbrk(($and11$i|0))|0); + $call132$i = (_sbrk(0)|0); + $cmp133$i = ($call131$i|0)!=((-1)|0); + $cmp135$i = ($call132$i|0)!=((-1)|0); + $or$cond4$i = $cmp133$i & $cmp135$i; + $cmp137$i = ($call131$i>>>0)<($call132$i>>>0); + $or$cond7$i = $cmp137$i & $or$cond4$i; + $sub$ptr$lhs$cast$i = $call132$i; + $sub$ptr$rhs$cast$i = $call131$i; + $sub$ptr$sub$i = (($sub$ptr$lhs$cast$i) - ($sub$ptr$rhs$cast$i))|0; + $add140$i = (($nb$0) + 40)|0; + $cmp141$i = ($sub$ptr$sub$i>>>0)>($add140$i>>>0); + $sub$ptr$sub$tsize$4$i = $cmp141$i ? $sub$ptr$sub$i : $tsize$4$i; + $or$cond7$not$i = $or$cond7$i ^ 1; + $cmp14795$i = ($call131$i|0)==((-1)|0); + $not$cmp141$i = $cmp141$i ^ 1; + $cmp147$i = $cmp14795$i | $not$cmp141$i; + $or$cond93$i = $cmp147$i | $or$cond7$not$i; + if (!($or$cond93$i)) { + $tbase$792$i = $call131$i;$tsize$791$i = $sub$ptr$sub$tsize$4$i; + label = 135; + } + } + } + if ((label|0) == 135) { + $92 = HEAP32[(568)>>2]|0; + $add150$i = (($92) + ($tsize$791$i))|0; + HEAP32[(568)>>2] = $add150$i; + $93 = HEAP32[(572)>>2]|0; + $cmp151$i = ($add150$i>>>0)>($93>>>0); + if ($cmp151$i) { + HEAP32[(572)>>2] = $add150$i; + } + $94 = HEAP32[(160)>>2]|0; + $cmp157$i = ($94|0)==(0|0); + do { + if ($cmp157$i) { + $95 = HEAP32[(152)>>2]|0; + $cmp159$i = ($95|0)==(0|0); + $cmp162$i = ($tbase$792$i>>>0)<($95>>>0); + $or$cond8$i = $cmp159$i | $cmp162$i; + if ($or$cond8$i) { + HEAP32[(152)>>2] = $tbase$792$i; + } + HEAP32[(584)>>2] = $tbase$792$i; + HEAP32[(588)>>2] = $tsize$791$i; + HEAP32[(596)>>2] = 0; + $96 = HEAP32[152]|0; + HEAP32[(172)>>2] = $96; + HEAP32[(168)>>2] = -1; + HEAP32[(188)>>2] = (176); + HEAP32[(184)>>2] = (176); + HEAP32[(196)>>2] = (184); + HEAP32[(192)>>2] = (184); + HEAP32[(204)>>2] = (192); + HEAP32[(200)>>2] = (192); + HEAP32[(212)>>2] = (200); + HEAP32[(208)>>2] = (200); + HEAP32[(220)>>2] = (208); + HEAP32[(216)>>2] = (208); + HEAP32[(228)>>2] = (216); + HEAP32[(224)>>2] = (216); + HEAP32[(236)>>2] = (224); + HEAP32[(232)>>2] = (224); + HEAP32[(244)>>2] = (232); + HEAP32[(240)>>2] = (232); + HEAP32[(252)>>2] = (240); + HEAP32[(248)>>2] = (240); + HEAP32[(260)>>2] = (248); + HEAP32[(256)>>2] = (248); + HEAP32[(268)>>2] = (256); + HEAP32[(264)>>2] = (256); + HEAP32[(276)>>2] = (264); + HEAP32[(272)>>2] = (264); + HEAP32[(284)>>2] = (272); + HEAP32[(280)>>2] = (272); + HEAP32[(292)>>2] = (280); + HEAP32[(288)>>2] = (280); + HEAP32[(300)>>2] = (288); + HEAP32[(296)>>2] = (288); + HEAP32[(308)>>2] = (296); + HEAP32[(304)>>2] = (296); + HEAP32[(316)>>2] = (304); + HEAP32[(312)>>2] = (304); + HEAP32[(324)>>2] = (312); + HEAP32[(320)>>2] = (312); + HEAP32[(332)>>2] = (320); + HEAP32[(328)>>2] = (320); + HEAP32[(340)>>2] = (328); + HEAP32[(336)>>2] = (328); + HEAP32[(348)>>2] = (336); + HEAP32[(344)>>2] = (336); + HEAP32[(356)>>2] = (344); + HEAP32[(352)>>2] = (344); + HEAP32[(364)>>2] = (352); + HEAP32[(360)>>2] = (352); + HEAP32[(372)>>2] = (360); + HEAP32[(368)>>2] = (360); + HEAP32[(380)>>2] = (368); + HEAP32[(376)>>2] = (368); + HEAP32[(388)>>2] = (376); + HEAP32[(384)>>2] = (376); + HEAP32[(396)>>2] = (384); + HEAP32[(392)>>2] = (384); + HEAP32[(404)>>2] = (392); + HEAP32[(400)>>2] = (392); + HEAP32[(412)>>2] = (400); + HEAP32[(408)>>2] = (400); + HEAP32[(420)>>2] = (408); + HEAP32[(416)>>2] = (408); + HEAP32[(428)>>2] = (416); + HEAP32[(424)>>2] = (416); + HEAP32[(436)>>2] = (424); + HEAP32[(432)>>2] = (424); + $sub172$i = (($tsize$791$i) + -40)|0; + $add$ptr$i40$i = ((($tbase$792$i)) + 8|0); + $97 = $add$ptr$i40$i; + $and$i41$i = $97 & 7; + $cmp$i42$i = ($and$i41$i|0)==(0); + $sub$i43$i = (0 - ($97))|0; + $and3$i44$i = $sub$i43$i & 7; + $cond$i45$i = $cmp$i42$i ? 0 : $and3$i44$i; + $add$ptr4$i46$i = (($tbase$792$i) + ($cond$i45$i)|0); + $sub5$i47$i = (($sub172$i) - ($cond$i45$i))|0; + HEAP32[(160)>>2] = $add$ptr4$i46$i; + HEAP32[(148)>>2] = $sub5$i47$i; + $or$i48$i = $sub5$i47$i | 1; + $head$i49$i = ((($add$ptr4$i46$i)) + 4|0); + HEAP32[$head$i49$i>>2] = $or$i48$i; + $add$ptr6$i50$i = (($tbase$792$i) + ($sub172$i)|0); + $head7$i51$i = ((($add$ptr6$i50$i)) + 4|0); + HEAP32[$head7$i51$i>>2] = 40; + $98 = HEAP32[(624)>>2]|0; + HEAP32[(164)>>2] = $98; + } else { + $sp$0104$i = (584); + while(1) { + $99 = HEAP32[$sp$0104$i>>2]|0; + $size188$i = ((($sp$0104$i)) + 4|0); + $100 = HEAP32[$size188$i>>2]|0; + $add$ptr189$i = (($99) + ($100)|0); + $cmp190$i = ($tbase$792$i|0)==($add$ptr189$i|0); + if ($cmp190$i) { + label = 143; + break; + } + $next$i = ((($sp$0104$i)) + 8|0); + $101 = HEAP32[$next$i>>2]|0; + $cmp186$i = ($101|0)==(0|0); + if ($cmp186$i) { + break; + } else { + $sp$0104$i = $101; + } + } + if ((label|0) == 143) { + $sflags193$i = ((($sp$0104$i)) + 12|0); + $102 = HEAP32[$sflags193$i>>2]|0; + $and194$i = $102 & 8; + $tobool195$i = ($and194$i|0)==(0); + if ($tobool195$i) { + $cmp203$i = ($99>>>0)<=($94>>>0); + $cmp209$i = ($tbase$792$i>>>0)>($94>>>0); + $or$cond94$i = $cmp209$i & $cmp203$i; + if ($or$cond94$i) { + $add212$i = (($100) + ($tsize$791$i))|0; + HEAP32[$size188$i>>2] = $add212$i; + $103 = HEAP32[(148)>>2]|0; + $add215$i = (($103) + ($tsize$791$i))|0; + $add$ptr$i32$i = ((($94)) + 8|0); + $104 = $add$ptr$i32$i; + $and$i33$i = $104 & 7; + $cmp$i34$i = ($and$i33$i|0)==(0); + $sub$i35$i = (0 - ($104))|0; + $and3$i36$i = $sub$i35$i & 7; + $cond$i37$i = $cmp$i34$i ? 0 : $and3$i36$i; + $add$ptr4$i38$i = (($94) + ($cond$i37$i)|0); + $sub5$i$i = (($add215$i) - ($cond$i37$i))|0; + HEAP32[(160)>>2] = $add$ptr4$i38$i; + HEAP32[(148)>>2] = $sub5$i$i; + $or$i$i = $sub5$i$i | 1; + $head$i39$i = ((($add$ptr4$i38$i)) + 4|0); + HEAP32[$head$i39$i>>2] = $or$i$i; + $add$ptr6$i$i = (($94) + ($add215$i)|0); + $head7$i$i = ((($add$ptr6$i$i)) + 4|0); + HEAP32[$head7$i$i>>2] = 40; + $105 = HEAP32[(624)>>2]|0; + HEAP32[(164)>>2] = $105; + break; + } + } + } + $106 = HEAP32[(152)>>2]|0; + $cmp218$i = ($tbase$792$i>>>0)<($106>>>0); + if ($cmp218$i) { + HEAP32[(152)>>2] = $tbase$792$i; + } + $add$ptr227$i = (($tbase$792$i) + ($tsize$791$i)|0); + $sp$1103$i = (584); + while(1) { + $107 = HEAP32[$sp$1103$i>>2]|0; + $cmp228$i = ($107|0)==($add$ptr227$i|0); + if ($cmp228$i) { + label = 151; + break; + } + $next231$i = ((($sp$1103$i)) + 8|0); + $108 = HEAP32[$next231$i>>2]|0; + $cmp224$i = ($108|0)==(0|0); + if ($cmp224$i) { + $sp$0$i$i$i = (584); + break; + } else { + $sp$1103$i = $108; + } + } + if ((label|0) == 151) { + $sflags235$i = ((($sp$1103$i)) + 12|0); + $109 = HEAP32[$sflags235$i>>2]|0; + $and236$i = $109 & 8; + $tobool237$i = ($and236$i|0)==(0); + if ($tobool237$i) { + HEAP32[$sp$1103$i>>2] = $tbase$792$i; + $size245$i = ((($sp$1103$i)) + 4|0); + $110 = HEAP32[$size245$i>>2]|0; + $add246$i = (($110) + ($tsize$791$i))|0; + HEAP32[$size245$i>>2] = $add246$i; + $add$ptr$i$i = ((($tbase$792$i)) + 8|0); + $111 = $add$ptr$i$i; + $and$i11$i = $111 & 7; + $cmp$i12$i = ($and$i11$i|0)==(0); + $sub$i13$i = (0 - ($111))|0; + $and3$i$i = $sub$i13$i & 7; + $cond$i14$i = $cmp$i12$i ? 0 : $and3$i$i; + $add$ptr4$i$i = (($tbase$792$i) + ($cond$i14$i)|0); + $add$ptr5$i$i = ((($add$ptr227$i)) + 8|0); + $112 = $add$ptr5$i$i; + $and6$i15$i = $112 & 7; + $cmp7$i$i = ($and6$i15$i|0)==(0); + $sub12$i$i = (0 - ($112))|0; + $and13$i$i = $sub12$i$i & 7; + $cond15$i$i = $cmp7$i$i ? 0 : $and13$i$i; + $add$ptr16$i$i = (($add$ptr227$i) + ($cond15$i$i)|0); + $sub$ptr$lhs$cast$i16$i = $add$ptr16$i$i; + $sub$ptr$rhs$cast$i17$i = $add$ptr4$i$i; + $sub$ptr$sub$i18$i = (($sub$ptr$lhs$cast$i16$i) - ($sub$ptr$rhs$cast$i17$i))|0; + $add$ptr17$i$i = (($add$ptr4$i$i) + ($nb$0)|0); + $sub18$i$i = (($sub$ptr$sub$i18$i) - ($nb$0))|0; + $or19$i$i = $nb$0 | 3; + $head$i19$i = ((($add$ptr4$i$i)) + 4|0); + HEAP32[$head$i19$i>>2] = $or19$i$i; + $cmp20$i$i = ($94|0)==($add$ptr16$i$i|0); + do { + if ($cmp20$i$i) { + $113 = HEAP32[(148)>>2]|0; + $add$i$i = (($113) + ($sub18$i$i))|0; + HEAP32[(148)>>2] = $add$i$i; + HEAP32[(160)>>2] = $add$ptr17$i$i; + $or22$i$i = $add$i$i | 1; + $head23$i$i = ((($add$ptr17$i$i)) + 4|0); + HEAP32[$head23$i$i>>2] = $or22$i$i; + } else { + $114 = HEAP32[(156)>>2]|0; + $cmp24$i$i = ($114|0)==($add$ptr16$i$i|0); + if ($cmp24$i$i) { + $115 = HEAP32[(144)>>2]|0; + $add26$i$i = (($115) + ($sub18$i$i))|0; + HEAP32[(144)>>2] = $add26$i$i; + HEAP32[(156)>>2] = $add$ptr17$i$i; + $or28$i$i = $add26$i$i | 1; + $head29$i$i = ((($add$ptr17$i$i)) + 4|0); + HEAP32[$head29$i$i>>2] = $or28$i$i; + $add$ptr30$i$i = (($add$ptr17$i$i) + ($add26$i$i)|0); + HEAP32[$add$ptr30$i$i>>2] = $add26$i$i; + break; + } + $head32$i$i = ((($add$ptr16$i$i)) + 4|0); + $116 = HEAP32[$head32$i$i>>2]|0; + $and33$i$i = $116 & 3; + $cmp34$i$i = ($and33$i$i|0)==(1); + if ($cmp34$i$i) { + $and37$i$i = $116 & -8; + $shr$i22$i = $116 >>> 3; + $cmp38$i$i = ($116>>>0)<(256); + L234: do { + if ($cmp38$i$i) { + $fd$i$i = ((($add$ptr16$i$i)) + 8|0); + $117 = HEAP32[$fd$i$i>>2]|0; + $bk$i23$i = ((($add$ptr16$i$i)) + 12|0); + $118 = HEAP32[$bk$i23$i>>2]|0; + $cmp46$i$i = ($118|0)==($117|0); + if ($cmp46$i$i) { + $shl48$i$i = 1 << $shr$i22$i; + $neg$i$i = $shl48$i$i ^ -1; + $119 = HEAP32[34]|0; + $and49$i$i = $119 & $neg$i$i; + HEAP32[34] = $and49$i$i; + break; + } else { + $bk67$i$i = ((($117)) + 12|0); + HEAP32[$bk67$i$i>>2] = $118; + $fd68$i$i = ((($118)) + 8|0); + HEAP32[$fd68$i$i>>2] = $117; + break; + } + } else { + $parent$i24$i = ((($add$ptr16$i$i)) + 24|0); + $120 = HEAP32[$parent$i24$i>>2]|0; + $bk74$i$i = ((($add$ptr16$i$i)) + 12|0); + $121 = HEAP32[$bk74$i$i>>2]|0; + $cmp75$i$i = ($121|0)==($add$ptr16$i$i|0); + do { + if ($cmp75$i$i) { + $child$i$i = ((($add$ptr16$i$i)) + 16|0); + $arrayidx96$i$i = ((($child$i$i)) + 4|0); + $123 = HEAP32[$arrayidx96$i$i>>2]|0; + $cmp97$i$i = ($123|0)==(0|0); + if ($cmp97$i$i) { + $124 = HEAP32[$child$i$i>>2]|0; + $cmp100$i$i = ($124|0)==(0|0); + if ($cmp100$i$i) { + $R$3$i$i = 0; + break; + } else { + $R$1$i$i = $124;$RP$1$i$i = $child$i$i; + } + } else { + $R$1$i$i = $123;$RP$1$i$i = $arrayidx96$i$i; + } + while(1) { + $arrayidx103$i$i = ((($R$1$i$i)) + 20|0); + $125 = HEAP32[$arrayidx103$i$i>>2]|0; + $cmp104$i$i = ($125|0)==(0|0); + if (!($cmp104$i$i)) { + $R$1$i$i = $125;$RP$1$i$i = $arrayidx103$i$i; + continue; + } + $arrayidx107$i$i = ((($R$1$i$i)) + 16|0); + $126 = HEAP32[$arrayidx107$i$i>>2]|0; + $cmp108$i$i = ($126|0)==(0|0); + if ($cmp108$i$i) { + break; + } else { + $R$1$i$i = $126;$RP$1$i$i = $arrayidx107$i$i; + } + } + HEAP32[$RP$1$i$i>>2] = 0; + $R$3$i$i = $R$1$i$i; + } else { + $fd78$i$i = ((($add$ptr16$i$i)) + 8|0); + $122 = HEAP32[$fd78$i$i>>2]|0; + $bk91$i$i = ((($122)) + 12|0); + HEAP32[$bk91$i$i>>2] = $121; + $fd92$i$i = ((($121)) + 8|0); + HEAP32[$fd92$i$i>>2] = $122; + $R$3$i$i = $121; + } + } while(0); + $cmp120$i25$i = ($120|0)==(0|0); + if ($cmp120$i25$i) { + break; + } + $index$i26$i = ((($add$ptr16$i$i)) + 28|0); + $127 = HEAP32[$index$i26$i>>2]|0; + $arrayidx123$i$i = (440 + ($127<<2)|0); + $128 = HEAP32[$arrayidx123$i$i>>2]|0; + $cmp124$i$i = ($128|0)==($add$ptr16$i$i|0); + do { + if ($cmp124$i$i) { + HEAP32[$arrayidx123$i$i>>2] = $R$3$i$i; + $cond1$i$i = ($R$3$i$i|0)==(0|0); + if (!($cond1$i$i)) { + break; + } + $shl131$i$i = 1 << $127; + $neg132$i$i = $shl131$i$i ^ -1; + $129 = HEAP32[(140)>>2]|0; + $and133$i$i = $129 & $neg132$i$i; + HEAP32[(140)>>2] = $and133$i$i; + break L234; + } else { + $arrayidx143$i$i = ((($120)) + 16|0); + $130 = HEAP32[$arrayidx143$i$i>>2]|0; + $cmp144$i$i = ($130|0)!=($add$ptr16$i$i|0); + $$sink$i$i = $cmp144$i$i&1; + $arrayidx151$i$i = (((($120)) + 16|0) + ($$sink$i$i<<2)|0); + HEAP32[$arrayidx151$i$i>>2] = $R$3$i$i; + $cmp156$i$i = ($R$3$i$i|0)==(0|0); + if ($cmp156$i$i) { + break L234; + } + } + } while(0); + $parent165$i$i = ((($R$3$i$i)) + 24|0); + HEAP32[$parent165$i$i>>2] = $120; + $child166$i$i = ((($add$ptr16$i$i)) + 16|0); + $131 = HEAP32[$child166$i$i>>2]|0; + $cmp168$i$i = ($131|0)==(0|0); + if (!($cmp168$i$i)) { + $arrayidx178$i$i = ((($R$3$i$i)) + 16|0); + HEAP32[$arrayidx178$i$i>>2] = $131; + $parent179$i$i = ((($131)) + 24|0); + HEAP32[$parent179$i$i>>2] = $R$3$i$i; + } + $arrayidx184$i$i = ((($child166$i$i)) + 4|0); + $132 = HEAP32[$arrayidx184$i$i>>2]|0; + $cmp185$i$i = ($132|0)==(0|0); + if ($cmp185$i$i) { + break; + } + $arrayidx195$i$i = ((($R$3$i$i)) + 20|0); + HEAP32[$arrayidx195$i$i>>2] = $132; + $parent196$i$i = ((($132)) + 24|0); + HEAP32[$parent196$i$i>>2] = $R$3$i$i; + } + } while(0); + $add$ptr205$i$i = (($add$ptr16$i$i) + ($and37$i$i)|0); + $add206$i$i = (($and37$i$i) + ($sub18$i$i))|0; + $oldfirst$0$i$i = $add$ptr205$i$i;$qsize$0$i$i = $add206$i$i; + } else { + $oldfirst$0$i$i = $add$ptr16$i$i;$qsize$0$i$i = $sub18$i$i; + } + $head208$i$i = ((($oldfirst$0$i$i)) + 4|0); + $133 = HEAP32[$head208$i$i>>2]|0; + $and209$i$i = $133 & -2; + HEAP32[$head208$i$i>>2] = $and209$i$i; + $or210$i$i = $qsize$0$i$i | 1; + $head211$i$i = ((($add$ptr17$i$i)) + 4|0); + HEAP32[$head211$i$i>>2] = $or210$i$i; + $add$ptr212$i$i = (($add$ptr17$i$i) + ($qsize$0$i$i)|0); + HEAP32[$add$ptr212$i$i>>2] = $qsize$0$i$i; + $shr214$i$i = $qsize$0$i$i >>> 3; + $cmp215$i$i = ($qsize$0$i$i>>>0)<(256); + if ($cmp215$i$i) { + $shl222$i$i = $shr214$i$i << 1; + $arrayidx223$i$i = (176 + ($shl222$i$i<<2)|0); + $134 = HEAP32[34]|0; + $shl226$i$i = 1 << $shr214$i$i; + $and227$i$i = $134 & $shl226$i$i; + $tobool228$i$i = ($and227$i$i|0)==(0); + if ($tobool228$i$i) { + $or232$i$i = $134 | $shl226$i$i; + HEAP32[34] = $or232$i$i; + $$pre$i28$i = ((($arrayidx223$i$i)) + 8|0); + $$pre$phi$i29$iZ2D = $$pre$i28$i;$F224$0$i$i = $arrayidx223$i$i; + } else { + $135 = ((($arrayidx223$i$i)) + 8|0); + $136 = HEAP32[$135>>2]|0; + $$pre$phi$i29$iZ2D = $135;$F224$0$i$i = $136; + } + HEAP32[$$pre$phi$i29$iZ2D>>2] = $add$ptr17$i$i; + $bk246$i$i = ((($F224$0$i$i)) + 12|0); + HEAP32[$bk246$i$i>>2] = $add$ptr17$i$i; + $fd247$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd247$i$i>>2] = $F224$0$i$i; + $bk248$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk248$i$i>>2] = $arrayidx223$i$i; + break; + } + $shr253$i$i = $qsize$0$i$i >>> 8; + $cmp254$i$i = ($shr253$i$i|0)==(0); + do { + if ($cmp254$i$i) { + $I252$0$i$i = 0; + } else { + $cmp258$i$i = ($qsize$0$i$i>>>0)>(16777215); + if ($cmp258$i$i) { + $I252$0$i$i = 31; + break; + } + $sub262$i$i = (($shr253$i$i) + 1048320)|0; + $shr263$i$i = $sub262$i$i >>> 16; + $and264$i$i = $shr263$i$i & 8; + $shl265$i$i = $shr253$i$i << $and264$i$i; + $sub266$i$i = (($shl265$i$i) + 520192)|0; + $shr267$i$i = $sub266$i$i >>> 16; + $and268$i$i = $shr267$i$i & 4; + $add269$i$i = $and268$i$i | $and264$i$i; + $shl270$i$i = $shl265$i$i << $and268$i$i; + $sub271$i$i = (($shl270$i$i) + 245760)|0; + $shr272$i$i = $sub271$i$i >>> 16; + $and273$i$i = $shr272$i$i & 2; + $add274$i$i = $add269$i$i | $and273$i$i; + $sub275$i$i = (14 - ($add274$i$i))|0; + $shl276$i$i = $shl270$i$i << $and273$i$i; + $shr277$i$i = $shl276$i$i >>> 15; + $add278$i$i = (($sub275$i$i) + ($shr277$i$i))|0; + $shl279$i$i = $add278$i$i << 1; + $add280$i$i = (($add278$i$i) + 7)|0; + $shr281$i$i = $qsize$0$i$i >>> $add280$i$i; + $and282$i$i = $shr281$i$i & 1; + $add283$i$i = $and282$i$i | $shl279$i$i; + $I252$0$i$i = $add283$i$i; + } + } while(0); + $arrayidx287$i$i = (440 + ($I252$0$i$i<<2)|0); + $index288$i$i = ((($add$ptr17$i$i)) + 28|0); + HEAP32[$index288$i$i>>2] = $I252$0$i$i; + $child289$i$i = ((($add$ptr17$i$i)) + 16|0); + $arrayidx290$i$i = ((($child289$i$i)) + 4|0); + HEAP32[$arrayidx290$i$i>>2] = 0; + HEAP32[$child289$i$i>>2] = 0; + $137 = HEAP32[(140)>>2]|0; + $shl294$i$i = 1 << $I252$0$i$i; + $and295$i$i = $137 & $shl294$i$i; + $tobool296$i$i = ($and295$i$i|0)==(0); + if ($tobool296$i$i) { + $or300$i$i = $137 | $shl294$i$i; + HEAP32[(140)>>2] = $or300$i$i; + HEAP32[$arrayidx287$i$i>>2] = $add$ptr17$i$i; + $parent301$i$i = ((($add$ptr17$i$i)) + 24|0); + HEAP32[$parent301$i$i>>2] = $arrayidx287$i$i; + $bk302$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk302$i$i>>2] = $add$ptr17$i$i; + $fd303$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd303$i$i>>2] = $add$ptr17$i$i; + break; + } + $138 = HEAP32[$arrayidx287$i$i>>2]|0; + $cmp306$i$i = ($I252$0$i$i|0)==(31); + $shr310$i$i = $I252$0$i$i >>> 1; + $sub313$i$i = (25 - ($shr310$i$i))|0; + $cond315$i$i = $cmp306$i$i ? 0 : $sub313$i$i; + $shl316$i$i = $qsize$0$i$i << $cond315$i$i; + $K305$0$i$i = $shl316$i$i;$T$0$i30$i = $138; + while(1) { + $head317$i$i = ((($T$0$i30$i)) + 4|0); + $139 = HEAP32[$head317$i$i>>2]|0; + $and318$i$i = $139 & -8; + $cmp319$i$i = ($and318$i$i|0)==($qsize$0$i$i|0); + if ($cmp319$i$i) { + label = 192; + break; + } + $shr323$i$i = $K305$0$i$i >>> 31; + $arrayidx325$i$i = (((($T$0$i30$i)) + 16|0) + ($shr323$i$i<<2)|0); + $shl326$i$i = $K305$0$i$i << 1; + $140 = HEAP32[$arrayidx325$i$i>>2]|0; + $cmp327$i$i = ($140|0)==(0|0); + if ($cmp327$i$i) { + label = 191; + break; + } else { + $K305$0$i$i = $shl326$i$i;$T$0$i30$i = $140; + } + } + if ((label|0) == 191) { + HEAP32[$arrayidx325$i$i>>2] = $add$ptr17$i$i; + $parent337$i$i = ((($add$ptr17$i$i)) + 24|0); + HEAP32[$parent337$i$i>>2] = $T$0$i30$i; + $bk338$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk338$i$i>>2] = $add$ptr17$i$i; + $fd339$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd339$i$i>>2] = $add$ptr17$i$i; + break; + } + else if ((label|0) == 192) { + $fd344$i$i = ((($T$0$i30$i)) + 8|0); + $141 = HEAP32[$fd344$i$i>>2]|0; + $bk357$i$i = ((($141)) + 12|0); + HEAP32[$bk357$i$i>>2] = $add$ptr17$i$i; + HEAP32[$fd344$i$i>>2] = $add$ptr17$i$i; + $fd359$i$i = ((($add$ptr17$i$i)) + 8|0); + HEAP32[$fd359$i$i>>2] = $141; + $bk360$i$i = ((($add$ptr17$i$i)) + 12|0); + HEAP32[$bk360$i$i>>2] = $T$0$i30$i; + $parent361$i$i = ((($add$ptr17$i$i)) + 24|0); + HEAP32[$parent361$i$i>>2] = 0; + break; + } + } + } while(0); + $add$ptr369$i$i = ((($add$ptr4$i$i)) + 8|0); + $retval$0 = $add$ptr369$i$i; + STACKTOP = sp;return ($retval$0|0); + } else { + $sp$0$i$i$i = (584); + } + } + while(1) { + $142 = HEAP32[$sp$0$i$i$i>>2]|0; + $cmp$i$i$i = ($142>>>0)>($94>>>0); + if (!($cmp$i$i$i)) { + $size$i$i$i = ((($sp$0$i$i$i)) + 4|0); + $143 = HEAP32[$size$i$i$i>>2]|0; + $add$ptr$i$i$i = (($142) + ($143)|0); + $cmp2$i$i$i = ($add$ptr$i$i$i>>>0)>($94>>>0); + if ($cmp2$i$i$i) { + break; + } + } + $next$i$i$i = ((($sp$0$i$i$i)) + 8|0); + $144 = HEAP32[$next$i$i$i>>2]|0; + $sp$0$i$i$i = $144; + } + $add$ptr2$i$i = ((($add$ptr$i$i$i)) + -47|0); + $add$ptr3$i$i = ((($add$ptr2$i$i)) + 8|0); + $145 = $add$ptr3$i$i; + $and$i$i = $145 & 7; + $cmp$i9$i = ($and$i$i|0)==(0); + $sub$i$i = (0 - ($145))|0; + $and6$i10$i = $sub$i$i & 7; + $cond$i$i = $cmp$i9$i ? 0 : $and6$i10$i; + $add$ptr7$i$i = (($add$ptr2$i$i) + ($cond$i$i)|0); + $add$ptr81$i$i = ((($94)) + 16|0); + $cmp9$i$i = ($add$ptr7$i$i>>>0)<($add$ptr81$i$i>>>0); + $cond13$i$i = $cmp9$i$i ? $94 : $add$ptr7$i$i; + $add$ptr14$i$i = ((($cond13$i$i)) + 8|0); + $add$ptr15$i$i = ((($cond13$i$i)) + 24|0); + $sub16$i$i = (($tsize$791$i) + -40)|0; + $add$ptr$i2$i$i = ((($tbase$792$i)) + 8|0); + $146 = $add$ptr$i2$i$i; + $and$i$i$i = $146 & 7; + $cmp$i3$i$i = ($and$i$i$i|0)==(0); + $sub$i$i$i = (0 - ($146))|0; + $and3$i$i$i = $sub$i$i$i & 7; + $cond$i$i$i = $cmp$i3$i$i ? 0 : $and3$i$i$i; + $add$ptr4$i$i$i = (($tbase$792$i) + ($cond$i$i$i)|0); + $sub5$i$i$i = (($sub16$i$i) - ($cond$i$i$i))|0; + HEAP32[(160)>>2] = $add$ptr4$i$i$i; + HEAP32[(148)>>2] = $sub5$i$i$i; + $or$i$i$i = $sub5$i$i$i | 1; + $head$i$i$i = ((($add$ptr4$i$i$i)) + 4|0); + HEAP32[$head$i$i$i>>2] = $or$i$i$i; + $add$ptr6$i$i$i = (($tbase$792$i) + ($sub16$i$i)|0); + $head7$i$i$i = ((($add$ptr6$i$i$i)) + 4|0); + HEAP32[$head7$i$i$i>>2] = 40; + $147 = HEAP32[(624)>>2]|0; + HEAP32[(164)>>2] = $147; + $head$i$i = ((($cond13$i$i)) + 4|0); + HEAP32[$head$i$i>>2] = 27; + ;HEAP32[$add$ptr14$i$i>>2]=HEAP32[(584)>>2]|0;HEAP32[$add$ptr14$i$i+4>>2]=HEAP32[(584)+4>>2]|0;HEAP32[$add$ptr14$i$i+8>>2]=HEAP32[(584)+8>>2]|0;HEAP32[$add$ptr14$i$i+12>>2]=HEAP32[(584)+12>>2]|0; + HEAP32[(584)>>2] = $tbase$792$i; + HEAP32[(588)>>2] = $tsize$791$i; + HEAP32[(596)>>2] = 0; + HEAP32[(592)>>2] = $add$ptr14$i$i; + $148 = $add$ptr15$i$i; + while(1) { + $add$ptr24$i$i = ((($148)) + 4|0); + HEAP32[$add$ptr24$i$i>>2] = 7; + $head26$i$i = ((($148)) + 8|0); + $cmp27$i$i = ($head26$i$i>>>0)<($add$ptr$i$i$i>>>0); + if ($cmp27$i$i) { + $148 = $add$ptr24$i$i; + } else { + break; + } + } + $cmp28$i$i = ($cond13$i$i|0)==($94|0); + if (!($cmp28$i$i)) { + $sub$ptr$lhs$cast$i$i = $cond13$i$i; + $sub$ptr$rhs$cast$i$i = $94; + $sub$ptr$sub$i$i = (($sub$ptr$lhs$cast$i$i) - ($sub$ptr$rhs$cast$i$i))|0; + $149 = HEAP32[$head$i$i>>2]|0; + $and32$i$i = $149 & -2; + HEAP32[$head$i$i>>2] = $and32$i$i; + $or33$i$i = $sub$ptr$sub$i$i | 1; + $head34$i$i = ((($94)) + 4|0); + HEAP32[$head34$i$i>>2] = $or33$i$i; + HEAP32[$cond13$i$i>>2] = $sub$ptr$sub$i$i; + $shr$i$i = $sub$ptr$sub$i$i >>> 3; + $cmp36$i$i = ($sub$ptr$sub$i$i>>>0)<(256); + if ($cmp36$i$i) { + $shl$i$i = $shr$i$i << 1; + $arrayidx$i$i = (176 + ($shl$i$i<<2)|0); + $150 = HEAP32[34]|0; + $shl39$i$i = 1 << $shr$i$i; + $and40$i$i = $150 & $shl39$i$i; + $tobool$i$i = ($and40$i$i|0)==(0); + if ($tobool$i$i) { + $or44$i$i = $150 | $shl39$i$i; + HEAP32[34] = $or44$i$i; + $$pre$i$i = ((($arrayidx$i$i)) + 8|0); + $$pre$phi$i$iZ2D = $$pre$i$i;$F$0$i$i = $arrayidx$i$i; + } else { + $151 = ((($arrayidx$i$i)) + 8|0); + $152 = HEAP32[$151>>2]|0; + $$pre$phi$i$iZ2D = $151;$F$0$i$i = $152; + } + HEAP32[$$pre$phi$i$iZ2D>>2] = $94; + $bk$i$i = ((($F$0$i$i)) + 12|0); + HEAP32[$bk$i$i>>2] = $94; + $fd54$i$i = ((($94)) + 8|0); + HEAP32[$fd54$i$i>>2] = $F$0$i$i; + $bk55$i$i = ((($94)) + 12|0); + HEAP32[$bk55$i$i>>2] = $arrayidx$i$i; + break; + } + $shr58$i$i = $sub$ptr$sub$i$i >>> 8; + $cmp59$i$i = ($shr58$i$i|0)==(0); + if ($cmp59$i$i) { + $I57$0$i$i = 0; + } else { + $cmp63$i$i = ($sub$ptr$sub$i$i>>>0)>(16777215); + if ($cmp63$i$i) { + $I57$0$i$i = 31; + } else { + $sub67$i$i = (($shr58$i$i) + 1048320)|0; + $shr68$i$i = $sub67$i$i >>> 16; + $and69$i$i = $shr68$i$i & 8; + $shl70$i$i = $shr58$i$i << $and69$i$i; + $sub71$i$i = (($shl70$i$i) + 520192)|0; + $shr72$i$i = $sub71$i$i >>> 16; + $and73$i$i = $shr72$i$i & 4; + $add74$i$i = $and73$i$i | $and69$i$i; + $shl75$i$i = $shl70$i$i << $and73$i$i; + $sub76$i$i = (($shl75$i$i) + 245760)|0; + $shr77$i$i = $sub76$i$i >>> 16; + $and78$i$i = $shr77$i$i & 2; + $add79$i$i = $add74$i$i | $and78$i$i; + $sub80$i$i = (14 - ($add79$i$i))|0; + $shl81$i$i = $shl75$i$i << $and78$i$i; + $shr82$i$i = $shl81$i$i >>> 15; + $add83$i$i = (($sub80$i$i) + ($shr82$i$i))|0; + $shl84$i$i = $add83$i$i << 1; + $add85$i$i = (($add83$i$i) + 7)|0; + $shr86$i$i = $sub$ptr$sub$i$i >>> $add85$i$i; + $and87$i$i = $shr86$i$i & 1; + $add88$i$i = $and87$i$i | $shl84$i$i; + $I57$0$i$i = $add88$i$i; + } + } + $arrayidx91$i$i = (440 + ($I57$0$i$i<<2)|0); + $index$i$i = ((($94)) + 28|0); + HEAP32[$index$i$i>>2] = $I57$0$i$i; + $arrayidx92$i$i = ((($94)) + 20|0); + HEAP32[$arrayidx92$i$i>>2] = 0; + HEAP32[$add$ptr81$i$i>>2] = 0; + $153 = HEAP32[(140)>>2]|0; + $shl95$i$i = 1 << $I57$0$i$i; + $and96$i$i = $153 & $shl95$i$i; + $tobool97$i$i = ($and96$i$i|0)==(0); + if ($tobool97$i$i) { + $or101$i$i = $153 | $shl95$i$i; + HEAP32[(140)>>2] = $or101$i$i; + HEAP32[$arrayidx91$i$i>>2] = $94; + $parent$i$i = ((($94)) + 24|0); + HEAP32[$parent$i$i>>2] = $arrayidx91$i$i; + $bk102$i$i = ((($94)) + 12|0); + HEAP32[$bk102$i$i>>2] = $94; + $fd103$i$i = ((($94)) + 8|0); + HEAP32[$fd103$i$i>>2] = $94; + break; + } + $154 = HEAP32[$arrayidx91$i$i>>2]|0; + $cmp106$i$i = ($I57$0$i$i|0)==(31); + $shr110$i$i = $I57$0$i$i >>> 1; + $sub113$i$i = (25 - ($shr110$i$i))|0; + $cond115$i$i = $cmp106$i$i ? 0 : $sub113$i$i; + $shl116$i$i = $sub$ptr$sub$i$i << $cond115$i$i; + $K105$0$i$i = $shl116$i$i;$T$0$i$i = $154; + while(1) { + $head118$i$i = ((($T$0$i$i)) + 4|0); + $155 = HEAP32[$head118$i$i>>2]|0; + $and119$i$i = $155 & -8; + $cmp120$i$i = ($and119$i$i|0)==($sub$ptr$sub$i$i|0); + if ($cmp120$i$i) { + label = 213; + break; + } + $shr124$i$i = $K105$0$i$i >>> 31; + $arrayidx126$i$i = (((($T$0$i$i)) + 16|0) + ($shr124$i$i<<2)|0); + $shl127$i$i = $K105$0$i$i << 1; + $156 = HEAP32[$arrayidx126$i$i>>2]|0; + $cmp128$i$i = ($156|0)==(0|0); + if ($cmp128$i$i) { + label = 212; + break; + } else { + $K105$0$i$i = $shl127$i$i;$T$0$i$i = $156; + } + } + if ((label|0) == 212) { + HEAP32[$arrayidx126$i$i>>2] = $94; + $parent138$i$i = ((($94)) + 24|0); + HEAP32[$parent138$i$i>>2] = $T$0$i$i; + $bk139$i$i = ((($94)) + 12|0); + HEAP32[$bk139$i$i>>2] = $94; + $fd140$i$i = ((($94)) + 8|0); + HEAP32[$fd140$i$i>>2] = $94; + break; + } + else if ((label|0) == 213) { + $fd148$i$i = ((($T$0$i$i)) + 8|0); + $157 = HEAP32[$fd148$i$i>>2]|0; + $bk158$i$i = ((($157)) + 12|0); + HEAP32[$bk158$i$i>>2] = $94; + HEAP32[$fd148$i$i>>2] = $94; + $fd160$i$i = ((($94)) + 8|0); + HEAP32[$fd160$i$i>>2] = $157; + $bk161$i$i = ((($94)) + 12|0); + HEAP32[$bk161$i$i>>2] = $T$0$i$i; + $parent162$i$i = ((($94)) + 24|0); + HEAP32[$parent162$i$i>>2] = 0; + break; + } + } + } + } while(0); + $158 = HEAP32[(148)>>2]|0; + $cmp257$i = ($158>>>0)>($nb$0>>>0); + if ($cmp257$i) { + $sub260$i = (($158) - ($nb$0))|0; + HEAP32[(148)>>2] = $sub260$i; + $159 = HEAP32[(160)>>2]|0; + $add$ptr262$i = (($159) + ($nb$0)|0); + HEAP32[(160)>>2] = $add$ptr262$i; + $or264$i = $sub260$i | 1; + $head265$i = ((($add$ptr262$i)) + 4|0); + HEAP32[$head265$i>>2] = $or264$i; + $or267$i = $nb$0 | 3; + $head268$i = ((($159)) + 4|0); + HEAP32[$head268$i>>2] = $or267$i; + $add$ptr269$i = ((($159)) + 8|0); + $retval$0 = $add$ptr269$i; + STACKTOP = sp;return ($retval$0|0); + } + } + $call275$i = (___errno_location()|0); + HEAP32[$call275$i>>2] = 12; + $retval$0 = 0; + STACKTOP = sp;return ($retval$0|0); +} +function _free($mem) { + $mem = $mem|0; + var $$pre = 0, $$pre$phiZ2D = 0, $$sink = 0, $$sink4 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; + var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $F510$0 = 0, $I534$0 = 0; + var $K583$0 = 0, $R$1 = 0, $R$3 = 0, $R332$1 = 0, $R332$3 = 0, $RP$1 = 0, $RP360$1 = 0, $T$0 = 0, $add$ptr = 0, $add$ptr16 = 0, $add$ptr217 = 0, $add$ptr261 = 0, $add$ptr482 = 0, $add$ptr498 = 0, $add$ptr6 = 0, $add17 = 0, $add246 = 0, $add258 = 0, $add267 = 0, $add550 = 0; + var $add555 = 0, $add559 = 0, $add561 = 0, $add564 = 0, $and12 = 0, $and140 = 0, $and210 = 0, $and215 = 0, $and232 = 0, $and240 = 0, $and266 = 0, $and301 = 0, $and410 = 0, $and46 = 0, $and495 = 0, $and5 = 0, $and512 = 0, $and545 = 0, $and549 = 0, $and554 = 0; + var $and563 = 0, $and574 = 0, $and592 = 0, $and8 = 0, $arrayidx108 = 0, $arrayidx113 = 0, $arrayidx130 = 0, $arrayidx149 = 0, $arrayidx157 = 0, $arrayidx182 = 0, $arrayidx188 = 0, $arrayidx198 = 0, $arrayidx362 = 0, $arrayidx374 = 0, $arrayidx379 = 0, $arrayidx400 = 0, $arrayidx419 = 0, $arrayidx427 = 0, $arrayidx454 = 0, $arrayidx460 = 0; + var $arrayidx470 = 0, $arrayidx509 = 0, $arrayidx567 = 0, $arrayidx570 = 0, $arrayidx599 = 0, $arrayidx99 = 0, $bk = 0, $bk275 = 0, $bk321 = 0, $bk333 = 0, $bk355 = 0, $bk529 = 0, $bk531 = 0, $bk580 = 0, $bk611 = 0, $bk631 = 0, $bk634 = 0, $bk66 = 0, $bk73 = 0, $bk94 = 0; + var $child = 0, $child171 = 0, $child361 = 0, $child443 = 0, $child569 = 0, $cmp = 0, $cmp$i = 0, $cmp100 = 0, $cmp104 = 0, $cmp109 = 0, $cmp114 = 0, $cmp127 = 0, $cmp13 = 0, $cmp131 = 0, $cmp150 = 0, $cmp162 = 0, $cmp173 = 0, $cmp18 = 0, $cmp189 = 0, $cmp211 = 0; + var $cmp22 = 0, $cmp228 = 0, $cmp243 = 0, $cmp249 = 0, $cmp25 = 0, $cmp255 = 0, $cmp269 = 0, $cmp296 = 0, $cmp334 = 0, $cmp363 = 0, $cmp368 = 0, $cmp375 = 0, $cmp380 = 0, $cmp395 = 0, $cmp401 = 0, $cmp42 = 0, $cmp420 = 0, $cmp432 = 0, $cmp445 = 0, $cmp461 = 0; + var $cmp484 = 0, $cmp502 = 0, $cmp536 = 0, $cmp540 = 0, $cmp584 = 0, $cmp593 = 0, $cmp601 = 0, $cmp640 = 0, $cmp74 = 0, $cond = 0, $cond255 = 0, $cond256 = 0, $dec = 0, $fd = 0, $fd273 = 0, $fd322 = 0, $fd338 = 0, $fd356 = 0, $fd530 = 0, $fd581 = 0; + var $fd612 = 0, $fd620 = 0, $fd633 = 0, $fd67 = 0, $fd78 = 0, $fd95 = 0, $head209 = 0, $head216 = 0, $head231 = 0, $head248 = 0, $head260 = 0, $head4 = 0, $head481 = 0, $head497 = 0, $head591 = 0, $idx$neg = 0, $index = 0, $index399 = 0, $index568 = 0, $neg = 0; + var $neg139 = 0, $neg300 = 0, $neg409 = 0, $next4$i = 0, $or = 0, $or247 = 0, $or259 = 0, $or480 = 0, $or496 = 0, $or516 = 0, $or578 = 0, $p$1 = 0, $parent = 0, $parent170 = 0, $parent183 = 0, $parent199 = 0, $parent331 = 0, $parent442 = 0, $parent455 = 0, $parent471 = 0; + var $parent579 = 0, $parent610 = 0, $parent635 = 0, $psize$1 = 0, $psize$2 = 0, $shl138 = 0, $shl299 = 0, $shl408 = 0, $shl45 = 0, $shl508 = 0, $shl511 = 0, $shl546 = 0, $shl551 = 0, $shl557 = 0, $shl560 = 0, $shl573 = 0, $shl590 = 0, $shl600 = 0, $shr = 0, $shr268 = 0; + var $shr501 = 0, $shr535 = 0, $shr544 = 0, $shr548 = 0, $shr553 = 0, $shr558 = 0, $shr562 = 0, $shr586 = 0, $shr597 = 0, $sp$0$i = 0, $sp$0$in$i = 0, $sub = 0, $sub547 = 0, $sub552 = 0, $sub556 = 0, $sub589 = 0, $tobool233 = 0, $tobool241 = 0, $tobool513 = 0, $tobool575 = 0; + var $tobool9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($mem|0)==(0|0); + if ($cmp) { + return; + } + $add$ptr = ((($mem)) + -8|0); + $0 = HEAP32[(152)>>2]|0; + $head4 = ((($mem)) + -4|0); + $1 = HEAP32[$head4>>2]|0; + $and5 = $1 & -8; + $add$ptr6 = (($add$ptr) + ($and5)|0); + $and8 = $1 & 1; + $tobool9 = ($and8|0)==(0); + do { + if ($tobool9) { + $2 = HEAP32[$add$ptr>>2]|0; + $and12 = $1 & 3; + $cmp13 = ($and12|0)==(0); + if ($cmp13) { + return; + } + $idx$neg = (0 - ($2))|0; + $add$ptr16 = (($add$ptr) + ($idx$neg)|0); + $add17 = (($2) + ($and5))|0; + $cmp18 = ($add$ptr16>>>0)<($0>>>0); + if ($cmp18) { + return; + } + $3 = HEAP32[(156)>>2]|0; + $cmp22 = ($3|0)==($add$ptr16|0); + if ($cmp22) { + $head209 = ((($add$ptr6)) + 4|0); + $20 = HEAP32[$head209>>2]|0; + $and210 = $20 & 3; + $cmp211 = ($and210|0)==(3); + if (!($cmp211)) { + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + HEAP32[(144)>>2] = $add17; + $and215 = $20 & -2; + HEAP32[$head209>>2] = $and215; + $or = $add17 | 1; + $head216 = ((($add$ptr16)) + 4|0); + HEAP32[$head216>>2] = $or; + $add$ptr217 = (($add$ptr16) + ($add17)|0); + HEAP32[$add$ptr217>>2] = $add17; + return; + } + $shr = $2 >>> 3; + $cmp25 = ($2>>>0)<(256); + if ($cmp25) { + $fd = ((($add$ptr16)) + 8|0); + $4 = HEAP32[$fd>>2]|0; + $bk = ((($add$ptr16)) + 12|0); + $5 = HEAP32[$bk>>2]|0; + $cmp42 = ($5|0)==($4|0); + if ($cmp42) { + $shl45 = 1 << $shr; + $neg = $shl45 ^ -1; + $6 = HEAP32[34]|0; + $and46 = $6 & $neg; + HEAP32[34] = $and46; + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } else { + $bk66 = ((($4)) + 12|0); + HEAP32[$bk66>>2] = $5; + $fd67 = ((($5)) + 8|0); + HEAP32[$fd67>>2] = $4; + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + } + $parent = ((($add$ptr16)) + 24|0); + $7 = HEAP32[$parent>>2]|0; + $bk73 = ((($add$ptr16)) + 12|0); + $8 = HEAP32[$bk73>>2]|0; + $cmp74 = ($8|0)==($add$ptr16|0); + do { + if ($cmp74) { + $child = ((($add$ptr16)) + 16|0); + $arrayidx99 = ((($child)) + 4|0); + $10 = HEAP32[$arrayidx99>>2]|0; + $cmp100 = ($10|0)==(0|0); + if ($cmp100) { + $11 = HEAP32[$child>>2]|0; + $cmp104 = ($11|0)==(0|0); + if ($cmp104) { + $R$3 = 0; + break; + } else { + $R$1 = $11;$RP$1 = $child; + } + } else { + $R$1 = $10;$RP$1 = $arrayidx99; + } + while(1) { + $arrayidx108 = ((($R$1)) + 20|0); + $12 = HEAP32[$arrayidx108>>2]|0; + $cmp109 = ($12|0)==(0|0); + if (!($cmp109)) { + $R$1 = $12;$RP$1 = $arrayidx108; + continue; + } + $arrayidx113 = ((($R$1)) + 16|0); + $13 = HEAP32[$arrayidx113>>2]|0; + $cmp114 = ($13|0)==(0|0); + if ($cmp114) { + break; + } else { + $R$1 = $13;$RP$1 = $arrayidx113; + } + } + HEAP32[$RP$1>>2] = 0; + $R$3 = $R$1; + } else { + $fd78 = ((($add$ptr16)) + 8|0); + $9 = HEAP32[$fd78>>2]|0; + $bk94 = ((($9)) + 12|0); + HEAP32[$bk94>>2] = $8; + $fd95 = ((($8)) + 8|0); + HEAP32[$fd95>>2] = $9; + $R$3 = $8; + } + } while(0); + $cmp127 = ($7|0)==(0|0); + if ($cmp127) { + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + } else { + $index = ((($add$ptr16)) + 28|0); + $14 = HEAP32[$index>>2]|0; + $arrayidx130 = (440 + ($14<<2)|0); + $15 = HEAP32[$arrayidx130>>2]|0; + $cmp131 = ($15|0)==($add$ptr16|0); + if ($cmp131) { + HEAP32[$arrayidx130>>2] = $R$3; + $cond255 = ($R$3|0)==(0|0); + if ($cond255) { + $shl138 = 1 << $14; + $neg139 = $shl138 ^ -1; + $16 = HEAP32[(140)>>2]|0; + $and140 = $16 & $neg139; + HEAP32[(140)>>2] = $and140; + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + } else { + $arrayidx149 = ((($7)) + 16|0); + $17 = HEAP32[$arrayidx149>>2]|0; + $cmp150 = ($17|0)!=($add$ptr16|0); + $$sink = $cmp150&1; + $arrayidx157 = (((($7)) + 16|0) + ($$sink<<2)|0); + HEAP32[$arrayidx157>>2] = $R$3; + $cmp162 = ($R$3|0)==(0|0); + if ($cmp162) { + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + break; + } + } + $parent170 = ((($R$3)) + 24|0); + HEAP32[$parent170>>2] = $7; + $child171 = ((($add$ptr16)) + 16|0); + $18 = HEAP32[$child171>>2]|0; + $cmp173 = ($18|0)==(0|0); + if (!($cmp173)) { + $arrayidx182 = ((($R$3)) + 16|0); + HEAP32[$arrayidx182>>2] = $18; + $parent183 = ((($18)) + 24|0); + HEAP32[$parent183>>2] = $R$3; + } + $arrayidx188 = ((($child171)) + 4|0); + $19 = HEAP32[$arrayidx188>>2]|0; + $cmp189 = ($19|0)==(0|0); + if ($cmp189) { + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + } else { + $arrayidx198 = ((($R$3)) + 20|0); + HEAP32[$arrayidx198>>2] = $19; + $parent199 = ((($19)) + 24|0); + HEAP32[$parent199>>2] = $R$3; + $21 = $add$ptr16;$p$1 = $add$ptr16;$psize$1 = $add17; + } + } + } else { + $21 = $add$ptr;$p$1 = $add$ptr;$psize$1 = $and5; + } + } while(0); + $cmp228 = ($21>>>0)<($add$ptr6>>>0); + if (!($cmp228)) { + return; + } + $head231 = ((($add$ptr6)) + 4|0); + $22 = HEAP32[$head231>>2]|0; + $and232 = $22 & 1; + $tobool233 = ($and232|0)==(0); + if ($tobool233) { + return; + } + $and240 = $22 & 2; + $tobool241 = ($and240|0)==(0); + if ($tobool241) { + $23 = HEAP32[(160)>>2]|0; + $cmp243 = ($23|0)==($add$ptr6|0); + if ($cmp243) { + $24 = HEAP32[(148)>>2]|0; + $add246 = (($24) + ($psize$1))|0; + HEAP32[(148)>>2] = $add246; + HEAP32[(160)>>2] = $p$1; + $or247 = $add246 | 1; + $head248 = ((($p$1)) + 4|0); + HEAP32[$head248>>2] = $or247; + $25 = HEAP32[(156)>>2]|0; + $cmp249 = ($p$1|0)==($25|0); + if (!($cmp249)) { + return; + } + HEAP32[(156)>>2] = 0; + HEAP32[(144)>>2] = 0; + return; + } + $26 = HEAP32[(156)>>2]|0; + $cmp255 = ($26|0)==($add$ptr6|0); + if ($cmp255) { + $27 = HEAP32[(144)>>2]|0; + $add258 = (($27) + ($psize$1))|0; + HEAP32[(144)>>2] = $add258; + HEAP32[(156)>>2] = $21; + $or259 = $add258 | 1; + $head260 = ((($p$1)) + 4|0); + HEAP32[$head260>>2] = $or259; + $add$ptr261 = (($21) + ($add258)|0); + HEAP32[$add$ptr261>>2] = $add258; + return; + } + $and266 = $22 & -8; + $add267 = (($and266) + ($psize$1))|0; + $shr268 = $22 >>> 3; + $cmp269 = ($22>>>0)<(256); + do { + if ($cmp269) { + $fd273 = ((($add$ptr6)) + 8|0); + $28 = HEAP32[$fd273>>2]|0; + $bk275 = ((($add$ptr6)) + 12|0); + $29 = HEAP32[$bk275>>2]|0; + $cmp296 = ($29|0)==($28|0); + if ($cmp296) { + $shl299 = 1 << $shr268; + $neg300 = $shl299 ^ -1; + $30 = HEAP32[34]|0; + $and301 = $30 & $neg300; + HEAP32[34] = $and301; + break; + } else { + $bk321 = ((($28)) + 12|0); + HEAP32[$bk321>>2] = $29; + $fd322 = ((($29)) + 8|0); + HEAP32[$fd322>>2] = $28; + break; + } + } else { + $parent331 = ((($add$ptr6)) + 24|0); + $31 = HEAP32[$parent331>>2]|0; + $bk333 = ((($add$ptr6)) + 12|0); + $32 = HEAP32[$bk333>>2]|0; + $cmp334 = ($32|0)==($add$ptr6|0); + do { + if ($cmp334) { + $child361 = ((($add$ptr6)) + 16|0); + $arrayidx362 = ((($child361)) + 4|0); + $34 = HEAP32[$arrayidx362>>2]|0; + $cmp363 = ($34|0)==(0|0); + if ($cmp363) { + $35 = HEAP32[$child361>>2]|0; + $cmp368 = ($35|0)==(0|0); + if ($cmp368) { + $R332$3 = 0; + break; + } else { + $R332$1 = $35;$RP360$1 = $child361; + } + } else { + $R332$1 = $34;$RP360$1 = $arrayidx362; + } + while(1) { + $arrayidx374 = ((($R332$1)) + 20|0); + $36 = HEAP32[$arrayidx374>>2]|0; + $cmp375 = ($36|0)==(0|0); + if (!($cmp375)) { + $R332$1 = $36;$RP360$1 = $arrayidx374; + continue; + } + $arrayidx379 = ((($R332$1)) + 16|0); + $37 = HEAP32[$arrayidx379>>2]|0; + $cmp380 = ($37|0)==(0|0); + if ($cmp380) { + break; + } else { + $R332$1 = $37;$RP360$1 = $arrayidx379; + } + } + HEAP32[$RP360$1>>2] = 0; + $R332$3 = $R332$1; + } else { + $fd338 = ((($add$ptr6)) + 8|0); + $33 = HEAP32[$fd338>>2]|0; + $bk355 = ((($33)) + 12|0); + HEAP32[$bk355>>2] = $32; + $fd356 = ((($32)) + 8|0); + HEAP32[$fd356>>2] = $33; + $R332$3 = $32; + } + } while(0); + $cmp395 = ($31|0)==(0|0); + if (!($cmp395)) { + $index399 = ((($add$ptr6)) + 28|0); + $38 = HEAP32[$index399>>2]|0; + $arrayidx400 = (440 + ($38<<2)|0); + $39 = HEAP32[$arrayidx400>>2]|0; + $cmp401 = ($39|0)==($add$ptr6|0); + if ($cmp401) { + HEAP32[$arrayidx400>>2] = $R332$3; + $cond256 = ($R332$3|0)==(0|0); + if ($cond256) { + $shl408 = 1 << $38; + $neg409 = $shl408 ^ -1; + $40 = HEAP32[(140)>>2]|0; + $and410 = $40 & $neg409; + HEAP32[(140)>>2] = $and410; + break; + } + } else { + $arrayidx419 = ((($31)) + 16|0); + $41 = HEAP32[$arrayidx419>>2]|0; + $cmp420 = ($41|0)!=($add$ptr6|0); + $$sink4 = $cmp420&1; + $arrayidx427 = (((($31)) + 16|0) + ($$sink4<<2)|0); + HEAP32[$arrayidx427>>2] = $R332$3; + $cmp432 = ($R332$3|0)==(0|0); + if ($cmp432) { + break; + } + } + $parent442 = ((($R332$3)) + 24|0); + HEAP32[$parent442>>2] = $31; + $child443 = ((($add$ptr6)) + 16|0); + $42 = HEAP32[$child443>>2]|0; + $cmp445 = ($42|0)==(0|0); + if (!($cmp445)) { + $arrayidx454 = ((($R332$3)) + 16|0); + HEAP32[$arrayidx454>>2] = $42; + $parent455 = ((($42)) + 24|0); + HEAP32[$parent455>>2] = $R332$3; + } + $arrayidx460 = ((($child443)) + 4|0); + $43 = HEAP32[$arrayidx460>>2]|0; + $cmp461 = ($43|0)==(0|0); + if (!($cmp461)) { + $arrayidx470 = ((($R332$3)) + 20|0); + HEAP32[$arrayidx470>>2] = $43; + $parent471 = ((($43)) + 24|0); + HEAP32[$parent471>>2] = $R332$3; + } + } + } + } while(0); + $or480 = $add267 | 1; + $head481 = ((($p$1)) + 4|0); + HEAP32[$head481>>2] = $or480; + $add$ptr482 = (($21) + ($add267)|0); + HEAP32[$add$ptr482>>2] = $add267; + $44 = HEAP32[(156)>>2]|0; + $cmp484 = ($p$1|0)==($44|0); + if ($cmp484) { + HEAP32[(144)>>2] = $add267; + return; + } else { + $psize$2 = $add267; + } + } else { + $and495 = $22 & -2; + HEAP32[$head231>>2] = $and495; + $or496 = $psize$1 | 1; + $head497 = ((($p$1)) + 4|0); + HEAP32[$head497>>2] = $or496; + $add$ptr498 = (($21) + ($psize$1)|0); + HEAP32[$add$ptr498>>2] = $psize$1; + $psize$2 = $psize$1; + } + $shr501 = $psize$2 >>> 3; + $cmp502 = ($psize$2>>>0)<(256); + if ($cmp502) { + $shl508 = $shr501 << 1; + $arrayidx509 = (176 + ($shl508<<2)|0); + $45 = HEAP32[34]|0; + $shl511 = 1 << $shr501; + $and512 = $45 & $shl511; + $tobool513 = ($and512|0)==(0); + if ($tobool513) { + $or516 = $45 | $shl511; + HEAP32[34] = $or516; + $$pre = ((($arrayidx509)) + 8|0); + $$pre$phiZ2D = $$pre;$F510$0 = $arrayidx509; + } else { + $46 = ((($arrayidx509)) + 8|0); + $47 = HEAP32[$46>>2]|0; + $$pre$phiZ2D = $46;$F510$0 = $47; + } + HEAP32[$$pre$phiZ2D>>2] = $p$1; + $bk529 = ((($F510$0)) + 12|0); + HEAP32[$bk529>>2] = $p$1; + $fd530 = ((($p$1)) + 8|0); + HEAP32[$fd530>>2] = $F510$0; + $bk531 = ((($p$1)) + 12|0); + HEAP32[$bk531>>2] = $arrayidx509; + return; + } + $shr535 = $psize$2 >>> 8; + $cmp536 = ($shr535|0)==(0); + if ($cmp536) { + $I534$0 = 0; + } else { + $cmp540 = ($psize$2>>>0)>(16777215); + if ($cmp540) { + $I534$0 = 31; + } else { + $sub = (($shr535) + 1048320)|0; + $shr544 = $sub >>> 16; + $and545 = $shr544 & 8; + $shl546 = $shr535 << $and545; + $sub547 = (($shl546) + 520192)|0; + $shr548 = $sub547 >>> 16; + $and549 = $shr548 & 4; + $add550 = $and549 | $and545; + $shl551 = $shl546 << $and549; + $sub552 = (($shl551) + 245760)|0; + $shr553 = $sub552 >>> 16; + $and554 = $shr553 & 2; + $add555 = $add550 | $and554; + $sub556 = (14 - ($add555))|0; + $shl557 = $shl551 << $and554; + $shr558 = $shl557 >>> 15; + $add559 = (($sub556) + ($shr558))|0; + $shl560 = $add559 << 1; + $add561 = (($add559) + 7)|0; + $shr562 = $psize$2 >>> $add561; + $and563 = $shr562 & 1; + $add564 = $and563 | $shl560; + $I534$0 = $add564; + } + } + $arrayidx567 = (440 + ($I534$0<<2)|0); + $index568 = ((($p$1)) + 28|0); + HEAP32[$index568>>2] = $I534$0; + $child569 = ((($p$1)) + 16|0); + $arrayidx570 = ((($p$1)) + 20|0); + HEAP32[$arrayidx570>>2] = 0; + HEAP32[$child569>>2] = 0; + $48 = HEAP32[(140)>>2]|0; + $shl573 = 1 << $I534$0; + $and574 = $48 & $shl573; + $tobool575 = ($and574|0)==(0); + do { + if ($tobool575) { + $or578 = $48 | $shl573; + HEAP32[(140)>>2] = $or578; + HEAP32[$arrayidx567>>2] = $p$1; + $parent579 = ((($p$1)) + 24|0); + HEAP32[$parent579>>2] = $arrayidx567; + $bk580 = ((($p$1)) + 12|0); + HEAP32[$bk580>>2] = $p$1; + $fd581 = ((($p$1)) + 8|0); + HEAP32[$fd581>>2] = $p$1; + } else { + $49 = HEAP32[$arrayidx567>>2]|0; + $cmp584 = ($I534$0|0)==(31); + $shr586 = $I534$0 >>> 1; + $sub589 = (25 - ($shr586))|0; + $cond = $cmp584 ? 0 : $sub589; + $shl590 = $psize$2 << $cond; + $K583$0 = $shl590;$T$0 = $49; + while(1) { + $head591 = ((($T$0)) + 4|0); + $50 = HEAP32[$head591>>2]|0; + $and592 = $50 & -8; + $cmp593 = ($and592|0)==($psize$2|0); + if ($cmp593) { + label = 73; + break; + } + $shr597 = $K583$0 >>> 31; + $arrayidx599 = (((($T$0)) + 16|0) + ($shr597<<2)|0); + $shl600 = $K583$0 << 1; + $51 = HEAP32[$arrayidx599>>2]|0; + $cmp601 = ($51|0)==(0|0); + if ($cmp601) { + label = 72; + break; + } else { + $K583$0 = $shl600;$T$0 = $51; + } + } + if ((label|0) == 72) { + HEAP32[$arrayidx599>>2] = $p$1; + $parent610 = ((($p$1)) + 24|0); + HEAP32[$parent610>>2] = $T$0; + $bk611 = ((($p$1)) + 12|0); + HEAP32[$bk611>>2] = $p$1; + $fd612 = ((($p$1)) + 8|0); + HEAP32[$fd612>>2] = $p$1; + break; + } + else if ((label|0) == 73) { + $fd620 = ((($T$0)) + 8|0); + $52 = HEAP32[$fd620>>2]|0; + $bk631 = ((($52)) + 12|0); + HEAP32[$bk631>>2] = $p$1; + HEAP32[$fd620>>2] = $p$1; + $fd633 = ((($p$1)) + 8|0); + HEAP32[$fd633>>2] = $52; + $bk634 = ((($p$1)) + 12|0); + HEAP32[$bk634>>2] = $T$0; + $parent635 = ((($p$1)) + 24|0); + HEAP32[$parent635>>2] = 0; + break; + } + } + } while(0); + $53 = HEAP32[(168)>>2]|0; + $dec = (($53) + -1)|0; + HEAP32[(168)>>2] = $dec; + $cmp640 = ($dec|0)==(0); + if ($cmp640) { + $sp$0$in$i = (592); + } else { + return; + } + while(1) { + $sp$0$i = HEAP32[$sp$0$in$i>>2]|0; + $cmp$i = ($sp$0$i|0)==(0|0); + $next4$i = ((($sp$0$i)) + 8|0); + if ($cmp$i) { + break; + } else { + $sp$0$in$i = $next4$i; + } + } + HEAP32[(168)>>2] = -1; + return; +} +function ___stdio_close($f) { + $f = $f|0; + var $0 = 0, $call = 0, $call1 = 0, $call2 = 0, $fd = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $fd = ((($f)) + 60|0); + $0 = HEAP32[$fd>>2]|0; + $call = (_dummy($0)|0); + HEAP32[$vararg_buffer>>2] = $call; + $call1 = (___syscall6(6,($vararg_buffer|0))|0); + $call2 = (___syscall_ret($call1)|0); + STACKTOP = sp;return ($call2|0); +} +function ___stdio_seek($f,$off,$whence) { + $f = $f|0; + $off = $off|0; + $whence = $whence|0; + var $$pre = 0, $0 = 0, $1 = 0, $2 = 0, $call = 0, $call1 = 0, $cmp = 0, $fd = 0, $ret = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr4 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer = sp; + $ret = sp + 20|0; + $fd = ((($f)) + 60|0); + $0 = HEAP32[$fd>>2]|0; + $1 = $ret; + HEAP32[$vararg_buffer>>2] = $0; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 0; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $off; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $1; + $vararg_ptr4 = ((($vararg_buffer)) + 16|0); + HEAP32[$vararg_ptr4>>2] = $whence; + $call = (___syscall140(140,($vararg_buffer|0))|0); + $call1 = (___syscall_ret($call)|0); + $cmp = ($call1|0)<(0); + if ($cmp) { + HEAP32[$ret>>2] = -1; + $2 = -1; + } else { + $$pre = HEAP32[$ret>>2]|0; + $2 = $$pre; + } + STACKTOP = sp;return ($2|0); +} +function ___syscall_ret($r) { + $r = $r|0; + var $call = 0, $cmp = 0, $retval$0 = 0, $sub = 0, label = 0, sp = 0; + sp = STACKTOP; + $cmp = ($r>>>0)>(4294963200); + if ($cmp) { + $sub = (0 - ($r))|0; + $call = (___errno_location()|0); + HEAP32[$call>>2] = $sub; + $retval$0 = -1; + } else { + $retval$0 = $r; + } + return ($retval$0|0); +} +function ___errno_location() { + var label = 0, sp = 0; + sp = STACKTOP; + return (632|0); +} +function _dummy($fd) { + $fd = $fd|0; + var label = 0, sp = 0; + sp = STACKTOP; + return ($fd|0); +} +function ___stdout_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $0 = 0, $1 = 0, $2 = 0, $and = 0, $call = 0, $call3 = 0, $fd = 0, $lbf = 0, $tobool = 0, $tobool2 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $write = 0, $wsz = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer = sp; + $wsz = sp + 16|0; + $write = ((($f)) + 36|0); + HEAP32[$write>>2] = 4; + $0 = HEAP32[$f>>2]|0; + $and = $0 & 64; + $tobool = ($and|0)==(0); + if ($tobool) { + $fd = ((($f)) + 60|0); + $1 = HEAP32[$fd>>2]|0; + $2 = $wsz; + HEAP32[$vararg_buffer>>2] = $1; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 21523; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $2; + $call = (___syscall54(54,($vararg_buffer|0))|0); + $tobool2 = ($call|0)==(0); + if (!($tobool2)) { + $lbf = ((($f)) + 75|0); + HEAP8[$lbf>>0] = -1; + } + } + $call3 = (___stdio_write($f,$buf,$len)|0); + STACKTOP = sp;return ($call3|0); +} +function ___stdio_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $add = 0, $add$ptr = 0, $add$ptr32 = 0, $buf8 = 0, $buf_size = 0, $call = 0; + var $call40 = 0, $call7 = 0, $call741 = 0, $call746 = 0, $cmp = 0, $cmp12 = 0, $cmp17 = 0, $cmp24 = 0, $cmp42 = 0, $cnt$0 = 0, $dec = 0, $fd = 0, $incdec$ptr = 0, $iov$043 = 0, $iov$1 = 0, $iov_base2 = 0, $iov_len = 0, $iov_len19 = 0, $iov_len23 = 0, $iov_len3 = 0; + var $iov_len36 = 0, $iovcnt$045 = 0, $iovcnt$1 = 0, $iovs = 0, $or = 0, $rem$044 = 0, $retval$0 = 0, $sub = 0, $sub$ptr$sub = 0, $sub21 = 0, $sub28 = 0, $sub37 = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, $vararg_ptr7 = 0, $wbase = 0, $wend = 0; + var $wend14 = 0, $wpos = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $vararg_buffer3 = sp + 16|0; + $vararg_buffer = sp; + $iovs = sp + 32|0; + $wbase = ((($f)) + 28|0); + $0 = HEAP32[$wbase>>2]|0; + HEAP32[$iovs>>2] = $0; + $iov_len = ((($iovs)) + 4|0); + $wpos = ((($f)) + 20|0); + $1 = HEAP32[$wpos>>2]|0; + $sub$ptr$sub = (($1) - ($0))|0; + HEAP32[$iov_len>>2] = $sub$ptr$sub; + $iov_base2 = ((($iovs)) + 8|0); + HEAP32[$iov_base2>>2] = $buf; + $iov_len3 = ((($iovs)) + 12|0); + HEAP32[$iov_len3>>2] = $len; + $add = (($sub$ptr$sub) + ($len))|0; + $fd = ((($f)) + 60|0); + $2 = HEAP32[$fd>>2]|0; + $3 = $iovs; + HEAP32[$vararg_buffer>>2] = $2; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $3; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = 2; + $call40 = (___syscall146(146,($vararg_buffer|0))|0); + $call741 = (___syscall_ret($call40)|0); + $cmp42 = ($add|0)==($call741|0); + L1: do { + if ($cmp42) { + label = 3; + } else { + $call746 = $call741;$iov$043 = $iovs;$iovcnt$045 = 2;$rem$044 = $add; + while(1) { + $cmp12 = ($call746|0)<(0); + if ($cmp12) { + break; + } + $sub21 = (($rem$044) - ($call746))|0; + $iov_len23 = ((($iov$043)) + 4|0); + $9 = HEAP32[$iov_len23>>2]|0; + $cmp24 = ($call746>>>0)>($9>>>0); + $incdec$ptr = ((($iov$043)) + 8|0); + $iov$1 = $cmp24 ? $incdec$ptr : $iov$043; + $dec = $cmp24 << 31 >> 31; + $iovcnt$1 = (($iovcnt$045) + ($dec))|0; + $sub28 = $cmp24 ? $9 : 0; + $cnt$0 = (($call746) - ($sub28))|0; + $10 = HEAP32[$iov$1>>2]|0; + $add$ptr32 = (($10) + ($cnt$0)|0); + HEAP32[$iov$1>>2] = $add$ptr32; + $iov_len36 = ((($iov$1)) + 4|0); + $11 = HEAP32[$iov_len36>>2]|0; + $sub37 = (($11) - ($cnt$0))|0; + HEAP32[$iov_len36>>2] = $sub37; + $12 = HEAP32[$fd>>2]|0; + $13 = $iov$1; + HEAP32[$vararg_buffer3>>2] = $12; + $vararg_ptr6 = ((($vararg_buffer3)) + 4|0); + HEAP32[$vararg_ptr6>>2] = $13; + $vararg_ptr7 = ((($vararg_buffer3)) + 8|0); + HEAP32[$vararg_ptr7>>2] = $iovcnt$1; + $call = (___syscall146(146,($vararg_buffer3|0))|0); + $call7 = (___syscall_ret($call)|0); + $cmp = ($sub21|0)==($call7|0); + if ($cmp) { + label = 3; + break L1; + } else { + $call746 = $call7;$iov$043 = $iov$1;$iovcnt$045 = $iovcnt$1;$rem$044 = $sub21; + } + } + $wend14 = ((($f)) + 16|0); + HEAP32[$wend14>>2] = 0; + HEAP32[$wbase>>2] = 0; + HEAP32[$wpos>>2] = 0; + $7 = HEAP32[$f>>2]|0; + $or = $7 | 32; + HEAP32[$f>>2] = $or; + $cmp17 = ($iovcnt$045|0)==(2); + if ($cmp17) { + $retval$0 = 0; + } else { + $iov_len19 = ((($iov$043)) + 4|0); + $8 = HEAP32[$iov_len19>>2]|0; + $sub = (($len) - ($8))|0; + $retval$0 = $sub; + } + } + } while(0); + if ((label|0) == 3) { + $buf8 = ((($f)) + 44|0); + $4 = HEAP32[$buf8>>2]|0; + $buf_size = ((($f)) + 48|0); + $5 = HEAP32[$buf_size>>2]|0; + $add$ptr = (($4) + ($5)|0); + $wend = ((($f)) + 16|0); + HEAP32[$wend>>2] = $add$ptr; + $6 = $4; + HEAP32[$wbase>>2] = $6; + HEAP32[$wpos>>2] = $6; + $retval$0 = $len; + } + STACKTOP = sp;return ($retval$0|0); +} +function ___lockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function ___unlockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function ___ofl_lock() { + var label = 0, sp = 0; + sp = STACKTOP; + ___lock((636|0)); + return (644|0); +} +function ___ofl_unlock() { + var label = 0, sp = 0; + sp = STACKTOP; + ___unlock((636|0)); + return; +} +function _fflush($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $call = 0, $call1 = 0, $call11 = 0, $call118 = 0, $call17 = 0, $call23 = 0, $call7 = 0, $cmp = 0, $cmp15 = 0, $cmp21 = 0, $cond10 = 0, $cond20 = 0, $f$addr$0 = 0, $f$addr$019 = 0; + var $f$addr$022 = 0, $lock = 0, $lock14 = 0, $next = 0, $or = 0, $phitmp = 0, $r$0$lcssa = 0, $r$021 = 0, $r$1 = 0, $retval$0 = 0, $tobool = 0, $tobool12 = 0, $tobool1220 = 0, $tobool25 = 0, $tobool5 = 0, $wbase = 0, $wpos = 0, label = 0, sp = 0; + sp = STACKTOP; + $tobool = ($f|0)==(0|0); + do { + if ($tobool) { + $1 = HEAP32[33]|0; + $tobool5 = ($1|0)==(0|0); + if ($tobool5) { + $cond10 = 0; + } else { + $2 = HEAP32[33]|0; + $call7 = (_fflush($2)|0); + $cond10 = $call7; + } + $call11 = (___ofl_lock()|0); + $f$addr$019 = HEAP32[$call11>>2]|0; + $tobool1220 = ($f$addr$019|0)==(0|0); + if ($tobool1220) { + $r$0$lcssa = $cond10; + } else { + $f$addr$022 = $f$addr$019;$r$021 = $cond10; + while(1) { + $lock14 = ((($f$addr$022)) + 76|0); + $3 = HEAP32[$lock14>>2]|0; + $cmp15 = ($3|0)>(-1); + if ($cmp15) { + $call17 = (___lockfile($f$addr$022)|0); + $cond20 = $call17; + } else { + $cond20 = 0; + } + $wpos = ((($f$addr$022)) + 20|0); + $4 = HEAP32[$wpos>>2]|0; + $wbase = ((($f$addr$022)) + 28|0); + $5 = HEAP32[$wbase>>2]|0; + $cmp21 = ($4>>>0)>($5>>>0); + if ($cmp21) { + $call23 = (___fflush_unlocked($f$addr$022)|0); + $or = $call23 | $r$021; + $r$1 = $or; + } else { + $r$1 = $r$021; + } + $tobool25 = ($cond20|0)==(0); + if (!($tobool25)) { + ___unlockfile($f$addr$022); + } + $next = ((($f$addr$022)) + 56|0); + $f$addr$0 = HEAP32[$next>>2]|0; + $tobool12 = ($f$addr$0|0)==(0|0); + if ($tobool12) { + $r$0$lcssa = $r$1; + break; + } else { + $f$addr$022 = $f$addr$0;$r$021 = $r$1; + } + } + } + ___ofl_unlock(); + $retval$0 = $r$0$lcssa; + } else { + $lock = ((($f)) + 76|0); + $0 = HEAP32[$lock>>2]|0; + $cmp = ($0|0)>(-1); + if (!($cmp)) { + $call118 = (___fflush_unlocked($f)|0); + $retval$0 = $call118; + break; + } + $call = (___lockfile($f)|0); + $phitmp = ($call|0)==(0); + $call1 = (___fflush_unlocked($f)|0); + if ($phitmp) { + $retval$0 = $call1; + } else { + ___unlockfile($f); + $retval$0 = $call1; + } + } + } while(0); + return ($retval$0|0); +} +function ___fflush_unlocked($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $cmp = 0, $cmp4 = 0, $rend = 0, $retval$0 = 0, $rpos = 0, $seek = 0, $sub$ptr$lhs$cast = 0, $sub$ptr$rhs$cast = 0, $sub$ptr$sub = 0, $tobool = 0, $wbase = 0, $wend = 0, $wpos = 0; + var $write = 0, label = 0, sp = 0; + sp = STACKTOP; + $wpos = ((($f)) + 20|0); + $0 = HEAP32[$wpos>>2]|0; + $wbase = ((($f)) + 28|0); + $1 = HEAP32[$wbase>>2]|0; + $cmp = ($0>>>0)>($1>>>0); + if ($cmp) { + $write = ((($f)) + 36|0); + $2 = HEAP32[$write>>2]|0; + (FUNCTION_TABLE_iiii[$2 & 7]($f,0,0)|0); + $3 = HEAP32[$wpos>>2]|0; + $tobool = ($3|0)==(0|0); + if ($tobool) { + $retval$0 = -1; + } else { + label = 3; + } + } else { + label = 3; + } + if ((label|0) == 3) { + $rpos = ((($f)) + 4|0); + $4 = HEAP32[$rpos>>2]|0; + $rend = ((($f)) + 8|0); + $5 = HEAP32[$rend>>2]|0; + $cmp4 = ($4>>>0)<($5>>>0); + if ($cmp4) { + $sub$ptr$lhs$cast = $4; + $sub$ptr$rhs$cast = $5; + $sub$ptr$sub = (($sub$ptr$lhs$cast) - ($sub$ptr$rhs$cast))|0; + $seek = ((($f)) + 40|0); + $6 = HEAP32[$seek>>2]|0; + (FUNCTION_TABLE_iiii[$6 & 7]($f,$sub$ptr$sub,1)|0); + } + $wend = ((($f)) + 16|0); + HEAP32[$wend>>2] = 0; + HEAP32[$wbase>>2] = 0; + HEAP32[$wpos>>2] = 0; + HEAP32[$rend>>2] = 0; + HEAP32[$rpos>>2] = 0; + $retval$0 = 0; + } + return ($retval$0|0); +} +function runPostSets() { +} +function _memcpy(dest, src, num) { + dest = dest|0; src = src|0; num = num|0; + var ret = 0; + var aligned_dest_end = 0; + var block_aligned_dest_end = 0; + var dest_end = 0; + // Test against a benchmarked cutoff limit for when HEAPU8.set() becomes faster to use. + if ((num|0) >= + 8192 + ) { + return _emscripten_memcpy_big(dest|0, src|0, num|0)|0; + } + + ret = dest|0; + dest_end = (dest + num)|0; + if ((dest&3) == (src&3)) { + // The initial unaligned < 4-byte front. + while (dest & 3) { + if ((num|0) == 0) return ret|0; + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + dest = (dest+1)|0; + src = (src+1)|0; + num = (num-1)|0; + } + aligned_dest_end = (dest_end & -4)|0; + block_aligned_dest_end = (aligned_dest_end - 64)|0; + while ((dest|0) <= (block_aligned_dest_end|0) ) { + HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); + HEAP32[(((dest)+(4))>>2)]=((HEAP32[(((src)+(4))>>2)])|0); + HEAP32[(((dest)+(8))>>2)]=((HEAP32[(((src)+(8))>>2)])|0); + HEAP32[(((dest)+(12))>>2)]=((HEAP32[(((src)+(12))>>2)])|0); + HEAP32[(((dest)+(16))>>2)]=((HEAP32[(((src)+(16))>>2)])|0); + HEAP32[(((dest)+(20))>>2)]=((HEAP32[(((src)+(20))>>2)])|0); + HEAP32[(((dest)+(24))>>2)]=((HEAP32[(((src)+(24))>>2)])|0); + HEAP32[(((dest)+(28))>>2)]=((HEAP32[(((src)+(28))>>2)])|0); + HEAP32[(((dest)+(32))>>2)]=((HEAP32[(((src)+(32))>>2)])|0); + HEAP32[(((dest)+(36))>>2)]=((HEAP32[(((src)+(36))>>2)])|0); + HEAP32[(((dest)+(40))>>2)]=((HEAP32[(((src)+(40))>>2)])|0); + HEAP32[(((dest)+(44))>>2)]=((HEAP32[(((src)+(44))>>2)])|0); + HEAP32[(((dest)+(48))>>2)]=((HEAP32[(((src)+(48))>>2)])|0); + HEAP32[(((dest)+(52))>>2)]=((HEAP32[(((src)+(52))>>2)])|0); + HEAP32[(((dest)+(56))>>2)]=((HEAP32[(((src)+(56))>>2)])|0); + HEAP32[(((dest)+(60))>>2)]=((HEAP32[(((src)+(60))>>2)])|0); + dest = (dest+64)|0; + src = (src+64)|0; + } + while ((dest|0) < (aligned_dest_end|0) ) { + HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); + dest = (dest+4)|0; + src = (src+4)|0; + } + } else { + // In the unaligned copy case, unroll a bit as well. + aligned_dest_end = (dest_end - 4)|0; + while ((dest|0) < (aligned_dest_end|0) ) { + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + HEAP8[(((dest)+(1))>>0)]=((HEAP8[(((src)+(1))>>0)])|0); + HEAP8[(((dest)+(2))>>0)]=((HEAP8[(((src)+(2))>>0)])|0); + HEAP8[(((dest)+(3))>>0)]=((HEAP8[(((src)+(3))>>0)])|0); + dest = (dest+4)|0; + src = (src+4)|0; + } + } + // The remaining unaligned < 4 byte tail. + while ((dest|0) < (dest_end|0)) { + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + dest = (dest+1)|0; + src = (src+1)|0; + } + return ret|0; +} +function _memset(ptr, value, num) { + ptr = ptr|0; value = value|0; num = num|0; + var end = 0, aligned_end = 0, block_aligned_end = 0, value4 = 0; + end = (ptr + num)|0; + + value = value & 0xff; + if ((num|0) >= 67 /* 64 bytes for an unrolled loop + 3 bytes for unaligned head*/) { + while ((ptr&3) != 0) { + HEAP8[((ptr)>>0)]=value; + ptr = (ptr+1)|0; + } + + aligned_end = (end & -4)|0; + block_aligned_end = (aligned_end - 64)|0; + value4 = value | (value << 8) | (value << 16) | (value << 24); + + while((ptr|0) <= (block_aligned_end|0)) { + HEAP32[((ptr)>>2)]=value4; + HEAP32[(((ptr)+(4))>>2)]=value4; + HEAP32[(((ptr)+(8))>>2)]=value4; + HEAP32[(((ptr)+(12))>>2)]=value4; + HEAP32[(((ptr)+(16))>>2)]=value4; + HEAP32[(((ptr)+(20))>>2)]=value4; + HEAP32[(((ptr)+(24))>>2)]=value4; + HEAP32[(((ptr)+(28))>>2)]=value4; + HEAP32[(((ptr)+(32))>>2)]=value4; + HEAP32[(((ptr)+(36))>>2)]=value4; + HEAP32[(((ptr)+(40))>>2)]=value4; + HEAP32[(((ptr)+(44))>>2)]=value4; + HEAP32[(((ptr)+(48))>>2)]=value4; + HEAP32[(((ptr)+(52))>>2)]=value4; + HEAP32[(((ptr)+(56))>>2)]=value4; + HEAP32[(((ptr)+(60))>>2)]=value4; + ptr = (ptr + 64)|0; + } + + while ((ptr|0) < (aligned_end|0) ) { + HEAP32[((ptr)>>2)]=value4; + ptr = (ptr+4)|0; + } + } + // The remaining bytes. + while ((ptr|0) < (end|0)) { + HEAP8[((ptr)>>0)]=value; + ptr = (ptr+1)|0; + } + return (end-num)|0; +} +function _sbrk(increment) { + increment = increment|0; + var oldDynamicTop = 0; + var oldDynamicTopOnChange = 0; + var newDynamicTop = 0; + var totalMemory = 0; + increment = ((increment + 15) & -16)|0; + oldDynamicTop = HEAP32[DYNAMICTOP_PTR>>2]|0; + newDynamicTop = oldDynamicTop + increment | 0; + + if (((increment|0) > 0 & (newDynamicTop|0) < (oldDynamicTop|0)) // Detect and fail if we would wrap around signed 32-bit int. + | (newDynamicTop|0) < 0) { // Also underflow, sbrk() should be able to be used to subtract. + abortOnCannotGrowMemory()|0; + ___setErrNo(12); + return -1; + } + + HEAP32[DYNAMICTOP_PTR>>2] = newDynamicTop; + totalMemory = getTotalMemory()|0; + if ((newDynamicTop|0) > (totalMemory|0)) { + if ((enlargeMemory()|0) == 0) { + HEAP32[DYNAMICTOP_PTR>>2] = oldDynamicTop; + ___setErrNo(12); + return -1; + } + } + return oldDynamicTop|0; +} + + +function dynCall_ii(index,a1) { + index = index|0; + a1=a1|0; + return FUNCTION_TABLE_ii[index&1](a1|0)|0; +} + + +function dynCall_iiii(index,a1,a2,a3) { + index = index|0; + a1=a1|0; a2=a2|0; a3=a3|0; + return FUNCTION_TABLE_iiii[index&7](a1|0,a2|0,a3|0)|0; +} + +function b0(p0) { + p0 = p0|0; nullFunc_ii(0);return 0; +} +function b1(p0,p1,p2) { + p0 = p0|0;p1 = p1|0;p2 = p2|0; nullFunc_iiii(1);return 0; +} + +// EMSCRIPTEN_END_FUNCS +var FUNCTION_TABLE_ii = [b0,___stdio_close]; +var FUNCTION_TABLE_iiii = [b1,b1,___stdout_write,___stdio_seek,___stdio_write,b1,b1,b1]; + + return { ___errno_location: ___errno_location, _fflush: _fflush, _free: _free, _main: _main, _malloc: _malloc, _memcpy: _memcpy, _memset: _memset, _sbrk: _sbrk, dynCall_ii: dynCall_ii, dynCall_iiii: dynCall_iiii, establishStackSpace: establishStackSpace, getTempRet0: getTempRet0, runPostSets: runPostSets, setTempRet0: setTempRet0, setThrew: setThrew, stackAlloc: stackAlloc, stackRestore: stackRestore, stackSave: stackSave }; +}) +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg, Module.asmLibraryArg, buffer); + +var real____errno_location = asm["___errno_location"]; asm["___errno_location"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real____errno_location.apply(null, arguments); +}; + +var real__fflush = asm["_fflush"]; asm["_fflush"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__fflush.apply(null, arguments); +}; + +var real__free = asm["_free"]; asm["_free"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__free.apply(null, arguments); +}; + +var real__main = asm["_main"]; asm["_main"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__main.apply(null, arguments); +}; + +var real__malloc = asm["_malloc"]; asm["_malloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__malloc.apply(null, arguments); +}; + +var real__sbrk = asm["_sbrk"]; asm["_sbrk"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real__sbrk.apply(null, arguments); +}; + +var real_establishStackSpace = asm["establishStackSpace"]; asm["establishStackSpace"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_establishStackSpace.apply(null, arguments); +}; + +var real_getTempRet0 = asm["getTempRet0"]; asm["getTempRet0"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_getTempRet0.apply(null, arguments); +}; + +var real_setTempRet0 = asm["setTempRet0"]; asm["setTempRet0"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_setTempRet0.apply(null, arguments); +}; + +var real_setThrew = asm["setThrew"]; asm["setThrew"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_setThrew.apply(null, arguments); +}; + +var real_stackAlloc = asm["stackAlloc"]; asm["stackAlloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackAlloc.apply(null, arguments); +}; + +var real_stackRestore = asm["stackRestore"]; asm["stackRestore"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackRestore.apply(null, arguments); +}; + +var real_stackSave = asm["stackSave"]; asm["stackSave"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return real_stackSave.apply(null, arguments); +}; +var ___errno_location = Module["___errno_location"] = asm["___errno_location"]; +var _fflush = Module["_fflush"] = asm["_fflush"]; +var _free = Module["_free"] = asm["_free"]; +var _main = Module["_main"] = asm["_main"]; +var _malloc = Module["_malloc"] = asm["_malloc"]; +var _memcpy = Module["_memcpy"] = asm["_memcpy"]; +var _memset = Module["_memset"] = asm["_memset"]; +var _sbrk = Module["_sbrk"] = asm["_sbrk"]; +var establishStackSpace = Module["establishStackSpace"] = asm["establishStackSpace"]; +var getTempRet0 = Module["getTempRet0"] = asm["getTempRet0"]; +var runPostSets = Module["runPostSets"] = asm["runPostSets"]; +var setTempRet0 = Module["setTempRet0"] = asm["setTempRet0"]; +var setThrew = Module["setThrew"] = asm["setThrew"]; +var stackAlloc = Module["stackAlloc"] = asm["stackAlloc"]; +var stackRestore = Module["stackRestore"] = asm["stackRestore"]; +var stackSave = Module["stackSave"] = asm["stackSave"]; +var dynCall_ii = Module["dynCall_ii"] = asm["dynCall_ii"]; +var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"]; +; + + + +// === Auto-generated postamble setup entry stuff === + +Module['asm'] = asm; + +if (!Module["intArrayFromString"]) Module["intArrayFromString"] = function() { abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["intArrayToString"]) Module["intArrayToString"] = function() { abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["ccall"]) Module["ccall"] = function() { abort("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["cwrap"]) Module["cwrap"] = function() { abort("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["setValue"]) Module["setValue"] = function() { abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getValue"]) Module["getValue"] = function() { abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["allocate"]) Module["allocate"] = function() { abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getMemory"]) Module["getMemory"] = function() { abort("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["Pointer_stringify"]) Module["Pointer_stringify"] = function() { abort("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["AsciiToString"]) Module["AsciiToString"] = function() { abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToAscii"]) Module["stringToAscii"] = function() { abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF8ArrayToString"]) Module["UTF8ArrayToString"] = function() { abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF8ToString"]) Module["UTF8ToString"] = function() { abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF8Array"]) Module["stringToUTF8Array"] = function() { abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF8"]) Module["stringToUTF8"] = function() { abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["lengthBytesUTF8"]) Module["lengthBytesUTF8"] = function() { abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF16ToString"]) Module["UTF16ToString"] = function() { abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF16"]) Module["stringToUTF16"] = function() { abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["lengthBytesUTF16"]) Module["lengthBytesUTF16"] = function() { abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["UTF32ToString"]) Module["UTF32ToString"] = function() { abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stringToUTF32"]) Module["stringToUTF32"] = function() { abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["lengthBytesUTF32"]) Module["lengthBytesUTF32"] = function() { abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["allocateUTF8"]) Module["allocateUTF8"] = function() { abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["stackTrace"]) Module["stackTrace"] = function() { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnPreRun"]) Module["addOnPreRun"] = function() { abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnInit"]) Module["addOnInit"] = function() { abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnPreMain"]) Module["addOnPreMain"] = function() { abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnExit"]) Module["addOnExit"] = function() { abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addOnPostRun"]) Module["addOnPostRun"] = function() { abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["writeStringToMemory"]) Module["writeStringToMemory"] = function() { abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["writeArrayToMemory"]) Module["writeArrayToMemory"] = function() { abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["writeAsciiToMemory"]) Module["writeAsciiToMemory"] = function() { abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addRunDependency"]) Module["addRunDependency"] = function() { abort("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["removeRunDependency"]) Module["removeRunDependency"] = function() { abort("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS"]) Module["FS"] = function() { abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["FS_createFolder"]) Module["FS_createFolder"] = function() { abort("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createPath"]) Module["FS_createPath"] = function() { abort("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createDataFile"]) Module["FS_createDataFile"] = function() { abort("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createPreloadedFile"]) Module["FS_createPreloadedFile"] = function() { abort("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createLazyFile"]) Module["FS_createLazyFile"] = function() { abort("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createLink"]) Module["FS_createLink"] = function() { abort("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_createDevice"]) Module["FS_createDevice"] = function() { abort("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["FS_unlink"]) Module["FS_unlink"] = function() { abort("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Module["GL"]) Module["GL"] = function() { abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["staticAlloc"]) Module["staticAlloc"] = function() { abort("'staticAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["dynamicAlloc"]) Module["dynamicAlloc"] = function() { abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["warnOnce"]) Module["warnOnce"] = function() { abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["loadDynamicLibrary"]) Module["loadDynamicLibrary"] = function() { abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["loadWebAssemblyModule"]) Module["loadWebAssemblyModule"] = function() { abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getLEB"]) Module["getLEB"] = function() { abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getFunctionTables"]) Module["getFunctionTables"] = function() { abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["alignFunctionTables"]) Module["alignFunctionTables"] = function() { abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["registerFunctions"]) Module["registerFunctions"] = function() { abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["addFunction"]) Module["addFunction"] = function() { abort("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["removeFunction"]) Module["removeFunction"] = function() { abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getFuncWrapper"]) Module["getFuncWrapper"] = function() { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["prettyPrint"]) Module["prettyPrint"] = function() { abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["makeBigInt"]) Module["makeBigInt"] = function() { abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["dynCall"]) Module["dynCall"] = function() { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["getCompilerSetting"]) Module["getCompilerSetting"] = function() { abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["intArrayFromBase64"]) Module["intArrayFromBase64"] = function() { abort("'intArrayFromBase64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Module["tryParseAsDataURI"]) Module["tryParseAsDataURI"] = function() { abort("'tryParseAsDataURI' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };if (!Module["ALLOC_NORMAL"]) Object.defineProperty(Module, "ALLOC_NORMAL", { get: function() { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_STACK"]) Object.defineProperty(Module, "ALLOC_STACK", { get: function() { abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_STATIC"]) Object.defineProperty(Module, "ALLOC_STATIC", { get: function() { abort("'ALLOC_STATIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_DYNAMIC"]) Object.defineProperty(Module, "ALLOC_DYNAMIC", { get: function() { abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Module["ALLOC_NONE"]) Object.defineProperty(Module, "ALLOC_NONE", { get: function() { abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); + +if (memoryInitializer) { + if (!isDataURI(memoryInitializer)) { + if (typeof Module['locateFile'] === 'function') { + memoryInitializer = Module['locateFile'](memoryInitializer); + } else if (Module['memoryInitializerPrefixURL']) { + memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer; + } + } + if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { + var data = Module['readBinary'](memoryInitializer); + HEAPU8.set(data, GLOBAL_BASE); + } else { + addRunDependency('memory initializer'); + var applyMemoryInitializer = function(data) { + if (data.byteLength) data = new Uint8Array(data); + for (var i = 0; i < data.length; i++) { + assert(HEAPU8[GLOBAL_BASE + i] === 0, "area for memory initializer should not have been touched before it's loaded"); + } + HEAPU8.set(data, GLOBAL_BASE); + // Delete the typed array that contains the large blob of the memory initializer request response so that + // we won't keep unnecessary memory lying around. However, keep the XHR object itself alive so that e.g. + // its .status field can still be accessed later. + if (Module['memoryInitializerRequest']) delete Module['memoryInitializerRequest'].response; + removeRunDependency('memory initializer'); + } + function doBrowserLoad() { + Module['readAsync'](memoryInitializer, applyMemoryInitializer, function() { + throw 'could not load memory initializer ' + memoryInitializer; + }); + } + var memoryInitializerBytes = tryParseAsDataURI(memoryInitializer); + if (memoryInitializerBytes) { + applyMemoryInitializer(memoryInitializerBytes.buffer); + } else + if (Module['memoryInitializerRequest']) { + // a network request has already been created, just use that + function useRequest() { + var request = Module['memoryInitializerRequest']; + var response = request.response; + if (request.status !== 200 && request.status !== 0) { + var data = tryParseAsDataURI(Module['memoryInitializerRequestURL']); + if (data) { + response = data.buffer; + } else { + // If you see this warning, the issue may be that you are using locateFile or memoryInitializerPrefixURL, and defining them in JS. That + // means that the HTML file doesn't know about them, and when it tries to create the mem init request early, does it to the wrong place. + // Look in your browser's devtools network console to see what's going on. + console.warn('a problem seems to have happened with Module.memoryInitializerRequest, status: ' + request.status + ', retrying ' + memoryInitializer); + doBrowserLoad(); + return; + } + } + applyMemoryInitializer(response); + } + if (Module['memoryInitializerRequest'].response) { + setTimeout(useRequest, 0); // it's already here; but, apply it asynchronously + } else { + Module['memoryInitializerRequest'].addEventListener('load', useRequest); // wait for it + } + } else { + // fetch it from the network ourselves + doBrowserLoad(); + } + } +} + + + +/** + * @constructor + * @extends {Error} + * @this {ExitStatus} + */ +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +}; +ExitStatus.prototype = new Error(); +ExitStatus.prototype.constructor = ExitStatus; + +var initialStackTop; +var calledMain = false; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!Module['calledRun']) run(); + if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +} + +Module['callMain'] = function callMain(args) { + assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on __ATMAIN__)'); + assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); + + args = args || []; + + ensureInitRuntime(); + + var argc = args.length+1; + var argv = stackAlloc((argc + 1) * 4); + HEAP32[argv >> 2] = allocateUTF8OnStack(Module['thisProgram']); + for (var i = 1; i < argc; i++) { + HEAP32[(argv >> 2) + i] = allocateUTF8OnStack(args[i - 1]); + } + HEAP32[(argv >> 2) + argc] = 0; + + + try { + + var ret = Module['_main'](argc, argv, 0); + + + // if we're not running an evented main loop, it's time to exit + exit(ret, /* implicit = */ true); + } + catch(e) { + if (e instanceof ExitStatus) { + // exit() throws this once it's done to make sure execution + // has been stopped completely + return; + } else if (e == 'SimulateInfiniteLoop') { + // running an evented main loop, don't immediately exit + Module['noExitRuntime'] = true; + return; + } else { + var toLog = e; + if (e && typeof e === 'object' && e.stack) { + toLog = [e, e.stack]; + } + Module.printErr('exception thrown: ' + toLog); + Module['quit'](1, e); + } + } finally { + calledMain = true; + } +} + + + + +/** @type {function(Array=)} */ +function run(args) { + args = args || Module['arguments']; + + if (runDependencies > 0) { + return; + } + + writeStackCookie(); + + preRun(); + + if (runDependencies > 0) return; // a preRun added a dependency, run will be called later + if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame + + function doRun() { + if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening + Module['calledRun'] = true; + + if (ABORT) return; + + ensureInitRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + if (Module['_main'] && shouldRunNow) Module['callMain'](args); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else { + doRun(); + } + checkStackCookie(); +} +Module['run'] = run; + + +function exit(status, implicit) { + + // if this is just main exit-ing implicitly, and the status is 0, then we + // don't need to do anything here and can just leave. if the status is + // non-zero, though, then we need to report it. + // (we may have warned about this earlier, if a situation justifies doing so) + if (implicit && Module['noExitRuntime'] && status === 0) { + return; + } + + if (Module['noExitRuntime']) { + // if exit() was called, we may warn the user if the runtime isn't actually being shut down + if (!implicit) { + Module.printErr('exit(' + status + ') called, but noExitRuntime is set due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)'); + } + } else { + + ABORT = true; + EXITSTATUS = status; + STACKTOP = initialStackTop; + + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } + + if (ENVIRONMENT_IS_NODE) { + process['exit'](status); + } + Module['quit'](status, new ExitStatus(status)); +} +Module['exit'] = exit; + +var abortDecorators = []; + +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + if (what !== undefined) { + Module.print(what); + Module.printErr(what); + what = JSON.stringify(what) + } else { + what = ''; + } + + ABORT = true; + EXITSTATUS = 1; + + var extra = ''; + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; +} +Module['abort'] = abort; + +// {{PRE_RUN_ADDITIONS}} + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + +// shouldRunNow refers to calling main(), not run(). +var shouldRunNow = true; +if (Module['noInitialRun']) { + shouldRunNow = false; +} + + +run(); + +// {{POST_RUN_ADDITIONS}} + + + + + +// {{MODULE_ADDITIONS}} + + + diff --git a/asm/libs/opus/autogen.sh b/asm/libs/opus/autogen.sh new file mode 100755 index 00000000..4de5f1c3 --- /dev/null +++ b/asm/libs/opus/autogen.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Run this to set up the build system: configure, makefiles, etc. +set -e + +srcdir=`dirname $0` +test -n "$srcdir" && cd "$srcdir" + +echo "Updating build configuration files, please wait...." + +autoreconf -isf diff --git a/asm/libs/opus/build/libopus.js b/asm/libs/opus/build/libopus.js new file mode 100644 index 00000000..3dc84e0c --- /dev/null +++ b/asm/libs/opus/build/libopus.js @@ -0,0 +1,57 @@ +var Module = function(Module) { + Module = Module || {}; + +var a;a||(a=typeof Module !== 'undefined' ? Module : {});var e={},g;for(g in a)a.hasOwnProperty(g)&&(e[g]=a[g]);a.arguments=[];a.thisProgram="./this.program";a.quit=function(b,c){throw c;};a.preRun=[];a.postRun=[];var k=!1,l=!1,m=!1,n=!1; +if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)k=!0;else if("WORKER"===a.ENVIRONMENT)l=!0;else if("NODE"===a.ENVIRONMENT)m=!0;else if("SHELL"===a.ENVIRONMENT)n=!0;else throw Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.");else k="object"===typeof window,l="function"===typeof importScripts,m="object"===typeof process&&"function"===typeof require&&!k&&!l,n=!k&&!m&&!l; +if(m){var p,q;a.read=function(b,c){var d=r(b);d||(p||(p=require("fs")),q||(q=require("path")),b=q.normalize(b),d=p.readFileSync(b));return c?d:d.toString()};a.readBinary=function(b){b=a.read(b,!0);b.buffer||(b=new Uint8Array(b));assert(b.buffer);return b};1>2]=H;D=!0;var la=!1;function v(b){for(var c=[],d=0;d>4; +h=(h&15)<<4|t>>2;var S=(t&3)<<6|J;c+=String.fromCharCode(f);64!==t&&(c+=String.fromCharCode(h));64!==J&&(c+=String.fromCharCode(S))}while(d>2]=b);return b},_emscripten_memcpy_big:function(b,c,d){z.set(z.subarray(c,c+d),b);return b},_llvm_pow_f64:ha,_llvm_stackrestore:function(b){var c=W.a[b];W.a.splice(b, +1);na(c)},_llvm_stacksave:W,DYNAMICTOP_PTR:I,tempDoublePtr:ia,ABORT:x,STACKTOP:F,STACK_MAX:G};// EMSCRIPTEN_START_ASM +var X=(/** @suppress {uselessCode} */ function(global,env,buffer) { +"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.DYNAMICTOP_PTR|0;var j=env.tempDoublePtr|0;var k=env.ABORT|0;var l=env.STACKTOP|0;var m=env.STACK_MAX|0;var n=0;var o=0;var p=0;var q=0;var r=global.NaN,s=global.Infinity;var t=0,u=0,v=0,w=0,x=0.0;var y=0;var z=global.Math.floor;var A=global.Math.abs;var B=global.Math.sqrt;var C=global.Math.pow;var D=global.Math.cos;var E=global.Math.sin;var F=global.Math.tan;var G=global.Math.acos;var H=global.Math.asin;var I=global.Math.atan;var J=global.Math.atan2;var K=global.Math.exp;var L=global.Math.log;var M=global.Math.ceil;var N=global.Math.imul;var O=global.Math.min;var P=global.Math.max;var Q=global.Math.clz32;var R=env.abort;var S=env.assert;var T=env.enlargeMemory;var U=env.getTotalMemory;var V=env.abortOnCannotGrowMemory;var W=env.invoke_viiiiiii;var X=env.___setErrNo;var Y=env._emscripten_memcpy_big;var Z=env._llvm_pow_f64;var _=env._llvm_stackrestore;var $=env._llvm_stacksave;var aa=0.0; +// EMSCRIPTEN_START_FUNCS +function hb(a,d,e,f,h,i,j,k,m,n,o,p,q){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=+n;o=o|0;p=+p;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,M=0,O=0,P=0,Q=0,R=0,S=0;S=l;l=l+96|0;I=S+92|0;u=S+88|0;E=S+84|0;G=S+80|0;s=S+76|0;D=S+72|0;t=S+68|0;P=S+64|0;J=S+60|0;O=S+56|0;v=S+52|0;M=S+48|0;H=S+40|0;K=S+36|0;F=S+32|0;R=S+28|0;Q=S+24|0;B=S+20|0;C=S+16|0;y=S+12|0;x=S+8|0;r=S+4|0;w=S;c[I>>2]=a;c[u>>2]=d;c[E>>2]=e;c[G>>2]=f;c[s>>2]=h;c[D>>2]=i;c[t>>2]=j;c[P>>2]=k;c[J>>2]=m;g[O>>2]=n;c[v>>2]=o;g[M>>2]=p;c[S+44>>2]=q;g[K>>2]=0.0;g[Q>>2]=5.0;if((c[D>>2]|0)==2){g[y>>2]=0.0;c[H>>2]=0;while(1){if((c[H>>2]|0)>=8)break;g[r>>2]=+kb((c[u>>2]|0)+(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]<>2]<<2)|0,(c[u>>2]|0)+((c[t>>2]|0)+(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]<>2])<<2)|0,(b[(c[(c[I>>2]|0)+32>>2]|0)+((c[H>>2]|0)+1<<1)>>1]|0)-(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]|0)<>2]);g[y>>2]=+g[y>>2]+ +g[r>>2];c[H>>2]=(c[H>>2]|0)+1}g[y>>2]=+g[y>>2]*.125;if(1.0<+A(+(+g[y>>2])))p=1.0;else p=+A(+(+g[y>>2]));g[y>>2]=p;g[x>>2]=+g[y>>2];c[H>>2]=8;while(1){if((c[H>>2]|0)>=(c[v>>2]|0))break;g[w>>2]=+kb((c[u>>2]|0)+(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]<>2]<<2)|0,(c[u>>2]|0)+((c[t>>2]|0)+(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]<>2])<<2)|0,(b[(c[(c[I>>2]|0)+32>>2]|0)+((c[H>>2]|0)+1<<1)>>1]|0)-(b[(c[(c[I>>2]|0)+32>>2]|0)+(c[H>>2]<<1)>>1]|0)<>2]);if(+g[x>>2]<+A(+(+g[w>>2])))p=+g[x>>2];else p=+A(+(+g[w>>2]));g[x>>2]=p;c[H>>2]=(c[H>>2]|0)+1}if(1.0<+A(+(+g[x>>2])))p=1.0;else p=+A(+(+g[x>>2]));g[x>>2]=p;g[B>>2]=+L(+(1.0010000467300415-+g[y>>2]*+g[y>>2]))*1.4426950408889634;if(+g[B>>2]*.5>+L(+(1.0010000467300415-+g[x>>2]*+g[x>>2]))*1.4426950408889634)p=+g[B>>2]*.5;else p=+L(+(1.0010000467300415-+g[x>>2]*+g[x>>2]))*1.4426950408889634;g[C>>2]=p;g[Q>>2]=+g[Q>>2]+(-4.0>+g[B>>2]*.75?-4.0:+g[B>>2]*.75);if(+g[c[J>>2]>>2]+.25<-(+g[C>>2]*.5))p=+g[c[J>>2]>>2]+.25;else p=-(+g[C>>2]*.5);g[c[J>>2]>>2]=p}c[F>>2]=0;do{c[H>>2]=0;while(1){if((c[H>>2]|0)>=((c[G>>2]|0)-1|0))break;n=+g[(c[E>>2]|0)+((c[H>>2]|0)+(N(c[F>>2]|0,c[(c[I>>2]|0)+8>>2]|0)|0)<<2)>>2];g[K>>2]=+g[K>>2]+n*+(2+(c[H>>2]<<1)-(c[G>>2]|0)|0);c[H>>2]=(c[H>>2]|0)+1}J=(c[F>>2]|0)+1|0;c[F>>2]=J}while((J|0)<(c[D>>2]|0));n=+(N(c[D>>2]|0,(c[G>>2]|0)-1|0)|0);g[K>>2]=+g[K>>2]/n;if(2.0<(+g[K>>2]+1.0)/6.0)p=2.0;else p=(+g[K>>2]+1.0)/6.0;if(!(-2.0>p))if(2.0<(+g[K>>2]+1.0)/6.0)p=2.0;else p=(+g[K>>2]+1.0)/6.0;else p=-2.0;g[Q>>2]=+g[Q>>2]-p;g[Q>>2]=+g[Q>>2]-+g[M>>2];g[Q>>2]=+g[Q>>2]-+g[O>>2]*2.0;if(c[c[P>>2]>>2]|0){if(2.0<(+g[(c[P>>2]|0)+8>>2]+.05000000074505806)*2.0)p=2.0;else p=(+g[(c[P>>2]|0)+8>>2]+.05000000074505806)*2.0;if(!(-2.0>p))if(2.0<(+g[(c[P>>2]|0)+8>>2]+.05000000074505806)*2.0)p=2.0;else p=(+g[(c[P>>2]|0)+8>>2]+.05000000074505806)*2.0;else p=-2.0;g[Q>>2]=+g[Q>>2]-p}c[R>>2]=~~+z(+(+g[Q>>2]+.5));if(0>((10<(c[R>>2]|0)?10:c[R>>2]|0)|0)){Q=0;c[R>>2]=Q;R=c[R>>2]|0;l=S;return R|0}Q=10<(c[R>>2]|0)?10:c[R>>2]|0;c[R>>2]=Q;R=c[R>>2]|0;l=S;return R|0}function ib(a,d,e,f,h,i,j,k,m,n,o,p,q,r,s,t,u,v,w){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=+n;o=o|0;p=+p;q=q|0;r=+r;s=s|0;t=t|0;u=u|0;v=+v;w=+w;var x=0,y=0,z=0,A=0,B=0,C=0,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645-+g[(c[D>>2]|0)+16>>2]));if((c[O>>2]|0)==2){c[y>>2]=(c[A>>2]|0)<(c[x>>2]|0)?c[A>>2]|0:c[x>>2]|0;c[z>>2]=(b[(c[R>>2]|0)+(c[y>>2]<<1)>>1]<>2])-(c[y>>2]|0);g[B>>2]=+(c[z>>2]|0)*.800000011920929/+(c[H>>2]|0);g[C>>2]=+g[C>>2]<1.0?+g[C>>2]:1.0;if(+g[B>>2]*+(c[ba>>2]|0)<(+g[C>>2]-.10000000149011612)*+(c[z>>2]<<3|0)){j=c[ba>>2]|0;r=+g[B>>2]}else{j=c[z>>2]<<3;r=+g[C>>2]-.10000000149011612}c[ba>>2]=(c[ba>>2]|0)-~~(r*+(j|0))}c[ba>>2]=(c[ba>>2]|0)+((c[F>>2]|0)-(16<>2]));g[E>>2]=(c[G>>2]|0)==5010?.019999999552965164:.03999999910593033;c[ba>>2]=(c[ba>>2]|0)+~~((+g[_>>2]-+g[E>>2])*+(c[ba>>2]|0));if(!(c[T>>2]|0?1:(c[c[D>>2]>>2]|0)==0)){if(0.0>+g[(c[D>>2]|0)+4>>2]-.15000000596046448)r=0.0;else r=+g[(c[D>>2]|0)+4>>2]-.15000000596046448;g[L>>2]=r-.09000000357627869;c[M>>2]=(c[ba>>2]|0)+~~(+(c[H>>2]<<3|0)*1.2000000476837158*+g[L>>2]);if(c[I>>2]|0)c[M>>2]=(c[M>>2]|0)+~~(+(c[H>>2]<<3|0)*.800000011920929);c[ba>>2]=c[M>>2]}if(!((c[Y>>2]|0)==0|(c[T>>2]|0)!=0)){c[K>>2]=(c[ba>>2]|0)+~~(+g[J>>2]*+(c[H>>2]<<3|0));if(((c[ba>>2]|0)/4|0|0)>(c[K>>2]|0))j=(c[ba>>2]|0)/4|0;else j=c[K>>2]|0;c[ba>>2]=j}c[Q>>2]=b[(c[R>>2]|0)+((c[V>>2]|0)-2<<1)>>1]<>2];p=+((N(c[O>>2]|0,c[Q>>2]|0)|0)<<3|0);c[S>>2]=~~(p*+g[U>>2]);c[S>>2]=(c[S>>2]|0)>(c[ba>>2]>>2|0)?c[S>>2]|0:c[ba>>2]>>2;c[ba>>2]=(c[ba>>2]|0)<(c[S>>2]|0)?c[ba>>2]|0:c[S>>2]|0;if((c[Y>>2]|0)==0|(c[T>>2]|0)!=0?(c[X>>2]|0)!=0|(c[W>>2]|0)<64e3:0){if(0.0>+((c[W>>2]|0)-32e3|0)*.000030517578125)r=0.0;else r=+((c[W>>2]|0)-32e3|0)*.000030517578125;g[Z>>2]=r;if(c[X>>2]|0)g[Z>>2]=+g[Z>>2]<.6700000166893005?+g[Z>>2]:.6700000166893005;c[ba>>2]=(c[aa>>2]|0)+~~(+g[Z>>2]*+((c[ba>>2]|0)-(c[aa>>2]|0)|0))}if(!((c[Y>>2]|0)==0&+g[_>>2]<.20000000298023224)){fa=c[aa>>2]|0;fa=fa<<1;da=c[ba>>2]|0;da=(fa|0)<(da|0);fa=c[aa>>2]|0;fa=fa<<1;ga=c[ba>>2]|0;ga=da?fa:ga;c[ba>>2]=ga;ga=c[ba>>2]|0;l=ea;return ga|0}if(0>((32e3<(96e3-(c[W>>2]|0)|0)?32e3:96e3-(c[W>>2]|0)|0)|0))j=0;else j=32e3<(96e3-(c[W>>2]|0)|0)?32e3:96e3-(c[W>>2]|0)|0;g[$>>2]=+(j|0)*3.099999958067201e-06;g[da>>2]=+g[ca>>2]*+g[$>>2];c[ba>>2]=(c[ba>>2]|0)+~~(+g[da>>2]*+(c[ba>>2]|0));fa=c[aa>>2]|0;fa=fa<<1;da=c[ba>>2]|0;da=(fa|0)<(da|0);fa=c[aa>>2]|0;fa=fa<<1;ga=c[ba>>2]|0;ga=da?fa:ga;c[ba>>2]=ga;ga=c[ba>>2]|0;l=ea;return ga|0}function jb(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+44>>2]|0}function kb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,h=0,i=0,j=0,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>>2]=+g[e>>2]<+g[h>>2]?+g[e>>2]:+g[h>>2];o=+g[b>>2];l=n;return +o}else{g[b>>2]=+g[f>>2]<+g[i>>2]?+g[f>>2]:+g[i>>2];o=+g[b>>2];l=n;return +o}return 0.0}function mb(a){a=a|0;var b=0,d=0,e=0,f=0,h=0,i=0,j=0.0;i=l;l=l+32|0;b=i+16|0;h=i+12|0;d=i+8|0;e=i+4|0;f=i;c[h>>2]=a;a=c[h>>2]|0;if(+g[c[h>>2]>>2]>+g[(c[h>>2]|0)+4>>2]){g[d>>2]=+g[a+4>>2];g[e>>2]=+g[c[h>>2]>>2]}else{g[d>>2]=+g[a>>2];g[e>>2]=+g[(c[h>>2]|0)+4>>2]}g[f>>2]=+g[(c[h>>2]|0)+8>>2];if(+g[e>>2]<+g[f>>2]){g[b>>2]=+g[e>>2];j=+g[b>>2];l=i;return +j}if(+g[d>>2]<+g[f>>2]){g[b>>2]=+g[f>>2];j=+g[b>>2];l=i;return +j}else{g[b>>2]=+g[d>>2];j=+g[b>>2];l=i;return +j}return 0.0}function nb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=+e;var f=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n+20|0;i=n+16|0;h=n+12|0;j=n+8|0;k=n+4|0;f=n;c[m>>2]=a;c[i>>2]=b;c[h>>2]=d;g[j>>2]=e;g[f>>2]=0.0;c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[i>>2]|0))break;e=+A(+(+g[(c[m>>2]|0)+(c[k>>2]<<2)>>2]));g[f>>2]=+g[f>>2]+e;c[k>>2]=(c[k>>2]|0)+1}g[f>>2]=+g[f>>2]+ +(c[h>>2]|0)*+g[j>>2]*+g[f>>2];l=n;return +(+g[f>>2])}function ob(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=sc(48e3,960,0)|0;a=pb(c[e>>2]|0,c[d>>2]|0)|0;l=b;return a|0}function pb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;a=88+((N(c[g>>2]|0,2048+(c[(c[f>>2]|0)+4>>2]|0)|0)|0)-1<<2)|0;c[d>>2]=a+((c[g>>2]|0)*24<<2)+(c[(c[f>>2]|0)+8>>2]<<3<<2);l=e;return c[d>>2]|0}function qb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;f=i+16|0;h=i+12|0;g=i+8|0;j=i+4|0;e=i;c[h>>2]=a;c[g>>2]=b;c[j>>2]=d;b=c[h>>2]|0;a=sc(48e3,960,0)|0;c[e>>2]=rb(b,a,c[j>>2]|0)|0;if(c[e>>2]|0){c[f>>2]=c[e>>2];j=c[f>>2]|0;l=i;return j|0}j=Ma(c[g>>2]|0)|0;c[(c[h>>2]|0)+16>>2]=j;if(!(c[(c[h>>2]|0)+16>>2]|0)){c[f>>2]=-1;j=c[f>>2]|0;l=i;return j|0}else{c[f>>2]=0;j=c[f>>2]|0;l=i;return j|0}return 0}function rb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;g=i+16|0;h=i+12|0;f=i+8|0;e=i+4|0;c[h>>2]=a;c[f>>2]=b;c[e>>2]=d;if((c[e>>2]|0)<0|(c[e>>2]|0)>2){c[g>>2]=-1;h=c[g>>2]|0;l=i;return h|0}if(!(c[h>>2]|0)){c[g>>2]=-7;h=c[g>>2]|0;l=i;return h|0}else{a=c[h>>2]|0;aj(a|0,0,pb(c[f>>2]|0,c[e>>2]|0)|0)|0;c[c[h>>2]>>2]=c[f>>2];c[(c[h>>2]|0)+4>>2]=c[(c[f>>2]|0)+4>>2];a=c[e>>2]|0;c[(c[h>>2]|0)+8>>2]=a;c[(c[h>>2]|0)+12>>2]=a;c[(c[h>>2]|0)+16>>2]=1;c[(c[h>>2]|0)+20>>2]=0;c[(c[h>>2]|0)+24>>2]=c[(c[c[h>>2]>>2]|0)+12>>2];c[(c[h>>2]|0)+28>>2]=1;a=sb()|0;c[(c[h>>2]|0)+32>>2]=a;c[(c[h>>2]|0)+48>>2]=0;tb(c[h>>2]|0,4028,i)|0;c[g>>2]=0;h=c[g>>2]|0;l=i;return h|0}return 0}function sb(){return 0}function tb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;G=l;l=l+128|0;F=G+120|0;m=G+116|0;H=G+112|0;e=G+96|0;n=G+88|0;w=G+84|0;r=G+80|0;B=G+76|0;o=G+72|0;x=G+68|0;p=G+64|0;y=G+60|0;q=G+56|0;z=G+52|0;f=G+48|0;h=G+44|0;i=G+40|0;j=G+36|0;k=G+32|0;s=G+28|0;A=G+24|0;t=G+20|0;C=G+16|0;u=G+12|0;D=G+8|0;v=G+4|0;E=G;c[m>>2]=a;c[H>>2]=b;c[e>>2]=d;a:do switch(c[H>>2]|0){case 10010:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[w>>2]=H;c[n>>2]=c[w>>2];if((c[n>>2]|0)>=0?(c[n>>2]|0)<(c[(c[c[m>>2]>>2]|0)+8>>2]|0):0){c[(c[m>>2]|0)+20>>2]=c[n>>2];e=24}else e=25;break}case 10012:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[B>>2]=H;c[r>>2]=c[B>>2];if((c[r>>2]|0)>=1?(c[r>>2]|0)<=(c[(c[c[m>>2]>>2]|0)+8>>2]|0):0){c[(c[m>>2]|0)+24>>2]=c[r>>2];e=24}else e=25;break}case 10008:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[x>>2]=H;c[o>>2]=c[x>>2];if((c[o>>2]|0)<1|(c[o>>2]|0)>2)e=25;else{c[(c[m>>2]|0)+12>>2]=c[o>>2];e=24}break}case 10007:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[y>>2]=H;c[p>>2]=c[y>>2];if(!(c[p>>2]|0))e=25;else{c[c[p>>2]>>2]=c[(c[m>>2]|0)+40>>2];c[(c[m>>2]|0)+40>>2]=0;e=24}break}case 4027:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[z>>2]=H;c[q>>2]=c[z>>2];if(!(c[q>>2]|0))e=25;else{c[c[q>>2]>>2]=(c[(c[m>>2]|0)+4>>2]|0)/(c[(c[m>>2]|0)+16>>2]|0)|0;e=24}break}case 4028:{c[h>>2]=(c[m>>2]|0)+84+((N(2048+(c[(c[m>>2]|0)+4>>2]|0)|0,c[(c[m>>2]|0)+8>>2]|0)|0)<<2);c[i>>2]=(c[h>>2]|0)+((c[(c[m>>2]|0)+8>>2]|0)*24<<2);c[j>>2]=(c[i>>2]|0)+(c[(c[c[m>>2]>>2]|0)+8>>2]<<1<<2);c[k>>2]=(c[j>>2]|0)+(c[(c[c[m>>2]>>2]|0)+8>>2]<<1<<2);aj((c[m>>2]|0)+36|0,0,(pb(c[c[m>>2]>>2]|0,c[(c[m>>2]|0)+8>>2]|0)|0)-((c[m>>2]|0)+36-(c[m>>2]|0))|0)|0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[c[m>>2]>>2]|0)+8>>2]<<1|0)){e=24;break a}g[(c[k>>2]|0)+(c[f>>2]<<2)>>2]=-28.0;g[(c[j>>2]|0)+(c[f>>2]<<2)>>2]=-28.0;c[f>>2]=(c[f>>2]|0)+1}}case 4033:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[A>>2]=H;c[s>>2]=c[A>>2];if(!(c[s>>2]|0))e=25;else{c[c[s>>2]>>2]=c[(c[m>>2]|0)+52>>2];e=24}break}case 10015:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[C>>2]=H;c[t>>2]=c[C>>2];if(!(c[t>>2]|0))e=25;else{c[c[t>>2]>>2]=c[c[m>>2]>>2];e=24}break}case 10016:{E=(c[e>>2]|0)+(4-1)&~(4-1);H=c[E>>2]|0;c[e>>2]=E+4;c[D>>2]=H;c[u>>2]=c[D>>2];c[(c[m>>2]|0)+28>>2]=c[u>>2];e=24;break}case 4031:{D=(c[e>>2]|0)+(4-1)&~(4-1);H=c[D>>2]|0;c[e>>2]=D+4;c[E>>2]=H;c[v>>2]=c[E>>2];if(!(c[v>>2]|0))e=25;else{c[c[v>>2]>>2]=c[(c[m>>2]|0)+36>>2];e=24}break}default:{c[F>>2]=-5;H=c[F>>2]|0;l=G;return H|0}}while(0);if((e|0)==24){c[F>>2]=0;H=c[F>>2]|0;l=G;return H|0}else if((e|0)==25){c[F>>2]=-1;H=c[F>>2]|0;l=G;return H|0}return 0}function ub(a,d,e,f,h,i,j){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,qa=0,ra=0,sa=0,ua=0,va=0,wa=0;va=l;l=l+304|0;qa=va+288|0;sa=va+284|0;n=va+280|0;ha=va+276|0;oa=va+272|0;fa=va+268|0;da=va+264|0;aa=va+260|0;ba=va+256|0;ga=va+252|0;Z=va+248|0;M=va+244|0;B=va+240|0;k=va+192|0;C=va+184|0;na=va+176|0;wa=va+168|0;ka=va+164|0;la=va+160|0;ma=va+156|0;W=va+152|0;K=va+148|0;R=va+144|0;q=va+140|0;Y=va+136|0;P=va+132|0;Q=va+128|0;ua=va+124|0;ea=va+120|0;I=va+116|0;G=va+112|0;A=va+108|0;U=va+104|0;T=va+100|0;J=va+96|0;H=va+92|0;z=va+88|0;F=va+84|0;y=va+80|0;s=va+76|0;V=va+72|0;E=va+68|0;D=va+64|0;L=va+60|0;O=va+56|0;ia=va+52|0;ja=va+48|0;S=va+44|0;u=va+40|0;p=va+36|0;o=va+32|0;ra=va+28|0;x=va+24|0;w=va+20|0;t=va+16|0;r=va+12|0;v=va+8|0;X=va+4|0;ca=va;c[sa>>2]=a;c[n>>2]=d;c[ha>>2]=e;c[oa>>2]=f;c[fa>>2]=h;c[da>>2]=i;c[aa>>2]=j;c[Y>>2]=c[(c[sa>>2]|0)+8>>2];c[J>>2]=0;c[H>>2]=0;c[D>>2]=0;c[O>>2]=c[(c[sa>>2]|0)+12>>2];c[ia>>2]=c[c[sa>>2]>>2];c[ja>>2]=c[(c[ia>>2]|0)+8>>2];c[S>>2]=c[(c[ia>>2]|0)+4>>2];c[u>>2]=c[(c[ia>>2]|0)+32>>2];c[ua>>2]=c[(c[sa>>2]|0)+20>>2];c[ea>>2]=c[(c[sa>>2]|0)+24>>2];c[fa>>2]=N(c[fa>>2]|0,c[(c[sa>>2]|0)+16>>2]|0)|0;c[wa>>2]=(c[sa>>2]|0)+84+((N(2048+(c[S>>2]|0)|0,c[Y>>2]|0)|0)<<2);c[ka>>2]=(c[wa>>2]|0)+((c[Y>>2]|0)*24<<2);c[la>>2]=(c[ka>>2]|0)+(c[ja>>2]<<1<<2);c[ma>>2]=(c[la>>2]|0)+(c[ja>>2]<<1<<2);c[W>>2]=(c[ma>>2]|0)+(c[ja>>2]<<1<<2);c[P>>2]=0;while(1){if((c[P>>2]|0)>(c[(c[ia>>2]|0)+36>>2]|0))break;if((c[(c[ia>>2]|0)+44>>2]<>2]|0)==(c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492|0;V=ma+4488|0;Q=ma+4484|0;P=ma+4480|0;L=ma+4476|0;z=ma+4472|0;F=ma+4468|0;H=ma+4464|0;v=ma+368|0;s=ma+360|0;q=ma+356|0;n=ma+352|0;r=ma+348|0;y=ma+344|0;x=ma+340|0;w=ma+336|0;A=ma+332|0;p=ma+232|0;D=ma+136|0;k=ma+128|0;m=ma+124|0;t=ma+120|0;u=ma+116|0;I=ma+112|0;E=ma+16|0;o=ma+12|0;J=ma+8|0;G=ma+4|0;K=ma;c[la>>2]=a;c[ea>>2]=d;c[M>>2]=e;c[da>>2]=c[(c[la>>2]|0)+8>>2];c[ca>>2]=c[c[la>>2]>>2];c[W>>2]=c[(c[ca>>2]|0)+8>>2];c[ja>>2]=c[(c[ca>>2]|0)+4>>2];c[S>>2]=c[(c[ca>>2]|0)+32>>2];c[fa>>2]=0;do{a=(c[la>>2]|0)+84+((N(c[fa>>2]|0,2048+(c[ja>>2]|0)|0)|0)<<2)|0;c[ga+(c[fa>>2]<<2)>>2]=a;c[Y+(c[fa>>2]<<2)>>2]=(c[ga+(c[fa>>2]<<2)>>2]|0)+8192+(0-(c[ea>>2]|0)<<2);a=(c[fa>>2]|0)+1|0;c[fa>>2]=a}while((a|0)<(c[da>>2]|0));c[C>>2]=(c[la>>2]|0)+84+((N(2048+(c[ja>>2]|0)|0,c[da>>2]|0)|0)<<2);c[X>>2]=(c[C>>2]|0)+((c[da>>2]|0)*24<<2);c[i>>2]=(c[X>>2]|0)+(c[W>>2]<<1<<2);c[j>>2]=(c[i>>2]|0)+(c[W>>2]<<1<<2);c[O>>2]=(c[j>>2]|0)+(c[W>>2]<<1<<2);c[ia>>2]=c[(c[la>>2]|0)+48>>2];c[ba>>2]=c[(c[la>>2]|0)+20>>2];c[h>>2]=((c[ia>>2]|0)>=5?1:(c[ba>>2]|0)!=0)&1;if(c[h>>2]|0){c[U>>2]=c[(c[la>>2]|0)+24>>2];if((c[U>>2]|0)<(c[(c[ca>>2]|0)+12>>2]|0))e=c[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>2];c[ha>>2]=(c[ha>>2]|0)+1}ca=(c[fa>>2]|0)+1|0;c[fa>>2]=ca}while((ca|0)<(c[da>>2]|0));_(c[H>>2]|0);ja=c[ia>>2]|0;ja=ja+1|0;la=c[la>>2]|0;la=la+48|0;c[la>>2]=ja;l=ma;return}function wb(a,b,d,e,f,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0;C=l;l=l+80|0;s=C+72|0;w=C+68|0;m=C+64|0;k=C+60|0;r=C+56|0;D=C+52|0;v=C+48|0;p=C+40|0;n=C+36|0;o=C+32|0;q=C+28|0;x=C+24|0;t=C+20|0;A=C+16|0;B=C+12|0;u=C+8|0;y=C+4|0;z=C;c[s>>2]=a;c[w>>2]=b;c[m>>2]=d;c[k>>2]=e;c[r>>2]=f;c[D>>2]=h;c[v>>2]=i;c[C+44>>2]=j;c[o>>2]=0;b=c[m>>2]|0;c[x>>2]=$()|0;e=l;l=l+((1*(b<<2)|0)+15&-16)|0;g[q>>2]=+g[c[D>>2]>>2];c[n>>2]=(c[m>>2]|0)/(c[r>>2]|0)|0;c[p>>2]=0;do{g[u>>2]=+g[(c[v>>2]|0)+(c[p>>2]<<2)>>2];c[A>>2]=c[(c[s>>2]|0)+(c[p>>2]<<2)>>2];c[B>>2]=(c[w>>2]|0)+(c[p>>2]<<2);D=(c[r>>2]|0)>1;c[t>>2]=0;a:do if(D){while(1){if((c[t>>2]|0)>=(c[m>>2]|0))break;g[y>>2]=+g[(c[A>>2]|0)+(c[t>>2]<<2)>>2]+ +g[u>>2]+1.0000000031710769e-30;g[u>>2]=+g[q>>2]*+g[y>>2];g[e+(c[t>>2]<<2)>>2]=+g[y>>2];c[t>>2]=(c[t>>2]|0)+1}c[o>>2]=1}else while(1){if((c[t>>2]|0)>=(c[m>>2]|0))break a;g[z>>2]=+g[(c[A>>2]|0)+(c[t>>2]<<2)>>2]+ +g[u>>2]+1.0000000031710769e-30;g[u>>2]=+g[q>>2]*+g[z>>2];g[(c[B>>2]|0)+((N(c[t>>2]|0,c[k>>2]|0)|0)<<2)>>2]=+g[z>>2]*.000030517578125;c[t>>2]=(c[t>>2]|0)+1}while(0);g[(c[v>>2]|0)+(c[p>>2]<<2)>>2]=+g[u>>2];b:do if(c[o>>2]|0){c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[n>>2]|0))break b;E=+g[e+((N(c[t>>2]|0,c[r>>2]|0)|0)<<2)>>2]*.000030517578125;g[(c[B>>2]|0)+((N(c[t>>2]|0,c[k>>2]|0)|0)<<2)>>2]=E;c[t>>2]=(c[t>>2]|0)+1}}while(0);D=(c[p>>2]|0)+1|0;c[p>>2]=D}while((D|0)<(c[k>>2]|0));_(c[x>>2]|0);l=C;return}function xb(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function yb(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+64|0;r=x+52|0;n=x+48|0;p=x+44|0;u=x+40|0;i=x+36|0;m=x+32|0;o=x+28|0;k=x+24|0;v=x+20|0;w=x+16|0;t=x+12|0;q=x+8|0;j=x+4|0;s=x;c[r>>2]=b;c[n>>2]=d;c[p>>2]=e;c[u>>2]=f;c[i>>2]=g;c[m>>2]=h;c[j>>2]=c[(c[m>>2]|0)+4>>2]<<3;c[s>>2]=xb(c[m>>2]|0)|0;c[q>>2]=c[p>>2]|0?2:4;if((c[i>>2]|0)>0)g=((c[s>>2]|0)+(c[q>>2]|0)+1|0)>>>0<=(c[j>>2]|0)>>>0;else g=0;c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0))break;g[i+(c[F>>2]<<2)>>2]=(+g[i+(c[F>>2]<<2)>>2]+ +g[(c[E>>2]|0)+(c[F>>2]<<2)>>2])*.5;c[F>>2]=(c[F>>2]|0)+1}c[z>>2]=0;while(1){if((c[z>>2]|0)>=(c[q>>2]|0))break;R=(c[c[J>>2]>>2]|0)+((N(c[w>>2]|0,c[z>>2]|0)|0)<<2)|0;rc((c[G>>2]|0)+64|0,i+(c[z>>2]<<2)|0,R,c[(c[G>>2]|0)+60>>2]|0,c[K>>2]|0,c[M>>2]|0,c[q>>2]|0,c[y>>2]|0);c[z>>2]=(c[z>>2]|0)+1}R=c[L>>2]|0;_(R|0);l=Q;return}function Ab(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+44>>2]|0}function Bb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;f=l;l=l+4112|0;j=f+4108|0;i=f+4104|0;g=f+4100|0;e=f+4096|0;h=f;c[j>>2]=a;c[i>>2]=b;c[g>>2]=d;tc(c[j>>2]|0,h,2048,c[i>>2]|0,c[g>>2]|0);yc(h+1440|0,h,1328,620,e,c[g>>2]|0);c[e>>2]=720-(c[e>>2]|0);l=f;return c[e>>2]|0}function Cb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;i=f+12|0;h=f+8|0;g=f+4|0;j=f;c[i>>2]=a;c[h>>2]=b;c[g>>2]=d;c[j>>2]=e;b=c[j>>2]|0;a=Db(c[h>>2]|0,c[i>>2]|0)|0;ac(b,a,(c[(c[364+(((c[h>>2]|0)<(c[g>>2]|0)?c[h>>2]|0:c[g>>2]|0)<<2)>>2]|0)+(((c[h>>2]|0)>(c[g>>2]|0)?c[h>>2]|0:c[g>>2]|0)<<2)>>2]|0)+(c[(c[364+(((c[h>>2]|0)<((c[g>>2]|0)+1|0)?c[h>>2]|0:(c[g>>2]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0){b=0;l=e;return b|0}a=c[c[b>>2]>>2]|0;f=(c[b>>2]|0)+24|0;b=c[f>>2]|0;c[f>>2]=b+1;b=d[a+b>>0]|0;l=e;return b|0}function Jb(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;while(1){if((c[(c[b>>2]|0)+28>>2]|0)>>>0>8388608)break;a=(c[b>>2]|0)+20|0;c[a>>2]=(c[a>>2]|0)+8;a=(c[b>>2]|0)+28|0;c[a>>2]=c[a>>2]<<8;c[d>>2]=c[(c[b>>2]|0)+40>>2];a=Ib(c[b>>2]|0)|0;c[(c[b>>2]|0)+40>>2]=a;c[d>>2]=(c[d>>2]<<8|c[(c[b>>2]|0)+40>>2])>>1;c[(c[b>>2]|0)+32>>2]=(c[(c[b>>2]|0)+32>>2]<<8)+(255&~c[d>>2])&2147483647}l=e;return}function Kb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+8|0;e=f+4|0;d=f;c[g>>2]=a;c[e>>2]=b;a=Lb(c[(c[g>>2]|0)+28>>2]|0,c[e>>2]|0)|0;c[(c[g>>2]|0)+36>>2]=a;c[d>>2]=((c[(c[g>>2]|0)+32>>2]|0)>>>0)/((c[(c[g>>2]|0)+36>>2]|0)>>>0)|0;l=f;return (c[e>>2]|0)-((c[d>>2]|0)+1+((c[e>>2]|0)-((c[d>>2]|0)+1)&0-((c[e>>2]|0)>>>0<((c[d>>2]|0)+1|0)>>>0&1)))|0}function Lb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>>>0)/((c[d>>2]|0)>>>0)|0|0}function Mb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+8|0;e=f+4|0;d=f;c[g>>2]=a;c[e>>2]=b;c[(c[g>>2]|0)+36>>2]=(c[(c[g>>2]|0)+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>>2]|0)>>>0)|0|0}function Wb(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;while(1){if((c[(c[b>>2]|0)+28>>2]|0)>>>0>8388608)break;Xb(c[b>>2]|0,(c[(c[b>>2]|0)+32>>2]|0)>>>23);c[(c[b>>2]|0)+32>>2]=c[(c[b>>2]|0)+32>>2]<<8&2147483647;a=(c[b>>2]|0)+28|0;c[a>>2]=c[a>>2]<<8;a=(c[b>>2]|0)+20|0;c[a>>2]=(c[a>>2]|0)+8}l=d;return}function Xb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+12|0;d=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[d>>2]=b;if((c[d>>2]|0)==255){g=(c[e>>2]|0)+36|0;c[g>>2]=(c[g>>2]|0)+1;l=h;return}c[f>>2]=c[d>>2]>>8;if((c[(c[e>>2]|0)+40>>2]|0)>=0){b=Yb(c[e>>2]|0,(c[(c[e>>2]|0)+40>>2]|0)+(c[f>>2]|0)|0)|0;a=(c[e>>2]|0)+44|0;c[a>>2]=c[a>>2]|b}if((c[(c[e>>2]|0)+36>>2]|0)>>>0>0){c[g>>2]=255+(c[f>>2]|0)&255;do{f=Yb(c[e>>2]|0,c[g>>2]|0)|0;a=(c[e>>2]|0)+44|0;c[a>>2]=c[a>>2]|f;a=(c[e>>2]|0)+36|0;f=(c[a>>2]|0)+-1|0;c[a>>2]=f}while(f>>>0>0)}c[(c[e>>2]|0)+40>>2]=c[d>>2]&255;l=h;return}function Yb(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+8|0;e=h+4|0;f=h;c[e>>2]=b;c[f>>2]=d;if(((c[(c[e>>2]|0)+24>>2]|0)+(c[(c[e>>2]|0)+8>>2]|0)|0)>>>0>=(c[(c[e>>2]|0)+4>>2]|0)>>>0){c[g>>2]=-1;g=c[g>>2]|0;l=h;return g|0}else{b=c[f>>2]&255;d=c[c[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);c[j>>2]=(1<>2])-1<>2];f=c[h>>2]|0;if((c[(c[h>>2]|0)+24>>2]|0)>>>0>0){a[c[c[h>>2]>>2]>>0]=(d[c[f>>2]>>0]|0)&~c[j>>2]|c[i>>2]<>2];l=m;return}b=c[h>>2]|0;if((c[f+40>>2]|0)>=0){c[(c[h>>2]|0)+40>>2]=c[b+40>>2]&~c[j>>2]|c[i>>2]<>2];l=m;return}f=c[h>>2]|0;if((c[b+28>>2]|0)>>>0<=-2147483648>>>(c[g>>2]|0)>>>0){c[(c[h>>2]|0)+32>>2]=c[f+32>>2]&~(c[j>>2]<<23)|c[i>>2]<<23+(c[k>>2]|0);l=m;return}else{c[f+44>>2]=-1;l=m;return}}function ec(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;$i((c[c[e>>2]>>2]|0)+(c[f>>2]|0)+(0-(c[(c[e>>2]|0)+8>>2]|0))|0,(c[c[e>>2]>>2]|0)+(c[(c[e>>2]|0)+4>>2]|0)+(0-(c[(c[e>>2]|0)+8>>2]|0))|0,(c[(c[e>>2]|0)+8>>2]|0)+0|0)|0;c[(c[e>>2]|0)+4>>2]=c[f>>2];l=d;return}function fc(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;g=k+20|0;j=k+16|0;i=k+12|0;e=k+8|0;f=k+4|0;h=k;c[g>>2]=b;c[h>>2]=32-(32-(Q(c[(c[g>>2]|0)+28>>2]|0)|0));c[e>>2]=2147483647>>>(c[h>>2]|0);c[f>>2]=(c[(c[g>>2]|0)+32>>2]|0)+(c[e>>2]|0)&~c[e>>2];if((c[f>>2]|c[e>>2])>>>0>=((c[(c[g>>2]|0)+32>>2]|0)+(c[(c[g>>2]|0)+28>>2]|0)|0)>>>0){c[h>>2]=(c[h>>2]|0)+1;c[e>>2]=(c[e>>2]|0)>>>1;c[f>>2]=(c[(c[g>>2]|0)+32>>2]|0)+(c[e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o+44|0;e=o+40|0;g=o+8|0;h=o+4|0;m=o;c[n>>2]=a;c[f>>2]=d;if((c[(c[n>>2]|0)+8>>2]|0)>0)d=c[(c[n>>2]|0)+8>>2]|0;else d=0;c[m>>2]=d;c[g>>2]=1;c[e>>2]=0;do{c[k>>2]=b[(c[n>>2]|0)+12+(c[e>>2]<<1<<1)>>1];c[i>>2]=b[(c[n>>2]|0)+12+((c[e>>2]<<1)+1<<1)>>1];a=N(c[g+(c[e>>2]<<2)>>2]|0,c[k>>2]|0)|0;c[g+((c[e>>2]|0)+1<<2)>>2]=a;c[e>>2]=(c[e>>2]|0)+1}while((c[i>>2]|0)!=1);c[i>>2]=b[(c[n>>2]|0)+12+((c[e>>2]<<1)-1<<1)>>1];c[h>>2]=(c[e>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;if(c[h>>2]|0)c[j>>2]=b[(c[n>>2]|0)+12+((c[h>>2]<<1)-1<<1)>>1];else c[j>>2]=1;switch(b[(c[n>>2]|0)+12+(c[h>>2]<<1<<1)>>1]|0){case 2:{hc(c[f>>2]|0,c[i>>2]|0,c[g+(c[h>>2]<<2)>>2]|0);break}case 4:{ic(c[f>>2]|0,c[g+(c[h>>2]<<2)>>2]<>2],c[n>>2]|0,c[i>>2]|0,c[g+(c[h>>2]<<2)>>2]|0,c[j>>2]|0);break}case 3:{jc(c[f>>2]|0,c[g+(c[h>>2]<<2)>>2]<>2],c[n>>2]|0,c[i>>2]|0,c[g+(c[h>>2]<<2)>>2]|0,c[j>>2]|0);break}case 5:{kc(c[f>>2]|0,c[g+(c[h>>2]<<2)>>2]<>2],c[n>>2]|0,c[i>>2]|0,c[g+(c[h>>2]<<2)>>2]|0,c[j>>2]|0);break}default:{}}c[i>>2]=c[j>>2];c[h>>2]=(c[h>>2]|0)+-1}l=o;return}function hc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;e=m+28|0;h=m+20|0;f=m+16|0;i=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^c[o>>2];n=c[j>>2]|0;o=c[k>>2]|0;k=c[k>>2]|0;p=c[m>>2]|0;p=k+p|0;Zb(n,o,p,15);l=q;return}function nc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;g=d+8|0;e=d+4|0;f=d;c[g>>2]=a;c[e>>2]=b;c[f>>2]=32736-(c[g>>2]|0);a=(N(c[f>>2]|0,16384-(c[e>>2]|0)|0)|0)>>>15;l=d;return a|0}function oc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;e=m+24|0;j=m+20|0;f=m+16|0;k=m+12|0;i=m+8|0;h=m+4|0;g=m;c[e>>2]=a;c[j>>2]=b;c[f>>2]=d;c[k>>2]=0;c[h>>2]=Mb(c[e>>2]|0,15)|0;c[i>>2]=0;do if((c[h>>2]|0)>>>0>=(c[j>>2]|0)>>>0){c[k>>2]=(c[k>>2]|0)+1;c[i>>2]=c[j>>2];c[j>>2]=(nc(c[j>>2]|0,c[f>>2]|0)|0)+1;while(1){if((c[j>>2]|0)>>>0>1)d=(c[h>>2]|0)>>>0>=((c[i>>2]|0)+(c[j>>2]<<1)|0)>>>0;else d=0;a=c[j>>2]|0;if(!d)break;c[j>>2]=a<<1;c[i>>2]=(c[i>>2]|0)+(c[j>>2]|0);c[j>>2]=(N((c[j>>2]|0)-2|0,c[f>>2]|0)|0)>>>15;c[j>>2]=(c[j>>2]|0)+1;c[k>>2]=(c[k>>2]|0)+1}if(a>>>0<=1){c[g>>2]=((c[h>>2]|0)-(c[i>>2]|0)|0)>>>1;c[k>>2]=(c[k>>2]|0)+(c[g>>2]|0);c[i>>2]=(c[i>>2]|0)+(c[g>>2]<<1)}if((c[h>>2]|0)>>>0<((c[i>>2]|0)+(c[j>>2]|0)|0)>>>0){c[k>>2]=0-(c[k>>2]|0);break}else{c[i>>2]=(c[i>>2]|0)+(c[j>>2]|0);break}}while(0);a=c[e>>2]|0;d=c[i>>2]|0;if(((c[i>>2]|0)+(c[j>>2]|0)|0)>>>0>=32768){j=32768;Nb(a,d,j,32768);k=c[k>>2]|0;l=m;return k|0}j=(c[i>>2]|0)+(c[j>>2]|0)|0;Nb(a,d,j,32768);k=c[k>>2]|0;l=m;return k|0}function pc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;b=h+16|0;d=h+12|0;f=h+8|0;e=h+4|0;g=h;c[b>>2]=a;c[f>>2]=0;c[e>>2]=32-(Q(c[b>>2]|0)|0)-1>>1;c[d>>2]=1<>2];do{c[g>>2]=(c[f>>2]<<1)+(c[d>>2]|0)<>2];if((c[g>>2]|0)>>>0<=(c[b>>2]|0)>>>0){c[f>>2]=(c[f>>2]|0)+(c[d>>2]|0);c[b>>2]=(c[b>>2]|0)-(c[g>>2]|0)}c[d>>2]=(c[d>>2]|0)>>>1;c[e>>2]=(c[e>>2]|0)+-1}while((c[e>>2]|0)>=0);l=h;return c[f>>2]|0}function qc(a,d,e,f,h,i,j,k){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0.0;V=l;l=l+160|0;W=V+144|0;t=V+140|0;u=V+136|0;G=V+132|0;v=V+128|0;n=V+124|0;A=V+120|0;r=V+112|0;m=V+108|0;o=V+104|0;p=V+100|0;z=V+96|0;F=V+92|0;y=V+88|0;x=V+84|0;J=V+80|0;K=V+76|0;P=V+72|0;H=V+68|0;I=V+64|0;S=V+60|0;B=V+56|0;L=V+48|0;C=V+44|0;D=V+40|0;w=V+36|0;s=V+32|0;T=V+28|0;M=V+24|0;q=V+20|0;Q=V+16|0;R=V+12|0;E=V+8|0;U=V+4|0;O=V;c[W>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G>>2]=c[F>>2];c[H>>2]=(c[F>>2]|0)+(c[v>>2]<<2)+-4;c[q>>2]=0;while(1){if((c[q>>2]|0)>=((c[v>>2]|0)/2|0|0))break;g[I>>2]=+g[c[L>>2]>>2];g[J>>2]=+g[c[T>>2]>>2];X=+g[c[H>>2]>>2]*+g[J>>2]-+g[c[G>>2]>>2]*+g[I>>2];V=c[T>>2]|0;c[T>>2]=V+4;g[V>>2]=X;X=+g[c[G>>2]>>2]*+g[J>>2]+ +g[c[H>>2]>>2]*+g[I>>2];V=c[L>>2]|0;c[L>>2]=V+-4;g[V>>2]=X;c[G>>2]=(c[G>>2]|0)+4;c[H>>2]=(c[H>>2]|0)+-4;c[q>>2]=(c[q>>2]|0)+1}l=W;return}function sc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;j=k+20|0;e=k+16|0;f=k+12|0;h=k+8|0;i=k+4|0;g=k;c[e>>2]=a;c[f>>2]=b;c[h>>2]=d;c[i>>2]=0;a:while(1){if((c[i>>2]|0)>=1){a=12;break}c[g>>2]=0;while(1){if((c[g>>2]|0)>=4)break;if((c[e>>2]|0)==(c[c[5544+(c[i>>2]<<2)>>2]>>2]|0)?(c[f>>2]<>2]|0)==(N(c[(c[5544+(c[i>>2]<<2)>>2]|0)+44>>2]|0,c[(c[5544+(c[i>>2]<<2)>>2]|0)+40>>2]|0)|0):0){a=7;break a}c[g>>2]=(c[g>>2]|0)+1}c[i>>2]=(c[i>>2]|0)+1}if((a|0)==7){if(c[h>>2]|0)c[c[h>>2]>>2]=0;c[j>>2]=c[5544+(c[i>>2]<<2)>>2];j=c[j>>2]|0;l=k;return j|0}else if((a|0)==12){if(c[h>>2]|0)c[c[h>>2]>>2]=-1;c[j>>2]=0;j=c[j>>2]|0;l=k;return j|0}return 0}function tc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0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]<<2)|0;g[s>>2]=+g[s>>2]-+g[i+(c[m>>2]<<2)>>2]*(+(c[m>>2]|0)*.00800000037997961)*(+(c[m>>2]|0)*.00800000037997961);c[m>>2]=(c[m>>2]|0)+1}Dc(o,i,4);c[m>>2]=0;while(1){if((c[m>>2]|0)>=4)break;g[r>>2]=+g[r>>2]*.8999999761581421;g[o+(c[m>>2]<<2)>>2]=+g[o+(c[m>>2]<<2)>>2]*+g[r>>2];c[m>>2]=(c[m>>2]|0)+1}g[p>>2]=+g[o>>2]+.800000011920929;g[p+4>>2]=+g[o+4>>2]+ +g[k>>2]*+g[o>>2];g[p+8>>2]=+g[o+8>>2]+ +g[k>>2]*+g[o+4>>2];g[p+12>>2]=+g[o+12>>2]+ +g[k>>2]*+g[o+8>>2];g[p+16>>2]=+g[k>>2]*+g[o+12>>2];uc(c[t>>2]|0,p,c[t>>2]|0,c[n>>2]>>1,q);l=u;return}function uc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+80|0;w=y+64|0;z=y+60|0;x=y+56|0;h=y+52|0;j=y+48|0;i=y+44|0;q=y+40|0;r=y+36|0;s=y+32|0;t=y+28|0;u=y+24|0;k=y+20|0;m=y+16|0;n=y+12|0;o=y+8|0;p=y+4|0;v=y;c[w>>2]=a;c[z>>2]=b;c[x>>2]=d;c[h>>2]=e;c[j>>2]=f;g[q>>2]=+g[c[z>>2]>>2];g[r>>2]=+g[(c[z>>2]|0)+4>>2];g[s>>2]=+g[(c[z>>2]|0)+8>>2];g[t>>2]=+g[(c[z>>2]|0)+12>>2];g[u>>2]=+g[(c[z>>2]|0)+16>>2];g[k>>2]=+g[c[j>>2]>>2];g[m>>2]=+g[(c[j>>2]|0)+4>>2];g[n>>2]=+g[(c[j>>2]|0)+8>>2];g[o>>2]=+g[(c[j>>2]|0)+12>>2];g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=+g[G>>2];else{if((A((c[q>>2]|0)-(c[H>>2]|0)|0)|0)<=2?(k=N((c[y>>2]|0)*5|0,c[y>>2]|0)|0,(k|0)<(c[o>>2]|0)):0){g[u>>2]=+g[G>>2]*.5;break}g[u>>2]=0.0}while(0);if(.30000001192092896>+g[w>>2]*.699999988079071-+g[u>>2])i=.30000001192092896;else i=+g[w>>2]*.699999988079071-+g[u>>2];g[J>>2]=i;if((c[q>>2]|0)>=((c[C>>2]|0)*3|0)){if((c[q>>2]|0)<(c[C>>2]<<1|0)){if(.5>+g[w>>2]*.8999999761581421-+g[u>>2])i=.5;else i=+g[w>>2]*.8999999761581421-+g[u>>2];g[J>>2]=i}}else{if(.4000000059604645>+g[w>>2]*.8500000238418579-+g[u>>2])i=.4000000059604645;else i=+g[w>>2]*.8500000238418579-+g[u>>2];g[J>>2]=i}if(+g[x>>2]>+g[J>>2]){g[s>>2]=+g[O>>2];g[t>>2]=+g[Q>>2];c[n>>2]=c[q>>2];g[v>>2]=+g[x>>2]}c[y>>2]=(c[y>>2]|0)+1}g[s>>2]=0.0>+g[s>>2]?0.0:+g[s>>2];if(+g[t>>2]<=+g[s>>2])g[F>>2]=1.0;else g[F>>2]=+g[s>>2]/(+g[t>>2]+1.0);c[y>>2]=0;while(1){if((c[y>>2]|0)>=3)break;i=+xc(c[K>>2]|0,(c[K>>2]|0)+(0-((c[n>>2]|0)+(c[y>>2]|0)-1)<<2)|0,c[m>>2]|0);g[L+(c[y>>2]<<2)>>2]=i;c[y>>2]=(c[y>>2]|0)+1}do if(!(+g[L+8>>2]-+g[L>>2]>(+g[L+4>>2]-+g[L>>2])*.699999988079071))if(+g[L>>2]-+g[L+8>>2]>(+g[L+4>>2]-+g[L+8>>2])*.699999988079071){c[E>>2]=-1;break}else{c[E>>2]=0;break}else c[E>>2]=1;while(0);if(+g[F>>2]>+g[v>>2])g[F>>2]=+g[v>>2];c[c[p>>2]>>2]=(c[n>>2]<<1)+(c[E>>2]|0);if((c[c[p>>2]>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0;while(1){if((c[h>>2]|0)>=(c[k>>2]|0))break;g[(c[j>>2]|0)+(c[h>>2]<<2)>>2]=0.0;c[h>>2]=(c[h>>2]|0)+1}if(!(+g[c[e>>2]>>2]!=0.0)){l=q;return}c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[k>>2]|0)){a=15;break}g[n>>2]=0.0;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[h>>2]|0))break;g[n>>2]=+g[n>>2]+ +g[(c[j>>2]|0)+(c[i>>2]<<2)>>2]*+g[(c[e>>2]|0)+((c[h>>2]|0)-(c[i>>2]|0)<<2)>>2];c[i>>2]=(c[i>>2]|0)+1}g[n>>2]=+g[n>>2]+ +g[(c[e>>2]|0)+((c[h>>2]|0)+1<<2)>>2];g[m>>2]=-(+g[n>>2]/+g[f>>2]);g[(c[j>>2]|0)+(c[h>>2]<<2)>>2]=+g[m>>2];c[i>>2]=0;while(1){if((c[i>>2]|0)>=((c[h>>2]|0)+1>>1|0))break;g[o>>2]=+g[(c[j>>2]|0)+(c[i>>2]<<2)>>2];g[p>>2]=+g[(c[j>>2]|0)+((c[h>>2]|0)-1-(c[i>>2]|0)<<2)>>2];g[(c[j>>2]|0)+(c[i>>2]<<2)>>2]=+g[o>>2]+ +g[m>>2]*+g[p>>2];g[(c[j>>2]|0)+((c[h>>2]|0)-1-(c[i>>2]|0)<<2)>>2]=+g[p>>2]+ +g[m>>2]*+g[o>>2];c[i>>2]=(c[i>>2]|0)+1}g[f>>2]=+g[f>>2]-+g[m>>2]*+g[m>>2]*+g[f>>2];if(+g[f>>2]<+g[c[e>>2]>>2]*1.0000000474974513e-03){a=15;break}c[h>>2]=(c[h>>2]|0)+1}if((a|0)==15){l=q;return}}function Ec(a,b,d,e,f,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;k=v+60|0;q=v+56|0;m=v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|0,c[Z>>2]|0,26380+((c[A>>2]|0)*84|0)+((c[L>>2]|0)*42|0)|0,c[K>>2]|0,c[G>>2]|0,c[z>>2]|0,c[A>>2]|0,0,+g[R>>2],c[P>>2]|0)|0;do if(c[ba>>2]|0){if((c[B>>2]|0)>=(c[C>>2]|0)){if((c[B>>2]|0)!=(c[C>>2]|0))break;da=Gb(c[G>>2]|0)|0;if((da+(c[M>>2]|0)|0)<=(c[aa>>2]|0))break}q=c[G>>2]|0;f=H;e=q+48|0;do{c[q>>2]=c[f>>2];q=q+4|0;f=f+4|0}while((q|0)<(e|0));_i(c[O>>2]|0,m|0,(c[T>>2]|0)-(c[U>>2]|0)+0|0)|0;da=(N(c[z>>2]|0,c[(c[Q>>2]|0)+8>>2]|0)|0)<<2;_i(c[V>>2]|0,n|0,da+0|0)|0;da=(N(c[z>>2]|0,c[(c[Q>>2]|0)+8>>2]|0)|0)<<2;_i(c[K>>2]|0,i|0,da+0|0)|0;c[L>>2]=1}while(0);_(c[X>>2]|0)}if(c[L>>2]|0){g[c[E>>2]>>2]=+g[S>>2];da=c[W>>2]|0;_(da|0);l=ca;return}else{g[c[E>>2]>>2]=+g[17564+(c[A>>2]<<2)>>2]*+g[17564+(c[A>>2]<<2)>>2]*+g[c[E>>2]>>2]+ +g[S>>2];da=c[W>>2]|0;_(da|0);l=ca;return}}function Jc(a,b,d,e,f,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0;t=l;l=l+48|0;n=t+36|0;r=t+32|0;s=t+28|0;o=t+24|0;q=t+20|0;i=t+16|0;j=t+12|0;p=t+8|0;m=t+4|0;k=t;c[n>>2]=a;c[r>>2]=b;c[s>>2]=d;c[o>>2]=e;c[q>>2]=f;c[i>>2]=h;g[m>>2]=0.0;c[j>>2]=0;do{c[p>>2]=c[s>>2];while(1){if((c[p>>2]|0)>=(c[o>>2]|0))break;u=+g[(c[n>>2]|0)+((c[p>>2]|0)+(N(c[j>>2]|0,c[q>>2]|0)|0)<<2)>>2];g[k>>2]=u-+g[(c[r>>2]|0)+((c[p>>2]|0)+(N(c[j>>2]|0,c[q>>2]|0)|0)<<2)>>2];g[m>>2]=+g[m>>2]+ +g[k>>2]*+g[k>>2];c[p>>2]=(c[p>>2]|0)+1}d=(c[j>>2]|0)+1|0;c[j>>2]=d}while((d|0)<(c[i>>2]|0));l=t;return +(200.0<+g[m>>2]?200.0:+g[m>>2])}function Kc(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0} +function gg(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+48|0;i=k+40|0;h=k+36|0;g=k+32|0;e=k+8|0;f=k+4|0;j=k;c[i>>2]=a;c[h>>2]=d;c[g>>2]=Pb(c[i>>2]|0,28974,8)|0;c[e+8>>2]=(c[g>>2]|0)/5|0;c[e+12+8>>2]=(c[g>>2]|0)-((c[e+8>>2]|0)*5|0);c[g>>2]=0;while(1){if((c[g>>2]|0)>=2)break;a=Pb(c[i>>2]|0,29027,8)|0;c[e+((c[g>>2]|0)*12|0)>>2]=a;a=Pb(c[i>>2]|0,29034,8)|0;c[e+((c[g>>2]|0)*12|0)+4>>2]=a;c[g>>2]=(c[g>>2]|0)+1}c[g>>2]=0;while(1){if((c[g>>2]|0)>=2)break;i=e+((c[g>>2]|0)*12|0)|0;c[i>>2]=(c[i>>2]|0)+((c[e+((c[g>>2]|0)*12|0)+8>>2]|0)*3|0);c[f>>2]=b[24526+(c[e+((c[g>>2]|0)*12|0)>>2]<<1)>>1];c[j>>2]=(((b[24526+((c[e+((c[g>>2]|0)*12|0)>>2]|0)+1<<1)>>1]|0)-(c[f>>2]|0)>>16)*6554|0)+(((b[24526+((c[e+((c[g>>2]|0)*12|0)>>2]|0)+1<<1)>>1]|0)-(c[f>>2]|0)&65535)*6554>>16);i=(c[f>>2]|0)+(N((c[j>>2]&65535)<<16>>16,((c[e+((c[g>>2]|0)*12|0)+4>>2]<<1)+1&65535)<<16>>16)|0)|0;c[(c[h>>2]|0)+(c[g>>2]<<2)>>2]=i;c[g>>2]=(c[g>>2]|0)+1}j=c[h>>2]|0;c[j>>2]=(c[j>>2]|0)-(c[(c[h>>2]|0)+4>>2]|0);l=k;return}function hg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;a=Pb(c[f>>2]|0,28999,8)|0;c[c[e>>2]>>2]=a;l=d;return}function ig(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+8|0;e=h+4|0;f=h;c[g>>2]=b;c[e>>2]=d;c[f>>2]=((a[(c[e>>2]|0)+2>>0]|0)*5|0)+(a[(c[e>>2]|0)+3+2>>0]|0);$b(c[g>>2]|0,c[f>>2]|0,28974,8);c[f>>2]=0;while(1){if((c[f>>2]|0)>=2)break;$b(c[g>>2]|0,a[(c[e>>2]|0)+((c[f>>2]|0)*3|0)>>0]|0,29027,8);$b(c[g>>2]|0,a[(c[e>>2]|0)+((c[f>>2]|0)*3|0)+1>>0]|0,29034,8);c[f>>2]=(c[f>>2]|0)+1}l=h;return}function jg(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;g=e;f=e+4|0;c[g>>2]=b;a[f>>0]=d;$b(c[g>>2]|0,a[f>>0]|0,28999,8);l=e;return}function kg(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;r=l;l=l+64|0;q=r+52|0;u=r+48|0;t=r+44|0;o=r+40|0;s=r+36|0;n=r+32|0;m=r+28|0;v=r+24|0;w=r+20|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>16)|0)>>16)<<6);u=c[(c[o>>2]|0)+4>>2]|0;v=ng(c[j>>2]|0)|0;v=N((v<>2])-(c[(c[o>>2]|0)+4>>2]|0)>>16,(c[n>>2]&65535)<<16>>16)|0;w=ng(c[j>>2]|0)|0;w=u+(v+((N((w<>2])-(c[(c[o>>2]|0)+4>>2]|0)&65535,(c[n>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[o>>2]|0)+4>>2]=w;if((c[c[o>>2]>>2]|0)>1)f=c[c[o>>2]>>2]|0;else f=1;w=mg(c[(c[o>>2]|0)+4>>2]|0,f,14)|0;c[c[q>>2]>>2]=w;if((c[c[q>>2]>>2]|0)>32767){v=32767;w=c[q>>2]|0;c[w>>2]=v;w=c[p>>2]|0;l=r;return w|0}if((c[c[q>>2]>>2]|0)<0){v=0;w=c[q>>2]|0;c[w>>2]=v;w=c[p>>2]|0;l=r;return w|0}v=c[c[q>>2]>>2]|0;w=c[q>>2]|0;c[w>>2]=v;w=c[p>>2]|0;l=r;return w|0}function lg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function mg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;h=l;l=l+48|0;g=h+40|0;q=h+36|0;p=h+32|0;i=h+28|0;k=h+24|0;j=h+20|0;f=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;e=h;c[q>>2]=a;c[p>>2]=b;c[i>>2]=d;b=c[q>>2]|0;c[k>>2]=(pg((c[q>>2]|0)>0?b:0-b|0)|0)-1;c[n>>2]=c[q>>2]<>2];b=c[p>>2]|0;c[j>>2]=(pg((c[p>>2]|0)>0?b:0-b|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;b=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=b+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);b=c[n>>2]|0;a=c[o>>2]|0;d=c[e>>2]|0;d=Xi(a|0,((a|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;d=Yi(d|0,y|0,32)|0;c[n>>2]=b-(d<<3);d=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(d+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[k>>2]|0)-(c[j>>2]|0)-(c[i>>2]|0);d=c[f>>2]|0;if((c[f>>2]|0)>=0)if((d|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];q=c[g>>2]|0;l=h;return q|0}else{c[g>>2]=0;q=c[g>>2]|0;l=h;return q|0}a=c[e>>2]|0;b=0-(c[f>>2]|0)|0;do if((-2147483648>>0-d|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>b|0)){d=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){d=2147483647>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>b|0)){d=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){d=-2147483648>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}while(0);c[g>>2]=d<<0-(c[f>>2]|0);q=c[g>>2]|0;l=h;return q|0}function ng(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}og(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function og(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=pg(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(qg(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function pg(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function qg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function rg(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;o=r+40|0;i=r+36|0;h=r+32|0;j=r+28|0;n=r+24|0;k=r+20|0;q=r+16|0;m=r+12|0;g=r+8|0;f=r+4|0;p=r;c[o>>2]=d;c[i>>2]=e;c[p>>2]=0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=2)break;c[g>>2]=2147483647;c[h>>2]=0;a:while(1){if((c[h>>2]|0)>=15)break;c[k>>2]=b[24526+(c[h>>2]<<1)>>1];c[q>>2]=(((b[24526+((c[h>>2]|0)+1<<1)>>1]|0)-(c[k>>2]|0)>>16)*6554|0)+(((b[24526+((c[h>>2]|0)+1<<1)>>1]|0)-(c[k>>2]|0)&65535)*6554>>16);c[j>>2]=0;while(1){if((c[j>>2]|0)>=5)break;c[m>>2]=(c[k>>2]|0)+(N((c[q>>2]&65535)<<16>>16,((c[j>>2]<<1)+1&65535)<<16>>16)|0);d=(c[(c[o>>2]|0)+(c[n>>2]<<2)>>2]|0)-(c[m>>2]|0)|0;c[f>>2]=((c[(c[o>>2]|0)+(c[n>>2]<<2)>>2]|0)-(c[m>>2]|0)|0)>0?d:0-d|0;if((c[f>>2]|0)>=(c[g>>2]|0))break a;c[g>>2]=c[f>>2];c[p>>2]=c[m>>2];a[(c[i>>2]|0)+((c[n>>2]|0)*3|0)>>0]=c[h>>2];a[(c[i>>2]|0)+((c[n>>2]|0)*3|0)+1>>0]=c[j>>2];c[j>>2]=(c[j>>2]|0)+1}c[h>>2]=(c[h>>2]|0)+1}a[(c[i>>2]|0)+((c[n>>2]|0)*3|0)+2>>0]=(a[(c[i>>2]|0)+((c[n>>2]|0)*3|0)>>0]|0)/3|0;d=(c[i>>2]|0)+((c[n>>2]|0)*3|0)|0;a[d>>0]=(a[d>>0]|0)-((a[(c[i>>2]|0)+((c[n>>2]|0)*3|0)+2>>0]|0)*3|0);c[(c[o>>2]|0)+(c[n>>2]<<2)>>2]=c[p>>2];c[n>>2]=(c[n>>2]|0)+1}q=c[o>>2]|0;c[q>>2]=(c[q>>2]|0)-(c[(c[o>>2]|0)+4>>2]|0);l=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4608>>2]|0);c[C>>2]=0;while(1){if((c[C>>2]|0)>=8)break;j=(c[n>>2]|0)+(((c[(c[L>>2]|0)+4600>>2]|0)*5|0)+(N(c[C>>2]|0,c[(c[L>>2]|0)+4608>>2]>>3)|0)<<2)|0;g[j>>2]=+g[j>>2]+ +(1-(c[C>>2]&2)|0)*9.999999974752427e-07;c[C>>2]=(c[C>>2]|0)+1}a:do if(!(c[(c[L>>2]|0)+4712>>2]|0)){Gg(c[L>>2]|0,Q,k,c[n>>2]|0,c[(c[L>>2]|0)+5124>>2]|0);Qg(c[L>>2]|0,Q,c[m>>2]|0,c[n>>2]|0);Hg(c[L>>2]|0,Q,k,c[n>>2]|0,c[p>>2]|0);Yg(c[L>>2]|0,Q,c[p>>2]|0);Vg(c[L>>2]|0,Q,X,c[n>>2]|0);yg(c[L>>2]|0,Q,X,c[p>>2]|0);c[F>>2]=6;b[v>>1]=256;c[t>>2]=0;c[u>>2]=0;c[z>>2]=Nd((c[L>>2]|0)+4768|0,c[(c[L>>2]|0)+4604>>2]|0)|0;c[A>>2]=-1;c[B>>2]=-1;h=T;i=c[M>>2]|0;e=h+48|0;do{c[h>>2]=c[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(e|0));_i(R|0,(c[L>>2]|0)+144|0,4380)|0;c[V>>2]=a[(c[L>>2]|0)+4768+34>>0];b[r>>1]=b[(c[L>>2]|0)+5804>>1]|0;c[s>>2]=c[(c[L>>2]|0)+5800>>2];c[D>>2]=0;while(1){do if((c[z>>2]|0)!=(c[A>>2]|0)){if((c[z>>2]|0)==(c[B>>2]|0)){c[G>>2]=c[I>>2];break}if((c[D>>2]|0)>0){h=c[M>>2]|0;i=T;e=h+48|0;do{c[h>>2]=c[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(e|0));_i((c[L>>2]|0)+144|0,R|0,4380)|0;a[(c[L>>2]|0)+4768+34>>0]=c[V>>2];b[(c[L>>2]|0)+5804>>1]=b[r>>1]|0;c[(c[L>>2]|0)+5800>>2]=c[s>>2]}kh(c[L>>2]|0,Q,(c[L>>2]|0)+4768|0,(c[L>>2]|0)+144|0,(c[L>>2]|0)+4804|0,X);Gd(c[L>>2]|0,c[M>>2]|0,c[(c[L>>2]|0)+5780>>2]|0,0,c[p>>2]|0);Hd(c[M>>2]|0,a[(c[L>>2]|0)+4768+29>>0]|0,a[(c[L>>2]|0)+4768+30>>0]|0,(c[L>>2]|0)+4804|0,c[(c[L>>2]|0)+4608>>2]|0);c[G>>2]=zg(c[M>>2]|0)|0;if((c[W>>2]|0)==0&(c[D>>2]|0)==0?(c[G>>2]|0)<=(c[E>>2]|0):0)break a}else c[G>>2]=c[H>>2];while(0);if((c[D>>2]|0)==(c[F>>2]|0))break;do if((c[G>>2]|0)>(c[E>>2]|0))if((c[t>>2]|0)==0&(c[D>>2]|0)>=2){n=Q+852|0;g[n>>2]=+g[n>>2]*1.5;c[u>>2]=0;c[B>>2]=-1;break}else{c[u>>2]=1;c[I>>2]=c[G>>2];c[x>>2]=b[v>>1];c[B>>2]=c[z>>2];break}else{if((c[G>>2]|0)>=((c[E>>2]|0)-5|0))break a;c[t>>2]=1;c[H>>2]=c[G>>2];c[w>>2]=b[v>>1];if((c[z>>2]|0)!=(c[A>>2]|0)){c[A>>2]=c[z>>2];h=U;i=c[M>>2]|0;e=h+48|0;do{c[h>>2]=c[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(e|0));_i(q|0,c[c[M>>2]>>2]|0,c[(c[M>>2]|0)+24>>2]|0)|0;_i(S|0,(c[L>>2]|0)+144|0,4380)|0;a[o>>0]=a[(c[L>>2]|0)+7200>>0]|0}}while(0);do if(c[t>>2]&c[u>>2]){n=N((c[x>>2]|0)-(c[w>>2]|0)|0,(c[E>>2]|0)-(c[H>>2]|0)|0)|0;b[v>>1]=(c[w>>2]|0)+((n|0)/((c[I>>2]|0)-(c[H>>2]|0)|0)|0);if((b[v>>1]|0)>((c[w>>2]|0)+((c[x>>2]|0)-(c[w>>2]|0)>>2)|0)){b[v>>1]=(c[w>>2]|0)+((c[x>>2]|0)-(c[w>>2]|0)>>2);break}if((b[v>>1]|0)<((c[x>>2]|0)-((c[x>>2]|0)-(c[w>>2]|0)>>2)|0))b[v>>1]=(c[x>>2]|0)-((c[x>>2]|0)-(c[w>>2]|0)>>2)}else{c[y>>2]=Ff((((c[G>>2]|0)-(c[E>>2]|0)<<7|0)/(c[(c[L>>2]|0)+4608>>2]|0)|0)+2048|0)|0;c[y>>2]=Ag(c[y>>2]|0,131072)|0;if((c[G>>2]|0)>(c[E>>2]|0))c[y>>2]=Bg(c[y>>2]|0,85197)|0;n=N(c[y>>2]>>16,b[v>>1]|0)|0;b[v>>1]=n+((N(c[y>>2]&65535,b[v>>1]|0)|0)>>16)}while(0);c[C>>2]=0;while(1){if((c[C>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;n=N(c[Q+892+(c[C>>2]<<2)>>2]>>16,b[v>>1]|0)|0;if((n+((N(c[Q+892+(c[C>>2]<<2)>>2]&65535,b[v>>1]|0)|0)>>16)|0)<=8388607){n=N(c[Q+892+(c[C>>2]<<2)>>2]>>16,b[v>>1]|0)|0;if((n+((N(c[Q+892+(c[C>>2]<<2)>>2]&65535,b[v>>1]|0)|0)>>16)|0)<-8388608)h=-8388608;else{h=N(c[Q+892+(c[C>>2]<<2)>>2]>>16,b[v>>1]|0)|0;h=h+((N(c[Q+892+(c[C>>2]<<2)>>2]&65535,b[v>>1]|0)|0)>>16)|0}}else h=8388607;c[J+(c[C>>2]<<2)>>2]=h<<8;c[C>>2]=(c[C>>2]|0)+1}a[(c[L>>2]|0)+7200>>0]=a[Q+908>>0]|0;Jd((c[L>>2]|0)+4768|0,J,(c[L>>2]|0)+7200|0,(c[p>>2]|0)==2&1,c[(c[L>>2]|0)+4604>>2]|0);c[z>>2]=Nd((c[L>>2]|0)+4768|0,c[(c[L>>2]|0)+4604>>2]|0)|0;c[C>>2]=0;while(1){if((c[C>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;g[Q+(c[C>>2]<<2)>>2]=+(c[J+(c[C>>2]<<2)>>2]|0)/65536.0;c[C>>2]=(c[C>>2]|0)+1}c[D>>2]=(c[D>>2]|0)+1}if(c[t>>2]|0){if((c[z>>2]|0)!=(c[A>>2]|0)?(c[G>>2]|0)<=(c[E>>2]|0):0)break;h=c[M>>2]|0;i=U;e=h+48|0;do{c[h>>2]=c[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(e|0));_i(c[c[M>>2]>>2]|0,q|0,c[U+24>>2]|0)|0;_i((c[L>>2]|0)+144|0,S|0,4380)|0;a[(c[L>>2]|0)+7200>>0]=a[o>>0]|0}}while(0);$i((c[L>>2]|0)+9356|0,(c[L>>2]|0)+9356+(c[(c[L>>2]|0)+4608>>2]<<2)|0,(c[(c[L>>2]|0)+4616>>2]|0)+((c[(c[L>>2]|0)+4600>>2]|0)*5|0)<<2|0)|0;if(c[(c[L>>2]|0)+4712>>2]|0){c[c[K>>2]>>2]=0;c[P>>2]=c[O>>2];X=c[P>>2]|0;l=Y;return X|0}else{c[(c[L>>2]|0)+4568>>2]=c[Q+228+((c[(c[L>>2]|0)+4604>>2]|0)-1<<2)>>2];a[(c[L>>2]|0)+4565>>0]=a[(c[L>>2]|0)+4768+29>>0]|0;c[(c[L>>2]|0)+4696>>2]=0;X=(zg(c[M>>2]|0)|0)+7>>3;c[c[K>>2]>>2]=X;c[P>>2]=c[O>>2];X=c[P>>2]|0;l=Y;return X|0}return 0}function xg(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;i=j+12|0;f=j+8|0;k=j+4|0;h=j;c[i>>2]=a;c[f>>2]=d;c[k>>2]=e;c[h>>2]=(c[k>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]=+(b[(c[f>>2]|0)+(c[h>>2]<<1)>>1]|0);c[h>>2]=(c[h>>2]|0)+-1}l=j;return}function yg(d,e,f,h){d=d|0;e=e|0;f=f|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+4448|0;n=s+4432|0;o=s+4428|0;r=s+4424|0;k=s+4420|0;m=s+4416|0;i=s+4400|0;j=s+4384|0;p=s+4380|0;q=s;c[n>>2]=d;c[o>>2]=e;c[r>>2]=f;c[k>>2]=h;c[p>>2]=(c[n>>2]|0)+6132+((c[(c[n>>2]|0)+5780>>2]|0)*36|0);if(!(c[(c[n>>2]|0)+6124>>2]|0)){l=s;return}if((c[(c[n>>2]|0)+4556>>2]|0)<=77){l=s;return}c[(c[n>>2]|0)+4756+(c[(c[n>>2]|0)+5780>>2]<<2)>>2]=1;_i(q|0,(c[n>>2]|0)+144|0,4380)|0;h=c[p>>2]|0;d=(c[n>>2]|0)+4768|0;e=h+36|0;do{b[h>>1]=b[d>>1]|0;h=h+2|0;d=d+2|0}while((h|0)<(e|0));_i(j|0,c[o>>2]|0,c[(c[n>>2]|0)+4604>>2]<<2|0)|0;if(!((c[(c[n>>2]|0)+5780>>2]|0)!=0?(c[(c[n>>2]|0)+4756+((c[(c[n>>2]|0)+5780>>2]|0)-1<<2)>>2]|0)!=0:0)){a[(c[n>>2]|0)+4564>>0]=a[(c[n>>2]|0)+7200>>0]|0;f=c[p>>2]|0;a[f>>0]=(a[f>>0]|0)+(c[(c[n>>2]|0)+6128>>2]|0);f=(Cg(a[c[p>>2]>>0]|0,63)|0)&255;a[c[p>>2]>>0]=f}Ld(i,c[p>>2]|0,(c[n>>2]|0)+4564|0,(c[k>>2]|0)==2&1,c[(c[n>>2]|0)+4604>>2]|0);c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[n>>2]|0)+4604>>2]|0))break;g[(c[o>>2]|0)+(c[m>>2]<<2)>>2]=+(c[i+(c[m>>2]<<2)>>2]|0)*.0000152587890625;c[m>>2]=(c[m>>2]|0)+1}kh(c[n>>2]|0,c[o>>2]|0,c[p>>2]|0,q,(c[n>>2]|0)+6240+((c[(c[n>>2]|0)+5780>>2]|0)*320|0)|0,c[r>>2]|0);_i(c[o>>2]|0,j|0,c[(c[n>>2]|0)+4604>>2]<<2|0)|0;l=s;return}function zg(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function Ag(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Bg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Cg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Dg(b,d,e,f){b=b|0;d=d|0;e=e|0;f=+f;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+1744|0;p=v+1700|0;k=v+1696|0;u=v+1692|0;h=v+1688|0;o=v+1684|0;t=v+1680|0;m=v+1616|0;q=v+1608|0;r=v+1604|0;s=v+1600|0;j=v+1704|0;n=v+1536|0;i=v;c[p>>2]=b;c[k>>2]=d;c[u>>2]=e;g[h>>2]=f;c[t>>2]=(c[(c[p>>2]|0)+4612>>2]|0)+(c[(c[p>>2]|0)+4664>>2]|0);a[(c[p>>2]|0)+4768+31>>0]=4;g[q>>2]=+nh(m,c[u>>2]|0,+g[h>>2],c[t>>2]|0,c[(c[p>>2]|0)+4604>>2]|0,c[(c[p>>2]|0)+4664>>2]|0);a:do if((c[(c[p>>2]|0)+4656>>2]|0?(c[(c[p>>2]|0)+4696>>2]|0)==0:0)?(c[(c[p>>2]|0)+4604>>2]|0)==4:0){f=+nh(n,(c[u>>2]|0)+(c[t>>2]<<1<<2)|0,+g[h>>2],c[t>>2]|0,2,c[(c[p>>2]|0)+4664>>2]|0);g[q>>2]=+g[q>>2]-f;gh(c[k>>2]|0,n,c[(c[p>>2]|0)+4664>>2]|0);g[r>>2]=3402823466385288598117041.0e14;c[o>>2]=3;while(1){if((c[o>>2]|0)<0)break a;Od(j,(c[p>>2]|0)+4524|0,c[k>>2]|0,c[o>>2]|0,c[(c[p>>2]|0)+4664>>2]|0);ih(n,j,c[(c[p>>2]|0)+4664>>2]|0);Ig(i,n,c[u>>2]|0,c[t>>2]<<1,c[(c[p>>2]|0)+4664>>2]|0);f=+ph(i+(c[(c[p>>2]|0)+4664>>2]<<2)|0,(c[t>>2]|0)-(c[(c[p>>2]|0)+4664>>2]|0)|0);g[s>>2]=f+ +ph(i+(c[(c[p>>2]|0)+4664>>2]<<2)+(c[t>>2]<<2)|0,(c[t>>2]|0)-(c[(c[p>>2]|0)+4664>>2]|0)|0);f=+g[s>>2];if(!(+g[s>>2]<+g[q>>2])){if(f>+g[r>>2])break a}else{g[q>>2]=f;a[(c[p>>2]|0)+4768+31>>0]=c[o>>2]}g[r>>2]=+g[s>>2];c[o>>2]=(c[o>>2]|0)+-1}}while(0);if((a[(c[p>>2]|0)+4768+31>>0]|0)!=4){l=v;return}gh(c[k>>2]|0,m,c[(c[p>>2]|0)+4664>>2]|0);l=v;return}function Eg(a,b,d,e,f,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0.0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;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>>2]=(c[w>>2]|0)+(c[z>>2]<<2);c[B>>2]=(c[B>>2]|0)+20;c[r>>2]=(c[r>>2]|0)+100;c[G>>2]=(c[G>>2]|0)+1}if(c[p>>2]|0){g[m>>2]=9.999999974752427e-07;g[o>>2]=0.0;c[G>>2]=0;while(1){if((c[G>>2]|0)>=(c[I>>2]|0))break;g[o>>2]=+g[o>>2]+ +g[y+(c[G>>2]<<2)>>2]*+g[(c[s>>2]|0)+(c[G>>2]<<2)>>2];g[m>>2]=+g[m>>2]+ +g[v+(c[G>>2]<<2)>>2]*+g[(c[s>>2]|0)+(c[G>>2]<<2)>>2];c[G>>2]=(c[G>>2]|0)+1}n=+Fg(+g[o>>2]/+g[m>>2])*3.0;g[c[p>>2]>>2]=n}c[B>>2]=c[A>>2];c[G>>2]=0;while(1){if((c[G>>2]|0)>=(c[I>>2]|0))break;g[C+(c[G>>2]<<2)>>2]=0.0;c[F>>2]=0;while(1){m=c[B>>2]|0;if((c[F>>2]|0)>=5)break;O=C+(c[G>>2]<<2)|0;g[O>>2]=+g[O>>2]+ +g[m+(c[F>>2]<<2)>>2];c[F>>2]=(c[F>>2]|0)+1}c[B>>2]=m+20;c[G>>2]=(c[G>>2]|0)+1}g[J>>2]=1.0000000474974513e-03;c[G>>2]=0;while(1){if((c[G>>2]|0)>=(c[I>>2]|0))break;g[J>>2]=+g[J>>2]+ +g[K+(c[G>>2]<<2)>>2];c[G>>2]=(c[G>>2]|0)+1}g[H>>2]=0.0;c[G>>2]=0;while(1){if((c[G>>2]|0)>=(c[I>>2]|0))break;g[H>>2]=+g[H>>2]+ +g[C+(c[G>>2]<<2)>>2]*+g[K+(c[G>>2]<<2)>>2];c[G>>2]=(c[G>>2]|0)+1}g[H>>2]=+g[H>>2]/+g[J>>2];c[B>>2]=c[A>>2];c[G>>2]=0;while(1){if((c[G>>2]|0)>=(c[I>>2]|0))break;g[E>>2]=.10000000149011612/(+g[K+(c[G>>2]<<2)>>2]+.10000000149011612)*(+g[H>>2]-+g[C+(c[G>>2]<<2)>>2]);g[J>>2]=0.0;c[F>>2]=0;while(1){if((c[F>>2]|0)>=5)break;if(+g[(c[B>>2]|0)+(c[F>>2]<<2)>>2]>.10000000149011612)n=+g[(c[B>>2]|0)+(c[F>>2]<<2)>>2];else n=.10000000149011612;g[D+(c[F>>2]<<2)>>2]=n;g[J>>2]=+g[J>>2]+ +g[D+(c[F>>2]<<2)>>2];c[F>>2]=(c[F>>2]|0)+1}g[J>>2]=+g[E>>2]/+g[J>>2];c[F>>2]=0;while(1){m=c[B>>2]|0;if((c[F>>2]|0)>=5)break;g[(c[B>>2]|0)+(c[F>>2]<<2)>>2]=+g[m+(c[F>>2]<<2)>>2]+ +g[D+(c[F>>2]<<2)>>2]*+g[J>>2];c[F>>2]=(c[F>>2]|0)+1}c[B>>2]=m+20;c[G>>2]=(c[G>>2]|0)+1}l=L;return}function Fg(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;h[c>>3]=a;a=+Ti(+h[c>>3])*3.32192809488736;l=b;return +a}function Gg(d,e,f,h,i){d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;p=l;l=l+1792|0;k=p+1776|0;m=p+1772|0;n=p+1768|0;z=p+1764|0;j=p+1760|0;q=p+1756|0;o=p+1752|0;u=p+1748|0;x=p+1744|0;r=p+1740|0;v=p+1672|0;s=p+1608|0;t=p+1544|0;w=p+8|0;y=p;c[k>>2]=d;c[m>>2]=e;c[n>>2]=f;c[z>>2]=h;c[j>>2]=i;c[q>>2]=(c[(c[k>>2]|0)+4620>>2]|0)+(c[(c[k>>2]|0)+4608>>2]|0)+(c[(c[k>>2]|0)+4616>>2]|0);c[r>>2]=(c[z>>2]|0)+(0-(c[(c[k>>2]|0)+4616>>2]|0)<<2);c[x>>2]=(c[r>>2]|0)+(c[q>>2]<<2)+(0-(c[(c[k>>2]|0)+4572>>2]|0)<<2);c[y>>2]=w;sg(c[y>>2]|0,c[x>>2]|0,1,c[(c[k>>2]|0)+4620>>2]|0);c[y>>2]=(c[y>>2]|0)+(c[(c[k>>2]|0)+4620>>2]<<2);c[x>>2]=(c[x>>2]|0)+(c[(c[k>>2]|0)+4620>>2]<<2);_i(c[y>>2]|0,c[x>>2]|0,(c[(c[k>>2]|0)+4572>>2]|0)-(c[(c[k>>2]|0)+4620>>2]<<1)<<2|0)|0;c[y>>2]=(c[y>>2]|0)+((c[(c[k>>2]|0)+4572>>2]|0)-(c[(c[k>>2]|0)+4620>>2]<<1)<<2);c[x>>2]=(c[x>>2]|0)+((c[(c[k>>2]|0)+4572>>2]|0)-(c[(c[k>>2]|0)+4620>>2]<<1)<<2);sg(c[y>>2]|0,c[x>>2]|0,2,c[(c[k>>2]|0)+4620>>2]|0);mh(v,w,c[(c[k>>2]|0)+4572>>2]|0,(c[(c[k>>2]|0)+4672>>2]|0)+1|0);g[v>>2]=+g[v>>2]+(+g[v>>2]*1.0000000474974513e-03+1.0);g[u>>2]=+Eh(t,v,c[(c[k>>2]|0)+4672>>2]|0);g[(c[m>>2]|0)+868>>2]=+g[v>>2]/(+g[u>>2]>1.0?+g[u>>2]:1.0);rh(s,t,c[(c[k>>2]|0)+4672>>2]|0);oh(s,c[(c[k>>2]|0)+4672>>2]|0,.9900000095367432);Ig(c[n>>2]|0,s,c[r>>2]|0,c[q>>2]|0,c[(c[k>>2]|0)+4672>>2]|0);if(a[(c[k>>2]|0)+4768+29>>0]|0?(c[(c[k>>2]|0)+4696>>2]|0)==0:0){g[o>>2]=.6000000238418579;g[o>>2]=+g[o>>2]-+(c[(c[k>>2]|0)+4672>>2]|0)*.004000000189989805;g[o>>2]=+g[o>>2]-+(c[(c[k>>2]|0)+4556>>2]|0)*.10000000149011612*.00390625;g[o>>2]=+g[o>>2]-+(a[(c[k>>2]|0)+4565>>0]>>1|0)*.15000000596046448;g[o>>2]=+g[o>>2]-+(c[(c[k>>2]|0)+4744>>2]|0)*.10000000149011612*.000030517578125;z=(uh(c[n>>2]|0,(c[m>>2]|0)+228|0,(c[k>>2]|0)+4768+26|0,(c[k>>2]|0)+4768+28|0,(c[k>>2]|0)+12236|0,c[(c[k>>2]|0)+4568>>2]|0,+(c[(c[k>>2]|0)+4676>>2]|0)/65536.0,+g[o>>2],c[(c[k>>2]|0)+4600>>2]|0,c[(c[k>>2]|0)+4668>>2]|0,c[(c[k>>2]|0)+4604>>2]|0,c[j>>2]|0)|0)==0;a[(c[k>>2]|0)+4768+29>>0]=z?2:1;l=p;return}z=(c[m>>2]|0)+228|0;c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;c[z+12>>2]=0;b[(c[k>>2]|0)+4768+26>>1]=0;a[(c[k>>2]|0)+4768+28>>0]=0;g[(c[k>>2]|0)+12236>>2]=0.0;l=p;return}function Hg(d,e,f,h,i){d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0.0;y=l;l=l+2048|0;s=y+2004|0;t=y+2e3|0;u=y+1996|0;v=y+1992|0;o=y+1988|0;p=y+1984|0;m=y+1584|0;q=y+1568|0;n=y+1552|0;j=y+2008|0;x=y+1548|0;w=y+1544|0;k=y+8|0;r=y;c[s>>2]=d;c[t>>2]=e;c[u>>2]=f;c[v>>2]=h;c[o>>2]=i;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[(c[s>>2]|0)+4604>>2]|0))break;g[q+(c[p>>2]<<2)>>2]=1.0/+g[(c[t>>2]|0)+(c[p>>2]<<2)>>2];g[n+(c[p>>2]<<2)>>2]=+g[q+(c[p>>2]<<2)>>2]*+g[q+(c[p>>2]<<2)>>2];c[p>>2]=(c[p>>2]|0)+1}if((a[(c[s>>2]|0)+4768+29>>0]|0)==2){Eg((c[t>>2]|0)+144|0,m,(c[t>>2]|0)+872|0,c[u>>2]|0,(c[t>>2]|0)+228|0,n,c[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>2]|0;u=u+876|0;h=c[t>>2]|0;h=h+16|0;v=c[t>>2]|0;w=c[s>>2]|0;w=w+4612|0;w=c[w>>2]|0;x=c[s>>2]|0;x=x+4604|0;x=c[x>>2]|0;m=c[s>>2]|0;m=m+4664|0;m=c[m>>2]|0;ah(u,k,h,v,w,x,m);m=c[s>>2]|0;m=m+4524|0;k=m+32|0;do{b[m>>1]=b[j>>1]|0;m=m+2|0;j=j+2|0}while((m|0)<(k|0));l=y;return}else{g[r>>2]=+C(2.0,+(+g[(c[t>>2]|0)+872>>2]/3.0))/1.0e4;g[r>>2]=+g[r>>2]/(+g[(c[t>>2]|0)+860>>2]*.75+.25);v=c[s>>2]|0;z=+g[r>>2];Dg(v,j,k,z);v=c[s>>2]|0;h=c[t>>2]|0;h=h+16|0;u=c[s>>2]|0;u=u+4524|0;jh(v,h,j,u);u=c[t>>2]|0;u=u+876|0;h=c[t>>2]|0;h=h+16|0;v=c[t>>2]|0;w=c[s>>2]|0;w=w+4612|0;w=c[w>>2]|0;x=c[s>>2]|0;x=x+4604|0;x=c[x>>2]|0;m=c[s>>2]|0;m=m+4664|0;m=c[m>>2]|0;ah(u,k,h,v,w,x,m);m=c[s>>2]|0;m=m+4524|0;k=m+32|0;do{b[m>>1]=b[j>>1]|0;m=m+2|0;j=j+2|0}while((m|0)<(k|0));l=y;return}}function Ig(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;j=m+16|0;h=m+12|0;k=m+8|0;i=m+4|0;g=m;c[j>>2]=a;c[h>>2]=b;c[k>>2]=d;c[i>>2]=e;c[g>>2]=f;switch(c[g>>2]|0){case 6:{Jg(c[j>>2]|0,c[h>>2]|0,c[k>>2]|0,c[i>>2]|0);break}case 8:{Kg(c[j>>2]|0,c[h>>2]|0,c[k>>2]|0,c[i>>2]|0);break}case 10:{Lg(c[j>>2]|0,c[h>>2]|0,c[k>>2]|0,c[i>>2]|0);break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)+1}c[n>>2]=(c[n>>2]|0)+((c[w>>2]|0)+(c[v>>2]|0)<<2);c[y>>2]=(c[y>>2]|0)+(c[w>>2]<<2);c[s>>2]=(c[s>>2]|0)+1}l=z;return}function Pg(d,e,f){d=d|0;e=e|0;f=f|0;var h=0.0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+16|0;j=m+12|0;k=m+8|0;n=m+4|0;i=m;c[j>>2]=d;c[k>>2]=e;c[n>>2]=f;f=c[j>>2]|0;if(!(c[n>>2]|0)){c[i>>2]=(c[f+4640>>2]|0)+(c[(c[j>>2]|0)+5776>>2]|0);if(!(+(c[i>>2]|0)*+g[(c[k>>2]|0)+872>>2]*.10000000149011612>2.0))if(+(c[i>>2]|0)*+g[(c[k>>2]|0)+872>>2]*.10000000149011612<0.0)h=0.0;else h=+(c[i>>2]|0)*+g[(c[k>>2]|0)+872>>2]*.10000000149011612;else h=2.0;d=~~h;f=c[j>>2]|0}else d=0;a[f+4768+33>>0]=d;g[(c[k>>2]|0)+224>>2]=+(b[24566+(a[(c[j>>2]|0)+4768+33>>0]<<1)>>1]|0)/16384.0;l=m;return}function Qg(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0.0,R=0;P=l;l=l+1152|0;L=P+1140|0;M=P+1136|0;v=P+1132|0;R=P+1128|0;N=P+1124|0;K=P+1120|0;t=P+1116|0;j=P+1112|0;G=P+1108|0;H=P+1104|0;I=P+1100|0;u=P+1096|0;x=P+1092|0;r=P+1088|0;s=P+1084|0;n=P+1080|0;m=P+1076|0;h=P+1072|0;i=P+1068|0;q=P+1064|0;p=P+1060|0;O=P+1056|0;J=P+1052|0;D=P+1048|0;F=P+88|0;k=P+20|0;E=P+16|0;w=P+12|0;y=P+8|0;z=P+4|0;o=P;c[L>>2]=b;c[M>>2]=d;c[v>>2]=e;c[R>>2]=f;c[N>>2]=(c[L>>2]|0)+7200;c[E>>2]=(c[R>>2]|0)+(0-(c[(c[L>>2]|0)+4624>>2]|0)<<2);g[j>>2]=+(c[(c[L>>2]|0)+4748>>2]|0)*.0078125;g[(c[M>>2]|0)+856>>2]=+((c[(c[L>>2]|0)+4728>>2]|0)+(c[(c[L>>2]|0)+4728+4>>2]|0)|0)*.5*.000030517578125;Q=+Rg((+g[j>>2]-20.0)*.25);g[(c[M>>2]|0)+860>>2]=Q;if(!(c[(c[L>>2]|0)+4708>>2]|0)){g[J>>2]=1.0-+(c[(c[L>>2]|0)+4556>>2]|0)*.00390625;g[j>>2]=+g[j>>2]-+g[(c[M>>2]|0)+860>>2]*2.0*(+g[(c[M>>2]|0)+856>>2]*.5+.5)*+g[J>>2]*+g[J>>2]}e=c[L>>2]|0;if((a[(c[L>>2]|0)+4768+29>>0]|0)==2)g[j>>2]=+g[j>>2]+ +g[e+12236>>2]*2.0;else g[j>>2]=+g[j>>2]+(+(c[e+4748>>2]|0)*-.4000000059604645*.0078125+6.0)*(1.0-+g[(c[M>>2]|0)+856>>2]);e=c[L>>2]|0;if((a[(c[L>>2]|0)+4768+29>>0]|0)==2){a[e+4768+30>>0]=0;g[(c[M>>2]|0)+864>>2]=0.0}else{c[t>>2]=c[e+4600>>2]<<1;g[n>>2]=0.0;g[s>>2]=0.0;c[w>>2]=c[v>>2];c[K>>2]=0;while(1){if((c[K>>2]|0)>=((((c[(c[L>>2]|0)+4604>>2]&65535)<<16>>16)*5|0)/2|0|0))break;Q=+(c[t>>2]|0);g[u>>2]=Q+ +ph(c[w>>2]|0,c[t>>2]|0);g[r>>2]=+Sg(+g[u>>2]);if((c[K>>2]|0)>0){Q=+A(+(+g[r>>2]-+g[s>>2]));g[n>>2]=+g[n>>2]+Q}g[s>>2]=+g[r>>2];c[w>>2]=(c[w>>2]|0)+(c[t>>2]<<2);c[K>>2]=(c[K>>2]|0)+1}Q=+Rg((+g[n>>2]-5.0)*.4000000059604645);g[(c[M>>2]|0)+864>>2]=Q;a[(c[L>>2]|0)+4768+30>>0]=+g[(c[M>>2]|0)+864>>2]>.75?0:1;g[j>>2]=+g[j>>2]+(+g[(c[M>>2]|0)+864>>2]-.5)*2.0}g[O>>2]=+g[(c[M>>2]|0)+868>>2]*1.0000000474974513e-03;Q=.949999988079071/(+g[O>>2]*+g[O>>2]+1.0);g[i>>2]=Q;g[h>>2]=Q;g[m>>2]=(1.0-+g[(c[M>>2]|0)+860>>2]*.75)*.009999999776482582;g[h>>2]=+g[h>>2]-+g[m>>2];g[i>>2]=+g[i>>2]+ +g[m>>2];g[h>>2]=+g[h>>2]/+g[i>>2];if((c[(c[L>>2]|0)+4704>>2]|0)>0)g[D>>2]=+(c[(c[L>>2]|0)+4704>>2]|0)/65536.0+ +g[(c[M>>2]|0)+860>>2]*.009999999776482582;else g[D>>2]=0.0;c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;c[o>>2]=(c[(c[L>>2]|0)+4600>>2]|0)*3;c[z>>2]=((c[(c[L>>2]|0)+4628>>2]|0)-(c[o>>2]|0)|0)/2|0;sg(F,c[E>>2]|0,1,c[z>>2]|0);c[y>>2]=c[z>>2];_i(F+(c[y>>2]<<2)|0,(c[E>>2]|0)+(c[y>>2]<<2)|0,c[o>>2]<<2|0)|0;c[y>>2]=(c[y>>2]|0)+(c[o>>2]|0);sg(F+(c[y>>2]<<2)|0,(c[E>>2]|0)+(c[y>>2]<<2)|0,2,c[z>>2]|0);c[E>>2]=(c[E>>2]|0)+(c[(c[L>>2]|0)+4612>>2]<<2);if((c[(c[L>>2]|0)+4704>>2]|0)>0)fh(k,F,+g[D>>2],c[(c[L>>2]|0)+4628>>2]|0,c[(c[L>>2]|0)+4660>>2]|0);else mh(k,F,c[(c[L>>2]|0)+4628>>2]|0,(c[(c[L>>2]|0)+4660>>2]|0)+1|0);g[k>>2]=+g[k>>2]+ +g[k>>2]*4.999999873689376e-05;g[u>>2]=+sh((c[M>>2]|0)+500+(c[K>>2]<<4<<2)|0,k,c[(c[L>>2]|0)+4660>>2]|0);Q=+B(+(+g[u>>2]));g[(c[M>>2]|0)+(c[K>>2]<<2)>>2]=Q;if((c[(c[L>>2]|0)+4704>>2]|0)>0){Q=+Tg((c[M>>2]|0)+500+(c[K>>2]<<4<<2)|0,+g[D>>2],c[(c[L>>2]|0)+4660>>2]|0);R=(c[M>>2]|0)+(c[K>>2]<<2)|0;g[R>>2]=+g[R>>2]*Q}oh((c[M>>2]|0)+500+(c[K>>2]<<4<<2)|0,c[(c[L>>2]|0)+4660>>2]|0,+g[i>>2]);_i((c[M>>2]|0)+244+(c[K>>2]<<4<<2)|0,(c[M>>2]|0)+500+(c[K>>2]<<4<<2)|0,c[(c[L>>2]|0)+4660>>2]<<2|0)|0;oh((c[M>>2]|0)+244+(c[K>>2]<<4<<2)|0,c[(c[L>>2]|0)+4660>>2]|0,+g[h>>2]);g[x>>2]=+th((c[M>>2]|0)+500+(c[K>>2]<<4<<2)|0,c[(c[L>>2]|0)+4660>>2]|0);g[u>>2]=+th((c[M>>2]|0)+244+(c[K>>2]<<4<<2)|0,c[(c[L>>2]|0)+4660>>2]|0);g[(c[M>>2]|0)+788+(c[K>>2]<<2)>>2]=1.0-(1.0-+g[x>>2]/+g[u>>2])*.699999988079071;Ug((c[M>>2]|0)+500+(c[K>>2]<<4<<2)|0,(c[M>>2]|0)+244+(c[K>>2]<<4<<2)|0,+g[D>>2],3.999000072479248,c[(c[L>>2]|0)+4660>>2]|0);c[K>>2]=(c[K>>2]|0)+1}g[q>>2]=+C(2.0,+(+g[j>>2]*-.1599999964237213));g[p>>2]=+C(2.0,.3199999928474426);c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;R=(c[M>>2]|0)+(c[K>>2]<<2)|0;g[R>>2]=+g[R>>2]*+g[q>>2];R=(c[M>>2]|0)+(c[K>>2]<<2)|0;g[R>>2]=+g[R>>2]+ +g[p>>2];c[K>>2]=(c[K>>2]|0)+1}g[q>>2]=+g[(c[M>>2]|0)+860>>2]*.10000000149011612+1.0499999523162842;c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;R=(c[M>>2]|0)+788+(c[K>>2]<<2)|0;g[R>>2]=+g[R>>2]*+g[q>>2];c[K>>2]=(c[K>>2]|0)+1}g[O>>2]=((+(c[(c[L>>2]|0)+4728>>2]|0)*.000030517578125-1.0)*.5+1.0)*4.0;g[O>>2]=+g[O>>2]*(+(c[(c[L>>2]|0)+4556>>2]|0)*.00390625);if((a[(c[L>>2]|0)+4768+29>>0]|0)==2){c[K>>2]=0;while(1){e=c[L>>2]|0;if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;g[J>>2]=.20000000298023224/+(c[e+4600>>2]|0)+3.0/+(c[(c[M>>2]|0)+228+(c[K>>2]<<2)>>2]|0);g[(c[M>>2]|0)+756+(c[K>>2]<<2)>>2]=+g[J>>2]+-1.0;g[(c[M>>2]|0)+772+(c[K>>2]<<2)>>2]=1.0-+g[J>>2]-+g[J>>2]*+g[O>>2];c[K>>2]=(c[K>>2]|0)+1}g[I>>2]=-.25-+(c[e+4556>>2]|0)*.26249998807907104*.00390625}else{g[J>>2]=1.2999999523162842/+(c[(c[L>>2]|0)+4600>>2]|0);g[(c[M>>2]|0)+756>>2]=+g[J>>2]+-1.0;g[(c[M>>2]|0)+772>>2]=1.0-+g[J>>2]-+g[J>>2]*+g[O>>2]*.6000000238418579;c[K>>2]=1;while(1){if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;g[(c[M>>2]|0)+756+(c[K>>2]<<2)>>2]=+g[(c[M>>2]|0)+756>>2];g[(c[M>>2]|0)+772+(c[K>>2]<<2)>>2]=+g[(c[M>>2]|0)+772>>2];c[K>>2]=(c[K>>2]|0)+1}g[I>>2]=-.25}g[G>>2]=(1.0-+g[(c[M>>2]|0)+860>>2])*.10000000149011612*+g[(c[L>>2]|0)+12236>>2];g[G>>2]=+g[G>>2]+(1.0-+g[(c[M>>2]|0)+856>>2])*.10000000149011612;if((a[(c[L>>2]|0)+4768+29>>0]|0)==2){g[H>>2]=.30000001192092896;g[H>>2]=+g[H>>2]+(1.0-(1.0-+g[(c[M>>2]|0)+860>>2])*+g[(c[M>>2]|0)+856>>2])*.20000000298023224;Q=+B(+(+g[(c[L>>2]|0)+12236>>2]));g[H>>2]=+g[H>>2]*Q}else g[H>>2]=0.0;c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[L>>2]|0)+4604>>2]|0))break;R=(c[N>>2]|0)+4|0;g[R>>2]=+g[R>>2]+(+g[G>>2]-+g[(c[N>>2]|0)+4>>2])*.4000000059604645;g[(c[M>>2]|0)+804+(c[K>>2]<<2)>>2]=+g[(c[N>>2]|0)+4>>2];R=(c[N>>2]|0)+8|0;g[R>>2]=+g[R>>2]+(+g[H>>2]-+g[(c[N>>2]|0)+8>>2])*.4000000059604645;g[(c[M>>2]|0)+836+(c[K>>2]<<2)>>2]=+g[(c[N>>2]|0)+8>>2];R=(c[N>>2]|0)+12|0;g[R>>2]=+g[R>>2]+(+g[I>>2]-+g[(c[N>>2]|0)+12>>2])*.4000000059604645;g[(c[M>>2]|0)+820+(c[K>>2]<<2)>>2]=+g[(c[N>>2]|0)+12>>2];c[K>>2]=(c[K>>2]|0)+1}l=P;return}function Rg(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;g[c>>2]=a;a=1.0/(+K(+-+g[c>>2])+1.0);l=b;return +a}function Sg(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;h[c>>3]=a;a=+Ti(+h[c>>3])*3.32192809488736;l=b;return +a}function Tg(a,b,d){a=a|0;b=+b;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+16|0;i=j+12|0;k=j+8|0;h=j+4|0;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>2];c[n>>2]=(c[n>>2]|0)+1}c[p>>2]=0;while(1){if((c[p>>2]|0)>=10){b=31;break}g[s>>2]=-1.0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[t>>2]|0))break;e=+A(+(+g[(c[j>>2]|0)+(c[n>>2]<<2)>>2]));if(e>+A(+(+g[(c[i>>2]|0)+(c[n>>2]<<2)>>2])))b=(c[j>>2]|0)+(c[n>>2]<<2)|0;else b=(c[i>>2]|0)+(c[n>>2]<<2)|0;g[u>>2]=+A(+(+g[b>>2]));if(+g[u>>2]>+g[s>>2]){g[s>>2]=+g[u>>2];c[o>>2]=c[n>>2]}c[n>>2]=(c[n>>2]|0)+1}if(+g[s>>2]<=+g[r>>2]){b=31;break}c[n>>2]=1;while(1){if((c[n>>2]|0)>=(c[t>>2]|0))break;f=(c[j>>2]|0)+((c[n>>2]|0)-1<<2)|0;g[f>>2]=+g[f>>2]+ +g[q>>2]*+g[(c[j>>2]|0)+(c[n>>2]<<2)>>2];f=(c[i>>2]|0)+((c[n>>2]|0)-1<<2)|0;g[f>>2]=+g[f>>2]+ +g[q>>2]*+g[(c[i>>2]|0)+(c[n>>2]<<2)>>2];c[n>>2]=(c[n>>2]|0)+1}g[m>>2]=1.0/+g[m>>2];g[k>>2]=1.0/+g[k>>2];c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[t>>2]|0))break;f=(c[j>>2]|0)+(c[n>>2]<<2)|0;g[f>>2]=+g[f>>2]*+g[m>>2];f=(c[i>>2]|0)+(c[n>>2]<<2)|0;g[f>>2]=+g[f>>2]*+g[k>>2];c[n>>2]=(c[n>>2]|0)+1}g[h>>2]=.9900000095367432-(+(c[p>>2]|0)*.10000000149011612+.800000011920929)*(+g[s>>2]-+g[r>>2])/(+g[s>>2]*+((c[o>>2]|0)+1|0));oh(c[j>>2]|0,c[t>>2]|0,+g[h>>2]);oh(c[i>>2]|0,c[t>>2]|0,+g[h>>2]);c[n>>2]=(c[t>>2]|0)-1;while(1){d=+g[q>>2];if((c[n>>2]|0)<=0)break;f=(c[j>>2]|0)+((c[n>>2]|0)-1<<2)|0;g[f>>2]=+g[f>>2]-d*+g[(c[j>>2]|0)+(c[n>>2]<<2)>>2];f=(c[i>>2]|0)+((c[n>>2]|0)-1<<2)|0;g[f>>2]=+g[f>>2]-+g[q>>2]*+g[(c[i>>2]|0)+(c[n>>2]<<2)>>2];c[n>>2]=(c[n>>2]|0)+-1}g[m>>2]=(1.0-d*+g[q>>2])/(+g[q>>2]*+g[c[j>>2]>>2]+1.0);g[k>>2]=(1.0-+g[q>>2]*+g[q>>2])/(+g[q>>2]*+g[c[i>>2]>>2]+1.0);c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[t>>2]|0))break;f=(c[j>>2]|0)+(c[n>>2]<<2)|0;g[f>>2]=+g[f>>2]*+g[m>>2];f=(c[i>>2]|0)+(c[n>>2]<<2)|0;g[f>>2]=+g[f>>2]*+g[k>>2];c[n>>2]=(c[n>>2]|0)+1}c[p>>2]=(c[p>>2]|0)+1}if((b|0)==31){l=v;return}}function Vg(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;y=l;l=l+464|0;t=y+460|0;u=y+456|0;z=y+452|0;A=y+448|0;o=y+444|0;q=y+440|0;r=y+436|0;s=y+432|0;k=y+428|0;p=y+424|0;n=y+420|0;m=y+416|0;i=y+408|0;h=y+404|0;v=y+400|0;w=y+396|0;j=y+384|0;x=y;c[t>>2]=b;c[u>>2]=d;c[z>>2]=e;c[A>>2]=f;c[o>>2]=(c[t>>2]|0)+7216;c[v>>2]=c[A>>2];c[w>>2]=c[z>>2];c[s>>2]=c[(c[o>>2]|0)+2136>>2];c[r>>2]=0;while(1){if((c[r>>2]|0)>=(c[(c[t>>2]|0)+4604>>2]|0))break;if((a[(c[t>>2]|0)+4768+29>>0]|0)==2)c[s>>2]=c[(c[u>>2]|0)+228+(c[r>>2]<<2)>>2];g[k>>2]=+g[(c[u>>2]|0)+836+(c[r>>2]<<2)>>2]*(1.0-+g[(c[u>>2]|0)+804+(c[r>>2]<<2)>>2]);g[j>>2]=+g[k>>2]*.25;g[j+4>>2]=+g[k>>2]*.4999847412109375;g[j+8>>2]=+g[k>>2]*.25;g[p>>2]=+g[(c[u>>2]|0)+820+(c[r>>2]<<2)>>2];g[n>>2]=+g[(c[u>>2]|0)+756+(c[r>>2]<<2)>>2];g[m>>2]=+g[(c[u>>2]|0)+772+(c[r>>2]<<2)>>2];c[h>>2]=(c[u>>2]|0)+244+(c[r>>2]<<4<<2);Wg((c[o>>2]|0)+2048|0,x,c[h>>2]|0,c[v>>2]|0,+(c[(c[t>>2]|0)+4704>>2]|0)/65536.0,c[(c[t>>2]|0)+4612>>2]|0,c[(c[t>>2]|0)+4660>>2]|0);g[i>>2]=+g[(c[u>>2]|0)+788+(c[r>>2]<<2)>>2];g[i+4>>2]=-+g[(c[u>>2]|0)+788+(c[r>>2]<<2)>>2]*(+g[(c[u>>2]|0)+804+(c[r>>2]<<2)>>2]*+g[k>>2]+.05000000074505806+ +g[(c[u>>2]|0)+860>>2]*.10000000149011612);g[c[w>>2]>>2]=+g[i>>2]*+g[x>>2]+ +g[i+4>>2]*+g[(c[o>>2]|0)+2128>>2];c[q>>2]=1;while(1){if((c[q>>2]|0)>=(c[(c[t>>2]|0)+4612>>2]|0))break;g[(c[w>>2]|0)+(c[q>>2]<<2)>>2]=+g[i>>2]*+g[x+(c[q>>2]<<2)>>2]+ +g[i+4>>2]*+g[x+((c[q>>2]|0)-1<<2)>>2];c[q>>2]=(c[q>>2]|0)+1}g[(c[o>>2]|0)+2128>>2]=+g[x+((c[(c[t>>2]|0)+4612>>2]|0)-1<<2)>>2];Xg(c[o>>2]|0,c[w>>2]|0,c[w>>2]|0,j,+g[p>>2],+g[n>>2],+g[m>>2],c[s>>2]|0,c[(c[t>>2]|0)+4612>>2]|0);c[v>>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)*.0078125)*.33000001311302185));g[h>>2]=t/+(c[(c[o>>2]|0)+4612>>2]|0);c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[o>>2]|0)+4604>>2]|0))break;g[i>>2]=+g[(c[p>>2]|0)+(c[m>>2]<<2)>>2];g[i>>2]=+B(+(+g[i>>2]*+g[i>>2]+ +g[(c[p>>2]|0)+876+(c[m>>2]<<2)>>2]*+g[h>>2]));g[(c[p>>2]|0)+(c[m>>2]<<2)>>2]=+g[i>>2]<32767.0?+g[i>>2]:32767.0;c[m>>2]=(c[m>>2]|0)+1}c[m>>2]=0;while(1){h=c[p>>2]|0;if((c[m>>2]|0)>=(c[(c[o>>2]|0)+4604>>2]|0))break;c[n+(c[m>>2]<<2)>>2]=~~(+g[h+(c[m>>2]<<2)>>2]*65536.0);c[m>>2]=(c[m>>2]|0)+1}_i(h+892|0,n|0,c[(c[o>>2]|0)+4604>>2]<<2|0)|0;a[(c[p>>2]|0)+908>>0]=a[c[q>>2]>>0]|0;Jd((c[o>>2]|0)+4768|0,n,c[q>>2]|0,(c[k>>2]|0)==2&1,c[(c[o>>2]|0)+4604>>2]|0);c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[o>>2]|0)+4604>>2]|0))break;g[(c[p>>2]|0)+(c[m>>2]<<2)>>2]=+(c[n+(c[m>>2]<<2)>>2]|0)/65536.0;c[m>>2]=(c[m>>2]|0)+1}if((a[(c[o>>2]|0)+4768+29>>0]|0)==2)a[(c[o>>2]|0)+4768+30>>0]=+g[(c[p>>2]|0)+872>>2]+ +(c[(c[o>>2]|0)+4744>>2]|0)*.000030517578125>1.0?0:1;g[r>>2]=+(b[24558+(a[(c[o>>2]|0)+4768+29>>0]>>1<<2)+(a[(c[o>>2]|0)+4768+30>>0]<<1)>>1]|0)/1024.0;g[(c[p>>2]|0)+852>>2]=+(c[(c[o>>2]|0)+4652>>2]|0)*-.05000000074505806+1.2000000476837158+ +(c[(c[o>>2]|0)+4556>>2]|0)*-.20000000298023224*.00390625+ +g[(c[p>>2]|0)+856>>2]*-.10000000149011612+ +g[(c[p>>2]|0)+860>>2]*-.20000000298023224+ +g[r>>2]*.800000011920929;l=s;return}function Zg(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;g[c>>2]=a;a=1.0/(+K(+-+g[c>>2])+1.0);l=b;return +a}function _g(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;var f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;h=m+16|0;k=m+12|0;j=m+8|0;f=m+4|0;i=m;c[h>>2]=a;c[k>>2]=b;g[j>>2]=d;c[f>>2]=e;c[i>>2]=0;while(1){d=+g[j>>2];if((c[i>>2]|0)>=(c[f>>2]|0))break;b=N(c[i>>2]|0,c[f>>2]|0)|0;b=(c[h>>2]|0)+(b+(c[i>>2]|0)<<2)|0;g[b>>2]=+g[b>>2]+d;c[i>>2]=(c[i>>2]|0)+1}k=c[k>>2]|0;g[k>>2]=+g[k>>2]+d;l=m;return}function $g(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=+e;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;i=t+40|0;q=t+36|0;r=t+32|0;s=t+28|0;h=t+24|0;j=t+20|0;k=t+16|0;m=t+12|0;p=t+8|0;n=t+4|0;o=t;c[i>>2]=a;c[q>>2]=b;c[r>>2]=d;g[s>>2]=e;c[h>>2]=f;g[n>>2]=0.0;g[o>>2]=(+g[c[q>>2]>>2]+ +g[(c[q>>2]|0)+((N(c[h>>2]|0,c[h>>2]|0)|0)-1<<2)>>2])*9.99999993922529e-09;c[m>>2]=0;while(1){if((c[m>>2]|0)>=10)break;g[n>>2]=+g[s>>2];g[p>>2]=0.0;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[h>>2]|0))break;g[p>>2]=+g[p>>2]+ +g[(c[r>>2]|0)+(c[j>>2]<<2)>>2]*+g[(c[i>>2]|0)+(c[j>>2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2]|0)+1}qf(c[f>>2]|0,h,c[e>>2]|0);l=k;return}function hh(a){a=+a;var b=0,c=0;c=l;l=l+16|0;b=c;g[b>>2]=a;b=Ui(+g[b>>2])|0;l=c;return b|0}function ih(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+48|0;j=k+12|0;m=k+8|0;f=k+4|0;i=k;h=k+16|0;c[j>>2]=a;c[m>>2]=d;c[f>>2]=e;Lf(h,c[m>>2]|0,c[f>>2]|0);c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[f>>2]|0))break;g[(c[j>>2]|0)+(c[i>>2]<<2)>>2]=+(b[h+(c[i>>2]<<1)>>1]|0)*.000244140625;c[i>>2]=(c[i>>2]|0)+1}l=k;return}function jh(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;n=l;l=l+96|0;m=n+20|0;h=n+16|0;p=n+12|0;o=n+8|0;j=n+4|0;k=n;i=n+24|0;c[m>>2]=a;c[h>>2]=d;c[p>>2]=e;c[o>>2]=f;Ze(c[m>>2]|0,i,c[p>>2]|0,c[o>>2]|0);c[k>>2]=0;while(1){if((c[k>>2]|0)>=2)break;c[j>>2]=0;while(1){e=c[k>>2]|0;if((c[j>>2]|0)>=(c[(c[m>>2]|0)+4664>>2]|0))break;g[(c[h>>2]|0)+(c[k>>2]<<6)+(c[j>>2]<<2)>>2]=+(b[i+(e<<5)+(c[j>>2]<<1)>>1]|0)*.000244140625;c[j>>2]=(c[j>>2]|0)+1}c[k>>2]=e+1}l=n;return}function kh(d,e,f,h,i,j){d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=l;l=l+1632|0;w=D+1388|0;x=D+1384|0;y=D+1380|0;z=D+1376|0;A=D+1372|0;B=D+1368|0;u=D+1364|0;v=D+1360|0;C=D+80|0;m=D+64|0;s=D+1560|0;p=D+1520|0;q=D+56|0;k=D+1392|0;o=D+40|0;r=D+32|0;t=D+16|0;n=D;c[w>>2]=d;c[x>>2]=e;c[y>>2]=f;c[z>>2]=h;c[A>>2]=i;c[B>>2]=j;c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[(c[w>>2]|0)+4604>>2]|0))break;c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[(c[w>>2]|0)+4660>>2]|0))break;j=(hh(+g[(c[x>>2]|0)+500+((c[u>>2]<<4)+(c[v>>2]|0)<<2)>>2]*8192.0)|0)&65535;b[k+((c[u>>2]<<4)+(c[v>>2]|0)<<1)>>1]=j;c[v>>2]=(c[v>>2]|0)+1}c[u>>2]=(c[u>>2]|0)+1}c[u>>2]=0;while(1){d=c[x>>2]|0;if((c[u>>2]|0)>=(c[(c[w>>2]|0)+4604>>2]|0))break;j=(hh(+g[d+772+(c[u>>2]<<2)>>2]*16384.0)|0)<<16;j=j|(hh(+g[(c[x>>2]|0)+756+(c[u>>2]<<2)>>2]*16384.0)|0)&65535;c[o+(c[u>>2]<<2)>>2]=j;j=hh(+g[(c[x>>2]|0)+820+(c[u>>2]<<2)>>2]*16384.0)|0;c[t+(c[u>>2]<<2)>>2]=j;j=hh(+g[(c[x>>2]|0)+836+(c[u>>2]<<2)>>2]*16384.0)|0;c[n+(c[u>>2]<<2)>>2]=j;c[u>>2]=(c[u>>2]|0)+1}c[r>>2]=hh(+g[d+852>>2]*1024.0)|0;c[u>>2]=0;while(1){if((c[u>>2]|0)>=((c[(c[w>>2]|0)+4604>>2]|0)*5|0))break;j=(hh(+g[(c[x>>2]|0)+144+(c[u>>2]<<2)>>2]*16384.0)|0)&65535;b[p+(c[u>>2]<<1)>>1]=j;c[u>>2]=(c[u>>2]|0)+1}c[v>>2]=0;while(1){j=(c[v>>2]|0)<2;c[u>>2]=0;if(!j)break;while(1){if((c[u>>2]|0)>=(c[(c[w>>2]|0)+4664>>2]|0))break;j=(hh(+g[(c[x>>2]|0)+16+(c[v>>2]<<6)+(c[u>>2]<<2)>>2]*4096.0)|0)&65535;b[s+(c[v>>2]<<5)+(c[u>>2]<<1)>>1]=j;c[u>>2]=(c[u>>2]|0)+1}c[v>>2]=(c[v>>2]|0)+1}while(1){if((c[u>>2]|0)>=(c[(c[w>>2]|0)+4604>>2]|0))break;v=hh(+g[(c[x>>2]|0)+(c[u>>2]<<2)>>2]*65536.0)|0;c[m+(c[u>>2]<<2)>>2]=v;c[u>>2]=(c[u>>2]|0)+1}if((a[(c[y>>2]|0)+29>>0]|0)==2)c[q>>2]=b[24566+(a[(c[y>>2]|0)+33>>0]<<1)>>1];else c[q>>2]=0;c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[(c[w>>2]|0)+4608>>2]|0))break;v=hh(+g[(c[B>>2]|0)+(c[u>>2]<<2)>>2]*8.0)|0;c[C+(c[u>>2]<<2)>>2]=v;c[u>>2]=(c[u>>2]|0)+1}if((c[(c[w>>2]|0)+4652>>2]|0)<=1?(c[(c[w>>2]|0)+4704>>2]|0)<=0:0){Xd(c[w>>2]|0,c[z>>2]|0,c[y>>2]|0,C,c[A>>2]|0,s,p,k,n,t,o,m,(c[x>>2]|0)+228|0,c[r>>2]|0,c[q>>2]|0);l=D;return}be(c[w>>2]|0,c[z>>2]|0,c[y>>2]|0,C,c[A>>2]|0,s,p,k,n,t,o,m,(c[x>>2]|0)+228|0,c[r>>2]|0,c[q>>2]|0);l=D;return}function lh(a,d,e,f,h,i,j,k,m){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;z=l;l=l+480|0;n=z+436|0;s=z+432|0;x=z+428|0;y=z+424|0;p=z+420|0;v=z+416|0;u=z+412|0;w=z+408|0;r=z+404|0;t=z+400|0;o=z+440|0;q=z;c[n>>2]=a;c[s>>2]=d;c[x>>2]=e;c[y>>2]=f;c[p>>2]=h;c[v>>2]=i;c[u>>2]=j;c[w>>2]=k;c[r>>2]=m;c[t>>2]=0;while(1){if((c[t>>2]|0)>=((c[w>>2]|0)*5|0))break;f=(hh(+g[(c[n>>2]|0)+(c[t>>2]<<2)>>2]*16384.0)|0)&65535;b[o+(c[t>>2]<<1)>>1]=f;c[t>>2]=(c[t>>2]|0)+1}c[t>>2]=0;while(1){if((c[t>>2]|0)>=(((c[w>>2]|0)*5|0)*5|0))break;f=hh(+g[(c[p>>2]|0)+(c[t>>2]<<2)>>2]*262144.0)|0;c[q+(c[t>>2]<<2)>>2]=f;c[t>>2]=(c[t>>2]|0)+1}Oe(o,c[s>>2]|0,c[x>>2]|0,c[y>>2]|0,q,c[v>>2]|0,c[u>>2]|0,c[w>>2]|0,c[r>>2]|0);c[t>>2]=0;while(1){if((c[t>>2]|0)>=((c[w>>2]|0)*5|0))break;g[(c[n>>2]|0)+(c[t>>2]<<2)>>2]=+(b[o+(c[t>>2]<<1)>>1]|0)*.00006103515625;c[t>>2]=(c[t>>2]|0)+1}l=z;return}function mh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0,m=0,n=0.0;m=l;l=l+32|0;k=m+16|0;i=m+12|0;j=m+8|0;f=m+4|0;h=m;c[k>>2]=a;c[i>>2]=b;c[j>>2]=d;c[f>>2]=e;if((c[f>>2]|0)>(c[j>>2]|0))c[f>>2]=c[j>>2];c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[f>>2]|0))break;n=+qh(c[i>>2]|0,(c[i>>2]|0)+(c[h>>2]<<2)|0,(c[j>>2]|0)-(c[h>>2]|0)|0);g[(c[k>>2]|0)+(c[h>>2]<<2)>>2]=n;c[h>>2]=(c[h>>2]|0)+1}l=m;return}function nh(a,b,d,e,f,i){a=a|0;b=b|0;d=+d;e=e|0;f=f|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;L=l;l=l+784|0;j=L+768|0;I=L+764|0;v=L+760|0;F=L+756|0;x=L+752|0;s=L+748|0;u=L+744|0;w=L+740|0;E=L+736|0;D=L+732|0;n=L+720|0;t=L+712|0;A=L+704|0;z=L+696|0;y=L+688|0;C=L+680|0;m=L+672|0;G=L+664|0;H=L+656|0;J=L+728|0;q=L+528|0;r=L+400|0;p=L+264|0;o=L+128|0;k=L;c[j>>2]=a;c[I>>2]=b;g[v>>2]=d;c[F>>2]=e;c[x>>2]=f;c[s>>2]=i;h[n>>3]=+ph(c[I>>2]|0,N(c[x>>2]|0,c[F>>2]|0)|0);a=q;f=a+128|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(f|0));c[E>>2]=0;while(1){if((c[E>>2]|0)>=(c[x>>2]|0))break;c[J>>2]=(c[I>>2]|0)+((N(c[E>>2]|0,c[F>>2]|0)|0)<<2);c[w>>2]=1;while(1){if((c[w>>2]|0)>=((c[s>>2]|0)+1|0))break;d=+qh(c[J>>2]|0,(c[J>>2]|0)+(c[w>>2]<<2)|0,(c[F>>2]|0)-(c[w>>2]|0)|0);b=q+((c[w>>2]|0)-1<<3)|0;h[b>>3]=+h[b>>3]+d;c[w>>2]=(c[w>>2]|0)+1}c[E>>2]=(c[E>>2]|0)+1}a=r;i=q;f=a+128|0;do{c[a>>2]=c[i>>2];a=a+4|0;i=i+4|0}while((a|0)<(f|0));d=+h[n>>3]+ +h[n>>3]*9.999999747378752e-06+9.999999717180685e-10;h[p>>3]=d;h[o>>3]=d;h[t>>3]=1.0;c[D>>2]=0;c[w>>2]=0;while(1){if((c[w>>2]|0)>=(c[s>>2]|0))break;c[E>>2]=0;while(1){if((c[E>>2]|0)>=(c[x>>2]|0))break;c[J>>2]=(c[I>>2]|0)+((N(c[E>>2]|0,c[F>>2]|0)|0)<<2);h[G>>3]=+g[(c[J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(c[D>>2]|0){K=33;break}c[u>>2]=0;while(1){if((c[u>>2]|0)>((c[w>>2]|0)+1|0))break;h[G>>3]=+h[p+(c[u>>2]<<3)>>3];b=p+(c[u>>2]<<3)|0;h[b>>3]=+h[b>>3]+ +h[C>>3]*+h[o+((c[w>>2]|0)-(c[u>>2]|0)+1<<3)>>3];b=o+((c[w>>2]|0)-(c[u>>2]|0)+1<<3)|0;h[b>>3]=+h[b>>3]+ +h[C>>3]*+h[G>>3];c[u>>2]=(c[u>>2]|0)+1}c[w>>2]=(c[w>>2]|0)+1}a:do if((K|0)==33){c[u>>2]=(c[w>>2]|0)+1;while(1){if((c[u>>2]|0)>=(c[s>>2]|0))break a;h[k+(c[u>>2]<<3)>>3]=0.0;c[u>>2]=(c[u>>2]|0)+1}}while(0);if(!(c[D>>2]|0)){h[z>>3]=+h[p>>3];h[G>>3]=1.0;c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[s>>2]|0))break;h[m>>3]=+h[k+(c[u>>2]<<3)>>3];h[z>>3]=+h[z>>3]+ +h[p+((c[u>>2]|0)+1<<3)>>3]*+h[m>>3];h[G>>3]=+h[G>>3]+ +h[m>>3]*+h[m>>3];g[(c[j>>2]|0)+(c[u>>2]<<2)>>2]=-+h[m>>3];c[u>>2]=(c[u>>2]|0)+1}h[z>>3]=+h[z>>3]-+h[n>>3]*9.999999747378752e-06*+h[G>>3];d=+h[z>>3];l=L;return +d}c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[s>>2]|0))break;g[(c[j>>2]|0)+(c[u>>2]<<2)>>2]=-+h[k+(c[u>>2]<<3)>>3];c[u>>2]=(c[u>>2]|0)+1}c[E>>2]=0;while(1){if((c[E>>2]|0)>=(c[x>>2]|0))break;K=(c[I>>2]|0)+((N(c[E>>2]|0,c[F>>2]|0)|0)<<2)|0;d=+ph(K,c[s>>2]|0);h[n>>3]=+h[n>>3]-d;c[E>>2]=(c[E>>2]|0)+1}h[z>>3]=+h[n>>3]*+h[t>>3];d=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k;return +(+h[j>>3])}function qh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;e=n+24|0;f=n+20|0;i=n+16|0;k=n+12|0;j=n+8|0;m=n;c[e>>2]=a;c[f>>2]=b;c[i>>2]=d;h[m>>3]=0.0;c[j>>2]=c[i>>2]&65532;c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[j>>2]|0))break;h[m>>3]=+h[m>>3]+(+g[(c[e>>2]|0)+((c[k>>2]|0)+0<<2)>>2]*+g[(c[f>>2]|0)+((c[k>>2]|0)+0<<2)>>2]+ +g[(c[e>>2]|0)+((c[k>>2]|0)+1<<2)>>2]*+g[(c[f>>2]|0)+((c[k>>2]|0)+1<<2)>>2]+ +g[(c[e>>2]|0)+((c[k>>2]|0)+2<<2)>>2]*+g[(c[f>>2]|0)+((c[k>>2]|0)+2<<2)>>2]+ +g[(c[e>>2]|0)+((c[k>>2]|0)+3<<2)>>2]*+g[(c[f>>2]|0)+((c[k>>2]|0)+3<<2)>>2]);c[k>>2]=(c[k>>2]|0)+4}while(1){if((c[k>>2]|0)>=(c[i>>2]|0))break;h[m>>3]=+h[m>>3]+ +g[(c[e>>2]|0)+(c[k>>2]<<2)>>2]*+g[(c[f>>2]|0)+(c[k>>2]<<2)>>2];c[k>>2]=(c[k>>2]|0)+1}l=n;return +(+h[m>>3])}function rh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+96|0;e=m+80|0;k=m+76|0;j=m+72|0;h=m+68|0;i=m+64|0;f=m;c[e>>2]=a;c[k>>2]=b;c[j>>2]=d;c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[j>>2]|0))break;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[h>>2]|0))break;g[f+(c[i>>2]<<2)>>2]=+g[(c[e>>2]|0)+(c[i>>2]<<2)>>2];c[i>>2]=(c[i>>2]|0)+1}c[i>>2]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h[n>>3];c[e>>2]=c[d>>2];c[d>>2]=f+((c[j>>2]&1)<<6);c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[j>>2]|0))break;g[(c[d>>2]|0)+(c[k>>2]<<2)>>2]=(+g[(c[e>>2]|0)+(c[k>>2]<<2)>>2]-+g[(c[e>>2]|0)+((c[j>>2]|0)-(c[k>>2]|0)-1<<2)>>2]*+h[m>>3])*+h[o>>3];c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=(c[j>>2]|0)+-1}if((q|0)==4){g[p>>2]=0.0;u=+g[p>>2];l=r;return +u}h[m>>3]=-+g[a>>2];if(+h[m>>3]>.9998999834060669|+h[m>>3]<-.9998999834060669){g[p>>2]=0.0;u=+g[p>>2];l=r;return +u}else{h[n>>3]=1.0-+h[m>>3]*+h[m>>3];h[i>>3]=+h[i>>3]*+h[n>>3];g[p>>2]=+h[i>>3];u=+g[p>>2];l=r;return +u}return 0.0}function uh(d,e,f,i,j,k,m,n,o,p,q,r){d=d|0;e=e|0;f=f|0;i=i|0;j=j|0;k=k|0;m=+m;n=+n;o=o|0;p=p|0;q=q|0;r=r|0;var s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0;La=l;l=l+13936|0;Ka=La+10416|0;pa=La+10412|0;Ja=La+10408|0;Ha=La+10404|0;Fa=La+10400|0;S=La+10396|0;$=La+10392|0;E=La+10388|0;ba=La+10384|0;ya=La+10380|0;ga=La+10376|0;Ia=La+10372|0;fa=La+10368|0;X=La+10364|0;Ga=La+10360|0;ka=La+10356|0;qa=La+10352|0;H=La+9072|0;x=La+8432|0;y=La+13288|0;w=La+12968|0;t=La+8408|0;K=La+8404|0;ha=La+8400|0;M=La+6016|0;G=La+5756|0;P=La+5712|0;xa=La+5708|0;T=La+5704|0;ia=La+24|0;D=La+16|0;na=La+8|0;oa=La;V=La+5608|0;U=La+12664|0;_=La+5600|0;Z=La+5596|0;s=La+5592|0;da=La+5588|0;Q=La+5584|0;R=La+5580|0;ea=La+5576|0;Ca=La+5572|0;O=La+5568|0;za=La+5564|0;wa=La+5560|0;la=La+5556|0;Aa=La+5552|0;Ea=La+5548|0;Y=La+5544|0;aa=La+5540|0;W=La+5536|0;ma=La+2816|0;ja=La+96|0;ra=La+88|0;z=La+84|0;B=La+80|0;A=La+76|0;va=La+72|0;ca=La+68|0;F=La+64|0;Ba=La+60|0;ta=La+56|0;J=La+52|0;sa=La+48|0;I=La+44|0;C=La+40|0;ua=La+36|0;Da=La+32|0;v=La+11384|0;u=La+10424|0;c[pa>>2]=d;c[Ja>>2]=e;c[Ha>>2]=f;c[Fa>>2]=i;c[S>>2]=j;c[$>>2]=k;g[E>>2]=m;g[ba>>2]=n;c[ya>>2]=o;c[ga>>2]=p;c[Ia>>2]=q;c[fa>>2]=r;c[z>>2]=N(20+((c[Ia>>2]|0)*5|0)|0,c[ya>>2]|0)|0;c[A>>2]=20+((c[Ia>>2]|0)*5|0)<<2;c[B>>2]=20+((c[Ia>>2]|0)*5|0)<<3;c[va>>2]=(c[ya>>2]|0)*5;c[F>>2]=20;c[ca>>2]=40;c[Ba>>2]=c[ya>>2]<<1;c[J>>2]=8;c[ta>>2]=16;c[sa>>2]=((c[ya>>2]|0)*18|0)-1;c[C>>2]=72;c[I>>2]=143;do if((c[ya>>2]|0)!=16)if((c[ya>>2]|0)==12){vh(u,c[pa>>2]|0,c[z>>2]|0);c[t>>2]=0;c[t+4>>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c[xa>>2]|0,c[ca>>2]|0);if(+h[ia>>3]>0.0){h[na>>3]=+ph(c[T>>2]|0,c[ca>>2]|0);m=+h[ia>>3]*2.0/(+h[na>>3]+ +h[oa>>3]);s=M+((c[Ga>>2]|0)*596|0)+(c[ka>>2]<<2)|0}else{m=0.0;s=M+((c[Ga>>2]|0)*596|0)+(c[ka>>2]<<2)|0}g[s>>2]=m;c[qa>>2]=(c[qa>>2]|0)+1}c[xa>>2]=(c[xa>>2]|0)+(c[ca>>2]<<2);c[Ga>>2]=(c[Ga>>2]|0)+1}g[da>>2]=0.0;g[Q>>2]=-1.0e3;c[Ca>>2]=0;c[za>>2]=-1;if((c[$>>2]|0)>0){if((c[ya>>2]|0)!=12){if((c[ya>>2]|0)==16)c[$>>2]=c[$>>2]>>1}else c[$>>2]=(c[$>>2]<<1|0)/3|0;g[aa>>2]=+xh(+(c[$>>2]|0))}else g[aa>>2]=0.0;do if((c[Ia>>2]|0)==4){c[Ea>>2]=11;c[Da>>2]=30282;if((c[ya>>2]|0)==8&(c[ga>>2]|0)>0){c[ua>>2]=11;break}else{c[ua>>2]=3;break}}else{c[Ea>>2]=3;c[Da>>2]=30248;c[ua>>2]=3}while(0);c[Ga>>2]=0;while(1){if((c[Ga>>2]|0)>=(c[_>>2]|0))break;c[ka>>2]=c[V+(c[Ga>>2]<<2)>>2];c[qa>>2]=0;while(1){if((c[qa>>2]|0)>=(c[ua>>2]|0))break;g[P+(c[qa>>2]<<2)>>2]=0.0;c[X>>2]=0;while(1){if((c[X>>2]|0)>=(c[Ia>>2]|0))break;Z=N(c[X>>2]|0,c[Ea>>2]|0)|0;ca=P+(c[qa>>2]<<2)|0;g[ca>>2]=+g[ca>>2]+ +g[M+((c[X>>2]|0)*596|0)+((c[ka>>2]|0)+(a[(c[Da>>2]|0)+(Z+(c[qa>>2]|0))>>0]|0)<<2)>>2];c[X>>2]=(c[X>>2]|0)+1}c[qa>>2]=(c[qa>>2]|0)+1}g[ea>>2]=-1.0e3;c[O>>2]=0;c[X>>2]=0;while(1){if((c[X>>2]|0)>=(c[ua>>2]|0))break;if(+g[P+(c[X>>2]<<2)>>2]>+g[ea>>2]){g[ea>>2]=+g[P+(c[X>>2]<<2)>>2];c[O>>2]=c[X>>2]}c[X>>2]=(c[X>>2]|0)+1}g[Y>>2]=+xh(+(c[ka>>2]|0));g[R>>2]=+g[ea>>2]-+(c[Ia>>2]|0)*.20000000298023224*+g[Y>>2];if((c[$>>2]|0)>0){g[W>>2]=+g[Y>>2]-+g[aa>>2];g[W>>2]=+g[W>>2]*+g[W>>2];g[R>>2]=+g[R>>2]-+(c[Ia>>2]|0)*.20000000298023224*+g[c[S>>2]>>2]*+g[W>>2]/(+g[W>>2]+.5)}if(+g[R>>2]>+g[Q>>2]?+g[ea>>2]>+(c[Ia>>2]|0)*+g[ba>>2]:0){g[Q>>2]=+g[R>>2];g[da>>2]=+g[ea>>2];c[za>>2]=c[ka>>2];c[Ca>>2]=c[O>>2]}c[Ga>>2]=(c[Ga>>2]|0)+1}if((c[za>>2]|0)==-1){Ja=c[Ja>>2]|0;c[Ja>>2]=0;c[Ja+4>>2]=0;c[Ja+8>>2]=0;c[Ja+12>>2]=0;g[c[S>>2]>>2]=0.0;b[c[Ha>>2]>>1]=0;a[c[Fa>>2]>>0]=0;c[Ka>>2]=1;Ka=c[Ka>>2]|0;l=La;return Ka|0}g[c[S>>2]>>2]=+g[da>>2]/+(c[Ia>>2]|0);if((c[ya>>2]|0)>8){s=c[za>>2]|0;if((c[ya>>2]|0)==12)c[za>>2]=(((s&65535)<<16>>16)*3>>1)+(((c[za>>2]&65535)<<16>>16)*3&1);else c[za>>2]=s<<1;s=c[za>>2]|0;do if((c[Ba>>2]|0)>(c[sa>>2]|0))if((s|0)>(c[Ba>>2]|0)){s=c[Ba>>2]|0;break}else{s=(c[za>>2]|0)<(c[sa>>2]|0)?c[sa>>2]|0:c[za>>2]|0;break}else if((s|0)>(c[sa>>2]|0)){s=c[sa>>2]|0;break}else{s=(c[za>>2]|0)<(c[Ba>>2]|0)?c[Ba>>2]|0:c[za>>2]|0;break}while(0);c[za>>2]=s;c[wa>>2]=yh((c[za>>2]|0)-2|0,c[Ba>>2]|0)|0;c[la>>2]=zh((c[za>>2]|0)+2|0,c[sa>>2]|0)|0;c[Aa>>2]=c[za>>2];c[Ca>>2]=0;g[da>>2]=-1.0e3;Ah(ja,c[pa>>2]|0,c[wa>>2]|0,c[va>>2]|0,c[Ia>>2]|0,c[ga>>2]|0,c[fa>>2]|0);Bh(ma,c[pa>>2]|0,c[wa>>2]|0,c[va>>2]|0,c[Ia>>2]|0,c[ga>>2]|0);c[ra>>2]=0;g[ha>>2]=.05000000074505806/+(c[za>>2]|0);if((c[Ia>>2]|0)==4){c[ua>>2]=a[30486+(c[ga>>2]|0)>>0];c[Ea>>2]=34;c[Da>>2]=30326}else{c[ua>>2]=12;c[Ea>>2]=12;c[Da>>2]=30254}c[xa>>2]=(c[pa>>2]|0)+((c[ya>>2]|0)*20<<2);h[oa>>3]=+ph(c[xa>>2]|0,N(c[Ia>>2]|0,c[va>>2]|0)|0)+1.0;c[ka>>2]=c[wa>>2];while(1){if((c[ka>>2]|0)>(c[la>>2]|0))break;c[qa>>2]=0;while(1){if((c[qa>>2]|0)>=(c[ua>>2]|0))break;h[ia>>3]=0.0;h[na>>3]=+h[oa>>3];c[Ga>>2]=0;while(1){if((c[Ga>>2]|0)>=(c[Ia>>2]|0))break;h[ia>>3]=+h[ia>>3]+ +g[ja+((c[Ga>>2]|0)*680|0)+((c[qa>>2]|0)*20|0)+(c[ra>>2]<<2)>>2];h[na>>3]=+h[na>>3]+ +g[ma+((c[Ga>>2]|0)*680|0)+((c[qa>>2]|0)*20|0)+(c[ra>>2]<<2)>>2];c[Ga>>2]=(c[Ga>>2]|0)+1}if(+h[ia>>3]>0.0){g[ea>>2]=+h[ia>>3]*2.0/+h[na>>3];g[ea>>2]=+g[ea>>2]*(1.0-+g[ha>>2]*+(c[qa>>2]|0))}else g[ea>>2]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=s+(a[(c[Da>>2]|0)+(Ba+(c[Ca>>2]|0))>>0]|0);s=c[(c[Ja>>2]|0)+(c[Ga>>2]<<2)>>2]|0;do if((c[ta>>2]|0)>144){if((s|0)>(c[ta>>2]|0)){s=c[ta>>2]|0;break}if((c[(c[Ja>>2]|0)+(c[Ga>>2]<<2)>>2]|0)<144)s=144;else s=c[(c[Ja>>2]|0)+(c[Ga>>2]<<2)>>2]|0}else if((s|0)<=144)if((c[(c[Ja>>2]|0)+(c[Ga>>2]<<2)>>2]|0)<(c[ta>>2]|0)){s=c[ta>>2]|0;break}else{s=c[(c[Ja>>2]|0)+(c[Ga>>2]<<2)>>2]|0;break}else s=144;while(0);c[(c[Ja>>2]|0)+(c[Ga>>2]<<2)>>2]=s;c[Ga>>2]=(c[Ga>>2]|0)+1}b[c[Ha>>2]>>1]=s-(c[ta>>2]|0);a[c[Fa>>2]>>0]=c[Ca>>2]}c[Ka>>2]=0;Ka=c[Ka>>2]|0;l=La;return Ka|0}function vh(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;i=j+12|0;f=j+8|0;k=j+4|0;h=j;c[i>>2]=a;c[f>>2]=d;c[k>>2]=e;c[h>>2]=(c[k>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;if((Ui(+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2])|0)<=32767)if((Ui(+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2])|0)<-32768)d=-32768;else d=Ui(+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2])|0;else d=32767;b[(c[i>>2]|0)+(c[h>>2]<<1)>>1]=d;c[h>>2]=(c[h>>2]|0)+-1}l=j;return}function wh(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;i=j+12|0;f=j+8|0;k=j+4|0;h=j;c[i>>2]=a;c[f>>2]=d;c[k>>2]=e;c[h>>2]=(c[k>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]=+(b[(c[f>>2]|0)+(c[h>>2]<<1)>>1]|0);c[h>>2]=(c[h>>2]|0)+-1}l=j;return}function xh(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;h[c>>3]=a;a=+Ti(+h[c>>3])*3.32192809488736;l=b;return +a}function yh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function zh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Ah(b,d,e,f,h,i,j){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;H=l;l=l+256|0;q=H+252|0;s=H+248|0;E=H+244|0;D=H+240|0;B=H+236|0;p=H+232|0;n=H+228|0;F=H+224|0;t=H+220|0;v=H+216|0;w=H+212|0;x=H+208|0;z=H+204|0;y=H+200|0;A=H+196|0;r=H+192|0;u=H+188|0;o=H+184|0;C=H+96|0;G=H+8|0;m=H+4|0;k=H;c[q>>2]=b;c[s>>2]=d;c[E>>2]=e;c[D>>2]=f;c[B>>2]=h;c[p>>2]=i;c[n>>2]=j;if((c[B>>2]|0)==4){c[m>>2]=30462+(c[p>>2]<<3);c[k>>2]=30326;c[A>>2]=a[30486+(c[p>>2]|0)>>0];c[o>>2]=34}else{c[m>>2]=30278;c[k>>2]=30254;c[A>>2]=12;c[o>>2]=12}c[F>>2]=(c[s>>2]|0)+(c[D>>2]<<2<<2);c[w>>2]=0;while(1){if((c[w>>2]|0)>=(c[B>>2]|0))break;c[x>>2]=0;c[z>>2]=a[(c[m>>2]|0)+((c[w>>2]<<1)+0)>>0];c[y>>2]=a[(c[m>>2]|0)+((c[w>>2]<<1)+1)>>0];vc(c[F>>2]|0,(c[F>>2]|0)+(0-(c[E>>2]|0)<<2)+(0-(c[y>>2]|0)<<2)|0,G,c[D>>2]|0,(c[y>>2]|0)-(c[z>>2]|0)+1|0,c[n>>2]|0);c[v>>2]=c[z>>2];while(1){if((c[v>>2]|0)>(c[y>>2]|0))break;g[C+(c[x>>2]<<2)>>2]=+g[G+((c[y>>2]|0)-(c[v>>2]|0)<<2)>>2];c[x>>2]=(c[x>>2]|0)+1;c[v>>2]=(c[v>>2]|0)+1}c[r>>2]=a[(c[m>>2]|0)+((c[w>>2]<<1)+0)>>0];c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[A>>2]|0))break;e=N(c[w>>2]|0,c[o>>2]|0)|0;c[u>>2]=(a[(c[k>>2]|0)+(e+(c[t>>2]|0))>>0]|0)-(c[r>>2]|0);c[v>>2]=0;while(1){if((c[v>>2]|0)>=5)break;g[(c[q>>2]|0)+((c[w>>2]|0)*680|0)+((c[t>>2]|0)*20|0)+(c[v>>2]<<2)>>2]=+g[C+((c[u>>2]|0)+(c[v>>2]|0)<<2)>>2];c[v>>2]=(c[v>>2]|0)+1}c[t>>2]=(c[t>>2]|0)+1}c[F>>2]=(c[F>>2]|0)+(c[D>>2]<<2);c[w>>2]=(c[w>>2]|0)+1}l=H;return}function Bh(b,d,e,f,i,j){b=b|0;d=d|0;e=e|0;f=f|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;G=l;l=l+176|0;r=G+168|0;t=G+164|0;E=G+160|0;D=G+156|0;B=G+152|0;p=G+148|0;F=G+144|0;n=G+140|0;s=G;x=G+136|0;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=+b;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+16|0;i=k+12|0;f=k+8|0;j=k+4|0;h=k;c[e>>2]=a;g[i>>2]=b;c[f>>2]=d;c[h>>2]=c[f>>2]&65532;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[h>>2]|0))break;d=(c[e>>2]|0)+((c[j>>2]|0)+0<<2)|0;g[d>>2]=+g[d>>2]*+g[i>>2];d=(c[e>>2]|0)+((c[j>>2]|0)+1<<2)|0;g[d>>2]=+g[d>>2]*+g[i>>2];d=(c[e>>2]|0)+((c[j>>2]|0)+2<<2)|0;g[d>>2]=+g[d>>2]*+g[i>>2];d=(c[e>>2]|0)+((c[j>>2]|0)+3<<2)|0;g[d>>2]=+g[d>>2]*+g[i>>2];c[j>>2]=(c[j>>2]|0)+4}while(1){if((c[j>>2]|0)>=(c[f>>2]|0))break;h=(c[e>>2]|0)+(c[j>>2]<<2)|0;g[h>>2]=+g[h>>2]*+g[i>>2];c[j>>2]=(c[j>>2]|0)+1}l=k;return}function Eh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0.0;p=l;l=l+176|0;o=p+168|0;i=p+164|0;m=p+160|0;j=p+156|0;k=p+152|0;e=p+16|0;f=p+8|0;h=p+4|0;n=p;c[o>>2]=a;c[i>>2]=b;c[m>>2]=d;c[j>>2]=0;while(1){if((c[j>>2]|0)>=((c[m>>2]|0)+1|0))break;q=+g[(c[i>>2]|0)+(c[j>>2]<<2)>>2];g[e+(c[j>>2]<<3)+4>>2]=q;g[e+(c[j>>2]<<3)>>2]=q;c[j>>2]=(c[j>>2]|0)+1}c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[m>>2]|0))break;g[n>>2]=-+g[e+((c[j>>2]|0)+1<<3)>>2]/(+g[e+4>>2]>9.999999717180685e-10?+g[e+4>>2]:9.999999717180685e-10);g[(c[o>>2]|0)+(c[j>>2]<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(!(-2.0>f))if(2.0<+g[(c[j>>2]|0)+(c[r>>2]<<2)>>2])f=2.0;else f=+g[(c[j>>2]|0)+(c[r>>2]<<2)>>2];else f=-2.0;g[(c[j>>2]|0)+(c[r>>2]<<2)>>2]=f;c[r>>2]=(c[r>>2]|0)+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[h>>2]|0))break;c[x>>2]=(c[j>>2]|0)+(c[m>>2]<<2);g[k>>2]=+g[(c[o>>2]|0)+(c[m>>2]<<2)>>2];c[r>>2]=0;while(1){if((c[r>>2]|0)>=(c[i>>2]|0))break;f=+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2];if(f*+g[k>>2]>=0.0)break;C=+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2];f=+g[k>>2]*+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2];f=C+f*+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2];g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2]=f;c[r>>2]=(c[r>>2]|0)+1}c[n>>2]=0;g[y>>2]=+g[c[x>>2]>>2];do{c[v>>2]=0;c[r>>2]=c[n>>2];while(1){if((c[r>>2]|0)>=(c[i>>2]|0))break;if(+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2]>1.0)break;if(+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2]<-1.0)break;c[r>>2]=(c[r>>2]|0)+1}if((c[r>>2]|0)==(c[i>>2]|0)){z=23;break}c[u>>2]=c[r>>2];e=c[r>>2]|0;c[q>>2]=e;c[w>>2]=e;g[s>>2]=+A(+(+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2]));while(1){if((c[w>>2]|0)<=0)break;C=+g[(c[x>>2]|0)+((N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>2]/+(c[u>>2]|0);c[r>>2]=c[n>>2];while(1){if((c[r>>2]|0)>=(c[u>>2]|0))break a;g[t>>2]=+g[t>>2]-+g[p>>2];e=(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)|0;g[e>>2]=+g[e>>2]+ +g[t>>2];if(1.0<+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2])f=1.0;else f=+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2];if(!(-1.0>f))if(1.0<+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2])f=1.0;else f=+g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2];else f=-1.0;g[(c[x>>2]|0)+((N(c[r>>2]|0,c[h>>2]|0)|0)<<2)>>2]=f;c[r>>2]=(c[r>>2]|0)+1}}while(0);c[n>>2]=c[q>>2]}while((c[n>>2]|0)!=(c[i>>2]|0));if((z|0)==23){z=0;g[k>>2]=0.0}g[(c[o>>2]|0)+(c[m>>2]<<2)>>2]=+g[k>>2];c[m>>2]=(c[m>>2]|0)+1}l=B;return}function Hh(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;g=i+8|0;h=i+4|0;f=i;c[h>>2]=b;c[f>>2]=e;e=c[h>>2]|0;if((c[h>>2]|0)<252){a[c[f>>2]>>0]=e;c[g>>2]=1;h=c[g>>2]|0;l=i;return h|0}else{a[c[f>>2]>>0]=252+(e&3);a[(c[f>>2]|0)+1>>0]=(c[h>>2]|0)-(d[c[f>>2]>>0]|0)>>2;c[g>>2]=2;h=c[g>>2]|0;l=i;return h|0}return 0}function Ih(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;a=d[c[e>>2]>>0]|0;if((d[c[e>>2]>>0]|0)&128|0){c[g>>2]=a>>3&3;c[g>>2]=(c[f>>2]<>2]|0)/400|0;g=c[g>>2]|0;l=h;return g|0}b=d[c[e>>2]>>0]|0;if((a&96|0)==96){c[g>>2]=(c[f>>2]|0)/((b&8|0?50:100)|0)|0;g=c[g>>2]|0;l=h;return g|0}c[g>>2]=b>>3&3;b=c[f>>2]|0;if((c[g>>2]|0)==3){c[g>>2]=(b*60|0)/1e3|0;g=c[g>>2]|0;l=h;return g|0}else{c[g>>2]=(b<>2]|0)/100|0;g=c[g>>2]|0;l=h;return g|0}return 0}function Jh(e,f,g,h,i,j,k,m){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=l;l=l+80|0;D=J+72|0;r=J+68|0;x=J+64|0;E=J+60|0;y=J+56|0;t=J+52|0;F=J+48|0;C=J+44|0;A=J+40|0;v=J+36|0;n=J+32|0;q=J+28|0;o=J+24|0;p=J+77|0;H=J+76|0;u=J+20|0;w=J+16|0;B=J+12|0;s=J+8|0;z=J+4|0;G=J;c[r>>2]=e;c[x>>2]=f;c[E>>2]=g;c[y>>2]=h;c[t>>2]=i;c[F>>2]=j;c[C>>2]=k;c[A>>2]=m;c[B>>2]=0;c[s>>2]=c[r>>2];if(!(c[F>>2]|0)){c[D>>2]=-1;I=c[D>>2]|0;l=J;return I|0}c[u>>2]=Ih(c[r>>2]|0,48e3)|0;c[o>>2]=0;j=c[r>>2]|0;c[r>>2]=j+1;a[H>>0]=a[j>>0]|0;c[x>>2]=(c[x>>2]|0)+-1;c[w>>2]=c[x>>2];a:do switch(d[H>>0]&3|0){case 0:{c[q>>2]=1;break}case 1:{c[q>>2]=2;c[o>>2]=1;if(!(c[E>>2]|0)){if(!(c[x>>2]&1)){c[w>>2]=(c[x>>2]|0)/2|0;b[c[F>>2]>>1]=c[w>>2];break a}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}break}case 2:{c[q>>2]=2;c[n>>2]=Kh(c[r>>2]|0,c[x>>2]|0,c[F>>2]|0)|0;c[x>>2]=(c[x>>2]|0)-(c[n>>2]|0);if((b[c[F>>2]>>1]|0)>=0?(b[c[F>>2]>>1]|0)<=(c[x>>2]|0):0){c[r>>2]=(c[r>>2]|0)+(c[n>>2]|0);c[w>>2]=(c[x>>2]|0)-(b[c[F>>2]>>1]|0);break a}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}default:{if((c[x>>2]|0)<1){c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}j=c[r>>2]|0;c[r>>2]=j+1;a[p>>0]=a[j>>0]|0;c[q>>2]=d[p>>0]&63;if((c[q>>2]|0)>0?(N(c[u>>2]|0,c[q>>2]|0)|0)<=5760:0){c[x>>2]=(c[x>>2]|0)+-1;b:do if(d[p>>0]&64|0){while(1){if((c[x>>2]|0)<=0)break;j=c[r>>2]|0;c[r>>2]=j+1;c[z>>2]=d[j>>0];c[x>>2]=(c[x>>2]|0)+-1;c[G>>2]=(c[z>>2]|0)==255?254:c[z>>2]|0;c[x>>2]=(c[x>>2]|0)-(c[G>>2]|0);c[B>>2]=(c[B>>2]|0)+(c[G>>2]|0);if((c[z>>2]|0)!=255)break b}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}while(0);if((c[x>>2]|0)<0){c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}c[o>>2]=((d[p>>0]&128|0)!=0^1)&1;if(c[o>>2]|0){if(c[E>>2]|0)break a;c[w>>2]=(c[x>>2]|0)/(c[q>>2]|0)|0;I=N(c[w>>2]|0,c[q>>2]|0)|0;if((I|0)!=(c[x>>2]|0)){c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}c[v>>2]=0;while(1){if((c[v>>2]|0)>=((c[q>>2]|0)-1|0))break a;b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]=c[w>>2];c[v>>2]=(c[v>>2]|0)+1}}c[w>>2]=c[x>>2];c[v>>2]=0;while(1){if((c[v>>2]|0)>=((c[q>>2]|0)-1|0))break;c[n>>2]=Kh(c[r>>2]|0,c[x>>2]|0,(c[F>>2]|0)+(c[v>>2]<<1)|0)|0;c[x>>2]=(c[x>>2]|0)-(c[n>>2]|0);if((b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]|0)<0){I=29;break}if((b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]|0)>(c[x>>2]|0)){I=29;break}c[r>>2]=(c[r>>2]|0)+(c[n>>2]|0);c[w>>2]=(c[w>>2]|0)-((c[n>>2]|0)+(b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]|0));c[v>>2]=(c[v>>2]|0)+1}if((I|0)==29){c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}if((c[w>>2]|0)>=0)break a;c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}}while(0);c:do if(c[E>>2]|0){c[n>>2]=Kh(c[r>>2]|0,c[x>>2]|0,(c[F>>2]|0)+(c[q>>2]<<1)+-2|0)|0;c[x>>2]=(c[x>>2]|0)-(c[n>>2]|0);if((b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0)>=0?(b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0)<=(c[x>>2]|0):0){c[r>>2]=(c[r>>2]|0)+(c[n>>2]|0);if(!(c[o>>2]|0)){if(((c[n>>2]|0)+(b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0)|0)<=(c[w>>2]|0))break;c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}I=N(b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0,c[q>>2]|0)|0;if((I|0)>(c[x>>2]|0)){c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}c[v>>2]=0;while(1){if((c[v>>2]|0)>=((c[q>>2]|0)-1|0))break c;b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]=b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0;c[v>>2]=(c[v>>2]|0)+1}}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}else{if((c[w>>2]|0)<=1275){b[(c[F>>2]|0)+((c[q>>2]|0)-1<<1)>>1]=c[w>>2];break}c[D>>2]=-4;I=c[D>>2]|0;l=J;return I|0}while(0);if(c[C>>2]|0)c[c[C>>2]>>2]=(c[r>>2]|0)-(c[s>>2]|0);c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[q>>2]|0))break;if(c[t>>2]|0)c[(c[t>>2]|0)+(c[v>>2]<<2)>>2]=c[r>>2];c[r>>2]=(c[r>>2]|0)+(b[(c[F>>2]|0)+(c[v>>2]<<1)>>1]|0);c[v>>2]=(c[v>>2]|0)+1}if(c[A>>2]|0)c[c[A>>2]>>2]=(c[B>>2]|0)+((c[r>>2]|0)-(c[s>>2]|0));if(c[y>>2]|0)a[c[y>>2]>>0]=a[H>>0]|0;c[D>>2]=c[q>>2];I=c[D>>2]|0;l=J;return I|0}function Kh(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;i=k+12|0;g=k+8|0;h=k+4|0;j=k;c[g>>2]=a;c[h>>2]=e;c[j>>2]=f;if((c[h>>2]|0)<1){b[c[j>>2]>>1]=-1;c[i>>2]=-1;j=c[i>>2]|0;l=k;return j|0}if((d[c[g>>2]>>0]|0|0)<252){b[c[j>>2]>>1]=d[c[g>>2]>>0]|0;c[i>>2]=1;j=c[i>>2]|0;l=k;return j|0}if((c[h>>2]|0)<2){b[c[j>>2]>>1]=-1;c[i>>2]=-1;j=c[i>>2]|0;l=k;return j|0}else{b[c[j>>2]>>1]=((d[(c[g>>2]|0)+1>>0]|0)<<2)+(d[c[g>>2]>>0]|0);c[i>>2]=2;j=c[i>>2]|0;l=k;return j|0}return 0}function Lh(a){a=a|0;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>2]=k;c[E>>2]=m;if((c[p>>2]|0)<0|(c[p>>2]|0)>1){c[K>>2]=-1;M=c[K>>2]|0;l=O;return M|0}if((c[p>>2]|0)!=0|(c[s>>2]|0)==0|(c[o>>2]|0)==0?(c[G>>2]|0)%((c[(c[L>>2]|0)+12>>2]|0)/400|0|0)|0|0:0){c[K>>2]=-1;M=c[K>>2]|0;l=O;return M|0}if((c[s>>2]|0)==0|(c[o>>2]|0)==0){c[I>>2]=0;while(1){n=(c[H>>2]|0)+((N(c[I>>2]|0,c[(c[L>>2]|0)+8>>2]|0)|0)<<2)|0;c[J>>2]=Qh(c[L>>2]|0,0,0,n,(c[G>>2]|0)-(c[I>>2]|0)|0,0)|0;n=c[J>>2]|0;if((c[J>>2]|0)<0){M=9;break}c[I>>2]=(c[I>>2]|0)+n;if((c[I>>2]|0)>=(c[G>>2]|0)){M=11;break}}if((M|0)==9){c[K>>2]=n;M=c[K>>2]|0;l=O;return M|0}else if((M|0)==11){Rh()|0;c[(c[L>>2]|0)+72>>2]=c[I>>2];c[K>>2]=c[I>>2];M=c[K>>2]|0;l=O;return M|0}}if((c[s>>2]|0)<0){c[K>>2]=-1;M=c[K>>2]|0;l=O;return M|0}c[x>>2]=Sh(c[o>>2]|0)|0;c[v>>2]=Th(c[o>>2]|0)|0;c[w>>2]=Ih(c[o>>2]|0,c[(c[L>>2]|0)+12>>2]|0)|0;c[z>>2]=Uh(c[o>>2]|0)|0;c[n>>2]=Jh(c[o>>2]|0,c[s>>2]|0,c[C>>2]|0,F,0,D,u,c[y>>2]|0)|0;if((c[n>>2]|0)<0){c[K>>2]=c[n>>2];M=c[K>>2]|0;l=O;return M|0}c[o>>2]=(c[o>>2]|0)+(c[u>>2]|0);if(c[p>>2]|0){if(!((c[x>>2]|0)==1002?1:(c[G>>2]|0)<(c[w>>2]|0))?(c[(c[L>>2]|0)+56>>2]|0)!=1002:0){c[q>>2]=c[(c[L>>2]|0)+72>>2];if((c[G>>2]|0)-(c[w>>2]|0)|0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2]=(c[o>>2]|0)+(b[D+(c[r>>2]<<1)>>1]|0);c[t>>2]=(c[t>>2]|0)+(c[B>>2]|0);c[r>>2]=(c[r>>2]|0)+1}if((M|0)==31){c[K>>2]=c[B>>2];M=c[K>>2]|0;l=O;return M|0}c[(c[L>>2]|0)+72>>2]=c[t>>2];Rh()|0;if(c[E>>2]|0)Gh(c[H>>2]|0,c[t>>2]|0,c[(c[L>>2]|0)+8>>2]|0,(c[L>>2]|0)+76|0);else{g[(c[L>>2]|0)+76+4>>2]=0.0;g[(c[L>>2]|0)+76>>2]=0.0}c[K>>2]=c[t>>2];M=c[K>>2]|0;l=O;return M|0} +function ca(a){a=a|0;var b=0;b=l;l=l+a|0;l=l+15&-16;return b|0}function da(){return l|0}function ea(a){a=a|0;l=a}function fa(a,b){a=a|0;b=b|0;l=a;m=b}function ga(a,b){a=a|0;b=b|0;if(!n){n=a;o=b}}function ha(a){a=a|0;y=a}function ia(){return y|0}function ja(a,b,d,e,f){a=+a;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;n=o+20|0;m=o+16|0;i=o+12|0;h=o+8|0;k=o+4|0;j=o;g[n>>2]=a;c[m>>2]=b;c[i>>2]=d;c[h>>2]=e;c[k>>2]=f;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[h>>2]|0))break;if(+g[n>>2]<+g[(c[m>>2]|0)+(c[j>>2]<<2)>>2])break;c[j>>2]=(c[j>>2]|0)+1}if((c[j>>2]|0)>(c[k>>2]|0)?+g[n>>2]<+g[(c[m>>2]|0)+(c[k>>2]<<2)>>2]+ +g[(c[i>>2]|0)+(c[k>>2]<<2)>>2]:0)c[j>>2]=c[k>>2];if((c[j>>2]|0)>=(c[k>>2]|0)){n=c[j>>2]|0;l=o;return n|0}if(!(+g[n>>2]>+g[(c[m>>2]|0)+((c[k>>2]|0)-1<<2)>>2]-+g[(c[i>>2]|0)+((c[k>>2]|0)-1<<2)>>2])){n=c[j>>2]|0;l=o;return n|0}c[j>>2]=c[k>>2];n=c[j>>2]|0;l=o;return n|0}function ka(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(N(1664525,c[d>>2]|0)|0)+1013904223|0;l=b;return a|0}function la(a,d,e,f,h,i){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0;v=l;l=l+48|0;t=v+40|0;n=v+36|0;o=v+32|0;r=v+28|0;j=v+24|0;k=v+20|0;s=v+16|0;p=v+12|0;m=v+8|0;q=v+4|0;u=v;c[t>>2]=a;c[n>>2]=d;c[o>>2]=e;c[r>>2]=f;c[j>>2]=h;c[k>>2]=i;c[q>>2]=c[(c[t>>2]|0)+32>>2];c[m>>2]=c[(c[t>>2]|0)+44>>2]<>2];c[p>>2]=0;do{c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[r>>2]|0))break;f=N(c[p>>2]|0,c[m>>2]|0)|0;a=N(c[p>>2]|0,c[m>>2]|0)|0;g[u>>2]=+ma((c[n>>2]|0)+(f+(b[(c[q>>2]|0)+(c[s>>2]<<1)>>1]<>2])<<2)|0,(c[n>>2]|0)+(a+(b[(c[q>>2]|0)+(c[s>>2]<<1)>>1]<>2])<<2)|0,(b[(c[q>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0)-(b[(c[q>>2]|0)+(c[s>>2]<<1)>>1]|0)<>2])+1.0000000272452012e-27;w=+B(+(+g[u>>2]));g[(c[o>>2]|0)+((c[s>>2]|0)+(N(c[p>>2]|0,c[(c[t>>2]|0)+8>>2]|0)|0)<<2)>>2]=w;c[s>>2]=(c[s>>2]|0)+1}a=(c[p>>2]|0)+1|0;c[p>>2]=a}while((a|0)<(c[j>>2]|0));l=v;return}function ma(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;i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)+2>>2;do if((c[G>>2]|0)>=80){if((c[G>>2]|0)<256){c[v>>2]=2;break}if((c[G>>2]|0)<384){c[v>>2]=1;break}else{c[v>>2]=0;break}}else c[v>>2]=3;while(0);c[F>>2]=c[v>>2];M=c[F>>2]|0;l=O;return M|0}function sa(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;f=n+24|0;e=n+20|0;j=n+16|0;h=n+12|0;i=n+8|0;k=n+4|0;m=n;c[f>>2]=a;c[e>>2]=b;c[j>>2]=d;c[e>>2]=c[e>>2]>>1;c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[j>>2]|0))break;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[e>>2]|0))break;d=N(c[j>>2]<<1,c[i>>2]|0)|0;g[k>>2]=+g[(c[f>>2]|0)+(d+(c[h>>2]|0)<<2)>>2]*.7071067690849304;d=N(c[j>>2]|0,(c[i>>2]<<1)+1|0)|0;g[m>>2]=+g[(c[f>>2]|0)+(d+(c[h>>2]|0)<<2)>>2]*.7071067690849304;d=N(c[j>>2]<<1,c[i>>2]|0)|0;g[(c[f>>2]|0)+(d+(c[h>>2]|0)<<2)>>2]=+g[k>>2]+ +g[m>>2];d=N(c[j>>2]|0,(c[i>>2]<<1)+1|0)|0;g[(c[f>>2]|0)+(d+(c[h>>2]|0)<<2)>>2]=+g[k>>2]-+g[m>>2];c[i>>2]=(c[i>>2]|0)+1}c[h>>2]=(c[h>>2]|0)+1}l=n;return}function ta(e,f,h,i,j,k,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A){e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;t=t|0;u=u|0;v=v|0;w=w|0;x=x|0;y=y|0;z=z|0;A=A|0;var B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0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p>>2]|0);c[F>>2]=(c[F>>2]|0)+1}c[F>>2]=0;while(1){if((c[F>>2]|0)>=(c[L>>2]|0))break;c[y>>2]=d[25212+(c[y>>2]|0)>>0];sa(c[w>>2]|0,c[t>>2]>>c[F>>2],1<>2]);c[F>>2]=(c[F>>2]|0)+1}c[p>>2]=c[p>>2]<>2];a:do if(c[I>>2]|0){g[K>>2]=+B(+(+(c[t>>2]|0)));c[E>>2]=0;while(1){if((c[E>>2]|0)>=(c[t>>2]|0))break a;g[(c[I>>2]|0)+(c[E>>2]<<2)>>2]=+g[K>>2]*+g[(c[w>>2]|0)+(c[E>>2]<<2)>>2];c[E>>2]=(c[E>>2]|0)+1}}while(0);c[y>>2]=c[y>>2]&(1<>2])-1}c[N>>2]=c[y>>2];P=c[N>>2]|0;l=Q;return P|0}function wa(a,b,d,e,f,h,i,j,k,m,n){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;X=l;l=l+160|0;U=X+156|0;I=X+152|0;F=X+148|0;G=X+144|0;E=X+140|0;A=X+136|0;C=X+132|0;N=X+128|0;D=X+124|0;O=X+120|0;P=X+116|0;J=X+112|0;r=X+108|0;s=X+104|0;K=X+100|0;R=X+96|0;W=X+92|0;H=X+88|0;T=X+84|0;Q=X+80|0;V=X+76|0;z=X+72|0;L=X+68|0;B=X+64|0;u=X+40|0;t=X+36|0;q=X+32|0;p=X+28|0;o=X+24|0;v=X+20|0;x=X+16|0;y=X+12|0;w=X+8|0;S=X+4|0;M=X;c[I>>2]=a;c[F>>2]=b;c[G>>2]=d;c[E>>2]=e;c[A>>2]=f;c[C>>2]=h;c[N>>2]=i;c[D>>2]=j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[j>>2]=(c[j>>2]|0)+-1;c[h>>2]=0;while(1){if((c[h>>2]|0)>=6)break;c[i>>2]=(c[n>>2]|0)+(c[m>>2]|0)+1>>1;f=c[i>>2]|0;if((d[(c[k>>2]|0)+(c[i>>2]|0)>>0]|0)>=(c[j>>2]|0))c[m>>2]=f;else c[n>>2]=f;c[h>>2]=(c[h>>2]|0)+1}if(!(c[n>>2]|0))f=-1;else f=d[(c[k>>2]|0)+(c[n>>2]|0)>>0]|0;if(((c[j>>2]|0)-f|0)<=((d[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0)-(c[j>>2]|0)|0)){c[o>>2]=c[n>>2];s=c[o>>2]|0;l=p;return s|0}else{c[o>>2]=c[m>>2];s=c[o>>2]|0;l=p;return s|0}return 0}function Da(a,e,f,g){a=a|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;j=l;l=l+32|0;m=j+16|0;k=j+12|0;n=j+8|0;i=j+4|0;h=j;c[m>>2]=a;c[k>>2]=e;c[n>>2]=f;c[i>>2]=g;c[n>>2]=(c[n>>2]|0)+1;g=N(c[n>>2]|0,c[(c[m>>2]|0)+8>>2]|0)|0;c[h>>2]=(c[(c[m>>2]|0)+92+8>>2]|0)+(b[(c[(c[m>>2]|0)+92+4>>2]|0)+(g+(c[k>>2]|0)<<1)>>1]|0);if(!(c[i>>2]|0)){n=0;l=j;return n|0}n=(d[(c[h>>2]|0)+(c[i>>2]|0)>>0]|0)+1|0;l=j;return n|0}function Ea(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;a=c[b>>2]|0;if((c[b>>2]|0)<8){b=a;l=d;return b|0}b=8+(a&7)<<(c[b>>2]>>3)-1;l=d;return b|0}function Fa(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;o=l;l=l+32|0;p=o+28|0;i=o+24|0;j=o+20|0;k=o+16|0;q=o+12|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>>2]=+g[t>>2]/+g[s>>2];c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[i>>2]|0))break;g[p>>2]=+g[(c[j>>2]|0)+(c[o>>2]<<2)>>2];g[q>>2]=+g[(c[k>>2]|0)+(c[o>>2]<<2)>>2];g[(c[j>>2]|0)+(c[o>>2]<<2)>>2]=+g[m>>2]*+g[p>>2]+ +g[n>>2]*+g[q>>2];c[o>>2]=(c[o>>2]|0)+1}l=r;return}function Ha(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;h=m+16|0;e=m+12|0;i=m+8|0;k=m+4|0;j=m;c[f>>2]=a;c[h>>2]=b;c[e>>2]=d;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[e>>2]|0))break;g[j>>2]=+g[(c[f>>2]|0)+(c[i>>2]<<2)>>2]*.7071067690849304;g[k>>2]=+g[(c[h>>2]|0)+(c[i>>2]<<2)>>2]*.7071067690849304;g[(c[f>>2]|0)+(c[i>>2]<<2)>>2]=+g[j>>2]+ +g[k>>2];g[(c[h>>2]|0)+(c[i>>2]<<2)>>2]=+g[k>>2]-+g[j>>2];c[i>>2]=(c[i>>2]|0)+1}l=m;return}function Ia(a){a=a|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;g=e+6|0;f=e;d=e+4|0;b[g>>1]=a;c[f>>2]=4096+(N(b[g>>1]|0,b[g>>1]|0)|0)>>13;b[d>>1]=c[f>>2];b[d>>1]=32767-(b[d>>1]|0)+(16384+(N(b[d>>1]|0,((16384+(N(b[d>>1]|0,(8277+(16384+(N(-626,b[d>>1]|0)|0)>>15)&65535)<<16>>16)|0)>>15)+-7651&65535)<<16>>16)|0)>>15);l=e;return 1+(b[d>>1]|0)&65535|0}function Ja(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=l;l=l+16|0;f=d+12|0;e=d+8|0;g=d+4|0;h=d;c[f>>2]=a;c[e>>2]=b;c[g>>2]=32-(Q(c[e>>2]|0)|0);c[h>>2]=32-(Q(c[f>>2]|0)|0);c[e>>2]=c[e>>2]<<15-(c[g>>2]|0);c[f>>2]=c[f>>2]<<15-(c[h>>2]|0);a=((c[h>>2]|0)-(c[g>>2]|0)<<11)+(16384+(N((c[f>>2]&65535)<<16>>16,((16384+(N((c[f>>2]&65535)<<16>>16,-2597)|0)>>15)+7932&65535)<<16>>16)|0)>>15)|0;a=a-(16384+(N((c[e>>2]&65535)<<16>>16,((16384+(N((c[e>>2]&65535)<<16>>16,-2597)|0)>>15)+7932&65535)<<16>>16)|0)>>15)|0;l=d;return a|0}function Ka(a,b,d,e,f){a=a|0;b=b|0;d=+d;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;u=l;l=l+64|0;k=u+60|0;m=u+56|0;q=u+52|0;j=u+48|0;n=u+40|0;v=u+36|0;w=u+32|0;h=u+28|0;i=u+24|0;x=u+20|0;t=u+16|0;p=u+12|0;s=u+8|0;r=u+4|0;o=u;c[k>>2]=a;c[m>>2]=b;g[q>>2]=d;c[j>>2]=e;c[u+44>>2]=f;g[v>>2]=0.0;g[w>>2]=0.0;La(c[m>>2]|0,c[k>>2]|0,c[m>>2]|0,c[j>>2]|0,v,w);g[v>>2]=+g[q>>2]*+g[v>>2];g[x>>2]=+g[q>>2];g[h>>2]=+g[x>>2]*+g[x>>2]+ +g[w>>2]-+g[v>>2]*2.0;g[i>>2]=+g[x>>2]*+g[x>>2]+ +g[w>>2]+ +g[v>>2]*2.0;if(+g[i>>2]<6.000000284984708e-04|+g[h>>2]<6.000000284984708e-04){_i(c[m>>2]|0,c[k>>2]|0,(c[j>>2]<<2)+0|0)|0;l=u;return}g[t>>2]=+g[h>>2];g[p>>2]=1.0/+B(+(+g[t>>2]));g[t>>2]=+g[i>>2];g[s>>2]=1.0/+B(+(+g[t>>2]));c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[j>>2]|0))break;g[o>>2]=+g[q>>2]*+g[(c[k>>2]|0)+(c[n>>2]<<2)>>2];g[r>>2]=+g[(c[m>>2]|0)+(c[n>>2]<<2)>>2];g[(c[k>>2]|0)+(c[n>>2]<<2)>>2]=+g[p>>2]*(+g[o>>2]-+g[r>>2]);g[(c[m>>2]|0)+(c[n>>2]<<2)>>2]=+g[s>>2]*(+g[o>>2]+ +g[r>>2]);c[n>>2]=(c[n>>2]|0)+1}l=u;return}function La(a,b,d,e,f,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;var i=0.0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;m=t+32|0;r=t+28|0;s=t+24|0;j=t+20|0;p=t+16|0;q=t+12|0;k=t+8|0;n=t+4|0;o=t;c[m>>2]=a;c[r>>2]=b;c[s>>2]=d;c[j>>2]=e;c[p>>2]=f;c[q>>2]=h;g[n>>2]=0.0;g[o>>2]=0.0;c[k>>2]=0;while(1){i=+g[n>>2];if((c[k>>2]|0)>=(c[j>>2]|0))break;g[n>>2]=i+ +g[(c[m>>2]|0)+(c[k>>2]<<2)>>2]*+g[(c[r>>2]|0)+(c[k>>2]<<2)>>2];g[o>>2]=+g[o>>2]+ +g[(c[m>>2]|0)+(c[k>>2]<<2)>>2]*+g[(c[s>>2]|0)+(c[k>>2]<<2)>>2];c[k>>2]=(c[k>>2]|0)+1}g[c[p>>2]>>2]=i;g[c[q>>2]>>2]=+g[o>>2];l=t;return}function Ma(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;f=e+4|0;b=e;c[f>>2]=a;a=c[f>>2]|0;a:do if((a|0)<16e3)if((a|0)<12e3){switch(a|0){case 8e3:break;default:{d=7;break a}}c[b>>2]=6;break}else{switch(a|0){case 12e3:break;default:{d=7;break a}}c[b>>2]=4;break}else{if((a|0)<24e3){switch(a|0){case 16e3:break;default:{d=7;break a}}c[b>>2]=3;break}if((a|0)<48e3){switch(a|0){case 24e3:break;default:{d=7;break a}}c[b>>2]=2;break}else{switch(a|0){case 48e3:break;default:{d=7;break a}}c[b>>2]=1;break}}while(0);if((d|0)==7)c[b>>2]=0;l=e;return c[b>>2]|0}function Na(a,b,d,e,f,h,i,j,k,m,n,o){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=+h;i=+i;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;N=l;l=l+112|0;M=N+96|0;G=N+92|0;q=N+88|0;r=N+84|0;p=N+80|0;t=N+76|0;x=N+72|0;D=N+68|0;E=N+64|0;F=N+60|0;C=N+56|0;B=N+48|0;u=N+44|0;v=N+40|0;w=N+36|0;y=N+32|0;z=N+28|0;A=N+24|0;H=N+20|0;I=N+16|0;J=N+12|0;K=N+8|0;L=N+4|0;s=N;c[M>>2]=a;c[G>>2]=b;c[q>>2]=d;c[r>>2]=e;c[p>>2]=f;g[t>>2]=h;g[x>>2]=i;c[D>>2]=j;c[E>>2]=k;c[F>>2]=m;c[C>>2]=n;c[N+52>>2]=o;if(+g[t>>2]==0.0&+g[x>>2]==0.0){if((c[G>>2]|0)==(c[M>>2]|0)){l=N;return}$i(c[M>>2]|0,c[G>>2]|0,(c[p>>2]<<2)+0|0)|0;l=N;return}g[u>>2]=+g[t>>2]*+g[128+((c[D>>2]|0)*12|0)>>2];g[v>>2]=+g[t>>2]*+g[128+((c[D>>2]|0)*12|0)+4>>2];g[w>>2]=+g[t>>2]*+g[128+((c[D>>2]|0)*12|0)+8>>2];g[y>>2]=+g[x>>2]*+g[128+((c[E>>2]|0)*12|0)>>2];g[z>>2]=+g[x>>2]*+g[128+((c[E>>2]|0)*12|0)+4>>2];g[A>>2]=+g[x>>2]*+g[128+((c[E>>2]|0)*12|0)+8>>2];g[I>>2]=+g[(c[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c[p>>2]=(c[p>>2]|0)+1}l=x;return}function Pa(a,e,f,g){a=a|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;n=o+20|0;k=o+16|0;i=o+12|0;h=o+8|0;m=o+4|0;j=o;c[n>>2]=a;c[k>>2]=e;c[i>>2]=f;c[h>>2]=g;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[n>>2]|0)+8>>2]|0))break;c[j>>2]=(b[(c[(c[n>>2]|0)+32>>2]|0)+((c[m>>2]|0)+1<<1)>>1]|0)-(b[(c[(c[n>>2]|0)+32>>2]|0)+(c[m>>2]<<1)>>1]|0)<>2];a=N(c[(c[n>>2]|0)+8>>2]|0,(c[i>>2]<<1)+(c[h>>2]|0)-1|0)|0;a=N((d[(c[(c[n>>2]|0)+92+12>>2]|0)+(a+(c[m>>2]|0))>>0]|0)+64|0,c[h>>2]|0)|0;a=(N(a,c[j>>2]|0)|0)>>2;c[(c[k>>2]|0)+(c[m>>2]<<2)>>2]=a;c[m>>2]=(c[m>>2]|0)+1}l=o;return}function Qa(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;d=e+4|0;b=e;c[b>>2]=a;if((c[b>>2]|0)>0|(c[b>>2]|0)<-7){c[d>>2]=25260;d=c[d>>2]|0;l=e;return d|0}else{c[d>>2]=c[164+(0-(c[b>>2]|0)<<2)>>2];d=c[d>>2]|0;l=e;return d|0}return 0}function Ra(){return 25411}function Sa(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=sc(48e3,960,0)|0;a=Ta(c[e>>2]|0,c[d>>2]|0)|0;l=b;return a|0}function Ta(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;a=204+((N(c[g>>2]|0,c[(c[f>>2]|0)+4>>2]|0)|0)-1<<2)|0;c[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[W>>2]|0;c[e>>2]=W+4;c[Q>>2]=Z;c[w>>2]=c[Q>>2];if((c[w>>2]|0)>=0?(c[w>>2]|0)<(c[(c[c[V>>2]>>2]|0)+8>>2]|0):0){c[(c[V>>2]|0)+32>>2]=c[w>>2];e=40}else e=41;break}case 10012:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[H>>2]=Z;c[o>>2]=c[H>>2];if((c[o>>2]|0)>=1?(c[o>>2]|0)<=(c[(c[c[V>>2]>>2]|0)+8>>2]|0):0){c[(c[V>>2]|0)+36>>2]=c[o>>2];e=40}else e=41;break}case 10002:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[K>>2]=Z;c[t>>2]=c[K>>2];if((c[t>>2]|0)<0|(c[t>>2]|0)>2)e=41;else{c[(c[V>>2]|0)+20>>2]=(c[t>>2]|0)<=1&1;c[(c[V>>2]|0)+12>>2]=(c[t>>2]|0)==0&1;e=40}break}case 4014:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[L>>2]=Z;c[u>>2]=c[L>>2];if((c[u>>2]|0)<0|(c[u>>2]|0)>100)e=41;else{c[(c[V>>2]|0)+56>>2]=c[u>>2];e=40}break}case 4020:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[M>>2]=Z;c[v>>2]=c[M>>2];c[(c[V>>2]|0)+52>>2]=c[v>>2];e=40;break}case 4006:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[O>>2]=Z;c[x>>2]=c[O>>2];c[(c[V>>2]|0)+44>>2]=c[x>>2];e=40;break}case 4002:{U=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[U>>2]|0;c[e>>2]=U+4;c[P>>2]=Z;c[W>>2]=c[P>>2];if((c[W>>2]|0)<=500&(c[W>>2]|0)!=-1)e=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)|0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(N(c[(c[V>>2]|0)+4>>2]|0,c[(c[c[V>>2]>>2]|0)+8>>2]|0)|0))break;g[(c[k>>2]|0)+(c[f>>2]<<2)>>2]=-28.0;g[(c[j>>2]|0)+(c[f>>2]<<2)>>2]=-28.0;c[f>>2]=(c[f>>2]|0)+1}c[(c[V>>2]|0)+172>>2]=0;g[(c[V>>2]|0)+84>>2]=1.0;c[(c[V>>2]|0)+80>>2]=2;c[(c[V>>2]|0)+88>>2]=256;c[(c[V>>2]|0)+96>>2]=0;c[(c[V>>2]|0)+100>>2]=0;e=40;break}case 10016:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[D>>2]=Z;c[n>>2]=c[D>>2];c[(c[V>>2]|0)+48>>2]=c[n>>2];e=40;break}case 10022:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[E>>2]=Z;c[h>>2]=c[E>>2];if(c[h>>2]|0){_i((c[V>>2]|0)+120|0,c[h>>2]|0,28|0)|0;e=40}else e=40;break}case 10015:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[F>>2]=Z;c[p>>2]=c[F>>2];if(!(c[p>>2]|0))e=41;else{c[c[p>>2]>>2]=c[c[V>>2]>>2];e=40}break}case 4031:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[G>>2]=Z;c[q>>2]=c[G>>2];if(!(c[q>>2]|0))e=41;else{c[c[q>>2]>>2]=c[(c[V>>2]|0)+76>>2];e=40}break}case 10024:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[I>>2]=Z;c[r>>2]=c[I>>2];c[(c[V>>2]|0)+68>>2]=c[r>>2];e=40;break}case 10026:{W=(c[e>>2]|0)+(4-1)&~(4-1);Z=c[W>>2]|0;c[e>>2]=W+4;c[J>>2]=Z;c[s>>2]=c[J>>2];c[(c[V>>2]|0)+192>>2]=c[s>>2];e=40;break}default:{c[X>>2]=-5;Z=c[X>>2]|0;l=Y;return Z|0}}while(0);if((e|0)==40){c[X>>2]=0;Z=c[X>>2]|0;l=Y;return Z|0}else if((e|0)==41){c[X>>2]=-1;Z=c[X>>2]|0;l=Y;return Z|0}return 0}function Xa(a,b,d,e,f,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;z=l;l=l+64|0;o=z+52|0;u=z+48|0;q=z+44|0;m=z+40|0;x=z+36|0;A=z+32|0;w=z+28|0;n=z+24|0;t=z+20|0;s=z+16|0;v=z+12|0;r=z+8|0;p=z+4|0;y=z;c[o>>2]=a;c[u>>2]=b;c[q>>2]=d;c[m>>2]=e;c[x>>2]=f;c[A>>2]=h;c[w>>2]=i;c[n>>2]=j;g[s>>2]=+g[c[A>>2]>>2];g[v>>2]=+g[c[w>>2]>>2];if(!(((c[x>>2]|0)==1?+g[(c[A>>2]|0)+4>>2]==0.0:0)^1|(c[n>>2]|0)!=0)){c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[q>>2]|0))break;g[p>>2]=+g[(c[o>>2]|0)+((N(c[m>>2]|0,c[t>>2]|0)|0)<<2)>>2]*32768.0;g[(c[u>>2]|0)+(c[t>>2]<<2)>>2]=+g[p>>2]-+g[v>>2];g[v>>2]=+g[s>>2]*+g[p>>2];c[t>>2]=(c[t>>2]|0)+1}g[c[w>>2]>>2]=+g[v>>2];l=z;return}c[r>>2]=(c[q>>2]|0)/(c[x>>2]|0)|0;if((c[x>>2]|0)!=1)aj(c[u>>2]|0,0,c[q>>2]<<2|0)|0;c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[r>>2]|0))break;k=+g[(c[o>>2]|0)+((N(c[m>>2]|0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-16)|0;a:do if(c[M>>2]|0){bb(c[Ua>>2]|0,0,k,j,c[Ka>>2]|0,c[lb>>2]|0,c[La>>2]|0,c[(c[Bb>>2]|0)+28>>2]|0,c[(c[Bb>>2]|0)+72>>2]|0);la(c[Ua>>2]|0,j,p,c[W>>2]|0,c[Ka>>2]|0,c[La>>2]|0);Tc(c[Ua>>2]|0,c[W>>2]|0,c[nb>>2]|0,p,e,c[Ka>>2]|0);c[ob>>2]=0;while(1){if((c[ob>>2]|0)>=(N(c[Ka>>2]|0,c[pb>>2]|0)|0))break a;z=e+(c[ob>>2]<<2)|0;g[z>>2]=+g[z>>2]+ +(c[La>>2]|0)*.5;c[ob>>2]=(c[ob>>2]|0)+1}}while(0);bb(c[Ua>>2]|0,c[Ya>>2]|0,k,j,c[Ka>>2]|0,c[lb>>2]|0,c[La>>2]|0,c[(c[Bb>>2]|0)+28>>2]|0,c[(c[Bb>>2]|0)+72>>2]|0);if((c[lb>>2]|0)==2&(c[Ka>>2]|0)==1)c[P>>2]=0;la(c[Ua>>2]|0,j,p,c[W>>2]|0,c[Ka>>2]|0,c[La>>2]|0);b:do if(c[(c[Bb>>2]|0)+68>>2]|0){c[ob>>2]=2;while(1){if((c[ob>>2]|0)>=(c[nb>>2]|0))break b;if(+g[p+(c[ob>>2]<<2)>>2]<+g[p>>2]*9.999999747378752e-05)m=+g[p+(c[ob>>2]<<2)>>2];else m=+g[p>>2]*9.999999747378752e-05;g[p+(c[ob>>2]<<2)>>2]=m;if(+g[p+(c[ob>>2]<<2)>>2]>1.0000000036274937e-15)m=+g[p+(c[ob>>2]<<2)>>2];else m=1.0000000036274937e-15;g[p+(c[ob>>2]<<2)>>2]=m;c[ob>>2]=(c[ob>>2]|0)+1}}while(0);Tc(c[Ua>>2]|0,c[W>>2]|0,c[nb>>2]|0,p,o,c[Ka>>2]|0);z=(N(c[Ka>>2]|0,c[pb>>2]|0)|0)<<2;i=l;l=l+((1*z|0)+15&-16)|0;aj(i|0,0,c[nb>>2]<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[H>>2]/+(c[A>>2]|0);g[H>>2]=+g[H>>2]+.20000000298023224;B=N(c[Ka>>2]|0,(c[I>>2]|0)-1|0)|0;B=N(B,(c[I>>2]|0)+1|0)|0;g[G>>2]=+g[G>>2]*6.0/+(N(B,c[I>>2]|0)|0);g[G>>2]=+g[G>>2]*.5;if((+g[G>>2]<.03099999949336052?+g[G>>2]:.03099999949336052)>-.03099999949336052)m=+g[G>>2]<.03099999949336052?+g[G>>2]:.03099999949336052;else m=-.03099999949336052;g[G>>2]=m;c[E>>2]=0;while(1){if((b[(c[ba>>2]|0)+((c[E>>2]|0)+1<<1)>>1]|0)>=((b[(c[ba>>2]|0)+(c[I>>2]<<1)>>1]|0)/2|0|0))break;c[E>>2]=(c[E>>2]|0)+1}c[C>>2]=0;c[ob>>2]=0;while(1){if((c[ob>>2]|0)>=(c[I>>2]|0))break;g[D>>2]=+g[H>>2]+ +g[G>>2]*+((c[ob>>2]|0)-(c[E>>2]|0)|0);m=+g[(c[(c[Bb>>2]|0)+192>>2]|0)+(c[ob>>2]<<2)>>2];if((c[Ka>>2]|0)==2){if(m>+g[(c[(c[Bb>>2]|0)+192>>2]|0)+((c[pb>>2]|0)+(c[ob>>2]|0)<<2)>>2])f=c[ob>>2]|0;else f=(c[pb>>2]|0)+(c[ob>>2]|0)|0;g[F>>2]=+g[(c[(c[Bb>>2]|0)+192>>2]|0)+(f<<2)>>2]}else g[F>>2]=m;g[F>>2]=+g[F>>2]<0.0?+g[F>>2]:0.0;g[F>>2]=+g[F>>2]-+g[D>>2];if(+g[F>>2]>.25){g[i+(c[ob>>2]<<2)>>2]=+g[F>>2]-.25;c[C>>2]=(c[C>>2]|0)+1}c[ob>>2]=(c[ob>>2]|0)+1}c:do if((c[C>>2]|0)>=3){g[H>>2]=+g[H>>2]+.25;if(+g[H>>2]>0.0){g[H>>2]=0.0;g[G>>2]=0.0;aj(i|0,0,c[I>>2]<<2|0)|0;break}c[ob>>2]=0;while(1){if((c[ob>>2]|0)>=(c[I>>2]|0))break c;if(0.0>+g[i+(c[ob>>2]<<2)>>2]-.25)m=0.0;else m=+g[i+(c[ob>>2]<<2)>>2]-.25;g[i+(c[ob>>2]<<2)>>2]=m;c[ob>>2]=(c[ob>>2]|0)+1}}while(0);g[H>>2]=+g[H>>2]+.20000000298023224;g[ga>>2]=+g[G>>2]*64.0;g[pa>>2]=+g[H>>2]}while(0);if(!(c[(c[Bb>>2]|0)+68>>2]|0)){g[J>>2]=-10.0;g[K>>2]=0.0;if(c[Ya>>2]|0)m=+(c[La>>2]|0)*.5;else m=0.0;g[L>>2]=m;c[ob>>2]=c[tb>>2];while(1){if((c[ob>>2]|0)>=(c[nb>>2]|0))break;if(+g[J>>2]-1.0>+g[o+(c[ob>>2]<<2)>>2]-+g[L>>2])m=+g[J>>2]-1.0;else m=+g[o+(c[ob>>2]<<2)>>2]-+g[L>>2];g[J>>2]=m;if((c[Ka>>2]|0)==2){if(+g[J>>2]>+g[o+((c[ob>>2]|0)+(c[pb>>2]|0)<<2)>>2]-+g[L>>2])m=+g[J>>2];else m=+g[o+((c[ob>>2]|0)+(c[pb>>2]|0)<<2)>>2]-+g[L>>2];g[J>>2]=m}g[K>>2]=+g[K>>2]+ +g[J>>2];c[ob>>2]=(c[ob>>2]|0)+1}g[K>>2]=+g[K>>2]/+((c[nb>>2]|0)-(c[tb>>2]|0)|0);g[sa>>2]=+g[K>>2]-+g[(c[Bb>>2]|0)+196>>2];if(3.0<(-1.5>+g[sa>>2]?-1.5:+g[sa>>2]))m=3.0;else m=-1.5>+g[sa>>2]?-1.5:+g[sa>>2];g[sa>>2]=m;L=(c[Bb>>2]|0)+196|0;g[L>>2]=+g[L>>2]+ +g[sa>>2]*.019999999552965164}if(!(c[M>>2]|0)){M=(N(c[Ka>>2]|0,c[pb>>2]|0)|0)<<2;_i(e|0,o|0,M+0|0)|0}do if((c[La>>2]|0)>0){M=(Za(c[xb>>2]|0)|0)+3|0;if(c[ub>>2]|0?1:(M|0)>(c[ha>>2]|0))break;if((c[(c[Bb>>2]|0)+24>>2]|0)<5)break;if(c[(c[Bb>>2]|0)+68>>2]|0)break;if(!(cb(o,c[qb>>2]|0,c[pb>>2]|0,c[tb>>2]|0,c[nb>>2]|0,c[Ka>>2]|0)|0))break;c[ub>>2]=1;c[Ya>>2]=c[V>>2];bb(c[Ua>>2]|0,c[Ya>>2]|0,k,j,c[Ka>>2]|0,c[lb>>2]|0,c[La>>2]|0,c[(c[Bb>>2]|0)+28>>2]|0,c[(c[Bb>>2]|0)+72>>2]|0);la(c[Ua>>2]|0,j,p,c[W>>2]|0,c[Ka>>2]|0,c[La>>2]|0);Tc(c[Ua>>2]|0,c[W>>2]|0,c[nb>>2]|0,p,o,c[Ka>>2]|0);c[ob>>2]=0;while(1){if((c[ob>>2]|0)>=(N(c[Ka>>2]|0,c[pb>>2]|0)|0))break;M=e+(c[ob>>2]<<2)|0;g[M>>2]=+g[M>>2]+ +(c[La>>2]|0)*.5;c[ob>>2]=(c[ob>>2]|0)+1}g[ua>>2]=.20000000298023224}while(0);do if((c[La>>2]|0)>0){M=(Za(c[xb>>2]|0)|0)+3|0;if((M|0)>(c[ha>>2]|0))break;_b(c[xb>>2]|0,c[ub>>2]|0,3)}while(0);a=(N(c[Ka>>2]|0,c[Ma>>2]|0)|0)<<2;n=l;l=l+((1*a|0)+15&-16)|0;na(c[Ua>>2]|0,j,n,p,c[W>>2]|0,c[Ka>>2]|0,c[V>>2]|0);a=l;l=l+((1*(c[pb>>2]<<2)|0)+15&-16)|0;d:do if((c[tb>>2]|0)==0?(c[X>>2]|0)>=((c[Ka>>2]|0)*15|0):0){if((c[(c[Bb>>2]|0)+24>>2]|0)<2){S=192;break}if(c[(c[Bb>>2]|0)+68>>2]|0){S=192;break}do if((c[X>>2]|0)>=40){if((c[X>>2]|0)<60){c[O>>2]=6;break}if((c[X>>2]|0)<100){c[O>>2]=4;break}else{c[O>>2]=3;break}}else c[O>>2]=12;while(0);c[O>>2]=c[O>>2]<<1;c[U>>2]=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[ob>>2]|0)+1}kb=(c[mb>>2]|0)+1|0;c[mb>>2]=kb}while((kb|0)<(c[lb>>2]|0));j=(c[Bb>>2]|0)+116|0;if((c[ub>>2]|0)!=0|(c[vb>>2]|0)!=0)f=(c[j>>2]|0)+1|0;else f=0;c[j>>2]=f;c[(c[Bb>>2]|0)+76>>2]=c[(c[xb>>2]|0)+28>>2];fc(c[xb>>2]|0);if(jb(c[xb>>2]|0)|0){c[zb>>2]=-3;c[wb>>2]=1}else{c[zb>>2]=c[yb>>2];c[wb>>2]=1}_(c[Ab>>2]|0);Bb=c[zb>>2]|0;l=Cb;return Bb|0}function Za(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function _a(a,b){a=a|0;b=b|0;var d=0.0,e=0,f=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;j=k+16|0;f=k+12|0;e=k+8|0;h=k+4|0;i=k;c[j>>2]=a;c[f>>2]=b;g[h>>2]=0.0;g[i>>2]=0.0;c[e>>2]=0;while(1){d=+g[h>>2];if((c[e>>2]|0)>=(c[f>>2]|0))break;if(d>+g[(c[j>>2]|0)+(c[e>>2]<<2)>>2])d=+g[h>>2];else d=+g[(c[j>>2]|0)+(c[e>>2]<<2)>>2];g[h>>2]=d;if(+g[i>>2]<+g[(c[j>>2]|0)+(c[e>>2]<<2)>>2])d=+g[i>>2];else d=+g[(c[j>>2]|0)+(c[e>>2]<<2)>>2];g[i>>2]=d;c[e>>2]=(c[e>>2]|0)+1}l=k;return +(d>-+g[i>>2]?+g[h>>2]:-+g[i>>2])}function $a(a,b,d,e,f,h,i,j,k,m,n){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,B=0,C=0,D=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>2]|0)+108>>2],c[(c[M>>2]|0)+72>>2]|0);if((c[F>>2]|0)>1022)c[F>>2]=1022;g[w>>2]=+g[w>>2]*.699999988079071;if((c[(c[M>>2]|0)+56>>2]|0)>2)g[w>>2]=+g[w>>2]*.5;if((c[(c[M>>2]|0)+56>>2]|0)>4)g[w>>2]=+g[w>>2]*.5;if((c[(c[M>>2]|0)+56>>2]|0)>8)g[w>>2]=0.0;_(c[r>>2]|0)}else{g[w>>2]=0.0;c[F>>2]=15}g[q>>2]=.20000000298023224;a=(A((c[F>>2]|0)-(c[(c[M>>2]|0)+104>>2]|0)|0)|0)*10|0;if((a|0)>(c[F>>2]|0))g[q>>2]=+g[q>>2]+.20000000298023224;if((c[p>>2]|0)<25)g[q>>2]=+g[q>>2]+.10000000149011612;if((c[p>>2]|0)<35)g[q>>2]=+g[q>>2]+.10000000149011612;if(+g[(c[M>>2]|0)+108>>2]>.4000000059604645)g[q>>2]=+g[q>>2]-.10000000149011612;if(+g[(c[M>>2]|0)+108>>2]>.550000011920929)g[q>>2]=+g[q>>2]-.10000000149011612;g[q>>2]=+g[q>>2]>.20000000298023224?+g[q>>2]:.20000000298023224;if(+g[w>>2]<+g[q>>2]){g[w>>2]=0.0;c[D>>2]=0;c[J>>2]=0}else{if(+A(+(+g[w>>2]-+g[(c[M>>2]|0)+108>>2]))<.10000000149011612)g[w>>2]=+g[(c[M>>2]|0)+108>>2];c[J>>2]=~~+z(+(+g[w>>2]*32.0/3.0+.5))-1;if(0>((7<(c[J>>2]|0)?7:c[J>>2]|0)|0))e=0;else e=7<(c[J>>2]|0)?7:c[J>>2]|0;c[J>>2]=e;g[w>>2]=+((c[J>>2]|0)+1|0)*.09375;c[D>>2]=1}c[u>>2]=0;do{c[B>>2]=(c[(c[y>>2]|0)+44>>2]|0)-(c[C>>2]|0);if((c[(c[M>>2]|0)+104>>2]|0)>15)e=c[(c[M>>2]|0)+104>>2]|0;else e=15;c[(c[M>>2]|0)+104>>2]=e;r=(c[x>>2]|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g[v>>2]=+g[A>>2]-+g[D>>2]*.5;g[b+(c[m>>2]<<2)>>2]=+g[D>>2];c[m>>2]=(c[m>>2]|0)+1}e=b;a=e+48|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(a|0));g[t>>2]=0.0;g[u>>2]=0.0;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[q>>2]|0))break;g[C>>2]=+g[b+(c[m>>2]<<1<<2)>>2]*+g[b+(c[m>>2]<<1<<2)>>2]+ +g[b+((c[m>>2]<<1)+1<<2)>>2]*+g[b+((c[m>>2]<<1)+1<<2)>>2];g[t>>2]=+g[t>>2]+ +g[C>>2];g[b+(c[m>>2]<<2)>>2]=+g[u>>2]+(+g[C>>2]-+g[u>>2])*.0625;g[u>>2]=+g[b+(c[m>>2]<<2)>>2];c[m>>2]=(c[m>>2]|0)+1}g[u>>2]=0.0;g[s>>2]=0.0;c[m>>2]=(c[q>>2]|0)-1;while(1){if((c[m>>2]|0)<0)break;g[b+(c[m>>2]<<2)>>2]=+g[u>>2]+(+g[b+(c[m>>2]<<2)>>2]-+g[u>>2])*.125;g[u>>2]=+g[b+(c[m>>2]<<2)>>2];g[s>>2]=+g[s>>2]>+g[u>>2]?+g[s>>2]:+g[u>>2];c[m>>2]=(c[m>>2]|0)+-1}g[t>>2]=+B(+(+g[t>>2]*+g[s>>2]*.5*+(c[q>>2]|0)));g[w>>2]=+(c[q>>2]|0)/(+g[t>>2]+1.0000000036274937e-15);c[y>>2]=0;c[m>>2]=12;while(1){if((c[m>>2]|0)>=((c[q>>2]|0)-5|0))break;if(127.0<+z(+(+g[w>>2]*64.0*(+g[b+(c[m>>2]<<2)>>2]+1.0000000036274937e-15))))i=127.0;else i=+z(+(+g[w>>2]*64.0*(+g[b+(c[m>>2]<<2)>>2]+1.0000000036274937e-15)));if(!(0.0>i))if(127.0<+z(+(+g[w>>2]*64.0*(+g[b+(c[m>>2]<<2)>>2]+1.0000000036274937e-15))))i=127.0;else i=+z(+(+g[w>>2]*64.0*(+g[b+(c[m>>2]<<2)>>2]+1.0000000036274937e-15)));else i=0.0;c[n>>2]=~~i;c[y>>2]=(c[y>>2]|0)+(d[25443+(c[n>>2]|0)>>0]|0);c[m>>2]=(c[m>>2]|0)+4}c[y>>2]=(c[y>>2]<<6<<2|0)/(((c[q>>2]|0)-17|0)*6|0)|0;if((c[y>>2]|0)>(c[r>>2]|0)){c[c[x>>2]>>2]=c[k>>2];c[r>>2]=c[y>>2]}c[k>>2]=(c[k>>2]|0)+1}c[E>>2]=(c[r>>2]|0)>200&1;if(0.0>+B(+(+((c[r>>2]|0)*27|0)))-42.0)i=0.0;else i=+B(+(+((c[r>>2]|0)*27|0)))-42.0;g[H>>2]=i;if(0.0>(163.0<+g[H>>2]?163.0:+g[H>>2])*.006899999920278788-.139){i=0.0;i=+B(+i);H=c[G>>2]|0;g[H>>2]=i;H=c[E>>2]|0;G=c[F>>2]|0;_(G|0);l=I;return H|0}i=(163.0<+g[H>>2]?163.0:+g[H>>2])*.006899999920278788-.139;i=+B(+i);H=c[G>>2]|0;g[H>>2]=i;H=c[E>>2]|0;G=c[F>>2]|0;_(G|0);l=I;return H|0}function bb(a,b,d,e,f,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=l;l=l+80|0;x=D+64|0;B=D+60|0;w=D+56|0;y=D+52|0;n=D+48|0;o=D+44|0;p=D+40|0;C=D+36|0;r=D+32|0;z=D+28|0;q=D+24|0;m=D+20|0;A=D+16|0;v=D+12|0;s=D+8|0;u=D+4|0;t=D;c[x>>2]=a;c[B>>2]=b;c[w>>2]=d;c[y>>2]=e;c[n>>2]=f;c[o>>2]=h;c[p>>2]=i;c[C>>2]=j;c[r>>2]=k;c[z>>2]=c[(c[x>>2]|0)+4>>2];if(c[B>>2]|0){c[m>>2]=c[B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V>>2]|0)>=(c[U>>2]|0))break;if(+g[d+(c[V>>2]<<2)>>2]>+g[(c[K>>2]|0)+(c[V>>2]<<2)>>2])i=d+(c[V>>2]<<2)|0;else i=(c[K>>2]|0)+(c[V>>2]<<2)|0;g[d+(c[V>>2]<<2)>>2]=+g[i>>2];c[V>>2]=(c[V>>2]|0)+1}b:do if(!(((c[ca>>2]|0)==0|(c[R>>2]|0)!=0)^1|(c[W>>2]|0)!=0)){c[V>>2]=c[J>>2];while(1){if((c[V>>2]|0)>=(c[U>>2]|0))break b;g[d+(c[V>>2]<<2)>>2]=+g[d+(c[V>>2]<<2)>>2]*.5;c[V>>2]=(c[V>>2]|0)+1}}while(0);c[V>>2]=c[J>>2];while(1){if((c[V>>2]|0)>=(c[U>>2]|0)){ea=103;break}if((c[V>>2]|0)<8){K=d+(c[V>>2]<<2)|0;g[K>>2]=+g[K>>2]*2.0}if((c[V>>2]|0)>=12)g[d+(c[V>>2]<<2)>>2]=+g[d+(c[V>>2]<<2)>>2]*.5;if(+g[d+(c[V>>2]<<2)>>2]<4.0)w=+g[d+(c[V>>2]<<2)>>2];else w=4.0;g[d+(c[V>>2]<<2)>>2]=w;K=N(c[L>>2]|0,(b[(c[S>>2]|0)+((c[V>>2]|0)+1<<1)>>1]|0)-(b[(c[S>>2]|0)+(c[V>>2]<<1)>>1]|0)|0)|0;c[da>>2]=K<>2];do if((c[da>>2]|0)>=6){w=+g[d+(c[V>>2]<<2)>>2];if((c[da>>2]|0)>48){c[O>>2]=~~(w*8.0);c[P>>2]=((N(c[O>>2]|0,c[da>>2]|0)|0)<<3|0)/8|0;break}else{c[O>>2]=~~(w*+(c[da>>2]|0)/6.0);c[P>>2]=(c[O>>2]|0)*6<<3;break}}else{c[O>>2]=~~+g[d+(c[V>>2]<<2)>>2];c[P>>2]=(N(c[O>>2]|0,c[da>>2]|0)|0)<<3}while(0);if(!(c[ca>>2]|0?(c[R>>2]|0)==0|(c[W>>2]|0)!=0:0))ea=100;if((ea|0)==100?(ea=0,((c[aa>>2]|0)+(c[P>>2]|0)>>3>>3|0)>((c[T>>2]|0)/4|0|0)):0)break;c[(c[Y>>2]|0)+(c[V>>2]<<2)>>2]=c[O>>2];c[aa>>2]=(c[aa>>2]|0)+(c[P>>2]|0);c[V>>2]=(c[V>>2]|0)+1}if((ea|0)==103){da=c[aa>>2]|0;ea=c[ba>>2]|0;c[ea>>2]=da;x=+g[X>>2];ea=c[Z>>2]|0;_(ea|0);l=fa;return +x}c[Q>>2]=((c[T>>2]|0)/4|0)<<3<<3;c[(c[Y>>2]|0)+(c[V>>2]<<2)>>2]=(c[Q>>2]|0)-(c[aa>>2]|0);c[aa>>2]=c[Q>>2];da=c[aa>>2]|0;ea=c[ba>>2]|0;c[ea>>2]=da;x=+g[X>>2];ea=c[Z>>2]|0;_(ea|0);l=fa;return +x}function gb(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0;v=l;l=l+64|0;r=v+48|0;o=v+44|0;i=v+40|0;k=v+36|0;p=v+32|0;u=v+28|0;s=v+24|0;t=v+20|0;q=v+16|0;h=v+12|0;m=v+8|0;j=v+4|0;n=v;c[r>>2]=a;c[o>>2]=d;c[i>>2]=e;c[k>>2]=f;g[s>>2]=1.0000000036274937e-15;g[t>>2]=1.0000000036274937e-15;c[p>>2]=0;while(1){if((c[p>>2]|0)>=13)break;c[q>>2]=b[(c[(c[r>>2]|0)+32>>2]|0)+(c[p>>2]<<1)>>1]<>2];while(1){if((c[q>>2]|0)>=(b[(c[(c[r>>2]|0)+32>>2]|0)+((c[p>>2]|0)+1<<1)>>1]<>2]|0))break;g[h>>2]=+g[(c[o>>2]|0)+(c[q>>2]<<2)>>2];g[m>>2]=+g[(c[o>>2]|0)+((c[k>>2]|0)+(c[q>>2]|0)<<2)>>2];g[j>>2]=+g[h>>2]+ +g[m>>2];g[n>>2]=+g[h>>2]-+g[m>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>>2]|0)+(H+((N(c[(c[r>>2]|0)+72>>2]&65535,b[v+6>>1]|0)|0)>>16));H=N(c[F>>2]>>16,b[v+6>>1]|0)|0;c[E>>2]=(c[E>>2]|0)+(H+((N(c[F>>2]&65535,b[v+6>>1]|0)|0)>>16));H=N(c[(c[r>>2]|0)+96>>2]>>16,b[v+8>>1]|0)|0;c[F>>2]=H+((N(c[(c[r>>2]|0)+96>>2]&65535,b[v+8>>1]|0)|0)>>16);H=N(c[F>>2]>>16,b[v+8>>1]|0)|0;c[E>>2]=(c[E>>2]|0)+(H+((N(c[F>>2]&65535,b[v+8>>1]|0)|0)>>16));if((c[E>>2]|0)<(c[c[D>>2]>>2]|0)){c[c[D>>2]>>2]=c[E>>2];a[c[z>>2]>>0]=c[A>>2];c[c[w>>2]>>2]=c[x>>2]}c[t>>2]=(c[t>>2]|0)+5;c[A>>2]=(c[A>>2]|0)+1}l=G;return}function Qe(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=l;l=l+32|0;j=i+20|0;f=i+16|0;d=i+12|0;e=i+8|0;g=i+4|0;h=i;c[j>>2]=b;c[h>>2]=c[j>>2];if((a[(c[h>>2]|0)+4565>>0]|0)!=2){l=i;return}c[d>>2]=((c[(c[h>>2]|0)+4600>>2]|0)*1e3<<16|0)/(c[(c[h>>2]|0)+4568>>2]|0)|0;c[e>>2]=(Bf(c[d>>2]|0)|0)-2048;c[f>>2]=c[(c[h>>2]|0)+4728>>2];k=c[e>>2]|0;b=N(0-(c[f>>2]|0)<<2>>16,(c[f>>2]&65535)<<16>>16)|0;b=b+((N(0-(c[f>>2]|0)<<2&65535,(c[f>>2]&65535)<<16>>16)|0)>>16)>>16;d=c[e>>2]|0;d=N(b,(d-((Bf(3932160)|0)-2048)&65535)<<16>>16)|0;b=N(0-(c[f>>2]|0)<<2>>16,(c[f>>2]&65535)<<16>>16)|0;b=b+((N(0-(c[f>>2]|0)<<2&65535,(c[f>>2]&65535)<<16>>16)|0)>>16)&65535;j=c[e>>2]|0;c[e>>2]=k+(d+((N(b,(j-((Bf(3932160)|0)-2048)&65535)<<16>>16)|0)>>16));c[g>>2]=(c[e>>2]|0)-(c[(c[h>>2]|0)+8>>2]>>8);if((c[g>>2]|0)<0)c[g>>2]=(c[g>>2]|0)*3;if((c[g>>2]|0)>51)d=51;else d=(c[g>>2]|0)<-51?-51:c[g>>2]|0;c[g>>2]=d;k=((N((c[(c[h>>2]|0)+4556>>2]&65535)<<16>>16,(c[g>>2]&65535)<<16>>16)|0)>>16)*6554|0;k=(c[(c[h>>2]|0)+8>>2]|0)+(k+(((N((c[(c[h>>2]|0)+4556>>2]&65535)<<16>>16,(c[g>>2]&65535)<<16>>16)|0)&65535)*6554>>16))|0;c[(c[h>>2]|0)+8>>2]=k;k=(Bf(60)|0)<<8;k=(k|0)>((Bf(100)|0)<<8|0);d=c[(c[h>>2]|0)+8>>2]|0;do if(k){if((d|0)>((Bf(60)|0)<<8|0)){d=(Bf(60)|0)<<8;break}k=c[(c[h>>2]|0)+8>>2]|0;if((k|0)<((Bf(100)|0)<<8|0)){d=(Bf(100)|0)<<8;break}else{d=c[(c[h>>2]|0)+8>>2]|0;break}}else{if((d|0)>((Bf(100)|0)<<8|0)){d=(Bf(100)|0)<<8;break}k=c[(c[h>>2]|0)+8>>2]|0;if((k|0)<((Bf(60)|0)<<8|0)){d=(Bf(60)|0)<<8;break}else{d=c[(c[h>>2]|0)+8>>2]|0;break}}while(0);c[(c[h>>2]|0)+8>>2]=d;l=i;return}function Re(f,g,h,i,j,k,m){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;L=l;l=l+288|0;n=L+64|0;B=L+60|0;F=L+56|0;C=L+52|0;o=L+48|0;z=L+44|0;K=L+40|0;w=L+36|0;I=L+32|0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if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}Te(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function Te(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=Ue(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(Ve(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function Ue(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function Ve(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function We(a,e,f,g,h){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;m=t+36|0;o=t+32|0;q=t+28|0;i=t+24|0;j=t+20|0;n=t+16|0;p=t+12|0;k=t+8|0;s=t+4|0;r=t;c[m>>2]=a;c[o>>2]=e;c[q>>2]=f;c[i>>2]=g;c[j>>2]=h;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[i>>2]|0))break;c[r>>2]=0;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[j>>2]|0))break;f=b[(c[o>>2]|0)+(c[p>>2]<<1)>>1]|0;e=c[q>>2]|0;c[q>>2]=e+1;c[k>>2]=f-(d[e>>0]<<7);c[s>>2]=N((c[k>>2]&65535)<<16>>16,(c[k>>2]&65535)<<16>>16)|0;e=b[(c[o>>2]|0)+((c[p>>2]|0)+1<<1)>>1]|0;f=c[q>>2]|0;c[q>>2]=f+1;c[k>>2]=e-(d[f>>0]<<7);c[s>>2]=(c[s>>2]|0)+(N((c[k>>2]&65535)<<16>>16,(c[k>>2]&65535)<<16>>16)|0);c[r>>2]=(c[r>>2]|0)+(c[s>>2]>>4);c[p>>2]=(c[p>>2]|0)+2}c[(c[m>>2]|0)+(c[n>>2]<<2)>>2]=c[r>>2];c[n>>2]=(c[n>>2]|0)+1}l=t;return}function Xe(e,f,g,h){e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+32|0;i=p+20|0;n=p+16|0;o=p+12|0;q=p+8|0;m=p+4|0;k=p+24|0;j=p;c[i>>2]=e;c[n>>2]=f;c[o>>2]=g;c[q>>2]=h;c[j>>2]=(c[(c[o>>2]|0)+20>>2]|0)+((N(c[q>>2]|0,b[(c[o>>2]|0)+2>>1]|0)|0)/2|0);c[m>>2]=0;while(1){if((c[m>>2]|0)>=(b[(c[o>>2]|0)+2>>1]|0))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160|0;I=aa+80|0;K=aa;c[Y>>2]=e;c[V>>2]=f;c[U>>2]=g;c[O>>2]=h;c[v>>2]=i;c[w>>2]=j;c[p>>2]=k;b[C>>1]=m;c[F>>2]=n;b[$>>1]=o;c[x>>2]=-10;while(1){if((c[x>>2]|0)>9)break;c[H>>2]=c[x>>2]<<10;c[J>>2]=(c[H>>2]|0)+1024;do if((c[x>>2]|0)<=0){if(!(c[x>>2]|0)){c[J>>2]=(c[J>>2]|0)-102;break}f=(c[x>>2]|0)==-1;c[H>>2]=(c[H>>2]|0)+102;if(!f)c[J>>2]=(c[J>>2]|0)+102}else{c[H>>2]=(c[H>>2]|0)-102;c[J>>2]=(c[J>>2]|0)-102}while(0);f=N(c[H>>2]>>16,(c[p>>2]&65535)<<16>>16)|0;f=f+((N(c[H>>2]&65535,(c[p>>2]&65535)<<16>>16)|0)>>16)|0;c[I+((c[x>>2]|0)+10<<2)>>2]=f;f=N(c[J>>2]>>16,(c[p>>2]&65535)<<16>>16)|0;f=f+((N(c[J>>2]&65535,(c[p>>2]&65535)<<16>>16)|0)>>16)|0;c[K+((c[x>>2]|0)+10<<2)>>2]=f;c[x>>2]=(c[x>>2]|0)+1}c[G>>2]=1;c[q>>2]=0;b[P>>1]=0;c[x>>2]=(b[$>>1]|0)-1;a:while(1){c[S>>2]=(c[w>>2]|0)+(b[(c[v>>2]|0)+(c[x>>2]<<1)>>1]|0);c[M>>2]=d[(c[O>>2]|0)+(c[x>>2]|0)>>0]<<8;c[y>>2]=b[(c[V>>2]|0)+(c[x>>2]<<1)>>1];c[Z>>2]=0;while(1){if((c[Z>>2]|0)>=(c[G>>2]|0))break;f=N(c[M>>2]>>16,b[P+(c[Z>>2]<<1)>>1]|0)|0;c[L>>2]=f+((N(c[M>>2]&65535,b[P+(c[Z>>2]<<1)>>1]|0)|0)>>16);c[T>>2]=(c[y>>2]|0)-(c[L>>2]|0);f=N(b[C>>1]>>16,(c[T>>2]&65535)<<16>>16)|0;c[X>>2]=f+((N(b[C>>1]&65535,(c[T>>2]&65535)<<16>>16)|0)>>16);if((c[X>>2]|0)>9)i=9;else i=(c[X>>2]|0)<-10?-10:c[X>>2]|0;c[X>>2]=i;a[W+(c[Z>>2]<<4)+(c[x>>2]|0)>>0]=c[X>>2];c[H>>2]=c[I+((c[X>>2]|0)+10<<2)>>2];c[J>>2]=c[K+((c[X>>2]|0)+10<<2)>>2];c[H>>2]=(c[H>>2]|0)+(c[L>>2]|0);c[J>>2]=(c[J>>2]|0)+(c[L>>2]|0);b[P+(c[Z>>2]<<1)>>1]=c[H>>2];b[P+((c[Z>>2]|0)+(c[G>>2]|0)<<1)>>1]=c[J>>2];i=c[X>>2]|0;do if(((c[X>>2]|0)+1|0)>=4)if((i+1|0)==4){c[Q>>2]=d[(c[S>>2]|0)+((c[X>>2]|0)+4)>>0];c[R>>2]=280;break}else{c[Q>>2]=108+(((c[X>>2]&65535)<<16>>16)*43|0);c[R>>2]=(c[Q>>2]|0)+43;break}else{if((i|0)>-4){c[Q>>2]=d[(c[S>>2]|0)+((c[X>>2]|0)+4)>>0];c[R>>2]=d[(c[S>>2]|0)+((c[X>>2]|0)+1+4)>>0];break}if((c[X>>2]|0)==-4){c[Q>>2]=280;c[R>>2]=d[(c[S>>2]|0)+((c[X>>2]|0)+1+4)>>0];break}else{c[Q>>2]=108+(N(-43,(c[X>>2]&65535)<<16>>16)|0);c[R>>2]=(c[Q>>2]|0)-43;break}}while(0);c[t>>2]=c[q+(c[Z>>2]<<2)>>2];c[u>>2]=(c[y>>2]|0)-(c[H>>2]|0);f=N((c[u>>2]&65535)<<16>>16,(c[u>>2]&65535)<<16>>16)|0;f=(c[t>>2]|0)+(N(f,b[(c[U>>2]|0)+(c[x>>2]<<1)>>1]|0)|0)|0;f=f+(N((c[F>>2]&65535)<<16>>16,(c[Q>>2]&65535)<<16>>16)|0)|0;c[q+(c[Z>>2]<<2)>>2]=f;c[u>>2]=(c[y>>2]|0)-(c[J>>2]|0);f=N((c[u>>2]&65535)<<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Z>>2]=0;while(1){i=c[X>>2]|0;if((c[Z>>2]|0)>=(b[$>>1]|0))break;a[(c[Y>>2]|0)+(c[Z>>2]|0)>>0]=a[W+((i&3)<<4)+(c[Z>>2]|0)>>0]|0;c[Z>>2]=(c[Z>>2]|0)+1}$=c[Y>>2]|0;a[$>>0]=(a[$>>0]|0)+(i>>2);l=aa;return c[_>>2]|0}function Ze(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+128|0;s=t+28|0;i=t+24|0;q=t+20|0;r=t+16|0;k=t+12|0;j=t+8|0;h=t+4|0;m=t;n=t+96|0;p=t+64|0;o=t+32|0;c[s>>2]=d;c[i>>2]=e;c[q>>2]=f;c[r>>2]=g;d=N(-5,(c[(c[s>>2]|0)+4556>>2]&65535)<<16>>16)|0;c[h>>2]=3146+(d+(((c[(c[s>>2]|0)+4556>>2]&65535)<<16>>16)*59246>>16));if((c[(c[s>>2]|0)+4604>>2]|0)==2)c[h>>2]=(c[h>>2]|0)+(c[h>>2]>>1);Qf(p,c[q>>2]|0,c[(c[s>>2]|0)+4664>>2]|0);if((c[(c[s>>2]|0)+4656>>2]|0)==1)e=(a[(c[s>>2]|0)+4768+31>>0]|0)<4;else e=0;c[j>>2]=e&1;a:do if(c[j>>2]|0){Od(n,c[r>>2]|0,c[q>>2]|0,a[(c[s>>2]|0)+4768+31>>0]|0,c[(c[s>>2]|0)+4664>>2]|0);Qf(o,n,c[(c[s>>2]|0)+4664>>2]|0);c[m>>2]=(N(a[(c[s>>2]|0)+4768+31>>0]<<16>>16,a[(c[s>>2]|0)+4768+31>>0]<<16>>16)|0)<<11;c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[(c[s>>2]|0)+4664>>2]|0))break a;d=N(b[o+(c[k>>2]<<1)>>1]>>16,(c[m>>2]&65535)<<16>>16)|0;d=(b[p+(c[k>>2]<<1)>>1]>>1)+(d+((N(b[o+(c[k>>2]<<1)>>1]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16))&65535;b[p+(c[k>>2]<<1)>>1]=d;c[k>>2]=(c[k>>2]|0)+1}}while(0);Re((c[s>>2]|0)+4768+8|0,c[q>>2]|0,c[(c[s>>2]|0)+4724>>2]|0,p,c[h>>2]|0,c[(c[s>>2]|0)+4692>>2]|0,a[(c[s>>2]|0)+4768+29>>0]|0)|0;Lf((c[i>>2]|0)+32|0,c[q>>2]|0,c[(c[s>>2]|0)+4664>>2]|0);if(c[j>>2]|0){Od(n,c[r>>2]|0,c[q>>2]|0,a[(c[s>>2]|0)+4768+31>>0]|0,c[(c[s>>2]|0)+4664>>2]|0);Lf(c[i>>2]|0,n,c[(c[s>>2]|0)+4664>>2]|0);l=t;return}else{_i(c[i>>2]|0,(c[i>>2]|0)+32|0,c[(c[s>>2]|0)+4664>>2]<<1|0)|0;l=t;return}}function _e(d,e,f,g,h,i,j,k,m,n,o){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0;W=l;l=l+144|0;R=W+128|0;q=W+124|0;V=W+120|0;y=W+116|0;z=W+112|0;A=W+108|0;E=W+104|0;v=W+100|0;D=W+96|0;I=W+92|0;J=W+88|0;L=W+84|0;u=W+80|0;w=W+76|0;F=W+72|0;G=W+68|0;S=W+64|0;p=W+60|0;C=W+56|0;P=W+48|0;M=W+44|0;O=W+40|0;s=W+36|0;r=W+32|0;x=W+28|0;t=W+24|0;B=W+20|0;U=W+16|0;T=W+12|0;H=W+8|0;K=W+4|0;Q=W;c[R>>2]=d;c[q>>2]=e;c[V>>2]=f;c[y>>2]=g;c[z>>2]=h;c[A>>2]=i;c[E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e3+(((c[I>>2]&65535)<<16>>16)*900|0);c[t>>2]=(c[x>>2]|0)*3;v=$e(c[E>>2]|0,851968+(c[t>>2]|0)|0,19)|0;c[c[A>>2]>>2]=v;if((c[c[A>>2]>>2]|0)<(c[B>>2]|0)){c[c[A>>2]>>2]=c[B>>2];c[(c[A>>2]|0)+4>>2]=(c[E>>2]|0)-(c[c[A>>2]>>2]|0);v=N(65536+(c[t>>2]|0)>>16,(c[B>>2]&65535)<<16>>16)|0;c[U>>2]=$e((c[(c[A>>2]|0)+4>>2]<<1)-(c[B>>2]|0)|0,v+((N(65536+(c[t>>2]|0)&65535,(c[B>>2]&65535)<<16>>16)|0)>>16)|0,16)|0;if((c[U>>2]|0)>16384)o=16384;else o=(c[U>>2]|0)<0?0:c[U>>2]|0;c[U>>2]=o}else{c[(c[A>>2]|0)+4>>2]=(c[E>>2]|0)-(c[c[A>>2]>>2]|0);c[U>>2]=16384}v=N((c[U>>2]|0)-(b[(c[R>>2]|0)+28>>1]|0)>>16,(c[C>>2]&65535)<<16>>16)|0;C=(b[(c[R>>2]|0)+28>>1]|0)+(v+((N((c[U>>2]|0)-(b[(c[R>>2]|0)+28>>1]|0)&65535,(c[C>>2]&65535)<<16>>16)|0)>>16))&65535;b[(c[R>>2]|0)+28>>1]=C;a[c[z>>2]>>0]=0;a:do if(!(c[D>>2]|0)){do if(!(b[(c[R>>2]|0)+30>>1]|0)){if((c[E>>2]<<3|0)>=((c[B>>2]|0)*13|0)?(D=N(c[x>>2]>>16,b[(c[R>>2]|0)+28>>1]|0)|0,(D+((N(c[x>>2]&65535,b[(c[R>>2]|0)+28>>1]|0)|0)>>16)|0)>=819):0)break;c[P>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P>>2]&65535)<<16>>16)|0)>>14;c[P+4>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P+4>>2]&65535)<<16>>16)|0)>>14;rg(P,c[y>>2]|0);c[U>>2]=0;c[P>>2]=0;c[P+4>>2]=0;c[c[A>>2]>>2]=c[E>>2];c[(c[A>>2]|0)+4>>2]=0;a[c[z>>2]>>0]=1;break a}while(0);do if(b[(c[R>>2]|0)+30>>1]|0){if((c[E>>2]<<3|0)>=((c[B>>2]|0)*11|0)?(D=N(c[x>>2]>>16,b[(c[R>>2]|0)+28>>1]|0)|0,(D+((N(c[x>>2]&65535,b[(c[R>>2]|0)+28>>1]|0)|0)>>16)|0)>=328):0)break;c[P>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P>>2]&65535)<<16>>16)|0)>>14;c[P+4>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P+4>>2]&65535)<<16>>16)|0)>>14;rg(P,c[y>>2]|0);c[U>>2]=0;c[P>>2]=0;c[P+4>>2]=0;break a}while(0);if((b[(c[R>>2]|0)+28>>1]|0)>15565){rg(P,c[y>>2]|0);c[U>>2]=16384;break}else{c[P>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P>>2]&65535)<<16>>16)|0)>>14;c[P+4>>2]=(N(b[(c[R>>2]|0)+28>>1]|0,(c[P+4>>2]&65535)<<16>>16)|0)>>14;rg(P,c[y>>2]|0);c[U>>2]=b[(c[R>>2]|0)+28>>1];break}}else{c[U>>2]=0;c[P>>2]=0;c[P+4>>2]=0;rg(P,c[y>>2]|0)}while(0);do if((a[c[z>>2]>>0]|0)==1){D=(c[R>>2]|0)+32|0;b[D>>1]=(b[D>>1]|0)+((c[J>>2]|0)-(c[I>>2]<<3));if((b[(c[R>>2]|0)+32>>1]|0)<((c[I>>2]|0)*5|0)){a[c[z>>2]>>0]=0;break}else{b[(c[R>>2]|0)+32>>1]=1e4;break}}else b[(c[R>>2]|0)+32>>1]=0;while(0);if((a[c[z>>2]>>0]|0)==0?(c[(c[A>>2]|0)+4>>2]|0)<1:0){c[(c[A>>2]|0)+4>>2]=1;E=af(1,(c[E>>2]|0)-(c[(c[A>>2]|0)+4>>2]|0)|0)|0;c[c[A>>2]>>2]=E}c[M>>2]=0-(b[c[R>>2]>>1]|0);c[O>>2]=0-(b[(c[R>>2]|0)+2>>1]|0);c[T>>2]=b[(c[R>>2]|0)+30>>1]<<10;c[w>>2]=65536/(c[I>>2]<<3|0)|0;c[F>>2]=0-(((N(((c[P>>2]|0)-(b[c[R>>2]>>1]|0)&65535)<<16>>16,(c[w>>2]&65535)<<16>>16)|0)>>15)+1>>1);c[G>>2]=0-(((N(((c[P+4>>2]|0)-(b[(c[R>>2]|0)+2>>1]|0)&65535)<<16>>16,(c[w>>2]&65535)<<16>>16)|0)>>15)+1>>1);E=N((c[U>>2]|0)-(b[(c[R>>2]|0)+30>>1]|0)>>16,(c[w>>2]&65535)<<16>>16)|0;c[H>>2]=E+((N((c[U>>2]|0)-(b[(c[R>>2]|0)+30>>1]|0)&65535,(c[w>>2]&65535)<<16>>16)|0)>>16)<<10;c[L>>2]=0;while(1){if((c[L>>2]|0)>=(c[I>>2]<<3|0))break;c[M>>2]=(c[M>>2]|0)+(c[F>>2]|0);c[O>>2]=(c[O>>2]|0)+(c[G>>2]|0);c[T>>2]=(c[T>>2]|0)+(c[H>>2]|0);c[S>>2]=(b[(c[K>>2]|0)+(c[L>>2]<<1)>>1]|0)+(b[(c[K>>2]|0)+((c[L>>2]|0)+2<<1)>>1]|0)+(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<1)<<9;D=N(c[T>>2]>>16,b[i+((c[L>>2]|0)+1<<1)>>1]|0)|0;D=D+((N(c[T>>2]&65535,b[i+((c[L>>2]|0)+1<<1)>>1]|0)|0)>>16)|0;E=N(c[S>>2]>>16,(c[M>>2]&65535)<<16>>16)|0;c[S>>2]=D+(E+((N(c[S>>2]&65535,(c[M>>2]&65535)<<16>>16)|0)>>16));E=N(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<11>>16,(c[O>>2]&65535)<<16>>16)|0;c[S>>2]=(c[S>>2]|0)+(E+((N(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<11&65535,(c[O>>2]&65535)<<16>>16)|0)>>16));if(((c[S>>2]>>7)+1>>1|0)<=32767)if(((c[S>>2]>>7)+1>>1|0)<-32768)o=-32768;else o=(c[S>>2]>>7)+1>>1;else o=32767;b[(c[V>>2]|0)+((c[L>>2]|0)-1<<1)>>1]=o;c[L>>2]=(c[L>>2]|0)+1}c[M>>2]=0-(c[P>>2]|0);c[O>>2]=0-(c[P+4>>2]|0);c[T>>2]=c[U>>2]<<10;c[L>>2]=c[I>>2]<<3;while(1){if((c[L>>2]|0)>=(c[J>>2]|0))break;c[S>>2]=(b[(c[K>>2]|0)+(c[L>>2]<<1)>>1]|0)+(b[(c[K>>2]|0)+((c[L>>2]|0)+2<<1)>>1]|0)+(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<1)<<9;H=N(c[T>>2]>>16,b[i+((c[L>>2]|0)+1<<1)>>1]|0)|0;H=H+((N(c[T>>2]&65535,b[i+((c[L>>2]|0)+1<<1)>>1]|0)|0)>>16)|0;I=N(c[S>>2]>>16,(c[M>>2]&65535)<<16>>16)|0;c[S>>2]=H+(I+((N(c[S>>2]&65535,(c[M>>2]&65535)<<16>>16)|0)>>16));I=N(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<11>>16,(c[O>>2]&65535)<<16>>16)|0;c[S>>2]=(c[S>>2]|0)+(I+((N(b[(c[K>>2]|0)+((c[L>>2]|0)+1<<1)>>1]<<11&65535,(c[O>>2]&65535)<<16>>16)|0)>>16));if(((c[S>>2]>>7)+1>>1|0)<=32767)if(((c[S>>2]>>7)+1>>1|0)<-32768)o=-32768;else o=(c[S>>2]>>7)+1>>1;else o=32767;b[(c[V>>2]|0)+((c[L>>2]|0)-1<<1)>>1]=o;c[L>>2]=(c[L>>2]|0)+1}b[c[R>>2]>>1]=c[P>>2];b[(c[R>>2]|0)+2>>1]=c[P+4>>2];b[(c[R>>2]|0)+30>>1]=c[U>>2];_(c[Q>>2]|0);l=W;return}function $e(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;h=l;l=l+48|0;g=h+40|0;q=h+36|0;p=h+32|0;i=h+28|0;k=h+24|0;j=h+20|0;f=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;e=h;c[q>>2]=a;c[p>>2]=b;c[i>>2]=d;b=c[q>>2]|0;c[k>>2]=(bf((c[q>>2]|0)>0?b:0-b|0)|0)-1;c[n>>2]=c[q>>2]<>2];b=c[p>>2]|0;c[j>>2]=(bf((c[p>>2]|0)>0?b:0-b|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;b=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=b+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);b=c[n>>2]|0;a=c[o>>2]|0;d=c[e>>2]|0;d=Xi(a|0,((a|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;d=Yi(d|0,y|0,32)|0;c[n>>2]=b-(d<<3);d=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(d+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[k>>2]|0)-(c[j>>2]|0)-(c[i>>2]|0);d=c[f>>2]|0;if((c[f>>2]|0)>=0)if((d|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];q=c[g>>2]|0;l=h;return q|0}else{c[g>>2]=0;q=c[g>>2]|0;l=h;return q|0}a=c[e>>2]|0;b=0-(c[f>>2]|0)|0;do if((-2147483648>>0-d|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>b|0)){d=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){d=2147483647>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>b|0)){d=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){d=-2147483648>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}while(0);c[g>>2]=d<<0-(c[f>>2]|0);q=c[g>>2]|0;l=h;return q|0}function af(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function bf(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function cf(a,d,e,f,g,h){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;w=l;l=l+64|0;p=w+52|0;u=w+48|0;v=w+44|0;o=w+40|0;k=w+36|0;r=w+32|0;s=w+28|0;x=w+24|0;i=w+20|0;j=w+16|0;t=w+12|0;q=w+8|0;m=w+4|0;n=w;c[p>>2]=a;c[u>>2]=d;c[v>>2]=e;c[o>>2]=f;c[k>>2]=g;c[r>>2]=h;e=c[u>>2]|0;d=(c[p>>2]|0)+4|0;b[e>>1]=b[d>>1]|0;b[e+2>>1]=b[d+2>>1]|0;e=c[v>>2]|0;d=(c[p>>2]|0)+8|0;b[e>>1]=b[d>>1]|0;b[e+2>>1]=b[d+2>>1]|0;e=(c[p>>2]|0)+4|0;d=(c[u>>2]|0)+(c[r>>2]<<1)|0;b[e>>1]=b[d>>1]|0;b[e+2>>1]=b[d+2>>1]|0;e=(c[p>>2]|0)+8|0;d=(c[v>>2]|0)+(c[r>>2]<<1)|0;b[e>>1]=b[d>>1]|0;b[e+2>>1]=b[d+2>>1]|0;c[m>>2]=b[c[p>>2]>>1];c[n>>2]=b[(c[p>>2]|0)+2>>1];c[x>>2]=65536/(c[k>>2]<<3|0)|0;c[i>>2]=((N(((c[c[o>>2]>>2]|0)-(b[c[p>>2]>>1]|0)&65535)<<16>>16,(c[x>>2]&65535)<<16>>16)|0)>>15)+1>>1;c[j>>2]=((N(((c[(c[o>>2]|0)+4>>2]|0)-(b[(c[p>>2]|0)+2>>1]|0)&65535)<<16>>16,(c[x>>2]&65535)<<16>>16)|0)>>15)+1>>1;c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[k>>2]<<3|0))break;c[m>>2]=(c[m>>2]|0)+(c[i>>2]|0);c[n>>2]=(c[n>>2]|0)+(c[j>>2]|0);c[t>>2]=(b[(c[u>>2]|0)+(c[s>>2]<<1)>>1]|0)+(b[(c[u>>2]|0)+((c[s>>2]|0)+2<<1)>>1]|0)+(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<1)<<9;x=N(c[t>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[t>>2]=(b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<8)+(x+((N(c[t>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));x=N(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<11>>16,(c[n>>2]&65535)<<16>>16)|0;c[t>>2]=(c[t>>2]|0)+(x+((N(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<11&65535,(c[n>>2]&65535)<<16>>16)|0)>>16));if(((c[t>>2]>>7)+1>>1|0)<=32767)if(((c[t>>2]>>7)+1>>1|0)<-32768)h=-32768;else h=(c[t>>2]>>7)+1>>1;else h=32767;b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]=h;c[s>>2]=(c[s>>2]|0)+1}c[m>>2]=c[c[o>>2]>>2];c[n>>2]=c[(c[o>>2]|0)+4>>2];c[s>>2]=c[k>>2]<<3;while(1){if((c[s>>2]|0)>=(c[r>>2]|0))break;c[t>>2]=(b[(c[u>>2]|0)+(c[s>>2]<<1)>>1]|0)+(b[(c[u>>2]|0)+((c[s>>2]|0)+2<<1)>>1]|0)+(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<1)<<9;x=N(c[t>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[t>>2]=(b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<8)+(x+((N(c[t>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));x=N(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<11>>16,(c[n>>2]&65535)<<16>>16)|0;c[t>>2]=(c[t>>2]|0)+(x+((N(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]<<11&65535,(c[n>>2]&65535)<<16>>16)|0)>>16));if(((c[t>>2]>>7)+1>>1|0)<=32767)if(((c[t>>2]>>7)+1>>1|0)<-32768)h=-32768;else h=(c[t>>2]>>7)+1>>1;else h=32767;b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]=h;c[s>>2]=(c[s>>2]|0)+1}b[c[p>>2]>>1]=c[c[o>>2]>>2];b[(c[p>>2]|0)+2>>1]=c[(c[o>>2]|0)+4>>2];c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[r>>2]|0))break;c[t>>2]=(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0)+(b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0);c[q>>2]=(b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0)-(b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0);if((c[t>>2]|0)>32767)h=32767;else h=(c[t>>2]|0)<-32768?-32768:c[t>>2]|0;b[(c[u>>2]|0)+((c[s>>2]|0)+1<<1)>>1]=h;if((c[q>>2]|0)>32767)h=32767;else h=(c[q>>2]|0)<-32768?-32768:c[q>>2]|0;b[(c[v>>2]|0)+((c[s>>2]|0)+1<<1)>>1]=h;c[s>>2]=(c[s>>2]|0)+1}l=w;return}function df(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;b=f;c[b>>2]=a;if(!(((((((c[(c[b>>2]|0)+8>>2]|0)!=8e3?(c[(c[b>>2]|0)+8>>2]|0)!=12e3:0)?(c[(c[b>>2]|0)+8>>2]|0)!=16e3:0)?(c[(c[b>>2]|0)+8>>2]|0)!=24e3:0)?(c[(c[b>>2]|0)+8>>2]|0)!=32e3:0)?(c[(c[b>>2]|0)+8>>2]|0)!=44100:0)?(c[(c[b>>2]|0)+8>>2]|0)!=48e3:0))e=8;do if((e|0)==8){if(((c[(c[b>>2]|0)+20>>2]|0)!=8e3?(c[(c[b>>2]|0)+20>>2]|0)!=12e3:0)?(c[(c[b>>2]|0)+20>>2]|0)!=16e3:0)break;if(((c[(c[b>>2]|0)+12>>2]|0)!=8e3?(c[(c[b>>2]|0)+12>>2]|0)!=12e3:0)?(c[(c[b>>2]|0)+12>>2]|0)!=16e3:0)break;if(((c[(c[b>>2]|0)+16>>2]|0)!=8e3?(c[(c[b>>2]|0)+16>>2]|0)!=12e3:0)?(c[(c[b>>2]|0)+16>>2]|0)!=16e3:0)break;if(((c[(c[b>>2]|0)+16>>2]|0)<=(c[(c[b>>2]|0)+20>>2]|0)?(c[(c[b>>2]|0)+12>>2]|0)>=(c[(c[b>>2]|0)+20>>2]|0):0)?(c[(c[b>>2]|0)+16>>2]|0)<=(c[(c[b>>2]|0)+12>>2]|0):0){if((((c[(c[b>>2]|0)+24>>2]|0)!=10?(c[(c[b>>2]|0)+24>>2]|0)!=20:0)?(c[(c[b>>2]|0)+24>>2]|0)!=40:0)?(c[(c[b>>2]|0)+24>>2]|0)!=60:0){c[d>>2]=-103;e=c[d>>2]|0;l=f;return e|0}if((c[(c[b>>2]|0)+32>>2]|0)>=0?(c[(c[b>>2]|0)+32>>2]|0)<=100:0){if((c[(c[b>>2]|0)+44>>2]|0)>=0?(c[(c[b>>2]|0)+44>>2]|0)<=1:0){if((c[(c[b>>2]|0)+48>>2]|0)>=0?(c[(c[b>>2]|0)+48>>2]|0)<=1:0){do if((c[(c[b>>2]|0)+40>>2]|0)>=0){if((c[(c[b>>2]|0)+40>>2]|0)>1)break;do if((c[c[b>>2]>>2]|0)>=1){if((c[c[b>>2]>>2]|0)>2)break;do if((c[(c[b>>2]|0)+4>>2]|0)>=1){if((c[(c[b>>2]|0)+4>>2]|0)>2)break;if((c[(c[b>>2]|0)+4>>2]|0)>(c[c[b>>2]>>2]|0)){c[d>>2]=-111;e=c[d>>2]|0;l=f;return e|0}do if((c[(c[b>>2]|0)+36>>2]|0)>=0){if((c[(c[b>>2]|0)+36>>2]|0)>10)break;c[d>>2]=0;e=c[d>>2]|0;l=f;return e|0}while(0);c[d>>2]=-106;e=c[d>>2]|0;l=f;return e|0}while(0);c[d>>2]=-111;e=c[d>>2]|0;l=f;return e|0}while(0);c[d>>2]=-111;e=c[d>>2]|0;l=f;return e|0}while(0);c[d>>2]=-107;e=c[d>>2]|0;l=f;return e|0}c[d>>2]=-109;e=c[d>>2]|0;l=f;return e|0}c[d>>2]=-108;e=c[d>>2]|0;l=f;return e|0}c[d>>2]=-105;e=c[d>>2]|0;l=f;return e|0}}while(0);c[d>>2]=-102;e=c[d>>2]|0;l=f;return e|0}function ef(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;h=m+20|0;e=m+16|0;g=m+12|0;j=m+8|0;f=m+4|0;i=m;c[h>>2]=a;c[e>>2]=d;c[j>>2]=0;if((c[e>>2]|0)>8e4)d=8e4;else d=(c[e>>2]|0)<5e3?5e3:c[e>>2]|0;c[e>>2]=d;if((c[e>>2]|0)==(c[(c[h>>2]|0)+4632>>2]|0)){k=c[j>>2]|0;l=m;return k|0}c[(c[h>>2]|0)+4632>>2]=c[e>>2];do if((c[(c[h>>2]|0)+4600>>2]|0)!=8)if((c[(c[h>>2]|0)+4600>>2]|0)==12){c[i>>2]=17772;break}else{c[i>>2]=17804;break}else c[i>>2]=17740;while(0);if((c[(c[h>>2]|0)+4604>>2]|0)==2)c[e>>2]=(c[e>>2]|0)-2200;c[g>>2]=1;while(1){if((c[g>>2]|0)>=8){k=16;break}if((c[e>>2]|0)<=(c[(c[i>>2]|0)+(c[g>>2]<<2)>>2]|0))break;c[g>>2]=(c[g>>2]|0)+1}if((k|0)==16){k=c[j>>2]|0;l=m;return k|0}c[f>>2]=((c[e>>2]|0)-(c[(c[i>>2]|0)+((c[g>>2]|0)-1<<2)>>2]|0)<<6|0)/((c[(c[i>>2]|0)+(c[g>>2]<<2)>>2]|0)-(c[(c[i>>2]|0)+((c[g>>2]|0)-1<<2)>>2]|0)|0)|0;k=(b[24510+((c[g>>2]|0)-1<<1)>>1]<<6)+(N(c[f>>2]|0,(b[24510+(c[g>>2]<<1)>>1]|0)-(b[24510+((c[g>>2]|0)-1<<1)>>1]|0)|0)|0)|0;c[(c[h>>2]|0)+4748>>2]=k;k=c[j>>2]|0;l=m;return k|0}function ff(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;c[d>>2]=0;aj(c[f>>2]|0,0,12240)|0;c[(c[f>>2]|0)+5124>>2]=c[g>>2];a=(Bf(3932160)|0)-2048<<8;c[(c[f>>2]|0)+8>>2]=a;c[(c[f>>2]|0)+12>>2]=c[(c[f>>2]|0)+8>>2];c[(c[f>>2]|0)+4696>>2]=1;a=De((c[f>>2]|0)+32|0)|0;c[d>>2]=(c[d>>2]|0)+a;l=e;return c[d>>2]|0}function gf(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;p=l;l=l+48|0;o=p+32|0;m=p+28|0;i=p+24|0;h=p+20|0;r=p+16|0;q=p+12|0;j=p+8|0;k=p+4|0;n=p;c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|0;c[n>>2]=(c[n>>2]|0)+r;c[(c[m>>2]|0)+4700>>2]=1;c[o>>2]=c[n>>2];r=c[o>>2]|0;l=p;return r|0}function hf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+336|0;i=n+328|0;f=n+324|0;j=n+320|0;g=n+316|0;d=n+312|0;h=n+308|0;e=n+304|0;k=n+300|0;m=n;c[i>>2]=a;c[f>>2]=b;c[j>>2]=0;if((c[(c[i>>2]|0)+4600>>2]|0)==(c[f>>2]|0)?(c[(c[i>>2]|0)+4584>>2]|0)==(c[(c[i>>2]|0)+4580>>2]|0):0){k=c[i>>2]|0;k=k+4580|0;k=c[k>>2]|0;m=c[i>>2]|0;m=m+4584|0;c[m>>2]=k;m=c[j>>2]|0;l=n;return m|0}b=c[i>>2]|0;if(!(c[(c[i>>2]|0)+4600>>2]|0)){k=Tf(b+5808|0,c[(c[i>>2]|0)+4580>>2]|0,(c[f>>2]|0)*1e3|0,1)|0;c[j>>2]=(c[j>>2]|0)+k;k=c[i>>2]|0;k=k+4580|0;k=c[k>>2]|0;m=c[i>>2]|0;m=m+4584|0;c[m>>2]=k;m=c[j>>2]|0;l=n;return m|0}else{c[e>>2]=((c[b+4604>>2]|0)*5<<1)+5;c[h>>2]=N(c[e>>2]|0,c[(c[i>>2]|0)+4600>>2]|0)|0;c[g>>2]=N(c[e>>2]|0,c[f>>2]|0)|0;b=(c[h>>2]|0)>(c[g>>2]|0)?c[h>>2]|0:c[g>>2]|0;c[k>>2]=$()|0;a=l;l=l+((1*(b<<1)|0)+15&-16)|0;of(a,(c[i>>2]|0)+9356|0,c[h>>2]|0);b=Tf(m,((c[(c[i>>2]|0)+4600>>2]&65535)<<16>>16)*1e3|0,c[(c[i>>2]|0)+4580>>2]|0,0)|0;c[j>>2]=(c[j>>2]|0)+b;c[d>>2]=N(c[e>>2]|0,(c[(c[i>>2]|0)+4580>>2]|0)/1e3|0)|0;e=l;l=l+((1*(c[d>>2]<<1)|0)+15&-16)|0;m=Uf(m,e,a,c[h>>2]|0)|0;c[j>>2]=(c[j>>2]|0)+m;m=Tf((c[i>>2]|0)+5808|0,c[(c[i>>2]|0)+4580>>2]|0,((c[f>>2]&65535)<<16>>16)*1e3|0,1)|0;c[j>>2]=(c[j>>2]|0)+m;m=Uf((c[i>>2]|0)+5808|0,a,e,c[d>>2]|0)|0;c[j>>2]=(c[j>>2]|0)+m;pf((c[i>>2]|0)+9356|0,a,c[g>>2]|0);_(c[k>>2]|0);k=c[i>>2]|0;k=k+4580|0;k=c[k>>2]|0;m=c[i>>2]|0;m=m+4584|0;c[m>>2]=k;m=c[j>>2]|0;l=n;return m|0}return 0}function jf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;h=j+12|0;g=j+8|0;f=j+4|0;i=j;c[h>>2]=b;c[g>>2]=d;c[f>>2]=e;c[i>>2]=0;if((c[f>>2]|0)!=(c[(c[h>>2]|0)+4636>>2]|0)){if((c[f>>2]|0)!=10&(c[f>>2]|0)!=20&(c[f>>2]|0)!=40&(c[f>>2]|0)!=60)c[i>>2]=-103;if((c[f>>2]|0)<=10){c[(c[h>>2]|0)+5776>>2]=1;c[(c[h>>2]|0)+4604>>2]=(c[f>>2]|0)==10?2:1;e=N((c[f>>2]&65535)<<16>>16,(c[g>>2]&65535)<<16>>16)|0;c[(c[h>>2]|0)+4608>>2]=e;c[(c[h>>2]|0)+4572>>2]=((c[g>>2]&65535)<<16>>16)*14;e=(c[(c[h>>2]|0)+4600>>2]|0)==8?29170:29158;d=(c[h>>2]|0)+4720|0}else{c[(c[h>>2]|0)+5776>>2]=(c[f>>2]|0)/20|0;c[(c[h>>2]|0)+4604>>2]=4;c[(c[h>>2]|0)+4608>>2]=((c[g>>2]&65535)<<16>>16)*20;c[(c[h>>2]|0)+4572>>2]=((c[g>>2]&65535)<<16>>16)*24;e=(c[(c[h>>2]|0)+4600>>2]|0)==8?29147:29113;d=(c[h>>2]|0)+4720|0}c[d>>2]=e;c[(c[h>>2]|0)+4636>>2]=c[f>>2];c[(c[h>>2]|0)+4632>>2]=0}if((c[(c[h>>2]|0)+4600>>2]|0)==(c[g>>2]|0)){i=c[i>>2]|0;l=j;return i|0}f=(c[h>>2]|0)+7200|0;c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;aj((c[h>>2]|0)+7216|0,0,2140)|0;aj((c[h>>2]|0)+144|0,0,4380)|0;f=(c[h>>2]|0)+4524|0;c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;c[f+16>>2]=0;c[f+20>>2]=0;c[f+24>>2]=0;c[f+28>>2]=0;f=(c[h>>2]|0)+16|0;c[f>>2]=0;c[f+4>>2]=0;c[(c[h>>2]|0)+5772>>2]=0;c[(c[h>>2]|0)+5780>>2]=0;c[(c[h>>2]|0)+4632>>2]=0;c[(c[h>>2]|0)+4568>>2]=100;c[(c[h>>2]|0)+4696>>2]=1;c[(c[h>>2]|0)+7216+2136>>2]=100;a[(c[h>>2]|0)+7200>>0]=10;c[(c[h>>2]|0)+144+4356>>2]=100;c[(c[h>>2]|0)+144+4372>>2]=65536;a[(c[h>>2]|0)+4565>>0]=0;c[(c[h>>2]|0)+4600>>2]=c[g>>2];f=(c[(c[h>>2]|0)+4604>>2]|0)==4;c[(c[h>>2]|0)+4720>>2]=(c[(c[h>>2]|0)+4600>>2]|0)==8?(f?29147:29170):f?29113:29158;if((c[(c[h>>2]|0)+4600>>2]|0)!=8?(c[(c[h>>2]|0)+4600>>2]|0)!=12:0){c[(c[h>>2]|0)+4664>>2]=16;e=c[h>>2]|0;d=17704}else{c[(c[h>>2]|0)+4664>>2]=10;e=c[h>>2]|0;d=17668}c[e+4724>>2]=d;c[(c[h>>2]|0)+4612>>2]=(c[g>>2]|0)*5;e=N((c[(c[h>>2]|0)+4612>>2]&65535)<<16>>16,(c[(c[h>>2]|0)+4604>>2]&65535)<<16>>16)|0;c[(c[h>>2]|0)+4608>>2]=e;c[(c[h>>2]|0)+4616>>2]=((c[g>>2]&65535)<<16>>16)*20;c[(c[h>>2]|0)+4620>>2]=(c[g>>2]&65535)<<16>>16<<1;c[(c[h>>2]|0)+4576>>2]=((c[g>>2]&65535)<<16>>16)*18;e=(c[(c[h>>2]|0)+4604>>2]|0)==4;g=(c[g>>2]&65535)<<16>>16;c[(e?c[h>>2]|0:c[h>>2]|0)+4572>>2]=e?g*24|0:g*14|0;e=c[h>>2]|0;do if((c[(c[h>>2]|0)+4600>>2]|0)!=16){d=(c[h>>2]|0)+4684|0;if((c[e+4600>>2]|0)==12){c[d>>2]=13;d=29039;e=c[h>>2]|0;break}else{c[d>>2]=15;d=29030;e=c[h>>2]|0;break}}else{c[e+4684>>2]=10;d=29045;e=c[h>>2]|0}while(0);c[e+4716>>2]=d;i=c[i>>2]|0;l=j;return i|0}function kf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;e=g+8|0;d=g+4|0;f=g;c[e>>2]=a;c[d>>2]=b;c[f>>2]=0;do if((c[d>>2]|0)>=2){if((c[d>>2]|0)<4){c[(c[e>>2]|0)+4668>>2]=1;c[(c[e>>2]|0)+4676>>2]=49807;c[(c[e>>2]|0)+4672>>2]=8;c[(c[e>>2]|0)+4660>>2]=10;c[(c[e>>2]|0)+4624>>2]=(c[(c[e>>2]|0)+4600>>2]|0)*5;c[(c[e>>2]|0)+4652>>2]=1;c[(c[e>>2]|0)+4656>>2]=0;c[(c[e>>2]|0)+4680>>2]=0;c[(c[e>>2]|0)+4692>>2]=4;b=c[e>>2]|0;a=0;break}if((c[d>>2]|0)<6){c[(c[e>>2]|0)+4668>>2]=1;c[(c[e>>2]|0)+4676>>2]=48497;c[(c[e>>2]|0)+4672>>2]=10;c[(c[e>>2]|0)+4660>>2]=12;c[(c[e>>2]|0)+4624>>2]=(c[(c[e>>2]|0)+4600>>2]|0)*5;c[(c[e>>2]|0)+4652>>2]=2;c[(c[e>>2]|0)+4656>>2]=1;c[(c[e>>2]|0)+4680>>2]=0;c[(c[e>>2]|0)+4692>>2]=8;b=c[e>>2]|0;a=(c[(c[e>>2]|0)+4600>>2]|0)*983|0;break}b=(c[e>>2]|0)+4668|0;if((c[d>>2]|0)<8){c[b>>2]=1;c[(c[e>>2]|0)+4676>>2]=47186;c[(c[e>>2]|0)+4672>>2]=12;c[(c[e>>2]|0)+4660>>2]=14;c[(c[e>>2]|0)+4624>>2]=(c[(c[e>>2]|0)+4600>>2]|0)*5;c[(c[e>>2]|0)+4652>>2]=3;c[(c[e>>2]|0)+4656>>2]=1;c[(c[e>>2]|0)+4680>>2]=0;c[(c[e>>2]|0)+4692>>2]=16;b=c[e>>2]|0;a=(c[(c[e>>2]|0)+4600>>2]|0)*983|0;break}else{c[b>>2]=2;c[(c[e>>2]|0)+4676>>2]=45875;c[(c[e>>2]|0)+4672>>2]=16;c[(c[e>>2]|0)+4660>>2]=16;c[(c[e>>2]|0)+4624>>2]=(c[(c[e>>2]|0)+4600>>2]|0)*5;c[(c[e>>2]|0)+4652>>2]=4;c[(c[e>>2]|0)+4656>>2]=1;c[(c[e>>2]|0)+4680>>2]=0;c[(c[e>>2]|0)+4692>>2]=32;b=c[e>>2]|0;a=(c[(c[e>>2]|0)+4600>>2]|0)*983|0;break}}else{c[(c[e>>2]|0)+4668>>2]=0;c[(c[e>>2]|0)+4676>>2]=52429;c[(c[e>>2]|0)+4672>>2]=6;c[(c[e>>2]|0)+4660>>2]=8;c[(c[e>>2]|0)+4624>>2]=(c[(c[e>>2]|0)+4600>>2]|0)*3;c[(c[e>>2]|0)+4652>>2]=1;c[(c[e>>2]|0)+4656>>2]=0;c[(c[e>>2]|0)+4680>>2]=1;c[(c[e>>2]|0)+4692>>2]=2;b=c[e>>2]|0;a=0}while(0);c[b+4704>>2]=a;a=nf(c[(c[e>>2]|0)+4672>>2]|0,c[(c[e>>2]|0)+4664>>2]|0)|0;c[(c[e>>2]|0)+4672>>2]=a;c[(c[e>>2]|0)+4628>>2]=((c[(c[e>>2]|0)+4600>>2]|0)*5|0)+(c[(c[e>>2]|0)+4624>>2]<<1);c[(c[e>>2]|0)+4648>>2]=c[d>>2];l=g;return c[f>>2]|0}function lf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;g=i+16|0;e=i+12|0;f=i+8|0;h=i+4|0;d=i;c[g>>2]=a;c[e>>2]=b;c[h>>2]=0;c[f>>2]=c[(c[g>>2]|0)+6124>>2];c[(c[g>>2]|0)+6124>>2]=0;if(!(c[(c[g>>2]|0)+6120>>2]|0)){h=c[h>>2]|0;l=i;return h|0}if((c[(c[g>>2]|0)+4640>>2]|0)<=0){h=c[h>>2]|0;l=i;return h|0}do if((c[(c[g>>2]|0)+4600>>2]|0)!=8)if((c[(c[g>>2]|0)+4600>>2]|0)==12){c[d>>2]=14e3;break}else{c[d>>2]=16e3;break}else c[d>>2]=12e3;while(0);if((c[(c[g>>2]|0)+4640>>2]|0)<25)b=c[(c[g>>2]|0)+4640>>2]|0;else b=25;a=((N(c[d>>2]|0,125-b|0)|0)>>16)*655|0;if((c[(c[g>>2]|0)+4640>>2]|0)<25)b=c[(c[g>>2]|0)+4640>>2]|0;else b=25;c[d>>2]=a+(((N(c[d>>2]|0,125-b|0)|0)&65535)*655>>16);if((c[e>>2]|0)<=(c[d>>2]|0)){h=c[h>>2]|0;l=i;return h|0}b=c[g>>2]|0;if(!(c[f>>2]|0))a=7;else{a=mf(7-(((c[b+4640>>2]>>16)*26214|0)+((c[(c[g>>2]|0)+4640>>2]&65535)*26214>>16))|0,2)|0;b=c[g>>2]|0}c[b+6128>>2]=a;c[(c[g>>2]|0)+6124>>2]=1;h=c[h>>2]|0;l=i;return h|0}function mf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function nf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function of(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;i=j+12|0;f=j+8|0;k=j+4|0;h=j;c[i>>2]=a;c[f>>2]=d;c[k>>2]=e;c[h>>2]=(c[k>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;if((Ui(+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2])|0)<=32767)if((Ui(+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2])|0)<-32768)d=-32768;else d=Ui(+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2])|0;else d=32767;b[(c[i>>2]|0)+(c[h>>2]<<1)>>1]=d;c[h>>2]=(c[h>>2]|0)+-1}l=j;return}function pf(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;i=j+12|0;f=j+8|0;k=j+4|0;h=j;c[i>>2]=a;c[f>>2]=d;c[k>>2]=e;c[h>>2]=(c[k>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]=+(b[(c[f>>2]|0)+(c[h>>2]<<1)>>1]|0);c[h>>2]=(c[h>>2]|0)+-1}l=j;return}function qf(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=l;l=l+160|0;f=D+156|0;j=D+152|0;k=D+148|0;p=D+144|0;q=D+140|0;r=D+136|0;m=D+132|0;u=D+128|0;o=D+124|0;x=D+120|0;w=D+116|0;y=D+112|0;A=D+108|0;z=D+104|0;B=D+100|0;v=D+96|0;s=D+92|0;n=D+88|0;g=D+52|0;i=D+16|0;h=D+8|0;t=D;c[f>>2]=a;c[j>>2]=d;c[k>>2]=e;c[h>>2]=g;c[h+4>>2]=i;c[m>>2]=c[k>>2]>>1;rf(c[j>>2]|0,g,i,c[m>>2]|0);c[t>>2]=g;c[x>>2]=b[12286];c[A>>2]=sf(c[t>>2]|0,c[x>>2]|0,c[m>>2]|0)|0;if((c[A>>2]|0)<0){b[c[f>>2]>>1]=0;c[t>>2]=i;c[A>>2]=sf(c[t>>2]|0,c[x>>2]|0,c[m>>2]|0)|0;c[u>>2]=1}else c[u>>2]=0;c[q>>2]=1;c[p>>2]=0;c[v>>2]=0;a:while(1){c[w>>2]=b[24572+(c[q>>2]<<1)>>1];c[z>>2]=sf(c[t>>2]|0,c[w>>2]|0,c[m>>2]|0)|0;if(!((c[A>>2]|0)<=0?(c[z>>2]|0)>=(c[v>>2]|0):0))C=7;do if((C|0)==7){C=0;if((c[A>>2]|0)>=0?(c[z>>2]|0)<=(0-(c[v>>2]|0)|0):0)break;c[q>>2]=(c[q>>2]|0)+1;c[x>>2]=c[w>>2];c[A>>2]=c[z>>2];c[v>>2]=0;if((c[q>>2]|0)<=128)continue a;c[p>>2]=(c[p>>2]|0)+1;if((c[p>>2]|0)>30)break a;xf(c[j>>2]|0,c[k>>2]|0,65536-(N((10+(c[p>>2]|0)&65535)<<16>>16,(c[p>>2]&65535)<<16>>16)|0)|0);rf(c[j>>2]|0,g,i,c[m>>2]|0);c[t>>2]=g;c[x>>2]=b[12286];c[A>>2]=sf(c[t>>2]|0,c[x>>2]|0,c[m>>2]|0)|0;if((c[A>>2]|0)<0){b[c[f>>2]>>1]=0;c[t>>2]=i;c[A>>2]=sf(c[t>>2]|0,c[x>>2]|0,c[m>>2]|0)|0;c[u>>2]=1}else c[u>>2]=0;c[q>>2]=1;continue a}while(0);if(!(c[z>>2]|0))c[v>>2]=1;else c[v>>2]=0;c[o>>2]=-256;c[r>>2]=0;while(1){if((c[r>>2]|0)>=3)break;c[y>>2]=((c[x>>2]|0)+(c[w>>2]|0)>>1)+((c[x>>2]|0)+(c[w>>2]|0)&1);c[B>>2]=sf(c[t>>2]|0,c[y>>2]|0,c[m>>2]|0)|0;if(!((c[A>>2]|0)<=0&(c[B>>2]|0)>=0)?!((c[A>>2]|0)>=0&(c[B>>2]|0)<=0):0){c[x>>2]=c[y>>2];c[A>>2]=c[B>>2];c[o>>2]=(c[o>>2]|0)+(128>>c[r>>2])}else{c[w>>2]=c[y>>2];c[z>>2]=c[B>>2]}c[r>>2]=(c[r>>2]|0)+1}e=c[A>>2]|0;a=c[A>>2]|0;if((((c[A>>2]|0)>0?e:0-e|0)|0)<65536){c[n>>2]=a-(c[z>>2]|0);c[s>>2]=(c[A>>2]<<5)+(c[n>>2]>>1);if(c[n>>2]|0)c[o>>2]=(c[o>>2]|0)+((c[s>>2]|0)/(c[n>>2]|0)|0)}else c[o>>2]=(c[o>>2]|0)+((a|0)/((c[A>>2]|0)-(c[z>>2]|0)>>5|0)|0);e=(tf((c[q>>2]<<8)+(c[o>>2]|0)|0,32767)|0)&65535;b[(c[f>>2]|0)+(c[u>>2]<<1)>>1]=e;c[u>>2]=(c[u>>2]|0)+1;if((c[u>>2]|0)>=(c[k>>2]|0)){C=34;break}c[t>>2]=c[h+((c[u>>2]&1)<<2)>>2];c[x>>2]=b[24572+((c[q>>2]|0)-1<<1)>>1];c[A>>2]=1-(c[u>>2]&2)<<12}if((C|0)==34){l=D;return}b[c[f>>2]>>1]=32768/((c[k>>2]|0)+1|0)|0;c[q>>2]=1;while(1){if((c[q>>2]|0)>=(c[k>>2]|0))break;C=(N(((c[q>>2]|0)+1&65535)<<16>>16,b[c[f>>2]>>1]|0)|0)&65535;b[(c[f>>2]|0)+(c[q>>2]<<1)>>1]=C;c[q>>2]=(c[q>>2]|0)+1}l=D;return}function rf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k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16)|0;k=(c[(c[g>>2]|0)+28>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+24>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+20>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+16>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+12>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+8>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+4>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[c[g>>2]>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);k=c[i>>2]|0;l=j;return k|0}c[f>>2]=(c[e>>2]|0)-1;while(1){if((c[f>>2]|0)<0)break;k=N(c[i>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[(c[g>>2]|0)+(c[f>>2]<<2)>>2]|0)+(k+((N(c[i>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[i>>2]=k+(N(c[i>>2]|0,(c[h>>2]>>15)+1>>1)|0);c[f>>2]=(c[f>>2]|0)+-1}k=c[i>>2]|0;l=j;return k|0}function tf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function uf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+12|0;d=h+8|0;e=h+4|0;f=h;c[g>>2]=a;c[d>>2]=b;c[e>>2]=2;while(1){if((c[e>>2]|0)>(c[d>>2]|0))break;c[f>>2]=c[d>>2];while(1){b=c[g>>2]|0;if((c[f>>2]|0)<=(c[e>>2]|0))break;a=(c[g>>2]|0)+((c[f>>2]|0)-2<<2)|0;c[a>>2]=(c[a>>2]|0)-(c[b+(c[f>>2]<<2)>>2]|0);c[f>>2]=(c[f>>2]|0)+-1}a=(c[g>>2]|0)+((c[e>>2]|0)-2<<2)|0;c[a>>2]=(c[a>>2]|0)-(c[b+(c[e>>2]<<2)>>2]<<1);c[e>>2]=(c[e>>2]|0)+1}l=h;return}function vf(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;t=l;l=l+48|0;m=t+44|0;i=t+40|0;q=t+36|0;p=t+32|0;u=t+28|0;o=t+24|0;h=t+20|0;n=t+16|0;j=t+12|0;k=t+8|0;r=t+4|0;s=t;c[m>>2]=a;c[i>>2]=d;c[q>>2]=e;c[p>>2]=f;c[u>>2]=g;c[h>>2]=c[u>>2]>>1;c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[h>>2]|0))break;c[n>>2]=b[(c[m>>2]|0)+(c[o>>2]<<1<<1)>>1]<<10;c[k>>2]=(c[n>>2]|0)-(c[c[i>>2]>>2]|0);u=N(c[k>>2]>>16,-24290<<16>>16)|0;c[j>>2]=(c[k>>2]|0)+(u+((N(c[k>>2]&65535,-24290<<16>>16)|0)>>16));c[r>>2]=(c[c[i>>2]>>2]|0)+(c[j>>2]|0);c[c[i>>2]>>2]=(c[n>>2]|0)+(c[j>>2]|0);c[n>>2]=b[(c[m>>2]|0)+((c[o>>2]<<1)+1<<1)>>1]<<10;c[k>>2]=(c[n>>2]|0)-(c[(c[i>>2]|0)+4>>2]|0);u=N(c[k>>2]>>16,10788<<16>>16)|0;c[j>>2]=u+((N(c[k>>2]&65535,10788<<16>>16)|0)>>16);c[s>>2]=(c[(c[i>>2]|0)+4>>2]|0)+(c[j>>2]|0);c[(c[i>>2]|0)+4>>2]=(c[n>>2]|0)+(c[j>>2]|0);if((((c[s>>2]|0)+(c[r>>2]|0)>>10)+1>>1|0)<=32767)if((((c[s>>2]|0)+(c[r>>2]|0)>>10)+1>>1|0)<-32768)g=-32768;else g=((c[s>>2]|0)+(c[r>>2]|0)>>10)+1>>1;else g=32767;b[(c[q>>2]|0)+(c[o>>2]<<1)>>1]=g;if((((c[s>>2]|0)-(c[r>>2]|0)>>10)+1>>1|0)<=32767)if((((c[s>>2]|0)-(c[r>>2]|0)>>10)+1>>1|0)<-32768)g=-32768;else g=((c[s>>2]|0)-(c[r>>2]|0)>>10)+1>>1;else g=32767;b[(c[p>>2]|0)+(c[o>>2]<<1)>>1]=g;c[o>>2]=(c[o>>2]|0)+1}l=t;return}function wf(a,d,e,f,g,h,i){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;x=l;l=l+64|0;q=x+52|0;o=x+48|0;y=x+44|0;p=x+40|0;u=x+36|0;t=x+32|0;w=x+28|0;s=x+24|0;r=x+20|0;k=x+16|0;j=x+12|0;n=x+8|0;m=x+4|0;v=x;c[q>>2]=a;c[o>>2]=d;c[y>>2]=e;c[p>>2]=f;c[u>>2]=g;c[t>>2]=h;c[w>>2]=i;c[j>>2]=0-(c[c[y>>2]>>2]|0)&16383;c[k>>2]=0-(c[c[y>>2]>>2]|0)>>14;c[m>>2]=0-(c[(c[y>>2]|0)+4>>2]|0)&16383;c[n>>2]=0-(c[(c[y>>2]|0)+4>>2]|0)>>14;c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[t>>2]|0))break;c[r>>2]=b[(c[q>>2]|0)+((N(c[s>>2]|0,c[w>>2]|0)|0)<<1)>>1];y=N(c[c[o>>2]>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;c[v>>2]=(c[c[p>>2]>>2]|0)+(y+((N(c[c[o>>2]>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16))<<2;y=N(c[v>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;y=(c[(c[p>>2]|0)+4>>2]|0)+((y+((N(c[v>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16)>>13)+1>>1)|0;c[c[p>>2]>>2]=y;y=N(c[v>>2]>>16,(c[k>>2]&65535)<<16>>16)|0;y=(c[c[p>>2]>>2]|0)+(y+((N(c[v>>2]&65535,(c[k>>2]&65535)<<16>>16)|0)>>16))|0;c[c[p>>2]>>2]=y;y=N(c[(c[o>>2]|0)+4>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;y=(c[c[p>>2]>>2]|0)+(y+((N(c[(c[o>>2]|0)+4>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16))|0;c[c[p>>2]>>2]=y;y=N(c[v>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;y=(y+((N(c[v>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16)>>13)+1>>1;c[(c[p>>2]|0)+4>>2]=y;y=N(c[v>>2]>>16,(c[n>>2]&65535)<<16>>16)|0;y=(c[(c[p>>2]|0)+4>>2]|0)+(y+((N(c[v>>2]&65535,(c[n>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[p>>2]|0)+4>>2]=y;y=N(c[(c[o>>2]|0)+8>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;y=(c[(c[p>>2]|0)+4>>2]|0)+(y+((N(c[(c[o>>2]|0)+8>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[p>>2]|0)+4>>2]=y;if(((c[v>>2]|0)+16384-1>>14|0)<=32767)if(((c[v>>2]|0)+16384-1>>14|0)<-32768)e=-32768;else e=(c[v>>2]|0)+16384-1>>14;else e=32767;b[(c[u>>2]|0)+((N(c[s>>2]|0,c[w>>2]|0)|0)<<1)>>1]=e;c[s>>2]=(c[s>>2]|0)+1}l=x;return}function xf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;h=j+12|0;f=j+8|0;i=j+4|0;g=j;c[e>>2]=a;c[h>>2]=b;c[f>>2]=d;c[g>>2]=(c[f>>2]|0)-65536;c[i>>2]=0;while(1){d=c[f>>2]>>16;a=c[e>>2]|0;if((c[i>>2]|0)>=((c[h>>2]|0)-1|0))break;b=N(d,(c[a+(c[i>>2]<<2)>>2]&65535)<<16>>16)|0;b=b+((N(c[f>>2]&65535,(c[(c[e>>2]|0)+(c[i>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;b=b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|0;s=u+24|0;p=u+20|0;o=u+16|0;r=u+12|0;q=u+8|0;m=u+4|0;k=u;b[j>>1]=d;a[n>>0]=e;c[t>>2]=f;c[i>>2]=g;c[s>>2]=h;g=(c[s>>2]|0)==4;do if((c[i>>2]|0)==8)if(g){c[k>>2]=30282;c[m>>2]=11;break}else{c[k>>2]=30248;c[m>>2]=3;break}else if(g){c[k>>2]=30326;c[m>>2]=34;break}else{c[k>>2]=30254;c[m>>2]=12;break}while(0);c[r>>2]=(c[i>>2]&65535)<<16>>16<<1;c[q>>2]=((c[i>>2]&65535)<<16>>16)*18;c[p>>2]=(c[r>>2]|0)+(b[j>>1]|0);c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[s>>2]|0))break;g=N(c[o>>2]|0,c[m>>2]|0)|0;c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]=(c[p>>2]|0)+(a[(c[k>>2]|0)+(g+(a[n>>0]|0))>>0]|0);g=c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]|0;do if((c[r>>2]|0)>(c[q>>2]|0)){if((g|0)>(c[r>>2]|0)){g=c[r>>2]|0;break}if((c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]|0)<(c[q>>2]|0)){g=c[q>>2]|0;break}else{g=c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]|0;break}}else{if((g|0)>(c[q>>2]|0)){g=c[q>>2]|0;break}if((c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]|0)<(c[r>>2]|0)){g=c[r>>2]|0;break}else{g=c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]|0;break}}while(0);c[(c[t>>2]|0)+(c[o>>2]<<2)>>2]=g;c[o>>2]=(c[o>>2]|0)+1}l=u;return}function Af(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+20|0;i=n+16|0;k=n+12|0;j=n+8|0;g=n+4|0;m=n;c[h>>2]=a;c[i>>2]=d;c[k>>2]=e;c[j>>2]=f;c[m>>2]=0;c[g>>2]=0;while(1){a=c[m>>2]|0;if((c[g>>2]|0)>=(c[j>>2]|0))break;e=N(b[(c[h>>2]|0)+(c[g>>2]<<1)>>1]|0,b[(c[i>>2]|0)+(c[g>>2]<<1)>>1]|0)|0;c[m>>2]=a+(e>>c[k>>2]);c[g>>2]=(c[g>>2]|0)+1}l=n;return a|0}function Bf(a){a=a|0;var b=0,d=0,e=0,f=0;b=l;l=l+16|0;f=b+8|0;e=b+4|0;d=b;c[f>>2]=a;Cf(c[f>>2]|0,e,d);a=((N(c[d>>2]|0,128-(c[d>>2]|0)|0)|0)>>16)*179|0;a=(31-(c[e>>2]|0)<<7)+((c[d>>2]|0)+(a+(((N(c[d>>2]|0,128-(c[d>>2]|0)|0)|0)&65535)*179>>16)))|0;l=b;return a|0}function Cf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=Df(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(Ef(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function Df(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function Ef(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function Ff(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+12|0;e=h+8|0;f=h+4|0;d=h;c[e>>2]=a;if((c[e>>2]|0)<0){c[g>>2]=0;g=c[g>>2]|0;l=h;return g|0}if((c[e>>2]|0)>=3967){c[g>>2]=2147483647;g=c[g>>2]|0;l=h;return g|0}c[f>>2]=1<<(c[e>>2]>>7);c[d>>2]=c[e>>2]&127;a=c[f>>2]|0;b=c[f>>2]|0;if((c[e>>2]|0)<2048){e=N((N((c[d>>2]&65535)<<16>>16,(128-(c[d>>2]|0)&65535)<<16>>16)|0)>>16,-174)|0;c[f>>2]=a+((N(b,(c[d>>2]|0)+(e+((N((N((c[d>>2]&65535)<<16>>16,(128-(c[d>>2]|0)&65535)<<16>>16)|0)&65535,-174)|0)>>16))|0)|0)>>7)}else{e=N((N((c[d>>2]&65535)<<16>>16,(128-(c[d>>2]|0)&65535)<<16>>16)|0)>>16,-174)|0;c[f>>2]=a+(N(b>>7,(c[d>>2]|0)+(e+((N((N((c[d>>2]&65535)<<16>>16,(128-(c[d>>2]|0)&65535)<<16>>16)|0)&65535,-174)|0)>>16))|0)|0)}c[g>>2]=c[f>>2];g=c[g>>2]|0;l=h;return g|0}function Gf(a,d,e,f,g,h){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;q=t+40|0;k=t+36|0;i=t+32|0;p=t+28|0;j=t+24|0;o=t+16|0;n=t+12|0;s=t+8|0;r=t+4|0;m=t;c[q>>2]=a;c[k>>2]=d;c[i>>2]=e;c[p>>2]=f;c[j>>2]=g;c[t+20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0;m=l;l=l+160|0;k=m+148|0;e=m+144|0;j=m+140|0;i=m+136|0;g=m+8|0;f=m+4|0;h=m;c[e>>2]=a;c[j>>2]=d;c[h>>2]=0;c[f>>2]=g+((c[j>>2]&1)<<6);c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[j>>2]|0))break;c[h>>2]=(c[h>>2]|0)+(b[(c[e>>2]|0)+(c[i>>2]<<1)>>1]|0);c[(c[f>>2]|0)+(c[i>>2]<<2)>>2]=b[(c[e>>2]|0)+(c[i>>2]<<1)>>1]<<12;c[i>>2]=(c[i>>2]|0)+1}if((c[h>>2]|0)>=4096){c[k>>2]=0;k=c[k>>2]|0;l=m;return k|0}else{c[k>>2]=If(g,c[j>>2]|0)|0;k=c[k>>2]|0;l=m;return k|0}return 0}function If(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;r=l;l=l+64|0;o=r+48|0;d=r+44|0;s=r+40|0;h=r+36|0;j=r+32|0;i=r+28|0;g=r+24|0;k=r+20|0;m=r+16|0;n=r+12|0;p=r+8|0;f=r+4|0;e=r;c[d>>2]=a;c[s>>2]=b;c[e>>2]=(c[d>>2]|0)+((c[s>>2]&1)<<6);c[g>>2]=1073741824;c[h>>2]=(c[s>>2]|0)-1;while(1){a=c[e>>2]|0;if((c[h>>2]|0)<=0)break;if((c[a+(c[h>>2]<<2)>>2]|0)>16773022){q=5;break}if((c[(c[e>>2]|0)+(c[h>>2]<<2)>>2]|0)<-16773022){q=5;break}c[k>>2]=0-(c[(c[e>>2]|0)+(c[h>>2]<<2)>>2]<<7);s=c[k>>2]|0;b=c[k>>2]|0;b=Xi(s|0,((s|0)<0)<<31>>31|0,b|0,((b|0)<0)<<31>>31|0)|0;b=Yi(b|0,y|0,32)|0;c[m>>2]=1073741824-b;b=c[m>>2]|0;c[i>>2]=32-(Jf((c[m>>2]|0)>0?b:0-b|0)|0);c[n>>2]=Kf(c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)|0;c[m>>2]=1073741824-s;s=c[g>>2]|0;t=c[m>>2]|0;t=Xi(s|0,((s|0)<0)<<31>>31|0,t|0,((t|0)<0)<<31>>31|0)|0;t=Yi(t|0,y|0,32)|0;c[g>>2]=t<<2;c[o>>2]=c[g>>2];t=c[o>>2]|0;l=r;return t|0}c[o>>2]=0;t=c[o>>2]|0;l=r;return t|0}function Jf(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function Kf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+48|0;g=h+32|0;n=h+28|0;d=h+24|0;i=h+20|0;f=h+16|0;j=h+12|0;m=h+8|0;k=h+4|0;e=h;c[n>>2]=a;c[d>>2]=b;b=c[n>>2]|0;c[i>>2]=(Jf((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[j>>2]=536870911/(c[m>>2]>>16|0)|0;c[e>>2]=c[j>>2]<<16;b=N(c[m>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;c[k>>2]=536870912-(b+((N(c[m>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))<<3;b=N(c[k>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;b=(c[e>>2]|0)+(b+((N(c[k>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))|0;c[e>>2]=b+(N(c[k>>2]|0,(c[j>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[i>>2]|0)-(c[d>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0)if((b|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];n=c[g>>2]|0;l=h;return n|0}else{c[g>>2]=0;n=c[g>>2]|0;l=h;return n|0}a=c[e>>2]|0;d=0-(c[f>>2]|0)|0;do if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>d|0)){b=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){b=2147483647>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){b=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){b=-2147483648>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}while(0);c[g>>2]=b<<0-(c[f>>2]|0);n=c[g>>2]|0;l=h;return n|0}function Lf(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;C=l;l=l+272|0;y=C+264|0;g=C+260|0;z=C+256|0;v=C+252|0;B=C+248|0;A=C+244|0;p=C+240|0;n=C+176|0;h=C+140|0;j=C+104|0;i=C+100|0;k=C+96|0;s=C+92|0;r=C+88|0;o=C+84|0;q=C+80|0;x=C+16|0;u=C+12|0;m=C+8|0;t=C+4|0;w=C;c[y>>2]=a;c[g>>2]=e;c[z>>2]=f;c[t>>2]=0;c[v>>2]=(c[z>>2]|0)==16?30222:30238;c[B>>2]=0;while(1){if((c[B>>2]|0)>=(c[z>>2]|0))break;c[s>>2]=b[(c[g>>2]|0)+(c[B>>2]<<1)>>1]>>8;c[r>>2]=(b[(c[g>>2]|0)+(c[B>>2]<<1)>>1]|0)-(c[s>>2]<<8);c[o>>2]=b[24572+(c[s>>2]<<1)>>1];c[q>>2]=(b[24572+((c[s>>2]|0)+1<<1)>>1]|0)-(c[o>>2]|0);f=((c[o>>2]<<8)+(N(c[q>>2]|0,c[r>>2]|0)|0)>>3)+1>>1;c[n+(d[(c[v>>2]|0)+(c[B>>2]|0)>>0]<<2)>>2]=f;c[B>>2]=(c[B>>2]|0)+1}c[p>>2]=c[z>>2]>>1;Mf(h,n,c[p>>2]|0);Mf(j,n+4|0,c[p>>2]|0);c[B>>2]=0;while(1){if((c[B>>2]|0)>=(c[p>>2]|0))break;c[i>>2]=(c[h+((c[B>>2]|0)+1<<2)>>2]|0)+(c[h+(c[B>>2]<<2)>>2]|0);c[k>>2]=(c[j+((c[B>>2]|0)+1<<2)>>2]|0)-(c[j+(c[B>>2]<<2)>>2]|0);c[x+(c[B>>2]<<2)>>2]=0-(c[k>>2]|0)-(c[i>>2]|0);c[x+((c[z>>2]|0)-(c[B>>2]|0)-1<<2)>>2]=(c[k>>2]|0)-(c[i>>2]|0);c[B>>2]=(c[B>>2]|0)+1}c[A>>2]=0;while(1){if((c[A>>2]|0)>=10)break;c[u>>2]=0;c[B>>2]=0;while(1){if((c[B>>2]|0)>=(c[z>>2]|0))break;v=c[x+(c[B>>2]<<2)>>2]|0;c[m>>2]=(c[x+(c[B>>2]<<2)>>2]|0)>0?v:0-v|0;if((c[m>>2]|0)>(c[u>>2]|0)){c[u>>2]=c[m>>2];c[t>>2]=c[B>>2]}c[B>>2]=(c[B>>2]|0)+1}c[u>>2]=(c[u>>2]>>4)+1>>1;if((c[u>>2]|0)<=32767)break;c[u>>2]=(c[u>>2]|0)<163838?c[u>>2]|0:163838;c[w>>2]=65470-(((c[u>>2]|0)-32767<<14|0)/((N(c[u>>2]|0,(c[t>>2]|0)+1|0)|0)>>2|0)|0);xf(x,c[z>>2]|0,c[w>>2]|0);c[A>>2]=(c[A>>2]|0)+1}w=(c[A>>2]|0)==10;c[B>>2]=0;a:do if(w)while(1){if((c[B>>2]|0)>=(c[z>>2]|0))break a;if(((c[x+(c[B>>2]<<2)>>2]>>4)+1>>1|0)<=32767)if(((c[x+(c[B>>2]<<2)>>2]>>4)+1>>1|0)<-32768)e=-32768;else e=(c[x+(c[B>>2]<<2)>>2]>>4)+1>>1;else e=32767;b[(c[y>>2]|0)+(c[B>>2]<<1)>>1]=e;c[x+(c[B>>2]<<2)>>2]=b[(c[y>>2]|0)+(c[B>>2]<<1)>>1]<<5;c[B>>2]=(c[B>>2]|0)+1}else while(1){if((c[B>>2]|0)>=(c[z>>2]|0))break a;b[(c[y>>2]|0)+(c[B>>2]<<1)>>1]=(c[x+(c[B>>2]<<2)>>2]>>4)+1>>1;c[B>>2]=(c[B>>2]|0)+1}while(0);c[A>>2]=0;while(1){if((c[A>>2]|0)>=16){e=31;break}if((Hf(c[y>>2]|0,c[z>>2]|0)|0)>=107374){e=31;break}xf(x,c[z>>2]|0,65536-(2<>2])|0);c[B>>2]=0;while(1){if((c[B>>2]|0)>=(c[z>>2]|0))break;b[(c[y>>2]|0)+(c[B>>2]<<1)>>1]=(c[x+(c[B>>2]<<2)>>2]>>4)+1>>1;c[B>>2]=(c[B>>2]|0)+1}c[A>>2]=(c[A>>2]|0)+1}if((e|0)==31){l=C;return}}function Mf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;j=k+20|0;e=k+16|0;f=k+12|0;h=k+8|0;i=k+4|0;g=k;c[j>>2]=a;c[e>>2]=b;c[f>>2]=d;c[c[j>>2]>>2]=65536;c[(c[j>>2]|0)+4>>2]=0-(c[c[e>>2]>>2]|0);c[h>>2]=1;while(1){if((c[h>>2]|0)>=(c[f>>2]|0))break;c[g>>2]=c[(c[e>>2]|0)+(c[h>>2]<<1<<2)>>2];d=c[(c[j>>2]|0)+((c[h>>2]|0)-1<<2)>>2]<<1;b=c[g>>2]|0;a=c[(c[j>>2]|0)+(c[h>>2]<<2)>>2]|0;a=Xi(b|0,((b|0)<0)<<31>>31|0,a|0,((a|0)<0)<<31>>31|0)|0;a=Yi(a|0,y|0,15)|0;a=Zi(a|0,y|0,1,0)|0;a=Yi(a|0,y|0,1)|0;c[(c[j>>2]|0)+((c[h>>2]|0)+1<<2)>>2]=d-a;c[i>>2]=c[h>>2];while(1){if((c[i>>2]|0)<=1)break;b=c[(c[j>>2]|0)+((c[i>>2]|0)-2<<2)>>2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|0)+1}o=(Pf(b[e+((c[p>>2]|0)-1<<1)>>1]|0,32768-(b[(c[q>>2]|0)+(c[p>>2]<<1)>>1]|0)|0)|0)&65535;b[(c[r>>2]|0)+((c[p>>2]|0)-1<<1)>>1]=o;c[s>>2]=(c[p>>2]|0)-2;while(1){if((c[s>>2]|0)<0)break;p=(Pf(b[(c[r>>2]|0)+(c[s>>2]<<1)>>1]|0,(b[(c[r>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0)-(b[(c[q>>2]|0)+((c[s>>2]|0)+1<<1)>>1]|0)|0)|0)&65535;b[(c[r>>2]|0)+(c[s>>2]<<1)>>1]=p;c[s>>2]=(c[s>>2]|0)+-1}l=t;return}function Of(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Pf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Qf(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;h=m+20|0;i=m+16|0;f=m+12|0;g=m+8|0;j=m+4|0;k=m;c[h>>2]=a;c[i>>2]=d;c[f>>2]=e;c[j>>2]=Rf(b[c[i>>2]>>1]|0,1)|0;c[j>>2]=131072/(c[j>>2]|0)|0;c[k>>2]=Rf((b[(c[i>>2]|0)+2>>1]|0)-(b[c[i>>2]>>1]|0)|0,1)|0;c[k>>2]=131072/(c[k>>2]|0)|0;d=(Sf((c[j>>2]|0)+(c[k>>2]|0)|0,32767)|0)&65535;b[c[h>>2]>>1]=d;c[g>>2]=1;while(1){e=c[i>>2]|0;if((c[g>>2]|0)>=((c[f>>2]|0)-1|0))break;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]|0)!=8e3&(c[g>>2]|0)!=12e3&(c[g>>2]|0)!=16e3;do if(c[n>>2]|0){if(!(d&(c[g>>2]|0)!=24e3&(c[g>>2]|0)!=48e3)?!((c[h>>2]|0)!=8e3&(c[h>>2]|0)!=12e3&(c[h>>2]|0)!=16e3):0){d=c[i>>2]|0;e=a[30489+((((c[g>>2]>>12)-((c[g>>2]|0)>16e3&1)>>((c[g>>2]|0)>24e3&1))-1|0)*3|0)+(((c[h>>2]>>12)-((c[h>>2]|0)>16e3&1)>>((c[h>>2]|0)>24e3&1))-1)>>0]|0;break}c[j>>2]=-1;n=c[j>>2]|0;l=m;return n|0}else{if(!d?!((c[h>>2]|0)!=8e3&(c[h>>2]|0)!=12e3&(c[h>>2]|0)!=16e3&(c[h>>2]|0)!=24e3&(c[h>>2]|0)!=48e3):0){d=c[i>>2]|0;e=a[30504+((((c[g>>2]>>12)-((c[g>>2]|0)>16e3&1)>>((c[g>>2]|0)>24e3&1))-1|0)*5|0)+(((c[h>>2]>>12)-((c[h>>2]|0)>16e3&1)>>((c[h>>2]|0)>24e3&1))-1)>>0]|0;break}c[j>>2]=-1;n=c[j>>2]|0;l=m;return n|0}while(0);c[d+292>>2]=e;c[(c[i>>2]|0)+284>>2]=(c[g>>2]|0)/1e3|0;c[(c[i>>2]|0)+288>>2]=(c[h>>2]|0)/1e3|0;c[(c[i>>2]|0)+268>>2]=(c[(c[i>>2]|0)+284>>2]|0)*10;c[k>>2]=0;e=c[h>>2]|0;b=c[g>>2]|0;do if((c[h>>2]|0)>(c[g>>2]|0)){d=(c[i>>2]|0)+264|0;if((e|0)==(b<<1|0)){c[d>>2]=1;break}else{c[d>>2]=2;c[k>>2]=1;break}}else{d=(c[i>>2]|0)+264|0;if((e|0)>=(b|0)){c[d>>2]=0;break}c[d>>2]=3;if((c[h>>2]<<2|0)==((c[g>>2]|0)*3|0)){c[(c[i>>2]|0)+280>>2]=3;c[(c[i>>2]|0)+276>>2]=18;c[(c[i>>2]|0)+296>>2]=24842;break}if(((c[h>>2]|0)*3|0)==(c[g>>2]<<1|0)){c[(c[i>>2]|0)+280>>2]=2;c[(c[i>>2]|0)+276>>2]=18;c[(c[i>>2]|0)+296>>2]=24900;break}if((c[h>>2]<<1|0)==(c[g>>2]|0)){c[(c[i>>2]|0)+280>>2]=1;c[(c[i>>2]|0)+276>>2]=24;c[(c[i>>2]|0)+296>>2]=24940;break}if(((c[h>>2]|0)*3|0)==(c[g>>2]|0)){c[(c[i>>2]|0)+280>>2]=1;c[(c[i>>2]|0)+276>>2]=36;c[(c[i>>2]|0)+296>>2]=24968;break}if((c[h>>2]<<2|0)==(c[g>>2]|0)){c[(c[i>>2]|0)+280>>2]=1;c[(c[i>>2]|0)+276>>2]=36;c[(c[i>>2]|0)+296>>2]=25008;break}if(((c[h>>2]|0)*6|0)==(c[g>>2]|0)){c[(c[i>>2]|0)+280>>2]=1;c[(c[i>>2]|0)+276>>2]=36;c[(c[i>>2]|0)+296>>2]=25048;break}c[j>>2]=-1;n=c[j>>2]|0;l=m;return n|0}while(0);c[(c[i>>2]|0)+272>>2]=((c[g>>2]<<14+(c[k>>2]|0)|0)/(c[h>>2]|0)|0)<<2;while(1){n=N(c[(c[i>>2]|0)+272>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;n=n+((N(c[(c[i>>2]|0)+272>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16)|0;n=n+(N(c[(c[i>>2]|0)+272>>2]|0,(c[h>>2]>>15)+1>>1)|0)|0;if((n|0)>=(c[g>>2]<>2]|0))break;n=(c[i>>2]|0)+272|0;c[n>>2]=(c[n>>2]|0)+1}c[j>>2]=0;n=c[j>>2]|0;l=m;return n|0}function Uf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;j=k+12|0;g=k+8|0;h=k+4|0;i=k;c[f>>2]=a;c[j>>2]=b;c[g>>2]=d;c[h>>2]=e;c[i>>2]=(c[(c[f>>2]|0)+284>>2]|0)-(c[(c[f>>2]|0)+292>>2]|0);_i((c[f>>2]|0)+168+(c[(c[f>>2]|0)+292>>2]<<1)|0,c[g>>2]|0,c[i>>2]<<1|0)|0;switch(c[(c[f>>2]|0)+264>>2]|0){case 1:{bg(c[f>>2]|0,c[j>>2]|0,(c[f>>2]|0)+168|0,c[(c[f>>2]|0)+284>>2]|0);bg(c[f>>2]|0,(c[j>>2]|0)+(c[(c[f>>2]|0)+288>>2]<<1)|0,(c[g>>2]|0)+(c[i>>2]<<1)|0,(c[h>>2]|0)-(c[(c[f>>2]|0)+284>>2]|0)|0);break}case 2:{_f(c[f>>2]|0,c[j>>2]|0,(c[f>>2]|0)+168|0,c[(c[f>>2]|0)+284>>2]|0);_f(c[f>>2]|0,(c[j>>2]|0)+(c[(c[f>>2]|0)+288>>2]<<1)|0,(c[g>>2]|0)+(c[i>>2]<<1)|0,(c[h>>2]|0)-(c[(c[f>>2]|0)+284>>2]|0)|0);break}case 3:{Yf(c[f>>2]|0,c[j>>2]|0,(c[f>>2]|0)+168|0,c[(c[f>>2]|0)+284>>2]|0);Yf(c[f>>2]|0,(c[j>>2]|0)+(c[(c[f>>2]|0)+288>>2]<<1)|0,(c[g>>2]|0)+(c[i>>2]<<1)|0,(c[h>>2]|0)-(c[(c[f>>2]|0)+284>>2]|0)|0);break}default:{_i(c[j>>2]|0,(c[f>>2]|0)+168|0,c[(c[f>>2]|0)+284>>2]<<1|0)|0;_i((c[j>>2]|0)+(c[(c[f>>2]|0)+288>>2]<<1)|0,(c[g>>2]|0)+(c[i>>2]<<1)|0,(c[h>>2]|0)-(c[(c[f>>2]|0)+284>>2]|0)<<1|0)|0}}_i((c[f>>2]|0)+168|0,(c[g>>2]|0)+((c[h>>2]|0)-(c[(c[f>>2]|0)+292>>2]|0)<<1)|0,c[(c[f>>2]|0)+292>>2]<<1|0)|0;l=k;return 0}function Vf(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+1968|0;g=q+1964|0;o=q+1960|0;k=q+1956|0;m=q+1952|0;n=q+1948|0;j=q+1944|0;p=q+1940|0;i=q+1936|0;h=q;c[g>>2]=a;c[o>>2]=d;c[k>>2]=e;c[m>>2]=f;d=c[g>>2]|0;c[h>>2]=c[d>>2];c[h+4>>2]=c[d+4>>2];c[h+8>>2]=c[d+8>>2];c[h+12>>2]=c[d+12>>2];while(1){c[n>>2]=(c[m>>2]|0)<480?c[m>>2]|0:480;Xf((c[g>>2]|0)+16|0,h+16|0,c[k>>2]|0,25088,c[n>>2]|0);c[i>>2]=h;c[j>>2]=c[n>>2];while(1){if((c[j>>2]|0)<=2)break;d=N(c[c[i>>2]>>2]>>16,b[12546]|0)|0;c[p>>2]=d+((N(c[c[i>>2]>>2]&65535,b[12546]|0)|0)>>16);d=N(c[(c[i>>2]|0)+4>>2]>>16,b[12547]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+4>>2]&65535,b[12547]|0)|0)>>16));d=N(c[(c[i>>2]|0)+8>>2]>>16,b[12549]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+8>>2]&65535,b[12549]|0)|0)>>16));d=N(c[(c[i>>2]|0)+12>>2]>>16,b[12548]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+12>>2]&65535,b[12548]|0)|0)>>16));if(((c[p>>2]>>5)+1>>1|0)<=32767)if(((c[p>>2]>>5)+1>>1|0)<-32768)a=-32768;else a=(c[p>>2]>>5)+1>>1;else a=32767;d=c[o>>2]|0;c[o>>2]=d+2;b[d>>1]=a;d=N(c[(c[i>>2]|0)+4>>2]>>16,b[12548]|0)|0;c[p>>2]=d+((N(c[(c[i>>2]|0)+4>>2]&65535,b[12548]|0)|0)>>16);d=N(c[(c[i>>2]|0)+8>>2]>>16,b[12549]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+8>>2]&65535,b[12549]|0)|0)>>16));d=N(c[(c[i>>2]|0)+12>>2]>>16,b[12547]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+12>>2]&65535,b[12547]|0)|0)>>16));d=N(c[(c[i>>2]|0)+16>>2]>>16,b[12546]|0)|0;c[p>>2]=(c[p>>2]|0)+(d+((N(c[(c[i>>2]|0)+16>>2]&65535,b[12546]|0)|0)>>16));if(((c[p>>2]>>5)+1>>1|0)<=32767)if(((c[p>>2]>>5)+1>>1|0)<-32768)a=-32768;else a=(c[p>>2]>>5)+1>>1;else a=32767;d=c[o>>2]|0;c[o>>2]=d+2;b[d>>1]=a;c[i>>2]=(c[i>>2]|0)+12;c[j>>2]=(c[j>>2]|0)-3}c[k>>2]=(c[k>>2]|0)+(c[n>>2]<<1);c[m>>2]=(c[m>>2]|0)-(c[n>>2]|0);if((c[m>>2]|0)<=0)break;d=h+(c[n>>2]<<2)|0;c[h>>2]=c[d>>2];c[h+4>>2]=c[d+4>>2];c[h+8>>2]=c[d+8>>2];c[h+12>>2]=c[d+12>>2]}p=c[g>>2]|0;o=h+(c[n>>2]<<2)|0;c[p>>2]=c[o>>2];c[p+4>>2]=c[o+4>>2];c[p+8>>2]=c[o+8>>2];c[p+12>>2]=c[o+12>>2];l=q;return}function Wf(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+48|0;g=q+36|0;o=q+32|0;j=q+28|0;r=q+24|0;m=q+20|0;n=q+16|0;k=q+12|0;p=q+8|0;i=q+4|0;h=q;c[g>>2]=a;c[o>>2]=d;c[j>>2]=e;c[r>>2]=f;c[n>>2]=c[r>>2]>>1;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;c[k>>2]=b[(c[j>>2]|0)+(c[m>>2]<<1<<1)>>1]<<10;c[i>>2]=(c[k>>2]|0)-(c[c[g>>2]>>2]|0);r=N(c[i>>2]>>16,-25727)|0;c[h>>2]=(c[i>>2]|0)+(r+((N(c[i>>2]&65535,-25727)|0)>>16));c[p>>2]=(c[c[g>>2]>>2]|0)+(c[h>>2]|0);c[c[g>>2]>>2]=(c[k>>2]|0)+(c[h>>2]|0);c[k>>2]=b[(c[j>>2]|0)+((c[m>>2]<<1)+1<<1)>>1]<<10;c[i>>2]=(c[k>>2]|0)-(c[(c[g>>2]|0)+4>>2]|0);c[h>>2]=((c[i>>2]>>16)*9872|0)+((c[i>>2]&65535)*9872>>16);c[p>>2]=(c[p>>2]|0)+(c[(c[g>>2]|0)+4>>2]|0);c[p>>2]=(c[p>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+4>>2]=(c[k>>2]|0)+(c[h>>2]|0);if(((c[p>>2]>>10)+1>>1|0)<=32767)if(((c[p>>2]>>10)+1>>1|0)<-32768)a=-32768;else a=(c[p>>2]>>10)+1>>1;else a=32767;b[(c[o>>2]|0)+(c[m>>2]<<1)>>1]=a;c[m>>2]=(c[m>>2]|0)+1}l=q;return}function Xf(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;i=p+24|0;o=p+20|0;j=p+16|0;h=p+12|0;m=p+8|0;k=p+4|0;n=p;c[i>>2]=a;c[o>>2]=d;c[j>>2]=e;c[h>>2]=f;c[m>>2]=g;c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[m>>2]|0))break;c[n>>2]=(c[c[i>>2]>>2]|0)+(b[(c[j>>2]|0)+(c[k>>2]<<1)>>1]<<8);c[(c[o>>2]|0)+(c[k>>2]<<2)>>2]=c[n>>2];c[n>>2]=c[n>>2]<<2;d=N(c[n>>2]>>16,b[c[h>>2]>>1]|0)|0;d=(c[(c[i>>2]|0)+4>>2]|0)+(d+((N(c[n>>2]&65535,b[c[h>>2]>>1]|0)|0)>>16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[p>>2]|0)+52>>2]|0)&65535,b[(c[n>>2]|0)+20>>1]|0)|0)>>16));w=N((c[(c[p>>2]|0)+44>>2]|0)+(c[(c[p>>2]|0)+48>>2]|0)>>16,b[(c[n>>2]|0)+22>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+44>>2]|0)+(c[(c[p>>2]|0)+48>>2]|0)&65535,b[(c[n>>2]|0)+22>>1]|0)|0)>>16));if(((c[u>>2]>>5)+1>>1|0)<=32767)if(((c[u>>2]>>5)+1>>1|0)<-32768)e=-32768;else e=(c[u>>2]>>5)+1>>1;else e=32767;w=c[t>>2]|0;c[t>>2]=w+2;b[w>>1]=e;c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0)}w=c[t>>2]|0;l=v;return w|0}case 36:{c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[s>>2]|0))break;c[p>>2]=(c[o>>2]|0)+(c[q>>2]>>16<<2);w=N((c[c[p>>2]>>2]|0)+(c[(c[p>>2]|0)+140>>2]|0)>>16,b[c[n>>2]>>1]|0)|0;c[u>>2]=w+((N((c[c[p>>2]>>2]|0)+(c[(c[p>>2]|0)+140>>2]|0)&65535,b[c[n>>2]>>1]|0)|0)>>16);w=N((c[(c[p>>2]|0)+4>>2]|0)+(c[(c[p>>2]|0)+136>>2]|0)>>16,b[(c[n>>2]|0)+2>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+4>>2]|0)+(c[(c[p>>2]|0)+136>>2]|0)&65535,b[(c[n>>2]|0)+2>>1]|0)|0)>>16));w=N((c[(c[p>>2]|0)+8>>2]|0)+(c[(c[p>>2]|0)+132>>2]|0)>>16,b[(c[n>>2]|0)+4>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+8>>2]|0)+(c[(c[p>>2]|0)+132>>2]|0)&65535,b[(c[n>>2]|0)+4>>1]|0)|0)>>16));w=N((c[(c[p>>2]|0)+12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>>2]|0)>>16,b[(c[n>>2]|0)+28>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+56>>2]|0)+(c[(c[p>>2]|0)+84>>2]|0)&65535,b[(c[n>>2]|0)+28>>1]|0)|0)>>16));w=N((c[(c[p>>2]|0)+60>>2]|0)+(c[(c[p>>2]|0)+80>>2]|0)>>16,b[(c[n>>2]|0)+30>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+60>>2]|0)+(c[(c[p>>2]|0)+80>>2]|0)&65535,b[(c[n>>2]|0)+30>>1]|0)|0)>>16));w=N((c[(c[p>>2]|0)+64>>2]|0)+(c[(c[p>>2]|0)+76>>2]|0)>>16,b[(c[n>>2]|0)+32>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+64>>2]|0)+(c[(c[p>>2]|0)+76>>2]|0)&65535,b[(c[n>>2]|0)+32>>1]|0)|0)>>16));w=N((c[(c[p>>2]|0)+68>>2]|0)+(c[(c[p>>2]|0)+72>>2]|0)>>16,b[(c[n>>2]|0)+34>>1]|0)|0;c[u>>2]=(c[u>>2]|0)+(w+((N((c[(c[p>>2]|0)+68>>2]|0)+(c[(c[p>>2]|0)+72>>2]|0)&65535,b[(c[n>>2]|0)+34>>1]|0)|0)>>16));if(((c[u>>2]>>5)+1>>1|0)<=32767)if(((c[u>>2]>>5)+1>>1|0)<-32768)e=-32768;else e=(c[u>>2]>>5)+1>>1;else e=32767;w=c[t>>2]|0;c[t>>2]=w+2;b[w>>1]=e;c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0)}w=c[t>>2]|0;l=v;return w|0}default:{w=c[t>>2]|0;l=v;return w|0}}return 0}function _f(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+48|0;q=p+32|0;n=p+28|0;h=p+24|0;i=p+20|0;g=p+16|0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>1]|0;b[q+14>>1]=b[n+14>>1]|0;_(c[o>>2]|0);l=p;return}function $f(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;m=p+28|0;g=p+24|0;k=p+20|0;j=p+16|0;i=p+12|0;n=p+8|0;h=p+4|0;o=p;c[m>>2]=a;c[g>>2]=d;c[k>>2]=e;c[j>>2]=f;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[k>>2]|0))break;c[o>>2]=(((c[i>>2]&65535)>>16)*12|0)+((c[i>>2]&65535)*12>>16);c[h>>2]=(c[g>>2]|0)+(c[i>>2]>>16<<1);c[n>>2]=N(b[c[h>>2]>>1]|0,b[25100+(c[o>>2]<<3)>>1]|0)|0;c[n>>2]=(c[n>>2]|0)+(N(b[(c[h>>2]|0)+2>>1]|0,b[25100+(c[o>>2]<<3)+2>>1]|0)|0);c[n>>2]=(c[n>>2]|0)+(N(b[(c[h>>2]|0)+4>>1]|0,b[25100+(c[o>>2]<<3)+4>>1]|0)|0);c[n>>2]=(c[n>>2]|0)+(N(b[(c[h>>2]|0)+6>>1]|0,b[25100+(c[o>>2]<<3)+6>>1]|0)|0);c[n>>2]=(c[n>>2]|0)+(N(b[(c[h>>2]|0)+8>>1]|0,b[25100+(11-(c[o>>2]|0)<<3)+6>>1]|0)|0);c[n>>2]=(c[n>>2]|0)+(N(b[(c[h>>2]|0)+10>>1]|0,b[25100+(11-(c[o>>2]|0)<<3)+4>>1]|0)|0);c[n>>2]=(c[n>>2]|0)+(N(b[(c[h>>2]|0)+12>>1]|0,b[25100+(11-(c[o>>2]|0)<<3)+2>>1]|0)|0);c[n>>2]=(c[n>>2]|0)+(N(b[(c[h>>2]|0)+14>>1]|0,b[25100+(11-(c[o>>2]|0)<<3)>>1]|0)|0);if(((c[n>>2]>>14)+1>>1|0)<=32767)if(((c[n>>2]>>14)+1>>1|0)<-32768)d=-32768;else d=(c[n>>2]>>14)+1>>1;else d=32767;a=c[m>>2]|0;c[m>>2]=a+2;b[a>>1]=d;c[i>>2]=(c[i>>2]|0)+(c[j>>2]|0)}l=p;return c[m>>2]|0}function ag(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;g=r+36|0;o=r+32|0;j=r+28|0;n=r+24|0;m=r+20|0;k=r+16|0;p=r+12|0;q=r+8|0;i=r+4|0;h=r;c[g>>2]=a;c[o>>2]=d;c[j>>2]=e;c[n>>2]=f;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;c[k>>2]=b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]<<10;c[i>>2]=(c[k>>2]|0)-(c[c[g>>2]>>2]|0);d=N(c[i>>2]>>16,b[12415]|0)|0;c[h>>2]=d+((N(c[i>>2]&65535,b[12415]|0)|0)>>16);c[p>>2]=(c[c[g>>2]>>2]|0)+(c[h>>2]|0);c[c[g>>2]>>2]=(c[k>>2]|0)+(c[h>>2]|0);c[i>>2]=(c[p>>2]|0)-(c[(c[g>>2]|0)+4>>2]|0);d=N(c[i>>2]>>16,b[12416]|0)|0;c[h>>2]=d+((N(c[i>>2]&65535,b[12416]|0)|0)>>16);c[q>>2]=(c[(c[g>>2]|0)+4>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+4>>2]=(c[p>>2]|0)+(c[h>>2]|0);c[i>>2]=(c[q>>2]|0)-(c[(c[g>>2]|0)+8>>2]|0);d=N(c[i>>2]>>16,b[12417]|0)|0;c[h>>2]=(c[i>>2]|0)+(d+((N(c[i>>2]&65535,b[12417]|0)|0)>>16));c[p>>2]=(c[(c[g>>2]|0)+8>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+8>>2]=(c[q>>2]|0)+(c[h>>2]|0);if(((c[p>>2]>>9)+1>>1|0)<=32767)if(((c[p>>2]>>9)+1>>1|0)<-32768)a=-32768;else a=(c[p>>2]>>9)+1>>1;else a=32767;b[(c[o>>2]|0)+(c[m>>2]<<1<<1)>>1]=a;c[i>>2]=(c[k>>2]|0)-(c[(c[g>>2]|0)+12>>2]|0);d=N(c[i>>2]>>16,b[12418]|0)|0;c[h>>2]=d+((N(c[i>>2]&65535,b[12418]|0)|0)>>16);c[p>>2]=(c[(c[g>>2]|0)+12>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+12>>2]=(c[k>>2]|0)+(c[h>>2]|0);c[i>>2]=(c[p>>2]|0)-(c[(c[g>>2]|0)+16>>2]|0);d=N(c[i>>2]>>16,b[12419]|0)|0;c[h>>2]=d+((N(c[i>>2]&65535,b[12419]|0)|0)>>16);c[q>>2]=(c[(c[g>>2]|0)+16>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+16>>2]=(c[p>>2]|0)+(c[h>>2]|0);c[i>>2]=(c[q>>2]|0)-(c[(c[g>>2]|0)+20>>2]|0);d=N(c[i>>2]>>16,b[12420]|0)|0;c[h>>2]=(c[i>>2]|0)+(d+((N(c[i>>2]&65535,b[12420]|0)|0)>>16));c[p>>2]=(c[(c[g>>2]|0)+20>>2]|0)+(c[h>>2]|0);c[(c[g>>2]|0)+20>>2]=(c[q>>2]|0)+(c[h>>2]|0);if(((c[p>>2]>>9)+1>>1|0)<=32767)if(((c[p>>2]>>9)+1>>1|0)<-32768)a=-32768;else a=(c[p>>2]>>9)+1>>1;else a=32767;b[(c[o>>2]|0)+((c[m>>2]<<1)+1<<1)>>1]=a;c[m>>2]=(c[m>>2]|0)+1}l=r;return}function bg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=l;l=l+32|0;k=f+16|0;i=f+12|0;h=f+8|0;g=f+4|0;j=f;c[k>>2]=a;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;c[j>>2]=c[k>>2];ag(c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,c[g>>2]|0);l=f;return}function cg(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;e=f+8|0;b=f+4|0;d=f;c[b>>2]=a;a=c[b>>2]|0;if((c[b>>2]|0)<0){c[b>>2]=0-a;if((c[b>>2]|0)>=192){c[e>>2]=0;e=c[e>>2]|0;l=f;return e|0}else{c[d>>2]=c[b>>2]>>5;c[e>>2]=(c[17960+(c[d>>2]<<2)>>2]|0)-(N((c[17984+(c[d>>2]<<2)>>2]&65535)<<16>>16,(c[b>>2]&31)<<16>>16)|0);e=c[e>>2]|0;l=f;return e|0}}else if((a|0)>=192){c[e>>2]=32767;e=c[e>>2]|0;l=f;return e|0}else{c[d>>2]=c[b>>2]>>5;c[e>>2]=(c[18008+(c[d>>2]<<2)>>2]|0)+(N((c[17984+(c[d>>2]<<2)>>2]&65535)<<16>>16,(c[b>>2]&31)<<16>>16)|0);e=c[e>>2]|0;l=f;return e|0}return 0}function dg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+24|0;j=n+20|0;g=n+16|0;f=n+12|0;m=n+8|0;i=n+4|0;k=n;c[h>>2]=a;c[j>>2]=b;c[g>>2]=d;c[f>>2]=e;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[f>>2]|0))break;c[(c[j>>2]|0)+(c[i>>2]<<2)>>2]=c[i>>2];c[i>>2]=(c[i>>2]|0)+1}c[i>>2]=1;while(1){if((c[i>>2]|0)>=(c[f>>2]|0))break;c[m>>2]=c[(c[h>>2]|0)+(c[i>>2]<<2)>>2];c[k>>2]=(c[i>>2]|0)-1;while(1){if((c[k>>2]|0)<0)break;if((c[m>>2]|0)>=(c[(c[h>>2]|0)+(c[k>>2]<<2)>>2]|0))break;c[(c[h>>2]|0)+((c[k>>2]|0)+1<<2)>>2]=c[(c[h>>2]|0)+(c[k>>2]<<2)>>2];c[(c[j>>2]|0)+((c[k>>2]|0)+1<<2)>>2]=c[(c[j>>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K>>2]=(c[K>>2]|0)+1}l=$;return (c[L>>2]|0?0:c[w>>2]|0)|0}function Mc(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+24>>2]|0}function Nc(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[c[b>>2]>>2]|0}function Oc(a,d,e,f,h,i,j,k){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0.0;y=l;l=l+64|0;u=y+44|0;A=y+40|0;p=y+36|0;w=y+32|0;q=y+28|0;r=y+24|0;o=y+20|0;m=y+16|0;t=y+12|0;n=y+8|0;s=y+48|0;x=y+4|0;v=y;c[u>>2]=a;c[A>>2]=d;c[p>>2]=e;c[w>>2]=f;c[q>>2]=h;c[r>>2]=i;c[o>>2]=j;c[m>>2]=k;c[t>>2]=c[A>>2];while(1){if((c[t>>2]|0)>=(c[p>>2]|0))break;b[s>>1]=1<>2]|0)+(c[t>>2]<<2)>>2];if((c[(c[r>>2]|0)+(c[t>>2]<<2)>>2]|0)>0){c[n>>2]=0;do{B=+g[(c[q>>2]|0)+((c[t>>2]|0)+(N(c[n>>2]|0,c[(c[u>>2]|0)+8>>2]|0)|0)<<2)>>2]+.5;c[x>>2]=~~+z(+(B*+(b[s>>1]|0)));if((c[x>>2]|0)>((b[s>>1]|0)-1|0))c[x>>2]=(b[s>>1]|0)-1;if((c[x>>2]|0)<0)c[x>>2]=0;bc(c[o>>2]|0,c[x>>2]|0,c[(c[r>>2]|0)+(c[t>>2]<<2)>>2]|0);g[v>>2]=(+(c[x>>2]|0)+.5)*+(1<<14-(c[(c[r>>2]|0)+(c[t>>2]<<2)>>2]|0)|0)*.00006103515625-.5;A=(c[w>>2]|0)+((c[t>>2]|0)+(N(c[n>>2]|0,c[(c[u>>2]|0)+8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]|0));Cb(b,c[k>>2]|0,c[j>>2]|0,c[t>>2]|0);c[s>>2]=Zc(b,c[k>>2]|0,c[i>>2]|0)|0;G=c[s>>2]|0;_(c[A>>2]|0);l=F;return G|0}function Yc(a,b,d,e,f,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=l;l=l+64|0;j=w+48|0;q=w+44|0;m=w+40|0;t=w+36|0;i=w+32|0;s=w+28|0;p=w+24|0;k=w+20|0;r=w+16|0;o=w+12|0;v=w+8|0;u=w+4|0;n=w;c[j>>2]=a;c[q>>2]=b;c[m>>2]=d;c[t>>2]=e;c[i>>2]=f;c[s>>2]=h;c[u>>2]=0;if((c[s>>2]|0)==0?1:(c[i>>2]<<1|0)>=(c[q>>2]|0)){l=w;return}c[n>>2]=c[17596+((c[s>>2]|0)-1<<2)>>2];g[o>>2]=+(c[q>>2]|0)*1.0/+((c[q>>2]|0)+(N(c[n>>2]|0,c[i>>2]|0)|0)|0);g[v>>2]=+g[o>>2]*+g[o>>2]*.5;g[k>>2]=+D(+(+g[v>>2]*1.5707963705062866));g[r>>2]=+D(+((1.0-+g[v>>2])*1.5707963705062866));a:do if((c[q>>2]|0)>=(c[t>>2]<<3|0)){c[u>>2]=1;while(1){v=N(c[u>>2]|0,c[u>>2]|0)|0;v=N(v+(c[u>>2]|0)|0,c[t>>2]|0)|0;if((v+(c[t>>2]>>2)|0)>=(c[q>>2]|0))break a;c[u>>2]=(c[u>>2]|0)+1}}while(0);c[q>>2]=_c(c[q>>2]|0,c[t>>2]|0)|0;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))break;if((c[m>>2]|0)>=0){v=(c[j>>2]|0)+((N(c[p>>2]|0,c[q>>2]|0)|0)<<2)|0;$c(v,c[q>>2]|0,1,+g[k>>2],-+g[r>>2]);if(c[u>>2]|0){v=(c[j>>2]|0)+((N(c[p>>2]|0,c[q>>2]|0)|0)<<2)|0;$c(v,c[q>>2]|0,c[u>>2]|0,+g[r>>2],-+g[k>>2])}}else{if(c[u>>2]|0){v=(c[j>>2]|0)+((N(c[p>>2]|0,c[q>>2]|0)|0)<<2)|0;$c(v,c[q>>2]|0,c[u>>2]|0,+g[r>>2],+g[k>>2])}v=(c[j>>2]|0)+((N(c[p>>2]|0,c[q>>2]|0)|0)<<2)|0;$c(v,c[q>>2]|0,1,+g[k>>2],+g[r>>2])}c[p>>2]=(c[p>>2]|0)+1}l=w;return}function Zc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;m=o+32|0;j=o+28|0;f=o+24|0;e=o+20|0;h=o+16|0;g=o+12|0;i=o+8|0;k=o+4|0;n=o;c[j>>2]=a;c[f>>2]=b;c[e>>2]=d;if((c[e>>2]|0)<=1){c[m>>2]=1;n=c[m>>2]|0;l=o;return n|0}c[g>>2]=_c(c[f>>2]|0,c[e>>2]|0)|0;c[h>>2]=0;c[i>>2]=0;do{c[n>>2]=0;c[k>>2]=0;do{a=N(c[i>>2]|0,c[g>>2]|0)|0;c[n>>2]=c[n>>2]|c[(c[j>>2]|0)+(a+(c[k>>2]|0)<<2)>>2];a=(c[k>>2]|0)+1|0;c[k>>2]=a}while((a|0)<(c[g>>2]|0));c[h>>2]=c[h>>2]|((c[n>>2]|0)!=0&1)<>2];a=(c[i>>2]|0)+1|0;c[i>>2]=a}while((a|0)<(c[e>>2]|0));c[m>>2]=c[h>>2];n=c[m>>2]|0;l=o;return n|0}function _c(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>>>0)/((c[d>>2]|0)>>>0)|0|0}function $c(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=+e;f=+f;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=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=c[m>>2];c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[f>>2]|0))break;g[c[j>>2]>>2]=+g[h>>2]*+g[c[j>>2]>>2];c[j>>2]=(c[j>>2]|0)+4;c[i>>2]=(c[i>>2]|0)+1}l=k;return}function dd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;i=m+16|0;k=m+12|0;f=m+8|0;h=m+4|0;j=m;c[i>>2]=a;c[k>>2]=b;c[f>>2]=d;g[j>>2]=0.0;c[h>>2]=0;while(1){e=+g[j>>2];if((c[h>>2]|0)>=(c[f>>2]|0))break;g[j>>2]=e+ +g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]*+g[(c[k>>2]|0)+(c[h>>2]<<2)>>2];c[h>>2]=(c[h>>2]|0)+1}l=m;return +e}function ed(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0.0;t=l;l=l+64|0;k=t+48|0;m=t+44|0;u=t+40|0;j=t+36|0;n=t+28|0;o=t+24|0;q=t+20|0;s=t+16|0;h=t+12|0;i=t+8|0;p=t+4|0;r=t;c[k>>2]=a;c[m>>2]=b;c[u>>2]=d;c[j>>2]=e;c[t+32>>2]=f;g[i>>2]=1.0000000036274937e-15;g[h>>2]=1.0000000036274937e-15;a:do if(c[u>>2]|0){c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[j>>2]|0))break a;g[p>>2]=+g[(c[k>>2]|0)+(c[n>>2]<<2)>>2]+ +g[(c[m>>2]|0)+(c[n>>2]<<2)>>2];g[r>>2]=+g[(c[k>>2]|0)+(c[n>>2]<<2)>>2]-+g[(c[m>>2]|0)+(c[n>>2]<<2)>>2];g[h>>2]=+g[h>>2]+ +g[p>>2]*+g[p>>2];g[i>>2]=+g[i>>2]+ +g[r>>2]*+g[r>>2];c[n>>2]=(c[n>>2]|0)+1}}else{v=+dd(c[k>>2]|0,c[k>>2]|0,c[j>>2]|0);g[h>>2]=+g[h>>2]+v;v=+dd(c[m>>2]|0,c[m>>2]|0,c[j>>2]|0);g[i>>2]=+g[i>>2]+v}while(0);g[q>>2]=+B(+(+g[h>>2]));g[s>>2]=+B(+(+g[i>>2]));c[o>>2]=~~+z(+(+J(+(+g[s>>2]),+(+g[q>>2]))*10430.3818359375+.5));l=t;return c[o>>2]|0}function fd(a){a=a|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+12|0;f=h+8|0;e=h+4|0;d=h;c[g>>2]=a;c[e>>2]=32767/((c[(c[g>>2]|0)+2340>>2]|0)+1|0)|0;c[d>>2]=0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[g>>2]|0)+2340>>2]|0))break;c[d>>2]=(c[d>>2]|0)+(c[e>>2]|0);b[(c[g>>2]|0)+2772+1280+(c[f>>2]<<1)>>1]=c[d>>2];c[f>>2]=(c[f>>2]|0)+1}c[(c[g>>2]|0)+2772+1376>>2]=0;c[(c[g>>2]|0)+2772+1380>>2]=3176576;l=h;return}function gd(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+80|0;q=t+40|0;h=t+36|0;m=t+32|0;o=t+28|0;n=t+24|0;i=t+20|0;s=t+16|0;g=t+12|0;j=t+8|0;k=t+48|0;p=t+4|0;r=t;c[q>>2]=a;c[h>>2]=d;c[m>>2]=e;c[o>>2]=f;c[p>>2]=(c[q>>2]|0)+2772;if((c[(c[q>>2]|0)+2316>>2]|0)!=(c[(c[p>>2]|0)+1384>>2]|0)){fd(c[q>>2]|0);c[(c[p>>2]|0)+1384>>2]=c[(c[q>>2]|0)+2316>>2]}a:do if((c[(c[q>>2]|0)+4160>>2]|0)==0?(c[(c[q>>2]|0)+4164>>2]|0)==0:0){c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[(c[q>>2]|0)+2340>>2]|0))break;d=(c[p>>2]|0)+1280+(c[n>>2]<<1)|0;b[d>>1]=(b[d>>1]|0)+((((b[(c[q>>2]|0)+2344+(c[n>>2]<<1)>>1]|0)-(b[(c[p>>2]|0)+1280+(c[n>>2]<<1)>>1]|0)>>16)*16348|0)+(((b[(c[q>>2]|0)+2344+(c[n>>2]<<1)>>1]|0)-(b[(c[p>>2]|0)+1280+(c[n>>2]<<1)>>1]|0)&65535)*16348>>16));c[n>>2]=(c[n>>2]|0)+1}c[g>>2]=0;c[i>>2]=0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[(c[q>>2]|0)+2324>>2]|0))break;if((c[(c[h>>2]|0)+16+(c[n>>2]<<2)>>2]|0)>(c[g>>2]|0)){c[g>>2]=c[(c[h>>2]|0)+16+(c[n>>2]<<2)>>2];c[i>>2]=c[n>>2]}c[n>>2]=(c[n>>2]|0)+1}$i((c[p>>2]|0)+(c[(c[q>>2]|0)+2332>>2]<<2)|0,c[p>>2]|0,(N((c[(c[q>>2]|0)+2324>>2]|0)-1|0,c[(c[q>>2]|0)+2332>>2]|0)|0)<<2|0)|0;i=(c[q>>2]|0)+4+((N(c[i>>2]|0,c[(c[q>>2]|0)+2332>>2]|0)|0)<<2)|0;_i(c[p>>2]|0,i|0,c[(c[q>>2]|0)+2332>>2]<<2|0)|0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[(c[q>>2]|0)+2324>>2]|0))break a;i=(c[p>>2]|0)+1376|0;c[i>>2]=(c[i>>2]|0)+((((c[(c[h>>2]|0)+16+(c[n>>2]<<2)>>2]|0)-(c[(c[p>>2]|0)+1376>>2]|0)>>16)*4634|0)+(((c[(c[h>>2]|0)+16+(c[n>>2]<<2)>>2]|0)-(c[(c[p>>2]|0)+1376>>2]|0)&65535)*4634>>16));c[n>>2]=(c[n>>2]|0)+1}}while(0);if(!(c[(c[q>>2]|0)+4160>>2]|0)){aj((c[p>>2]|0)+1312|0,0,c[(c[q>>2]|0)+2340>>2]<<2|0)|0;l=t;return}i=(c[o>>2]|0)+16|0;c[r>>2]=$()|0;a=l;l=l+((1*(i<<2)|0)+15&-16)|0;i=N(b[(c[q>>2]|0)+4168+56>>1]>>16,(c[(c[q>>2]|0)+4168+72+4>>2]&65535)<<16>>16)|0;i=i+((N(b[(c[q>>2]|0)+4168+56>>1]&65535,(c[(c[q>>2]|0)+4168+72+4>>2]&65535)<<16>>16)|0)>>16)|0;c[j>>2]=i+(N(b[(c[q>>2]|0)+4168+56>>1]|0,(c[(c[q>>2]|0)+4168+72+4>>2]>>15)+1>>1)|0);if((c[j>>2]|0)<2097152?(c[(c[p>>2]|0)+1376>>2]|0)<=8388608:0){i=N(c[j>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;i=i+((N(c[j>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16)|0;c[j>>2]=i+(N(c[j>>2]|0,(c[j>>2]>>15)+1>>1)|0);i=N(c[(c[p>>2]|0)+1376>>2]>>16,(c[(c[p>>2]|0)+1376>>2]&65535)<<16>>16)|0;i=i+((N(c[(c[p>>2]|0)+1376>>2]&65535,(c[(c[p>>2]|0)+1376>>2]&65535)<<16>>16)|0)>>16)|0;i=i+(N(c[(c[p>>2]|0)+1376>>2]|0,(c[(c[p>>2]|0)+1376>>2]>>15)+1>>1)|0)|0;c[j>>2]=i-(c[j>>2]<<5);c[j>>2]=(hd(c[j>>2]|0)|0)<<8}else{c[j>>2]=N(c[j>>2]>>16,c[j>>2]>>16)|0;i=N(c[(c[p>>2]|0)+1376>>2]>>16,c[(c[p>>2]|0)+1376>>2]>>16)|0;c[j>>2]=i-(c[j>>2]<<5);c[j>>2]=(hd(c[j>>2]|0)|0)<<16}id(a+64|0,c[p>>2]|0,c[j>>2]|0,c[o>>2]|0,(c[p>>2]|0)+1380|0);Lf(k,(c[p>>2]|0)+1280|0,c[(c[q>>2]|0)+2340>>2]|0);e=a;f=(c[p>>2]|0)+1312|0;g=e+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+(c[n>>2]|0)-8<<2)>>2]>>16,b[k+14>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-8<<2)>>2]&65535,b[k+14>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-9<<2)>>2]>>16,b[k+16>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-9<<2)>>2]&65535,b[k+16>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-10<<2)>>2]>>16,b[k+18>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-10<<2)>>2]&65535,b[k+18>>1]|0)|0)>>16));if((c[(c[q>>2]|0)+2340>>2]|0)==16){j=N(c[a+(16+(c[n>>2]|0)-11<<2)>>2]>>16,b[k+20>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-11<<2)>>2]&65535,b[k+20>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-12<<2)>>2]>>16,b[k+22>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-12<<2)>>2]&65535,b[k+22>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-13<<2)>>2]>>16,b[k+24>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-13<<2)>>2]&65535,b[k+24>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-14<<2)>>2]>>16,b[k+26>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-14<<2)>>2]&65535,b[k+26>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-15<<2)>>2]>>16,b[k+28>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-15<<2)>>2]&65535,b[k+28>>1]|0)|0)>>16));j=N(c[a+(16+(c[n>>2]|0)-16<<2)>>2]>>16,b[k+30>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(j+((N(c[a+(16+(c[n>>2]|0)-16<<2)>>2]&65535,b[k+30>>1]|0)|0)>>16))}c[a+(16+(c[n>>2]|0)<<2)>>2]=(c[a+(16+(c[n>>2]|0)<<2)>>2]|0)+(c[s>>2]<<4);if(((b[(c[m>>2]|0)+(c[n>>2]<<1)>>1]|0)+((c[a+(16+(c[n>>2]|0)<<2)>>2]>>9)+1>>1)|0)<=32767)if(((b[(c[m>>2]|0)+(c[n>>2]<<1)>>1]|0)+((c[a+(16+(c[n>>2]|0)<<2)>>2]>>9)+1>>1)|0)<-32768)e=-32768;else e=(b[(c[m>>2]|0)+(c[n>>2]<<1)>>1]|0)+((c[a+(16+(c[n>>2]|0)<<2)>>2]>>9)+1>>1)|0;else e=32767;b[(c[m>>2]|0)+(c[n>>2]<<1)>>1]=e;c[n>>2]=(c[n>>2]|0)+1}e=(c[p>>2]|0)+1312|0;f=a+(c[o>>2]<<2)|0;g=e+64|0;do{c[e>>2]=c[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));_(c[r>>2]|0);l=t;return}function hd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}jd(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function id(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;h=q+32|0;i=q+28|0;g=q+24|0;n=q+20|0;o=q+16|0;p=q+12|0;k=q+8|0;m=q+4|0;j=q;c[h>>2]=a;c[i>>2]=b;c[g>>2]=d;c[n>>2]=e;c[o>>2]=f;c[j>>2]=255;while(1){if((c[j>>2]|0)<=(c[n>>2]|0))break;c[j>>2]=c[j>>2]>>1}c[p>>2]=c[c[o>>2]>>2];c[k>>2]=0;while(1){d=c[p>>2]|0;if((c[k>>2]|0)>=(c[n>>2]|0))break;c[p>>2]=907633515+(N(d,196314165)|0);c[m>>2]=c[p>>2]>>24&c[j>>2];f=N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]>>16,(c[g>>2]>>4&65535)<<16>>16)|0;f=f+((N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]&65535,(c[g>>2]>>4&65535)<<16>>16)|0)>>16)|0;if((f+(N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]|0,(c[g>>2]>>4>>15)+1>>1)|0)|0)<=32767){f=N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]>>16,(c[g>>2]>>4&65535)<<16>>16)|0;f=f+((N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]&65535,(c[g>>2]>>4&65535)<<16>>16)|0)>>16)|0;if((f+(N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]|0,(c[g>>2]>>4>>15)+1>>1)|0)|0)<-32768)d=-32768;else{d=N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]>>16,(c[g>>2]>>4&65535)<<16>>16)|0;d=d+((N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]&65535,(c[g>>2]>>4&65535)<<16>>16)|0)>>16)|0;d=d+(N(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]|0,(c[g>>2]>>4>>15)+1>>1)|0)|0}}else d=32767;c[(c[h>>2]|0)+(c[k>>2]<<2)>>2]=(d&65535)<<16>>16;c[k>>2]=(c[k>>2]|0)+1}c[c[o>>2]>>2]=d;l=q;return}function jd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=kd(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(ld(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function kd(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function ld(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function md(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;s=l;l=l+48|0;p=s+40|0;v=s+36|0;n=s+32|0;t=s+28|0;u=s+24|0;r=s+20|0;i=s+16|0;m=s+12|0;o=s+8|0;j=s+44|0;q=s+4|0;k=s;c[p>>2]=b;c[v>>2]=d;c[n>>2]=e;c[t>>2]=f;c[u>>2]=g;c[r>>2]=h;a[j+1>>0]=0;c[q>>2]=c[v>>2];c[i>>2]=(((c[u>>2]|0)+(c[t>>2]<<1)&65535)<<16>>16)*7;c[k>>2]=30180+(c[i>>2]|0);c[n>>2]=(c[n>>2]|0)+8>>4;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[n>>2]|0))break;c[o>>2]=c[(c[r>>2]|0)+(c[i>>2]<<2)>>2];a:do if((c[o>>2]|0)>0){a[j>>0]=a[(c[k>>2]|0)+((c[o>>2]&31|0)<6?c[o>>2]&31:6)>>0]|0;c[m>>2]=0;while(1){if((c[m>>2]|0)>=16)break a;if(a[(c[q>>2]|0)+(c[m>>2]|0)>>0]|0)$b(c[p>>2]|0,(a[(c[q>>2]|0)+(c[m>>2]|0)>>0]>>15)+1|0,j,8);c[m>>2]=(c[m>>2]|0)+1}}while(0);c[q>>2]=(c[q>>2]|0)+16;c[i>>2]=(c[i>>2]|0)+1}l=s;return}function nd(d,e,f,g,h,i){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;t=l;l=l+48|0;q=t+40|0;w=t+36|0;o=t+32|0;u=t+28|0;v=t+24|0;s=t+20|0;j=t+16|0;n=t+12|0;p=t+8|0;k=t+44|0;r=t+4|0;m=t;c[q>>2]=d;c[w>>2]=e;c[o>>2]=f;c[u>>2]=g;c[v>>2]=h;c[s>>2]=i;a[k+1>>0]=0;c[r>>2]=c[w>>2];c[j>>2]=(((c[v>>2]|0)+(c[u>>2]<<1)&65535)<<16>>16)*7;c[m>>2]=30180+(c[j>>2]|0);c[o>>2]=(c[o>>2]|0)+8>>4;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[o>>2]|0))break;c[p>>2]=c[(c[s>>2]|0)+(c[j>>2]<<2)>>2];a:do if((c[p>>2]|0)>0){a[k>>0]=a[(c[m>>2]|0)+((c[p>>2]&31|0)<6?c[p>>2]&31:6)>>0]|0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=16)break a;if((b[(c[r>>2]|0)+(c[n>>2]<<1)>>1]|0)>0){v=((Pb(c[q>>2]|0,k,8)|0)<<1)-1|0;w=(c[r>>2]|0)+(c[n>>2]<<1)|0;b[w>>1]=N(b[w>>1]|0,v)|0}c[n>>2]=(c[n>>2]|0)+1}}while(0);c[r>>2]=(c[r>>2]|0)+32;c[j>>2]=(c[j>>2]|0)+1}l=t;return}function od(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;aj(c[d>>2]|0,0,4260)|0;c[(c[d>>2]|0)+2376>>2]=1;c[c[d>>2]>>2]=65536;fd(c[d>>2]|0);ie(c[d>>2]|0);l=b;return 0}function pd(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=l;l=l+144|0;E=M+100|0;F=M+96|0;L=M+92|0;m=M+88|0;v=M+84|0;x=M+80|0;z=M+76|0;A=M+72|0;K=M+68|0;H=M+64|0;u=M+60|0;J=M+56|0;o=M+52|0;q=M+48|0;G=M+44|0;p=M+104|0;t=M+40|0;s=M+36|0;r=M+32|0;y=M+28|0;w=M+24|0;n=M+20|0;k=M+16|0;C=M+12|0;B=M+8|0;D=M+4|0;I=M;c[E>>2]=d;c[F>>2]=e;c[L>>2]=f;c[m>>2]=g;c[v>>2]=h;c[A>>2]=0;f=c[(c[E>>2]|0)+2336>>2]|0;c[I>>2]=$()|0;g=l;l=l+((1*(f<<1)|0)+15&-16)|0;f=l;l=l+((1*((c[(c[E>>2]|0)+2336>>2]|0)+(c[(c[E>>2]|0)+2328>>2]|0)<<2)|0)+15&-16)|0;i=l;l=l+((1*(c[(c[E>>2]|0)+2332>>2]<<2)|0)+15&-16)|0;j=l;l=l+((1*((c[(c[E>>2]|0)+2332>>2]|0)+16<<2)|0)+15&-16)|0;c[k>>2]=b[24558+(a[(c[E>>2]|0)+2736+29>>0]>>1<<2)+(a[(c[E>>2]|0)+2736+30>>0]<<1)>>1];if((a[(c[E>>2]|0)+2736+31>>0]|0)<4)c[u>>2]=1;else c[u>>2]=0;c[n>>2]=a[(c[E>>2]|0)+2736+34>>0];c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[(c[E>>2]|0)+2328>>2]|0))break;c[n>>2]=907633515+(N(c[n>>2]|0,196314165)|0);c[(c[E>>2]|0)+4+(c[x>>2]<<2)>>2]=b[(c[m>>2]|0)+(c[x>>2]<<1)>>1]<<14;d=(c[E>>2]|0)+4+(c[x>>2]<<2)|0;h=c[d>>2]|0;if((c[(c[E>>2]|0)+4+(c[x>>2]<<2)>>2]|0)<=0){if((h|0)<0){e=(c[E>>2]|0)+4+(c[x>>2]<<2)|0;c[e>>2]=(c[e>>2]|0)+1280}}else c[d>>2]=h-1280;e=(c[E>>2]|0)+4+(c[x>>2]<<2)|0;c[e>>2]=(c[e>>2]|0)+(c[k>>2]<<4);if((c[n>>2]|0)<0)c[(c[E>>2]|0)+4+(c[x>>2]<<2)>>2]=0-(c[(c[E>>2]|0)+4+(c[x>>2]<<2)>>2]|0);c[n>>2]=(c[n>>2]|0)+(b[(c[m>>2]|0)+(c[x>>2]<<1)>>1]|0);c[x>>2]=(c[x>>2]|0)+1}h=j;d=(c[E>>2]|0)+1284|0;e=h+64|0;do{c[h>>2]=c[d>>2];h=h+4|0;d=d+4|0}while((h|0)<(e|0));c[B>>2]=(c[E>>2]|0)+4;c[G>>2]=c[L>>2];c[H>>2]=c[(c[E>>2]|0)+2336>>2];c[z>>2]=0;while(1){if((c[z>>2]|0)>=(c[(c[E>>2]|0)+2324>>2]|0))break;c[D>>2]=i;c[o>>2]=(c[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0){if((c[w>>2]|0)==65536)break;c[x>>2]=0;while(1){if((c[x>>2]|0)>=((c[A>>2]|0)+2|0))break b;n=N(c[w>>2]>>16,(c[f+((c[H>>2]|0)-(c[x>>2]|0)-1<<2)>>2]&65535)<<16>>16)|0;n=n+((N(c[w>>2]&65535,(c[f+((c[H>>2]|0)-(c[x>>2]|0)-1<<2)>>2]&65535)<<16>>16)|0)>>16)|0;n=n+(N(c[w>>2]|0,(c[f+((c[H>>2]|0)-(c[x>>2]|0)-1<<2)>>2]>>15)+1>>1)|0)|0;c[f+((c[H>>2]|0)-(c[x>>2]|0)-1<<2)>>2]=n;c[x>>2]=(c[x>>2]|0)+1}}c[K>>2]=(c[(c[E>>2]|0)+2336>>2]|0)-(c[A>>2]|0)-(c[(c[E>>2]|0)+2340>>2]|0)-2;if((c[z>>2]|0)==2)_i((c[E>>2]|0)+1348+(c[(c[E>>2]|0)+2336>>2]<<1)|0,c[L>>2]|0,c[(c[E>>2]|0)+2332>>2]<<1<<1|0)|0;n=(c[E>>2]|0)+1348+((c[K>>2]|0)+(N(c[z>>2]|0,c[(c[E>>2]|0)+2332>>2]|0)|0)<<1)|0;Gf(g+(c[K>>2]<<1)|0,n,c[o>>2]|0,(c[(c[E>>2]|0)+2336>>2]|0)-(c[K>>2]|0)|0,c[(c[E>>2]|0)+2340>>2]|0,c[v>>2]|0);if(!(c[z>>2]|0)){n=N(c[y>>2]>>16,(c[(c[F>>2]|0)+136>>2]&65535)<<16>>16)|0;c[y>>2]=n+((N(c[y>>2]&65535,(c[(c[F>>2]|0)+136>>2]&65535)<<16>>16)|0)>>16)<<2}c[x>>2]=0;while(1){if((c[x>>2]|0)>=((c[A>>2]|0)+2|0))break b;n=N(c[y>>2]>>16,b[g+((c[(c[E>>2]|0)+2336>>2]|0)-(c[x>>2]|0)-1<<1)>>1]|0)|0;n=n+((N(c[y>>2]&65535,b[g+((c[(c[E>>2]|0)+2336>>2]|0)-(c[x>>2]|0)-1<<1)>>1]|0)|0)>>16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8<<2)>>2]>>16,b[p+14>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-8<<2)>>2]&65535,b[p+14>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-9<<2)>>2]>>16,b[p+16>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-9<<2)>>2]&65535,b[p+16>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-10<<2)>>2]>>16,b[p+18>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-10<<2)>>2]&65535,b[p+18>>1]|0)|0)>>16));if((c[(c[E>>2]|0)+2340>>2]|0)==16){n=N(c[j+(16+(c[x>>2]|0)-11<<2)>>2]>>16,b[p+20>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-11<<2)>>2]&65535,b[p+20>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-12<<2)>>2]>>16,b[p+22>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-12<<2)>>2]&65535,b[p+22>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-13<<2)>>2]>>16,b[p+24>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-13<<2)>>2]&65535,b[p+24>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-14<<2)>>2]>>16,b[p+26>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-14<<2)>>2]&65535,b[p+26>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-15<<2)>>2]>>16,b[p+28>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-15<<2)>>2]&65535,b[p+28>>1]|0)|0)>>16));n=N(c[j+(16+(c[x>>2]|0)-16<<2)>>2]>>16,b[p+30>>1]|0)|0;c[s>>2]=(c[s>>2]|0)+(n+((N(c[j+(16+(c[x>>2]|0)-16<<2)>>2]&65535,b[p+30>>1]|0)|0)>>16))}c[j+(16+(c[x>>2]|0)<<2)>>2]=(c[(c[D>>2]|0)+(c[x>>2]<<2)>>2]|0)+(c[s>>2]<<4);n=N(c[j+(16+(c[x>>2]|0)<<2)>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;n=n+((N(c[j+(16+(c[x>>2]|0)<<2)>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16)|0;if(((n+(N(c[j+(16+(c[x>>2]|0)<<2)>>2]|0,(c[r>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){n=N(c[j+(16+(c[x>>2]|0)<<2)>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;n=n+((N(c[j+(16+(c[x>>2]|0)<<2)>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16)|0;if(((n+(N(c[j+(16+(c[x>>2]|0)<<2)>>2]|0,(c[r>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)h=-32768;else{h=N(c[j+(16+(c[x>>2]|0)<<2)>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;h=h+((N(c[j+(16+(c[x>>2]|0)<<2)>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16)|0;h=(h+(N(c[j+(16+(c[x>>2]|0)<<2)>>2]|0,(c[r>>2]>>15)+1>>1)|0)>>7)+1>>1}}else h=32767;b[(c[G>>2]|0)+(c[x>>2]<<1)>>1]=h;c[x>>2]=(c[x>>2]|0)+1}h=j;d=j+(c[(c[E>>2]|0)+2332>>2]<<2)|0;e=h+64|0;do{c[h>>2]=c[d>>2];h=h+4|0;d=d+4|0}while((h|0)<(e|0));c[B>>2]=(c[B>>2]|0)+(c[(c[E>>2]|0)+2332>>2]<<2);c[G>>2]=(c[G>>2]|0)+(c[(c[E>>2]|0)+2332>>2]<<1);c[z>>2]=(c[z>>2]|0)+1}h=(c[E>>2]|0)+1284|0;d=j;e=h+64|0;do{c[h>>2]=c[d>>2];h=h+4|0;d=d+4|0}while((h|0)<(e|0));_(c[I>>2]|0);l=M;return}function qd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+48|0;g=h+32|0;n=h+28|0;d=h+24|0;i=h+20|0;f=h+16|0;j=h+12|0;m=h+8|0;k=h+4|0;e=h;c[n>>2]=a;c[d>>2]=b;b=c[n>>2]|0;c[i>>2]=(sd((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[j>>2]=536870911/(c[m>>2]>>16|0)|0;c[e>>2]=c[j>>2]<<16;b=N(c[m>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;c[k>>2]=536870912-(b+((N(c[m>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))<<3;b=N(c[k>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;b=(c[e>>2]|0)+(b+((N(c[k>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))|0;c[e>>2]=b+(N(c[k>>2]|0,(c[j>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[i>>2]|0)-(c[d>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0)if((b|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];n=c[g>>2]|0;l=h;return n|0}else{c[g>>2]=0;n=c[g>>2]|0;l=h;return n|0}a=c[e>>2]|0;d=0-(c[f>>2]|0)|0;do if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>d|0)){b=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){b=2147483647>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){b=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){b=-2147483648>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}while(0);c[g>>2]=b<<0-(c[f>>2]|0);n=c[g>>2]|0;l=h;return n|0}function rd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;h=l;l=l+48|0;g=h+40|0;q=h+36|0;p=h+32|0;i=h+28|0;k=h+24|0;j=h+20|0;f=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;e=h;c[q>>2]=a;c[p>>2]=b;c[i>>2]=d;b=c[q>>2]|0;c[k>>2]=(sd((c[q>>2]|0)>0?b:0-b|0)|0)-1;c[n>>2]=c[q>>2]<>2];b=c[p>>2]|0;c[j>>2]=(sd((c[p>>2]|0)>0?b:0-b|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;b=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=b+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);b=c[n>>2]|0;a=c[o>>2]|0;d=c[e>>2]|0;d=Xi(a|0,((a|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;d=Yi(d|0,y|0,32)|0;c[n>>2]=b-(d<<3);d=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(d+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[k>>2]|0)-(c[j>>2]|0)-(c[i>>2]|0);d=c[f>>2]|0;if((c[f>>2]|0)>=0)if((d|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];q=c[g>>2]|0;l=h;return q|0}else{c[g>>2]=0;q=c[g>>2]|0;l=h;return q|0}a=c[e>>2]|0;b=0-(c[f>>2]|0)|0;do if((-2147483648>>0-d|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>b|0)){d=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){d=2147483647>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>b|0)){d=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){d=-2147483648>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}while(0);c[g>>2]=d<<0-(c[f>>2]|0);q=c[g>>2]|0;l=h;return q|0}function sd(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function td(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+192|0;r=x+180|0;t=x+176|0;q=x+172|0;p=x+168|0;n=x+164|0;m=x+160|0;k=x+156|0;j=x+152|0;o=x+148|0;u=x+144|0;s=x+4|0;v=x;c[r>>2]=b;c[t>>2]=d;c[q>>2]=e;c[p>>2]=f;c[n>>2]=g;c[m>>2]=h;c[k>>2]=i;c[u>>2]=0;c[j>>2]=c[(c[r>>2]|0)+2328>>2];c[s+136>>2]=0;do if(!(c[n>>2]|0))w=4;else{if((c[n>>2]|0)==2?(c[(c[r>>2]|0)+2420+(c[(c[r>>2]|0)+2388>>2]<<2)>>2]|0)==1:0){w=4;break}je(c[r>>2]|0,s,c[q>>2]|0,1,c[k>>2]|0)}while(0);if((w|0)==4){d=(c[j>>2]|0)+16-1&-16;c[v>>2]=$()|0;w=l;l=l+((1*(d<<1)|0)+15&-16)|0;vd(c[r>>2]|0,c[t>>2]|0,c[(c[r>>2]|0)+2388>>2]|0,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n>>2]|0)+2340>>2]|0);if((c[(c[n>>2]|0)+2376>>2]|0)==1)a[(c[n>>2]|0)+2736+31>>0]=4;if((a[(c[n>>2]|0)+2736+31>>0]|0)<4){c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[(c[n>>2]|0)+2340>>2]|0))break;q=(b[(c[n>>2]|0)+2344+(c[k>>2]<<1)>>1]|0)+((N(a[(c[n>>2]|0)+2736+31>>0]|0,(b[h+(c[k>>2]<<1)>>1]|0)-(b[(c[n>>2]|0)+2344+(c[k>>2]<<1)>>1]|0)|0)|0)>>2)&65535;b[g+(c[k>>2]<<1)>>1]=q;c[k>>2]=(c[k>>2]|0)+1}Lf((c[o>>2]|0)+32|0,g,c[(c[n>>2]|0)+2340>>2]|0)}else _i((c[o>>2]|0)+32|0,(c[o>>2]|0)+32+32|0,c[(c[n>>2]|0)+2340>>2]<<1|0)|0;_i((c[n>>2]|0)+2344|0,h|0,c[(c[n>>2]|0)+2340>>2]<<1|0)|0;if(c[(c[n>>2]|0)+4160>>2]|0){yf((c[o>>2]|0)+32|0,c[(c[n>>2]|0)+2340>>2]|0,63570);yf((c[o>>2]|0)+32+32|0,c[(c[n>>2]|0)+2340>>2]|0,63570)}if((a[(c[n>>2]|0)+2736+29>>0]|0)!=2){aj(c[o>>2]|0,0,c[(c[n>>2]|0)+2324>>2]<<2|0)|0;aj((c[o>>2]|0)+96|0,0,(c[(c[n>>2]|0)+2324>>2]|0)*5<<1|0)|0;a[(c[n>>2]|0)+2736+32>>0]=0;n=0;q=c[o>>2]|0;q=q+136|0;c[q>>2]=n;l=p;return}zf(b[(c[n>>2]|0)+2736+26>>1]|0,a[(c[n>>2]|0)+2736+28>>0]|0,c[o>>2]|0,c[(c[n>>2]|0)+2316>>2]|0,c[(c[n>>2]|0)+2324>>2]|0);c[j>>2]=c[17644+(a[(c[n>>2]|0)+2736+32>>0]<<2)>>2];c[m>>2]=0;while(1){f=(c[n>>2]|0)+2736|0;if((c[m>>2]|0)>=(c[(c[n>>2]|0)+2324>>2]|0))break;c[i>>2]=a[f+4+(c[m>>2]|0)>>0];c[k>>2]=0;while(1){if((c[k>>2]|0)>=5)break;b[(c[o>>2]|0)+96+(((c[m>>2]|0)*5|0)+(c[k>>2]|0)<<1)>>1]=a[(c[j>>2]|0)+(((c[i>>2]|0)*5|0)+(c[k>>2]|0))>>0]<<7;c[k>>2]=(c[k>>2]|0)+1}c[m>>2]=(c[m>>2]|0)+1}c[i>>2]=a[f+33>>0];n=b[24566+(c[i>>2]<<1)>>1]|0;q=c[o>>2]|0;q=q+136|0;c[q>>2]=n;l=p;return}function vd(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;t=l;l=l+96|0;r=t+36|0;s=t+32|0;u=t+28|0;v=t+24|0;n=t+20|0;k=t+16|0;q=t+12|0;i=t+8|0;o=t+4|0;p=t;j=t+40|0;m=t+72|0;c[r>>2]=d;c[s>>2]=e;c[u>>2]=f;c[v>>2]=g;c[n>>2]=h;if(!(c[v>>2]|0)?!(c[(c[r>>2]|0)+2404+(c[u>>2]<<2)>>2]|0):0)c[i>>2]=Pb(c[s>>2]|0,29020,8)|0;else c[i>>2]=(Pb(c[s>>2]|0,29016,8)|0)+2;a[(c[r>>2]|0)+2736+29>>0]=c[i>>2]>>1;a[(c[r>>2]|0)+2736+30>>0]=c[i>>2]&1;f=c[s>>2]|0;if((c[n>>2]|0)==2){v=(Pb(f,26767,8)|0)&255;a[(c[r>>2]|0)+2736>>0]=v}else{u=(Pb(f,26743+(a[(c[r>>2]|0)+2736+29>>0]<<3)|0,8)|0)<<3&255;a[(c[r>>2]|0)+2736>>0]=u;u=((Pb(c[s>>2]|0,29045,8)|0)&255)<<24>>24;v=(c[r>>2]|0)+2736|0;a[v>>0]=(a[v>>0]|0)+u}c[k>>2]=1;while(1){f=c[s>>2]|0;if((c[k>>2]|0)>=(c[(c[r>>2]|0)+2324>>2]|0))break;v=(Pb(f,26767,8)|0)&255;a[(c[r>>2]|0)+2736+(c[k>>2]|0)>>0]=v;c[k>>2]=(c[k>>2]|0)+1}v=(Pb(f,(c[(c[(c[r>>2]|0)+2732>>2]|0)+12>>2]|0)+(N(a[(c[r>>2]|0)+2736+29>>0]>>1,b[c[(c[r>>2]|0)+2732>>2]>>1]|0)|0)|0,8)|0)&255;a[(c[r>>2]|0)+2736+8>>0]=v;Xe(j,m,c[(c[r>>2]|0)+2732>>2]|0,a[(c[r>>2]|0)+2736+8>>0]|0);c[k>>2]=0;while(1){if((c[k>>2]|0)>=(b[(c[(c[r>>2]|0)+2732>>2]|0)+2>>1]|0))break;c[i>>2]=Pb(c[s>>2]|0,(c[(c[(c[r>>2]|0)+2732>>2]|0)+24>>2]|0)+(b[j+(c[k>>2]<<1)>>1]|0)|0,8)|0;if(c[i>>2]|0){if((c[i>>2]|0)==8){v=Pb(c[s>>2]|0,29053,8)|0;c[i>>2]=(c[i>>2]|0)+v}}else{v=Pb(c[s>>2]|0,29053,8)|0;c[i>>2]=(c[i>>2]|0)-v}a[(c[r>>2]|0)+2736+8+((c[k>>2]|0)+1)>>0]=(c[i>>2]|0)-4;c[k>>2]=(c[k>>2]|0)+1}if((c[(c[r>>2]|0)+2324>>2]|0)==4){f=(Pb(c[s>>2]|0,29022,8)|0)&255;h=c[r>>2]|0}else{f=4;h=c[r>>2]|0}a[h+2736+31>>0]=f;if((a[(c[r>>2]|0)+2736+29>>0]|0)!=2){v=c[r>>2]|0;v=v+2736|0;v=v+29|0;v=a[v>>0]|0;v=v<<24>>24;u=c[r>>2]|0;u=u+2396|0;c[u>>2]=v;u=c[s>>2]|0;u=Pb(u,29030,8)|0;u=u&255;v=c[r>>2]|0;v=v+2736|0;v=v+34|0;a[v>>0]=u;l=t;return}c[o>>2]=1;if(((c[n>>2]|0)==2?(c[(c[r>>2]|0)+2396>>2]|0)==2:0)?(c[p>>2]=((Pb(c[s>>2]|0,29092,8)|0)&65535)<<16>>16,(c[p>>2]|0)>0):0){c[p>>2]=(c[p>>2]|0)-9;b[(c[r>>2]|0)+2736+26>>1]=(b[(c[r>>2]|0)+2400>>1]|0)+(c[p>>2]|0);c[o>>2]=0}if(c[o>>2]|0){u=((Pb(c[s>>2]|0,29060,8)|0)&65535)<<16>>16;u=(N(u,c[(c[r>>2]|0)+2316>>2]>>1)|0)&65535;b[(c[r>>2]|0)+2736+26>>1]=u;u=((Pb(c[s>>2]|0,c[(c[r>>2]|0)+2380>>2]|0,8)|0)&65535)<<16>>16;v=(c[r>>2]|0)+2736+26|0;b[v>>1]=(b[v>>1]|0)+u}b[(c[r>>2]|0)+2400>>1]=b[(c[r>>2]|0)+2736+26>>1]|0;v=(Pb(c[s>>2]|0,c[(c[r>>2]|0)+2384>>2]|0,8)|0)&255;a[(c[r>>2]|0)+2736+28>>0]=v;v=(Pb(c[s>>2]|0,26808,8)|0)&255;a[(c[r>>2]|0)+2736+32>>0]=v;c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[(c[r>>2]|0)+2324>>2]|0))break;v=(Pb(c[s>>2]|0,c[17620+(a[(c[r>>2]|0)+2736+32>>0]<<2)>>2]|0,8)|0)&255;a[(c[r>>2]|0)+2736+4+(c[q>>2]|0)>>0]=v;c[q>>2]=(c[q>>2]|0)+1}if(!(c[n>>2]|0)){f=(Pb(c[s>>2]|0,29013,8)|0)&255;h=c[r>>2]|0}else{f=0;h=c[r>>2]|0}a[h+2736+33>>0]=f;v=c[r>>2]|0;v=v+2736|0;v=v+29|0;v=a[v>>0]|0;v=v<<24>>24;u=c[r>>2]|0;u=u+2396|0;c[u>>2]=v;u=c[s>>2]|0;u=Pb(u,29030,8)|0;u=u&255;v=c[r>>2]|0;v=v+2736|0;v=v+34|0;a[v>>0]=u;l=t;return}function wd(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+224|0;s=y+212|0;t=y+208|0;w=y+204|0;v=y+200|0;k=y+196|0;m=y+192|0;o=y+188|0;p=y+184|0;n=y+180|0;j=y+176|0;q=y+172|0;h=y+168|0;x=y+88|0;r=y+8|0;u=y+4|0;i=y;c[s>>2]=a;c[t>>2]=d;c[w>>2]=e;c[v>>2]=f;c[k>>2]=g;c[h>>2]=Pb(c[s>>2]|0,29519+((c[w>>2]>>1)*9|0)|0,8)|0;c[n>>2]=c[k>>2]>>4;if((c[n>>2]<<4|0)<(c[k>>2]|0))c[n>>2]=(c[n>>2]|0)+1;c[i>>2]=29177+((c[h>>2]|0)*18|0);c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;c[r+(c[m>>2]<<2)>>2]=0;g=Pb(c[s>>2]|0,c[i>>2]|0,8)|0;h=c[m>>2]|0;while(1){c[x+(h<<2)>>2]=g;h=c[m>>2]|0;if((c[x+(c[m>>2]<<2)>>2]|0)!=17)break;g=r+(h<<2)|0;c[g>>2]=(c[g>>2]|0)+1;g=Pb(c[s>>2]|0,29339+((c[r+(c[m>>2]<<2)>>2]|0)==10&1)|0,8)|0;h=c[m>>2]|0}c[m>>2]=h+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;h=(c[t>>2]|0)+((c[m>>2]&65535)<<16>>16<<4<<1)|0;if((c[x+(c[m>>2]<<2)>>2]|0)>0)Be(h,c[s>>2]|0,c[x+(c[m>>2]<<2)>>2]|0);else{g=h+32|0;do{b[h>>1]=0;h=h+2|0}while((h|0)<(g|0))}c[m>>2]=(c[m>>2]|0)+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;if((c[r+(c[m>>2]<<2)>>2]|0)>0){c[q>>2]=c[r+(c[m>>2]<<2)>>2];c[u>>2]=(c[t>>2]|0)+((c[m>>2]&65535)<<16>>16<<4<<1);c[p>>2]=0;while(1){if((c[p>>2]|0)>=16)break;c[j>>2]=b[(c[u>>2]|0)+(c[p>>2]<<1)>>1];c[o>>2]=0;while(1){h=c[j>>2]|0;if((c[o>>2]|0)>=(c[q>>2]|0))break;c[j>>2]=h<<1;i=Pb(c[s>>2]|0,29011,8)|0;c[j>>2]=(c[j>>2]|0)+i;c[o>>2]=(c[o>>2]|0)+1}b[(c[u>>2]|0)+(c[p>>2]<<1)>>1]=h;c[p>>2]=(c[p>>2]|0)+1}i=x+(c[m>>2]<<2)|0;c[i>>2]=c[i>>2]|c[q>>2]<<5}c[m>>2]=(c[m>>2]|0)+1}nd(c[s>>2]|0,c[t>>2]|0,c[k>>2]|0,c[w>>2]|0,c[v>>2]|0,x);l=y;return}function xd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;j=m+16|0;i=m+12|0;f=m+8|0;h=m+4|0;k=m;c[j>>2]=b;c[i>>2]=d;c[f>>2]=e;c[k>>2]=0;c[(c[j>>2]|0)+2332>>2]=((c[i>>2]&65535)<<16>>16)*5;c[h>>2]=N((c[(c[j>>2]|0)+2324>>2]&65535)<<16>>16,(c[(c[j>>2]|0)+2332>>2]&65535)<<16>>16)|0;if(!((c[(c[j>>2]|0)+2316>>2]|0)==(c[i>>2]|0)?(c[(c[j>>2]|0)+2320>>2]|0)==(c[f>>2]|0):0)){b=Tf((c[j>>2]|0)+2432|0,((c[i>>2]&65535)<<16>>16)*1e3|0,c[f>>2]|0,0)|0;c[k>>2]=(c[k>>2]|0)+b;c[(c[j>>2]|0)+2320>>2]=c[f>>2]}if((c[(c[j>>2]|0)+2316>>2]|0)==(c[i>>2]|0)?(c[h>>2]|0)==(c[(c[j>>2]|0)+2328>>2]|0):0){k=c[k>>2]|0;l=m;return k|0}b=(c[(c[j>>2]|0)+2324>>2]|0)==4;c[(c[j>>2]|0)+2384>>2]=(c[i>>2]|0)==8?(b?29147:29170):b?29113:29158;if((c[(c[j>>2]|0)+2316>>2]|0)!=(c[i>>2]|0)){c[(c[j>>2]|0)+2336>>2]=((c[i>>2]&65535)<<16>>16)*20;e=(c[j>>2]|0)+2340|0;if((c[i>>2]|0)==8|(c[i>>2]|0)==12){c[e>>2]=10;e=c[j>>2]|0;f=17668}else{c[e>>2]=16;e=c[j>>2]|0;f=17704}c[e+2732>>2]=f;do if((c[i>>2]|0)!=16){if((c[i>>2]|0)==12){e=29039;f=c[j>>2]|0;g=16;break}if((c[i>>2]|0)==8){e=29030;f=c[j>>2]|0;g=16}}else{e=29045;f=c[j>>2]|0;g=16}while(0);if((g|0)==16)c[f+2380>>2]=e;c[(c[j>>2]|0)+2376>>2]=1;c[(c[j>>2]|0)+2308>>2]=100;a[(c[j>>2]|0)+2312>>0]=10;c[(c[j>>2]|0)+4164>>2]=0;aj((c[j>>2]|0)+1348|0,0,960)|0;e=(c[j>>2]|0)+1284|0;f=e+64|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(f|0))}c[(c[j>>2]|0)+2316>>2]=c[i>>2];c[(c[j>>2]|0)+2328>>2]=c[h>>2];k=c[k>>2]|0;l=m;return k|0}function yd(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=0;c[c[e>>2]>>2]=8544;l=d;return c[b>>2]|0}function zd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+12|0;e=g+8|0;f=g+4|0;b=g;c[d>>2]=a;c[f>>2]=0;c[b>>2]=c[d>>2];c[e>>2]=0;while(1){if((c[e>>2]|0)>=2)break;c[f>>2]=od((c[b>>2]|0)+((c[e>>2]|0)*4260|0)|0)|0;c[e>>2]=(c[e>>2]|0)+1}e=(c[d>>2]|0)+8520|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[(c[d>>2]|0)+8540>>2]=0;l=g;return c[f>>2]|0}function Ad(d,e,f,g,h,i,j,k){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;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]|0)+16>>2]|0)){c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]=1;k=2;e=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0}else{if((c[(c[H>>2]|0)+16>>2]|0)==10){c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]=1;k=2;e=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0;break}if((c[(c[H>>2]|0)+16>>2]|0)==20){c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]=1;k=4;e=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0;break}if((c[(c[H>>2]|0)+16>>2]|0)==40){c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]=2;k=4;e=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0;break}if((c[(c[H>>2]|0)+16>>2]|0)!=60){q=23;break c}c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]=3;k=4;e=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0}while(0);c[e+2324>>2]=k;c[m>>2]=(c[(c[H>>2]|0)+12>>2]>>10)+1;if((c[m>>2]|0)!=8&(c[m>>2]|0)!=12&(c[m>>2]|0)!=16){q=25;break}S=xd((c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0,c[m>>2]|0,c[(c[H>>2]|0)+8>>2]|0)|0;c[M>>2]=(c[M>>2]|0)+S;c[A>>2]=(c[A>>2]|0)+1}if((q|0)==23){c[O>>2]=-203;S=c[O>>2]|0;l=Q;return S|0}else if((q|0)==25){c[O>>2]=-200;S=c[O>>2]|0;l=Q;return S|0}}while(0);do if((c[c[H>>2]>>2]|0)==2?(c[(c[H>>2]|0)+4>>2]|0)==2:0){if((c[(c[L>>2]|0)+8532>>2]|0)!=1?(c[(c[L>>2]|0)+8536>>2]|0)!=1:0)break;c[(c[L>>2]|0)+8520>>2]=0;c[(c[L>>2]|0)+8520+8>>2]=0;_i((c[x>>2]|0)+4260+2432|0,(c[x>>2]|0)+2432|0,300)|0}while(0);c[(c[L>>2]|0)+8532>>2]=c[c[H>>2]>>2];c[(c[L>>2]|0)+8536>>2]=c[(c[H>>2]|0)+4>>2];if((c[(c[H>>2]|0)+8>>2]|0)<=48e3?(c[(c[H>>2]|0)+8>>2]|0)>=8e3:0){d:do if((c[K>>2]|0)!=1?(c[(c[x>>2]|0)+2388>>2]|0)==0:0){c[A>>2]=0;while(1){if((c[A>>2]|0)>=(c[(c[H>>2]|0)+4>>2]|0))break;c[J>>2]=0;while(1){S=(c[J>>2]|0)<(c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]|0);e=Ob(c[w>>2]|0,1)|0;k=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0;if(!S)break;c[k+2404+(c[J>>2]<<2)>>2]=e;c[J>>2]=(c[J>>2]|0)+1}c[k+2416>>2]=e;c[A>>2]=(c[A>>2]|0)+1}c[A>>2]=0;while(1){if((c[A>>2]|0)>=(c[(c[H>>2]|0)+4>>2]|0))break;S=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420|0;c[S>>2]=0;c[S+4>>2]=0;c[S+8>>2]=0;e:do if(c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2416>>2]|0){if((c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]|0)==1){c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420>>2]=1;break}c[n>>2]=(Pb(c[w>>2]|0,c[17836+((c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]|0)-2<<2)>>2]|0,8)|0)+1;c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2392>>2]|0))break e;c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420+(c[J>>2]<<2)>>2]=c[n>>2]>>c[J>>2]&1;c[J>>2]=(c[J>>2]|0)+1}}while(0);c[A>>2]=(c[A>>2]|0)+1}if(!(c[K>>2]|0)){c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[(c[x>>2]|0)+2392>>2]|0))break d;c[A>>2]=0;while(1){if((c[A>>2]|0)>=(c[(c[H>>2]|0)+4>>2]|0))break;if(c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420+(c[J>>2]<<2)>>2]|0){do if((c[A>>2]|0)==0?(c[(c[H>>2]|0)+4>>2]|0)==2:0){gg(c[w>>2]|0,s);if(c[(c[x>>2]|0)+4260+2420+(c[J>>2]<<2)>>2]|0)break;hg(c[w>>2]|0,I)}while(0);do if((c[J>>2]|0)>0){if(!(c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420+((c[J>>2]|0)-1<<2)>>2]|0)){q=64;break}c[o>>2]=2}else q=64;while(0);if((q|0)==64){q=0;c[o>>2]=0}vd((c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0,c[w>>2]|0,c[J>>2]|0,1,c[o>>2]|0);wd(c[w>>2]|0,p,a[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2736+29>>0]|0,a[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2736+30>>0]|0,c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2328>>2]|0)}c[A>>2]=(c[A>>2]|0)+1}c[J>>2]=(c[J>>2]|0)+1}}}while(0);f:do if((c[(c[H>>2]|0)+4>>2]|0)==2){do if(c[K>>2]|0){if((c[K>>2]|0)==2?(c[(c[x>>2]|0)+2420+(c[(c[x>>2]|0)+2388>>2]<<2)>>2]|0)==1:0)break;c[A>>2]=0;while(1){if((c[A>>2]|0)>=2)break f;c[s+(c[A>>2]<<2)>>2]=b[(c[L>>2]|0)+8520+(c[A>>2]<<1)>>1];c[A>>2]=(c[A>>2]|0)+1}}while(0);gg(c[w>>2]|0,s);if(!((c[K>>2]|0)==0?!(c[(c[x>>2]|0)+4260+2404+(c[(c[x>>2]|0)+2388>>2]<<2)>>2]|0):0))q=74;do if((q|0)==74){if((c[K>>2]|0)==2?(c[(c[x>>2]|0)+4260+2420+(c[(c[x>>2]|0)+2388>>2]<<2)>>2]|0)==0:0)break;c[I>>2]=0;break f}while(0);hg(c[w>>2]|0,I)}while(0);if(((c[I>>2]|0)==0?(c[(c[H>>2]|0)+4>>2]|0)==2:0)?(c[(c[L>>2]|0)+8540>>2]|0)==1:0){aj((c[L>>2]|0)+4260+1348|0,0,960)|0;k=(c[L>>2]|0)+4260+1284|0;e=k+64|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(e|0));c[(c[L>>2]|0)+4260+2308>>2]=100;a[(c[L>>2]|0)+4260+2312>>0]=10;c[(c[L>>2]|0)+4260+4164>>2]=0;c[(c[L>>2]|0)+4260+2376>>2]=1}S=N(c[(c[H>>2]|0)+12>>2]|0,c[(c[H>>2]|0)+4>>2]|0)|0;c[y>>2]=(S|0)<(N(c[(c[H>>2]|0)+8>>2]|0,c[c[H>>2]>>2]|0)|0)&1;if(c[y>>2]|0)k=1;else k=N(c[(c[H>>2]|0)+4>>2]|0,(c[(c[x>>2]|0)+2328>>2]|0)+2|0)|0;c[P>>2]=$()|0;d=l;l=l+((1*(k<<1)|0)+15&-16)|0;if(c[y>>2]|0){c[F>>2]=c[E>>2];e=c[x>>2]|0;k=c[E>>2]|0}else{c[F>>2]=d;e=c[x>>2]|0;k=d}c[F+4>>2]=k+(c[e+2328>>2]<<1)+4;if(!(c[K>>2]|0))c[v>>2]=((c[I>>2]|0)!=0^1)&1;else{if(c[(c[L>>2]|0)+8540>>2]|0)if((c[K>>2]|0)==2?(c[(c[H>>2]|0)+4>>2]|0)==2:0)k=(c[(c[x>>2]|0)+4260+2420+(c[(c[x>>2]|0)+4260+2388>>2]<<2)>>2]|0)==1;else k=0;else k=1;c[v>>2]=k&1}c[A>>2]=0;while(1){if((c[A>>2]|0)>=(c[(c[H>>2]|0)+4>>2]|0))break;if((c[A>>2]|0)==0|(c[v>>2]|0)!=0){c[r>>2]=(c[(c[x>>2]|0)+2388>>2]|0)-(c[A>>2]|0);g:do if((c[r>>2]|0)<=0)c[u>>2]=0;else{if((c[K>>2]|0)==2){c[u>>2]=c[(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2420+((c[r>>2]|0)-1<<2)>>2]|0?2:0;break}do if((c[A>>2]|0)>0){if(!(c[(c[L>>2]|0)+8540>>2]|0))break;c[u>>2]=1;break g}while(0);c[u>>2]=2}while(0);S=td((c[x>>2]|0)+((c[A>>2]|0)*4260|0)|0,c[w>>2]|0,(c[F+(c[A>>2]<<2)>>2]|0)+4|0,C,c[K>>2]|0,c[u>>2]|0,c[t>>2]|0)|0;c[M>>2]=(c[M>>2]|0)+S}else aj((c[F+(c[A>>2]<<2)>>2]|0)+4|0,0,c[C>>2]<<1|0)|0;S=(c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2388|0;c[S>>2]=(c[S>>2]|0)+1;c[A>>2]=(c[A>>2]|0)+1}if((c[c[H>>2]>>2]|0)==2?(c[(c[H>>2]|0)+4>>2]|0)==2:0)cf((c[L>>2]|0)+8520|0,c[F>>2]|0,c[F+4>>2]|0,s,c[(c[x>>2]|0)+2316>>2]|0,c[C>>2]|0);else{S=c[F>>2]|0;R=(c[L>>2]|0)+8520+4|0;b[S>>1]=b[R>>1]|0;b[S+2>>1]=b[R+2>>1]|0;S=(c[L>>2]|0)+8520+4|0;R=(c[F>>2]|0)+(c[C>>2]<<1)|0;b[S>>1]=b[R>>1]|0;b[S+2>>1]=b[R+2>>1]|0}S=N(c[C>>2]|0,c[(c[H>>2]|0)+8>>2]|0)|0;c[c[B>>2]>>2]=(S|0)/(((c[(c[x>>2]|0)+2316>>2]&65535)<<16>>16)*1e3|0)|0;if((c[c[H>>2]>>2]|0)==2)k=c[c[B>>2]>>2]|0;else k=1;e=l;l=l+((1*(k<<1)|0)+15&-16)|0;if((c[c[H>>2]>>2]|0)==2)c[D>>2]=e;else c[D>>2]=c[E>>2];if(c[y>>2]|0)k=N(c[(c[H>>2]|0)+4>>2]|0,(c[(c[x>>2]|0)+2328>>2]|0)+2|0)|0;else k=1;e=l;l=l+((1*(k<<1)|0)+15&-16)|0;if(c[y>>2]|0){S=(N(c[(c[H>>2]|0)+4>>2]|0,(c[(c[x>>2]|0)+2328>>2]|0)+2|0)|0)<<1;_i(e|0,c[E>>2]|0,S+0|0)|0;c[F>>2]=e;c[F+4>>2]=e+(c[(c[x>>2]|0)+2328>>2]<<1)+4}c[A>>2]=0;while(1){S=c[H>>2]|0;if((c[A>>2]|0)>=(c[((c[c[H>>2]>>2]|0)<(c[(c[H>>2]|0)+4>>2]|0)?S:S+4|0)>>2]|0))break;S=Uf((c[x>>2]|0)+((c[A>>2]|0)*4260|0)+2432|0,c[D>>2]|0,(c[F+(c[A>>2]<<2)>>2]|0)+2|0,c[C>>2]|0)|0;c[M>>2]=(c[M>>2]|0)+S;h:do if((c[c[H>>2]>>2]|0)==2){c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[c[B>>2]>>2]|0))break h;b[(c[E>>2]|0)+((c[A>>2]|0)+(c[J>>2]<<1)<<1)>>1]=b[(c[D>>2]|0)+(c[J>>2]<<1)>>1]|0;c[J>>2]=(c[J>>2]|0)+1}}while(0);c[A>>2]=(c[A>>2]|0)+1}i:do if((c[c[H>>2]>>2]|0)==2){if((c[(c[H>>2]|0)+4>>2]|0)!=1)break;if(c[G>>2]|0){S=Uf((c[x>>2]|0)+4260+2432|0,c[D>>2]|0,(c[F>>2]|0)+2|0,c[C>>2]|0)|0;c[M>>2]=(c[M>>2]|0)+S;c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[c[B>>2]>>2]|0))break i;b[(c[E>>2]|0)+(1+(c[J>>2]<<1)<<1)>>1]=b[(c[D>>2]|0)+(c[J>>2]<<1)>>1]|0;c[J>>2]=(c[J>>2]|0)+1}}else{c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[c[B>>2]>>2]|0))break i;b[(c[E>>2]|0)+(1+(c[J>>2]<<1)<<1)>>1]=b[(c[E>>2]|0)+(0+(c[J>>2]<<1)<<1)>>1]|0;c[J>>2]=(c[J>>2]|0)+1}}}while(0);if((c[(c[x>>2]|0)+4164>>2]|0)==2){c[z>>2]=c[4402];c[z+4>>2]=c[4403];c[z+8>>2]=c[4404];e=N(c[(c[x>>2]|0)+2308>>2]|0,c[z+((c[(c[x>>2]|0)+2316>>2]|0)-8>>2<<2)>>2]|0)|0;k=c[H>>2]|0}else{e=0;k=c[H>>2]|0}c[k+20>>2]=e;j:do if((c[K>>2]|0)==1){c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[(c[L>>2]|0)+8536>>2]|0))break j;a[(c[L>>2]|0)+((c[J>>2]|0)*4260|0)+2312>>0]=10;c[J>>2]=(c[J>>2]|0)+1}}else c[(c[L>>2]|0)+8540>>2]=c[I>>2];while(0);c[O>>2]=c[M>>2];_(c[P>>2]|0);S=c[O>>2]|0;l=Q;return S|0}c[M>>2]=-200;c[O>>2]=c[M>>2];S=c[O>>2]|0;l=Q;return S|0}function Bd(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=0;c[c[e>>2]>>2]=24568;l=d;return c[b>>2]|0}function Cd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+20|0;e=k+16|0;g=k+12|0;i=k+8|0;h=k+4|0;j=k;c[f>>2]=a;c[e>>2]=b;c[g>>2]=d;c[j>>2]=0;c[i>>2]=c[f>>2];aj(c[i>>2]|0,0,24568)|0;c[h>>2]=0;while(1){b=c[i>>2]|0;if((c[h>>2]|0)>=2)break;d=ff(b+((c[h>>2]|0)*12240|0)|0,c[e>>2]|0)|0;c[j>>2]=(c[j>>2]|0)+d;c[h>>2]=(c[h>>2]|0)+1}c[b+24544>>2]=1;c[(c[i>>2]|0)+24548>>2]=1;i=Dd(c[f>>2]|0,c[g>>2]|0)|0;c[j>>2]=(c[j>>2]|0)+i;l=k;return c[j>>2]|0}function Dd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;g=l;l=l+32|0;i=g+16|0;d=g+12|0;e=g+8|0;f=g+4|0;h=g;c[i>>2]=a;c[d>>2]=b;c[e>>2]=0;c[h>>2]=c[i>>2];c[f>>2]=c[h>>2];c[c[d>>2]>>2]=c[(c[h>>2]|0)+24544>>2];c[(c[d>>2]|0)+4>>2]=c[(c[h>>2]|0)+24548>>2];c[(c[d>>2]|0)+8>>2]=c[(c[f>>2]|0)+4580>>2];c[(c[d>>2]|0)+12>>2]=c[(c[f>>2]|0)+4588>>2];c[(c[d>>2]|0)+16>>2]=c[(c[f>>2]|0)+4592>>2];c[(c[d>>2]|0)+20>>2]=c[(c[f>>2]|0)+4596>>2];c[(c[d>>2]|0)+24>>2]=c[(c[f>>2]|0)+4636>>2];c[(c[d>>2]|0)+28>>2]=c[(c[f>>2]|0)+4632>>2];c[(c[d>>2]|0)+32>>2]=c[(c[f>>2]|0)+4640>>2];c[(c[d>>2]|0)+36>>2]=c[(c[f>>2]|0)+4648>>2];c[(c[d>>2]|0)+40>>2]=c[(c[f>>2]|0)+6120>>2];c[(c[d>>2]|0)+44>>2]=c[(c[f>>2]|0)+6108>>2];c[(c[d>>2]|0)+48>>2]=c[(c[f>>2]|0)+4708>>2];c[(c[d>>2]|0)+68>>2]=((c[(c[f>>2]|0)+4600>>2]&65535)<<16>>16)*1e3;c[(c[d>>2]|0)+72>>2]=c[(c[f>>2]|0)+4560>>2];if((c[(c[f>>2]|0)+4600>>2]|0)!=16){h=0;h=h&1;i=c[d>>2]|0;i=i+76|0;c[i>>2]=h;i=c[e>>2]|0;l=g;return i|0}h=(c[(c[f>>2]|0)+16+12>>2]|0)==0;h=h&1;i=c[d>>2]|0;i=i+76|0;c[i>>2]=h;i=c[e>>2]|0;l=g;return i|0}function Ed(d,e,f,g,h,i,j){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=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24480+8>>2]=0,c[(c[T>>2]|0)+24480+12>>2]=0,c[(c[T>>2]|0)+24480+12+4>>2]=1,c[(c[T>>2]|0)+24480+12+8>>2]=0,c[(c[T>>2]|0)+24480+12+12>>2]=1,b[(c[T>>2]|0)+24480+30>>1]=0,b[(c[T>>2]|0)+24480+28>>1]=16384,(c[(c[T>>2]|0)+24544>>2]|0)==2):0){_i((c[T>>2]|0)+12240+5808|0,(c[T>>2]|0)+5808|0,300)|0;aa=(c[T>>2]|0)+12240|0;f=c[T>>2]|0;c[aa>>2]=c[f>>2];c[aa+4>>2]=c[f+4>>2]}if((c[(c[Q>>2]|0)+24>>2]|0)!=(c[(c[T>>2]|0)+4636>>2]|0))e=1;else e=(c[(c[T>>2]|0)+24548>>2]|0)!=(c[(c[Q>>2]|0)+4>>2]|0);c[n>>2]=e&1;c[(c[T>>2]|0)+24544>>2]=c[c[Q>>2]>>2];c[(c[T>>2]|0)+24548>>2]=c[(c[Q>>2]|0)+4>>2];c[C>>2]=((c[F>>2]|0)*100|0)/(c[(c[Q>>2]|0)+8>>2]|0)|0;c[M>>2]=(c[C>>2]|0)>1?c[C>>2]>>1:1;c[v>>2]=0;e=c[C>>2]|0;a:do if(!(c[S>>2]|0)){aa=N(e,c[(c[Q>>2]|0)+8>>2]|0)|0;if((c[F>>2]|0)<0?1:(aa|0)!=((c[F>>2]|0)*100|0)){c[V>>2]=-101;aa=c[V>>2]|0;l=Z;return aa|0}if(((c[F>>2]|0)*1e3|0)>(N(c[(c[Q>>2]|0)+24>>2]|0,c[(c[Q>>2]|0)+8>>2]|0)|0)){c[V>>2]=-101;aa=c[V>>2]|0;l=Z;return aa|0}}else{if((e|0)!=1){c[V>>2]=-101;aa=c[V>>2]|0;l=Z;return aa|0}c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;c[U>>2]=ff((c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0,c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5124>>2]|0)|0;c[R>>2]=(c[R>>2]|0)+1}c[Y>>2]=c[(c[Q>>2]|0)+24>>2];c[(c[Q>>2]|0)+24>>2]=10;c[X>>2]=c[(c[Q>>2]|0)+36>>2];c[(c[Q>>2]|0)+36>>2]=0;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break a;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4700>>2]=0;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4712>>2]=1;c[R>>2]=(c[R>>2]|0)+1}}while(0);c[q>>2]=c[(c[Q>>2]|0)+28>>2]>>(c[(c[Q>>2]|0)+4>>2]|0)-1;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;if((c[R>>2]|0)==1)e=c[(c[T>>2]|0)+4600>>2]|0;else e=0;c[k>>2]=e;aa=gf((c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0,c[Q>>2]|0,c[q>>2]|0,c[(c[T>>2]|0)+24560>>2]|0,c[R>>2]|0,c[k>>2]|0)|0;c[U>>2]=aa;if(aa|0){P=28;break}b:do if(c[n>>2]|0?1:(c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4696>>2]|0)!=0){c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[(c[T>>2]|0)+5776>>2]|0))break b;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4756+(c[x>>2]<<2)>>2]=0;c[x>>2]=(c[x>>2]|0)+1}}while(0);c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+6112>>2]=c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+6108>>2];c[R>>2]=(c[R>>2]|0)+1}if((P|0)==28){c[V>>2]=c[U>>2];aa=c[V>>2]|0;l=Z;return aa|0}c[H>>2]=N((c[C>>2]|0)*10|0,c[(c[T>>2]|0)+4600>>2]|0)|0;aa=N(c[H>>2]|0,c[(c[T>>2]|0)+4580>>2]|0)|0;c[m>>2]=(aa|0)/((c[(c[T>>2]|0)+4600>>2]|0)*1e3|0)|0;aa=c[m>>2]|0;c[W>>2]=$()|0;g=l;l=l+((1*(aa<<1)|0)+15&-16)|0;while(1){c[G>>2]=(c[(c[T>>2]|0)+4608>>2]|0)-(c[(c[T>>2]|0)+5772>>2]|0);c[G>>2]=(c[G>>2]|0)<(c[H>>2]|0)?c[G>>2]|0:c[H>>2]|0;aa=N(c[G>>2]|0,c[(c[T>>2]|0)+4580>>2]|0)|0;c[E>>2]=(aa|0)/((c[(c[T>>2]|0)+4600>>2]|0)*1e3|0)|0;if((c[c[Q>>2]>>2]|0)==2?(c[(c[Q>>2]|0)+4>>2]|0)==2:0){c[z>>2]=c[(c[T>>2]|0)+5780>>2];c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[E>>2]|0))break;b[g+(c[R>>2]<<1)>>1]=b[(c[J>>2]|0)+(c[R>>2]<<1<<1)>>1]|0;c[R>>2]=(c[R>>2]|0)+1}if((c[z>>2]|0)==0?(c[(c[T>>2]|0)+24552>>2]|0)==1:0)_i((c[T>>2]|0)+12240+5808|0,(c[T>>2]|0)+5808|0,300)|0;aa=Uf((c[T>>2]|0)+5808|0,(c[T>>2]|0)+5128+((c[(c[T>>2]|0)+5772>>2]|0)+2<<1)|0,g,c[E>>2]|0)|0;c[U>>2]=(c[U>>2]|0)+aa;aa=(c[T>>2]|0)+5772|0;c[aa>>2]=(c[aa>>2]|0)+(c[G>>2]|0);c[G>>2]=(c[(c[T>>2]|0)+12240+4608>>2]|0)-(c[(c[T>>2]|0)+12240+5772>>2]|0);if((c[G>>2]|0)<(N((c[C>>2]|0)*10|0,c[(c[T>>2]|0)+12240+4600>>2]|0)|0))e=c[G>>2]|0;else e=N((c[C>>2]|0)*10|0,c[(c[T>>2]|0)+12240+4600>>2]|0)|0;c[G>>2]=e;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[E>>2]|0))break;b[g+(c[R>>2]<<1)>>1]=b[(c[J>>2]|0)+((c[R>>2]<<1)+1<<1)>>1]|0;c[R>>2]=(c[R>>2]|0)+1}e=Uf((c[T>>2]|0)+12240+5808|0,(c[T>>2]|0)+12240+5128+((c[(c[T>>2]|0)+12240+5772>>2]|0)+2<<1)|0,g,c[E>>2]|0)|0;c[U>>2]=(c[U>>2]|0)+e;e=c[T>>2]|0;d=c[G>>2]|0;i=1}else P=49;do if((P|0)==49){P=0;if((c[c[Q>>2]>>2]|0)==2?(c[(c[Q>>2]|0)+4>>2]|0)==1:0){c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[E>>2]|0))break;c[L>>2]=(b[(c[J>>2]|0)+(c[R>>2]<<1<<1)>>1]|0)+(b[(c[J>>2]|0)+((c[R>>2]<<1)+1<<1)>>1]|0);b[g+(c[R>>2]<<1)>>1]=(c[L>>2]>>1)+(c[L>>2]&1);c[R>>2]=(c[R>>2]|0)+1}aa=Uf((c[T>>2]|0)+5808|0,(c[T>>2]|0)+5128+((c[(c[T>>2]|0)+5772>>2]|0)+2<<1)|0,g,c[E>>2]|0)|0;c[U>>2]=(c[U>>2]|0)+aa;c:do if((c[(c[T>>2]|0)+24552>>2]|0)==2?(c[(c[T>>2]|0)+5780>>2]|0)==0:0){aa=Uf((c[T>>2]|0)+12240+5808|0,(c[T>>2]|0)+12240+5128+((c[(c[T>>2]|0)+12240+5772>>2]|0)+2<<1)|0,g,c[E>>2]|0)|0;c[U>>2]=(c[U>>2]|0)+aa;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[T>>2]|0)+4608>>2]|0))break c;b[(c[T>>2]|0)+5128+((c[(c[T>>2]|0)+5772>>2]|0)+(c[R>>2]|0)+2<<1)>>1]=(b[(c[T>>2]|0)+5128+((c[(c[T>>2]|0)+5772>>2]|0)+(c[R>>2]|0)+2<<1)>>1]|0)+(b[(c[T>>2]|0)+12240+5128+((c[(c[T>>2]|0)+12240+5772>>2]|0)+(c[R>>2]|0)+2<<1)>>1]|0)>>1;c[R>>2]=(c[R>>2]|0)+1}}while(0);e=c[T>>2]|0;d=c[G>>2]|0;i=0;break}_i(g|0,c[J>>2]|0,c[E>>2]<<1|0)|0;e=Uf((c[T>>2]|0)+5808|0,(c[T>>2]|0)+5128+((c[(c[T>>2]|0)+5772>>2]|0)+2<<1)|0,g,c[E>>2]|0)|0;c[U>>2]=(c[U>>2]|0)+e;e=c[T>>2]|0;d=c[G>>2]|0;i=0}while(0);aa=e+(i*12240|0)+5772|0;c[aa>>2]=(c[aa>>2]|0)+d;aa=N(c[E>>2]|0,c[c[Q>>2]>>2]|0)|0;c[J>>2]=(c[J>>2]|0)+(aa<<1);c[F>>2]=(c[F>>2]|0)-(c[E>>2]|0);c[(c[T>>2]|0)+24560>>2]=0;if((c[(c[T>>2]|0)+5772>>2]|0)<(c[(c[T>>2]|0)+4608>>2]|0))break;if(!(c[S>>2]|0?1:(c[(c[T>>2]|0)+5780>>2]|0)!=0)){a[y>>0]=0;a[y+1>>0]=0;a[y>>0]=256-(256>>(N((c[(c[T>>2]|0)+5776>>2]|0)+1|0,c[(c[Q>>2]|0)+4>>2]|0)|0));$b(c[I>>2]|0,0,y,8);c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;c[o>>2]=0;c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5776>>2]|0))break;c[o>>2]=c[o>>2]|c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4756+(c[x>>2]<<2)>>2]<>2];c[x>>2]=(c[x>>2]|0)+1}a[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4755>>0]=(c[o>>2]|0)>0?1:0;if(c[o>>2]|0?(c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5776>>2]|0)>1:0)$b(c[I>>2]|0,(c[o>>2]|0)-1|0,c[17836+((c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5776>>2]|0)-2<<2)>>2]|0,8);c[R>>2]=(c[R>>2]|0)+1}c[x>>2]=0;while(1){aa=(c[x>>2]|0)<(c[(c[T>>2]|0)+5776>>2]|0);c[R>>2]=0;if(!aa)break;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;if(c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4756+(c[x>>2]<<2)>>2]|0){if(((c[R>>2]|0)==0?(c[(c[Q>>2]|0)+4>>2]|0)==2:0)?(ig(c[I>>2]|0,(c[T>>2]|0)+24480+34+((c[x>>2]|0)*6|0)|0),(c[(c[T>>2]|0)+12240+4756+(c[x>>2]<<2)>>2]|0)==0):0)jg(c[I>>2]|0,a[(c[T>>2]|0)+24480+52+(c[x>>2]|0)>>0]|0);if((c[x>>2]|0)>0?c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4756+((c[x>>2]|0)-1<<2)>>2]|0:0)c[t>>2]=2;else c[t>>2]=0;Gd((c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0,c[I>>2]|0,c[x>>2]|0,1,c[t>>2]|0);Hd(c[I>>2]|0,a[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+6132+((c[x>>2]|0)*36|0)+29>>0]|0,a[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+6132+((c[x>>2]|0)*36|0)+30>>0]|0,(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+6240+((c[x>>2]|0)*320|0)|0,c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4608>>2]|0)}c[R>>2]=(c[R>>2]|0)+1}c[x>>2]=(c[x>>2]|0)+1}while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;aa=(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4756|0;c[aa>>2]=0;c[aa+4>>2]=0;c[aa+8>>2]=0;c[R>>2]=(c[R>>2]|0)+1}aa=Fd(c[I>>2]|0)|0;c[(c[T>>2]|0)+24536>>2]=aa}Qe(c[T>>2]|0);c[B>>2]=(N(c[(c[Q>>2]|0)+28>>2]|0,c[(c[Q>>2]|0)+24>>2]|0)|0)/1e3|0;if(!(c[S>>2]|0))c[B>>2]=(c[B>>2]|0)-(c[(c[T>>2]|0)+24536>>2]|0);c[B>>2]=(c[B>>2]|0)/(c[(c[T>>2]|0)+5776>>2]|0)|0;e=(c[B>>2]&65535)<<16>>16;if((c[(c[Q>>2]|0)+24>>2]|0)==10)c[q>>2]=e*100;else c[q>>2]=e*50;c[q>>2]=(c[q>>2]|0)-(((c[(c[T>>2]|0)+24540>>2]|0)*1e3|0)/500|0);if((c[S>>2]|0)==0?(c[(c[T>>2]|0)+5780>>2]|0)>0:0){aa=Fd(c[I>>2]|0)|0;c[r>>2]=aa-(c[(c[T>>2]|0)+24536>>2]|0)-(N(c[B>>2]|0,c[(c[T>>2]|0)+5780>>2]|0)|0);c[q>>2]=(c[q>>2]|0)-(((c[r>>2]|0)*1e3|0)/500|0)}e=c[q>>2]|0;do if((c[(c[Q>>2]|0)+28>>2]|0)>5e3)if((e|0)>(c[(c[Q>>2]|0)+28>>2]|0)){e=c[(c[Q>>2]|0)+28>>2]|0;break}else{e=(c[q>>2]|0)<5e3?5e3:c[q>>2]|0;break}else if((e|0)<=5e3)if((c[q>>2]|0)<(c[(c[Q>>2]|0)+28>>2]|0)){e=c[(c[Q>>2]|0)+28>>2]|0;break}else{e=c[q>>2]|0;break}else e=5e3;while(0);c[q>>2]=e;e=c[T>>2]|0;if((c[(c[Q>>2]|0)+4>>2]|0)==2){_e(e+24480|0,(c[T>>2]|0)+5128+4|0,(c[T>>2]|0)+12240+5128+4|0,(c[T>>2]|0)+24480+34+((c[(c[T>>2]|0)+5780>>2]|0)*6|0)|0,(c[T>>2]|0)+24480+52+(c[(c[T>>2]|0)+5780>>2]|0)|0,p,c[q>>2]|0,c[(c[T>>2]|0)+4556>>2]|0,c[(c[Q>>2]|0)+56>>2]|0,c[(c[T>>2]|0)+4600>>2]|0,c[(c[T>>2]|0)+4608>>2]|0);e=c[T>>2]|0;if(!(a[(c[T>>2]|0)+24480+52+(c[(c[T>>2]|0)+5780>>2]|0)>>0]|0)){if((c[e+24564>>2]|0)==1){aa=(c[T>>2]|0)+12240+7200|0;c[aa>>2]=0;c[aa+4>>2]=0;c[aa+8>>2]=0;c[aa+12>>2]=0;aj((c[T>>2]|0)+12240+7216|0,0,2140)|0;aj((c[T>>2]|0)+12240+144|0,0,4380)|0;aa=(c[T>>2]|0)+12240+4524|0;c[aa>>2]=0;c[aa+4>>2]=0;c[aa+8>>2]=0;c[aa+12>>2]=0;c[aa+16>>2]=0;c[aa+20>>2]=0;c[aa+24>>2]=0;c[aa+28>>2]=0;aa=(c[T>>2]|0)+12240+16|0;c[aa>>2]=0;c[aa+4>>2]=0;c[(c[T>>2]|0)+12240+4568>>2]=100;c[(c[T>>2]|0)+12240+144+4356>>2]=100;a[(c[T>>2]|0)+12240+7200>>0]=10;a[(c[T>>2]|0)+12240+4565>>0]=0;c[(c[T>>2]|0)+12240+144+4372>>2]=65536;c[(c[T>>2]|0)+12240+4696>>2]=1}vg((c[T>>2]|0)+12240|0)}else a[e+12240+4752+(c[(c[T>>2]|0)+5780>>2]|0)>>0]=0;if((c[S>>2]|0)==0?(ig(c[I>>2]|0,(c[T>>2]|0)+24480+34+((c[(c[T>>2]|0)+5780>>2]|0)*6|0)|0),(a[(c[T>>2]|0)+12240+4752+(c[(c[T>>2]|0)+5780>>2]|0)>>0]|0)==0):0)jg(c[I>>2]|0,a[(c[T>>2]|0)+24480+52+(c[(c[T>>2]|0)+5780>>2]|0)>>0]|0)}else{c[e+5128>>2]=c[(c[T>>2]|0)+24480+4>>2];aa=(c[T>>2]|0)+24480+4|0;n=(c[T>>2]|0)+5128+(c[(c[T>>2]|0)+4608>>2]<<1)|0;b[aa>>1]=b[n>>1]|0;b[aa+2>>1]=b[n+2>>1]|0}vg(c[T>>2]|0);c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;c[A>>2]=c[(c[Q>>2]|0)+52>>2];do if(!((c[M>>2]|0)==2&(c[v>>2]|0)==0)){if((c[M>>2]|0)==3){if(!(c[v>>2]|0)){c[A>>2]=(c[A>>2]<<1|0)/5|0;break}if((c[v>>2]|0)!=1)break;c[A>>2]=((c[A>>2]|0)*3|0)/4|0}}else c[A>>2]=((c[A>>2]|0)*3|0)/5|0;while(0);if(c[(c[Q>>2]|0)+48>>2]|0)e=(c[v>>2]|0)==((c[M>>2]|0)-1|0);else e=0;c[O>>2]=e&1;do if((c[(c[Q>>2]|0)+4>>2]|0)==1)c[s>>2]=c[q>>2];else{c[s>>2]=c[p+(c[R>>2]<<2)>>2];if(c[R>>2]|0)break;if((c[p+4>>2]|0)<=0)break;c[O>>2]=0;c[A>>2]=(c[A>>2]|0)-((c[(c[Q>>2]|0)+52>>2]|0)/(c[M>>2]<<1|0)|0)}while(0);if((c[s>>2]|0)>0){ef((c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0,c[s>>2]|0)|0;d:do if(((c[(c[T>>2]|0)+5780>>2]|0)-(c[R>>2]|0)|0)<=0)c[u>>2]=0;else{do if((c[R>>2]|0)>0){if(!(c[(c[T>>2]|0)+24564>>2]|0))break;c[u>>2]=1;break d}while(0);c[u>>2]=2}while(0);c[U>>2]=wg((c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0,c[D>>2]|0,c[I>>2]|0,c[u>>2]|0,c[A>>2]|0,c[O>>2]|0)|0}c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4700>>2]=0;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5772>>2]=0;aa=(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5780|0;c[aa>>2]=(c[aa>>2]|0)+1;c[R>>2]=(c[R>>2]|0)+1}c[(c[T>>2]|0)+24564>>2]=a[(c[T>>2]|0)+24480+52+((c[(c[T>>2]|0)+5780>>2]|0)-1)>>0];do if((c[c[D>>2]>>2]|0)>0?(c[(c[T>>2]|0)+5780>>2]|0)==(c[(c[T>>2]|0)+5776>>2]|0):0){c[w>>2]=0;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break;c[x>>2]=0;while(1){aa=(c[x>>2]|0)<(c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+5776>>2]|0);c[w>>2]=c[w>>2]<<1;e=(c[T>>2]|0)+((c[R>>2]|0)*12240|0)|0;if(!aa)break;c[w>>2]=c[w>>2]|a[e+4752+(c[x>>2]|0)>>0];c[x>>2]=(c[x>>2]|0)+1}c[w>>2]=c[w>>2]|a[e+4755>>0];c[R>>2]=(c[R>>2]|0)+1}if(!(c[S>>2]|0))dc(c[I>>2]|0,c[w>>2]|0,N((c[(c[T>>2]|0)+5776>>2]|0)+1|0,c[(c[Q>>2]|0)+4>>2]|0)|0);do if(c[(c[T>>2]|0)+6112>>2]|0){if((c[(c[Q>>2]|0)+4>>2]|0)!=1?(c[(c[T>>2]|0)+12240+6112>>2]|0)==0:0)break;c[c[D>>2]>>2]=0}while(0);n=(c[T>>2]|0)+24540|0;c[n>>2]=(c[n>>2]|0)+(c[c[D>>2]>>2]<<3);n=(N(c[(c[Q>>2]|0)+28>>2]|0,c[(c[Q>>2]|0)+24>>2]|0)|0)/1e3|0;aa=(c[T>>2]|0)+24540|0;c[aa>>2]=(c[aa>>2]|0)-n;do if((c[(c[T>>2]|0)+24540>>2]|0)>1e4)e=1e4;else{if((c[(c[T>>2]|0)+24540>>2]|0)<0){e=0;break}e=c[(c[T>>2]|0)+24540>>2]|0}while(0);c[(c[T>>2]|0)+24540>>2]=e;c[K>>2]=13+(0+(((c[(c[T>>2]|0)+24556>>2]&65535)<<16>>16)*3188>>16));e=(c[T>>2]|0)+24560|0;if((c[(c[T>>2]|0)+4556>>2]|0)<(c[K>>2]|0)){c[e>>2]=1;c[(c[T>>2]|0)+24556>>2]=0;break}else{c[e>>2]=0;aa=(c[T>>2]|0)+24556|0;c[aa>>2]=(c[aa>>2]|0)+(c[(c[Q>>2]|0)+24>>2]|0);break}}while(0);if(!(c[F>>2]|0))break;c[v>>2]=(c[v>>2]|0)+1}c[(c[T>>2]|0)+24552>>2]=c[(c[Q>>2]|0)+4>>2];c[(c[Q>>2]|0)+72>>2]=c[(c[T>>2]|0)+24560>>2];if((c[(c[T>>2]|0)+4600>>2]|0)==16)e=(c[(c[T>>2]|0)+16+12>>2]|0)==0;else e=0;c[(c[Q>>2]|0)+76>>2]=e&1;c[(c[Q>>2]|0)+68>>2]=((c[(c[T>>2]|0)+4600>>2]&65535)<<16>>16)*1e3;if(c[(c[Q>>2]|0)+56>>2]|0)e=0;else e=b[(c[T>>2]|0)+24480+28>>1]|0;c[(c[Q>>2]|0)+80>>2]=e;e:do if(c[S>>2]|0){c[(c[Q>>2]|0)+24>>2]=c[Y>>2];c[(c[Q>>2]|0)+36>>2]=c[X>>2];c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[(c[Q>>2]|0)+4>>2]|0))break e;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4700>>2]=0;c[(c[T>>2]|0)+((c[R>>2]|0)*12240|0)+4712>>2]=0;c[R>>2]=(c[R>>2]|0)+1}}while(0);c[V>>2]=c[U>>2];_(c[W>>2]|0);aa=c[V>>2]|0;l=Z;return aa|0}function Fd(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function Gd(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+112|0;v=y+48|0;x=y+44|0;i=y+40|0;j=y+36|0;n=y+32|0;r=y+28|0;s=y+24|0;k=y+20|0;q=y+16|0;o=y+12|0;p=y+56|0;m=y+88|0;w=y+8|0;t=y+4|0;u=y;c[v>>2]=d;c[x>>2]=e;c[i>>2]=f;c[j>>2]=g;c[n>>2]=h;f=c[v>>2]|0;if(c[j>>2]|0)c[w>>2]=f+6132+((c[i>>2]|0)*36|0);else c[w>>2]=f+4768;c[k>>2]=(a[(c[w>>2]|0)+29>>0]<<1)+(a[(c[w>>2]|0)+30>>0]|0);h=c[x>>2]|0;f=c[k>>2]|0;if((c[j>>2]|0)!=0|(c[k>>2]|0)>=2)$b(h,f-2|0,29016,8);else $b(h,f,29020,8);f=c[x>>2]|0;h=a[c[w>>2]>>0]|0;if((c[n>>2]|0)==2)$b(f,h,26767,8);else{$b(f,h>>3,26743+(a[(c[w>>2]|0)+29>>0]<<3)|0,8);$b(c[x>>2]|0,a[c[w>>2]>>0]&7,29045,8)}c[r>>2]=1;while(1){f=c[x>>2]|0;h=c[w>>2]|0;if((c[r>>2]|0)>=(c[(c[v>>2]|0)+4604>>2]|0))break;$b(f,a[h+(c[r>>2]|0)>>0]|0,26767,8);c[r>>2]=(c[r>>2]|0)+1}$b(f,a[h+8>>0]|0,(c[(c[(c[v>>2]|0)+4724>>2]|0)+12>>2]|0)+(N(a[(c[w>>2]|0)+29>>0]>>1,b[c[(c[v>>2]|0)+4724>>2]>>1]|0)|0)|0,8);Xe(p,m,c[(c[v>>2]|0)+4724>>2]|0,a[(c[w>>2]|0)+8>>0]|0);c[r>>2]=0;while(1){if((c[r>>2]|0)>=(b[(c[(c[v>>2]|0)+4724>>2]|0)+2>>1]|0))break;do if((a[(c[w>>2]|0)+8+((c[r>>2]|0)+1)>>0]|0)<4){f=c[x>>2]|0;if((a[(c[w>>2]|0)+8+((c[r>>2]|0)+1)>>0]|0)<=-4){$b(f,0,(c[(c[(c[v>>2]|0)+4724>>2]|0)+24>>2]|0)+(b[p+(c[r>>2]<<1)>>1]|0)|0,8);$b(c[x>>2]|0,0-(a[(c[w>>2]|0)+8+((c[r>>2]|0)+1)>>0]|0)-4|0,29053,8);break}else{$b(f,(a[(c[w>>2]|0)+8+((c[r>>2]|0)+1)>>0]|0)+4|0,(c[(c[(c[v>>2]|0)+4724>>2]|0)+24>>2]|0)+(b[p+(c[r>>2]<<1)>>1]|0)|0,8);break}}else{$b(c[x>>2]|0,8,(c[(c[(c[v>>2]|0)+4724>>2]|0)+24>>2]|0)+(b[p+(c[r>>2]<<1)>>1]|0)|0,8);$b(c[x>>2]|0,(a[(c[w>>2]|0)+8+((c[r>>2]|0)+1)>>0]|0)-4|0,29053,8)}while(0);c[r>>2]=(c[r>>2]|0)+1}if((c[(c[v>>2]|0)+4604>>2]|0)==4)$b(c[x>>2]|0,a[(c[w>>2]|0)+31>>0]|0,29022,8);if((a[(c[w>>2]|0)+29>>0]|0)!=2){u=c[w>>2]|0;u=u+29|0;u=a[u>>0]|0;u=u<<24>>24;v=c[v>>2]|0;v=v+5800|0;c[v>>2]=u;v=c[x>>2]|0;x=c[w>>2]|0;x=x+34|0;x=a[x>>0]|0;x=x<<24>>24;$b(v,x,29030,8);l=y;return}c[q>>2]=1;if((c[n>>2]|0)==2?(c[(c[v>>2]|0)+5800>>2]|0)==2:0){c[o>>2]=(b[(c[w>>2]|0)+26>>1]|0)-(b[(c[v>>2]|0)+5804>>1]|0);if((c[o>>2]|0)<-8|(c[o>>2]|0)>11)c[o>>2]=0;else{c[o>>2]=(c[o>>2]|0)+9;c[q>>2]=0}$b(c[x>>2]|0,c[o>>2]|0,29092,8)}if(c[q>>2]|0){c[t>>2]=(b[(c[w>>2]|0)+26>>1]|0)/(c[(c[v>>2]|0)+4600>>2]>>1|0)|0;c[u>>2]=(b[(c[w>>2]|0)+26>>1]|0)-(N((c[t>>2]&65535)<<16>>16,(c[(c[v>>2]|0)+4600>>2]>>1&65535)<<16>>16)|0);$b(c[x>>2]|0,c[t>>2]|0,29060,8);$b(c[x>>2]|0,c[u>>2]|0,c[(c[v>>2]|0)+4716>>2]|0,8)}b[(c[v>>2]|0)+5804>>1]=b[(c[w>>2]|0)+26>>1]|0;$b(c[x>>2]|0,a[(c[w>>2]|0)+28>>0]|0,c[(c[v>>2]|0)+4720>>2]|0,8);$b(c[x>>2]|0,a[(c[w>>2]|0)+32>>0]|0,26808,8);c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[(c[v>>2]|0)+4604>>2]|0))break;$b(c[x>>2]|0,a[(c[w>>2]|0)+4+(c[s>>2]|0)>>0]|0,c[17620+(a[(c[w>>2]|0)+32>>0]<<2)>>2]|0,8);c[s>>2]=(c[s>>2]|0)+1}if(c[n>>2]|0){u=c[w>>2]|0;u=u+29|0;u=a[u>>0]|0;u=u<<24>>24;v=c[v>>2]|0;v=v+5800|0;c[v>>2]=u;v=c[x>>2]|0;x=c[w>>2]|0;x=x+34|0;x=a[x>>0]|0;x=x<<24>>24;$b(v,x,29030,8);l=y;return}$b(c[x>>2]|0,a[(c[w>>2]|0)+33>>0]|0,29013,8);u=c[w>>2]|0;u=u+29|0;u=a[u>>0]|0;u=u<<24>>24;v=c[v>>2]|0;v=v+5800|0;c[v>>2]=u;v=c[x>>2]|0;x=c[w>>2]|0;x=x+34|0;x=a[x>>0]|0;x=x<<24>>24;$b(v,x,29030,8);l=y;return}function Hd(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;F=l;l=l+128|0;z=F+116|0;E=F+112|0;C=F+108|0;A=F+104|0;t=F+100|0;u=F+96|0;x=F+92|0;w=F+88|0;v=F+84|0;s=F+80|0;y=F+76|0;k=F+72|0;m=F+68|0;r=F+64|0;n=F+60|0;p=F+56|0;j=F+24|0;i=F+16|0;B=F+12|0;q=F+8|0;o=F+4|0;D=F;c[z>>2]=b;c[E>>2]=e;c[C>>2]=f;c[A>>2]=g;c[t>>2]=h;c[m>>2]=0;c[j>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;c[j+16>>2]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>2]<<2)|0,j,d[29176]|0,1)|0;c[k>>2]=(c[k>>2]|0)+e;if(!(c[k>>2]|0))break;e=f+(c[u>>2]<<2)|0;c[e>>2]=(c[e>>2]|0)+1;c[x>>2]=0;while(1){if((c[x>>2]|0)>=16)continue a;c[(c[i>>2]|0)+(c[x>>2]<<2)>>2]=c[(c[i>>2]|0)+(c[x>>2]<<2)>>2]>>1;c[x>>2]=(c[x>>2]|0)+1}}c[i>>2]=(c[i>>2]|0)+64;c[u>>2]=(c[u>>2]|0)+1}c[n>>2]=2147483647;c[x>>2]=0;while(1){if((c[x>>2]|0)>=9)break;c[o>>2]=29357+((c[x>>2]|0)*18|0);c[p>>2]=d[29537+((c[E>>2]>>1)*9|0)+(c[x>>2]|0)>>0];c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[v>>2]|0))break;h=c[o>>2]|0;if((c[f+(c[u>>2]<<2)>>2]|0)>0)c[p>>2]=(c[p>>2]|0)+(d[h+17>>0]|0);else c[p>>2]=(c[p>>2]|0)+(d[h+(c[g+(c[u>>2]<<2)>>2]|0)>>0]|0);c[u>>2]=(c[u>>2]|0)+1}if((c[p>>2]|0)<(c[n>>2]|0)){c[n>>2]=c[p>>2];c[m>>2]=c[x>>2]}c[x>>2]=(c[x>>2]|0)+1}$b(c[z>>2]|0,c[m>>2]|0,29519+((c[E>>2]>>1)*9|0)|0,8);c[q>>2]=29177+((c[m>>2]|0)*18|0);c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[v>>2]|0))break;h=c[z>>2]|0;if(!(c[f+(c[u>>2]<<2)>>2]|0))$b(h,c[g+(c[u>>2]<<2)>>2]|0,c[q>>2]|0,8);else{$b(h,17,c[q>>2]|0,8);c[x>>2]=0;while(1){h=c[z>>2]|0;if((c[x>>2]|0)>=((c[f+(c[u>>2]<<2)>>2]|0)-1|0))break;$b(h,17,29339,8);c[x>>2]=(c[x>>2]|0)+1}$b(h,c[g+(c[u>>2]<<2)>>2]|0,29339,8)}c[u>>2]=(c[u>>2]|0)+1}c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[v>>2]|0))break;if((c[g+(c[u>>2]<<2)>>2]|0)>0)ye(c[z>>2]|0,b+(c[u>>2]<<4<<2)|0);c[u>>2]=(c[u>>2]|0)+1}c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[v>>2]|0))break;b:do if((c[f+(c[u>>2]<<2)>>2]|0)>0){c[B>>2]=(c[A>>2]|0)+(c[u>>2]<<4);c[y>>2]=(c[f+(c[u>>2]<<2)>>2]|0)-1;c[x>>2]=0;while(1){if((c[x>>2]|0)>=16)break b;q=a[(c[B>>2]|0)+(c[x>>2]|0)>>0]|0;c[r>>2]=(((a[(c[B>>2]|0)+(c[x>>2]|0)>>0]|0)>0?q:0-q|0)&255)<<24>>24;c[w>>2]=c[y>>2];while(1){h=c[r>>2]|0;if((c[w>>2]|0)<=0)break;c[s>>2]=h>>c[w>>2]&1;$b(c[z>>2]|0,c[s>>2]|0,29011,8);c[w>>2]=(c[w>>2]|0)+-1}c[s>>2]=h&1;$b(c[z>>2]|0,c[s>>2]|0,29011,8);c[x>>2]=(c[x>>2]|0)+1}}while(0);c[u>>2]=(c[u>>2]|0)+1}md(c[z>>2]|0,c[A>>2]|0,c[t>>2]|0,c[E>>2]|0,c[C>>2]|0,g);_(c[D>>2]|0);l=F;return}function Id(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n+24|0;i=n+20|0;j=n+16|0;h=n+12|0;g=n+8|0;f=n+4|0;k=n;c[i>>2]=a;c[j>>2]=b;c[h>>2]=d;c[g>>2]=e;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[g>>2]|0)){f=6;break}c[k>>2]=(c[(c[j>>2]|0)+(c[f>>2]<<1<<2)>>2]|0)+(c[(c[j>>2]|0)+((c[f>>2]<<1)+1<<2)>>2]|0);if((c[k>>2]|0)>(c[h>>2]|0)){f=4;break}c[(c[i>>2]|0)+(c[f>>2]<<2)>>2]=c[k>>2];c[f>>2]=(c[f>>2]|0)+1}if((f|0)==4){c[m>>2]=1;m=c[m>>2]|0;l=n;return m|0}else if((f|0)==6){c[m>>2]=0;m=c[m>>2]|0;l=n;return m|0}return 0} +function Jd(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;k=p+24|0;j=p+20|0;o=p+16|0;h=p+12|0;n=p+8|0;m=p+4|0;i=p;c[k>>2]=b;c[j>>2]=d;c[o>>2]=e;c[h>>2]=f;c[n>>2]=g;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[n>>2]|0))break;Bf(c[(c[j>>2]|0)+(c[m>>2]<<2)>>2]|0)|0;e=0+((((Bf(c[(c[j>>2]|0)+(c[m>>2]<<2)>>2]|0)|0)-2090&65535)<<16>>16)*2251>>16)&255;a[(c[k>>2]|0)+(c[m>>2]|0)>>0]=e;if((a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0)<(a[c[o>>2]>>0]|0)){e=(c[k>>2]|0)+(c[m>>2]|0)|0;a[e>>0]=(a[e>>0]|0)+1<<24>>24}if((a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0)<=63)if((a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0)<0)f=0;else f=a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0;else f=63;a[(c[k>>2]|0)+(c[m>>2]|0)>>0]=f;if((c[m>>2]|0)==0&(c[h>>2]|0)==0){f=a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0;do if(((a[c[o>>2]>>0]|0)+-4|0)>63){if((f|0)>((a[c[o>>2]>>0]|0)+-4|0)){f=(a[c[o>>2]>>0]|0)+-4|0;break}if((a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0)<63)f=63;else f=a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0}else if((f|0)<=63)if((a[(c[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b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Ld(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;j=q+28|0;k=q+24|0;p=q+20|0;h=q+16|0;o=q+12|0;n=q+8|0;m=q+4|0;i=q;c[j>>2]=b;c[k>>2]=d;c[p>>2]=e;c[h>>2]=f;c[o>>2]=g;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[o>>2]|0))break;f=a[(c[k>>2]|0)+(c[n>>2]|0)>>0]|0;if((c[n>>2]|0)==0&(c[h>>2]|0)==0){e=(Md(f,(a[c[p>>2]>>0]|0)-16|0)|0)&255;a[c[p>>2]>>0]=e}else{c[m>>2]=f+-4;c[i>>2]=8+(a[c[p>>2]>>0]|0);f=c[m>>2]|0;if((c[m>>2]|0)>(c[i>>2]|0)){f=(f<<1)-(c[i>>2]|0)|0;b=c[p>>2]|0}else b=c[p>>2]|0;a[b>>0]=(a[b>>0]|0)+f}if((a[c[p>>2]>>0]|0)<=63)if((a[c[p>>2]>>0]|0)<0)f=0;else f=a[c[p>>2]>>0]|0;else f=63;a[c[p>>2]>>0]=f;e=Ff(Kd(((a[c[p>>2]>>0]<<16>>16)*29|0)+((a[c[p>>2]>>0]<<16>>16)*7281>>16)+2090|0,3967)|0)|0;c[(c[j>>2]|0)+(c[n>>2]<<2)>>2]=e;c[n>>2]=(c[n>>2]|0)+1}l=q;return}function Md(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Nd(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+12|0;h=i+8|0;g=i+4|0;e=i;c[f>>2]=b;c[h>>2]=d;c[e>>2]=0;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[h>>2]|0))break;c[e>>2]=(a[(c[f>>2]|0)+(c[g>>2]|0)>>0]|0)+(c[e>>2]<<8);c[g>>2]=(c[g>>2]|0)+1}l=i;return c[e>>2]|0}function Od(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;n=o+20|0;k=o+16|0;m=o+12|0;j=o+8|0;h=o+4|0;i=o;c[n>>2]=a;c[k>>2]=d;c[m>>2]=e;c[j>>2]=f;c[h>>2]=g;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[h>>2]|0))break;a=(b[(c[k>>2]|0)+(c[i>>2]<<1)>>1]|0)+((N(((b[(c[m>>2]|0)+(c[i>>2]<<1)>>1]|0)-(b[(c[k>>2]|0)+(c[i>>2]<<1)>>1]|0)&65535)<<16>>16,(c[j>>2]&65535)<<16>>16)|0)>>2)&65535;b[(c[n>>2]|0)+(c[i>>2]<<1)>>1]=a;c[i>>2]=(c[i>>2]|0)+1}l=o;return}function Pd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+48|0;k=m+36|0;i=m+32|0;j=m+28|0;h=m+16|0;g=m+8|0;e=m+4|0;f=m;c[k>>2]=a;c[i>>2]=b;c[j>>2]=d;c[e>>2]=0;c[f>>2]=0;if(!(c[(c[k>>2]|0)+12>>2]|0)){l=m;return}c[e>>2]=256-(c[(c[k>>2]|0)+8>>2]|0)<<10;c[f>>2]=c[e>>2]>>16;c[e>>2]=(c[e>>2]|0)-(c[f>>2]<<16);Qd(h,g,c[f>>2]|0,c[e>>2]|0);if(((c[(c[k>>2]|0)+8>>2]|0)+(c[(c[k>>2]|0)+12>>2]|0)|0)<=256)if(((c[(c[k>>2]|0)+8>>2]|0)+(c[(c[k>>2]|0)+12>>2]|0)|0)<0)e=0;else e=(c[(c[k>>2]|0)+8>>2]|0)+(c[(c[k>>2]|0)+12>>2]|0)|0;else e=256;c[(c[k>>2]|0)+8>>2]=e;wf(c[i>>2]|0,h,g,c[k>>2]|0,c[i>>2]|0,c[j>>2]|0,1);l=m;return}function Qd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;g=m+20|0;f=m+16|0;i=m+12|0;h=m+8|0;k=m+4|0;j=m;c[g>>2]=a;c[f>>2]=b;c[i>>2]=d;c[h>>2]=e;if((c[i>>2]|0)>=4){k=c[g>>2]|0;c[k>>2]=c[4473];c[k+4>>2]=c[4474];c[k+8>>2]=c[4475];k=c[f>>2]|0;c[k>>2]=c[4484];c[k+4>>2]=c[4485];l=m;return}if((c[h>>2]|0)<=0){k=c[g>>2]|0;j=17844+((c[i>>2]|0)*12|0)|0;c[k>>2]=c[j>>2];c[k+4>>2]=c[j+4>>2];c[k+8>>2]=c[j+8>>2];k=c[f>>2]|0;j=17904+(c[i>>2]<<3)|0;c[k>>2]=c[j>>2];c[k+4>>2]=c[j+4>>2];l=m;return}d=(c[h>>2]|0)<32768;c[k>>2]=0;if(d){while(1){if((c[k>>2]|0)>=3)break;d=N((c[17844+(((c[i>>2]|0)+1|0)*12|0)+(c[k>>2]<<2)>>2]|0)-(c[17844+((c[i>>2]|0)*12|0)+(c[k>>2]<<2)>>2]|0)>>16,(c[h>>2]&65535)<<16>>16)|0;d=(c[17844+((c[i>>2]|0)*12|0)+(c[k>>2]<<2)>>2]|0)+(d+((N((c[17844+(((c[i>>2]|0)+1|0)*12|0)+(c[k>>2]<<2)>>2]|0)-(c[17844+((c[i>>2]|0)*12|0)+(c[k>>2]<<2)>>2]|0)&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[g>>2]|0)+(c[k>>2]<<2)>>2]=d;c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=0;while(1){if((c[j>>2]|0)>=2)break;k=N((c[17904+((c[i>>2]|0)+1<<3)+(c[j>>2]<<2)>>2]|0)-(c[17904+(c[i>>2]<<3)+(c[j>>2]<<2)>>2]|0)>>16,(c[h>>2]&65535)<<16>>16)|0;k=(c[17904+(c[i>>2]<<3)+(c[j>>2]<<2)>>2]|0)+(k+((N((c[17904+((c[i>>2]|0)+1<<3)+(c[j>>2]<<2)>>2]|0)-(c[17904+(c[i>>2]<<3)+(c[j>>2]<<2)>>2]|0)&65535,(c[h>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[f>>2]|0)+(c[j>>2]<<2)>>2]=k;c[j>>2]=(c[j>>2]|0)+1}l=m;return}else{while(1){if((c[k>>2]|0)>=3)break;d=N((c[17844+(((c[i>>2]|0)+1|0)*12|0)+(c[k>>2]<<2)>>2]|0)-(c[17844+((c[i>>2]|0)*12|0)+(c[k>>2]<<2)>>2]|0)>>16,((c[h>>2]|0)-65536&65535)<<16>>16)|0;d=(c[17844+(((c[i>>2]|0)+1|0)*12|0)+(c[k>>2]<<2)>>2]|0)+(d+((N((c[17844+(((c[i>>2]|0)+1|0)*12|0)+(c[k>>2]<<2)>>2]|0)-(c[17844+((c[i>>2]|0)*12|0)+(c[k>>2]<<2)>>2]|0)&65535,((c[h>>2]|0)-65536&65535)<<16>>16)|0)>>16))|0;c[(c[g>>2]|0)+(c[k>>2]<<2)>>2]=d;c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=0;while(1){if((c[j>>2]|0)>=2)break;k=N((c[17904+((c[i>>2]|0)+1<<3)+(c[j>>2]<<2)>>2]|0)-(c[17904+(c[i>>2]<<3)+(c[j>>2]<<2)>>2]|0)>>16,((c[h>>2]|0)-65536&65535)<<16>>16)|0;k=(c[17904+((c[i>>2]|0)+1<<3)+(c[j>>2]<<2)>>2]|0)+(k+((N((c[17904+((c[i>>2]|0)+1<<3)+(c[j>>2]<<2)>>2]|0)-(c[17904+(c[i>>2]<<3)+(c[j>>2]<<2)>>2]|0)&65535,((c[h>>2]|0)-65536&65535)<<16>>16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=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;r=l;l=l+32|0;q=r+24|0;k=r+20|0;o=r+16|0;p=r+12|0;s=r+28|0;j=r+8|0;m=r+4|0;n=r;c[q>>2]=e;c[k>>2]=f;c[o>>2]=g;c[p>>2]=h;b[s>>1]=i;c[m>>2]=0;c[j>>2]=(b[s>>1]|0)-1;while(1){if((c[j>>2]|0)<0)break;c[n>>2]=(N((c[m>>2]&65535)<<16>>16,d[(c[o>>2]|0)+(c[j>>2]|0)>>0]|0)|0)>>8;c[m>>2]=a[(c[k>>2]|0)+(c[j>>2]|0)>>0]<<10;f=c[m>>2]|0;if((c[m>>2]|0)<=0){if((f|0)<0)c[m>>2]=(c[m>>2]|0)+102}else c[m>>2]=f-102;s=N(c[m>>2]>>16,(c[p>>2]&65535)<<16>>16)|0;c[m>>2]=(c[n>>2]|0)+(s+((N(c[m>>2]&65535,(c[p>>2]&65535)<<16>>16)|0)>>16));b[(c[q>>2]|0)+(c[j>>2]<<1)>>1]=c[m>>2];c[j>>2]=(c[j>>2]|0)+-1}l=r;return}function Td(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}Ud(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function Ud(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=Vd(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(Wd(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function Vd(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function Wd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function Xd(d,e,f,g,h,i,j,k,m,n,o,p,q,r,s){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;var t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;U=l;l=l+112|0;M=U+100|0;F=U+96|0;O=U+92|0;T=U+88|0;P=U+84|0;G=U+80|0;C=U+76|0;t=U+72|0;z=U+68|0;H=U+64|0;A=U+60|0;x=U+56|0;L=U+52|0;E=U+48|0;D=U+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]|0))break;E=N(c[(c[B>>2]|0)+(c[s>>2]<<2)>>2]>>16,(c[t>>2]&65535)<<16>>16)|0;E=E+((N(c[(c[B>>2]|0)+(c[s>>2]<<2)>>2]&65535,(c[t>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[(c[B>>2]|0)+(c[s>>2]<<2)>>2]|0,(c[t>>2]>>15)+1>>1)|0)|0;c[(c[C>>2]|0)+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}c[(c[q>>2]|0)+4372>>2]=c[(c[o>>2]|0)+(c[A>>2]<<2)>>2];a:do if(c[(c[q>>2]|0)+4376>>2]|0){if(!(c[A>>2]|0)){E=N(c[u>>2]>>16,(c[p>>2]&65535)<<16>>16)|0;c[u>>2]=E+((N(c[u>>2]&65535,(c[p>>2]&65535)<<16>>16)|0)>>16)<<2}c[s>>2]=(c[(c[q>>2]|0)+4360>>2]|0)-(c[v>>2]|0)-2;while(1){if((c[s>>2]|0)>=(c[(c[q>>2]|0)+4360>>2]|0))break a;E=N(c[u>>2]>>16,b[(c[x>>2]|0)+(c[s>>2]<<1)>>1]|0)|0;E=E+((N(c[u>>2]&65535,b[(c[x>>2]|0)+(c[s>>2]<<1)>>1]|0)|0)>>16)|0;c[(c[y>>2]|0)+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}}while(0);if((c[r>>2]|0)==65536){l=D;return}c[s>>2]=(c[(c[q>>2]|0)+4364>>2]|0)-(c[(c[w>>2]|0)+4616>>2]|0);while(1){if((c[s>>2]|0)>=(c[(c[q>>2]|0)+4364>>2]|0))break;E=N(c[r>>2]>>16,(c[(c[q>>2]|0)+1280+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0;E=E+((N(c[r>>2]&65535,(c[(c[q>>2]|0)+1280+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[r>>2]|0,(c[(c[q>>2]|0)+1280+(c[s>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[q>>2]|0)+1280+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}b:do if((c[z>>2]|0)==2?(c[(c[q>>2]|0)+4376>>2]|0)==0:0){c[s>>2]=(c[(c[q>>2]|0)+4360>>2]|0)-(c[v>>2]|0)-2;while(1){if((c[s>>2]|0)>=(c[(c[q>>2]|0)+4360>>2]|0))break b;E=N(c[r>>2]>>16,(c[(c[y>>2]|0)+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0;E=E+((N(c[r>>2]&65535,(c[(c[y>>2]|0)+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[r>>2]|0,(c[(c[y>>2]|0)+(c[s>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[y>>2]|0)+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}}while(0);E=N(c[r>>2]>>16,(c[(c[q>>2]|0)+4352>>2]&65535)<<16>>16)|0;E=E+((N(c[r>>2]&65535,(c[(c[q>>2]|0)+4352>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[r>>2]|0,(c[(c[q>>2]|0)+4352>>2]>>15)+1>>1)|0)|0;c[(c[q>>2]|0)+4352>>2]=E;c[s>>2]=0;while(1){if((c[s>>2]|0)>=32)break;E=N(c[r>>2]>>16,(c[(c[q>>2]|0)+3840+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0;E=E+((N(c[r>>2]&65535,(c[(c[q>>2]|0)+3840+(c[s>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;E=E+(N(c[r>>2]|0,(c[(c[q>>2]|0)+3840+(c[s>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[q>>2]|0)+3840+(c[s>>2]<<2)>>2]=E;c[s>>2]=(c[s>>2]|0)+1}c[s>>2]=0;while(1){if((c[s>>2]|0)>=16)break;E=N(c[r>>2]>>16,(c[(c[q>>2]|0)+4288+(c[s>>2]<<2)>>2]&65535)<<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+((N(c[(c[T>>2]|0)+-16>>2]&65535,b[(c[G>>2]|0)+8>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-20>>2]>>16,b[(c[G>>2]|0)+10>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-20>>2]&65535,b[(c[G>>2]|0)+10>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-24>>2]>>16,b[(c[G>>2]|0)+12>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-24>>2]&65535,b[(c[G>>2]|0)+12>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-28>>2]>>16,b[(c[G>>2]|0)+14>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-28>>2]&65535,b[(c[G>>2]|0)+14>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-32>>2]>>16,b[(c[G>>2]|0)+16>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-32>>2]&65535,b[(c[G>>2]|0)+16>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-36>>2]>>16,b[(c[G>>2]|0)+18>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-36>>2]&65535,b[(c[G>>2]|0)+18>>1]|0)|0)>>16));if((c[S>>2]|0)==16){na=N(c[(c[T>>2]|0)+-40>>2]>>16,b[(c[G>>2]|0)+20>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-40>>2]&65535,b[(c[G>>2]|0)+20>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-44>>2]>>16,b[(c[G>>2]|0)+22>>1]|0)|0;c[C>>2]=(c[C>>2]|0)+(na+((N(c[(c[T>>2]|0)+-44>>2]&65535,b[(c[G>>2]|0)+22>>1]|0)|0)>>16));na=N(c[(c[T>>2]|0)+-48>>2]>>16,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((N(c[fa>>2]&65535,b[(c[x>>2]|0)+((c[ca>>2]|0)-1<<1)>>1]|0)|0)>>16));c[M>>2]=c[M>>2]<<1;na=N(c[(c[ka>>2]|0)+4352>>2]>>16,(c[F>>2]&65535)<<16>>16)|0;c[M>>2]=(c[M>>2]|0)+(na+((N(c[(c[ka>>2]|0)+4352>>2]&65535,(c[F>>2]&65535)<<16>>16)|0)>>16));na=N(c[(c[ka>>2]|0)+1280+((c[(c[ka>>2]|0)+4364>>2]|0)-1<<2)>>2]>>16,(c[A>>2]&65535)<<16>>16)|0;c[O>>2]=na+((N(c[(c[ka>>2]|0)+1280+((c[(c[ka>>2]|0)+4364>>2]|0)-1<<2)>>2]&65535,(c[A>>2]&65535)<<16>>16)|0)>>16);na=(c[O>>2]|0)+(N(c[(c[ka>>2]|0)+4352>>2]>>16,c[A>>2]>>16)|0)|0;c[O>>2]=na+((N(c[(c[ka>>2]|0)+4352>>2]&65535,c[A>>2]>>16)|0)>>16);c[fa>>2]=(c[C>>2]<<2)-(c[M>>2]|0);c[fa>>2]=(c[fa>>2]|0)-(c[O>>2]|0);if((c[L>>2]|0)>0){na=N((c[c[da>>2]>>2]|0)+(c[(c[da>>2]|0)+-8>>2]|0)>>16,(c[z>>2]&65535)<<16>>16)|0;c[P>>2]=na+((N((c[c[da>>2]>>2]|0)+(c[(c[da>>2]|0)+-8>>2]|0)&65535,(c[z>>2]&65535)<<16>>16)|0)>>16);na=(c[P>>2]|0)+(N(c[(c[da>>2]|0)+-4>>2]>>16,c[z>>2]>>16)|0)|0;c[P>>2]=na+((N(c[(c[da>>2]|0)+-4>>2]&65535,c[z>>2]>>16)|0)>>16);c[P>>2]=c[P>>2]<<1;c[da>>2]=(c[da>>2]|0)+4;c[ga>>2]=(c[D>>2]|0)-(c[P>>2]|0);c[fa>>2]=(c[ga>>2]|0)+(c[fa>>2]<<1);c[fa>>2]=(c[fa>>2]>>2)+1>>1}else c[fa>>2]=(c[fa>>2]>>1)+1>>1;c[Y>>2]=(c[(c[ha>>2]|0)+(c[J>>2]<<2)>>2]|0)-(c[fa>>2]|0);if((c[(c[ka>>2]|0)+4368>>2]|0)<0)c[Y>>2]=0-(c[Y>>2]|0);if((c[Y>>2]|0)>30720)m=30720;else m=(c[Y>>2]|0)<-31744?-31744:c[Y>>2]|0;c[Y>>2]=m;c[W>>2]=(c[Y>>2]|0)-(c[Q>>2]|0);c[V>>2]=c[W>>2]>>10;m=c[V>>2]|0;do if((c[V>>2]|0)<=0){if(!m){c[W>>2]=c[Q>>2];c[X>>2]=(c[W>>2]|0)+944;c[Z>>2]=N((c[W>>2]&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;c[_>>2]=N((c[X>>2]&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;break}if((c[V>>2]|0)==-1){c[X>>2]=c[Q>>2];c[W>>2]=(c[X>>2]|0)-944;c[Z>>2]=N((0-(c[W>>2]|0)&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;c[_>>2]=N((c[X>>2]&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;break}else{c[W>>2]=(c[V>>2]<<10)+80;c[W>>2]=(c[W>>2]|0)+(c[Q>>2]|0);c[X>>2]=(c[W>>2]|0)+1024;c[Z>>2]=N((0-(c[W>>2]|0)&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;c[_>>2]=N((0-(c[X>>2]|0)&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;break}}else{c[W>>2]=(m<<10)-80;c[W>>2]=(c[W>>2]|0)+(c[Q>>2]|0);c[X>>2]=(c[W>>2]|0)+1024;c[Z>>2]=N((c[W>>2]&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0;c[_>>2]=N((c[X>>2]&65535)<<16>>16,(c[E>>2]&65535)<<16>>16)|0}while(0);c[$>>2]=(c[Y>>2]|0)-(c[W>>2]|0);c[Z>>2]=(c[Z>>2]|0)+(N((c[$>>2]&65535)<<16>>16,(c[$>>2]&65535)<<16>>16)|0);c[$>>2]=(c[Y>>2]|0)-(c[X>>2]|0);c[_>>2]=(c[_>>2]|0)+(N((c[$>>2]&65535)<<16>>16,(c[$>>2]&65535)<<16>>16)|0);if((c[_>>2]|0)<(c[Z>>2]|0))c[W>>2]=c[X>>2];a[(c[U>>2]|0)+(c[J>>2]|0)>>0]=(c[W>>2]>>9)+1>>1;c[I>>2]=c[W>>2]<<4;if((c[(c[ka>>2]|0)+4368>>2]|0)<0)c[I>>2]=0-(c[I>>2]|0);c[B>>2]=(c[I>>2]|0)+(c[D>>2]<<1);c[ja>>2]=(c[B>>2]|0)+(c[C>>2]<<4);na=N(c[ja>>2]>>16,(c[y>>2]&65535)<<16>>16)|0;na=na+((N(c[ja>>2]&65535,(c[y>>2]&65535)<<16>>16)|0)>>16)|0;if(((na+(N(c[ja>>2]|0,(c[y>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){na=N(c[ja>>2]>>16,(c[y>>2]&65535)<<16>>16)|0;na=na+((N(c[ja>>2]&65535,(c[y>>2]&65535)<<16>>16)|0)>>16)|0;if(((na+(N(c[ja>>2]|0,(c[y>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)m=-32768;else{m=N(c[ja>>2]>>16,(c[y>>2]&65535)<<16>>16)|0;m=m+((N(c[ja>>2]&65535,(c[y>>2]&65535)<<16>>16)|0)>>16)|0;m=(m+(N(c[ja>>2]|0,(c[y>>2]>>15)+1>>1)|0)>>7)+1>>1}}else m=32767;b[(c[ia>>2]|0)+(c[J>>2]<<1)>>1]=m;c[T>>2]=(c[T>>2]|0)+4;c[c[T>>2]>>2]=c[ja>>2];c[aa>>2]=(c[ja>>2]|0)-(c[M>>2]<<2);c[(c[ka>>2]|0)+4352>>2]=c[aa>>2];c[(c[ka>>2]|0)+1280+(c[(c[ka>>2]|0)+4364>>2]<<2)>>2]=(c[aa>>2]|0)-(c[O>>2]<<2);c[(c[ba>>2]|0)+(c[(c[ka>>2]|0)+4360>>2]<<2)>>2]=c[B>>2]<<1;na=(c[ka>>2]|0)+4364|0;c[na>>2]=(c[na>>2]|0)+1;na=(c[ka>>2]|0)+4360|0;c[na>>2]=(c[na>>2]|0)+1;c[(c[ka>>2]|0)+4368>>2]=(c[(c[ka>>2]|0)+4368>>2]|0)+(a[(c[U>>2]|0)+(c[J>>2]|0)>>0]|0);c[J>>2]=(c[J>>2]|0)+1}o=m+3840|0;m=(c[ka>>2]|0)+3840+(c[la>>2]<<2)|0;r=o+128|0;do{c[o>>2]=c[m>>2];o=o+4|0;m=m+4|0}while((o|0)<(r|0));l=ma;return}function _d(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+48|0;g=h+32|0;n=h+28|0;d=h+24|0;i=h+20|0;f=h+16|0;j=h+12|0;m=h+8|0;k=h+4|0;e=h;c[n>>2]=a;c[d>>2]=b;b=c[n>>2]|0;c[i>>2]=(ae((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[j>>2]=536870911/(c[m>>2]>>16|0)|0;c[e>>2]=c[j>>2]<<16;b=N(c[m>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;c[k>>2]=536870912-(b+((N(c[m>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))<<3;b=N(c[k>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;b=(c[e>>2]|0)+(b+((N(c[k>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))|0;c[e>>2]=b+(N(c[k>>2]|0,(c[j>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[i>>2]|0)-(c[d>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0)if((b|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];n=c[g>>2]|0;l=h;return n|0}else{c[g>>2]=0;n=c[g>>2]|0;l=h;return n|0}a=c[e>>2]|0;d=0-(c[f>>2]|0)|0;do if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>d|0)){b=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){b=2147483647>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){b=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){b=-2147483648>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}while(0);c[g>>2]=b<<0-(c[f>>2]|0);n=c[g>>2]|0;l=h;return n|0}function $d(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;h=l;l=l+48|0;g=h+40|0;q=h+36|0;p=h+32|0;i=h+28|0;k=h+24|0;j=h+20|0;f=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;e=h;c[q>>2]=a;c[p>>2]=b;c[i>>2]=d;b=c[q>>2]|0;c[k>>2]=(ae((c[q>>2]|0)>0?b:0-b|0)|0)-1;c[n>>2]=c[q>>2]<>2];b=c[p>>2]|0;c[j>>2]=(ae((c[p>>2]|0)>0?b:0-b|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;b=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=b+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);b=c[n>>2]|0;a=c[o>>2]|0;d=c[e>>2]|0;d=Xi(a|0,((a|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;d=Yi(d|0,y|0,32)|0;c[n>>2]=b-(d<<3);d=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(d+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[k>>2]|0)-(c[j>>2]|0)-(c[i>>2]|0);d=c[f>>2]|0;if((c[f>>2]|0)>=0)if((d|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];q=c[g>>2]|0;l=h;return q|0}else{c[g>>2]=0;q=c[g>>2]|0;l=h;return q|0}a=c[e>>2]|0;b=0-(c[f>>2]|0)|0;do if((-2147483648>>0-d|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>b|0)){d=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){d=2147483647>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>b|0)){d=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){d=-2147483648>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}while(0);c[g>>2]=d<<0-(c[f>>2]|0);q=c[g>>2]|0;l=h;return q|0}function ae(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function be(d,e,f,g,h,i,j,k,m,n,o,p,q,r,s){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;var t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0;ea=l;l=l+272|0;aa=ea+264|0;U=ea+260|0;O=ea+256|0;S=ea+252|0;ba=ea+248|0;F=ea+244|0;C=ea+240|0;t=ea+236|0;z=ea+232|0;H=ea+228|0;A=ea+224|0;x=ea+220|0;Y=ea+216|0;E=ea+212|0;D=ea+208|0;W=ea+204|0;K=ea+200|0;L=ea+196|0;Q=ea+192|0;B=ea+188|0;I=ea+184|0;R=ea+180|0;X=ea+176|0;P=ea+172|0;V=ea+168|0;v=ea+164|0;w=ea+160|0;u=ea+156|0;ca=ea+152|0;y=ea+148|0;M=ea+144|0;G=ea+140|0;T=ea+136|0;Z=ea+132|0;da=ea+128|0;J=ea;c[aa>>2]=d;c[U>>2]=e;c[O>>2]=f;c[S>>2]=g;c[ba>>2]=h;c[F>>2]=i;c[C>>2]=j;c[t>>2]=k;c[z>>2]=m;c[H>>2]=n;c[A>>2]=o;c[x>>2]=p;c[Y>>2]=q;c[E>>2]=r;c[D>>2]=s;c[L>>2]=c[(c[U>>2]|0)+4356>>2];g=c[(c[aa>>2]|0)+4652>>2]|0;c[da>>2]=$()|0;j=l;l=l+((1*(g*1168|0)|0)+15&-16)|0;aj(j|0,0,(c[(c[aa>>2]|0)+4652>>2]|0)*1168|0)|0;c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[(c[aa>>2]|0)+4652>>2]|0))break;c[Z>>2]=j+((c[K>>2]|0)*1168|0);c[(c[Z>>2]|0)+1156>>2]=(c[K>>2]|0)+(a[(c[O>>2]|0)+34>>0]|0)&3;c[(c[Z>>2]|0)+1160>>2]=c[(c[Z>>2]|0)+1156>>2];c[(c[Z>>2]|0)+1164>>2]=0;c[(c[Z>>2]|0)+1152>>2]=c[(c[U>>2]|0)+4352>>2];c[(c[Z>>2]|0)+960>>2]=c[(c[U>>2]|0)+1280+((c[(c[aa>>2]|0)+4616>>2]|0)-1<<2)>>2];k=c[Z>>2]|0;p=(c[U>>2]|0)+3840|0;m=k+128|0;do{c[k>>2]=c[p>>2];k=k+4|0;p=p+4|0}while((k|0)<(m|0));k=(c[Z>>2]|0)+1088|0;p=(c[U>>2]|0)+4288|0;m=k+64|0;do{c[k>>2]=c[p>>2];k=k+4|0;p=p+4|0}while((k|0)<(m|0));c[K>>2]=(c[K>>2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2]>>1<<16;c[(c[U>>2]|0)+4376>>2]=0;if((a[(c[O>>2]|0)+29>>0]|0)==2?(c[L>>2]=c[(c[Y>>2]|0)+(c[K>>2]<<2)>>2],(c[K>>2]&3-(c[B>>2]<<1)|0)==0):0){if((c[K>>2]|0)==2){c[G>>2]=c[j+1164>>2];c[I>>2]=0;c[W>>2]=1;while(1){if((c[W>>2]|0)>=(c[(c[aa>>2]|0)+4652>>2]|0))break;if((c[j+((c[W>>2]|0)*1168|0)+1164>>2]|0)<(c[G>>2]|0)){c[G>>2]=c[j+((c[W>>2]|0)*1168|0)+1164>>2];c[I>>2]=c[W>>2]}c[W>>2]=(c[W>>2]|0)+1}c[W>>2]=0;while(1){if((c[W>>2]|0)>=(c[(c[aa>>2]|0)+4652>>2]|0))break;if((c[W>>2]|0)!=(c[I>>2]|0)){g=j+((c[W>>2]|0)*1168|0)+1164|0;c[g>>2]=(c[g>>2]|0)+134217727}c[W>>2]=(c[W>>2]|0)+1}c[Z>>2]=j+((c[I>>2]|0)*1168|0);c[X>>2]=(c[P>>2]|0)+(c[V>>2]|0);c[W>>2]=0;while(1){if((c[W>>2]|0)>=(c[V>>2]|0))break;c[X>>2]=(c[X>>2]|0)-1&31;a[(c[ba>>2]|0)+((c[W>>2]|0)-(c[V>>2]|0))>>0]=(c[(c[Z>>2]|0)+576+(c[X>>2]<<2)>>2]>>9)+1>>1;g=N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]>>16,(c[(c[x>>2]|0)+4>>2]&65535)<<16>>16)|0;g=g+((N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]&65535,(c[(c[x>>2]|0)+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((g+(N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]|0,(c[(c[x>>2]|0)+4>>2]>>15)+1>>1)|0)>>13)+1>>1|0)<=32767){g=N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]>>16,(c[(c[x>>2]|0)+4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0);c[T>>2]=c[(c[x>>2]|0)+((c[(c[aa>>2]|0)+4604>>2]|0)-1<<2)>>2]>>6;c[W>>2]=0;while(1){if((c[W>>2]|0)>=(c[V>>2]|0))break;c[X>>2]=(c[X>>2]|0)-1&31;a[(c[ba>>2]|0)+((c[W>>2]|0)-(c[V>>2]|0))>>0]=(c[(c[Z>>2]|0)+576+(c[X>>2]<<2)>>2]>>9)+1>>1;ja=N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]>>16,(c[T>>2]&65535)<<16>>16)|0;ja=ja+((N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]&65535,(c[T>>2]&65535)<<16>>16)|0)>>16)|0;if(((ja+(N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]|0,(c[T>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){ja=N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]>>16,(c[T>>2]&65535)<<16>>16)|0;ja=ja+((N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]&65535,(c[T>>2]&65535)<<16>>16)|0)>>16)|0;if(((ja+(N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]|0,(c[T>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)k=-32768;else{k=N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]>>16,(c[T>>2]&65535)<<16>>16)|0;k=k+((N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]&65535,(c[T>>2]&65535)<<16>>16)|0)>>16)|0;k=(k+(N(c[(c[Z>>2]|0)+704+(c[X>>2]<<2)>>2]|0,(c[T>>2]>>15)+1>>1)|0)>>7)+1>>1}}else k=32767;b[(c[ca>>2]|0)+((c[W>>2]|0)-(c[V>>2]|0)<<1)>>1]=k;c[(c[U>>2]|0)+1280+((c[(c[U>>2]|0)+4364>>2]|0)-(c[V>>2]|0)+(c[W>>2]|0)<<2)>>2]=c[(c[Z>>2]|0)+960+(c[X>>2]<<2)>>2];c[W>>2]=(c[W>>2]|0)+1}k=(c[U>>2]|0)+3840|0;p=(c[Z>>2]|0)+(c[(c[aa>>2]|0)+4612>>2]<<2)|0;m=k+128|0;do{c[k>>2]=c[p>>2];k=k+4|0;p=p+4|0}while((k|0)<(m|0));k=(c[U>>2]|0)+4288|0;p=(c[Z>>2]|0)+1088|0;m=k+64|0;do{c[k>>2]=c[p>>2];k=k+4|0;p=p+4|0}while((k|0)<(m|0));c[(c[U>>2]|0)+4352>>2]=c[(c[Z>>2]|0)+1152>>2];c[(c[U>>2]|0)+4356>>2]=c[(c[Y>>2]|0)+((c[(c[aa>>2]|0)+4604>>2]|0)-1<<2)>>2];$i(c[U>>2]|0,(c[U>>2]|0)+(c[(c[aa>>2]|0)+4608>>2]<<1)|0,c[(c[aa>>2]|0)+4616>>2]<<1|0)|0;$i((c[U>>2]|0)+1280|0,(c[U>>2]|0)+1280+(c[(c[aa>>2]|0)+4608>>2]<<2)|0,c[(c[aa>>2]|0)+4616>>2]<<2|0)|0;_(c[da>>2]|0);l=ea;return}function ce(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function de(a,d,e,f,g,h,i,j,k,m,n,o,p,q){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;L=l;l=l+96|0;E=L+80|0;t=L+76|0;D=L+72|0;J=L+68|0;K=L+64|0;F=L+60|0;G=L+56|0;I=L+52|0;B=L+48|0;s=L+44|0;r=L+40|0;M=L+36|0;H=L+32|0;u=L+28|0;w=L+24|0;z=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1){if((c[w>>2]|0)>=(c[(c[t>>2]|0)+4360>>2]|0))break a;M=N(c[y>>2]>>16,b[(c[F>>2]|0)+(c[w>>2]<<1)>>1]|0)|0;M=M+((N(c[y>>2]&65535,b[(c[F>>2]|0)+(c[w>>2]<<1)>>1]|0)|0)>>16)|0;c[(c[G>>2]|0)+(c[w>>2]<<2)>>2]=M;c[w>>2]=(c[w>>2]|0)+1}}while(0);if((c[v>>2]|0)==65536){l=L;return}c[w>>2]=(c[(c[t>>2]|0)+4364>>2]|0)-(c[(c[E>>2]|0)+4616>>2]|0);while(1){if((c[w>>2]|0)>=(c[(c[t>>2]|0)+4364>>2]|0))break;M=N(c[v>>2]>>16,(c[(c[t>>2]|0)+1280+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[t>>2]|0)+1280+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[t>>2]|0)+1280+(c[w>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[t>>2]|0)+1280+(c[w>>2]<<2)>>2]=M;c[w>>2]=(c[w>>2]|0)+1}b:do if((c[H>>2]|0)==2?(c[(c[t>>2]|0)+4376>>2]|0)==0:0){c[w>>2]=(c[(c[t>>2]|0)+4360>>2]|0)-(c[A>>2]|0)-2;while(1){if((c[w>>2]|0)>=((c[(c[t>>2]|0)+4360>>2]|0)-(c[u>>2]|0)|0))break b;M=N(c[v>>2]>>16,(c[(c[G>>2]|0)+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[G>>2]|0)+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[G>>2]|0)+(c[w>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[G>>2]|0)+(c[w>>2]<<2)>>2]=M;c[w>>2]=(c[w>>2]|0)+1}}while(0);c[z>>2]=0;while(1){if((c[z>>2]|0)>=(c[B>>2]|0))break;c[C>>2]=(c[D>>2]|0)+((c[z>>2]|0)*1168|0);M=N(c[v>>2]>>16,(c[(c[C>>2]|0)+1152>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[C>>2]|0)+1152>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[C>>2]|0)+1152>>2]>>15)+1>>1)|0)|0;c[(c[C>>2]|0)+1152>>2]=M;c[w>>2]=0;while(1){if((c[w>>2]|0)>=32)break;M=N(c[v>>2]>>16,(c[(c[C>>2]|0)+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[C>>2]|0)+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[C>>2]|0)+(c[w>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[C>>2]|0)+(c[w>>2]<<2)>>2]=M;c[w>>2]=(c[w>>2]|0)+1}c[w>>2]=0;while(1){if((c[w>>2]|0)>=16)break;M=N(c[v>>2]>>16,(c[(c[C>>2]|0)+1088+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[C>>2]|0)+1088+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[C>>2]|0)+1088+(c[w>>2]<<2)>>2]>>15)+1>>1)|0)|0;c[(c[C>>2]|0)+1088+(c[w>>2]<<2)>>2]=M;c[w>>2]=(c[w>>2]|0)+1}c[w>>2]=0;while(1){if((c[w>>2]|0)>=32)break;M=N(c[v>>2]>>16,(c[(c[C>>2]|0)+832+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0;M=M+((N(c[v>>2]&65535,(c[(c[C>>2]|0)+832+(c[w>>2]<<2)>>2]&65535)<<16>>16)|0)>>16)|0;M=M+(N(c[v>>2]|0,(c[(c[C>>2]|0)+832+(c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2]&65535)<<16>>16)|0;c[sa>>2]=N((c[pa>>2]&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;break}if((c[na>>2]|0)==-1){c[pa>>2]=c[ha>>2];c[oa>>2]=(c[pa>>2]|0)-944;c[ra>>2]=N((0-(c[oa>>2]|0)&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;c[sa>>2]=N((c[pa>>2]&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;break}else{c[oa>>2]=(c[na>>2]<<10)+80;c[oa>>2]=(c[oa>>2]|0)+(c[ha>>2]|0);c[pa>>2]=(c[oa>>2]|0)+1024;c[ra>>2]=N((0-(c[oa>>2]|0)&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;c[sa>>2]=N((0-(c[pa>>2]|0)&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;break}}else{c[oa>>2]=(o<<10)-80;c[oa>>2]=(c[oa>>2]|0)+(c[ha>>2]|0);c[pa>>2]=(c[oa>>2]|0)+1024;c[ra>>2]=N((c[oa>>2]&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0;c[sa>>2]=N((c[pa>>2]&65535)<<16>>16,(c[L>>2]&65535)<<16>>16)|0}while(0);c[ta>>2]=(c[qa>>2]|0)-(c[oa>>2]|0);c[ra>>2]=(c[ra>>2]|0)+(N((c[ta>>2]&65535)<<16>>16,(c[ta>>2]&65535)<<16>>16)|0)>>10;c[ta>>2]=(c[qa>>2]|0)-(c[pa>>2]|0);c[sa>>2]=(c[sa>>2]|0)+(N((c[ta>>2]&65535)<<16>>16,(c[ta>>2]&65535)<<16>>16)|0)>>10;o=c[(c[Ka>>2]|0)+1164>>2]|0;if((c[ra>>2]|0)<(c[sa>>2]|0)){c[(c[la>>2]|0)+4>>2]=o+(c[ra>>2]|0);c[(c[la>>2]|0)+24+4>>2]=(c[(c[Ka>>2]|0)+1164>>2]|0)+(c[sa>>2]|0);c[c[la>>2]>>2]=c[oa>>2];o=c[pa>>2]|0;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];c[(c[Ka>>2]|0)+1164>>2]=c[(c[la>>2]|0)+4>>2];c[Ha>>2]=(c[Ha>>2]|0)+1}c[(c[Y>>2]|0)+(c[c[za>>2]>>2]<<2)>>2]=c[F>>2];c[aa>>2]=(c[aa>>2]|0)+1}c[Ha>>2]=0;while(1){if((c[Ha>>2]|0)>=(c[Ja>>2]|0))break;c[Ka>>2]=(c[La>>2]|0)+((c[Ha>>2]|0)*1168|0);o=c[Ka>>2]|0;t=(c[Ka>>2]|0)+(c[Ia>>2]<<2)|0;q=o+128|0;do{c[o>>2]=c[t>>2];o=o+4|0;t=t+4|0}while((o|0)<(q|0));c[Ha>>2]=(c[Ha>>2]|0)+1}_(c[Ma>>2]|0);l=Na;return}function fe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+48|0;g=h+32|0;n=h+28|0;d=h+24|0;i=h+20|0;f=h+16|0;j=h+12|0;m=h+8|0;k=h+4|0;e=h;c[n>>2]=a;c[d>>2]=b;b=c[n>>2]|0;c[i>>2]=(he((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[j>>2]=536870911/(c[m>>2]>>16|0)|0;c[e>>2]=c[j>>2]<<16;b=N(c[m>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;c[k>>2]=536870912-(b+((N(c[m>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))<<3;b=N(c[k>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;b=(c[e>>2]|0)+(b+((N(c[k>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))|0;c[e>>2]=b+(N(c[k>>2]|0,(c[j>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[i>>2]|0)-(c[d>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0)if((b|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];n=c[g>>2]|0;l=h;return n|0}else{c[g>>2]=0;n=c[g>>2]|0;l=h;return n|0}a=c[e>>2]|0;d=0-(c[f>>2]|0)|0;do if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>d|0)){b=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){b=2147483647>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){b=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){b=-2147483648>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}while(0);c[g>>2]=b<<0-(c[f>>2]|0);n=c[g>>2]|0;l=h;return n|0}function ge(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;h=l;l=l+48|0;g=h+40|0;q=h+36|0;p=h+32|0;i=h+28|0;k=h+24|0;j=h+20|0;f=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;e=h;c[q>>2]=a;c[p>>2]=b;c[i>>2]=d;b=c[q>>2]|0;c[k>>2]=(he((c[q>>2]|0)>0?b:0-b|0)|0)-1;c[n>>2]=c[q>>2]<>2];b=c[p>>2]|0;c[j>>2]=(he((c[p>>2]|0)>0?b:0-b|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;b=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=b+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);b=c[n>>2]|0;a=c[o>>2]|0;d=c[e>>2]|0;d=Xi(a|0,((a|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;d=Yi(d|0,y|0,32)|0;c[n>>2]=b-(d<<3);d=N(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(d+((N(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[k>>2]|0)-(c[j>>2]|0)-(c[i>>2]|0);d=c[f>>2]|0;if((c[f>>2]|0)>=0)if((d|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];q=c[g>>2]|0;l=h;return q|0}else{c[g>>2]=0;q=c[g>>2]|0;l=h;return q|0}a=c[e>>2]|0;b=0-(c[f>>2]|0)|0;do if((-2147483648>>0-d|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>b|0)){d=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){d=2147483647>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>b|0)){d=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){d=-2147483648>>0-(c[f>>2]|0);break}else{d=c[e>>2]|0;break}}while(0);c[g>>2]=d<<0-(c[f>>2]|0);q=c[g>>2]|0;l=h;return q|0}function he(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function ie(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;c[(c[d>>2]|0)+4168>>2]=c[(c[d>>2]|0)+2328>>2]<<7;c[(c[d>>2]|0)+4168+72>>2]=65536;c[(c[d>>2]|0)+4168+72+4>>2]=65536;c[(c[d>>2]|0)+4168+88>>2]=20;c[(c[d>>2]|0)+4168+84>>2]=2;l=b;return}function je(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;k=m+16|0;g=m+12|0;i=m+8|0;j=m+4|0;h=m;c[k>>2]=a;c[g>>2]=b;c[i>>2]=d;c[j>>2]=e;c[h>>2]=f;if((c[(c[k>>2]|0)+2316>>2]|0)!=(c[(c[k>>2]|0)+4168+80>>2]|0)){ie(c[k>>2]|0);c[(c[k>>2]|0)+4168+80>>2]=c[(c[k>>2]|0)+2316>>2]}d=c[k>>2]|0;f=c[g>>2]|0;if(c[j>>2]|0){ke(d,f,c[i>>2]|0,c[h>>2]|0);k=(c[k>>2]|0)+4160|0;c[k>>2]=(c[k>>2]|0)+1;l=m;return}else{le(d,f);l=m;return}}function ke(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0;O=l;l=l+176|0;G=O+120|0;H=O+116|0;B=O+112|0;o=O+108|0;C=O+104|0;D=O+100|0;u=O+96|0;E=O+92|0;r=O+88|0;y=O+84|0;j=O+80|0;k=O+76|0;K=O+72|0;q=O+68|0;w=O+64|0;t=O+60|0;h=O+56|0;i=O+52|0;x=O+48|0;v=O+44|0;A=O+40|0;n=O+36|0;J=O+160|0;m=O+32|0;L=O+28|0;z=O+128|0;I=O+24|0;F=O+16|0;M=O+8|0;s=O+4|0;p=O;c[G>>2]=a;c[H>>2]=d;c[B>>2]=e;c[o>>2]=f;c[I>>2]=(c[G>>2]|0)+4168;g=(c[(c[G>>2]|0)+2336>>2]|0)+(c[(c[G>>2]|0)+2328>>2]|0)|0;c[M>>2]=$()|0;d=l;l=l+((1*(g<<2)|0)+15&-16)|0;g=l;l=l+((1*(c[(c[G>>2]|0)+2336>>2]<<1)|0)+15&-16)|0;c[F>>2]=c[(c[I>>2]|0)+72>>2]>>6;c[F+4>>2]=c[(c[I>>2]|0)+72+4>>2]>>6;if(c[(c[G>>2]|0)+2376>>2]|0){e=(c[I>>2]|0)+14|0;a=e+32|0;do{b[e>>1]=0;e=e+2|0}while((e|0)<(a|0))}me(h,j,i,k,(c[G>>2]|0)+4|0,F,c[(c[G>>2]|0)+2332>>2]|0,c[(c[G>>2]|0)+2324>>2]|0);e=(c[G>>2]|0)+4|0;f=c[(c[I>>2]|0)+84>>2]|0;if((c[h>>2]>>c[k>>2]|0)<(c[i>>2]>>c[j>>2]|0))c[x>>2]=e+((ne(0,(N(f-1|0,c[(c[I>>2]|0)+88>>2]|0)|0)-128|0)|0)<<2);else c[x>>2]=e+((ne(0,(N(f,c[(c[I>>2]|0)+88>>2]|0)|0)-128|0)|0)<<2);c[m>>2]=(c[I>>2]|0)+4;b[J>>1]=b[(c[I>>2]|0)+56>>1]|0;c[q>>2]=b[24440+((oe(1,c[(c[G>>2]|0)+4160>>2]|0)|0)<<1)>>1];k=(c[(c[G>>2]|0)+4164>>2]|0)==2;f=oe(1,c[(c[G>>2]|0)+4160>>2]|0)|0;if(k)c[w>>2]=b[24444+(f<<1)>>1];else c[w>>2]=b[24448+(f<<1)>>1];yf((c[I>>2]|0)+14|0,c[(c[G>>2]|0)+2340>>2]|0,64881);_i(z|0,(c[I>>2]|0)+14|0,c[(c[G>>2]|0)+2340>>2]<<1|0)|0;do if(!(c[(c[G>>2]|0)+4160>>2]|0)){b[J>>1]=16384;if((c[(c[G>>2]|0)+4164>>2]|0)!=2){c[s>>2]=Hf((c[I>>2]|0)+14|0,c[(c[G>>2]|0)+2340>>2]|0)|0;c[p>>2]=qe(134217728,c[s>>2]|0)|0;c[p>>2]=re(4194304,c[p>>2]|0)|0;c[p>>2]=c[p>>2]<<3;s=N(c[p>>2]>>16,(c[w>>2]&65535)<<16>>16)|0;c[w>>2]=s+((N(c[p>>2]&65535,(c[w>>2]&65535)<<16>>16)|0)>>16)>>14;break}c[C>>2]=0;while(1){if((c[C>>2]|0)>=5)break;b[J>>1]=(b[J>>1]|0)-(b[(c[m>>2]|0)+(c[C>>2]<<1)>>1]|0);c[C>>2]=(c[C>>2]|0)+1}b[J>>1]=pe(3277,b[J>>1]|0)|0;b[J>>1]=(N(b[J>>1]|0,b[(c[I>>2]|0)+68>>1]|0)|0)>>14}while(0);c[K>>2]=c[(c[I>>2]|0)+52>>2];c[E>>2]=(c[c[I>>2]>>2]>>7)+1>>1;c[y>>2]=c[(c[G>>2]|0)+2336>>2];c[r>>2]=(c[(c[G>>2]|0)+2336>>2]|0)-(c[E>>2]|0)-(c[(c[G>>2]|0)+2340>>2]|0)-2;Gf(g+(c[r>>2]<<1)|0,(c[G>>2]|0)+1348+(c[r>>2]<<1)|0,z,(c[(c[G>>2]|0)+2336>>2]|0)-(c[r>>2]|0)|0,c[(c[G>>2]|0)+2340>>2]|0,c[o>>2]|0);c[t>>2]=se(c[(c[I>>2]|0)+72+4>>2]|0,46)|0;c[t>>2]=(c[t>>2]|0)<1073741823?c[t>>2]|0:1073741823;c[C>>2]=(c[r>>2]|0)+(c[(c[G>>2]|0)+2340>>2]|0);while(1){if((c[C>>2]|0)>=(c[(c[G>>2]|0)+2336>>2]|0))break;s=N(c[t>>2]>>16,b[g+(c[C>>2]<<1)>>1]|0)|0;s=s+((N(c[t>>2]&65535,b[g+(c[C>>2]<<1)>>1]|0)|0)>>16)|0;c[d+(c[C>>2]<<2)>>2]=s;c[C>>2]=(c[C>>2]|0)+1}c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[(c[G>>2]|0)+2324>>2]|0))break;c[v>>2]=d+((c[y>>2]|0)-(c[E>>2]|0)+2<<2);c[C>>2]=0;while(1){if((c[C>>2]|0)>=(c[(c[G>>2]|0)+2332>>2]|0))break;c[n>>2]=2;t=N(c[c[v>>2]>>2]>>16,b[c[m>>2]>>1]|0)|0;c[n>>2]=(c[n>>2]|0)+(t+((N(c[c[v>>2]>>2]&65535,b[c[m>>2]>>1]|0)|0)>>16));t=N(c[(c[v>>2]|0)+-4>>2]>>16,b[(c[m>>2]|0)+2>>1]|0)|0;c[n>>2]=(c[n>>2]|0)+(t+((N(c[(c[v>>2]|0)+-4>>2]&65535,b[(c[m>>2]|0)+2>>1]|0)|0)>>16));t=N(c[(c[v>>2]|0)+-8>>2]>>16,b[(c[m>>2]|0)+4>>1]|0)|0;c[n>>2]=(c[n>>2]|0)+(t+((N(c[(c[v>>2]|0)+-8>>2]&65535,b[(c[m>>2]|0)+4>>1]|0)|0)>>16));t=N(c[(c[v>>2]|0)+-12>>2]>>16,b[(c[m>>2]|0)+6>>1]|0)|0;c[n>>2]=(c[n>>2]|0)+(t+((N(c[(c[v>>2]|0)+-12>>2]&65535,b[(c[m>>2]|0)+6>>1]|0)|0)>>16));t=N(c[(c[v>>2]|0)+-16>>2]>>16,b[(c[m>>2]|0)+8>>1]|0)|0;c[n>>2]=(c[n>>2]|0)+(t+((N(c[(c[v>>2]|0)+-16>>2]&65535,b[(c[m>>2]|0)+8>>1]|0)|0)>>16));c[v>>2]=(c[v>>2]|0)+4;c[K>>2]=907633515+(N(c[K>>2]|0,196314165)|0);c[r>>2]=c[K>>2]>>25&127;t=N(c[(c[x>>2]|0)+(c[r>>2]<<2)>>2]>>16,b[J>>1]|0)|0;t=(c[n>>2]|0)+(t+((N(c[(c[x>>2]|0)+(c[r>>2]<<2)>>2]&65535,b[J>>1]|0)|0)>>16))<<2;c[d+(c[y>>2]<<2)>>2]=t;c[y>>2]=(c[y>>2]|0)+1;c[C>>2]=(c[C>>2]|0)+1}c[D>>2]=0;while(1){if((c[D>>2]|0)>=5)break;t=(N((c[q>>2]&65535)<<16>>16,b[(c[m>>2]|0)+(c[D>>2]<<1)>>1]|0)|0)>>15&65535;b[(c[m>>2]|0)+(c[D>>2]<<1)>>1]=t;c[D>>2]=(c[D>>2]|0)+1}b[J>>1]=(N(b[J>>1]|0,(c[w>>2]&65535)<<16>>16)|0)>>15;c[c[I>>2]>>2]=(c[c[I>>2]>>2]|0)+(((c[c[I>>2]>>2]>>16)*655|0)+((c[c[I>>2]>>2]&65535)*655>>16));t=qe(c[c[I>>2]>>2]|0,((c[(c[G>>2]|0)+2316>>2]&65535)<<16>>16)*18<<8)|0;c[c[I>>2]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<2)>>2]=(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0)+(c[A>>2]<<4);y=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;y=y+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((y+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){y=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;y=y+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((y+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)f=-32768;else{f=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;f=f+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;f=(f+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1}}else f=32767;if((f|0)<=32767){y=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;y=y+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((y+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){y=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;y=y+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((y+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)f=-32768;else{f=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;f=f+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;f=(f+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1}}else f=32767;if((f|0)>=-32768){y=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;y=y+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((y+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){y=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;y=y+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((y+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768)f=-32768;else{f=N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]>>16,(c[F+4>>2]&65535)<<16>>16)|0;f=f+((N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]&65535,(c[F+4>>2]&65535)<<16>>16)|0)>>16)|0;f=(f+(N(c[(c[L>>2]|0)+(16+(c[C>>2]|0)<<2)>>2]|0,(c[F+4>>2]>>15)+1>>1)|0)>>7)+1>>1}}else f=32767}else f=-32768}else f=32767;b[(c[B>>2]|0)+(c[C>>2]<<1)>>1]=f;c[C>>2]=(c[C>>2]|0)+1}e=f+1284|0;f=(c[L>>2]|0)+(c[(c[G>>2]|0)+2328>>2]<<2)|0;a=e+64|0;do{c[e>>2]=c[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(a|0));c[(c[I>>2]|0)+52>>2]=c[K>>2];b[(c[I>>2]|0)+56>>1]=b[J>>1]|0;c[C>>2]=0;while(1){if((c[C>>2]|0)>=4)break;c[(c[H>>2]|0)+(c[C>>2]<<2)>>2]=c[E>>2];c[C>>2]=(c[C>>2]|0)+1}_(c[M>>2]|0);l=O;return}function le(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;i=r+40|0;j=r+36|0;f=r+32|0;o=r+28|0;g=r+24|0;h=r+20|0;k=r+16|0;m=r+12|0;p=r+8|0;n=r+4|0;q=r;c[i>>2]=d;c[j>>2]=e;c[k>>2]=(c[i>>2]|0)+4168;c[(c[i>>2]|0)+4164>>2]=a[(c[i>>2]|0)+2736+29>>0];c[f>>2]=0;a:do if((a[(c[i>>2]|0)+2736+29>>0]|0)==2){c[h>>2]=0;while(1){e=N(c[h>>2]|0,c[(c[i>>2]|0)+2332>>2]|0)|0;if((e|0)>=(c[(c[j>>2]|0)+((c[(c[i>>2]|0)+2324>>2]|0)-1<<2)>>2]|0))break;if((c[h>>2]|0)==(c[(c[i>>2]|0)+2324>>2]|0))break;c[o>>2]=0;c[g>>2]=0;while(1){if((c[g>>2]|0)>=5)break;c[o>>2]=(c[o>>2]|0)+(b[(c[j>>2]|0)+96+((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+2316>>2]&65535)<<16>>16)*18<<8;q=(c[k>>2]|0)+4|0;c[q>>2]=0;c[q+4>>2]=0;b[q+8>>1]=0}while(0);_i((c[k>>2]|0)+14|0,(c[j>>2]|0)+32+32|0,c[(c[i>>2]|0)+2340>>2]<<1|0)|0;b[(c[k>>2]|0)+68>>1]=c[(c[j>>2]|0)+136>>2];q=(c[k>>2]|0)+72|0;p=(c[j>>2]|0)+16+((c[(c[i>>2]|0)+2324>>2]|0)-2<<2)|0;c[q>>2]=c[p>>2];c[q+4>>2]=c[p+4>>2];c[(c[k>>2]|0)+88>>2]=c[(c[i>>2]|0)+2332>>2];c[(c[k>>2]|0)+84>>2]=c[(c[i>>2]|0)+2324>>2];l=r;return}function me(a,d,e,f,g,h,i,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+48|0;k=x+44|0;u=x+40|0;m=x+36|0;v=x+32|0;n=x+28|0;s=x+24|0;w=x+20|0;r=x+16|0;p=x+12|0;q=x+8|0;o=x+4|0;t=x;c[k>>2]=a;c[u>>2]=d;c[m>>2]=e;c[v>>2]=f;c[n>>2]=g;c[s>>2]=h;c[w>>2]=i;c[r>>2]=j;i=c[w>>2]<<1;c[t>>2]=$()|0;e=l;l=l+((1*(i<<1)|0)+15&-16)|0;c[o>>2]=e;c[q>>2]=0;while(1){if((c[q>>2]|0)>=2)break;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[w>>2]|0))break;i=c[(c[n>>2]|0)+((c[p>>2]|0)+(N((c[q>>2]|0)+(c[r>>2]|0)-2|0,c[w>>2]|0)|0)<<2)>>2]>>16;i=N(i,(c[(c[s>>2]|0)+(c[q>>2]<<2)>>2]&65535)<<16>>16)|0;f=c[(c[n>>2]|0)+((c[p>>2]|0)+(N((c[q>>2]|0)+(c[r>>2]|0)-2|0,c[w>>2]|0)|0)<<2)>>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]|0)+(c[q>>2]<<2)>>2]>>15)+1>>1)|0)>>8}}else a=32767;b[(c[o>>2]|0)+(c[p>>2]<<1)>>1]=a;c[p>>2]=(c[p>>2]|0)+1}c[o>>2]=(c[o>>2]|0)+(c[w>>2]<<1);c[q>>2]=(c[q>>2]|0)+1}fg(c[k>>2]|0,c[u>>2]|0,e,c[w>>2]|0);fg(c[m>>2]|0,c[v>>2]|0,e+(c[w>>2]<<1)|0,c[w>>2]|0);_(c[t>>2]|0);l=x;return}function ne(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function oe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function pe(a,c){a=a|0;c=c|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+2|0;d=f;b[e>>1]=a;b[d>>1]=c;l=f;return ((b[e>>1]|0)>(b[d>>1]|0)?b[e>>1]|0:b[d>>1]|0)&65535|0}function qe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function re(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function se(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+48|0;g=h+32|0;n=h+28|0;d=h+24|0;i=h+20|0;f=h+16|0;j=h+12|0;m=h+8|0;k=h+4|0;e=h;c[n>>2]=a;c[d>>2]=b;b=c[n>>2]|0;c[i>>2]=(te((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[j>>2]=536870911/(c[m>>2]>>16|0)|0;c[e>>2]=c[j>>2]<<16;b=N(c[m>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;c[k>>2]=536870912-(b+((N(c[m>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))<<3;b=N(c[k>>2]>>16,(c[j>>2]&65535)<<16>>16)|0;b=(c[e>>2]|0)+(b+((N(c[k>>2]&65535,(c[j>>2]&65535)<<16>>16)|0)>>16))|0;c[e>>2]=b+(N(c[k>>2]|0,(c[j>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[i>>2]|0)-(c[d>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0)if((b|0)<32){c[g>>2]=c[e>>2]>>c[f>>2];n=c[g>>2]|0;l=h;return n|0}else{c[g>>2]=0;n=c[g>>2]|0;l=h;return n|0}a=c[e>>2]|0;d=0-(c[f>>2]|0)|0;do if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((a|0)>(-2147483648>>d|0)){b=-2147483648>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){b=2147483647>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){b=2147483647>>0-(c[f>>2]|0);break}if((c[e>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){b=-2147483648>>0-(c[f>>2]|0);break}else{b=c[e>>2]|0;break}}while(0);c[g>>2]=b<<0-(c[f>>2]|0);n=c[g>>2]|0;l=h;return n|0}function te(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function ue(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>1]|0)|0;o=o+((N(c[k>>2]&65535,b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]|0)|0)>>16)&65535;b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]=o;c[k>>2]=(c[k>>2]|0)+(c[q>>2]|0);if((c[k>>2]|0)>65536)break a;c[m>>2]=(c[m>>2]|0)+1}}}while(0);o=0;q=c[p>>2]|0;q=q+48|0;c[q>>2]=o;l=r;return}function ve(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}we(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function we(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=te(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(xe(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function xe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function ye(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=l;l=l+80|0;g=d+68|0;f=d+64|0;e=d+32|0;h=d+16|0;i=d+8|0;j=d;c[g>>2]=a;c[f>>2]=b;ze(e,c[f>>2]|0,8);ze(h,e,4);ze(i,h,2);ze(j,i,1);Ae(c[g>>2]|0,c[i>>2]|0,c[j>>2]|0,30011);Ae(c[g>>2]|0,c[h>>2]|0,c[i>>2]|0,29859);Ae(c[g>>2]|0,c[e>>2]|0,c[h>>2]|0,29707);Ae(c[g>>2]|0,c[c[f>>2]>>2]|0,c[e>>2]|0,29555);Ae(c[g>>2]|0,c[(c[f>>2]|0)+8>>2]|0,c[e+4>>2]|0,29555);Ae(c[g>>2]|0,c[e+8>>2]|0,c[h+4>>2]|0,29707);Ae(c[g>>2]|0,c[(c[f>>2]|0)+16>>2]|0,c[e+8>>2]|0,29555);Ae(c[g>>2]|0,c[(c[f>>2]|0)+24>>2]|0,c[e+12>>2]|0,29555);Ae(c[g>>2]|0,c[h+8>>2]|0,c[i+4>>2]|0,29859);Ae(c[g>>2]|0,c[e+16>>2]|0,c[h+8>>2]|0,29707);Ae(c[g>>2]|0,c[(c[f>>2]|0)+32>>2]|0,c[e+16>>2]|0,29555);Ae(c[g>>2]|0,c[(c[f>>2]|0)+40>>2]|0,c[e+20>>2]|0,29555);Ae(c[g>>2]|0,c[e+24>>2]|0,c[h+12>>2]|0,29707);Ae(c[g>>2]|0,c[(c[f>>2]|0)+48>>2]|0,c[e+24>>2]|0,29555);Ae(c[g>>2]|0,c[(c[f>>2]|0)+56>>2]|0,c[e+28>>2]|0,29555);l=d;return}function ze(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;h=i+12|0;e=i+8|0;g=i+4|0;f=i;c[h>>2]=a;c[e>>2]=b;c[g>>2]=d;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[g>>2]|0))break;c[(c[h>>2]|0)+(c[f>>2]<<2)>>2]=(c[(c[e>>2]|0)+(c[f>>2]<<1<<2)>>2]|0)+(c[(c[e>>2]|0)+((c[f>>2]<<1)+1<<2)>>2]|0);c[f>>2]=(c[f>>2]|0)+1}l=i;return}function Ae(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;i=k+12|0;h=k+8|0;g=k+4|0;j=k;c[i>>2]=a;c[h>>2]=b;c[g>>2]=e;c[j>>2]=f;if((c[g>>2]|0)<=0){l=k;return}$b(c[i>>2]|0,c[h>>2]|0,(c[j>>2]|0)+(d[30163+(c[g>>2]|0)>>0]|0)|0,8);l=k;return}function Be(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;f=l;l=l+48|0;i=f+8|0;h=f+4|0;m=f;k=f+40|0;j=f+32|0;g=f+16|0;c[i>>2]=a;c[h>>2]=d;c[m>>2]=e;Ce(k,k+2|0,c[h>>2]|0,c[m>>2]|0,30011);Ce(j,j+2|0,c[h>>2]|0,b[k>>1]|0,29859);Ce(g,g+2|0,c[h>>2]|0,b[j>>1]|0,29707);Ce(c[i>>2]|0,(c[i>>2]|0)+2|0,c[h>>2]|0,b[g>>1]|0,29555);Ce((c[i>>2]|0)+4|0,(c[i>>2]|0)+6|0,c[h>>2]|0,b[g+2>>1]|0,29555);Ce(g+4|0,g+6|0,c[h>>2]|0,b[j+2>>1]|0,29707);Ce((c[i>>2]|0)+8|0,(c[i>>2]|0)+10|0,c[h>>2]|0,b[g+4>>1]|0,29555);Ce((c[i>>2]|0)+12|0,(c[i>>2]|0)+14|0,c[h>>2]|0,b[g+6>>1]|0,29555);Ce(j+4|0,j+6|0,c[h>>2]|0,b[k+2>>1]|0,29859);Ce(g+8|0,g+10|0,c[h>>2]|0,b[j+4>>1]|0,29707);Ce((c[i>>2]|0)+16|0,(c[i>>2]|0)+18|0,c[h>>2]|0,b[g+8>>1]|0,29555);Ce((c[i>>2]|0)+20|0,(c[i>>2]|0)+22|0,c[h>>2]|0,b[g+10>>1]|0,29555);Ce(g+12|0,g+14|0,c[h>>2]|0,b[j+6>>1]|0,29707);Ce((c[i>>2]|0)+24|0,(c[i>>2]|0)+26|0,c[h>>2]|0,b[g+12>>1]|0,29555);Ce((c[i>>2]|0)+28|0,(c[i>>2]|0)+30|0,c[h>>2]|0,b[g+14>>1]|0,29555);l=f;return}function Ce(a,e,f,g,h){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;j=o+16|0;k=o+12|0;m=o+8|0;i=o+4|0;n=o;c[j>>2]=a;c[k>>2]=e;c[m>>2]=f;c[i>>2]=g;c[n>>2]=h;if((c[i>>2]|0)>0){h=(Pb(c[m>>2]|0,(c[n>>2]|0)+(d[30163+(c[i>>2]|0)>>0]|0)|0,8)|0)&65535;b[c[j>>2]>>1]=h;h=(c[i>>2]|0)-(b[c[j>>2]>>1]|0)&65535;n=c[k>>2]|0;b[n>>1]=h;l=o;return}else{b[c[j>>2]>>1]=0;h=0;n=c[k>>2]|0;b[n>>1]=h;l=o;return}}function De(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;e=g+8|0;d=g+4|0;f=g;c[e>>2]=a;c[f>>2]=0;a=c[e>>2]|0;b=a+112|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[d>>2]=0;while(1){if((c[d>>2]|0)>=4)break;b=Ee(50/((c[d>>2]|0)+1|0)|0,1)|0;c[(c[e>>2]|0)+92+(c[d>>2]<<2)>>2]=b;c[d>>2]=(c[d>>2]|0)+1}c[d>>2]=0;while(1){a=c[e>>2]|0;if((c[d>>2]|0)>=4)break;c[(c[e>>2]|0)+60+(c[d>>2]<<2)>>2]=(c[a+92+(c[d>>2]<<2)>>2]|0)*100;c[(c[e>>2]|0)+76+(c[d>>2]<<2)>>2]=2147483647/(c[(c[e>>2]|0)+60+(c[d>>2]<<2)>>2]|0)|0;c[d>>2]=(c[d>>2]|0)+1}c[a+108>>2]=15;c[d>>2]=0;while(1){if((c[d>>2]|0)>=4)break;c[(c[e>>2]|0)+40+(c[d>>2]<<2)>>2]=25600;c[d>>2]=(c[d>>2]|0)+1}l=g;return c[f>>2]|0}function Ee(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Fe(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;C=l;l=l+144|0;w=C+132|0;F=C+128|0;t=C+124|0;q=C+120|0;p=C+116|0;E=C+112|0;D=C+108|0;j=C+104|0;h=C+100|0;i=C+96|0;u=C+92|0;k=C+88|0;v=C+84|0;m=C+80|0;r=C+76|0;A=C+72|0;e=C+136|0;o=C+56|0;s=C+40|0;B=C+36|0;n=C+32|0;g=C+16|0;y=C+8|0;x=C+4|0;z=C;c[w>>2]=a;c[F>>2]=d;c[y>>2]=0;c[x>>2]=(c[w>>2]|0)+32;c[E>>2]=c[(c[w>>2]|0)+4608>>2]>>1;c[D>>2]=c[(c[w>>2]|0)+4608>>2]>>2;c[j>>2]=c[(c[w>>2]|0)+4608>>2]>>3;c[g>>2]=0;c[g+4>>2]=(c[j>>2]|0)+(c[D>>2]|0);c[g+8>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535)<<16>>16,(c[n>>2]&65535)<<16>>16)|0);c[k>>2]=(c[k>>2]|0)+1}d=c[o+(c[v>>2]<<2)>>2]|0;a=c[r>>2]|0;if((c[m>>2]|0)<3){if(d+a&-2147483648|0)d=2147483647;else d=(c[o+(c[v>>2]<<2)>>2]|0)+(c[r>>2]|0)|0;a=c[v>>2]|0}else{if(d+(a>>1)&-2147483648|0)d=2147483647;else d=(c[o+(c[v>>2]<<2)>>2]|0)+(c[r>>2]>>1)|0;a=c[v>>2]|0}c[o+(a<<2)>>2]=d;c[i>>2]=(c[i>>2]|0)+(c[h>>2]|0);c[m>>2]=(c[m>>2]|0)+1}c[(c[x>>2]|0)+24+(c[v>>2]<<2)>>2]=c[r>>2];c[v>>2]=(c[v>>2]|0)+1}He(o,c[x>>2]|0);c[r>>2]=0;c[p>>2]=0;c[v>>2]=0;while(1){if((c[v>>2]|0)>=4)break;c[B>>2]=(c[o+(c[v>>2]<<2)>>2]|0)-(c[(c[x>>2]|0)+60+(c[v>>2]<<2)>>2]|0);d=c[v>>2]|0;if((c[B>>2]|0)>0){e=c[o+(c[v>>2]<<2)>>2]|0;if(!(c[o+(d<<2)>>2]&-8388608)){a=c[v>>2]|0;d=(e<<8|0)/((c[(c[x>>2]|0)+60+(c[v>>2]<<2)>>2]|0)+1|0)|0}else{a=c[v>>2]|0;d=(e|0)/((c[(c[x>>2]|0)+60+(c[v>>2]<<2)>>2]>>8)+1|0)|0}c[s+(a<<2)>>2]=d;c[u>>2]=(Bf(c[s+(c[v>>2]<<2)>>2]|0)|0)-1024;c[r>>2]=(c[r>>2]|0)+(N((c[u>>2]&65535)<<16>>16,(c[u>>2]&65535)<<16>>16)|0);if((c[B>>2]|0)<1048576){E=(Ie(c[B>>2]|0)|0)<<6>>16;E=N(E,(c[u>>2]&65535)<<16>>16)|0;F=(Ie(c[B>>2]|0)|0)<<6&65535;c[u>>2]=E+((N(F,(c[u>>2]&65535)<<16>>16)|0)>>16)}F=N(c[17944+(c[v>>2]<<2)>>2]>>16,(c[u>>2]&65535)<<16>>16)|0;c[p>>2]=(c[p>>2]|0)+(F+((N(c[17944+(c[v>>2]<<2)>>2]&65535,(c[u>>2]&65535)<<16>>16)|0)>>16))}else c[s+(d<<2)>>2]=256;c[v>>2]=(c[v>>2]|0)+1}c[r>>2]=(c[r>>2]|0)/4|0;c[q>>2]=((Ie(c[r>>2]|0)|0)*3&65535)<<16>>16;c[t>>2]=cg(0+(((c[q>>2]&65535)<<16>>16)*45e3>>16)-128|0)|0;F=(cg(c[p>>2]|0)|0)-16384<<1;c[(c[w>>2]|0)+4744>>2]=F;c[B>>2]=0;c[v>>2]=0;while(1){if((c[v>>2]|0)>=4)break;F=N((c[v>>2]|0)+1|0,(c[o+(c[v>>2]<<2)>>2]|0)-(c[(c[x>>2]|0)+60+(c[v>>2]<<2)>>2]|0)>>4)|0;c[B>>2]=(c[B>>2]|0)+F;c[v>>2]=(c[v>>2]|0)+1}if((c[B>>2]|0)>0){if((c[B>>2]|0)<32768){d=c[B>>2]|0;if((c[(c[w>>2]|0)+4608>>2]|0)==((c[(c[w>>2]|0)+4600>>2]|0)*10|0)){if((d|0)>32767)d=32767;else d=(c[B>>2]|0)<-32768?-32768:c[B>>2]|0;c[B>>2]=d<<16}else{if((d|0)>65535)d=65535;else d=(c[B>>2]|0)<-65536?-65536:c[B>>2]|0;c[B>>2]=d<<15}c[B>>2]=Ie(c[B>>2]|0)|0;F=N(32768+(c[B>>2]|0)>>16,(c[t>>2]&65535)<<16>>16)|0;c[t>>2]=F+((N(32768+(c[B>>2]|0)&65535,(c[t>>2]&65535)<<16>>16)|0)>>16)}}else c[t>>2]=c[t>>2]>>1;F=Ge(c[t>>2]>>7,255)|0;c[(c[w>>2]|0)+4556>>2]=F;F=N(c[t>>2]>>16,(c[t>>2]&65535)<<16>>16)|0;c[A>>2]=0+((F+((N(c[t>>2]&65535,(c[t>>2]&65535)<<16>>16)|0)>>16)&65535)<<16>>16<<12>>16);if((c[(c[w>>2]|0)+4608>>2]|0)==((c[(c[w>>2]|0)+4600>>2]|0)*10|0))c[A>>2]=c[A>>2]>>1;c[v>>2]=0;while(1){if((c[v>>2]|0)>=4)break;F=N((c[s+(c[v>>2]<<2)>>2]|0)-(c[(c[x>>2]|0)+40+(c[v>>2]<<2)>>2]|0)>>16,(c[A>>2]&65535)<<16>>16)|0;F=(c[(c[x>>2]|0)+40+(c[v>>2]<<2)>>2]|0)+(F+((N((c[s+(c[v>>2]<<2)>>2]|0)-(c[(c[x>>2]|0)+40+(c[v>>2]<<2)>>2]|0)&65535,(c[A>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[x>>2]|0)+40+(c[v>>2]<<2)>>2]=F;c[u>>2]=((Bf(c[(c[x>>2]|0)+40+(c[v>>2]<<2)>>2]|0)|0)-1024|0)*3;F=cg((c[u>>2]|0)-2048>>4)|0;c[(c[w>>2]|0)+4728+(c[v>>2]<<2)>>2]=F;c[v>>2]=(c[v>>2]|0)+1}F=c[y>>2]|0;_(c[z>>2]|0);l=C;return F|0}function Ge(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function He(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;j=m+28|0;k=m+24|0;f=m+20|0;h=m+16|0;i=m+12|0;e=m+8|0;d=m+4|0;g=m;c[j>>2]=a;c[k>>2]=b;if((c[(c[k>>2]|0)+108>>2]|0)<1e3)c[g>>2]=32767/((c[(c[k>>2]|0)+108>>2]>>4)+1|0)|0;else c[g>>2]=0;c[f>>2]=0;while(1){a=c[k>>2]|0;if((c[f>>2]|0)>=4)break;c[h>>2]=c[a+60+(c[f>>2]<<2)>>2];if((c[(c[j>>2]|0)+(c[f>>2]<<2)>>2]|0)+(c[(c[k>>2]|0)+92+(c[f>>2]<<2)>>2]|0)&-2147483648|0)a=2147483647;else a=(c[(c[j>>2]|0)+(c[f>>2]<<2)>>2]|0)+(c[(c[k>>2]|0)+92+(c[f>>2]<<2)>>2]|0)|0;c[i>>2]=a;c[e>>2]=2147483647/(c[i>>2]|0)|0;do if((c[i>>2]|0)<=(c[h>>2]<<3|0))if((c[i>>2]|0)<(c[h>>2]|0)){c[d>>2]=1024;break}else{a=N(c[e>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;a=a+((N(c[e>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16)|0;a=a+(N(c[e>>2]|0,(c[h>>2]>>15)+1>>1)|0)>>16<<11;b=N(c[e>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;b=b+((N(c[e>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16)|0;c[d>>2]=a+((b+(N(c[e>>2]|0,(c[h>>2]>>15)+1>>1)|0)&65535)<<11>>16);break}else c[d>>2]=128;while(0);c[d>>2]=Me(c[d>>2]|0,c[g>>2]|0)|0;b=N((c[e>>2]|0)-(c[(c[k>>2]|0)+76+(c[f>>2]<<2)>>2]|0)>>16,(c[d>>2]&65535)<<16>>16)|0;b=(c[(c[k>>2]|0)+76+(c[f>>2]<<2)>>2]|0)+(b+((N((c[e>>2]|0)-(c[(c[k>>2]|0)+76+(c[f>>2]<<2)>>2]|0)&65535,(c[d>>2]&65535)<<16>>16)|0)>>16))|0;c[(c[k>>2]|0)+76+(c[f>>2]<<2)>>2]=b;c[h>>2]=2147483647/(c[(c[k>>2]|0)+76+(c[f>>2]<<2)>>2]|0)|0;c[h>>2]=(c[h>>2]|0)<16777215?c[h>>2]|0:16777215;c[(c[k>>2]|0)+60+(c[f>>2]<<2)>>2]=c[h>>2];c[f>>2]=(c[f>>2]|0)+1}k=a+108|0;c[k>>2]=(c[k>>2]|0)+1;l=m;return}function Ie(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h+8|0;d=h+4|0;b=h;c[f>>2]=a;if((c[f>>2]|0)<=0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}Je(c[f>>2]|0,d,b);if(c[d>>2]&1|0)c[g>>2]=32768;else c[g>>2]=46214;c[g>>2]=c[g>>2]>>(c[d>>2]>>1);f=N(c[g>>2]>>16,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[g>>2]=(c[g>>2]|0)+(f+((N(c[g>>2]&65535,(((c[b>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}function Je(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;i=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=Ke(c[h>>2]|0)|0;c[c[i>>2]>>2]=c[g>>2];b=(Le(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=b;l=e;return}function Ke(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){b=32;l=d;return b|0}b=32-(32-(Q(c[b>>2]|0)|0))|0;l=d;return b|0}function Le(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+20|0;d=j+16|0;h=j+12|0;i=j+8|0;f=j+4|0;e=j;c[d>>2]=a;c[h>>2]=b;c[i>>2]=c[d>>2];c[f>>2]=c[h>>2];c[e>>2]=0-(c[h>>2]|0);if(!(c[h>>2]|0)){c[g>>2]=c[d>>2];i=c[g>>2]|0;l=j;return i|0}a=c[i>>2]|0;if((c[h>>2]|0)<0){c[g>>2]=a<>2]|(c[i>>2]|0)>>>(32-(c[e>>2]|0)|0);i=c[g>>2]|0;l=j;return i|0}else{c[g>>2]=a<<32-(c[f>>2]|0)|(c[i>>2]|0)>>>(c[f>>2]|0);i=c[g>>2]|0;l=j;return i|0}return 0}function Me(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;l=f;return ((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Ne(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;f=h+12|0;e=h+8|0;g=h+4|0;d=h;c[f>>2]=a;c[e>>2]=b;c[g>>2]=c[(c[f>>2]|0)+4600>>2];c[d>>2]=((c[g>>2]&65535)<<16>>16)*1e3;if(!(c[d>>2]|0)){e=c[f>>2]|0;c[d>>2]=c[((c[(c[f>>2]|0)+4596>>2]|0)<(c[(c[f>>2]|0)+4580>>2]|0)?e+4596|0:e+4580|0)>>2];c[g>>2]=(c[d>>2]|0)/1e3|0;g=c[g>>2]|0;l=h;return g|0}if(((c[d>>2]|0)<=(c[(c[f>>2]|0)+4580>>2]|0)?(c[d>>2]|0)<=(c[(c[f>>2]|0)+4588>>2]|0):0)?(c[d>>2]|0)>=(c[(c[f>>2]|0)+4592>>2]|0):0){if((c[(c[f>>2]|0)+16+8>>2]|0)>=256)c[(c[f>>2]|0)+16+12>>2]=0;if((c[(c[f>>2]|0)+4560>>2]|0)==0?(c[(c[e>>2]|0)+60>>2]|0)==0:0){g=c[g>>2]|0;l=h;return g|0}b=c[f>>2]|0;if((((c[(c[f>>2]|0)+4600>>2]&65535)<<16>>16)*1e3|0)>(c[(c[f>>2]|0)+4596>>2]|0)){if(!(c[b+16+12>>2]|0)){c[(c[f>>2]|0)+16+8>>2]=256;d=(c[f>>2]|0)+16|0;c[d>>2]=0;c[d+4>>2]=0}b=(c[f>>2]|0)+16|0;if(c[(c[e>>2]|0)+60>>2]|0){c[b+12>>2]=0;c[g>>2]=(c[(c[f>>2]|0)+4600>>2]|0)==16?12:8;g=c[g>>2]|0;l=h;return g|0}if((c[b+8>>2]|0)<=0){c[(c[e>>2]|0)+84>>2]=1;f=(c[e>>2]|0)+52|0;c[f>>2]=(c[f>>2]|0)-(((c[(c[e>>2]|0)+52>>2]|0)*5|0)/((c[(c[e>>2]|0)+24>>2]|0)+5|0)|0);g=c[g>>2]|0;l=h;return g|0}else{c[(c[f>>2]|0)+16+12>>2]=-2;g=c[g>>2]|0;l=h;return g|0}}if((((c[b+4600>>2]&65535)<<16>>16)*1e3|0)>=(c[(c[f>>2]|0)+4596>>2]|0)){if((c[(c[f>>2]|0)+16+12>>2]|0)>=0){g=c[g>>2]|0;l=h;return g|0}c[(c[f>>2]|0)+16+12>>2]=1;g=c[g>>2]|0;l=h;return g|0}b=c[f>>2]|0;if(c[(c[e>>2]|0)+60>>2]|0){c[g>>2]=(c[b+4600>>2]|0)==8?12:16;c[(c[f>>2]|0)+16+8>>2]=0;e=(c[f>>2]|0)+16|0;c[e>>2]=0;c[e+4>>2]=0;c[(c[f>>2]|0)+16+12>>2]=1;g=c[g>>2]|0;l=h;return g|0}if(!(c[b+16+12>>2]|0)){c[(c[e>>2]|0)+84>>2]=1;f=(c[e>>2]|0)+52|0;c[f>>2]=(c[f>>2]|0)-(((c[(c[e>>2]|0)+52>>2]|0)*5|0)/((c[(c[e>>2]|0)+24>>2]|0)+5|0)|0);g=c[g>>2]|0;l=h;return g|0}else{c[(c[f>>2]|0)+16+12>>2]=1;g=c[g>>2]|0;l=h;return g|0}}c[d>>2]=c[(c[f>>2]|0)+4580>>2];if((c[d>>2]|0)<(c[(c[f>>2]|0)+4588>>2]|0))b=c[d>>2]|0;else b=c[(c[f>>2]|0)+4588>>2]|0;c[d>>2]=b;if((c[d>>2]|0)>(c[(c[f>>2]|0)+4592>>2]|0))b=c[d>>2]|0;else b=c[(c[f>>2]|0)+4592>>2]|0;c[d>>2]=b;c[g>>2]=(c[d>>2]|0)/1e3|0;g=c[g>>2]|0;l=h;return g|0}function Oe(d,e,f,g,h,i,j,k,m){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=l;l=l+112|0;n=M+96|0;t=M+92|0;G=M+88|0;J=M+84|0;o=M+80|0;E=M+76|0;B=M+72|0;F=M+68|0;z=M+60|0;A=M+56|0;v=M+52|0;L=M+100|0;w=M+48|0;u=M+44|0;s=M+40|0;q=M+36|0;p=M+32|0;I=M+28|0;H=M+24|0;D=M+20|0;K=M+16|0;r=M+12|0;C=M+8|0;x=M+4|0;y=M;c[n>>2]=d;c[t>>2]=e;c[G>>2]=f;c[J>>2]=g;c[o>>2]=h;c[E>>2]=i;c[B>>2]=j;c[F>>2]=k;c[M+64>>2]=m;c[D>>2]=2147483647;c[r>>2]=0;c[A>>2]=0;while(1){if((c[A>>2]|0)>=3)break;c[y>>2]=51;c[w>>2]=c[17632+(c[A>>2]<<2)>>2];c[u>>2]=c[17644+(c[A>>2]<<2)>>2];c[s>>2]=c[17656+(c[A>>2]<<2)>>2];c[v>>2]=a[27259+(c[A>>2]|0)>>0];c[p>>2]=c[o>>2];c[q>>2]=c[n>>2];c[H>>2]=0;c[K>>2]=c[c[J>>2]>>2];c[z>>2]=0;while(1){if((c[z>>2]|0)>=(c[F>>2]|0))break;g=Ff(5333-(c[K>>2]|0)+896|0)|0;c[C>>2]=g-(c[y>>2]|0);Pe(L+(c[z>>2]|0)|0,I,x,c[q>>2]|0,c[p>>2]|0,c[u>>2]|0,c[s>>2]|0,c[w>>2]|0,c[E>>2]|0,c[C>>2]|0,c[v>>2]|0);if((c[H>>2]|0)+(c[I>>2]|0)&-2147483648|0)d=2147483647;else d=(c[H>>2]|0)+(c[I>>2]|0)|0;c[H>>2]=d;g=c[K>>2]|0;if(0>(g+(Bf((c[y>>2]|0)+(c[x>>2]|0)|0)|0)-896|0))d=0;else{d=c[K>>2]|0;d=d+(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16|0;y=ta+8|0;x=ta;ra=ta+308|0;sa=ta+304|0;G=ta+300|0;ca=ta+296|0;ia=ta+292|0;ha=ta+288|0;H=ta+284|0;t=ta+280|0;D=ta+276|0;ba=ta+272|0;v=ta+268|0;na=ta+264|0;ga=ta+216|0;u=ta+212|0;o=ta+208|0;z=ta+204|0;m=ta+200|0;da=ta+196|0;J=ta+192|0;qa=ta+188|0;la=ta+184|0;O=ta+180|0;M=ta+176|0;ma=ta+172|0;I=ta+168|0;ka=ta+164|0;B=ta+160|0;Z=ta+156|0;A=ta+152|0;n=ta+148|0;Y=ta+144|0;ea=ta+140|0;ja=ta+136|0;C=ta+132|0;k=ta+128|0;pa=ta+124|0;oa=ta+120|0;r=ta+116|0;p=ta+112|0;s=ta+108|0;q=ta+104|0;w=ta+100|0;E=ta+96|0;L=ta+312|0;F=ta+92|0;aa=ta+88|0;fa=ta+84|0;c[sa>>2]=d;c[G>>2]=e;c[ca>>2]=f;c[ia>>2]=h;c[ha>>2]=i;c[H>>2]=j;c[v>>2]=0;c[na>>2]=0;c[da>>2]=0;c[O>>2]=0;c[ma>>2]=0;c[I>>2]=0;c[ka>>2]=0;c[ja>>2]=0;c[t>>2]=(c[sa>>2]|0)+(c[(c[sa>>2]|0)+4>>2]|0);c[D>>2]=(c[sa>>2]|0)+(c[c[sa>>2]>>2]|0);c[Y>>2]=(c[(c[sa>>2]|0)+12>>2]|0)/50|0;c[n>>2]=c[Y>>2]>>1;c[A>>2]=c[n>>2]>>1;c[Z>>2]=c[A>>2]>>1;if((c[ha>>2]|0)<(c[Z>>2]|0)){c[ra>>2]=-2;sa=c[ra>>2]|0;l=ta;return sa|0}if((c[ha>>2]|0)<(((c[(c[sa>>2]|0)+12>>2]|0)/25|0)*3|0))e=c[ha>>2]|0;else e=((c[(c[sa>>2]|0)+12>>2]|0)/25|0)*3|0;c[ha>>2]=e;if((c[ca>>2]|0)<=1){c[G>>2]=0;if((c[ha>>2]|0)<(c[(c[sa>>2]|0)+64>>2]|0))e=c[ha>>2]|0;else e=c[(c[sa>>2]|0)+64>>2]|0;c[ha>>2]=e}do if(!(c[G>>2]|0)){c[qa>>2]=c[ha>>2];c[la>>2]=c[(c[sa>>2]|0)+60>>2];if(!(c[la>>2]|0)){c[ba>>2]=0;while(1){if((c[ba>>2]|0)>=(N(c[qa>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0))break;g[(c[ia>>2]|0)+(c[ba>>2]<<2)>>2]=0.0;c[ba>>2]=(c[ba>>2]|0)+1}c[ra>>2]=c[qa>>2];sa=c[ra>>2]|0;l=ta;return sa|0}if((c[qa>>2]|0)>(c[Y>>2]|0)){while(1){c[k>>2]=Qh(c[sa>>2]|0,0,0,c[ia>>2]|0,(c[qa>>2]|0)<(c[Y>>2]|0)?c[qa>>2]|0:c[Y>>2]|0,0)|0;e=c[k>>2]|0;if((c[k>>2]|0)<0){j=20;break}pa=N(e,c[(c[sa>>2]|0)+8>>2]|0)|0;c[ia>>2]=(c[ia>>2]|0)+(pa<<2);c[qa>>2]=(c[qa>>2]|0)-(c[k>>2]|0);if((c[qa>>2]|0)<=0){j=22;break}}if((j|0)==20){c[ra>>2]=e;sa=c[ra>>2]|0;l=ta;return sa|0}else if((j|0)==22){c[ra>>2]=c[ha>>2];sa=c[ra>>2]|0;l=ta;return sa|0}}if((c[qa>>2]|0)<(c[Y>>2]|0)){if((c[qa>>2]|0)>(c[n>>2]|0)){c[qa>>2]=c[n>>2];break}if(((c[la>>2]|0)!=1e3?(c[qa>>2]|0)>(c[A>>2]|0):0)?(c[qa>>2]|0)<(c[n>>2]|0):0)c[qa>>2]=c[A>>2]}}else{c[qa>>2]=c[(c[sa>>2]|0)+64>>2];c[la>>2]=c[(c[sa>>2]|0)+56>>2];Hb(ga,c[G>>2]|0,c[ca>>2]|0)}while(0);c[C>>2]=0;c[z>>2]=1;c[m>>2]=1;do if(c[G>>2]|0?(c[(c[sa>>2]|0)+60>>2]|0)>0:0){if(!(((c[la>>2]|0)==1002?(c[(c[sa>>2]|0)+60>>2]|0)!=1002:0)?!(c[(c[sa>>2]|0)+68>>2]|0):0)){if((c[la>>2]|0)==1002)break;if((c[(c[sa>>2]|0)+60>>2]|0)!=1002)break}c[O>>2]=1;e=N(c[A>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0;if((c[la>>2]|0)==1002){c[m>>2]=e;break}else{c[z>>2]=e;break}}while(0);m=c[m>>2]|0;c[pa>>2]=$()|0;e=l;l=l+((1*(m<<2)|0)+15&-16)|0;if((c[O>>2]|0)!=0&(c[la>>2]|0)==1002){c[da>>2]=e;Qh(c[sa>>2]|0,0,0,c[da>>2]|0,(c[A>>2]|0)<(c[qa>>2]|0)?c[A>>2]|0:c[qa>>2]|0,0)|0}a:do if((c[qa>>2]|0)>(c[ha>>2]|0)){c[ra>>2]=-1;c[oa>>2]=1}else{c[ha>>2]=c[qa>>2];if((c[la>>2]|0)==1002|(c[C>>2]|0)!=0)e=1;else e=N((c[n>>2]|0)>(c[ha>>2]|0)?c[n>>2]|0:c[ha>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0;c[o>>2]=e;f=l;l=l+((1*(c[o>>2]<<1)|0)+15&-16)|0;b:do if((c[la>>2]|0)!=1002){c[s>>2]=f;if((c[(c[sa>>2]|0)+60>>2]|0)==1002)zd(c[t>>2]|0)|0;if(10>(((c[qa>>2]|0)*1e3|0)/(c[(c[sa>>2]|0)+12>>2]|0)|0|0))e=10;else e=((c[qa>>2]|0)*1e3|0)/(c[(c[sa>>2]|0)+12>>2]|0)|0;c[(c[sa>>2]|0)+16+16>>2]=e;if(c[G>>2]|0){c[(c[sa>>2]|0)+16+4>>2]=c[(c[sa>>2]|0)+48>>2];e=c[sa>>2]|0;if((c[la>>2]|0)==1e3){j=c[sa>>2]|0;if((c[e+52>>2]|0)==1101){i=8e3;e=j}else{e=(c[j+52>>2]|0)==1102;i=e?12e3:16e3;e=e?c[sa>>2]|0:c[sa>>2]|0}}else i=16e3;c[e+16+12>>2]=i}c[r>>2]=(c[G>>2]|0)==0?1:c[H>>2]<<1;c[p>>2]=0;c:while(1){c[q>>2]=(c[p>>2]|0)==0&1;c[v>>2]=Ad(c[t>>2]|0,(c[sa>>2]|0)+16|0,c[r>>2]|0,c[q>>2]|0,ga,c[s>>2]|0,u,c[(c[sa>>2]|0)+44>>2]|0)|0;d:do if(c[v>>2]|0){if(!(c[r>>2]|0))break c;c[u>>2]=c[ha>>2];c[ba>>2]=0;while(1){if((c[ba>>2]|0)>=(N(c[ha>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0))break d;b[(c[s>>2]|0)+(c[ba>>2]<<1)>>1]=0;c[ba>>2]=(c[ba>>2]|0)+1}}while(0);o=N(c[u>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0;c[s>>2]=(c[s>>2]|0)+(o<<1);c[p>>2]=(c[p>>2]|0)+(c[u>>2]|0);if((c[p>>2]|0)>=(c[ha>>2]|0))break b}c[ra>>2]=-3;c[oa>>2]=1;break a}while(0);c[M>>2]=0;if((c[H>>2]|0)==0&(c[la>>2]|0)!=1002&(c[G>>2]|0)!=0?(v=(Vh(ga)|0)+17|0,(v+(((c[(c[sa>>2]|0)+56>>2]|0)==1001&1)*20|0)|0)<=(c[ca>>2]<<3|0)):0){if((c[la>>2]|0)==1001)c[ma>>2]=Ob(ga,12)|0;else c[ma>>2]=1;if(c[ma>>2]|0){c[ka>>2]=Ob(ga,1)|0;if((c[la>>2]|0)==1001)e=(Qb(ga,256)|0)+2|0;else{e=c[ca>>2]|0;e=e-((Vh(ga)|0)+7>>3)|0}c[I>>2]=e;c[ca>>2]=(c[ca>>2]|0)-(c[I>>2]|0);v=c[ca>>2]<<3;if((v|0)<(Vh(ga)|0)){c[ca>>2]=0;c[I>>2]=0;c[ma>>2]=0}v=ga+4|0;c[v>>2]=(c[v>>2]|0)-(c[I>>2]|0)}}if((c[la>>2]|0)!=1002)c[M>>2]=17;c[w>>2]=21;switch(c[(c[sa>>2]|0)+52>>2]|0){case 1101:{c[w>>2]=13;break}case 1103:case 1102:{c[w>>2]=17;break}case 1104:{c[w>>2]=19;break}case 1105:{c[w>>2]=21;break}default:{}}v=c[D>>2]|0;c[x>>2]=c[w>>2];tb(v,10012,x)|0;x=c[D>>2]|0;c[y>>2]=c[(c[sa>>2]|0)+48>>2];tb(x,10008,y)|0;if(c[ma>>2]|0){c[O>>2]=0;c[z>>2]=1}e=l;l=l+((1*(c[z>>2]<<2)|0)+15&-16)|0;if((c[O>>2]|0)!=0&(c[la>>2]|0)!=1002){c[da>>2]=e;Qh(c[sa>>2]|0,0,0,c[da>>2]|0,(c[A>>2]|0)<(c[qa>>2]|0)?c[A>>2]|0:c[qa>>2]|0,0)|0}if(c[ma>>2]|0)e=N(c[A>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0;else e=1;c[J>>2]=e;e=l;l=l+((1*(c[J>>2]<<2)|0)+15&-16)|0;if((c[ma>>2]|0)!=0&(c[ka>>2]|0)!=0){J=c[D>>2]|0;c[P>>2]=0;tb(J,10010,P)|0;ub(c[D>>2]|0,(c[G>>2]|0)+(c[ca>>2]|0)|0,c[I>>2]|0,e,c[A>>2]|0,0,0)|0;P=c[D>>2]|0;c[Q>>2]=ja+(((ja-ja|0)/4|0)<<2);tb(P,4031,Q)|0}Q=c[D>>2]|0;c[R>>2]=c[M>>2];tb(Q,10010,R)|0;do if((c[la>>2]|0)==1e3){a[L>>0]=a[30519]|0;a[L+1>>0]=a[30520]|0;e:do if(!(c[C>>2]|0)){c[ba>>2]=0;while(1){if((c[ba>>2]|0)>=(N(c[ha>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0))break e;g[(c[ia>>2]|0)+(c[ba>>2]<<2)>>2]=0.0;c[ba>>2]=(c[ba>>2]|0)+1}}while(0);if((c[(c[sa>>2]|0)+60>>2]|0)==1001){if((c[ma>>2]|0)!=0&(c[ka>>2]|0)!=0?c[(c[sa>>2]|0)+68>>2]|0:0)break;Y=c[D>>2]|0;c[T>>2]=0;tb(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ba>>2]=(c[ba>>2]|0)+1}X=e+((N(c[(c[sa>>2]|0)+8>>2]|0,c[Z>>2]|0)|0)<<2)|0;Y=(c[ia>>2]|0)+((N(c[(c[sa>>2]|0)+8>>2]|0,c[Z>>2]|0)|0)<<2)|0;da=(c[ia>>2]|0)+((N(c[(c[sa>>2]|0)+8>>2]|0,c[Z>>2]|0)|0)<<2)|0;Wh(X,Y,da,c[Z>>2]|0,c[(c[sa>>2]|0)+8>>2]|0,c[ea>>2]|0,c[(c[sa>>2]|0)+12>>2]|0)}while(0);g:do if(c[(c[sa>>2]|0)+40>>2]|0){g[aa>>2]=+K(+(+(c[(c[sa>>2]|0)+40>>2]|0)*6.488140788860619e-04*.6931471805599453));c[ba>>2]=0;while(1){if((c[ba>>2]|0)>=(N(c[ha>>2]|0,c[(c[sa>>2]|0)+8>>2]|0)|0))break g;g[fa>>2]=+g[(c[ia>>2]|0)+(c[ba>>2]<<2)>>2]*+g[aa>>2];g[(c[ia>>2]|0)+(c[ba>>2]<<2)>>2]=+g[fa>>2];c[ba>>2]=(c[ba>>2]|0)+1}}while(0);if((c[ca>>2]|0)<=1){j=c[sa>>2]|0;e=0}else{j=c[sa>>2]|0;e=c[ga+28>>2]^c[ja>>2]}c[j+84>>2]=e;c[(c[sa>>2]|0)+60>>2]=c[la>>2];if(c[ma>>2]|0)e=(c[ka>>2]|0)!=0^1;else e=0;c[(c[sa>>2]|0)+68>>2]=e&1;if((c[na>>2]|0)>=0)Rh()|0;c[ra>>2]=(c[na>>2]|0)<0?c[na>>2]|0:c[qa>>2]|0;c[oa>>2]=1}while(0);_(c[pa>>2]|0);sa=c[ra>>2]|0;l=ta;return sa|0}function Rh(){return 0}function Sh(a){a=a|0;var b=0,e=0,f=0;f=l;l=l+16|0;b=f+4|0;e=f;c[b>>2]=a;do if(!((d[c[b>>2]>>0]|0)&128|0))if(((d[c[b>>2]>>0]|0)&96|0)==96){c[e>>2]=1001;break}else{c[e>>2]=1e3;break}else c[e>>2]=1002;while(0);l=f;return c[e>>2]|0}function Th(a){a=a|0;var b=0,e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=a;b=d[c[e>>2]>>0]|0;if((d[c[e>>2]>>0]|0)&128|0){e=1102+(b>>5&3)|0;c[f>>2]=e;c[f>>2]=(c[f>>2]|0)==1102?1101:e;f=c[f>>2]|0;l=g;return f|0}a=d[c[e>>2]>>0]|0;if((b&96|0)==96){c[f>>2]=a&16|0?1105:1104;f=c[f>>2]|0;l=g;return f|0}else{c[f>>2]=1101+(a>>5&3);f=c[f>>2]|0;l=g;return f|0}return 0}function Uh(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return ((d[c[b>>2]>>0]|0)&4|0?2:1)|0}function Vh(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function Wh(a,b,d,e,f,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0;u=l;l=l+48|0;n=u+40|0;o=u+36|0;q=u+32|0;r=u+28|0;k=u+24|0;t=u+20|0;v=u+16|0;m=u+12|0;j=u+8|0;p=u+4|0;s=u;c[n>>2]=a;c[o>>2]=b;c[q>>2]=d;c[r>>2]=e;c[k>>2]=f;c[t>>2]=h;c[v>>2]=i;c[p>>2]=48e3/(c[v>>2]|0)|0;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[k>>2]|0))break;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[r>>2]|0))break;w=+g[(c[t>>2]|0)+((N(c[m>>2]|0,c[p>>2]|0)|0)<<2)>>2];g[s>>2]=w*+g[(c[t>>2]|0)+((N(c[m>>2]|0,c[p>>2]|0)|0)<<2)>>2];e=N(c[m>>2]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2)>>2])|0;b[(c[q>>2]|0)+(c[o>>2]<<1)>>1]=p;c[o>>2]=(c[o>>2]|0)+1}}while(0);c[s>>2]=c[r>>2];_(c[t>>2]|0);u=c[s>>2]|0;l=v;return u|0}function Yh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;f=e+8|0;h=e+4|0;g=e;c[f>>2]=a;c[h>>2]=b;c[g>>2]=d;b=_h(c[h>>2]|0,c[g>>2]|0,c[(c[f>>2]|0)+12>>2]|0)|0;l=e;return b|0}function Zh(a){a=+a;var b=0,c=0;c=l;l=l+16|0;b=c;g[b>>2]=a;g[b>>2]=+g[b>>2]*32768.0;g[b>>2]=+g[b>>2]>-32768.0?+g[b>>2]:-32768.0;g[b>>2]=+g[b>>2]<32767.0?+g[b>>2]:32767.0;b=(Ui(+g[b>>2])|0)&65535;l=c;return b|0}function _h(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=l;l=l+32|0;g=i+20|0;f=i+16|0;k=i+12|0;e=i+8|0;h=i+4|0;j=i;c[f>>2]=a;c[k>>2]=b;c[e>>2]=d;c[j>>2]=$h(c[f>>2]|0,c[k>>2]|0)|0;d=c[j>>2]|0;if((c[j>>2]|0)<0){c[g>>2]=d;k=c[g>>2]|0;l=i;return k|0}c[h>>2]=N(d,Ih(c[f>>2]|0,c[e>>2]|0)|0)|0;if(((c[h>>2]|0)*25|0)>((c[e>>2]|0)*3|0)){c[g>>2]=-4;k=c[g>>2]|0;l=i;return k|0}else{c[g>>2]=c[h>>2];k=c[g>>2]|0;l=i;return k|0}return 0}function $h(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;h=i+12|0;g=i+8|0;f=i+4|0;e=i;c[g>>2]=a;c[f>>2]=b;do if((c[f>>2]|0)>=1){c[e>>2]=(d[c[g>>2]>>0]|0)&3;if(!(c[e>>2]|0)){c[h>>2]=1;break}if((c[e>>2]|0)!=3){c[h>>2]=2;break}if((c[f>>2]|0)<2){c[h>>2]=-4;break}else{c[h>>2]=(d[(c[g>>2]|0)+1>>0]|0)&63;break}}else c[h>>2]=-1;while(0);l=i;return c[h>>2]|0}function ai(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;n=p+24|0;o=p+20|0;h=p+16|0;k=p+12|0;m=p+8|0;j=p+4|0;i=p;c[o>>2]=a;c[h>>2]=b;c[k>>2]=d;c[m>>2]=e;c[j>>2]=f;c[i>>2]=g;if((c[j>>2]|0)<=0){c[n>>2]=-1;o=c[n>>2]|0;l=p;return o|0}else{c[n>>2]=Ph(c[o>>2]|0,c[h>>2]|0,c[k>>2]|0,c[m>>2]|0,c[j>>2]|0,c[i>>2]|0,0,0,0)|0;o=c[n>>2]|0;l=p;return o|0}return 0}function bi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;A=l;l=l+112|0;q=A+8|0;z=A+108|0;h=A+104|0;B=A+100|0;y=A+96|0;e=A+80|0;g=A+72|0;f=A+68|0;i=A+64|0;r=A+60|0;o=A+56|0;x=A+52|0;j=A+48|0;s=A+44|0;k=A+40|0;t=A+36|0;m=A+32|0;u=A+28|0;n=A+24|0;v=A+20|0;p=A+16|0;w=A+12|0;c[h>>2]=a;c[B>>2]=b;c[y>>2]=0;c[g>>2]=(c[h>>2]|0)+(c[(c[h>>2]|0)+4>>2]|0);c[f>>2]=(c[h>>2]|0)+(c[c[h>>2]>>2]|0);c[e>>2]=d;a:do switch(c[B>>2]|0){case 4009:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[r>>2]=B;c[i>>2]=c[r>>2];if(c[i>>2]|0){c[c[i>>2]>>2]=c[(c[h>>2]|0)+52>>2];e=20}else e=21;break}case 4031:{w=(c[e>>2]|0)+(4-1)&~(4-1);B=c[w>>2]|0;c[e>>2]=w+4;c[x>>2]=B;c[o>>2]=c[x>>2];if(c[o>>2]|0){c[c[o>>2]>>2]=c[(c[h>>2]|0)+84>>2];e=20}else e=21;break}case 4028:{aj((c[h>>2]|0)+48|0,0,88-((c[h>>2]|0)+48-(c[h>>2]|0))|0)|0;tb(c[f>>2]|0,4028,A)|0;zd(c[g>>2]|0)|0;c[(c[h>>2]|0)+48>>2]=c[(c[h>>2]|0)+8>>2];c[(c[h>>2]|0)+64>>2]=(c[(c[h>>2]|0)+12>>2]|0)/400|0;e=20;break}case 4029:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[s>>2]=B;c[j>>2]=c[s>>2];if(c[j>>2]|0){c[c[j>>2]>>2]=c[(c[h>>2]|0)+12>>2];e=20}else e=21;break}case 4033:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[t>>2]=B;c[k>>2]=c[t>>2];if(c[k>>2]|0)if((c[(c[h>>2]|0)+60>>2]|0)==1002){e=c[f>>2]|0;c[q>>2]=(c[k>>2]|0)+((((c[k>>2]|0)-(c[k>>2]|0)|0)/4|0)<<2);tb(e,4033,q)|0;e=20;break a}else{c[c[k>>2]>>2]=c[(c[h>>2]|0)+16+20>>2];e=20;break a}else e=21;break}case 4045:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[u>>2]=B;c[m>>2]=c[u>>2];if(c[m>>2]|0){c[c[m>>2]>>2]=c[(c[h>>2]|0)+40>>2];e=20}else e=21;break}case 4034:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[v>>2]=B;c[n>>2]=c[v>>2];if((c[n>>2]|0)<-32768|(c[n>>2]|0)>32767)e=21;else{c[(c[h>>2]|0)+40>>2]=c[n>>2];e=20}break}case 4039:{x=(c[e>>2]|0)+(4-1)&~(4-1);B=c[x>>2]|0;c[e>>2]=x+4;c[w>>2]=B;c[p>>2]=c[w>>2];if(c[p>>2]|0){c[c[p>>2]>>2]=c[(c[h>>2]|0)+72>>2];e=20}else e=21;break}default:{c[y>>2]=-5;e=20}}while(0);if((e|0)==20){c[z>>2]=c[y>>2];B=c[z>>2]|0;l=A;return B|0}else if((e|0)==21){c[z>>2]=-1;B=c[z>>2]|0;l=A;return B|0}return 0}function ci(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;f=h+16|0;d=h+12|0;g=h+8|0;b=h+4|0;e=h;c[d>>2]=a;if((c[d>>2]|0)<1|(c[d>>2]|0)>2){c[f>>2]=0;g=c[f>>2]|0;l=h;return g|0}c[e>>2]=Bd(g)|0;if(c[e>>2]|0){c[f>>2]=0;g=c[f>>2]|0;l=h;return g|0}else{c[g>>2]=di(c[g>>2]|0)|0;c[b>>2]=Sa(c[d>>2]|0)|0;e=di(18220)|0;c[f>>2]=e+(c[g>>2]|0)+(c[b>>2]|0);g=c[f>>2]|0;l=h;return g|0}return 0}function di(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=4;a=N((((c[e>>2]|0)+(c[d>>2]|0)-1|0)>>>0)/((c[d>>2]|0)>>>0)|0,c[d>>2]|0)|0;l=b;return a|0}function ei(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+64|0;t=u+8|0;s=u;o=u+48|0;r=u+44|0;h=u+40|0;k=u+36|0;i=u+32|0;q=u+28|0;j=u+24|0;m=u+20|0;n=u+16|0;p=u+12|0;c[r>>2]=a;c[h>>2]=d;c[k>>2]=e;c[i>>2]=f;if((!((c[h>>2]|0)!=48e3&(c[h>>2]|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>2]=Ua(c[j>>2]|0,c[h>>2]|0,c[k>>2]|0,c[(c[r>>2]|0)+168>>2]|0)|0;if(c[m>>2]|0){c[o>>2]=-3;t=c[o>>2]|0;l=u;return t|0}else{a=c[j>>2]|0;c[s>>2]=0;Wa(a,10016,s)|0;s=c[j>>2]|0;c[t>>2]=c[(c[r>>2]|0)+8+36>>2];Wa(s,4010,t)|0;c[(c[r>>2]|0)+136>>2]=1;c[(c[r>>2]|0)+140>>2]=1;c[(c[r>>2]|0)+152>>2]=-1e3;t=3e3+(N(c[h>>2]|0,c[k>>2]|0)|0)|0;c[(c[r>>2]|0)+148>>2]=t;c[(c[r>>2]|0)+96>>2]=c[i>>2];c[(c[r>>2]|0)+112>>2]=-1e3;c[(c[r>>2]|0)+116>>2]=-1e3;c[(c[r>>2]|0)+120>>2]=1105;c[(c[r>>2]|0)+108>>2]=-1e3;c[(c[r>>2]|0)+124>>2]=-1e3;c[(c[r>>2]|0)+128>>2]=-1;c[(c[r>>2]|0)+160>>2]=(c[(c[r>>2]|0)+132>>2]|0)/100|0;c[(c[r>>2]|0)+156>>2]=24;c[(c[r>>2]|0)+144>>2]=5e3;c[(c[r>>2]|0)+104>>2]=(c[(c[r>>2]|0)+132>>2]|0)/250|0;b[(c[r>>2]|0)+14292>>1]=16384;g[(c[r>>2]|0)+14300>>2]=1.0;t=(Bf(60)|0)<<8;c[(c[r>>2]|0)+14296>>2]=t;c[(c[r>>2]|0)+14344>>2]=1;c[(c[r>>2]|0)+14320>>2]=1001;c[(c[r>>2]|0)+14336>>2]=1105;Hi((c[r>>2]|0)+172|0);c[o>>2]=0;t=c[o>>2]|0;l=u;return t|0}}c[o>>2]=-1;t=c[o>>2]|0;l=u;return t|0}function fi(){return 0}function gi(a,b,d,e,f,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+48|0;v=u+40|0;r=u+36|0;s=u+32|0;p=u+28|0;m=u+24|0;n=u+20|0;j=u+16|0;t=u+12|0;q=u+8|0;o=u+4|0;k=u;c[v>>2]=a;c[r>>2]=b;c[s>>2]=d;c[p>>2]=e;c[m>>2]=f;c[n>>2]=h;c[j>>2]=i;c[t>>2]=c[v>>2];c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[s>>2]|0))break;v=N((c[o>>2]|0)+(c[p>>2]|0)|0,c[j>>2]|0)|0;g[(c[r>>2]|0)+(c[o>>2]<<2)>>2]=+g[(c[t>>2]|0)+(v+(c[m>>2]|0)<<2)>>2]*32768.0;c[o>>2]=(c[o>>2]|0)+1}a:do if((c[n>>2]|0)<=-1){if((c[n>>2]|0)==-2){c[k>>2]=1;while(1){if((c[k>>2]|0)>=(c[j>>2]|0))break a;c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[s>>2]|0))break;d=N((c[o>>2]|0)+(c[p>>2]|0)|0,c[j>>2]|0)|0;v=(c[r>>2]|0)+(c[o>>2]<<2)|0;g[v>>2]=+g[v>>2]+ +g[(c[t>>2]|0)+(d+(c[k>>2]|0)<<2)>>2]*32768.0;c[o>>2]=(c[o>>2]|0)+1}c[k>>2]=(c[k>>2]|0)+1}}}else{c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[s>>2]|0))break a;d=N((c[o>>2]|0)+(c[p>>2]|0)|0,c[j>>2]|0)|0;v=(c[r>>2]|0)+(c[o>>2]<<2)|0;g[v>>2]=+g[v>>2]+ +g[(c[t>>2]|0)+(d+(c[n>>2]|0)<<2)>>2]*32768.0;c[o>>2]=(c[o>>2]|0)+1}}while(0);g[q>>2]=1.0;if((c[j>>2]|0)==-2)g[q>>2]=+g[q>>2]/+(c[j>>2]|0);else g[q>>2]=+g[q>>2]/2.0;c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[s>>2]|0))break;v=(c[r>>2]|0)+(c[o>>2]<<2)|0;g[v>>2]=+g[v>>2]*+g[q>>2];c[o>>2]=(c[o>>2]|0)+1}l=u;return}function hi(a,d,e,f,h,i,j){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;v=l;l=l+48|0;w=v+40|0;s=v+36|0;t=v+32|0;q=v+28|0;n=v+24|0;o=v+20|0;k=v+16|0;u=v+12|0;r=v+8|0;p=v+4|0;m=v;c[w>>2]=a;c[s>>2]=d;c[t>>2]=e;c[q>>2]=f;c[n>>2]=h;c[o>>2]=i;c[k>>2]=j;c[u>>2]=c[w>>2];c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))break;w=N((c[p>>2]|0)+(c[q>>2]|0)|0,c[k>>2]|0)|0;g[(c[s>>2]|0)+(c[p>>2]<<2)>>2]=+(b[(c[u>>2]|0)+(w+(c[n>>2]|0)<<1)>>1]|0);c[p>>2]=(c[p>>2]|0)+1}a:do if((c[o>>2]|0)<=-1){if((c[o>>2]|0)==-2){c[m>>2]=1;while(1){if((c[m>>2]|0)>=(c[k>>2]|0))break a;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))break;e=N((c[p>>2]|0)+(c[q>>2]|0)|0,c[k>>2]|0)|0;w=(c[s>>2]|0)+(c[p>>2]<<2)|0;g[w>>2]=+g[w>>2]+ +(b[(c[u>>2]|0)+(e+(c[m>>2]|0)<<1)>>1]|0);c[p>>2]=(c[p>>2]|0)+1}c[m>>2]=(c[m>>2]|0)+1}}}else{c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))break a;e=N((c[p>>2]|0)+(c[q>>2]|0)|0,c[k>>2]|0)|0;w=(c[s>>2]|0)+(c[p>>2]<<2)|0;g[w>>2]=+g[w>>2]+ +(b[(c[u>>2]|0)+(e+(c[o>>2]|0)<<1)>>1]|0);c[p>>2]=(c[p>>2]|0)+1}}while(0);g[r>>2]=.000030517578125;if((c[k>>2]|0)==-2)g[r>>2]=+g[r>>2]/+(c[k>>2]|0);else g[r>>2]=+g[r>>2]/2.0;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))break;w=(c[s>>2]|0)+(c[p>>2]<<2)|0;g[w>>2]=+g[w>>2]*+g[r>>2];c[p>>2]=(c[p>>2]|0)+1}l=v;return}function ii(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;i=j+16|0;g=j+12|0;e=j+8|0;f=j+4|0;h=j;c[g>>2]=a;c[e>>2]=b;c[f>>2]=d;if((c[g>>2]|0)<((c[f>>2]|0)/400|0|0)){c[i>>2]=-1;i=c[i>>2]|0;l=j;return i|0}do if((c[e>>2]|0)==5e3)c[h>>2]=c[g>>2];else{if((c[e>>2]|0)==5010){c[h>>2]=(c[f>>2]|0)/50|0;break}if(!((c[e>>2]|0)>=5001&(c[e>>2]|0)<=5006)){c[i>>2]=-1;i=c[i>>2]|0;l=j;return i|0}d=c[f>>2]|0;if((((c[f>>2]|0)*3|0)/50|0|0)<(((c[f>>2]|0)/400|0)<<(c[e>>2]|0)-5001|0))d=(d*3|0)/50|0;else d=((d|0)/400|0)<<(c[e>>2]|0)-5001;c[h>>2]=d}while(0);if((c[h>>2]|0)>(c[g>>2]|0)){c[i>>2]=-1;i=c[i>>2]|0;l=j;return i|0}if(((((((c[h>>2]|0)*400|0)!=(c[f>>2]|0)?((c[h>>2]|0)*200|0)!=(c[f>>2]|0):0)?((c[h>>2]|0)*100|0)!=(c[f>>2]|0):0)?((c[h>>2]|0)*50|0)!=(c[f>>2]|0):0)?((c[h>>2]|0)*25|0)!=(c[f>>2]|0):0)?((c[h>>2]|0)*50|0)!=((c[f>>2]|0)*3|0):0){c[i>>2]=-1;i=c[i>>2]|0;l=j;return i|0}c[i>>2]=c[h>>2];i=c[i>>2]|0;l=j;return i|0}function ji(a,b,d,e,f,g,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=l;l=l+48|0;t=w+40|0;o=w+36|0;s=w+32|0;v=w+28|0;k=w+24|0;m=w+20|0;p=w+16|0;q=w+12|0;r=w+8|0;u=w+4|0;n=w;c[o>>2]=a;c[s>>2]=b;c[v>>2]=d;c[k>>2]=e;c[m>>2]=f;c[p>>2]=g;c[q>>2]=h;c[r>>2]=i;c[u>>2]=j;if((c[v>>2]|0)==5010?(c[s>>2]|0)>=((c[m>>2]|0)/200|0|0):0){c[n>>2]=3;c[n>>2]=ki(c[o>>2]|0,c[s>>2]|0,c[k>>2]|0,c[m>>2]|0,c[p>>2]|0,0.0,c[u>>2]|0,c[q>>2]|0,c[r>>2]|0)|0;while(1){if((((c[m>>2]|0)/400|0)<>2]|0)<=(c[s>>2]|0))break;c[n>>2]=(c[n>>2]|0)+-1}c[s>>2]=((c[m>>2]|0)/400|0)<>2]}else c[s>>2]=ii(c[s>>2]|0,c[v>>2]|0,c[m>>2]|0)|0;if((c[s>>2]|0)<0){c[t>>2]=-1;v=c[t>>2]|0;l=w;return v|0}else{c[t>>2]=c[s>>2];v=c[t>>2]|0;l=w;return v|0}return 0}function ki(a,b,d,e,f,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=+h;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;H=l;l=l+304|0;G=H+296|0;m=H+292|0;n=H+288|0;I=H+284|0;q=H+280|0;F=H+276|0;x=H+272|0;r=H+268|0;s=H+264|0;o=H+260|0;v=H+256|0;t=H+144|0;u=H+36|0;y=H+32|0;p=H+28|0;C=H+24|0;A=H+20|0;z=H+16|0;B=H+12|0;D=H+8|0;E=H+4|0;w=H;c[G>>2]=a;c[m>>2]=b;c[n>>2]=d;c[I>>2]=e;c[q>>2]=f;g[F>>2]=h;c[x>>2]=i;c[r>>2]=j;c[s>>2]=k;c[p>>2]=0;c[C>>2]=(c[I>>2]|0)/400|0;a=c[C>>2]|0;c[B>>2]=$()|0;e=l;l=l+((1*(a<<2)|0)+15&-16)|0;g[t>>2]=+g[c[x>>2]>>2];g[u>>2]=1.0/(+g[c[x>>2]>>2]+1.0000000036274937e-15);if(c[r>>2]|0){c[z>>2]=(c[C>>2]<<1)-(c[r>>2]|0);c[m>>2]=(c[m>>2]|0)-(c[z>>2]|0);g[t+4>>2]=+g[(c[x>>2]|0)+4>>2];g[u+4>>2]=1.0/(+g[(c[x>>2]|0)+4>>2]+1.0000000036274937e-15);g[t+8>>2]=+g[(c[x>>2]|0)+8>>2];g[u+8>>2]=1.0/(+g[(c[x>>2]|0)+8>>2]+1.0000000036274937e-15);c[A>>2]=3}else{c[A>>2]=1;c[z>>2]=0}if(((c[m>>2]|0)/(c[C>>2]|0)|0|0)<24)d=(c[m>>2]|0)/(c[C>>2]|0)|0;else d=24;c[o>>2]=d;g[y>>2]=0.0;c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[o>>2]|0))break;g[D>>2]=1.0000000036274937e-15;I=N(c[v>>2]|0,c[C>>2]|0)|0;ba[c[s>>2]&3](c[G>>2]|0,e,c[C>>2]|0,I+(c[z>>2]|0)|0,0,-2,c[n>>2]|0);if(!(c[v>>2]|0))g[y>>2]=+g[e>>2];c[w>>2]=0;while(1){if((c[w>>2]|0)>=(c[C>>2]|0))break;g[E>>2]=+g[e+(c[w>>2]<<2)>>2];g[D>>2]=+g[D>>2]+(+g[E>>2]-+g[y>>2])*(+g[E>>2]-+g[y>>2]);g[y>>2]=+g[E>>2];c[w>>2]=(c[w>>2]|0)+1}g[t+((c[v>>2]|0)+(c[A>>2]|0)<<2)>>2]=+g[D>>2];g[u+((c[v>>2]|0)+(c[A>>2]|0)<<2)>>2]=1.0/+g[D>>2];c[v>>2]=(c[v>>2]|0)+1}g[t+((c[v>>2]|0)+(c[A>>2]|0)<<2)>>2]=+g[t+((c[v>>2]|0)+(c[A>>2]|0)-1<<2)>>2];if(c[r>>2]|0)c[o>>2]=24<((c[o>>2]|0)+2|0)?24:(c[o>>2]|0)+2|0;c[p>>2]=li(t,u,c[o>>2]|0,~~((+g[F>>2]*.5+1.0)*+(((c[n>>2]|0)*60|0)+40|0)),(c[q>>2]|0)/400|0)|0;g[c[x>>2]>>2]=+g[t+(1<>2]<<2)>>2];if(!(c[r>>2]|0)){I=c[p>>2]|0;G=c[B>>2]|0;_(G|0);l=H;return I|0}g[(c[x>>2]|0)+4>>2]=+g[t+((1<>2])+1<<2)>>2];g[(c[x>>2]|0)+8>>2]=+g[t+((1<>2])+2<<2)>>2];I=c[p>>2]|0;G=c[B>>2]|0;_(G|0);l=H;return I|0}function li(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0.0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0;z=l;l=l+3136|0;i=z+3124|0;j=z+3120|0;t=z+3116|0;n=z+3112|0;r=z+3108|0;x=z+3104|0;w=z+1568|0;y=z+32|0;u=z+28|0;v=z+24|0;m=z+20|0;o=z+16|0;p=z+12|0;q=z+8|0;k=z+4|0;s=z;c[i>>2]=a;c[j>>2]=b;c[t>>2]=d;c[n>>2]=e;c[r>>2]=f;do if((c[r>>2]|0)>=80)if((c[r>>2]|0)>160){g[m>>2]=1.0;break}else{g[m>>2]=(+(c[r>>2]|0)-80.0)/80.0;break}else g[m>>2]=0.0;while(0);c[x>>2]=0;while(1){if((c[x>>2]|0)>=16)break;c[y+(c[x>>2]<<2)>>2]=-1;g[w+(c[x>>2]<<2)>>2]=1.0e10;c[x>>2]=(c[x>>2]|0)+1}c[x>>2]=0;while(1){if((c[x>>2]|0)>=4)break;A=+((c[n>>2]|0)+(N(c[r>>2]|0,1<>2])|0)|0);h=+g[m>>2];h=A*(h*+mi(c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>2]+h;c[o>>2]=(c[o>>2]|0)+1}c[x>>2]=a+1}c[v>>2]=1;g[u>>2]=+g[w+((c[t>>2]|0)-1<<6)+4>>2];c[x>>2]=2;while(1){a=(c[t>>2]|0)-1|0;if((c[x>>2]|0)>=16)break;if(+g[w+(a<<6)+(c[x>>2]<<2)>>2]<+g[u>>2]){g[u>>2]=+g[w+((c[t>>2]|0)-1<<6)+(c[x>>2]<<2)>>2];c[v>>2]=c[x>>2]}c[x>>2]=(c[x>>2]|0)+1}c[x>>2]=a;while(1){if((c[x>>2]|0)<0)break;c[v>>2]=c[y+(c[x>>2]<<6)+(c[v>>2]<<2)>>2];c[x>>2]=(c[x>>2]|0)+-1}l=z;return c[v>>2]|0}function mi(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0.0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;j=r+32|0;k=r+28|0;h=r+24|0;i=r+20|0;n=r+16|0;m=r+12|0;o=r+8|0;p=r+4|0;q=r;c[j>>2]=a;c[k>>2]=b;c[h>>2]=d;c[i>>2]=e;g[o>>2]=0.0;g[p>>2]=0.0;if((c[i>>2]|0)<((1<>2])+1|0))a=c[i>>2]|0;else a=(1<>2])+1|0;c[m>>2]=a;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[m>>2]|0))break;g[o>>2]=+g[o>>2]+ +g[(c[j>>2]|0)+(c[n>>2]<<2)>>2];g[p>>2]=+g[p>>2]+ +g[(c[k>>2]|0)+(c[n>>2]<<2)>>2];c[n>>2]=(c[n>>2]|0)+1}g[q>>2]=+g[o>>2]*+g[p>>2]/+(N(c[m>>2]|0,c[m>>2]|0)|0);if(0.0>(+g[q>>2]-2.0)*.05000000074505806)f=0.0;else f=(+g[q>>2]-2.0)*.05000000074505806;if(1.0<+B(+f)){f=1.0;l=r;return +f}if(0.0>(+g[q>>2]-2.0)*.05000000074505806)f=0.0;else f=(+g[q>>2]-2.0)*.05000000074505806;f=+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b>>2]|0)+18212>>2]=0;do if(c[hb>>2]|0){if((c[(c[Qb>>2]|0)+112>>2]|0)==-1e3){y=~~+z(+((1.0-+g[hb+20>>2])*100.0+.5));c[(c[Qb>>2]|0)+128>>2]=y}c[u>>2]=c[hb+24>>2];if((c[u>>2]|0)<=12){c[(c[Qb>>2]|0)+18212>>2]=1101;break}if((c[u>>2]|0)<=14){c[(c[Qb>>2]|0)+18212>>2]=1102;break}if((c[u>>2]|0)<=16){c[(c[Qb>>2]|0)+18212>>2]=1103;break}else{c[(c[Qb>>2]|0)+18212>>2]=(c[u>>2]|0)<=18?1104:1105;break}}while(0);if((c[(c[Qb>>2]|0)+100>>2]|0)==2?(c[(c[Qb>>2]|0)+108>>2]|0)!=1:0)g[G>>2]=+ni(c[pa>>2]|0,c[Gb>>2]|0,c[(c[Qb>>2]|0)+132>>2]|0,(c[Qb>>2]|0)+14352|0);else g[G>>2]=0.0;c[ab>>2]=c[x>>2];y=pi(c[Qb>>2]|0,c[Gb>>2]|0,c[Hb>>2]|0)|0;c[(c[Qb>>2]|0)+148>>2]=y;c[Da>>2]=(c[(c[Qb>>2]|0)+132>>2]|0)/(c[Gb>>2]|0)|0;do if((c[Hb>>2]|0)>=3?(c[(c[Qb>>2]|0)+148>>2]|0)>=((c[Da>>2]|0)*3<<3|0):0){if((c[Da>>2]|0)<50){if((N(c[Hb>>2]|0,c[Da>>2]|0)|0)<300)break;if((c[(c[Qb>>2]|0)+148>>2]|0)<2400)break}if(!(c[(c[Qb>>2]|0)+136>>2]|0)){if((((c[(c[Qb>>2]|0)+148>>2]|0)+(c[Da>>2]<<2)|0)/(c[Da>>2]<<3|0)|0|0)<(c[Hb>>2]|0))q=((c[(c[Qb>>2]|0)+148>>2]|0)+(c[Da>>2]<<2)|0)/(c[Da>>2]<<3|0)|0;else q=c[Hb>>2]|0;c[B>>2]=q;C=N(c[B>>2]|0,c[Da>>2]<<3)|0;c[(c[Qb>>2]|0)+148>>2]=C;c[Hb>>2]=c[B>>2]}c[Aa>>2]=(N(c[Da>>2]|0,c[Hb>>2]|0)|0)<<3;c[$a>>2]=(c[(c[Qb>>2]|0)+148>>2]|0)-(N(((c[(c[Qb>>2]|0)+100>>2]|0)*40|0)+20|0,((c[(c[Qb>>2]|0)+132>>2]|0)/(c[Gb>>2]|0)|0)-50|0)|0);do if((c[(c[Qb>>2]|0)+112>>2]|0)!=3001){if((c[(c[Qb>>2]|0)+112>>2]|0)==3002){c[L>>2]=0;break}q=c[Qb>>2]|0;if((c[(c[Qb>>2]|0)+128>>2]|0)>=0){c[L>>2]=(c[q+128>>2]|0)*327>>8;if((c[(c[Qb>>2]|0)+96>>2]|0)!=2049)break;c[L>>2]=(c[L>>2]|0)<115?c[L>>2]|0:115;break}if((c[q+96>>2]|0)==2048){c[L>>2]=115;break}else{c[L>>2]=48;break}}else c[L>>2]=127;while(0);if((c[(c[Qb>>2]|0)+108>>2]|0)!=-1e3?(c[(c[Qb>>2]|0)+100>>2]|0)==2:0){q=c[(c[Qb>>2]|0)+108>>2]|0;m=c[Qb>>2]|0}else Eb=71;do if((Eb|0)==71){if((c[(c[Qb>>2]|0)+100>>2]|0)!=2){q=c[(c[Qb>>2]|0)+100>>2]|0;m=c[Qb>>2]|0;break}c[D>>2]=3e4;q=c[D>>2]|0;if((c[(c[Qb>>2]|0)+14288>>2]|0)==2)c[D>>2]=q-1e3;else c[D>>2]=q+1e3;q=(c[$a>>2]|0)>(c[D>>2]|0)?2:1;m=c[Qb>>2]|0}while(0);c[m+14288>>2]=q;c[$a>>2]=(c[(c[Qb>>2]|0)+148>>2]|0)-(N(((c[(c[Qb>>2]|0)+14288>>2]|0)*40|0)+20|0,((c[(c[Qb>>2]|0)+132>>2]|0)/(c[Gb>>2]|0)|0)-50|0)|0);q=c[Qb>>2]|0;do if((c[(c[Qb>>2]|0)+96>>2]|0)==2051){m=1002;Eb=91}else{if((c[q+124>>2]|0)!=-1e3){m=c[(c[Qb>>2]|0)+124>>2]|0;q=c[Qb>>2]|0;Eb=91;break}c[F>>2]=~~((1.0-+g[G>>2])*+(c[4508]|0)+ +g[G>>2]*+(c[4510]|0));c[E>>2]=~~((1.0-+g[G>>2])*+(c[4511]|0)+ +g[G>>2]*+(c[4511]|0));G=N(c[L>>2]|0,c[L>>2]|0)|0;c[H>>2]=(c[E>>2]|0)+((N(G,(c[F>>2]|0)-(c[E>>2]|0)|0)|0)>>14);if((c[(c[Qb>>2]|0)+96>>2]|0)==2048)c[H>>2]=(c[H>>2]|0)+8e3;do if((c[(c[Qb>>2]|0)+14324>>2]|0)==1002)c[H>>2]=(c[H>>2]|0)-4e3;else{if((c[(c[Qb>>2]|0)+14324>>2]|0)<=0)break;c[H>>2]=(c[H>>2]|0)+4e3}while(0);c[(c[Qb>>2]|0)+14320>>2]=(c[$a>>2]|0)>=(c[H>>2]|0)?1002:1e3;do if(c[(c[Qb>>2]|0)+8+40>>2]|0){if((c[(c[Qb>>2]|0)+8+32>>2]|0)<=(128-(c[L>>2]|0)>>4|0))break;c[(c[Qb>>2]|0)+14320>>2]=1e3}while(0);if(!((c[L>>2]|0)>100?(c[(c[Qb>>2]|0)+8+44>>2]|0)!=0:0))break;m=1e3;q=c[Qb>>2]|0;Eb=91}while(0);if((Eb|0)==91)c[q+14320>>2]=m;if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002?(c[Gb>>2]|0)<((c[(c[Qb>>2]|0)+132>>2]|0)/100|0|0):0)c[(c[Qb>>2]|0)+14320>>2]=1002;if(c[(c[Qb>>2]|0)+164>>2]|0)c[(c[Qb>>2]|0)+14320>>2]=1002;H=N((c[Da>>2]|0)>50?12e3:8e3,c[Gb>>2]|0)|0;if((c[Hb>>2]|0)<((H|0)/(c[(c[Qb>>2]|0)+132>>2]<<3|0)|0|0))c[(c[Qb>>2]|0)+14320>>2]=1002;do if((c[(c[Qb>>2]|0)+14288>>2]|0)==1){if((c[(c[Qb>>2]|0)+14328>>2]|0)!=2){Eb=105;break}if(c[(c[Qb>>2]|0)+8+56>>2]|0){Eb=105;break}if((c[(c[Qb>>2]|0)+14320>>2]|0)==1002){Eb=105;break}if((c[(c[Qb>>2]|0)+14324>>2]|0)==1002){Eb=105;break}c[(c[Qb>>2]|0)+8+56>>2]=1;c[(c[Qb>>2]|0)+14288>>2]=2}else Eb=105;while(0);if((Eb|0)==105)c[(c[Qb>>2]|0)+8+56>>2]=0;do if((c[(c[Qb>>2]|0)+14324>>2]|0)>0){if(!((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002?(c[(c[Qb>>2]|0)+14324>>2]|0)==1002:0)){if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002)break;if((c[(c[Qb>>2]|0)+14324>>2]|0)==1002)break}c[Ib>>2]=1;c[jb>>2]=(c[(c[Qb>>2]|0)+14320>>2]|0)!=1002&1;if(c[jb>>2]|0)break;if((c[Gb>>2]|0)>=((c[(c[Qb>>2]|0)+132>>2]|0)/100|0|0)){c[(c[Qb>>2]|0)+14320>>2]=c[(c[Qb>>2]|0)+14324>>2];c[Lb>>2]=1;break}else{c[Ib>>2]=0;break}}while(0);if(c[(c[Qb>>2]|0)+14340>>2]|0){c[Ib>>2]=1;c[jb>>2]=1;c[(c[Qb>>2]|0)+14340>>2]=0;c[Ea>>2]=1}do if(c[Ib>>2]|0){H=N(c[Hb>>2]|0,(c[(c[Qb>>2]|0)+132>>2]|0)/200|0)|0;if(257<((H|0)/((c[Gb>>2]|0)+((c[(c[Qb>>2]|0)+132>>2]|0)/200|0)|0)|0|0))q=257;else{q=N(c[Hb>>2]|0,(c[(c[Qb>>2]|0)+132>>2]|0)/200|0)|0;q=(q|0)/((c[Gb>>2]|0)+((c[(c[Qb>>2]|0)+132>>2]|0)/200|0)|0)|0}c[Jb>>2]=q;if(!(c[(c[Qb>>2]|0)+136>>2]|0))break;if((c[Jb>>2]|0)<((c[(c[Qb>>2]|0)+148>>2]|0)/1600|0|0))q=c[Jb>>2]|0;else q=(c[(c[Qb>>2]|0)+148>>2]|0)/1600|0;c[Jb>>2]=q}while(0);do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002){if((c[(c[Qb>>2]|0)+14324>>2]|0)!=1002)break;Cd(c[Ga>>2]|0,c[(c[Qb>>2]|0)+168>>2]|0,I)|0;c[Ea>>2]=1}while(0);do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002){if(c[(c[Qb>>2]|0)+14344>>2]|0){Eb=131;break}if(c[(c[Qb>>2]|0)+8+72>>2]|0)Eb=131}else Eb=131;while(0);do if((Eb|0)==131){c[M>>2]=1105;c[P>>2]=c[$a>>2];do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002){c[P>>2]=(N(c[P>>2]|0,45+(c[(c[Qb>>2]|0)+8+36>>2]|0)|0)|0)/50|0;if(c[(c[Qb>>2]|0)+136>>2]|0)break;c[P>>2]=(c[P>>2]|0)-1e3}while(0);do if((c[(c[Qb>>2]|0)+100>>2]|0)==2){if((c[(c[Qb>>2]|0)+108>>2]|0)==1){Eb=137;break}c[K>>2]=18048;c[J>>2]=18080}else Eb=137;while(0);if((Eb|0)==137){c[K>>2]=18112;c[J>>2]=18144}c[Za>>2]=0;while(1){if((c[Za>>2]|0)>=8)break;I=N(c[L>>2]|0,c[L>>2]|0)|0;I=(c[(c[J>>2]|0)+(c[Za>>2]<<2)>>2]|0)+((N(I,(c[(c[K>>2]|0)+(c[Za>>2]<<2)>>2]|0)-(c[(c[J>>2]|0)+(c[Za>>2]<<2)>>2]|0)|0)|0)>>14)|0;c[O+(c[Za>>2]<<2)>>2]=I;c[Za>>2]=(c[Za>>2]|0)+1}do{c[R>>2]=c[O+((c[M>>2]|0)-1102<<1<<2)>>2];c[Q>>2]=c[O+(((c[M>>2]|0)-1102<<1)+1<<2)>>2];do if(!(c[(c[Qb>>2]|0)+14344>>2]|0)){q=c[Q>>2]|0;m=c[R>>2]|0;if((c[(c[Qb>>2]|0)+14336>>2]|0)>=(c[M>>2]|0)){c[R>>2]=m-q;break}else{c[R>>2]=m+q;break}}while(0);if((c[P>>2]|0)>=(c[R>>2]|0))break;L=(c[M>>2]|0)+-1|0;c[M>>2]=L}while((L|0)>1101);c[(c[Qb>>2]|0)+14336>>2]=c[M>>2];if(c[(c[Qb>>2]|0)+14344>>2]|0)break;if((c[(c[Qb>>2]|0)+14320>>2]|0)==1002)break;if(c[(c[Qb>>2]|0)+8+76>>2]|0)break;if((c[(c[Qb>>2]|0)+14336>>2]|0)<=1103)break;c[(c[Qb>>2]|0)+14336>>2]=1103}while(0);if((c[(c[Qb>>2]|0)+14336>>2]|0)>(c[(c[Qb>>2]|0)+120>>2]|0))c[(c[Qb>>2]|0)+14336>>2]=c[(c[Qb>>2]|0)+120>>2];if((c[(c[Qb>>2]|0)+116>>2]|0)!=-1e3)c[(c[Qb>>2]|0)+14336>>2]=c[(c[Qb>>2]|0)+116>>2];if((c[Aa>>2]|0)<15e3?(c[(c[Qb>>2]|0)+14320>>2]|0)!=1002:0){if((c[(c[Qb>>2]|0)+14336>>2]|0)<1103)q=c[(c[Qb>>2]|0)+14336>>2]|0;else q=1103;c[(c[Qb>>2]|0)+14336>>2]=q}do if((c[(c[Qb>>2]|0)+132>>2]|0)<=24e3){if((c[(c[Qb>>2]|0)+14336>>2]|0)<=1104)break;c[(c[Qb>>2]|0)+14336>>2]=1104}while(0);do if((c[(c[Qb>>2]|0)+132>>2]|0)<=16e3){if((c[(c[Qb>>2]|0)+14336>>2]|0)<=1103)break;c[(c[Qb>>2]|0)+14336>>2]=1103}while(0);do if((c[(c[Qb>>2]|0)+132>>2]|0)<=12e3){if((c[(c[Qb>>2]|0)+14336>>2]|0)<=1102)break;c[(c[Qb>>2]|0)+14336>>2]=1102}while(0);do if((c[(c[Qb>>2]|0)+132>>2]|0)<=8e3){if((c[(c[Qb>>2]|0)+14336>>2]|0)<=1101)break;c[(c[Qb>>2]|0)+14336>>2]=1101}while(0);do if(c[(c[Qb>>2]|0)+18212>>2]|0){if((c[(c[Qb>>2]|0)+116>>2]|0)!=-1e3)break;do if((c[$a>>2]|0)<=((c[(c[Qb>>2]|0)+14288>>2]|0)*18e3|0)){if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002){Eb=177;break}c[S>>2]=1101}else Eb=177;while(0);a:do if((Eb|0)==177){do if((c[$a>>2]|0)<=((c[(c[Qb>>2]|0)+14288>>2]|0)*24e3|0)){if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002)break;c[S>>2]=1102;break a}while(0);if((c[$a>>2]|0)<=((c[(c[Qb>>2]|0)+14288>>2]|0)*3e4|0)){c[S>>2]=1103;break}if((c[$a>>2]|0)<=((c[(c[Qb>>2]|0)+14288>>2]|0)*44e3|0)){c[S>>2]=1104;break}else{c[S>>2]=1105;break}}while(0);if((c[(c[Qb>>2]|0)+18212>>2]|0)>(c[S>>2]|0))q=c[(c[Qb>>2]|0)+18212>>2]|0;else q=c[S>>2]|0;c[(c[Qb>>2]|0)+18212>>2]=q;S=c[Qb>>2]|0;c[(c[Qb>>2]|0)+14336>>2]=c[((c[(c[Qb>>2]|0)+14336>>2]|0)<(c[(c[Qb>>2]|0)+18212>>2]|0)?S+14336|0:S+18212|0)>>2]}while(0);S=c[ib>>2]|0;c[V>>2]=c[ea>>2];Wa(S,4036,V)|0;do if((c[(c[Qb>>2]|0)+14320>>2]|0)==1002){if((c[(c[Qb>>2]|0)+14336>>2]|0)!=1102)break;c[(c[Qb>>2]|0)+14336>>2]=1103}while(0);if(c[(c[Qb>>2]|0)+164>>2]|0)c[(c[Qb>>2]|0)+14336>>2]=1101;do if((c[Gb>>2]|0)>((c[(c[Qb>>2]|0)+132>>2]|0)/50|0|0)){if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002?(c[(c[Qb>>2]|0)+14336>>2]|0)<=1103:0)break;if((c[T>>2]|0)!=-1){c[(c[Qb>>2]|0)+172+8508>>2]=c[T>>2];c[(c[Qb>>2]|0)+172+8512>>2]=c[U>>2]}c[la>>2]=(c[Gb>>2]|0)>((c[(c[Qb>>2]|0)+132>>2]|0)/25|0|0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|0)|0;if((c[Nb>>2]|0)<0){Eb=212;break}c[Za>>2]=(c[Za>>2]|0)+1}do if((Eb|0)==210){c[Pb>>2]=-3;c[Mb>>2]=1}else if((Eb|0)==212){c[Pb>>2]=-3;c[Mb>>2]=1}else if((Eb|0)==214){if(c[q+136>>2]|0)c[ma>>2]=c[fa>>2];else{if((((c[(c[Qb>>2]|0)+148>>2]|0)*3|0)/(1200/(c[la>>2]|0)|0|0)|0|0)<(c[fa>>2]|0))q=((c[(c[Qb>>2]|0)+148>>2]|0)*3|0)/(1200/(c[la>>2]|0)|0|0)|0;else q=c[fa>>2]|0;c[ma>>2]=q}c[Nb>>2]=Fi(na,0,c[la>>2]|0,c[Ob>>2]|0,c[ma>>2]|0,0,((c[(c[Qb>>2]|0)+136>>2]|0)!=0^1)&1)|0;if((c[Nb>>2]|0)<0){c[Pb>>2]=-3;c[Mb>>2]=1;break}else{c[(c[Qb>>2]|0)+124>>2]=c[ja>>2];c[(c[Qb>>2]|0)+116>>2]=c[ha>>2];c[(c[Qb>>2]|0)+108>>2]=c[ia>>2];c[(c[Qb>>2]|0)+8+56>>2]=c[ka>>2];c[Pb>>2]=c[Nb>>2];c[Mb>>2]=1;break}}while(0);_(c[oa>>2]|0);Qb=c[Pb>>2]|0;l=Rb;return Qb|0}while(0);c[kb>>2]=c[(c[Qb>>2]|0)+14336>>2];if((c[kb>>2]|0)>1103?(c[(c[Qb>>2]|0)+14320>>2]|0)==1e3:0)c[(c[Qb>>2]|0)+14320>>2]=1001;if((c[kb>>2]|0)<=1103?(c[(c[Qb>>2]|0)+14320>>2]|0)==1001:0)c[(c[Qb>>2]|0)+14320>>2]=1e3;oa=N(c[(c[Qb>>2]|0)+148>>2]|0,c[Gb>>2]|0)|0;if(((c[Hb>>2]|0)-(c[Jb>>2]|0)|0)<((oa|0)/(c[(c[Qb>>2]|0)+132>>2]<<3|0)|0|0))q=(c[Hb>>2]|0)-(c[Jb>>2]|0)|0;else{q=N(c[(c[Qb>>2]|0)+148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(c[(c[Qb>>2]|0)+14348>>2]|0)break;c[ra>>2]=(c[ta>>2]|0)-(c[(c[Qb>>2]|0)+8+28>>2]|0);c[qa>>2]=(c[kb>>2]|0)==1104?3e3:3600;g[_a>>2]=+(c[ra>>2]|0)/(+(c[ra>>2]|0)+ +(N(c[(c[Qb>>2]|0)+14288>>2]|0,c[qa>>2]|0)|0));g[_a>>2]=+g[_a>>2]<.8571428656578064?+g[_a>>2]+.1428571492433548:1.0}else c[(c[Qb>>2]|0)+8+28>>2]=c[ta>>2];while(0);do if(c[(c[Qb>>2]|0)+14348>>2]|0){if(!(c[(c[Qb>>2]|0)+136>>2]|0))break;if(c[(c[Qb>>2]|0)+164>>2]|0)break;g[xa>>2]=0.0;c[va>>2]=17;b[za>>1]=16e3;do if((c[(c[Qb>>2]|0)+14336>>2]|0)==1101){c[va>>2]=13;b[za>>1]=8e3}else{if((c[(c[Qb>>2]|0)+14336>>2]|0)!=1102)break;c[va>>2]=15;b[za>>1]=12e3}while(0);c[ua>>2]=0;while(1){if((c[ua>>2]|0)>=(c[(c[Qb>>2]|0)+100>>2]|0))break;c[Za>>2]=0;while(1){if((c[Za>>2]|0)>=(c[va>>2]|0))break;if(+g[(c[(c[Qb>>2]|0)+14348>>2]|0)+(((c[ua>>2]|0)*21|0)+(c[Za>>2]|0)<<2)>>2]<.5)t=+g[(c[(c[Qb>>2]|0)+14348>>2]|0)+(((c[ua>>2]|0)*21|0)+(c[Za>>2]|0)<<2)>>2];else t=.5;do if(t>-2.0){if(!(+g[(c[(c[Qb>>2]|0)+14348>>2]|0)+(((c[ua>>2]|0)*21|0)+(c[Za>>2]|0)<<2)>>2]<.5)){t=.5;break}t=+g[(c[(c[Qb>>2]|0)+14348>>2]|0)+(((c[ua>>2]|0)*21|0)+(c[Za>>2]|0)<<2)>>2]}else t=-2.0;while(0);g[wa>>2]=t;if(+g[wa>>2]>0.0)g[wa>>2]=+g[wa>>2]*.5;g[xa>>2]=+g[xa>>2]+ +g[wa>>2];c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|0)+8+68>>2]|0)==8e3){c[kb>>2]=1101;break}if((c[(c[Qb>>2]|0)+8+68>>2]|0)==12e3){c[kb>>2]=1102;break}if((c[(c[Qb>>2]|0)+8+68>>2]|0)!=16e3)break;c[kb>>2]=1103}while(0);c[(c[Qb>>2]|0)+8+60>>2]=c[(c[Qb>>2]|0)+8+84>>2];if(c[(c[Qb>>2]|0)+8+60>>2]|0){c[Ib>>2]=1;c[jb>>2]=0;c[(c[Qb>>2]|0)+14340>>2]=1}c[Mb>>2]=0}while(0);_(c[Ma>>2]|0);if(!(c[Mb>>2]|0))Eb=325}else Eb=325;b:do if((Eb|0)==325){c[Ka>>2]=21;switch(c[kb>>2]|0){case 1101:{c[Ka>>2]=13;break}case 1103:case 1102:{c[Ka>>2]=17;break}case 1104:{c[Ka>>2]=19;break}case 1105:{c[Ka>>2]=21;break}default:{}}Za=c[ib>>2]|0;c[Na>>2]=c[Ka>>2];Wa(Za,10012,Na)|0;Za=c[ib>>2]|0;c[Oa>>2]=c[(c[Qb>>2]|0)+14288>>2];Wa(Za,10008,Oa)|0;Za=c[ib>>2]|0;c[Pa>>2]=-1;Wa(Za,4002,Pa)|0;do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1e3){g[Ja>>2]=2.0;Za=c[ib>>2]|0;c[Qa>>2]=0;Wa(Za,4006,Qa)|0;if(c[(c[Qb>>2]|0)+8+64>>2]|0)g[Ja>>2]=0.0;Za=c[ib>>2]|0;c[Ra>>2]=~~+g[Ja>>2];Wa(Za,10002,Ra)|0;if((c[(c[Qb>>2]|0)+14320>>2]|0)==1001){c[Xa>>2]=(wi(Fb)|0)+7>>3;if(c[Ib>>2]|0)c[Xa>>2]=(c[Xa>>2]|0)+((c[(c[Qb>>2]|0)+14320>>2]|0)==1001?3:1);q=c[Xa>>2]|0;m=c[Va>>2]|0;if(c[(c[Qb>>2]|0)+136>>2]|0){Za=N(c[(c[Qb>>2]|0)+8+28>>2]|0,c[Gb>>2]|0)|0;c[pb>>2]=q+m-((Za|0)/(c[(c[Qb>>2]|0)+132>>2]<<3|0)|0);break}else{c[pb>>2]=(q|0)>(m|0)?c[Xa>>2]|0:c[Va>>2]|0;break}}if(!(c[(c[Qb>>2]|0)+136>>2]|0)){c[pb>>2]=c[Va>>2];break}c[Ia>>2]=0;do if((c[(c[Qb>>2]|0)+144>>2]|0)==5010){if((c[Gb>>2]|0)==((c[(c[Qb>>2]|0)+132>>2]|0)/50|0|0))break;c[Ia>>2]=N(((c[(c[Qb>>2]|0)+14288>>2]|0)*60|0)+40|0,((c[(c[Qb>>2]|0)+132>>2]|0)/(c[Gb>>2]|0)|0)-50|0)|0;if(!(c[hb>>2]|0))break;c[Ia>>2]=~~(+(c[Ia>>2]|0)*(+g[hb+4>>2]*.5+1.0))}while(0);Za=c[ib>>2]|0;c[Sa>>2]=1;Wa(Za,4006,Sa)|0;Za=c[ib>>2]|0;c[Ta>>2]=c[(c[Qb>>2]|0)+140>>2];Wa(Za,4020,Ta)|0;Za=c[ib>>2]|0;c[Ua>>2]=(c[(c[Qb>>2]|0)+148>>2]|0)+(c[Ia>>2]|0);Wa(Za,4002,Ua)|0;c[pb>>2]=(c[Hb>>2]|0)-1-(c[Jb>>2]|0)}else c[pb>>2]=0;while(0);Za=((N(c[(c[Qb>>2]|0)+100>>2]|0,c[(c[Qb>>2]|0)+132>>2]|0)|0)/400|0)<<2;m=l;l=l+((1*Za|0)+15&-16)|0;do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1e3){if((c[(c[Qb>>2]|0)+14320>>2]|0)==(c[(c[Qb>>2]|0)+14324>>2]|0))break;if((c[(c[Qb>>2]|0)+14324>>2]|0)<=0)break;Xa=(c[Qb>>2]|0)+14372+((N((c[(c[Qb>>2]|0)+160>>2]|0)-(c[ab>>2]|0)-((c[(c[Qb>>2]|0)+132>>2]|0)/400|0)|0,c[(c[Qb>>2]|0)+100>>2]|0)|0)<<2)|0;Za=((N(c[(c[Qb>>2]|0)+100>>2]|0,c[(c[Qb>>2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(16384<((0>((c[$a>>2]|0)-3e4|0)?0:(c[$a>>2]|0)-3e4|0)<<1|0))q=16384;else q=(0>((c[$a>>2]|0)-3e4|0)?0:(c[$a>>2]|0)-3e4|0)<<1;c[(c[Qb>>2]|0)+8+80>>2]=q}do if(!(c[(c[Qb>>2]|0)+14348>>2]|0)){if((c[(c[Qb>>2]|0)+100>>2]|0)!=2)break;if((b[(c[Qb>>2]|0)+14292>>1]|0)>=16384?(c[(c[Qb>>2]|0)+8+80>>2]|0)>=16384:0)break;g[cb>>2]=+(b[(c[Qb>>2]|0)+14292>>1]|0);g[db>>2]=+(c[(c[Qb>>2]|0)+8+80>>2]|0);g[cb>>2]=+g[cb>>2]*.00006103515625;g[db>>2]=+g[db>>2]*.00006103515625;xi(o,o,+g[cb>>2],+g[db>>2],c[(c[bb>>2]|0)+4>>2]|0,c[Gb>>2]|0,c[(c[Qb>>2]|0)+100>>2]|0,c[(c[bb>>2]|0)+60>>2]|0,c[(c[Qb>>2]|0)+132>>2]|0);b[(c[Qb>>2]|0)+14292>>1]=c[(c[Qb>>2]|0)+8+80>>2]}while(0);do if((c[(c[Qb>>2]|0)+14320>>2]|0)!=1002){db=(wi(Fb)|0)+17|0;if((db+(((c[(c[Qb>>2]|0)+14320>>2]|0)==1001&1)*20|0)|0)>((c[Hb>>2]|0)-1<<3|0)){Eb=383;break}do if((c[(c[Qb>>2]|0)+14320>>2]|0)==1001){if((c[Ib>>2]|0)==0?(db=(wi(Fb)|0)+37|0,(db|0)>(c[pb>>2]<<3|0)):0)break;_b(Fb,c[Ib>>2]|0,12)}while(0);if(!(c[Ib>>2]|0))break;_b(Fb,c[jb>>2]|0,1);q=(c[Hb>>2]|0)-1|0;if((c[(c[Qb>>2]|0)+14320>>2]|0)==1001)c[eb>>2]=q-(c[pb>>2]|0);else c[eb>>2]=q-((wi(Fb)|0)+7>>3);if((c[eb>>2]|0)<((c[(c[Qb>>2]|0)+148>>2]|0)/1600|0|0))q=c[eb>>2]|0;else q=(c[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>2];if(!(c[(c[Qb>>2]|0)+14336>>2]|0))q=1101;else q=c[(c[Qb>>2]|0)+14336>>2]|0;c[A>>2]=q;if(!(c[C>>2]|0))c[C>>2]=1e3;if((c[Da>>2]|0)>100)c[C>>2]=1002;if((c[Da>>2]|0)<50)c[C>>2]=1e3;do if(!((c[C>>2]|0)==1e3&(c[A>>2]|0)>1103)){if((c[C>>2]|0)==1002&(c[A>>2]|0)==1102){c[A>>2]=1101;break}if((c[A>>2]|0)<=1104)c[A>>2]=1104}else c[A>>2]=1103;while(0);Qb=qi(c[C>>2]|0,c[Da>>2]|0,c[A>>2]|0,c[(c[Qb>>2]|0)+14288>>2]|0)|0;a[c[Ob>>2]>>0]=Qb;c[Pb>>2]=1;Qb=c[Pb>>2]|0;l=Rb;return Qb|0}c[Pb>>2]=-1;Qb=c[Pb>>2]|0;l=Rb;return Qb|0}function pi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;g=i+12|0;h=i+8|0;e=i+4|0;f=i;c[h>>2]=a;c[e>>2]=b;c[f>>2]=d;if(!(c[e>>2]|0))c[e>>2]=(c[(c[h>>2]|0)+132>>2]|0)/400|0;b=c[h>>2]|0;if((c[(c[h>>2]|0)+152>>2]|0)==-1e3){c[g>>2]=(((c[b+132>>2]|0)*60|0)/(c[e>>2]|0)|0)+(N(c[(c[h>>2]|0)+132>>2]|0,c[(c[h>>2]|0)+100>>2]|0)|0);h=c[g>>2]|0;l=i;return h|0}if((c[b+152>>2]|0)==-1){h=N(c[f>>2]<<3,c[(c[h>>2]|0)+132>>2]|0)|0;c[g>>2]=(h|0)/(c[e>>2]|0)|0;h=c[g>>2]|0;l=i;return h|0}else{c[g>>2]=c[(c[h>>2]|0)+152>>2];h=c[g>>2]|0;l=i;return h|0}return 0}function qi(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;k=p+20|0;j=p+16|0;h=p+12|0;i=p+8|0;m=p+4|0;o=p+24|0;n=p;c[k>>2]=b;c[j>>2]=e;c[h>>2]=f;c[i>>2]=g;c[m>>2]=0;while(1){if((c[j>>2]|0)>=400)break;c[j>>2]=c[j>>2]<<1;c[m>>2]=(c[m>>2]|0)+1}do if((c[k>>2]|0)!=1e3)if((c[k>>2]|0)==1002){k=(c[h>>2]|0)-1102|0;c[n>>2]=k;c[n>>2]=(c[n>>2]|0)<0?0:k;a[o>>0]=-128;a[o>>0]=d[o>>0]|0|c[n>>2]<<5;a[o>>0]=d[o>>0]|0|c[m>>2]<<3;break}else{a[o>>0]=96;a[o>>0]=d[o>>0]|0|(c[h>>2]|0)-1104<<4;a[o>>0]=d[o>>0]|0|(c[m>>2]|0)-2<<3;break}else{a[o>>0]=(c[h>>2]|0)-1101<<5;a[o>>0]=d[o>>0]|0|(c[m>>2]|0)-2<<3}while(0);a[o>>0]=d[o>>0]|0|((c[i>>2]|0)==2&1)<<2;l=p;return a[o>>0]|0}function ri(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;q=l;l=l+64|0;n=q+60|0;v=q+56|0;p=q+52|0;m=q+48|0;o=q+44|0;k=q+40|0;u=q+36|0;j=q+24|0;i=q+16|0;s=q+8|0;t=q+4|0;r=q;c[n>>2]=a;c[v>>2]=b;c[p>>2]=d;c[m>>2]=e;c[o>>2]=f;c[k>>2]=g;c[u>>2]=h;c[s>>2]=(((c[v>>2]&65535)<<16>>16)*2471|0)/((c[u>>2]|0)/1e3|0|0)|0;c[t>>2]=268435456-((c[s>>2]|0)*471|0);c[j>>2]=c[t>>2];c[j+4>>2]=0-(c[t>>2]|0)<<1;c[j+8>>2]=c[t>>2];c[r>>2]=c[t>>2]>>6;d=N(c[s>>2]>>16,(c[s>>2]&65535)<<16>>16)|0;d=d+((N(c[s>>2]&65535,(c[s>>2]&65535)<<16>>16)|0)>>16)|0;d=N(c[r>>2]>>16,(d+(N(c[s>>2]|0,(c[s>>2]>>15)+1>>1)|0)-8388608&65535)<<16>>16)|0;f=N(c[s>>2]>>16,(c[s>>2]&65535)<<16>>16)|0;f=f+((N(c[s>>2]&65535,(c[s>>2]&65535)<<16>>16)|0)>>16)|0;f=d+((N(c[r>>2]&65535,(f+(N(c[s>>2]|0,(c[s>>2]>>15)+1>>1)|0)-8388608&65535)<<16>>16)|0)>>16)|0;d=N(c[s>>2]>>16,(c[s>>2]&65535)<<16>>16)|0;d=d+((N(c[s>>2]&65535,(c[s>>2]&65535)<<16>>16)|0)>>16)|0;c[i>>2]=f+(N(c[r>>2]|0,(d+(N(c[s>>2]|0,(c[s>>2]>>15)+1>>1)|0)-8388608>>15)+1>>1)|0);d=N(c[r>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;d=d+((N(c[r>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16)|0;c[i+4>>2]=d+(N(c[r>>2]|0,(c[r>>2]>>15)+1>>1)|0);yi(c[n>>2]|0,j,i,c[m>>2]|0,c[p>>2]|0,c[o>>2]|0,c[k>>2]|0);if((c[k>>2]|0)!=2){l=q;return}yi((c[n>>2]|0)+4|0,j,i,(c[m>>2]|0)+8|0,(c[p>>2]|0)+4|0,c[o>>2]|0,c[k>>2]|0);l=q;return}function si(a,b,d,e,f,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;v=l;l=l+64|0;p=v+48|0;x=v+44|0;r=v+40|0;n=v+36|0;q=v+32|0;k=v+28|0;w=v+24|0;j=v+20|0;o=v+16|0;m=v+12|0;t=v+8|0;s=v+4|0;u=v;c[p>>2]=a;c[x>>2]=b;c[r>>2]=d;c[n>>2]=e;c[q>>2]=f;c[k>>2]=h;c[w>>2]=i;g[m>>2]=+(c[x>>2]|0)*4.0/+(c[w>>2]|0);c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[k>>2]|0))break;c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[q>>2]|0))break;x=N(c[k>>2]|0,c[o>>2]|0)|0;g[t>>2]=+g[(c[p>>2]|0)+(x+(c[j>>2]|0)<<2)>>2];g[s>>2]=+g[t>>2]-+g[(c[n>>2]|0)+(c[j>>2]<<1<<2)>>2];g[(c[n>>2]|0)+(c[j>>2]<<1<<2)>>2]=+g[(c[n>>2]|0)+(c[j>>2]<<1<<2)>>2]+ +g[m>>2]*(+g[t>>2]-+g[(c[n>>2]|0)+(c[j>>2]<<1<<2)>>2])+1.0000000031710769e-30;g[u>>2]=+g[s>>2]-+g[(c[n>>2]|0)+((c[j>>2]<<1)+1<<2)>>2];g[(c[n>>2]|0)+((c[j>>2]<<1)+1<<2)>>2]=+g[(c[n>>2]|0)+((c[j>>2]<<1)+1<<2)>>2]+ +g[m>>2]*(+g[s>>2]-+g[(c[n>>2]|0)+((c[j>>2]<<1)+1<<2)>>2])+1.0000000031710769e-30;x=N(c[k>>2]|0,c[o>>2]|0)|0;g[(c[r>>2]|0)+(x+(c[j>>2]|0)<<2)>>2]=+g[u>>2];c[o>>2]=(c[o>>2]|0)+1}c[j>>2]=(c[j>>2]|0)+1}l=v;return}function ti(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;i=m+16|0;k=m+12|0;f=m+8|0;h=m+4|0;j=m;c[i>>2]=a;c[k>>2]=b;c[f>>2]=d;g[j>>2]=0.0;c[h>>2]=0;while(1){e=+g[j>>2];if((c[h>>2]|0)>=(c[f>>2]|0))break;g[j>>2]=e+ +g[(c[i>>2]|0)+(c[h>>2]<<2)>>2]*+g[(c[k>>2]|0)+(c[h>>2]<<2)>>2];c[h>>2]=(c[h>>2]|0)+1}l=m;return +e}function ui(a,b,d,e,f,h,i,j,k){a=a|0;b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<<2)>>2]=+g[r>>2]*+g[(c[u>>2]|0)+((c[t>>2]<<1)+1<<2)>>2];c[t>>2]=(c[t>>2]|0)+1}while(0);c[m>>2]=0;do{c[t>>2]=c[x>>2];while(1){if((c[t>>2]|0)>=(c[o>>2]|0))break;C=N(c[t>>2]|0,c[n>>2]|0)|0;D=N(c[t>>2]|0,c[n>>2]|0)|0;g[(c[w>>2]|0)+(D+(c[m>>2]|0)<<2)>>2]=+g[s>>2]*+g[(c[u>>2]|0)+(C+(c[m>>2]|0)<<2)>>2];c[t>>2]=(c[t>>2]|0)+1}D=(c[m>>2]|0)+1|0;c[m>>2]=D}while((D|0)<(c[n>>2]|0));l=B;return}function vi(a){a=+a;var b=0,c=0;c=l;l=l+16|0;b=c;g[b>>2]=a;g[b>>2]=+g[b>>2]*32768.0;g[b>>2]=+g[b>>2]>-32768.0?+g[b>>2]:-32768.0;g[b>>2]=+g[b>>2]<32767.0?+g[b>>2]:32767.0;b=(Ui(+g[b>>2])|0)&65535;l=c;return b|0}function wi(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[(c[d>>2]|0)+20>>2]|0)-(32-(Q(c[(c[d>>2]|0)+28>>2]|0)|0))|0;l=b;return a|0}function xi(a,b,d,e,f,h,i,j,k){a=a|0;b=b|0;d=+d;e=+e;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;A=l;l=l+64|0;u=A+60|0;w=A+56|0;r=A+52|0;s=A+48|0;B=A+44|0;p=A+40|0;m=A+36|0;z=A+32|0;C=A+28|0;t=A+24|0;x=A+20|0;v=A+16|0;n=A+12|0;q=A+8|0;y=A+4|0;o=A;c[u>>2]=a;c[w>>2]=b;g[r>>2]=d;g[s>>2]=e;c[B>>2]=f;c[p>>2]=h;c[m>>2]=i;c[z>>2]=j;c[C>>2]=k;c[v>>2]=48e3/(c[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N(c[t>>2]|0,c[m>>2]|0)|0)+1<<2)>>2]=e+ +g[o>>2];c[t>>2]=(c[t>>2]|0)+1}l=A;return}function yi(a,b,d,e,f,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;u=l;l=l+64|0;n=u+60|0;v=u+56|0;w=u+52|0;m=u+48|0;r=u+44|0;q=u+40|0;s=u+36|0;p=u+32|0;t=u+28|0;o=u+24|0;j=u+16|0;k=u;c[n>>2]=a;c[v>>2]=b;c[w>>2]=d;c[m>>2]=e;c[r>>2]=f;c[q>>2]=h;c[s>>2]=i;g[j>>2]=+(c[c[w>>2]>>2]|0)*3.725290298461914e-09;g[j+4>>2]=+(c[(c[w>>2]|0)+4>>2]|0)*3.725290298461914e-09;g[k>>2]=+(c[c[v>>2]>>2]|0)*3.725290298461914e-09;g[k+4>>2]=+(c[(c[v>>2]|0)+4>>2]|0)*3.725290298461914e-09;g[k+8>>2]=+(c[(c[v>>2]|0)+8>>2]|0)*3.725290298461914e-09;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[q>>2]|0))break;g[o>>2]=+g[(c[n>>2]|0)+((N(c[p>>2]|0,c[s>>2]|0)|0)<<2)>>2];g[t>>2]=+g[c[m>>2]>>2]+ +g[k>>2]*+g[o>>2];g[c[m>>2]>>2]=+g[(c[m>>2]|0)+4>>2]-+g[t>>2]*+g[j>>2]+ +g[k+4>>2]*+g[o>>2];g[(c[m>>2]|0)+4>>2]=-+g[t>>2]*+g[j+4>>2]+ +g[k+8>>2]*+g[o>>2]+1.0000000031710769e-30;g[(c[r>>2]|0)+((N(c[p>>2]|0,c[s>>2]|0)|0)<<2)>>2]=+g[t>>2];c[p>>2]=(c[p>>2]|0)+1}l=u;return}function zi(a,d,e,f,h){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,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|0):0)break;c[(c[Ra>>2]|0)+96>>2]=c[m>>2];f=95;break a}while(0);c[Sa>>2]=-1;f=95;break}case 4001:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ea>>2]=Va;c[n>>2]=c[ea>>2];if(c[n>>2]|0){c[c[n>>2]>>2]=c[(c[Ra>>2]|0)+96>>2];f=95}else f=96;break}case 4002:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[na>>2]=Va;c[u>>2]=c[na>>2];do if((c[u>>2]|0)!=-1e3&(c[u>>2]|0)!=-1){if((c[u>>2]|0)<=0){f=96;break a}if((c[u>>2]|0)<=500){c[u>>2]=500;break}if((c[u>>2]|0)>((c[(c[Ra>>2]|0)+100>>2]|0)*3e5|0))c[u>>2]=(c[(c[Ra>>2]|0)+100>>2]|0)*3e5}while(0);c[(c[Ra>>2]|0)+152>>2]=c[u>>2];f=95;break}case 4003:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ga>>2]=Va;c[O>>2]=c[Ga>>2];if(c[O>>2]|0){f=pi(c[Ra>>2]|0,c[(c[Ra>>2]|0)+14332>>2]|0,1276)|0;c[c[O>>2]>>2]=f;f=95}else f=96;break}case 4022:{Pa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Pa>>2]|0;c[f>>2]=Pa+4;c[La>>2]=Va;c[Qa>>2]=c[La>>2];f=c[Qa>>2]|0;if((c[Qa>>2]|0)<1){if((f|0)!=-1e3){f=96;break a}}else if((c[Qa>>2]|0)!=-1e3?(f|0)>(c[(c[Ra>>2]|0)+100>>2]|0):0){f=96;break a}c[(c[Ra>>2]|0)+108>>2]=c[Qa>>2];f=95;break}case 4023:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ma>>2]=Va;c[U>>2]=c[Ma>>2];if(c[U>>2]|0){c[c[U>>2]>>2]=c[(c[Ra>>2]|0)+108>>2];f=95}else f=96;break}case 4004:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Na>>2]=Va;c[V>>2]=c[Na>>2];if(!((c[V>>2]|0)<1101|(c[V>>2]|0)>1105)){c[(c[Ra>>2]|0)+120>>2]=c[V>>2];f=c[Ra>>2]|0;if((c[(c[Ra>>2]|0)+120>>2]|0)==1101){c[f+8+12>>2]=8e3;f=95;break a}else{c[(c[Ra>>2]|0)+8+12>>2]=(c[f+120>>2]|0)==1102?12e3:16e3;f=95;break a}}else f=96;break}case 4005:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Oa>>2]=Va;c[W>>2]=c[Oa>>2];if(c[W>>2]|0){c[c[W>>2]>>2]=c[(c[Ra>>2]|0)+120>>2];f=95}else f=96;break}case 4008:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Pa>>2]=Va;c[X>>2]=c[Pa>>2];if(!(((c[X>>2]|0)<1101|(c[X>>2]|0)>1105)&(c[X>>2]|0)!=-1e3)){c[(c[Ra>>2]|0)+116>>2]=c[X>>2];f=c[Ra>>2]|0;if((c[(c[Ra>>2]|0)+116>>2]|0)==1101){c[f+8+12>>2]=8e3;f=95;break a}else{c[(c[Ra>>2]|0)+8+12>>2]=(c[f+116>>2]|0)==1102?12e3:16e3;f=95;break a}}else f=96;break}case 4009:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[fa>>2]=Va;c[o>>2]=c[fa>>2];if(c[o>>2]|0){c[c[o>>2]>>2]=c[(c[Ra>>2]|0)+14336>>2];f=95}else f=96;break}case 4016:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ga>>2]=Va;c[p>>2]=c[ga>>2];if((c[p>>2]|0)<0|(c[p>>2]|0)>1)f=96;else{c[(c[Ra>>2]|0)+8+44>>2]=c[p>>2];f=95}break}case 4017:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ha>>2]=Va;c[q>>2]=c[ha>>2];if(c[q>>2]|0){c[c[q>>2]>>2]=c[(c[Ra>>2]|0)+8+44>>2];f=95}else f=96;break}case 4010:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ia>>2]=Va;c[r>>2]=c[ia>>2];if((c[r>>2]|0)<0|(c[r>>2]|0)>10)f=96;else{c[(c[Ra>>2]|0)+8+36>>2]=c[r>>2];f=c[h>>2]|0;c[Y>>2]=c[r>>2];Wa(f,4010,Y)|0;f=95}break}case 4011:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ja>>2]=Va;c[s>>2]=c[ja>>2];if(c[s>>2]|0){c[c[s>>2]>>2]=c[(c[Ra>>2]|0)+8+36>>2];f=95}else f=96;break}case 4012:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ka>>2]=Va;c[t>>2]=c[ka>>2];if((c[t>>2]|0)<0|(c[t>>2]|0)>1)f=96;else{c[(c[Ra>>2]|0)+8+40>>2]=c[t>>2];f=95}break}case 4013:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[la>>2]=Va;c[v>>2]=c[la>>2];if(c[v>>2]|0){c[c[v>>2]>>2]=c[(c[Ra>>2]|0)+8+40>>2];f=95}else f=96;break}case 4014:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ma>>2]=Va;c[w>>2]=c[ma>>2];if((c[w>>2]|0)<0|(c[w>>2]|0)>100)f=96;else{c[(c[Ra>>2]|0)+8+32>>2]=c[w>>2];f=c[h>>2]|0;c[ca>>2]=c[w>>2];Wa(f,4014,ca)|0;f=95}break}case 4015:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[oa>>2]=Va;c[x>>2]=c[oa>>2];if(c[x>>2]|0){c[c[x>>2]>>2]=c[(c[Ra>>2]|0)+8+32>>2];f=95}else f=96;break}case 4006:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[pa>>2]=Va;c[y>>2]=c[pa>>2];if((c[y>>2]|0)<0|(c[y>>2]|0)>1)f=96;else{c[(c[Ra>>2]|0)+136>>2]=c[y>>2];c[(c[Ra>>2]|0)+8+48>>2]=1-(c[y>>2]|0);f=95}break}case 4007:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[qa>>2]=Va;c[z>>2]=c[qa>>2];if(c[z>>2]|0){c[c[z>>2]>>2]=c[(c[Ra>>2]|0)+136>>2];f=95}else f=96;break}case 11018:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ra>>2]=Va;c[A>>2]=c[ra>>2];if((c[A>>2]|0)<-1|(c[A>>2]|0)>100)f=96;else{c[(c[Ra>>2]|0)+128>>2]=c[A>>2];f=95}break}case 11019:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[sa>>2]=Va;c[B>>2]=c[sa>>2];if(c[B>>2]|0){c[c[B>>2]>>2]=c[(c[Ra>>2]|0)+128>>2];f=95}else f=96;break}case 4020:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ta>>2]=Va;c[C>>2]=c[ta>>2];if((c[C>>2]|0)<0|(c[C>>2]|0)>1)f=96;else{c[(c[Ra>>2]|0)+140>>2]=c[C>>2];f=95}break}case 4021:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ua>>2]=Va;c[D>>2]=c[ua>>2];if(c[D>>2]|0){c[c[D>>2]>>2]=c[(c[Ra>>2]|0)+140>>2];f=95}else f=96;break}case 4024:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[va>>2]=Va;c[E>>2]=c[va>>2];if((c[E>>2]|0)!=-1e3&(c[E>>2]|0)!=3001&(c[E>>2]|0)!=3002)f=96;else{c[(c[Ra>>2]|0)+112>>2]=c[E>>2];f=95}break}case 4025:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[wa>>2]=Va;c[F>>2]=c[wa>>2];if(c[F>>2]|0){c[c[F>>2]>>2]=c[(c[Ra>>2]|0)+112>>2];f=95}else f=96;break}case 4027:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[xa>>2]=Va;c[G>>2]=c[xa>>2];if(c[G>>2]|0){c[c[G>>2]>>2]=(c[(c[Ra>>2]|0)+132>>2]|0)/400|0;if((c[(c[Ra>>2]|0)+96>>2]|0)!=2051){f=c[G>>2]|0;c[f>>2]=(c[f>>2]|0)+(c[(c[Ra>>2]|0)+104>>2]|0);f=95}else f=95}else f=96;break}case 4029:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[ya>>2]=Va;c[H>>2]=c[ya>>2];if(c[H>>2]|0){c[c[H>>2]>>2]=c[(c[Ra>>2]|0)+132>>2];f=95}else f=96;break}case 4031:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[za>>2]=Va;c[I>>2]=c[za>>2];if(c[I>>2]|0){c[c[I>>2]>>2]=c[(c[Ra>>2]|0)+18216>>2];f=95}else f=96;break}case 4036:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Aa>>2]=Va;c[J>>2]=c[Aa>>2];if((c[J>>2]|0)<8|(c[J>>2]|0)>24)f=96;else{c[(c[Ra>>2]|0)+156>>2]=c[J>>2];f=95}break}case 4037:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ba>>2]=Va;c[K>>2]=c[Ba>>2];if(c[K>>2]|0){c[c[K>>2]>>2]=c[(c[Ra>>2]|0)+156>>2];f=95}else f=96;break}case 4040:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ca>>2]=Va;c[L>>2]=c[Ca>>2];if((c[L>>2]|0)!=5e3&(c[L>>2]|0)!=5001&(c[L>>2]|0)!=5002&(c[L>>2]|0)!=5003&(c[L>>2]|0)!=5004&(c[L>>2]|0)!=5005&(c[L>>2]|0)!=5006&(c[L>>2]|0)!=5010)f=96;else{c[(c[Ra>>2]|0)+144>>2]=c[L>>2];f=c[h>>2]|0;c[Z>>2]=c[L>>2];Wa(f,4040,Z)|0;f=95}break}case 4041:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Da>>2]=Va;c[M>>2]=c[Da>>2];if(c[M>>2]|0){c[c[M>>2]>>2]=c[(c[Ra>>2]|0)+144>>2];f=95}else f=96;break}case 4042:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Qa>>2]|0;c[f>>2]=Qa+4;c[Ea>>2]=Va;c[N>>2]=c[Ea>>2];if((c[N>>2]|0)>1|(c[N>>2]|0)<0)f=96;else{c[(c[Ra>>2]|0)+8+64>>2]=c[N>>2];f=95}break}case 4043:{Qa=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[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)+14348>>2]=c[S>>2];f=c[h>>2]|0;c[aa>>2]=(c[S>>2]|0)+((((c[S>>2]|0)-(c[S>>2]|0)|0)/4|0)<<2);c[Sa>>2]=Wa(f,10026,aa)|0;f=95;break}case 10015:{Ra=(c[f>>2]|0)+(4-1)&~(4-1);Va=c[Ra>>2]|0;c[f>>2]=Ra+4;c[Ka>>2]=Va;c[T>>2]=c[Ka>>2];if(c[T>>2]|0){f=c[h>>2]|0;c[ba>>2]=(c[T>>2]|0)+((((c[T>>2]|0)-(c[T>>2]|0)|0)/4|0)<<2);c[Sa>>2]=Wa(f,10015,ba)|0;f=95}else f=96;break}default:{c[Sa>>2]=-5;f=95}}while(0);if((f|0)==95){c[Ta>>2]=c[Sa>>2];Va=c[Ta>>2]|0;l=Ua;return Va|0}else if((f|0)==96){c[Ta>>2]=-1;Va=c[Ta>>2]|0;l=Ua;return Va|0}return 0}function Ci(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;c[(c[b>>2]|0)+4>>2]=0;l=d;return c[b>>2]|0}function Di(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;a=Ei(c[h>>2]|0,c[g>>2]|0,c[f>>2]|0,0)|0;l=e;return a|0}function Ei(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;m=q+24|0;n=q+20|0;i=q+16|0;j=q+12|0;o=q+8|0;p=q+28|0;h=q+4|0;k=q;c[n>>2]=b;c[i>>2]=e;c[j>>2]=f;c[o>>2]=g;if((c[j>>2]|0)<1){c[m>>2]=-4;p=c[m>>2]|0;l=q;return p|0}if(c[(c[n>>2]|0)+4>>2]|0){if(((d[c[n>>2]>>0]|0)&252|0)!=((d[c[i>>2]>>0]|0)&252|0)){c[m>>2]=-4;p=c[m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u>>2]=(c[p>>2]|0)+200+(c[m>>2]<<1);c[s>>2]=(c[p>>2]|0)+8+(c[m>>2]<<2);if(c[C>>2]|0)c[D>>2]=1+((b[(c[u>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0)>=252&1);else c[D>>2]=0;c[z>>2]=c[r>>2];do if((c[q>>2]|0)!=1){if((c[q>>2]|0)==2){f=b[c[u>>2]>>1]|0;if((b[(c[u>>2]|0)+2>>1]|0)==(b[c[u>>2]>>1]|0)){c[D>>2]=(c[D>>2]|0)+((f<<1)+1);if((c[D>>2]|0)<=(c[v>>2]|0)){e=(d[c[p>>2]>>0]&252|1)&255;j=c[z>>2]|0;c[z>>2]=j+1;a[j>>0]=e;break}c[A>>2]=-2;E=c[A>>2]|0;l=F;return E|0}else{c[D>>2]=(c[D>>2]|0)+(f+(b[(c[u>>2]|0)+2>>1]|0)+2+((b[c[u>>2]>>1]|0)>=252&1));if((c[D>>2]|0)<=(c[v>>2]|0)){e=(d[c[p>>2]>>0]&252|2)&255;j=c[z>>2]|0;c[z>>2]=j+1;a[j>>0]=e;j=Hh(b[c[u>>2]>>1]|0,c[z>>2]|0)|0;c[z>>2]=(c[z>>2]|0)+j;break}c[A>>2]=-2;E=c[A>>2]|0;l=F;return E|0}}}else{c[D>>2]=(c[D>>2]|0)+((b[c[u>>2]>>1]|0)+1);if((c[D>>2]|0)<=(c[v>>2]|0)){e=d[c[p>>2]>>0]&252;j=c[z>>2]|0;c[z>>2]=j+1;a[j>>0]=e;break}c[A>>2]=-2;E=c[A>>2]|0;l=F;return E|0}while(0);if((c[q>>2]|0)<=2){if(c[x>>2]|0?(c[D>>2]|0)<(c[v>>2]|0):0)o=23}else o=23;a:do if((o|0)==23){c[y>>2]=0;c[z>>2]=c[r>>2];if(c[C>>2]|0)c[D>>2]=1+((b[(c[u>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0)>=252&1);else c[D>>2]=0;c[E>>2]=0;c[t>>2]=1;while(1){if((c[t>>2]|0)>=(c[q>>2]|0))break;if((b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]|0)!=(b[c[u>>2]>>1]|0)){o=29;break}c[t>>2]=(c[t>>2]|0)+1}if((o|0)==29)c[E>>2]=1;do if(c[E>>2]|0){c[D>>2]=(c[D>>2]|0)+2;c[t>>2]=0;while(1){f=c[u>>2]|0;if((c[t>>2]|0)>=((c[q>>2]|0)-1|0))break;c[D>>2]=(c[D>>2]|0)+(1+((b[f+(c[t>>2]<<1)>>1]|0)>=252&1)+(b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]|0));c[t>>2]=(c[t>>2]|0)+1}c[D>>2]=(c[D>>2]|0)+(b[f+((c[q>>2]|0)-1<<1)>>1]|0);if((c[D>>2]|0)<=(c[v>>2]|0)){p=(d[c[p>>2]>>0]&252|3)&255;o=c[z>>2]|0;c[z>>2]=o+1;a[o>>0]=p;o=(c[q>>2]|128)&255;p=c[z>>2]|0;c[z>>2]=p+1;a[p>>0]=o;break}c[A>>2]=-2;E=c[A>>2]|0;l=F;return E|0}else{o=(N(c[q>>2]|0,b[c[u>>2]>>1]|0)|0)+2|0;c[D>>2]=(c[D>>2]|0)+o;if((c[D>>2]|0)<=(c[v>>2]|0)){p=(d[c[p>>2]>>0]&252|3)&255;o=c[z>>2]|0;c[z>>2]=o+1;a[o>>0]=p;o=c[q>>2]&255;p=c[z>>2]|0;c[z>>2]=p+1;a[p>>0]=o;break}c[A>>2]=-2;E=c[A>>2]|0;l=F;return E|0}while(0);if(c[x>>2]|0)f=(c[v>>2]|0)-(c[D>>2]|0)|0;else f=0;c[y>>2]=f;if(c[y>>2]|0){p=(c[r>>2]|0)+1|0;a[p>>0]=d[p>>0]|64;c[w>>2]=((c[y>>2]|0)-1|0)/255|0;c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[w>>2]|0))break;p=c[z>>2]|0;c[z>>2]=p+1;a[p>>0]=-1;c[t>>2]=(c[t>>2]|0)+1}p=(c[y>>2]|0)-((c[w>>2]|0)*255|0)-1&255;w=c[z>>2]|0;c[z>>2]=w+1;a[w>>0]=p;c[D>>2]=(c[D>>2]|0)+(c[y>>2]|0)}if(c[E>>2]|0){c[t>>2]=0;while(1){if((c[t>>2]|0)>=((c[q>>2]|0)-1|0))break a;E=Hh(b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]|0,c[z>>2]|0)|0;c[z>>2]=(c[z>>2]|0)+E;c[t>>2]=(c[t>>2]|0)+1}}}while(0);if(c[C>>2]|0){c[B>>2]=Hh(b[(c[u>>2]|0)+((c[q>>2]|0)-1<<1)>>1]|0,c[z>>2]|0)|0;c[z>>2]=(c[z>>2]|0)+(c[B>>2]|0)}c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[q>>2]|0))break;$i(c[z>>2]|0,c[(c[s>>2]|0)+(c[t>>2]<<2)>>2]|0,(b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]|0)+0|0)|0;c[z>>2]=(c[z>>2]|0)+(b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]|0);c[t>>2]=(c[t>>2]|0)+1}b:do if(c[x>>2]|0)while(1){if((c[z>>2]|0)>>>0>=((c[r>>2]|0)+(c[v>>2]|0)|0)>>>0)break b;E=c[z>>2]|0;c[z>>2]=E+1;a[E>>0]=0}while(0);c[A>>2]=c[D>>2];E=c[A>>2]|0;l=F;return E|0}c[A>>2]=-1;E=c[A>>2]|0;l=F;return E|0}function Gi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+320|0;i=k+316|0;e=k+312|0;f=k+308|0;g=k+304|0;j=k+4|0;h=k;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if((c[f>>2]|0)<1){c[i>>2]=-1;j=c[i>>2]|0;l=k;return j|0}if((c[f>>2]|0)==(c[g>>2]|0)){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}if((c[f>>2]|0)>(c[g>>2]|0)){c[i>>2]=-1;j=c[i>>2]|0;l=k;return j|0}Ci(j)|0;$i((c[e>>2]|0)+(c[g>>2]|0)+(0-(c[f>>2]|0))|0,c[e>>2]|0,(c[f>>2]|0)+0|0)|0;Di(j,(c[e>>2]|0)+(c[g>>2]|0)+(0-(c[f>>2]|0))|0,c[f>>2]|0)|0;c[h>>2]=Fi(j,0,c[j+4>>2]|0,c[e>>2]|0,c[g>>2]|0,0,1)|0;if((c[h>>2]|0)>0){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}else{c[i>>2]=c[h>>2];j=c[i>>2]|0;l=k;return j|0}return 0}function Hi(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=Ii()|0;c[c[d>>2]>>2]=a;Ji(c[d>>2]|0);l=b;return}function Ii(){return 0}function Ji(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=(c[d>>2]|0)+4;aj(c[e>>2]|0,0,14116-((c[e>>2]|0)-(c[d>>2]|0))|0)|0;l=b;return}function Ki(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n+24|0;j=n+20|0;e=n+16|0;f=n+12|0;h=n+8|0;k=n+4|0;i=n;c[m>>2]=a;c[j>>2]=b;c[e>>2]=d;c[f>>2]=c[(c[m>>2]|0)+8508>>2];c[h>>2]=(c[(c[m>>2]|0)+8504>>2]|0)-(c[(c[m>>2]|0)+8508>>2]|0);if((c[h>>2]|0)<0)c[h>>2]=(c[h>>2]|0)+200;if((c[e>>2]|0)>480?(c[f>>2]|0)!=(c[(c[m>>2]|0)+8504>>2]|0):0){a=(c[f>>2]|0)+1|0;c[f>>2]=a;c[f>>2]=(c[f>>2]|0)==200?0:a}if((c[f>>2]|0)==(c[(c[m>>2]|0)+8504>>2]|0))c[f>>2]=(c[f>>2]|0)+-1;if((c[f>>2]|0)<0)c[f>>2]=199;_i(c[j>>2]|0,(c[m>>2]|0)+8516+((c[f>>2]|0)*28|0)|0,28|0)|0;b=(c[e>>2]|0)/120|0;d=(c[m>>2]|0)+8512|0;while(1){c[d>>2]=(c[d>>2]|0)+b;b=c[m>>2]|0;if((c[(c[m>>2]|0)+8512>>2]|0)<4)break;b=b+8512|0;c[b>>2]=(c[b>>2]|0)-4;b=1;d=(c[m>>2]|0)+8508|0}if((c[b+8508>>2]|0)>=200){a=(c[m>>2]|0)+8508|0;c[a>>2]=(c[a>>2]|0)-200}c[h>>2]=((c[h>>2]|0)-10|0)>0?(c[h>>2]|0)-10|0:0;g[k>>2]=0.0;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(200-(c[h>>2]|0)|0))break;g[k>>2]=+g[k>>2]+ +g[(c[m>>2]|0)+7688+(c[i>>2]<<2)>>2];c[i>>2]=(c[i>>2]|0)+1}while(1){if((c[i>>2]|0)>=200)break;g[k>>2]=+g[k>>2]+ +g[(c[m>>2]|0)+6888+(c[i>>2]<<2)>>2];c[i>>2]=(c[i>>2]|0)+1}g[k>>2]=+g[k>>2]*+g[(c[m>>2]|0)+8492>>2]+(1.0-+g[k>>2])*+g[(c[m>>2]|0)+8488>>2];g[(c[j>>2]|0)+20>>2]=+g[k>>2];l=n;return}function Li(a,b,d,e,f,g,h,i,j,k,m,n){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;C=l;l=l+64|0;q=C+52|0;w=C+48|0;t=C+44|0;r=C+40|0;y=C+36|0;u=C+32|0;v=C+28|0;p=C+24|0;o=C+20|0;z=C+16|0;x=C+12|0;s=C+8|0;A=C+4|0;B=C;c[q>>2]=a;c[w>>2]=b;c[t>>2]=d;c[r>>2]=e;c[y>>2]=f;c[u>>2]=g;c[v>>2]=h;c[p>>2]=i;c[o>>2]=j;c[z>>2]=k;c[x>>2]=m;c[s>>2]=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)+(c[sa>>2]<<2)>>2]=+g[W>>2];g[Ua>>2]=+g[Ua>>2]+ +g[aa>>2]/(+g[W>>2]+1.0000000036274937e-15);n=+B(+(+g[W>>2]+1.000000013351432e-10));g[ta>>2]=+g[ta>>2]+n;n=+L(+(+g[W>>2]+1.000000013351432e-10));g[ua+(c[sa>>2]<<2)>>2]=n;if(+g[ua+(c[sa>>2]<<2)>>2]<+g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2]+.009999999776482582)n=+g[ua+(c[sa>>2]<<2)>>2];else n=+g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2]+.009999999776482582;g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2]=n;if(+g[ua+(c[sa>>2]<<2)>>2]>+g[(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)>>2]-.10000000149011612)n=+g[ua+(c[sa>>2]<<2)>>2];else n=+g[(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)>>2]-.10000000149011612;g[(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)>>2]=n;if(+g[(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)>>2]<+g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2]+1.0){V=(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)|0;g[V>>2]=+g[V>>2]+.5;V=(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)|0;g[V>>2]=+g[V>>2]-.5}g[wa>>2]=+g[wa>>2]+(+g[ua+(c[sa>>2]<<2)>>2]-+g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2])/(+g[(c[Wa>>2]|0)+6492+(c[sa>>2]<<2)>>2]+1.0000000036274937e-15-+g[(c[Wa>>2]|0)+6420+(c[sa>>2]<<2)>>2]);g[Y>>2]=0.0;g[X>>2]=0.0;c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=8)break;n=+B(+(+g[(c[Wa>>2]|0)+5844+((c[Fa>>2]|0)*72|0)+(c[sa>>2]<<2)>>2]));g[X>>2]=+g[X>>2]+n;g[Y>>2]=+g[Y>>2]+ +g[(c[Wa>>2]|0)+5844+((c[Fa>>2]|0)*72|0)+(c[sa>>2]<<2)>>2];c[Fa>>2]=(c[Fa>>2]|0)+1}if(.9900000095367432<+g[X>>2]/+B(+(+g[Y>>2]*8.0+1.0e-15)))n=.9900000095367432;else n=+g[X>>2]/+B(+(+g[Y>>2]*8.0+1.0e-15));g[da>>2]=n;g[da>>2]=+g[da>>2]*+g[da>>2];g[da>>2]=+g[da>>2]*+g[da>>2];g[Ba>>2]=+g[Ba>>2]+ +g[da>>2];if(+g[ea>>2]/(+g[W>>2]+1.0000000036274937e-15)>+g[da>>2]*+g[(c[Wa>>2]|0)+5768+(c[sa>>2]<<2)>>2])n=+g[ea>>2]/(+g[W>>2]+1.0000000036274937e-15);else n=+g[da>>2]*+g[(c[Wa>>2]|0)+5768+(c[sa>>2]<<2)>>2];g[Z+(c[sa>>2]<<2)>>2]=n;g[Ca>>2]=+g[Ca>>2]+ +g[Z+(c[sa>>2]<<2)>>2];if((c[sa>>2]|0)>=9)g[Ca>>2]=+g[Ca>>2]-+g[Z+((c[sa>>2]|0)-18+9<<2)>>2];if(+g[va>>2]>(+((c[sa>>2]|0)-18|0)*.029999999329447746+1.0)*+g[Ca>>2])n=+g[va>>2];else n=(+((c[sa>>2]|0)-18|0)*.029999999329447746+1.0)*+g[Ca>>2];g[va>>2]=n;g[Da>>2]=+g[Da>>2]+ +g[Z+(c[sa>>2]<<2)>>2]*+((c[sa>>2]|0)-8|0);g[(c[Wa>>2]|0)+5768+(c[sa>>2]<<2)>>2]=+g[Z+(c[sa>>2]<<2)>>2];c[sa>>2]=(c[sa>>2]|0)+1}if((ga|0)==37){c[c[Va>>2]>>2]=0;l=Xa;return}g[ma>>2]=0.0;c[Ta>>2]=0;g[oa>>2]=0.0;g[pa>>2]=5.699999746866524e-04/+(1<<(0>((c[$>>2]|0)-8|0)?0:(c[$>>2]|0)-8|0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a>>2]|0)+6856>>2]=((c[(c[Wa>>2]|0)+6856>>2]|0)+1|0)%8|0;Da=(c[Wa>>2]|0)+6868|0;c[Da>>2]=(c[Da>>2]|0)+1;g[(c[Va>>2]|0)+4>>2]=+g[Ca>>2];c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=4)break;g[Aa+(c[Fa>>2]<<2)>>2]=(+g[ya+(c[Fa>>2]<<2)>>2]+ +g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+24<<2)>>2])*-.12298999726772308+(+g[(c[Wa>>2]|0)+6648+(c[Fa>>2]<<2)>>2]+ +g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+16<<2)>>2])*.49195000529289246+ +g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+8<<2)>>2]*.6969299912452698-+g[(c[Wa>>2]|0)+6776+(c[Fa>>2]<<2)>>2]*1.4349000453948975;c[Fa>>2]=(c[Fa>>2]|0)+1}c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=4)break;g[(c[Wa>>2]|0)+6776+(c[Fa>>2]<<2)>>2]=(1.0-+g[za>>2])*+g[(c[Wa>>2]|0)+6776+(c[Fa>>2]<<2)>>2]+ +g[za>>2]*+g[ya+(c[Fa>>2]<<2)>>2];c[Fa>>2]=(c[Fa>>2]|0)+1}c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=4)break;g[Aa+(4+(c[Fa>>2]|0)<<2)>>2]=(+g[ya+(c[Fa>>2]<<2)>>2]-+g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+24<<2)>>2])*.6324599981307983+(+g[(c[Wa>>2]|0)+6648+(c[Fa>>2]<<2)>>2]-+g[(c[Wa>>2]|0)+6648+((c[Fa>>2]|0)+16<<2)>>2])*.31622999906539917;c[Fa>>2]=(c[Fa>>2]|0)+1}c[Fa>>2]=0;while(1){if((c[Fa>>2]|0)>=3)break;g[Aa+(8+(c[Fa>>2]|0)<<2)>>2]=(+g[ya+(c[Fa>>2]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>>2]|0)+4>>2];g[Aa+84>>2]=+g[(c[Va>>2]|0)+16>>2];g[Aa+88>>2]=+g[Ba>>2];g[Aa+92>>2]=+g[(c[Va>>2]|0)+8>>2];g[Aa+96>>2]=+g[(c[Wa>>2]|0)+6852>>2];Oi(20616,Aa,Ra);g[Ra>>2]=(+g[Ra>>2]+1.0)*.5;g[Ra>>2]=+g[Ra>>2]*1.2100000381469727*+g[Ra>>2]+.009999999776482582-+C(+(+g[Ra>>2]),10.0)*.23000000417232513;g[Ra+4>>2]=+g[Ra+4>>2]*.5+.5;g[Ra>>2]=+g[Ra+4>>2]*+g[Ra>>2]+(1.0-+g[Ra+4>>2])*.5;g[Pa>>2]=+g[Ra+4>>2]*4.999999873689376e-05;g[Ea>>2]=.05000000074505806;if(.05000000074505806>(.949999988079071<+g[Ra>>2]?.949999988079071:+g[Ra>>2]))n=.05000000074505806;else n=.949999988079071<+g[Ra>>2]?.949999988079071:+g[Ra>>2];g[Ia>>2]=n;if(.949999988079071<+g[(c[Wa>>2]|0)+6844>>2])n=.949999988079071;else n=+g[(c[Wa>>2]|0)+6844>>2];if(!(.05000000074505806>n))if(.949999988079071<+g[(c[Wa>>2]|0)+6844>>2])n=.949999988079071;else n=+g[(c[Wa>>2]|0)+6844>>2];else n=.05000000074505806;g[Ma>>2]=n;n=+A(+(+g[Ia>>2]-+g[Ma>>2]))*.05000000074505806;g[Ea>>2]=n/(+g[Ia>>2]*(1.0-+g[Ma>>2])+ +g[Ma>>2]*(1.0-+g[Ia>>2]))+.009999999776482582;g[Ja>>2]=(1.0-+g[(c[Wa>>2]|0)+6844>>2])*(1.0-+g[Pa>>2])+ +g[(c[Wa>>2]|0)+6844>>2]*+g[Pa>>2];g[Ka>>2]=+g[(c[Wa>>2]|0)+6844>>2]*(1.0-+g[Pa>>2])+(1.0-+g[(c[Wa>>2]|0)+6844>>2])*+g[Pa>>2];n=+C(+(1.0-+g[Ra>>2]),+(+g[Ea>>2]));g[Ja>>2]=+g[Ja>>2]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ra>>2]-+g[(c[Wa>>2]|0)+8488>>2])n=.20000000298023224;else n=+g[Ra>>2]-+g[(c[Wa>>2]|0)+8488>>2];Ra=(c[Wa>>2]|0)+8488|0;g[Ra>>2]=+g[Ra>>2]+ +g[Sa>>2]*n}else{if(!(c[j+8500>>2]|0))g[(c[Wa>>2]|0)+8492>>2]=.8999999761581421;if(c[(c[Wa>>2]|0)+8496>>2]|0)break;g[(c[Wa>>2]|0)+8488>>2]=.10000000149011612}while(0);if((c[(c[Wa>>2]|0)+6860>>2]|0)!=(+g[(c[Wa>>2]|0)+6844>>2]>.5|0))c[(c[Wa>>2]|0)+6864>>2]=0;c[(c[Wa>>2]|0)+6860>>2]=+g[(c[Wa>>2]|0)+6844>>2]>.5&1;c[(c[Va>>2]|0)+24>>2]=c[Ta>>2];g[(c[Va>>2]|0)+12>>2]=+g[Ua>>2];c[c[Va>>2]>>2]=1;l=Xa;return}function Ni(a,b){a=+a;b=+b;var c=0,d=0,e=0,f=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+24|0;i=k+20|0;f=k+16|0;h=k+12|0;j=k+8|0;c=k+4|0;d=k;g[i>>2]=a;g[f>>2]=b;a=+A(+(+g[f>>2]));if(a+ +A(+(+g[i>>2]))<9.999999717180685e-10){g[f>>2]=+g[f>>2]*999999995904.0;g[i>>2]=+g[i>>2]*999999995904.0}g[h>>2]=+g[f>>2]*+g[f>>2];g[j>>2]=+g[i>>2]*+g[i>>2];if(+g[h>>2]<+g[j>>2]){g[c>>2]=(+g[j>>2]+ +g[h>>2]*.6784840226173401)*(+g[j>>2]+ +g[h>>2]*.0859554186463356);if(+g[c>>2]!=0.0){g[e>>2]=-+g[f>>2]*+g[i>>2]*(+g[j>>2]+ +g[h>>2]*.43157973885536194)/+g[c>>2]+(+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866);a=+g[e>>2];l=k;return +a}else{g[e>>2]=+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866;a=+g[e>>2];l=k;return +a}}else{g[d>>2]=(+g[h>>2]+ +g[j>>2]*.6784840226173401)*(+g[h>>2]+ +g[j>>2]*.0859554186463356);if(+g[d>>2]!=0.0){g[e>>2]=+g[f>>2]*+g[i>>2]*(+g[h>>2]+ +g[j>>2]*.43157973885536194)/+g[d>>2]+(+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866)-(+g[f>>2]*+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866);a=+g[e>>2];l=k;return +a}else{g[e>>2]=(+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866)-(+g[f>>2]*+g[i>>2]<0.0?-1.5707963705062866:1.5707963705062866);a=+g[e>>2];l=k;return +a}}return 0.0}function Oi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0;r=l;l=l+448|0;o=r+436|0;f=r+432|0;p=r+428|0;m=r+424|0;k=r+24|0;j=r+16|0;h=r+12|0;i=r+8|0;n=r+4|0;q=r;c[o>>2]=a;c[f>>2]=b;c[p>>2]=d;c[j>>2]=c[(c[o>>2]|0)+8>>2];c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[(c[o>>2]|0)+4>>2]|0)+4>>2]|0))break;d=c[j>>2]|0;c[j>>2]=d+4;g[i>>2]=+g[d>>2];c[h>>2]=0;while(1){e=+g[i>>2];if((c[h>>2]|0)>=(c[c[(c[o>>2]|0)+4>>2]>>2]|0))break;s=+g[(c[f>>2]|0)+(c[h>>2]<<2)>>2];d=c[j>>2]|0;c[j>>2]=d+4;g[i>>2]=e+s*+g[d>>2];c[h>>2]=(c[h>>2]|0)+1}s=+Pi(e);g[k+(c[m>>2]<<2)>>2]=s;c[m>>2]=(c[m>>2]|0)+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[(c[o>>2]|0)+4>>2]|0)+8>>2]|0))break;i=c[j>>2]|0;c[j>>2]=i+4;g[q>>2]=+g[i>>2];c[n>>2]=0;while(1){e=+g[q>>2];if((c[n>>2]|0)>=(c[(c[(c[o>>2]|0)+4>>2]|0)+4>>2]|0))break;s=+g[k+(c[n>>2]<<2)>>2];i=c[j>>2]|0;c[j>>2]=i+4;g[q>>2]=e+s*+g[i>>2];c[n>>2]=(c[n>>2]|0)+1}s=+Pi(e);g[(c[p>>2]|0)+(c[m>>2]<<2)>>2]=s;c[m>>2]=(c[m>>2]|0)+1}l=r;return}function Pi(a){a=+a;var b=0,d=0,e=0,f=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+20|0;h=j+16|0;d=j+12|0;i=j+8|0;b=j+4|0;f=j;g[h>>2]=a;g[f>>2]=1.0;if(!(+g[h>>2]<8.0)){g[e>>2]=1.0;a=+g[e>>2];l=j;return +a}if(!(+g[h>>2]>-8.0)){g[e>>2]=-1.0;a=+g[e>>2];l=j;return +a}if(+g[h>>2]!=+g[h>>2]){g[e>>2]=0.0;a=+g[e>>2];l=j;return +a}if(+g[h>>2]<0.0){g[h>>2]=-+g[h>>2];g[f>>2]=-1.0}c[d>>2]=~~+z(+(+g[h>>2]*25.0+.5));g[h>>2]=+g[h>>2]-+(c[d>>2]|0)*.03999999910593033;g[i>>2]=+g[19812+(c[d>>2]<<2)>>2];g[b>>2]=1.0-+g[i>>2]*+g[i>>2];g[i>>2]=+g[i>>2]+ +g[h>>2]*+g[b>>2]*(1.0-+g[i>>2]*+g[h>>2]);g[e>>2]=+g[f>>2]*+g[i>>2];a=+g[e>>2];l=j;return +a}function Qi(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+16|0;o=x;do if(a>>>0<245){k=a>>>0<11?16:a+11&-8;a=k>>>3;n=c[7631]|0;d=n>>>a;if(d&3|0){e=(d&1^1)+a|0;f=30564+(e<<1<<2)|0;b=f+8|0;a=c[b>>2]|0;g=a+8|0;d=c[g>>2]|0;if((d|0)==(f|0))c[7631]=n&~(1<>2]=f;c[b>>2]=d}w=e<<3;c[a+4>>2]=w|3;w=a+w+4|0;c[w>>2]=c[w>>2]|1;w=g;l=x;return w|0}m=c[7633]|0;if(k>>>0>m>>>0){if(d|0){i=2<>>12&16;d=d>>>i;a=d>>>5&8;d=d>>>a;g=d>>>2&4;d=d>>>g;b=d>>>1&2;d=d>>>b;e=d>>>1&1;e=(a|i|g|b|e)+(d>>>e)|0;d=30564+(e<<1<<2)|0;b=d+8|0;g=c[b>>2]|0;i=g+8|0;a=c[i>>2]|0;if((a|0)==(d|0)){a=n&~(1<>2]=d;c[b>>2]=a;a=n}w=e<<3;h=w-k|0;c[g+4>>2]=k|3;f=g+k|0;c[f+4>>2]=h|1;c[g+w>>2]=h;if(m|0){e=c[7636]|0;b=m>>>3;d=30564+(b<<1<<2)|0;b=1<>2]|0}c[b>>2]=e;c[a+12>>2]=e;c[e+8>>2]=a;c[e+12>>2]=d}c[7633]=h;c[7636]=f;w=i;l=x;return w|0}i=c[7632]|0;if(i){d=(i&0-i)+-1|0;h=d>>>12&16;d=d>>>h;g=d>>>5&8;d=d>>>g;j=d>>>2&4;d=d>>>j;a=d>>>1&2;d=d>>>a;e=d>>>1&1;e=c[30828+((g|h|j|a|e)+(d>>>e)<<2)>>2]|0;d=(c[e+4>>2]&-8)-k|0;a=c[e+16+(((c[e+16>>2]|0)==0&1)<<2)>>2]|0;if(!a){j=d;h=e}else{do{h=(c[a+4>>2]&-8)-k|0;j=h>>>0>>0;d=j?h:d;e=j?a:e;a=c[a+16+(((c[a+16>>2]|0)==0&1)<<2)>>2]|0}while((a|0)!=0);j=d;h=e}g=h+k|0;if(g>>>0>h>>>0){f=c[h+24>>2]|0;b=c[h+12>>2]|0;do if((b|0)==(h|0)){a=h+20|0;b=c[a>>2]|0;if(!b){a=h+16|0;b=c[a>>2]|0;if(!b){d=0;break}}while(1){e=b+20|0;d=c[e>>2]|0;if(d|0){b=d;a=e;continue}e=b+16|0;d=c[e>>2]|0;if(!d)break;else{b=d;a=e}}c[a>>2]=0;d=b}else{d=c[h+8>>2]|0;c[d+12>>2]=b;c[b+8>>2]=d;d=b}while(0);do if(f|0){b=c[h+28>>2]|0;a=30828+(b<<2)|0;if((h|0)==(c[a>>2]|0)){c[a>>2]=d;if(!d){c[7632]=i&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=d;if(!d)break}c[d+24>>2]=f;b=c[h+16>>2]|0;if(b|0){c[d+16>>2]=b;c[b+24>>2]=d}b=c[h+20>>2]|0;if(b|0){c[d+20>>2]=b;c[b+24>>2]=d}}while(0);if(j>>>0<16){w=j+k|0;c[h+4>>2]=w|3;w=h+w+4|0;c[w>>2]=c[w>>2]|1}else{c[h+4>>2]=k|3;c[g+4>>2]=j|1;c[g+j>>2]=j;if(m|0){e=c[7636]|0;b=m>>>3;d=30564+(b<<1<<2)|0;b=1<>2]|0}c[b>>2]=e;c[a+12>>2]=e;c[e+8>>2]=a;c[e+12>>2]=d}c[7633]=j;c[7636]=g}w=h+8|0;l=x;return w|0}else n=k}else n=k}else n=k}else if(a>>>0<=4294967231){a=a+11|0;k=a&-8;e=c[7632]|0;if(e){d=0-k|0;a=a>>>8;if(a)if(k>>>0>16777215)j=31;else{n=(a+1048320|0)>>>16&8;v=a<>>16&4;v=v<>>16&2;j=14-(m|n|j)+(v<>>15)|0;j=k>>>(j+7|0)&1|j<<1}else j=0;a=c[30828+(j<<2)>>2]|0;a:do if(!a){f=0;a=0;v=57}else{f=0;h=k<<((j|0)==31?0:25-(j>>>1)|0);i=a;a=0;while(1){g=(c[i+4>>2]&-8)-k|0;if(g>>>0>>0)if(!g){d=0;f=i;a=i;v=61;break a}else{d=g;a=i}g=c[i+20>>2]|0;i=c[i+16+(h>>>31<<2)>>2]|0;f=(g|0)==0|(g|0)==(i|0)?f:g;g=(i|0)==0;if(g){v=57;break}else h=h<<((g^1)&1)}}while(0);if((v|0)==57){if((f|0)==0&(a|0)==0){a=2<>>12&16;a=a>>>j;i=a>>>5&8;a=a>>>i;m=a>>>2&4;a=a>>>m;n=a>>>1&2;a=a>>>n;f=a>>>1&1;f=c[30828+((i|j|m|n|f)+(a>>>f)<<2)>>2]|0;a=0}if(!f){i=d;j=a}else v=61}if((v|0)==61)while(1){v=0;m=(c[f+4>>2]&-8)-k|0;n=m>>>0>>0;d=n?m:d;a=n?f:a;f=c[f+16+(((c[f+16>>2]|0)==0&1)<<2)>>2]|0;if(!f){i=d;j=a;break}else v=61}if((j|0)!=0?i>>>0<((c[7633]|0)-k|0)>>>0:0){h=j+k|0;if(h>>>0<=j>>>0){w=0;l=x;return w|0}g=c[j+24>>2]|0;b=c[j+12>>2]|0;do if((b|0)==(j|0)){a=j+20|0;b=c[a>>2]|0;if(!b){a=j+16|0;b=c[a>>2]|0;if(!b){b=0;break}}while(1){f=b+20|0;d=c[f>>2]|0;if(d|0){b=d;a=f;continue}f=b+16|0;d=c[f>>2]|0;if(!d)break;else{b=d;a=f}}c[a>>2]=0}else{w=c[j+8>>2]|0;c[w+12>>2]=b;c[b+8>>2]=w}while(0);do if(g){a=c[j+28>>2]|0;d=30828+(a<<2)|0;if((j|0)==(c[d>>2]|0)){c[d>>2]=b;if(!b){e=e&~(1<>2]|0)!=(j|0)&1)<<2)>>2]=b;if(!b)break}c[b+24>>2]=g;a=c[j+16>>2]|0;if(a|0){c[b+16>>2]=a;c[a+24>>2]=b}a=c[j+20>>2]|0;if(a){c[b+20>>2]=a;c[a+24>>2]=b}}while(0);do if(i>>>0>=16){c[j+4>>2]=k|3;c[h+4>>2]=i|1;c[h+i>>2]=i;b=i>>>3;if(i>>>0<256){d=30564+(b<<1<<2)|0;a=c[7631]|0;b=1<>2]|0}c[b>>2]=h;c[a+12>>2]=h;c[h+8>>2]=a;c[h+12>>2]=d;break}b=i>>>8;if(b)if(i>>>0>16777215)b=31;else{v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;b=14-(u|v|b)+(w<>>15)|0;b=i>>>(b+7|0)&1|b<<1}else b=0;d=30828+(b<<2)|0;c[h+28>>2]=b;a=h+16|0;c[a+4>>2]=0;c[a>>2]=0;a=1<>2]=h;c[h+24>>2]=d;c[h+12>>2]=h;c[h+8>>2]=h;break}a=i<<((b|0)==31?0:25-(b>>>1)|0);d=c[d>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(i|0)){v=97;break}e=d+16+(a>>>31<<2)|0;b=c[e>>2]|0;if(!b){v=96;break}else{a=a<<1;d=b}}if((v|0)==96){c[e>>2]=h;c[h+24>>2]=d;c[h+12>>2]=h;c[h+8>>2]=h;break}else if((v|0)==97){v=d+8|0;w=c[v>>2]|0;c[w+12>>2]=h;c[v>>2]=h;c[h+8>>2]=w;c[h+12>>2]=d;c[h+24>>2]=0;break}}else{w=i+k|0;c[j+4>>2]=w|3;w=j+w+4|0;c[w>>2]=c[w>>2]|1}while(0);w=j+8|0;l=x;return w|0}else n=k}else n=k}else n=-1;while(0);d=c[7633]|0;if(d>>>0>=n>>>0){a=d-n|0;b=c[7636]|0;if(a>>>0>15){w=b+n|0;c[7636]=w;c[7633]=a;c[w+4>>2]=a|1;c[b+d>>2]=a;c[b+4>>2]=n|3}else{c[7633]=0;c[7636]=0;c[b+4>>2]=d|3;w=b+d+4|0;c[w>>2]=c[w>>2]|1}w=b+8|0;l=x;return w|0}h=c[7634]|0;if(h>>>0>n>>>0){u=h-n|0;c[7634]=u;w=c[7637]|0;v=w+n|0;c[7637]=v;c[v+4>>2]=u|1;c[w+4>>2]=n|3;w=w+8|0;l=x;return w|0}if(!(c[7749]|0)){c[7751]=4096;c[7750]=4096;c[7752]=-1;c[7753]=-1;c[7754]=0;c[7742]=0;c[7749]=o&-16^1431655768;a=4096}else a=c[7751]|0;i=n+48|0;j=n+47|0;g=a+j|0;e=0-a|0;k=g&e;if(k>>>0<=n>>>0){w=0;l=x;return w|0}a=c[7741]|0;if(a|0?(m=c[7739]|0,o=m+k|0,o>>>0<=m>>>0|o>>>0>a>>>0):0){w=0;l=x;return w|0}b:do if(!(c[7742]&4)){d=c[7637]|0;c:do if(d){f=30972;while(1){a=c[f>>2]|0;if(a>>>0<=d>>>0?(r=f+4|0,(a+(c[r>>2]|0)|0)>>>0>d>>>0):0)break;a=c[f+8>>2]|0;if(!a){v=118;break c}else f=a}b=g-h&e;if(b>>>0<2147483647){a=dj(b|0)|0;if((a|0)==((c[f>>2]|0)+(c[r>>2]|0)|0)){if((a|0)!=(-1|0)){h=a;g=b;v=135;break b}}else{e=a;v=126}}else b=0}else v=118;while(0);do if((v|0)==118){d=dj(0)|0;if((d|0)!=(-1|0)?(b=d,p=c[7750]|0,q=p+-1|0,b=((q&b|0)==0?0:(q+b&0-p)-b|0)+k|0,p=c[7739]|0,q=b+p|0,b>>>0>n>>>0&b>>>0<2147483647):0){r=c[7741]|0;if(r|0?q>>>0<=p>>>0|q>>>0>r>>>0:0){b=0;break}a=dj(b|0)|0;if((a|0)==(d|0)){h=d;g=b;v=135;break b}else{e=a;v=126}}else b=0}while(0);do if((v|0)==126){d=0-b|0;if(!(i>>>0>b>>>0&(b>>>0<2147483647&(e|0)!=(-1|0))))if((e|0)==(-1|0)){b=0;break}else{h=e;g=b;v=135;break b}a=c[7751]|0;a=j-b+a&0-a;if(a>>>0>=2147483647){h=e;g=b;v=135;break b}if((dj(a|0)|0)==(-1|0)){dj(d|0)|0;b=0;break}else{h=e;g=a+b|0;v=135;break b}}while(0);c[7742]=c[7742]|4;v=133}else{b=0;v=133}while(0);if(((v|0)==133?k>>>0<2147483647:0)?(s=dj(k|0)|0,r=dj(0)|0,u=r-s|0,t=u>>>0>(n+40|0)>>>0,!((s|0)==(-1|0)|t^1|s>>>0>>0&((s|0)!=(-1|0)&(r|0)!=(-1|0))^1)):0){h=s;g=t?u:b;v=135}if((v|0)==135){b=(c[7739]|0)+g|0;c[7739]=b;if(b>>>0>(c[7740]|0)>>>0)c[7740]=b;j=c[7637]|0;do if(j){f=30972;while(1){d=c[f>>2]|0;e=f+4|0;b=c[e>>2]|0;if((h|0)==(d+b|0)){v=143;break}a=c[f+8>>2]|0;if(!a)break;else f=a}if(((v|0)==143?(c[f+12>>2]&8|0)==0:0)?h>>>0>j>>>0&d>>>0<=j>>>0:0){c[e>>2]=b+g;w=(c[7634]|0)+g|0;u=j+8|0;u=(u&7|0)==0?0:0-u&7;v=j+u|0;u=w-u|0;c[7637]=v;c[7634]=u;c[v+4>>2]=u|1;c[j+w+4>>2]=40;c[7638]=c[7753];break}if(h>>>0<(c[7635]|0)>>>0)c[7635]=h;a=h+g|0;b=30972;while(1){if((c[b>>2]|0)==(a|0)){v=151;break}b=c[b+8>>2]|0;if(!b){a=30972;break}}if((v|0)==151)if(!(c[b+12>>2]&8)){c[b>>2]=h;m=b+4|0;c[m>>2]=(c[m>>2]|0)+g;m=h+8|0;m=h+((m&7|0)==0?0:0-m&7)|0;b=a+8|0;b=a+((b&7|0)==0?0:0-b&7)|0;k=m+n|0;i=b-m-n|0;c[m+4>>2]=n|3;do if((j|0)!=(b|0)){if((c[7636]|0)==(b|0)){w=(c[7633]|0)+i|0;c[7633]=w;c[7636]=k;c[k+4>>2]=w|1;c[k+w>>2]=w;break}a=c[b+4>>2]|0;if((a&3|0)==1){h=a&-8;e=a>>>3;d:do if(a>>>0<256){a=c[b+8>>2]|0;d=c[b+12>>2]|0;if((d|0)==(a|0)){c[7631]=c[7631]&~(1<>2]=d;c[d+8>>2]=a;break}}else{g=c[b+24>>2]|0;a=c[b+12>>2]|0;do if((a|0)==(b|0)){e=b+16|0;d=e+4|0;a=c[d>>2]|0;if(!a){a=c[e>>2]|0;if(!a){a=0;break}else f=e}else f=d;while(1){e=a+20|0;d=c[e>>2]|0;if(d|0){a=d;f=e;continue}e=a+16|0;d=c[e>>2]|0;if(!d)break;else{a=d;f=e}}c[f>>2]=0}else{w=c[b+8>>2]|0;c[w+12>>2]=a;c[a+8>>2]=w}while(0);if(!g)break;d=c[b+28>>2]|0;e=30828+(d<<2)|0;do if((c[e>>2]|0)!=(b|0)){c[g+16+(((c[g+16>>2]|0)!=(b|0)&1)<<2)>>2]=a;if(!a)break d}else{c[e>>2]=a;if(a|0)break;c[7632]=c[7632]&~(1<>2]=g;e=b+16|0;d=c[e>>2]|0;if(d|0){c[a+16>>2]=d;c[d+24>>2]=a}d=c[e+4>>2]|0;if(!d)break;c[a+20>>2]=d;c[d+24>>2]=a}while(0);b=b+h|0;f=h+i|0}else f=i;b=b+4|0;c[b>>2]=c[b>>2]&-2;c[k+4>>2]=f|1;c[k+f>>2]=f;b=f>>>3;if(f>>>0<256){d=30564+(b<<1<<2)|0;a=c[7631]|0;b=1<>2]|0}c[b>>2]=k;c[a+12>>2]=k;c[k+8>>2]=a;c[k+12>>2]=d;break}b=f>>>8;do if(!b)a=0;else{if(f>>>0>16777215){a=31;break}v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;a=14-(u|v|a)+(w<>>15)|0;a=f>>>(a+7|0)&1|a<<1}while(0);e=30828+(a<<2)|0;c[k+28>>2]=a;b=k+16|0;c[b+4>>2]=0;c[b>>2]=0;b=c[7632]|0;d=1<>2]=k;c[k+24>>2]=e;c[k+12>>2]=k;c[k+8>>2]=k;break}a=f<<((a|0)==31?0:25-(a>>>1)|0);d=c[e>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(f|0)){v=192;break}e=d+16+(a>>>31<<2)|0;b=c[e>>2]|0;if(!b){v=191;break}else{a=a<<1;d=b}}if((v|0)==191){c[e>>2]=k;c[k+24>>2]=d;c[k+12>>2]=k;c[k+8>>2]=k;break}else if((v|0)==192){v=d+8|0;w=c[v>>2]|0;c[w+12>>2]=k;c[v>>2]=k;c[k+8>>2]=w;c[k+12>>2]=d;c[k+24>>2]=0;break}}else{w=(c[7634]|0)+i|0;c[7634]=w;c[7637]=k;c[k+4>>2]=w|1}while(0);w=m+8|0;l=x;return w|0}else a=30972;while(1){b=c[a>>2]|0;if(b>>>0<=j>>>0?(w=b+(c[a+4>>2]|0)|0,w>>>0>j>>>0):0)break;a=c[a+8>>2]|0}f=w+-47|0;a=f+8|0;a=f+((a&7|0)==0?0:0-a&7)|0;f=j+16|0;a=a>>>0>>0?j:a;b=a+8|0;d=g+-40|0;u=h+8|0;u=(u&7|0)==0?0:0-u&7;v=h+u|0;u=d-u|0;c[7637]=v;c[7634]=u;c[v+4>>2]=u|1;c[h+d+4>>2]=40;c[7638]=c[7753];d=a+4|0;c[d>>2]=27;c[b>>2]=c[7743];c[b+4>>2]=c[7744];c[b+8>>2]=c[7745];c[b+12>>2]=c[7746];c[7743]=h;c[7744]=g;c[7746]=0;c[7745]=b;b=a+24|0;do{v=b;b=b+4|0;c[b>>2]=7}while((v+8|0)>>>0>>0);if((a|0)!=(j|0)){g=a-j|0;c[d>>2]=c[d>>2]&-2;c[j+4>>2]=g|1;c[a>>2]=g;b=g>>>3;if(g>>>0<256){d=30564+(b<<1<<2)|0;a=c[7631]|0;b=1<>2]|0}c[b>>2]=j;c[a+12>>2]=j;c[j+8>>2]=a;c[j+12>>2]=d;break}b=g>>>8;if(b)if(g>>>0>16777215)d=31;else{v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;d=14-(u|v|d)+(w<>>15)|0;d=g>>>(d+7|0)&1|d<<1}else d=0;e=30828+(d<<2)|0;c[j+28>>2]=d;c[j+20>>2]=0;c[f>>2]=0;b=c[7632]|0;a=1<>2]=j;c[j+24>>2]=e;c[j+12>>2]=j;c[j+8>>2]=j;break}a=g<<((d|0)==31?0:25-(d>>>1)|0);d=c[e>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(g|0)){v=213;break}e=d+16+(a>>>31<<2)|0;b=c[e>>2]|0;if(!b){v=212;break}else{a=a<<1;d=b}}if((v|0)==212){c[e>>2]=j;c[j+24>>2]=d;c[j+12>>2]=j;c[j+8>>2]=j;break}else if((v|0)==213){v=d+8|0;w=c[v>>2]|0;c[w+12>>2]=j;c[v>>2]=j;c[j+8>>2]=w;c[j+12>>2]=d;c[j+24>>2]=0;break}}}else{w=c[7635]|0;if((w|0)==0|h>>>0>>0)c[7635]=h;c[7743]=h;c[7744]=g;c[7746]=0;c[7640]=c[7749];c[7639]=-1;c[7644]=30564;c[7643]=30564;c[7646]=30572;c[7645]=30572;c[7648]=30580;c[7647]=30580;c[7650]=30588;c[7649]=30588;c[7652]=30596;c[7651]=30596;c[7654]=30604;c[7653]=30604;c[7656]=30612;c[7655]=30612;c[7658]=30620;c[7657]=30620;c[7660]=30628;c[7659]=30628;c[7662]=30636;c[7661]=30636;c[7664]=30644;c[7663]=30644;c[7666]=30652;c[7665]=30652;c[7668]=30660;c[7667]=30660;c[7670]=30668;c[7669]=30668;c[7672]=30676;c[7671]=30676;c[7674]=30684;c[7673]=30684;c[7676]=30692;c[7675]=30692;c[7678]=30700;c[7677]=30700;c[7680]=30708;c[7679]=30708;c[7682]=30716;c[7681]=30716;c[7684]=30724;c[7683]=30724;c[7686]=30732;c[7685]=30732;c[7688]=30740;c[7687]=30740;c[7690]=30748;c[7689]=30748;c[7692]=30756;c[7691]=30756;c[7694]=30764;c[7693]=30764;c[7696]=30772;c[7695]=30772;c[7698]=30780;c[7697]=30780;c[7700]=30788;c[7699]=30788;c[7702]=30796;c[7701]=30796;c[7704]=30804;c[7703]=30804;c[7706]=30812;c[7705]=30812;w=g+-40|0;u=h+8|0;u=(u&7|0)==0?0:0-u&7;v=h+u|0;u=w-u|0;c[7637]=v;c[7634]=u;c[v+4>>2]=u|1;c[h+w+4>>2]=40;c[7638]=c[7753]}while(0);b=c[7634]|0;if(b>>>0>n>>>0){u=b-n|0;c[7634]=u;w=c[7637]|0;v=w+n|0;c[7637]=v;c[v+4>>2]=u|1;c[w+4>>2]=n|3;w=w+8|0;l=x;return w|0}}c[(Si()|0)>>2]=12;w=0;l=x;return w|0}function Ri(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if(!a)return;d=a+-8|0;e=c[7635]|0;a=c[a+-4>>2]|0;b=a&-8;k=d+b|0;do if(!(a&1)){f=c[d>>2]|0;if(!(a&3))return;g=d+(0-f)|0;h=f+b|0;if(g>>>0>>0)return;if((c[7636]|0)==(g|0)){b=k+4|0;a=c[b>>2]|0;if((a&3|0)!=3){i=g;j=g;b=h;break}c[7633]=h;c[b>>2]=a&-2;c[g+4>>2]=h|1;c[g+h>>2]=h;return}d=f>>>3;if(f>>>0<256){a=c[g+8>>2]|0;b=c[g+12>>2]|0;if((b|0)==(a|0)){c[7631]=c[7631]&~(1<>2]=b;c[b+8>>2]=a;i=g;j=g;b=h;break}}f=c[g+24>>2]|0;a=c[g+12>>2]|0;do if((a|0)==(g|0)){d=g+16|0;b=d+4|0;a=c[b>>2]|0;if(!a){a=c[d>>2]|0;if(!a){d=0;break}else e=d}else e=b;while(1){d=a+20|0;b=c[d>>2]|0;if(b|0){a=b;e=d;continue}d=a+16|0;b=c[d>>2]|0;if(!b)break;else{a=b;e=d}}c[e>>2]=0;d=a}else{d=c[g+8>>2]|0;c[d+12>>2]=a;c[a+8>>2]=d;d=a}while(0);if(f){a=c[g+28>>2]|0;b=30828+(a<<2)|0;if((c[b>>2]|0)==(g|0)){c[b>>2]=d;if(!d){c[7632]=c[7632]&~(1<>2]|0)!=(g|0)&1)<<2)>>2]=d;if(!d){i=g;j=g;b=h;break}}c[d+24>>2]=f;b=g+16|0;a=c[b>>2]|0;if(a|0){c[d+16>>2]=a;c[a+24>>2]=d}a=c[b+4>>2]|0;if(a){c[d+20>>2]=a;c[a+24>>2]=d;i=g;j=g;b=h}else{i=g;j=g;b=h}}else{i=g;j=g;b=h}}else{i=d;j=d}while(0);if(i>>>0>=k>>>0)return;a=k+4|0;d=c[a>>2]|0;if(!(d&1))return;if(!(d&2)){if((c[7637]|0)==(k|0)){k=(c[7634]|0)+b|0;c[7634]=k;c[7637]=j;c[j+4>>2]=k|1;if((j|0)!=(c[7636]|0))return;c[7636]=0;c[7633]=0;return}if((c[7636]|0)==(k|0)){k=(c[7633]|0)+b|0;c[7633]=k;c[7636]=i;c[j+4>>2]=k|1;c[i+k>>2]=k;return}f=(d&-8)+b|0;e=d>>>3;do if(d>>>0<256){b=c[k+8>>2]|0;a=c[k+12>>2]|0;if((a|0)==(b|0)){c[7631]=c[7631]&~(1<>2]=a;c[a+8>>2]=b;break}}else{g=c[k+24>>2]|0;a=c[k+12>>2]|0;do if((a|0)==(k|0)){d=k+16|0;b=d+4|0;a=c[b>>2]|0;if(!a){a=c[d>>2]|0;if(!a){d=0;break}else e=d}else e=b;while(1){d=a+20|0;b=c[d>>2]|0;if(b|0){a=b;e=d;continue}d=a+16|0;b=c[d>>2]|0;if(!b)break;else{a=b;e=d}}c[e>>2]=0;d=a}else{d=c[k+8>>2]|0;c[d+12>>2]=a;c[a+8>>2]=d;d=a}while(0);if(g|0){a=c[k+28>>2]|0;b=30828+(a<<2)|0;if((c[b>>2]|0)==(k|0)){c[b>>2]=d;if(!d){c[7632]=c[7632]&~(1<>2]|0)!=(k|0)&1)<<2)>>2]=d;if(!d)break}c[d+24>>2]=g;b=k+16|0;a=c[b>>2]|0;if(a|0){c[d+16>>2]=a;c[a+24>>2]=d}a=c[b+4>>2]|0;if(a|0){c[d+20>>2]=a;c[a+24>>2]=d}}}while(0);c[j+4>>2]=f|1;c[i+f>>2]=f;if((j|0)==(c[7636]|0)){c[7633]=f;return}}else{c[a>>2]=d&-2;c[j+4>>2]=b|1;c[i+b>>2]=b;f=b}a=f>>>3;if(f>>>0<256){d=30564+(a<<1<<2)|0;b=c[7631]|0;a=1<>2]|0}c[a>>2]=j;c[b+12>>2]=j;c[j+8>>2]=b;c[j+12>>2]=d;return}a=f>>>8;if(a)if(f>>>0>16777215)b=31;else{i=(a+1048320|0)>>>16&8;k=a<>>16&4;k=k<>>16&2;b=14-(h|i|b)+(k<>>15)|0;b=f>>>(b+7|0)&1|b<<1}else b=0;e=30828+(b<<2)|0;c[j+28>>2]=b;c[j+20>>2]=0;c[j+16>>2]=0;a=c[7632]|0;d=1<>>1)|0);d=c[e>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(f|0)){a=73;break}e=d+16+(b>>>31<<2)|0;a=c[e>>2]|0;if(!a){a=72;break}else{b=b<<1;d=a}}if((a|0)==72){c[e>>2]=j;c[j+24>>2]=d;c[j+12>>2]=j;c[j+8>>2]=j;break}else if((a|0)==73){i=d+8|0;k=c[i>>2]|0;c[k+12>>2]=j;c[i>>2]=j;c[j+8>>2]=k;c[j+12>>2]=d;c[j+24>>2]=0;break}}else{c[7632]=a|d;c[e>>2]=j;c[j+24>>2]=e;c[j+12>>2]=j;c[j+8>>2]=j}while(0);k=(c[7639]|0)+-1|0;c[7639]=k;if(!k)a=30980;else return;while(1){a=c[a>>2]|0;if(!a)break;else a=a+8|0}c[7639]=-1;return}function Si(){return 31020}function Ti(a){a=+a;var b=0,d=0,e=0,f=0,g=0.0,i=0.0,k=0.0,l=0.0,m=0.0;h[j>>3]=a;d=c[j>>2]|0;b=c[j+4>>2]|0;e=(b|0)<0;do if(e|b>>>0<1048576){if((d|0)==0&(b&2147483647|0)==0){a=-1.0/(a*a);break}if(e){a=(a-a)/0.0;break}else{h[j>>3]=a*18014398509481984.0;b=c[j+4>>2]|0;e=c[j>>2]|0;d=-1077;f=9;break}}else if(b>>>0<=2146435071)if((d|0)==0&0==0&(b|0)==1072693248)a=0.0;else{e=d;d=-1023;f=9}while(0);if((f|0)==9){f=b+614242|0;c[j>>2]=e;c[j+4>>2]=(f&1048575)+1072079006;k=+h[j>>3]+-1.0;i=k*(k*.5);l=k/(k+2.0);m=l*l;g=m*m;h[j>>3]=k-i;e=c[j+4>>2]|0;c[j>>2]=0;c[j+4>>2]=e;a=+h[j>>3];g=k-a-i+l*(i+(g*(g*(g*.15313837699209373+.22222198432149784)+.3999999999940942)+m*(g*(g*(g*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)));m=a*.4342944818781689;i=+(d+(f>>>20)|0);l=i*.30102999566361177;k=l+m;a=k+(m+(l-k)+(g*.4342944818781689+(i*3.694239077158931e-13+(g+a)*2.5082946711645275e-11)))}return +a}function Ui(a){a=+a;return ~~+cj(+a)|0}function Vi(){}function Wi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=N(e,f)|0;d=a>>>16;a=(c>>>16)+(N(e,d)|0)|0;e=b>>>16;b=N(e,f)|0;return (y=(a>>>16)+(N(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function Xi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=Wi(e,f)|0;a=y;return (y=(N(b,f)|0)+(N(d,e)|0)+a|a&0,c|0|0)|0}function Yi(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){y=b>>c;return a>>>c|(b&(1<>c-32|0}function Zi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return (y=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function _i(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192)return Y(b|0,d|0,e|0)|0;h=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return h|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}e=g&-4|0;f=e-64|0;while((b|0)<=(f|0)){c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];c[b+32>>2]=c[d+32>>2];c[b+36>>2]=c[d+36>>2];c[b+40>>2]=c[d+40>>2];c[b+44>>2]=c[d+44>>2];c[b+48>>2]=c[d+48>>2];c[b+52>>2]=c[d+52>>2];c[b+56>>2]=c[d+56>>2];c[b+60>>2]=c[d+60>>2];b=b+64|0;d=d+64|0}while((b|0)<(e|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{e=g-4|0;while((b|0)<(e|0)){a[b>>0]=a[d>>0]|0;a[b+1>>0]=a[d+1>>0]|0;a[b+2>>0]=a[d+2>>0]|0;a[b+3>>0]=a[d+3>>0]|0;b=b+4|0;d=d+4|0}}while((b|0)<(g|0)){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}return h|0}function $i(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b>>0]=a[c>>0]|0}b=e}else _i(b,c,d)|0;return b|0}function aj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}f=h&-4|0;g=f-64|0;i=d|d<<8|d<<16|d<<24;while((b|0)<=(g|0)){c[b>>2]=i;c[b+4>>2]=i;c[b+8>>2]=i;c[b+12>>2]=i;c[b+16>>2]=i;c[b+20>>2]=i;c[b+24>>2]=i;c[b+28>>2]=i;c[b+32>>2]=i;c[b+36>>2]=i;c[b+40>>2]=i;c[b+44>>2]=i;c[b+48>>2]=i;c[b+52>>2]=i;c[b+56>>2]=i;c[b+60>>2]=i;b=b+64|0}while((b|0)<(f|0)){c[b>>2]=i;b=b+4|0}}while((b|0)<(h|0)){a[b>>0]=d;b=b+1|0}return h-e|0}function bj(a){a=+a;return a>=0.0?+z(a+.5):+M(a-.5)}function cj(a){a=+a;return a-+z(a)!=.5?+bj(a):+bj(a/2.0)*2.0}function dj(a){a=a|0;var b=0,d=0;d=a+15&-16|0;b=c[i>>2]|0;a=b+d|0;if((d|0)>0&(a|0)<(b|0)|(a|0)<0){V()|0;X(12);return -1}c[i>>2]=a;if((a|0)>(U()|0)?(T()|0)==0:0){c[i>>2]=b;X(12);return -1}return b|0}function ej(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;ba[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function fj(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;R(0)} + +// EMSCRIPTEN_END_FUNCS +var ba=[fj,hi,gi,fj];return{___muldi3:Xi,_bitshift64Ashr:Yi,_free:Ri,_i64Add:Zi,_malloc:Qi,_memcpy:_i,_memmove:$i,_memset:aj,_opus_decode:Xh,_opus_decode_float:ai,_opus_decoder_ctl:bi,_opus_decoder_get_size:Lh,_opus_decoder_init:Nh,_opus_encode:zi,_opus_encode_float:Ai,_opus_encoder_ctl:Bi,_opus_encoder_get_size:ci,_opus_encoder_init:ei,_opus_get_version_string:Ra,_opus_packet_get_nb_samples:_h,_opus_strerror:Qa,_rintf:cj,_sbrk:dj,dynCall_viiiiiii:ej,establishStackSpace:fa,getTempRet0:ia,runPostSets:Vi,setTempRet0:ha,setThrew:ga,stackAlloc:ca,stackRestore:ea,stackSave:da}}) + + +// EMSCRIPTEN_END_ASM +(a.c,a.f,buffer);a.___muldi3=X.___muldi3;a._bitshift64Ashr=X._bitshift64Ashr;a._free=X._free;a._i64Add=X._i64Add;a._malloc=X._malloc;a._memcpy=X._memcpy;a._memmove=X._memmove;a._memset=X._memset;a._opus_decode=X._opus_decode;a._opus_decode_float=X._opus_decode_float;a._opus_decoder_ctl=X._opus_decoder_ctl;a._opus_decoder_get_size=X._opus_decoder_get_size; +a._opus_decoder_init=X._opus_decoder_init;a._opus_encode=X._opus_encode;a._opus_encode_float=X._opus_encode_float;a._opus_encoder_ctl=X._opus_encoder_ctl;a._opus_encoder_get_size=X._opus_encoder_get_size;a._opus_encoder_init=X._opus_encoder_init;a._opus_get_version_string=X._opus_get_version_string;a._opus_packet_get_nb_samples=X._opus_packet_get_nb_samples;a._opus_strerror=X._opus_strerror;a._rintf=X._rintf;a._sbrk=X._sbrk;a.establishStackSpace=X.establishStackSpace;a.getTempRet0=X.getTempRet0; +a.runPostSets=X.runPostSets;a.setTempRet0=X.setTempRet0;a.setThrew=X.setThrew;a.stackAlloc=X.stackAlloc;var na=a.stackRestore=X.stackRestore,ja=a.stackSave=X.stackSave;a.dynCall_viiiiiii=X.dynCall_viiiiiii;a.asm=X; +if(U)if((String.prototype.startsWith?U.startsWith(V):0===U.indexOf(V))||("function"===typeof a.locateFile?U=a.locateFile(U):a.memoryInitializerPrefixURL&&(U=a.memoryInitializerPrefixURL+U)),m||n){var oa=a.readBinary(U);z.set(oa,8)}else{var pa=function(){a.readAsync(U,Y,function(){throw"could not load memory initializer "+U;})};P++;a.monitorRunDependencies&&a.monitorRunDependencies(P);var Y=function(b){b.byteLength&&(b=new Uint8Array(b));z.set(b,8);a.memoryInitializerRequest&&delete a.memoryInitializerRequest.response; +P--;a.monitorRunDependencies&&a.monitorRunDependencies(P);0==P&&(null!==Q&&(clearInterval(Q),Q=null),R&&(b=R,R=null,b()))},qa=r(U);if(qa)Y(qa.buffer);else if(a.memoryInitializerRequest){var ra=function(){var b=a.memoryInitializerRequest,c=b.response;if(200!==b.status&&0!==b.status)if(c=r(a.memoryInitializerRequestURL))c=c.buffer;else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+b.status+", retrying "+U);pa();return}Y(c)};a.memoryInitializerRequest.response? +setTimeout(ra,0):a.memoryInitializerRequest.addEventListener("load",ra)}else pa()}a.then=function(b){if(a.calledRun)b(a);else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();b(a)}}return a};function u(b){this.name="ExitStatus";this.message="Program terminated with exit("+b+")";this.status=b}u.prototype=Error();u.prototype.constructor=u;R=function sa(){a.calledRun||Z();a.calledRun||(R=sa)}; +function Z(){function b(){if(!a.calledRun&&(a.calledRun=!0,!x)){ea||(ea=!0,N(aa));N(ba);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;){var b=a.postRun.shift();da.unshift(b)}N(da)}}if(!(0(b) ? (a):(b)) + +/* kiss_fft.h + defines kiss_fft_scalar as either short or a float type + and defines + typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */ +#include "kiss_fft.h" + +/* + Explanation of macros dealing with complex math: + + C_MUL(m,a,b) : m = a*b + C_FIXDIV( c , div ) : if a fixed point impl., c /= div. noop otherwise + C_SUB( res, a,b) : res = a - b + C_SUBFROM( res , a) : res -= a + C_ADDTO( res , a) : res += a + * */ +#ifdef FIXED_POINT +#include "arch.h" + + +#define SAMP_MAX 2147483647 +#define TWID_MAX 32767 +#define TRIG_UPSCALE 1 + +#define SAMP_MIN -SAMP_MAX + + +# define S_MUL(a,b) MULT16_32_Q15(b, a) + +# define C_MUL(m,a,b) \ + do{ (m).r = SUB32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \ + (m).i = ADD32(S_MUL((a).r,(b).i) , S_MUL((a).i,(b).r)); }while(0) + +# define C_MULC(m,a,b) \ + do{ (m).r = ADD32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \ + (m).i = SUB32(S_MUL((a).i,(b).r) , S_MUL((a).r,(b).i)); }while(0) + +# define C_MULBYSCALAR( c, s ) \ + do{ (c).r = S_MUL( (c).r , s ) ;\ + (c).i = S_MUL( (c).i , s ) ; }while(0) + +# define DIVSCALAR(x,k) \ + (x) = S_MUL( x, (TWID_MAX-((k)>>1))/(k)+1 ) + +# define C_FIXDIV(c,div) \ + do { DIVSCALAR( (c).r , div); \ + DIVSCALAR( (c).i , div); }while (0) + +#define C_ADD( res, a,b)\ + do {(res).r=ADD32((a).r,(b).r); (res).i=ADD32((a).i,(b).i); \ + }while(0) +#define C_SUB( res, a,b)\ + do {(res).r=SUB32((a).r,(b).r); (res).i=SUB32((a).i,(b).i); \ + }while(0) +#define C_ADDTO( res , a)\ + do {(res).r = ADD32((res).r, (a).r); (res).i = ADD32((res).i,(a).i);\ + }while(0) + +#define C_SUBFROM( res , a)\ + do {(res).r = ADD32((res).r,(a).r); (res).i = SUB32((res).i,(a).i); \ + }while(0) + +#if defined(OPUS_ARM_INLINE_ASM) +#include "arm/kiss_fft_armv4.h" +#endif + +#if defined(OPUS_ARM_INLINE_EDSP) +#include "arm/kiss_fft_armv5e.h" +#endif +#if defined(MIPSr1_ASM) +#include "mips/kiss_fft_mipsr1.h" +#endif + +#else /* not FIXED_POINT*/ + +# define S_MUL(a,b) ( (a)*(b) ) +#define C_MUL(m,a,b) \ + do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ + (m).i = (a).r*(b).i + (a).i*(b).r; }while(0) +#define C_MULC(m,a,b) \ + do{ (m).r = (a).r*(b).r + (a).i*(b).i;\ + (m).i = (a).i*(b).r - (a).r*(b).i; }while(0) + +#define C_MUL4(m,a,b) C_MUL(m,a,b) + +# define C_FIXDIV(c,div) /* NOOP */ +# define C_MULBYSCALAR( c, s ) \ + do{ (c).r *= (s);\ + (c).i *= (s); }while(0) +#endif + +#ifndef CHECK_OVERFLOW_OP +# define CHECK_OVERFLOW_OP(a,op,b) /* noop */ +#endif + +#ifndef C_ADD +#define C_ADD( res, a,b)\ + do { \ + CHECK_OVERFLOW_OP((a).r,+,(b).r)\ + CHECK_OVERFLOW_OP((a).i,+,(b).i)\ + (res).r=(a).r+(b).r; (res).i=(a).i+(b).i; \ + }while(0) +#define C_SUB( res, a,b)\ + do { \ + CHECK_OVERFLOW_OP((a).r,-,(b).r)\ + CHECK_OVERFLOW_OP((a).i,-,(b).i)\ + (res).r=(a).r-(b).r; (res).i=(a).i-(b).i; \ + }while(0) +#define C_ADDTO( res , a)\ + do { \ + CHECK_OVERFLOW_OP((res).r,+,(a).r)\ + CHECK_OVERFLOW_OP((res).i,+,(a).i)\ + (res).r += (a).r; (res).i += (a).i;\ + }while(0) + +#define C_SUBFROM( res , a)\ + do {\ + CHECK_OVERFLOW_OP((res).r,-,(a).r)\ + CHECK_OVERFLOW_OP((res).i,-,(a).i)\ + (res).r -= (a).r; (res).i -= (a).i; \ + }while(0) +#endif /* C_ADD defined */ + +#ifdef FIXED_POINT +/*# define KISS_FFT_COS(phase) TRIG_UPSCALE*floor(MIN(32767,MAX(-32767,.5+32768 * cos (phase)))) +# define KISS_FFT_SIN(phase) TRIG_UPSCALE*floor(MIN(32767,MAX(-32767,.5+32768 * sin (phase))))*/ +# define KISS_FFT_COS(phase) floor(.5+TWID_MAX*cos (phase)) +# define KISS_FFT_SIN(phase) floor(.5+TWID_MAX*sin (phase)) +# define HALF_OF(x) ((x)>>1) +#elif defined(USE_SIMD) +# define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) ) +# define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) ) +# define HALF_OF(x) ((x)*_mm_set1_ps(.5f)) +#else +# define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase) +# define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase) +# define HALF_OF(x) ((x)*.5f) +#endif + +#define kf_cexp(x,phase) \ + do{ \ + (x)->r = KISS_FFT_COS(phase);\ + (x)->i = KISS_FFT_SIN(phase);\ + }while(0) + +#define kf_cexp2(x,phase) \ + do{ \ + (x)->r = TRIG_UPSCALE*celt_cos_norm((phase));\ + (x)->i = TRIG_UPSCALE*celt_cos_norm((phase)-32768);\ +}while(0) + +#endif /* KISS_FFT_GUTS_H */ diff --git a/asm/libs/opus/celt/arch.h b/asm/libs/opus/celt/arch.h new file mode 100644 index 00000000..9f74ddd2 --- /dev/null +++ b/asm/libs/opus/celt/arch.h @@ -0,0 +1,241 @@ +/* Copyright (c) 2003-2008 Jean-Marc Valin + Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/** + @file arch.h + @brief Various architecture definitions for CELT +*/ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef ARCH_H +#define ARCH_H + +#include "opus_types.h" +#include "opus_defines.h" + +# if !defined(__GNUC_PREREQ) +# if defined(__GNUC__)&&defined(__GNUC_MINOR__) +# define __GNUC_PREREQ(_maj,_min) \ + ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min)) +# else +# define __GNUC_PREREQ(_maj,_min) 0 +# endif +# endif + +#define CELT_SIG_SCALE 32768.f + +#define celt_fatal(str) _celt_fatal(str, __FILE__, __LINE__); +#ifdef ENABLE_ASSERTIONS +#include +#include +#ifdef __GNUC__ +__attribute__((noreturn)) +#endif +static OPUS_INLINE void _celt_fatal(const char *str, const char *file, int line) +{ + fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str); + abort(); +} +#define celt_assert(cond) {if (!(cond)) {celt_fatal("assertion failed: " #cond);}} +#define celt_assert2(cond, message) {if (!(cond)) {celt_fatal("assertion failed: " #cond "\n" message);}} +#else +#define celt_assert(cond) +#define celt_assert2(cond, message) +#endif + +#define IMUL32(a,b) ((a)*(b)) + +#define MIN16(a,b) ((a) < (b) ? (a) : (b)) /**< Minimum 16-bit value. */ +#define MAX16(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 16-bit value. */ +#define MIN32(a,b) ((a) < (b) ? (a) : (b)) /**< Minimum 32-bit value. */ +#define MAX32(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 32-bit value. */ +#define IMIN(a,b) ((a) < (b) ? (a) : (b)) /**< Minimum int value. */ +#define IMAX(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum int value. */ +#define UADD32(a,b) ((a)+(b)) +#define USUB32(a,b) ((a)-(b)) + +#define PRINT_MIPS(file) + +#ifdef FIXED_POINT + +typedef opus_int16 opus_val16; +typedef opus_int32 opus_val32; + +typedef opus_val32 celt_sig; +typedef opus_val16 celt_norm; +typedef opus_val32 celt_ener; + +#define Q15ONE 32767 + +#define SIG_SHIFT 12 + +#define NORM_SCALING 16384 + +#define DB_SHIFT 10 + +#define EPSILON 1 +#define VERY_SMALL 0 +#define VERY_LARGE16 ((opus_val16)32767) +#define Q15_ONE ((opus_val16)32767) + +#define SCALEIN(a) (a) +#define SCALEOUT(a) (a) + +#define ABS16(x) ((x) < 0 ? (-(x)) : (x)) +#define ABS32(x) ((x) < 0 ? (-(x)) : (x)) + +static OPUS_INLINE opus_int16 SAT16(opus_int32 x) { + return x > 32767 ? 32767 : x < -32768 ? -32768 : (opus_int16)x; +} + +#ifdef FIXED_DEBUG +#include "fixed_debug.h" +#else + +#include "fixed_generic.h" + +#ifdef OPUS_ARM_INLINE_EDSP +#include "arm/fixed_armv5e.h" +#elif defined (OPUS_ARM_INLINE_ASM) +#include "arm/fixed_armv4.h" +#elif defined (BFIN_ASM) +#include "fixed_bfin.h" +#elif defined (TI_C5X_ASM) +#include "fixed_c5x.h" +#elif defined (TI_C6X_ASM) +#include "fixed_c6x.h" +#endif + +#endif + +#else /* FIXED_POINT */ + +typedef float opus_val16; +typedef float opus_val32; + +typedef float celt_sig; +typedef float celt_norm; +typedef float celt_ener; + +#ifdef FLOAT_APPROX +/* This code should reliably detect NaN/inf even when -ffast-math is used. + Assumes IEEE 754 format. */ +static OPUS_INLINE int celt_isnan(float x) +{ + union {float f; opus_uint32 i;} in; + in.f = x; + return ((in.i>>23)&0xFF)==0xFF && (in.i&0x007FFFFF)!=0; +} +#else +#ifdef __FAST_MATH__ +#error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input +#endif +#define celt_isnan(x) ((x)!=(x)) +#endif + +#define Q15ONE 1.0f + +#define NORM_SCALING 1.f + +#define EPSILON 1e-15f +#define VERY_SMALL 1e-30f +#define VERY_LARGE16 1e15f +#define Q15_ONE ((opus_val16)1.f) + +/* This appears to be the same speed as C99's fabsf() but it's more portable. */ +#define ABS16(x) ((float)fabs(x)) +#define ABS32(x) ((float)fabs(x)) + +#define QCONST16(x,bits) (x) +#define QCONST32(x,bits) (x) + +#define NEG16(x) (-(x)) +#define NEG32(x) (-(x)) +#define EXTRACT16(x) (x) +#define EXTEND32(x) (x) +#define SHR16(a,shift) (a) +#define SHL16(a,shift) (a) +#define SHR32(a,shift) (a) +#define SHL32(a,shift) (a) +#define PSHR32(a,shift) (a) +#define VSHR32(a,shift) (a) + +#define PSHR(a,shift) (a) +#define SHR(a,shift) (a) +#define SHL(a,shift) (a) +#define SATURATE(x,a) (x) +#define SATURATE16(x) (x) + +#define ROUND16(a,shift) (a) +#define HALF16(x) (.5f*(x)) +#define HALF32(x) (.5f*(x)) + +#define ADD16(a,b) ((a)+(b)) +#define SUB16(a,b) ((a)-(b)) +#define ADD32(a,b) ((a)+(b)) +#define SUB32(a,b) ((a)-(b)) +#define MULT16_16_16(a,b) ((a)*(b)) +#define MULT16_16(a,b) ((opus_val32)(a)*(opus_val32)(b)) +#define MAC16_16(c,a,b) ((c)+(opus_val32)(a)*(opus_val32)(b)) + +#define MULT16_32_Q15(a,b) ((a)*(b)) +#define MULT16_32_Q16(a,b) ((a)*(b)) + +#define MULT32_32_Q31(a,b) ((a)*(b)) + +#define MAC16_32_Q15(c,a,b) ((c)+(a)*(b)) +#define MAC16_32_Q16(c,a,b) ((c)+(a)*(b)) + +#define MULT16_16_Q11_32(a,b) ((a)*(b)) +#define MULT16_16_Q11(a,b) ((a)*(b)) +#define MULT16_16_Q13(a,b) ((a)*(b)) +#define MULT16_16_Q14(a,b) ((a)*(b)) +#define MULT16_16_Q15(a,b) ((a)*(b)) +#define MULT16_16_P15(a,b) ((a)*(b)) +#define MULT16_16_P13(a,b) ((a)*(b)) +#define MULT16_16_P14(a,b) ((a)*(b)) +#define MULT16_32_P16(a,b) ((a)*(b)) + +#define DIV32_16(a,b) (((opus_val32)(a))/(opus_val16)(b)) +#define DIV32(a,b) (((opus_val32)(a))/(opus_val32)(b)) + +#define SCALEIN(a) ((a)*CELT_SIG_SCALE) +#define SCALEOUT(a) ((a)*(1/CELT_SIG_SCALE)) + +#define SIG2WORD16(x) (x) + +#endif /* !FIXED_POINT */ + +#ifndef GLOBAL_STACK_SIZE +#ifdef FIXED_POINT +#define GLOBAL_STACK_SIZE 100000 +#else +#define GLOBAL_STACK_SIZE 100000 +#endif +#endif + +#endif /* ARCH_H */ diff --git a/asm/libs/opus/celt/arm/arm2gnu.pl b/asm/libs/opus/celt/arm/arm2gnu.pl new file mode 100755 index 00000000..6c922ac8 --- /dev/null +++ b/asm/libs/opus/celt/arm/arm2gnu.pl @@ -0,0 +1,353 @@ +#!/usr/bin/perl +# Copyright (C) 2002-2013 Xiph.org Foundation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +my $bigend; # little/big endian +my $nxstack; +my $apple = 0; +my $symprefix = ""; + +$nxstack = 0; + +eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +while ($ARGV[0] =~ /^-/) { + $_ = shift; + last if /^--$/; + if (/^-n$/) { + $nflag++; + next; + } + if (/^--apple$/) { + $apple = 1; + $symprefix = "_"; + next; + } + die "I don't recognize this switch: $_\\n"; +} +$printit++ unless $nflag; + +$\ = "\n"; # automatically add newline on print +$n=0; + +$thumb = 0; # ARM mode by default, not Thumb. +@proc_stack = (); + +printf (" .syntax unified\n"); + +LINE: +while (<>) { + + # For ADRLs we need to add a new line after the substituted one. + $addPadding = 0; + + # First, we do not dare to touch *anything* inside double quotes, do we? + # Second, if you want a dollar character in the string, + # insert two of them -- that's how ARM C and assembler treat strings. + s/^([A-Za-z_]\w*)[ \t]+DCB[ \t]*\"/$1: .ascii \"/ && do { s/\$\$/\$/g; next }; + s/\bDCB\b[ \t]*\"/.ascii \"/ && do { s/\$\$/\$/g; next }; + s/^(\S+)\s+RN\s+(\S+)/$1 .req r$2/ && do { s/\$\$/\$/g; next }; + # If there's nothing on a line but a comment, don't try to apply any further + # substitutions (this is a cheap hack to avoid mucking up the license header) + s/^([ \t]*);/$1@/ && do { s/\$\$/\$/g; next }; + # If substituted -- leave immediately ! + + s/@/,:/; + s/;/@/; + while ( /@.*'/ ) { + s/(@.*)'/$1/g; + } + s/\{FALSE\}/0/g; + s/\{TRUE\}/1/g; + s/\{(\w\w\w\w+)\}/$1/g; + s/\bINCLUDE[ \t]*([^ \t\n]+)/.include \"$1\"/; + s/\bGET[ \t]*([^ \t\n]+)/.include \"${ my $x=$1; $x =~ s|\.s|-gnu.S|; \$x }\"/; + s/\bIMPORT\b/.extern/; + s/\bEXPORT\b\s*/.global $symprefix/; + s/^(\s+)\[/$1IF/; + s/^(\s+)\|/$1ELSE/; + s/^(\s+)\]/$1ENDIF/; + s/IF *:DEF:/ .ifdef/; + s/IF *:LNOT: *:DEF:/ .ifndef/; + s/ELSE/ .else/; + s/ENDIF/ .endif/; + + if( /\bIF\b/ ) { + s/\bIF\b/ .if/; + s/=/==/; + } + if ( $n == 2) { + s/\$/\\/g; + } + if ($n == 1) { + s/\$//g; + s/label//g; + $n = 2; + } + if ( /MACRO/ ) { + s/MACRO *\n/.macro/; + $n=1; + } + if ( /\bMEND\b/ ) { + s/\bMEND\b/.endm/; + $n=0; + } + + # ".rdata" doesn't work in 'as' version 2.13.2, as it is ".rodata" there. + # + if ( /\bAREA\b/ ) { + my $align; + $align = "2"; + if ( /ALIGN=(\d+)/ ) { + $align = $1; + } + if ( /CODE/ ) { + $nxstack = 1; + } + s/^(.+)CODE(.+)READONLY(.*)/ .text/; + s/^(.+)DATA(.+)READONLY(.*)/ .section .rdata/; + s/^(.+)\|\|\.data\|\|(.+)/ .data/; + s/^(.+)\|\|\.bss\|\|(.+)/ .bss/; + s/$/; .p2align $align/; + # Enable NEON instructions but don't produce a binary that requires + # ARMv7. RVCT does not have equivalent directives, so we just do this + # for all CODE areas. + if ( /.text/ ) { + # Separating .arch, .fpu, etc., by semicolons does not work (gas + # thinks the semicolon is part of the arch name, even when there's + # whitespace separating them). Sadly this means our line numbers + # won't match the original source file (we could use the .line + # directive, which is documented to be obsolete, but then gdb will + # show the wrong line in the translated source file). + s/$/; .arch armv7-a\n .fpu neon\n .object_arch armv4t/ unless ($apple); + } + } + + s/\|\|\.constdata\$(\d+)\|\|/.L_CONST$1/; # ||.constdata$3|| + s/\|\|\.bss\$(\d+)\|\|/.L_BSS$1/; # ||.bss$2|| + s/\|\|\.data\$(\d+)\|\|/.L_DATA$1/; # ||.data$2|| + s/\|\|([a-zA-Z0-9_]+)\@([a-zA-Z0-9_]+)\|\|/@ $&/; + s/^(\s+)\%(\s)/ .space $1/; + + s/\|(.+)\.(\d+)\|/\.$1_$2/; # |L80.123| -> .L80_123 + s/\bCODE32\b/.code 32/ && do {$thumb = 0}; + s/\bCODE16\b/.code 16/ && do {$thumb = 1}; + if (/\bPROC\b/) + { + my $prefix; + my $proc; + /^([A-Za-z_\.]\w+)\b/; + $proc = $1; + $prefix = ""; + if ($proc) + { + $prefix = $prefix.sprintf("\t.type\t%s, %%function; ",$proc) unless ($apple); + # Make sure we $prefix isn't empty here (for the $apple case). + # We handle mangling the label here, make sure it doesn't match + # the label handling below (if $prefix would be empty). + $prefix = "; "; + push(@proc_stack, $proc); + s/^[A-Za-z_\.]\w+/$symprefix$&:/; + } + $prefix = $prefix."\t.thumb_func; " if ($thumb); + s/\bPROC\b/@ $&/; + $_ = $prefix.$_; + } + s/^(\s*)(S|Q|SH|U|UQ|UH)ASX\b/$1$2ADDSUBX/; + s/^(\s*)(S|Q|SH|U|UQ|UH)SAX\b/$1$2SUBADDX/; + if (/\bENDP\b/) + { + my $proc; + s/\bENDP\b/@ $&/; + $proc = pop(@proc_stack); + $_ = "\t.size $proc, .-$proc".$_ if ($proc && !$apple); + } + s/\bSUBT\b/@ $&/; + s/\bDATA\b/@ $&/; # DATA directive is deprecated -- Asm guide, p.7-25 + s/\bKEEP\b/@ $&/; + s/\bEXPORTAS\b/@ $&/; + s/\|\|(.)+\bEQU\b/@ $&/; + s/\|\|([\w\$]+)\|\|/$1/; + s/\bENTRY\b/@ $&/; + s/\bASSERT\b/@ $&/; + s/\bGBLL\b/@ $&/; + s/\bGBLA\b/@ $&/; + s/^\W+OPT\b/@ $&/; + s/:OR:/|/g; + s/:SHL:/<>/g; + s/:AND:/&/g; + s/:LAND:/&&/g; + s/CPSR/cpsr/; + s/SPSR/spsr/; + s/ALIGN$/.balign 4/; + s/ALIGN\s+([0-9x]+)$/.balign $1/; + s/psr_cxsf/psr_all/; + s/LTORG/.ltorg/; + s/^([A-Za-z_]\w*)[ \t]+EQU/ .set $1,/; + s/^([A-Za-z_]\w*)[ \t]+SETL/ .set $1,/; + s/^([A-Za-z_]\w*)[ \t]+SETA/ .set $1,/; + s/^([A-Za-z_]\w*)[ \t]+\*/ .set $1,/; + + # {PC} + 0xdeadfeed --> . + 0xdeadfeed + s/\{PC\} \+/ \. +/; + + # Single hex constant on the line ! + # + # >>> NOTE <<< + # Double-precision floats in gcc are always mixed-endian, which means + # bytes in two words are little-endian, but words are big-endian. + # So, 0x0000deadfeed0000 would be stored as 0x0000dead at low address + # and 0xfeed0000 at high address. + # + s/\bDCFD\b[ \t]+0x([a-fA-F0-9]{8})([a-fA-F0-9]{8})/.long 0x$1, 0x$2/; + # Only decimal constants on the line, no hex ! + s/\bDCFD\b[ \t]+([0-9\.\-]+)/.double $1/; + + # Single hex constant on the line ! +# s/\bDCFS\b[ \t]+0x([a-f0-9]{8})([a-f0-9]{8})/.long 0x$1, 0x$2/; + # Only decimal constants on the line, no hex ! +# s/\bDCFS\b[ \t]+([0-9\.\-]+)/.double $1/; + s/\bDCFS[ \t]+0x/.word 0x/; + s/\bDCFS\b/.float/; + + s/^([A-Za-z_]\w*)[ \t]+DCD/$1 .word/; + s/\bDCD\b/.word/; + s/^([A-Za-z_]\w*)[ \t]+DCW/$1 .short/; + s/\bDCW\b/.short/; + s/^([A-Za-z_]\w*)[ \t]+DCB/$1 .byte/; + s/\bDCB\b/.byte/; + s/^([A-Za-z_]\w*)[ \t]+\%/.comm $1,/; + s/^[A-Za-z_\.]\w+/$&:/; + s/^(\d+)/$1:/; + s/\%(\d+)/$1b_or_f/; + s/\%[Bb](\d+)/$1b/; + s/\%[Ff](\d+)/$1f/; + s/\%[Ff][Tt](\d+)/$1f/; + s/&([\dA-Fa-f]+)/0x$1/; + if ( /\b2_[01]+\b/ ) { + s/\b2_([01]+)\b/conv$1&&&&/g; + while ( /[01][01][01][01]&&&&/ ) { + s/0000&&&&/&&&&0/g; + s/0001&&&&/&&&&1/g; + s/0010&&&&/&&&&2/g; + s/0011&&&&/&&&&3/g; + s/0100&&&&/&&&&4/g; + s/0101&&&&/&&&&5/g; + s/0110&&&&/&&&&6/g; + s/0111&&&&/&&&&7/g; + s/1000&&&&/&&&&8/g; + s/1001&&&&/&&&&9/g; + s/1010&&&&/&&&&A/g; + s/1011&&&&/&&&&B/g; + s/1100&&&&/&&&&C/g; + s/1101&&&&/&&&&D/g; + s/1110&&&&/&&&&E/g; + s/1111&&&&/&&&&F/g; + } + s/000&&&&/&&&&0/g; + s/001&&&&/&&&&1/g; + s/010&&&&/&&&&2/g; + s/011&&&&/&&&&3/g; + s/100&&&&/&&&&4/g; + s/101&&&&/&&&&5/g; + s/110&&&&/&&&&6/g; + s/111&&&&/&&&&7/g; + s/00&&&&/&&&&0/g; + s/01&&&&/&&&&1/g; + s/10&&&&/&&&&2/g; + s/11&&&&/&&&&3/g; + s/0&&&&/&&&&0/g; + s/1&&&&/&&&&1/g; + s/conv&&&&/0x/g; + } + + if ( /commandline/) + { + if( /-bigend/) + { + $bigend=1; + } + } + + if ( /\bDCDU\b/ ) + { + my $cmd=$_; + my $value; + my $prefix; + my $w1; + my $w2; + my $w3; + my $w4; + + s/\s+DCDU\b/@ $&/; + + $cmd =~ /\bDCDU\b\s+0x(\d+)/; + $value = $1; + $value =~ /(\w\w)(\w\w)(\w\w)(\w\w)/; + $w1 = $1; + $w2 = $2; + $w3 = $3; + $w4 = $4; + + if( $bigend ne "") + { + # big endian + $prefix = "\t.byte\t0x".$w1.";". + "\t.byte\t0x".$w2.";". + "\t.byte\t0x".$w3.";". + "\t.byte\t0x".$w4."; "; + } + else + { + # little endian + $prefix = "\t.byte\t0x".$w4.";". + "\t.byte\t0x".$w3.";". + "\t.byte\t0x".$w2.";". + "\t.byte\t0x".$w1."; "; + } + $_=$prefix.$_; + } + + if ( /\badrl\b/i ) + { + s/\badrl\s+(\w+)\s*,\s*(\w+)/ldr $1,=$2/i; + $addPadding = 1; + } + s/\bEND\b/@ END/; +} continue { + printf ("%s", $_) if $printit; + if ($addPadding != 0) + { + printf (" mov r0,r0\n"); + $addPadding = 0; + } +} +#If we had a code section, mark that this object doesn't need an executable +# stack. +if ($nxstack && !$apple) { + printf (" .section\t.note.GNU-stack,\"\",\%\%progbits\n"); +} diff --git a/asm/libs/opus/celt/arm/arm_celt_map.c b/asm/libs/opus/celt/arm/arm_celt_map.c new file mode 100644 index 00000000..ee6c2447 --- /dev/null +++ b/asm/libs/opus/celt/arm/arm_celt_map.c @@ -0,0 +1,121 @@ +/* Copyright (c) 2010 Xiph.Org Foundation + * Copyright (c) 2013 Parrot */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "pitch.h" +#include "kiss_fft.h" +#include "mdct.h" + +#if defined(OPUS_HAVE_RTCD) + +# if defined(FIXED_POINT) +opus_val32 (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *, + const opus_val16 *, opus_val32 *, int , int) = { + celt_pitch_xcorr_c, /* ARMv4 */ + MAY_HAVE_EDSP(celt_pitch_xcorr), /* EDSP */ + MAY_HAVE_MEDIA(celt_pitch_xcorr), /* Media */ + MAY_HAVE_NEON(celt_pitch_xcorr) /* NEON */ +}; +# else /* !FIXED_POINT */ +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +void (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *, + const opus_val16 *, opus_val32 *, int, int) = { + celt_pitch_xcorr_c, /* ARMv4 */ + celt_pitch_xcorr_c, /* EDSP */ + celt_pitch_xcorr_c, /* Media */ + celt_pitch_xcorr_float_neon /* Neon */ +}; +# endif +# endif /* FIXED_POINT */ + +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# if defined(HAVE_ARM_NE10) +# if defined(CUSTOM_MODES) +int (*const OPUS_FFT_ALLOC_ARCH_IMPL[OPUS_ARCHMASK+1])(kiss_fft_state *st) = { + opus_fft_alloc_arch_c, /* ARMv4 */ + opus_fft_alloc_arch_c, /* EDSP */ + opus_fft_alloc_arch_c, /* Media */ + opus_fft_alloc_arm_neon /* Neon with NE10 library support */ +}; + +void (*const OPUS_FFT_FREE_ARCH_IMPL[OPUS_ARCHMASK+1])(kiss_fft_state *st) = { + opus_fft_free_arch_c, /* ARMv4 */ + opus_fft_free_arch_c, /* EDSP */ + opus_fft_free_arch_c, /* Media */ + opus_fft_free_arm_neon /* Neon with NE10 */ +}; +# endif /* CUSTOM_MODES */ + +void (*const OPUS_FFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, + const kiss_fft_cpx *fin, + kiss_fft_cpx *fout) = { + opus_fft_c, /* ARMv4 */ + opus_fft_c, /* EDSP */ + opus_fft_c, /* Media */ + opus_fft_neon /* Neon with NE10 */ +}; + +void (*const OPUS_IFFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, + const kiss_fft_cpx *fin, + kiss_fft_cpx *fout) = { + opus_ifft_c, /* ARMv4 */ + opus_ifft_c, /* EDSP */ + opus_ifft_c, /* Media */ + opus_ifft_neon /* Neon with NE10 */ +}; + +void (*const CLT_MDCT_FORWARD_IMPL[OPUS_ARCHMASK+1])(const mdct_lookup *l, + kiss_fft_scalar *in, + kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 *window, + int overlap, int shift, + int stride, int arch) = { + clt_mdct_forward_c, /* ARMv4 */ + clt_mdct_forward_c, /* EDSP */ + clt_mdct_forward_c, /* Media */ + clt_mdct_forward_neon /* Neon with NE10 */ +}; + +void (*const CLT_MDCT_BACKWARD_IMPL[OPUS_ARCHMASK+1])(const mdct_lookup *l, + kiss_fft_scalar *in, + kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 *window, + int overlap, int shift, + int stride, int arch) = { + clt_mdct_backward_c, /* ARMv4 */ + clt_mdct_backward_c, /* EDSP */ + clt_mdct_backward_c, /* Media */ + clt_mdct_backward_neon /* Neon with NE10 */ +}; + +# endif /* HAVE_ARM_NE10 */ +# endif /* OPUS_ARM_MAY_HAVE_NEON_INTR */ + +#endif /* OPUS_HAVE_RTCD */ diff --git a/asm/libs/opus/celt/arm/armcpu.c b/asm/libs/opus/celt/arm/armcpu.c new file mode 100644 index 00000000..5e5d10c3 --- /dev/null +++ b/asm/libs/opus/celt/arm/armcpu.c @@ -0,0 +1,174 @@ +/* Copyright (c) 2010 Xiph.Org Foundation + * Copyright (c) 2013 Parrot */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* Original code from libtheora modified to suit to Opus */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef OPUS_HAVE_RTCD + +#include "armcpu.h" +#include "cpu_support.h" +#include "os_support.h" +#include "opus_types.h" + +#define OPUS_CPU_ARM_V4 (1) +#define OPUS_CPU_ARM_EDSP (1<<1) +#define OPUS_CPU_ARM_MEDIA (1<<2) +#define OPUS_CPU_ARM_NEON (1<<3) + +#if defined(_MSC_VER) +/*For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.*/ +# define WIN32_LEAN_AND_MEAN +# define WIN32_EXTRA_LEAN +# include + +static OPUS_INLINE opus_uint32 opus_cpu_capabilities(void){ + opus_uint32 flags; + flags=0; + /* MSVC has no OPUS_INLINE __asm support for ARM, but it does let you __emit + * instructions via their assembled hex code. + * All of these instructions should be essentially nops. */ +# if defined(OPUS_ARM_MAY_HAVE_EDSP) + __try{ + /*PLD [r13]*/ + __emit(0xF5DDF000); + flags|=OPUS_CPU_ARM_EDSP; + } + __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){ + /*Ignore exception.*/ + } +# if defined(OPUS_ARM_MAY_HAVE_MEDIA) + __try{ + /*SHADD8 r3,r3,r3*/ + __emit(0xE6333F93); + flags|=OPUS_CPU_ARM_MEDIA; + } + __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){ + /*Ignore exception.*/ + } +# if defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) + __try{ + /*VORR q0,q0,q0*/ + __emit(0xF2200150); + flags|=OPUS_CPU_ARM_NEON; + } + __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){ + /*Ignore exception.*/ + } +# endif +# endif +# endif + return flags; +} + +#elif defined(__linux__) +/* Linux based */ +opus_uint32 opus_cpu_capabilities(void) +{ + opus_uint32 flags = 0; + FILE *cpuinfo; + + /* Reading /proc/self/auxv would be easier, but that doesn't work reliably on + * Android */ + cpuinfo = fopen("/proc/cpuinfo", "r"); + + if(cpuinfo != NULL) + { + /* 512 should be enough for anybody (it's even enough for all the flags that + * x86 has accumulated... so far). */ + char buf[512]; + + while(fgets(buf, 512, cpuinfo) != NULL) + { +# if defined(OPUS_ARM_MAY_HAVE_EDSP) || defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) + /* Search for edsp and neon flag */ + if(memcmp(buf, "Features", 8) == 0) + { + char *p; +# if defined(OPUS_ARM_MAY_HAVE_EDSP) + p = strstr(buf, " edsp"); + if(p != NULL && (p[5] == ' ' || p[5] == '\n')) + flags |= OPUS_CPU_ARM_EDSP; +# endif + +# if defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) + p = strstr(buf, " neon"); + if(p != NULL && (p[5] == ' ' || p[5] == '\n')) + flags |= OPUS_CPU_ARM_NEON; +# endif + } +# endif + +# if defined(OPUS_ARM_MAY_HAVE_MEDIA) + /* Search for media capabilities (>= ARMv6) */ + if(memcmp(buf, "CPU architecture:", 17) == 0) + { + int version; + version = atoi(buf+17); + + if(version >= 6) + flags |= OPUS_CPU_ARM_MEDIA; + } +# endif + } + + fclose(cpuinfo); + } + return flags; +} +#else +/* The feature registers which can tell us what the processor supports are + * accessible in priveleged modes only, so we can't have a general user-space + * detection method like on x86.*/ +# error "Configured to use ARM asm but no CPU detection method available for " \ + "your platform. Reconfigure with --disable-rtcd (or send patches)." +#endif + +int opus_select_arch(void) +{ + opus_uint32 flags = opus_cpu_capabilities(); + int arch = 0; + + if(!(flags & OPUS_CPU_ARM_EDSP)) + return arch; + arch++; + + if(!(flags & OPUS_CPU_ARM_MEDIA)) + return arch; + arch++; + + if(!(flags & OPUS_CPU_ARM_NEON)) + return arch; + arch++; + + return arch; +} + +#endif diff --git a/asm/libs/opus/celt/arm/armcpu.h b/asm/libs/opus/celt/arm/armcpu.h new file mode 100644 index 00000000..ac574460 --- /dev/null +++ b/asm/libs/opus/celt/arm/armcpu.h @@ -0,0 +1,71 @@ +/* Copyright (c) 2010 Xiph.Org Foundation + * Copyright (c) 2013 Parrot */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#if !defined(ARMCPU_H) +# define ARMCPU_H + +# if defined(OPUS_ARM_MAY_HAVE_EDSP) +# define MAY_HAVE_EDSP(name) name ## _edsp +# else +# define MAY_HAVE_EDSP(name) name ## _c +# endif + +# if defined(OPUS_ARM_MAY_HAVE_MEDIA) +# define MAY_HAVE_MEDIA(name) name ## _media +# else +# define MAY_HAVE_MEDIA(name) MAY_HAVE_EDSP(name) +# endif + +# if defined(OPUS_ARM_MAY_HAVE_NEON) +# define MAY_HAVE_NEON(name) name ## _neon +# else +# define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name) +# endif + +# if defined(OPUS_ARM_PRESUME_EDSP) +# define PRESUME_EDSP(name) name ## _edsp +# else +# define PRESUME_EDSP(name) name ## _c +# endif + +# if defined(OPUS_ARM_PRESUME_MEDIA) +# define PRESUME_MEDIA(name) name ## _media +# else +# define PRESUME_MEDIA(name) PRESUME_EDSP(name) +# endif + +# if defined(OPUS_ARM_PRESUME_NEON) +# define PRESUME_NEON(name) name ## _neon +# else +# define PRESUME_NEON(name) PRESUME_MEDIA(name) +# endif + +# if defined(OPUS_HAVE_RTCD) +int opus_select_arch(void); +# endif + +#endif diff --git a/asm/libs/opus/celt/arm/armopts.s b/asm/libs/opus/celt/arm/armopts.s new file mode 100644 index 00000000..fb919607 --- /dev/null +++ b/asm/libs/opus/celt/arm/armopts.s @@ -0,0 +1,37 @@ +/* Copyright (C) 2013 Mozilla Corporation */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +; Set the following to 1 if we have EDSP instructions +; (LDRD/STRD, etc., ARMv5E and later). +OPUS_ARM_MAY_HAVE_EDSP * + +; Set the following to 1 if we have ARMv6 media instructions. +OPUS_ARM_MAY_HAVE_MEDIA * + +; Set the following to 1 if we have NEON (some ARMv7) +OPUS_ARM_MAY_HAVE_NEON * + +END diff --git a/asm/libs/opus/celt/arm/armopts.s.in b/asm/libs/opus/celt/arm/armopts.s.in new file mode 100644 index 00000000..3d8aaf27 --- /dev/null +++ b/asm/libs/opus/celt/arm/armopts.s.in @@ -0,0 +1,37 @@ +/* Copyright (C) 2013 Mozilla Corporation */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +; Set the following to 1 if we have EDSP instructions +; (LDRD/STRD, etc., ARMv5E and later). +OPUS_ARM_MAY_HAVE_EDSP * @OPUS_ARM_MAY_HAVE_EDSP@ + +; Set the following to 1 if we have ARMv6 media instructions. +OPUS_ARM_MAY_HAVE_MEDIA * @OPUS_ARM_MAY_HAVE_MEDIA@ + +; Set the following to 1 if we have NEON (some ARMv7) +OPUS_ARM_MAY_HAVE_NEON * @OPUS_ARM_MAY_HAVE_NEON@ + +END diff --git a/asm/libs/opus/celt/arm/celt_ne10_fft.c b/asm/libs/opus/celt/arm/celt_ne10_fft.c new file mode 100644 index 00000000..42d96a71 --- /dev/null +++ b/asm/libs/opus/celt/arm/celt_ne10_fft.c @@ -0,0 +1,174 @@ +/* Copyright (c) 2015 Xiph.Org Foundation + Written by Viswanath Puttagunta */ +/** + @file celt_ne10_fft.c + @brief ARM Neon optimizations for fft using NE10 library + */ + +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef SKIP_CONFIG_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#endif + +#include +#include +#include "os_support.h" +#include "kiss_fft.h" +#include "stack_alloc.h" + +#if !defined(FIXED_POINT) +# define NE10_FFT_ALLOC_C2C_TYPE_NEON ne10_fft_alloc_c2c_float32_neon +# define NE10_FFT_CFG_TYPE_T ne10_fft_cfg_float32_t +# define NE10_FFT_STATE_TYPE_T ne10_fft_state_float32_t +# define NE10_FFT_DESTROY_C2C_TYPE ne10_fft_destroy_c2c_float32 +# define NE10_FFT_CPX_TYPE_T ne10_fft_cpx_float32_t +# define NE10_FFT_C2C_1D_TYPE_NEON ne10_fft_c2c_1d_float32_neon +#else +# define NE10_FFT_ALLOC_C2C_TYPE_NEON(nfft) ne10_fft_alloc_c2c_int32_neon(nfft) +# define NE10_FFT_CFG_TYPE_T ne10_fft_cfg_int32_t +# define NE10_FFT_STATE_TYPE_T ne10_fft_state_int32_t +# define NE10_FFT_DESTROY_C2C_TYPE ne10_fft_destroy_c2c_int32 +# define NE10_FFT_DESTROY_C2C_TYPE ne10_fft_destroy_c2c_int32 +# define NE10_FFT_CPX_TYPE_T ne10_fft_cpx_int32_t +# define NE10_FFT_C2C_1D_TYPE_NEON ne10_fft_c2c_1d_int32_neon +#endif + +#if defined(CUSTOM_MODES) + +/* nfft lengths in NE10 that support scaled fft */ +# define NE10_FFTSCALED_SUPPORT_MAX 4 +static const int ne10_fft_scaled_support[NE10_FFTSCALED_SUPPORT_MAX] = { + 480, 240, 120, 60 +}; + +int opus_fft_alloc_arm_neon(kiss_fft_state *st) +{ + int i; + size_t memneeded = sizeof(struct arch_fft_state); + + st->arch_fft = (arch_fft_state *)opus_alloc(memneeded); + if (!st->arch_fft) + return -1; + + for (i = 0; i < NE10_FFTSCALED_SUPPORT_MAX; i++) { + if(st->nfft == ne10_fft_scaled_support[i]) + break; + } + if (i == NE10_FFTSCALED_SUPPORT_MAX) { + /* This nfft length (scaled fft) is not supported in NE10 */ + st->arch_fft->is_supported = 0; + st->arch_fft->priv = NULL; + } + else { + st->arch_fft->is_supported = 1; + st->arch_fft->priv = (void *)NE10_FFT_ALLOC_C2C_TYPE_NEON(st->nfft); + if (st->arch_fft->priv == NULL) { + return -1; + } + } + return 0; +} + +void opus_fft_free_arm_neon(kiss_fft_state *st) +{ + NE10_FFT_CFG_TYPE_T cfg; + + if (!st->arch_fft) + return; + + cfg = (NE10_FFT_CFG_TYPE_T)st->arch_fft->priv; + if (cfg) + NE10_FFT_DESTROY_C2C_TYPE(cfg); + opus_free(st->arch_fft); +} +#endif + +void opus_fft_neon(const kiss_fft_state *st, + const kiss_fft_cpx *fin, + kiss_fft_cpx *fout) +{ + NE10_FFT_STATE_TYPE_T state; + NE10_FFT_CFG_TYPE_T cfg = &state; + VARDECL(NE10_FFT_CPX_TYPE_T, buffer); + SAVE_STACK; + ALLOC(buffer, st->nfft, NE10_FFT_CPX_TYPE_T); + + if (!st->arch_fft->is_supported) { + /* This nfft length (scaled fft) not supported in NE10 */ + opus_fft_c(st, fin, fout); + } + else { + memcpy((void *)cfg, st->arch_fft->priv, sizeof(NE10_FFT_STATE_TYPE_T)); + state.buffer = (NE10_FFT_CPX_TYPE_T *)&buffer[0]; +#if !defined(FIXED_POINT) + state.is_forward_scaled = 1; + + NE10_FFT_C2C_1D_TYPE_NEON((NE10_FFT_CPX_TYPE_T *)fout, + (NE10_FFT_CPX_TYPE_T *)fin, + cfg, 0); +#else + NE10_FFT_C2C_1D_TYPE_NEON((NE10_FFT_CPX_TYPE_T *)fout, + (NE10_FFT_CPX_TYPE_T *)fin, + cfg, 0, 1); +#endif + } + RESTORE_STACK; +} + +void opus_ifft_neon(const kiss_fft_state *st, + const kiss_fft_cpx *fin, + kiss_fft_cpx *fout) +{ + NE10_FFT_STATE_TYPE_T state; + NE10_FFT_CFG_TYPE_T cfg = &state; + VARDECL(NE10_FFT_CPX_TYPE_T, buffer); + SAVE_STACK; + ALLOC(buffer, st->nfft, NE10_FFT_CPX_TYPE_T); + + if (!st->arch_fft->is_supported) { + /* This nfft length (scaled fft) not supported in NE10 */ + opus_ifft_c(st, fin, fout); + } + else { + memcpy((void *)cfg, st->arch_fft->priv, sizeof(NE10_FFT_STATE_TYPE_T)); + state.buffer = (NE10_FFT_CPX_TYPE_T *)&buffer[0]; +#if !defined(FIXED_POINT) + state.is_backward_scaled = 0; + + NE10_FFT_C2C_1D_TYPE_NEON((NE10_FFT_CPX_TYPE_T *)fout, + (NE10_FFT_CPX_TYPE_T *)fin, + cfg, 1); +#else + NE10_FFT_C2C_1D_TYPE_NEON((NE10_FFT_CPX_TYPE_T *)fout, + (NE10_FFT_CPX_TYPE_T *)fin, + cfg, 1, 0); +#endif + } + RESTORE_STACK; +} diff --git a/asm/libs/opus/celt/arm/celt_ne10_mdct.c b/asm/libs/opus/celt/arm/celt_ne10_mdct.c new file mode 100644 index 00000000..293c3efd --- /dev/null +++ b/asm/libs/opus/celt/arm/celt_ne10_mdct.c @@ -0,0 +1,258 @@ +/* Copyright (c) 2015 Xiph.Org Foundation + Written by Viswanath Puttagunta */ +/** + @file celt_ne10_mdct.c + @brief ARM Neon optimizations for mdct using NE10 library + */ + +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef SKIP_CONFIG_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#endif + +#include "kiss_fft.h" +#include "_kiss_fft_guts.h" +#include "mdct.h" +#include "stack_alloc.h" + +void clt_mdct_forward_neon(const mdct_lookup *l, + kiss_fft_scalar *in, + kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 *window, + int overlap, int shift, int stride, int arch) +{ + int i; + int N, N2, N4; + VARDECL(kiss_fft_scalar, f); + VARDECL(kiss_fft_cpx, f2); + const kiss_fft_state *st = l->kfft[shift]; + const kiss_twiddle_scalar *trig; + + SAVE_STACK; + + N = l->n; + trig = l->trig; + for (i=0;i>= 1; + trig += N; + } + N2 = N>>1; + N4 = N>>2; + + ALLOC(f, N2, kiss_fft_scalar); + ALLOC(f2, N4, kiss_fft_cpx); + + /* Consider the input to be composed of four blocks: [a, b, c, d] */ + /* Window, shuffle, fold */ + { + /* Temp pointers to make it really clear to the compiler what we're doing */ + const kiss_fft_scalar * OPUS_RESTRICT xp1 = in+(overlap>>1); + const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+N2-1+(overlap>>1); + kiss_fft_scalar * OPUS_RESTRICT yp = f; + const opus_val16 * OPUS_RESTRICT wp1 = window+(overlap>>1); + const opus_val16 * OPUS_RESTRICT wp2 = window+(overlap>>1)-1; + for(i=0;i<((overlap+3)>>2);i++) + { + /* Real part arranged as -d-cR, Imag part arranged as -b+aR*/ + *yp++ = MULT16_32_Q15(*wp2, xp1[N2]) + MULT16_32_Q15(*wp1,*xp2); + *yp++ = MULT16_32_Q15(*wp1, *xp1) - MULT16_32_Q15(*wp2, xp2[-N2]); + xp1+=2; + xp2-=2; + wp1+=2; + wp2-=2; + } + wp1 = window; + wp2 = window+overlap-1; + for(;i>2);i++) + { + /* Real part arranged as a-bR, Imag part arranged as -c-dR */ + *yp++ = *xp2; + *yp++ = *xp1; + xp1+=2; + xp2-=2; + } + for(;ii,t[N4+i]) - S_MUL(fp->r,t[i]); + yi = S_MUL(fp->r,t[N4+i]) + S_MUL(fp->i,t[i]); + *yp1 = yr; + *yp2 = yi; + fp++; + yp1 += 2*stride; + yp2 -= 2*stride; + } + } + RESTORE_STACK; +} + +void clt_mdct_backward_neon(const mdct_lookup *l, + kiss_fft_scalar *in, + kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 * OPUS_RESTRICT window, + int overlap, int shift, int stride, int arch) +{ + int i; + int N, N2, N4; + VARDECL(kiss_fft_scalar, f); + const kiss_twiddle_scalar *trig; + const kiss_fft_state *st = l->kfft[shift]; + + N = l->n; + trig = l->trig; + for (i=0;i>= 1; + trig += N; + } + N2 = N>>1; + N4 = N>>2; + + ALLOC(f, N2, kiss_fft_scalar); + + /* Pre-rotate */ + { + /* Temp pointers to make it really clear to the compiler what we're doing */ + const kiss_fft_scalar * OPUS_RESTRICT xp1 = in; + const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+stride*(N2-1); + kiss_fft_scalar * OPUS_RESTRICT yp = f; + const kiss_twiddle_scalar * OPUS_RESTRICT t = &trig[0]; + for(i=0;i>1)), arch); + + /* Post-rotate and de-shuffle from both ends of the buffer at once to make + it in-place. */ + { + kiss_fft_scalar * yp0 = out+(overlap>>1); + kiss_fft_scalar * yp1 = out+(overlap>>1)+N2-2; + const kiss_twiddle_scalar *t = &trig[0]; + /* Loop to (N4+1)>>1 to handle odd N4. When N4 is odd, the + middle pair will be computed twice. */ + for(i=0;i<(N4+1)>>1;i++) + { + kiss_fft_scalar re, im, yr, yi; + kiss_twiddle_scalar t0, t1; + re = yp0[0]; + im = yp0[1]; + t0 = t[i]; + t1 = t[N4+i]; + /* We'd scale up by 2 here, but instead it's done when mixing the windows */ + yr = S_MUL(re,t0) + S_MUL(im,t1); + yi = S_MUL(re,t1) - S_MUL(im,t0); + re = yp1[0]; + im = yp1[1]; + yp0[0] = yr; + yp1[1] = yi; + + t0 = t[(N4-i-1)]; + t1 = t[(N2-i-1)]; + /* We'd scale up by 2 here, but instead it's done when mixing the windows */ + yr = S_MUL(re,t0) + S_MUL(im,t1); + yi = S_MUL(re,t1) - S_MUL(im,t0); + yp1[0] = yr; + yp0[1] = yi; + yp0 += 2; + yp1 -= 2; + } + } + + /* Mirror on both sides for TDAC */ + { + kiss_fft_scalar * OPUS_RESTRICT xp1 = out+overlap-1; + kiss_fft_scalar * OPUS_RESTRICT yp1 = out; + const opus_val16 * OPUS_RESTRICT wp1 = window; + const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; + + for(i = 0; i < overlap/2; i++) + { + kiss_fft_scalar x1, x2; + x1 = *xp1; + x2 = *yp1; + *yp1++ = MULT16_32_Q15(*wp2, x2) - MULT16_32_Q15(*wp1, x1); + *xp1-- = MULT16_32_Q15(*wp1, x2) + MULT16_32_Q15(*wp2, x1); + wp1++; + wp2--; + } + } + RESTORE_STACK; +} diff --git a/asm/libs/opus/celt/arm/celt_neon_intr.c b/asm/libs/opus/celt/arm/celt_neon_intr.c new file mode 100644 index 00000000..47dce15b --- /dev/null +++ b/asm/libs/opus/celt/arm/celt_neon_intr.c @@ -0,0 +1,252 @@ +/* Copyright (c) 2014-2015 Xiph.Org Foundation + Written by Viswanath Puttagunta */ +/** + @file celt_neon_intr.c + @brief ARM Neon Intrinsic optimizations for celt + */ + +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "../pitch.h" + +#if !defined(FIXED_POINT) +/* + * Function: xcorr_kernel_neon_float + * --------------------------------- + * Computes 4 correlation values and stores them in sum[4] + */ +static void xcorr_kernel_neon_float(const float32_t *x, const float32_t *y, + float32_t sum[4], int len) { + float32x4_t YY[3]; + float32x4_t YEXT[3]; + float32x4_t XX[2]; + float32x2_t XX_2; + float32x4_t SUMM; + const float32_t *xi = x; + const float32_t *yi = y; + + celt_assert(len>0); + + YY[0] = vld1q_f32(yi); + SUMM = vdupq_n_f32(0); + + /* Consume 8 elements in x vector and 12 elements in y + * vector. However, the 12'th element never really gets + * touched in this loop. So, if len == 8, then we only + * must access y[0] to y[10]. y[11] must not be accessed + * hence make sure len > 8 and not len >= 8 + */ + while (len > 8) { + yi += 4; + YY[1] = vld1q_f32(yi); + yi += 4; + YY[2] = vld1q_f32(yi); + + XX[0] = vld1q_f32(xi); + xi += 4; + XX[1] = vld1q_f32(xi); + xi += 4; + + SUMM = vmlaq_lane_f32(SUMM, YY[0], vget_low_f32(XX[0]), 0); + YEXT[0] = vextq_f32(YY[0], YY[1], 1); + SUMM = vmlaq_lane_f32(SUMM, YEXT[0], vget_low_f32(XX[0]), 1); + YEXT[1] = vextq_f32(YY[0], YY[1], 2); + SUMM = vmlaq_lane_f32(SUMM, YEXT[1], vget_high_f32(XX[0]), 0); + YEXT[2] = vextq_f32(YY[0], YY[1], 3); + SUMM = vmlaq_lane_f32(SUMM, YEXT[2], vget_high_f32(XX[0]), 1); + + SUMM = vmlaq_lane_f32(SUMM, YY[1], vget_low_f32(XX[1]), 0); + YEXT[0] = vextq_f32(YY[1], YY[2], 1); + SUMM = vmlaq_lane_f32(SUMM, YEXT[0], vget_low_f32(XX[1]), 1); + YEXT[1] = vextq_f32(YY[1], YY[2], 2); + SUMM = vmlaq_lane_f32(SUMM, YEXT[1], vget_high_f32(XX[1]), 0); + YEXT[2] = vextq_f32(YY[1], YY[2], 3); + SUMM = vmlaq_lane_f32(SUMM, YEXT[2], vget_high_f32(XX[1]), 1); + + YY[0] = YY[2]; + len -= 8; + } + + /* Consume 4 elements in x vector and 8 elements in y + * vector. However, the 8'th element in y never really gets + * touched in this loop. So, if len == 4, then we only + * must access y[0] to y[6]. y[7] must not be accessed + * hence make sure len>4 and not len>=4 + */ + if (len > 4) { + yi += 4; + YY[1] = vld1q_f32(yi); + + XX[0] = vld1q_f32(xi); + xi += 4; + + SUMM = vmlaq_lane_f32(SUMM, YY[0], vget_low_f32(XX[0]), 0); + YEXT[0] = vextq_f32(YY[0], YY[1], 1); + SUMM = vmlaq_lane_f32(SUMM, YEXT[0], vget_low_f32(XX[0]), 1); + YEXT[1] = vextq_f32(YY[0], YY[1], 2); + SUMM = vmlaq_lane_f32(SUMM, YEXT[1], vget_high_f32(XX[0]), 0); + YEXT[2] = vextq_f32(YY[0], YY[1], 3); + SUMM = vmlaq_lane_f32(SUMM, YEXT[2], vget_high_f32(XX[0]), 1); + + YY[0] = YY[1]; + len -= 4; + } + + while (--len > 0) { + XX_2 = vld1_dup_f32(xi++); + SUMM = vmlaq_lane_f32(SUMM, YY[0], XX_2, 0); + YY[0]= vld1q_f32(++yi); + } + + XX_2 = vld1_dup_f32(xi); + SUMM = vmlaq_lane_f32(SUMM, YY[0], XX_2, 0); + + vst1q_f32(sum, SUMM); +} + +/* + * Function: xcorr_kernel_neon_float_process1 + * --------------------------------- + * Computes single correlation values and stores in *sum + */ +static void xcorr_kernel_neon_float_process1(const float32_t *x, + const float32_t *y, float32_t *sum, int len) { + float32x4_t XX[4]; + float32x4_t YY[4]; + float32x2_t XX_2; + float32x2_t YY_2; + float32x4_t SUMM; + float32x2_t SUMM_2[2]; + const float32_t *xi = x; + const float32_t *yi = y; + + SUMM = vdupq_n_f32(0); + + /* Work on 16 values per iteration */ + while (len >= 16) { + XX[0] = vld1q_f32(xi); + xi += 4; + XX[1] = vld1q_f32(xi); + xi += 4; + XX[2] = vld1q_f32(xi); + xi += 4; + XX[3] = vld1q_f32(xi); + xi += 4; + + YY[0] = vld1q_f32(yi); + yi += 4; + YY[1] = vld1q_f32(yi); + yi += 4; + YY[2] = vld1q_f32(yi); + yi += 4; + YY[3] = vld1q_f32(yi); + yi += 4; + + SUMM = vmlaq_f32(SUMM, YY[0], XX[0]); + SUMM = vmlaq_f32(SUMM, YY[1], XX[1]); + SUMM = vmlaq_f32(SUMM, YY[2], XX[2]); + SUMM = vmlaq_f32(SUMM, YY[3], XX[3]); + len -= 16; + } + + /* Work on 8 values */ + if (len >= 8) { + XX[0] = vld1q_f32(xi); + xi += 4; + XX[1] = vld1q_f32(xi); + xi += 4; + + YY[0] = vld1q_f32(yi); + yi += 4; + YY[1] = vld1q_f32(yi); + yi += 4; + + SUMM = vmlaq_f32(SUMM, YY[0], XX[0]); + SUMM = vmlaq_f32(SUMM, YY[1], XX[1]); + len -= 8; + } + + /* Work on 4 values */ + if (len >= 4) { + XX[0] = vld1q_f32(xi); + xi += 4; + YY[0] = vld1q_f32(yi); + yi += 4; + SUMM = vmlaq_f32(SUMM, YY[0], XX[0]); + len -= 4; + } + + /* Start accumulating results */ + SUMM_2[0] = vget_low_f32(SUMM); + if (len >= 2) { + /* While at it, consume 2 more values if available */ + XX_2 = vld1_f32(xi); + xi += 2; + YY_2 = vld1_f32(yi); + yi += 2; + SUMM_2[0] = vmla_f32(SUMM_2[0], YY_2, XX_2); + len -= 2; + } + SUMM_2[1] = vget_high_f32(SUMM); + SUMM_2[0] = vadd_f32(SUMM_2[0], SUMM_2[1]); + SUMM_2[0] = vpadd_f32(SUMM_2[0], SUMM_2[0]); + /* Ok, now we have result accumulated in SUMM_2[0].0 */ + + if (len > 0) { + /* Case when you have one value left */ + XX_2 = vld1_dup_f32(xi); + YY_2 = vld1_dup_f32(yi); + SUMM_2[0] = vmla_f32(SUMM_2[0], XX_2, YY_2); + } + + vst1_lane_f32(sum, SUMM_2[0], 0); +} + +void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y, + opus_val32 *xcorr, int len, int max_pitch) { + int i; + celt_assert(max_pitch > 0); + celt_assert((((unsigned char *)_x-(unsigned char *)NULL)&3)==0); + + for (i = 0; i < (max_pitch-3); i += 4) { + xcorr_kernel_neon_float((const float32_t *)_x, (const float32_t *)_y+i, + (float32_t *)xcorr+i, len); + } + + /* In case max_pitch isn't multiple of 4 + * compute single correlation value per iteration + */ + for (; i < max_pitch; i++) { + xcorr_kernel_neon_float_process1((const float32_t *)_x, + (const float32_t *)_y+i, (float32_t *)xcorr+i, len); + } +} +#endif diff --git a/asm/libs/opus/celt/arm/celt_pitch_xcorr_arm.s b/asm/libs/opus/celt/arm/celt_pitch_xcorr_arm.s new file mode 100644 index 00000000..f96e0a88 --- /dev/null +++ b/asm/libs/opus/celt/arm/celt_pitch_xcorr_arm.s @@ -0,0 +1,547 @@ +; Copyright (c) 2007-2008 CSIRO +; Copyright (c) 2007-2009 Xiph.Org Foundation +; Copyright (c) 2013 Parrot +; Written by Aurélien Zanelli +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; - Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; +; - Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in the +; documentation and/or other materials provided with the distribution. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +; OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + AREA |.text|, CODE, READONLY + + GET celt/arm/armopts.s + +IF OPUS_ARM_MAY_HAVE_EDSP + EXPORT celt_pitch_xcorr_edsp +ENDIF + +IF OPUS_ARM_MAY_HAVE_NEON + EXPORT celt_pitch_xcorr_neon +ENDIF + +IF OPUS_ARM_MAY_HAVE_NEON + +; Compute sum[k]=sum(x[j]*y[j+k],j=0...len-1), k=0...3 +xcorr_kernel_neon PROC +xcorr_kernel_neon_start + ; input: + ; r3 = int len + ; r4 = opus_val16 *x + ; r5 = opus_val16 *y + ; q0 = opus_val32 sum[4] + ; output: + ; q0 = opus_val32 sum[4] + ; preserved: r0-r3, r6-r11, d2, q4-q7, q9-q15 + ; internal usage: + ; r12 = int j + ; d3 = y_3|y_2|y_1|y_0 + ; q2 = y_B|y_A|y_9|y_8|y_7|y_6|y_5|y_4 + ; q3 = x_7|x_6|x_5|x_4|x_3|x_2|x_1|x_0 + ; q8 = scratch + ; + ; Load y[0...3] + ; This requires len>0 to always be valid (which we assert in the C code). + VLD1.16 {d5}, [r5]! + SUBS r12, r3, #8 + BLE xcorr_kernel_neon_process4 +; Process 8 samples at a time. +; This loop loads one y value more than we actually need. Therefore we have to +; stop as soon as there are 8 or fewer samples left (instead of 7), to avoid +; reading past the end of the array. +xcorr_kernel_neon_process8 + ; This loop has 19 total instructions (10 cycles to issue, minimum), with + ; - 2 cycles of ARM insrtuctions, + ; - 10 cycles of load/store/byte permute instructions, and + ; - 9 cycles of data processing instructions. + ; On a Cortex A8, we dual-issue the maximum amount (9 cycles) between the + ; latter two categories, meaning the whole loop should run in 10 cycles per + ; iteration, barring cache misses. + ; + ; Load x[0...7] + VLD1.16 {d6, d7}, [r4]! + ; Unlike VMOV, VAND is a data processsing instruction (and doesn't get + ; assembled to VMOV, like VORR would), so it dual-issues with the prior VLD1. + VAND d3, d5, d5 + SUBS r12, r12, #8 + ; Load y[4...11] + VLD1.16 {d4, d5}, [r5]! + VMLAL.S16 q0, d3, d6[0] + VEXT.16 d16, d3, d4, #1 + VMLAL.S16 q0, d4, d7[0] + VEXT.16 d17, d4, d5, #1 + VMLAL.S16 q0, d16, d6[1] + VEXT.16 d16, d3, d4, #2 + VMLAL.S16 q0, d17, d7[1] + VEXT.16 d17, d4, d5, #2 + VMLAL.S16 q0, d16, d6[2] + VEXT.16 d16, d3, d4, #3 + VMLAL.S16 q0, d17, d7[2] + VEXT.16 d17, d4, d5, #3 + VMLAL.S16 q0, d16, d6[3] + VMLAL.S16 q0, d17, d7[3] + BGT xcorr_kernel_neon_process8 +; Process 4 samples here if we have > 4 left (still reading one extra y value). +xcorr_kernel_neon_process4 + ADDS r12, r12, #4 + BLE xcorr_kernel_neon_process2 + ; Load x[0...3] + VLD1.16 d6, [r4]! + ; Use VAND since it's a data processing instruction again. + VAND d4, d5, d5 + SUB r12, r12, #4 + ; Load y[4...7] + VLD1.16 d5, [r5]! + VMLAL.S16 q0, d4, d6[0] + VEXT.16 d16, d4, d5, #1 + VMLAL.S16 q0, d16, d6[1] + VEXT.16 d16, d4, d5, #2 + VMLAL.S16 q0, d16, d6[2] + VEXT.16 d16, d4, d5, #3 + VMLAL.S16 q0, d16, d6[3] +; Process 2 samples here if we have > 2 left (still reading one extra y value). +xcorr_kernel_neon_process2 + ADDS r12, r12, #2 + BLE xcorr_kernel_neon_process1 + ; Load x[0...1] + VLD2.16 {d6[],d7[]}, [r4]! + ; Use VAND since it's a data processing instruction again. + VAND d4, d5, d5 + SUB r12, r12, #2 + ; Load y[4...5] + VLD1.32 {d5[]}, [r5]! + VMLAL.S16 q0, d4, d6 + VEXT.16 d16, d4, d5, #1 + ; Replace bottom copy of {y5,y4} in d5 with {y3,y2} from d4, using VSRI + ; instead of VEXT, since it's a data-processing instruction. + VSRI.64 d5, d4, #32 + VMLAL.S16 q0, d16, d7 +; Process 1 sample using the extra y value we loaded above. +xcorr_kernel_neon_process1 + ; Load next *x + VLD1.16 {d6[]}, [r4]! + ADDS r12, r12, #1 + ; y[0...3] are left in d5 from prior iteration(s) (if any) + VMLAL.S16 q0, d5, d6 + MOVLE pc, lr +; Now process 1 last sample, not reading ahead. + ; Load last *y + VLD1.16 {d4[]}, [r5]! + VSRI.64 d4, d5, #16 + ; Load last *x + VLD1.16 {d6[]}, [r4]! + VMLAL.S16 q0, d4, d6 + MOV pc, lr + ENDP + +; opus_val32 celt_pitch_xcorr_neon(opus_val16 *_x, opus_val16 *_y, +; opus_val32 *xcorr, int len, int max_pitch) +celt_pitch_xcorr_neon PROC + ; input: + ; r0 = opus_val16 *_x + ; r1 = opus_val16 *_y + ; r2 = opus_val32 *xcorr + ; r3 = int len + ; output: + ; r0 = int maxcorr + ; internal usage: + ; r4 = opus_val16 *x (for xcorr_kernel_neon()) + ; r5 = opus_val16 *y (for xcorr_kernel_neon()) + ; r6 = int max_pitch + ; r12 = int j + ; q15 = int maxcorr[4] (q15 is not used by xcorr_kernel_neon()) + STMFD sp!, {r4-r6, lr} + LDR r6, [sp, #16] + VMOV.S32 q15, #1 + ; if (max_pitch < 4) goto celt_pitch_xcorr_neon_process4_done + SUBS r6, r6, #4 + BLT celt_pitch_xcorr_neon_process4_done +celt_pitch_xcorr_neon_process4 + ; xcorr_kernel_neon parameters: + ; r3 = len, r4 = _x, r5 = _y, q0 = {0, 0, 0, 0} + MOV r4, r0 + MOV r5, r1 + VEOR q0, q0, q0 + ; xcorr_kernel_neon only modifies r4, r5, r12, and q0...q3. + ; So we don't save/restore any other registers. + BL xcorr_kernel_neon_start + SUBS r6, r6, #4 + VST1.32 {q0}, [r2]! + ; _y += 4 + ADD r1, r1, #8 + VMAX.S32 q15, q15, q0 + ; if (max_pitch < 4) goto celt_pitch_xcorr_neon_process4_done + BGE celt_pitch_xcorr_neon_process4 +; We have less than 4 sums left to compute. +celt_pitch_xcorr_neon_process4_done + ADDS r6, r6, #4 + ; Reduce maxcorr to a single value + VMAX.S32 d30, d30, d31 + VPMAX.S32 d30, d30, d30 + ; if (max_pitch <= 0) goto celt_pitch_xcorr_neon_done + BLE celt_pitch_xcorr_neon_done +; Now compute each remaining sum one at a time. +celt_pitch_xcorr_neon_process_remaining + MOV r4, r0 + MOV r5, r1 + VMOV.I32 q0, #0 + SUBS r12, r3, #8 + BLT celt_pitch_xcorr_neon_process_remaining4 +; Sum terms 8 at a time. +celt_pitch_xcorr_neon_process_remaining_loop8 + ; Load x[0...7] + VLD1.16 {q1}, [r4]! + ; Load y[0...7] + VLD1.16 {q2}, [r5]! + SUBS r12, r12, #8 + VMLAL.S16 q0, d4, d2 + VMLAL.S16 q0, d5, d3 + BGE celt_pitch_xcorr_neon_process_remaining_loop8 +; Sum terms 4 at a time. +celt_pitch_xcorr_neon_process_remaining4 + ADDS r12, r12, #4 + BLT celt_pitch_xcorr_neon_process_remaining4_done + ; Load x[0...3] + VLD1.16 {d2}, [r4]! + ; Load y[0...3] + VLD1.16 {d3}, [r5]! + SUB r12, r12, #4 + VMLAL.S16 q0, d3, d2 +celt_pitch_xcorr_neon_process_remaining4_done + ; Reduce the sum to a single value. + VADD.S32 d0, d0, d1 + VPADDL.S32 d0, d0 + ADDS r12, r12, #4 + BLE celt_pitch_xcorr_neon_process_remaining_loop_done +; Sum terms 1 at a time. +celt_pitch_xcorr_neon_process_remaining_loop1 + VLD1.16 {d2[]}, [r4]! + VLD1.16 {d3[]}, [r5]! + SUBS r12, r12, #1 + VMLAL.S16 q0, d2, d3 + BGT celt_pitch_xcorr_neon_process_remaining_loop1 +celt_pitch_xcorr_neon_process_remaining_loop_done + VST1.32 {d0[0]}, [r2]! + VMAX.S32 d30, d30, d0 + SUBS r6, r6, #1 + ; _y++ + ADD r1, r1, #2 + ; if (--max_pitch > 0) goto celt_pitch_xcorr_neon_process_remaining + BGT celt_pitch_xcorr_neon_process_remaining +celt_pitch_xcorr_neon_done + VMOV.32 r0, d30[0] + LDMFD sp!, {r4-r6, pc} + ENDP + +ENDIF + +IF OPUS_ARM_MAY_HAVE_EDSP + +; This will get used on ARMv7 devices without NEON, so it has been optimized +; to take advantage of dual-issuing where possible. +xcorr_kernel_edsp PROC +xcorr_kernel_edsp_start + ; input: + ; r3 = int len + ; r4 = opus_val16 *_x (must be 32-bit aligned) + ; r5 = opus_val16 *_y (must be 32-bit aligned) + ; r6...r9 = opus_val32 sum[4] + ; output: + ; r6...r9 = opus_val32 sum[4] + ; preserved: r0-r5 + ; internal usage + ; r2 = int j + ; r12,r14 = opus_val16 x[4] + ; r10,r11 = opus_val16 y[4] + STMFD sp!, {r2,r4,r5,lr} + LDR r10, [r5], #4 ; Load y[0...1] + SUBS r2, r3, #4 ; j = len-4 + LDR r11, [r5], #4 ; Load y[2...3] + BLE xcorr_kernel_edsp_process4_done + LDR r12, [r4], #4 ; Load x[0...1] + ; Stall +xcorr_kernel_edsp_process4 + ; The multiplies must issue from pipeline 0, and can't dual-issue with each + ; other. Every other instruction here dual-issues with a multiply, and is + ; thus "free". There should be no stalls in the body of the loop. + SMLABB r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x_0,y_0) + LDR r14, [r4], #4 ; Load x[2...3] + SMLABT r7, r12, r10, r7 ; sum[1] = MAC16_16(sum[1],x_0,y_1) + SUBS r2, r2, #4 ; j-=4 + SMLABB r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x_0,y_2) + SMLABT r9, r12, r11, r9 ; sum[3] = MAC16_16(sum[3],x_0,y_3) + SMLATT r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x_1,y_1) + LDR r10, [r5], #4 ; Load y[4...5] + SMLATB r7, r12, r11, r7 ; sum[1] = MAC16_16(sum[1],x_1,y_2) + SMLATT r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x_1,y_3) + SMLATB r9, r12, r10, r9 ; sum[3] = MAC16_16(sum[3],x_1,y_4) + LDRGT r12, [r4], #4 ; Load x[0...1] + SMLABB r6, r14, r11, r6 ; sum[0] = MAC16_16(sum[0],x_2,y_2) + SMLABT r7, r14, r11, r7 ; sum[1] = MAC16_16(sum[1],x_2,y_3) + SMLABB r8, r14, r10, r8 ; sum[2] = MAC16_16(sum[2],x_2,y_4) + SMLABT r9, r14, r10, r9 ; sum[3] = MAC16_16(sum[3],x_2,y_5) + SMLATT r6, r14, r11, r6 ; sum[0] = MAC16_16(sum[0],x_3,y_3) + LDR r11, [r5], #4 ; Load y[6...7] + SMLATB r7, r14, r10, r7 ; sum[1] = MAC16_16(sum[1],x_3,y_4) + SMLATT r8, r14, r10, r8 ; sum[2] = MAC16_16(sum[2],x_3,y_5) + SMLATB r9, r14, r11, r9 ; sum[3] = MAC16_16(sum[3],x_3,y_6) + BGT xcorr_kernel_edsp_process4 +xcorr_kernel_edsp_process4_done + ADDS r2, r2, #4 + BLE xcorr_kernel_edsp_done + LDRH r12, [r4], #2 ; r12 = *x++ + SUBS r2, r2, #1 ; j-- + ; Stall + SMLABB r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x,y_0) + LDRHGT r14, [r4], #2 ; r14 = *x++ + SMLABT r7, r12, r10, r7 ; sum[1] = MAC16_16(sum[1],x,y_1) + SMLABB r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x,y_2) + SMLABT r9, r12, r11, r9 ; sum[3] = MAC16_16(sum[3],x,y_3) + BLE xcorr_kernel_edsp_done + SMLABT r6, r14, r10, r6 ; sum[0] = MAC16_16(sum[0],x,y_1) + SUBS r2, r2, #1 ; j-- + SMLABB r7, r14, r11, r7 ; sum[1] = MAC16_16(sum[1],x,y_2) + LDRH r10, [r5], #2 ; r10 = y_4 = *y++ + SMLABT r8, r14, r11, r8 ; sum[2] = MAC16_16(sum[2],x,y_3) + LDRHGT r12, [r4], #2 ; r12 = *x++ + SMLABB r9, r14, r10, r9 ; sum[3] = MAC16_16(sum[3],x,y_4) + BLE xcorr_kernel_edsp_done + SMLABB r6, r12, r11, r6 ; sum[0] = MAC16_16(sum[0],tmp,y_2) + CMP r2, #1 ; j-- + SMLABT r7, r12, r11, r7 ; sum[1] = MAC16_16(sum[1],tmp,y_3) + LDRH r2, [r5], #2 ; r2 = y_5 = *y++ + SMLABB r8, r12, r10, r8 ; sum[2] = MAC16_16(sum[2],tmp,y_4) + LDRHGT r14, [r4] ; r14 = *x + SMLABB r9, r12, r2, r9 ; sum[3] = MAC16_16(sum[3],tmp,y_5) + BLE xcorr_kernel_edsp_done + SMLABT r6, r14, r11, r6 ; sum[0] = MAC16_16(sum[0],tmp,y_3) + LDRH r11, [r5] ; r11 = y_6 = *y + SMLABB r7, r14, r10, r7 ; sum[1] = MAC16_16(sum[1],tmp,y_4) + SMLABB r8, r14, r2, r8 ; sum[2] = MAC16_16(sum[2],tmp,y_5) + SMLABB r9, r14, r11, r9 ; sum[3] = MAC16_16(sum[3],tmp,y_6) +xcorr_kernel_edsp_done + LDMFD sp!, {r2,r4,r5,pc} + ENDP + +celt_pitch_xcorr_edsp PROC + ; input: + ; r0 = opus_val16 *_x (must be 32-bit aligned) + ; r1 = opus_val16 *_y (only needs to be 16-bit aligned) + ; r2 = opus_val32 *xcorr + ; r3 = int len + ; output: + ; r0 = maxcorr + ; internal usage + ; r4 = opus_val16 *x + ; r5 = opus_val16 *y + ; r6 = opus_val32 sum0 + ; r7 = opus_val32 sum1 + ; r8 = opus_val32 sum2 + ; r9 = opus_val32 sum3 + ; r1 = int max_pitch + ; r12 = int j + STMFD sp!, {r4-r11, lr} + MOV r5, r1 + LDR r1, [sp, #36] + MOV r4, r0 + TST r5, #3 + ; maxcorr = 1 + MOV r0, #1 + BEQ celt_pitch_xcorr_edsp_process1u_done +; Compute one sum at the start to make y 32-bit aligned. + SUBS r12, r3, #4 + ; r14 = sum = 0 + MOV r14, #0 + LDRH r8, [r5], #2 + BLE celt_pitch_xcorr_edsp_process1u_loop4_done + LDR r6, [r4], #4 + MOV r8, r8, LSL #16 +celt_pitch_xcorr_edsp_process1u_loop4 + LDR r9, [r5], #4 + SMLABT r14, r6, r8, r14 ; sum = MAC16_16(sum, x_0, y_0) + LDR r7, [r4], #4 + SMLATB r14, r6, r9, r14 ; sum = MAC16_16(sum, x_1, y_1) + LDR r8, [r5], #4 + SMLABT r14, r7, r9, r14 ; sum = MAC16_16(sum, x_2, y_2) + SUBS r12, r12, #4 ; j-=4 + SMLATB r14, r7, r8, r14 ; sum = MAC16_16(sum, x_3, y_3) + LDRGT r6, [r4], #4 + BGT celt_pitch_xcorr_edsp_process1u_loop4 + MOV r8, r8, LSR #16 +celt_pitch_xcorr_edsp_process1u_loop4_done + ADDS r12, r12, #4 +celt_pitch_xcorr_edsp_process1u_loop1 + LDRHGE r6, [r4], #2 + ; Stall + SMLABBGE r14, r6, r8, r14 ; sum = MAC16_16(sum, *x, *y) + SUBSGE r12, r12, #1 + LDRHGT r8, [r5], #2 + BGT celt_pitch_xcorr_edsp_process1u_loop1 + ; Restore _x + SUB r4, r4, r3, LSL #1 + ; Restore and advance _y + SUB r5, r5, r3, LSL #1 + ; maxcorr = max(maxcorr, sum) + CMP r0, r14 + ADD r5, r5, #2 + MOVLT r0, r14 + SUBS r1, r1, #1 + ; xcorr[i] = sum + STR r14, [r2], #4 + BLE celt_pitch_xcorr_edsp_done +celt_pitch_xcorr_edsp_process1u_done + ; if (max_pitch < 4) goto celt_pitch_xcorr_edsp_process2 + SUBS r1, r1, #4 + BLT celt_pitch_xcorr_edsp_process2 +celt_pitch_xcorr_edsp_process4 + ; xcorr_kernel_edsp parameters: + ; r3 = len, r4 = _x, r5 = _y, r6...r9 = sum[4] = {0, 0, 0, 0} + MOV r6, #0 + MOV r7, #0 + MOV r8, #0 + MOV r9, #0 + BL xcorr_kernel_edsp_start ; xcorr_kernel_edsp(_x, _y+i, xcorr+i, len) + ; maxcorr = max(maxcorr, sum0, sum1, sum2, sum3) + CMP r0, r6 + ; _y+=4 + ADD r5, r5, #8 + MOVLT r0, r6 + CMP r0, r7 + MOVLT r0, r7 + CMP r0, r8 + MOVLT r0, r8 + CMP r0, r9 + MOVLT r0, r9 + STMIA r2!, {r6-r9} + SUBS r1, r1, #4 + BGE celt_pitch_xcorr_edsp_process4 +celt_pitch_xcorr_edsp_process2 + ADDS r1, r1, #2 + BLT celt_pitch_xcorr_edsp_process1a + SUBS r12, r3, #4 + ; {r10, r11} = {sum0, sum1} = {0, 0} + MOV r10, #0 + MOV r11, #0 + LDR r8, [r5], #4 + BLE celt_pitch_xcorr_edsp_process2_loop_done + LDR r6, [r4], #4 + LDR r9, [r5], #4 +celt_pitch_xcorr_edsp_process2_loop4 + SMLABB r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_0) + LDR r7, [r4], #4 + SMLABT r11, r6, r8, r11 ; sum1 = MAC16_16(sum1, x_0, y_1) + SUBS r12, r12, #4 ; j-=4 + SMLATT r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_1, y_1) + LDR r8, [r5], #4 + SMLATB r11, r6, r9, r11 ; sum1 = MAC16_16(sum1, x_1, y_2) + LDRGT r6, [r4], #4 + SMLABB r10, r7, r9, r10 ; sum0 = MAC16_16(sum0, x_2, y_2) + SMLABT r11, r7, r9, r11 ; sum1 = MAC16_16(sum1, x_2, y_3) + SMLATT r10, r7, r9, r10 ; sum0 = MAC16_16(sum0, x_3, y_3) + LDRGT r9, [r5], #4 + SMLATB r11, r7, r8, r11 ; sum1 = MAC16_16(sum1, x_3, y_4) + BGT celt_pitch_xcorr_edsp_process2_loop4 +celt_pitch_xcorr_edsp_process2_loop_done + ADDS r12, r12, #2 + BLE celt_pitch_xcorr_edsp_process2_1 + LDR r6, [r4], #4 + ; Stall + SMLABB r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_0) + LDR r9, [r5], #4 + SMLABT r11, r6, r8, r11 ; sum1 = MAC16_16(sum1, x_0, y_1) + SUB r12, r12, #2 + SMLATT r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_1, y_1) + MOV r8, r9 + SMLATB r11, r6, r9, r11 ; sum1 = MAC16_16(sum1, x_1, y_2) +celt_pitch_xcorr_edsp_process2_1 + LDRH r6, [r4], #2 + ADDS r12, r12, #1 + ; Stall + SMLABB r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_0) + LDRHGT r7, [r4], #2 + SMLABT r11, r6, r8, r11 ; sum1 = MAC16_16(sum1, x_0, y_1) + BLE celt_pitch_xcorr_edsp_process2_done + LDRH r9, [r5], #2 + SMLABT r10, r7, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_1) + SMLABB r11, r7, r9, r11 ; sum1 = MAC16_16(sum1, x_0, y_2) +celt_pitch_xcorr_edsp_process2_done + ; Restore _x + SUB r4, r4, r3, LSL #1 + ; Restore and advance _y + SUB r5, r5, r3, LSL #1 + ; maxcorr = max(maxcorr, sum0) + CMP r0, r10 + ADD r5, r5, #2 + MOVLT r0, r10 + SUB r1, r1, #2 + ; maxcorr = max(maxcorr, sum1) + CMP r0, r11 + ; xcorr[i] = sum + STR r10, [r2], #4 + MOVLT r0, r11 + STR r11, [r2], #4 +celt_pitch_xcorr_edsp_process1a + ADDS r1, r1, #1 + BLT celt_pitch_xcorr_edsp_done + SUBS r12, r3, #4 + ; r14 = sum = 0 + MOV r14, #0 + BLT celt_pitch_xcorr_edsp_process1a_loop_done + LDR r6, [r4], #4 + LDR r8, [r5], #4 + LDR r7, [r4], #4 + LDR r9, [r5], #4 +celt_pitch_xcorr_edsp_process1a_loop4 + SMLABB r14, r6, r8, r14 ; sum = MAC16_16(sum, x_0, y_0) + SUBS r12, r12, #4 ; j-=4 + SMLATT r14, r6, r8, r14 ; sum = MAC16_16(sum, x_1, y_1) + LDRGE r6, [r4], #4 + SMLABB r14, r7, r9, r14 ; sum = MAC16_16(sum, x_2, y_2) + LDRGE r8, [r5], #4 + SMLATT r14, r7, r9, r14 ; sum = MAC16_16(sum, x_3, y_3) + LDRGE r7, [r4], #4 + LDRGE r9, [r5], #4 + BGE celt_pitch_xcorr_edsp_process1a_loop4 +celt_pitch_xcorr_edsp_process1a_loop_done + ADDS r12, r12, #2 + LDRGE r6, [r4], #4 + LDRGE r8, [r5], #4 + ; Stall + SMLABBGE r14, r6, r8, r14 ; sum = MAC16_16(sum, x_0, y_0) + SUBGE r12, r12, #2 + SMLATTGE r14, r6, r8, r14 ; sum = MAC16_16(sum, x_1, y_1) + ADDS r12, r12, #1 + LDRHGE r6, [r4], #2 + LDRHGE r8, [r5], #2 + ; Stall + SMLABBGE r14, r6, r8, r14 ; sum = MAC16_16(sum, *x, *y) + ; maxcorr = max(maxcorr, sum) + CMP r0, r14 + ; xcorr[i] = sum + STR r14, [r2], #4 + MOVLT r0, r14 +celt_pitch_xcorr_edsp_done + LDMFD sp!, {r4-r11, pc} + ENDP + +ENDIF + +END diff --git a/asm/libs/opus/celt/arm/fft_arm.h b/asm/libs/opus/celt/arm/fft_arm.h new file mode 100644 index 00000000..0cb55d8e --- /dev/null +++ b/asm/libs/opus/celt/arm/fft_arm.h @@ -0,0 +1,72 @@ +/* Copyright (c) 2015 Xiph.Org Foundation + Written by Viswanath Puttagunta */ +/** + @file fft_arm.h + @brief ARM Neon Intrinsic optimizations for fft using NE10 library + */ + +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + + +#if !defined(FFT_ARM_H) +#define FFT_ARM_H + +#include "config.h" +#include "kiss_fft.h" + +#if defined(HAVE_ARM_NE10) + +int opus_fft_alloc_arm_neon(kiss_fft_state *st); +void opus_fft_free_arm_neon(kiss_fft_state *st); + +void opus_fft_neon(const kiss_fft_state *st, + const kiss_fft_cpx *fin, + kiss_fft_cpx *fout); + +void opus_ifft_neon(const kiss_fft_state *st, + const kiss_fft_cpx *fin, + kiss_fft_cpx *fout); + +#if !defined(OPUS_HAVE_RTCD) +#define OVERRIDE_OPUS_FFT (1) + +#define opus_fft_alloc_arch(_st, arch) \ + ((void)(arch), opus_fft_alloc_arm_neon(_st)) + +#define opus_fft_free_arch(_st, arch) \ + ((void)(arch), opus_fft_free_arm_neon(_st)) + +#define opus_fft(_st, _fin, _fout, arch) \ + ((void)(arch), opus_fft_neon(_st, _fin, _fout)) + +#define opus_ifft(_st, _fin, _fout, arch) \ + ((void)(arch), opus_ifft_neon(_st, _fin, _fout)) + +#endif /* OPUS_HAVE_RTCD */ + +#endif /* HAVE_ARM_NE10 */ + +#endif diff --git a/asm/libs/opus/celt/arm/fixed_armv4.h b/asm/libs/opus/celt/arm/fixed_armv4.h new file mode 100644 index 00000000..efb3b189 --- /dev/null +++ b/asm/libs/opus/celt/arm/fixed_armv4.h @@ -0,0 +1,80 @@ +/* Copyright (C) 2013 Xiph.Org Foundation and contributors */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef FIXED_ARMv4_H +#define FIXED_ARMv4_H + +/** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ +#undef MULT16_32_Q16 +static OPUS_INLINE opus_val32 MULT16_32_Q16_armv4(opus_val16 a, opus_val32 b) +{ + unsigned rd_lo; + int rd_hi; + __asm__( + "#MULT16_32_Q16\n\t" + "smull %0, %1, %2, %3\n\t" + : "=&r"(rd_lo), "=&r"(rd_hi) + : "%r"(b),"r"(a<<16) + ); + return rd_hi; +} +#define MULT16_32_Q16(a, b) (MULT16_32_Q16_armv4(a, b)) + + +/** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */ +#undef MULT16_32_Q15 +static OPUS_INLINE opus_val32 MULT16_32_Q15_armv4(opus_val16 a, opus_val32 b) +{ + unsigned rd_lo; + int rd_hi; + __asm__( + "#MULT16_32_Q15\n\t" + "smull %0, %1, %2, %3\n\t" + : "=&r"(rd_lo), "=&r"(rd_hi) + : "%r"(b), "r"(a<<16) + ); + /*We intentionally don't OR in the high bit of rd_lo for speed.*/ + return rd_hi<<1; +} +#define MULT16_32_Q15(a, b) (MULT16_32_Q15_armv4(a, b)) + + +/** 16x32 multiply, followed by a 15-bit shift right and 32-bit add. + b must fit in 31 bits. + Result fits in 32 bits. */ +#undef MAC16_32_Q15 +#define MAC16_32_Q15(c, a, b) ADD32(c, MULT16_32_Q15(a, b)) + +/** 16x32 multiply, followed by a 16-bit shift right and 32-bit add. + Result fits in 32 bits. */ +#undef MAC16_32_Q16 +#define MAC16_32_Q16(c, a, b) ADD32(c, MULT16_32_Q16(a, b)) + +/** 32x32 multiplication, followed by a 31-bit shift right. Results fits in 32 bits */ +#undef MULT32_32_Q31 +#define MULT32_32_Q31(a,b) (opus_val32)((((opus_int64)(a)) * ((opus_int64)(b)))>>31) + +#endif diff --git a/asm/libs/opus/celt/arm/fixed_armv5e.h b/asm/libs/opus/celt/arm/fixed_armv5e.h new file mode 100644 index 00000000..36a63211 --- /dev/null +++ b/asm/libs/opus/celt/arm/fixed_armv5e.h @@ -0,0 +1,151 @@ +/* Copyright (C) 2007-2009 Xiph.Org Foundation + Copyright (C) 2003-2008 Jean-Marc Valin + Copyright (C) 2007-2008 CSIRO + Copyright (C) 2013 Parrot */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef FIXED_ARMv5E_H +#define FIXED_ARMv5E_H + +#include "fixed_armv4.h" + +/** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ +#undef MULT16_32_Q16 +static OPUS_INLINE opus_val32 MULT16_32_Q16_armv5e(opus_val16 a, opus_val32 b) +{ + int res; + __asm__( + "#MULT16_32_Q16\n\t" + "smulwb %0, %1, %2\n\t" + : "=r"(res) + : "r"(b),"r"(a) + ); + return res; +} +#define MULT16_32_Q16(a, b) (MULT16_32_Q16_armv5e(a, b)) + + +/** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */ +#undef MULT16_32_Q15 +static OPUS_INLINE opus_val32 MULT16_32_Q15_armv5e(opus_val16 a, opus_val32 b) +{ + int res; + __asm__( + "#MULT16_32_Q15\n\t" + "smulwb %0, %1, %2\n\t" + : "=r"(res) + : "r"(b), "r"(a) + ); + return res<<1; +} +#define MULT16_32_Q15(a, b) (MULT16_32_Q15_armv5e(a, b)) + + +/** 16x32 multiply, followed by a 15-bit shift right and 32-bit add. + b must fit in 31 bits. + Result fits in 32 bits. */ +#undef MAC16_32_Q15 +static OPUS_INLINE opus_val32 MAC16_32_Q15_armv5e(opus_val32 c, opus_val16 a, + opus_val32 b) +{ + int res; + __asm__( + "#MAC16_32_Q15\n\t" + "smlawb %0, %1, %2, %3;\n" + : "=r"(res) + : "r"(b<<1), "r"(a), "r"(c) + ); + return res; +} +#define MAC16_32_Q15(c, a, b) (MAC16_32_Q15_armv5e(c, a, b)) + +/** 16x32 multiply, followed by a 16-bit shift right and 32-bit add. + Result fits in 32 bits. */ +#undef MAC16_32_Q16 +static OPUS_INLINE opus_val32 MAC16_32_Q16_armv5e(opus_val32 c, opus_val16 a, + opus_val32 b) +{ + int res; + __asm__( + "#MAC16_32_Q16\n\t" + "smlawb %0, %1, %2, %3;\n" + : "=r"(res) + : "r"(b), "r"(a), "r"(c) + ); + return res; +} +#define MAC16_32_Q16(c, a, b) (MAC16_32_Q16_armv5e(c, a, b)) + +/** 16x16 multiply-add where the result fits in 32 bits */ +#undef MAC16_16 +static OPUS_INLINE opus_val32 MAC16_16_armv5e(opus_val32 c, opus_val16 a, + opus_val16 b) +{ + int res; + __asm__( + "#MAC16_16\n\t" + "smlabb %0, %1, %2, %3;\n" + : "=r"(res) + : "r"(a), "r"(b), "r"(c) + ); + return res; +} +#define MAC16_16(c, a, b) (MAC16_16_armv5e(c, a, b)) + +/** 16x16 multiplication where the result fits in 32 bits */ +#undef MULT16_16 +static OPUS_INLINE opus_val32 MULT16_16_armv5e(opus_val16 a, opus_val16 b) +{ + int res; + __asm__( + "#MULT16_16\n\t" + "smulbb %0, %1, %2;\n" + : "=r"(res) + : "r"(a), "r"(b) + ); + return res; +} +#define MULT16_16(a, b) (MULT16_16_armv5e(a, b)) + +#ifdef OPUS_ARM_INLINE_MEDIA + +#undef SIG2WORD16 +static OPUS_INLINE opus_val16 SIG2WORD16_armv6(opus_val32 x) +{ + celt_sig res; + __asm__( + "#SIG2WORD16\n\t" + "ssat %0, #16, %1, ASR #12\n\t" + : "=r"(res) + : "r"(x+2048) + ); + return EXTRACT16(res); +} +#define SIG2WORD16(x) (SIG2WORD16_armv6(x)) + +#endif /* OPUS_ARM_INLINE_MEDIA */ + +#endif diff --git a/asm/libs/opus/celt/arm/kiss_fft_armv4.h b/asm/libs/opus/celt/arm/kiss_fft_armv4.h new file mode 100644 index 00000000..e4faad6f --- /dev/null +++ b/asm/libs/opus/celt/arm/kiss_fft_armv4.h @@ -0,0 +1,121 @@ +/*Copyright (c) 2013, Xiph.Org Foundation and contributors. + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE.*/ + +#ifndef KISS_FFT_ARMv4_H +#define KISS_FFT_ARMv4_H + +#if !defined(KISS_FFT_GUTS_H) +#error "This file should only be included from _kiss_fft_guts.h" +#endif + +#ifdef FIXED_POINT + +#undef C_MUL +#define C_MUL(m,a,b) \ + do{ \ + int br__; \ + int bi__; \ + int tt__; \ + __asm__ __volatile__( \ + "#C_MUL\n\t" \ + "ldrsh %[br], [%[bp], #0]\n\t" \ + "ldm %[ap], {r0,r1}\n\t" \ + "ldrsh %[bi], [%[bp], #2]\n\t" \ + "smull %[tt], %[mi], r1, %[br]\n\t" \ + "smlal %[tt], %[mi], r0, %[bi]\n\t" \ + "rsb %[bi], %[bi], #0\n\t" \ + "smull %[br], %[mr], r0, %[br]\n\t" \ + "mov %[tt], %[tt], lsr #15\n\t" \ + "smlal %[br], %[mr], r1, %[bi]\n\t" \ + "orr %[mi], %[tt], %[mi], lsl #17\n\t" \ + "mov %[br], %[br], lsr #15\n\t" \ + "orr %[mr], %[br], %[mr], lsl #17\n\t" \ + : [mr]"=r"((m).r), [mi]"=r"((m).i), \ + [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ + : [ap]"r"(&(a)), [bp]"r"(&(b)) \ + : "r0", "r1" \ + ); \ + } \ + while(0) + +#undef C_MUL4 +#define C_MUL4(m,a,b) \ + do{ \ + int br__; \ + int bi__; \ + int tt__; \ + __asm__ __volatile__( \ + "#C_MUL4\n\t" \ + "ldrsh %[br], [%[bp], #0]\n\t" \ + "ldm %[ap], {r0,r1}\n\t" \ + "ldrsh %[bi], [%[bp], #2]\n\t" \ + "smull %[tt], %[mi], r1, %[br]\n\t" \ + "smlal %[tt], %[mi], r0, %[bi]\n\t" \ + "rsb %[bi], %[bi], #0\n\t" \ + "smull %[br], %[mr], r0, %[br]\n\t" \ + "mov %[tt], %[tt], lsr #17\n\t" \ + "smlal %[br], %[mr], r1, %[bi]\n\t" \ + "orr %[mi], %[tt], %[mi], lsl #15\n\t" \ + "mov %[br], %[br], lsr #17\n\t" \ + "orr %[mr], %[br], %[mr], lsl #15\n\t" \ + : [mr]"=r"((m).r), [mi]"=r"((m).i), \ + [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ + : [ap]"r"(&(a)), [bp]"r"(&(b)) \ + : "r0", "r1" \ + ); \ + } \ + while(0) + +#undef C_MULC +#define C_MULC(m,a,b) \ + do{ \ + int br__; \ + int bi__; \ + int tt__; \ + __asm__ __volatile__( \ + "#C_MULC\n\t" \ + "ldrsh %[br], [%[bp], #0]\n\t" \ + "ldm %[ap], {r0,r1}\n\t" \ + "ldrsh %[bi], [%[bp], #2]\n\t" \ + "smull %[tt], %[mr], r0, %[br]\n\t" \ + "smlal %[tt], %[mr], r1, %[bi]\n\t" \ + "rsb %[bi], %[bi], #0\n\t" \ + "smull %[br], %[mi], r1, %[br]\n\t" \ + "mov %[tt], %[tt], lsr #15\n\t" \ + "smlal %[br], %[mi], r0, %[bi]\n\t" \ + "orr %[mr], %[tt], %[mr], lsl #17\n\t" \ + "mov %[br], %[br], lsr #15\n\t" \ + "orr %[mi], %[br], %[mi], lsl #17\n\t" \ + : [mr]"=r"((m).r), [mi]"=r"((m).i), \ + [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ + : [ap]"r"(&(a)), [bp]"r"(&(b)) \ + : "r0", "r1" \ + ); \ + } \ + while(0) + +#endif /* FIXED_POINT */ + +#endif /* KISS_FFT_ARMv4_H */ diff --git a/asm/libs/opus/celt/arm/kiss_fft_armv5e.h b/asm/libs/opus/celt/arm/kiss_fft_armv5e.h new file mode 100644 index 00000000..9eca183d --- /dev/null +++ b/asm/libs/opus/celt/arm/kiss_fft_armv5e.h @@ -0,0 +1,118 @@ +/*Copyright (c) 2013, Xiph.Org Foundation and contributors. + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE.*/ + +#ifndef KISS_FFT_ARMv5E_H +#define KISS_FFT_ARMv5E_H + +#if !defined(KISS_FFT_GUTS_H) +#error "This file should only be included from _kiss_fft_guts.h" +#endif + +#ifdef FIXED_POINT + +#if defined(__thumb__)||defined(__thumb2__) +#define LDRD_CONS "Q" +#else +#define LDRD_CONS "Uq" +#endif + +#undef C_MUL +#define C_MUL(m,a,b) \ + do{ \ + int mr1__; \ + int mr2__; \ + int mi__; \ + long long aval__; \ + int bval__; \ + __asm__( \ + "#C_MUL\n\t" \ + "ldrd %[aval], %H[aval], %[ap]\n\t" \ + "ldr %[bval], %[bp]\n\t" \ + "smulwb %[mi], %H[aval], %[bval]\n\t" \ + "smulwb %[mr1], %[aval], %[bval]\n\t" \ + "smulwt %[mr2], %H[aval], %[bval]\n\t" \ + "smlawt %[mi], %[aval], %[bval], %[mi]\n\t" \ + : [mr1]"=r"(mr1__), [mr2]"=r"(mr2__), [mi]"=r"(mi__), \ + [aval]"=&r"(aval__), [bval]"=r"(bval__) \ + : [ap]LDRD_CONS(a), [bp]"m"(b) \ + ); \ + (m).r = SHL32(SUB32(mr1__, mr2__), 1); \ + (m).i = SHL32(mi__, 1); \ + } \ + while(0) + +#undef C_MUL4 +#define C_MUL4(m,a,b) \ + do{ \ + int mr1__; \ + int mr2__; \ + int mi__; \ + long long aval__; \ + int bval__; \ + __asm__( \ + "#C_MUL4\n\t" \ + "ldrd %[aval], %H[aval], %[ap]\n\t" \ + "ldr %[bval], %[bp]\n\t" \ + "smulwb %[mi], %H[aval], %[bval]\n\t" \ + "smulwb %[mr1], %[aval], %[bval]\n\t" \ + "smulwt %[mr2], %H[aval], %[bval]\n\t" \ + "smlawt %[mi], %[aval], %[bval], %[mi]\n\t" \ + : [mr1]"=r"(mr1__), [mr2]"=r"(mr2__), [mi]"=r"(mi__), \ + [aval]"=&r"(aval__), [bval]"=r"(bval__) \ + : [ap]LDRD_CONS(a), [bp]"m"(b) \ + ); \ + (m).r = SHR32(SUB32(mr1__, mr2__), 1); \ + (m).i = SHR32(mi__, 1); \ + } \ + while(0) + +#undef C_MULC +#define C_MULC(m,a,b) \ + do{ \ + int mr__; \ + int mi1__; \ + int mi2__; \ + long long aval__; \ + int bval__; \ + __asm__( \ + "#C_MULC\n\t" \ + "ldrd %[aval], %H[aval], %[ap]\n\t" \ + "ldr %[bval], %[bp]\n\t" \ + "smulwb %[mr], %[aval], %[bval]\n\t" \ + "smulwb %[mi1], %H[aval], %[bval]\n\t" \ + "smulwt %[mi2], %[aval], %[bval]\n\t" \ + "smlawt %[mr], %H[aval], %[bval], %[mr]\n\t" \ + : [mr]"=r"(mr__), [mi1]"=r"(mi1__), [mi2]"=r"(mi2__), \ + [aval]"=&r"(aval__), [bval]"=r"(bval__) \ + : [ap]LDRD_CONS(a), [bp]"m"(b) \ + ); \ + (m).r = SHL32(mr__, 1); \ + (m).i = SHL32(SUB32(mi1__, mi2__), 1); \ + } \ + while(0) + +#endif /* FIXED_POINT */ + +#endif /* KISS_FFT_GUTS_H */ diff --git a/asm/libs/opus/celt/arm/mdct_arm.h b/asm/libs/opus/celt/arm/mdct_arm.h new file mode 100644 index 00000000..49cbb445 --- /dev/null +++ b/asm/libs/opus/celt/arm/mdct_arm.h @@ -0,0 +1,60 @@ +/* Copyright (c) 2015 Xiph.Org Foundation + Written by Viswanath Puttagunta */ +/** + @file arm_mdct.h + @brief ARM Neon Intrinsic optimizations for mdct using NE10 library + */ + +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#if !defined(MDCT_ARM_H) +#define MDCT_ARM_H + +#include "config.h" +#include "mdct.h" + +#if defined(HAVE_ARM_NE10) +/** Compute a forward MDCT and scale by 4/N, trashes the input array */ +void clt_mdct_forward_neon(const mdct_lookup *l, kiss_fft_scalar *in, + kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 *window, int overlap, + int shift, int stride, int arch); + +void clt_mdct_backward_neon(const mdct_lookup *l, kiss_fft_scalar *in, + kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 *window, int overlap, + int shift, int stride, int arch); + +#if !defined(OPUS_HAVE_RTCD) +#define OVERRIDE_OPUS_MDCT (1) +#define clt_mdct_forward(_l, _in, _out, _window, _int, _shift, _stride, _arch) \ + clt_mdct_forward_neon(_l, _in, _out, _window, _int, _shift, _stride, _arch) +#define clt_mdct_backward(_l, _in, _out, _window, _int, _shift, _stride, _arch) \ + clt_mdct_backward_neon(_l, _in, _out, _window, _int, _shift, _stride, _arch) +#endif /* OPUS_HAVE_RTCD */ +#endif /* HAVE_ARM_NE10 */ + +#endif diff --git a/asm/libs/opus/celt/arm/pitch_arm.h b/asm/libs/opus/celt/arm/pitch_arm.h new file mode 100644 index 00000000..8626ed75 --- /dev/null +++ b/asm/libs/opus/celt/arm/pitch_arm.h @@ -0,0 +1,68 @@ +/* Copyright (c) 2010 Xiph.Org Foundation + * Copyright (c) 2013 Parrot */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#if !defined(PITCH_ARM_H) +# define PITCH_ARM_H + +# include "armcpu.h" + +# if defined(FIXED_POINT) + +# if defined(OPUS_ARM_MAY_HAVE_NEON) +opus_val32 celt_pitch_xcorr_neon(const opus_val16 *_x, const opus_val16 *_y, + opus_val32 *xcorr, int len, int max_pitch); +# endif + +# if defined(OPUS_ARM_MAY_HAVE_MEDIA) +# define celt_pitch_xcorr_media MAY_HAVE_EDSP(celt_pitch_xcorr) +# endif + +# if defined(OPUS_ARM_MAY_HAVE_EDSP) +opus_val32 celt_pitch_xcorr_edsp(const opus_val16 *_x, const opus_val16 *_y, + opus_val32 *xcorr, int len, int max_pitch); +# endif + +# if !defined(OPUS_HAVE_RTCD) +# define OVERRIDE_PITCH_XCORR (1) +# define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \ + ((void)(arch),PRESUME_NEON(celt_pitch_xcorr)(_x, _y, xcorr, len, max_pitch)) +# endif + +#else /* Start !FIXED_POINT */ +/* Float case */ +#if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y, + opus_val32 *xcorr, int len, int max_pitch); +#if !defined(OPUS_HAVE_RTCD) || defined(OPUS_ARM_PRESUME_NEON_INTR) +#define OVERRIDE_PITCH_XCORR (1) +# define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \ + ((void)(arch),celt_pitch_xcorr_float_neon(_x, _y, xcorr, len, max_pitch)) +#endif +#endif + +#endif /* end !FIXED_POINT */ +#endif diff --git a/asm/libs/opus/celt/bands.c b/asm/libs/opus/celt/bands.c new file mode 100644 index 00000000..25f229e2 --- /dev/null +++ b/asm/libs/opus/celt/bands.c @@ -0,0 +1,1529 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Copyright (c) 2008-2009 Gregory Maxwell + Written by Jean-Marc Valin and Gregory Maxwell */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "bands.h" +#include "modes.h" +#include "vq.h" +#include "cwrs.h" +#include "stack_alloc.h" +#include "os_support.h" +#include "mathops.h" +#include "rate.h" +#include "quant_bands.h" +#include "pitch.h" + +int hysteresis_decision(opus_val16 val, const opus_val16 *thresholds, const opus_val16 *hysteresis, int N, int prev) +{ + int i; + for (i=0;iprev && val < thresholds[prev]+hysteresis[prev]) + i=prev; + if (i thresholds[prev-1]-hysteresis[prev-1]) + i=prev; + return i; +} + +opus_uint32 celt_lcg_rand(opus_uint32 seed) +{ + return 1664525 * seed + 1013904223; +} + +/* This is a cos() approximation designed to be bit-exact on any platform. Bit exactness + with this approximation is important because it has an impact on the bit allocation */ +static opus_int16 bitexact_cos(opus_int16 x) +{ + opus_int32 tmp; + opus_int16 x2; + tmp = (4096+((opus_int32)(x)*(x)))>>13; + celt_assert(tmp<=32767); + x2 = tmp; + x2 = (32767-x2) + FRAC_MUL16(x2, (-7651 + FRAC_MUL16(x2, (8277 + FRAC_MUL16(-626, x2))))); + celt_assert(x2<=32766); + return 1+x2; +} + +static int bitexact_log2tan(int isin,int icos) +{ + int lc; + int ls; + lc=EC_ILOG(icos); + ls=EC_ILOG(isin); + icos<<=15-lc; + isin<<=15-ls; + return (ls-lc)*(1<<11) + +FRAC_MUL16(isin, FRAC_MUL16(isin, -2597) + 7932) + -FRAC_MUL16(icos, FRAC_MUL16(icos, -2597) + 7932); +} + +#ifdef FIXED_POINT +/* Compute the amplitude (sqrt energy) in each of the bands */ +void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int LM) +{ + int i, c, N; + const opus_int16 *eBands = m->eBands; + N = m->shortMdctSize< 0) + { + int shift = celt_ilog2(maxval) - 14 + (((m->logN[i]>>BITRES)+LM+1)>>1); + j=eBands[i]<0) + { + do { + sum = MAC16_16(sum, EXTRACT16(SHR32(X[j+c*N],shift)), + EXTRACT16(SHR32(X[j+c*N],shift))); + } while (++jnbEBands] = EPSILON+VSHR32(EXTEND32(celt_sqrt(sum)),-shift); + } else { + bandE[i+c*m->nbEBands] = EPSILON; + } + /*printf ("%f ", bandE[i+c*m->nbEBands]);*/ + } + } while (++ceBands; + N = M*m->shortMdctSize; + c=0; do { + i=0; do { + opus_val16 g; + int j,shift; + opus_val16 E; + shift = celt_zlog2(bandE[i+c*m->nbEBands])-13; + E = VSHR32(bandE[i+c*m->nbEBands], shift); + g = EXTRACT16(celt_rcp(SHL32(E,3))); + j=M*eBands[i]; do { + X[j+c*N] = MULT16_16_Q15(VSHR32(freq[j+c*N],shift-1),g); + } while (++jeBands; + N = m->shortMdctSize<nbEBands] = celt_sqrt(sum); + /*printf ("%f ", bandE[i+c*m->nbEBands]);*/ + } + } while (++ceBands; + N = M*m->shortMdctSize; + c=0; do { + for (i=0;inbEBands]); + for (j=M*eBands[i];jeBands; + N = M*m->shortMdctSize; + bound = M*eBands[end]; + if (downsample!=1) + bound = IMIN(bound, N/downsample); + if (silence) + { + bound = 0; + start = end = 0; + } + f = freq; + x = X+M*eBands[start]; + for (i=0;i>DB_SHIFT); + if (shift>31) + { + shift=0; + g=0; + } else { + /* Handle the fractional part. */ + g = celt_exp2_frac(lg&((1<eBands[i+1]-m->eBands[i]; + /* depth in 1/8 bits */ + celt_assert(pulses[i]>=0); + depth = celt_udiv(1+pulses[i], (m->eBands[i+1]-m->eBands[i]))>>LM; + +#ifdef FIXED_POINT + thresh32 = SHR32(celt_exp2(-SHL16(depth, 10-BITRES)),1); + thresh = MULT16_32_Q15(QCONST16(0.5f, 15), MIN32(32767,thresh32)); + { + opus_val32 t; + t = N0<>1; + t = SHL32(t, (7-shift)<<1); + sqrt_1 = celt_rsqrt_norm(t); + } +#else + thresh = .5f*celt_exp2(-.125f*depth); + sqrt_1 = celt_rsqrt(N0<nbEBands+i]; + prev2 = prev2logE[c*m->nbEBands+i]; + if (C==1) + { + prev1 = MAX16(prev1,prev1logE[m->nbEBands+i]); + prev2 = MAX16(prev2,prev2logE[m->nbEBands+i]); + } + Ediff = EXTEND32(logE[c*m->nbEBands+i])-EXTEND32(MIN16(prev1,prev2)); + Ediff = MAX32(0, Ediff); + +#ifdef FIXED_POINT + if (Ediff < 16384) + { + opus_val32 r32 = SHR32(celt_exp2(-EXTRACT16(Ediff)),1); + r = 2*MIN16(16383,r32); + } else { + r = 0; + } + if (LM==3) + r = MULT16_16_Q14(23170, MIN32(23169, r)); + r = SHR16(MIN16(thresh, r),1); + r = SHR32(MULT16_16_Q15(sqrt_1, r),shift); +#else + /* r needs to be multiplied by 2 or 2*sqrt(2) depending on LM because + short blocks don't have the same energy as long */ + r = 2.f*celt_exp2(-Ediff); + if (LM==3) + r *= 1.41421356f; + r = MIN16(thresh, r); + r = r*sqrt_1; +#endif + X = X_+c*size+(m->eBands[i]<nbEBands]))-13; +#endif + left = VSHR32(bandE[i],shift); + right = VSHR32(bandE[i+m->nbEBands],shift); + norm = EPSILON + celt_sqrt(EPSILON+MULT16_16(left,left)+MULT16_16(right,right)); + a1 = DIV32_16(SHL32(EXTEND32(left),14),norm); + a2 = DIV32_16(SHL32(EXTEND32(right),14),norm); + for (j=0;j>1; + kr = celt_ilog2(Er)>>1; +#endif + t = VSHR32(El, (kl-7)<<1); + lgain = celt_rsqrt_norm(t); + t = VSHR32(Er, (kr-7)<<1); + rgain = celt_rsqrt_norm(t); + +#ifdef FIXED_POINT + if (kl < 7) + kl = 7; + if (kr < 7) + kr = 7; +#endif + + for (j=0;jeBands; + int decision; + int hf_sum=0; + + celt_assert(end>0); + + N0 = M*m->shortMdctSize; + + if (M*(eBands[end]-eBands[end-1]) <= 8) + return SPREAD_NONE; + c=0; do { + for (i=0;im->nbEBands-4) + hf_sum += celt_udiv(32*(tcount[1]+tcount[0]), N); + tmp = (2*tcount[2] >= N) + (2*tcount[1] >= N) + (2*tcount[0] >= N); + sum += tmp*256; + nbBands++; + } + } while (++cnbEBands+end)); + *hf_average = (*hf_average+hf_sum)>>1; + hf_sum = *hf_average; + if (*tapset_decision==2) + hf_sum += 4; + else if (*tapset_decision==0) + hf_sum -= 4; + if (hf_sum > 22) + *tapset_decision=2; + else if (hf_sum > 18) + *tapset_decision=1; + else + *tapset_decision=0; + } + /*printf("%d %d %d\n", hf_sum, *hf_average, *tapset_decision);*/ + celt_assert(nbBands>0); /* end has to be non-zero */ + celt_assert(sum>=0); + sum = celt_udiv(sum, nbBands); + /* Recursive averaging */ + sum = (sum+*average)>>1; + *average = sum; + /* Hysteresis */ + sum = (3*sum + (((3-last_decision)<<7) + 64) + 2)>>2; + if (sum < 80) + { + decision = SPREAD_AGGRESSIVE; + } else if (sum < 256) + { + decision = SPREAD_NORMAL; + } else if (sum < 384) + { + decision = SPREAD_LIGHT; + } else { + decision = SPREAD_NONE; + } +#ifdef FUZZING + decision = rand()&0x3; + *tapset_decision=rand()%3; +#endif + return decision; +} + +/* Indexing table for converting from natural Hadamard to ordery Hadamard + This is essentially a bit-reversed Gray, on top of which we've added + an inversion of the order because we want the DC at the end rather than + the beginning. The lines are for N=2, 4, 8, 16 */ +static const int ordery_table[] = { + 1, 0, + 3, 0, 2, 1, + 7, 0, 4, 3, 6, 1, 5, 2, + 15, 0, 8, 7, 12, 3, 11, 4, 14, 1, 9, 6, 13, 2, 10, 5, +}; + +static void deinterleave_hadamard(celt_norm *X, int N0, int stride, int hadamard) +{ + int i,j; + VARDECL(celt_norm, tmp); + int N; + SAVE_STACK; + N = N0*stride; + ALLOC(tmp, N, celt_norm); + celt_assert(stride>0); + if (hadamard) + { + const int *ordery = ordery_table+stride-2; + for (i=0;i>= 1; + for (i=0;i>1)) { + qn = 1; + } else { + qn = exp2_table8[qb&0x7]>>(14-(qb>>BITRES)); + qn = (qn+1)>>1<<1; + } + celt_assert(qn <= 256); + return qn; +} + +struct band_ctx { + int encode; + const CELTMode *m; + int i; + int intensity; + int spread; + int tf_change; + ec_ctx *ec; + opus_int32 remaining_bits; + const celt_ener *bandE; + opus_uint32 seed; + int arch; +}; + +struct split_ctx { + int inv; + int imid; + int iside; + int delta; + int itheta; + int qalloc; +}; + +static void compute_theta(struct band_ctx *ctx, struct split_ctx *sctx, + celt_norm *X, celt_norm *Y, int N, int *b, int B, int B0, + int LM, + int stereo, int *fill) +{ + int qn; + int itheta=0; + int delta; + int imid, iside; + int qalloc; + int pulse_cap; + int offset; + opus_int32 tell; + int inv=0; + int encode; + const CELTMode *m; + int i; + int intensity; + ec_ctx *ec; + const celt_ener *bandE; + + encode = ctx->encode; + m = ctx->m; + i = ctx->i; + intensity = ctx->intensity; + ec = ctx->ec; + bandE = ctx->bandE; + + /* Decide on the resolution to give to the split parameter theta */ + pulse_cap = m->logN[i]+LM*(1<>1) - (stereo&&N==2 ? QTHETA_OFFSET_TWOPHASE : QTHETA_OFFSET); + qn = compute_qn(N, *b, offset, pulse_cap, stereo); + if (stereo && i>=intensity) + qn = 1; + if (encode) + { + /* theta is the atan() of the ratio between the (normalized) + side and mid. With just that parameter, we can re-scale both + mid and side because we know that 1) they have unit norm and + 2) they are orthogonal. */ + itheta = stereo_itheta(X, Y, stereo, N, ctx->arch); + } + tell = ec_tell_frac(ec); + if (qn!=1) + { + if (encode) + itheta = (itheta*qn+8192)>>14; + + /* Entropy coding of the angle. We use a uniform pdf for the + time split, a step for stereo, and a triangular one for the rest. */ + if (stereo && N>2) + { + int p0 = 3; + int x = itheta; + int x0 = qn/2; + int ft = p0*(x0+1) + x0; + /* Use a probability of p0 up to itheta=8192 and then use 1 after */ + if (encode) + { + ec_encode(ec,x<=x0?p0*x:(x-1-x0)+(x0+1)*p0,x<=x0?p0*(x+1):(x-x0)+(x0+1)*p0,ft); + } else { + int fs; + fs=ec_decode(ec,ft); + if (fs<(x0+1)*p0) + x=fs/p0; + else + x=x0+1+(fs-(x0+1)*p0); + ec_dec_update(ec,x<=x0?p0*x:(x-1-x0)+(x0+1)*p0,x<=x0?p0*(x+1):(x-x0)+(x0+1)*p0,ft); + itheta = x; + } + } else if (B0>1 || stereo) { + /* Uniform pdf */ + if (encode) + ec_enc_uint(ec, itheta, qn+1); + else + itheta = ec_dec_uint(ec, qn+1); + } else { + int fs=1, ft; + ft = ((qn>>1)+1)*((qn>>1)+1); + if (encode) + { + int fl; + + fs = itheta <= (qn>>1) ? itheta + 1 : qn + 1 - itheta; + fl = itheta <= (qn>>1) ? itheta*(itheta + 1)>>1 : + ft - ((qn + 1 - itheta)*(qn + 2 - itheta)>>1); + + ec_encode(ec, fl, fl+fs, ft); + } else { + /* Triangular pdf */ + int fl=0; + int fm; + fm = ec_decode(ec, ft); + + if (fm < ((qn>>1)*((qn>>1) + 1)>>1)) + { + itheta = (isqrt32(8*(opus_uint32)fm + 1) - 1)>>1; + fs = itheta + 1; + fl = itheta*(itheta + 1)>>1; + } + else + { + itheta = (2*(qn + 1) + - isqrt32(8*(opus_uint32)(ft - fm - 1) + 1))>>1; + fs = qn + 1 - itheta; + fl = ft - ((qn + 1 - itheta)*(qn + 2 - itheta)>>1); + } + + ec_dec_update(ec, fl, fl+fs, ft); + } + } + celt_assert(itheta>=0); + itheta = celt_udiv((opus_int32)itheta*16384, qn); + if (encode && stereo) + { + if (itheta==0) + intensity_stereo(m, X, Y, bandE, i, N); + else + stereo_split(X, Y, N); + } + /* NOTE: Renormalising X and Y *may* help fixed-point a bit at very high rate. + Let's do that at higher complexity */ + } else if (stereo) { + if (encode) + { + inv = itheta > 8192; + if (inv) + { + int j; + for (j=0;j2<remaining_bits > 2<inv = inv; + sctx->imid = imid; + sctx->iside = iside; + sctx->delta = delta; + sctx->itheta = itheta; + sctx->qalloc = qalloc; +} +static unsigned quant_band_n1(struct band_ctx *ctx, celt_norm *X, celt_norm *Y, int b, + celt_norm *lowband_out) +{ +#ifdef RESYNTH + int resynth = 1; +#else + int resynth = !ctx->encode; +#endif + int c; + int stereo; + celt_norm *x = X; + int encode; + ec_ctx *ec; + + encode = ctx->encode; + ec = ctx->ec; + + stereo = Y != NULL; + c=0; do { + int sign=0; + if (ctx->remaining_bits>=1<remaining_bits -= 1<encode; +#endif + celt_norm *Y=NULL; + int encode; + const CELTMode *m; + int i; + int spread; + ec_ctx *ec; + + encode = ctx->encode; + m = ctx->m; + i = ctx->i; + spread = ctx->spread; + ec = ctx->ec; + + /* If we need 1.5 more bit than we can produce, split the band in two. */ + cache = m->cache.bits + m->cache.index[(LM+1)*m->nbEBands+i]; + if (LM != -1 && b > cache[cache[0]]+12 && N>2) + { + int mbits, sbits, delta; + int itheta; + int qalloc; + struct split_ctx sctx; + celt_norm *next_lowband2=NULL; + opus_int32 rebalance; + + N >>= 1; + Y = X+N; + LM -= 1; + if (B==1) + fill = (fill&1)|(fill<<1); + B = (B+1)>>1; + + compute_theta(ctx, &sctx, X, Y, N, &b, B, B0, + LM, 0, &fill); + imid = sctx.imid; + iside = sctx.iside; + delta = sctx.delta; + itheta = sctx.itheta; + qalloc = sctx.qalloc; +#ifdef FIXED_POINT + mid = imid; + side = iside; +#else + mid = (1.f/32768)*imid; + side = (1.f/32768)*iside; +#endif + + /* Give more bits to low-energy MDCTs than they would otherwise deserve */ + if (B0>1 && (itheta&0x3fff)) + { + if (itheta > 8192) + /* Rough approximation for pre-echo masking */ + delta -= delta>>(4-LM); + else + /* Corresponds to a forward-masking slope of 1.5 dB per 10 ms */ + delta = IMIN(0, delta + (N<>(5-LM))); + } + mbits = IMAX(0, IMIN(b, (b-delta)/2)); + sbits = b-mbits; + ctx->remaining_bits -= qalloc; + + if (lowband) + next_lowband2 = lowband+N; /* >32-bit split case */ + + rebalance = ctx->remaining_bits; + if (mbits >= sbits) + { + cm = quant_partition(ctx, X, N, mbits, B, + lowband, LM, + MULT16_16_P15(gain,mid), fill); + rebalance = mbits - (rebalance-ctx->remaining_bits); + if (rebalance > 3<>B)<<(B0>>1); + } else { + cm = quant_partition(ctx, Y, N, sbits, B, + next_lowband2, LM, + MULT16_16_P15(gain,side), fill>>B)<<(B0>>1); + rebalance = sbits - (rebalance-ctx->remaining_bits); + if (rebalance > 3<remaining_bits -= curr_bits; + + /* Ensures we can never bust the budget */ + while (ctx->remaining_bits < 0 && q > 0) + { + ctx->remaining_bits += curr_bits; + q--; + curr_bits = pulses2bits(m, i, LM, q); + ctx->remaining_bits -= curr_bits; + } + + if (q!=0) + { + int K = get_pulses(q); + + /* Finally do the actual quantization */ + if (encode) + { + cm = alg_quant(X, N, K, spread, B, ec +#ifdef RESYNTH + , gain +#endif + ); + } else { + cm = alg_unquant(X, N, K, spread, B, ec, gain); + } + } else { + /* If there's no pulse, fill the band anyway */ + int j; + if (resynth) + { + unsigned cm_mask; + /* B can be as large as 16, so this shift might overflow an int on a + 16-bit platform; use a long to get defined behavior.*/ + cm_mask = (unsigned)(1UL<seed = celt_lcg_rand(ctx->seed); + X[j] = (celt_norm)((opus_int32)ctx->seed>>20); + } + cm = cm_mask; + } else { + /* Folded spectrum */ + for (j=0;jseed = celt_lcg_rand(ctx->seed); + /* About 48 dB below the "normal" folding level */ + tmp = QCONST16(1.0f/256, 10); + tmp = (ctx->seed)&0x8000 ? tmp : -tmp; + X[j] = lowband[j]+tmp; + } + cm = fill; + } + renormalise_vector(X, N, gain, ctx->arch); + } + } + } + } + + return cm; +} + + +/* This function is responsible for encoding and decoding a band for the mono case. */ +static unsigned quant_band(struct band_ctx *ctx, celt_norm *X, + int N, int b, int B, celt_norm *lowband, + int LM, celt_norm *lowband_out, + opus_val16 gain, celt_norm *lowband_scratch, int fill) +{ + int N0=N; + int N_B=N; + int N_B0; + int B0=B; + int time_divide=0; + int recombine=0; + int longBlocks; + unsigned cm=0; +#ifdef RESYNTH + int resynth = 1; +#else + int resynth = !ctx->encode; +#endif + int k; + int encode; + int tf_change; + + encode = ctx->encode; + tf_change = ctx->tf_change; + + longBlocks = B0==1; + + N_B = celt_udiv(N_B, B); + + /* Special case for one sample */ + if (N==1) + { + return quant_band_n1(ctx, X, NULL, b, lowband_out); + } + + if (tf_change>0) + recombine = tf_change; + /* Band recombining to increase frequency resolution */ + + if (lowband_scratch && lowband && (recombine || ((N_B&1) == 0 && tf_change<0) || B0>1)) + { + OPUS_COPY(lowband_scratch, lowband, N); + lowband = lowband_scratch; + } + + for (k=0;k>k, 1<>k, 1<>4]<<2; + } + B>>=recombine; + N_B<<=recombine; + + /* Increasing the time resolution */ + while ((N_B&1) == 0 && tf_change<0) + { + if (encode) + haar1(X, N_B, B); + if (lowband) + haar1(lowband, N_B, B); + fill |= fill<>= 1; + time_divide++; + tf_change++; + } + B0=B; + N_B0 = N_B; + + /* Reorganize the samples in time order instead of frequency order */ + if (B0>1) + { + if (encode) + deinterleave_hadamard(X, N_B>>recombine, B0<>recombine, B0<1) + interleave_hadamard(X, N_B>>recombine, B0<>= 1; + N_B <<= 1; + cm |= cm>>B; + haar1(X, N_B, B); + } + + for (k=0;k>k, 1<encode; +#endif + int mbits, sbits, delta; + int itheta; + int qalloc; + struct split_ctx sctx; + int orig_fill; + int encode; + ec_ctx *ec; + + encode = ctx->encode; + ec = ctx->ec; + + /* Special case for one sample */ + if (N==1) + { + return quant_band_n1(ctx, X, Y, b, lowband_out); + } + + orig_fill = fill; + + compute_theta(ctx, &sctx, X, Y, N, &b, B, B, + LM, 1, &fill); + inv = sctx.inv; + imid = sctx.imid; + iside = sctx.iside; + delta = sctx.delta; + itheta = sctx.itheta; + qalloc = sctx.qalloc; +#ifdef FIXED_POINT + mid = imid; + side = iside; +#else + mid = (1.f/32768)*imid; + side = (1.f/32768)*iside; +#endif + + /* This is a special case for N=2 that only works for stereo and takes + advantage of the fact that mid and side are orthogonal to encode + the side with just one bit. */ + if (N==2) + { + int c; + int sign=0; + celt_norm *x2, *y2; + mbits = b; + sbits = 0; + /* Only need one bit for the side. */ + if (itheta != 0 && itheta != 16384) + sbits = 1< 8192; + ctx->remaining_bits -= qalloc+sbits; + + x2 = c ? Y : X; + y2 = c ? X : Y; + if (sbits) + { + if (encode) + { + /* Here we only need to encode a sign for the side. */ + sign = x2[0]*y2[1] - x2[1]*y2[0] < 0; + ec_enc_bits(ec, sign, 1); + } else { + sign = ec_dec_bits(ec, 1); + } + } + sign = 1-2*sign; + /* We use orig_fill here because we want to fold the side, but if + itheta==16384, we'll have cleared the low bits of fill. */ + cm = quant_band(ctx, x2, N, mbits, B, lowband, + LM, lowband_out, Q15ONE, lowband_scratch, orig_fill); + /* We don't split N=2 bands, so cm is either 1 or 0 (for a fold-collapse), + and there's no need to worry about mixing with the other channel. */ + y2[0] = -sign*x2[1]; + y2[1] = sign*x2[0]; + if (resynth) + { + celt_norm tmp; + X[0] = MULT16_16_Q15(mid, X[0]); + X[1] = MULT16_16_Q15(mid, X[1]); + Y[0] = MULT16_16_Q15(side, Y[0]); + Y[1] = MULT16_16_Q15(side, Y[1]); + tmp = X[0]; + X[0] = SUB16(tmp,Y[0]); + Y[0] = ADD16(tmp,Y[0]); + tmp = X[1]; + X[1] = SUB16(tmp,Y[1]); + Y[1] = ADD16(tmp,Y[1]); + } + } else { + /* "Normal" split code */ + opus_int32 rebalance; + + mbits = IMAX(0, IMIN(b, (b-delta)/2)); + sbits = b-mbits; + ctx->remaining_bits -= qalloc; + + rebalance = ctx->remaining_bits; + if (mbits >= sbits) + { + /* In stereo mode, we do not apply a scaling to the mid because we need the normalized + mid for folding later. */ + cm = quant_band(ctx, X, N, mbits, B, + lowband, LM, lowband_out, + Q15ONE, lowband_scratch, fill); + rebalance = mbits - (rebalance-ctx->remaining_bits); + if (rebalance > 3<>B); + } else { + /* For a stereo split, the high bits of fill are always zero, so no + folding will be done to the side. */ + cm = quant_band(ctx, Y, N, sbits, B, + NULL, LM, NULL, + side, NULL, fill>>B); + rebalance = sbits - (rebalance-ctx->remaining_bits); + if (rebalance > 3<arch); + if (inv) + { + int j; + for (j=0;jeBands; + celt_norm * OPUS_RESTRICT norm, * OPUS_RESTRICT norm2; + VARDECL(celt_norm, _norm); + celt_norm *lowband_scratch; + int B; + int M; + int lowband_offset; + int update_lowband = 1; + int C = Y_ != NULL ? 2 : 1; + int norm_offset; +#ifdef RESYNTH + int resynth = 1; +#else + int resynth = !encode; +#endif + struct band_ctx ctx; + SAVE_STACK; + + M = 1<nbEBands-1]-norm_offset), celt_norm); + norm = _norm; + norm2 = norm + M*eBands[m->nbEBands-1]-norm_offset; + /* We can use the last band as scratch space because we don't need that + scratch space for the last band. */ + lowband_scratch = X_+M*eBands[m->nbEBands-1]; + + lowband_offset = 0; + ctx.bandE = bandE; + ctx.ec = ec; + ctx.encode = encode; + ctx.intensity = intensity; + ctx.m = m; + ctx.seed = *seed; + ctx.spread = spread; + ctx.arch = arch; + for (i=start;i= M*eBands[start] && (update_lowband || lowband_offset==0)) + lowband_offset = i; + + tf_change = tf_res[i]; + ctx.tf_change = tf_change; + if (i>=m->effEBands) + { + X=norm; + if (Y_!=NULL) + Y = norm; + lowband_scratch = NULL; + } + if (i==end-1) + lowband_scratch = NULL; + + /* Get a conservative estimate of the collapse_mask's for the bands we're + going to be folding from. */ + if (lowband_offset != 0 && (spread!=SPREAD_AGGRESSIVE || B>1 || tf_change<0)) + { + int fold_start; + int fold_end; + int fold_i; + /* This ensures we never repeat spectral content within one band */ + effective_lowband = IMAX(0, M*eBands[lowband_offset]-norm_offset-N); + fold_start = lowband_offset; + while(M*eBands[--fold_start] > effective_lowband+norm_offset); + fold_end = lowband_offset-1; + while(M*eBands[++fold_end] < effective_lowband+norm_offset+N); + x_cm = y_cm = 0; + fold_i = fold_start; do { + x_cm |= collapse_masks[fold_i*C+0]; + y_cm |= collapse_masks[fold_i*C+C-1]; + } while (++fold_i(N< +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" +#include +#include "celt_lpc.h" +#include "vq.h" + +#ifndef PACKAGE_VERSION +#define PACKAGE_VERSION "unknown" +#endif + +#if defined(MIPSr1_ASM) +#include "mips/celt_mipsr1.h" +#endif + + +int resampling_factor(opus_int32 rate) +{ + int ret; + switch (rate) + { + case 48000: + ret = 1; + break; + case 24000: + ret = 2; + break; + case 16000: + ret = 3; + break; + case 12000: + ret = 4; + break; + case 8000: + ret = 6; + break; + default: +#ifndef CUSTOM_MODES + celt_assert(0); +#endif + ret = 0; + break; + } + return ret; +} + +#if !defined(OVERRIDE_COMB_FILTER_CONST) || defined(NON_STATIC_COMB_FILTER_CONST_C) +/* This version should be faster on ARM */ +#ifdef OPUS_ARM_ASM +#ifndef NON_STATIC_COMB_FILTER_CONST_C +static +#endif +void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N, + opus_val16 g10, opus_val16 g11, opus_val16 g12) +{ + opus_val32 x0, x1, x2, x3, x4; + int i; + x4 = SHL32(x[-T-2], 1); + x3 = SHL32(x[-T-1], 1); + x2 = SHL32(x[-T], 1); + x1 = SHL32(x[-T+1], 1); + for (i=0;inbEBands;i++) + { + int N; + N=(m->eBands[i+1]-m->eBands[i])<cache.caps[m->nbEBands*(2*LM+C-1)+i]+64)*C*N>>2; + } +} + + + +const char *opus_strerror(int error) +{ + static const char * const error_strings[8] = { + "success", + "invalid argument", + "buffer too small", + "internal error", + "corrupted stream", + "request not implemented", + "invalid state", + "memory allocation failed" + }; + if (error > 0 || error < -7) + return "unknown error"; + else + return error_strings[-error]; +} + +const char *opus_get_version_string(void) +{ + return "libopus " PACKAGE_VERSION + /* Applications may rely on the presence of this substring in the version + string to determine if they have a fixed-point or floating-point build + at runtime. */ +#ifdef FIXED_POINT + "-fixed" +#endif +#ifdef FUZZING + "-fuzzing" +#endif + ; +} diff --git a/asm/libs/opus/celt/celt.h b/asm/libs/opus/celt/celt.h new file mode 100644 index 00000000..a423b950 --- /dev/null +++ b/asm/libs/opus/celt/celt.h @@ -0,0 +1,229 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Copyright (c) 2008 Gregory Maxwell + Written by Jean-Marc Valin and Gregory Maxwell */ +/** + @file celt.h + @brief Contains all the functions for encoding and decoding audio + */ + +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef CELT_H +#define CELT_H + +#include "opus_types.h" +#include "opus_defines.h" +#include "opus_custom.h" +#include "entenc.h" +#include "entdec.h" +#include "arch.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define CELTEncoder OpusCustomEncoder +#define CELTDecoder OpusCustomDecoder +#define CELTMode OpusCustomMode + +typedef struct { + int valid; + float tonality; + float tonality_slope; + float noisiness; + float activity; + float music_prob; + int bandwidth; +}AnalysisInfo; + +#define __celt_check_mode_ptr_ptr(ptr) ((ptr) + ((ptr) - (const CELTMode**)(ptr))) + +#define __celt_check_analysis_ptr(ptr) ((ptr) + ((ptr) - (const AnalysisInfo*)(ptr))) + +/* Encoder/decoder Requests */ + +/* Expose this option again when variable framesize actually works */ +#define OPUS_FRAMESIZE_VARIABLE 5010 /**< Optimize the frame size dynamically */ + + +#define CELT_SET_PREDICTION_REQUEST 10002 +/** Controls the use of interframe prediction. + 0=Independent frames + 1=Short term interframe prediction allowed + 2=Long term prediction allowed + */ +#define CELT_SET_PREDICTION(x) CELT_SET_PREDICTION_REQUEST, __opus_check_int(x) + +#define CELT_SET_INPUT_CLIPPING_REQUEST 10004 +#define CELT_SET_INPUT_CLIPPING(x) CELT_SET_INPUT_CLIPPING_REQUEST, __opus_check_int(x) + +#define CELT_GET_AND_CLEAR_ERROR_REQUEST 10007 +#define CELT_GET_AND_CLEAR_ERROR(x) CELT_GET_AND_CLEAR_ERROR_REQUEST, __opus_check_int_ptr(x) + +#define CELT_SET_CHANNELS_REQUEST 10008 +#define CELT_SET_CHANNELS(x) CELT_SET_CHANNELS_REQUEST, __opus_check_int(x) + + +/* Internal */ +#define CELT_SET_START_BAND_REQUEST 10010 +#define CELT_SET_START_BAND(x) CELT_SET_START_BAND_REQUEST, __opus_check_int(x) + +#define CELT_SET_END_BAND_REQUEST 10012 +#define CELT_SET_END_BAND(x) CELT_SET_END_BAND_REQUEST, __opus_check_int(x) + +#define CELT_GET_MODE_REQUEST 10015 +/** Get the CELTMode used by an encoder or decoder */ +#define CELT_GET_MODE(x) CELT_GET_MODE_REQUEST, __celt_check_mode_ptr_ptr(x) + +#define CELT_SET_SIGNALLING_REQUEST 10016 +#define CELT_SET_SIGNALLING(x) CELT_SET_SIGNALLING_REQUEST, __opus_check_int(x) + +#define CELT_SET_TONALITY_REQUEST 10018 +#define CELT_SET_TONALITY(x) CELT_SET_TONALITY_REQUEST, __opus_check_int(x) +#define CELT_SET_TONALITY_SLOPE_REQUEST 10020 +#define CELT_SET_TONALITY_SLOPE(x) CELT_SET_TONALITY_SLOPE_REQUEST, __opus_check_int(x) + +#define CELT_SET_ANALYSIS_REQUEST 10022 +#define CELT_SET_ANALYSIS(x) CELT_SET_ANALYSIS_REQUEST, __celt_check_analysis_ptr(x) + +#define OPUS_SET_LFE_REQUEST 10024 +#define OPUS_SET_LFE(x) OPUS_SET_LFE_REQUEST, __opus_check_int(x) + +#define OPUS_SET_ENERGY_MASK_REQUEST 10026 +#define OPUS_SET_ENERGY_MASK(x) OPUS_SET_ENERGY_MASK_REQUEST, __opus_check_val16_ptr(x) + +/* Encoder stuff */ + +int celt_encoder_get_size(int channels); + +int celt_encode_with_ec(OpusCustomEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc); + +int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels, + int arch); + + + +/* Decoder stuff */ + +int celt_decoder_get_size(int channels); + + +int celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels); + +int celt_decode_with_ec(OpusCustomDecoder * OPUS_RESTRICT st, const unsigned char *data, + int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum); + +#define celt_encoder_ctl opus_custom_encoder_ctl +#define celt_decoder_ctl opus_custom_decoder_ctl + + +#ifdef CUSTOM_MODES +#define OPUS_CUSTOM_NOSTATIC +#else +#define OPUS_CUSTOM_NOSTATIC static OPUS_INLINE +#endif + +static const unsigned char trim_icdf[11] = {126, 124, 119, 109, 87, 41, 19, 9, 4, 2, 0}; +/* Probs: NONE: 21.875%, LIGHT: 6.25%, NORMAL: 65.625%, AGGRESSIVE: 6.25% */ +static const unsigned char spread_icdf[4] = {25, 23, 2, 0}; + +static const unsigned char tapset_icdf[3]={2,1,0}; + +#ifdef CUSTOM_MODES +static const unsigned char toOpusTable[20] = { + 0xE0, 0xE8, 0xF0, 0xF8, + 0xC0, 0xC8, 0xD0, 0xD8, + 0xA0, 0xA8, 0xB0, 0xB8, + 0x00, 0x00, 0x00, 0x00, + 0x80, 0x88, 0x90, 0x98, +}; + +static const unsigned char fromOpusTable[16] = { + 0x80, 0x88, 0x90, 0x98, + 0x40, 0x48, 0x50, 0x58, + 0x20, 0x28, 0x30, 0x38, + 0x00, 0x08, 0x10, 0x18 +}; + +static OPUS_INLINE int toOpus(unsigned char c) +{ + int ret=0; + if (c<0xA0) + ret = toOpusTable[c>>3]; + if (ret == 0) + return -1; + else + return ret|(c&0x7); +} + +static OPUS_INLINE int fromOpus(unsigned char c) +{ + if (c<0x80) + return -1; + else + return fromOpusTable[(c>>3)-16] | (c&0x7); +} +#endif /* CUSTOM_MODES */ + +#define COMBFILTER_MAXPERIOD 1024 +#define COMBFILTER_MINPERIOD 15 + +extern const signed char tf_select_table[4][8]; + +int resampling_factor(opus_int32 rate); + +void celt_preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp, + int N, int CC, int upsample, const opus_val16 *coef, celt_sig *mem, int clip); + +void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N, + opus_val16 g0, opus_val16 g1, int tapset0, int tapset1, + const opus_val16 *window, int overlap, int arch); + +#ifdef NON_STATIC_COMB_FILTER_CONST_C +void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N, + opus_val16 g10, opus_val16 g11, opus_val16 g12); +#endif + +#ifndef OVERRIDE_COMB_FILTER_CONST +# define comb_filter_const(y, x, T, N, g10, g11, g12, arch) \ + ((void)(arch),comb_filter_const_c(y, x, T, N, g10, g11, g12)) +#endif + +void init_caps(const CELTMode *m,int *cap,int LM,int C); + +#ifdef RESYNTH +void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem); +void celt_synthesis(const CELTMode *mode, celt_norm *X, celt_sig * out_syn[], + opus_val16 *oldBandE, int start, int effEnd, int C, int CC, int isTransient, + int LM, int downsample, int silence); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* CELT_H */ diff --git a/asm/libs/opus/celt/celt_decoder.c b/asm/libs/opus/celt/celt_decoder.c new file mode 100644 index 00000000..b688f2a4 --- /dev/null +++ b/asm/libs/opus/celt/celt_decoder.c @@ -0,0 +1,1244 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2010 Xiph.Org Foundation + Copyright (c) 2008 Gregory Maxwell + Written by Jean-Marc Valin and Gregory Maxwell */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define CELT_DECODER_C + +#include "cpu_support.h" +#include "os_support.h" +#include "mdct.h" +#include +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" +#include +#include "celt_lpc.h" +#include "vq.h" + +#if defined(SMALL_FOOTPRINT) && defined(FIXED_POINT) +#define NORM_ALIASING_HACK +#endif +/**********************************************************************/ +/* */ +/* DECODER */ +/* */ +/**********************************************************************/ +#define DECODE_BUFFER_SIZE 2048 + +/** Decoder state + @brief Decoder state + */ +struct OpusCustomDecoder { + const OpusCustomMode *mode; + int overlap; + int channels; + int stream_channels; + + int downsample; + int start, end; + int signalling; + int arch; + + /* Everything beyond this point gets cleared on a reset */ +#define DECODER_RESET_START rng + + opus_uint32 rng; + int error; + int last_pitch_index; + int loss_count; + int postfilter_period; + int postfilter_period_old; + opus_val16 postfilter_gain; + opus_val16 postfilter_gain_old; + int postfilter_tapset; + int postfilter_tapset_old; + + celt_sig preemph_memD[2]; + + celt_sig _decode_mem[1]; /* Size = channels*(DECODE_BUFFER_SIZE+mode->overlap) */ + /* opus_val16 lpc[], Size = channels*LPC_ORDER */ + /* opus_val16 oldEBands[], Size = 2*mode->nbEBands */ + /* opus_val16 oldLogE[], Size = 2*mode->nbEBands */ + /* opus_val16 oldLogE2[], Size = 2*mode->nbEBands */ + /* opus_val16 backgroundLogE[], Size = 2*mode->nbEBands */ +}; + +int celt_decoder_get_size(int channels) +{ + const CELTMode *mode = opus_custom_mode_create(48000, 960, NULL); + return opus_custom_decoder_get_size(mode, channels); +} + +OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_get_size(const CELTMode *mode, int channels) +{ + int size = sizeof(struct CELTDecoder) + + (channels*(DECODE_BUFFER_SIZE+mode->overlap)-1)*sizeof(celt_sig) + + channels*LPC_ORDER*sizeof(opus_val16) + + 4*2*mode->nbEBands*sizeof(opus_val16); + return size; +} + +#ifdef CUSTOM_MODES +CELTDecoder *opus_custom_decoder_create(const CELTMode *mode, int channels, int *error) +{ + int ret; + CELTDecoder *st = (CELTDecoder *)opus_alloc(opus_custom_decoder_get_size(mode, channels)); + ret = opus_custom_decoder_init(st, mode, channels); + if (ret != OPUS_OK) + { + opus_custom_decoder_destroy(st); + st = NULL; + } + if (error) + *error = ret; + return st; +} +#endif /* CUSTOM_MODES */ + +int celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels) +{ + int ret; + ret = opus_custom_decoder_init(st, opus_custom_mode_create(48000, 960, NULL), channels); + if (ret != OPUS_OK) + return ret; + st->downsample = resampling_factor(sampling_rate); + if (st->downsample==0) + return OPUS_BAD_ARG; + else + return OPUS_OK; +} + +OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_init(CELTDecoder *st, const CELTMode *mode, int channels) +{ + if (channels < 0 || channels > 2) + return OPUS_BAD_ARG; + + if (st==NULL) + return OPUS_ALLOC_FAIL; + + OPUS_CLEAR((char*)st, opus_custom_decoder_get_size(mode, channels)); + + st->mode = mode; + st->overlap = mode->overlap; + st->stream_channels = st->channels = channels; + + st->downsample = 1; + st->start = 0; + st->end = st->mode->effEBands; + st->signalling = 1; + st->arch = opus_select_arch(); + + st->loss_count = 0; + + opus_custom_decoder_ctl(st, OPUS_RESET_STATE); + + return OPUS_OK; +} + +#ifdef CUSTOM_MODES +void opus_custom_decoder_destroy(CELTDecoder *st) +{ + opus_free(st); +} +#endif /* CUSTOM_MODES */ + + +#ifndef RESYNTH +static +#endif +void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, + celt_sig *mem, int accum) +{ + int c; + int Nd; + int apply_downsampling=0; + opus_val16 coef0; + VARDECL(celt_sig, scratch); + SAVE_STACK; +#ifndef FIXED_POINT + (void)accum; + celt_assert(accum==0); +#endif + ALLOC(scratch, N, celt_sig); + coef0 = coef[0]; + Nd = N/downsample; + c=0; do { + int j; + celt_sig * OPUS_RESTRICT x; + opus_val16 * OPUS_RESTRICT y; + celt_sig m = mem[c]; + x =in[c]; + y = pcm+c; +#ifdef CUSTOM_MODES + if (coef[1] != 0) + { + opus_val16 coef1 = coef[1]; + opus_val16 coef3 = coef[3]; + for (j=0;j1) + { + /* Shortcut for the standard (non-custom modes) case */ + for (j=0;joverlap; + nbEBands = mode->nbEBands; + N = mode->shortMdctSize<shortMdctSize; + shift = mode->maxLM; + } else { + B = 1; + NB = mode->shortMdctSize<maxLM-LM; + } + + if (CC==2&&C==1) + { + /* Copying a mono streams to two channels */ + celt_sig *freq2; + denormalise_bands(mode, X, freq, oldBandE, start, effEnd, M, + downsample, silence); + /* Store a temporary copy in the output buffer because the IMDCT destroys its input. */ + freq2 = out_syn[1]+overlap/2; + OPUS_COPY(freq2, freq, N); + for (b=0;bmdct, &freq2[b], out_syn[0]+NB*b, mode->window, overlap, shift, B, arch); + for (b=0;bmdct, &freq[b], out_syn[1]+NB*b, mode->window, overlap, shift, B, arch); + } else if (CC==1&&C==2) + { + /* Downmixing a stereo stream to mono */ + celt_sig *freq2; + freq2 = out_syn[0]+overlap/2; + denormalise_bands(mode, X, freq, oldBandE, start, effEnd, M, + downsample, silence); + /* Use the output buffer as temp array before downmixing. */ + denormalise_bands(mode, X+N, freq2, oldBandE+nbEBands, start, effEnd, M, + downsample, silence); + for (i=0;imdct, &freq[b], out_syn[0]+NB*b, mode->window, overlap, shift, B, arch); + } else { + /* Normal case (mono or stereo) */ + c=0; do { + denormalise_bands(mode, X+c*N, freq, oldBandE+c*nbEBands, start, effEnd, M, + downsample, silence); + for (b=0;bmdct, &freq[b], out_syn[c]+NB*b, mode->window, overlap, shift, B, arch); + } while (++cstorage*8; + tell = ec_tell(dec); + logp = isTransient ? 2 : 4; + tf_select_rsv = LM>0 && tell+logp+1<=budget; + budget -= tf_select_rsv; + tf_changed = curr = 0; + for (i=start;i>1, opus_val16 ); + pitch_downsample(decode_mem, lp_pitch_buf, + DECODE_BUFFER_SIZE, C, arch); + pitch_search(lp_pitch_buf+(PLC_PITCH_LAG_MAX>>1), lp_pitch_buf, + DECODE_BUFFER_SIZE-PLC_PITCH_LAG_MAX, + PLC_PITCH_LAG_MAX-PLC_PITCH_LAG_MIN, &pitch_index, arch); + pitch_index = PLC_PITCH_LAG_MAX-pitch_index; + RESTORE_STACK; + return pitch_index; +} + +static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) +{ + int c; + int i; + const int C = st->channels; + celt_sig *decode_mem[2]; + celt_sig *out_syn[2]; + opus_val16 *lpc; + opus_val16 *oldBandE, *oldLogE, *oldLogE2, *backgroundLogE; + const OpusCustomMode *mode; + int nbEBands; + int overlap; + int start; + int loss_count; + int noise_based; + const opus_int16 *eBands; + SAVE_STACK; + + mode = st->mode; + nbEBands = mode->nbEBands; + overlap = mode->overlap; + eBands = mode->eBands; + + c=0; do { + decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+overlap); + out_syn[c] = decode_mem[c]+DECODE_BUFFER_SIZE-N; + } while (++c_decode_mem+(DECODE_BUFFER_SIZE+overlap)*C); + oldBandE = lpc+C*LPC_ORDER; + oldLogE = oldBandE + 2*nbEBands; + oldLogE2 = oldLogE + 2*nbEBands; + backgroundLogE = oldLogE2 + 2*nbEBands; + + loss_count = st->loss_count; + start = st->start; + noise_based = loss_count >= 5 || start != 0; + if (noise_based) + { + /* Noise-based PLC/CNG */ +#ifdef NORM_ALIASING_HACK + celt_norm *X; +#else + VARDECL(celt_norm, X); +#endif + opus_uint32 seed; + int end; + int effEnd; + opus_val16 decay; + end = st->end; + effEnd = IMAX(start, IMIN(end, mode->effEBands)); + +#ifdef NORM_ALIASING_HACK + /* This is an ugly hack that breaks aliasing rules and would be easily broken, + but it saves almost 4kB of stack. */ + X = (celt_norm*)(out_syn[C-1]+overlap/2); +#else + ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ +#endif + + /* Energy decay */ + decay = loss_count==0 ? QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT); + c=0; do + { + for (i=start;irng; + for (c=0;c>20); + } + renormalise_vector(X+boffs, blen, Q15ONE, st->arch); + } + } + st->rng = seed; + + c=0; do { + OPUS_MOVE(decode_mem[c], decode_mem[c]+N, + DECODE_BUFFER_SIZE-N+(overlap>>1)); + } while (++cdownsample, 0, st->arch); + } else { + /* Pitch-based PLC */ + const opus_val16 *window; + opus_val16 fade = Q15ONE; + int pitch_index; + VARDECL(opus_val32, etmp); + VARDECL(opus_val16, exc); + + if (loss_count == 0) + { + st->last_pitch_index = pitch_index = celt_plc_pitch_search(decode_mem, C, st->arch); + } else { + pitch_index = st->last_pitch_index; + fade = QCONST16(.8f,15); + } + + ALLOC(etmp, overlap, opus_val32); + ALLOC(exc, MAX_PERIOD, opus_val16); + window = mode->window; + c=0; do { + opus_val16 decay; + opus_val16 attenuation; + opus_val32 S1=0; + celt_sig *buf; + int extrapolation_offset; + int extrapolation_len; + int exc_length; + int j; + + buf = decode_mem[c]; + for (i=0;iarch); + /* Add a noise floor of -40 dB. */ +#ifdef FIXED_POINT + ac[0] += SHR32(ac[0],13); +#else + ac[0] *= 1.0001f; +#endif + /* Use lag windowing to stabilize the Levinson-Durbin recursion. */ + for (i=1;i<=LPC_ORDER;i++) + { + /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ +#ifdef FIXED_POINT + ac[i] -= MULT16_32_Q15(2*i*i, ac[i]); +#else + ac[i] -= ac[i]*(0.008f*0.008f)*i*i; +#endif + } + _celt_lpc(lpc+c*LPC_ORDER, ac, LPC_ORDER); + } + /* We want the excitation for 2 pitch periods in order to look for a + decaying signal, but we can't get more than MAX_PERIOD. */ + exc_length = IMIN(2*pitch_index, MAX_PERIOD); + /* Initialize the LPC history with the samples just before the start + of the region for which we're computing the excitation. */ + { + opus_val16 lpc_mem[LPC_ORDER]; + for (i=0;iarch); + } + + /* Check if the waveform is decaying, and if so how fast. + We do this to avoid adding energy when concealing in a segment + with decaying energy. */ + { + opus_val32 E1=1, E2=1; + int decay_length; +#ifdef FIXED_POINT + int shift = IMAX(0,2*celt_zlog2(celt_maxabs16(&exc[MAX_PERIOD-exc_length], exc_length))-20); +#endif + decay_length = exc_length>>1; + for (i=0;i= pitch_index) { + j -= pitch_index; + attenuation = MULT16_16_Q15(attenuation, decay); + } + buf[DECODE_BUFFER_SIZE-N+i] = + SHL32(EXTEND32(MULT16_16_Q15(attenuation, + exc[extrapolation_offset+j])), SIG_SHIFT); + /* Compute the energy of the previously decoded signal whose + excitation we're copying. */ + tmp = ROUND16( + buf[DECODE_BUFFER_SIZE-MAX_PERIOD-N+extrapolation_offset+j], + SIG_SHIFT); + S1 += SHR32(MULT16_16(tmp, tmp), 8); + } + + { + opus_val16 lpc_mem[LPC_ORDER]; + /* Copy the last decoded samples (prior to the overlap region) to + synthesis filter memory so we can have a continuous signal. */ + for (i=0;iarch); + } + + /* Check if the synthesis energy is higher than expected, which can + happen with the signal changes during our window. If so, + attenuate. */ + { + opus_val32 S2=0; + for (i=0;i SHR32(S2,2))) +#else + /* The float test is written this way to catch NaNs in the output + of the IIR filter at the same time. */ + if (!(S1 > 0.2f*S2)) +#endif + { + for (i=0;ipostfilter_period, st->postfilter_period, overlap, + -st->postfilter_gain, -st->postfilter_gain, + st->postfilter_tapset, st->postfilter_tapset, NULL, 0, st->arch); + + /* Simulate TDAC on the concealed audio so that it blends with the + MDCT of the next frame. */ + for (i=0;iloss_count = loss_count+1; + + RESTORE_STACK; +} + +int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, + int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum) +{ + int c, i, N; + int spread_decision; + opus_int32 bits; + ec_dec _dec; +#ifdef NORM_ALIASING_HACK + celt_norm *X; +#else + VARDECL(celt_norm, X); +#endif + VARDECL(int, fine_quant); + VARDECL(int, pulses); + VARDECL(int, cap); + VARDECL(int, offsets); + VARDECL(int, fine_priority); + VARDECL(int, tf_res); + VARDECL(unsigned char, collapse_masks); + celt_sig *decode_mem[2]; + celt_sig *out_syn[2]; + opus_val16 *lpc; + opus_val16 *oldBandE, *oldLogE, *oldLogE2, *backgroundLogE; + + int shortBlocks; + int isTransient; + int intra_ener; + const int CC = st->channels; + int LM, M; + int start; + int end; + int effEnd; + int codedBands; + int alloc_trim; + int postfilter_pitch; + opus_val16 postfilter_gain; + int intensity=0; + int dual_stereo=0; + opus_int32 total_bits; + opus_int32 balance; + opus_int32 tell; + int dynalloc_logp; + int postfilter_tapset; + int anti_collapse_rsv; + int anti_collapse_on=0; + int silence; + int C = st->stream_channels; + const OpusCustomMode *mode; + int nbEBands; + int overlap; + const opus_int16 *eBands; + ALLOC_STACK; + + mode = st->mode; + nbEBands = mode->nbEBands; + overlap = mode->overlap; + eBands = mode->eBands; + start = st->start; + end = st->end; + frame_size *= st->downsample; + + lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+overlap)*CC); + oldBandE = lpc+CC*LPC_ORDER; + oldLogE = oldBandE + 2*nbEBands; + oldLogE2 = oldLogE + 2*nbEBands; + backgroundLogE = oldLogE2 + 2*nbEBands; + +#ifdef CUSTOM_MODES + if (st->signalling && data!=NULL) + { + int data0=data[0]; + /* Convert "standard mode" to Opus header */ + if (mode->Fs==48000 && mode->shortMdctSize==120) + { + data0 = fromOpus(data0); + if (data0<0) + return OPUS_INVALID_PACKET; + } + st->end = end = IMAX(1, mode->effEBands-2*(data0>>5)); + LM = (data0>>3)&0x3; + C = 1 + ((data0>>2)&0x1); + data++; + len--; + if (LM>mode->maxLM) + return OPUS_INVALID_PACKET; + if (frame_size < mode->shortMdctSize<shortMdctSize<maxLM;LM++) + if (mode->shortMdctSize<mode->maxLM) + return OPUS_BAD_ARG; + } + M=1<1275 || pcm==NULL) + return OPUS_BAD_ARG; + + N = M*mode->shortMdctSize; + c=0; do { + decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+overlap); + out_syn[c] = decode_mem[c]+DECODE_BUFFER_SIZE-N; + } while (++c mode->effEBands) + effEnd = mode->effEBands; + + if (data == NULL || len<=1) + { + celt_decode_lost(st, N, LM); + deemphasis(out_syn, pcm, N, CC, st->downsample, mode->preemph, st->preemph_memD, accum); + RESTORE_STACK; + return frame_size/st->downsample; + } + + if (dec == NULL) + { + ec_dec_init(&_dec,(unsigned char*)data,len); + dec = &_dec; + } + + if (C==1) + { + for (i=0;i= total_bits) + silence = 1; + else if (tell==1) + silence = ec_dec_bit_logp(dec, 15); + else + silence = 0; + if (silence) + { + /* Pretend we've read all the remaining bits */ + tell = len*8; + dec->nbits_total+=tell-ec_tell(dec); + } + + postfilter_gain = 0; + postfilter_pitch = 0; + postfilter_tapset = 0; + if (start==0 && tell+16 <= total_bits) + { + if(ec_dec_bit_logp(dec, 1)) + { + int qg, octave; + octave = ec_dec_uint(dec, 6); + postfilter_pitch = (16< 0 && tell+3 <= total_bits) + { + isTransient = ec_dec_bit_logp(dec, 3); + tell = ec_tell(dec); + } + else + isTransient = 0; + + if (isTransient) + shortBlocks = M; + else + shortBlocks = 0; + + /* Decode the global flags (first symbols in the stream) */ + intra_ener = tell+3<=total_bits ? ec_dec_bit_logp(dec, 3) : 0; + /* Get band energies */ + unquant_coarse_energy(mode, start, end, oldBandE, + intra_ener, dec, C, LM); + + ALLOC(tf_res, nbEBands, int); + tf_decode(start, end, isTransient, tf_res, LM, dec); + + tell = ec_tell(dec); + spread_decision = SPREAD_NORMAL; + if (tell+4 <= total_bits) + spread_decision = ec_dec_icdf(dec, spread_icdf, 5); + + ALLOC(cap, nbEBands, int); + + init_caps(mode,cap,LM,C); + + ALLOC(offsets, nbEBands, int); + + dynalloc_logp = 6; + total_bits<<=BITRES; + tell = ec_tell_frac(dec); + for (i=start;i0) + dynalloc_logp = IMAX(2, dynalloc_logp-1); + } + + ALLOC(fine_quant, nbEBands, int); + alloc_trim = tell+(6<=2&&bits>=((LM+2)<rng, st->arch); + + if (anti_collapse_rsv > 0) + { + anti_collapse_on = ec_dec_bits(dec, 1); + } + + unquant_energy_finalise(mode, start, end, oldBandE, + fine_quant, fine_priority, len*8-ec_tell(dec), dec, C); + + if (anti_collapse_on) + anti_collapse(mode, X, collapse_masks, LM, C, N, + start, end, oldBandE, oldLogE, oldLogE2, pulses, st->rng, st->arch); + + if (silence) + { + for (i=0;idownsample, silence, st->arch); + + c=0; do { + st->postfilter_period=IMAX(st->postfilter_period, COMBFILTER_MINPERIOD); + st->postfilter_period_old=IMAX(st->postfilter_period_old, COMBFILTER_MINPERIOD); + comb_filter(out_syn[c], out_syn[c], st->postfilter_period_old, st->postfilter_period, mode->shortMdctSize, + st->postfilter_gain_old, st->postfilter_gain, st->postfilter_tapset_old, st->postfilter_tapset, + mode->window, overlap, st->arch); + if (LM!=0) + comb_filter(out_syn[c]+mode->shortMdctSize, out_syn[c]+mode->shortMdctSize, st->postfilter_period, postfilter_pitch, N-mode->shortMdctSize, + st->postfilter_gain, postfilter_gain, st->postfilter_tapset, postfilter_tapset, + mode->window, overlap, st->arch); + + } while (++cpostfilter_period_old = st->postfilter_period; + st->postfilter_gain_old = st->postfilter_gain; + st->postfilter_tapset_old = st->postfilter_tapset; + st->postfilter_period = postfilter_pitch; + st->postfilter_gain = postfilter_gain; + st->postfilter_tapset = postfilter_tapset; + if (LM!=0) + { + st->postfilter_period_old = st->postfilter_period; + st->postfilter_gain_old = st->postfilter_gain; + st->postfilter_tapset_old = st->postfilter_tapset; + } + + if (C==1) + OPUS_COPY(&oldBandE[nbEBands], oldBandE, nbEBands); + + /* In case start or end were to change */ + if (!isTransient) + { + opus_val16 max_background_increase; + OPUS_COPY(oldLogE2, oldLogE, 2*nbEBands); + OPUS_COPY(oldLogE, oldBandE, 2*nbEBands); + /* In normal circumstances, we only allow the noise floor to increase by + up to 2.4 dB/second, but when we're in DTX, we allow up to 6 dB + increase for each update.*/ + if (st->loss_count < 10) + max_background_increase = M*QCONST16(0.001f,DB_SHIFT); + else + max_background_increase = QCONST16(1.f,DB_SHIFT); + for (i=0;i<2*nbEBands;i++) + backgroundLogE[i] = MIN16(backgroundLogE[i] + max_background_increase, oldBandE[i]); + } else { + for (i=0;i<2*nbEBands;i++) + oldLogE[i] = MIN16(oldLogE[i], oldBandE[i]); + } + c=0; do + { + for (i=0;irng = dec->rng; + + deemphasis(out_syn, pcm, N, CC, st->downsample, mode->preemph, st->preemph_memD, accum); + st->loss_count = 0; + RESTORE_STACK; + if (ec_tell(dec) > 8*len) + return OPUS_INTERNAL_ERROR; + if(ec_get_error(dec)) + st->error = 1; + return frame_size/st->downsample; +} + + +#ifdef CUSTOM_MODES + +#ifdef FIXED_POINT +int opus_custom_decode(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_int16 * OPUS_RESTRICT pcm, int frame_size) +{ + return celt_decode_with_ec(st, data, len, pcm, frame_size, NULL, 0); +} + +#ifndef DISABLE_FLOAT_API +int opus_custom_decode_float(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, float * OPUS_RESTRICT pcm, int frame_size) +{ + int j, ret, C, N; + VARDECL(opus_int16, out); + ALLOC_STACK; + + if (pcm==NULL) + return OPUS_BAD_ARG; + + C = st->channels; + N = frame_size; + + ALLOC(out, C*N, opus_int16); + ret=celt_decode_with_ec(st, data, len, out, frame_size, NULL, 0); + if (ret>0) + for (j=0;jchannels; + N = frame_size; + ALLOC(out, C*N, celt_sig); + + ret=celt_decode_with_ec(st, data, len, out, frame_size, NULL, 0); + + if (ret>0) + for (j=0;j=st->mode->nbEBands) + goto bad_arg; + st->start = value; + } + break; + case CELT_SET_END_BAND_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<1 || value>st->mode->nbEBands) + goto bad_arg; + st->end = value; + } + break; + case CELT_SET_CHANNELS_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<1 || value>2) + goto bad_arg; + st->stream_channels = value; + } + break; + case CELT_GET_AND_CLEAR_ERROR_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + if (value==NULL) + goto bad_arg; + *value=st->error; + st->error = 0; + } + break; + case OPUS_GET_LOOKAHEAD_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + if (value==NULL) + goto bad_arg; + *value = st->overlap/st->downsample; + } + break; + case OPUS_RESET_STATE: + { + int i; + opus_val16 *lpc, *oldBandE, *oldLogE, *oldLogE2; + lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+st->overlap)*st->channels); + oldBandE = lpc+st->channels*LPC_ORDER; + oldLogE = oldBandE + 2*st->mode->nbEBands; + oldLogE2 = oldLogE + 2*st->mode->nbEBands; + OPUS_CLEAR((char*)&st->DECODER_RESET_START, + opus_custom_decoder_get_size(st->mode, st->channels)- + ((char*)&st->DECODER_RESET_START - (char*)st)); + for (i=0;i<2*st->mode->nbEBands;i++) + oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT); + } + break; + case OPUS_GET_PITCH_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + if (value==NULL) + goto bad_arg; + *value = st->postfilter_period; + } + break; + case CELT_GET_MODE_REQUEST: + { + const CELTMode ** value = va_arg(ap, const CELTMode**); + if (value==0) + goto bad_arg; + *value=st->mode; + } + break; + case CELT_SET_SIGNALLING_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->signalling = value; + } + break; + case OPUS_GET_FINAL_RANGE_REQUEST: + { + opus_uint32 * value = va_arg(ap, opus_uint32 *); + if (value==0) + goto bad_arg; + *value=st->rng; + } + break; + default: + goto bad_request; + } + va_end(ap); + return OPUS_OK; +bad_arg: + va_end(ap); + return OPUS_BAD_ARG; +bad_request: + va_end(ap); + return OPUS_UNIMPLEMENTED; +} diff --git a/asm/libs/opus/celt/celt_encoder.c b/asm/libs/opus/celt/celt_encoder.c new file mode 100644 index 00000000..41fbfd49 --- /dev/null +++ b/asm/libs/opus/celt/celt_encoder.c @@ -0,0 +1,2407 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2010 Xiph.Org Foundation + Copyright (c) 2008 Gregory Maxwell + Written by Jean-Marc Valin and Gregory Maxwell */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define CELT_ENCODER_C + +#include "cpu_support.h" +#include "os_support.h" +#include "mdct.h" +#include +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" +#include +#include "celt_lpc.h" +#include "vq.h" + + +/** Encoder state + @brief Encoder state + */ +struct OpusCustomEncoder { + const OpusCustomMode *mode; /**< Mode used by the encoder */ + int channels; + int stream_channels; + + int force_intra; + int clip; + int disable_pf; + int complexity; + int upsample; + int start, end; + + opus_int32 bitrate; + int vbr; + int signalling; + int constrained_vbr; /* If zero, VBR can do whatever it likes with the rate */ + int loss_rate; + int lsb_depth; + int variable_duration; + int lfe; + int arch; + + /* Everything beyond this point gets cleared on a reset */ +#define ENCODER_RESET_START rng + + opus_uint32 rng; + int spread_decision; + opus_val32 delayedIntra; + int tonal_average; + int lastCodedBands; + int hf_average; + int tapset_decision; + + int prefilter_period; + opus_val16 prefilter_gain; + int prefilter_tapset; +#ifdef RESYNTH + int prefilter_period_old; + opus_val16 prefilter_gain_old; + int prefilter_tapset_old; +#endif + int consec_transient; + AnalysisInfo analysis; + + opus_val32 preemph_memE[2]; + opus_val32 preemph_memD[2]; + + /* VBR-related parameters */ + opus_int32 vbr_reservoir; + opus_int32 vbr_drift; + opus_int32 vbr_offset; + opus_int32 vbr_count; + opus_val32 overlap_max; + opus_val16 stereo_saving; + int intensity; + opus_val16 *energy_mask; + opus_val16 spec_avg; + +#ifdef RESYNTH + /* +MAX_PERIOD/2 to make space for overlap */ + celt_sig syn_mem[2][2*MAX_PERIOD+MAX_PERIOD/2]; +#endif + + celt_sig in_mem[1]; /* Size = channels*mode->overlap */ + /* celt_sig prefilter_mem[], Size = channels*COMBFILTER_MAXPERIOD */ + /* opus_val16 oldBandE[], Size = channels*mode->nbEBands */ + /* opus_val16 oldLogE[], Size = channels*mode->nbEBands */ + /* opus_val16 oldLogE2[], Size = channels*mode->nbEBands */ +}; + +int celt_encoder_get_size(int channels) +{ + CELTMode *mode = opus_custom_mode_create(48000, 960, NULL); + return opus_custom_encoder_get_size(mode, channels); +} + +OPUS_CUSTOM_NOSTATIC int opus_custom_encoder_get_size(const CELTMode *mode, int channels) +{ + int size = sizeof(struct CELTEncoder) + + (channels*mode->overlap-1)*sizeof(celt_sig) /* celt_sig in_mem[channels*mode->overlap]; */ + + channels*COMBFILTER_MAXPERIOD*sizeof(celt_sig) /* celt_sig prefilter_mem[channels*COMBFILTER_MAXPERIOD]; */ + + 3*channels*mode->nbEBands*sizeof(opus_val16); /* opus_val16 oldBandE[channels*mode->nbEBands]; */ + /* opus_val16 oldLogE[channels*mode->nbEBands]; */ + /* opus_val16 oldLogE2[channels*mode->nbEBands]; */ + return size; +} + +#ifdef CUSTOM_MODES +CELTEncoder *opus_custom_encoder_create(const CELTMode *mode, int channels, int *error) +{ + int ret; + CELTEncoder *st = (CELTEncoder *)opus_alloc(opus_custom_encoder_get_size(mode, channels)); + /* init will handle the NULL case */ + ret = opus_custom_encoder_init(st, mode, channels); + if (ret != OPUS_OK) + { + opus_custom_encoder_destroy(st); + st = NULL; + } + if (error) + *error = ret; + return st; +} +#endif /* CUSTOM_MODES */ + +static int opus_custom_encoder_init_arch(CELTEncoder *st, const CELTMode *mode, + int channels, int arch) +{ + if (channels < 0 || channels > 2) + return OPUS_BAD_ARG; + + if (st==NULL || mode==NULL) + return OPUS_ALLOC_FAIL; + + OPUS_CLEAR((char*)st, opus_custom_encoder_get_size(mode, channels)); + + st->mode = mode; + st->stream_channels = st->channels = channels; + + st->upsample = 1; + st->start = 0; + st->end = st->mode->effEBands; + st->signalling = 1; + + st->arch = arch; + + st->constrained_vbr = 1; + st->clip = 1; + + st->bitrate = OPUS_BITRATE_MAX; + st->vbr = 0; + st->force_intra = 0; + st->complexity = 5; + st->lsb_depth=24; + + opus_custom_encoder_ctl(st, OPUS_RESET_STATE); + + return OPUS_OK; +} + +#ifdef CUSTOM_MODES +int opus_custom_encoder_init(CELTEncoder *st, const CELTMode *mode, int channels) +{ + return opus_custom_encoder_init_arch(st, mode, channels, opus_select_arch()); +} +#endif + +int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels, + int arch) +{ + int ret; + ret = opus_custom_encoder_init_arch(st, + opus_custom_mode_create(48000, 960, NULL), channels, arch); + if (ret != OPUS_OK) + return ret; + st->upsample = resampling_factor(sampling_rate); + return OPUS_OK; +} + +#ifdef CUSTOM_MODES +void opus_custom_encoder_destroy(CELTEncoder *st) +{ + opus_free(st); +} +#endif /* CUSTOM_MODES */ + + +static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int C, + opus_val16 *tf_estimate, int *tf_chan) +{ + int i; + VARDECL(opus_val16, tmp); + opus_val32 mem0,mem1; + int is_transient = 0; + opus_int32 mask_metric = 0; + int c; + opus_val16 tf_max; + int len2; + /* Table of 6*64/x, trained on real data to minimize the average error */ + static const unsigned char inv_table[128] = { + 255,255,156,110, 86, 70, 59, 51, 45, 40, 37, 33, 31, 28, 26, 25, + 23, 22, 21, 20, 19, 18, 17, 16, 16, 15, 15, 14, 13, 13, 12, 12, + 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, + }; + SAVE_STACK; + ALLOC(tmp, len, opus_val16); + + len2=len/2; + for (c=0;c=0;i--) + { +#ifdef FIXED_POINT + /* FIXME: Use PSHR16() instead */ + tmp[i] = mem0 + PSHR32(tmp[i]-mem0,3); +#else + tmp[i] = mem0 + MULT16_16_P15(QCONST16(0.125f,15),tmp[i]-mem0); +#endif + mem0 = tmp[i]; + maxE = MAX16(maxE, mem0); + } + /*for (i=0;i>1))); +#else + mean = celt_sqrt(mean * maxE*.5*len2); +#endif + /* Inverse of the mean energy in Q15+6 */ + norm = SHL32(EXTEND32(len2),6+14)/ADD32(EPSILON,SHR32(mean,1)); + /* Compute harmonic mean discarding the unreliable boundaries + The data is smooth, so we only take 1/4th of the samples */ + unmask=0; + for (i=12;imask_metric) + { + *tf_chan = c; + mask_metric = unmask; + } + } + is_transient = mask_metric>200; + + /* Arbitrary metric for VBR boost */ + tf_max = MAX16(0,celt_sqrt(27*mask_metric)-42); + /* *tf_estimate = 1 + MIN16(1, sqrt(MAX16(0, tf_max-30))/20); */ + *tf_estimate = celt_sqrt(MAX32(0, SHL32(MULT16_16(QCONST16(0.0069,14),MIN16(163,tf_max)),14)-QCONST32(0.139,28))); + /*printf("%d %f\n", tf_max, mask_metric);*/ + RESTORE_STACK; +#ifdef FUZZING + is_transient = rand()&0x1; +#endif + /*printf("%d %f %d\n", is_transient, (float)*tf_estimate, tf_max);*/ + return is_transient; +} + +/* Looks for sudden increases of energy to decide whether we need to patch + the transient decision */ +static int patch_transient_decision(opus_val16 *newE, opus_val16 *oldE, int nbEBands, + int start, int end, int C) +{ + int i, c; + opus_val32 mean_diff=0; + opus_val16 spread_old[26]; + /* Apply an aggressive (-6 dB/Bark) spreading function to the old frame to + avoid false detection caused by irrelevant bands */ + if (C==1) + { + spread_old[start] = oldE[start]; + for (i=start+1;i=start;i--) + spread_old[i] = MAX16(spread_old[i], spread_old[i+1]-QCONST16(1.0f, DB_SHIFT)); + /* Compute mean increase */ + c=0; do { + for (i=IMAX(2,start);i QCONST16(1.f, DB_SHIFT); +} + +/** Apply window and compute the MDCT for all sub-frames and + all channels in a frame */ +static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * OPUS_RESTRICT in, + celt_sig * OPUS_RESTRICT out, int C, int CC, int LM, int upsample, + int arch) +{ + const int overlap = mode->overlap; + int N; + int B; + int shift; + int i, b, c; + if (shortBlocks) + { + B = shortBlocks; + N = mode->shortMdctSize; + shift = mode->maxLM; + } else { + B = 1; + N = mode->shortMdctSize<maxLM-LM; + } + c=0; do { + for (b=0;bmdct, in+c*(B*N+overlap)+b*N, + &out[b+c*N*B], mode->window, overlap, shift, B, + arch); + } + } while (++ceBands[len]-m->eBands[len-1])<eBands[len]-m->eBands[len-1])<eBands[i+1]-m->eBands[i])<eBands[i+1]-m->eBands[i])==1; + OPUS_COPY(tmp, &X[tf_chan*N0 + (m->eBands[i]<eBands[i]<>LM, 1<>k, 1<=0;i--) + { + if (tf_res[i+1] == 1) + tf_res[i] = path1[i+1]; + else + tf_res[i] = path0[i+1]; + } + /*printf("%d %f\n", *tf_sum, tf_estimate);*/ + RESTORE_STACK; +#ifdef FUZZING + tf_select = rand()&0x1; + tf_res[0] = rand()&0x1; + for (i=1;istorage*8; + tell = ec_tell(enc); + logp = isTransient ? 2 : 4; + /* Reserve space to code the tf_select decision. */ + tf_select_rsv = LM>0 && tell+logp+1 <= budget; + budget -= tf_select_rsv; + curr = tf_changed = 0; + for (i=start;ieBands[i]<eBands[i]<eBands[i+1]-m->eBands[i])<eBands[i]<eBands[i]<eBands[i+1]-m->eBands[i])<nbEBands]*(opus_int32)(2+2*i-end); + } + } while (++cvalid) + { + trim -= MAX16(-QCONST16(2.f, 8), MIN16(QCONST16(2.f, 8), + (opus_val16)(QCONST16(2.f, 8)*(analysis->tonality_slope+.05f)))); + } +#else + (void)analysis; +#endif + +#ifdef FIXED_POINT + trim_index = PSHR32(trim, 8); +#else + trim_index = (int)floor(.5f+trim); +#endif + trim_index = IMAX(0, IMIN(10, trim_index)); + /*printf("%d\n", trim_index);*/ +#ifdef FUZZING + trim_index = rand()%11; +#endif + return trim_index; +} + +static int stereo_analysis(const CELTMode *m, const celt_norm *X, + int LM, int N0) +{ + int i; + int thetas; + opus_val32 sumLR = EPSILON, sumMS = EPSILON; + + /* Use the L1 norm to model the entropy of the L/R signal vs the M/S signal */ + for (i=0;i<13;i++) + { + int j; + for (j=m->eBands[i]<eBands[i+1]<eBands[13]<<(LM+1))+thetas, sumMS) + > MULT16_32_Q15(m->eBands[13]<<(LM+1), sumLR); +} + +#define MSWAP(a,b) do {opus_val16 tmp = a;a=b;b=tmp;} while(0) +static opus_val16 median_of_5(const opus_val16 *x) +{ + opus_val16 t0, t1, t2, t3, t4; + t2 = x[2]; + if (x[0] > x[1]) + { + t0 = x[1]; + t1 = x[0]; + } else { + t0 = x[0]; + t1 = x[1]; + } + if (x[3] > x[4]) + { + t3 = x[4]; + t4 = x[3]; + } else { + t3 = x[3]; + t4 = x[4]; + } + if (t0 > t3) + { + MSWAP(t0, t3); + MSWAP(t1, t4); + } + if (t2 > t1) + { + if (t1 < t3) + return MIN16(t2, t3); + else + return MIN16(t4, t1); + } else { + if (t2 < t3) + return MIN16(t1, t3); + else + return MIN16(t2, t4); + } +} + +static opus_val16 median_of_3(const opus_val16 *x) +{ + opus_val16 t0, t1, t2; + if (x[0] > x[1]) + { + t0 = x[1]; + t1 = x[0]; + } else { + t0 = x[0]; + t1 = x[1]; + } + t2 = x[2]; + if (t1 < t2) + return t1; + else if (t0 < t2) + return t2; + else + return t0; +} + +static opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16 *bandLogE2, + int nbEBands, int start, int end, int C, int *offsets, int lsb_depth, const opus_int16 *logN, + int isTransient, int vbr, int constrained_vbr, const opus_int16 *eBands, int LM, + int effectiveBytes, opus_int32 *tot_boost_, int lfe, opus_val16 *surround_dynalloc) +{ + int i, c; + opus_int32 tot_boost=0; + opus_val16 maxDepth; + VARDECL(opus_val16, follower); + VARDECL(opus_val16, noise_floor); + SAVE_STACK; + ALLOC(follower, C*nbEBands, opus_val16); + ALLOC(noise_floor, C*nbEBands, opus_val16); + OPUS_CLEAR(offsets, nbEBands); + /* Dynamic allocation code */ + maxDepth=-QCONST16(31.9f, DB_SHIFT); + for (i=0;i 50 && LM>=1 && !lfe) + { + int last=0; + c=0;do + { + opus_val16 offset; + opus_val16 tmp; + opus_val16 *f; + f = &follower[c*nbEBands]; + f[0] = bandLogE2[c*nbEBands]; + for (i=1;i bandLogE2[c*nbEBands+i-1]+QCONST16(.5f,DB_SHIFT)) + last=i; + f[i] = MIN16(f[i-1]+QCONST16(1.5f,DB_SHIFT), bandLogE2[c*nbEBands+i]); + } + for (i=last-1;i>=0;i--) + f[i] = MIN16(f[i], MIN16(f[i+1]+QCONST16(2.f,DB_SHIFT), bandLogE2[c*nbEBands+i])); + + /* Combine with a median filter to avoid dynalloc triggering unnecessarily. + The "offset" value controls how conservative we are -- a higher offset + reduces the impact of the median filter and makes dynalloc use more bits. */ + offset = QCONST16(1.f, DB_SHIFT); + for (i=2;i=12) + follower[i] = HALF16(follower[i]); + follower[i] = MIN16(follower[i], QCONST16(4, DB_SHIFT)); + + width = C*(eBands[i+1]-eBands[i])< 48) { + boost = (int)SHR32(EXTEND32(follower[i])*8,DB_SHIFT); + boost_bits = (boost*width<>BITRES>>3 > effectiveBytes/4) + { + opus_int32 cap = ((effectiveBytes/4)<mode; + overlap = mode->overlap; + ALLOC(_pre, CC*(N+COMBFILTER_MAXPERIOD), celt_sig); + + pre[0] = _pre; + pre[1] = _pre + (N+COMBFILTER_MAXPERIOD); + + + c=0; do { + OPUS_COPY(pre[c], prefilter_mem+c*COMBFILTER_MAXPERIOD, COMBFILTER_MAXPERIOD); + OPUS_COPY(pre[c]+COMBFILTER_MAXPERIOD, in+c*(N+overlap)+overlap, N); + } while (++c>1, opus_val16); + + pitch_downsample(pre, pitch_buf, COMBFILTER_MAXPERIOD+N, CC, st->arch); + /* Don't search for the fir last 1.5 octave of the range because + there's too many false-positives due to short-term correlation */ + pitch_search(pitch_buf+(COMBFILTER_MAXPERIOD>>1), pitch_buf, N, + COMBFILTER_MAXPERIOD-3*COMBFILTER_MINPERIOD, &pitch_index, + st->arch); + pitch_index = COMBFILTER_MAXPERIOD-pitch_index; + + gain1 = remove_doubling(pitch_buf, COMBFILTER_MAXPERIOD, COMBFILTER_MINPERIOD, + N, &pitch_index, st->prefilter_period, st->prefilter_gain, st->arch); + if (pitch_index > COMBFILTER_MAXPERIOD-2) + pitch_index = COMBFILTER_MAXPERIOD-2; + gain1 = MULT16_16_Q15(QCONST16(.7f,15),gain1); + /*printf("%d %d %f %f\n", pitch_change, pitch_index, gain1, st->analysis.tonality);*/ + if (st->loss_rate>2) + gain1 = HALF32(gain1); + if (st->loss_rate>4) + gain1 = HALF32(gain1); + if (st->loss_rate>8) + gain1 = 0; + } else { + gain1 = 0; + pitch_index = COMBFILTER_MINPERIOD; + } + + /* Gain threshold for enabling the prefilter/postfilter */ + pf_threshold = QCONST16(.2f,15); + + /* Adjusting the threshold based on rate and continuity */ + if (abs(pitch_index-st->prefilter_period)*10>pitch_index) + pf_threshold += QCONST16(.2f,15); + if (nbAvailableBytes<25) + pf_threshold += QCONST16(.1f,15); + if (nbAvailableBytes<35) + pf_threshold += QCONST16(.1f,15); + if (st->prefilter_gain > QCONST16(.4f,15)) + pf_threshold -= QCONST16(.1f,15); + if (st->prefilter_gain > QCONST16(.55f,15)) + pf_threshold -= QCONST16(.1f,15); + + /* Hard threshold at 0.2 */ + pf_threshold = MAX16(pf_threshold, QCONST16(.2f,15)); + if (gain1prefilter_gain)prefilter_gain; + +#ifdef FIXED_POINT + qg = ((gain1+1536)>>10)/3-1; +#else + qg = (int)floor(.5f+gain1*32/3)-1; +#endif + qg = IMAX(0, IMIN(7, qg)); + gain1 = QCONST16(0.09375f,15)*(qg+1); + pf_on = 1; + } + /*printf("%d %f\n", pitch_index, gain1);*/ + + c=0; do { + int offset = mode->shortMdctSize-overlap; + st->prefilter_period=IMAX(st->prefilter_period, COMBFILTER_MINPERIOD); + OPUS_COPY(in+c*(N+overlap), st->in_mem+c*(overlap), overlap); + if (offset) + comb_filter(in+c*(N+overlap)+overlap, pre[c]+COMBFILTER_MAXPERIOD, + st->prefilter_period, st->prefilter_period, offset, -st->prefilter_gain, -st->prefilter_gain, + st->prefilter_tapset, st->prefilter_tapset, NULL, 0, st->arch); + + comb_filter(in+c*(N+overlap)+overlap+offset, pre[c]+COMBFILTER_MAXPERIOD+offset, + st->prefilter_period, pitch_index, N-offset, -st->prefilter_gain, -gain1, + st->prefilter_tapset, prefilter_tapset, mode->window, overlap, st->arch); + OPUS_COPY(st->in_mem+c*(overlap), in+c*(N+overlap)+N, overlap); + + if (N>COMBFILTER_MAXPERIOD) + { + OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD, pre[c]+N, COMBFILTER_MAXPERIOD); + } else { + OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD, prefilter_mem+c*COMBFILTER_MAXPERIOD+N, COMBFILTER_MAXPERIOD-N); + OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD+COMBFILTER_MAXPERIOD-N, pre[c]+COMBFILTER_MAXPERIOD, N); + } + } while (++cnbEBands; + eBands = mode->eBands; + + coded_bands = lastCodedBands ? lastCodedBands : nbEBands; + coded_bins = eBands[coded_bands]<analysis.activity, st->analysis.tonality, tf_estimate, st->stereo_saving, tot_boost, coded_bands);*/ +#ifndef DISABLE_FLOAT_API + if (analysis->valid && analysis->activity<.4) + target -= (opus_int32)((coded_bins<activity)); +#endif + /* Stereo savings */ + if (C==2) + { + int coded_stereo_bands; + int coded_stereo_dof; + opus_val16 max_frac; + coded_stereo_bands = IMIN(intensity, coded_bands); + coded_stereo_dof = (eBands[coded_stereo_bands]<valid && !lfe) + { + opus_int32 tonal_target; + float tonal; + + /* Tonality boost (compensating for the average). */ + tonal = MAX16(0.f,analysis->tonality-.15f)-0.09f; + tonal_target = target + (opus_int32)((coded_bins<tonality, tonal);*/ + target = tonal_target; + } +#else + (void)analysis; + (void)pitch_change; +#endif + + if (has_surround_mask&&!lfe) + { + opus_int32 surround_target = target + (opus_int32)SHR32(MULT16_16(surround_masking,coded_bins<end, st->intensity, surround_target, target, st->bitrate);*/ + target = IMAX(target/4, surround_target); + } + + { + opus_int32 floor_depth; + int bins; + bins = eBands[nbEBands-2]<>2); + target = IMIN(target, floor_depth); + /*printf("%f %d\n", maxDepth, floor_depth);*/ + } + + if ((!has_surround_mask||lfe) && (constrained_vbr || bitrate<64000)) + { + opus_val16 rate_factor; +#ifdef FIXED_POINT + rate_factor = MAX16(0,(bitrate-32000)); +#else + rate_factor = MAX16(0,(1.f/32768)*(bitrate-32000)); +#endif + if (constrained_vbr) + rate_factor = MIN16(rate_factor, QCONST16(0.67f, 15)); + target = base_target + (opus_int32)MULT16_32_Q15(rate_factor, target-base_target); + + } + + if (!has_surround_mask && tf_estimate < QCONST16(.2f, 14)) + { + opus_val16 amount; + opus_val16 tvbr_factor; + amount = MULT16_16_Q15(QCONST16(.0000031f, 30), IMAX(0, IMIN(32000, 96000-bitrate))); + tvbr_factor = SHR32(MULT16_16(temporal_vbr, amount), DB_SHIFT); + target += (opus_int32)MULT16_32_Q15(tvbr_factor, target); + } + + /* Don't allow more than doubling the rate */ + target = IMIN(2*base_target, target); + + return target; +} + +int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc) +{ + int i, c, N; + opus_int32 bits; + ec_enc _enc; + VARDECL(celt_sig, in); + VARDECL(celt_sig, freq); + VARDECL(celt_norm, X); + VARDECL(celt_ener, bandE); + VARDECL(opus_val16, bandLogE); + VARDECL(opus_val16, bandLogE2); + VARDECL(int, fine_quant); + VARDECL(opus_val16, error); + VARDECL(int, pulses); + VARDECL(int, cap); + VARDECL(int, offsets); + VARDECL(int, fine_priority); + VARDECL(int, tf_res); + VARDECL(unsigned char, collapse_masks); + celt_sig *prefilter_mem; + opus_val16 *oldBandE, *oldLogE, *oldLogE2; + int shortBlocks=0; + int isTransient=0; + const int CC = st->channels; + const int C = st->stream_channels; + int LM, M; + int tf_select; + int nbFilledBytes, nbAvailableBytes; + int start; + int end; + int effEnd; + int codedBands; + int tf_sum; + int alloc_trim; + int pitch_index=COMBFILTER_MINPERIOD; + opus_val16 gain1 = 0; + int dual_stereo=0; + int effectiveBytes; + int dynalloc_logp; + opus_int32 vbr_rate; + opus_int32 total_bits; + opus_int32 total_boost; + opus_int32 balance; + opus_int32 tell; + int prefilter_tapset=0; + int pf_on; + int anti_collapse_rsv; + int anti_collapse_on=0; + int silence=0; + int tf_chan = 0; + opus_val16 tf_estimate; + int pitch_change=0; + opus_int32 tot_boost; + opus_val32 sample_max; + opus_val16 maxDepth; + const OpusCustomMode *mode; + int nbEBands; + int overlap; + const opus_int16 *eBands; + int secondMdct; + int signalBandwidth; + int transient_got_disabled=0; + opus_val16 surround_masking=0; + opus_val16 temporal_vbr=0; + opus_val16 surround_trim = 0; + opus_int32 equiv_rate = 510000; + VARDECL(opus_val16, surround_dynalloc); + ALLOC_STACK; + + mode = st->mode; + nbEBands = mode->nbEBands; + overlap = mode->overlap; + eBands = mode->eBands; + start = st->start; + end = st->end; + tf_estimate = 0; + if (nbCompressedBytes<2 || pcm==NULL) + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } + + frame_size *= st->upsample; + for (LM=0;LM<=mode->maxLM;LM++) + if (mode->shortMdctSize<mode->maxLM) + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } + M=1<shortMdctSize; + + prefilter_mem = st->in_mem+CC*(overlap); + oldBandE = (opus_val16*)(st->in_mem+CC*(overlap+COMBFILTER_MAXPERIOD)); + oldLogE = oldBandE + CC*nbEBands; + oldLogE2 = oldLogE + CC*nbEBands; + + if (enc==NULL) + { + tell=1; + nbFilledBytes=0; + } else { + tell=ec_tell(enc); + nbFilledBytes=(tell+4)>>3; + } + +#ifdef CUSTOM_MODES + if (st->signalling && enc==NULL) + { + int tmp = (mode->effEBands-end)>>1; + end = st->end = IMAX(1, mode->effEBands-tmp); + compressed[0] = tmp<<5; + compressed[0] |= LM<<3; + compressed[0] |= (C==2)<<2; + /* Convert "standard mode" to Opus header */ + if (mode->Fs==48000 && mode->shortMdctSize==120) + { + int c0 = toOpus(compressed[0]); + if (c0<0) + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } + compressed[0] = c0; + } + compressed++; + nbCompressedBytes--; + } +#else + celt_assert(st->signalling==0); +#endif + + /* Can't produce more than 1275 output bytes */ + nbCompressedBytes = IMIN(nbCompressedBytes,1275); + nbAvailableBytes = nbCompressedBytes - nbFilledBytes; + + if (st->vbr && st->bitrate!=OPUS_BITRATE_MAX) + { + opus_int32 den=mode->Fs>>BITRES; + vbr_rate=(st->bitrate*frame_size+(den>>1))/den; +#ifdef CUSTOM_MODES + if (st->signalling) + vbr_rate -= 8<>(3+BITRES); + } else { + opus_int32 tmp; + vbr_rate = 0; + tmp = st->bitrate*frame_size; + if (tell>1) + tmp += tell; + if (st->bitrate!=OPUS_BITRATE_MAX) + nbCompressedBytes = IMAX(2, IMIN(nbCompressedBytes, + (tmp+4*mode->Fs)/(8*mode->Fs)-!!st->signalling)); + effectiveBytes = nbCompressedBytes; + } + if (st->bitrate != OPUS_BITRATE_MAX) + equiv_rate = st->bitrate - (40*C+20)*((400>>LM) - 50); + + if (enc==NULL) + { + ec_enc_init(&_enc, compressed, nbCompressedBytes); + enc = &_enc; + } + + if (vbr_rate>0) + { + /* Computes the max bit-rate allowed in VBR mode to avoid violating the + target rate and buffering. + We must do this up front so that bust-prevention logic triggers + correctly if we don't have enough bits. */ + if (st->constrained_vbr) + { + opus_int32 vbr_bound; + opus_int32 max_allowed; + /* We could use any multiple of vbr_rate as bound (depending on the + delay). + This is clamped to ensure we use at least two bytes if the encoder + was entirely empty, but to allow 0 in hybrid mode. */ + vbr_bound = vbr_rate; + max_allowed = IMIN(IMAX(tell==1?2:0, + (vbr_rate+vbr_bound-st->vbr_reservoir)>>(BITRES+3)), + nbAvailableBytes); + if(max_allowed < nbAvailableBytes) + { + nbCompressedBytes = nbFilledBytes+max_allowed; + nbAvailableBytes = max_allowed; + ec_enc_shrink(enc, nbCompressedBytes); + } + } + } + total_bits = nbCompressedBytes*8; + + effEnd = end; + if (effEnd > mode->effEBands) + effEnd = mode->effEBands; + + ALLOC(in, CC*(N+overlap), celt_sig); + + sample_max=MAX32(st->overlap_max, celt_maxabs16(pcm, C*(N-overlap)/st->upsample)); + st->overlap_max=celt_maxabs16(pcm+C*(N-overlap)/st->upsample, C*overlap/st->upsample); + sample_max=MAX32(sample_max, st->overlap_max); +#ifdef FIXED_POINT + silence = (sample_max==0); +#else + silence = (sample_max <= (opus_val16)1/(1<lsb_depth)); +#endif +#ifdef FUZZING + if ((rand()&0x3F)==0) + silence = 1; +#endif + if (tell==1) + ec_enc_bit_logp(enc, silence, 15); + else + silence=0; + if (silence) + { + /*In VBR mode there is no need to send more than the minimum. */ + if (vbr_rate>0) + { + effectiveBytes=nbCompressedBytes=IMIN(nbCompressedBytes, nbFilledBytes+2); + total_bits=nbCompressedBytes*8; + nbAvailableBytes=2; + ec_enc_shrink(enc, nbCompressedBytes); + } + /* Pretend we've filled all the remaining bits with zeros + (that's what the initialiser did anyway) */ + tell = nbCompressedBytes*8; + enc->nbits_total+=tell-ec_tell(enc); + } + c=0; do { + int need_clip=0; +#ifndef FIXED_POINT + need_clip = st->clip && sample_max>65536.f; +#endif + celt_preemphasis(pcm+c, in+c*(N+overlap)+overlap, N, CC, st->upsample, + mode->preemph, st->preemph_memE+c, need_clip); + } while (++clfe&&nbAvailableBytes>3) || nbAvailableBytes>12*C) && start==0 && !silence && !st->disable_pf + && st->complexity >= 5 && !(st->consec_transient && LM!=3 && st->variable_duration==OPUS_FRAMESIZE_VARIABLE); + + prefilter_tapset = st->tapset_decision; + pf_on = run_prefilter(st, in, prefilter_mem, CC, N, prefilter_tapset, &pitch_index, &gain1, &qg, enabled, nbAvailableBytes); + if ((gain1 > QCONST16(.4f,15) || st->prefilter_gain > QCONST16(.4f,15)) && (!st->analysis.valid || st->analysis.tonality > .3) + && (pitch_index > 1.26*st->prefilter_period || pitch_index < .79*st->prefilter_period)) + pitch_change = 1; + if (pf_on==0) + { + if(start==0 && tell+16<=total_bits) + ec_enc_bit_logp(enc, 0, 1); + } else { + /*This block is not gated by a total bits check only because + of the nbAvailableBytes check above.*/ + int octave; + ec_enc_bit_logp(enc, 1, 1); + pitch_index += 1; + octave = EC_ILOG(pitch_index)-5; + ec_enc_uint(enc, octave, 6); + ec_enc_bits(enc, pitch_index-(16<complexity >= 1 && !st->lfe) + { + isTransient = transient_analysis(in, N+overlap, CC, + &tf_estimate, &tf_chan); + } + if (LM>0 && ec_tell(enc)+3<=total_bits) + { + if (isTransient) + shortBlocks = M; + } else { + isTransient = 0; + transient_got_disabled=1; + } + + ALLOC(freq, CC*N, celt_sig); /**< Interleaved signal MDCTs */ + ALLOC(bandE,nbEBands*CC, celt_ener); + ALLOC(bandLogE,nbEBands*CC, opus_val16); + + secondMdct = shortBlocks && st->complexity>=8; + ALLOC(bandLogE2, C*nbEBands, opus_val16); + if (secondMdct) + { + compute_mdcts(mode, 0, in, freq, C, CC, LM, st->upsample, st->arch); + compute_band_energies(mode, freq, bandE, effEnd, C, LM); + amp2Log2(mode, effEnd, end, bandE, bandLogE2, C); + for (i=0;iupsample, st->arch); + if (CC==2&&C==1) + tf_chan = 0; + compute_band_energies(mode, freq, bandE, effEnd, C, LM); + + if (st->lfe) + { + for (i=2;ienergy_mask&&!st->lfe) + { + int mask_end; + int midband; + int count_dynalloc; + opus_val32 mask_avg=0; + opus_val32 diff=0; + int count=0; + mask_end = IMAX(2,st->lastCodedBands); + for (c=0;cenergy_mask[nbEBands*c+i], + QCONST16(.25f, DB_SHIFT)), -QCONST16(2.0f, DB_SHIFT)); + if (mask > 0) + mask = HALF16(mask); + mask_avg += MULT16_16(mask, eBands[i+1]-eBands[i]); + count += eBands[i+1]-eBands[i]; + diff += MULT16_16(mask, 1+2*i-mask_end); + } + } + celt_assert(count>0); + mask_avg = DIV32_16(mask_avg,count); + mask_avg += QCONST16(.2f, DB_SHIFT); + diff = diff*6/(C*(mask_end-1)*(mask_end+1)*mask_end); + /* Again, being conservative */ + diff = HALF32(diff); + diff = MAX32(MIN32(diff, QCONST32(.031f, DB_SHIFT)), -QCONST32(.031f, DB_SHIFT)); + /* Find the band that's in the middle of the coded spectrum */ + for (midband=0;eBands[midband+1] < eBands[mask_end]/2;midband++); + count_dynalloc=0; + for(i=0;ienergy_mask[i], st->energy_mask[nbEBands+i]); + else + unmask = st->energy_mask[i]; + unmask = MIN16(unmask, QCONST16(.0f, DB_SHIFT)); + unmask -= lin; + if (unmask > QCONST16(.25f, DB_SHIFT)) + { + surround_dynalloc[i] = unmask - QCONST16(.25f, DB_SHIFT); + count_dynalloc++; + } + } + if (count_dynalloc>=3) + { + /* If we need dynalloc in many bands, it's probably because our + initial masking rate was too low. */ + mask_avg += QCONST16(.25f, DB_SHIFT); + if (mask_avg>0) + { + /* Something went really wrong in the original calculations, + disabling masking. */ + mask_avg = 0; + diff = 0; + OPUS_CLEAR(surround_dynalloc, mask_end); + } else { + for(i=0;ilfe) + { + opus_val16 follow=-QCONST16(10.0f,DB_SHIFT); + opus_val32 frame_avg=0; + opus_val16 offset = shortBlocks?HALF16(SHL16(LM, DB_SHIFT)):0; + for(i=start;ispec_avg); + temporal_vbr = MIN16(QCONST16(3.f, DB_SHIFT), MAX16(-QCONST16(1.5f, DB_SHIFT), temporal_vbr)); + st->spec_avg += MULT16_16_Q15(QCONST16(.02f, 15), temporal_vbr); + } + /*for (i=0;i<21;i++) + printf("%f ", bandLogE[i]); + printf("\n");*/ + + if (!secondMdct) + { + OPUS_COPY(bandLogE2, bandLogE, C*nbEBands); + } + + /* Last chance to catch any transient we might have missed in the + time-domain analysis */ + if (LM>0 && ec_tell(enc)+3<=total_bits && !isTransient && st->complexity>=5 && !st->lfe) + { + if (patch_transient_decision(bandLogE, oldBandE, nbEBands, start, end, C)) + { + isTransient = 1; + shortBlocks = M; + compute_mdcts(mode, shortBlocks, in, freq, C, CC, LM, st->upsample, st->arch); + compute_band_energies(mode, freq, bandE, effEnd, C, LM); + amp2Log2(mode, effEnd, end, bandE, bandLogE, C); + /* Compensate for the scaling of short vs long mdcts */ + for (i=0;i0 && ec_tell(enc)+3<=total_bits) + ec_enc_bit_logp(enc, isTransient, 3); + + ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ + + /* Band normalisation */ + normalise_bands(mode, freq, X, bandE, effEnd, C, M); + + ALLOC(tf_res, nbEBands, int); + /* Disable variable tf resolution for hybrid and at very low bitrate */ + if (effectiveBytes>=15*C && start==0 && st->complexity>=2 && !st->lfe) + { + int lambda; + if (effectiveBytes<40) + lambda = 12; + else if (effectiveBytes<60) + lambda = 6; + else if (effectiveBytes<100) + lambda = 4; + else + lambda = 3; + lambda*=2; + tf_select = tf_analysis(mode, effEnd, isTransient, tf_res, lambda, X, N, LM, &tf_sum, tf_estimate, tf_chan); + for (i=effEnd;iforce_intra, + &st->delayedIntra, st->complexity >= 4, st->loss_rate, st->lfe); + + tf_encode(start, end, isTransient, tf_res, LM, tf_select, enc); + + if (ec_tell(enc)+4<=total_bits) + { + if (st->lfe) + { + st->tapset_decision = 0; + st->spread_decision = SPREAD_NORMAL; + } else if (shortBlocks || st->complexity < 3 || nbAvailableBytes < 10*C || start != 0) + { + if (st->complexity == 0) + st->spread_decision = SPREAD_NONE; + else + st->spread_decision = SPREAD_NORMAL; + } else { + /* Disable new spreading+tapset estimator until we can show it works + better than the old one. So far it seems like spreading_decision() + works best. */ +#if 0 + if (st->analysis.valid) + { + static const opus_val16 spread_thresholds[3] = {-QCONST16(.6f, 15), -QCONST16(.2f, 15), -QCONST16(.07f, 15)}; + static const opus_val16 spread_histeresis[3] = {QCONST16(.15f, 15), QCONST16(.07f, 15), QCONST16(.02f, 15)}; + static const opus_val16 tapset_thresholds[2] = {QCONST16(.0f, 15), QCONST16(.15f, 15)}; + static const opus_val16 tapset_histeresis[2] = {QCONST16(.1f, 15), QCONST16(.05f, 15)}; + st->spread_decision = hysteresis_decision(-st->analysis.tonality, spread_thresholds, spread_histeresis, 3, st->spread_decision); + st->tapset_decision = hysteresis_decision(st->analysis.tonality_slope, tapset_thresholds, tapset_histeresis, 2, st->tapset_decision); + } else +#endif + { + st->spread_decision = spreading_decision(mode, X, + &st->tonal_average, st->spread_decision, &st->hf_average, + &st->tapset_decision, pf_on&&!shortBlocks, effEnd, C, M); + } + /*printf("%d %d\n", st->tapset_decision, st->spread_decision);*/ + /*printf("%f %d %f %d\n\n", st->analysis.tonality, st->spread_decision, st->analysis.tonality_slope, st->tapset_decision);*/ + } + ec_enc_icdf(enc, st->spread_decision, spread_icdf, 5); + } + + ALLOC(offsets, nbEBands, int); + + maxDepth = dynalloc_analysis(bandLogE, bandLogE2, nbEBands, start, end, C, offsets, + st->lsb_depth, mode->logN, isTransient, st->vbr, st->constrained_vbr, + eBands, LM, effectiveBytes, &tot_boost, st->lfe, surround_dynalloc); + /* For LFE, everything interesting is in the first band */ + if (st->lfe) + offsets[0] = IMIN(8, effectiveBytes/3); + ALLOC(cap, nbEBands, int); + init_caps(mode,cap,LM,C); + + dynalloc_logp = 6; + total_bits<<=BITRES; + total_boost = 0; + tell = ec_tell_frac(enc); + for (i=start;iintensity = hysteresis_decision((opus_val16)(equiv_rate/1000), + intensity_thresholds, intensity_histeresis, 21, st->intensity); + st->intensity = IMIN(end,IMAX(start, st->intensity)); + } + + alloc_trim = 5; + if (tell+(6<lfe) + alloc_trim = 5; + else + alloc_trim = alloc_trim_analysis(mode, X, bandLogE, + end, LM, C, N, &st->analysis, &st->stereo_saving, tf_estimate, + st->intensity, surround_trim, st->arch); + ec_enc_icdf(enc, alloc_trim, trim_icdf, 7); + tell = ec_tell_frac(enc); + } + + /* Variable bitrate */ + if (vbr_rate>0) + { + opus_val16 alpha; + opus_int32 delta; + /* The target rate in 8th bits per frame */ + opus_int32 target, base_target; + opus_int32 min_allowed; + int lm_diff = mode->maxLM - LM; + + /* Don't attempt to use more than 510 kb/s, even for frames smaller than 20 ms. + The CELT allocator will just not be able to use more than that anyway. */ + nbCompressedBytes = IMIN(nbCompressedBytes,1275>>(3-LM)); + base_target = vbr_rate - ((40*C+20)<constrained_vbr) + base_target += (st->vbr_offset>>lm_diff); + + target = compute_vbr(mode, &st->analysis, base_target, LM, equiv_rate, + st->lastCodedBands, C, st->intensity, st->constrained_vbr, + st->stereo_saving, tot_boost, tf_estimate, pitch_change, maxDepth, + st->variable_duration, st->lfe, st->energy_mask!=NULL, surround_masking, + temporal_vbr); + + /* The current offset is removed from the target and the space used + so far is added*/ + target=target+tell; + /* In VBR mode the frame size must not be reduced so much that it would + result in the encoder running out of bits. + The margin of 2 bytes ensures that none of the bust-prevention logic + in the decoder will have triggered so far. */ + min_allowed = ((tell+total_boost+(1<<(BITRES+3))-1)>>(BITRES+3)) + 2 - nbFilledBytes; + + nbAvailableBytes = (target+(1<<(BITRES+2)))>>(BITRES+3); + nbAvailableBytes = IMAX(min_allowed,nbAvailableBytes); + nbAvailableBytes = IMIN(nbCompressedBytes,nbAvailableBytes+nbFilledBytes) - nbFilledBytes; + + /* By how much did we "miss" the target on that frame */ + delta = target - vbr_rate; + + target=nbAvailableBytes<<(BITRES+3); + + /*If the frame is silent we don't adjust our drift, otherwise + the encoder will shoot to very high rates after hitting a + span of silence, but we do allow the bitres to refill. + This means that we'll undershoot our target in CVBR/VBR modes + on files with lots of silence. */ + if(silence) + { + nbAvailableBytes = 2; + target = 2*8<vbr_count < 970) + { + st->vbr_count++; + alpha = celt_rcp(SHL32(EXTEND32(st->vbr_count+20),16)); + } else + alpha = QCONST16(.001f,15); + /* How many bits have we used in excess of what we're allowed */ + if (st->constrained_vbr) + st->vbr_reservoir += target - vbr_rate; + /*printf ("%d\n", st->vbr_reservoir);*/ + + /* Compute the offset we need to apply in order to reach the target */ + if (st->constrained_vbr) + { + st->vbr_drift += (opus_int32)MULT16_32_Q15(alpha,(delta*(1<vbr_offset-st->vbr_drift); + st->vbr_offset = -st->vbr_drift; + } + /*printf ("%d\n", st->vbr_drift);*/ + + if (st->constrained_vbr && st->vbr_reservoir < 0) + { + /* We're under the min value -- increase rate */ + int adjust = (-st->vbr_reservoir)/(8<vbr_reservoir = 0; + /*printf ("+%d\n", adjust);*/ + } + nbCompressedBytes = IMIN(nbCompressedBytes,nbAvailableBytes+nbFilledBytes); + /*printf("%d\n", nbCompressedBytes*50*8);*/ + /* This moves the raw bits to take into account the new compressed size */ + ec_enc_shrink(enc, nbCompressedBytes); + } + + /* Bit allocation */ + ALLOC(fine_quant, nbEBands, int); + ALLOC(pulses, nbEBands, int); + ALLOC(fine_priority, nbEBands, int); + + /* bits = packet size - where we are - safety*/ + bits = (((opus_int32)nbCompressedBytes*8)<=2&&bits>=((LM+2)<analysis.valid) + { + int min_bandwidth; + if (equiv_rate < (opus_int32)32000*C) + min_bandwidth = 13; + else if (equiv_rate < (opus_int32)48000*C) + min_bandwidth = 16; + else if (equiv_rate < (opus_int32)60000*C) + min_bandwidth = 18; + else if (equiv_rate < (opus_int32)80000*C) + min_bandwidth = 19; + else + min_bandwidth = 20; + signalBandwidth = IMAX(st->analysis.bandwidth, min_bandwidth); + } +#endif + if (st->lfe) + signalBandwidth = 1; + codedBands = compute_allocation(mode, start, end, offsets, cap, + alloc_trim, &st->intensity, &dual_stereo, bits, &balance, pulses, + fine_quant, fine_priority, C, LM, enc, 1, st->lastCodedBands, signalBandwidth); + if (st->lastCodedBands) + st->lastCodedBands = IMIN(st->lastCodedBands+1,IMAX(st->lastCodedBands-1,codedBands)); + else + st->lastCodedBands = codedBands; + + quant_fine_energy(mode, start, end, oldBandE, error, fine_quant, enc, C); + + /* Residual quantisation */ + ALLOC(collapse_masks, C*nbEBands, unsigned char); + quant_all_bands(1, mode, start, end, X, C==2 ? X+N : NULL, collapse_masks, + bandE, pulses, shortBlocks, st->spread_decision, + dual_stereo, st->intensity, tf_res, nbCompressedBytes*(8<rng, st->arch); + + if (anti_collapse_rsv > 0) + { + anti_collapse_on = st->consec_transient<2; +#ifdef FUZZING + anti_collapse_on = rand()&0x1; +#endif + ec_enc_bits(enc, anti_collapse_on, 1); + } + quant_energy_finalise(mode, start, end, oldBandE, error, fine_quant, fine_priority, nbCompressedBytes*8-ec_tell(enc), enc, C); + + if (silence) + { + for (i=0;irng); + } + + c=0; do { + OPUS_MOVE(st->syn_mem[c], st->syn_mem[c]+N, 2*MAX_PERIOD-N+overlap/2); + } while (++csyn_mem[c]+2*MAX_PERIOD-N; + } while (++cupsample, silence, st->arch); + + c=0; do { + st->prefilter_period=IMAX(st->prefilter_period, COMBFILTER_MINPERIOD); + st->prefilter_period_old=IMAX(st->prefilter_period_old, COMBFILTER_MINPERIOD); + comb_filter(out_mem[c], out_mem[c], st->prefilter_period_old, st->prefilter_period, mode->shortMdctSize, + st->prefilter_gain_old, st->prefilter_gain, st->prefilter_tapset_old, st->prefilter_tapset, + mode->window, overlap); + if (LM!=0) + comb_filter(out_mem[c]+mode->shortMdctSize, out_mem[c]+mode->shortMdctSize, st->prefilter_period, pitch_index, N-mode->shortMdctSize, + st->prefilter_gain, gain1, st->prefilter_tapset, prefilter_tapset, + mode->window, overlap); + } while (++cupsample, mode->preemph, st->preemph_memD); + st->prefilter_period_old = st->prefilter_period; + st->prefilter_gain_old = st->prefilter_gain; + st->prefilter_tapset_old = st->prefilter_tapset; + } +#endif + + st->prefilter_period = pitch_index; + st->prefilter_gain = gain1; + st->prefilter_tapset = prefilter_tapset; +#ifdef RESYNTH + if (LM!=0) + { + st->prefilter_period_old = st->prefilter_period; + st->prefilter_gain_old = st->prefilter_gain; + st->prefilter_tapset_old = st->prefilter_tapset; + } +#endif + + if (CC==2&&C==1) { + OPUS_COPY(&oldBandE[nbEBands], oldBandE, nbEBands); + } + + if (!isTransient) + { + OPUS_COPY(oldLogE2, oldLogE, CC*nbEBands); + OPUS_COPY(oldLogE, oldBandE, CC*nbEBands); + } else { + for (i=0;iconsec_transient++; + else + st->consec_transient=0; + st->rng = enc->rng; + + /* If there's any room left (can only happen for very high rates), + it's already filled with zeros */ + ec_enc_done(enc); + +#ifdef CUSTOM_MODES + if (st->signalling) + nbCompressedBytes++; +#endif + + RESTORE_STACK; + if (ec_get_error(enc)) + return OPUS_INTERNAL_ERROR; + else + return nbCompressedBytes; +} + + +#ifdef CUSTOM_MODES + +#ifdef FIXED_POINT +int opus_custom_encode(CELTEncoder * OPUS_RESTRICT st, const opus_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes) +{ + return celt_encode_with_ec(st, pcm, frame_size, compressed, nbCompressedBytes, NULL); +} + +#ifndef DISABLE_FLOAT_API +int opus_custom_encode_float(CELTEncoder * OPUS_RESTRICT st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes) +{ + int j, ret, C, N; + VARDECL(opus_int16, in); + ALLOC_STACK; + + if (pcm==NULL) + return OPUS_BAD_ARG; + + C = st->channels; + N = frame_size; + ALLOC(in, C*N, opus_int16); + + for (j=0;jchannels; + N=frame_size; + ALLOC(in, C*N, celt_sig); + for (j=0;j10) + goto bad_arg; + st->complexity = value; + } + break; + case CELT_SET_START_BAND_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<0 || value>=st->mode->nbEBands) + goto bad_arg; + st->start = value; + } + break; + case CELT_SET_END_BAND_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<1 || value>st->mode->nbEBands) + goto bad_arg; + st->end = value; + } + break; + case CELT_SET_PREDICTION_REQUEST: + { + int value = va_arg(ap, opus_int32); + if (value<0 || value>2) + goto bad_arg; + st->disable_pf = value<=1; + st->force_intra = value==0; + } + break; + case OPUS_SET_PACKET_LOSS_PERC_REQUEST: + { + int value = va_arg(ap, opus_int32); + if (value<0 || value>100) + goto bad_arg; + st->loss_rate = value; + } + break; + case OPUS_SET_VBR_CONSTRAINT_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->constrained_vbr = value; + } + break; + case OPUS_SET_VBR_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->vbr = value; + } + break; + case OPUS_SET_BITRATE_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<=500 && value!=OPUS_BITRATE_MAX) + goto bad_arg; + value = IMIN(value, 260000*st->channels); + st->bitrate = value; + } + break; + case CELT_SET_CHANNELS_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<1 || value>2) + goto bad_arg; + st->stream_channels = value; + } + break; + case OPUS_SET_LSB_DEPTH_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<8 || value>24) + goto bad_arg; + st->lsb_depth=value; + } + break; + case OPUS_GET_LSB_DEPTH_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + *value=st->lsb_depth; + } + break; + case OPUS_SET_EXPERT_FRAME_DURATION_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->variable_duration = value; + } + break; + case OPUS_RESET_STATE: + { + int i; + opus_val16 *oldBandE, *oldLogE, *oldLogE2; + oldBandE = (opus_val16*)(st->in_mem+st->channels*(st->mode->overlap+COMBFILTER_MAXPERIOD)); + oldLogE = oldBandE + st->channels*st->mode->nbEBands; + oldLogE2 = oldLogE + st->channels*st->mode->nbEBands; + OPUS_CLEAR((char*)&st->ENCODER_RESET_START, + opus_custom_encoder_get_size(st->mode, st->channels)- + ((char*)&st->ENCODER_RESET_START - (char*)st)); + for (i=0;ichannels*st->mode->nbEBands;i++) + oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT); + st->vbr_offset = 0; + st->delayedIntra = 1; + st->spread_decision = SPREAD_NORMAL; + st->tonal_average = 256; + st->hf_average = 0; + st->tapset_decision = 0; + } + break; +#ifdef CUSTOM_MODES + case CELT_SET_INPUT_CLIPPING_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->clip = value; + } + break; +#endif + case CELT_SET_SIGNALLING_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->signalling = value; + } + break; + case CELT_SET_ANALYSIS_REQUEST: + { + AnalysisInfo *info = va_arg(ap, AnalysisInfo *); + if (info) + OPUS_COPY(&st->analysis, info, 1); + } + break; + case CELT_GET_MODE_REQUEST: + { + const CELTMode ** value = va_arg(ap, const CELTMode**); + if (value==0) + goto bad_arg; + *value=st->mode; + } + break; + case OPUS_GET_FINAL_RANGE_REQUEST: + { + opus_uint32 * value = va_arg(ap, opus_uint32 *); + if (value==0) + goto bad_arg; + *value=st->rng; + } + break; + case OPUS_SET_LFE_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->lfe = value; + } + break; + case OPUS_SET_ENERGY_MASK_REQUEST: + { + opus_val16 *value = va_arg(ap, opus_val16*); + st->energy_mask = value; + } + break; + default: + goto bad_request; + } + va_end(ap); + return OPUS_OK; +bad_arg: + va_end(ap); + return OPUS_BAD_ARG; +bad_request: + va_end(ap); + return OPUS_UNIMPLEMENTED; +} diff --git a/asm/libs/opus/celt/celt_lpc.c b/asm/libs/opus/celt/celt_lpc.c new file mode 100644 index 00000000..f02145af --- /dev/null +++ b/asm/libs/opus/celt/celt_lpc.c @@ -0,0 +1,315 @@ +/* Copyright (c) 2009-2010 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" + +void _celt_lpc( + opus_val16 *_lpc, /* out: [0...p-1] LPC coefficients */ +const opus_val32 *ac, /* in: [0...p] autocorrelation values */ +int p +) +{ + int i, j; + opus_val32 r; + opus_val32 error = ac[0]; +#ifdef FIXED_POINT + opus_val32 lpc[LPC_ORDER]; +#else + float *lpc = _lpc; +#endif + + for (i = 0; i < p; i++) + lpc[i] = 0; + if (ac[0] != 0) + { + for (i = 0; i < p; i++) { + /* Sum up this iteration's reflection coefficient */ + opus_val32 rr = 0; + for (j = 0; j < i; j++) + rr += MULT32_32_Q31(lpc[j],ac[i - j]); + rr += SHR32(ac[i + 1],3); + r = -frac_div32(SHL32(rr,3), error); + /* Update LPC coefficients and total error */ + lpc[i] = SHR32(r,3); + for (j = 0; j < (i+1)>>1; j++) + { + opus_val32 tmp1, tmp2; + tmp1 = lpc[j]; + tmp2 = lpc[i-1-j]; + lpc[j] = tmp1 + MULT32_32_Q31(r,tmp2); + lpc[i-1-j] = tmp2 + MULT32_32_Q31(r,tmp1); + } + + error = error - MULT32_32_Q31(MULT32_32_Q31(r,r),error); + /* Bail out once we get 30 dB gain */ +#ifdef FIXED_POINT + if (error=1;j--) + { + mem[j]=mem[j-1]; + } + mem[0] = ROUND16(sum,SIG_SHIFT); + _y[i] = sum; + } +#else + int i,j; + VARDECL(opus_val16, rden); + VARDECL(opus_val16, y); + SAVE_STACK; + + celt_assert((ord&3)==0); + ALLOC(rden, ord, opus_val16); + ALLOC(y, N+ord, opus_val16); + for(i=0;i0); + celt_assert(overlap>=0); + if (overlap == 0) + { + xptr = x; + } else { + for (i=0;i0) + { + for(i=0;i= 536870912) + { + int shift2=1; + if (ac[0] >= 1073741824) + shift2++; + for (i=0;i<=lag;i++) + ac[i] = SHR32(ac[i], shift2); + shift += shift2; + } +#endif + + RESTORE_STACK; + return shift; +} diff --git a/asm/libs/opus/celt/celt_lpc.h b/asm/libs/opus/celt/celt_lpc.h new file mode 100644 index 00000000..323459eb --- /dev/null +++ b/asm/libs/opus/celt/celt_lpc.h @@ -0,0 +1,67 @@ +/* Copyright (c) 2009-2010 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef PLC_H +#define PLC_H + +#include "arch.h" +#include "cpu_support.h" + +#if defined(OPUS_X86_MAY_HAVE_SSE4_1) +#include "x86/celt_lpc_sse.h" +#endif + +#define LPC_ORDER 24 + +void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p); + +void celt_fir_c( + const opus_val16 *x, + const opus_val16 *num, + opus_val16 *y, + int N, + int ord, + opus_val16 *mem, + int arch); + +#if !defined(OVERRIDE_CELT_FIR) +#define celt_fir(x, num, y, N, ord, mem, arch) \ + (celt_fir_c(x, num, y, N, ord, mem, arch)) +#endif + +void celt_iir(const opus_val32 *x, + const opus_val16 *den, + opus_val32 *y, + int N, + int ord, + opus_val16 *mem, + int arch); + +int _celt_autocorr(const opus_val16 *x, opus_val32 *ac, + const opus_val16 *window, int overlap, int lag, int n, int arch); + +#endif /* PLC_H */ diff --git a/asm/libs/opus/celt/cpu_support.h b/asm/libs/opus/celt/cpu_support.h new file mode 100644 index 00000000..68fc6067 --- /dev/null +++ b/asm/libs/opus/celt/cpu_support.h @@ -0,0 +1,70 @@ +/* Copyright (c) 2010 Xiph.Org Foundation + * Copyright (c) 2013 Parrot */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef CPU_SUPPORT_H +#define CPU_SUPPORT_H + +#include "opus_types.h" +#include "opus_defines.h" + +#if defined(OPUS_HAVE_RTCD) && \ + (defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)) +#include "arm/armcpu.h" + +/* We currently support 4 ARM variants: + * arch[0] -> ARMv4 + * arch[1] -> ARMv5E + * arch[2] -> ARMv6 + * arch[3] -> NEON + */ +#define OPUS_ARCHMASK 3 + +#elif (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ + (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ + (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ + (defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX)) + +#include "x86/x86cpu.h" +/* We currently support 5 x86 variants: + * arch[0] -> non-sse + * arch[1] -> sse + * arch[2] -> sse2 + * arch[3] -> sse4.1 + * arch[4] -> avx + */ +#define OPUS_ARCHMASK 7 +int opus_select_arch(void); + +#else +#define OPUS_ARCHMASK 0 + +static OPUS_INLINE int opus_select_arch(void) +{ + return 0; +} +#endif +#endif diff --git a/asm/libs/opus/celt/cwrs.c b/asm/libs/opus/celt/cwrs.c new file mode 100644 index 00000000..2fa9f89c --- /dev/null +++ b/asm/libs/opus/celt/cwrs.c @@ -0,0 +1,715 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Copyright (c) 2007-2009 Timothy B. Terriberry + Written by Timothy B. Terriberry and Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "os_support.h" +#include "cwrs.h" +#include "mathops.h" +#include "arch.h" + +#ifdef CUSTOM_MODES + +/*Guaranteed to return a conservatively large estimate of the binary logarithm + with frac bits of fractional precision. + Tested for all possible 32-bit inputs with frac=4, where the maximum + overestimation is 0.06254243 bits.*/ +int log2_frac(opus_uint32 val, int frac) +{ + int l; + l=EC_ILOG(val); + if(val&(val-1)){ + /*This is (val>>l-16), but guaranteed to round up, even if adding a bias + before the shift would cause overflow (e.g., for 0xFFFFxxxx). + Doesn't work for val=0, but that case fails the test above.*/ + if(l>16)val=((val-1)>>(l-16))+1; + else val<<=16-l; + l=(l-1)<>16); + l+=b<>b; + val=(val*val+0x7FFF)>>15; + } + while(frac-->0); + /*If val is not exactly 0x8000, then we have to round up the remainder.*/ + return l+(val>0x8000); + } + /*Exact powers of two require no rounding.*/ + else return (l-1)<0 ? sum(k=1...K,2**k*choose(N,k)*choose(K-1,k-1)) : 1, + where choose() is the binomial function. + A table of values for N<10 and K<10 looks like: + V[10][10] = { + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {1, 4, 8, 12, 16, 20, 24, 28, 32, 36}, + {1, 6, 18, 38, 66, 102, 146, 198, 258, 326}, + {1, 8, 32, 88, 192, 360, 608, 952, 1408, 1992}, + {1, 10, 50, 170, 450, 1002, 1970, 3530, 5890, 9290}, + {1, 12, 72, 292, 912, 2364, 5336, 10836, 20256, 35436}, + {1, 14, 98, 462, 1666, 4942, 12642, 28814, 59906, 115598}, + {1, 16, 128, 688, 2816, 9424, 27008, 68464, 157184, 332688}, + {1, 18, 162, 978, 4482, 16722, 53154, 148626, 374274, 864146} + }; + + U(N,K) = the number of such combinations wherein N-1 objects are taken at + most K-1 at a time. + This is given by + U(N,K) = sum(k=0...K-1,V(N-1,k)) + = K>0 ? (V(N-1,K-1) + V(N,K-1))/2 : 0. + The latter expression also makes clear that U(N,K) is half the number of such + combinations wherein the first object is taken at least once. + Although it may not be clear from either of these definitions, U(N,K) is the + natural function to work with when enumerating the pulse vector codebooks, + not V(N,K). + U(N,K) is not well-defined for N=0, but with the extension + U(0,K) = K>0 ? 0 : 1, + the function becomes symmetric: U(N,K) = U(K,N), with a similar table: + U[10][10] = { + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {0, 1, 3, 5, 7, 9, 11, 13, 15, 17}, + {0, 1, 5, 13, 25, 41, 61, 85, 113, 145}, + {0, 1, 7, 25, 63, 129, 231, 377, 575, 833}, + {0, 1, 9, 41, 129, 321, 681, 1289, 2241, 3649}, + {0, 1, 11, 61, 231, 681, 1683, 3653, 7183, 13073}, + {0, 1, 13, 85, 377, 1289, 3653, 8989, 19825, 40081}, + {0, 1, 15, 113, 575, 2241, 7183, 19825, 48639, 108545}, + {0, 1, 17, 145, 833, 3649, 13073, 40081, 108545, 265729} + }; + + With this extension, V(N,K) may be written in terms of U(N,K): + V(N,K) = U(N,K) + U(N,K+1) + for all N>=0, K>=0. + Thus U(N,K+1) represents the number of combinations where the first element + is positive or zero, and U(N,K) represents the number of combinations where + it is negative. + With a large enough table of U(N,K) values, we could write O(N) encoding + and O(min(N*log(K),N+K)) decoding routines, but such a table would be + prohibitively large for small embedded devices (K may be as large as 32767 + for small N, and N may be as large as 200). + + Both functions obey the same recurrence relation: + V(N,K) = V(N-1,K) + V(N,K-1) + V(N-1,K-1), + U(N,K) = U(N-1,K) + U(N,K-1) + U(N-1,K-1), + for all N>0, K>0, with different initial conditions at N=0 or K=0. + This allows us to construct a row of one of the tables above given the + previous row or the next row. + Thus we can derive O(NK) encoding and decoding routines with O(K) memory + using only addition and subtraction. + + When encoding, we build up from the U(2,K) row and work our way forwards. + When decoding, we need to start at the U(N,K) row and work our way backwards, + which requires a means of computing U(N,K). + U(N,K) may be computed from two previous values with the same N: + U(N,K) = ((2*N-1)*U(N,K-1) - U(N,K-2))/(K-1) + U(N,K-2) + for all N>1, and since U(N,K) is symmetric, a similar relation holds for two + previous values with the same K: + U(N,K>1) = ((2*K-1)*U(N-1,K) - U(N-2,K))/(N-1) + U(N-2,K) + for all K>1. + This allows us to construct an arbitrary row of the U(N,K) table by starting + with the first two values, which are constants. + This saves roughly 2/3 the work in our O(NK) decoding routine, but costs O(K) + multiplications. + Similar relations can be derived for V(N,K), but are not used here. + + For N>0 and K>0, U(N,K) and V(N,K) take on the form of an (N-1)-degree + polynomial for fixed N. + The first few are + U(1,K) = 1, + U(2,K) = 2*K-1, + U(3,K) = (2*K-2)*K+1, + U(4,K) = (((4*K-6)*K+8)*K-3)/3, + U(5,K) = ((((2*K-4)*K+10)*K-8)*K+3)/3, + and + V(1,K) = 2, + V(2,K) = 4*K, + V(3,K) = 4*K*K+2, + V(4,K) = 8*(K*K+2)*K/3, + V(5,K) = ((4*K*K+20)*K*K+6)/3, + for all K>0. + This allows us to derive O(N) encoding and O(N*log(K)) decoding routines for + small N (and indeed decoding is also O(N) for N<3). + + @ARTICLE{Fis86, + author="Thomas R. Fischer", + title="A Pyramid Vector Quantizer", + journal="IEEE Transactions on Information Theory", + volume="IT-32", + number=4, + pages="568--583", + month=Jul, + year=1986 + }*/ + +#if !defined(SMALL_FOOTPRINT) + +/*U(N,K) = U(K,N) := N>0?K>0?U(N-1,K)+U(N,K-1)+U(N-1,K-1):0:K>0?1:0*/ +# define CELT_PVQ_U(_n,_k) (CELT_PVQ_U_ROW[IMIN(_n,_k)][IMAX(_n,_k)]) +/*V(N,K) := U(N,K)+U(N,K+1) = the number of PVQ codewords for a band of size N + with K pulses allocated to it.*/ +# define CELT_PVQ_V(_n,_k) (CELT_PVQ_U(_n,_k)+CELT_PVQ_U(_n,(_k)+1)) + +/*For each V(N,K) supported, we will access element U(min(N,K+1),max(N,K+1)). + Thus, the number of entries in row I is the larger of the maximum number of + pulses we will ever allocate for a given N=I (K=128, or however many fit in + 32 bits, whichever is smaller), plus one, and the maximum N for which + K=I-1 pulses fit in 32 bits. + The largest band size in an Opus Custom mode is 208. + Otherwise, we can limit things to the set of N which can be achieved by + splitting a band from a standard Opus mode: 176, 144, 96, 88, 72, 64, 48, + 44, 36, 32, 24, 22, 18, 16, 8, 4, 2).*/ +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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +#if defined(CUSTOM_MODES) + /*...208:*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, +#endif + /*N=2, K=2...176:*/ + 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, + 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, + 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, + 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, + 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, + 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, + 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, + 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, + 265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, 287, 289, 291, 293, + 295, 297, 299, 301, 303, 305, 307, 309, 311, 313, 315, 317, 319, 321, 323, + 325, 327, 329, 331, 333, 335, 337, 339, 341, 343, 345, 347, 349, 351, +#if defined(CUSTOM_MODES) + /*...208:*/ + 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, + 383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 403, 405, 407, 409, 411, + 413, 415, +#endif + /*N=3, K=3...176:*/ + 13, 25, 41, 61, 85, 113, 145, 181, 221, 265, 313, 365, 421, 481, 545, 613, + 685, 761, 841, 925, 1013, 1105, 1201, 1301, 1405, 1513, 1625, 1741, 1861, + 1985, 2113, 2245, 2381, 2521, 2665, 2813, 2965, 3121, 3281, 3445, 3613, 3785, + 3961, 4141, 4325, 4513, 4705, 4901, 5101, 5305, 5513, 5725, 5941, 6161, 6385, + 6613, 6845, 7081, 7321, 7565, 7813, 8065, 8321, 8581, 8845, 9113, 9385, 9661, + 9941, 10225, 10513, 10805, 11101, 11401, 11705, 12013, 12325, 12641, 12961, + 13285, 13613, 13945, 14281, 14621, 14965, 15313, 15665, 16021, 16381, 16745, + 17113, 17485, 17861, 18241, 18625, 19013, 19405, 19801, 20201, 20605, 21013, + 21425, 21841, 22261, 22685, 23113, 23545, 23981, 24421, 24865, 25313, 25765, + 26221, 26681, 27145, 27613, 28085, 28561, 29041, 29525, 30013, 30505, 31001, + 31501, 32005, 32513, 33025, 33541, 34061, 34585, 35113, 35645, 36181, 36721, + 37265, 37813, 38365, 38921, 39481, 40045, 40613, 41185, 41761, 42341, 42925, + 43513, 44105, 44701, 45301, 45905, 46513, 47125, 47741, 48361, 48985, 49613, + 50245, 50881, 51521, 52165, 52813, 53465, 54121, 54781, 55445, 56113, 56785, + 57461, 58141, 58825, 59513, 60205, 60901, 61601, +#if defined(CUSTOM_MODES) + /*...208:*/ + 62305, 63013, 63725, 64441, 65161, 65885, 66613, 67345, 68081, 68821, 69565, + 70313, 71065, 71821, 72581, 73345, 74113, 74885, 75661, 76441, 77225, 78013, + 78805, 79601, 80401, 81205, 82013, 82825, 83641, 84461, 85285, 86113, +#endif + /*N=4, K=4...176:*/ + 63, 129, 231, 377, 575, 833, 1159, 1561, 2047, 2625, 3303, 4089, 4991, 6017, + 7175, 8473, 9919, 11521, 13287, 15225, 17343, 19649, 22151, 24857, 27775, + 30913, 34279, 37881, 41727, 45825, 50183, 54809, 59711, 64897, 70375, 76153, + 82239, 88641, 95367, 102425, 109823, 117569, 125671, 134137, 142975, 152193, + 161799, 171801, 182207, 193025, 204263, 215929, 228031, 240577, 253575, + 267033, 280959, 295361, 310247, 325625, 341503, 357889, 374791, 392217, + 410175, 428673, 447719, 467321, 487487, 508225, 529543, 551449, 573951, + 597057, 620775, 645113, 670079, 695681, 721927, 748825, 776383, 804609, + 833511, 863097, 893375, 924353, 956039, 988441, 1021567, 1055425, 1090023, + 1125369, 1161471, 1198337, 1235975, 1274393, 1313599, 1353601, 1394407, + 1436025, 1478463, 1521729, 1565831, 1610777, 1656575, 1703233, 1750759, + 1799161, 1848447, 1898625, 1949703, 2001689, 2054591, 2108417, 2163175, + 2218873, 2275519, 2333121, 2391687, 2451225, 2511743, 2573249, 2635751, + 2699257, 2763775, 2829313, 2895879, 2963481, 3032127, 3101825, 3172583, + 3244409, 3317311, 3391297, 3466375, 3542553, 3619839, 3698241, 3777767, + 3858425, 3940223, 4023169, 4107271, 4192537, 4278975, 4366593, 4455399, + 4545401, 4636607, 4729025, 4822663, 4917529, 5013631, 5110977, 5209575, + 5309433, 5410559, 5512961, 5616647, 5721625, 5827903, 5935489, 6044391, + 6154617, 6266175, 6379073, 6493319, 6608921, 6725887, 6844225, 6963943, + 7085049, 7207551, +#if defined(CUSTOM_MODES) + /*...208:*/ + 7331457, 7456775, 7583513, 7711679, 7841281, 7972327, 8104825, 8238783, + 8374209, 8511111, 8649497, 8789375, 8930753, 9073639, 9218041, 9363967, + 9511425, 9660423, 9810969, 9963071, 10116737, 10271975, 10428793, 10587199, + 10747201, 10908807, 11072025, 11236863, 11403329, 11571431, 11741177, + 11912575, +#endif + /*N=5, K=5...176:*/ + 321, 681, 1289, 2241, 3649, 5641, 8361, 11969, 16641, 22569, 29961, 39041, + 50049, 63241, 78889, 97281, 118721, 143529, 172041, 204609, 241601, 283401, + 330409, 383041, 441729, 506921, 579081, 658689, 746241, 842249, 947241, + 1061761, 1186369, 1321641, 1468169, 1626561, 1797441, 1981449, 2179241, + 2391489, 2618881, 2862121, 3121929, 3399041, 3694209, 4008201, 4341801, + 4695809, 5071041, 5468329, 5888521, 6332481, 6801089, 7295241, 7815849, + 8363841, 8940161, 9545769, 10181641, 10848769, 11548161, 12280841, 13047849, + 13850241, 14689089, 15565481, 16480521, 17435329, 18431041, 19468809, + 20549801, 21675201, 22846209, 24064041, 25329929, 26645121, 28010881, + 29428489, 30899241, 32424449, 34005441, 35643561, 37340169, 39096641, + 40914369, 42794761, 44739241, 46749249, 48826241, 50971689, 53187081, + 55473921, 57833729, 60268041, 62778409, 65366401, 68033601, 70781609, + 73612041, 76526529, 79526721, 82614281, 85790889, 89058241, 92418049, + 95872041, 99421961, 103069569, 106816641, 110664969, 114616361, 118672641, + 122835649, 127107241, 131489289, 135983681, 140592321, 145317129, 150160041, + 155123009, 160208001, 165417001, 170752009, 176215041, 181808129, 187533321, + 193392681, 199388289, 205522241, 211796649, 218213641, 224775361, 231483969, + 238341641, 245350569, 252512961, 259831041, 267307049, 274943241, 282741889, + 290705281, 298835721, 307135529, 315607041, 324252609, 333074601, 342075401, + 351257409, 360623041, 370174729, 379914921, 389846081, 399970689, 410291241, + 420810249, 431530241, 442453761, 453583369, 464921641, 476471169, 488234561, + 500214441, 512413449, 524834241, 537479489, 550351881, 563454121, 576788929, + 590359041, 604167209, 618216201, 632508801, +#if defined(CUSTOM_MODES) + /*...208:*/ + 647047809, 661836041, 676876329, 692171521, 707724481, 723538089, 739615241, + 755958849, 772571841, 789457161, 806617769, 824056641, 841776769, 859781161, + 878072841, 896654849, 915530241, 934702089, 954173481, 973947521, 994027329, + 1014416041, 1035116809, 1056132801, 1077467201, 1099123209, 1121104041, + 1143412929, 1166053121, 1189027881, 1212340489, 1235994241, +#endif + /*N=6, K=6...96:*/ + 1683, 3653, 7183, 13073, 22363, 36365, 56695, 85305, 124515, 177045, 246047, + 335137, 448427, 590557, 766727, 982729, 1244979, 1560549, 1937199, 2383409, + 2908411, 3522221, 4235671, 5060441, 6009091, 7095093, 8332863, 9737793, + 11326283, 13115773, 15124775, 17372905, 19880915, 22670725, 25765455, + 29189457, 32968347, 37129037, 41699767, 46710137, 52191139, 58175189, + 64696159, 71789409, 79491819, 87841821, 96879431, 106646281, 117185651, + 128542501, 140763503, 153897073, 167993403, 183104493, 199284183, 216588185, + 235074115, 254801525, 275831935, 298228865, 322057867, 347386557, 374284647, + 402823977, 433078547, 465124549, 499040399, 534906769, 572806619, 612825229, + 655050231, 699571641, 746481891, 795875861, 847850911, 902506913, 959946283, + 1020274013, 1083597703, 1150027593, 1219676595, 1292660325, 1369097135, + 1449108145, 1532817275, 1620351277, 1711839767, 1807415257, 1907213187, + 2011371957, 2120032959, +#if defined(CUSTOM_MODES) + /*...109:*/ + 2233340609U, 2351442379U, 2474488829U, 2602633639U, 2736033641U, 2874848851U, + 3019242501U, 3169381071U, 3325434321U, 3487575323U, 3655980493U, 3830829623U, + 4012305913U, +#endif + /*N=7, K=7...54*/ + 8989, 19825, 40081, 75517, 134245, 227305, 369305, 579125, 880685, 1303777, + 1884961, 2668525, 3707509, 5064793, 6814249, 9041957, 11847485, 15345233, + 19665841, 24957661, 31388293, 39146185, 48442297, 59511829, 72616013, + 88043969, 106114625, 127178701, 151620757, 179861305, 212358985, 249612805, + 292164445, 340600625, 395555537, 457713341, 527810725, 606639529, 695049433, + 793950709, 904317037, 1027188385, 1163673953, 1314955181, 1482288821, + 1667010073, 1870535785, 2094367717, +#if defined(CUSTOM_MODES) + /*...60:*/ + 2340095869U, 2609401873U, 2904062449U, 3225952925U, 3577050821U, 3959439497U, +#endif + /*N=8, K=8...37*/ + 48639, 108545, 224143, 433905, 795455, 1392065, 2340495, 3800305, 5984767, + 9173505, 13726991, 20103025, 28875327, 40754369, 56610575, 77500017, + 104692735, 139703809, 184327311, 240673265, 311207743, 398796225, 506750351, + 638878193, 799538175, 993696769, 1226990095, 1505789553, 1837271615, + 2229491905U, +#if defined(CUSTOM_MODES) + /*...40:*/ + 2691463695U, 3233240945U, 3866006015U, +#endif + /*N=9, K=9...28:*/ + 265729, 598417, 1256465, 2485825, 4673345, 8405905, 14546705, 24331777, + 39490049, 62390545, 96220561, 145198913, 214828609, 312193553, 446304145, + 628496897, 872893441, 1196924561, 1621925137, 2173806145U, +#if defined(CUSTOM_MODES) + /*...29:*/ + 2883810113U, +#endif + /*N=10, K=10...24:*/ + 1462563, 3317445, 7059735, 14218905, 27298155, 50250765, 89129247, 152951073, + 254831667, 413442773, 654862247, 1014889769, 1541911931, 2300409629U, + 3375210671U, + /*N=11, K=11...19:*/ + 8097453, 18474633, 39753273, 81270333, 158819253, 298199265, 540279585, + 948062325, 1616336765, +#if defined(CUSTOM_MODES) + /*...20:*/ + 2684641785U, +#endif + /*N=12, K=12...18:*/ + 45046719, 103274625, 224298231, 464387817, 921406335, 1759885185, + 3248227095U, + /*N=13, K=13...16:*/ + 251595969, 579168825, 1267854873, 2653649025U, + /*N=14, K=14:*/ + 1409933619 +}; + +#if defined(CUSTOM_MODES) +static const opus_uint32 *const CELT_PVQ_U_ROW[15]={ + CELT_PVQ_U_DATA+ 0,CELT_PVQ_U_DATA+ 208,CELT_PVQ_U_DATA+ 415, + CELT_PVQ_U_DATA+ 621,CELT_PVQ_U_DATA+ 826,CELT_PVQ_U_DATA+1030, + CELT_PVQ_U_DATA+1233,CELT_PVQ_U_DATA+1336,CELT_PVQ_U_DATA+1389, + CELT_PVQ_U_DATA+1421,CELT_PVQ_U_DATA+1441,CELT_PVQ_U_DATA+1455, + CELT_PVQ_U_DATA+1464,CELT_PVQ_U_DATA+1470,CELT_PVQ_U_DATA+1473 +}; +#else +static const opus_uint32 *const CELT_PVQ_U_ROW[15]={ + CELT_PVQ_U_DATA+ 0,CELT_PVQ_U_DATA+ 176,CELT_PVQ_U_DATA+ 351, + CELT_PVQ_U_DATA+ 525,CELT_PVQ_U_DATA+ 698,CELT_PVQ_U_DATA+ 870, + CELT_PVQ_U_DATA+1041,CELT_PVQ_U_DATA+1131,CELT_PVQ_U_DATA+1178, + CELT_PVQ_U_DATA+1207,CELT_PVQ_U_DATA+1226,CELT_PVQ_U_DATA+1240, + CELT_PVQ_U_DATA+1248,CELT_PVQ_U_DATA+1254,CELT_PVQ_U_DATA+1257 +}; +#endif + +#if defined(CUSTOM_MODES) +void get_required_bits(opus_int16 *_bits,int _n,int _maxk,int _frac){ + int k; + /*_maxk==0 => there's nothing to do.*/ + celt_assert(_maxk>0); + _bits[0]=0; + for(k=1;k<=_maxk;k++)_bits[k]=log2_frac(CELT_PVQ_V(_n,k),_frac); +} +#endif + +static opus_uint32 icwrs(int _n,const int *_y){ + opus_uint32 i; + int j; + int k; + celt_assert(_n>=2); + j=_n-1; + i=_y[j]<0; + k=abs(_y[j]); + do{ + j--; + i+=CELT_PVQ_U(_n-j,k); + k+=abs(_y[j]); + if(_y[j]<0)i+=CELT_PVQ_U(_n-j,k+1); + } + while(j>0); + return i; +} + +void encode_pulses(const int *_y,int _n,int _k,ec_enc *_enc){ + celt_assert(_k>0); + ec_enc_uint(_enc,icwrs(_n,_y),CELT_PVQ_V(_n,_k)); +} + +static opus_val32 cwrsi(int _n,int _k,opus_uint32 _i,int *_y){ + opus_uint32 p; + int s; + int k0; + opus_int16 val; + opus_val32 yy=0; + celt_assert(_k>0); + celt_assert(_n>1); + while(_n>2){ + opus_uint32 q; + /*Lots of pulses case:*/ + if(_k>=_n){ + const opus_uint32 *row; + row=CELT_PVQ_U_ROW[_n]; + /*Are the pulses in this dimension negative?*/ + p=row[_k+1]; + s=-(_i>=p); + _i-=p&s; + /*Count how many pulses were placed in this dimension.*/ + k0=_k; + q=row[_n]; + if(q>_i){ + celt_assert(p>q); + _k=_n; + do p=CELT_PVQ_U_ROW[--_k][_n]; + while(p>_i); + } + else for(p=row[_k];p>_i;p=row[_k])_k--; + _i-=p; + val=(k0-_k+s)^s; + *_y++=val; + yy=MAC16_16(yy,val,val); + } + /*Lots of dimensions case:*/ + else{ + /*Are there any pulses in this dimension at all?*/ + p=CELT_PVQ_U_ROW[_k][_n]; + q=CELT_PVQ_U_ROW[_k+1][_n]; + if(p<=_i&&_i=q); + _i-=q&s; + /*Count how many pulses were placed in this dimension.*/ + k0=_k; + do p=CELT_PVQ_U_ROW[--_k][_n]; + while(p>_i); + _i-=p; + val=(k0-_k+s)^s; + *_y++=val; + yy=MAC16_16(yy,val,val); + } + } + _n--; + } + /*_n==2*/ + p=2*_k+1; + s=-(_i>=p); + _i-=p&s; + k0=_k; + _k=(_i+1)>>1; + if(_k)_i-=2*_k-1; + val=(k0-_k+s)^s; + *_y++=val; + yy=MAC16_16(yy,val,val); + /*_n==1*/ + s=-(int)_i; + val=(_k+s)^s; + *_y=val; + yy=MAC16_16(yy,val,val); + return yy; +} + +opus_val32 decode_pulses(int *_y,int _n,int _k,ec_dec *_dec){ + return cwrsi(_n,_k,ec_dec_uint(_dec,CELT_PVQ_V(_n,_k)),_y); +} + +#else /* SMALL_FOOTPRINT */ + +/*Computes the next row/column of any recurrence that obeys the relation + u[i][j]=u[i-1][j]+u[i][j-1]+u[i-1][j-1]. + _ui0 is the base case for the new row/column.*/ +static OPUS_INLINE void unext(opus_uint32 *_ui,unsigned _len,opus_uint32 _ui0){ + opus_uint32 ui1; + unsigned j; + /*This do-while will overrun the array if we don't have storage for at least + 2 values.*/ + j=1; do { + ui1=UADD32(UADD32(_ui[j],_ui[j-1]),_ui0); + _ui[j-1]=_ui0; + _ui0=ui1; + } while (++j<_len); + _ui[j-1]=_ui0; +} + +/*Computes the previous row/column of any recurrence that obeys the relation + u[i-1][j]=u[i][j]-u[i][j-1]-u[i-1][j-1]. + _ui0 is the base case for the new row/column.*/ +static OPUS_INLINE void uprev(opus_uint32 *_ui,unsigned _n,opus_uint32 _ui0){ + opus_uint32 ui1; + unsigned j; + /*This do-while will overrun the array if we don't have storage for at least + 2 values.*/ + j=1; do { + ui1=USUB32(USUB32(_ui[j],_ui[j-1]),_ui0); + _ui[j-1]=_ui0; + _ui0=ui1; + } while (++j<_n); + _ui[j-1]=_ui0; +} + +/*Compute V(_n,_k), as well as U(_n,0..._k+1). + _u: On exit, _u[i] contains U(_n,i) for i in [0..._k+1].*/ +static opus_uint32 ncwrs_urow(unsigned _n,unsigned _k,opus_uint32 *_u){ + opus_uint32 um2; + unsigned len; + unsigned k; + len=_k+2; + /*We require storage at least 3 values (e.g., _k>0).*/ + celt_assert(len>=3); + _u[0]=0; + _u[1]=um2=1; + /*If _n==0, _u[0] should be 1 and the rest should be 0.*/ + /*If _n==1, _u[i] should be 1 for i>1.*/ + celt_assert(_n>=2); + /*If _k==0, the following do-while loop will overflow the buffer.*/ + celt_assert(_k>0); + k=2; + do _u[k]=(k<<1)-1; + while(++k0); + j=0; + do{ + opus_uint32 p; + int s; + int yj; + p=_u[_k+1]; + s=-(_i>=p); + _i-=p&s; + yj=_k; + p=_u[_k]; + while(p>_i)p=_u[--_k]; + _i-=p; + yj-=_k; + val=(yj+s)^s; + _y[j]=val; + yy=MAC16_16(yy,val,val); + uprev(_u,_k+2,0); + } + while(++j<_n); + return yy; +} + +/*Returns the index of the given combination of K elements chosen from a set + of size 1 with associated sign bits. + _y: The vector of pulses, whose sum of absolute values is K. + _k: Returns K.*/ +static OPUS_INLINE opus_uint32 icwrs1(const int *_y,int *_k){ + *_k=abs(_y[0]); + return _y[0]<0; +} + +/*Returns the index of the given combination of K elements chosen from a set + of size _n with associated sign bits. + _y: The vector of pulses, whose sum of absolute values must be _k. + _nc: Returns V(_n,_k).*/ +static OPUS_INLINE opus_uint32 icwrs(int _n,int _k,opus_uint32 *_nc,const int *_y, + opus_uint32 *_u){ + opus_uint32 i; + int j; + int k; + /*We can't unroll the first two iterations of the loop unless _n>=2.*/ + celt_assert(_n>=2); + _u[0]=0; + for(k=1;k<=_k+1;k++)_u[k]=(k<<1)-1; + i=icwrs1(_y+_n-1,&k); + j=_n-2; + i+=_u[k]; + k+=abs(_y[j]); + if(_y[j]<0)i+=_u[k+1]; + while(j-->0){ + unext(_u,_k+2,0); + i+=_u[k]; + k+=abs(_y[j]); + if(_y[j]<0)i+=_u[k+1]; + } + *_nc=_u[k]+_u[k+1]; + return i; +} + +#ifdef CUSTOM_MODES +void get_required_bits(opus_int16 *_bits,int _n,int _maxk,int _frac){ + int k; + /*_maxk==0 => there's nothing to do.*/ + celt_assert(_maxk>0); + _bits[0]=0; + if (_n==1) + { + for (k=1;k<=_maxk;k++) + _bits[k] = 1<<_frac; + } + else { + VARDECL(opus_uint32,u); + SAVE_STACK; + ALLOC(u,_maxk+2U,opus_uint32); + ncwrs_urow(_n,_maxk,u); + for(k=1;k<=_maxk;k++) + _bits[k]=log2_frac(u[k]+u[k+1],_frac); + RESTORE_STACK; + } +} +#endif /* CUSTOM_MODES */ + +void encode_pulses(const int *_y,int _n,int _k,ec_enc *_enc){ + opus_uint32 i; + VARDECL(opus_uint32,u); + opus_uint32 nc; + SAVE_STACK; + celt_assert(_k>0); + ALLOC(u,_k+2U,opus_uint32); + i=icwrs(_n,_k,&nc,_y,u); + ec_enc_uint(_enc,i,nc); + RESTORE_STACK; +} + +opus_val32 decode_pulses(int *_y,int _n,int _k,ec_dec *_dec){ + VARDECL(opus_uint32,u); + int ret; + SAVE_STACK; + celt_assert(_k>0); + ALLOC(u,_k+2U,opus_uint32); + ret = cwrsi(_n,_k,ec_dec_uint(_dec,ncwrs_urow(_n,_k,u)),_y,u); + RESTORE_STACK; + return ret; +} + +#endif /* SMALL_FOOTPRINT */ diff --git a/asm/libs/opus/celt/cwrs.h b/asm/libs/opus/celt/cwrs.h new file mode 100644 index 00000000..7cd47174 --- /dev/null +++ b/asm/libs/opus/celt/cwrs.h @@ -0,0 +1,48 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Copyright (c) 2007-2009 Timothy B. Terriberry + Written by Timothy B. Terriberry and Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef CWRS_H +#define CWRS_H + +#include "arch.h" +#include "stack_alloc.h" +#include "entenc.h" +#include "entdec.h" + +#ifdef CUSTOM_MODES +int log2_frac(opus_uint32 val, int frac); +#endif + +void get_required_bits(opus_int16 *bits, int N, int K, int frac); + +void encode_pulses(const int *_y, int N, int K, ec_enc *enc); + +opus_val32 decode_pulses(int *_y, int N, int K, ec_dec *dec); + +#endif /* CWRS_H */ diff --git a/asm/libs/opus/celt/dump_modes/dump_modes.c b/asm/libs/opus/celt/dump_modes/dump_modes.c new file mode 100644 index 00000000..9105a534 --- /dev/null +++ b/asm/libs/opus/celt/dump_modes/dump_modes.c @@ -0,0 +1,353 @@ +/* Copyright (c) 2008 CSIRO + Copyright (c) 2008-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include "modes.h" +#include "celt.h" +#include "rate.h" +#include "dump_modes_arch.h" + +#define INT16 "%d" +#define INT32 "%d" +#define FLOAT "%#0.8gf" + +#ifdef FIXED_POINT +#define WORD16 INT16 +#define WORD32 INT32 +#else +#define WORD16 FLOAT +#define WORD32 FLOAT +#endif + +void dump_modes(FILE *file, CELTMode **modes, int nb_modes) +{ + int i, j, k; + int mdct_twiddles_size; + fprintf(file, "/* The contents of this file was automatically generated by dump_modes.c\n"); + fprintf(file, " with arguments:"); + for (i=0;iFs,mode->shortMdctSize*mode->nbShortMdcts); + } + fprintf(file, "\n It contains static definitions for some pre-defined modes. */\n"); + fprintf(file, "#include \"modes.h\"\n"); + fprintf(file, "#include \"rate.h\"\n"); + fprintf(file, "\n#ifdef HAVE_ARM_NE10\n"); + fprintf(file, "#define OVERRIDE_FFT 1\n"); + fprintf(file, "#include \"%s\"\n", ARM_NE10_ARCH_FILE_NAME); + fprintf(file, "#endif\n"); + + fprintf(file, "\n"); + + for (i=0;ishortMdctSize*mode->nbShortMdcts; + standard = (mode->Fs == 400*(opus_int32)mode->shortMdctSize); + framerate = mode->Fs/mode->shortMdctSize; + + if (!standard) + { + fprintf(file, "#ifndef DEF_EBANDS%d_%d\n", mode->Fs, mdctSize); + fprintf(file, "#define DEF_EBANDS%d_%d\n", mode->Fs, mdctSize); + fprintf (file, "static const opus_int16 eBands%d_%d[%d] = {\n", mode->Fs, mdctSize, mode->nbEBands+2); + for (j=0;jnbEBands+2;j++) + fprintf (file, "%d, ", mode->eBands[j]); + fprintf (file, "};\n"); + fprintf(file, "#endif\n"); + fprintf(file, "\n"); + } + + fprintf(file, "#ifndef DEF_WINDOW%d\n", mode->overlap); + fprintf(file, "#define DEF_WINDOW%d\n", mode->overlap); + fprintf (file, "static const opus_val16 window%d[%d] = {\n", mode->overlap, mode->overlap); + for (j=0;joverlap;j++) + fprintf (file, WORD16 ",%c", mode->window[j],(j+6)%5==0?'\n':' '); + fprintf (file, "};\n"); + fprintf(file, "#endif\n"); + fprintf(file, "\n"); + + if (!standard) + { + fprintf(file, "#ifndef DEF_ALLOC_VECTORS%d_%d\n", mode->Fs, mdctSize); + fprintf(file, "#define DEF_ALLOC_VECTORS%d_%d\n", mode->Fs, mdctSize); + fprintf (file, "static const unsigned char allocVectors%d_%d[%d] = {\n", mode->Fs, mdctSize, mode->nbEBands*mode->nbAllocVectors); + for (j=0;jnbAllocVectors;j++) + { + for (k=0;knbEBands;k++) + fprintf (file, "%2d, ", mode->allocVectors[j*mode->nbEBands+k]); + fprintf (file, "\n"); + } + fprintf (file, "};\n"); + fprintf(file, "#endif\n"); + fprintf(file, "\n"); + } + + fprintf(file, "#ifndef DEF_LOGN%d\n", framerate); + fprintf(file, "#define DEF_LOGN%d\n", framerate); + fprintf (file, "static const opus_int16 logN%d[%d] = {\n", framerate, mode->nbEBands); + for (j=0;jnbEBands;j++) + fprintf (file, "%d, ", mode->logN[j]); + fprintf (file, "};\n"); + fprintf(file, "#endif\n"); + fprintf(file, "\n"); + + /* Pulse cache */ + fprintf(file, "#ifndef DEF_PULSE_CACHE%d\n", mode->Fs/mdctSize); + fprintf(file, "#define DEF_PULSE_CACHE%d\n", mode->Fs/mdctSize); + fprintf (file, "static const opus_int16 cache_index%d[%d] = {\n", mode->Fs/mdctSize, (mode->maxLM+2)*mode->nbEBands); + for (j=0;jnbEBands*(mode->maxLM+2);j++) + fprintf (file, "%d,%c", mode->cache.index[j],(j+16)%15==0?'\n':' '); + fprintf (file, "};\n"); + fprintf (file, "static const unsigned char cache_bits%d[%d] = {\n", mode->Fs/mdctSize, mode->cache.size); + for (j=0;jcache.size;j++) + fprintf (file, "%d,%c", mode->cache.bits[j],(j+16)%15==0?'\n':' '); + fprintf (file, "};\n"); + fprintf (file, "static const unsigned char cache_caps%d[%d] = {\n", mode->Fs/mdctSize, (mode->maxLM+1)*2*mode->nbEBands); + for (j=0;j<(mode->maxLM+1)*2*mode->nbEBands;j++) + fprintf (file, "%d,%c", mode->cache.caps[j],(j+16)%15==0?'\n':' '); + fprintf (file, "};\n"); + + fprintf(file, "#endif\n"); + fprintf(file, "\n"); + + /* FFT twiddles */ + fprintf(file, "#ifndef FFT_TWIDDLES%d_%d\n", mode->Fs, mdctSize); + fprintf(file, "#define FFT_TWIDDLES%d_%d\n", mode->Fs, mdctSize); + fprintf (file, "static const kiss_twiddle_cpx fft_twiddles%d_%d[%d] = {\n", + mode->Fs, mdctSize, mode->mdct.kfft[0]->nfft); + for (j=0;jmdct.kfft[0]->nfft;j++) + fprintf (file, "{" WORD16 ", " WORD16 "},%c", mode->mdct.kfft[0]->twiddles[j].r, mode->mdct.kfft[0]->twiddles[j].i,(j+3)%2==0?'\n':' '); + fprintf (file, "};\n"); + +#ifdef OVERRIDE_FFT + dump_mode_arch(mode); +#endif + /* FFT Bitrev tables */ + for (k=0;k<=mode->mdct.maxshift;k++) + { + fprintf(file, "#ifndef FFT_BITREV%d\n", mode->mdct.kfft[k]->nfft); + fprintf(file, "#define FFT_BITREV%d\n", mode->mdct.kfft[k]->nfft); + fprintf (file, "static const opus_int16 fft_bitrev%d[%d] = {\n", + mode->mdct.kfft[k]->nfft, mode->mdct.kfft[k]->nfft); + for (j=0;jmdct.kfft[k]->nfft;j++) + fprintf (file, "%d,%c", mode->mdct.kfft[k]->bitrev[j],(j+16)%15==0?'\n':' '); + fprintf (file, "};\n"); + + fprintf(file, "#endif\n"); + fprintf(file, "\n"); + } + + /* FFT States */ + for (k=0;k<=mode->mdct.maxshift;k++) + { + fprintf(file, "#ifndef FFT_STATE%d_%d_%d\n", mode->Fs, mdctSize, k); + fprintf(file, "#define FFT_STATE%d_%d_%d\n", mode->Fs, mdctSize, k); + fprintf (file, "static const kiss_fft_state fft_state%d_%d_%d = {\n", + mode->Fs, mdctSize, k); + fprintf (file, "%d, /* nfft */\n", mode->mdct.kfft[k]->nfft); + fprintf (file, WORD16 ", /* scale */\n", mode->mdct.kfft[k]->scale); +#ifdef FIXED_POINT + fprintf (file, "%d, /* scale_shift */\n", mode->mdct.kfft[k]->scale_shift); +#endif + fprintf (file, "%d, /* shift */\n", mode->mdct.kfft[k]->shift); + fprintf (file, "{"); + for (j=0;j<2*MAXFACTORS;j++) + fprintf (file, "%d, ", mode->mdct.kfft[k]->factors[j]); + fprintf (file, "}, /* factors */\n"); + fprintf (file, "fft_bitrev%d, /* bitrev */\n", mode->mdct.kfft[k]->nfft); + fprintf (file, "fft_twiddles%d_%d, /* bitrev */\n", mode->Fs, mdctSize); + + fprintf (file, "#ifdef OVERRIDE_FFT\n"); + fprintf (file, "(arch_fft_state *)&cfg_arch_%d,\n", mode->mdct.kfft[k]->nfft); + fprintf (file, "#else\n"); + fprintf (file, "NULL,\n"); + fprintf(file, "#endif\n"); + + fprintf (file, "};\n"); + + fprintf(file, "#endif\n"); + fprintf(file, "\n"); + } + + fprintf(file, "#endif\n"); + fprintf(file, "\n"); + + /* MDCT twiddles */ + mdct_twiddles_size = mode->mdct.n-(mode->mdct.n/2>>mode->mdct.maxshift); + fprintf(file, "#ifndef MDCT_TWIDDLES%d\n", mdctSize); + fprintf(file, "#define MDCT_TWIDDLES%d\n", mdctSize); + fprintf (file, "static const opus_val16 mdct_twiddles%d[%d] = {\n", + mdctSize, mdct_twiddles_size); + for (j=0;jmdct.trig[j],(j+6)%5==0?'\n':' '); + fprintf (file, "};\n"); + + fprintf(file, "#endif\n"); + fprintf(file, "\n"); + + + /* Print the actual mode data */ + fprintf(file, "static const CELTMode mode%d_%d_%d = {\n", mode->Fs, mdctSize, mode->overlap); + fprintf(file, INT32 ", /* Fs */\n", mode->Fs); + fprintf(file, "%d, /* overlap */\n", mode->overlap); + fprintf(file, "%d, /* nbEBands */\n", mode->nbEBands); + fprintf(file, "%d, /* effEBands */\n", mode->effEBands); + fprintf(file, "{"); + for (j=0;j<4;j++) + fprintf(file, WORD16 ", ", mode->preemph[j]); + fprintf(file, "}, /* preemph */\n"); + if (standard) + fprintf(file, "eband5ms, /* eBands */\n"); + else + fprintf(file, "eBands%d_%d, /* eBands */\n", mode->Fs, mdctSize); + + fprintf(file, "%d, /* maxLM */\n", mode->maxLM); + fprintf(file, "%d, /* nbShortMdcts */\n", mode->nbShortMdcts); + fprintf(file, "%d, /* shortMdctSize */\n", mode->shortMdctSize); + + fprintf(file, "%d, /* nbAllocVectors */\n", mode->nbAllocVectors); + if (standard) + fprintf(file, "band_allocation, /* allocVectors */\n"); + else + fprintf(file, "allocVectors%d_%d, /* allocVectors */\n", mode->Fs, mdctSize); + + fprintf(file, "logN%d, /* logN */\n", framerate); + fprintf(file, "window%d, /* window */\n", mode->overlap); + fprintf(file, "{%d, %d, {", mode->mdct.n, mode->mdct.maxshift); + for (k=0;k<=mode->mdct.maxshift;k++) + fprintf(file, "&fft_state%d_%d_%d, ", mode->Fs, mdctSize, k); + fprintf (file, "}, mdct_twiddles%d}, /* mdct */\n", mdctSize); + + fprintf(file, "{%d, cache_index%d, cache_bits%d, cache_caps%d}, /* cache */\n", + mode->cache.size, mode->Fs/mdctSize, mode->Fs/mdctSize, mode->Fs/mdctSize); + fprintf(file, "};\n"); + } + fprintf(file, "\n"); + fprintf(file, "/* List of all the available modes */\n"); + fprintf(file, "#define TOTAL_MODES %d\n", nb_modes); + fprintf(file, "static const CELTMode * const static_mode_list[TOTAL_MODES] = {\n"); + for (i=0;ishortMdctSize*mode->nbShortMdcts; + fprintf(file, "&mode%d_%d_%d,\n", mode->Fs, mdctSize, mode->overlap); + } + fprintf(file, "};\n"); +} + +void dump_header(FILE *file, CELTMode **modes, int nb_modes) +{ + int i; + int channels = 0; + int frame_size = 0; + int overlap = 0; + fprintf (file, "/* This header file is generated automatically*/\n"); + for (i=0;ishortMdctSize*mode->nbShortMdcts; + else if (frame_size != mode->shortMdctSize*mode->nbShortMdcts) + frame_size = -1; + if (overlap==0) + overlap = mode->overlap; + else if (overlap != mode->overlap) + overlap = -1; + } + if (channels>0) + { + fprintf (file, "#define CHANNELS(mode) %d\n", channels); + if (channels==1) + fprintf (file, "#define DISABLE_STEREO\n"); + } + if (frame_size>0) + { + fprintf (file, "#define FRAMESIZE(mode) %d\n", frame_size); + } + if (overlap>0) + { + fprintf (file, "#define OVERLAP(mode) %d\n", overlap); + } +} + +#ifdef FIXED_POINT +#define BASENAME "static_modes_fixed" +#else +#define BASENAME "static_modes_float" +#endif + +int main(int argc, char **argv) +{ + int i, nb; + FILE *file; + CELTMode **m; + if (argc%2 != 1 || argc<3) + { + fprintf (stderr, "Usage: %s rate frame_size [rate frame_size] [rate frame_size]...\n",argv[0]); + return 1; + } + nb = (argc-1)/2; + m = malloc(nb*sizeof(CELTMode*)); + for (i=0;i +#include +#include "modes.h" +#include "dump_modes_arch.h" +#include + +#if !defined(FIXED_POINT) +# define NE10_FFT_CFG_TYPE_T ne10_fft_cfg_float32_t +# define NE10_FFT_CPX_TYPE_T_STR "ne10_fft_cpx_float32_t" +# define NE10_FFT_STATE_TYPE_T_STR "ne10_fft_state_float32_t" +#else +# define NE10_FFT_CFG_TYPE_T ne10_fft_cfg_int32_t +# define NE10_FFT_CPX_TYPE_T_STR "ne10_fft_cpx_int32_t" +# define NE10_FFT_STATE_TYPE_T_STR "ne10_fft_state_int32_t" +#endif + +static FILE *file; + +void dump_modes_arch_init(CELTMode **modes, int nb_modes) +{ + int i; + + file = fopen(ARM_NE10_ARCH_FILE_NAME, "w"); + fprintf(file, "/* The contents of this file was automatically generated by\n"); + fprintf(file, " * dump_mode_arm_ne10.c with arguments:"); + for (i=0;iFs,mode->shortMdctSize*mode->nbShortMdcts); + } + fprintf(file, "\n * It contains static definitions for some pre-defined modes. */\n"); + fprintf(file, "#include \n\n"); +} + +void dump_modes_arch_finalize() +{ + fclose(file); +} + +void dump_mode_arch(CELTMode *mode) +{ + int k, j; + int mdctSize; + + mdctSize = mode->shortMdctSize*mode->nbShortMdcts; + + fprintf(file, "#ifndef NE10_FFT_PARAMS%d_%d\n", mode->Fs, mdctSize); + fprintf(file, "#define NE10_FFT_PARAMS%d_%d\n", mode->Fs, mdctSize); + /* cfg->factors */ + for(k=0;k<=mode->mdct.maxshift;k++) { + NE10_FFT_CFG_TYPE_T cfg; + cfg = (NE10_FFT_CFG_TYPE_T)mode->mdct.kfft[k]->arch_fft->priv; + if (!cfg) + continue; + fprintf(file, "static const ne10_int32_t ne10_factors_%d[%d] = {\n", + mode->mdct.kfft[k]->nfft, (NE10_MAXFACTORS * 2)); + for(j=0;j<(NE10_MAXFACTORS * 2);j++) { + fprintf(file, "%d,%c", cfg->factors[j],(j+16)%15==0?'\n':' '); + } + fprintf (file, "};\n"); + } + + /* cfg->twiddles */ + for(k=0;k<=mode->mdct.maxshift;k++) { + NE10_FFT_CFG_TYPE_T cfg; + cfg = (NE10_FFT_CFG_TYPE_T)mode->mdct.kfft[k]->arch_fft->priv; + if (!cfg) + continue; + fprintf(file, "static const %s ne10_twiddles_%d[%d] = {\n", + NE10_FFT_CPX_TYPE_T_STR, mode->mdct.kfft[k]->nfft, + mode->mdct.kfft[k]->nfft); + for(j=0;jmdct.kfft[k]->nfft;j++) { +#if !defined(FIXED_POINT) + fprintf(file, "{%#0.8gf,%#0.8gf},%c", + cfg->twiddles[j].r, cfg->twiddles[j].i,(j+4)%3==0?'\n':' '); +#else + fprintf(file, "{%d,%d},%c", + cfg->twiddles[j].r, cfg->twiddles[j].i,(j+4)%3==0?'\n':' '); +#endif + } + fprintf (file, "};\n"); + } + + for(k=0;k<=mode->mdct.maxshift;k++) { + NE10_FFT_CFG_TYPE_T cfg; + cfg = (NE10_FFT_CFG_TYPE_T)mode->mdct.kfft[k]->arch_fft->priv; + if (!cfg) { + fprintf(file, "/* Ne10 does not support scaled FFT for length = %d */\n", + mode->mdct.kfft[k]->nfft); + fprintf(file, "static const arch_fft_state cfg_arch_%d = {\n", mode->mdct.kfft[k]->nfft); + fprintf(file, "0,\n"); + fprintf(file, "NULL\n"); + fprintf(file, "};\n"); + continue; + } + fprintf(file, "static const %s %s_%d = {\n", NE10_FFT_STATE_TYPE_T_STR, + NE10_FFT_STATE_TYPE_T_STR, mode->mdct.kfft[k]->nfft); + fprintf(file, "%d,\n", cfg->nfft); + fprintf(file, "(ne10_int32_t *)ne10_factors_%d,\n", mode->mdct.kfft[k]->nfft); + fprintf(file, "(%s *)ne10_twiddles_%d,\n", + NE10_FFT_CPX_TYPE_T_STR, mode->mdct.kfft[k]->nfft); + fprintf(file, "NULL,\n"); /* buffer */ + fprintf(file, "(%s *)&ne10_twiddles_%d[%d],\n", + NE10_FFT_CPX_TYPE_T_STR, mode->mdct.kfft[k]->nfft, cfg->nfft); +#if !defined(FIXED_POINT) + fprintf(file, "/* is_forward_scaled = true */\n"); + fprintf(file, "(ne10_int32_t) 1,\n"); + fprintf(file, "/* is_backward_scaled = false */\n"); + fprintf(file, "(ne10_int32_t) 0,\n"); +#endif + fprintf(file, "};\n"); + + fprintf(file, "static const arch_fft_state cfg_arch_%d = {\n", + mode->mdct.kfft[k]->nfft); + fprintf(file, "1,\n"); + fprintf(file, "(void *)&%s_%d,\n", + NE10_FFT_STATE_TYPE_T_STR, mode->mdct.kfft[k]->nfft); + fprintf(file, "};\n\n"); + } + fprintf(file, "#endif /* end NE10_FFT_PARAMS%d_%d */\n", mode->Fs, mdctSize); +} diff --git a/asm/libs/opus/celt/ecintrin.h b/asm/libs/opus/celt/ecintrin.h new file mode 100644 index 00000000..2263cff6 --- /dev/null +++ b/asm/libs/opus/celt/ecintrin.h @@ -0,0 +1,87 @@ +/* Copyright (c) 2003-2008 Timothy B. Terriberry + Copyright (c) 2008 Xiph.Org Foundation */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*Some common macros for potential platform-specific optimization.*/ +#include "opus_types.h" +#include +#include +#include "arch.h" +#if !defined(_ecintrin_H) +# define _ecintrin_H (1) + +/*Some specific platforms may have optimized intrinsic or OPUS_INLINE assembly + versions of these functions which can substantially improve performance. + We define macros for them to allow easy incorporation of these non-ANSI + features.*/ + +/*Modern gcc (4.x) can compile the naive versions of min and max with cmov if + given an appropriate architecture, but the branchless bit-twiddling versions + are just as fast, and do not require any special target architecture. + Earlier gcc versions (3.x) compiled both code to the same assembly + instructions, because of the way they represented ((_b)>(_a)) internally.*/ +# define EC_MINI(_a,_b) ((_a)+(((_b)-(_a))&-((_b)<(_a)))) + +/*Count leading zeros. + This macro should only be used for implementing ec_ilog(), if it is defined. + All other code should use EC_ILOG() instead.*/ +#if defined(_MSC_VER) && (_MSC_VER >= 1400) +# include +/*In _DEBUG mode this is not an intrinsic by default.*/ +# pragma intrinsic(_BitScanReverse) + +static __inline int ec_bsr(unsigned long _x){ + unsigned long ret; + _BitScanReverse(&ret,_x); + return (int)ret; +} +# define EC_CLZ0 (1) +# define EC_CLZ(_x) (-ec_bsr(_x)) +#elif defined(ENABLE_TI_DSPLIB) +# include "dsplib.h" +# define EC_CLZ0 (31) +# define EC_CLZ(_x) (_lnorm(_x)) +#elif __GNUC_PREREQ(3,4) +# if INT_MAX>=2147483647 +# define EC_CLZ0 ((int)sizeof(unsigned)*CHAR_BIT) +# define EC_CLZ(_x) (__builtin_clz(_x)) +# elif LONG_MAX>=2147483647L +# define EC_CLZ0 ((int)sizeof(unsigned long)*CHAR_BIT) +# define EC_CLZ(_x) (__builtin_clzl(_x)) +# endif +#endif + +#if defined(EC_CLZ) +/*Note that __builtin_clz is not defined when _x==0, according to the gcc + documentation (and that of the BSR instruction that implements it on x86). + The majority of the time we can never pass it zero. + When we need to, it can be special cased.*/ +# define EC_ILOG(_x) (EC_CLZ0-EC_CLZ(_x)) +#else +int ec_ilog(opus_uint32 _v); +# define EC_ILOG(_x) (ec_ilog(_x)) +#endif +#endif diff --git a/asm/libs/opus/celt/entcode.c b/asm/libs/opus/celt/entcode.c new file mode 100644 index 00000000..70f32016 --- /dev/null +++ b/asm/libs/opus/celt/entcode.c @@ -0,0 +1,153 @@ +/* Copyright (c) 2001-2011 Timothy B. Terriberry +*/ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "entcode.h" +#include "arch.h" + +#if !defined(EC_CLZ) +/*This is a fallback for systems where we don't know how to access + a BSR or CLZ instruction (see ecintrin.h). + If you are optimizing Opus on a new platform and it has a native CLZ or + BZR (e.g. cell, MIPS, x86, etc) then making it available to Opus will be + an easy performance win.*/ +int ec_ilog(opus_uint32 _v){ + /*On a Pentium M, this branchless version tested as the fastest on + 1,000,000,000 random 32-bit integers, edging out a similar version with + branches, and a 256-entry LUT version.*/ + int ret; + int m; + ret=!!_v; + m=!!(_v&0xFFFF0000)<<4; + _v>>=m; + ret|=m; + m=!!(_v&0xFF00)<<3; + _v>>=m; + ret|=m; + m=!!(_v&0xF0)<<2; + _v>>=m; + ret|=m; + m=!!(_v&0xC)<<1; + _v>>=m; + ret|=m; + ret+=!!(_v&0x2); + return ret; +} +#endif + +#if 1 +/* This is a faster version of ec_tell_frac() that takes advantage + of the low (1/8 bit) resolution to use just a linear function + followed by a lookup to determine the exact transition thresholds. */ +opus_uint32 ec_tell_frac(ec_ctx *_this){ + static const unsigned correction[8] = + {35733, 38967, 42495, 46340, + 50535, 55109, 60097, 65535}; + opus_uint32 nbits; + opus_uint32 r; + int l; + unsigned b; + nbits=_this->nbits_total<rng); + r=_this->rng>>(l-16); + b = (r>>12)-8; + b += r>correction[b]; + l = (l<<3)+b; + return nbits-l; +} +#else +opus_uint32 ec_tell_frac(ec_ctx *_this){ + opus_uint32 nbits; + opus_uint32 r; + int l; + int i; + /*To handle the non-integral number of bits still left in the encoder/decoder + state, we compute the worst-case number of bits of val that must be + encoded to ensure that the value is inside the range for any possible + subsequent bits. + The computation here is independent of val itself (the decoder does not + even track that value), even though the real number of bits used after + ec_enc_done() may be 1 smaller if rng is a power of two and the + corresponding trailing bits of val are all zeros. + If we did try to track that special case, then coding a value with a + probability of 1/(1<nbits_total<rng); + r=_this->rng>>(l-16); + for(i=BITRES;i-->0;){ + int b; + r=r*r>>15; + b=(int)(r>>16); + l=l<<1|b; + r>>=b; + } + return nbits-l; +} +#endif + +#ifdef USE_SMALL_DIV_TABLE +/* Result of 2^32/(2*i+1), except for i=0. */ +const opus_uint32 SMALL_DIV_TABLE[129] = { + 0xFFFFFFFF, 0x55555555, 0x33333333, 0x24924924, + 0x1C71C71C, 0x1745D174, 0x13B13B13, 0x11111111, + 0x0F0F0F0F, 0x0D79435E, 0x0C30C30C, 0x0B21642C, + 0x0A3D70A3, 0x097B425E, 0x08D3DCB0, 0x08421084, + 0x07C1F07C, 0x07507507, 0x06EB3E45, 0x06906906, + 0x063E7063, 0x05F417D0, 0x05B05B05, 0x0572620A, + 0x05397829, 0x05050505, 0x04D4873E, 0x04A7904A, + 0x047DC11F, 0x0456C797, 0x04325C53, 0x04104104, + 0x03F03F03, 0x03D22635, 0x03B5CC0E, 0x039B0AD1, + 0x0381C0E0, 0x0369D036, 0x03531DEC, 0x033D91D2, + 0x0329161F, 0x03159721, 0x03030303, 0x02F14990, + 0x02E05C0B, 0x02D02D02, 0x02C0B02C, 0x02B1DA46, + 0x02A3A0FD, 0x0295FAD4, 0x0288DF0C, 0x027C4597, + 0x02702702, 0x02647C69, 0x02593F69, 0x024E6A17, + 0x0243F6F0, 0x0239E0D5, 0x02302302, 0x0226B902, + 0x021D9EAD, 0x0214D021, 0x020C49BA, 0x02040810, + 0x01FC07F0, 0x01F44659, 0x01ECC07B, 0x01E573AC, + 0x01DE5D6E, 0x01D77B65, 0x01D0CB58, 0x01CA4B30, + 0x01C3F8F0, 0x01BDD2B8, 0x01B7D6C3, 0x01B20364, + 0x01AC5701, 0x01A6D01A, 0x01A16D3F, 0x019C2D14, + 0x01970E4F, 0x01920FB4, 0x018D3018, 0x01886E5F, + 0x0183C977, 0x017F405F, 0x017AD220, 0x01767DCE, + 0x01724287, 0x016E1F76, 0x016A13CD, 0x01661EC6, + 0x01623FA7, 0x015E75BB, 0x015AC056, 0x01571ED3, + 0x01539094, 0x01501501, 0x014CAB88, 0x0149539E, + 0x01460CBC, 0x0142D662, 0x013FB013, 0x013C995A, + 0x013991C2, 0x013698DF, 0x0133AE45, 0x0130D190, + 0x012E025C, 0x012B404A, 0x01288B01, 0x0125E227, + 0x01234567, 0x0120B470, 0x011E2EF3, 0x011BB4A4, + 0x01194538, 0x0116E068, 0x011485F0, 0x0112358E, + 0x010FEF01, 0x010DB20A, 0x010B7E6E, 0x010953F3, + 0x01073260, 0x0105197F, 0x0103091B, 0x01010101 +}; +#endif diff --git a/asm/libs/opus/celt/entcode.h b/asm/libs/opus/celt/entcode.h new file mode 100644 index 00000000..13d6c84e --- /dev/null +++ b/asm/libs/opus/celt/entcode.h @@ -0,0 +1,152 @@ +/* Copyright (c) 2001-2011 Timothy B. Terriberry + Copyright (c) 2008-2009 Xiph.Org Foundation */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "opus_types.h" +#include "opus_defines.h" + +#if !defined(_entcode_H) +# define _entcode_H (1) +# include +# include +# include "ecintrin.h" + +extern const opus_uint32 SMALL_DIV_TABLE[129]; + +#ifdef OPUS_ARM_ASM +#define USE_SMALL_DIV_TABLE +#endif + +/*OPT: ec_window must be at least 32 bits, but if you have fast arithmetic on a + larger type, you can speed up the decoder by using it here.*/ +typedef opus_uint32 ec_window; +typedef struct ec_ctx ec_ctx; +typedef struct ec_ctx ec_enc; +typedef struct ec_ctx ec_dec; + +# define EC_WINDOW_SIZE ((int)sizeof(ec_window)*CHAR_BIT) + +/*The number of bits to use for the range-coded part of unsigned integers.*/ +# define EC_UINT_BITS (8) + +/*The resolution of fractional-precision bit usage measurements, i.e., + 3 => 1/8th bits.*/ +# define BITRES 3 + +/*The entropy encoder/decoder context. + We use the same structure for both, so that common functions like ec_tell() + can be used on either one.*/ +struct ec_ctx{ + /*Buffered input/output.*/ + unsigned char *buf; + /*The size of the buffer.*/ + opus_uint32 storage; + /*The offset at which the last byte containing raw bits was read/written.*/ + opus_uint32 end_offs; + /*Bits that will be read from/written at the end.*/ + ec_window end_window; + /*Number of valid bits in end_window.*/ + int nend_bits; + /*The total number of whole bits read/written. + This does not include partial bits currently in the range coder.*/ + int nbits_total; + /*The offset at which the next range coder byte will be read/written.*/ + opus_uint32 offs; + /*The number of values in the current range.*/ + opus_uint32 rng; + /*In the decoder: the difference between the top of the current range and + the input value, minus one. + In the encoder: the low end of the current range.*/ + opus_uint32 val; + /*In the decoder: the saved normalization factor from ec_decode(). + In the encoder: the number of oustanding carry propagating symbols.*/ + opus_uint32 ext; + /*A buffered input/output symbol, awaiting carry propagation.*/ + int rem; + /*Nonzero if an error occurred.*/ + int error; +}; + +static OPUS_INLINE opus_uint32 ec_range_bytes(ec_ctx *_this){ + return _this->offs; +} + +static OPUS_INLINE unsigned char *ec_get_buffer(ec_ctx *_this){ + return _this->buf; +} + +static OPUS_INLINE int ec_get_error(ec_ctx *_this){ + return _this->error; +} + +/*Returns the number of bits "used" by the encoded or decoded symbols so far. + This same number can be computed in either the encoder or the decoder, and is + suitable for making coding decisions. + Return: The number of bits. + This will always be slightly larger than the exact value (e.g., all + rounding error is in the positive direction).*/ +static OPUS_INLINE int ec_tell(ec_ctx *_this){ + return _this->nbits_total-EC_ILOG(_this->rng); +} + +/*Returns the number of bits "used" by the encoded or decoded symbols so far. + This same number can be computed in either the encoder or the decoder, and is + suitable for making coding decisions. + Return: The number of bits scaled by 2**BITRES. + This will always be slightly larger than the exact value (e.g., all + rounding error is in the positive direction).*/ +opus_uint32 ec_tell_frac(ec_ctx *_this); + +/* Tested exhaustively for all n and for 1<=d<=256 */ +static OPUS_INLINE opus_uint32 celt_udiv(opus_uint32 n, opus_uint32 d) { + celt_assert(d>0); +#ifdef USE_SMALL_DIV_TABLE + if (d>256) + return n/d; + else { + opus_uint32 t, q; + t = EC_ILOG(d&-d); + q = (opus_uint64)SMALL_DIV_TABLE[d>>t]*(n>>(t-1))>>32; + return q+(n-q*d >= d); + } +#else + return n/d; +#endif +} + +static OPUS_INLINE opus_int32 celt_sudiv(opus_int32 n, opus_int32 d) { + celt_assert(d>0); +#ifdef USE_SMALL_DIV_TABLE + if (n<0) + return -(opus_int32)celt_udiv(-n, d); + else + return celt_udiv(n, d); +#else + return n/d; +#endif +} + +#endif diff --git a/asm/libs/opus/celt/entdec.c b/asm/libs/opus/celt/entdec.c new file mode 100644 index 00000000..0b3433ed --- /dev/null +++ b/asm/libs/opus/celt/entdec.c @@ -0,0 +1,245 @@ +/* Copyright (c) 2001-2011 Timothy B. Terriberry + Copyright (c) 2008-2009 Xiph.Org Foundation */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "os_support.h" +#include "arch.h" +#include "entdec.h" +#include "mfrngcod.h" + +/*A range decoder. + This is an entropy decoder based upon \cite{Mar79}, which is itself a + rediscovery of the FIFO arithmetic code introduced by \cite{Pas76}. + It is very similar to arithmetic encoding, except that encoding is done with + digits in any base, instead of with bits, and so it is faster when using + larger bases (i.e.: a byte). + The author claims an average waste of $\frac{1}{2}\log_b(2b)$ bits, where $b$ + is the base, longer than the theoretical optimum, but to my knowledge there + is no published justification for this claim. + This only seems true when using near-infinite precision arithmetic so that + the process is carried out with no rounding errors. + + An excellent description of implementation details is available at + http://www.arturocampos.com/ac_range.html + A recent work \cite{MNW98} which proposes several changes to arithmetic + encoding for efficiency actually re-discovers many of the principles + behind range encoding, and presents a good theoretical analysis of them. + + End of stream is handled by writing out the smallest number of bits that + ensures that the stream will be correctly decoded regardless of the value of + any subsequent bits. + ec_tell() can be used to determine how many bits were needed to decode + all the symbols thus far; other data can be packed in the remaining bits of + the input buffer. + @PHDTHESIS{Pas76, + author="Richard Clark Pasco", + title="Source coding algorithms for fast data compression", + school="Dept. of Electrical Engineering, Stanford University", + address="Stanford, CA", + month=May, + year=1976 + } + @INPROCEEDINGS{Mar79, + author="Martin, G.N.N.", + title="Range encoding: an algorithm for removing redundancy from a digitised + message", + booktitle="Video & Data Recording Conference", + year=1979, + address="Southampton", + month=Jul + } + @ARTICLE{MNW98, + author="Alistair Moffat and Radford Neal and Ian H. Witten", + title="Arithmetic Coding Revisited", + journal="{ACM} Transactions on Information Systems", + year=1998, + volume=16, + number=3, + pages="256--294", + month=Jul, + URL="http://www.stanford.edu/class/ee398a/handouts/papers/Moffat98ArithmCoding.pdf" + }*/ + +static int ec_read_byte(ec_dec *_this){ + return _this->offs<_this->storage?_this->buf[_this->offs++]:0; +} + +static int ec_read_byte_from_end(ec_dec *_this){ + return _this->end_offs<_this->storage? + _this->buf[_this->storage-++(_this->end_offs)]:0; +} + +/*Normalizes the contents of val and rng so that rng lies entirely in the + high-order symbol.*/ +static void ec_dec_normalize(ec_dec *_this){ + /*If the range is too small, rescale it and input some bits.*/ + while(_this->rng<=EC_CODE_BOT){ + int sym; + _this->nbits_total+=EC_SYM_BITS; + _this->rng<<=EC_SYM_BITS; + /*Use up the remaining bits from our last symbol.*/ + sym=_this->rem; + /*Read the next value from the input.*/ + _this->rem=ec_read_byte(_this); + /*Take the rest of the bits we need from this new symbol.*/ + sym=(sym<rem)>>(EC_SYM_BITS-EC_CODE_EXTRA); + /*And subtract them from val, capped to be less than EC_CODE_TOP.*/ + _this->val=((_this->val<buf=_buf; + _this->storage=_storage; + _this->end_offs=0; + _this->end_window=0; + _this->nend_bits=0; + /*This is the offset from which ec_tell() will subtract partial bits. + The final value after the ec_dec_normalize() call will be the same as in + the encoder, but we have to compensate for the bits that are added there.*/ + _this->nbits_total=EC_CODE_BITS+1 + -((EC_CODE_BITS-EC_CODE_EXTRA)/EC_SYM_BITS)*EC_SYM_BITS; + _this->offs=0; + _this->rng=1U<rem=ec_read_byte(_this); + _this->val=_this->rng-1-(_this->rem>>(EC_SYM_BITS-EC_CODE_EXTRA)); + _this->error=0; + /*Normalize the interval.*/ + ec_dec_normalize(_this); +} + +unsigned ec_decode(ec_dec *_this,unsigned _ft){ + unsigned s; + _this->ext=celt_udiv(_this->rng,_ft); + s=(unsigned)(_this->val/_this->ext); + return _ft-EC_MINI(s+1,_ft); +} + +unsigned ec_decode_bin(ec_dec *_this,unsigned _bits){ + unsigned s; + _this->ext=_this->rng>>_bits; + s=(unsigned)(_this->val/_this->ext); + return (1U<<_bits)-EC_MINI(s+1U,1U<<_bits); +} + +void ec_dec_update(ec_dec *_this,unsigned _fl,unsigned _fh,unsigned _ft){ + opus_uint32 s; + s=IMUL32(_this->ext,_ft-_fh); + _this->val-=s; + _this->rng=_fl>0?IMUL32(_this->ext,_fh-_fl):_this->rng-s; + ec_dec_normalize(_this); +} + +/*The probability of having a "one" is 1/(1<<_logp).*/ +int ec_dec_bit_logp(ec_dec *_this,unsigned _logp){ + opus_uint32 r; + opus_uint32 d; + opus_uint32 s; + int ret; + r=_this->rng; + d=_this->val; + s=r>>_logp; + ret=dval=d-s; + _this->rng=ret?s:r-s; + ec_dec_normalize(_this); + return ret; +} + +int ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb){ + opus_uint32 r; + opus_uint32 d; + opus_uint32 s; + opus_uint32 t; + int ret; + s=_this->rng; + d=_this->val; + r=s>>_ftb; + ret=-1; + do{ + t=s; + s=IMUL32(r,_icdf[++ret]); + } + while(dval=d-s; + _this->rng=t-s; + ec_dec_normalize(_this); + return ret; +} + +opus_uint32 ec_dec_uint(ec_dec *_this,opus_uint32 _ft){ + unsigned ft; + unsigned s; + int ftb; + /*In order to optimize EC_ILOG(), it is undefined for the value 0.*/ + celt_assert(_ft>1); + _ft--; + ftb=EC_ILOG(_ft); + if(ftb>EC_UINT_BITS){ + opus_uint32 t; + ftb-=EC_UINT_BITS; + ft=(unsigned)(_ft>>ftb)+1; + s=ec_decode(_this,ft); + ec_dec_update(_this,s,s+1,ft); + t=(opus_uint32)s<error=1; + return _ft; + } + else{ + _ft++; + s=ec_decode(_this,(unsigned)_ft); + ec_dec_update(_this,s,s+1,(unsigned)_ft); + return s; + } +} + +opus_uint32 ec_dec_bits(ec_dec *_this,unsigned _bits){ + ec_window window; + int available; + opus_uint32 ret; + window=_this->end_window; + available=_this->nend_bits; + if((unsigned)available<_bits){ + do{ + window|=(ec_window)ec_read_byte_from_end(_this)<>=_bits; + available-=_bits; + _this->end_window=window; + _this->nend_bits=available; + _this->nbits_total+=_bits; + return ret; +} diff --git a/asm/libs/opus/celt/entdec.h b/asm/libs/opus/celt/entdec.h new file mode 100644 index 00000000..d8ab3187 --- /dev/null +++ b/asm/libs/opus/celt/entdec.h @@ -0,0 +1,100 @@ +/* Copyright (c) 2001-2011 Timothy B. Terriberry + Copyright (c) 2008-2009 Xiph.Org Foundation */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#if !defined(_entdec_H) +# define _entdec_H (1) +# include +# include "entcode.h" + +/*Initializes the decoder. + _buf: The input buffer to use. + Return: 0 on success, or a negative value on error.*/ +void ec_dec_init(ec_dec *_this,unsigned char *_buf,opus_uint32 _storage); + +/*Calculates the cumulative frequency for the next symbol. + This can then be fed into the probability model to determine what that + symbol is, and the additional frequency information required to advance to + the next symbol. + This function cannot be called more than once without a corresponding call to + ec_dec_update(), or decoding will not proceed correctly. + _ft: The total frequency of the symbols in the alphabet the next symbol was + encoded with. + Return: A cumulative frequency representing the encoded symbol. + If the cumulative frequency of all the symbols before the one that + was encoded was fl, and the cumulative frequency of all the symbols + up to and including the one encoded is fh, then the returned value + will fall in the range [fl,fh).*/ +unsigned ec_decode(ec_dec *_this,unsigned _ft); + +/*Equivalent to ec_decode() with _ft==1<<_bits.*/ +unsigned ec_decode_bin(ec_dec *_this,unsigned _bits); + +/*Advance the decoder past the next symbol using the frequency information the + symbol was encoded with. + Exactly one call to ec_decode() must have been made so that all necessary + intermediate calculations are performed. + _fl: The cumulative frequency of all symbols that come before the symbol + decoded. + _fh: The cumulative frequency of all symbols up to and including the symbol + decoded. + Together with _fl, this defines the range [_fl,_fh) in which the value + returned above must fall. + _ft: The total frequency of the symbols in the alphabet the symbol decoded + was encoded in. + This must be the same as passed to the preceding call to ec_decode().*/ +void ec_dec_update(ec_dec *_this,unsigned _fl,unsigned _fh,unsigned _ft); + +/* Decode a bit that has a 1/(1<<_logp) probability of being a one */ +int ec_dec_bit_logp(ec_dec *_this,unsigned _logp); + +/*Decodes a symbol given an "inverse" CDF table. + No call to ec_dec_update() is necessary after this call. + _icdf: The "inverse" CDF, such that symbol s falls in the range + [s>0?ft-_icdf[s-1]:0,ft-_icdf[s]), where ft=1<<_ftb. + The values must be monotonically non-increasing, and the last value + must be 0. + _ftb: The number of bits of precision in the cumulative distribution. + Return: The decoded symbol s.*/ +int ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb); + +/*Extracts a raw unsigned integer with a non-power-of-2 range from the stream. + The bits must have been encoded with ec_enc_uint(). + No call to ec_dec_update() is necessary after this call. + _ft: The number of integers that can be decoded (one more than the max). + This must be at least one, and no more than 2**32-1. + Return: The decoded bits.*/ +opus_uint32 ec_dec_uint(ec_dec *_this,opus_uint32 _ft); + +/*Extracts a sequence of raw bits from the stream. + The bits must have been encoded with ec_enc_bits(). + No call to ec_dec_update() is necessary after this call. + _ftb: The number of bits to extract. + This must be between 0 and 25, inclusive. + Return: The decoded bits.*/ +opus_uint32 ec_dec_bits(ec_dec *_this,unsigned _ftb); + +#endif diff --git a/asm/libs/opus/celt/entenc.c b/asm/libs/opus/celt/entenc.c new file mode 100644 index 00000000..f1750d25 --- /dev/null +++ b/asm/libs/opus/celt/entenc.c @@ -0,0 +1,294 @@ +/* Copyright (c) 2001-2011 Timothy B. Terriberry + Copyright (c) 2008-2009 Xiph.Org Foundation */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#if defined(HAVE_CONFIG_H) +# include "config.h" +#endif +#include "os_support.h" +#include "arch.h" +#include "entenc.h" +#include "mfrngcod.h" + +/*A range encoder. + See entdec.c and the references for implementation details \cite{Mar79,MNW98}. + + @INPROCEEDINGS{Mar79, + author="Martin, G.N.N.", + title="Range encoding: an algorithm for removing redundancy from a digitised + message", + booktitle="Video \& Data Recording Conference", + year=1979, + address="Southampton", + month=Jul + } + @ARTICLE{MNW98, + author="Alistair Moffat and Radford Neal and Ian H. Witten", + title="Arithmetic Coding Revisited", + journal="{ACM} Transactions on Information Systems", + year=1998, + volume=16, + number=3, + pages="256--294", + month=Jul, + URL="http://www.stanford.edu/class/ee398/handouts/papers/Moffat98ArithmCoding.pdf" + }*/ + +static int ec_write_byte(ec_enc *_this,unsigned _value){ + if(_this->offs+_this->end_offs>=_this->storage)return -1; + _this->buf[_this->offs++]=(unsigned char)_value; + return 0; +} + +static int ec_write_byte_at_end(ec_enc *_this,unsigned _value){ + if(_this->offs+_this->end_offs>=_this->storage)return -1; + _this->buf[_this->storage-++(_this->end_offs)]=(unsigned char)_value; + return 0; +} + +/*Outputs a symbol, with a carry bit. + If there is a potential to propagate a carry over several symbols, they are + buffered until it can be determined whether or not an actual carry will + occur. + If the counter for the buffered symbols overflows, then the stream becomes + undecodable. + This gives a theoretical limit of a few billion symbols in a single packet on + 32-bit systems. + The alternative is to truncate the range in order to force a carry, but + requires similar carry tracking in the decoder, needlessly slowing it down.*/ +static void ec_enc_carry_out(ec_enc *_this,int _c){ + if(_c!=EC_SYM_MAX){ + /*No further carry propagation possible, flush buffer.*/ + int carry; + carry=_c>>EC_SYM_BITS; + /*Don't output a byte on the first write. + This compare should be taken care of by branch-prediction thereafter.*/ + if(_this->rem>=0)_this->error|=ec_write_byte(_this,_this->rem+carry); + if(_this->ext>0){ + unsigned sym; + sym=(EC_SYM_MAX+carry)&EC_SYM_MAX; + do _this->error|=ec_write_byte(_this,sym); + while(--(_this->ext)>0); + } + _this->rem=_c&EC_SYM_MAX; + } + else _this->ext++; +} + +static OPUS_INLINE void ec_enc_normalize(ec_enc *_this){ + /*If the range is too small, output some bits and rescale it.*/ + while(_this->rng<=EC_CODE_BOT){ + ec_enc_carry_out(_this,(int)(_this->val>>EC_CODE_SHIFT)); + /*Move the next-to-high-order symbol into the high-order position.*/ + _this->val=(_this->val<rng<<=EC_SYM_BITS; + _this->nbits_total+=EC_SYM_BITS; + } +} + +void ec_enc_init(ec_enc *_this,unsigned char *_buf,opus_uint32 _size){ + _this->buf=_buf; + _this->end_offs=0; + _this->end_window=0; + _this->nend_bits=0; + /*This is the offset from which ec_tell() will subtract partial bits.*/ + _this->nbits_total=EC_CODE_BITS+1; + _this->offs=0; + _this->rng=EC_CODE_TOP; + _this->rem=-1; + _this->val=0; + _this->ext=0; + _this->storage=_size; + _this->error=0; +} + +void ec_encode(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _ft){ + opus_uint32 r; + r=celt_udiv(_this->rng,_ft); + if(_fl>0){ + _this->val+=_this->rng-IMUL32(r,(_ft-_fl)); + _this->rng=IMUL32(r,(_fh-_fl)); + } + else _this->rng-=IMUL32(r,(_ft-_fh)); + ec_enc_normalize(_this); +} + +void ec_encode_bin(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _bits){ + opus_uint32 r; + r=_this->rng>>_bits; + if(_fl>0){ + _this->val+=_this->rng-IMUL32(r,((1U<<_bits)-_fl)); + _this->rng=IMUL32(r,(_fh-_fl)); + } + else _this->rng-=IMUL32(r,((1U<<_bits)-_fh)); + ec_enc_normalize(_this); +} + +/*The probability of having a "one" is 1/(1<<_logp).*/ +void ec_enc_bit_logp(ec_enc *_this,int _val,unsigned _logp){ + opus_uint32 r; + opus_uint32 s; + opus_uint32 l; + r=_this->rng; + l=_this->val; + s=r>>_logp; + r-=s; + if(_val)_this->val=l+r; + _this->rng=_val?s:r; + ec_enc_normalize(_this); +} + +void ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb){ + opus_uint32 r; + r=_this->rng>>_ftb; + if(_s>0){ + _this->val+=_this->rng-IMUL32(r,_icdf[_s-1]); + _this->rng=IMUL32(r,_icdf[_s-1]-_icdf[_s]); + } + else _this->rng-=IMUL32(r,_icdf[_s]); + ec_enc_normalize(_this); +} + +void ec_enc_uint(ec_enc *_this,opus_uint32 _fl,opus_uint32 _ft){ + unsigned ft; + unsigned fl; + int ftb; + /*In order to optimize EC_ILOG(), it is undefined for the value 0.*/ + celt_assert(_ft>1); + _ft--; + ftb=EC_ILOG(_ft); + if(ftb>EC_UINT_BITS){ + ftb-=EC_UINT_BITS; + ft=(_ft>>ftb)+1; + fl=(unsigned)(_fl>>ftb); + ec_encode(_this,fl,fl+1,ft); + ec_enc_bits(_this,_fl&(((opus_uint32)1<end_window; + used=_this->nend_bits; + celt_assert(_bits>0); + if(used+_bits>EC_WINDOW_SIZE){ + do{ + _this->error|=ec_write_byte_at_end(_this,(unsigned)window&EC_SYM_MAX); + window>>=EC_SYM_BITS; + used-=EC_SYM_BITS; + } + while(used>=EC_SYM_BITS); + } + window|=(ec_window)_fl<end_window=window; + _this->nend_bits=used; + _this->nbits_total+=_bits; +} + +void ec_enc_patch_initial_bits(ec_enc *_this,unsigned _val,unsigned _nbits){ + int shift; + unsigned mask; + celt_assert(_nbits<=EC_SYM_BITS); + shift=EC_SYM_BITS-_nbits; + mask=((1<<_nbits)-1)<offs>0){ + /*The first byte has been finalized.*/ + _this->buf[0]=(unsigned char)((_this->buf[0]&~mask)|_val<rem>=0){ + /*The first byte is still awaiting carry propagation.*/ + _this->rem=(_this->rem&~mask)|_val<rng<=(EC_CODE_TOP>>_nbits)){ + /*The renormalization loop has never been run.*/ + _this->val=(_this->val&~((opus_uint32)mask<error=-1; +} + +void ec_enc_shrink(ec_enc *_this,opus_uint32 _size){ + celt_assert(_this->offs+_this->end_offs<=_size); + OPUS_MOVE(_this->buf+_size-_this->end_offs, + _this->buf+_this->storage-_this->end_offs,_this->end_offs); + _this->storage=_size; +} + +void ec_enc_done(ec_enc *_this){ + ec_window window; + int used; + opus_uint32 msk; + opus_uint32 end; + int l; + /*We output the minimum number of bits that ensures that the symbols encoded + thus far will be decoded correctly regardless of the bits that follow.*/ + l=EC_CODE_BITS-EC_ILOG(_this->rng); + msk=(EC_CODE_TOP-1)>>l; + end=(_this->val+msk)&~msk; + if((end|msk)>=_this->val+_this->rng){ + l++; + msk>>=1; + end=(_this->val+msk)&~msk; + } + while(l>0){ + ec_enc_carry_out(_this,(int)(end>>EC_CODE_SHIFT)); + end=(end<rem>=0||_this->ext>0)ec_enc_carry_out(_this,0); + /*If we have buffered extra bits, flush them as well.*/ + window=_this->end_window; + used=_this->nend_bits; + while(used>=EC_SYM_BITS){ + _this->error|=ec_write_byte_at_end(_this,(unsigned)window&EC_SYM_MAX); + window>>=EC_SYM_BITS; + used-=EC_SYM_BITS; + } + /*Clear any excess space and add any remaining extra bits to the last byte.*/ + if(!_this->error){ + OPUS_CLEAR(_this->buf+_this->offs, + _this->storage-_this->offs-_this->end_offs); + if(used>0){ + /*If there's no range coder data at all, give up.*/ + if(_this->end_offs>=_this->storage)_this->error=-1; + else{ + l=-l; + /*If we've busted, don't add too many extra bits to the last byte; it + would corrupt the range coder data, and that's more important.*/ + if(_this->offs+_this->end_offs>=_this->storage&&lerror=-1; + } + _this->buf[_this->storage-_this->end_offs-1]|=(unsigned char)window; + } + } + } +} diff --git a/asm/libs/opus/celt/entenc.h b/asm/libs/opus/celt/entenc.h new file mode 100644 index 00000000..796bc4d5 --- /dev/null +++ b/asm/libs/opus/celt/entenc.h @@ -0,0 +1,110 @@ +/* Copyright (c) 2001-2011 Timothy B. Terriberry + Copyright (c) 2008-2009 Xiph.Org Foundation */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#if !defined(_entenc_H) +# define _entenc_H (1) +# include +# include "entcode.h" + +/*Initializes the encoder. + _buf: The buffer to store output bytes in. + _size: The size of the buffer, in chars.*/ +void ec_enc_init(ec_enc *_this,unsigned char *_buf,opus_uint32 _size); +/*Encodes a symbol given its frequency information. + The frequency information must be discernable by the decoder, assuming it + has read only the previous symbols from the stream. + It is allowable to change the frequency information, or even the entire + source alphabet, so long as the decoder can tell from the context of the + previously encoded information that it is supposed to do so as well. + _fl: The cumulative frequency of all symbols that come before the one to be + encoded. + _fh: The cumulative frequency of all symbols up to and including the one to + be encoded. + Together with _fl, this defines the range [_fl,_fh) in which the + decoded value will fall. + _ft: The sum of the frequencies of all the symbols*/ +void ec_encode(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _ft); + +/*Equivalent to ec_encode() with _ft==1<<_bits.*/ +void ec_encode_bin(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _bits); + +/* Encode a bit that has a 1/(1<<_logp) probability of being a one */ +void ec_enc_bit_logp(ec_enc *_this,int _val,unsigned _logp); + +/*Encodes a symbol given an "inverse" CDF table. + _s: The index of the symbol to encode. + _icdf: The "inverse" CDF, such that symbol _s falls in the range + [_s>0?ft-_icdf[_s-1]:0,ft-_icdf[_s]), where ft=1<<_ftb. + The values must be monotonically non-increasing, and the last value + must be 0. + _ftb: The number of bits of precision in the cumulative distribution.*/ +void ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb); + +/*Encodes a raw unsigned integer in the stream. + _fl: The integer to encode. + _ft: The number of integers that can be encoded (one more than the max). + This must be at least one, and no more than 2**32-1.*/ +void ec_enc_uint(ec_enc *_this,opus_uint32 _fl,opus_uint32 _ft); + +/*Encodes a sequence of raw bits in the stream. + _fl: The bits to encode. + _ftb: The number of bits to encode. + This must be between 1 and 25, inclusive.*/ +void ec_enc_bits(ec_enc *_this,opus_uint32 _fl,unsigned _ftb); + +/*Overwrites a few bits at the very start of an existing stream, after they + have already been encoded. + This makes it possible to have a few flags up front, where it is easy for + decoders to access them without parsing the whole stream, even if their + values are not determined until late in the encoding process, without having + to buffer all the intermediate symbols in the encoder. + In order for this to work, at least _nbits bits must have already been + encoded using probabilities that are an exact power of two. + The encoder can verify the number of encoded bits is sufficient, but cannot + check this latter condition. + _val: The bits to encode (in the least _nbits significant bits). + They will be decoded in order from most-significant to least. + _nbits: The number of bits to overwrite. + This must be no more than 8.*/ +void ec_enc_patch_initial_bits(ec_enc *_this,unsigned _val,unsigned _nbits); + +/*Compacts the data to fit in the target size. + This moves up the raw bits at the end of the current buffer so they are at + the end of the new buffer size. + The caller must ensure that the amount of data that's already been written + will fit in the new size. + _size: The number of bytes in the new buffer. + This must be large enough to contain the bits already written, and + must be no larger than the existing size.*/ +void ec_enc_shrink(ec_enc *_this,opus_uint32 _size); + +/*Indicates that there are no more symbols to encode. + All reamining output bytes are flushed to the output buffer. + ec_enc_init() must be called before the encoder can be used again.*/ +void ec_enc_done(ec_enc *_this); + +#endif diff --git a/asm/libs/opus/celt/fixed_c5x.h b/asm/libs/opus/celt/fixed_c5x.h new file mode 100644 index 00000000..ea95a998 --- /dev/null +++ b/asm/libs/opus/celt/fixed_c5x.h @@ -0,0 +1,79 @@ +/* Copyright (C) 2003 Jean-Marc Valin */ +/** + @file fixed_c5x.h + @brief Fixed-point operations for the TI C5x DSP family +*/ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef FIXED_C5X_H +#define FIXED_C5X_H + +#include "dsplib.h" + +#undef IMUL32 +static OPUS_INLINE long IMUL32(long i, long j) +{ + long ac0, ac1; + ac0 = _lmpy(i>>16,j); + ac1 = ac0 + _lmpy(i,j>>16); + return _lmpyu(i,j) + (ac1<<16); +} + +#undef MAX16 +#define MAX16(a,b) _max(a,b) + +#undef MIN16 +#define MIN16(a,b) _min(a,b) + +#undef MAX32 +#define MAX32(a,b) _lmax(a,b) + +#undef MIN32 +#define MIN32(a,b) _lmin(a,b) + +#undef VSHR32 +#define VSHR32(a, shift) _lshl(a,-(shift)) + +#undef MULT16_16_Q15 +#define MULT16_16_Q15(a,b) (_smpy(a,b)) + +#undef MULT16_16SU +#define MULT16_16SU(a,b) _lmpysu(a,b) + +#undef MULT_16_16 +#define MULT_16_16(a,b) _lmpy(a,b) + +/* FIXME: This is technically incorrect and is bound to cause problems. Is there any cleaner solution? */ +#undef MULT16_32_Q15 +#define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),(b)),15)) + +#define celt_ilog2(x) (30 - _lnorm(x)) +#define OVERRIDE_CELT_ILOG2 + +#define celt_maxabs16(x, len) MAX32(EXTEND32(maxval((DATA *)x, len)),-EXTEND32(minval((DATA *)x, len))) +#define OVERRIDE_CELT_MAXABS16 + +#endif /* FIXED_C5X_H */ diff --git a/asm/libs/opus/celt/fixed_c6x.h b/asm/libs/opus/celt/fixed_c6x.h new file mode 100644 index 00000000..bb6ad927 --- /dev/null +++ b/asm/libs/opus/celt/fixed_c6x.h @@ -0,0 +1,70 @@ +/* Copyright (C) 2008 CSIRO */ +/** + @file fixed_c6x.h + @brief Fixed-point operations for the TI C6x DSP family +*/ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef FIXED_C6X_H +#define FIXED_C6X_H + +#undef MULT16_16SU +#define MULT16_16SU(a,b) _mpysu(a,b) + +#undef MULT_16_16 +#define MULT_16_16(a,b) _mpy(a,b) + +#define celt_ilog2(x) (30 - _norm(x)) +#define OVERRIDE_CELT_ILOG2 + +#undef MULT16_32_Q15 +#define MULT16_32_Q15(a,b) (_mpylill(a, b) >> 15) + +#if 0 +#include "dsplib.h" + +#undef MAX16 +#define MAX16(a,b) _max(a,b) + +#undef MIN16 +#define MIN16(a,b) _min(a,b) + +#undef MAX32 +#define MAX32(a,b) _lmax(a,b) + +#undef MIN32 +#define MIN32(a,b) _lmin(a,b) + +#undef VSHR32 +#define VSHR32(a, shift) _lshl(a,-(shift)) + +#undef MULT16_16_Q15 +#define MULT16_16_Q15(a,b) (_smpy(a,b)) + +#define celt_maxabs16(x, len) MAX32(EXTEND32(maxval((DATA *)x, len)),-EXTEND32(minval((DATA *)x, len))) +#define OVERRIDE_CELT_MAXABS16 + +#endif /* FIXED_C6X_H */ diff --git a/asm/libs/opus/celt/fixed_debug.h b/asm/libs/opus/celt/fixed_debug.h new file mode 100644 index 00000000..d28227f5 --- /dev/null +++ b/asm/libs/opus/celt/fixed_debug.h @@ -0,0 +1,784 @@ +/* Copyright (C) 2003-2008 Jean-Marc Valin + Copyright (C) 2007-2012 Xiph.Org Foundation */ +/** + @file fixed_debug.h + @brief Fixed-point operations with debugging +*/ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef FIXED_DEBUG_H +#define FIXED_DEBUG_H + +#include +#include "opus_defines.h" + +#ifdef CELT_C +OPUS_EXPORT opus_int64 celt_mips=0; +#else +extern opus_int64 celt_mips; +#endif + +#define MULT16_16SU(a,b) ((opus_val32)(opus_val16)(a)*(opus_val32)(opus_uint16)(b)) +#define MULT32_32_Q31(a,b) ADD32(ADD32(SHL32(MULT16_16(SHR32((a),16),SHR((b),16)),1), SHR32(MULT16_16SU(SHR32((a),16),((b)&0x0000ffff)),15)), SHR32(MULT16_16SU(SHR32((b),16),((a)&0x0000ffff)),15)) + +/** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ +#define MULT16_32_Q16(a,b) ADD32(MULT16_16((a),SHR32((b),16)), SHR32(MULT16_16SU((a),((b)&0x0000ffff)),16)) + +#define MULT16_32_P16(a,b) MULT16_32_PX(a,b,16) + +#define QCONST16(x,bits) ((opus_val16)(.5+(x)*(((opus_val32)1)<<(bits)))) +#define QCONST32(x,bits) ((opus_val32)(.5+(x)*(((opus_val32)1)<<(bits)))) + +#define VERIFY_SHORT(x) ((x)<=32767&&(x)>=-32768) +#define VERIFY_INT(x) ((x)<=2147483647LL&&(x)>=-2147483648LL) +#define VERIFY_UINT(x) ((x)<=(2147483647LLU<<1)) + +#define SHR(a,b) SHR32(a,b) +#define PSHR(a,b) PSHR32(a,b) + +static OPUS_INLINE short NEG16(int x) +{ + int res; + if (!VERIFY_SHORT(x)) + { + fprintf (stderr, "NEG16: input is not short: %d\n", (int)x); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = -x; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "NEG16: output is not short: %d\n", (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips++; + return res; +} +static OPUS_INLINE int NEG32(opus_int64 x) +{ + opus_int64 res; + if (!VERIFY_INT(x)) + { + fprintf (stderr, "NEG16: input is not int: %d\n", (int)x); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = -x; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "NEG16: output is not int: %d\n", (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=2; + return res; +} + +#define EXTRACT16(x) EXTRACT16_(x, __FILE__, __LINE__) +static OPUS_INLINE short EXTRACT16_(int x, char *file, int line) +{ + int res; + if (!VERIFY_SHORT(x)) + { + fprintf (stderr, "EXTRACT16: input is not short: %d in %s: line %d\n", x, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = x; + celt_mips++; + return res; +} + +#define EXTEND32(x) EXTEND32_(x, __FILE__, __LINE__) +static OPUS_INLINE int EXTEND32_(int x, char *file, int line) +{ + int res; + if (!VERIFY_SHORT(x)) + { + fprintf (stderr, "EXTEND32: input is not short: %d in %s: line %d\n", x, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = x; + celt_mips++; + return res; +} + +#define SHR16(a, shift) SHR16_(a, shift, __FILE__, __LINE__) +static OPUS_INLINE short SHR16_(int a, int shift, char *file, int line) +{ + int res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift)) + { + fprintf (stderr, "SHR16: inputs are not short: %d >> %d in %s: line %d\n", a, shift, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = a>>shift; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "SHR16: output is not short: %d in %s: line %d\n", res, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips++; + return res; +} +#define SHL16(a, shift) SHL16_(a, shift, __FILE__, __LINE__) +static OPUS_INLINE short SHL16_(int a, int shift, char *file, int line) +{ + int res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift)) + { + fprintf (stderr, "SHL16: inputs are not short: %d %d in %s: line %d\n", a, shift, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = a<>shift; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "SHR32: output is not int: %d\n", (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=2; + return res; +} +#define SHL32(a, shift) SHL32_(a, shift, __FILE__, __LINE__) +static OPUS_INLINE int SHL32_(opus_int64 a, int shift, char *file, int line) +{ + opus_int64 res; + if (!VERIFY_INT(a) || !VERIFY_SHORT(shift)) + { + fprintf (stderr, "SHL32: inputs are not int: %lld %d in %s: line %d\n", a, shift, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = a<>1))),shift)) +#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift))) + +#define ROUND16(x,a) (celt_mips--,EXTRACT16(PSHR32((x),(a)))) +#define HALF16(x) (SHR16(x,1)) +#define HALF32(x) (SHR32(x,1)) + +//#define SHR(a,shift) ((a) >> (shift)) +//#define SHL(a,shift) ((a) << (shift)) + +#define ADD16(a, b) ADD16_(a, b, __FILE__, __LINE__) +static OPUS_INLINE short ADD16_(int a, int b, char *file, int line) +{ + int res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) + { + fprintf (stderr, "ADD16: inputs are not short: %d %d in %s: line %d\n", a, b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = a+b; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "ADD16: output is not short: %d+%d=%d in %s: line %d\n", a,b,res, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips++; + return res; +} + +#define SUB16(a, b) SUB16_(a, b, __FILE__, __LINE__) +static OPUS_INLINE short SUB16_(int a, int b, char *file, int line) +{ + int res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) + { + fprintf (stderr, "SUB16: inputs are not short: %d %d in %s: line %d\n", a, b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = a-b; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "SUB16: output is not short: %d in %s: line %d\n", res, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips++; + return res; +} + +#define ADD32(a, b) ADD32_(a, b, __FILE__, __LINE__) +static OPUS_INLINE int ADD32_(opus_int64 a, opus_int64 b, char *file, int line) +{ + opus_int64 res; + if (!VERIFY_INT(a) || !VERIFY_INT(b)) + { + fprintf (stderr, "ADD32: inputs are not int: %d %d in %s: line %d\n", (int)a, (int)b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = a+b; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "ADD32: output is not int: %d in %s: line %d\n", (int)res, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=2; + return res; +} + +#define SUB32(a, b) SUB32_(a, b, __FILE__, __LINE__) +static OPUS_INLINE int SUB32_(opus_int64 a, opus_int64 b, char *file, int line) +{ + opus_int64 res; + if (!VERIFY_INT(a) || !VERIFY_INT(b)) + { + fprintf (stderr, "SUB32: inputs are not int: %d %d in %s: line %d\n", (int)a, (int)b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = a-b; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "SUB32: output is not int: %d in %s: line %d\n", (int)res, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=2; + return res; +} + +#undef UADD32 +#define UADD32(a, b) UADD32_(a, b, __FILE__, __LINE__) +static OPUS_INLINE unsigned int UADD32_(opus_uint64 a, opus_uint64 b, char *file, int line) +{ + opus_uint64 res; + if (!VERIFY_UINT(a) || !VERIFY_UINT(b)) + { + fprintf (stderr, "UADD32: inputs are not uint32: %llu %llu in %s: line %d\n", a, b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = a+b; + if (!VERIFY_UINT(res)) + { + fprintf (stderr, "UADD32: output is not uint32: %llu in %s: line %d\n", res, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=2; + return res; +} + +#undef USUB32 +#define USUB32(a, b) USUB32_(a, b, __FILE__, __LINE__) +static OPUS_INLINE unsigned int USUB32_(opus_uint64 a, opus_uint64 b, char *file, int line) +{ + opus_uint64 res; + if (!VERIFY_UINT(a) || !VERIFY_UINT(b)) + { + fprintf (stderr, "USUB32: inputs are not uint32: %llu %llu in %s: line %d\n", a, b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + if (a=((opus_val32)(1)<<(15+Q))) + { + fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d in %s: line %d\n", Q, (int)a, (int)b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = (((opus_int64)a)*(opus_int64)b) >> Q; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "MULT16_32_Q%d: output is not int: %d*%d=%d in %s: line %d\n", Q, (int)a, (int)b,(int)res, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + if (Q==15) + celt_mips+=3; + else + celt_mips+=4; + return res; +} + +#define MULT16_32_PX(a, b, Q) MULT16_32_PX_(a, b, Q, __FILE__, __LINE__) +static OPUS_INLINE int MULT16_32_PX_(int a, opus_int64 b, int Q, char *file, int line) +{ + opus_int64 res; + if (!VERIFY_SHORT(a) || !VERIFY_INT(b)) + { + fprintf (stderr, "MULT16_32_P%d: inputs are not short+int: %d %d in %s: line %d\n\n", Q, (int)a, (int)b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + if (ABS32(b)>=((opus_int64)(1)<<(15+Q))) + { + fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d in %s: line %d\n\n", Q, (int)a, (int)b,file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = ((((opus_int64)a)*(opus_int64)b) + (((opus_val32)(1)<>1))>> Q; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "MULT16_32_P%d: output is not int: %d*%d=%d in %s: line %d\n\n", Q, (int)a, (int)b,(int)res, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + if (Q==15) + celt_mips+=4; + else + celt_mips+=5; + return res; +} + +#define MULT16_32_Q15(a,b) MULT16_32_QX(a,b,15) +#define MAC16_32_Q15(c,a,b) (celt_mips-=2,ADD32((c),MULT16_32_Q15((a),(b)))) +#define MAC16_32_Q16(c,a,b) (celt_mips-=2,ADD32((c),MULT16_32_Q16((a),(b)))) + +static OPUS_INLINE int SATURATE(int a, int b) +{ + if (a>b) + a=b; + if (a<-b) + a = -b; + celt_mips+=3; + return a; +} + +static OPUS_INLINE opus_int16 SATURATE16(opus_int32 a) +{ + celt_mips+=3; + if (a>32767) + return 32767; + else if (a<-32768) + return -32768; + else return a; +} + +static OPUS_INLINE int MULT16_16_Q11_32(int a, int b) +{ + opus_int64 res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) + { + fprintf (stderr, "MULT16_16_Q11: inputs are not short: %d %d\n", a, b); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = ((opus_int64)a)*b; + res >>= 11; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "MULT16_16_Q11: output is not short: %d*%d=%d\n", (int)a, (int)b, (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=3; + return res; +} +static OPUS_INLINE short MULT16_16_Q13(int a, int b) +{ + opus_int64 res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) + { + fprintf (stderr, "MULT16_16_Q13: inputs are not short: %d %d\n", a, b); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = ((opus_int64)a)*b; + res >>= 13; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "MULT16_16_Q13: output is not short: %d*%d=%d\n", a, b, (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=3; + return res; +} +static OPUS_INLINE short MULT16_16_Q14(int a, int b) +{ + opus_int64 res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) + { + fprintf (stderr, "MULT16_16_Q14: inputs are not short: %d %d\n", a, b); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = ((opus_int64)a)*b; + res >>= 14; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "MULT16_16_Q14: output is not short: %d\n", (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=3; + return res; +} + +#define MULT16_16_Q15(a, b) MULT16_16_Q15_(a, b, __FILE__, __LINE__) +static OPUS_INLINE short MULT16_16_Q15_(int a, int b, char *file, int line) +{ + opus_int64 res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) + { + fprintf (stderr, "MULT16_16_Q15: inputs are not short: %d %d in %s: line %d\n", a, b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = ((opus_int64)a)*b; + res >>= 15; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "MULT16_16_Q15: output is not short: %d in %s: line %d\n", (int)res, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=1; + return res; +} + +static OPUS_INLINE short MULT16_16_P13(int a, int b) +{ + opus_int64 res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) + { + fprintf (stderr, "MULT16_16_P13: inputs are not short: %d %d\n", a, b); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = ((opus_int64)a)*b; + res += 4096; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "MULT16_16_P13: overflow: %d*%d=%d\n", a, b, (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res >>= 13; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "MULT16_16_P13: output is not short: %d*%d=%d\n", a, b, (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=4; + return res; +} +static OPUS_INLINE short MULT16_16_P14(int a, int b) +{ + opus_int64 res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) + { + fprintf (stderr, "MULT16_16_P14: inputs are not short: %d %d\n", a, b); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = ((opus_int64)a)*b; + res += 8192; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "MULT16_16_P14: overflow: %d*%d=%d\n", a, b, (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res >>= 14; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "MULT16_16_P14: output is not short: %d*%d=%d\n", a, b, (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=4; + return res; +} +static OPUS_INLINE short MULT16_16_P15(int a, int b) +{ + opus_int64 res; + if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) + { + fprintf (stderr, "MULT16_16_P15: inputs are not short: %d %d\n", a, b); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = ((opus_int64)a)*b; + res += 16384; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "MULT16_16_P15: overflow: %d*%d=%d\n", a, b, (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res >>= 15; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "MULT16_16_P15: output is not short: %d*%d=%d\n", a, b, (int)res); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=2; + return res; +} + +#define DIV32_16(a, b) DIV32_16_(a, b, __FILE__, __LINE__) + +static OPUS_INLINE int DIV32_16_(opus_int64 a, opus_int64 b, char *file, int line) +{ + opus_int64 res; + if (b==0) + { + fprintf(stderr, "DIV32_16: divide by zero: %d/%d in %s: line %d\n", (int)a, (int)b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + return 0; + } + if (!VERIFY_INT(a) || !VERIFY_SHORT(b)) + { + fprintf (stderr, "DIV32_16: inputs are not int/short: %d %d in %s: line %d\n", (int)a, (int)b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = a/b; + if (!VERIFY_SHORT(res)) + { + fprintf (stderr, "DIV32_16: output is not short: %d / %d = %d in %s: line %d\n", (int)a,(int)b,(int)res, file, line); + if (res>32767) + res = 32767; + if (res<-32768) + res = -32768; +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=35; + return res; +} + +#define DIV32(a, b) DIV32_(a, b, __FILE__, __LINE__) +static OPUS_INLINE int DIV32_(opus_int64 a, opus_int64 b, char *file, int line) +{ + opus_int64 res; + if (b==0) + { + fprintf(stderr, "DIV32: divide by zero: %d/%d in %s: line %d\n", (int)a, (int)b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + return 0; + } + + if (!VERIFY_INT(a) || !VERIFY_INT(b)) + { + fprintf (stderr, "DIV32: inputs are not int/short: %d %d in %s: line %d\n", (int)a, (int)b, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + res = a/b; + if (!VERIFY_INT(res)) + { + fprintf (stderr, "DIV32: output is not int: %d in %s: line %d\n", (int)res, file, line); +#ifdef FIXED_DEBUG_ASSERT + celt_assert(0); +#endif + } + celt_mips+=70; + return res; +} + +static OPUS_INLINE opus_val16 SIG2WORD16_generic(celt_sig x) +{ + x = PSHR32(x, SIG_SHIFT); + x = MAX32(x, -32768); + x = MIN32(x, 32767); + return EXTRACT16(x); +} +#define SIG2WORD16(x) (SIG2WORD16_generic(x)) + + +#undef PRINT_MIPS +#define PRINT_MIPS(file) do {fprintf (file, "total complexity = %llu MIPS\n", celt_mips);} while (0); + +#endif diff --git a/asm/libs/opus/celt/fixed_generic.h b/asm/libs/opus/celt/fixed_generic.h new file mode 100644 index 00000000..ac67d37c --- /dev/null +++ b/asm/libs/opus/celt/fixed_generic.h @@ -0,0 +1,151 @@ +/* Copyright (C) 2007-2009 Xiph.Org Foundation + Copyright (C) 2003-2008 Jean-Marc Valin + Copyright (C) 2007-2008 CSIRO */ +/** + @file fixed_generic.h + @brief Generic fixed-point operations +*/ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef FIXED_GENERIC_H +#define FIXED_GENERIC_H + +/** Multiply a 16-bit signed value by a 16-bit unsigned value. The result is a 32-bit signed value */ +#define MULT16_16SU(a,b) ((opus_val32)(opus_val16)(a)*(opus_val32)(opus_uint16)(b)) + +/** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ +#define MULT16_32_Q16(a,b) ADD32(MULT16_16((a),SHR((b),16)), SHR(MULT16_16SU((a),((b)&0x0000ffff)),16)) + +/** 16x32 multiplication, followed by a 16-bit shift right (round-to-nearest). Results fits in 32 bits */ +#define MULT16_32_P16(a,b) ADD32(MULT16_16((a),SHR((b),16)), PSHR(MULT16_16SU((a),((b)&0x0000ffff)),16)) + +/** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */ +#define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000ffff)),15)) + +/** 32x32 multiplication, followed by a 31-bit shift right. Results fits in 32 bits */ +#define MULT32_32_Q31(a,b) ADD32(ADD32(SHL(MULT16_16(SHR((a),16),SHR((b),16)),1), SHR(MULT16_16SU(SHR((a),16),((b)&0x0000ffff)),15)), SHR(MULT16_16SU(SHR((b),16),((a)&0x0000ffff)),15)) + +/** Compile-time conversion of float constant to 16-bit value */ +#define QCONST16(x,bits) ((opus_val16)(.5+(x)*(((opus_val32)1)<<(bits)))) + +/** Compile-time conversion of float constant to 32-bit value */ +#define QCONST32(x,bits) ((opus_val32)(.5+(x)*(((opus_val32)1)<<(bits)))) + +/** Negate a 16-bit value */ +#define NEG16(x) (-(x)) +/** Negate a 32-bit value */ +#define NEG32(x) (-(x)) + +/** Change a 32-bit value into a 16-bit value. The value is assumed to fit in 16-bit, otherwise the result is undefined */ +#define EXTRACT16(x) ((opus_val16)(x)) +/** Change a 16-bit value into a 32-bit value */ +#define EXTEND32(x) ((opus_val32)(x)) + +/** Arithmetic shift-right of a 16-bit value */ +#define SHR16(a,shift) ((a) >> (shift)) +/** Arithmetic shift-left of a 16-bit value */ +#define SHL16(a,shift) ((opus_int16)((opus_uint16)(a)<<(shift))) +/** Arithmetic shift-right of a 32-bit value */ +#define SHR32(a,shift) ((a) >> (shift)) +/** Arithmetic shift-left of a 32-bit value */ +#define SHL32(a,shift) ((opus_int32)((opus_uint32)(a)<<(shift))) + +/** 32-bit arithmetic shift right with rounding-to-nearest instead of rounding down */ +#define PSHR32(a,shift) (SHR32((a)+((EXTEND32(1)<<((shift))>>1)),shift)) +/** 32-bit arithmetic shift right where the argument can be negative */ +#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift))) + +/** "RAW" macros, should not be used outside of this header file */ +#define SHR(a,shift) ((a) >> (shift)) +#define SHL(a,shift) SHL32(a,shift) +#define PSHR(a,shift) (SHR((a)+((EXTEND32(1)<<((shift))>>1)),shift)) +#define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x))) + +#define SATURATE16(x) (EXTRACT16((x)>32767 ? 32767 : (x)<-32768 ? -32768 : (x))) + +/** Shift by a and round-to-neareast 32-bit value. Result is a 16-bit value */ +#define ROUND16(x,a) (EXTRACT16(PSHR32((x),(a)))) +/** Divide by two */ +#define HALF16(x) (SHR16(x,1)) +#define HALF32(x) (SHR32(x,1)) + +/** Add two 16-bit values */ +#define ADD16(a,b) ((opus_val16)((opus_val16)(a)+(opus_val16)(b))) +/** Subtract two 16-bit values */ +#define SUB16(a,b) ((opus_val16)(a)-(opus_val16)(b)) +/** Add two 32-bit values */ +#define ADD32(a,b) ((opus_val32)(a)+(opus_val32)(b)) +/** Subtract two 32-bit values */ +#define SUB32(a,b) ((opus_val32)(a)-(opus_val32)(b)) + +/** 16x16 multiplication where the result fits in 16 bits */ +#define MULT16_16_16(a,b) ((((opus_val16)(a))*((opus_val16)(b)))) + +/* (opus_val32)(opus_val16) gives TI compiler a hint that it's 16x16->32 multiply */ +/** 16x16 multiplication where the result fits in 32 bits */ +#define MULT16_16(a,b) (((opus_val32)(opus_val16)(a))*((opus_val32)(opus_val16)(b))) + +/** 16x16 multiply-add where the result fits in 32 bits */ +#define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b)))) +/** 16x32 multiply, followed by a 15-bit shift right and 32-bit add. + b must fit in 31 bits. + Result fits in 32 bits. */ +#define MAC16_32_Q15(c,a,b) ADD32((c),ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15))) + +/** 16x32 multiplication, followed by a 16-bit shift right and 32-bit add. + Results fits in 32 bits */ +#define MAC16_32_Q16(c,a,b) ADD32((c),ADD32(MULT16_16((a),SHR((b),16)), SHR(MULT16_16SU((a),((b)&0x0000ffff)),16))) + +#define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11)) +#define MULT16_16_Q11(a,b) (SHR(MULT16_16((a),(b)),11)) +#define MULT16_16_Q13(a,b) (SHR(MULT16_16((a),(b)),13)) +#define MULT16_16_Q14(a,b) (SHR(MULT16_16((a),(b)),14)) +#define MULT16_16_Q15(a,b) (SHR(MULT16_16((a),(b)),15)) + +#define MULT16_16_P13(a,b) (SHR(ADD32(4096,MULT16_16((a),(b))),13)) +#define MULT16_16_P14(a,b) (SHR(ADD32(8192,MULT16_16((a),(b))),14)) +#define MULT16_16_P15(a,b) (SHR(ADD32(16384,MULT16_16((a),(b))),15)) + +/** Divide a 32-bit value by a 16-bit value. Result fits in 16 bits */ +#define DIV32_16(a,b) ((opus_val16)(((opus_val32)(a))/((opus_val16)(b)))) + +/** Divide a 32-bit value by a 32-bit value. Result fits in 32 bits */ +#define DIV32(a,b) (((opus_val32)(a))/((opus_val32)(b))) + +#if defined(MIPSr1_ASM) +#include "mips/fixed_generic_mipsr1.h" +#endif + +static OPUS_INLINE opus_val16 SIG2WORD16_generic(celt_sig x) +{ + x = PSHR32(x, SIG_SHIFT); + x = MAX32(x, -32768); + x = MIN32(x, 32767); + return EXTRACT16(x); +} +#define SIG2WORD16(x) (SIG2WORD16_generic(x)) + +#endif diff --git a/asm/libs/opus/celt/float_cast.h b/asm/libs/opus/celt/float_cast.h new file mode 100644 index 00000000..ed5a39b5 --- /dev/null +++ b/asm/libs/opus/celt/float_cast.h @@ -0,0 +1,140 @@ +/* Copyright (C) 2001 Erik de Castro Lopo */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* Version 1.1 */ + +#ifndef FLOAT_CAST_H +#define FLOAT_CAST_H + + +#include "arch.h" + +/*============================================================================ +** On Intel Pentium processors (especially PIII and probably P4), converting +** from float to int is very slow. To meet the C specs, the code produced by +** most C compilers targeting Pentium needs to change the FPU rounding mode +** before the float to int conversion is performed. +** +** Changing the FPU rounding mode causes the FPU pipeline to be flushed. It +** is this flushing of the pipeline which is so slow. +** +** Fortunately the ISO C99 specifications define the functions lrint, lrintf, +** llrint and llrintf which fix this problem as a side effect. +** +** On Unix-like systems, the configure process should have detected the +** presence of these functions. If they weren't found we have to replace them +** here with a standard C cast. +*/ + +/* +** The C99 prototypes for lrint and lrintf are as follows: +** +** long int lrintf (float x) ; +** long int lrint (double x) ; +*/ + +/* The presence of the required functions are detected during the configure +** process and the values HAVE_LRINT and HAVE_LRINTF are set accordingly in +** the config.h file. +*/ + +#if (HAVE_LRINTF) + +/* These defines enable functionality introduced with the 1999 ISO C +** standard. They must be defined before the inclusion of math.h to +** engage them. If optimisation is enabled, these functions will be +** inlined. With optimisation switched off, you have to link in the +** maths library using -lm. +*/ + +#define _ISOC9X_SOURCE 1 +#define _ISOC99_SOURCE 1 + +#define __USE_ISOC9X 1 +#define __USE_ISOC99 1 + +#include +#define float2int(x) lrintf(x) + +#elif (defined(HAVE_LRINT)) + +#define _ISOC9X_SOURCE 1 +#define _ISOC99_SOURCE 1 + +#define __USE_ISOC9X 1 +#define __USE_ISOC99 1 + +#include +#define float2int(x) lrint(x) + +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && defined (_M_X64) + #include + + __inline long int float2int(float value) + { + return _mm_cvtss_si32(_mm_load_ss(&value)); + } +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && defined (_M_IX86) + #include + + /* Win32 doesn't seem to have these functions. + ** Therefore implement OPUS_INLINE versions of these functions here. + */ + + __inline long int + float2int (float flt) + { int intgr; + + _asm + { fld flt + fistp intgr + } ; + + return intgr ; + } + +#else + +#if (defined(__GNUC__) && defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) + /* supported by gcc in C99 mode, but not by all other compilers */ + #warning "Don't have the functions lrint() and lrintf ()." + #warning "Replacing these functions with a standard C cast." +#endif /* __STDC_VERSION__ >= 199901L */ + #include + #define float2int(flt) ((int)(floor(.5+flt))) +#endif + +#ifndef DISABLE_FLOAT_API +static OPUS_INLINE opus_int16 FLOAT2INT16(float x) +{ + x = x*CELT_SIG_SCALE; + x = MAX32(x, -32768); + x = MIN32(x, 32767); + return (opus_int16)float2int(x); +} +#endif /* DISABLE_FLOAT_API */ + +#endif /* FLOAT_CAST_H */ diff --git a/asm/libs/opus/celt/kiss_fft.c b/asm/libs/opus/celt/kiss_fft.c new file mode 100644 index 00000000..4ed37d2b --- /dev/null +++ b/asm/libs/opus/celt/kiss_fft.c @@ -0,0 +1,604 @@ +/*Copyright (c) 2003-2004, Mark Borgerding + Lots of modifications by Jean-Marc Valin + Copyright (c) 2005-2007, Xiph.Org Foundation + Copyright (c) 2008, Xiph.Org Foundation, CSIRO + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE.*/ + +/* This code is originally from Mark Borgerding's KISS-FFT but has been + heavily modified to better suit Opus */ + +#ifndef SKIP_CONFIG_H +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif +#endif + +#include "_kiss_fft_guts.h" +#include "arch.h" +#include "os_support.h" +#include "mathops.h" +#include "stack_alloc.h" + +/* The guts header contains all the multiplication and addition macros that are defined for + complex numbers. It also delares the kf_ internal functions. +*/ + +static void kf_bfly2( + kiss_fft_cpx * Fout, + int m, + int N + ) +{ + kiss_fft_cpx * Fout2; + int i; + (void)m; +#ifdef CUSTOM_MODES + if (m==1) + { + celt_assert(m==1); + for (i=0;itwiddles; + /* m is guaranteed to be a multiple of 4. */ + for (j=0;jtwiddles[fstride*m]; +#endif + for (i=0;itwiddles; + /* For non-custom modes, m is guaranteed to be a multiple of 4. */ + k=m; + do { + + C_MUL(scratch[1],Fout[m] , *tw1); + C_MUL(scratch[2],Fout[m2] , *tw2); + + C_ADD(scratch[3],scratch[1],scratch[2]); + C_SUB(scratch[0],scratch[1],scratch[2]); + tw1 += fstride; + tw2 += fstride*2; + + Fout[m].r = Fout->r - HALF_OF(scratch[3].r); + Fout[m].i = Fout->i - HALF_OF(scratch[3].i); + + C_MULBYSCALAR( scratch[0] , epi3.i ); + + C_ADDTO(*Fout,scratch[3]); + + Fout[m2].r = Fout[m].r + scratch[0].i; + Fout[m2].i = Fout[m].i - scratch[0].r; + + Fout[m].r -= scratch[0].i; + Fout[m].i += scratch[0].r; + + ++Fout; + } while(--k); + } +} + + +#ifndef OVERRIDE_kf_bfly5 +static void kf_bfly5( + kiss_fft_cpx * Fout, + const size_t fstride, + const kiss_fft_state *st, + int m, + int N, + int mm + ) +{ + kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4; + int i, u; + kiss_fft_cpx scratch[13]; + const kiss_twiddle_cpx *tw; + kiss_twiddle_cpx ya,yb; + kiss_fft_cpx * Fout_beg = Fout; + +#ifdef FIXED_POINT + ya.r = 10126; + ya.i = -31164; + yb.r = -26510; + yb.i = -19261; +#else + ya = st->twiddles[fstride*m]; + yb = st->twiddles[fstride*2*m]; +#endif + tw=st->twiddles; + + for (i=0;ir += scratch[7].r + scratch[8].r; + Fout0->i += scratch[7].i + scratch[8].i; + + scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r); + scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r); + + scratch[6].r = S_MUL(scratch[10].i,ya.i) + S_MUL(scratch[9].i,yb.i); + scratch[6].i = -S_MUL(scratch[10].r,ya.i) - S_MUL(scratch[9].r,yb.i); + + C_SUB(*Fout1,scratch[5],scratch[6]); + C_ADD(*Fout4,scratch[5],scratch[6]); + + scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r); + scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r); + scratch[12].r = - S_MUL(scratch[10].i,yb.i) + S_MUL(scratch[9].i,ya.i); + scratch[12].i = S_MUL(scratch[10].r,yb.i) - S_MUL(scratch[9].r,ya.i); + + C_ADD(*Fout2,scratch[11],scratch[12]); + C_SUB(*Fout3,scratch[11],scratch[12]); + + ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4; + } + } +} +#endif /* OVERRIDE_kf_bfly5 */ + + +#endif + + +#ifdef CUSTOM_MODES + +static +void compute_bitrev_table( + int Fout, + opus_int16 *f, + const size_t fstride, + int in_stride, + opus_int16 * factors, + const kiss_fft_state *st + ) +{ + const int p=*factors++; /* the radix */ + const int m=*factors++; /* stage's fft length/p */ + + /*printf ("fft %d %d %d %d %d %d\n", p*m, m, p, s2, fstride*in_stride, N);*/ + if (m==1) + { + int j; + for (j=0;j32000 || (opus_int32)p*(opus_int32)p > n) + p = n; /* no more factors, skip to end */ + } + n /= p; +#ifdef RADIX_TWO_ONLY + if (p!=2 && p != 4) +#else + if (p>5) +#endif + { + return 0; + } + facbuf[2*stages] = p; + if (p==2 && stages > 1) + { + facbuf[2*stages] = 4; + facbuf[2] = 2; + } + stages++; + } while (n > 1); + n = nbak; + /* Reverse the order to get the radix 4 at the end, so we can use the + fast degenerate case. It turns out that reversing the order also + improves the noise behaviour. */ + for (i=0;i= memneeded) + st = (kiss_fft_state*)mem; + *lenmem = memneeded; + } + if (st) { + opus_int16 *bitrev; + kiss_twiddle_cpx *twiddles; + + st->nfft=nfft; +#ifdef FIXED_POINT + st->scale_shift = celt_ilog2(st->nfft); + if (st->nfft == 1<scale_shift) + st->scale = Q15ONE; + else + st->scale = (1073741824+st->nfft/2)/st->nfft>>(15-st->scale_shift); +#else + st->scale = 1.f/nfft; +#endif + if (base != NULL) + { + st->twiddles = base->twiddles; + st->shift = 0; + while (st->shift < 32 && nfft<shift != base->nfft) + st->shift++; + if (st->shift>=32) + goto fail; + } else { + st->twiddles = twiddles = (kiss_twiddle_cpx*)KISS_FFT_MALLOC(sizeof(kiss_twiddle_cpx)*nfft); + compute_twiddles(twiddles, nfft); + st->shift = -1; + } + if (!kf_factor(nfft,st->factors)) + { + goto fail; + } + + /* bitrev */ + st->bitrev = bitrev = (opus_int16*)KISS_FFT_MALLOC(sizeof(opus_int16)*nfft); + if (st->bitrev==NULL) + goto fail; + compute_bitrev_table(0, bitrev, 1,1, st->factors,st); + + /* Initialize architecture specific fft parameters */ + if (opus_fft_alloc_arch(st, arch)) + goto fail; + } + return st; +fail: + opus_fft_free(st, arch); + return NULL; +} + +kiss_fft_state *opus_fft_alloc(int nfft,void * mem,size_t * lenmem, int arch) +{ + return opus_fft_alloc_twiddles(nfft, mem, lenmem, NULL, arch); +} + +void opus_fft_free_arch_c(kiss_fft_state *st) { + (void)st; +} + +void opus_fft_free(const kiss_fft_state *cfg, int arch) +{ + if (cfg) + { + opus_fft_free_arch((kiss_fft_state *)cfg, arch); + opus_free((opus_int16*)cfg->bitrev); + if (cfg->shift < 0) + opus_free((kiss_twiddle_cpx*)cfg->twiddles); + opus_free((kiss_fft_state*)cfg); + } +} + +#endif /* CUSTOM_MODES */ + +void opus_fft_impl(const kiss_fft_state *st,kiss_fft_cpx *fout) +{ + int m2, m; + int p; + int L; + int fstride[MAXFACTORS]; + int i; + int shift; + + /* st->shift can be -1 */ + shift = st->shift>0 ? st->shift : 0; + + fstride[0] = 1; + L=0; + do { + p = st->factors[2*L]; + m = st->factors[2*L+1]; + fstride[L+1] = fstride[L]*p; + L++; + } while(m!=1); + m = st->factors[2*L-1]; + for (i=L-1;i>=0;i--) + { + if (i!=0) + m2 = st->factors[2*i-1]; + else + m2 = 1; + switch (st->factors[2*i]) + { + case 2: + kf_bfly2(fout, m, fstride[i]); + break; + case 4: + kf_bfly4(fout,fstride[i]<scale_shift-1; +#endif + scale = st->scale; + + celt_assert2 (fin != fout, "In-place FFT not supported"); + /* Bit-reverse the input */ + for (i=0;infft;i++) + { + kiss_fft_cpx x = fin[i]; + fout[st->bitrev[i]].r = SHR32(MULT16_32_Q16(scale, x.r), scale_shift); + fout[st->bitrev[i]].i = SHR32(MULT16_32_Q16(scale, x.i), scale_shift); + } + opus_fft_impl(st, fout); +} + + +void opus_ifft_c(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout) +{ + int i; + celt_assert2 (fin != fout, "In-place FFT not supported"); + /* Bit-reverse the input */ + for (i=0;infft;i++) + fout[st->bitrev[i]] = fin[i]; + for (i=0;infft;i++) + fout[i].i = -fout[i].i; + opus_fft_impl(st, fout); + for (i=0;infft;i++) + fout[i].i = -fout[i].i; +} diff --git a/asm/libs/opus/celt/kiss_fft.h b/asm/libs/opus/celt/kiss_fft.h new file mode 100644 index 00000000..bffa2bfa --- /dev/null +++ b/asm/libs/opus/celt/kiss_fft.h @@ -0,0 +1,200 @@ +/*Copyright (c) 2003-2004, Mark Borgerding + Lots of modifications by Jean-Marc Valin + Copyright (c) 2005-2007, Xiph.Org Foundation + Copyright (c) 2008, Xiph.Org Foundation, CSIRO + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE.*/ + +#ifndef KISS_FFT_H +#define KISS_FFT_H + +#include +#include +#include "arch.h" +#include "cpu_support.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef USE_SIMD +# include +# define kiss_fft_scalar __m128 +#define KISS_FFT_MALLOC(nbytes) memalign(16,nbytes) +#else +#define KISS_FFT_MALLOC opus_alloc +#endif + +#ifdef FIXED_POINT +#include "arch.h" + +# define kiss_fft_scalar opus_int32 +# define kiss_twiddle_scalar opus_int16 + + +#else +# ifndef kiss_fft_scalar +/* default is float */ +# define kiss_fft_scalar float +# define kiss_twiddle_scalar float +# define KF_SUFFIX _celt_single +# endif +#endif + +typedef struct { + kiss_fft_scalar r; + kiss_fft_scalar i; +}kiss_fft_cpx; + +typedef struct { + kiss_twiddle_scalar r; + kiss_twiddle_scalar i; +}kiss_twiddle_cpx; + +#define MAXFACTORS 8 +/* e.g. an fft of length 128 has 4 factors + as far as kissfft is concerned + 4*4*4*2 + */ + +typedef struct arch_fft_state{ + int is_supported; + void *priv; +} arch_fft_state; + +typedef struct kiss_fft_state{ + int nfft; + opus_val16 scale; +#ifdef FIXED_POINT + int scale_shift; +#endif + int shift; + opus_int16 factors[2*MAXFACTORS]; + const opus_int16 *bitrev; + const kiss_twiddle_cpx *twiddles; + arch_fft_state *arch_fft; +} kiss_fft_state; + +#if defined(HAVE_ARM_NE10) +#include "arm/fft_arm.h" +#endif + +/*typedef struct kiss_fft_state* kiss_fft_cfg;*/ + +/** + * opus_fft_alloc + * + * Initialize a FFT (or IFFT) algorithm's cfg/state buffer. + * + * typical usage: kiss_fft_cfg mycfg=opus_fft_alloc(1024,0,NULL,NULL); + * + * The return value from fft_alloc is a cfg buffer used internally + * by the fft routine or NULL. + * + * If lenmem is NULL, then opus_fft_alloc will allocate a cfg buffer using malloc. + * The returned value should be free()d when done to avoid memory leaks. + * + * The state can be placed in a user supplied buffer 'mem': + * If lenmem is not NULL and mem is not NULL and *lenmem is large enough, + * then the function places the cfg in mem and the size used in *lenmem + * and returns mem. + * + * If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough), + * then the function returns NULL and places the minimum cfg + * buffer size in *lenmem. + * */ + +kiss_fft_state *opus_fft_alloc_twiddles(int nfft,void * mem,size_t * lenmem, const kiss_fft_state *base, int arch); + +kiss_fft_state *opus_fft_alloc(int nfft,void * mem,size_t * lenmem, int arch); + +/** + * opus_fft(cfg,in_out_buf) + * + * Perform an FFT on a complex input buffer. + * for a forward FFT, + * fin should be f[0] , f[1] , ... ,f[nfft-1] + * fout will be F[0] , F[1] , ... ,F[nfft-1] + * Note that each element is complex and can be accessed like + f[k].r and f[k].i + * */ +void opus_fft_c(const kiss_fft_state *cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout); +void opus_ifft_c(const kiss_fft_state *cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout); + +void opus_fft_impl(const kiss_fft_state *st,kiss_fft_cpx *fout); +void opus_ifft_impl(const kiss_fft_state *st,kiss_fft_cpx *fout); + +void opus_fft_free(const kiss_fft_state *cfg, int arch); + + +void opus_fft_free_arch_c(kiss_fft_state *st); +int opus_fft_alloc_arch_c(kiss_fft_state *st); + +#if !defined(OVERRIDE_OPUS_FFT) +/* Is run-time CPU detection enabled on this platform? */ +#if defined(OPUS_HAVE_RTCD) && (defined(HAVE_ARM_NE10)) + +extern int (*const OPUS_FFT_ALLOC_ARCH_IMPL[OPUS_ARCHMASK+1])( + kiss_fft_state *st); + +#define opus_fft_alloc_arch(_st, arch) \ + ((*OPUS_FFT_ALLOC_ARCH_IMPL[(arch)&OPUS_ARCHMASK])(_st)) + +extern void (*const OPUS_FFT_FREE_ARCH_IMPL[OPUS_ARCHMASK+1])( + kiss_fft_state *st); +#define opus_fft_free_arch(_st, arch) \ + ((*OPUS_FFT_FREE_ARCH_IMPL[(arch)&OPUS_ARCHMASK])(_st)) + +extern void (*const OPUS_FFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, + const kiss_fft_cpx *fin, kiss_fft_cpx *fout); +#define opus_fft(_cfg, _fin, _fout, arch) \ + ((*OPUS_FFT[(arch)&OPUS_ARCHMASK])(_cfg, _fin, _fout)) + +extern void (*const OPUS_IFFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, + const kiss_fft_cpx *fin, kiss_fft_cpx *fout); +#define opus_ifft(_cfg, _fin, _fout, arch) \ + ((*OPUS_IFFT[(arch)&OPUS_ARCHMASK])(_cfg, _fin, _fout)) + +#else /* else for if defined(OPUS_HAVE_RTCD) && (defined(HAVE_ARM_NE10)) */ + +#define opus_fft_alloc_arch(_st, arch) \ + ((void)(arch), opus_fft_alloc_arch_c(_st)) + +#define opus_fft_free_arch(_st, arch) \ + ((void)(arch), opus_fft_free_arch_c(_st)) + +#define opus_fft(_cfg, _fin, _fout, arch) \ + ((void)(arch), opus_fft_c(_cfg, _fin, _fout)) + +#define opus_ifft(_cfg, _fin, _fout, arch) \ + ((void)(arch), opus_ifft_c(_cfg, _fin, _fout)) + +#endif /* end if defined(OPUS_HAVE_RTCD) && (defined(HAVE_ARM_NE10)) */ +#endif /* end if !defined(OVERRIDE_OPUS_FFT) */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/asm/libs/opus/celt/laplace.c b/asm/libs/opus/celt/laplace.c new file mode 100644 index 00000000..a7bca874 --- /dev/null +++ b/asm/libs/opus/celt/laplace.c @@ -0,0 +1,134 @@ +/* Copyright (c) 2007 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "laplace.h" +#include "mathops.h" + +/* The minimum probability of an energy delta (out of 32768). */ +#define LAPLACE_LOG_MINP (0) +#define LAPLACE_MINP (1<>15; +} + +void ec_laplace_encode(ec_enc *enc, int *value, unsigned fs, int decay) +{ + unsigned fl; + int val = *value; + fl = 0; + if (val) + { + int s; + int i; + s = -(val<0); + val = (val+s)^s; + fl = fs; + fs = ec_laplace_get_freq1(fs, decay); + /* Search the decaying part of the PDF.*/ + for (i=1; fs > 0 && i < val; i++) + { + fs *= 2; + fl += fs+2*LAPLACE_MINP; + fs = (fs*(opus_int32)decay)>>15; + } + /* Everything beyond that has probability LAPLACE_MINP. */ + if (!fs) + { + int di; + int ndi_max; + ndi_max = (32768-fl+LAPLACE_MINP-1)>>LAPLACE_LOG_MINP; + ndi_max = (ndi_max-s)>>1; + di = IMIN(val - i, ndi_max - 1); + fl += (2*di+1+s)*LAPLACE_MINP; + fs = IMIN(LAPLACE_MINP, 32768-fl); + *value = (i+di+s)^s; + } + else + { + fs += LAPLACE_MINP; + fl += fs&~s; + } + celt_assert(fl+fs<=32768); + celt_assert(fs>0); + } + ec_encode_bin(enc, fl, fl+fs, 15); +} + +int ec_laplace_decode(ec_dec *dec, unsigned fs, int decay) +{ + int val=0; + unsigned fl; + unsigned fm; + fm = ec_decode_bin(dec, 15); + fl = 0; + if (fm >= fs) + { + val++; + fl = fs; + fs = ec_laplace_get_freq1(fs, decay)+LAPLACE_MINP; + /* Search the decaying part of the PDF.*/ + while(fs > LAPLACE_MINP && fm >= fl+2*fs) + { + fs *= 2; + fl += fs; + fs = ((fs-2*LAPLACE_MINP)*(opus_int32)decay)>>15; + fs += LAPLACE_MINP; + val++; + } + /* Everything beyond that has probability LAPLACE_MINP. */ + if (fs <= LAPLACE_MINP) + { + int di; + di = (fm-fl)>>(LAPLACE_LOG_MINP+1); + val += di; + fl += 2*di*LAPLACE_MINP; + } + if (fm < fl+fs) + val = -val; + else + fl += fs; + } + celt_assert(fl<32768); + celt_assert(fs>0); + celt_assert(fl<=fm); + celt_assert(fm>1; + b=1U<>=1; + bshift--; + } + while(bshift>=0); + return g; +} + +#ifdef FIXED_POINT + +opus_val32 frac_div32(opus_val32 a, opus_val32 b) +{ + opus_val16 rcp; + opus_val32 result, rem; + int shift = celt_ilog2(b)-29; + a = VSHR32(a,shift); + b = VSHR32(b,shift); + /* 16-bit reciprocal */ + rcp = ROUND16(celt_rcp(ROUND16(b,16)),3); + result = MULT16_32_Q15(rcp, a); + rem = PSHR32(a,2)-MULT32_32_Q31(result, b); + result = ADD32(result, SHL32(MULT16_32_Q15(rcp, rem),2)); + if (result >= 536870912) /* 2^29 */ + return 2147483647; /* 2^31 - 1 */ + else if (result <= -536870912) /* -2^29 */ + return -2147483647; /* -2^31 */ + else + return SHL32(result, 2); +} + +/** Reciprocal sqrt approximation in the range [0.25,1) (Q16 in, Q14 out) */ +opus_val16 celt_rsqrt_norm(opus_val32 x) +{ + opus_val16 n; + opus_val16 r; + opus_val16 r2; + opus_val16 y; + /* Range of n is [-16384,32767] ([-0.5,1) in Q15). */ + n = x-32768; + /* Get a rough initial guess for the root. + The optimal minimax quadratic approximation (using relative error) is + r = 1.437799046117536+n*(-0.823394375837328+n*0.4096419668459485). + Coefficients here, and the final result r, are Q14.*/ + r = ADD16(23557, MULT16_16_Q15(n, ADD16(-13490, MULT16_16_Q15(n, 6713)))); + /* We want y = x*r*r-1 in Q15, but x is 32-bit Q16 and r is Q14. + We can compute the result from n and r using Q15 multiplies with some + adjustment, carefully done to avoid overflow. + Range of y is [-1564,1594]. */ + r2 = MULT16_16_Q15(r, r); + y = SHL16(SUB16(ADD16(MULT16_16_Q15(r2, n), r2), 16384), 1); + /* Apply a 2nd-order Householder iteration: r += r*y*(y*0.375-0.5). + This yields the Q14 reciprocal square root of the Q16 x, with a maximum + relative error of 1.04956E-4, a (relative) RMSE of 2.80979E-5, and a + peak absolute error of 2.26591/16384. */ + return ADD16(r, MULT16_16_Q15(r, MULT16_16_Q15(y, + SUB16(MULT16_16_Q15(y, 12288), 16384)))); +} + +/** Sqrt approximation (QX input, QX/2 output) */ +opus_val32 celt_sqrt(opus_val32 x) +{ + int k; + opus_val16 n; + opus_val32 rt; + static const opus_val16 C[5] = {23175, 11561, -3011, 1699, -664}; + if (x==0) + return 0; + else if (x>=1073741824) + return 32767; + k = (celt_ilog2(x)>>1)-7; + x = VSHR32(x, 2*k); + n = x-32768; + rt = ADD16(C[0], MULT16_16_Q15(n, ADD16(C[1], MULT16_16_Q15(n, ADD16(C[2], + MULT16_16_Q15(n, ADD16(C[3], MULT16_16_Q15(n, (C[4]))))))))); + rt = VSHR32(rt,7-k); + return rt; +} + +#define L1 32767 +#define L2 -7651 +#define L3 8277 +#define L4 -626 + +static OPUS_INLINE opus_val16 _celt_cos_pi_2(opus_val16 x) +{ + opus_val16 x2; + + x2 = MULT16_16_P15(x,x); + return ADD16(1,MIN16(32766,ADD32(SUB16(L1,x2), MULT16_16_P15(x2, ADD32(L2, MULT16_16_P15(x2, ADD32(L3, MULT16_16_P15(L4, x2 + )))))))); +} + +#undef L1 +#undef L2 +#undef L3 +#undef L4 + +opus_val16 celt_cos_norm(opus_val32 x) +{ + x = x&0x0001ffff; + if (x>SHL32(EXTEND32(1), 16)) + x = SUB32(SHL32(EXTEND32(1), 17),x); + if (x&0x00007fff) + { + if (x0, "celt_rcp() only defined for positive values"); + i = celt_ilog2(x); + /* n is Q15 with range [0,1). */ + n = VSHR32(x,i-15)-32768; + /* Start with a linear approximation: + r = 1.8823529411764706-0.9411764705882353*n. + The coefficients and the result are Q14 in the range [15420,30840].*/ + r = ADD16(30840, MULT16_16_Q15(-15420, n)); + /* Perform two Newton iterations: + r -= r*((r*n)-1.Q15) + = r*((r*n)+(r-1.Q15)). */ + r = SUB16(r, MULT16_16_Q15(r, + ADD16(MULT16_16_Q15(r, n), ADD16(r, -32768)))); + /* We subtract an extra 1 in the second iteration to avoid overflow; it also + neatly compensates for truncation error in the rest of the process. */ + r = SUB16(r, ADD16(1, MULT16_16_Q15(r, + ADD16(MULT16_16_Q15(r, n), ADD16(r, -32768))))); + /* r is now the Q15 solution to 2/(n+1), with a maximum relative error + of 7.05346E-5, a (relative) RMSE of 2.14418E-5, and a peak absolute + error of 1.24665/32768. */ + return VSHR32(EXTEND32(r),i-16); +} + +#endif diff --git a/asm/libs/opus/celt/mathops.h b/asm/libs/opus/celt/mathops.h new file mode 100644 index 00000000..a0525a96 --- /dev/null +++ b/asm/libs/opus/celt/mathops.h @@ -0,0 +1,258 @@ +/* Copyright (c) 2002-2008 Jean-Marc Valin + Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/** + @file mathops.h + @brief Various math functions +*/ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef MATHOPS_H +#define MATHOPS_H + +#include "arch.h" +#include "entcode.h" +#include "os_support.h" + +/* Multiplies two 16-bit fractional values. Bit-exactness of this macro is important */ +#define FRAC_MUL16(a,b) ((16384+((opus_int32)(opus_int16)(a)*(opus_int16)(b)))>>15) + +unsigned isqrt32(opus_uint32 _val); + +#ifndef OVERRIDE_CELT_MAXABS16 +static OPUS_INLINE opus_val32 celt_maxabs16(const opus_val16 *x, int len) +{ + int i; + opus_val16 maxval = 0; + opus_val16 minval = 0; + for (i=0;i>23)-127; + in.i -= integer<<23; + frac = in.f - 1.5f; + frac = -0.41445418f + frac*(0.95909232f + + frac*(-0.33951290f + frac*0.16541097f)); + return 1+integer+frac; +} + +/** Base-2 exponential approximation (2^x). */ +static OPUS_INLINE float celt_exp2(float x) +{ + int integer; + float frac; + union { + float f; + opus_uint32 i; + } res; + integer = floor(x); + if (integer < -50) + return 0; + frac = x-integer; + /* K0 = 1, K1 = log(2), K2 = 3-4*log(2), K3 = 3*log(2) - 2 */ + res.f = 0.99992522f + frac * (0.69583354f + + frac * (0.22606716f + 0.078024523f*frac)); + res.i = (res.i + (integer<<23)) & 0x7fffffff; + return res.f; +} + +#else +#define celt_log2(x) ((float)(1.442695040888963387*log(x))) +#define celt_exp2(x) ((float)exp(0.6931471805599453094*(x))) +#endif + +#endif + +#ifdef FIXED_POINT + +#include "os_support.h" + +#ifndef OVERRIDE_CELT_ILOG2 +/** Integer log in base2. Undefined for zero and negative numbers */ +static OPUS_INLINE opus_int16 celt_ilog2(opus_int32 x) +{ + celt_assert2(x>0, "celt_ilog2() only defined for strictly positive numbers"); + return EC_ILOG(x)-1; +} +#endif + + +/** Integer log in base2. Defined for zero, but not for negative numbers */ +static OPUS_INLINE opus_int16 celt_zlog2(opus_val32 x) +{ + return x <= 0 ? 0 : celt_ilog2(x); +} + +opus_val16 celt_rsqrt_norm(opus_val32 x); + +opus_val32 celt_sqrt(opus_val32 x); + +opus_val16 celt_cos_norm(opus_val32 x); + +/** Base-2 logarithm approximation (log2(x)). (Q14 input, Q10 output) */ +static OPUS_INLINE opus_val16 celt_log2(opus_val32 x) +{ + int i; + opus_val16 n, frac; + /* -0.41509302963303146, 0.9609890551383969, -0.31836011537636605, + 0.15530808010959576, -0.08556153059057618 */ + static const opus_val16 C[5] = {-6801+(1<<(13-DB_SHIFT)), 15746, -5217, 2545, -1401}; + if (x==0) + return -32767; + i = celt_ilog2(x); + n = VSHR32(x,i-15)-32768-16384; + frac = ADD16(C[0], MULT16_16_Q15(n, ADD16(C[1], MULT16_16_Q15(n, ADD16(C[2], MULT16_16_Q15(n, ADD16(C[3], MULT16_16_Q15(n, C[4])))))))); + return SHL16(i-13,DB_SHIFT)+SHR16(frac,14-DB_SHIFT); +} + +/* + K0 = 1 + K1 = log(2) + K2 = 3-4*log(2) + K3 = 3*log(2) - 2 +*/ +#define D0 16383 +#define D1 22804 +#define D2 14819 +#define D3 10204 + +static OPUS_INLINE opus_val32 celt_exp2_frac(opus_val16 x) +{ + opus_val16 frac; + frac = SHL16(x, 4); + return ADD16(D0, MULT16_16_Q15(frac, ADD16(D1, MULT16_16_Q15(frac, ADD16(D2 , MULT16_16_Q15(D3,frac)))))); +} +/** Base-2 exponential approximation (2^x). (Q10 input, Q16 output) */ +static OPUS_INLINE opus_val32 celt_exp2(opus_val16 x) +{ + int integer; + opus_val16 frac; + integer = SHR16(x,10); + if (integer>14) + return 0x7f000000; + else if (integer < -15) + return 0; + frac = celt_exp2_frac(x-SHL16(integer,10)); + return VSHR32(EXTEND32(frac), -integer-2); +} + +opus_val32 celt_rcp(opus_val32 x); + +#define celt_div(a,b) MULT32_32_Q31((opus_val32)(a),celt_rcp(b)) + +opus_val32 frac_div32(opus_val32 a, opus_val32 b); + +#define M1 32767 +#define M2 -21 +#define M3 -11943 +#define M4 4936 + +/* Atan approximation using a 4th order polynomial. Input is in Q15 format + and normalized by pi/4. Output is in Q15 format */ +static OPUS_INLINE opus_val16 celt_atan01(opus_val16 x) +{ + return MULT16_16_P15(x, ADD32(M1, MULT16_16_P15(x, ADD32(M2, MULT16_16_P15(x, ADD32(M3, MULT16_16_P15(M4, x))))))); +} + +#undef M1 +#undef M2 +#undef M3 +#undef M4 + +/* atan2() approximation valid for positive input values */ +static OPUS_INLINE opus_val16 celt_atan2p(opus_val16 y, opus_val16 x) +{ + if (y < x) + { + opus_val32 arg; + arg = celt_div(SHL32(EXTEND32(y),15),x); + if (arg >= 32767) + arg = 32767; + return SHR16(celt_atan01(EXTRACT16(arg)),1); + } else { + opus_val32 arg; + arg = celt_div(SHL32(EXTEND32(x),15),y); + if (arg >= 32767) + arg = 32767; + return 25736-SHR16(celt_atan01(EXTRACT16(arg)),1); + } +} + +#endif /* FIXED_POINT */ +#endif /* MATHOPS_H */ diff --git a/asm/libs/opus/celt/mdct.c b/asm/libs/opus/celt/mdct.c new file mode 100644 index 00000000..5315ad11 --- /dev/null +++ b/asm/libs/opus/celt/mdct.c @@ -0,0 +1,343 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2008 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This is a simple MDCT implementation that uses a N/4 complex FFT + to do most of the work. It should be relatively straightforward to + plug in pretty much and FFT here. + + This replaces the Vorbis FFT (and uses the exact same API), which + was a bit too messy and that was ending up duplicating code + (might as well use the same FFT everywhere). + + The algorithm is similar to (and inspired from) Fabrice Bellard's + MDCT implementation in FFMPEG, but has differences in signs, ordering + and scaling in many places. +*/ + +#ifndef SKIP_CONFIG_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#endif + +#include "mdct.h" +#include "kiss_fft.h" +#include "_kiss_fft_guts.h" +#include +#include "os_support.h" +#include "mathops.h" +#include "stack_alloc.h" + +#if defined(MIPSr1_ASM) +#include "mips/mdct_mipsr1.h" +#endif + + +#ifdef CUSTOM_MODES + +int clt_mdct_init(mdct_lookup *l,int N, int maxshift, int arch) +{ + int i; + kiss_twiddle_scalar *trig; + int shift; + int N2=N>>1; + l->n = N; + l->maxshift = maxshift; + for (i=0;i<=maxshift;i++) + { + if (i==0) + l->kfft[i] = opus_fft_alloc(N>>2>>i, 0, 0, arch); + else + l->kfft[i] = opus_fft_alloc_twiddles(N>>2>>i, 0, 0, l->kfft[0], arch); +#ifndef ENABLE_TI_DSPLIB55 + if (l->kfft[i]==NULL) + return 0; +#endif + } + l->trig = trig = (kiss_twiddle_scalar*)opus_alloc((N-(N2>>maxshift))*sizeof(kiss_twiddle_scalar)); + if (l->trig==NULL) + return 0; + for (shift=0;shift<=maxshift;shift++) + { + /* We have enough points that sine isn't necessary */ +#if defined(FIXED_POINT) +#if 1 + for (i=0;i>= 1; + N >>= 1; + } + return 1; +} + +void clt_mdct_clear(mdct_lookup *l, int arch) +{ + int i; + for (i=0;i<=l->maxshift;i++) + opus_fft_free(l->kfft[i], arch); + opus_free((kiss_twiddle_scalar*)l->trig); +} + +#endif /* CUSTOM_MODES */ + +/* Forward MDCT trashes the input array */ +#ifndef OVERRIDE_clt_mdct_forward +void clt_mdct_forward_c(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 *window, int overlap, int shift, int stride, int arch) +{ + int i; + int N, N2, N4; + VARDECL(kiss_fft_scalar, f); + VARDECL(kiss_fft_cpx, f2); + const kiss_fft_state *st = l->kfft[shift]; + const kiss_twiddle_scalar *trig; + opus_val16 scale; +#ifdef FIXED_POINT + /* Allows us to scale with MULT16_32_Q16(), which is faster than + MULT16_32_Q15() on ARM. */ + int scale_shift = st->scale_shift-1; +#endif + SAVE_STACK; + (void)arch; + scale = st->scale; + + N = l->n; + trig = l->trig; + for (i=0;i>= 1; + trig += N; + } + N2 = N>>1; + N4 = N>>2; + + ALLOC(f, N2, kiss_fft_scalar); + ALLOC(f2, N4, kiss_fft_cpx); + + /* Consider the input to be composed of four blocks: [a, b, c, d] */ + /* Window, shuffle, fold */ + { + /* Temp pointers to make it really clear to the compiler what we're doing */ + const kiss_fft_scalar * OPUS_RESTRICT xp1 = in+(overlap>>1); + const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+N2-1+(overlap>>1); + kiss_fft_scalar * OPUS_RESTRICT yp = f; + const opus_val16 * OPUS_RESTRICT wp1 = window+(overlap>>1); + const opus_val16 * OPUS_RESTRICT wp2 = window+(overlap>>1)-1; + for(i=0;i<((overlap+3)>>2);i++) + { + /* Real part arranged as -d-cR, Imag part arranged as -b+aR*/ + *yp++ = MULT16_32_Q15(*wp2, xp1[N2]) + MULT16_32_Q15(*wp1,*xp2); + *yp++ = MULT16_32_Q15(*wp1, *xp1) - MULT16_32_Q15(*wp2, xp2[-N2]); + xp1+=2; + xp2-=2; + wp1+=2; + wp2-=2; + } + wp1 = window; + wp2 = window+overlap-1; + for(;i>2);i++) + { + /* Real part arranged as a-bR, Imag part arranged as -c-dR */ + *yp++ = *xp2; + *yp++ = *xp1; + xp1+=2; + xp2-=2; + } + for(;ibitrev[i]] = yc; + } + } + + /* N/4 complex FFT, does not downscale anymore */ + opus_fft_impl(st, f2); + + /* Post-rotate */ + { + /* Temp pointers to make it really clear to the compiler what we're doing */ + const kiss_fft_cpx * OPUS_RESTRICT fp = f2; + kiss_fft_scalar * OPUS_RESTRICT yp1 = out; + kiss_fft_scalar * OPUS_RESTRICT yp2 = out+stride*(N2-1); + const kiss_twiddle_scalar *t = &trig[0]; + /* Temp pointers to make it really clear to the compiler what we're doing */ + for(i=0;ii,t[N4+i]) - S_MUL(fp->r,t[i]); + yi = S_MUL(fp->r,t[N4+i]) + S_MUL(fp->i,t[i]); + *yp1 = yr; + *yp2 = yi; + fp++; + yp1 += 2*stride; + yp2 -= 2*stride; + } + } + RESTORE_STACK; +} +#endif /* OVERRIDE_clt_mdct_forward */ + +#ifndef OVERRIDE_clt_mdct_backward +void clt_mdct_backward_c(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride, int arch) +{ + int i; + int N, N2, N4; + const kiss_twiddle_scalar *trig; + (void) arch; + + N = l->n; + trig = l->trig; + for (i=0;i>= 1; + trig += N; + } + N2 = N>>1; + N4 = N>>2; + + /* Pre-rotate */ + { + /* Temp pointers to make it really clear to the compiler what we're doing */ + const kiss_fft_scalar * OPUS_RESTRICT xp1 = in; + const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+stride*(N2-1); + kiss_fft_scalar * OPUS_RESTRICT yp = out+(overlap>>1); + const kiss_twiddle_scalar * OPUS_RESTRICT t = &trig[0]; + const opus_int16 * OPUS_RESTRICT bitrev = l->kfft[shift]->bitrev; + for(i=0;ikfft[shift], (kiss_fft_cpx*)(out+(overlap>>1))); + + /* Post-rotate and de-shuffle from both ends of the buffer at once to make + it in-place. */ + { + kiss_fft_scalar * yp0 = out+(overlap>>1); + kiss_fft_scalar * yp1 = out+(overlap>>1)+N2-2; + const kiss_twiddle_scalar *t = &trig[0]; + /* Loop to (N4+1)>>1 to handle odd N4. When N4 is odd, the + middle pair will be computed twice. */ + for(i=0;i<(N4+1)>>1;i++) + { + kiss_fft_scalar re, im, yr, yi; + kiss_twiddle_scalar t0, t1; + /* We swap real and imag because we're using an FFT instead of an IFFT. */ + re = yp0[1]; + im = yp0[0]; + t0 = t[i]; + t1 = t[N4+i]; + /* We'd scale up by 2 here, but instead it's done when mixing the windows */ + yr = S_MUL(re,t0) + S_MUL(im,t1); + yi = S_MUL(re,t1) - S_MUL(im,t0); + /* We swap real and imag because we're using an FFT instead of an IFFT. */ + re = yp1[1]; + im = yp1[0]; + yp0[0] = yr; + yp1[1] = yi; + + t0 = t[(N4-i-1)]; + t1 = t[(N2-i-1)]; + /* We'd scale up by 2 here, but instead it's done when mixing the windows */ + yr = S_MUL(re,t0) + S_MUL(im,t1); + yi = S_MUL(re,t1) - S_MUL(im,t0); + yp1[0] = yr; + yp0[1] = yi; + yp0 += 2; + yp1 -= 2; + } + } + + /* Mirror on both sides for TDAC */ + { + kiss_fft_scalar * OPUS_RESTRICT xp1 = out+overlap-1; + kiss_fft_scalar * OPUS_RESTRICT yp1 = out; + const opus_val16 * OPUS_RESTRICT wp1 = window; + const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; + + for(i = 0; i < overlap/2; i++) + { + kiss_fft_scalar x1, x2; + x1 = *xp1; + x2 = *yp1; + *yp1++ = MULT16_32_Q15(*wp2, x2) - MULT16_32_Q15(*wp1, x1); + *xp1-- = MULT16_32_Q15(*wp1, x2) + MULT16_32_Q15(*wp2, x1); + wp1++; + wp2--; + } + } +} +#endif /* OVERRIDE_clt_mdct_backward */ diff --git a/asm/libs/opus/celt/mdct.h b/asm/libs/opus/celt/mdct.h new file mode 100644 index 00000000..160ae4e0 --- /dev/null +++ b/asm/libs/opus/celt/mdct.h @@ -0,0 +1,112 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2008 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This is a simple MDCT implementation that uses a N/4 complex FFT + to do most of the work. It should be relatively straightforward to + plug in pretty much and FFT here. + + This replaces the Vorbis FFT (and uses the exact same API), which + was a bit too messy and that was ending up duplicating code + (might as well use the same FFT everywhere). + + The algorithm is similar to (and inspired from) Fabrice Bellard's + MDCT implementation in FFMPEG, but has differences in signs, ordering + and scaling in many places. +*/ + +#ifndef MDCT_H +#define MDCT_H + +#include "opus_defines.h" +#include "kiss_fft.h" +#include "arch.h" + +typedef struct { + int n; + int maxshift; + const kiss_fft_state *kfft[4]; + const kiss_twiddle_scalar * OPUS_RESTRICT trig; +} mdct_lookup; + +#if defined(HAVE_ARM_NE10) +#include "arm/mdct_arm.h" +#endif + + +int clt_mdct_init(mdct_lookup *l,int N, int maxshift, int arch); +void clt_mdct_clear(mdct_lookup *l, int arch); + +/** Compute a forward MDCT and scale by 4/N, trashes the input array */ +void clt_mdct_forward_c(const mdct_lookup *l, kiss_fft_scalar *in, + kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 *window, int overlap, + int shift, int stride, int arch); + +/** Compute a backward MDCT (no scaling) and performs weighted overlap-add + (scales implicitly by 1/2) */ +void clt_mdct_backward_c(const mdct_lookup *l, kiss_fft_scalar *in, + kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 * OPUS_RESTRICT window, + int overlap, int shift, int stride, int arch); + +#if !defined(OVERRIDE_OPUS_MDCT) +/* Is run-time CPU detection enabled on this platform? */ +#if defined(OPUS_HAVE_RTCD) && defined(HAVE_ARM_NE10) + +extern void (*const CLT_MDCT_FORWARD_IMPL[OPUS_ARCHMASK+1])( + const mdct_lookup *l, kiss_fft_scalar *in, + kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, + int overlap, int shift, int stride, int arch); + +#define clt_mdct_forward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \ + ((*CLT_MDCT_FORWARD_IMPL[(arch)&OPUS_ARCHMASK])(_l, _in, _out, \ + _window, _overlap, _shift, \ + _stride, _arch)) + +extern void (*const CLT_MDCT_BACKWARD_IMPL[OPUS_ARCHMASK+1])( + const mdct_lookup *l, kiss_fft_scalar *in, + kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, + int overlap, int shift, int stride, int arch); + +#define clt_mdct_backward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \ + (*CLT_MDCT_BACKWARD_IMPL[(arch)&OPUS_ARCHMASK])(_l, _in, _out, \ + _window, _overlap, _shift, \ + _stride, _arch) + +#else /* if defined(OPUS_HAVE_RTCD) && defined(HAVE_ARM_NE10) */ + +#define clt_mdct_forward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \ + clt_mdct_forward_c(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) + +#define clt_mdct_backward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \ + clt_mdct_backward_c(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) + +#endif /* end if defined(OPUS_HAVE_RTCD) && defined(HAVE_ARM_NE10) && !defined(FIXED_POINT) */ +#endif /* end if !defined(OVERRIDE_OPUS_MDCT) */ + +#endif diff --git a/asm/libs/opus/celt/mfrngcod.h b/asm/libs/opus/celt/mfrngcod.h new file mode 100644 index 00000000..809152a5 --- /dev/null +++ b/asm/libs/opus/celt/mfrngcod.h @@ -0,0 +1,48 @@ +/* Copyright (c) 2001-2008 Timothy B. Terriberry + Copyright (c) 2008-2009 Xiph.Org Foundation */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#if !defined(_mfrngcode_H) +# define _mfrngcode_H (1) +# include "entcode.h" + +/*Constants used by the entropy encoder/decoder.*/ + +/*The number of bits to output at a time.*/ +# define EC_SYM_BITS (8) +/*The total number of bits in each of the state registers.*/ +# define EC_CODE_BITS (32) +/*The maximum symbol value.*/ +# define EC_SYM_MAX ((1U<>EC_SYM_BITS) +/*The number of bits available for the last, partial symbol in the code field.*/ +# define EC_CODE_EXTRA ((EC_CODE_BITS-2)%EC_SYM_BITS+1) +#endif diff --git a/asm/libs/opus/celt/mips/celt_mipsr1.h b/asm/libs/opus/celt/mips/celt_mipsr1.h new file mode 100644 index 00000000..e85661a6 --- /dev/null +++ b/asm/libs/opus/celt/mips/celt_mipsr1.h @@ -0,0 +1,151 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2010 Xiph.Org Foundation + Copyright (c) 2008 Gregory Maxwell + Written by Jean-Marc Valin and Gregory Maxwell */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef __CELT_MIPSR1_H__ +#define __CELT_MIPSR1_H__ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define CELT_C + +#include "os_support.h" +#include "mdct.h" +#include +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" +#include +#include "celt_lpc.h" +#include "vq.h" + +#define OVERRIDE_comb_filter +void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N, + opus_val16 g0, opus_val16 g1, int tapset0, int tapset1, + const opus_val16 *window, int overlap, int arch) +{ + int i; + opus_val32 x0, x1, x2, x3, x4; + + (void)arch; + + /* printf ("%d %d %f %f\n", T0, T1, g0, g1); */ + opus_val16 g00, g01, g02, g10, g11, g12; + static const opus_val16 gains[3][3] = { + {QCONST16(0.3066406250f, 15), QCONST16(0.2170410156f, 15), QCONST16(0.1296386719f, 15)}, + {QCONST16(0.4638671875f, 15), QCONST16(0.2680664062f, 15), QCONST16(0.f, 15)}, + {QCONST16(0.7998046875f, 15), QCONST16(0.1000976562f, 15), QCONST16(0.f, 15)}}; + + if (g0==0 && g1==0) + { + /* OPT: Happens to work without the OPUS_MOVE(), but only because the current encoder already copies x to y */ + if (x!=y) + OPUS_MOVE(y, x, N); + return; + } + + g00 = MULT16_16_P15(g0, gains[tapset0][0]); + g01 = MULT16_16_P15(g0, gains[tapset0][1]); + g02 = MULT16_16_P15(g0, gains[tapset0][2]); + g10 = MULT16_16_P15(g1, gains[tapset1][0]); + g11 = MULT16_16_P15(g1, gains[tapset1][1]); + g12 = MULT16_16_P15(g1, gains[tapset1][2]); + x1 = x[-T1+1]; + x2 = x[-T1 ]; + x3 = x[-T1-1]; + x4 = x[-T1-2]; + /* If the filter didn't change, we don't need the overlap */ + if (g0==g1 && T0==T1 && tapset0==tapset1) + overlap=0; + + for (i=0;itwiddles[fstride*m]; + yb = st->twiddles[fstride*2*m]; +#endif + + tw=st->twiddles; + + for (i=0;ir += scratch[7].r + scratch[8].r; + Fout0->i += scratch[7].i + scratch[8].i; + scratch[5].r = scratch[0].r + S_MUL_ADD(scratch[7].r,ya.r,scratch[8].r,yb.r); + scratch[5].i = scratch[0].i + S_MUL_ADD(scratch[7].i,ya.r,scratch[8].i,yb.r); + + scratch[6].r = S_MUL_ADD(scratch[10].i,ya.i,scratch[9].i,yb.i); + scratch[6].i = -S_MUL_ADD(scratch[10].r,ya.i,scratch[9].r,yb.i); + + C_SUB(*Fout1,scratch[5],scratch[6]); + C_ADD(*Fout4,scratch[5],scratch[6]); + + scratch[11].r = scratch[0].r + S_MUL_ADD(scratch[7].r,yb.r,scratch[8].r,ya.r); + scratch[11].i = scratch[0].i + S_MUL_ADD(scratch[7].i,yb.r,scratch[8].i,ya.r); + + scratch[12].r = S_MUL_SUB(scratch[9].i,ya.i,scratch[10].i,yb.i); + scratch[12].i = S_MUL_SUB(scratch[10].r,yb.i,scratch[9].r,ya.i); + + C_ADD(*Fout2,scratch[11],scratch[12]); + C_SUB(*Fout3,scratch[11],scratch[12]); + + ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4; + } + } +} + + +#endif /* KISS_FFT_MIPSR1_H */ diff --git a/asm/libs/opus/celt/mips/mdct_mipsr1.h b/asm/libs/opus/celt/mips/mdct_mipsr1.h new file mode 100644 index 00000000..2934dab7 --- /dev/null +++ b/asm/libs/opus/celt/mips/mdct_mipsr1.h @@ -0,0 +1,288 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2008 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This is a simple MDCT implementation that uses a N/4 complex FFT + to do most of the work. It should be relatively straightforward to + plug in pretty much and FFT here. + + This replaces the Vorbis FFT (and uses the exact same API), which + was a bit too messy and that was ending up duplicating code + (might as well use the same FFT everywhere). + + The algorithm is similar to (and inspired from) Fabrice Bellard's + MDCT implementation in FFMPEG, but has differences in signs, ordering + and scaling in many places. +*/ +#ifndef __MDCT_MIPSR1_H__ +#define __MDCT_MIPSR1_H__ + +#ifndef SKIP_CONFIG_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#endif + +#include "mdct.h" +#include "kiss_fft.h" +#include "_kiss_fft_guts.h" +#include +#include "os_support.h" +#include "mathops.h" +#include "stack_alloc.h" + +/* Forward MDCT trashes the input array */ +#define OVERRIDE_clt_mdct_forward +void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 *window, int overlap, int shift, int stride, int arch) +{ + int i; + int N, N2, N4; + VARDECL(kiss_fft_scalar, f); + VARDECL(kiss_fft_cpx, f2); + const kiss_fft_state *st = l->kfft[shift]; + const kiss_twiddle_scalar *trig; + opus_val16 scale; +#ifdef FIXED_POINT + /* Allows us to scale with MULT16_32_Q16(), which is faster than + MULT16_32_Q15() on ARM. */ + int scale_shift = st->scale_shift-1; +#endif + + (void)arch; + + SAVE_STACK; + scale = st->scale; + + N = l->n; + trig = l->trig; + for (i=0;i>= 1; + trig += N; + } + N2 = N>>1; + N4 = N>>2; + + ALLOC(f, N2, kiss_fft_scalar); + ALLOC(f2, N4, kiss_fft_cpx); + + /* Consider the input to be composed of four blocks: [a, b, c, d] */ + /* Window, shuffle, fold */ + { + /* Temp pointers to make it really clear to the compiler what we're doing */ + const kiss_fft_scalar * OPUS_RESTRICT xp1 = in+(overlap>>1); + const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+N2-1+(overlap>>1); + kiss_fft_scalar * OPUS_RESTRICT yp = f; + const opus_val16 * OPUS_RESTRICT wp1 = window+(overlap>>1); + const opus_val16 * OPUS_RESTRICT wp2 = window+(overlap>>1)-1; + for(i=0;i<((overlap+3)>>2);i++) + { + /* Real part arranged as -d-cR, Imag part arranged as -b+aR*/ + *yp++ = S_MUL_ADD(*wp2, xp1[N2],*wp1,*xp2); + *yp++ = S_MUL_SUB(*wp1, *xp1,*wp2, xp2[-N2]); + xp1+=2; + xp2-=2; + wp1+=2; + wp2-=2; + } + wp1 = window; + wp2 = window+overlap-1; + for(;i>2);i++) + { + /* Real part arranged as a-bR, Imag part arranged as -c-dR */ + *yp++ = *xp2; + *yp++ = *xp1; + xp1+=2; + xp2-=2; + } + for(;ibitrev[i]] = yc; + } + } + + /* N/4 complex FFT, does not downscale anymore */ + opus_fft_impl(st, f2); + + /* Post-rotate */ + { + /* Temp pointers to make it really clear to the compiler what we're doing */ + const kiss_fft_cpx * OPUS_RESTRICT fp = f2; + kiss_fft_scalar * OPUS_RESTRICT yp1 = out; + kiss_fft_scalar * OPUS_RESTRICT yp2 = out+stride*(N2-1); + const kiss_twiddle_scalar *t = &trig[0]; + /* Temp pointers to make it really clear to the compiler what we're doing */ + for(i=0;ii,t[N4+i] , fp->r,t[i]); + yi = S_MUL_ADD(fp->r,t[N4+i] ,fp->i,t[i]); + *yp1 = yr; + *yp2 = yi; + fp++; + yp1 += 2*stride; + yp2 -= 2*stride; + } + } + RESTORE_STACK; +} + +#define OVERRIDE_clt_mdct_backward +void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, + const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride, int arch) +{ + int i; + int N, N2, N4; + const kiss_twiddle_scalar *trig; + + (void)arch; + + N = l->n; + trig = l->trig; + for (i=0;i>= 1; + trig += N; + } + N2 = N>>1; + N4 = N>>2; + + /* Pre-rotate */ + { + /* Temp pointers to make it really clear to the compiler what we're doing */ + const kiss_fft_scalar * OPUS_RESTRICT xp1 = in; + const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+stride*(N2-1); + kiss_fft_scalar * OPUS_RESTRICT yp = out+(overlap>>1); + const kiss_twiddle_scalar * OPUS_RESTRICT t = &trig[0]; + const opus_int16 * OPUS_RESTRICT bitrev = l->kfft[shift]->bitrev; + for(i=0;ikfft[shift], (kiss_fft_cpx*)(out+(overlap>>1))); + + /* Post-rotate and de-shuffle from both ends of the buffer at once to make + it in-place. */ + { + kiss_fft_scalar * OPUS_RESTRICT yp0 = out+(overlap>>1); + kiss_fft_scalar * OPUS_RESTRICT yp1 = out+(overlap>>1)+N2-2; + const kiss_twiddle_scalar *t = &trig[0]; + /* Loop to (N4+1)>>1 to handle odd N4. When N4 is odd, the + middle pair will be computed twice. */ + for(i=0;i<(N4+1)>>1;i++) + { + kiss_fft_scalar re, im, yr, yi; + kiss_twiddle_scalar t0, t1; + /* We swap real and imag because we're using an FFT instead of an IFFT. */ + re = yp0[1]; + im = yp0[0]; + t0 = t[i]; + t1 = t[N4+i]; + /* We'd scale up by 2 here, but instead it's done when mixing the windows */ + yr = S_MUL_ADD(re,t0 , im,t1); + yi = S_MUL_SUB(re,t1 , im,t0); + /* We swap real and imag because we're using an FFT instead of an IFFT. */ + re = yp1[1]; + im = yp1[0]; + yp0[0] = yr; + yp1[1] = yi; + + t0 = t[(N4-i-1)]; + t1 = t[(N2-i-1)]; + /* We'd scale up by 2 here, but instead it's done when mixing the windows */ + yr = S_MUL_ADD(re,t0,im,t1); + yi = S_MUL_SUB(re,t1,im,t0); + yp1[0] = yr; + yp0[1] = yi; + yp0 += 2; + yp1 -= 2; + } + } + + /* Mirror on both sides for TDAC */ + { + kiss_fft_scalar * OPUS_RESTRICT xp1 = out+overlap-1; + kiss_fft_scalar * OPUS_RESTRICT yp1 = out; + const opus_val16 * OPUS_RESTRICT wp1 = window; + const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; + + for(i = 0; i < overlap/2; i++) + { + kiss_fft_scalar x1, x2; + x1 = *xp1; + x2 = *yp1; + *yp1++ = MULT16_32_Q15(*wp2, x2) - MULT16_32_Q15(*wp1, x1); + *xp1-- = MULT16_32_Q15(*wp1, x2) + MULT16_32_Q15(*wp2, x1); + wp1++; + wp2--; + } + } +} +#endif /* __MDCT_MIPSR1_H__ */ diff --git a/asm/libs/opus/celt/mips/pitch_mipsr1.h b/asm/libs/opus/celt/mips/pitch_mipsr1.h new file mode 100644 index 00000000..a9500aff --- /dev/null +++ b/asm/libs/opus/celt/mips/pitch_mipsr1.h @@ -0,0 +1,161 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/** + @file pitch.h + @brief Pitch analysis + */ + +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef PITCH_MIPSR1_H +#define PITCH_MIPSR1_H + +#define OVERRIDE_DUAL_INNER_PROD +static inline void dual_inner_prod(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02, + int N, opus_val32 *xy1, opus_val32 *xy2, int arch) +{ + int j; + opus_val32 xy01=0; + opus_val32 xy02=0; + + (void)arch; + + asm volatile("MULT $ac1, $0, $0"); + asm volatile("MULT $ac2, $0, $0"); + /* Compute the norm of X+Y and X-Y as |X|^2 + |Y|^2 +/- sum(xy) */ + for (j=0;j=0;i--) + { + celt_norm x1, x2; + x1 = Xptr[0]; + x2 = Xptr[stride]; + Xptr[stride] = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x2), s, x1), 15)); + *Xptr-- = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x1), ms, x2), 15)); + } +} + +#define OVERRIDE_renormalise_vector + +#define renormalise_vector(X, N, gain, arch) \ + (renormalise_vector_mips(X, N, gain, arch)) + +void renormalise_vector_mips(celt_norm *X, int N, opus_val16 gain, int arch) +{ + int i; +#ifdef FIXED_POINT + int k; +#endif + opus_val32 E = EPSILON; + opus_val16 g; + opus_val32 t; + celt_norm *xptr = X; + int X0, X1; + + (void)arch; + + asm volatile("mult $ac1, $0, $0"); + asm volatile("MTLO %0, $ac1" : :"r" (E)); + /*if(N %4) + printf("error");*/ + for (i=0;i>1; +#endif + t = VSHR32(E, 2*(k-7)); + g = MULT16_16_P15(celt_rsqrt_norm(t),gain); + + xptr = X; + for (i=0;i= Fs) + break; + + /* Find where the linear part ends (i.e. where the spacing is more than min_width */ + for (lin=0;lin= res) + break; + + low = (bark_freq[lin]+res/2)/res; + high = nBark-lin; + *nbEBands = low+high; + eBands = opus_alloc(sizeof(opus_int16)*(*nbEBands+2)); + + if (eBands==NULL) + return NULL; + + /* Linear spacing (min_width) */ + for (i=0;i0) + offset = eBands[low-1]*res - bark_freq[lin-1]; + /* Spacing follows critical bands */ + for (i=0;i frame_size) + eBands[*nbEBands] = frame_size; + for (i=1;i<*nbEBands-1;i++) + { + if (eBands[i+1]-eBands[i] < eBands[i]-eBands[i-1]) + { + eBands[i] -= (2*eBands[i]-eBands[i-1]-eBands[i+1])/2; + } + } + /* Remove any empty bands. */ + for (i=j=0;i<*nbEBands;i++) + if(eBands[i+1]>eBands[j]) + eBands[++j]=eBands[i+1]; + *nbEBands=j; + + for (i=1;i<*nbEBands;i++) + { + /* Every band must be smaller than the last band. */ + celt_assert(eBands[i]-eBands[i-1]<=eBands[*nbEBands]-eBands[*nbEBands-1]); + /* Each band must be no larger than twice the size of the previous one. */ + celt_assert(eBands[i+1]-eBands[i]<=2*(eBands[i]-eBands[i-1])); + } + + return eBands; +} + +static void compute_allocation_table(CELTMode *mode) +{ + int i, j; + unsigned char *allocVectors; + int maxBands = sizeof(eband5ms)/sizeof(eband5ms[0])-1; + + mode->nbAllocVectors = BITALLOC_SIZE; + allocVectors = opus_alloc(sizeof(unsigned char)*(BITALLOC_SIZE*mode->nbEBands)); + if (allocVectors==NULL) + return; + + /* Check for standard mode */ + if (mode->Fs == 400*(opus_int32)mode->shortMdctSize) + { + for (i=0;inbEBands;i++) + allocVectors[i] = band_allocation[i]; + mode->allocVectors = allocVectors; + return; + } + /* If not the standard mode, interpolate */ + /* Compute per-codec-band allocation from per-critical-band matrix */ + for (i=0;inbEBands;j++) + { + int k; + for (k=0;k mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize) + break; + } + if (k>maxBands-1) + allocVectors[i*mode->nbEBands+j] = band_allocation[i*maxBands + maxBands-1]; + else { + opus_int32 a0, a1; + a1 = mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize - 400*(opus_int32)eband5ms[k-1]; + a0 = 400*(opus_int32)eband5ms[k] - mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize; + allocVectors[i*mode->nbEBands+j] = (a0*band_allocation[i*maxBands+k-1] + + a1*band_allocation[i*maxBands+k])/(a0+a1); + } + } + } + + /*printf ("\n"); + for (i=0;inbEBands;j++) + printf ("%d ", allocVectors[i*mode->nbEBands+j]); + printf ("\n"); + } + exit(0);*/ + + mode->allocVectors = allocVectors; +} + +#endif /* CUSTOM_MODES */ + +CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) +{ + int i; +#ifdef CUSTOM_MODES + CELTMode *mode=NULL; + int res; + opus_val16 *window; + opus_int16 *logN; + int LM; + int arch = opus_select_arch(); + ALLOC_STACK; +#if !defined(VAR_ARRAYS) && !defined(USE_ALLOCA) + if (global_stack==NULL) + goto failure; +#endif +#endif + +#ifndef CUSTOM_MODES_ONLY + for (i=0;iFs && + (frame_size<shortMdctSize*static_mode_list[i]->nbShortMdcts) + { + if (error) + *error = OPUS_OK; + return (CELTMode*)static_mode_list[i]; + } + } + } +#endif /* CUSTOM_MODES_ONLY */ + +#ifndef CUSTOM_MODES + if (error) + *error = OPUS_BAD_ARG; + return NULL; +#else + + /* The good thing here is that permutation of the arguments will automatically be invalid */ + + if (Fs < 8000 || Fs > 96000) + { + if (error) + *error = OPUS_BAD_ARG; + return NULL; + } + if (frame_size < 40 || frame_size > 1024 || frame_size%2!=0) + { + if (error) + *error = OPUS_BAD_ARG; + return NULL; + } + /* Frames of less than 1ms are not supported. */ + if ((opus_int32)frame_size*1000 < Fs) + { + if (error) + *error = OPUS_BAD_ARG; + return NULL; + } + + if ((opus_int32)frame_size*75 >= Fs && (frame_size%16)==0) + { + LM = 3; + } else if ((opus_int32)frame_size*150 >= Fs && (frame_size%8)==0) + { + LM = 2; + } else if ((opus_int32)frame_size*300 >= Fs && (frame_size%4)==0) + { + LM = 1; + } else + { + LM = 0; + } + + /* Shorts longer than 3.3ms are not supported. */ + if ((opus_int32)(frame_size>>LM)*300 > Fs) + { + if (error) + *error = OPUS_BAD_ARG; + return NULL; + } + + mode = opus_alloc(sizeof(CELTMode)); + if (mode==NULL) + goto failure; + mode->Fs = Fs; + + /* Pre/de-emphasis depends on sampling rate. The "standard" pre-emphasis + is defined as A(z) = 1 - 0.85*z^-1 at 48 kHz. Other rates should + approximate that. */ + if(Fs < 12000) /* 8 kHz */ + { + mode->preemph[0] = QCONST16(0.3500061035f, 15); + mode->preemph[1] = -QCONST16(0.1799926758f, 15); + mode->preemph[2] = QCONST16(0.2719968125f, SIG_SHIFT); /* exact 1/preemph[3] */ + mode->preemph[3] = QCONST16(3.6765136719f, 13); + } else if(Fs < 24000) /* 16 kHz */ + { + mode->preemph[0] = QCONST16(0.6000061035f, 15); + mode->preemph[1] = -QCONST16(0.1799926758f, 15); + mode->preemph[2] = QCONST16(0.4424998650f, SIG_SHIFT); /* exact 1/preemph[3] */ + mode->preemph[3] = QCONST16(2.2598876953f, 13); + } else if(Fs < 40000) /* 32 kHz */ + { + mode->preemph[0] = QCONST16(0.7799987793f, 15); + mode->preemph[1] = -QCONST16(0.1000061035f, 15); + mode->preemph[2] = QCONST16(0.7499771125f, SIG_SHIFT); /* exact 1/preemph[3] */ + mode->preemph[3] = QCONST16(1.3333740234f, 13); + } else /* 48 kHz */ + { + mode->preemph[0] = QCONST16(0.8500061035f, 15); + mode->preemph[1] = QCONST16(0.0f, 15); + mode->preemph[2] = QCONST16(1.f, SIG_SHIFT); + mode->preemph[3] = QCONST16(1.f, 13); + } + + mode->maxLM = LM; + mode->nbShortMdcts = 1<shortMdctSize = frame_size/mode->nbShortMdcts; + res = (mode->Fs+mode->shortMdctSize)/(2*mode->shortMdctSize); + + mode->eBands = compute_ebands(Fs, mode->shortMdctSize, res, &mode->nbEBands); + if (mode->eBands==NULL) + goto failure; +#if !defined(SMALL_FOOTPRINT) + /* Make sure we don't allocate a band larger than our PVQ table. + 208 should be enough, but let's be paranoid. */ + if ((mode->eBands[mode->nbEBands] - mode->eBands[mode->nbEBands-1])< + 208) { + goto failure; + } +#endif + + mode->effEBands = mode->nbEBands; + while (mode->eBands[mode->effEBands] > mode->shortMdctSize) + mode->effEBands--; + + /* Overlap must be divisible by 4 */ + mode->overlap = ((mode->shortMdctSize>>2)<<2); + + compute_allocation_table(mode); + if (mode->allocVectors==NULL) + goto failure; + + window = (opus_val16*)opus_alloc(mode->overlap*sizeof(opus_val16)); + if (window==NULL) + goto failure; + +#ifndef FIXED_POINT + for (i=0;ioverlap;i++) + window[i] = Q15ONE*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap)); +#else + for (i=0;ioverlap;i++) + window[i] = MIN32(32767,floor(.5+32768.*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap)))); +#endif + mode->window = window; + + logN = (opus_int16*)opus_alloc(mode->nbEBands*sizeof(opus_int16)); + if (logN==NULL) + goto failure; + + for (i=0;inbEBands;i++) + logN[i] = log2_frac(mode->eBands[i+1]-mode->eBands[i], BITRES); + mode->logN = logN; + + compute_pulse_cache(mode, mode->maxLM); + + if (clt_mdct_init(&mode->mdct, 2*mode->shortMdctSize*mode->nbShortMdcts, + mode->maxLM, arch) == 0) + goto failure; + + if (error) + *error = OPUS_OK; + + return mode; +failure: + if (error) + *error = OPUS_ALLOC_FAIL; + if (mode!=NULL) + opus_custom_mode_destroy(mode); + return NULL; +#endif /* !CUSTOM_MODES */ +} + +#ifdef CUSTOM_MODES +void opus_custom_mode_destroy(CELTMode *mode) +{ + int arch = opus_select_arch(); + + if (mode == NULL) + return; +#ifndef CUSTOM_MODES_ONLY + { + int i; + for (i=0;ieBands); + opus_free((opus_int16*)mode->allocVectors); + + opus_free((opus_val16*)mode->window); + opus_free((opus_int16*)mode->logN); + + opus_free((opus_int16*)mode->cache.index); + opus_free((unsigned char*)mode->cache.bits); + opus_free((unsigned char*)mode->cache.caps); + clt_mdct_clear(&mode->mdct, arch); + + opus_free((CELTMode *)mode); +} +#endif diff --git a/asm/libs/opus/celt/modes.h b/asm/libs/opus/celt/modes.h new file mode 100644 index 00000000..be813ccc --- /dev/null +++ b/asm/libs/opus/celt/modes.h @@ -0,0 +1,75 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Copyright (c) 2008 Gregory Maxwell + Written by Jean-Marc Valin and Gregory Maxwell */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef MODES_H +#define MODES_H + +#include "opus_types.h" +#include "celt.h" +#include "arch.h" +#include "mdct.h" +#include "entenc.h" +#include "entdec.h" + +#define MAX_PERIOD 1024 + +typedef struct { + int size; + const opus_int16 *index; + const unsigned char *bits; + const unsigned char *caps; +} PulseCache; + +/** Mode definition (opaque) + @brief Mode definition + */ +struct OpusCustomMode { + opus_int32 Fs; + int overlap; + + int nbEBands; + int effEBands; + opus_val16 preemph[4]; + const opus_int16 *eBands; /**< Definition for each "pseudo-critical band" */ + + int maxLM; + int nbShortMdcts; + int shortMdctSize; + + int nbAllocVectors; /**< Number of lines in the matrix below */ + const unsigned char *allocVectors; /**< Number of bits in each band for several rates */ + const opus_int16 *logN; + + const opus_val16 *window; + mdct_lookup mdct; + PulseCache cache; +}; + + +#endif diff --git a/asm/libs/opus/celt/opus_custom_demo.c b/asm/libs/opus/celt/opus_custom_demo.c new file mode 100644 index 00000000..ae41c0de --- /dev/null +++ b/asm/libs/opus/celt/opus_custom_demo.c @@ -0,0 +1,210 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_custom.h" +#include "arch.h" +#include +#include +#include +#include + +#define MAX_PACKET 1275 + +int main(int argc, char *argv[]) +{ + int err; + char *inFile, *outFile; + FILE *fin, *fout; + OpusCustomMode *mode=NULL; + OpusCustomEncoder *enc; + OpusCustomDecoder *dec; + int len; + opus_int32 frame_size, channels, rate; + int bytes_per_packet; + unsigned char data[MAX_PACKET]; + int complexity; +#if !(defined (FIXED_POINT) && !defined(CUSTOM_MODES)) && defined(RESYNTH) + int i; + double rmsd = 0; +#endif + int count = 0; + opus_int32 skip; + opus_int16 *in, *out; + if (argc != 9 && argc != 8 && argc != 7) + { + fprintf (stderr, "Usage: test_opus_custom " + " [ [packet loss rate]] " + " \n"); + return 1; + } + + rate = (opus_int32)atol(argv[1]); + channels = atoi(argv[2]); + frame_size = atoi(argv[3]); + mode = opus_custom_mode_create(rate, frame_size, NULL); + if (mode == NULL) + { + fprintf(stderr, "failed to create a mode\n"); + return 1; + } + + bytes_per_packet = atoi(argv[4]); + if (bytes_per_packet < 0 || bytes_per_packet > MAX_PACKET) + { + fprintf (stderr, "bytes per packet must be between 0 and %d\n", + MAX_PACKET); + return 1; + } + + inFile = argv[argc-2]; + fin = fopen(inFile, "rb"); + if (!fin) + { + fprintf (stderr, "Could not open input file %s\n", argv[argc-2]); + return 1; + } + outFile = argv[argc-1]; + fout = fopen(outFile, "wb+"); + if (!fout) + { + fprintf (stderr, "Could not open output file %s\n", argv[argc-1]); + fclose(fin); + return 1; + } + + enc = opus_custom_encoder_create(mode, channels, &err); + if (err != 0) + { + fprintf(stderr, "Failed to create the encoder: %s\n", opus_strerror(err)); + fclose(fin); + fclose(fout); + return 1; + } + dec = opus_custom_decoder_create(mode, channels, &err); + if (err != 0) + { + fprintf(stderr, "Failed to create the decoder: %s\n", opus_strerror(err)); + fclose(fin); + fclose(fout); + return 1; + } + opus_custom_decoder_ctl(dec, OPUS_GET_LOOKAHEAD(&skip)); + + if (argc>7) + { + complexity=atoi(argv[5]); + opus_custom_encoder_ctl(enc,OPUS_SET_COMPLEXITY(complexity)); + } + + in = (opus_int16*)malloc(frame_size*channels*sizeof(opus_int16)); + out = (opus_int16*)malloc(frame_size*channels*sizeof(opus_int16)); + + while (!feof(fin)) + { + int ret; + err = fread(in, sizeof(short), frame_size*channels, fin); + if (feof(fin)) + break; + len = opus_custom_encode(enc, in, frame_size, data, bytes_per_packet); + if (len <= 0) + fprintf (stderr, "opus_custom_encode() failed: %s\n", opus_strerror(len)); + + /* This is for simulating bit errors */ +#if 0 + int errors = 0; + int eid = 0; + /* This simulates random bit error */ + for (i=0;i 0) + { + rmsd = sqrt(rmsd/(1.0*frame_size*channels*count)); + fprintf (stderr, "Error: encoder doesn't match decoder\n"); + fprintf (stderr, "RMS mismatch is %f\n", rmsd); + return 1; + } else { + fprintf (stderr, "Encoder matches decoder!!\n"); + } +#endif + return 0; +} + diff --git a/asm/libs/opus/celt/os_support.h b/asm/libs/opus/celt/os_support.h new file mode 100644 index 00000000..a2171971 --- /dev/null +++ b/asm/libs/opus/celt/os_support.h @@ -0,0 +1,92 @@ +/* Copyright (C) 2007 Jean-Marc Valin + + File: os_support.h + This is the (tiny) OS abstraction layer. Aside from math.h, this is the + only place where system headers are allowed. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef OS_SUPPORT_H +#define OS_SUPPORT_H + +#ifdef CUSTOM_SUPPORT +# include "custom_support.h" +#endif + +#include "opus_types.h" +#include "opus_defines.h" + +#include +#include +#include + +/** Opus wrapper for malloc(). To do your own dynamic allocation, all you need to do is replace this function and opus_free */ +#ifndef OVERRIDE_OPUS_ALLOC +static OPUS_INLINE void *opus_alloc (size_t size) +{ + return malloc(size); +} +#endif + +/** Same as celt_alloc(), except that the area is only needed inside a CELT call (might cause problem with wideband though) */ +#ifndef OVERRIDE_OPUS_ALLOC_SCRATCH +static OPUS_INLINE void *opus_alloc_scratch (size_t size) +{ + /* Scratch space doesn't need to be cleared */ + return opus_alloc(size); +} +#endif + +/** Opus wrapper for free(). To do your own dynamic allocation, all you need to do is replace this function and opus_alloc */ +#ifndef OVERRIDE_OPUS_FREE +static OPUS_INLINE void opus_free (void *ptr) +{ + free(ptr); +} +#endif + +/** Copy n elements from src to dst. The 0* term provides compile-time type checking */ +#ifndef OVERRIDE_OPUS_COPY +#define OPUS_COPY(dst, src, n) (memcpy((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) )) +#endif + +/** Copy n elements from src to dst, allowing overlapping regions. The 0* term + provides compile-time type checking */ +#ifndef OVERRIDE_OPUS_MOVE +#define OPUS_MOVE(dst, src, n) (memmove((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) )) +#endif + +/** Set n elements of dst to zero */ +#ifndef OVERRIDE_OPUS_CLEAR +#define OPUS_CLEAR(dst, n) (memset((dst), 0, (n)*sizeof(*(dst)))) +#endif + +/*#ifdef __GNUC__ +#pragma GCC poison printf sprintf +#pragma GCC poison malloc free realloc calloc +#endif*/ + +#endif /* OS_SUPPORT_H */ + diff --git a/asm/libs/opus/celt/pitch.c b/asm/libs/opus/celt/pitch.c new file mode 100644 index 00000000..1d89cb03 --- /dev/null +++ b/asm/libs/opus/celt/pitch.c @@ -0,0 +1,544 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/** + @file pitch.c + @brief Pitch analysis + */ + +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "pitch.h" +#include "os_support.h" +#include "modes.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "celt_lpc.h" + +static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len, + int max_pitch, int *best_pitch +#ifdef FIXED_POINT + , int yshift, opus_val32 maxcorr +#endif + ) +{ + int i, j; + opus_val32 Syy=1; + opus_val16 best_num[2]; + opus_val32 best_den[2]; +#ifdef FIXED_POINT + int xshift; + + xshift = celt_ilog2(maxcorr)-14; +#endif + + best_num[0] = -1; + best_num[1] = -1; + best_den[0] = 0; + best_den[1] = 0; + best_pitch[0] = 0; + best_pitch[1] = 1; + for (j=0;j0) + { + opus_val16 num; + opus_val32 xcorr16; + xcorr16 = EXTRACT16(VSHR32(xcorr[i], xshift)); +#ifndef FIXED_POINT + /* Considering the range of xcorr16, this should avoid both underflows + and overflows (inf) when squaring xcorr16 */ + xcorr16 *= 1e-12f; +#endif + num = MULT16_16_Q15(xcorr16,xcorr16); + if (MULT16_32_Q15(num,best_den[1]) > MULT16_32_Q15(best_num[1],Syy)) + { + if (MULT16_32_Q15(num,best_den[0]) > MULT16_32_Q15(best_num[0],Syy)) + { + best_num[1] = best_num[0]; + best_den[1] = best_den[0]; + best_pitch[1] = best_pitch[0]; + best_num[0] = num; + best_den[0] = Syy; + best_pitch[0] = i; + } else { + best_num[1] = num; + best_den[1] = Syy; + best_pitch[1] = i; + } + } + } + Syy += SHR32(MULT16_16(y[i+len],y[i+len]),yshift) - SHR32(MULT16_16(y[i],y[i]),yshift); + Syy = MAX32(1, Syy); + } +} + +static void celt_fir5(const opus_val16 *x, + const opus_val16 *num, + opus_val16 *y, + int N, + opus_val16 *mem) +{ + int i; + opus_val16 num0, num1, num2, num3, num4; + opus_val32 mem0, mem1, mem2, mem3, mem4; + num0=num[0]; + num1=num[1]; + num2=num[2]; + num3=num[3]; + num4=num[4]; + mem0=mem[0]; + mem1=mem[1]; + mem2=mem[2]; + mem3=mem[3]; + mem4=mem[4]; + for (i=0;i>1;i++) + x_lp[i] = SHR32(HALF32(HALF32(x[0][(2*i-1)]+x[0][(2*i+1)])+x[0][2*i]), shift); + x_lp[0] = SHR32(HALF32(HALF32(x[0][1])+x[0][0]), shift); + if (C==2) + { + for (i=1;i>1;i++) + x_lp[i] += SHR32(HALF32(HALF32(x[1][(2*i-1)]+x[1][(2*i+1)])+x[1][2*i]), shift); + x_lp[0] += SHR32(HALF32(HALF32(x[1][1])+x[1][0]), shift); + } + + _celt_autocorr(x_lp, ac, NULL, 0, + 4, len>>1, arch); + + /* Noise floor -40 dB */ +#ifdef FIXED_POINT + ac[0] += SHR32(ac[0],13); +#else + ac[0] *= 1.0001f; +#endif + /* Lag windowing */ + for (i=1;i<=4;i++) + { + /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ +#ifdef FIXED_POINT + ac[i] -= MULT16_32_Q15(2*i*i, ac[i]); +#else + ac[i] -= ac[i]*(.008f*i)*(.008f*i); +#endif + } + + _celt_lpc(lpc, ac, 4); + for (i=0;i<4;i++) + { + tmp = MULT16_16_Q15(QCONST16(.9f,15), tmp); + lpc[i] = MULT16_16_Q15(lpc[i], tmp); + } + /* Add a zero */ + lpc2[0] = lpc[0] + QCONST16(.8f,SIG_SHIFT); + lpc2[1] = lpc[1] + MULT16_16_Q15(c1,lpc[0]); + lpc2[2] = lpc[2] + MULT16_16_Q15(c1,lpc[1]); + lpc2[3] = lpc[3] + MULT16_16_Q15(c1,lpc[2]); + lpc2[4] = MULT16_16_Q15(c1,lpc[3]); + celt_fir5(x_lp, lpc2, x_lp, len>>1, mem); +} + +/* Pure C implementation. */ +#ifdef FIXED_POINT +opus_val32 +#else +void +#endif +#if defined(OVERRIDE_PITCH_XCORR) +celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y, + opus_val32 *xcorr, int len, int max_pitch) +#else +celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, + opus_val32 *xcorr, int len, int max_pitch, int arch) +#endif +{ + +#if 0 /* This is a simple version of the pitch correlation that should work + well on DSPs like Blackfin and TI C5x/C6x */ + int i, j; +#ifdef FIXED_POINT + opus_val32 maxcorr=1; +#endif +#if !defined(OVERRIDE_PITCH_XCORR) + (void)arch; +#endif + for (i=0;i0); + celt_assert((((unsigned char *)_x-(unsigned char *)NULL)&3)==0); + for (i=0;i0); + celt_assert(max_pitch>0); + lag = len+max_pitch; + + ALLOC(x_lp4, len>>2, opus_val16); + ALLOC(y_lp4, lag>>2, opus_val16); + ALLOC(xcorr, max_pitch>>1, opus_val32); + + /* Downsample by 2 again */ + for (j=0;j>2;j++) + x_lp4[j] = x_lp[2*j]; + for (j=0;j>2;j++) + y_lp4[j] = y[2*j]; + +#ifdef FIXED_POINT + xmax = celt_maxabs16(x_lp4, len>>2); + ymax = celt_maxabs16(y_lp4, lag>>2); + shift = celt_ilog2(MAX32(1, MAX32(xmax, ymax)))-11; + if (shift>0) + { + for (j=0;j>2;j++) + x_lp4[j] = SHR16(x_lp4[j], shift); + for (j=0;j>2;j++) + y_lp4[j] = SHR16(y_lp4[j], shift); + /* Use double the shift for a MAC */ + shift *= 2; + } else { + shift = 0; + } +#endif + + /* Coarse search with 4x decimation */ + +#ifdef FIXED_POINT + maxcorr = +#endif + celt_pitch_xcorr(x_lp4, y_lp4, xcorr, len>>2, max_pitch>>2, arch); + + find_best_pitch(xcorr, y_lp4, len>>2, max_pitch>>2, best_pitch +#ifdef FIXED_POINT + , 0, maxcorr +#endif + ); + + /* Finer search with 2x decimation */ +#ifdef FIXED_POINT + maxcorr=1; +#endif + for (i=0;i>1;i++) + { + opus_val32 sum; + xcorr[i] = 0; + if (abs(i-2*best_pitch[0])>2 && abs(i-2*best_pitch[1])>2) + continue; +#ifdef FIXED_POINT + sum = 0; + for (j=0;j>1;j++) + sum += SHR32(MULT16_16(x_lp[j],y[i+j]), shift); +#else + sum = celt_inner_prod_c(x_lp, y+i, len>>1); +#endif + xcorr[i] = MAX32(-1, sum); +#ifdef FIXED_POINT + maxcorr = MAX32(maxcorr, sum); +#endif + } + find_best_pitch(xcorr, y, len>>1, max_pitch>>1, best_pitch +#ifdef FIXED_POINT + , shift+1, maxcorr +#endif + ); + + /* Refine by pseudo-interpolation */ + if (best_pitch[0]>0 && best_pitch[0]<(max_pitch>>1)-1) + { + opus_val32 a, b, c; + a = xcorr[best_pitch[0]-1]; + b = xcorr[best_pitch[0]]; + c = xcorr[best_pitch[0]+1]; + if ((c-a) > MULT16_32_Q15(QCONST16(.7f,15),b-a)) + offset = 1; + else if ((a-c) > MULT16_32_Q15(QCONST16(.7f,15),b-c)) + offset = -1; + else + offset = 0; + } else { + offset = 0; + } + *pitch = 2*best_pitch[0]-offset; + + RESTORE_STACK; +} + +static const int second_check[16] = {0, 0, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2}; +opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, + int N, int *T0_, int prev_period, opus_val16 prev_gain, int arch) +{ + int k, i, T, T0; + opus_val16 g, g0; + opus_val16 pg; + opus_val32 xy,xx,yy,xy2; + opus_val32 xcorr[3]; + opus_val32 best_xy, best_yy; + int offset; + int minperiod0; + VARDECL(opus_val32, yy_lookup); + SAVE_STACK; + + minperiod0 = minperiod; + maxperiod /= 2; + minperiod /= 2; + *T0_ /= 2; + prev_period /= 2; + N /= 2; + x += maxperiod; + if (*T0_>=maxperiod) + *T0_=maxperiod-1; + + T = T0 = *T0_; + ALLOC(yy_lookup, maxperiod+1, opus_val32); + dual_inner_prod(x, x, x-T0, N, &xx, &xy, arch); + yy_lookup[0] = xx; + yy=xx; + for (i=1;i<=maxperiod;i++) + { + yy = yy+MULT16_16(x[-i],x[-i])-MULT16_16(x[N-i],x[N-i]); + yy_lookup[i] = MAX32(0, yy); + } + yy = yy_lookup[T0]; + best_xy = xy; + best_yy = yy; +#ifdef FIXED_POINT + { + opus_val32 x2y2; + int sh, t; + x2y2 = 1+HALF32(MULT32_32_Q31(xx,yy)); + sh = celt_ilog2(x2y2)>>1; + t = VSHR32(x2y2, 2*(sh-7)); + g = g0 = VSHR32(MULT16_32_Q15(celt_rsqrt_norm(t), xy),sh+1); + } +#else + g = g0 = xy/celt_sqrt(1+xx*yy); +#endif + /* Look for any pitch at T/k */ + for (k=2;k<=15;k++) + { + int T1, T1b; + opus_val16 g1; + opus_val16 cont=0; + opus_val16 thresh; + T1 = celt_udiv(2*T0+k, 2*k); + if (T1 < minperiod) + break; + /* Look for another strong correlation at T1b */ + if (k==2) + { + if (T1+T0>maxperiod) + T1b = T0; + else + T1b = T0+T1; + } else + { + T1b = celt_udiv(2*second_check[k]*T0+k, 2*k); + } + dual_inner_prod(x, &x[-T1], &x[-T1b], N, &xy, &xy2, arch); + xy += xy2; + yy = yy_lookup[T1] + yy_lookup[T1b]; +#ifdef FIXED_POINT + { + opus_val32 x2y2; + int sh, t; + x2y2 = 1+MULT32_32_Q31(xx,yy); + sh = celt_ilog2(x2y2)>>1; + t = VSHR32(x2y2, 2*(sh-7)); + g1 = VSHR32(MULT16_32_Q15(celt_rsqrt_norm(t), xy),sh+1); + } +#else + g1 = xy/celt_sqrt(1+2.f*xx*1.f*yy); +#endif + if (abs(T1-prev_period)<=1) + cont = prev_gain; + else if (abs(T1-prev_period)<=2 && 5*k*k < T0) + cont = HALF32(prev_gain); + else + cont = 0; + thresh = MAX16(QCONST16(.3f,15), MULT16_16_Q15(QCONST16(.7f,15),g0)-cont); + /* Bias against very high pitch (very short period) to avoid false-positives + due to short-term correlation */ + if (T1<3*minperiod) + thresh = MAX16(QCONST16(.4f,15), MULT16_16_Q15(QCONST16(.85f,15),g0)-cont); + else if (T1<2*minperiod) + thresh = MAX16(QCONST16(.5f,15), MULT16_16_Q15(QCONST16(.9f,15),g0)-cont); + if (g1 > thresh) + { + best_xy = xy; + best_yy = yy; + T = T1; + g = g1; + } + } + best_xy = MAX32(0, best_xy); + if (best_yy <= best_xy) + pg = Q15ONE; + else + pg = SHR32(frac_div32(best_xy,best_yy+1),16); + + for (k=0;k<3;k++) + xcorr[k] = celt_inner_prod(x, x-(T+k-1), N, arch); + if ((xcorr[2]-xcorr[0]) > MULT16_32_Q15(QCONST16(.7f,15),xcorr[1]-xcorr[0])) + offset = 1; + else if ((xcorr[0]-xcorr[2]) > MULT16_32_Q15(QCONST16(.7f,15),xcorr[1]-xcorr[2])) + offset = -1; + else + offset = 0; + if (pg > g) + pg = g; + *T0_ = 2*T+offset; + + if (*T0_=3); + y_3=0; /* gcc doesn't realize that y_3 can't be used uninitialized */ + y_0=*y++; + y_1=*y++; + y_2=*y++; + for (j=0;j +#include "os_support.h" +#include "arch.h" +#include "mathops.h" +#include "stack_alloc.h" +#include "rate.h" + +#ifdef FIXED_POINT +/* Mean energy in each band quantized in Q4 */ +const signed char eMeans[25] = { + 103,100, 92, 85, 81, + 77, 72, 70, 78, 75, + 73, 71, 78, 74, 69, + 72, 70, 74, 76, 71, + 60, 60, 60, 60, 60 +}; +#else +/* Mean energy in each band quantized in Q4 and converted back to float */ +const opus_val16 eMeans[25] = { + 6.437500f, 6.250000f, 5.750000f, 5.312500f, 5.062500f, + 4.812500f, 4.500000f, 4.375000f, 4.875000f, 4.687500f, + 4.562500f, 4.437500f, 4.875000f, 4.625000f, 4.312500f, + 4.500000f, 4.375000f, 4.625000f, 4.750000f, 4.437500f, + 3.750000f, 3.750000f, 3.750000f, 3.750000f, 3.750000f +}; +#endif +/* prediction coefficients: 0.9, 0.8, 0.65, 0.5 */ +#ifdef FIXED_POINT +static const opus_val16 pred_coef[4] = {29440, 26112, 21248, 16384}; +static const opus_val16 beta_coef[4] = {30147, 22282, 12124, 6554}; +static const opus_val16 beta_intra = 4915; +#else +static const opus_val16 pred_coef[4] = {29440/32768., 26112/32768., 21248/32768., 16384/32768.}; +static const opus_val16 beta_coef[4] = {30147/32768., 22282/32768., 12124/32768., 6554/32768.}; +static const opus_val16 beta_intra = 4915/32768.; +#endif + +/*Parameters of the Laplace-like probability models used for the coarse energy. + There is one pair of parameters for each frame size, prediction type + (inter/intra), and band number. + The first number of each pair is the probability of 0, and the second is the + decay rate, both in Q8 precision.*/ +static const unsigned char e_prob_model[4][2][42] = { + /*120 sample frames.*/ + { + /*Inter*/ + { + 72, 127, 65, 129, 66, 128, 65, 128, 64, 128, 62, 128, 64, 128, + 64, 128, 92, 78, 92, 79, 92, 78, 90, 79, 116, 41, 115, 40, + 114, 40, 132, 26, 132, 26, 145, 17, 161, 12, 176, 10, 177, 11 + }, + /*Intra*/ + { + 24, 179, 48, 138, 54, 135, 54, 132, 53, 134, 56, 133, 55, 132, + 55, 132, 61, 114, 70, 96, 74, 88, 75, 88, 87, 74, 89, 66, + 91, 67, 100, 59, 108, 50, 120, 40, 122, 37, 97, 43, 78, 50 + } + }, + /*240 sample frames.*/ + { + /*Inter*/ + { + 83, 78, 84, 81, 88, 75, 86, 74, 87, 71, 90, 73, 93, 74, + 93, 74, 109, 40, 114, 36, 117, 34, 117, 34, 143, 17, 145, 18, + 146, 19, 162, 12, 165, 10, 178, 7, 189, 6, 190, 8, 177, 9 + }, + /*Intra*/ + { + 23, 178, 54, 115, 63, 102, 66, 98, 69, 99, 74, 89, 71, 91, + 73, 91, 78, 89, 86, 80, 92, 66, 93, 64, 102, 59, 103, 60, + 104, 60, 117, 52, 123, 44, 138, 35, 133, 31, 97, 38, 77, 45 + } + }, + /*480 sample frames.*/ + { + /*Inter*/ + { + 61, 90, 93, 60, 105, 42, 107, 41, 110, 45, 116, 38, 113, 38, + 112, 38, 124, 26, 132, 27, 136, 19, 140, 20, 155, 14, 159, 16, + 158, 18, 170, 13, 177, 10, 187, 8, 192, 6, 175, 9, 159, 10 + }, + /*Intra*/ + { + 21, 178, 59, 110, 71, 86, 75, 85, 84, 83, 91, 66, 88, 73, + 87, 72, 92, 75, 98, 72, 105, 58, 107, 54, 115, 52, 114, 55, + 112, 56, 129, 51, 132, 40, 150, 33, 140, 29, 98, 35, 77, 42 + } + }, + /*960 sample frames.*/ + { + /*Inter*/ + { + 42, 121, 96, 66, 108, 43, 111, 40, 117, 44, 123, 32, 120, 36, + 119, 33, 127, 33, 134, 34, 139, 21, 147, 23, 152, 20, 158, 25, + 154, 26, 166, 21, 173, 16, 184, 13, 184, 10, 150, 13, 139, 15 + }, + /*Intra*/ + { + 22, 178, 63, 114, 74, 82, 84, 83, 92, 82, 103, 62, 96, 72, + 96, 67, 101, 73, 107, 72, 113, 55, 118, 52, 125, 52, 118, 52, + 117, 55, 135, 49, 137, 39, 157, 32, 145, 29, 97, 33, 77, 40 + } + } +}; + +static const unsigned char small_energy_icdf[3]={2,1,0}; + +static opus_val32 loss_distortion(const opus_val16 *eBands, opus_val16 *oldEBands, int start, int end, int len, int C) +{ + int c, i; + opus_val32 dist = 0; + c=0; do { + for (i=start;inbEBands]; + oldE = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); +#ifdef FIXED_POINT + f = SHL32(EXTEND32(x),7) - PSHR32(MULT16_16(coef,oldE), 8) - prev[c]; + /* Rounding to nearest integer here is really important! */ + qi = (f+QCONST32(.5f,DB_SHIFT+7))>>(DB_SHIFT+7); + decay_bound = EXTRACT16(MAX32(-QCONST16(28.f,DB_SHIFT), + SUB32((opus_val32)oldEBands[i+c*m->nbEBands],max_decay))); +#else + f = x-coef*oldE-prev[c]; + /* Rounding to nearest integer here is really important! */ + qi = (int)floor(.5f+f); + decay_bound = MAX16(-QCONST16(28.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]) - max_decay; +#endif + /* Prevent the energy from going down too quickly (e.g. for bands + that have just one bin) */ + if (qi < 0 && x < decay_bound) + { + qi += (int)SHR16(SUB16(decay_bound,x), DB_SHIFT); + if (qi > 0) + qi = 0; + } + qi0 = qi; + /* If we don't have enough bits to encode all the energy, just assume + something safe. */ + tell = ec_tell(enc); + bits_left = budget-tell-3*C*(end-i); + if (i!=start && bits_left < 30) + { + if (bits_left < 24) + qi = IMIN(1, qi); + if (bits_left < 16) + qi = IMAX(-1, qi); + } + if (lfe && i>=2) + qi = IMIN(qi, 0); + if (budget-tell >= 15) + { + int pi; + pi = 2*IMIN(i,20); + ec_laplace_encode(enc, &qi, + prob_model[pi]<<7, prob_model[pi+1]<<6); + } + else if(budget-tell >= 2) + { + qi = IMAX(-1, IMIN(qi, 1)); + ec_enc_icdf(enc, 2*qi^-(qi<0), small_energy_icdf, 2); + } + else if(budget-tell >= 1) + { + qi = IMIN(0, qi); + ec_enc_bit_logp(enc, -qi, 1); + } + else + qi = -1; + error[i+c*m->nbEBands] = PSHR32(f,7) - SHL16(qi,DB_SHIFT); + badness += abs(qi0-qi); + q = (opus_val32)SHL32(EXTEND32(qi),DB_SHIFT); + + tmp = PSHR32(MULT16_16(coef,oldE),8) + prev[c] + SHL32(q,7); +#ifdef FIXED_POINT + tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp); +#endif + oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7); + prev[c] = prev[c] + SHL32(q,7) - MULT16_16(beta,PSHR32(q,8)); + } while (++c < C); + } + return lfe ? 0 : badness; +} + +void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, + const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget, + opus_val16 *error, ec_enc *enc, int C, int LM, int nbAvailableBytes, + int force_intra, opus_val32 *delayedIntra, int two_pass, int loss_rate, int lfe) +{ + int intra; + opus_val16 max_decay; + VARDECL(opus_val16, oldEBands_intra); + VARDECL(opus_val16, error_intra); + ec_enc enc_start_state; + opus_uint32 tell; + int badness1=0; + opus_int32 intra_bias; + opus_val32 new_distortion; + SAVE_STACK; + + intra = force_intra || (!two_pass && *delayedIntra>2*C*(end-start) && nbAvailableBytes > (end-start)*C); + intra_bias = (opus_int32)((budget**delayedIntra*loss_rate)/(C*512)); + new_distortion = loss_distortion(eBands, oldEBands, start, effEnd, m->nbEBands, C); + + tell = ec_tell(enc); + if (tell+3 > budget) + two_pass = intra = 0; + + max_decay = QCONST16(16.f,DB_SHIFT); + if (end-start>10) + { +#ifdef FIXED_POINT + max_decay = MIN32(max_decay, SHL32(EXTEND32(nbAvailableBytes),DB_SHIFT-3)); +#else + max_decay = MIN32(max_decay, .125f*nbAvailableBytes); +#endif + } + if (lfe) + max_decay = QCONST16(3.f,DB_SHIFT); + enc_start_state = *enc; + + ALLOC(oldEBands_intra, C*m->nbEBands, opus_val16); + ALLOC(error_intra, C*m->nbEBands, opus_val16); + OPUS_COPY(oldEBands_intra, oldEBands, C*m->nbEBands); + + if (two_pass || intra) + { + badness1 = quant_coarse_energy_impl(m, start, end, eBands, oldEBands_intra, budget, + tell, e_prob_model[LM][1], error_intra, enc, C, LM, 1, max_decay, lfe); + } + + if (!intra) + { + unsigned char *intra_buf; + ec_enc enc_intra_state; + opus_int32 tell_intra; + opus_uint32 nstart_bytes; + opus_uint32 nintra_bytes; + opus_uint32 save_bytes; + int badness2; + VARDECL(unsigned char, intra_bits); + + tell_intra = ec_tell_frac(enc); + + enc_intra_state = *enc; + + nstart_bytes = ec_range_bytes(&enc_start_state); + nintra_bytes = ec_range_bytes(&enc_intra_state); + intra_buf = ec_get_buffer(&enc_intra_state) + nstart_bytes; + save_bytes = nintra_bytes-nstart_bytes; + if (save_bytes == 0) + save_bytes = ALLOC_NONE; + ALLOC(intra_bits, save_bytes, unsigned char); + /* Copy bits from intra bit-stream */ + OPUS_COPY(intra_bits, intra_buf, nintra_bytes - nstart_bytes); + + *enc = enc_start_state; + + badness2 = quant_coarse_energy_impl(m, start, end, eBands, oldEBands, budget, + tell, e_prob_model[LM][intra], error, enc, C, LM, 0, max_decay, lfe); + + if (two_pass && (badness1 < badness2 || (badness1 == badness2 && ((opus_int32)ec_tell_frac(enc))+intra_bias > tell_intra))) + { + *enc = enc_intra_state; + /* Copy intra bits to bit-stream */ + OPUS_COPY(intra_buf, intra_bits, nintra_bytes - nstart_bytes); + OPUS_COPY(oldEBands, oldEBands_intra, C*m->nbEBands); + OPUS_COPY(error, error_intra, C*m->nbEBands); + intra = 1; + } + } else { + OPUS_COPY(oldEBands, oldEBands_intra, C*m->nbEBands); + OPUS_COPY(error, error_intra, C*m->nbEBands); + } + + if (intra) + *delayedIntra = new_distortion; + else + *delayedIntra = ADD32(MULT16_32_Q15(MULT16_16_Q15(pred_coef[LM], pred_coef[LM]),*delayedIntra), + new_distortion); + + RESTORE_STACK; +} + +void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C) +{ + int i, c; + + /* Encode finer resolution */ + for (i=start;inbEBands]+QCONST16(.5f,DB_SHIFT))>>(DB_SHIFT-fine_quant[i]); +#else + q2 = (int)floor((error[i+c*m->nbEBands]+.5f)*frac); +#endif + if (q2 > frac-1) + q2 = frac-1; + if (q2<0) + q2 = 0; + ec_enc_bits(enc, q2, fine_quant[i]); +#ifdef FIXED_POINT + offset = SUB16(SHR32(SHL32(EXTEND32(q2),DB_SHIFT)+QCONST16(.5f,DB_SHIFT),fine_quant[i]),QCONST16(.5f,DB_SHIFT)); +#else + offset = (q2+.5f)*(1<<(14-fine_quant[i]))*(1.f/16384) - .5f; +#endif + oldEBands[i+c*m->nbEBands] += offset; + error[i+c*m->nbEBands] -= offset; + /*printf ("%f ", error[i] - offset);*/ + } while (++c < C); + } +} + +void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C) +{ + int i, prio, c; + + /* Use up the remaining bits */ + for (prio=0;prio<2;prio++) + { + for (i=start;i=C ;i++) + { + if (fine_quant[i] >= MAX_FINE_BITS || fine_priority[i]!=prio) + continue; + c=0; + do { + int q2; + opus_val16 offset; + q2 = error[i+c*m->nbEBands]<0 ? 0 : 1; + ec_enc_bits(enc, q2, 1); +#ifdef FIXED_POINT + offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1); +#else + offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384); +#endif + oldEBands[i+c*m->nbEBands] += offset; + bits_left--; + } while (++c < C); + } + } +} + +void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM) +{ + const unsigned char *prob_model = e_prob_model[LM][intra]; + int i, c; + opus_val32 prev[2] = {0, 0}; + opus_val16 coef; + opus_val16 beta; + opus_int32 budget; + opus_int32 tell; + + if (intra) + { + coef = 0; + beta = beta_intra; + } else { + beta = beta_coef[LM]; + coef = pred_coef[LM]; + } + + budget = dec->storage*8; + + /* Decode at a fixed coarse resolution */ + for (i=start;i=15) + { + int pi; + pi = 2*IMIN(i,20); + qi = ec_laplace_decode(dec, + prob_model[pi]<<7, prob_model[pi+1]<<6); + } + else if(budget-tell>=2) + { + qi = ec_dec_icdf(dec, small_energy_icdf, 2); + qi = (qi>>1)^-(qi&1); + } + else if(budget-tell>=1) + { + qi = -ec_dec_bit_logp(dec, 1); + } + else + qi = -1; + q = (opus_val32)SHL32(EXTEND32(qi),DB_SHIFT); + + oldEBands[i+c*m->nbEBands] = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); + tmp = PSHR32(MULT16_16(coef,oldEBands[i+c*m->nbEBands]),8) + prev[c] + SHL32(q,7); +#ifdef FIXED_POINT + tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp); +#endif + oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7); + prev[c] = prev[c] + SHL32(q,7) - MULT16_16(beta,PSHR32(q,8)); + } while (++c < C); + } +} + +void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C) +{ + int i, c; + /* Decode finer resolution */ + for (i=start;inbEBands] += offset; + } while (++c < C); + } +} + +void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C) +{ + int i, prio, c; + + /* Use up the remaining bits */ + for (prio=0;prio<2;prio++) + { + for (i=start;i=C ;i++) + { + if (fine_quant[i] >= MAX_FINE_BITS || fine_priority[i]!=prio) + continue; + c=0; + do { + int q2; + opus_val16 offset; + q2 = ec_dec_bits(dec, 1); +#ifdef FIXED_POINT + offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1); +#else + offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384); +#endif + oldEBands[i+c*m->nbEBands] += offset; + bits_left--; + } while (++c < C); + } + } +} + +void amp2Log2(const CELTMode *m, int effEnd, int end, + celt_ener *bandE, opus_val16 *bandLogE, int C) +{ + int c, i; + c=0; + do { + for (i=0;inbEBands] = + celt_log2(SHL32(bandE[i+c*m->nbEBands],2)) + - SHL16((opus_val16)eMeans[i],6); + for (i=effEnd;inbEBands+i] = -QCONST16(14.f,DB_SHIFT); + } while (++c < C); +} diff --git a/asm/libs/opus/celt/quant_bands.h b/asm/libs/opus/celt/quant_bands.h new file mode 100644 index 00000000..0490bca4 --- /dev/null +++ b/asm/libs/opus/celt/quant_bands.h @@ -0,0 +1,66 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef QUANT_BANDS +#define QUANT_BANDS + +#include "arch.h" +#include "modes.h" +#include "entenc.h" +#include "entdec.h" +#include "mathops.h" + +#ifdef FIXED_POINT +extern const signed char eMeans[25]; +#else +extern const opus_val16 eMeans[25]; +#endif + +void amp2Log2(const CELTMode *m, int effEnd, int end, + celt_ener *bandE, opus_val16 *bandLogE, int C); + +void log2Amp(const CELTMode *m, int start, int end, + celt_ener *eBands, const opus_val16 *oldEBands, int C); + +void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, + const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget, + opus_val16 *error, ec_enc *enc, int C, int LM, + int nbAvailableBytes, int force_intra, opus_val32 *delayedIntra, + int two_pass, int loss_rate, int lfe); + +void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C); + +void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C); + +void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM); + +void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C); + +void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C); + +#endif /* QUANT_BANDS */ diff --git a/asm/libs/opus/celt/rate.c b/asm/libs/opus/celt/rate.c new file mode 100644 index 00000000..b28d8fec --- /dev/null +++ b/asm/libs/opus/celt/rate.c @@ -0,0 +1,639 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "modes.h" +#include "cwrs.h" +#include "arch.h" +#include "os_support.h" + +#include "entcode.h" +#include "rate.h" + +static const unsigned char LOG2_FRAC_TABLE[24]={ + 0, + 8,13, + 16,19,21,23, + 24,26,27,28,29,30,31,32, + 32,33,34,34,35,36,36,37,37 +}; + +#ifdef CUSTOM_MODES + +/*Determines if V(N,K) fits in a 32-bit unsigned integer. + N and K are themselves limited to 15 bits.*/ +static int fits_in32(int _n, int _k) +{ + static const opus_int16 maxN[15] = { + 32767, 32767, 32767, 1476, 283, 109, 60, 40, + 29, 24, 20, 18, 16, 14, 13}; + static const opus_int16 maxK[15] = { + 32767, 32767, 32767, 32767, 1172, 238, 95, 53, + 36, 27, 22, 18, 16, 15, 13}; + if (_n>=14) + { + if (_k>=14) + return 0; + else + return _n <= maxN[_k]; + } else { + return _k <= maxK[_n]; + } +} + +void compute_pulse_cache(CELTMode *m, int LM) +{ + int C; + int i; + int j; + int curr=0; + int nbEntries=0; + int entryN[100], entryK[100], entryI[100]; + const opus_int16 *eBands = m->eBands; + PulseCache *cache = &m->cache; + opus_int16 *cindex; + unsigned char *bits; + unsigned char *cap; + + cindex = (opus_int16 *)opus_alloc(sizeof(cache->index[0])*m->nbEBands*(LM+2)); + cache->index = cindex; + + /* Scan for all unique band sizes */ + for (i=0;i<=LM+1;i++) + { + for (j=0;jnbEBands;j++) + { + int k; + int N = (eBands[j+1]-eBands[j])<>1; + cindex[i*m->nbEBands+j] = -1; + /* Find other bands that have the same size */ + for (k=0;k<=i;k++) + { + int n; + for (n=0;nnbEBands && (k!=i || n>1) + { + cindex[i*m->nbEBands+j] = cindex[k*m->nbEBands+n]; + break; + } + } + } + if (cache->index[i*m->nbEBands+j] == -1 && N!=0) + { + int K; + entryN[nbEntries] = N; + K = 0; + while (fits_in32(N,get_pulses(K+1)) && KnbEBands+j] = curr; + entryI[nbEntries] = curr; + + curr += K+1; + nbEntries++; + } + } + } + bits = (unsigned char *)opus_alloc(sizeof(unsigned char)*curr); + cache->bits = bits; + cache->size = curr; + /* Compute the cache for all unique sizes */ + for (i=0;icaps = cap = (unsigned char *)opus_alloc(sizeof(cache->caps[0])*(LM+1)*2*m->nbEBands); + for (i=0;i<=LM;i++) + { + for (C=1;C<=2;C++) + { + for (j=0;jnbEBands;j++) + { + int N0; + int max_bits; + N0 = m->eBands[j+1]-m->eBands[j]; + /* N=1 bands only have a sign bit and fine bits. */ + if (N0<1 are even, including custom modes.*/ + if (N0 > 2) + { + N0>>=1; + LM0--; + } + /* N0=1 bands can't be split down to N<2. */ + else if (N0 <= 1) + { + LM0=IMIN(i,1); + N0<<=LM0; + } + /* Compute the cost for the lowest-level PVQ of a fully split + band. */ + pcache = bits + cindex[(LM0+1)*m->nbEBands+j]; + max_bits = pcache[pcache[0]]+1; + /* Add in the cost of coding regular splits. */ + N = N0; + for(k=0;klogN[j]+((LM0+k)<>1)-QTHETA_OFFSET; + /* The number of qtheta bits we'll allocate if the remainder + is to be max_bits. + The average measured cost for theta is 0.89701 times qb, + approximated here as 459/512. */ + num=459*(opus_int32)((2*N-1)*offset+max_bits); + den=((opus_int32)(2*N-1)<<9)-459; + qb = IMIN((num+(den>>1))/den, 57); + celt_assert(qb >= 0); + max_bits += qb; + N <<= 1; + } + /* Add in the cost of a stereo split, if necessary. */ + if (C==2) + { + max_bits <<= 1; + offset = ((m->logN[j]+(i<>1)-(N==2?QTHETA_OFFSET_TWOPHASE:QTHETA_OFFSET); + ndof = 2*N-1-(N==2); + /* The average measured cost for theta with the step PDF is + 0.95164 times qb, approximated here as 487/512. */ + num = (N==2?512:487)*(opus_int32)(max_bits+ndof*offset); + den = ((opus_int32)ndof<<9)-(N==2?512:487); + qb = IMIN((num+(den>>1))/den, (N==2?64:61)); + celt_assert(qb >= 0); + max_bits += qb; + } + /* Add the fine bits we'll use. */ + /* Compensate for the extra DoF in stereo */ + ndof = C*N + ((C==2 && N>2) ? 1 : 0); + /* Offset the number of fine bits by log2(N)/2 + FINE_OFFSET + compared to their "fair share" of total/N */ + offset = ((m->logN[j] + (i<>1)-FINE_OFFSET; + /* N=2 is the only point that doesn't match the curve */ + if (N==2) + offset += 1<>2; + /* The number of fine bits we'll allocate if the remainder is + to be max_bits. */ + num = max_bits+ndof*offset; + den = (ndof-1)<>1))/den, MAX_FINE_BITS); + celt_assert(qb >= 0); + max_bits += C*qb<eBands[j+1]-m->eBands[j])<= 0); + celt_assert(max_bits < 256); + *cap++ = (unsigned char)max_bits; + } + } + } +} + +#endif /* CUSTOM_MODES */ + +#define ALLOC_STEPS 6 + +static OPUS_INLINE int interp_bits2pulses(const CELTMode *m, int start, int end, int skip_start, + const int *bits1, const int *bits2, const int *thresh, const int *cap, opus_int32 total, opus_int32 *_balance, + int skip_rsv, int *intensity, int intensity_rsv, int *dual_stereo, int dual_stereo_rsv, int *bits, + int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth) +{ + opus_int32 psum; + int lo, hi; + int i, j; + int logM; + int stereo; + int codedBands=-1; + int alloc_floor; + opus_int32 left, percoeff; + int done; + opus_int32 balance; + SAVE_STACK; + + alloc_floor = C<1; + + logM = LM<>1; + psum = 0; + done = 0; + for (j=end;j-->start;) + { + int tmp = bits1[j] + (mid*(opus_int32)bits2[j]>>ALLOC_STEPS); + if (tmp >= thresh[j] || done) + { + done = 1; + /* Don't allocate more than we can actually use */ + psum += IMIN(tmp, cap[j]); + } else { + if (tmp >= alloc_floor) + psum += alloc_floor; + } + } + if (psum > total) + hi = mid; + else + lo = mid; + } + psum = 0; + /*printf ("interp bisection gave %d\n", lo);*/ + done = 0; + for (j=end;j-->start;) + { + int tmp = bits1[j] + (lo*bits2[j]>>ALLOC_STEPS); + if (tmp < thresh[j] && !done) + { + if (tmp >= alloc_floor) + tmp = alloc_floor; + else + tmp = 0; + } else + done = 1; + /* Don't allocate more than we can actually use */ + tmp = IMIN(tmp, cap[j]); + bits[j] = tmp; + psum += tmp; + } + + /* Decide which bands to skip, working backwards from the end. */ + for (codedBands=end;;codedBands--) + { + int band_width; + int band_bits; + int rem; + j = codedBands-1; + /* Never skip the first band, nor a band that has been boosted by + dynalloc. + In the first case, we'd be coding a bit to signal we're going to waste + all the other bits. + In the second case, we'd be coding a bit to redistribute all the bits + we just signaled should be cocentrated in this band. */ + if (j<=skip_start) + { + /* Give the bit we reserved to end skipping back. */ + total += skip_rsv; + break; + } + /*Figure out how many left-over bits we would be adding to this band. + This can include bits we've stolen back from higher, skipped bands.*/ + left = total-psum; + percoeff = celt_udiv(left, m->eBands[codedBands]-m->eBands[start]); + left -= (m->eBands[codedBands]-m->eBands[start])*percoeff; + rem = IMAX(left-(m->eBands[j]-m->eBands[start]),0); + band_width = m->eBands[codedBands]-m->eBands[j]; + band_bits = (int)(bits[j] + percoeff*band_width + rem); + /*Only code a skip decision if we're above the threshold for this band. + Otherwise it is force-skipped. + This ensures that we have enough bits to code the skip flag.*/ + if (band_bits >= IMAX(thresh[j], alloc_floor+(1< ((j>4 && j<=signalBandwidth)) +#endif + { + ec_enc_bit_logp(ec, 1, 1); + break; + } + ec_enc_bit_logp(ec, 0, 1); + } else if (ec_dec_bit_logp(ec, 1)) { + break; + } + /*We used a bit to skip this band.*/ + psum += 1< 0) + intensity_rsv = LOG2_FRAC_TABLE[j-start]; + psum += intensity_rsv; + if (band_bits >= alloc_floor) + { + /*If we have enough for a fine energy bit per channel, use it.*/ + psum += alloc_floor; + bits[j] = alloc_floor; + } else { + /*Otherwise this band gets nothing at all.*/ + bits[j] = 0; + } + } + + celt_assert(codedBands > start); + /* Code the intensity and dual stereo parameters. */ + if (intensity_rsv > 0) + { + if (encode) + { + *intensity = IMIN(*intensity, codedBands); + ec_enc_uint(ec, *intensity-start, codedBands+1-start); + } + else + *intensity = start+ec_dec_uint(ec, codedBands+1-start); + } + else + *intensity = 0; + if (*intensity <= start) + { + total += dual_stereo_rsv; + dual_stereo_rsv = 0; + } + if (dual_stereo_rsv > 0) + { + if (encode) + ec_enc_bit_logp(ec, *dual_stereo, 1); + else + *dual_stereo = ec_dec_bit_logp(ec, 1); + } + else + *dual_stereo = 0; + + /* Allocate the remaining bits */ + left = total-psum; + percoeff = celt_udiv(left, m->eBands[codedBands]-m->eBands[start]); + left -= (m->eBands[codedBands]-m->eBands[start])*percoeff; + for (j=start;jeBands[j+1]-m->eBands[j])); + for (j=start;jeBands[j+1]-m->eBands[j]); + bits[j] += tmp; + left -= tmp; + } + /*for (j=0;j= 0); + N0 = m->eBands[j+1]-m->eBands[j]; + N=N0<1) + { + excess = MAX32(bit-cap[j],0); + bits[j] = bit-excess; + + /* Compensate for the extra DoF in stereo */ + den=(C*N+ ((C==2 && N>2 && !*dual_stereo && j<*intensity) ? 1 : 0)); + + NClogN = den*(m->logN[j] + logM); + + /* Offset for the number of fine bits by log2(N)/2 + FINE_OFFSET + compared to their "fair share" of total/N */ + offset = (NClogN>>1)-den*FINE_OFFSET; + + /* N=2 is the only point that doesn't match the curve */ + if (N==2) + offset += den<>2; + + /* Changing the offset for allocating the second and third + fine energy bit */ + if (bits[j] + offset < den*2<>2; + else if (bits[j] + offset < den*3<>3; + + /* Divide with rounding */ + ebits[j] = IMAX(0, (bits[j] + offset + (den<<(BITRES-1)))); + ebits[j] = celt_udiv(ebits[j], den)>>BITRES; + + /* Make sure not to bust */ + if (C*ebits[j] > (bits[j]>>BITRES)) + ebits[j] = bits[j] >> stereo >> BITRES; + + /* More than that is useless because that's about as far as PVQ can go */ + ebits[j] = IMIN(ebits[j], MAX_FINE_BITS); + + /* If we rounded down or capped this band, make it a candidate for the + final fine energy pass */ + fine_priority[j] = ebits[j]*(den<= bits[j]+offset; + + /* Remove the allocated fine bits; the rest are assigned to PVQ */ + bits[j] -= C*ebits[j]< 0) + { + int extra_fine; + int extra_bits; + extra_fine = IMIN(excess>>(stereo+BITRES),MAX_FINE_BITS-ebits[j]); + ebits[j] += extra_fine; + extra_bits = extra_fine*C<= excess-balance; + excess -= extra_bits; + } + balance = excess; + + celt_assert(bits[j] >= 0); + celt_assert(ebits[j] >= 0); + } + /* Save any remaining bits over the cap for the rebalancing in + quant_all_bands(). */ + *_balance = balance; + + /* The skipped bands use all their bits for fine energy. */ + for (;j> stereo >> BITRES; + celt_assert(C*ebits[j]<nbEBands; + skip_start = start; + /* Reserve a bit to signal the end of manually skipped bands. */ + skip_rsv = total >= 1<total) + intensity_rsv = 0; + else + { + total -= intensity_rsv; + dual_stereo_rsv = total>=1<eBands[j+1]-m->eBands[j])<>4); + /* Tilt of the allocation curve */ + trim_offset[j] = C*(m->eBands[j+1]-m->eBands[j])*(alloc_trim-5-LM)*(end-j-1) + *(1<<(LM+BITRES))>>6; + /* Giving less resolution to single-coefficient bands because they get + more benefit from having one coarse value per coefficient*/ + if ((m->eBands[j+1]-m->eBands[j])<nbAllocVectors - 1; + do + { + int done = 0; + int psum = 0; + int mid = (lo+hi) >> 1; + for (j=end;j-->start;) + { + int bitsj; + int N = m->eBands[j+1]-m->eBands[j]; + bitsj = C*N*m->allocVectors[mid*len+j]<>2; + if (bitsj > 0) + bitsj = IMAX(0, bitsj + trim_offset[j]); + bitsj += offsets[j]; + if (bitsj >= thresh[j] || done) + { + done = 1; + /* Don't allocate more than we can actually use */ + psum += IMIN(bitsj, cap[j]); + } else { + if (bitsj >= C< total) + hi = mid - 1; + else + lo = mid + 1; + /*printf ("lo = %d, hi = %d\n", lo, hi);*/ + } + while (lo <= hi); + hi = lo--; + /*printf ("interp between %d and %d\n", lo, hi);*/ + for (j=start;jeBands[j+1]-m->eBands[j]; + bits1j = C*N*m->allocVectors[lo*len+j]<>2; + bits2j = hi>=m->nbAllocVectors ? + cap[j] : C*N*m->allocVectors[hi*len+j]<>2; + if (bits1j > 0) + bits1j = IMAX(0, bits1j + trim_offset[j]); + if (bits2j > 0) + bits2j = IMAX(0, bits2j + trim_offset[j]); + if (lo > 0) + bits1j += offsets[j]; + bits2j += offsets[j]; + if (offsets[j]>0) + skip_start = j; + bits2j = IMAX(0,bits2j-bits1j); + bits1[j] = bits1j; + bits2[j] = bits2j; + } + codedBands = interp_bits2pulses(m, start, end, skip_start, bits1, bits2, thresh, cap, + total, balance, skip_rsv, intensity, intensity_rsv, dual_stereo, dual_stereo_rsv, + pulses, ebits, fine_priority, C, LM, ec, encode, prev, signalBandwidth); + RESTORE_STACK; + return codedBands; +} + diff --git a/asm/libs/opus/celt/rate.h b/asm/libs/opus/celt/rate.h new file mode 100644 index 00000000..515f7687 --- /dev/null +++ b/asm/libs/opus/celt/rate.h @@ -0,0 +1,101 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef RATE_H +#define RATE_H + +#define MAX_PSEUDO 40 +#define LOG_MAX_PSEUDO 6 + +#define CELT_MAX_PULSES 128 + +#define MAX_FINE_BITS 8 + +#define FINE_OFFSET 21 +#define QTHETA_OFFSET 4 +#define QTHETA_OFFSET_TWOPHASE 16 + +#include "cwrs.h" +#include "modes.h" + +void compute_pulse_cache(CELTMode *m, int LM); + +static OPUS_INLINE int get_pulses(int i) +{ + return i<8 ? i : (8 + (i&7)) << ((i>>3)-1); +} + +static OPUS_INLINE int bits2pulses(const CELTMode *m, int band, int LM, int bits) +{ + int i; + int lo, hi; + const unsigned char *cache; + + LM++; + cache = m->cache.bits + m->cache.index[LM*m->nbEBands+band]; + + lo = 0; + hi = cache[0]; + bits--; + for (i=0;i>1; + /* OPT: Make sure this is implemented with a conditional move */ + if ((int)cache[mid] >= bits) + hi = mid; + else + lo = mid; + } + if (bits- (lo == 0 ? -1 : (int)cache[lo]) <= (int)cache[hi]-bits) + return lo; + else + return hi; +} + +static OPUS_INLINE int pulses2bits(const CELTMode *m, int band, int LM, int pulses) +{ + const unsigned char *cache; + + LM++; + cache = m->cache.bits + m->cache.index[LM*m->nbEBands+band]; + return pulses == 0 ? 0 : cache[pulses]+1; +} + +/** Compute the pulse allocation, i.e. how many pulses will go in each + * band. + @param m mode + @param offsets Requested increase or decrease in the number of bits for + each band + @param total Number of bands + @param pulses Number of pulses per band (returned) + @return Total number of bits allocated +*/ +int compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stero, + opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth); + +#endif diff --git a/asm/libs/opus/celt/stack_alloc.h b/asm/libs/opus/celt/stack_alloc.h new file mode 100644 index 00000000..2b51c8d8 --- /dev/null +++ b/asm/libs/opus/celt/stack_alloc.h @@ -0,0 +1,184 @@ +/* Copyright (C) 2002-2003 Jean-Marc Valin + Copyright (C) 2007-2009 Xiph.Org Foundation */ +/** + @file stack_alloc.h + @brief Temporary memory allocation on stack +*/ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef STACK_ALLOC_H +#define STACK_ALLOC_H + +#include "opus_types.h" +#include "opus_defines.h" + +#if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA) && !defined (NONTHREADSAFE_PSEUDOSTACK)) +#error "Opus requires one of VAR_ARRAYS, USE_ALLOCA, or NONTHREADSAFE_PSEUDOSTACK be defined to select the temporary allocation mode." +#endif + +#ifdef USE_ALLOCA +# ifdef WIN32 +# include +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# include +# endif +# endif +#endif + +/** + * @def ALIGN(stack, size) + * + * Aligns the stack to a 'size' boundary + * + * @param stack Stack + * @param size New size boundary + */ + +/** + * @def PUSH(stack, size, type) + * + * Allocates 'size' elements of type 'type' on the stack + * + * @param stack Stack + * @param size Number of elements + * @param type Type of element + */ + +/** + * @def VARDECL(var) + * + * Declare variable on stack + * + * @param var Variable to declare + */ + +/** + * @def ALLOC(var, size, type) + * + * Allocate 'size' elements of 'type' on stack + * + * @param var Name of variable to allocate + * @param size Number of elements + * @param type Type of element + */ + +#if defined(VAR_ARRAYS) + +#define VARDECL(type, var) +#define ALLOC(var, size, type) type var[size] +#define SAVE_STACK +#define RESTORE_STACK +#define ALLOC_STACK +/* C99 does not allow VLAs of size zero */ +#define ALLOC_NONE 1 + +#elif defined(USE_ALLOCA) + +#define VARDECL(type, var) type *var + +# ifdef WIN32 +# define ALLOC(var, size, type) var = ((type*)_alloca(sizeof(type)*(size))) +# else +# define ALLOC(var, size, type) var = ((type*)alloca(sizeof(type)*(size))) +# endif + +#define SAVE_STACK +#define RESTORE_STACK +#define ALLOC_STACK +#define ALLOC_NONE 0 + +#else + +#ifdef CELT_C +char *scratch_ptr=0; +char *global_stack=0; +#else +extern char *global_stack; +extern char *scratch_ptr; +#endif /* CELT_C */ + +#ifdef ENABLE_VALGRIND + +#include + +#ifdef CELT_C +char *global_stack_top=0; +#else +extern char *global_stack_top; +#endif /* CELT_C */ + +#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1)) +#define PUSH(stack, size, type) (VALGRIND_MAKE_MEM_NOACCESS(stack, global_stack_top-stack),ALIGN((stack),sizeof(type)/sizeof(char)),VALGRIND_MAKE_MEM_UNDEFINED(stack, ((size)*sizeof(type)/sizeof(char))),(stack)+=(2*(size)*sizeof(type)/sizeof(char)),(type*)((stack)-(2*(size)*sizeof(type)/sizeof(char)))) +#define RESTORE_STACK ((global_stack = _saved_stack),VALGRIND_MAKE_MEM_NOACCESS(global_stack, global_stack_top-global_stack)) +#define ALLOC_STACK char *_saved_stack; ((global_stack = (global_stack==0) ? ((global_stack_top=opus_alloc_scratch(GLOBAL_STACK_SIZE*2)+(GLOBAL_STACK_SIZE*2))-(GLOBAL_STACK_SIZE*2)) : global_stack),VALGRIND_MAKE_MEM_NOACCESS(global_stack, global_stack_top-global_stack)); _saved_stack = global_stack; + +#else + +#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1)) +#define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)/sizeof(char)),(stack)+=(size)*(sizeof(type)/sizeof(char)),(type*)((stack)-(size)*(sizeof(type)/sizeof(char)))) +#if 0 /* Set this to 1 to instrument pseudostack usage */ +#define RESTORE_STACK (printf("%ld %s:%d\n", global_stack-scratch_ptr, __FILE__, __LINE__),global_stack = _saved_stack) +#else +#define RESTORE_STACK (global_stack = _saved_stack) +#endif +#define ALLOC_STACK char *_saved_stack; (global_stack = (global_stack==0) ? (scratch_ptr=opus_alloc_scratch(GLOBAL_STACK_SIZE)) : global_stack); _saved_stack = global_stack; + +#endif /* ENABLE_VALGRIND */ + +#include "os_support.h" +#define VARDECL(type, var) type *var +#define ALLOC(var, size, type) var = PUSH(global_stack, size, type) +#define SAVE_STACK char *_saved_stack = global_stack; +#define ALLOC_NONE 0 + +#endif /* VAR_ARRAYS */ + + +#ifdef ENABLE_VALGRIND + +#include +#define OPUS_CHECK_ARRAY(ptr, len) VALGRIND_CHECK_MEM_IS_DEFINED(ptr, len*sizeof(*ptr)) +#define OPUS_CHECK_VALUE(value) VALGRIND_CHECK_VALUE_IS_DEFINED(value) +#define OPUS_CHECK_ARRAY_COND(ptr, len) VALGRIND_CHECK_MEM_IS_DEFINED(ptr, len*sizeof(*ptr)) +#define OPUS_CHECK_VALUE_COND(value) VALGRIND_CHECK_VALUE_IS_DEFINED(value) +#define OPUS_PRINT_INT(value) do {fprintf(stderr, #value " = %d at %s:%d\n", value, __FILE__, __LINE__);}while(0) +#define OPUS_FPRINTF fprintf + +#else + +static OPUS_INLINE int _opus_false(void) {return 0;} +#define OPUS_CHECK_ARRAY(ptr, len) _opus_false() +#define OPUS_CHECK_VALUE(value) _opus_false() +#define OPUS_PRINT_INT(value) do{}while(0) +#define OPUS_FPRINTF (void) + +#endif + + +#endif /* STACK_ALLOC_H */ diff --git a/asm/libs/opus/celt/static_modes_fixed.h b/asm/libs/opus/celt/static_modes_fixed.h new file mode 100644 index 00000000..8717d626 --- /dev/null +++ b/asm/libs/opus/celt/static_modes_fixed.h @@ -0,0 +1,892 @@ +/* The contents of this file was automatically generated by dump_modes.c + with arguments: 48000 960 + It contains static definitions for some pre-defined modes. */ +#include "modes.h" +#include "rate.h" + +#ifdef HAVE_ARM_NE10 +#define OVERRIDE_FFT 1 +#include "static_modes_fixed_arm_ne10.h" +#endif + +#ifndef DEF_WINDOW120 +#define DEF_WINDOW120 +static const opus_val16 window120[120] = { +2, 20, 55, 108, 178, +266, 372, 494, 635, 792, +966, 1157, 1365, 1590, 1831, +2089, 2362, 2651, 2956, 3276, +3611, 3961, 4325, 4703, 5094, +5499, 5916, 6346, 6788, 7241, +7705, 8179, 8663, 9156, 9657, +10167, 10684, 11207, 11736, 12271, +12810, 13353, 13899, 14447, 14997, +15547, 16098, 16648, 17197, 17744, +18287, 18827, 19363, 19893, 20418, +20936, 21447, 21950, 22445, 22931, +23407, 23874, 24330, 24774, 25208, +25629, 26039, 26435, 26819, 27190, +27548, 27893, 28224, 28541, 28845, +29135, 29411, 29674, 29924, 30160, +30384, 30594, 30792, 30977, 31151, +31313, 31463, 31602, 31731, 31849, +31958, 32057, 32148, 32229, 32303, +32370, 32429, 32481, 32528, 32568, +32604, 32634, 32661, 32683, 32701, +32717, 32729, 32740, 32748, 32754, +32758, 32762, 32764, 32766, 32767, +32767, 32767, 32767, 32767, 32767, +}; +#endif + +#ifndef DEF_LOGN400 +#define DEF_LOGN400 +static const opus_int16 logN400[21] = { +0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 16, 16, 16, 21, 21, 24, 29, 34, 36, }; +#endif + +#ifndef DEF_PULSE_CACHE50 +#define DEF_PULSE_CACHE50 +static const opus_int16 cache_index50[105] = { +-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 41, 41, 41, +82, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41, +41, 41, 41, 123, 123, 123, 164, 164, 240, 266, 283, 295, 41, 41, 41, +41, 41, 41, 41, 41, 123, 123, 123, 123, 240, 240, 240, 266, 266, 305, +318, 328, 336, 123, 123, 123, 123, 123, 123, 123, 123, 240, 240, 240, 240, +305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240, +240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387, +}; +static const unsigned char cache_bits50[392] = { +40, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 40, 15, 23, 28, +31, 34, 36, 38, 39, 41, 42, 43, 44, 45, 46, 47, 47, 49, 50, +51, 52, 53, 54, 55, 55, 57, 58, 59, 60, 61, 62, 63, 63, 65, +66, 67, 68, 69, 70, 71, 71, 40, 20, 33, 41, 48, 53, 57, 61, +64, 66, 69, 71, 73, 75, 76, 78, 80, 82, 85, 87, 89, 91, 92, +94, 96, 98, 101, 103, 105, 107, 108, 110, 112, 114, 117, 119, 121, 123, +124, 126, 128, 40, 23, 39, 51, 60, 67, 73, 79, 83, 87, 91, 94, +97, 100, 102, 105, 107, 111, 115, 118, 121, 124, 126, 129, 131, 135, 139, +142, 145, 148, 150, 153, 155, 159, 163, 166, 169, 172, 174, 177, 179, 35, +28, 49, 65, 78, 89, 99, 107, 114, 120, 126, 132, 136, 141, 145, 149, +153, 159, 165, 171, 176, 180, 185, 189, 192, 199, 205, 211, 216, 220, 225, +229, 232, 239, 245, 251, 21, 33, 58, 79, 97, 112, 125, 137, 148, 157, +166, 174, 182, 189, 195, 201, 207, 217, 227, 235, 243, 251, 17, 35, 63, +86, 106, 123, 139, 152, 165, 177, 187, 197, 206, 214, 222, 230, 237, 250, +25, 31, 55, 75, 91, 105, 117, 128, 138, 146, 154, 161, 168, 174, 180, +185, 190, 200, 208, 215, 222, 229, 235, 240, 245, 255, 16, 36, 65, 89, +110, 128, 144, 159, 173, 185, 196, 207, 217, 226, 234, 242, 250, 11, 41, +74, 103, 128, 151, 172, 191, 209, 225, 241, 255, 9, 43, 79, 110, 138, +163, 186, 207, 227, 246, 12, 39, 71, 99, 123, 144, 164, 182, 198, 214, +228, 241, 253, 9, 44, 81, 113, 142, 168, 192, 214, 235, 255, 7, 49, +90, 127, 160, 191, 220, 247, 6, 51, 95, 134, 170, 203, 234, 7, 47, +87, 123, 155, 184, 212, 237, 6, 52, 97, 137, 174, 208, 240, 5, 57, +106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187, +224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127, +182, 234, }; +static const unsigned char cache_caps50[168] = { +224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185, +178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240, +240, 240, 240, 207, 207, 207, 198, 198, 183, 144, 66, 40, 160, 160, 160, +160, 160, 160, 160, 160, 185, 185, 185, 185, 193, 193, 193, 183, 183, 172, +138, 64, 38, 240, 240, 240, 240, 240, 240, 240, 240, 207, 207, 207, 207, +204, 204, 204, 193, 193, 180, 143, 66, 40, 185, 185, 185, 185, 185, 185, +185, 185, 193, 193, 193, 193, 193, 193, 193, 183, 183, 172, 138, 65, 39, +207, 207, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 201, 201, 201, +188, 188, 176, 141, 66, 40, 193, 193, 193, 193, 193, 193, 193, 193, 193, +193, 193, 193, 194, 194, 194, 184, 184, 173, 139, 65, 39, 204, 204, 204, +204, 204, 204, 204, 204, 201, 201, 201, 201, 198, 198, 198, 187, 187, 175, +140, 66, 40, }; +#endif + +#ifndef FFT_TWIDDLES48000_960 +#define FFT_TWIDDLES48000_960 +static const kiss_twiddle_cpx fft_twiddles48000_960[480] = { +{32767, 0}, {32766, -429}, +{32757, -858}, {32743, -1287}, +{32724, -1715}, {32698, -2143}, +{32667, -2570}, {32631, -2998}, +{32588, -3425}, {32541, -3851}, +{32488, -4277}, {32429, -4701}, +{32364, -5125}, {32295, -5548}, +{32219, -5971}, {32138, -6393}, +{32051, -6813}, {31960, -7231}, +{31863, -7650}, {31760, -8067}, +{31652, -8481}, {31539, -8895}, +{31419, -9306}, {31294, -9716}, +{31165, -10126}, {31030, -10532}, +{30889, -10937}, {30743, -11340}, +{30592, -11741}, {30436, -12141}, +{30274, -12540}, {30107, -12935}, +{29936, -13328}, {29758, -13718}, +{29577, -14107}, {29390, -14493}, +{29197, -14875}, {29000, -15257}, +{28797, -15635}, {28590, -16010}, +{28379, -16384}, {28162, -16753}, +{27940, -17119}, {27714, -17484}, +{27482, -17845}, {27246, -18205}, +{27006, -18560}, {26760, -18911}, +{26510, -19260}, {26257, -19606}, +{25997, -19947}, {25734, -20286}, +{25466, -20621}, {25194, -20952}, +{24918, -21281}, {24637, -21605}, +{24353, -21926}, {24063, -22242}, +{23770, -22555}, {23473, -22865}, +{23171, -23171}, {22866, -23472}, +{22557, -23769}, {22244, -24063}, +{21927, -24352}, {21606, -24636}, +{21282, -24917}, {20954, -25194}, +{20622, -25465}, {20288, -25733}, +{19949, -25997}, {19607, -26255}, +{19261, -26509}, {18914, -26760}, +{18561, -27004}, {18205, -27246}, +{17846, -27481}, {17485, -27713}, +{17122, -27940}, {16755, -28162}, +{16385, -28378}, {16012, -28590}, +{15636, -28797}, {15258, -28999}, +{14878, -29197}, {14494, -29389}, +{14108, -29576}, {13720, -29757}, +{13329, -29934}, {12937, -30107}, +{12540, -30274}, {12142, -30435}, +{11744, -30592}, {11342, -30743}, +{10939, -30889}, {10534, -31030}, +{10127, -31164}, {9718, -31294}, +{9307, -31418}, {8895, -31537}, +{8482, -31652}, {8067, -31759}, +{7650, -31862}, {7233, -31960}, +{6815, -32051}, {6393, -32138}, +{5973, -32219}, {5549, -32294}, +{5127, -32364}, {4703, -32429}, +{4278, -32487}, {3852, -32541}, +{3426, -32588}, {2999, -32630}, +{2572, -32667}, {2144, -32698}, +{1716, -32724}, {1287, -32742}, +{860, -32757}, {430, -32766}, +{0, -32767}, {-429, -32766}, +{-858, -32757}, {-1287, -32743}, +{-1715, -32724}, {-2143, -32698}, +{-2570, -32667}, {-2998, -32631}, +{-3425, -32588}, {-3851, -32541}, +{-4277, -32488}, {-4701, -32429}, +{-5125, -32364}, {-5548, -32295}, +{-5971, -32219}, {-6393, -32138}, +{-6813, -32051}, {-7231, -31960}, +{-7650, -31863}, {-8067, -31760}, +{-8481, -31652}, {-8895, -31539}, +{-9306, -31419}, {-9716, -31294}, +{-10126, -31165}, {-10532, -31030}, +{-10937, -30889}, {-11340, -30743}, +{-11741, -30592}, {-12141, -30436}, +{-12540, -30274}, {-12935, -30107}, +{-13328, -29936}, {-13718, -29758}, +{-14107, -29577}, {-14493, -29390}, +{-14875, -29197}, {-15257, -29000}, +{-15635, -28797}, {-16010, -28590}, +{-16384, -28379}, {-16753, -28162}, +{-17119, -27940}, {-17484, -27714}, +{-17845, -27482}, {-18205, -27246}, +{-18560, -27006}, {-18911, -26760}, +{-19260, -26510}, {-19606, -26257}, +{-19947, -25997}, {-20286, -25734}, +{-20621, -25466}, {-20952, -25194}, +{-21281, -24918}, {-21605, -24637}, +{-21926, -24353}, {-22242, -24063}, +{-22555, -23770}, {-22865, -23473}, +{-23171, -23171}, {-23472, -22866}, +{-23769, -22557}, {-24063, -22244}, +{-24352, -21927}, {-24636, -21606}, +{-24917, -21282}, {-25194, -20954}, +{-25465, -20622}, {-25733, -20288}, +{-25997, -19949}, {-26255, -19607}, +{-26509, -19261}, {-26760, -18914}, +{-27004, -18561}, {-27246, -18205}, +{-27481, -17846}, {-27713, -17485}, +{-27940, -17122}, {-28162, -16755}, +{-28378, -16385}, {-28590, -16012}, +{-28797, -15636}, {-28999, -15258}, +{-29197, -14878}, {-29389, -14494}, +{-29576, -14108}, {-29757, -13720}, +{-29934, -13329}, {-30107, -12937}, +{-30274, -12540}, {-30435, -12142}, +{-30592, -11744}, {-30743, -11342}, +{-30889, -10939}, {-31030, -10534}, +{-31164, -10127}, {-31294, -9718}, +{-31418, -9307}, {-31537, -8895}, +{-31652, -8482}, {-31759, -8067}, +{-31862, -7650}, {-31960, -7233}, +{-32051, -6815}, {-32138, -6393}, +{-32219, -5973}, {-32294, -5549}, +{-32364, -5127}, {-32429, -4703}, +{-32487, -4278}, {-32541, -3852}, +{-32588, -3426}, {-32630, -2999}, +{-32667, -2572}, {-32698, -2144}, +{-32724, -1716}, {-32742, -1287}, +{-32757, -860}, {-32766, -430}, +{-32767, 0}, {-32766, 429}, +{-32757, 858}, {-32743, 1287}, +{-32724, 1715}, {-32698, 2143}, +{-32667, 2570}, {-32631, 2998}, +{-32588, 3425}, {-32541, 3851}, +{-32488, 4277}, {-32429, 4701}, +{-32364, 5125}, {-32295, 5548}, +{-32219, 5971}, {-32138, 6393}, +{-32051, 6813}, {-31960, 7231}, +{-31863, 7650}, {-31760, 8067}, +{-31652, 8481}, {-31539, 8895}, +{-31419, 9306}, {-31294, 9716}, +{-31165, 10126}, {-31030, 10532}, +{-30889, 10937}, {-30743, 11340}, +{-30592, 11741}, {-30436, 12141}, +{-30274, 12540}, {-30107, 12935}, +{-29936, 13328}, {-29758, 13718}, +{-29577, 14107}, {-29390, 14493}, +{-29197, 14875}, {-29000, 15257}, +{-28797, 15635}, {-28590, 16010}, +{-28379, 16384}, {-28162, 16753}, +{-27940, 17119}, {-27714, 17484}, +{-27482, 17845}, {-27246, 18205}, +{-27006, 18560}, {-26760, 18911}, +{-26510, 19260}, {-26257, 19606}, +{-25997, 19947}, {-25734, 20286}, +{-25466, 20621}, {-25194, 20952}, +{-24918, 21281}, {-24637, 21605}, +{-24353, 21926}, {-24063, 22242}, +{-23770, 22555}, {-23473, 22865}, +{-23171, 23171}, {-22866, 23472}, +{-22557, 23769}, {-22244, 24063}, +{-21927, 24352}, {-21606, 24636}, +{-21282, 24917}, {-20954, 25194}, +{-20622, 25465}, {-20288, 25733}, +{-19949, 25997}, {-19607, 26255}, +{-19261, 26509}, {-18914, 26760}, +{-18561, 27004}, {-18205, 27246}, +{-17846, 27481}, {-17485, 27713}, +{-17122, 27940}, {-16755, 28162}, +{-16385, 28378}, {-16012, 28590}, +{-15636, 28797}, {-15258, 28999}, +{-14878, 29197}, {-14494, 29389}, +{-14108, 29576}, {-13720, 29757}, +{-13329, 29934}, {-12937, 30107}, +{-12540, 30274}, {-12142, 30435}, +{-11744, 30592}, {-11342, 30743}, +{-10939, 30889}, {-10534, 31030}, +{-10127, 31164}, {-9718, 31294}, +{-9307, 31418}, {-8895, 31537}, +{-8482, 31652}, {-8067, 31759}, +{-7650, 31862}, {-7233, 31960}, +{-6815, 32051}, {-6393, 32138}, +{-5973, 32219}, {-5549, 32294}, +{-5127, 32364}, {-4703, 32429}, +{-4278, 32487}, {-3852, 32541}, +{-3426, 32588}, {-2999, 32630}, +{-2572, 32667}, {-2144, 32698}, +{-1716, 32724}, {-1287, 32742}, +{-860, 32757}, {-430, 32766}, +{0, 32767}, {429, 32766}, +{858, 32757}, {1287, 32743}, +{1715, 32724}, {2143, 32698}, +{2570, 32667}, {2998, 32631}, +{3425, 32588}, {3851, 32541}, +{4277, 32488}, {4701, 32429}, +{5125, 32364}, {5548, 32295}, +{5971, 32219}, {6393, 32138}, +{6813, 32051}, {7231, 31960}, +{7650, 31863}, {8067, 31760}, +{8481, 31652}, {8895, 31539}, +{9306, 31419}, {9716, 31294}, +{10126, 31165}, {10532, 31030}, +{10937, 30889}, {11340, 30743}, +{11741, 30592}, {12141, 30436}, +{12540, 30274}, {12935, 30107}, +{13328, 29936}, {13718, 29758}, +{14107, 29577}, {14493, 29390}, +{14875, 29197}, {15257, 29000}, +{15635, 28797}, {16010, 28590}, +{16384, 28379}, {16753, 28162}, +{17119, 27940}, {17484, 27714}, +{17845, 27482}, {18205, 27246}, +{18560, 27006}, {18911, 26760}, +{19260, 26510}, {19606, 26257}, +{19947, 25997}, {20286, 25734}, +{20621, 25466}, {20952, 25194}, +{21281, 24918}, {21605, 24637}, +{21926, 24353}, {22242, 24063}, +{22555, 23770}, {22865, 23473}, +{23171, 23171}, {23472, 22866}, +{23769, 22557}, {24063, 22244}, +{24352, 21927}, {24636, 21606}, +{24917, 21282}, {25194, 20954}, +{25465, 20622}, {25733, 20288}, +{25997, 19949}, {26255, 19607}, +{26509, 19261}, {26760, 18914}, +{27004, 18561}, {27246, 18205}, +{27481, 17846}, {27713, 17485}, +{27940, 17122}, {28162, 16755}, +{28378, 16385}, {28590, 16012}, +{28797, 15636}, {28999, 15258}, +{29197, 14878}, {29389, 14494}, +{29576, 14108}, {29757, 13720}, +{29934, 13329}, {30107, 12937}, +{30274, 12540}, {30435, 12142}, +{30592, 11744}, {30743, 11342}, +{30889, 10939}, {31030, 10534}, +{31164, 10127}, {31294, 9718}, +{31418, 9307}, {31537, 8895}, +{31652, 8482}, {31759, 8067}, +{31862, 7650}, {31960, 7233}, +{32051, 6815}, {32138, 6393}, +{32219, 5973}, {32294, 5549}, +{32364, 5127}, {32429, 4703}, +{32487, 4278}, {32541, 3852}, +{32588, 3426}, {32630, 2999}, +{32667, 2572}, {32698, 2144}, +{32724, 1716}, {32742, 1287}, +{32757, 860}, {32766, 430}, +}; +#ifndef FFT_BITREV480 +#define FFT_BITREV480 +static const opus_int16 fft_bitrev480[480] = { +0, 96, 192, 288, 384, 32, 128, 224, 320, 416, 64, 160, 256, 352, 448, +8, 104, 200, 296, 392, 40, 136, 232, 328, 424, 72, 168, 264, 360, 456, +16, 112, 208, 304, 400, 48, 144, 240, 336, 432, 80, 176, 272, 368, 464, +24, 120, 216, 312, 408, 56, 152, 248, 344, 440, 88, 184, 280, 376, 472, +4, 100, 196, 292, 388, 36, 132, 228, 324, 420, 68, 164, 260, 356, 452, +12, 108, 204, 300, 396, 44, 140, 236, 332, 428, 76, 172, 268, 364, 460, +20, 116, 212, 308, 404, 52, 148, 244, 340, 436, 84, 180, 276, 372, 468, +28, 124, 220, 316, 412, 60, 156, 252, 348, 444, 92, 188, 284, 380, 476, +1, 97, 193, 289, 385, 33, 129, 225, 321, 417, 65, 161, 257, 353, 449, +9, 105, 201, 297, 393, 41, 137, 233, 329, 425, 73, 169, 265, 361, 457, +17, 113, 209, 305, 401, 49, 145, 241, 337, 433, 81, 177, 273, 369, 465, +25, 121, 217, 313, 409, 57, 153, 249, 345, 441, 89, 185, 281, 377, 473, +5, 101, 197, 293, 389, 37, 133, 229, 325, 421, 69, 165, 261, 357, 453, +13, 109, 205, 301, 397, 45, 141, 237, 333, 429, 77, 173, 269, 365, 461, +21, 117, 213, 309, 405, 53, 149, 245, 341, 437, 85, 181, 277, 373, 469, +29, 125, 221, 317, 413, 61, 157, 253, 349, 445, 93, 189, 285, 381, 477, +2, 98, 194, 290, 386, 34, 130, 226, 322, 418, 66, 162, 258, 354, 450, +10, 106, 202, 298, 394, 42, 138, 234, 330, 426, 74, 170, 266, 362, 458, +18, 114, 210, 306, 402, 50, 146, 242, 338, 434, 82, 178, 274, 370, 466, +26, 122, 218, 314, 410, 58, 154, 250, 346, 442, 90, 186, 282, 378, 474, +6, 102, 198, 294, 390, 38, 134, 230, 326, 422, 70, 166, 262, 358, 454, +14, 110, 206, 302, 398, 46, 142, 238, 334, 430, 78, 174, 270, 366, 462, +22, 118, 214, 310, 406, 54, 150, 246, 342, 438, 86, 182, 278, 374, 470, +30, 126, 222, 318, 414, 62, 158, 254, 350, 446, 94, 190, 286, 382, 478, +3, 99, 195, 291, 387, 35, 131, 227, 323, 419, 67, 163, 259, 355, 451, +11, 107, 203, 299, 395, 43, 139, 235, 331, 427, 75, 171, 267, 363, 459, +19, 115, 211, 307, 403, 51, 147, 243, 339, 435, 83, 179, 275, 371, 467, +27, 123, 219, 315, 411, 59, 155, 251, 347, 443, 91, 187, 283, 379, 475, +7, 103, 199, 295, 391, 39, 135, 231, 327, 423, 71, 167, 263, 359, 455, +15, 111, 207, 303, 399, 47, 143, 239, 335, 431, 79, 175, 271, 367, 463, +23, 119, 215, 311, 407, 55, 151, 247, 343, 439, 87, 183, 279, 375, 471, +31, 127, 223, 319, 415, 63, 159, 255, 351, 447, 95, 191, 287, 383, 479, +}; +#endif + +#ifndef FFT_BITREV240 +#define FFT_BITREV240 +static const opus_int16 fft_bitrev240[240] = { +0, 48, 96, 144, 192, 16, 64, 112, 160, 208, 32, 80, 128, 176, 224, +4, 52, 100, 148, 196, 20, 68, 116, 164, 212, 36, 84, 132, 180, 228, +8, 56, 104, 152, 200, 24, 72, 120, 168, 216, 40, 88, 136, 184, 232, +12, 60, 108, 156, 204, 28, 76, 124, 172, 220, 44, 92, 140, 188, 236, +1, 49, 97, 145, 193, 17, 65, 113, 161, 209, 33, 81, 129, 177, 225, +5, 53, 101, 149, 197, 21, 69, 117, 165, 213, 37, 85, 133, 181, 229, +9, 57, 105, 153, 201, 25, 73, 121, 169, 217, 41, 89, 137, 185, 233, +13, 61, 109, 157, 205, 29, 77, 125, 173, 221, 45, 93, 141, 189, 237, +2, 50, 98, 146, 194, 18, 66, 114, 162, 210, 34, 82, 130, 178, 226, +6, 54, 102, 150, 198, 22, 70, 118, 166, 214, 38, 86, 134, 182, 230, +10, 58, 106, 154, 202, 26, 74, 122, 170, 218, 42, 90, 138, 186, 234, +14, 62, 110, 158, 206, 30, 78, 126, 174, 222, 46, 94, 142, 190, 238, +3, 51, 99, 147, 195, 19, 67, 115, 163, 211, 35, 83, 131, 179, 227, +7, 55, 103, 151, 199, 23, 71, 119, 167, 215, 39, 87, 135, 183, 231, +11, 59, 107, 155, 203, 27, 75, 123, 171, 219, 43, 91, 139, 187, 235, +15, 63, 111, 159, 207, 31, 79, 127, 175, 223, 47, 95, 143, 191, 239, +}; +#endif + +#ifndef FFT_BITREV120 +#define FFT_BITREV120 +static const opus_int16 fft_bitrev120[120] = { +0, 24, 48, 72, 96, 8, 32, 56, 80, 104, 16, 40, 64, 88, 112, +4, 28, 52, 76, 100, 12, 36, 60, 84, 108, 20, 44, 68, 92, 116, +1, 25, 49, 73, 97, 9, 33, 57, 81, 105, 17, 41, 65, 89, 113, +5, 29, 53, 77, 101, 13, 37, 61, 85, 109, 21, 45, 69, 93, 117, +2, 26, 50, 74, 98, 10, 34, 58, 82, 106, 18, 42, 66, 90, 114, +6, 30, 54, 78, 102, 14, 38, 62, 86, 110, 22, 46, 70, 94, 118, +3, 27, 51, 75, 99, 11, 35, 59, 83, 107, 19, 43, 67, 91, 115, +7, 31, 55, 79, 103, 15, 39, 63, 87, 111, 23, 47, 71, 95, 119, +}; +#endif + +#ifndef FFT_BITREV60 +#define FFT_BITREV60 +static const opus_int16 fft_bitrev60[60] = { +0, 12, 24, 36, 48, 4, 16, 28, 40, 52, 8, 20, 32, 44, 56, +1, 13, 25, 37, 49, 5, 17, 29, 41, 53, 9, 21, 33, 45, 57, +2, 14, 26, 38, 50, 6, 18, 30, 42, 54, 10, 22, 34, 46, 58, +3, 15, 27, 39, 51, 7, 19, 31, 43, 55, 11, 23, 35, 47, 59, +}; +#endif + +#ifndef FFT_STATE48000_960_0 +#define FFT_STATE48000_960_0 +static const kiss_fft_state fft_state48000_960_0 = { +480, /* nfft */ +17476, /* scale */ +8, /* scale_shift */ +-1, /* shift */ +{5, 96, 3, 32, 4, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, }, /* factors */ +fft_bitrev480, /* bitrev */ +fft_twiddles48000_960, /* bitrev */ +#ifdef OVERRIDE_FFT +(arch_fft_state *)&cfg_arch_480, +#else +NULL, +#endif +}; +#endif + +#ifndef FFT_STATE48000_960_1 +#define FFT_STATE48000_960_1 +static const kiss_fft_state fft_state48000_960_1 = { +240, /* nfft */ +17476, /* scale */ +7, /* scale_shift */ +1, /* shift */ +{5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ +fft_bitrev240, /* bitrev */ +fft_twiddles48000_960, /* bitrev */ +#ifdef OVERRIDE_FFT +(arch_fft_state *)&cfg_arch_240, +#else +NULL, +#endif +}; +#endif + +#ifndef FFT_STATE48000_960_2 +#define FFT_STATE48000_960_2 +static const kiss_fft_state fft_state48000_960_2 = { +120, /* nfft */ +17476, /* scale */ +6, /* scale_shift */ +2, /* shift */ +{5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ +fft_bitrev120, /* bitrev */ +fft_twiddles48000_960, /* bitrev */ +#ifdef OVERRIDE_FFT +(arch_fft_state *)&cfg_arch_120, +#else +NULL, +#endif +}; +#endif + +#ifndef FFT_STATE48000_960_3 +#define FFT_STATE48000_960_3 +static const kiss_fft_state fft_state48000_960_3 = { +60, /* nfft */ +17476, /* scale */ +5, /* scale_shift */ +3, /* shift */ +{5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ +fft_bitrev60, /* bitrev */ +fft_twiddles48000_960, /* bitrev */ +#ifdef OVERRIDE_FFT +(arch_fft_state *)&cfg_arch_60, +#else +NULL, +#endif +}; +#endif + +#endif + +#ifndef MDCT_TWIDDLES960 +#define MDCT_TWIDDLES960 +static const opus_val16 mdct_twiddles960[1800] = { +32767, 32767, 32767, 32766, 32765, +32763, 32761, 32759, 32756, 32753, +32750, 32746, 32742, 32738, 32733, +32728, 32722, 32717, 32710, 32704, +32697, 32690, 32682, 32674, 32666, +32657, 32648, 32639, 32629, 32619, +32609, 32598, 32587, 32576, 32564, +32552, 32539, 32526, 32513, 32500, +32486, 32472, 32457, 32442, 32427, +32411, 32395, 32379, 32362, 32345, +32328, 32310, 32292, 32274, 32255, +32236, 32217, 32197, 32177, 32157, +32136, 32115, 32093, 32071, 32049, +32027, 32004, 31981, 31957, 31933, +31909, 31884, 31859, 31834, 31809, +31783, 31756, 31730, 31703, 31676, +31648, 31620, 31592, 31563, 31534, +31505, 31475, 31445, 31415, 31384, +31353, 31322, 31290, 31258, 31226, +31193, 31160, 31127, 31093, 31059, +31025, 30990, 30955, 30920, 30884, +30848, 30812, 30775, 30738, 30701, +30663, 30625, 30587, 30548, 30509, +30470, 30430, 30390, 30350, 30309, +30269, 30227, 30186, 30144, 30102, +30059, 30016, 29973, 29930, 29886, +29842, 29797, 29752, 29707, 29662, +29616, 29570, 29524, 29477, 29430, +29383, 29335, 29287, 29239, 29190, +29142, 29092, 29043, 28993, 28943, +28892, 28842, 28791, 28739, 28688, +28636, 28583, 28531, 28478, 28425, +28371, 28317, 28263, 28209, 28154, +28099, 28044, 27988, 27932, 27876, +27820, 27763, 27706, 27648, 27591, +27533, 27474, 27416, 27357, 27298, +27238, 27178, 27118, 27058, 26997, +26936, 26875, 26814, 26752, 26690, +26628, 26565, 26502, 26439, 26375, +26312, 26247, 26183, 26119, 26054, +25988, 25923, 25857, 25791, 25725, +25658, 25592, 25524, 25457, 25389, +25322, 25253, 25185, 25116, 25047, +24978, 24908, 24838, 24768, 24698, +24627, 24557, 24485, 24414, 24342, +24270, 24198, 24126, 24053, 23980, +23907, 23834, 23760, 23686, 23612, +23537, 23462, 23387, 23312, 23237, +23161, 23085, 23009, 22932, 22856, +22779, 22701, 22624, 22546, 22468, +22390, 22312, 22233, 22154, 22075, +21996, 21916, 21836, 21756, 21676, +21595, 21515, 21434, 21352, 21271, +21189, 21107, 21025, 20943, 20860, +20777, 20694, 20611, 20528, 20444, +20360, 20276, 20192, 20107, 20022, +19937, 19852, 19767, 19681, 19595, +19509, 19423, 19336, 19250, 19163, +19076, 18988, 18901, 18813, 18725, +18637, 18549, 18460, 18372, 18283, +18194, 18104, 18015, 17925, 17835, +17745, 17655, 17565, 17474, 17383, +17292, 17201, 17110, 17018, 16927, +16835, 16743, 16650, 16558, 16465, +16372, 16279, 16186, 16093, 15999, +15906, 15812, 15718, 15624, 15529, +15435, 15340, 15245, 15150, 15055, +14960, 14864, 14769, 14673, 14577, +14481, 14385, 14288, 14192, 14095, +13998, 13901, 13804, 13706, 13609, +13511, 13414, 13316, 13218, 13119, +13021, 12923, 12824, 12725, 12626, +12527, 12428, 12329, 12230, 12130, +12030, 11930, 11831, 11730, 11630, +11530, 11430, 11329, 11228, 11128, +11027, 10926, 10824, 10723, 10622, +10520, 10419, 10317, 10215, 10113, +10011, 9909, 9807, 9704, 9602, +9499, 9397, 9294, 9191, 9088, +8985, 8882, 8778, 8675, 8572, +8468, 8364, 8261, 8157, 8053, +7949, 7845, 7741, 7637, 7532, +7428, 7323, 7219, 7114, 7009, +6905, 6800, 6695, 6590, 6485, +6380, 6274, 6169, 6064, 5958, +5853, 5747, 5642, 5536, 5430, +5325, 5219, 5113, 5007, 4901, +4795, 4689, 4583, 4476, 4370, +4264, 4157, 4051, 3945, 3838, +3732, 3625, 3518, 3412, 3305, +3198, 3092, 2985, 2878, 2771, +2664, 2558, 2451, 2344, 2237, +2130, 2023, 1916, 1809, 1702, +1594, 1487, 1380, 1273, 1166, +1059, 952, 844, 737, 630, +523, 416, 308, 201, 94, +-13, -121, -228, -335, -442, +-550, -657, -764, -871, -978, +-1086, -1193, -1300, -1407, -1514, +-1621, -1728, -1835, -1942, -2049, +-2157, -2263, -2370, -2477, -2584, +-2691, -2798, -2905, -3012, -3118, +-3225, -3332, -3439, -3545, -3652, +-3758, -3865, -3971, -4078, -4184, +-4290, -4397, -4503, -4609, -4715, +-4821, -4927, -5033, -5139, -5245, +-5351, -5457, -5562, -5668, -5774, +-5879, -5985, -6090, -6195, -6301, +-6406, -6511, -6616, -6721, -6826, +-6931, -7036, -7140, -7245, -7349, +-7454, -7558, -7663, -7767, -7871, +-7975, -8079, -8183, -8287, -8390, +-8494, -8597, -8701, -8804, -8907, +-9011, -9114, -9217, -9319, -9422, +-9525, -9627, -9730, -9832, -9934, +-10037, -10139, -10241, -10342, -10444, +-10546, -10647, -10748, -10850, -10951, +-11052, -11153, -11253, -11354, -11455, +-11555, -11655, -11756, -11856, -11955, +-12055, -12155, -12254, -12354, -12453, +-12552, -12651, -12750, -12849, -12947, +-13046, -13144, -13242, -13340, -13438, +-13536, -13633, -13731, -13828, -13925, +-14022, -14119, -14216, -14312, -14409, +-14505, -14601, -14697, -14793, -14888, +-14984, -15079, -15174, -15269, -15364, +-15459, -15553, -15647, -15741, -15835, +-15929, -16023, -16116, -16210, -16303, +-16396, -16488, -16581, -16673, -16766, +-16858, -16949, -17041, -17133, -17224, +-17315, -17406, -17497, -17587, -17678, +-17768, -17858, -17948, -18037, -18127, +-18216, -18305, -18394, -18483, -18571, +-18659, -18747, -18835, -18923, -19010, +-19098, -19185, -19271, -19358, -19444, +-19531, -19617, -19702, -19788, -19873, +-19959, -20043, -20128, -20213, -20297, +-20381, -20465, -20549, -20632, -20715, +-20798, -20881, -20963, -21046, -21128, +-21210, -21291, -21373, -21454, -21535, +-21616, -21696, -21776, -21856, -21936, +-22016, -22095, -22174, -22253, -22331, +-22410, -22488, -22566, -22643, -22721, +-22798, -22875, -22951, -23028, -23104, +-23180, -23256, -23331, -23406, -23481, +-23556, -23630, -23704, -23778, -23852, +-23925, -23998, -24071, -24144, -24216, +-24288, -24360, -24432, -24503, -24574, +-24645, -24716, -24786, -24856, -24926, +-24995, -25064, -25133, -25202, -25270, +-25339, -25406, -25474, -25541, -25608, +-25675, -25742, -25808, -25874, -25939, +-26005, -26070, -26135, -26199, -26264, +-26327, -26391, -26455, -26518, -26581, +-26643, -26705, -26767, -26829, -26891, +-26952, -27013, -27073, -27133, -27193, +-27253, -27312, -27372, -27430, -27489, +-27547, -27605, -27663, -27720, -27777, +-27834, -27890, -27946, -28002, -28058, +-28113, -28168, -28223, -28277, -28331, +-28385, -28438, -28491, -28544, -28596, +-28649, -28701, -28752, -28803, -28854, +-28905, -28955, -29006, -29055, -29105, +-29154, -29203, -29251, -29299, -29347, +-29395, -29442, -29489, -29535, -29582, +-29628, -29673, -29719, -29764, -29808, +-29853, -29897, -29941, -29984, -30027, +-30070, -30112, -30154, -30196, -30238, +-30279, -30320, -30360, -30400, -30440, +-30480, -30519, -30558, -30596, -30635, +-30672, -30710, -30747, -30784, -30821, +-30857, -30893, -30929, -30964, -30999, +-31033, -31068, -31102, -31135, -31168, +-31201, -31234, -31266, -31298, -31330, +-31361, -31392, -31422, -31453, -31483, +-31512, -31541, -31570, -31599, -31627, +-31655, -31682, -31710, -31737, -31763, +-31789, -31815, -31841, -31866, -31891, +-31915, -31939, -31963, -31986, -32010, +-32032, -32055, -32077, -32099, -32120, +-32141, -32162, -32182, -32202, -32222, +-32241, -32260, -32279, -32297, -32315, +-32333, -32350, -32367, -32383, -32399, +-32415, -32431, -32446, -32461, -32475, +-32489, -32503, -32517, -32530, -32542, +-32555, -32567, -32579, -32590, -32601, +-32612, -32622, -32632, -32641, -32651, +-32659, -32668, -32676, -32684, -32692, +-32699, -32706, -32712, -32718, -32724, +-32729, -32734, -32739, -32743, -32747, +-32751, -32754, -32757, -32760, -32762, +-32764, -32765, -32767, -32767, -32767, +32767, 32767, 32765, 32761, 32756, +32750, 32742, 32732, 32722, 32710, +32696, 32681, 32665, 32647, 32628, +32608, 32586, 32562, 32538, 32512, +32484, 32455, 32425, 32393, 32360, +32326, 32290, 32253, 32214, 32174, +32133, 32090, 32046, 32001, 31954, +31906, 31856, 31805, 31753, 31700, +31645, 31588, 31530, 31471, 31411, +31349, 31286, 31222, 31156, 31089, +31020, 30951, 30880, 30807, 30733, +30658, 30582, 30504, 30425, 30345, +30263, 30181, 30096, 30011, 29924, +29836, 29747, 29656, 29564, 29471, +29377, 29281, 29184, 29086, 28987, +28886, 28784, 28681, 28577, 28471, +28365, 28257, 28147, 28037, 27925, +27812, 27698, 27583, 27467, 27349, +27231, 27111, 26990, 26868, 26744, +26620, 26494, 26367, 26239, 26110, +25980, 25849, 25717, 25583, 25449, +25313, 25176, 25038, 24900, 24760, +24619, 24477, 24333, 24189, 24044, +23898, 23751, 23602, 23453, 23303, +23152, 22999, 22846, 22692, 22537, +22380, 22223, 22065, 21906, 21746, +21585, 21423, 21261, 21097, 20933, +20767, 20601, 20434, 20265, 20096, +19927, 19756, 19584, 19412, 19239, +19065, 18890, 18714, 18538, 18361, +18183, 18004, 17824, 17644, 17463, +17281, 17098, 16915, 16731, 16546, +16361, 16175, 15988, 15800, 15612, +15423, 15234, 15043, 14852, 14661, +14469, 14276, 14083, 13889, 13694, +13499, 13303, 13107, 12910, 12713, +12515, 12317, 12118, 11918, 11718, +11517, 11316, 11115, 10913, 10710, +10508, 10304, 10100, 9896, 9691, +9486, 9281, 9075, 8869, 8662, +8455, 8248, 8040, 7832, 7623, +7415, 7206, 6996, 6787, 6577, +6366, 6156, 5945, 5734, 5523, +5311, 5100, 4888, 4675, 4463, +4251, 4038, 3825, 3612, 3399, +3185, 2972, 2758, 2544, 2330, +2116, 1902, 1688, 1474, 1260, +1045, 831, 617, 402, 188, +-27, -241, -456, -670, -885, +-1099, -1313, -1528, -1742, -1956, +-2170, -2384, -2598, -2811, -3025, +-3239, -3452, -3665, -3878, -4091, +-4304, -4516, -4728, -4941, -5153, +-5364, -5576, -5787, -5998, -6209, +-6419, -6629, -6839, -7049, -7258, +-7467, -7676, -7884, -8092, -8300, +-8507, -8714, -8920, -9127, -9332, +-9538, -9743, -9947, -10151, -10355, +-10558, -10761, -10963, -11165, -11367, +-11568, -11768, -11968, -12167, -12366, +-12565, -12762, -12960, -13156, -13352, +-13548, -13743, -13937, -14131, -14324, +-14517, -14709, -14900, -15091, -15281, +-15470, -15659, -15847, -16035, -16221, +-16407, -16593, -16777, -16961, -17144, +-17326, -17508, -17689, -17869, -18049, +-18227, -18405, -18582, -18758, -18934, +-19108, -19282, -19455, -19627, -19799, +-19969, -20139, -20308, -20475, -20642, +-20809, -20974, -21138, -21301, -21464, +-21626, -21786, -21946, -22105, -22263, +-22420, -22575, -22730, -22884, -23037, +-23189, -23340, -23490, -23640, -23788, +-23935, -24080, -24225, -24369, -24512, +-24654, -24795, -24934, -25073, -25211, +-25347, -25482, -25617, -25750, -25882, +-26013, -26143, -26272, -26399, -26526, +-26651, -26775, -26898, -27020, -27141, +-27260, -27379, -27496, -27612, -27727, +-27841, -27953, -28065, -28175, -28284, +-28391, -28498, -28603, -28707, -28810, +-28911, -29012, -29111, -29209, -29305, +-29401, -29495, -29587, -29679, -29769, +-29858, -29946, -30032, -30118, -30201, +-30284, -30365, -30445, -30524, -30601, +-30677, -30752, -30825, -30897, -30968, +-31038, -31106, -31172, -31238, -31302, +-31365, -31426, -31486, -31545, -31602, +-31658, -31713, -31766, -31818, -31869, +-31918, -31966, -32012, -32058, -32101, +-32144, -32185, -32224, -32262, -32299, +-32335, -32369, -32401, -32433, -32463, +-32491, -32518, -32544, -32568, -32591, +-32613, -32633, -32652, -32669, -32685, +-32700, -32713, -32724, -32735, -32744, +-32751, -32757, -32762, -32766, -32767, +32767, 32764, 32755, 32741, 32720, +32694, 32663, 32626, 32583, 32535, +32481, 32421, 32356, 32286, 32209, +32128, 32041, 31948, 31850, 31747, +31638, 31523, 31403, 31278, 31148, +31012, 30871, 30724, 30572, 30415, +30253, 30086, 29913, 29736, 29553, +29365, 29172, 28974, 28771, 28564, +28351, 28134, 27911, 27684, 27452, +27216, 26975, 26729, 26478, 26223, +25964, 25700, 25432, 25159, 24882, +24601, 24315, 24026, 23732, 23434, +23133, 22827, 22517, 22204, 21886, +21565, 21240, 20912, 20580, 20244, +19905, 19563, 19217, 18868, 18516, +18160, 17802, 17440, 17075, 16708, +16338, 15964, 15588, 15210, 14829, +14445, 14059, 13670, 13279, 12886, +12490, 12093, 11693, 11291, 10888, +10482, 10075, 9666, 9255, 8843, +8429, 8014, 7597, 7180, 6760, +6340, 5919, 5496, 5073, 4649, +4224, 3798, 3372, 2945, 2517, +2090, 1661, 1233, 804, 375, +-54, -483, -911, -1340, -1768, +-2197, -2624, -3052, -3479, -3905, +-4330, -4755, -5179, -5602, -6024, +-6445, -6865, -7284, -7702, -8118, +-8533, -8946, -9358, -9768, -10177, +-10584, -10989, -11392, -11793, -12192, +-12589, -12984, -13377, -13767, -14155, +-14541, -14924, -15305, -15683, -16058, +-16430, -16800, -17167, -17531, -17892, +-18249, -18604, -18956, -19304, -19649, +-19990, -20329, -20663, -20994, -21322, +-21646, -21966, -22282, -22595, -22904, +-23208, -23509, -23806, -24099, -24387, +-24672, -24952, -25228, -25499, -25766, +-26029, -26288, -26541, -26791, -27035, +-27275, -27511, -27741, -27967, -28188, +-28405, -28616, -28823, -29024, -29221, +-29412, -29599, -29780, -29957, -30128, +-30294, -30455, -30611, -30761, -30906, +-31046, -31181, -31310, -31434, -31552, +-31665, -31773, -31875, -31972, -32063, +-32149, -32229, -32304, -32373, -32437, +-32495, -32547, -32594, -32635, -32671, +-32701, -32726, -32745, -32758, -32766, +32767, 32754, 32717, 32658, 32577, +32473, 32348, 32200, 32029, 31837, +31624, 31388, 31131, 30853, 30553, +30232, 29891, 29530, 29148, 28746, +28324, 27883, 27423, 26944, 26447, +25931, 25398, 24847, 24279, 23695, +23095, 22478, 21846, 21199, 20538, +19863, 19174, 18472, 17757, 17030, +16291, 15541, 14781, 14010, 13230, +12441, 11643, 10837, 10024, 9204, +8377, 7545, 6708, 5866, 5020, +4171, 3319, 2464, 1608, 751, +-107, -965, -1822, -2678, -3532, +-4383, -5232, -6077, -6918, -7754, +-8585, -9409, -10228, -11039, -11843, +-12639, -13426, -14204, -14972, -15730, +-16477, -17213, -17937, -18648, -19347, +-20033, -20705, -21363, -22006, -22634, +-23246, -23843, -24423, -24986, -25533, +-26062, -26573, -27066, -27540, -27995, +-28431, -28848, -29245, -29622, -29979, +-30315, -30630, -30924, -31197, -31449, +-31679, -31887, -32074, -32239, -32381, +-32501, -32600, -32675, -32729, -32759, +}; +#endif + +static const CELTMode mode48000_960_120 = { +48000, /* Fs */ +120, /* overlap */ +21, /* nbEBands */ +21, /* effEBands */ +{27853, 0, 4096, 8192, }, /* preemph */ +eband5ms, /* eBands */ +3, /* maxLM */ +8, /* nbShortMdcts */ +120, /* shortMdctSize */ +11, /* nbAllocVectors */ +band_allocation, /* allocVectors */ +logN400, /* logN */ +window120, /* window */ +{1920, 3, {&fft_state48000_960_0, &fft_state48000_960_1, &fft_state48000_960_2, &fft_state48000_960_3, }, mdct_twiddles960}, /* mdct */ +{392, cache_index50, cache_bits50, cache_caps50}, /* cache */ +}; + +/* List of all the available modes */ +#define TOTAL_MODES 1 +static const CELTMode * const static_mode_list[TOTAL_MODES] = { +&mode48000_960_120, +}; diff --git a/asm/libs/opus/celt/static_modes_fixed_arm_ne10.h b/asm/libs/opus/celt/static_modes_fixed_arm_ne10.h new file mode 100644 index 00000000..b8ef0cee --- /dev/null +++ b/asm/libs/opus/celt/static_modes_fixed_arm_ne10.h @@ -0,0 +1,388 @@ +/* The contents of this file was automatically generated by + * dump_mode_arm_ne10.c with arguments: 48000 960 + * It contains static definitions for some pre-defined modes. */ +#include + +#ifndef NE10_FFT_PARAMS48000_960 +#define NE10_FFT_PARAMS48000_960 +static const ne10_int32_t ne10_factors_480[64] = { +4, 40, 4, 30, 2, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, }; +static const ne10_int32_t ne10_factors_240[64] = { +3, 20, 4, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, }; +static const ne10_int32_t ne10_factors_120[64] = { +3, 10, 2, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, }; +static const ne10_int32_t ne10_factors_60[64] = { +2, 5, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, }; +static const ne10_fft_cpx_int32_t ne10_twiddles_480[480] = { +{0,0}, {2147483647,0}, {2147483647,0}, +{2147483647,0}, {1961823921,-873460313}, {1436946998,-1595891394}, +{2147483647,0}, {1436946998,-1595891394}, {-224473265,-2135719496}, +{2147483647,0}, {663608871,-2042378339}, {-1737350854,-1262259096}, +{2147483647,0}, {-224473265,-2135719496}, {-2100555935,446487152}, +{2147483647,0}, {2100555974,-446486968}, {1961823921,-873460313}, +{1737350743,-1262259248}, {1436946998,-1595891394}, {1073741769,-1859775424}, +{663608871,-2042378339}, {224473078,-2135719516}, {-224473265,-2135719496}, +{-663609049,-2042378281}, {-1073741932,-1859775330}, {-1436947137,-1595891268}, +{-1737350854,-1262259096}, {-1961823997,-873460141}, {-2100556013,-446486785}, +{2147483647,0}, {2144540595,-112390613}, {2135719506,-224473172}, +{2121044558,-335940465}, {2100555974,-446486968}, {2074309912,-555809682}, +{2042378310,-663608960}, {2004848691,-769589332}, {1961823921,-873460313}, +{1913421927,-974937199}, {1859775377,-1073741851}, {1801031311,-1169603450}, +{1737350743,-1262259248}, {1668908218,-1351455280}, {1595891331,-1436947067}, +{1518500216,-1518500282}, {1436946998,-1595891394}, {1351455207,-1668908277}, +{1262259172,-1737350799}, {1169603371,-1801031362}, {1073741769,-1859775424}, +{974937230,-1913421912}, {873460227,-1961823959}, {769589125,-2004848771}, +{663608871,-2042378339}, {555809715,-2074309903}, {446486876,-2100555994}, +{335940246,-2121044593}, {224473078,-2135719516}, {112390647,-2144540593}, +{2147483647,0}, {2135719506,-224473172}, {2100555974,-446486968}, +{2042378310,-663608960}, {1961823921,-873460313}, {1859775377,-1073741851}, +{1737350743,-1262259248}, {1595891331,-1436947067}, {1436946998,-1595891394}, +{1262259172,-1737350799}, {1073741769,-1859775424}, {873460227,-1961823959}, +{663608871,-2042378339}, {446486876,-2100555994}, {224473078,-2135719516}, +{-94,-2147483647}, {-224473265,-2135719496}, {-446487060,-2100555955}, +{-663609049,-2042378281}, {-873460398,-1961823883}, {-1073741932,-1859775330}, +{-1262259116,-1737350839}, {-1436947137,-1595891268}, {-1595891628,-1436946738}, +{-1737350854,-1262259096}, {-1859775343,-1073741910}, {-1961823997,-873460141}, +{-2042378447,-663608538}, {-2100556013,-446486785}, {-2135719499,-224473240}, +{2147483647,0}, {2121044558,-335940465}, {2042378310,-663608960}, +{1913421927,-974937199}, {1737350743,-1262259248}, {1518500216,-1518500282}, +{1262259172,-1737350799}, {974937230,-1913421912}, {663608871,-2042378339}, +{335940246,-2121044593}, {-94,-2147483647}, {-335940431,-2121044564}, +{-663609049,-2042378281}, {-974937397,-1913421827}, {-1262259116,-1737350839}, +{-1518500258,-1518500240}, {-1737350854,-1262259096}, {-1913422071,-974936918}, +{-2042378447,-663608538}, {-2121044568,-335940406}, {-2147483647,188}, +{-2121044509,335940777}, {-2042378331,663608895}, {-1913421900,974937252}, +{-1737350633,1262259400}, {-1518499993,1518500506}, {-1262258813,1737351059}, +{-974936606,1913422229}, {-663609179,2042378239}, {-335940566,2121044542}, +{2147483647,0}, {2147299667,-28109693}, {2146747758,-56214570}, +{2145828015,-84309815}, {2144540595,-112390613}, {2142885719,-140452154}, +{2140863671,-168489630}, {2138474797,-196498235}, {2135719506,-224473172}, +{2132598271,-252409646}, {2129111626,-280302871}, {2125260168,-308148068}, +{2121044558,-335940465}, {2116465518,-363675300}, {2111523833,-391347822}, +{2106220349,-418953288}, {2100555974,-446486968}, {2094531681,-473944146}, +{2088148500,-501320115}, {2081407525,-528610186}, {2074309912,-555809682}, +{2066856885,-582913912}, {2059049696,-609918325}, {2050889698,-636818231}, +{2042378310,-663608960}, {2033516972,-690285983}, {2024307180,-716844791}, +{2014750533,-743280770}, {2004848691,-769589332}, {1994603329,-795766029}, +{1984016179,-821806435}, {1973089077,-847706028}, {1961823921,-873460313}, +{1950222618,-899064934}, {1938287127,-924515564}, {1926019520,-949807783}, +{1913421927,-974937199}, {1900496481,-999899565}, {1887245364,-1024690661}, +{1873670877,-1049306180}, {1859775377,-1073741851}, {1845561215,-1097993541}, +{1831030826,-1122057097}, {1816186632,-1145928502}, {1801031311,-1169603450}, +{1785567394,-1193077993}, {1769797456,-1216348214}, {1753724345,-1239409914}, +{1737350743,-1262259248}, {1720679456,-1284892300}, {1703713340,-1307305194}, +{1686455222,-1329494189}, {1668908218,-1351455280}, {1651075255,-1373184807}, +{1632959307,-1394679144}, {1614563642,-1415934412}, {1595891331,-1436947067}, +{1576945572,-1457713510}, {1557729613,-1478230181}, {1538246655,-1498493658}, +{1518500216,-1518500282}, {1498493590,-1538246721}, {1478230113,-1557729677}, +{1457713441,-1576945636}, {1436946998,-1595891394}, {1415934341,-1614563704}, +{1394679073,-1632959368}, {1373184735,-1651075315}, {1351455207,-1668908277}, +{1329494115,-1686455280}, {1307305120,-1703713397}, {1284892225,-1720679512}, +{1262259172,-1737350799}, {1239409837,-1753724400}, {1216348136,-1769797510}, +{1193077915,-1785567446}, {1169603371,-1801031362}, {1145928423,-1816186682}, +{1122057017,-1831030875}, {1097993571,-1845561197}, {1073741769,-1859775424}, +{1049305987,-1873670985}, {1024690635,-1887245378}, {999899482,-1900496524}, +{974937230,-1913421912}, {949807699,-1926019561}, {924515422,-1938287195}, +{899064965,-1950222603}, {873460227,-1961823959}, {847705824,-1973089164}, +{821806407,-1984016190}, {795765941,-1994603364}, {769589125,-2004848771}, +{743280682,-2014750566}, {716844642,-2024307233}, {690286016,-2033516961}, +{663608871,-2042378339}, {636818019,-2050889764}, {609918296,-2059049705}, +{582913822,-2066856911}, {555809715,-2074309903}, {528610126,-2081407540}, +{501319962,-2088148536}, {473944148,-2094531680}, {446486876,-2100555994}, +{418953102,-2106220386}, {391347792,-2111523838}, {363675176,-2116465540}, +{335940246,-2121044593}, {308148006,-2125260177}, {280302715,-2129111646}, +{252409648,-2132598271}, {224473078,-2135719516}, {196498046,-2138474814}, +{168489600,-2140863674}, {140452029,-2142885728}, {112390647,-2144540593}, +{84309753,-2145828017}, {56214412,-2146747762}, {28109695,-2147299667}, +{2147483647,0}, {2146747758,-56214570}, {2144540595,-112390613}, +{2140863671,-168489630}, {2135719506,-224473172}, {2129111626,-280302871}, +{2121044558,-335940465}, {2111523833,-391347822}, {2100555974,-446486968}, +{2088148500,-501320115}, {2074309912,-555809682}, {2059049696,-609918325}, +{2042378310,-663608960}, {2024307180,-716844791}, {2004848691,-769589332}, +{1984016179,-821806435}, {1961823921,-873460313}, {1938287127,-924515564}, +{1913421927,-974937199}, {1887245364,-1024690661}, {1859775377,-1073741851}, +{1831030826,-1122057097}, {1801031311,-1169603450}, {1769797456,-1216348214}, +{1737350743,-1262259248}, {1703713340,-1307305194}, {1668908218,-1351455280}, +{1632959307,-1394679144}, {1595891331,-1436947067}, {1557729613,-1478230181}, +{1518500216,-1518500282}, {1478230113,-1557729677}, {1436946998,-1595891394}, +{1394679073,-1632959368}, {1351455207,-1668908277}, {1307305120,-1703713397}, +{1262259172,-1737350799}, {1216348136,-1769797510}, {1169603371,-1801031362}, +{1122057017,-1831030875}, {1073741769,-1859775424}, {1024690635,-1887245378}, +{974937230,-1913421912}, {924515422,-1938287195}, {873460227,-1961823959}, +{821806407,-1984016190}, {769589125,-2004848771}, {716844642,-2024307233}, +{663608871,-2042378339}, {609918296,-2059049705}, {555809715,-2074309903}, +{501319962,-2088148536}, {446486876,-2100555994}, {391347792,-2111523838}, +{335940246,-2121044593}, {280302715,-2129111646}, {224473078,-2135719516}, +{168489600,-2140863674}, {112390647,-2144540593}, {56214412,-2146747762}, +{-94,-2147483647}, {-56214600,-2146747757}, {-112390835,-2144540584}, +{-168489787,-2140863659}, {-224473265,-2135719496}, {-280302901,-2129111622}, +{-335940431,-2121044564}, {-391347977,-2111523804}, {-446487060,-2100555955}, +{-501320144,-2088148493}, {-555809896,-2074309855}, {-609918476,-2059049651}, +{-663609049,-2042378281}, {-716844819,-2024307170}, {-769589300,-2004848703}, +{-821806581,-1984016118}, {-873460398,-1961823883}, {-924515591,-1938287114}, +{-974937397,-1913421827}, {-1024690575,-1887245411}, {-1073741932,-1859775330}, +{-1122057395,-1831030643}, {-1169603421,-1801031330}, {-1216348291,-1769797403}, +{-1262259116,-1737350839}, {-1307305268,-1703713283}, {-1351455453,-1668908078}, +{-1394679021,-1632959413}, {-1436947137,-1595891268}, {-1478230435,-1557729372}, +{-1518500258,-1518500240}, {-1557729742,-1478230045}, {-1595891628,-1436946738}, +{-1632959429,-1394679001}, {-1668908417,-1351455035}, {-1703713298,-1307305248}, +{-1737350854,-1262259096}, {-1769797708,-1216347848}, {-1801031344,-1169603400}, +{-1831030924,-1122056937}, {-1859775343,-1073741910}, {-1887245423,-1024690552}, +{-1913422071,-974936918}, {-1938287125,-924515568}, {-1961823997,-873460141}, +{-1984016324,-821806084}, {-2004848713,-769589276}, {-2024307264,-716844553}, +{-2042378447,-663608538}, {-2059049731,-609918206}, {-2074309994,-555809377}, +{-2088148499,-501320119}, {-2100556013,-446486785}, {-2111523902,-391347448}, +{-2121044568,-335940406}, {-2129111659,-280302621}, {-2135719499,-224473240}, +{-2140863681,-168489506}, {-2144540612,-112390298}, {-2146747758,-56214574}, +{2147483647,0}, {2145828015,-84309815}, {2140863671,-168489630}, +{2132598271,-252409646}, {2121044558,-335940465}, {2106220349,-418953288}, +{2088148500,-501320115}, {2066856885,-582913912}, {2042378310,-663608960}, +{2014750533,-743280770}, {1984016179,-821806435}, {1950222618,-899064934}, +{1913421927,-974937199}, {1873670877,-1049306180}, {1831030826,-1122057097}, +{1785567394,-1193077993}, {1737350743,-1262259248}, {1686455222,-1329494189}, +{1632959307,-1394679144}, {1576945572,-1457713510}, {1518500216,-1518500282}, +{1457713441,-1576945636}, {1394679073,-1632959368}, {1329494115,-1686455280}, +{1262259172,-1737350799}, {1193077915,-1785567446}, {1122057017,-1831030875}, +{1049305987,-1873670985}, {974937230,-1913421912}, {899064965,-1950222603}, +{821806407,-1984016190}, {743280682,-2014750566}, {663608871,-2042378339}, +{582913822,-2066856911}, {501319962,-2088148536}, {418953102,-2106220386}, +{335940246,-2121044593}, {252409648,-2132598271}, {168489600,-2140863674}, +{84309753,-2145828017}, {-94,-2147483647}, {-84309940,-2145828010}, +{-168489787,-2140863659}, {-252409834,-2132598249}, {-335940431,-2121044564}, +{-418953286,-2106220349}, {-501320144,-2088148493}, {-582914003,-2066856860}, +{-663609049,-2042378281}, {-743280858,-2014750501}, {-821806581,-1984016118}, +{-899065136,-1950222525}, {-974937397,-1913421827}, {-1049306374,-1873670768}, +{-1122057395,-1831030643}, {-1193078284,-1785567199}, {-1262259116,-1737350839}, +{-1329494061,-1686455323}, {-1394679021,-1632959413}, {-1457713485,-1576945595}, +{-1518500258,-1518500240}, {-1576945613,-1457713466}, {-1632959429,-1394679001}, +{-1686455338,-1329494041}, {-1737350854,-1262259096}, {-1785567498,-1193077837}, +{-1831030924,-1122056937}, {-1873671031,-1049305905}, {-1913422071,-974936918}, +{-1950222750,-899064648}, {-1984016324,-821806084}, {-2014750687,-743280354}, +{-2042378447,-663608538}, {-2066856867,-582913978}, {-2088148499,-501320119}, +{-2106220354,-418953261}, {-2121044568,-335940406}, {-2132598282,-252409555}, +{-2140863681,-168489506}, {-2145828021,-84309659}, {-2147483647,188}, +{-2145828006,84310034}, {-2140863651,168489881}, {-2132598237,252409928}, +{-2121044509,335940777}, {-2106220281,418953629}, {-2088148411,501320484}, +{-2066856765,582914339}, {-2042378331,663608895}, {-2014750557,743280706}, +{-1984016181,821806431}, {-1950222593,899064989}, {-1913421900,974937252}, +{-1873670848,1049306232}, {-1831030728,1122057257}, {-1785567289,1193078149}, +{-1737350633,1262259400}, {-1686455106,1329494336}, {-1632959185,1394679287}, +{-1576945358,1457713742}, {-1518499993,1518500506}, {-1457713209,1576945850}, +{-1394678735,1632959656}, {-1329493766,1686455555}, {-1262258813,1737351059}, +{-1193077546,1785567692}, {-1122056638,1831031107}, {-1049305599,1873671202}, +{-974936606,1913422229}, {-899064330,1950222896}, {-821805761,1984016458}, +{-743280025,2014750808}, {-663609179,2042378239}, {-582914134,2066856823}, +{-501320277,2088148461}, {-418953420,2106220322}, {-335940566,2121044542}, +{-252409716,2132598263}, {-168489668,2140863668}, {-84309821,2145828015}, +}; +static const ne10_fft_cpx_int32_t ne10_twiddles_240[240] = { +{0,0}, {2147483647,0}, {2147483647,0}, +{2147483647,0}, {1961823921,-873460313}, {1436946998,-1595891394}, +{2147483647,0}, {1436946998,-1595891394}, {-224473265,-2135719496}, +{2147483647,0}, {663608871,-2042378339}, {-1737350854,-1262259096}, +{2147483647,0}, {-224473265,-2135719496}, {-2100555935,446487152}, +{2147483647,0}, {2135719506,-224473172}, {2100555974,-446486968}, +{2042378310,-663608960}, {1961823921,-873460313}, {1859775377,-1073741851}, +{1737350743,-1262259248}, {1595891331,-1436947067}, {1436946998,-1595891394}, +{1262259172,-1737350799}, {1073741769,-1859775424}, {873460227,-1961823959}, +{663608871,-2042378339}, {446486876,-2100555994}, {224473078,-2135719516}, +{2147483647,0}, {2100555974,-446486968}, {1961823921,-873460313}, +{1737350743,-1262259248}, {1436946998,-1595891394}, {1073741769,-1859775424}, +{663608871,-2042378339}, {224473078,-2135719516}, {-224473265,-2135719496}, +{-663609049,-2042378281}, {-1073741932,-1859775330}, {-1436947137,-1595891268}, +{-1737350854,-1262259096}, {-1961823997,-873460141}, {-2100556013,-446486785}, +{2147483647,0}, {2042378310,-663608960}, {1737350743,-1262259248}, +{1262259172,-1737350799}, {663608871,-2042378339}, {-94,-2147483647}, +{-663609049,-2042378281}, {-1262259116,-1737350839}, {-1737350854,-1262259096}, +{-2042378447,-663608538}, {-2147483647,188}, {-2042378331,663608895}, +{-1737350633,1262259400}, {-1262258813,1737351059}, {-663609179,2042378239}, +{2147483647,0}, {2146747758,-56214570}, {2144540595,-112390613}, +{2140863671,-168489630}, {2135719506,-224473172}, {2129111626,-280302871}, +{2121044558,-335940465}, {2111523833,-391347822}, {2100555974,-446486968}, +{2088148500,-501320115}, {2074309912,-555809682}, {2059049696,-609918325}, +{2042378310,-663608960}, {2024307180,-716844791}, {2004848691,-769589332}, +{1984016179,-821806435}, {1961823921,-873460313}, {1938287127,-924515564}, +{1913421927,-974937199}, {1887245364,-1024690661}, {1859775377,-1073741851}, +{1831030826,-1122057097}, {1801031311,-1169603450}, {1769797456,-1216348214}, +{1737350743,-1262259248}, {1703713340,-1307305194}, {1668908218,-1351455280}, +{1632959307,-1394679144}, {1595891331,-1436947067}, {1557729613,-1478230181}, +{1518500216,-1518500282}, {1478230113,-1557729677}, {1436946998,-1595891394}, +{1394679073,-1632959368}, {1351455207,-1668908277}, {1307305120,-1703713397}, +{1262259172,-1737350799}, {1216348136,-1769797510}, {1169603371,-1801031362}, +{1122057017,-1831030875}, {1073741769,-1859775424}, {1024690635,-1887245378}, +{974937230,-1913421912}, {924515422,-1938287195}, {873460227,-1961823959}, +{821806407,-1984016190}, {769589125,-2004848771}, {716844642,-2024307233}, +{663608871,-2042378339}, {609918296,-2059049705}, {555809715,-2074309903}, +{501319962,-2088148536}, {446486876,-2100555994}, {391347792,-2111523838}, +{335940246,-2121044593}, {280302715,-2129111646}, {224473078,-2135719516}, +{168489600,-2140863674}, {112390647,-2144540593}, {56214412,-2146747762}, +{2147483647,0}, {2144540595,-112390613}, {2135719506,-224473172}, +{2121044558,-335940465}, {2100555974,-446486968}, {2074309912,-555809682}, +{2042378310,-663608960}, {2004848691,-769589332}, {1961823921,-873460313}, +{1913421927,-974937199}, {1859775377,-1073741851}, {1801031311,-1169603450}, +{1737350743,-1262259248}, {1668908218,-1351455280}, {1595891331,-1436947067}, +{1518500216,-1518500282}, {1436946998,-1595891394}, {1351455207,-1668908277}, +{1262259172,-1737350799}, {1169603371,-1801031362}, {1073741769,-1859775424}, +{974937230,-1913421912}, {873460227,-1961823959}, {769589125,-2004848771}, +{663608871,-2042378339}, {555809715,-2074309903}, {446486876,-2100555994}, +{335940246,-2121044593}, {224473078,-2135719516}, {112390647,-2144540593}, +{-94,-2147483647}, {-112390835,-2144540584}, {-224473265,-2135719496}, +{-335940431,-2121044564}, {-446487060,-2100555955}, {-555809896,-2074309855}, +{-663609049,-2042378281}, {-769589300,-2004848703}, {-873460398,-1961823883}, +{-974937397,-1913421827}, {-1073741932,-1859775330}, {-1169603421,-1801031330}, +{-1262259116,-1737350839}, {-1351455453,-1668908078}, {-1436947137,-1595891268}, +{-1518500258,-1518500240}, {-1595891628,-1436946738}, {-1668908417,-1351455035}, +{-1737350854,-1262259096}, {-1801031344,-1169603400}, {-1859775343,-1073741910}, +{-1913422071,-974936918}, {-1961823997,-873460141}, {-2004848713,-769589276}, +{-2042378447,-663608538}, {-2074309994,-555809377}, {-2100556013,-446486785}, +{-2121044568,-335940406}, {-2135719499,-224473240}, {-2144540612,-112390298}, +{2147483647,0}, {2140863671,-168489630}, {2121044558,-335940465}, +{2088148500,-501320115}, {2042378310,-663608960}, {1984016179,-821806435}, +{1913421927,-974937199}, {1831030826,-1122057097}, {1737350743,-1262259248}, +{1632959307,-1394679144}, {1518500216,-1518500282}, {1394679073,-1632959368}, +{1262259172,-1737350799}, {1122057017,-1831030875}, {974937230,-1913421912}, +{821806407,-1984016190}, {663608871,-2042378339}, {501319962,-2088148536}, +{335940246,-2121044593}, {168489600,-2140863674}, {-94,-2147483647}, +{-168489787,-2140863659}, {-335940431,-2121044564}, {-501320144,-2088148493}, +{-663609049,-2042378281}, {-821806581,-1984016118}, {-974937397,-1913421827}, +{-1122057395,-1831030643}, {-1262259116,-1737350839}, {-1394679021,-1632959413}, +{-1518500258,-1518500240}, {-1632959429,-1394679001}, {-1737350854,-1262259096}, +{-1831030924,-1122056937}, {-1913422071,-974936918}, {-1984016324,-821806084}, +{-2042378447,-663608538}, {-2088148499,-501320119}, {-2121044568,-335940406}, +{-2140863681,-168489506}, {-2147483647,188}, {-2140863651,168489881}, +{-2121044509,335940777}, {-2088148411,501320484}, {-2042378331,663608895}, +{-1984016181,821806431}, {-1913421900,974937252}, {-1831030728,1122057257}, +{-1737350633,1262259400}, {-1632959185,1394679287}, {-1518499993,1518500506}, +{-1394678735,1632959656}, {-1262258813,1737351059}, {-1122056638,1831031107}, +{-974936606,1913422229}, {-821805761,1984016458}, {-663609179,2042378239}, +{-501320277,2088148461}, {-335940566,2121044542}, {-168489668,2140863668}, +}; +static const ne10_fft_cpx_int32_t ne10_twiddles_120[120] = { +{0,0}, {2147483647,0}, {2147483647,0}, +{2147483647,0}, {1961823921,-873460313}, {1436946998,-1595891394}, +{2147483647,0}, {1436946998,-1595891394}, {-224473265,-2135719496}, +{2147483647,0}, {663608871,-2042378339}, {-1737350854,-1262259096}, +{2147483647,0}, {-224473265,-2135719496}, {-2100555935,446487152}, +{2147483647,0}, {2100555974,-446486968}, {1961823921,-873460313}, +{1737350743,-1262259248}, {1436946998,-1595891394}, {1073741769,-1859775424}, +{663608871,-2042378339}, {224473078,-2135719516}, {-224473265,-2135719496}, +{-663609049,-2042378281}, {-1073741932,-1859775330}, {-1436947137,-1595891268}, +{-1737350854,-1262259096}, {-1961823997,-873460141}, {-2100556013,-446486785}, +{2147483647,0}, {2144540595,-112390613}, {2135719506,-224473172}, +{2121044558,-335940465}, {2100555974,-446486968}, {2074309912,-555809682}, +{2042378310,-663608960}, {2004848691,-769589332}, {1961823921,-873460313}, +{1913421927,-974937199}, {1859775377,-1073741851}, {1801031311,-1169603450}, +{1737350743,-1262259248}, {1668908218,-1351455280}, {1595891331,-1436947067}, +{1518500216,-1518500282}, {1436946998,-1595891394}, {1351455207,-1668908277}, +{1262259172,-1737350799}, {1169603371,-1801031362}, {1073741769,-1859775424}, +{974937230,-1913421912}, {873460227,-1961823959}, {769589125,-2004848771}, +{663608871,-2042378339}, {555809715,-2074309903}, {446486876,-2100555994}, +{335940246,-2121044593}, {224473078,-2135719516}, {112390647,-2144540593}, +{2147483647,0}, {2135719506,-224473172}, {2100555974,-446486968}, +{2042378310,-663608960}, {1961823921,-873460313}, {1859775377,-1073741851}, +{1737350743,-1262259248}, {1595891331,-1436947067}, {1436946998,-1595891394}, +{1262259172,-1737350799}, {1073741769,-1859775424}, {873460227,-1961823959}, +{663608871,-2042378339}, {446486876,-2100555994}, {224473078,-2135719516}, +{-94,-2147483647}, {-224473265,-2135719496}, {-446487060,-2100555955}, +{-663609049,-2042378281}, {-873460398,-1961823883}, {-1073741932,-1859775330}, +{-1262259116,-1737350839}, {-1436947137,-1595891268}, {-1595891628,-1436946738}, +{-1737350854,-1262259096}, {-1859775343,-1073741910}, {-1961823997,-873460141}, +{-2042378447,-663608538}, {-2100556013,-446486785}, {-2135719499,-224473240}, +{2147483647,0}, {2121044558,-335940465}, {2042378310,-663608960}, +{1913421927,-974937199}, {1737350743,-1262259248}, {1518500216,-1518500282}, +{1262259172,-1737350799}, {974937230,-1913421912}, {663608871,-2042378339}, +{335940246,-2121044593}, {-94,-2147483647}, {-335940431,-2121044564}, +{-663609049,-2042378281}, {-974937397,-1913421827}, {-1262259116,-1737350839}, +{-1518500258,-1518500240}, {-1737350854,-1262259096}, {-1913422071,-974936918}, +{-2042378447,-663608538}, {-2121044568,-335940406}, {-2147483647,188}, +{-2121044509,335940777}, {-2042378331,663608895}, {-1913421900,974937252}, +{-1737350633,1262259400}, {-1518499993,1518500506}, {-1262258813,1737351059}, +{-974936606,1913422229}, {-663609179,2042378239}, {-335940566,2121044542}, +}; +static const ne10_fft_cpx_int32_t ne10_twiddles_60[60] = { +{0,0}, {2147483647,0}, {2147483647,0}, +{2147483647,0}, {1961823921,-873460313}, {1436946998,-1595891394}, +{2147483647,0}, {1436946998,-1595891394}, {-224473265,-2135719496}, +{2147483647,0}, {663608871,-2042378339}, {-1737350854,-1262259096}, +{2147483647,0}, {-224473265,-2135719496}, {-2100555935,446487152}, +{2147483647,0}, {2135719506,-224473172}, {2100555974,-446486968}, +{2042378310,-663608960}, {1961823921,-873460313}, {1859775377,-1073741851}, +{1737350743,-1262259248}, {1595891331,-1436947067}, {1436946998,-1595891394}, +{1262259172,-1737350799}, {1073741769,-1859775424}, {873460227,-1961823959}, +{663608871,-2042378339}, {446486876,-2100555994}, {224473078,-2135719516}, +{2147483647,0}, {2100555974,-446486968}, {1961823921,-873460313}, +{1737350743,-1262259248}, {1436946998,-1595891394}, {1073741769,-1859775424}, +{663608871,-2042378339}, {224473078,-2135719516}, {-224473265,-2135719496}, +{-663609049,-2042378281}, {-1073741932,-1859775330}, {-1436947137,-1595891268}, +{-1737350854,-1262259096}, {-1961823997,-873460141}, {-2100556013,-446486785}, +{2147483647,0}, {2042378310,-663608960}, {1737350743,-1262259248}, +{1262259172,-1737350799}, {663608871,-2042378339}, {-94,-2147483647}, +{-663609049,-2042378281}, {-1262259116,-1737350839}, {-1737350854,-1262259096}, +{-2042378447,-663608538}, {-2147483647,188}, {-2042378331,663608895}, +{-1737350633,1262259400}, {-1262258813,1737351059}, {-663609179,2042378239}, +}; +static const ne10_fft_state_int32_t ne10_fft_state_int32_t_480 = { +120, +(ne10_int32_t *)ne10_factors_480, +(ne10_fft_cpx_int32_t *)ne10_twiddles_480, +NULL, +(ne10_fft_cpx_int32_t *)&ne10_twiddles_480[120], +}; +static const arch_fft_state cfg_arch_480 = { +1, +(void *)&ne10_fft_state_int32_t_480, +}; + +static const ne10_fft_state_int32_t ne10_fft_state_int32_t_240 = { +60, +(ne10_int32_t *)ne10_factors_240, +(ne10_fft_cpx_int32_t *)ne10_twiddles_240, +NULL, +(ne10_fft_cpx_int32_t *)&ne10_twiddles_240[60], +}; +static const arch_fft_state cfg_arch_240 = { +1, +(void *)&ne10_fft_state_int32_t_240, +}; + +static const ne10_fft_state_int32_t ne10_fft_state_int32_t_120 = { +30, +(ne10_int32_t *)ne10_factors_120, +(ne10_fft_cpx_int32_t *)ne10_twiddles_120, +NULL, +(ne10_fft_cpx_int32_t *)&ne10_twiddles_120[30], +}; +static const arch_fft_state cfg_arch_120 = { +1, +(void *)&ne10_fft_state_int32_t_120, +}; + +static const ne10_fft_state_int32_t ne10_fft_state_int32_t_60 = { +15, +(ne10_int32_t *)ne10_factors_60, +(ne10_fft_cpx_int32_t *)ne10_twiddles_60, +NULL, +(ne10_fft_cpx_int32_t *)&ne10_twiddles_60[15], +}; +static const arch_fft_state cfg_arch_60 = { +1, +(void *)&ne10_fft_state_int32_t_60, +}; + +#endif /* end NE10_FFT_PARAMS48000_960 */ diff --git a/asm/libs/opus/celt/static_modes_float.h b/asm/libs/opus/celt/static_modes_float.h new file mode 100644 index 00000000..e102a383 --- /dev/null +++ b/asm/libs/opus/celt/static_modes_float.h @@ -0,0 +1,888 @@ +/* The contents of this file was automatically generated by dump_modes.c + with arguments: 48000 960 + It contains static definitions for some pre-defined modes. */ +#include "modes.h" +#include "rate.h" + +#ifdef HAVE_ARM_NE10 +#define OVERRIDE_FFT 1 +#include "static_modes_float_arm_ne10.h" +#endif + +#ifndef DEF_WINDOW120 +#define DEF_WINDOW120 +static const opus_val16 window120[120] = { +6.7286966e-05f, 0.00060551348f, 0.0016815970f, 0.0032947962f, 0.0054439943f, +0.0081276923f, 0.011344001f, 0.015090633f, 0.019364886f, 0.024163635f, +0.029483315f, 0.035319905f, 0.041668911f, 0.048525347f, 0.055883718f, +0.063737999f, 0.072081616f, 0.080907428f, 0.090207705f, 0.099974111f, +0.11019769f, 0.12086883f, 0.13197729f, 0.14351214f, 0.15546177f, +0.16781389f, 0.18055550f, 0.19367290f, 0.20715171f, 0.22097682f, +0.23513243f, 0.24960208f, 0.26436860f, 0.27941419f, 0.29472040f, +0.31026818f, 0.32603788f, 0.34200931f, 0.35816177f, 0.37447407f, +0.39092462f, 0.40749142f, 0.42415215f, 0.44088423f, 0.45766484f, +0.47447104f, 0.49127978f, 0.50806798f, 0.52481261f, 0.54149077f, +0.55807973f, 0.57455701f, 0.59090049f, 0.60708841f, 0.62309951f, +0.63891306f, 0.65450896f, 0.66986776f, 0.68497077f, 0.69980010f, +0.71433873f, 0.72857055f, 0.74248043f, 0.75605424f, 0.76927895f, +0.78214257f, 0.79463430f, 0.80674445f, 0.81846456f, 0.82978733f, +0.84070669f, 0.85121779f, 0.86131698f, 0.87100183f, 0.88027111f, +0.88912479f, 0.89756398f, 0.90559094f, 0.91320904f, 0.92042270f, +0.92723738f, 0.93365955f, 0.93969656f, 0.94535671f, 0.95064907f, +0.95558353f, 0.96017067f, 0.96442171f, 0.96834849f, 0.97196334f, +0.97527906f, 0.97830883f, 0.98106616f, 0.98356480f, 0.98581869f, +0.98784191f, 0.98964856f, 0.99125274f, 0.99266849f, 0.99390969f, +0.99499004f, 0.99592297f, 0.99672162f, 0.99739874f, 0.99796667f, +0.99843728f, 0.99882195f, 0.99913147f, 0.99937606f, 0.99956527f, +0.99970802f, 0.99981248f, 0.99988613f, 0.99993565f, 0.99996697f, +0.99998518f, 0.99999457f, 0.99999859f, 0.99999982f, 1.0000000f, +}; +#endif + +#ifndef DEF_LOGN400 +#define DEF_LOGN400 +static const opus_int16 logN400[21] = { +0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 16, 16, 16, 21, 21, 24, 29, 34, 36, }; +#endif + +#ifndef DEF_PULSE_CACHE50 +#define DEF_PULSE_CACHE50 +static const opus_int16 cache_index50[105] = { +-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 41, 41, 41, +82, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41, +41, 41, 41, 123, 123, 123, 164, 164, 240, 266, 283, 295, 41, 41, 41, +41, 41, 41, 41, 41, 123, 123, 123, 123, 240, 240, 240, 266, 266, 305, +318, 328, 336, 123, 123, 123, 123, 123, 123, 123, 123, 240, 240, 240, 240, +305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240, +240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387, +}; +static const unsigned char cache_bits50[392] = { +40, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 40, 15, 23, 28, +31, 34, 36, 38, 39, 41, 42, 43, 44, 45, 46, 47, 47, 49, 50, +51, 52, 53, 54, 55, 55, 57, 58, 59, 60, 61, 62, 63, 63, 65, +66, 67, 68, 69, 70, 71, 71, 40, 20, 33, 41, 48, 53, 57, 61, +64, 66, 69, 71, 73, 75, 76, 78, 80, 82, 85, 87, 89, 91, 92, +94, 96, 98, 101, 103, 105, 107, 108, 110, 112, 114, 117, 119, 121, 123, +124, 126, 128, 40, 23, 39, 51, 60, 67, 73, 79, 83, 87, 91, 94, +97, 100, 102, 105, 107, 111, 115, 118, 121, 124, 126, 129, 131, 135, 139, +142, 145, 148, 150, 153, 155, 159, 163, 166, 169, 172, 174, 177, 179, 35, +28, 49, 65, 78, 89, 99, 107, 114, 120, 126, 132, 136, 141, 145, 149, +153, 159, 165, 171, 176, 180, 185, 189, 192, 199, 205, 211, 216, 220, 225, +229, 232, 239, 245, 251, 21, 33, 58, 79, 97, 112, 125, 137, 148, 157, +166, 174, 182, 189, 195, 201, 207, 217, 227, 235, 243, 251, 17, 35, 63, +86, 106, 123, 139, 152, 165, 177, 187, 197, 206, 214, 222, 230, 237, 250, +25, 31, 55, 75, 91, 105, 117, 128, 138, 146, 154, 161, 168, 174, 180, +185, 190, 200, 208, 215, 222, 229, 235, 240, 245, 255, 16, 36, 65, 89, +110, 128, 144, 159, 173, 185, 196, 207, 217, 226, 234, 242, 250, 11, 41, +74, 103, 128, 151, 172, 191, 209, 225, 241, 255, 9, 43, 79, 110, 138, +163, 186, 207, 227, 246, 12, 39, 71, 99, 123, 144, 164, 182, 198, 214, +228, 241, 253, 9, 44, 81, 113, 142, 168, 192, 214, 235, 255, 7, 49, +90, 127, 160, 191, 220, 247, 6, 51, 95, 134, 170, 203, 234, 7, 47, +87, 123, 155, 184, 212, 237, 6, 52, 97, 137, 174, 208, 240, 5, 57, +106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187, +224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127, +182, 234, }; +static const unsigned char cache_caps50[168] = { +224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185, +178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240, +240, 240, 240, 207, 207, 207, 198, 198, 183, 144, 66, 40, 160, 160, 160, +160, 160, 160, 160, 160, 185, 185, 185, 185, 193, 193, 193, 183, 183, 172, +138, 64, 38, 240, 240, 240, 240, 240, 240, 240, 240, 207, 207, 207, 207, +204, 204, 204, 193, 193, 180, 143, 66, 40, 185, 185, 185, 185, 185, 185, +185, 185, 193, 193, 193, 193, 193, 193, 193, 183, 183, 172, 138, 65, 39, +207, 207, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 201, 201, 201, +188, 188, 176, 141, 66, 40, 193, 193, 193, 193, 193, 193, 193, 193, 193, +193, 193, 193, 194, 194, 194, 184, 184, 173, 139, 65, 39, 204, 204, 204, +204, 204, 204, 204, 204, 201, 201, 201, 201, 198, 198, 198, 187, 187, 175, +140, 66, 40, }; +#endif + +#ifndef FFT_TWIDDLES48000_960 +#define FFT_TWIDDLES48000_960 +static const kiss_twiddle_cpx fft_twiddles48000_960[480] = { +{1.0000000f, -0.0000000f}, {0.99991433f, -0.013089596f}, +{0.99965732f, -0.026176948f}, {0.99922904f, -0.039259816f}, +{0.99862953f, -0.052335956f}, {0.99785892f, -0.065403129f}, +{0.99691733f, -0.078459096f}, {0.99580493f, -0.091501619f}, +{0.99452190f, -0.10452846f}, {0.99306846f, -0.11753740f}, +{0.99144486f, -0.13052619f}, {0.98965139f, -0.14349262f}, +{0.98768834f, -0.15643447f}, {0.98555606f, -0.16934950f}, +{0.98325491f, -0.18223553f}, {0.98078528f, -0.19509032f}, +{0.97814760f, -0.20791169f}, {0.97534232f, -0.22069744f}, +{0.97236992f, -0.23344536f}, {0.96923091f, -0.24615329f}, +{0.96592583f, -0.25881905f}, {0.96245524f, -0.27144045f}, +{0.95881973f, -0.28401534f}, {0.95501994f, -0.29654157f}, +{0.95105652f, -0.30901699f}, {0.94693013f, -0.32143947f}, +{0.94264149f, -0.33380686f}, {0.93819134f, -0.34611706f}, +{0.93358043f, -0.35836795f}, {0.92880955f, -0.37055744f}, +{0.92387953f, -0.38268343f}, {0.91879121f, -0.39474386f}, +{0.91354546f, -0.40673664f}, {0.90814317f, -0.41865974f}, +{0.90258528f, -0.43051110f}, {0.89687274f, -0.44228869f}, +{0.89100652f, -0.45399050f}, {0.88498764f, -0.46561452f}, +{0.87881711f, -0.47715876f}, {0.87249601f, -0.48862124f}, +{0.86602540f, -0.50000000f}, {0.85940641f, -0.51129309f}, +{0.85264016f, -0.52249856f}, {0.84572782f, -0.53361452f}, +{0.83867057f, -0.54463904f}, {0.83146961f, -0.55557023f}, +{0.82412619f, -0.56640624f}, {0.81664156f, -0.57714519f}, +{0.80901699f, -0.58778525f}, {0.80125381f, -0.59832460f}, +{0.79335334f, -0.60876143f}, {0.78531693f, -0.61909395f}, +{0.77714596f, -0.62932039f}, {0.76884183f, -0.63943900f}, +{0.76040597f, -0.64944805f}, {0.75183981f, -0.65934582f}, +{0.74314483f, -0.66913061f}, {0.73432251f, -0.67880075f}, +{0.72537437f, -0.68835458f}, {0.71630194f, -0.69779046f}, +{0.70710678f, -0.70710678f}, {0.69779046f, -0.71630194f}, +{0.68835458f, -0.72537437f}, {0.67880075f, -0.73432251f}, +{0.66913061f, -0.74314483f}, {0.65934582f, -0.75183981f}, +{0.64944805f, -0.76040597f}, {0.63943900f, -0.76884183f}, +{0.62932039f, -0.77714596f}, {0.61909395f, -0.78531693f}, +{0.60876143f, -0.79335334f}, {0.59832460f, -0.80125381f}, +{0.58778525f, -0.80901699f}, {0.57714519f, -0.81664156f}, +{0.56640624f, -0.82412619f}, {0.55557023f, -0.83146961f}, +{0.54463904f, -0.83867057f}, {0.53361452f, -0.84572782f}, +{0.52249856f, -0.85264016f}, {0.51129309f, -0.85940641f}, +{0.50000000f, -0.86602540f}, {0.48862124f, -0.87249601f}, +{0.47715876f, -0.87881711f}, {0.46561452f, -0.88498764f}, +{0.45399050f, -0.89100652f}, {0.44228869f, -0.89687274f}, +{0.43051110f, -0.90258528f}, {0.41865974f, -0.90814317f}, +{0.40673664f, -0.91354546f}, {0.39474386f, -0.91879121f}, +{0.38268343f, -0.92387953f}, {0.37055744f, -0.92880955f}, +{0.35836795f, -0.93358043f}, {0.34611706f, -0.93819134f}, +{0.33380686f, -0.94264149f}, {0.32143947f, -0.94693013f}, +{0.30901699f, -0.95105652f}, {0.29654157f, -0.95501994f}, +{0.28401534f, -0.95881973f}, {0.27144045f, -0.96245524f}, +{0.25881905f, -0.96592583f}, {0.24615329f, -0.96923091f}, +{0.23344536f, -0.97236992f}, {0.22069744f, -0.97534232f}, +{0.20791169f, -0.97814760f}, {0.19509032f, -0.98078528f}, +{0.18223553f, -0.98325491f}, {0.16934950f, -0.98555606f}, +{0.15643447f, -0.98768834f}, {0.14349262f, -0.98965139f}, +{0.13052619f, -0.99144486f}, {0.11753740f, -0.99306846f}, +{0.10452846f, -0.99452190f}, {0.091501619f, -0.99580493f}, +{0.078459096f, -0.99691733f}, {0.065403129f, -0.99785892f}, +{0.052335956f, -0.99862953f}, {0.039259816f, -0.99922904f}, +{0.026176948f, -0.99965732f}, {0.013089596f, -0.99991433f}, +{6.1230318e-17f, -1.0000000f}, {-0.013089596f, -0.99991433f}, +{-0.026176948f, -0.99965732f}, {-0.039259816f, -0.99922904f}, +{-0.052335956f, -0.99862953f}, {-0.065403129f, -0.99785892f}, +{-0.078459096f, -0.99691733f}, {-0.091501619f, -0.99580493f}, +{-0.10452846f, -0.99452190f}, {-0.11753740f, -0.99306846f}, +{-0.13052619f, -0.99144486f}, {-0.14349262f, -0.98965139f}, +{-0.15643447f, -0.98768834f}, {-0.16934950f, -0.98555606f}, +{-0.18223553f, -0.98325491f}, {-0.19509032f, -0.98078528f}, +{-0.20791169f, -0.97814760f}, {-0.22069744f, -0.97534232f}, +{-0.23344536f, -0.97236992f}, {-0.24615329f, -0.96923091f}, +{-0.25881905f, -0.96592583f}, {-0.27144045f, -0.96245524f}, +{-0.28401534f, -0.95881973f}, {-0.29654157f, -0.95501994f}, +{-0.30901699f, -0.95105652f}, {-0.32143947f, -0.94693013f}, +{-0.33380686f, -0.94264149f}, {-0.34611706f, -0.93819134f}, +{-0.35836795f, -0.93358043f}, {-0.37055744f, -0.92880955f}, +{-0.38268343f, -0.92387953f}, {-0.39474386f, -0.91879121f}, +{-0.40673664f, -0.91354546f}, {-0.41865974f, -0.90814317f}, +{-0.43051110f, -0.90258528f}, {-0.44228869f, -0.89687274f}, +{-0.45399050f, -0.89100652f}, {-0.46561452f, -0.88498764f}, +{-0.47715876f, -0.87881711f}, {-0.48862124f, -0.87249601f}, +{-0.50000000f, -0.86602540f}, {-0.51129309f, -0.85940641f}, +{-0.52249856f, -0.85264016f}, {-0.53361452f, -0.84572782f}, +{-0.54463904f, -0.83867057f}, {-0.55557023f, -0.83146961f}, +{-0.56640624f, -0.82412619f}, {-0.57714519f, -0.81664156f}, +{-0.58778525f, -0.80901699f}, {-0.59832460f, -0.80125381f}, +{-0.60876143f, -0.79335334f}, {-0.61909395f, -0.78531693f}, +{-0.62932039f, -0.77714596f}, {-0.63943900f, -0.76884183f}, +{-0.64944805f, -0.76040597f}, {-0.65934582f, -0.75183981f}, +{-0.66913061f, -0.74314483f}, {-0.67880075f, -0.73432251f}, +{-0.68835458f, -0.72537437f}, {-0.69779046f, -0.71630194f}, +{-0.70710678f, -0.70710678f}, {-0.71630194f, -0.69779046f}, +{-0.72537437f, -0.68835458f}, {-0.73432251f, -0.67880075f}, +{-0.74314483f, -0.66913061f}, {-0.75183981f, -0.65934582f}, +{-0.76040597f, -0.64944805f}, {-0.76884183f, -0.63943900f}, +{-0.77714596f, -0.62932039f}, {-0.78531693f, -0.61909395f}, +{-0.79335334f, -0.60876143f}, {-0.80125381f, -0.59832460f}, +{-0.80901699f, -0.58778525f}, {-0.81664156f, -0.57714519f}, +{-0.82412619f, -0.56640624f}, {-0.83146961f, -0.55557023f}, +{-0.83867057f, -0.54463904f}, {-0.84572782f, -0.53361452f}, +{-0.85264016f, -0.52249856f}, {-0.85940641f, -0.51129309f}, +{-0.86602540f, -0.50000000f}, {-0.87249601f, -0.48862124f}, +{-0.87881711f, -0.47715876f}, {-0.88498764f, -0.46561452f}, +{-0.89100652f, -0.45399050f}, {-0.89687274f, -0.44228869f}, +{-0.90258528f, -0.43051110f}, {-0.90814317f, -0.41865974f}, +{-0.91354546f, -0.40673664f}, {-0.91879121f, -0.39474386f}, +{-0.92387953f, -0.38268343f}, {-0.92880955f, -0.37055744f}, +{-0.93358043f, -0.35836795f}, {-0.93819134f, -0.34611706f}, +{-0.94264149f, -0.33380686f}, {-0.94693013f, -0.32143947f}, +{-0.95105652f, -0.30901699f}, {-0.95501994f, -0.29654157f}, +{-0.95881973f, -0.28401534f}, {-0.96245524f, -0.27144045f}, +{-0.96592583f, -0.25881905f}, {-0.96923091f, -0.24615329f}, +{-0.97236992f, -0.23344536f}, {-0.97534232f, -0.22069744f}, +{-0.97814760f, -0.20791169f}, {-0.98078528f, -0.19509032f}, +{-0.98325491f, -0.18223553f}, {-0.98555606f, -0.16934950f}, +{-0.98768834f, -0.15643447f}, {-0.98965139f, -0.14349262f}, +{-0.99144486f, -0.13052619f}, {-0.99306846f, -0.11753740f}, +{-0.99452190f, -0.10452846f}, {-0.99580493f, -0.091501619f}, +{-0.99691733f, -0.078459096f}, {-0.99785892f, -0.065403129f}, +{-0.99862953f, -0.052335956f}, {-0.99922904f, -0.039259816f}, +{-0.99965732f, -0.026176948f}, {-0.99991433f, -0.013089596f}, +{-1.0000000f, -1.2246064e-16f}, {-0.99991433f, 0.013089596f}, +{-0.99965732f, 0.026176948f}, {-0.99922904f, 0.039259816f}, +{-0.99862953f, 0.052335956f}, {-0.99785892f, 0.065403129f}, +{-0.99691733f, 0.078459096f}, {-0.99580493f, 0.091501619f}, +{-0.99452190f, 0.10452846f}, {-0.99306846f, 0.11753740f}, +{-0.99144486f, 0.13052619f}, {-0.98965139f, 0.14349262f}, +{-0.98768834f, 0.15643447f}, {-0.98555606f, 0.16934950f}, +{-0.98325491f, 0.18223553f}, {-0.98078528f, 0.19509032f}, +{-0.97814760f, 0.20791169f}, {-0.97534232f, 0.22069744f}, +{-0.97236992f, 0.23344536f}, {-0.96923091f, 0.24615329f}, +{-0.96592583f, 0.25881905f}, {-0.96245524f, 0.27144045f}, +{-0.95881973f, 0.28401534f}, {-0.95501994f, 0.29654157f}, +{-0.95105652f, 0.30901699f}, {-0.94693013f, 0.32143947f}, +{-0.94264149f, 0.33380686f}, {-0.93819134f, 0.34611706f}, +{-0.93358043f, 0.35836795f}, {-0.92880955f, 0.37055744f}, +{-0.92387953f, 0.38268343f}, {-0.91879121f, 0.39474386f}, +{-0.91354546f, 0.40673664f}, {-0.90814317f, 0.41865974f}, +{-0.90258528f, 0.43051110f}, {-0.89687274f, 0.44228869f}, +{-0.89100652f, 0.45399050f}, {-0.88498764f, 0.46561452f}, +{-0.87881711f, 0.47715876f}, {-0.87249601f, 0.48862124f}, +{-0.86602540f, 0.50000000f}, {-0.85940641f, 0.51129309f}, +{-0.85264016f, 0.52249856f}, {-0.84572782f, 0.53361452f}, +{-0.83867057f, 0.54463904f}, {-0.83146961f, 0.55557023f}, +{-0.82412619f, 0.56640624f}, {-0.81664156f, 0.57714519f}, +{-0.80901699f, 0.58778525f}, {-0.80125381f, 0.59832460f}, +{-0.79335334f, 0.60876143f}, {-0.78531693f, 0.61909395f}, +{-0.77714596f, 0.62932039f}, {-0.76884183f, 0.63943900f}, +{-0.76040597f, 0.64944805f}, {-0.75183981f, 0.65934582f}, +{-0.74314483f, 0.66913061f}, {-0.73432251f, 0.67880075f}, +{-0.72537437f, 0.68835458f}, {-0.71630194f, 0.69779046f}, +{-0.70710678f, 0.70710678f}, {-0.69779046f, 0.71630194f}, +{-0.68835458f, 0.72537437f}, {-0.67880075f, 0.73432251f}, +{-0.66913061f, 0.74314483f}, {-0.65934582f, 0.75183981f}, +{-0.64944805f, 0.76040597f}, {-0.63943900f, 0.76884183f}, +{-0.62932039f, 0.77714596f}, {-0.61909395f, 0.78531693f}, +{-0.60876143f, 0.79335334f}, {-0.59832460f, 0.80125381f}, +{-0.58778525f, 0.80901699f}, {-0.57714519f, 0.81664156f}, +{-0.56640624f, 0.82412619f}, {-0.55557023f, 0.83146961f}, +{-0.54463904f, 0.83867057f}, {-0.53361452f, 0.84572782f}, +{-0.52249856f, 0.85264016f}, {-0.51129309f, 0.85940641f}, +{-0.50000000f, 0.86602540f}, {-0.48862124f, 0.87249601f}, +{-0.47715876f, 0.87881711f}, {-0.46561452f, 0.88498764f}, +{-0.45399050f, 0.89100652f}, {-0.44228869f, 0.89687274f}, +{-0.43051110f, 0.90258528f}, {-0.41865974f, 0.90814317f}, +{-0.40673664f, 0.91354546f}, {-0.39474386f, 0.91879121f}, +{-0.38268343f, 0.92387953f}, {-0.37055744f, 0.92880955f}, +{-0.35836795f, 0.93358043f}, {-0.34611706f, 0.93819134f}, +{-0.33380686f, 0.94264149f}, {-0.32143947f, 0.94693013f}, +{-0.30901699f, 0.95105652f}, {-0.29654157f, 0.95501994f}, +{-0.28401534f, 0.95881973f}, {-0.27144045f, 0.96245524f}, +{-0.25881905f, 0.96592583f}, {-0.24615329f, 0.96923091f}, +{-0.23344536f, 0.97236992f}, {-0.22069744f, 0.97534232f}, +{-0.20791169f, 0.97814760f}, {-0.19509032f, 0.98078528f}, +{-0.18223553f, 0.98325491f}, {-0.16934950f, 0.98555606f}, +{-0.15643447f, 0.98768834f}, {-0.14349262f, 0.98965139f}, +{-0.13052619f, 0.99144486f}, {-0.11753740f, 0.99306846f}, +{-0.10452846f, 0.99452190f}, {-0.091501619f, 0.99580493f}, +{-0.078459096f, 0.99691733f}, {-0.065403129f, 0.99785892f}, +{-0.052335956f, 0.99862953f}, {-0.039259816f, 0.99922904f}, +{-0.026176948f, 0.99965732f}, {-0.013089596f, 0.99991433f}, +{-1.8369095e-16f, 1.0000000f}, {0.013089596f, 0.99991433f}, +{0.026176948f, 0.99965732f}, {0.039259816f, 0.99922904f}, +{0.052335956f, 0.99862953f}, {0.065403129f, 0.99785892f}, +{0.078459096f, 0.99691733f}, {0.091501619f, 0.99580493f}, +{0.10452846f, 0.99452190f}, {0.11753740f, 0.99306846f}, +{0.13052619f, 0.99144486f}, {0.14349262f, 0.98965139f}, +{0.15643447f, 0.98768834f}, {0.16934950f, 0.98555606f}, +{0.18223553f, 0.98325491f}, {0.19509032f, 0.98078528f}, +{0.20791169f, 0.97814760f}, {0.22069744f, 0.97534232f}, +{0.23344536f, 0.97236992f}, {0.24615329f, 0.96923091f}, +{0.25881905f, 0.96592583f}, {0.27144045f, 0.96245524f}, +{0.28401534f, 0.95881973f}, {0.29654157f, 0.95501994f}, +{0.30901699f, 0.95105652f}, {0.32143947f, 0.94693013f}, +{0.33380686f, 0.94264149f}, {0.34611706f, 0.93819134f}, +{0.35836795f, 0.93358043f}, {0.37055744f, 0.92880955f}, +{0.38268343f, 0.92387953f}, {0.39474386f, 0.91879121f}, +{0.40673664f, 0.91354546f}, {0.41865974f, 0.90814317f}, +{0.43051110f, 0.90258528f}, {0.44228869f, 0.89687274f}, +{0.45399050f, 0.89100652f}, {0.46561452f, 0.88498764f}, +{0.47715876f, 0.87881711f}, {0.48862124f, 0.87249601f}, +{0.50000000f, 0.86602540f}, {0.51129309f, 0.85940641f}, +{0.52249856f, 0.85264016f}, {0.53361452f, 0.84572782f}, +{0.54463904f, 0.83867057f}, {0.55557023f, 0.83146961f}, +{0.56640624f, 0.82412619f}, {0.57714519f, 0.81664156f}, +{0.58778525f, 0.80901699f}, {0.59832460f, 0.80125381f}, +{0.60876143f, 0.79335334f}, {0.61909395f, 0.78531693f}, +{0.62932039f, 0.77714596f}, {0.63943900f, 0.76884183f}, +{0.64944805f, 0.76040597f}, {0.65934582f, 0.75183981f}, +{0.66913061f, 0.74314483f}, {0.67880075f, 0.73432251f}, +{0.68835458f, 0.72537437f}, {0.69779046f, 0.71630194f}, +{0.70710678f, 0.70710678f}, {0.71630194f, 0.69779046f}, +{0.72537437f, 0.68835458f}, {0.73432251f, 0.67880075f}, +{0.74314483f, 0.66913061f}, {0.75183981f, 0.65934582f}, +{0.76040597f, 0.64944805f}, {0.76884183f, 0.63943900f}, +{0.77714596f, 0.62932039f}, {0.78531693f, 0.61909395f}, +{0.79335334f, 0.60876143f}, {0.80125381f, 0.59832460f}, +{0.80901699f, 0.58778525f}, {0.81664156f, 0.57714519f}, +{0.82412619f, 0.56640624f}, {0.83146961f, 0.55557023f}, +{0.83867057f, 0.54463904f}, {0.84572782f, 0.53361452f}, +{0.85264016f, 0.52249856f}, {0.85940641f, 0.51129309f}, +{0.86602540f, 0.50000000f}, {0.87249601f, 0.48862124f}, +{0.87881711f, 0.47715876f}, {0.88498764f, 0.46561452f}, +{0.89100652f, 0.45399050f}, {0.89687274f, 0.44228869f}, +{0.90258528f, 0.43051110f}, {0.90814317f, 0.41865974f}, +{0.91354546f, 0.40673664f}, {0.91879121f, 0.39474386f}, +{0.92387953f, 0.38268343f}, {0.92880955f, 0.37055744f}, +{0.93358043f, 0.35836795f}, {0.93819134f, 0.34611706f}, +{0.94264149f, 0.33380686f}, {0.94693013f, 0.32143947f}, +{0.95105652f, 0.30901699f}, {0.95501994f, 0.29654157f}, +{0.95881973f, 0.28401534f}, {0.96245524f, 0.27144045f}, +{0.96592583f, 0.25881905f}, {0.96923091f, 0.24615329f}, +{0.97236992f, 0.23344536f}, {0.97534232f, 0.22069744f}, +{0.97814760f, 0.20791169f}, {0.98078528f, 0.19509032f}, +{0.98325491f, 0.18223553f}, {0.98555606f, 0.16934950f}, +{0.98768834f, 0.15643447f}, {0.98965139f, 0.14349262f}, +{0.99144486f, 0.13052619f}, {0.99306846f, 0.11753740f}, +{0.99452190f, 0.10452846f}, {0.99580493f, 0.091501619f}, +{0.99691733f, 0.078459096f}, {0.99785892f, 0.065403129f}, +{0.99862953f, 0.052335956f}, {0.99922904f, 0.039259816f}, +{0.99965732f, 0.026176948f}, {0.99991433f, 0.013089596f}, +}; +#ifndef FFT_BITREV480 +#define FFT_BITREV480 +static const opus_int16 fft_bitrev480[480] = { +0, 96, 192, 288, 384, 32, 128, 224, 320, 416, 64, 160, 256, 352, 448, +8, 104, 200, 296, 392, 40, 136, 232, 328, 424, 72, 168, 264, 360, 456, +16, 112, 208, 304, 400, 48, 144, 240, 336, 432, 80, 176, 272, 368, 464, +24, 120, 216, 312, 408, 56, 152, 248, 344, 440, 88, 184, 280, 376, 472, +4, 100, 196, 292, 388, 36, 132, 228, 324, 420, 68, 164, 260, 356, 452, +12, 108, 204, 300, 396, 44, 140, 236, 332, 428, 76, 172, 268, 364, 460, +20, 116, 212, 308, 404, 52, 148, 244, 340, 436, 84, 180, 276, 372, 468, +28, 124, 220, 316, 412, 60, 156, 252, 348, 444, 92, 188, 284, 380, 476, +1, 97, 193, 289, 385, 33, 129, 225, 321, 417, 65, 161, 257, 353, 449, +9, 105, 201, 297, 393, 41, 137, 233, 329, 425, 73, 169, 265, 361, 457, +17, 113, 209, 305, 401, 49, 145, 241, 337, 433, 81, 177, 273, 369, 465, +25, 121, 217, 313, 409, 57, 153, 249, 345, 441, 89, 185, 281, 377, 473, +5, 101, 197, 293, 389, 37, 133, 229, 325, 421, 69, 165, 261, 357, 453, +13, 109, 205, 301, 397, 45, 141, 237, 333, 429, 77, 173, 269, 365, 461, +21, 117, 213, 309, 405, 53, 149, 245, 341, 437, 85, 181, 277, 373, 469, +29, 125, 221, 317, 413, 61, 157, 253, 349, 445, 93, 189, 285, 381, 477, +2, 98, 194, 290, 386, 34, 130, 226, 322, 418, 66, 162, 258, 354, 450, +10, 106, 202, 298, 394, 42, 138, 234, 330, 426, 74, 170, 266, 362, 458, +18, 114, 210, 306, 402, 50, 146, 242, 338, 434, 82, 178, 274, 370, 466, +26, 122, 218, 314, 410, 58, 154, 250, 346, 442, 90, 186, 282, 378, 474, +6, 102, 198, 294, 390, 38, 134, 230, 326, 422, 70, 166, 262, 358, 454, +14, 110, 206, 302, 398, 46, 142, 238, 334, 430, 78, 174, 270, 366, 462, +22, 118, 214, 310, 406, 54, 150, 246, 342, 438, 86, 182, 278, 374, 470, +30, 126, 222, 318, 414, 62, 158, 254, 350, 446, 94, 190, 286, 382, 478, +3, 99, 195, 291, 387, 35, 131, 227, 323, 419, 67, 163, 259, 355, 451, +11, 107, 203, 299, 395, 43, 139, 235, 331, 427, 75, 171, 267, 363, 459, +19, 115, 211, 307, 403, 51, 147, 243, 339, 435, 83, 179, 275, 371, 467, +27, 123, 219, 315, 411, 59, 155, 251, 347, 443, 91, 187, 283, 379, 475, +7, 103, 199, 295, 391, 39, 135, 231, 327, 423, 71, 167, 263, 359, 455, +15, 111, 207, 303, 399, 47, 143, 239, 335, 431, 79, 175, 271, 367, 463, +23, 119, 215, 311, 407, 55, 151, 247, 343, 439, 87, 183, 279, 375, 471, +31, 127, 223, 319, 415, 63, 159, 255, 351, 447, 95, 191, 287, 383, 479, +}; +#endif + +#ifndef FFT_BITREV240 +#define FFT_BITREV240 +static const opus_int16 fft_bitrev240[240] = { +0, 48, 96, 144, 192, 16, 64, 112, 160, 208, 32, 80, 128, 176, 224, +4, 52, 100, 148, 196, 20, 68, 116, 164, 212, 36, 84, 132, 180, 228, +8, 56, 104, 152, 200, 24, 72, 120, 168, 216, 40, 88, 136, 184, 232, +12, 60, 108, 156, 204, 28, 76, 124, 172, 220, 44, 92, 140, 188, 236, +1, 49, 97, 145, 193, 17, 65, 113, 161, 209, 33, 81, 129, 177, 225, +5, 53, 101, 149, 197, 21, 69, 117, 165, 213, 37, 85, 133, 181, 229, +9, 57, 105, 153, 201, 25, 73, 121, 169, 217, 41, 89, 137, 185, 233, +13, 61, 109, 157, 205, 29, 77, 125, 173, 221, 45, 93, 141, 189, 237, +2, 50, 98, 146, 194, 18, 66, 114, 162, 210, 34, 82, 130, 178, 226, +6, 54, 102, 150, 198, 22, 70, 118, 166, 214, 38, 86, 134, 182, 230, +10, 58, 106, 154, 202, 26, 74, 122, 170, 218, 42, 90, 138, 186, 234, +14, 62, 110, 158, 206, 30, 78, 126, 174, 222, 46, 94, 142, 190, 238, +3, 51, 99, 147, 195, 19, 67, 115, 163, 211, 35, 83, 131, 179, 227, +7, 55, 103, 151, 199, 23, 71, 119, 167, 215, 39, 87, 135, 183, 231, +11, 59, 107, 155, 203, 27, 75, 123, 171, 219, 43, 91, 139, 187, 235, +15, 63, 111, 159, 207, 31, 79, 127, 175, 223, 47, 95, 143, 191, 239, +}; +#endif + +#ifndef FFT_BITREV120 +#define FFT_BITREV120 +static const opus_int16 fft_bitrev120[120] = { +0, 24, 48, 72, 96, 8, 32, 56, 80, 104, 16, 40, 64, 88, 112, +4, 28, 52, 76, 100, 12, 36, 60, 84, 108, 20, 44, 68, 92, 116, +1, 25, 49, 73, 97, 9, 33, 57, 81, 105, 17, 41, 65, 89, 113, +5, 29, 53, 77, 101, 13, 37, 61, 85, 109, 21, 45, 69, 93, 117, +2, 26, 50, 74, 98, 10, 34, 58, 82, 106, 18, 42, 66, 90, 114, +6, 30, 54, 78, 102, 14, 38, 62, 86, 110, 22, 46, 70, 94, 118, +3, 27, 51, 75, 99, 11, 35, 59, 83, 107, 19, 43, 67, 91, 115, +7, 31, 55, 79, 103, 15, 39, 63, 87, 111, 23, 47, 71, 95, 119, +}; +#endif + +#ifndef FFT_BITREV60 +#define FFT_BITREV60 +static const opus_int16 fft_bitrev60[60] = { +0, 12, 24, 36, 48, 4, 16, 28, 40, 52, 8, 20, 32, 44, 56, +1, 13, 25, 37, 49, 5, 17, 29, 41, 53, 9, 21, 33, 45, 57, +2, 14, 26, 38, 50, 6, 18, 30, 42, 54, 10, 22, 34, 46, 58, +3, 15, 27, 39, 51, 7, 19, 31, 43, 55, 11, 23, 35, 47, 59, +}; +#endif + +#ifndef FFT_STATE48000_960_0 +#define FFT_STATE48000_960_0 +static const kiss_fft_state fft_state48000_960_0 = { +480, /* nfft */ +0.002083333f, /* scale */ +-1, /* shift */ +{5, 96, 3, 32, 4, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, }, /* factors */ +fft_bitrev480, /* bitrev */ +fft_twiddles48000_960, /* bitrev */ +#ifdef OVERRIDE_FFT +(arch_fft_state *)&cfg_arch_480, +#else +NULL, +#endif +}; +#endif + +#ifndef FFT_STATE48000_960_1 +#define FFT_STATE48000_960_1 +static const kiss_fft_state fft_state48000_960_1 = { +240, /* nfft */ +0.004166667f, /* scale */ +1, /* shift */ +{5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ +fft_bitrev240, /* bitrev */ +fft_twiddles48000_960, /* bitrev */ +#ifdef OVERRIDE_FFT +(arch_fft_state *)&cfg_arch_240, +#else +NULL, +#endif +}; +#endif + +#ifndef FFT_STATE48000_960_2 +#define FFT_STATE48000_960_2 +static const kiss_fft_state fft_state48000_960_2 = { +120, /* nfft */ +0.008333333f, /* scale */ +2, /* shift */ +{5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ +fft_bitrev120, /* bitrev */ +fft_twiddles48000_960, /* bitrev */ +#ifdef OVERRIDE_FFT +(arch_fft_state *)&cfg_arch_120, +#else +NULL, +#endif +}; +#endif + +#ifndef FFT_STATE48000_960_3 +#define FFT_STATE48000_960_3 +static const kiss_fft_state fft_state48000_960_3 = { +60, /* nfft */ +0.016666667f, /* scale */ +3, /* shift */ +{5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ +fft_bitrev60, /* bitrev */ +fft_twiddles48000_960, /* bitrev */ +#ifdef OVERRIDE_FFT +(arch_fft_state *)&cfg_arch_60, +#else +NULL, +#endif +}; +#endif + +#endif + +#ifndef MDCT_TWIDDLES960 +#define MDCT_TWIDDLES960 +static const opus_val16 mdct_twiddles960[1800] = { +0.99999994f, 0.99999321f, 0.99997580f, 0.99994773f, 0.99990886f, +0.99985933f, 0.99979913f, 0.99972820f, 0.99964654f, 0.99955416f, +0.99945110f, 0.99933738f, 0.99921292f, 0.99907774f, 0.99893188f, +0.99877530f, 0.99860805f, 0.99843007f, 0.99824142f, 0.99804211f, +0.99783206f, 0.99761140f, 0.99737996f, 0.99713790f, 0.99688518f, +0.99662173f, 0.99634761f, 0.99606287f, 0.99576741f, 0.99546129f, +0.99514455f, 0.99481714f, 0.99447906f, 0.99413031f, 0.99377096f, +0.99340093f, 0.99302030f, 0.99262899f, 0.99222708f, 0.99181455f, +0.99139136f, 0.99095762f, 0.99051321f, 0.99005818f, 0.98959261f, +0.98911643f, 0.98862964f, 0.98813224f, 0.98762429f, 0.98710573f, +0.98657662f, 0.98603696f, 0.98548669f, 0.98492593f, 0.98435456f, +0.98377270f, 0.98318028f, 0.98257732f, 0.98196387f, 0.98133987f, +0.98070538f, 0.98006040f, 0.97940493f, 0.97873890f, 0.97806245f, +0.97737551f, 0.97667813f, 0.97597027f, 0.97525197f, 0.97452319f, +0.97378403f, 0.97303438f, 0.97227436f, 0.97150391f, 0.97072303f, +0.96993178f, 0.96913016f, 0.96831810f, 0.96749574f, 0.96666300f, +0.96581990f, 0.96496642f, 0.96410263f, 0.96322852f, 0.96234411f, +0.96144938f, 0.96054435f, 0.95962906f, 0.95870346f, 0.95776761f, +0.95682150f, 0.95586514f, 0.95489854f, 0.95392174f, 0.95293468f, +0.95193744f, 0.95093000f, 0.94991243f, 0.94888461f, 0.94784665f, +0.94679856f, 0.94574034f, 0.94467193f, 0.94359344f, 0.94250488f, +0.94140619f, 0.94029742f, 0.93917859f, 0.93804967f, 0.93691075f, +0.93576175f, 0.93460274f, 0.93343377f, 0.93225473f, 0.93106574f, +0.92986679f, 0.92865789f, 0.92743903f, 0.92621022f, 0.92497152f, +0.92372292f, 0.92246443f, 0.92119598f, 0.91991776f, 0.91862965f, +0.91733170f, 0.91602397f, 0.91470635f, 0.91337901f, 0.91204184f, +0.91069490f, 0.90933824f, 0.90797186f, 0.90659571f, 0.90520984f, +0.90381432f, 0.90240908f, 0.90099424f, 0.89956969f, 0.89813554f, +0.89669174f, 0.89523834f, 0.89377540f, 0.89230281f, 0.89082074f, +0.88932908f, 0.88782793f, 0.88631725f, 0.88479710f, 0.88326746f, +0.88172835f, 0.88017982f, 0.87862182f, 0.87705445f, 0.87547767f, +0.87389153f, 0.87229604f, 0.87069118f, 0.86907703f, 0.86745358f, +0.86582077f, 0.86417878f, 0.86252749f, 0.86086690f, 0.85919720f, +0.85751826f, 0.85583007f, 0.85413277f, 0.85242635f, 0.85071075f, +0.84898609f, 0.84725231f, 0.84550947f, 0.84375757f, 0.84199661f, +0.84022665f, 0.83844769f, 0.83665979f, 0.83486289f, 0.83305705f, +0.83124226f, 0.82941860f, 0.82758605f, 0.82574469f, 0.82389444f, +0.82203537f, 0.82016748f, 0.81829083f, 0.81640542f, 0.81451124f, +0.81260836f, 0.81069672f, 0.80877650f, 0.80684757f, 0.80490994f, +0.80296379f, 0.80100900f, 0.79904562f, 0.79707366f, 0.79509324f, +0.79310423f, 0.79110676f, 0.78910083f, 0.78708643f, 0.78506362f, +0.78303236f, 0.78099275f, 0.77894479f, 0.77688843f, 0.77482378f, +0.77275085f, 0.77066964f, 0.76858020f, 0.76648247f, 0.76437658f, +0.76226246f, 0.76014024f, 0.75800985f, 0.75587130f, 0.75372469f, +0.75157005f, 0.74940729f, 0.74723655f, 0.74505776f, 0.74287105f, +0.74067634f, 0.73847371f, 0.73626316f, 0.73404479f, 0.73181850f, +0.72958434f, 0.72734243f, 0.72509271f, 0.72283524f, 0.72057003f, +0.71829706f, 0.71601641f, 0.71372813f, 0.71143216f, 0.70912862f, +0.70681745f, 0.70449871f, 0.70217246f, 0.69983864f, 0.69749737f, +0.69514859f, 0.69279242f, 0.69042879f, 0.68805778f, 0.68567938f, +0.68329364f, 0.68090063f, 0.67850029f, 0.67609268f, 0.67367786f, +0.67125577f, 0.66882652f, 0.66639012f, 0.66394657f, 0.66149592f, +0.65903819f, 0.65657341f, 0.65410155f, 0.65162271f, 0.64913690f, +0.64664418f, 0.64414448f, 0.64163786f, 0.63912445f, 0.63660413f, +0.63407701f, 0.63154310f, 0.62900239f, 0.62645501f, 0.62390089f, +0.62134010f, 0.61877263f, 0.61619854f, 0.61361790f, 0.61103064f, +0.60843682f, 0.60583651f, 0.60322970f, 0.60061646f, 0.59799677f, +0.59537065f, 0.59273821f, 0.59009939f, 0.58745426f, 0.58480281f, +0.58214509f, 0.57948118f, 0.57681108f, 0.57413477f, 0.57145232f, +0.56876373f, 0.56606907f, 0.56336832f, 0.56066155f, 0.55794877f, +0.55523002f, 0.55250537f, 0.54977477f, 0.54703826f, 0.54429591f, +0.54154772f, 0.53879374f, 0.53603399f, 0.53326851f, 0.53049731f, +0.52772039f, 0.52493787f, 0.52214974f, 0.51935595f, 0.51655668f, +0.51375180f, 0.51094145f, 0.50812566f, 0.50530440f, 0.50247771f, +0.49964568f, 0.49680826f, 0.49396557f, 0.49111754f, 0.48826426f, +0.48540577f, 0.48254207f, 0.47967321f, 0.47679919f, 0.47392011f, +0.47103590f, 0.46814668f, 0.46525243f, 0.46235323f, 0.45944905f, +0.45653993f, 0.45362595f, 0.45070711f, 0.44778344f, 0.44485497f, +0.44192174f, 0.43898380f, 0.43604112f, 0.43309379f, 0.43014181f, +0.42718524f, 0.42422408f, 0.42125839f, 0.41828820f, 0.41531351f, +0.41233435f, 0.40935081f, 0.40636289f, 0.40337059f, 0.40037400f, +0.39737311f, 0.39436796f, 0.39135858f, 0.38834500f, 0.38532731f, +0.38230544f, 0.37927949f, 0.37624949f, 0.37321547f, 0.37017745f, +0.36713544f, 0.36408952f, 0.36103970f, 0.35798600f, 0.35492846f, +0.35186714f, 0.34880206f, 0.34573323f, 0.34266070f, 0.33958447f, +0.33650464f, 0.33342120f, 0.33033419f, 0.32724363f, 0.32414958f, +0.32105204f, 0.31795108f, 0.31484672f, 0.31173897f, 0.30862790f, +0.30551350f, 0.30239585f, 0.29927495f, 0.29615086f, 0.29302359f, +0.28989318f, 0.28675964f, 0.28362307f, 0.28048345f, 0.27734083f, +0.27419522f, 0.27104670f, 0.26789525f, 0.26474094f, 0.26158381f, +0.25842386f, 0.25526115f, 0.25209570f, 0.24892756f, 0.24575676f, +0.24258332f, 0.23940729f, 0.23622867f, 0.23304754f, 0.22986393f, +0.22667783f, 0.22348931f, 0.22029841f, 0.21710514f, 0.21390954f, +0.21071166f, 0.20751151f, 0.20430915f, 0.20110460f, 0.19789790f, +0.19468907f, 0.19147816f, 0.18826519f, 0.18505022f, 0.18183327f, +0.17861435f, 0.17539354f, 0.17217083f, 0.16894630f, 0.16571994f, +0.16249183f, 0.15926196f, 0.15603039f, 0.15279715f, 0.14956227f, +0.14632578f, 0.14308774f, 0.13984816f, 0.13660708f, 0.13336454f, +0.13012058f, 0.12687522f, 0.12362850f, 0.12038045f, 0.11713112f, +0.11388054f, 0.11062872f, 0.10737573f, 0.10412160f, 0.10086634f, +0.097609997f, 0.094352618f, 0.091094226f, 0.087834857f, 0.084574550f, +0.081313334f, 0.078051247f, 0.074788325f, 0.071524605f, 0.068260118f, +0.064994894f, 0.061728980f, 0.058462404f, 0.055195201f, 0.051927410f, +0.048659060f, 0.045390189f, 0.042120833f, 0.038851023f, 0.035580799f, +0.032310195f, 0.029039243f, 0.025767982f, 0.022496443f, 0.019224664f, +0.015952680f, 0.012680525f, 0.0094082337f, 0.0061358409f, 0.0028633832f, +-0.00040910527f, -0.0036815894f, -0.0069540343f, -0.010226404f, -0.013498665f, +-0.016770782f, -0.020042717f, -0.023314439f, -0.026585912f, -0.029857099f, +-0.033127967f, -0.036398482f, -0.039668605f, -0.042938303f, -0.046207540f, +-0.049476285f, -0.052744497f, -0.056012146f, -0.059279196f, -0.062545612f, +-0.065811358f, -0.069076397f, -0.072340697f, -0.075604223f, -0.078866936f, +-0.082128808f, -0.085389800f, -0.088649876f, -0.091909006f, -0.095167145f, +-0.098424271f, -0.10168034f, -0.10493532f, -0.10818918f, -0.11144188f, +-0.11469338f, -0.11794366f, -0.12119267f, -0.12444039f, -0.12768677f, +-0.13093179f, -0.13417540f, -0.13741758f, -0.14065829f, -0.14389749f, +-0.14713514f, -0.15037122f, -0.15360570f, -0.15683852f, -0.16006967f, +-0.16329910f, -0.16652679f, -0.16975269f, -0.17297678f, -0.17619900f, +-0.17941935f, -0.18263777f, -0.18585424f, -0.18906870f, -0.19228116f, +-0.19549155f, -0.19869985f, -0.20190603f, -0.20511003f, -0.20831184f, +-0.21151142f, -0.21470875f, -0.21790376f, -0.22109644f, -0.22428675f, +-0.22747467f, -0.23066014f, -0.23384315f, -0.23702365f, -0.24020162f, +-0.24337701f, -0.24654980f, -0.24971995f, -0.25288740f, -0.25605217f, +-0.25921419f, -0.26237345f, -0.26552987f, -0.26868346f, -0.27183419f, +-0.27498198f, -0.27812684f, -0.28126872f, -0.28440759f, -0.28754342f, +-0.29067615f, -0.29380578f, -0.29693225f, -0.30005556f, -0.30317566f, +-0.30629250f, -0.30940607f, -0.31251630f, -0.31562322f, -0.31872672f, +-0.32182685f, -0.32492352f, -0.32801670f, -0.33110636f, -0.33419248f, +-0.33727503f, -0.34035397f, -0.34342924f, -0.34650084f, -0.34956875f, +-0.35263291f, -0.35569328f, -0.35874987f, -0.36180258f, -0.36485144f, +-0.36789638f, -0.37093741f, -0.37397444f, -0.37700745f, -0.38003644f, +-0.38306138f, -0.38608220f, -0.38909888f, -0.39211139f, -0.39511973f, +-0.39812380f, -0.40112361f, -0.40411916f, -0.40711036f, -0.41009718f, +-0.41307965f, -0.41605768f, -0.41903123f, -0.42200032f, -0.42496487f, +-0.42792490f, -0.43088034f, -0.43383113f, -0.43677729f, -0.43971881f, +-0.44265559f, -0.44558764f, -0.44851488f, -0.45143735f, -0.45435500f, +-0.45726776f, -0.46017563f, -0.46307856f, -0.46597654f, -0.46886954f, +-0.47175750f, -0.47464043f, -0.47751826f, -0.48039100f, -0.48325855f, +-0.48612097f, -0.48897815f, -0.49183011f, -0.49467680f, -0.49751821f, +-0.50035429f, -0.50318497f, -0.50601029f, -0.50883019f, -0.51164466f, +-0.51445359f, -0.51725709f, -0.52005500f, -0.52284735f, -0.52563411f, +-0.52841520f, -0.53119069f, -0.53396046f, -0.53672451f, -0.53948283f, +-0.54223537f, -0.54498214f, -0.54772300f, -0.55045801f, -0.55318713f, +-0.55591035f, -0.55862761f, -0.56133890f, -0.56404412f, -0.56674337f, +-0.56943649f, -0.57212353f, -0.57480448f, -0.57747924f, -0.58014780f, +-0.58281022f, -0.58546633f, -0.58811617f, -0.59075975f, -0.59339696f, +-0.59602785f, -0.59865236f, -0.60127044f, -0.60388207f, -0.60648727f, +-0.60908598f, -0.61167812f, -0.61426371f, -0.61684275f, -0.61941516f, +-0.62198097f, -0.62454009f, -0.62709254f, -0.62963831f, -0.63217729f, +-0.63470948f, -0.63723493f, -0.63975352f, -0.64226526f, -0.64477009f, +-0.64726806f, -0.64975911f, -0.65224314f, -0.65472025f, -0.65719032f, +-0.65965337f, -0.66210932f, -0.66455823f, -0.66700000f, -0.66943461f, +-0.67186207f, -0.67428231f, -0.67669535f, -0.67910111f, -0.68149966f, +-0.68389088f, -0.68627477f, -0.68865126f, -0.69102043f, -0.69338220f, +-0.69573659f, -0.69808346f, -0.70042288f, -0.70275480f, -0.70507920f, +-0.70739603f, -0.70970529f, -0.71200693f, -0.71430099f, -0.71658736f, +-0.71886611f, -0.72113711f, -0.72340041f, -0.72565591f, -0.72790372f, +-0.73014367f, -0.73237586f, -0.73460019f, -0.73681659f, -0.73902518f, +-0.74122584f, -0.74341851f, -0.74560326f, -0.74778003f, -0.74994880f, +-0.75210953f, -0.75426215f, -0.75640678f, -0.75854325f, -0.76067162f, +-0.76279181f, -0.76490390f, -0.76700771f, -0.76910341f, -0.77119076f, +-0.77326995f, -0.77534080f, -0.77740335f, -0.77945763f, -0.78150350f, +-0.78354102f, -0.78557014f, -0.78759086f, -0.78960317f, -0.79160696f, +-0.79360235f, -0.79558921f, -0.79756755f, -0.79953730f, -0.80149853f, +-0.80345118f, -0.80539525f, -0.80733067f, -0.80925739f, -0.81117553f, +-0.81308490f, -0.81498563f, -0.81687760f, -0.81876087f, -0.82063532f, +-0.82250100f, -0.82435787f, -0.82620591f, -0.82804507f, -0.82987541f, +-0.83169687f, -0.83350939f, -0.83531296f, -0.83710766f, -0.83889335f, +-0.84067005f, -0.84243774f, -0.84419644f, -0.84594607f, -0.84768665f, +-0.84941816f, -0.85114056f, -0.85285389f, -0.85455805f, -0.85625303f, +-0.85793889f, -0.85961550f, -0.86128294f, -0.86294121f, -0.86459017f, +-0.86622989f, -0.86786032f, -0.86948150f, -0.87109333f, -0.87269586f, +-0.87428904f, -0.87587279f, -0.87744725f, -0.87901229f, -0.88056785f, +-0.88211405f, -0.88365078f, -0.88517809f, -0.88669586f, -0.88820416f, +-0.88970292f, -0.89119220f, -0.89267188f, -0.89414203f, -0.89560264f, +-0.89705360f, -0.89849502f, -0.89992678f, -0.90134889f, -0.90276134f, +-0.90416414f, -0.90555727f, -0.90694070f, -0.90831441f, -0.90967834f, +-0.91103262f, -0.91237706f, -0.91371179f, -0.91503674f, -0.91635185f, +-0.91765714f, -0.91895264f, -0.92023826f, -0.92151409f, -0.92277998f, +-0.92403603f, -0.92528218f, -0.92651838f, -0.92774469f, -0.92896110f, +-0.93016750f, -0.93136400f, -0.93255049f, -0.93372697f, -0.93489349f, +-0.93604994f, -0.93719643f, -0.93833286f, -0.93945926f, -0.94057560f, +-0.94168180f, -0.94277799f, -0.94386405f, -0.94494003f, -0.94600588f, +-0.94706154f, -0.94810712f, -0.94914252f, -0.95016778f, -0.95118284f, +-0.95218778f, -0.95318246f, -0.95416695f, -0.95514119f, -0.95610523f, +-0.95705903f, -0.95800257f, -0.95893586f, -0.95985889f, -0.96077162f, +-0.96167403f, -0.96256620f, -0.96344805f, -0.96431959f, -0.96518075f, +-0.96603161f, -0.96687216f, -0.96770233f, -0.96852213f, -0.96933156f, +-0.97013056f, -0.97091925f, -0.97169751f, -0.97246534f, -0.97322279f, +-0.97396982f, -0.97470641f, -0.97543252f, -0.97614825f, -0.97685349f, +-0.97754824f, -0.97823256f, -0.97890645f, -0.97956979f, -0.98022264f, +-0.98086500f, -0.98149687f, -0.98211825f, -0.98272908f, -0.98332942f, +-0.98391914f, -0.98449844f, -0.98506713f, -0.98562527f, -0.98617285f, +-0.98670989f, -0.98723638f, -0.98775226f, -0.98825759f, -0.98875231f, +-0.98923647f, -0.98971003f, -0.99017298f, -0.99062532f, -0.99106705f, +-0.99149817f, -0.99191868f, -0.99232858f, -0.99272782f, -0.99311644f, +-0.99349445f, -0.99386179f, -0.99421853f, -0.99456459f, -0.99489999f, +-0.99522477f, -0.99553883f, -0.99584228f, -0.99613506f, -0.99641716f, +-0.99668860f, -0.99694937f, -0.99719942f, -0.99743885f, -0.99766755f, +-0.99788558f, -0.99809295f, -0.99828959f, -0.99847561f, -0.99865085f, +-0.99881548f, -0.99896932f, -0.99911255f, -0.99924499f, -0.99936682f, +-0.99947786f, -0.99957830f, -0.99966794f, -0.99974692f, -0.99981517f, +-0.99987274f, -0.99991959f, -0.99995571f, -0.99998116f, -0.99999589f, +0.99999964f, 0.99997288f, 0.99990326f, 0.99979085f, 0.99963558f, +0.99943751f, 0.99919659f, 0.99891287f, 0.99858636f, 0.99821711f, +0.99780506f, 0.99735034f, 0.99685282f, 0.99631262f, 0.99572974f, +0.99510419f, 0.99443603f, 0.99372530f, 0.99297196f, 0.99217612f, +0.99133772f, 0.99045694f, 0.98953366f, 0.98856801f, 0.98756003f, +0.98650974f, 0.98541719f, 0.98428243f, 0.98310548f, 0.98188645f, +0.98062533f, 0.97932225f, 0.97797716f, 0.97659022f, 0.97516143f, +0.97369087f, 0.97217858f, 0.97062469f, 0.96902919f, 0.96739221f, +0.96571374f, 0.96399397f, 0.96223283f, 0.96043050f, 0.95858705f, +0.95670253f, 0.95477700f, 0.95281059f, 0.95080340f, 0.94875544f, +0.94666684f, 0.94453770f, 0.94236809f, 0.94015813f, 0.93790787f, +0.93561745f, 0.93328691f, 0.93091643f, 0.92850608f, 0.92605597f, +0.92356616f, 0.92103678f, 0.91846794f, 0.91585976f, 0.91321236f, +0.91052586f, 0.90780038f, 0.90503591f, 0.90223277f, 0.89939094f, +0.89651060f, 0.89359182f, 0.89063478f, 0.88763964f, 0.88460642f, +0.88153529f, 0.87842643f, 0.87527996f, 0.87209594f, 0.86887461f, +0.86561602f, 0.86232042f, 0.85898781f, 0.85561842f, 0.85221243f, +0.84876984f, 0.84529096f, 0.84177583f, 0.83822471f, 0.83463764f, +0.83101481f, 0.82735640f, 0.82366252f, 0.81993335f, 0.81616908f, +0.81236988f, 0.80853581f, 0.80466717f, 0.80076402f, 0.79682660f, +0.79285502f, 0.78884947f, 0.78481019f, 0.78073722f, 0.77663082f, +0.77249116f, 0.76831841f, 0.76411277f, 0.75987434f, 0.75560343f, +0.75130010f, 0.74696463f, 0.74259710f, 0.73819780f, 0.73376691f, +0.72930455f, 0.72481096f, 0.72028631f, 0.71573079f, 0.71114463f, +0.70652801f, 0.70188117f, 0.69720417f, 0.69249737f, 0.68776089f, +0.68299496f, 0.67819971f, 0.67337549f, 0.66852236f, 0.66364062f, +0.65873051f, 0.65379208f, 0.64882571f, 0.64383155f, 0.63880974f, +0.63376063f, 0.62868434f, 0.62358117f, 0.61845124f, 0.61329484f, +0.60811216f, 0.60290343f, 0.59766883f, 0.59240872f, 0.58712316f, +0.58181250f, 0.57647687f, 0.57111657f, 0.56573176f, 0.56032276f, +0.55488980f, 0.54943299f, 0.54395270f, 0.53844911f, 0.53292239f, +0.52737290f, 0.52180082f, 0.51620632f, 0.51058978f, 0.50495136f, +0.49929130f, 0.49360985f, 0.48790723f, 0.48218375f, 0.47643960f, +0.47067502f, 0.46489030f, 0.45908567f, 0.45326138f, 0.44741765f, +0.44155475f, 0.43567297f, 0.42977250f, 0.42385364f, 0.41791660f, +0.41196167f, 0.40598908f, 0.39999911f, 0.39399201f, 0.38796803f, +0.38192743f, 0.37587047f, 0.36979741f, 0.36370850f, 0.35760403f, +0.35148421f, 0.34534934f, 0.33919969f, 0.33303553f, 0.32685706f, +0.32066461f, 0.31445843f, 0.30823877f, 0.30200592f, 0.29576012f, +0.28950164f, 0.28323078f, 0.27694780f, 0.27065292f, 0.26434645f, +0.25802869f, 0.25169984f, 0.24536023f, 0.23901010f, 0.23264973f, +0.22627939f, 0.21989937f, 0.21350993f, 0.20711134f, 0.20070387f, +0.19428782f, 0.18786344f, 0.18143101f, 0.17499080f, 0.16854310f, +0.16208819f, 0.15562633f, 0.14915779f, 0.14268288f, 0.13620184f, +0.12971498f, 0.12322257f, 0.11672486f, 0.11022217f, 0.10371475f, +0.097202882f, 0.090686858f, 0.084166944f, 0.077643424f, 0.071116582f, +0.064586692f, 0.058054037f, 0.051518895f, 0.044981543f, 0.038442269f, +0.031901345f, 0.025359053f, 0.018815678f, 0.012271495f, 0.0057267868f, +-0.00081816671f, -0.0073630852f, -0.013907688f, -0.020451695f, -0.026994826f, +-0.033536803f, -0.040077340f, -0.046616159f, -0.053152986f, -0.059687532f, +-0.066219524f, -0.072748676f, -0.079274714f, -0.085797355f, -0.092316322f, +-0.098831341f, -0.10534211f, -0.11184838f, -0.11834986f, -0.12484626f, +-0.13133731f, -0.13782275f, -0.14430228f, -0.15077563f, -0.15724251f, +-0.16370267f, -0.17015581f, -0.17660165f, -0.18303993f, -0.18947038f, +-0.19589271f, -0.20230664f, -0.20871192f, -0.21510825f, -0.22149536f, +-0.22787298f, -0.23424086f, -0.24059868f, -0.24694622f, -0.25328314f, +-0.25960925f, -0.26592422f, -0.27222782f, -0.27851975f, -0.28479972f, +-0.29106751f, -0.29732284f, -0.30356544f, -0.30979502f, -0.31601134f, +-0.32221413f, -0.32840309f, -0.33457801f, -0.34073856f, -0.34688455f, +-0.35301566f, -0.35913166f, -0.36523229f, -0.37131724f, -0.37738630f, +-0.38343921f, -0.38947567f, -0.39549544f, -0.40149832f, -0.40748394f, +-0.41345215f, -0.41940263f, -0.42533514f, -0.43124944f, -0.43714526f, +-0.44302234f, -0.44888046f, -0.45471936f, -0.46053877f, -0.46633846f, +-0.47211814f, -0.47787762f, -0.48361665f, -0.48933494f, -0.49503228f, +-0.50070840f, -0.50636309f, -0.51199609f, -0.51760709f, -0.52319598f, +-0.52876246f, -0.53430629f, -0.53982723f, -0.54532504f, -0.55079949f, +-0.55625033f, -0.56167740f, -0.56708032f, -0.57245898f, -0.57781315f, +-0.58314258f, -0.58844697f, -0.59372622f, -0.59897995f, -0.60420811f, +-0.60941035f, -0.61458647f, -0.61973625f, -0.62485951f, -0.62995601f, +-0.63502556f, -0.64006782f, -0.64508271f, -0.65007001f, -0.65502942f, +-0.65996075f, -0.66486382f, -0.66973841f, -0.67458433f, -0.67940134f, +-0.68418926f, -0.68894786f, -0.69367695f, -0.69837630f, -0.70304573f, +-0.70768511f, -0.71229410f, -0.71687263f, -0.72142041f, -0.72593731f, +-0.73042315f, -0.73487765f, -0.73930067f, -0.74369204f, -0.74805158f, +-0.75237900f, -0.75667429f, -0.76093709f, -0.76516730f, -0.76936477f, +-0.77352923f, -0.77766061f, -0.78175867f, -0.78582323f, -0.78985411f, +-0.79385114f, -0.79781419f, -0.80174309f, -0.80563760f, -0.80949765f, +-0.81332302f, -0.81711352f, -0.82086903f, -0.82458937f, -0.82827437f, +-0.83192390f, -0.83553779f, -0.83911592f, -0.84265804f, -0.84616417f, +-0.84963393f, -0.85306740f, -0.85646427f, -0.85982448f, -0.86314780f, +-0.86643422f, -0.86968350f, -0.87289548f, -0.87607014f, -0.87920725f, +-0.88230664f, -0.88536829f, -0.88839203f, -0.89137769f, -0.89432514f, +-0.89723432f, -0.90010506f, -0.90293723f, -0.90573072f, -0.90848541f, +-0.91120118f, -0.91387796f, -0.91651553f, -0.91911387f, -0.92167282f, +-0.92419231f, -0.92667222f, -0.92911243f, -0.93151283f, -0.93387336f, +-0.93619382f, -0.93847424f, -0.94071442f, -0.94291431f, -0.94507378f, +-0.94719279f, -0.94927126f, -0.95130903f, -0.95330608f, -0.95526224f, +-0.95717752f, -0.95905179f, -0.96088499f, -0.96267700f, -0.96442777f, +-0.96613729f, -0.96780539f, -0.96943200f, -0.97101706f, -0.97256058f, +-0.97406244f, -0.97552258f, -0.97694093f, -0.97831738f, -0.97965199f, +-0.98094457f, -0.98219514f, -0.98340368f, -0.98457009f, -0.98569429f, +-0.98677629f, -0.98781598f, -0.98881340f, -0.98976845f, -0.99068111f, +-0.99155134f, -0.99237907f, -0.99316430f, -0.99390697f, -0.99460709f, +-0.99526459f, -0.99587947f, -0.99645168f, -0.99698120f, -0.99746799f, +-0.99791211f, -0.99831343f, -0.99867201f, -0.99898779f, -0.99926084f, +-0.99949104f, -0.99967843f, -0.99982297f, -0.99992472f, -0.99998361f, +0.99999869f, 0.99989158f, 0.99961317f, 0.99916345f, 0.99854255f, +0.99775058f, 0.99678761f, 0.99565387f, 0.99434954f, 0.99287480f, +0.99122995f, 0.98941529f, 0.98743105f, 0.98527765f, 0.98295540f, +0.98046476f, 0.97780609f, 0.97497988f, 0.97198665f, 0.96882683f, +0.96550101f, 0.96200979f, 0.95835376f, 0.95453346f, 0.95054960f, +0.94640291f, 0.94209403f, 0.93762374f, 0.93299282f, 0.92820197f, +0.92325211f, 0.91814411f, 0.91287869f, 0.90745693f, 0.90187967f, +0.89614785f, 0.89026248f, 0.88422459f, 0.87803519f, 0.87169534f, +0.86520612f, 0.85856867f, 0.85178405f, 0.84485358f, 0.83777827f, +0.83055943f, 0.82319832f, 0.81569612f, 0.80805415f, 0.80027372f, +0.79235619f, 0.78430289f, 0.77611518f, 0.76779449f, 0.75934225f, +0.75075996f, 0.74204898f, 0.73321080f, 0.72424710f, 0.71515924f, +0.70594883f, 0.69661748f, 0.68716675f, 0.67759830f, 0.66791373f, +0.65811473f, 0.64820296f, 0.63818014f, 0.62804794f, 0.61780810f, +0.60746247f, 0.59701276f, 0.58646071f, 0.57580817f, 0.56505698f, +0.55420899f, 0.54326600f, 0.53222996f, 0.52110273f, 0.50988621f, +0.49858227f, 0.48719296f, 0.47572014f, 0.46416581f, 0.45253196f, +0.44082057f, 0.42903364f, 0.41717321f, 0.40524128f, 0.39323992f, +0.38117120f, 0.36903715f, 0.35683987f, 0.34458145f, 0.33226398f, +0.31988961f, 0.30746040f, 0.29497850f, 0.28244606f, 0.26986524f, +0.25723818f, 0.24456702f, 0.23185398f, 0.21910121f, 0.20631088f, +0.19348522f, 0.18062639f, 0.16773662f, 0.15481812f, 0.14187308f, +0.12890373f, 0.11591230f, 0.10290100f, 0.089872077f, 0.076827750f, +0.063770257f, 0.050701842f, 0.037624735f, 0.024541186f, 0.011453429f, +-0.0016362892f, -0.014725727f, -0.027812643f, -0.040894791f, -0.053969935f, +-0.067035832f, -0.080090240f, -0.093130924f, -0.10615565f, -0.11916219f, +-0.13214831f, -0.14511178f, -0.15805040f, -0.17096193f, -0.18384418f, +-0.19669491f, -0.20951195f, -0.22229309f, -0.23503613f, -0.24773891f, +-0.26039925f, -0.27301496f, -0.28558388f, -0.29810387f, -0.31057280f, +-0.32298848f, -0.33534884f, -0.34765175f, -0.35989508f, -0.37207675f, +-0.38419467f, -0.39624676f, -0.40823093f, -0.42014518f, -0.43198743f, +-0.44375566f, -0.45544785f, -0.46706200f, -0.47859612f, -0.49004826f, +-0.50141639f, -0.51269865f, -0.52389306f, -0.53499764f, -0.54601061f, +-0.55693001f, -0.56775403f, -0.57848072f, -0.58910829f, -0.59963489f, +-0.61005878f, -0.62037814f, -0.63059121f, -0.64069623f, -0.65069145f, +-0.66057515f, -0.67034572f, -0.68000144f, -0.68954057f, -0.69896162f, +-0.70826286f, -0.71744281f, -0.72649974f, -0.73543227f, -0.74423873f, +-0.75291771f, -0.76146764f, -0.76988715f, -0.77817470f, -0.78632891f, +-0.79434842f, -0.80223179f, -0.80997771f, -0.81758487f, -0.82505190f, +-0.83237761f, -0.83956063f, -0.84659988f, -0.85349399f, -0.86024189f, +-0.86684239f, -0.87329435f, -0.87959671f, -0.88574833f, -0.89174819f, +-0.89759529f, -0.90328854f, -0.90882701f, -0.91420978f, -0.91943592f, +-0.92450452f, -0.92941469f, -0.93416560f, -0.93875647f, -0.94318646f, +-0.94745487f, -0.95156091f, -0.95550388f, -0.95928317f, -0.96289814f, +-0.96634805f, -0.96963239f, -0.97275060f, -0.97570217f, -0.97848648f, +-0.98110318f, -0.98355180f, -0.98583186f, -0.98794299f, -0.98988485f, +-0.99165714f, -0.99325943f, -0.99469161f, -0.99595332f, -0.99704438f, +-0.99796462f, -0.99871385f, -0.99929196f, -0.99969882f, -0.99993443f, +0.99999464f, 0.99956632f, 0.99845290f, 0.99665523f, 0.99417448f, +0.99101239f, 0.98717111f, 0.98265326f, 0.97746199f, 0.97160077f, +0.96507365f, 0.95788515f, 0.95004016f, 0.94154406f, 0.93240267f, +0.92262226f, 0.91220951f, 0.90117162f, 0.88951606f, 0.87725091f, +0.86438453f, 0.85092574f, 0.83688372f, 0.82226819f, 0.80708915f, +0.79135692f, 0.77508235f, 0.75827658f, 0.74095112f, 0.72311783f, +0.70478898f, 0.68597710f, 0.66669506f, 0.64695615f, 0.62677377f, +0.60616189f, 0.58513457f, 0.56370622f, 0.54189157f, 0.51970547f, +0.49716324f, 0.47428027f, 0.45107225f, 0.42755505f, 0.40374488f, +0.37965798f, 0.35531086f, 0.33072025f, 0.30590299f, 0.28087607f, +0.25565663f, 0.23026201f, 0.20470956f, 0.17901683f, 0.15320139f, +0.12728097f, 0.10127331f, 0.075196236f, 0.049067631f, 0.022905400f, +-0.0032725304f, -0.029448219f, -0.055603724f, -0.081721120f, -0.10778251f, +-0.13377003f, -0.15966587f, -0.18545228f, -0.21111161f, -0.23662624f, +-0.26197869f, -0.28715160f, -0.31212771f, -0.33688989f, -0.36142120f, +-0.38570482f, -0.40972409f, -0.43346253f, -0.45690393f, -0.48003218f, +-0.50283146f, -0.52528608f, -0.54738069f, -0.56910020f, -0.59042966f, +-0.61135447f, -0.63186026f, -0.65193301f, -0.67155898f, -0.69072473f, +-0.70941705f, -0.72762316f, -0.74533063f, -0.76252723f, -0.77920127f, +-0.79534131f, -0.81093621f, -0.82597536f, -0.84044844f, -0.85434550f, +-0.86765707f, -0.88037395f, -0.89248747f, -0.90398932f, -0.91487163f, +-0.92512697f, -0.93474823f, -0.94372886f, -0.95206273f, -0.95974404f, +-0.96676767f, -0.97312868f, -0.97882277f, -0.98384601f, -0.98819500f, +-0.99186671f, -0.99485862f, -0.99716878f, -0.99879545f, -0.99973762f, +}; +#endif + +static const CELTMode mode48000_960_120 = { +48000, /* Fs */ +120, /* overlap */ +21, /* nbEBands */ +21, /* effEBands */ +{0.85000610f, 0.0000000f, 1.0000000f, 1.0000000f, }, /* preemph */ +eband5ms, /* eBands */ +3, /* maxLM */ +8, /* nbShortMdcts */ +120, /* shortMdctSize */ +11, /* nbAllocVectors */ +band_allocation, /* allocVectors */ +logN400, /* logN */ +window120, /* window */ +{1920, 3, {&fft_state48000_960_0, &fft_state48000_960_1, &fft_state48000_960_2, &fft_state48000_960_3, }, mdct_twiddles960}, /* mdct */ +{392, cache_index50, cache_bits50, cache_caps50}, /* cache */ +}; + +/* List of all the available modes */ +#define TOTAL_MODES 1 +static const CELTMode * const static_mode_list[TOTAL_MODES] = { +&mode48000_960_120, +}; diff --git a/asm/libs/opus/celt/static_modes_float_arm_ne10.h b/asm/libs/opus/celt/static_modes_float_arm_ne10.h new file mode 100644 index 00000000..934a82a4 --- /dev/null +++ b/asm/libs/opus/celt/static_modes_float_arm_ne10.h @@ -0,0 +1,404 @@ +/* The contents of this file was automatically generated by + * dump_mode_arm_ne10.c with arguments: 48000 960 + * It contains static definitions for some pre-defined modes. */ +#include + +#ifndef NE10_FFT_PARAMS48000_960 +#define NE10_FFT_PARAMS48000_960 +static const ne10_int32_t ne10_factors_480[64] = { +4, 40, 4, 30, 2, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, }; +static const ne10_int32_t ne10_factors_240[64] = { +3, 20, 4, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, }; +static const ne10_int32_t ne10_factors_120[64] = { +3, 10, 2, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, }; +static const ne10_int32_t ne10_factors_60[64] = { +2, 5, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, }; +static const ne10_fft_cpx_float32_t ne10_twiddles_480[480] = { +{1.0000000f,0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, +{1.0000000f,-0.0000000f}, {0.91354543f,-0.40673664f}, {0.66913056f,-0.74314487f}, +{1.0000000f,-0.0000000f}, {0.66913056f,-0.74314487f}, {-0.10452851f,-0.99452192f}, +{1.0000000f,-0.0000000f}, {0.30901697f,-0.95105654f}, {-0.80901700f,-0.58778518f}, +{1.0000000f,-0.0000000f}, {-0.10452851f,-0.99452192f}, {-0.97814757f,0.20791179f}, +{1.0000000f,-0.0000000f}, {0.97814763f,-0.20791170f}, {0.91354543f,-0.40673664f}, +{0.80901700f,-0.58778524f}, {0.66913056f,-0.74314487f}, {0.49999997f,-0.86602545f}, +{0.30901697f,-0.95105654f}, {0.10452842f,-0.99452192f}, {-0.10452851f,-0.99452192f}, +{-0.30901703f,-0.95105648f}, {-0.50000006f,-0.86602533f}, {-0.66913068f,-0.74314475f}, +{-0.80901700f,-0.58778518f}, {-0.91354549f,-0.40673658f}, {-0.97814763f,-0.20791161f}, +{1.0000000f,-0.0000000f}, {0.99862951f,-0.052335959f}, {0.99452192f,-0.10452846f}, +{0.98768836f,-0.15643448f}, {0.97814763f,-0.20791170f}, {0.96592581f,-0.25881904f}, +{0.95105648f,-0.30901700f}, {0.93358040f,-0.35836795f}, {0.91354543f,-0.40673664f}, +{0.89100653f,-0.45399052f}, {0.86602545f,-0.50000000f}, {0.83867055f,-0.54463905f}, +{0.80901700f,-0.58778524f}, {0.77714598f,-0.62932038f}, {0.74314475f,-0.66913062f}, +{0.70710677f,-0.70710683f}, {0.66913056f,-0.74314487f}, {0.62932038f,-0.77714598f}, +{0.58778524f,-0.80901700f}, {0.54463899f,-0.83867055f}, {0.49999997f,-0.86602545f}, +{0.45399052f,-0.89100653f}, {0.40673661f,-0.91354549f}, {0.35836786f,-0.93358046f}, +{0.30901697f,-0.95105654f}, {0.25881907f,-0.96592581f}, {0.20791166f,-0.97814763f}, +{0.15643437f,-0.98768836f}, {0.10452842f,-0.99452192f}, {0.052335974f,-0.99862951f}, +{1.0000000f,-0.0000000f}, {0.99452192f,-0.10452846f}, {0.97814763f,-0.20791170f}, +{0.95105648f,-0.30901700f}, {0.91354543f,-0.40673664f}, {0.86602545f,-0.50000000f}, +{0.80901700f,-0.58778524f}, {0.74314475f,-0.66913062f}, {0.66913056f,-0.74314487f}, +{0.58778524f,-0.80901700f}, {0.49999997f,-0.86602545f}, {0.40673661f,-0.91354549f}, +{0.30901697f,-0.95105654f}, {0.20791166f,-0.97814763f}, {0.10452842f,-0.99452192f}, +{-4.3711388e-08f,-1.0000000f}, {-0.10452851f,-0.99452192f}, {-0.20791174f,-0.97814757f}, +{-0.30901703f,-0.95105648f}, {-0.40673670f,-0.91354543f}, {-0.50000006f,-0.86602533f}, +{-0.58778518f,-0.80901700f}, {-0.66913068f,-0.74314475f}, {-0.74314493f,-0.66913044f}, +{-0.80901700f,-0.58778518f}, {-0.86602539f,-0.50000006f}, {-0.91354549f,-0.40673658f}, +{-0.95105654f,-0.30901679f}, {-0.97814763f,-0.20791161f}, {-0.99452192f,-0.10452849f}, +{1.0000000f,-0.0000000f}, {0.98768836f,-0.15643448f}, {0.95105648f,-0.30901700f}, +{0.89100653f,-0.45399052f}, {0.80901700f,-0.58778524f}, {0.70710677f,-0.70710683f}, +{0.58778524f,-0.80901700f}, {0.45399052f,-0.89100653f}, {0.30901697f,-0.95105654f}, +{0.15643437f,-0.98768836f}, {-4.3711388e-08f,-1.0000000f}, {-0.15643445f,-0.98768836f}, +{-0.30901703f,-0.95105648f}, {-0.45399061f,-0.89100647f}, {-0.58778518f,-0.80901700f}, +{-0.70710677f,-0.70710677f}, {-0.80901700f,-0.58778518f}, {-0.89100659f,-0.45399037f}, +{-0.95105654f,-0.30901679f}, {-0.98768836f,-0.15643445f}, {-1.0000000f,8.7422777e-08f}, +{-0.98768830f,0.15643461f}, {-0.95105654f,0.30901697f}, {-0.89100653f,0.45399055f}, +{-0.80901694f,0.58778536f}, {-0.70710665f,0.70710689f}, {-0.58778507f,0.80901712f}, +{-0.45399022f,0.89100665f}, {-0.30901709f,0.95105648f}, {-0.15643452f,0.98768830f}, +{1.0000000f,-0.0000000f}, {0.99991435f,-0.013089596f}, {0.99965733f,-0.026176950f}, +{0.99922901f,-0.039259817f}, {0.99862951f,-0.052335959f}, {0.99785894f,-0.065403134f}, +{0.99691731f,-0.078459099f}, {0.99580491f,-0.091501623f}, {0.99452192f,-0.10452846f}, +{0.99306846f,-0.11753740f}, {0.99144489f,-0.13052620f}, {0.98965138f,-0.14349262f}, +{0.98768836f,-0.15643448f}, {0.98555607f,-0.16934951f}, {0.98325491f,-0.18223552f}, +{0.98078525f,-0.19509032f}, {0.97814763f,-0.20791170f}, {0.97534233f,-0.22069745f}, +{0.97236991f,-0.23344538f}, {0.96923089f,-0.24615330f}, {0.96592581f,-0.25881904f}, +{0.96245521f,-0.27144045f}, {0.95881975f,-0.28401536f}, {0.95501995f,-0.29654160f}, +{0.95105648f,-0.30901700f}, {0.94693011f,-0.32143945f}, {0.94264150f,-0.33380687f}, +{0.93819129f,-0.34611708f}, {0.93358040f,-0.35836795f}, {0.92880952f,-0.37055743f}, +{0.92387956f,-0.38268346f}, {0.91879117f,-0.39474389f}, {0.91354543f,-0.40673664f}, +{0.90814316f,-0.41865975f}, {0.90258527f,-0.43051112f}, {0.89687270f,-0.44228873f}, +{0.89100653f,-0.45399052f}, {0.88498765f,-0.46561453f}, {0.87881708f,-0.47715878f}, +{0.87249601f,-0.48862126f}, {0.86602545f,-0.50000000f}, {0.85940641f,-0.51129311f}, +{0.85264015f,-0.52249855f}, {0.84572786f,-0.53361452f}, {0.83867055f,-0.54463905f}, +{0.83146960f,-0.55557024f}, {0.82412618f,-0.56640625f}, {0.81664151f,-0.57714522f}, +{0.80901700f,-0.58778524f}, {0.80125380f,-0.59832460f}, {0.79335332f,-0.60876143f}, +{0.78531694f,-0.61909395f}, {0.77714598f,-0.62932038f}, {0.76884180f,-0.63943899f}, +{0.76040596f,-0.64944810f}, {0.75183982f,-0.65934587f}, {0.74314475f,-0.66913062f}, +{0.73432249f,-0.67880076f}, {0.72537434f,-0.68835455f}, {0.71630192f,-0.69779050f}, +{0.70710677f,-0.70710683f}, {0.69779044f,-0.71630198f}, {0.68835455f,-0.72537440f}, +{0.67880070f,-0.73432255f}, {0.66913056f,-0.74314487f}, {0.65934581f,-0.75183982f}, +{0.64944804f,-0.76040596f}, {0.63943899f,-0.76884186f}, {0.62932038f,-0.77714598f}, +{0.61909395f,-0.78531694f}, {0.60876137f,-0.79335338f}, {0.59832460f,-0.80125386f}, +{0.58778524f,-0.80901700f}, {0.57714516f,-0.81664151f}, {0.56640625f,-0.82412618f}, +{0.55557019f,-0.83146960f}, {0.54463899f,-0.83867055f}, {0.53361452f,-0.84572786f}, +{0.52249849f,-0.85264015f}, {0.51129311f,-0.85940641f}, {0.49999997f,-0.86602545f}, +{0.48862118f,-0.87249601f}, {0.47715876f,-0.87881708f}, {0.46561447f,-0.88498765f}, +{0.45399052f,-0.89100653f}, {0.44228867f,-0.89687276f}, {0.43051103f,-0.90258533f}, +{0.41865975f,-0.90814316f}, {0.40673661f,-0.91354549f}, {0.39474380f,-0.91879129f}, +{0.38268343f,-0.92387956f}, {0.37055740f,-0.92880958f}, {0.35836786f,-0.93358046f}, +{0.34611705f,-0.93819135f}, {0.33380681f,-0.94264150f}, {0.32143947f,-0.94693011f}, +{0.30901697f,-0.95105654f}, {0.29654151f,-0.95501995f}, {0.28401533f,-0.95881975f}, +{0.27144039f,-0.96245527f}, {0.25881907f,-0.96592581f}, {0.24615327f,-0.96923089f}, +{0.23344530f,-0.97236991f}, {0.22069745f,-0.97534233f}, {0.20791166f,-0.97814763f}, +{0.19509023f,-0.98078531f}, {0.18223552f,-0.98325491f}, {0.16934945f,-0.98555607f}, +{0.15643437f,-0.98768836f}, {0.14349259f,-0.98965138f}, {0.13052613f,-0.99144489f}, +{0.11753740f,-0.99306846f}, {0.10452842f,-0.99452192f}, {0.091501534f,-0.99580491f}, +{0.078459084f,-0.99691731f}, {0.065403074f,-0.99785894f}, {0.052335974f,-0.99862951f}, +{0.039259788f,-0.99922901f}, {0.026176875f,-0.99965733f}, {0.013089597f,-0.99991435f}, +{1.0000000f,-0.0000000f}, {0.99965733f,-0.026176950f}, {0.99862951f,-0.052335959f}, +{0.99691731f,-0.078459099f}, {0.99452192f,-0.10452846f}, {0.99144489f,-0.13052620f}, +{0.98768836f,-0.15643448f}, {0.98325491f,-0.18223552f}, {0.97814763f,-0.20791170f}, +{0.97236991f,-0.23344538f}, {0.96592581f,-0.25881904f}, {0.95881975f,-0.28401536f}, +{0.95105648f,-0.30901700f}, {0.94264150f,-0.33380687f}, {0.93358040f,-0.35836795f}, +{0.92387956f,-0.38268346f}, {0.91354543f,-0.40673664f}, {0.90258527f,-0.43051112f}, +{0.89100653f,-0.45399052f}, {0.87881708f,-0.47715878f}, {0.86602545f,-0.50000000f}, +{0.85264015f,-0.52249855f}, {0.83867055f,-0.54463905f}, {0.82412618f,-0.56640625f}, +{0.80901700f,-0.58778524f}, {0.79335332f,-0.60876143f}, {0.77714598f,-0.62932038f}, +{0.76040596f,-0.64944810f}, {0.74314475f,-0.66913062f}, {0.72537434f,-0.68835455f}, +{0.70710677f,-0.70710683f}, {0.68835455f,-0.72537440f}, {0.66913056f,-0.74314487f}, +{0.64944804f,-0.76040596f}, {0.62932038f,-0.77714598f}, {0.60876137f,-0.79335338f}, +{0.58778524f,-0.80901700f}, {0.56640625f,-0.82412618f}, {0.54463899f,-0.83867055f}, +{0.52249849f,-0.85264015f}, {0.49999997f,-0.86602545f}, {0.47715876f,-0.87881708f}, +{0.45399052f,-0.89100653f}, {0.43051103f,-0.90258533f}, {0.40673661f,-0.91354549f}, +{0.38268343f,-0.92387956f}, {0.35836786f,-0.93358046f}, {0.33380681f,-0.94264150f}, +{0.30901697f,-0.95105654f}, {0.28401533f,-0.95881975f}, {0.25881907f,-0.96592581f}, +{0.23344530f,-0.97236991f}, {0.20791166f,-0.97814763f}, {0.18223552f,-0.98325491f}, +{0.15643437f,-0.98768836f}, {0.13052613f,-0.99144489f}, {0.10452842f,-0.99452192f}, +{0.078459084f,-0.99691731f}, {0.052335974f,-0.99862951f}, {0.026176875f,-0.99965733f}, +{-4.3711388e-08f,-1.0000000f}, {-0.026176963f,-0.99965733f}, {-0.052336060f,-0.99862951f}, +{-0.078459173f,-0.99691731f}, {-0.10452851f,-0.99452192f}, {-0.13052621f,-0.99144489f}, +{-0.15643445f,-0.98768836f}, {-0.18223560f,-0.98325491f}, {-0.20791174f,-0.97814757f}, +{-0.23344538f,-0.97236991f}, {-0.25881916f,-0.96592581f}, {-0.28401542f,-0.95881969f}, +{-0.30901703f,-0.95105648f}, {-0.33380687f,-0.94264150f}, {-0.35836795f,-0.93358040f}, +{-0.38268352f,-0.92387950f}, {-0.40673670f,-0.91354543f}, {-0.43051112f,-0.90258527f}, +{-0.45399061f,-0.89100647f}, {-0.47715873f,-0.87881708f}, {-0.50000006f,-0.86602533f}, +{-0.52249867f,-0.85264009f}, {-0.54463905f,-0.83867055f}, {-0.56640631f,-0.82412612f}, +{-0.58778518f,-0.80901700f}, {-0.60876143f,-0.79335332f}, {-0.62932050f,-0.77714586f}, +{-0.64944804f,-0.76040596f}, {-0.66913068f,-0.74314475f}, {-0.68835467f,-0.72537428f}, +{-0.70710677f,-0.70710677f}, {-0.72537446f,-0.68835449f}, {-0.74314493f,-0.66913044f}, +{-0.76040596f,-0.64944804f}, {-0.77714604f,-0.62932026f}, {-0.79335332f,-0.60876143f}, +{-0.80901700f,-0.58778518f}, {-0.82412624f,-0.56640613f}, {-0.83867055f,-0.54463899f}, +{-0.85264021f,-0.52249849f}, {-0.86602539f,-0.50000006f}, {-0.87881714f,-0.47715873f}, +{-0.89100659f,-0.45399037f}, {-0.90258527f,-0.43051112f}, {-0.91354549f,-0.40673658f}, +{-0.92387956f,-0.38268328f}, {-0.93358040f,-0.35836792f}, {-0.94264150f,-0.33380675f}, +{-0.95105654f,-0.30901679f}, {-0.95881975f,-0.28401530f}, {-0.96592587f,-0.25881892f}, +{-0.97236991f,-0.23344538f}, {-0.97814763f,-0.20791161f}, {-0.98325491f,-0.18223536f}, +{-0.98768836f,-0.15643445f}, {-0.99144489f,-0.13052608f}, {-0.99452192f,-0.10452849f}, +{-0.99691737f,-0.078459039f}, {-0.99862957f,-0.052335810f}, {-0.99965733f,-0.026176952f}, +{1.0000000f,-0.0000000f}, {0.99922901f,-0.039259817f}, {0.99691731f,-0.078459099f}, +{0.99306846f,-0.11753740f}, {0.98768836f,-0.15643448f}, {0.98078525f,-0.19509032f}, +{0.97236991f,-0.23344538f}, {0.96245521f,-0.27144045f}, {0.95105648f,-0.30901700f}, +{0.93819129f,-0.34611708f}, {0.92387956f,-0.38268346f}, {0.90814316f,-0.41865975f}, +{0.89100653f,-0.45399052f}, {0.87249601f,-0.48862126f}, {0.85264015f,-0.52249855f}, +{0.83146960f,-0.55557024f}, {0.80901700f,-0.58778524f}, {0.78531694f,-0.61909395f}, +{0.76040596f,-0.64944810f}, {0.73432249f,-0.67880076f}, {0.70710677f,-0.70710683f}, +{0.67880070f,-0.73432255f}, {0.64944804f,-0.76040596f}, {0.61909395f,-0.78531694f}, +{0.58778524f,-0.80901700f}, {0.55557019f,-0.83146960f}, {0.52249849f,-0.85264015f}, +{0.48862118f,-0.87249601f}, {0.45399052f,-0.89100653f}, {0.41865975f,-0.90814316f}, +{0.38268343f,-0.92387956f}, {0.34611705f,-0.93819135f}, {0.30901697f,-0.95105654f}, +{0.27144039f,-0.96245527f}, {0.23344530f,-0.97236991f}, {0.19509023f,-0.98078531f}, +{0.15643437f,-0.98768836f}, {0.11753740f,-0.99306846f}, {0.078459084f,-0.99691731f}, +{0.039259788f,-0.99922901f}, {-4.3711388e-08f,-1.0000000f}, {-0.039259877f,-0.99922901f}, +{-0.078459173f,-0.99691731f}, {-0.11753749f,-0.99306846f}, {-0.15643445f,-0.98768836f}, +{-0.19509032f,-0.98078525f}, {-0.23344538f,-0.97236991f}, {-0.27144048f,-0.96245521f}, +{-0.30901703f,-0.95105648f}, {-0.34611711f,-0.93819129f}, {-0.38268352f,-0.92387950f}, +{-0.41865984f,-0.90814310f}, {-0.45399061f,-0.89100647f}, {-0.48862135f,-0.87249595f}, +{-0.52249867f,-0.85264009f}, {-0.55557036f,-0.83146954f}, {-0.58778518f,-0.80901700f}, +{-0.61909389f,-0.78531694f}, {-0.64944804f,-0.76040596f}, {-0.67880076f,-0.73432249f}, +{-0.70710677f,-0.70710677f}, {-0.73432249f,-0.67880070f}, {-0.76040596f,-0.64944804f}, +{-0.78531694f,-0.61909389f}, {-0.80901700f,-0.58778518f}, {-0.83146966f,-0.55557019f}, +{-0.85264021f,-0.52249849f}, {-0.87249607f,-0.48862115f}, {-0.89100659f,-0.45399037f}, +{-0.90814322f,-0.41865960f}, {-0.92387956f,-0.38268328f}, {-0.93819135f,-0.34611690f}, +{-0.95105654f,-0.30901679f}, {-0.96245521f,-0.27144048f}, {-0.97236991f,-0.23344538f}, +{-0.98078531f,-0.19509031f}, {-0.98768836f,-0.15643445f}, {-0.99306846f,-0.11753736f}, +{-0.99691737f,-0.078459039f}, {-0.99922901f,-0.039259743f}, {-1.0000000f,8.7422777e-08f}, +{-0.99922901f,0.039259918f}, {-0.99691731f,0.078459218f}, {-0.99306846f,0.11753753f}, +{-0.98768830f,0.15643461f}, {-0.98078525f,0.19509049f}, {-0.97236985f,0.23344554f}, +{-0.96245515f,0.27144065f}, {-0.95105654f,0.30901697f}, {-0.93819135f,0.34611705f}, +{-0.92387956f,0.38268346f}, {-0.90814316f,0.41865975f}, {-0.89100653f,0.45399055f}, +{-0.87249601f,0.48862129f}, {-0.85264015f,0.52249861f}, {-0.83146960f,0.55557030f}, +{-0.80901694f,0.58778536f}, {-0.78531688f,0.61909401f}, {-0.76040590f,0.64944816f}, +{-0.73432243f,0.67880082f}, {-0.70710665f,0.70710689f}, {-0.67880058f,0.73432261f}, +{-0.64944792f,0.76040608f}, {-0.61909378f,0.78531706f}, {-0.58778507f,0.80901712f}, +{-0.55557001f,0.83146977f}, {-0.52249837f,0.85264033f}, {-0.48862100f,0.87249613f}, +{-0.45399022f,0.89100665f}, {-0.41865945f,0.90814328f}, {-0.38268313f,0.92387968f}, +{-0.34611672f,0.93819147f}, {-0.30901709f,0.95105648f}, {-0.27144054f,0.96245521f}, +{-0.23344545f,0.97236991f}, {-0.19509038f,0.98078525f}, {-0.15643452f,0.98768830f}, +{-0.11753743f,0.99306846f}, {-0.078459114f,0.99691731f}, {-0.039259821f,0.99922901f}, +}; +static const ne10_fft_cpx_float32_t ne10_twiddles_240[240] = { +{1.0000000f,0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, +{1.0000000f,-0.0000000f}, {0.91354543f,-0.40673664f}, {0.66913056f,-0.74314487f}, +{1.0000000f,-0.0000000f}, {0.66913056f,-0.74314487f}, {-0.10452851f,-0.99452192f}, +{1.0000000f,-0.0000000f}, {0.30901697f,-0.95105654f}, {-0.80901700f,-0.58778518f}, +{1.0000000f,-0.0000000f}, {-0.10452851f,-0.99452192f}, {-0.97814757f,0.20791179f}, +{1.0000000f,-0.0000000f}, {0.99452192f,-0.10452846f}, {0.97814763f,-0.20791170f}, +{0.95105648f,-0.30901700f}, {0.91354543f,-0.40673664f}, {0.86602545f,-0.50000000f}, +{0.80901700f,-0.58778524f}, {0.74314475f,-0.66913062f}, {0.66913056f,-0.74314487f}, +{0.58778524f,-0.80901700f}, {0.49999997f,-0.86602545f}, {0.40673661f,-0.91354549f}, +{0.30901697f,-0.95105654f}, {0.20791166f,-0.97814763f}, {0.10452842f,-0.99452192f}, +{1.0000000f,-0.0000000f}, {0.97814763f,-0.20791170f}, {0.91354543f,-0.40673664f}, +{0.80901700f,-0.58778524f}, {0.66913056f,-0.74314487f}, {0.49999997f,-0.86602545f}, +{0.30901697f,-0.95105654f}, {0.10452842f,-0.99452192f}, {-0.10452851f,-0.99452192f}, +{-0.30901703f,-0.95105648f}, {-0.50000006f,-0.86602533f}, {-0.66913068f,-0.74314475f}, +{-0.80901700f,-0.58778518f}, {-0.91354549f,-0.40673658f}, {-0.97814763f,-0.20791161f}, +{1.0000000f,-0.0000000f}, {0.95105648f,-0.30901700f}, {0.80901700f,-0.58778524f}, +{0.58778524f,-0.80901700f}, {0.30901697f,-0.95105654f}, {-4.3711388e-08f,-1.0000000f}, +{-0.30901703f,-0.95105648f}, {-0.58778518f,-0.80901700f}, {-0.80901700f,-0.58778518f}, +{-0.95105654f,-0.30901679f}, {-1.0000000f,8.7422777e-08f}, {-0.95105654f,0.30901697f}, +{-0.80901694f,0.58778536f}, {-0.58778507f,0.80901712f}, {-0.30901709f,0.95105648f}, +{1.0000000f,-0.0000000f}, {0.99965733f,-0.026176950f}, {0.99862951f,-0.052335959f}, +{0.99691731f,-0.078459099f}, {0.99452192f,-0.10452846f}, {0.99144489f,-0.13052620f}, +{0.98768836f,-0.15643448f}, {0.98325491f,-0.18223552f}, {0.97814763f,-0.20791170f}, +{0.97236991f,-0.23344538f}, {0.96592581f,-0.25881904f}, {0.95881975f,-0.28401536f}, +{0.95105648f,-0.30901700f}, {0.94264150f,-0.33380687f}, {0.93358040f,-0.35836795f}, +{0.92387956f,-0.38268346f}, {0.91354543f,-0.40673664f}, {0.90258527f,-0.43051112f}, +{0.89100653f,-0.45399052f}, {0.87881708f,-0.47715878f}, {0.86602545f,-0.50000000f}, +{0.85264015f,-0.52249855f}, {0.83867055f,-0.54463905f}, {0.82412618f,-0.56640625f}, +{0.80901700f,-0.58778524f}, {0.79335332f,-0.60876143f}, {0.77714598f,-0.62932038f}, +{0.76040596f,-0.64944810f}, {0.74314475f,-0.66913062f}, {0.72537434f,-0.68835455f}, +{0.70710677f,-0.70710683f}, {0.68835455f,-0.72537440f}, {0.66913056f,-0.74314487f}, +{0.64944804f,-0.76040596f}, {0.62932038f,-0.77714598f}, {0.60876137f,-0.79335338f}, +{0.58778524f,-0.80901700f}, {0.56640625f,-0.82412618f}, {0.54463899f,-0.83867055f}, +{0.52249849f,-0.85264015f}, {0.49999997f,-0.86602545f}, {0.47715876f,-0.87881708f}, +{0.45399052f,-0.89100653f}, {0.43051103f,-0.90258533f}, {0.40673661f,-0.91354549f}, +{0.38268343f,-0.92387956f}, {0.35836786f,-0.93358046f}, {0.33380681f,-0.94264150f}, +{0.30901697f,-0.95105654f}, {0.28401533f,-0.95881975f}, {0.25881907f,-0.96592581f}, +{0.23344530f,-0.97236991f}, {0.20791166f,-0.97814763f}, {0.18223552f,-0.98325491f}, +{0.15643437f,-0.98768836f}, {0.13052613f,-0.99144489f}, {0.10452842f,-0.99452192f}, +{0.078459084f,-0.99691731f}, {0.052335974f,-0.99862951f}, {0.026176875f,-0.99965733f}, +{1.0000000f,-0.0000000f}, {0.99862951f,-0.052335959f}, {0.99452192f,-0.10452846f}, +{0.98768836f,-0.15643448f}, {0.97814763f,-0.20791170f}, {0.96592581f,-0.25881904f}, +{0.95105648f,-0.30901700f}, {0.93358040f,-0.35836795f}, {0.91354543f,-0.40673664f}, +{0.89100653f,-0.45399052f}, {0.86602545f,-0.50000000f}, {0.83867055f,-0.54463905f}, +{0.80901700f,-0.58778524f}, {0.77714598f,-0.62932038f}, {0.74314475f,-0.66913062f}, +{0.70710677f,-0.70710683f}, {0.66913056f,-0.74314487f}, {0.62932038f,-0.77714598f}, +{0.58778524f,-0.80901700f}, {0.54463899f,-0.83867055f}, {0.49999997f,-0.86602545f}, +{0.45399052f,-0.89100653f}, {0.40673661f,-0.91354549f}, {0.35836786f,-0.93358046f}, +{0.30901697f,-0.95105654f}, {0.25881907f,-0.96592581f}, {0.20791166f,-0.97814763f}, +{0.15643437f,-0.98768836f}, {0.10452842f,-0.99452192f}, {0.052335974f,-0.99862951f}, +{-4.3711388e-08f,-1.0000000f}, {-0.052336060f,-0.99862951f}, {-0.10452851f,-0.99452192f}, +{-0.15643445f,-0.98768836f}, {-0.20791174f,-0.97814757f}, {-0.25881916f,-0.96592581f}, +{-0.30901703f,-0.95105648f}, {-0.35836795f,-0.93358040f}, {-0.40673670f,-0.91354543f}, +{-0.45399061f,-0.89100647f}, {-0.50000006f,-0.86602533f}, {-0.54463905f,-0.83867055f}, +{-0.58778518f,-0.80901700f}, {-0.62932050f,-0.77714586f}, {-0.66913068f,-0.74314475f}, +{-0.70710677f,-0.70710677f}, {-0.74314493f,-0.66913044f}, {-0.77714604f,-0.62932026f}, +{-0.80901700f,-0.58778518f}, {-0.83867055f,-0.54463899f}, {-0.86602539f,-0.50000006f}, +{-0.89100659f,-0.45399037f}, {-0.91354549f,-0.40673658f}, {-0.93358040f,-0.35836792f}, +{-0.95105654f,-0.30901679f}, {-0.96592587f,-0.25881892f}, {-0.97814763f,-0.20791161f}, +{-0.98768836f,-0.15643445f}, {-0.99452192f,-0.10452849f}, {-0.99862957f,-0.052335810f}, +{1.0000000f,-0.0000000f}, {0.99691731f,-0.078459099f}, {0.98768836f,-0.15643448f}, +{0.97236991f,-0.23344538f}, {0.95105648f,-0.30901700f}, {0.92387956f,-0.38268346f}, +{0.89100653f,-0.45399052f}, {0.85264015f,-0.52249855f}, {0.80901700f,-0.58778524f}, +{0.76040596f,-0.64944810f}, {0.70710677f,-0.70710683f}, {0.64944804f,-0.76040596f}, +{0.58778524f,-0.80901700f}, {0.52249849f,-0.85264015f}, {0.45399052f,-0.89100653f}, +{0.38268343f,-0.92387956f}, {0.30901697f,-0.95105654f}, {0.23344530f,-0.97236991f}, +{0.15643437f,-0.98768836f}, {0.078459084f,-0.99691731f}, {-4.3711388e-08f,-1.0000000f}, +{-0.078459173f,-0.99691731f}, {-0.15643445f,-0.98768836f}, {-0.23344538f,-0.97236991f}, +{-0.30901703f,-0.95105648f}, {-0.38268352f,-0.92387950f}, {-0.45399061f,-0.89100647f}, +{-0.52249867f,-0.85264009f}, {-0.58778518f,-0.80901700f}, {-0.64944804f,-0.76040596f}, +{-0.70710677f,-0.70710677f}, {-0.76040596f,-0.64944804f}, {-0.80901700f,-0.58778518f}, +{-0.85264021f,-0.52249849f}, {-0.89100659f,-0.45399037f}, {-0.92387956f,-0.38268328f}, +{-0.95105654f,-0.30901679f}, {-0.97236991f,-0.23344538f}, {-0.98768836f,-0.15643445f}, +{-0.99691737f,-0.078459039f}, {-1.0000000f,8.7422777e-08f}, {-0.99691731f,0.078459218f}, +{-0.98768830f,0.15643461f}, {-0.97236985f,0.23344554f}, {-0.95105654f,0.30901697f}, +{-0.92387956f,0.38268346f}, {-0.89100653f,0.45399055f}, {-0.85264015f,0.52249861f}, +{-0.80901694f,0.58778536f}, {-0.76040590f,0.64944816f}, {-0.70710665f,0.70710689f}, +{-0.64944792f,0.76040608f}, {-0.58778507f,0.80901712f}, {-0.52249837f,0.85264033f}, +{-0.45399022f,0.89100665f}, {-0.38268313f,0.92387968f}, {-0.30901709f,0.95105648f}, +{-0.23344545f,0.97236991f}, {-0.15643452f,0.98768830f}, {-0.078459114f,0.99691731f}, +}; +static const ne10_fft_cpx_float32_t ne10_twiddles_120[120] = { +{1.0000000f,0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, +{1.0000000f,-0.0000000f}, {0.91354543f,-0.40673664f}, {0.66913056f,-0.74314487f}, +{1.0000000f,-0.0000000f}, {0.66913056f,-0.74314487f}, {-0.10452851f,-0.99452192f}, +{1.0000000f,-0.0000000f}, {0.30901697f,-0.95105654f}, {-0.80901700f,-0.58778518f}, +{1.0000000f,-0.0000000f}, {-0.10452851f,-0.99452192f}, {-0.97814757f,0.20791179f}, +{1.0000000f,-0.0000000f}, {0.97814763f,-0.20791170f}, {0.91354543f,-0.40673664f}, +{0.80901700f,-0.58778524f}, {0.66913056f,-0.74314487f}, {0.49999997f,-0.86602545f}, +{0.30901697f,-0.95105654f}, {0.10452842f,-0.99452192f}, {-0.10452851f,-0.99452192f}, +{-0.30901703f,-0.95105648f}, {-0.50000006f,-0.86602533f}, {-0.66913068f,-0.74314475f}, +{-0.80901700f,-0.58778518f}, {-0.91354549f,-0.40673658f}, {-0.97814763f,-0.20791161f}, +{1.0000000f,-0.0000000f}, {0.99862951f,-0.052335959f}, {0.99452192f,-0.10452846f}, +{0.98768836f,-0.15643448f}, {0.97814763f,-0.20791170f}, {0.96592581f,-0.25881904f}, +{0.95105648f,-0.30901700f}, {0.93358040f,-0.35836795f}, {0.91354543f,-0.40673664f}, +{0.89100653f,-0.45399052f}, {0.86602545f,-0.50000000f}, {0.83867055f,-0.54463905f}, +{0.80901700f,-0.58778524f}, {0.77714598f,-0.62932038f}, {0.74314475f,-0.66913062f}, +{0.70710677f,-0.70710683f}, {0.66913056f,-0.74314487f}, {0.62932038f,-0.77714598f}, +{0.58778524f,-0.80901700f}, {0.54463899f,-0.83867055f}, {0.49999997f,-0.86602545f}, +{0.45399052f,-0.89100653f}, {0.40673661f,-0.91354549f}, {0.35836786f,-0.93358046f}, +{0.30901697f,-0.95105654f}, {0.25881907f,-0.96592581f}, {0.20791166f,-0.97814763f}, +{0.15643437f,-0.98768836f}, {0.10452842f,-0.99452192f}, {0.052335974f,-0.99862951f}, +{1.0000000f,-0.0000000f}, {0.99452192f,-0.10452846f}, {0.97814763f,-0.20791170f}, +{0.95105648f,-0.30901700f}, {0.91354543f,-0.40673664f}, {0.86602545f,-0.50000000f}, +{0.80901700f,-0.58778524f}, {0.74314475f,-0.66913062f}, {0.66913056f,-0.74314487f}, +{0.58778524f,-0.80901700f}, {0.49999997f,-0.86602545f}, {0.40673661f,-0.91354549f}, +{0.30901697f,-0.95105654f}, {0.20791166f,-0.97814763f}, {0.10452842f,-0.99452192f}, +{-4.3711388e-08f,-1.0000000f}, {-0.10452851f,-0.99452192f}, {-0.20791174f,-0.97814757f}, +{-0.30901703f,-0.95105648f}, {-0.40673670f,-0.91354543f}, {-0.50000006f,-0.86602533f}, +{-0.58778518f,-0.80901700f}, {-0.66913068f,-0.74314475f}, {-0.74314493f,-0.66913044f}, +{-0.80901700f,-0.58778518f}, {-0.86602539f,-0.50000006f}, {-0.91354549f,-0.40673658f}, +{-0.95105654f,-0.30901679f}, {-0.97814763f,-0.20791161f}, {-0.99452192f,-0.10452849f}, +{1.0000000f,-0.0000000f}, {0.98768836f,-0.15643448f}, {0.95105648f,-0.30901700f}, +{0.89100653f,-0.45399052f}, {0.80901700f,-0.58778524f}, {0.70710677f,-0.70710683f}, +{0.58778524f,-0.80901700f}, {0.45399052f,-0.89100653f}, {0.30901697f,-0.95105654f}, +{0.15643437f,-0.98768836f}, {-4.3711388e-08f,-1.0000000f}, {-0.15643445f,-0.98768836f}, +{-0.30901703f,-0.95105648f}, {-0.45399061f,-0.89100647f}, {-0.58778518f,-0.80901700f}, +{-0.70710677f,-0.70710677f}, {-0.80901700f,-0.58778518f}, {-0.89100659f,-0.45399037f}, +{-0.95105654f,-0.30901679f}, {-0.98768836f,-0.15643445f}, {-1.0000000f,8.7422777e-08f}, +{-0.98768830f,0.15643461f}, {-0.95105654f,0.30901697f}, {-0.89100653f,0.45399055f}, +{-0.80901694f,0.58778536f}, {-0.70710665f,0.70710689f}, {-0.58778507f,0.80901712f}, +{-0.45399022f,0.89100665f}, {-0.30901709f,0.95105648f}, {-0.15643452f,0.98768830f}, +}; +static const ne10_fft_cpx_float32_t ne10_twiddles_60[60] = { +{1.0000000f,0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, +{1.0000000f,-0.0000000f}, {0.91354543f,-0.40673664f}, {0.66913056f,-0.74314487f}, +{1.0000000f,-0.0000000f}, {0.66913056f,-0.74314487f}, {-0.10452851f,-0.99452192f}, +{1.0000000f,-0.0000000f}, {0.30901697f,-0.95105654f}, {-0.80901700f,-0.58778518f}, +{1.0000000f,-0.0000000f}, {-0.10452851f,-0.99452192f}, {-0.97814757f,0.20791179f}, +{1.0000000f,-0.0000000f}, {0.99452192f,-0.10452846f}, {0.97814763f,-0.20791170f}, +{0.95105648f,-0.30901700f}, {0.91354543f,-0.40673664f}, {0.86602545f,-0.50000000f}, +{0.80901700f,-0.58778524f}, {0.74314475f,-0.66913062f}, {0.66913056f,-0.74314487f}, +{0.58778524f,-0.80901700f}, {0.49999997f,-0.86602545f}, {0.40673661f,-0.91354549f}, +{0.30901697f,-0.95105654f}, {0.20791166f,-0.97814763f}, {0.10452842f,-0.99452192f}, +{1.0000000f,-0.0000000f}, {0.97814763f,-0.20791170f}, {0.91354543f,-0.40673664f}, +{0.80901700f,-0.58778524f}, {0.66913056f,-0.74314487f}, {0.49999997f,-0.86602545f}, +{0.30901697f,-0.95105654f}, {0.10452842f,-0.99452192f}, {-0.10452851f,-0.99452192f}, +{-0.30901703f,-0.95105648f}, {-0.50000006f,-0.86602533f}, {-0.66913068f,-0.74314475f}, +{-0.80901700f,-0.58778518f}, {-0.91354549f,-0.40673658f}, {-0.97814763f,-0.20791161f}, +{1.0000000f,-0.0000000f}, {0.95105648f,-0.30901700f}, {0.80901700f,-0.58778524f}, +{0.58778524f,-0.80901700f}, {0.30901697f,-0.95105654f}, {-4.3711388e-08f,-1.0000000f}, +{-0.30901703f,-0.95105648f}, {-0.58778518f,-0.80901700f}, {-0.80901700f,-0.58778518f}, +{-0.95105654f,-0.30901679f}, {-1.0000000f,8.7422777e-08f}, {-0.95105654f,0.30901697f}, +{-0.80901694f,0.58778536f}, {-0.58778507f,0.80901712f}, {-0.30901709f,0.95105648f}, +}; +static const ne10_fft_state_float32_t ne10_fft_state_float32_t_480 = { +120, +(ne10_int32_t *)ne10_factors_480, +(ne10_fft_cpx_float32_t *)ne10_twiddles_480, +NULL, +(ne10_fft_cpx_float32_t *)&ne10_twiddles_480[120], +/* is_forward_scaled = true */ +(ne10_int32_t) 1, +/* is_backward_scaled = false */ +(ne10_int32_t) 0, +}; +static const arch_fft_state cfg_arch_480 = { +1, +(void *)&ne10_fft_state_float32_t_480, +}; + +static const ne10_fft_state_float32_t ne10_fft_state_float32_t_240 = { +60, +(ne10_int32_t *)ne10_factors_240, +(ne10_fft_cpx_float32_t *)ne10_twiddles_240, +NULL, +(ne10_fft_cpx_float32_t *)&ne10_twiddles_240[60], +/* is_forward_scaled = true */ +(ne10_int32_t) 1, +/* is_backward_scaled = false */ +(ne10_int32_t) 0, +}; +static const arch_fft_state cfg_arch_240 = { +1, +(void *)&ne10_fft_state_float32_t_240, +}; + +static const ne10_fft_state_float32_t ne10_fft_state_float32_t_120 = { +30, +(ne10_int32_t *)ne10_factors_120, +(ne10_fft_cpx_float32_t *)ne10_twiddles_120, +NULL, +(ne10_fft_cpx_float32_t *)&ne10_twiddles_120[30], +/* is_forward_scaled = true */ +(ne10_int32_t) 1, +/* is_backward_scaled = false */ +(ne10_int32_t) 0, +}; +static const arch_fft_state cfg_arch_120 = { +1, +(void *)&ne10_fft_state_float32_t_120, +}; + +static const ne10_fft_state_float32_t ne10_fft_state_float32_t_60 = { +15, +(ne10_int32_t *)ne10_factors_60, +(ne10_fft_cpx_float32_t *)ne10_twiddles_60, +NULL, +(ne10_fft_cpx_float32_t *)&ne10_twiddles_60[15], +/* is_forward_scaled = true */ +(ne10_int32_t) 1, +/* is_backward_scaled = false */ +(ne10_int32_t) 0, +}; +static const arch_fft_state cfg_arch_60 = { +1, +(void *)&ne10_fft_state_float32_t_60, +}; + +#endif /* end NE10_FFT_PARAMS48000_960 */ diff --git a/asm/libs/opus/celt/tests/test_unit_cwrs32.c b/asm/libs/opus/celt/tests/test_unit_cwrs32.c new file mode 100644 index 00000000..36dd8af5 --- /dev/null +++ b/asm/libs/opus/celt/tests/test_unit_cwrs32.c @@ -0,0 +1,161 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation, + Gregory Maxwell + Written by Jean-Marc Valin, Gregory Maxwell, and Timothy B. Terriberry */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#else +#define TEST_CUSTOM_MODES +#endif + +#define CELT_C +#include "stack_alloc.h" +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" +#include "cwrs.c" +#include "mathops.c" +#include "rate.h" + +#define NMAX (240) +#define KMAX (128) + +#ifdef TEST_CUSTOM_MODES + +#define NDIMS (44) +static const int pn[NDIMS]={ + 2, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 18, 20, 22, + 24, 26, 28, 30, 32, 36, 40, 44, 48, + 52, 56, 60, 64, 72, 80, 88, 96, 104, + 112, 120, 128, 144, 160, 176, 192, 208 +}; +static const int pkmax[NDIMS]={ + 128, 128, 128, 128, 88, 52, 36, 26, 22, + 18, 16, 15, 13, 12, 12, 11, 10, 9, + 9, 8, 8, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 5, 5, 5, 5, 5, 5, + 4, 4, 4, 4, 4, 4, 4, 4 +}; + +#else /* TEST_CUSTOM_MODES */ + +#define NDIMS (22) +static const int pn[NDIMS]={ + 2, 3, 4, 6, 8, 9, 11, 12, 16, + 18, 22, 24, 32, 36, 44, 48, 64, 72, + 88, 96, 144, 176 +}; +static const int pkmax[NDIMS]={ + 128, 128, 128, 88, 36, 26, 18, 16, 12, + 11, 9, 9, 7, 7, 6, 6, 5, 5, + 5, 5, 4, 4 +}; + +#endif + +int main(void){ + int t; + int n; + ALLOC_STACK; + for(t=0;tpkmax[t])break; + printf("Testing CWRS with N=%i, K=%i...\n",n,k); +#if defined(SMALL_FOOTPRINT) + nc=ncwrs_urow(n,k,uu); +#else + nc=CELT_PVQ_V(n,k); +#endif + inc=nc/20000; + if(inc<1)inc=1; + for(i=0;i");*/ +#if defined(SMALL_FOOTPRINT) + ii=icwrs(n,k,&v,y,u); +#else + ii=icwrs(n,y); + v=CELT_PVQ_V(n,k); +#endif + if(ii!=i){ + fprintf(stderr,"Combination-index mismatch (%lu!=%lu).\n", + (long)ii,(long)i); + return 1; + } + if(v!=nc){ + fprintf(stderr,"Combination count mismatch (%lu!=%lu).\n", + (long)v,(long)nc); + return 2; + } + /*printf(" %6u\n",i);*/ + } + /*printf("\n");*/ + } + } + return 0; +} diff --git a/asm/libs/opus/celt/tests/test_unit_dft.c b/asm/libs/opus/celt/tests/test_unit_dft.c new file mode 100644 index 00000000..6166eb0e --- /dev/null +++ b/asm/libs/opus/celt/tests/test_unit_dft.c @@ -0,0 +1,189 @@ +/* Copyright (c) 2008 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define SKIP_CONFIG_H + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#endif + +#include + +#define CELT_C +#define TEST_UNIT_DFT_C +#include "stack_alloc.h" +#include "kiss_fft.h" +#include "kiss_fft.c" +#include "mathops.c" +#include "entcode.c" + +#if defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/x86cpu.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# include "celt_lpc.c" +# include "pitch.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "mdct.c" +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#ifndef M_PI +#define M_PI 3.141592653 +#endif + +int ret = 0; + +void check(kiss_fft_cpx * in,kiss_fft_cpx * out,int nfft,int isinverse) +{ + int bin,k; + double errpow=0,sigpow=0, snr; + + for (bin=0;bin1) { + int k; + for (k=1;k +#include +#include +#include +#include "entcode.h" +#include "entenc.h" +#include "entdec.h" +#include + +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" + +#ifndef M_LOG2E +# define M_LOG2E 1.4426950408889634074 +#endif +#define DATA_SIZE 10000000 +#define DATA_SIZE2 10000 + +int main(int _argc,char **_argv){ + ec_enc enc; + ec_dec dec; + long nbits; + long nbits2; + double entropy; + int ft; + int ftb; + int sz; + int i; + int ret; + unsigned int sym; + unsigned int seed; + unsigned char *ptr; + const char *env_seed; + ret=0; + entropy=0; + if (_argc > 2) { + fprintf(stderr, "Usage: %s []\n", _argv[0]); + return 1; + } + env_seed = getenv("SEED"); + if (_argc > 1) + seed = atoi(_argv[1]); + else if (env_seed) + seed = atoi(env_seed); + else + seed = time(NULL); + /*Testing encoding of raw bit values.*/ + ptr = (unsigned char *)malloc(DATA_SIZE); + ec_enc_init(&enc,ptr, DATA_SIZE); + for(ft=2;ft<1024;ft++){ + for(i=0;i>(rand()%11U))+1U)+10; + sz=rand()/((RAND_MAX>>(rand()%9U))+1U); + data=(unsigned *)malloc(sz*sizeof(*data)); + tell=(unsigned *)malloc((sz+1)*sizeof(*tell)); + ec_enc_init(&enc,ptr,DATA_SIZE2); + zeros = rand()%13==0; + tell[0]=ec_tell_frac(&enc); + for(j=0;j>(rand()%9U))+1U); + logp1=(unsigned *)malloc(sz*sizeof(*logp1)); + data=(unsigned *)malloc(sz*sizeof(*data)); + tell=(unsigned *)malloc((sz+1)*sizeof(*tell)); + enc_method=(unsigned *)malloc(sz*sizeof(*enc_method)); + ec_enc_init(&enc,ptr,DATA_SIZE2); + tell[0]=ec_tell_frac(&enc); + for(j=0;j>1)+1); + logp1[j]=(rand()%15)+1; + enc_method[j]=rand()/((RAND_MAX>>2)+1); + switch(enc_method[j]){ + case 0:{ + ec_encode(&enc,data[j]?(1<>2)+1); + switch(dec_method){ + case 0:{ + fs=ec_decode(&dec,1<=(1<=(1< +#include +#include "laplace.h" +#define CELT_C +#include "stack_alloc.h" + +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" +#include "laplace.c" + +#define DATA_SIZE 40000 + +int ec_laplace_get_start_freq(int decay) +{ + opus_uint32 ft = 32768 - LAPLACE_MINP*(2*LAPLACE_NMIN+1); + int fs = (ft*(16384-decay))/(16384+decay); + return fs+LAPLACE_MINP; +} + +int main(void) +{ + int i; + int ret = 0; + ec_enc enc; + ec_dec dec; + unsigned char *ptr; + int val[10000], decay[10000]; + ALLOC_STACK; + ptr = (unsigned char *)malloc(DATA_SIZE); + ec_enc_init(&enc,ptr,DATA_SIZE); + + val[0] = 3; decay[0] = 6000; + val[1] = 0; decay[1] = 5800; + val[2] = -1; decay[2] = 5600; + for (i=3;i<10000;i++) + { + val[i] = rand()%15-7; + decay[i] = rand()%11000+5000; + } + for (i=0;i<10000;i++) + ec_laplace_encode(&enc, &val[i], + ec_laplace_get_start_freq(decay[i]), decay[i]); + + ec_enc_done(&enc); + + ec_dec_init(&dec,ec_get_buffer(&enc),ec_range_bytes(&enc)); + + for (i=0;i<10000;i++) + { + int d = ec_laplace_decode(&dec, + ec_laplace_get_start_freq(decay[i]), decay[i]); + if (d != val[i]) + { + fprintf (stderr, "Got %d instead of %d\n", d, val[i]); + ret = 1; + } + } + + free(ptr); + return ret; +} diff --git a/asm/libs/opus/celt/tests/test_unit_mathops.c b/asm/libs/opus/celt/tests/test_unit_mathops.c new file mode 100644 index 00000000..fd3319da --- /dev/null +++ b/asm/libs/opus/celt/tests/test_unit_mathops.c @@ -0,0 +1,304 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation, + Gregory Maxwell + Written by Jean-Marc Valin, Gregory Maxwell, and Timothy B. Terriberry */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#endif + +#define CELT_C + +#include +#include +#include "mathops.c" +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" +#include "bands.c" +#include "quant_bands.c" +#include "laplace.c" +#include "vq.c" +#include "cwrs.c" +#include "pitch.c" +#include "celt_lpc.c" +#include "celt.c" + +#if defined(OPUS_X86_MAY_HAVE_SSE) || defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# if defined(OPUS_X86_MAY_HAVE_SSE) +# include "x86/pitch_sse.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE2) +# include "x86/pitch_sse2.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/pitch_sse4_1.c" +# include "x86/celt_lpc_sse.c" +# endif +# include "x86/x86_celt_map.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "kiss_fft.c" +# include "mdct.c" +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#ifdef FIXED_POINT +#define WORD "%d" +#else +#define WORD "%f" +#endif + +int ret = 0; + +void testdiv(void) +{ + opus_int32 i; + for (i=1;i<=327670;i++) + { + double prod; + opus_val32 val; + val = celt_rcp(i); +#ifdef FIXED_POINT + prod = (1./32768./65526.)*val*i; +#else + prod = val*i; +#endif + if (fabs(prod-1) > .00025) + { + fprintf (stderr, "div failed: 1/%d="WORD" (product = %f)\n", i, val, prod); + ret = 1; + } + } +} + +void testsqrt(void) +{ + opus_int32 i; + for (i=1;i<=1000000000;i++) + { + double ratio; + opus_val16 val; + val = celt_sqrt(i); + ratio = val/sqrt(i); + if (fabs(ratio - 1) > .0005 && fabs(val-sqrt(i)) > 2) + { + fprintf (stderr, "sqrt failed: sqrt(%d)="WORD" (ratio = %f)\n", i, val, ratio); + ret = 1; + } + i+= i>>10; + } +} + +void testbitexactcos(void) +{ + int i; + opus_int32 min_d,max_d,last,chk; + chk=max_d=0; + last=min_d=32767; + for(i=64;i<=16320;i++) + { + opus_int32 d; + opus_int32 q=bitexact_cos(i); + chk ^= q*i; + d = last - q; + if (d>max_d)max_d=d; + if (dmax_d)max_d=d; + if (d0.0009) + { + fprintf (stderr, "celt_log2 failed: fabs((1.442695040888963387*log(x))-celt_log2(x))>0.001 (x = %f, error = %f)\n", x,error); + ret = 1; + } + } +} + +void testexp2(void) +{ + float x; + for (x=-11.0;x<24.0;x+=0.0007) + { + float error = fabs(x-(1.442695040888963387*log(celt_exp2(x)))); + if (error>0.0002) + { + fprintf (stderr, "celt_exp2 failed: fabs(x-(1.442695040888963387*log(celt_exp2(x))))>0.0005 (x = %f, error = %f)\n", x,error); + ret = 1; + } + } +} + +void testexp2log2(void) +{ + float x; + for (x=-11.0;x<24.0;x+=0.0007) + { + float error = fabs(x-(celt_log2(celt_exp2(x)))); + if (error>0.001) + { + fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_log2(celt_exp2(x))))>0.001 (x = %f, error = %f)\n", x,error); + ret = 1; + } + } +} +#else +void testlog2(void) +{ + opus_val32 x; + for (x=8;x<1073741824;x+=(x>>3)) + { + float error = fabs((1.442695040888963387*log(x/16384.0))-celt_log2(x)/1024.0); + if (error>0.003) + { + fprintf (stderr, "celt_log2 failed: x = %ld, error = %f\n", (long)x,error); + ret = 1; + } + } +} + +void testexp2(void) +{ + opus_val16 x; + for (x=-32768;x<15360;x++) + { + float error1 = fabs(x/1024.0-(1.442695040888963387*log(celt_exp2(x)/65536.0))); + float error2 = fabs(exp(0.6931471805599453094*x/1024.0)-celt_exp2(x)/65536.0); + if (error1>0.0002&&error2>0.00004) + { + fprintf (stderr, "celt_exp2 failed: x = "WORD", error1 = %f, error2 = %f\n", x,error1,error2); + ret = 1; + } + } +} + +void testexp2log2(void) +{ + opus_val32 x; + for (x=8;x<65536;x+=(x>>3)) + { + float error = fabs(x-0.25*celt_exp2(celt_log2(x)))/16384; + if (error>0.004) + { + fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_exp2(celt_log2(x))))>0.001 (x = %ld, error = %f)\n", (long)x,error); + ret = 1; + } + } +} + +void testilog2(void) +{ + opus_val32 x; + for (x=1;x<=268435455;x+=127) + { + opus_val32 lg; + opus_val32 y; + + lg = celt_ilog2(x); + if (lg<0 || lg>=31) + { + printf("celt_ilog2 failed: 0<=celt_ilog2(x)<31 (x = %d, celt_ilog2(x) = %d)\n",x,lg); + ret = 1; + } + y = 1<>1)>=y) + { + printf("celt_ilog2 failed: 2**celt_ilog2(x)<=x<2**(celt_ilog2(x)+1) (x = %d, 2**celt_ilog2(x) = %d)\n",x,y); + ret = 1; + } + } +} +#endif + +int main(void) +{ + testbitexactcos(); + testbitexactlog2tan(); + testdiv(); + testsqrt(); + testlog2(); + testexp2(); + testexp2log2(); +#ifdef FIXED_POINT + testilog2(); +#endif + return ret; +} diff --git a/asm/libs/opus/celt/tests/test_unit_mdct.c b/asm/libs/opus/celt/tests/test_unit_mdct.c new file mode 100644 index 00000000..8dbb9caa --- /dev/null +++ b/asm/libs/opus/celt/tests/test_unit_mdct.c @@ -0,0 +1,230 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define SKIP_CONFIG_H + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#endif + +#include + +#define CELT_C +#include "mdct.h" +#include "stack_alloc.h" + +#include "kiss_fft.c" +#include "mdct.c" +#include "mathops.c" +#include "entcode.c" + +#if defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/x86cpu.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# include "pitch.c" +# include "celt_lpc.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#ifndef M_PI +#define M_PI 3.141592653 +#endif + +int ret = 0; +void check(kiss_fft_scalar * in,kiss_fft_scalar * out,int nfft,int isinverse) +{ + int bin,k; + double errpow=0,sigpow=0; + double snr; + for (bin=0;bin1) { + int k; + for (k=1;k +#include +#include "vq.c" +#include "cwrs.c" +#include "entcode.c" +#include "entenc.c" +#include "entdec.c" +#include "mathops.c" +#include "bands.h" +#include "pitch.c" +#include "celt_lpc.c" +#include "celt.c" +#include + +#if defined(OPUS_X86_MAY_HAVE_SSE) || defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# if defined(OPUS_X86_MAY_HAVE_SSE) +# include "x86/pitch_sse.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE2) +# include "x86/pitch_sse2.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/pitch_sse4_1.c" +# include "x86/celt_lpc_sse.c" +# endif +# include "x86/x86_celt_map.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "kiss_fft.c" +# include "mdct.c" +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#define MAX_SIZE 100 + +int ret=0; +void test_rotation(int N, int K) +{ + int i; + double err = 0, ener = 0, snr, snr0; + opus_val16 x0[MAX_SIZE]; + opus_val16 x1[MAX_SIZE]; + for (i=0;i 20) + { + fprintf(stderr, "FAIL!\n"); + ret = 1; + } +} + +int main(void) +{ + ALLOC_STACK; + test_rotation(15, 3); + test_rotation(23, 5); + test_rotation(50, 3); + test_rotation(80, 1); + return ret; +} diff --git a/asm/libs/opus/celt/tests/test_unit_types.c b/asm/libs/opus/celt/tests/test_unit_types.c new file mode 100644 index 00000000..67a0fb8e --- /dev/null +++ b/asm/libs/opus/celt/tests/test_unit_types.c @@ -0,0 +1,50 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_types.h" +#include + +int main(void) +{ + opus_int16 i = 1; + i <<= 14; + if (i>>14 != 1) + { + fprintf(stderr, "opus_int16 isn't 16 bits\n"); + return 1; + } + if (sizeof(opus_int16)*2 != sizeof(opus_int32)) + { + fprintf(stderr, "16*2 != 32\n"); + return 1; + } + return 0; +} diff --git a/asm/libs/opus/celt/vq.c b/asm/libs/opus/celt/vq.c new file mode 100644 index 00000000..f3583960 --- /dev/null +++ b/asm/libs/opus/celt/vq.c @@ -0,0 +1,408 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mathops.h" +#include "cwrs.h" +#include "vq.h" +#include "arch.h" +#include "os_support.h" +#include "bands.h" +#include "rate.h" +#include "pitch.h" + +#ifndef OVERRIDE_vq_exp_rotation1 +static void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_val16 s) +{ + int i; + opus_val16 ms; + celt_norm *Xptr; + Xptr = X; + ms = NEG16(s); + for (i=0;i=0;i--) + { + celt_norm x1, x2; + x1 = Xptr[0]; + x2 = Xptr[stride]; + Xptr[stride] = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x2), s, x1), 15)); + *Xptr-- = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x1), ms, x2), 15)); + } +} +#endif /* OVERRIDE_vq_exp_rotation1 */ + +static void exp_rotation(celt_norm *X, int len, int dir, int stride, int K, int spread) +{ + static const int SPREAD_FACTOR[3]={15,10,5}; + int i; + opus_val16 c, s; + opus_val16 gain, theta; + int stride2=0; + int factor; + + if (2*K>=len || spread==SPREAD_NONE) + return; + factor = SPREAD_FACTOR[spread-1]; + + gain = celt_div((opus_val32)MULT16_16(Q15_ONE,len),(opus_val32)(len+factor*K)); + theta = HALF16(MULT16_16_Q15(gain,gain)); + + c = celt_cos_norm(EXTEND32(theta)); + s = celt_cos_norm(EXTEND32(SUB16(Q15ONE,theta))); /* sin(theta) */ + + if (len>=8*stride) + { + stride2 = 1; + /* This is just a simple (equivalent) way of computing sqrt(len/stride) with rounding. + It's basically incrementing long as (stride2+0.5)^2 < len/stride. */ + while ((stride2*stride2+stride2)*stride + (stride>>2) < len) + stride2++; + } + /*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for + extract_collapse_mask().*/ + len = celt_udiv(len, stride); + for (i=0;i>1; +#endif + t = VSHR32(Ryy, 2*(k-7)); + g = MULT16_16_P15(celt_rsqrt_norm(t),gain); + + i=0; + do + X[i] = EXTRACT16(PSHR32(MULT16_16(g, iy[i]), k+1)); + while (++i < N); +} + +static unsigned extract_collapse_mask(int *iy, int N, int B) +{ + unsigned collapse_mask; + int N0; + int i; + if (B<=1) + return 1; + /*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for + exp_rotation().*/ + N0 = celt_udiv(N, B); + collapse_mask = 0; + i=0; do { + int j; + unsigned tmp=0; + j=0; do { + tmp |= iy[i*N0+j]; + } while (++j0, "alg_quant() needs at least one pulse"); + celt_assert2(N>1, "alg_quant() needs at least two dimensions"); + + ALLOC(y, N, celt_norm); + ALLOC(iy, N, int); + ALLOC(signx, N, opus_val16); + + exp_rotation(X, N, 1, B, K, spread); + + /* Get rid of the sign */ + sum = 0; + j=0; do { + if (X[j]>0) + signx[j]=1; + else { + signx[j]=-1; + X[j]=-X[j]; + } + iy[j] = 0; + y[j] = 0; + } while (++j (N>>1)) + { + opus_val16 rcp; + j=0; do { + sum += X[j]; + } while (++j EPSILON && sum < 64)) +#endif + { + X[0] = QCONST16(1.f,14); + j=1; do + X[j]=0; + while (++j=1, "Allocated too many pulses in the quick pass"); + + /* This should never happen, but just in case it does (e.g. on silence) + we fill the first bin with pulses. */ +#ifdef FIXED_POINT_DEBUG + celt_assert2(pulsesLeft<=N+3, "Not enough pulses in the quick pass"); +#endif + if (pulsesLeft > N+3) + { + opus_val16 tmp = (opus_val16)pulsesLeft; + yy = MAC16_16(yy, tmp, tmp); + yy = MAC16_16(yy, tmp, y[0]); + iy[0] += pulsesLeft; + pulsesLeft=0; + } + + s = 1; + for (i=0;i= best_num/best_den, but that way + we can do it without any division */ + /* OPT: Make sure to use conditional moves here */ + if (MULT16_16(best_den, Rxy) > MULT16_16(Ryy, best_num)) + { + best_den = Ryy; + best_num = Rxy; + best_id = j; + } + } while (++j0, "alg_unquant() needs at least one pulse"); + celt_assert2(N>1, "alg_unquant() needs at least two dimensions"); + ALLOC(iy, N, int); + Ryy = decode_pulses(iy, N, K, dec); + normalise_residual(iy, X, N, Ryy, gain); + exp_rotation(X, N, -1, B, K, spread); + collapse_mask = extract_collapse_mask(iy, N, B); + RESTORE_STACK; + return collapse_mask; +} + +#ifndef OVERRIDE_renormalise_vector +void renormalise_vector(celt_norm *X, int N, opus_val16 gain, int arch) +{ + int i; +#ifdef FIXED_POINT + int k; +#endif + opus_val32 E; + opus_val16 g; + opus_val32 t; + celt_norm *xptr; + E = EPSILON + celt_inner_prod(X, X, N, arch); +#ifdef FIXED_POINT + k = celt_ilog2(E)>>1; +#endif + t = VSHR32(E, 2*(k-7)); + g = MULT16_16_P15(celt_rsqrt_norm(t),gain); + + xptr = X; + for (i=0;i +#include +#include +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" +#include "x86cpu.h" + +#if defined(FIXED_POINT) + +void celt_fir_sse4_1(const opus_val16 *_x, + const opus_val16 *num, + opus_val16 *_y, + int N, + int ord, + opus_val16 *mem, + int arch) +{ + int i,j; + VARDECL(opus_val16, rnum); + VARDECL(opus_val16, x); + + __m128i vecNoA; + opus_int32 noA ; + SAVE_STACK; + + ALLOC(rnum, ord, opus_val16); + ALLOC(x, N+ord, opus_val16); + for(i=0;i> 1; + vecNoA = _mm_set_epi32(noA, noA, noA, noA); + + for (i=0;i +#include "arch.h" + +void xcorr_kernel_sse(const opus_val16 *x, const opus_val16 *y, opus_val32 sum[4], int len) +{ + int j; + __m128 xsum1, xsum2; + xsum1 = _mm_loadu_ps(sum); + xsum2 = _mm_setzero_ps(); + + for (j = 0; j < len-3; j += 4) + { + __m128 x0 = _mm_loadu_ps(x+j); + __m128 yj = _mm_loadu_ps(y+j); + __m128 y3 = _mm_loadu_ps(y+j+3); + + xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0x00),yj)); + xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0x55), + _mm_shuffle_ps(yj,y3,0x49))); + xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0xaa), + _mm_shuffle_ps(yj,y3,0x9e))); + xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0xff),y3)); + } + if (j < len) + { + xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j))); + if (++j < len) + { + xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j))); + if (++j < len) + { + xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j))); + } + } + } + _mm_storeu_ps(sum,_mm_add_ps(xsum1,xsum2)); +} + + +void dual_inner_prod_sse(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02, + int N, opus_val32 *xy1, opus_val32 *xy2) +{ + int i; + __m128 xsum1, xsum2; + xsum1 = _mm_setzero_ps(); + xsum2 = _mm_setzero_ps(); + for (i=0;i +#include + +#include "macros.h" +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" + +#if defined(OPUS_X86_MAY_HAVE_SSE2) && defined(FIXED_POINT) +opus_val32 celt_inner_prod_sse2(const opus_val16 *x, const opus_val16 *y, + int N) +{ + opus_int i, dataSize16; + opus_int32 sum; + + __m128i inVec1_76543210, inVec1_FEDCBA98, acc1; + __m128i inVec2_76543210, inVec2_FEDCBA98, acc2; + + sum = 0; + dataSize16 = N & ~15; + + acc1 = _mm_setzero_si128(); + acc2 = _mm_setzero_si128(); + + for (i=0;i= 8) + { + inVec1_76543210 = _mm_loadu_si128((__m128i *)(&x[i + 0])); + inVec2_76543210 = _mm_loadu_si128((__m128i *)(&y[i + 0])); + + inVec1_76543210 = _mm_madd_epi16(inVec1_76543210, inVec2_76543210); + + acc1 = _mm_add_epi32(acc1, inVec1_76543210); + i += 8; + } + + acc1 = _mm_add_epi32(acc1, _mm_unpackhi_epi64( acc1, acc1)); + acc1 = _mm_add_epi32(acc1, _mm_shufflelo_epi16( acc1, 0x0E)); + sum += _mm_cvtsi128_si32(acc1); + + for (;i +#include + +#include "macros.h" +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" + +#if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) +#include +#include "x86cpu.h" + +opus_val32 celt_inner_prod_sse4_1(const opus_val16 *x, const opus_val16 *y, + int N) +{ + opus_int i, dataSize16; + opus_int32 sum; + __m128i inVec1_76543210, inVec1_FEDCBA98, acc1; + __m128i inVec2_76543210, inVec2_FEDCBA98, acc2; + __m128i inVec1_3210, inVec2_3210; + + sum = 0; + dataSize16 = N & ~15; + + acc1 = _mm_setzero_si128(); + acc2 = _mm_setzero_si128(); + + for (i=0;i= 8) + { + inVec1_76543210 = _mm_loadu_si128((__m128i *)(&x[i + 0])); + inVec2_76543210 = _mm_loadu_si128((__m128i *)(&y[i + 0])); + + inVec1_76543210 = _mm_madd_epi16(inVec1_76543210, inVec2_76543210); + + acc1 = _mm_add_epi32(acc1, inVec1_76543210); + i += 8; + } + + if (N - i >= 4) + { + inVec1_3210 = OP_CVTEPI16_EPI32_M64(&x[i + 0]); + inVec2_3210 = OP_CVTEPI16_EPI32_M64(&y[i + 0]); + + inVec1_3210 = _mm_mullo_epi32(inVec1_3210, inVec2_3210); + + acc1 = _mm_add_epi32(acc1, inVec1_3210); + i += 4; + } + + acc1 = _mm_add_epi32(acc1, _mm_unpackhi_epi64(acc1, acc1)); + acc1 = _mm_add_epi32(acc1, _mm_shufflelo_epi16(acc1, 0x0E)); + + sum += _mm_cvtsi128_si32(acc1); + + for (;i= 3); + + sum0 = _mm_setzero_si128(); + sum1 = _mm_setzero_si128(); + sum2 = _mm_setzero_si128(); + sum3 = _mm_setzero_si128(); + + for (j=0;j<(len-7);j+=8) + { + vecX = _mm_loadu_si128((__m128i *)(&x[j + 0])); + vecY0 = _mm_loadu_si128((__m128i *)(&y[j + 0])); + vecY1 = _mm_loadu_si128((__m128i *)(&y[j + 1])); + vecY2 = _mm_loadu_si128((__m128i *)(&y[j + 2])); + vecY3 = _mm_loadu_si128((__m128i *)(&y[j + 3])); + + sum0 = _mm_add_epi32(sum0, _mm_madd_epi16(vecX, vecY0)); + sum1 = _mm_add_epi32(sum1, _mm_madd_epi16(vecX, vecY1)); + sum2 = _mm_add_epi32(sum2, _mm_madd_epi16(vecX, vecY2)); + sum3 = _mm_add_epi32(sum3, _mm_madd_epi16(vecX, vecY3)); + } + + sum0 = _mm_add_epi32(sum0, _mm_unpackhi_epi64( sum0, sum0)); + sum0 = _mm_add_epi32(sum0, _mm_shufflelo_epi16( sum0, 0x0E)); + + sum1 = _mm_add_epi32(sum1, _mm_unpackhi_epi64( sum1, sum1)); + sum1 = _mm_add_epi32(sum1, _mm_shufflelo_epi16( sum1, 0x0E)); + + sum2 = _mm_add_epi32(sum2, _mm_unpackhi_epi64( sum2, sum2)); + sum2 = _mm_add_epi32(sum2, _mm_shufflelo_epi16( sum2, 0x0E)); + + sum3 = _mm_add_epi32(sum3, _mm_unpackhi_epi64( sum3, sum3)); + sum3 = _mm_add_epi32(sum3, _mm_shufflelo_epi16( sum3, 0x0E)); + + vecSum = _mm_unpacklo_epi64(_mm_unpacklo_epi32(sum0, sum1), + _mm_unpacklo_epi32(sum2, sum3)); + + for (;j<(len-3);j+=4) + { + vecX = OP_CVTEPI16_EPI32_M64(&x[j + 0]); + vecX0 = _mm_shuffle_epi32(vecX, 0x00); + vecX1 = _mm_shuffle_epi32(vecX, 0x55); + vecX2 = _mm_shuffle_epi32(vecX, 0xaa); + vecX3 = _mm_shuffle_epi32(vecX, 0xff); + + vecY0 = OP_CVTEPI16_EPI32_M64(&y[j + 0]); + vecY1 = OP_CVTEPI16_EPI32_M64(&y[j + 1]); + vecY2 = OP_CVTEPI16_EPI32_M64(&y[j + 2]); + vecY3 = OP_CVTEPI16_EPI32_M64(&y[j + 3]); + + sum0 = _mm_mullo_epi32(vecX0, vecY0); + sum1 = _mm_mullo_epi32(vecX1, vecY1); + sum2 = _mm_mullo_epi32(vecX2, vecY2); + sum3 = _mm_mullo_epi32(vecX3, vecY3); + + sum0 = _mm_add_epi32(sum0, sum1); + sum2 = _mm_add_epi32(sum2, sum3); + vecSum = _mm_add_epi32(vecSum, sum0); + vecSum = _mm_add_epi32(vecSum, sum2); + } + + for (;j +static _inline void cpuid(unsigned int CPUInfo[4], unsigned int InfoType) +{ + __cpuid((int*)CPUInfo, InfoType); +} + +#else + +#if defined(CPU_INFO_BY_C) +#include +#endif + +static void cpuid(unsigned int CPUInfo[4], unsigned int InfoType) +{ +#if defined(CPU_INFO_BY_ASM) +#if defined(__i386__) && defined(__PIC__) +/* %ebx is PIC register in 32-bit, so mustn't clobber it. */ + __asm__ __volatile__ ( + "xchg %%ebx, %1\n" + "cpuid\n" + "xchg %%ebx, %1\n": + "=a" (CPUInfo[0]), + "=r" (CPUInfo[1]), + "=c" (CPUInfo[2]), + "=d" (CPUInfo[3]) : + "0" (InfoType) + ); +#else + __asm__ __volatile__ ( + "cpuid": + "=a" (CPUInfo[0]), + "=b" (CPUInfo[1]), + "=c" (CPUInfo[2]), + "=d" (CPUInfo[3]) : + "0" (InfoType) + ); +#endif +#elif defined(CPU_INFO_BY_C) + __get_cpuid(InfoType, &(CPUInfo[0]), &(CPUInfo[1]), &(CPUInfo[2]), &(CPUInfo[3])); +#endif +} + +#endif + +typedef struct CPU_Feature{ + /* SIMD: 128-bit */ + int HW_SSE; + int HW_SSE2; + int HW_SSE41; + /* SIMD: 256-bit */ + int HW_AVX; +} CPU_Feature; + +static void opus_cpu_feature_check(CPU_Feature *cpu_feature) +{ + unsigned int info[4] = {0}; + unsigned int nIds = 0; + + cpuid(info, 0); + nIds = info[0]; + + if (nIds >= 1){ + cpuid(info, 1); + cpu_feature->HW_SSE = (info[3] & (1 << 25)) != 0; + cpu_feature->HW_SSE2 = (info[3] & (1 << 26)) != 0; + cpu_feature->HW_SSE41 = (info[2] & (1 << 19)) != 0; + cpu_feature->HW_AVX = (info[2] & (1 << 28)) != 0; + } + else { + cpu_feature->HW_SSE = 0; + cpu_feature->HW_SSE2 = 0; + cpu_feature->HW_SSE41 = 0; + cpu_feature->HW_AVX = 0; + } +} + +int opus_select_arch(void) +{ + CPU_Feature cpu_feature; + int arch; + + opus_cpu_feature_check(&cpu_feature); + + arch = 0; + if (!cpu_feature.HW_SSE) + { + return arch; + } + arch++; + + if (!cpu_feature.HW_SSE2) + { + return arch; + } + arch++; + + if (!cpu_feature.HW_SSE41) + { + return arch; + } + arch++; + + if (!cpu_feature.HW_AVX) + { + return arch; + } + arch++; + + return arch; +} + +#endif diff --git a/asm/libs/opus/celt/x86/x86cpu.h b/asm/libs/opus/celt/x86/x86cpu.h new file mode 100644 index 00000000..04fd48aa --- /dev/null +++ b/asm/libs/opus/celt/x86/x86cpu.h @@ -0,0 +1,93 @@ +/* Copyright (c) 2014, Cisco Systems, INC + Written by XiangMingZhu WeiZhou MinPeng YanWang + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#if !defined(X86CPU_H) +# define X86CPU_H + +# if defined(OPUS_X86_MAY_HAVE_SSE) +# define MAY_HAVE_SSE(name) name ## _sse +# else +# define MAY_HAVE_SSE(name) name ## _c +# endif + +# if defined(OPUS_X86_MAY_HAVE_SSE2) +# define MAY_HAVE_SSE2(name) name ## _sse2 +# else +# define MAY_HAVE_SSE2(name) name ## _c +# endif + +# if defined(OPUS_X86_MAY_HAVE_SSE4_1) +# define MAY_HAVE_SSE4_1(name) name ## _sse4_1 +# else +# define MAY_HAVE_SSE4_1(name) name ## _c +# endif + +# if defined(OPUS_X86_MAY_HAVE_AVX) +# define MAY_HAVE_AVX(name) name ## _avx +# else +# define MAY_HAVE_AVX(name) name ## _c +# endif + +# if defined(OPUS_HAVE_RTCD) +int opus_select_arch(void); +# endif + +/*gcc appears to emit MOVDQA's to load the argument of an _mm_cvtepi8_epi32() + or _mm_cvtepi16_epi32() when optimizations are disabled, even though the + actual PMOVSXWD instruction takes an m32 or m64. Unlike a normal memory + reference, these require 16-byte alignment and load a full 16 bytes (instead + of 4 or 8), possibly reading out of bounds. + + We can insert an explicit MOVD or MOVQ using _mm_cvtsi32_si128() or + _mm_loadl_epi64(), which should have the same semantics as an m32 or m64 + reference in the PMOVSXWD instruction itself, but gcc is not smart enough to + optimize this out when optimizations ARE enabled. + + Clang, in contrast, requires us to do this always for _mm_cvtepi8_epi32 + (which is fair, since technically the compiler is always allowed to do the + dereference before invoking the function implementing the intrinsic). + However, it is smart enough to eliminate the extra MOVD instruction. + For _mm_cvtepi16_epi32, it does the right thing, though does *not* optimize out + the extra MOVQ if it's specified explicitly */ + +# if defined(__clang__) || !defined(__OPTIMIZE__) +# define OP_CVTEPI8_EPI32_M32(x) \ + (_mm_cvtepi8_epi32(_mm_cvtsi32_si128(*(int *)(x)))) +# else +# define OP_CVTEPI8_EPI32_M32(x) \ + (_mm_cvtepi8_epi32(*(__m128i *)(x))) +#endif + +# if !defined(__OPTIMIZE__) +# define OP_CVTEPI16_EPI32_M64(x) \ + (_mm_cvtepi16_epi32(_mm_loadl_epi64((__m128i *)(x)))) +# else +# define OP_CVTEPI16_EPI32_M64(x) \ + (_mm_cvtepi16_epi32(*(__m128i *)(x))) +# endif + +#endif diff --git a/asm/libs/opus/celt_headers.mk b/asm/libs/opus/celt_headers.mk new file mode 100644 index 00000000..0eca6e6a --- /dev/null +++ b/asm/libs/opus/celt_headers.mk @@ -0,0 +1,51 @@ +CELT_HEAD = \ +celt/arch.h \ +celt/bands.h \ +celt/celt.h \ +celt/cpu_support.h \ +include/opus_types.h \ +include/opus_defines.h \ +include/opus_custom.h \ +celt/cwrs.h \ +celt/ecintrin.h \ +celt/entcode.h \ +celt/entdec.h \ +celt/entenc.h \ +celt/fixed_debug.h \ +celt/fixed_generic.h \ +celt/float_cast.h \ +celt/_kiss_fft_guts.h \ +celt/kiss_fft.h \ +celt/laplace.h \ +celt/mathops.h \ +celt/mdct.h \ +celt/mfrngcod.h \ +celt/modes.h \ +celt/os_support.h \ +celt/pitch.h \ +celt/celt_lpc.h \ +celt/x86/celt_lpc_sse.h \ +celt/quant_bands.h \ +celt/rate.h \ +celt/stack_alloc.h \ +celt/vq.h \ +celt/static_modes_float.h \ +celt/static_modes_fixed.h \ +celt/static_modes_float_arm_ne10.h \ +celt/static_modes_fixed_arm_ne10.h \ +celt/arm/armcpu.h \ +celt/arm/fixed_armv4.h \ +celt/arm/fixed_armv5e.h \ +celt/arm/kiss_fft_armv4.h \ +celt/arm/kiss_fft_armv5e.h \ +celt/arm/pitch_arm.h \ +celt/arm/fft_arm.h \ +celt/arm/mdct_arm.h \ +celt/mips/celt_mipsr1.h \ +celt/mips/fixed_generic_mipsr1.h \ +celt/mips/kiss_fft_mipsr1.h \ +celt/mips/mdct_mipsr1.h \ +celt/mips/pitch_mipsr1.h \ +celt/mips/vq_mipsr1.h \ +celt/x86/pitch_sse.h \ +celt/x86/x86cpu.h diff --git a/asm/libs/opus/celt_sources.mk b/asm/libs/opus/celt_sources.mk new file mode 100644 index 00000000..2ffe99a3 --- /dev/null +++ b/asm/libs/opus/celt_sources.mk @@ -0,0 +1,44 @@ +CELT_SOURCES = celt/bands.c \ +celt/celt.c \ +celt/celt_encoder.c \ +celt/celt_decoder.c \ +celt/cwrs.c \ +celt/entcode.c \ +celt/entdec.c \ +celt/entenc.c \ +celt/kiss_fft.c \ +celt/laplace.c \ +celt/mathops.c \ +celt/mdct.c \ +celt/modes.c \ +celt/pitch.c \ +celt/celt_lpc.c \ +celt/quant_bands.c \ +celt/rate.c \ +celt/vq.c + +CELT_SOURCES_SSE = celt/x86/x86cpu.c \ +celt/x86/x86_celt_map.c \ +celt/x86/pitch_sse.c + +CELT_SOURCES_SSE2 = celt/x86/pitch_sse2.c + +CELT_SOURCES_SSE4_1 = celt/x86/celt_lpc_sse.c \ +celt/x86/pitch_sse4_1.c + +CELT_SOURCES_ARM = \ +celt/arm/armcpu.c \ +celt/arm/arm_celt_map.c + +CELT_SOURCES_ARM_ASM = \ +celt/arm/celt_pitch_xcorr_arm.s + +CELT_AM_SOURCES_ARM_ASM = \ +celt/arm/armopts.s.in + +CELT_SOURCES_ARM_NEON_INTR = \ +celt/arm/celt_neon_intr.c + +CELT_SOURCES_ARM_NE10= \ +celt/arm/celt_ne10_fft.c \ +celt/arm/celt_ne10_mdct.c diff --git a/asm/libs/opus/configure.ac b/asm/libs/opus/configure.ac new file mode 100644 index 00000000..a67aa37a --- /dev/null +++ b/asm/libs/opus/configure.ac @@ -0,0 +1,831 @@ +dnl Process this file with autoconf to produce a configure script. -*-m4-*- + +dnl The package_version file will be automatically synced to the git revision +dnl by the update_version script when configured in the repository, but will +dnl remain constant in tarball releases unless it is manually edited. +m4_define([CURRENT_VERSION], + m4_esyscmd([ ./update_version 2>/dev/null || true + if test -e package_version; then + . ./package_version + printf "$PACKAGE_VERSION" + else + printf "unknown" + fi ])) + +AC_INIT([opus],[CURRENT_VERSION],[opus@xiph.org]) + +AC_CONFIG_SRCDIR(src/opus_encoder.c) +AC_CONFIG_MACRO_DIR([m4]) + +dnl enable silent rules on automake 1.11 and later +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +# For libtool. +dnl Please update these for releases. +OPUS_LT_CURRENT=5 +OPUS_LT_REVISION=2 +OPUS_LT_AGE=5 + +AC_SUBST(OPUS_LT_CURRENT) +AC_SUBST(OPUS_LT_REVISION) +AC_SUBST(OPUS_LT_AGE) + +AM_INIT_AUTOMAKE([no-define]) +AM_MAINTAINER_MODE([enable]) + +AC_CANONICAL_HOST +AC_MINGW32 +AM_PROG_LIBTOOL +AM_PROG_CC_C_O + +AC_PROG_CC_C99 +AC_C_CONST +AC_C_INLINE + +AM_PROG_AS + +AC_DEFINE([OPUS_BUILD], [], [This is a build of OPUS]) + +#Use a hacked up version of autoconf's AC_C_RESTRICT because it's not +#strong enough a test to detect old buggy versions of GCC (e.g. 2.95.3) +#Note: Both this and the test for variable-size arrays below are also +# done by AC_PROG_CC_C99, but not thoroughly enough apparently. +AC_CACHE_CHECK([for C/C++ restrict keyword], ac_cv_c_restrict, + [ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[typedef int * int_ptr; + int foo (int_ptr $ac_kw ip, int * $ac_kw baz[]) { + return ip[0]; + }]], + [[int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t, (void *)0)]])], + [ac_cv_c_restrict=$ac_kw]) + test "$ac_cv_c_restrict" != no && break + done + ]) + +AH_VERBATIM([restrict], +[/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif]) + +case $ac_cv_c_restrict in + restrict) ;; + no) AC_DEFINE([restrict], []) ;; + *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; +esac + +AC_MSG_CHECKING(for C99 variable-size arrays) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], + [[static int x; char a[++x]; a[sizeof a - 1] = 0; int N; return a[0];]])], + [ has_var_arrays=yes + use_alloca="no (using var arrays)" + AC_DEFINE([VAR_ARRAYS], [1], [Use C99 variable-size arrays]) + ],[ + has_var_arrays=no + ]) +AC_MSG_RESULT([$has_var_arrays]) + +AS_IF([test "$has_var_arrays" = "no"], + [ + AC_CHECK_HEADERS([alloca.h]) + AC_MSG_CHECKING(for alloca) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int foo=10; int *array = alloca(foo);]])], + [ use_alloca=yes; + AC_DEFINE([USE_ALLOCA], [], [Make use of alloca]) + ],[ + use_alloca=no + ]) + AC_MSG_RESULT([$use_alloca]) + ]) + +LT_LIB_M + +AC_ARG_ENABLE([fixed-point], + [AS_HELP_STRING([--enable-fixed-point], + [compile without floating point (for machines without a fast enough FPU)])],, + [enable_fixed_point=no]) + +AS_IF([test "$enable_fixed_point" = "yes"],[ + enable_float="no" + AC_DEFINE([FIXED_POINT], [1], [Compile as fixed-point (for machines without a fast enough FPU)]) + PC_BUILD="fixed-point" +],[ + enable_float="yes"; + PC_BUILD="floating-point" +]) + +AM_CONDITIONAL([FIXED_POINT], [test "$enable_fixed_point" = "yes"]) + +AC_ARG_ENABLE([fixed-point-debug], + [AS_HELP_STRING([--enable-fixed-point-debug], [debug fixed-point implementation])],, + [enable_fixed_point_debug=no]) + +AS_IF([test "$enable_fixed_point_debug" = "yes"],[ + AC_DEFINE([FIXED_DEBUG], [1], [Debug fixed-point implementation]) +]) + +AC_ARG_ENABLE([float_api], + [AS_HELP_STRING([--disable-float-api], + [compile without the floating point API (for machines with no float library)])],, + [enable_float_api=yes]) + +AM_CONDITIONAL([DISABLE_FLOAT_API], [test "$enable_float_api" = "no"]) + +AS_IF([test "$enable_float_api" = "no"],[ + AC_DEFINE([DISABLE_FLOAT_API], [1], [Do not build the float API]) +]) + +AC_ARG_ENABLE([custom-modes], + [AS_HELP_STRING([--enable-custom-modes], [enable non-Opus modes, e.g. 44.1 kHz & 2^n frames])],, + [enable_custom_modes=no]) + +AS_IF([test "$enable_custom_modes" = "yes"],[ + AC_DEFINE([CUSTOM_MODES], [1], [Custom modes]) + PC_BUILD="$PC_BUILD, custom modes" +]) + +AM_CONDITIONAL([CUSTOM_MODES], [test "$enable_custom_modes" = "yes"]) + +has_float_approx=no +#case "$host_cpu" in +#i[[3456]]86 | x86_64 | powerpc64 | powerpc32 | ia64) +# has_float_approx=yes +# ;; +#esac + +AC_ARG_ENABLE([float-approx], + [AS_HELP_STRING([--enable-float-approx], [enable fast approximations for floating point])], + [if test "$enable_float_approx" = "yes"; then + AC_WARN([Floating point approximations are not supported on all platforms.]) + fi + ], + [enable_float_approx=$has_float_approx]) + +AS_IF([test "$enable_float_approx" = "yes"],[ + AC_DEFINE([FLOAT_APPROX], [1], [Float approximations]) +]) + +AC_ARG_ENABLE([asm], + [AS_HELP_STRING([--disable-asm], [Disable assembly optimizations])],, + [enable_asm=yes]) + +AC_ARG_ENABLE([rtcd], + [AS_HELP_STRING([--disable-rtcd], [Disable run-time CPU capabilities detection])],, + [enable_rtcd=yes]) + +AC_ARG_ENABLE([intrinsics], + [AS_HELP_STRING([--enable-intrinsics], [Enable intrinsics optimizations for ARM(float) X86(fixed)])],, + [enable_intrinsics=no]) + +rtcd_support=no +cpu_arm=no + +AS_IF([test x"${enable_asm}" = x"yes"],[ + inline_optimization="No inline ASM for your platform, please send patches" + case $host_cpu in + arm*) + dnl Currently we only have asm for fixed-point + AS_IF([test "$enable_float" != "yes"],[ + cpu_arm=yes + AC_DEFINE([OPUS_ARM_ASM], [], [Make use of ARM asm optimization]) + AS_GCC_INLINE_ASSEMBLY( + [inline_optimization="ARM"], + [inline_optimization="disabled"] + ) + AS_ASM_ARM_EDSP([OPUS_ARM_INLINE_EDSP=1],[OPUS_ARM_INLINE_EDSP=0]) + AS_ASM_ARM_MEDIA([OPUS_ARM_INLINE_MEDIA=1], + [OPUS_ARM_INLINE_MEDIA=0]) + AS_ASM_ARM_NEON([OPUS_ARM_INLINE_NEON=1],[OPUS_ARM_INLINE_NEON=0]) + AS_IF([test x"$inline_optimization" = x"ARM"],[ + AM_CONDITIONAL([OPUS_ARM_INLINE_ASM],[true]) + AC_DEFINE([OPUS_ARM_INLINE_ASM], 1, + [Use generic ARMv4 inline asm optimizations]) + AS_IF([test x"$OPUS_ARM_INLINE_EDSP" = x"1"],[ + AC_DEFINE([OPUS_ARM_INLINE_EDSP], [1], + [Use ARMv5E inline asm optimizations]) + inline_optimization="$inline_optimization (EDSP)" + ]) + AS_IF([test x"$OPUS_ARM_INLINE_MEDIA" = x"1"],[ + AC_DEFINE([OPUS_ARM_INLINE_MEDIA], [1], + [Use ARMv6 inline asm optimizations]) + inline_optimization="$inline_optimization (Media)" + ]) + AS_IF([test x"$OPUS_ARM_INLINE_NEON" = x"1"],[ + AC_DEFINE([OPUS_ARM_INLINE_NEON], 1, + [Use ARM NEON inline asm optimizations]) + inline_optimization="$inline_optimization (NEON)" + ]) + ]) + dnl We need Perl to translate RVCT-syntax asm to gas syntax. + AC_CHECK_PROG([HAVE_PERL], perl, yes, no) + AS_IF([test x"$HAVE_PERL" = x"yes"],[ + AM_CONDITIONAL([OPUS_ARM_EXTERNAL_ASM],[true]) + asm_optimization="ARM" + AS_IF([test x"$OPUS_ARM_INLINE_EDSP" = x"1"], [ + OPUS_ARM_PRESUME_EDSP=1 + OPUS_ARM_MAY_HAVE_EDSP=1 + ], + [ + OPUS_ARM_PRESUME_EDSP=0 + OPUS_ARM_MAY_HAVE_EDSP=0 + ]) + AS_IF([test x"$OPUS_ARM_INLINE_MEDIA" = x"1"], [ + OPUS_ARM_PRESUME_MEDIA=1 + OPUS_ARM_MAY_HAVE_MEDIA=1 + ], + [ + OPUS_ARM_PRESUME_MEDIA=0 + OPUS_ARM_MAY_HAVE_MEDIA=0 + ]) + AS_IF([test x"$OPUS_ARM_INLINE_NEON" = x"1"], [ + OPUS_ARM_PRESUME_NEON=1 + OPUS_ARM_MAY_HAVE_NEON=1 + ], + [ + OPUS_ARM_PRESUME_NEON=0 + OPUS_ARM_MAY_HAVE_NEON=0 + ]) + AS_IF([test x"$enable_rtcd" = x"yes"],[ + AS_IF([test x"$OPUS_ARM_MAY_HAVE_EDSP" != x"1"],[ + AC_MSG_NOTICE( + [Trying to force-enable armv5e EDSP instructions...]) + AS_ASM_ARM_EDSP_FORCE([OPUS_ARM_MAY_HAVE_EDSP=1]) + ]) + AS_IF([test x"$OPUS_ARM_MAY_HAVE_MEDIA" != x"1"],[ + AC_MSG_NOTICE( + [Trying to force-enable ARMv6 media instructions...]) + AS_ASM_ARM_MEDIA_FORCE([OPUS_ARM_MAY_HAVE_MEDIA=1]) + ]) + AS_IF([test x"$OPUS_ARM_MAY_HAVE_NEON" != x"1"],[ + AC_MSG_NOTICE( + [Trying to force-enable NEON instructions...]) + AS_ASM_ARM_NEON_FORCE([OPUS_ARM_MAY_HAVE_NEON=1]) + ]) + ]) + rtcd_support= + AS_IF([test x"$OPUS_ARM_MAY_HAVE_EDSP" = x"1"],[ + AC_DEFINE(OPUS_ARM_MAY_HAVE_EDSP, 1, + [Define if assembler supports EDSP instructions]) + AS_IF([test x"$OPUS_ARM_PRESUME_EDSP" = x"1"],[ + AC_DEFINE(OPUS_ARM_PRESUME_EDSP, 1, + [Define if binary requires EDSP instruction support]) + asm_optimization="$asm_optimization (EDSP)" + ], + [rtcd_support="$rtcd_support (EDSP)"] + ) + ]) + AC_SUBST(OPUS_ARM_MAY_HAVE_EDSP) + AS_IF([test x"$OPUS_ARM_MAY_HAVE_MEDIA" = x"1"],[ + AC_DEFINE(OPUS_ARM_MAY_HAVE_MEDIA, 1, + [Define if assembler supports ARMv6 media instructions]) + AS_IF([test x"$OPUS_ARM_PRESUME_MEDIA" = x"1"],[ + AC_DEFINE(OPUS_ARM_PRESUME_MEDIA, 1, + [Define if binary requires ARMv6 media instruction support]) + asm_optimization="$asm_optimization (Media)" + ], + [rtcd_support="$rtcd_support (Media)"] + ) + ]) + AC_SUBST(OPUS_ARM_MAY_HAVE_MEDIA) + AS_IF([test x"$OPUS_ARM_MAY_HAVE_NEON" = x"1"],[ + AC_DEFINE(OPUS_ARM_MAY_HAVE_NEON, 1, + [Define if compiler supports NEON instructions]) + AS_IF([test x"$OPUS_ARM_PRESUME_NEON" = x"1"], [ + AC_DEFINE(OPUS_ARM_PRESUME_NEON, 1, + [Define if binary requires NEON instruction support]) + asm_optimization="$asm_optimization (NEON)" + ], + [rtcd_support="$rtcd_support (NEON)"] + ) + ]) + AC_SUBST(OPUS_ARM_MAY_HAVE_NEON) + dnl Make sure turning on RTCD gets us at least one + dnl instruction set. + AS_IF([test x"$rtcd_support" != x""], + [rtcd_support=ARM"$rtcd_support"], + [rtcd_support="no"] + ) + AC_MSG_CHECKING([for apple style tools]) + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([ +#ifndef __APPLE__ +#error 1 +#endif],[])], + [AC_MSG_RESULT([yes]); ARM2GNU_PARAMS="--apple"], + [AC_MSG_RESULT([no]); ARM2GNU_PARAMS=""]) + AC_SUBST(ARM2GNU_PARAMS) + ], + [ + AC_MSG_WARN( + [*** ARM assembly requires perl -- disabling optimizations]) + asm_optimization="(missing perl dependency for ARM)" + ]) + ]) + ;; + esac +],[ + inline_optimization="disabled" + asm_optimization="disabled" +]) + +AM_CONDITIONAL([OPUS_ARM_INLINE_ASM], + [test x"${inline_optimization%% *}" = x"ARM"]) +AM_CONDITIONAL([OPUS_ARM_EXTERNAL_ASM], + [test x"${asm_optimization%% *}" = x"ARM"]) + +AM_CONDITIONAL([HAVE_SSE], [false]) +AM_CONDITIONAL([HAVE_SSE2], [false]) +AM_CONDITIONAL([HAVE_SSE4_1], [false]) +AM_CONDITIONAL([HAVE_AVX], [false]) + +m4_define([DEFAULT_X86_SSE_CFLAGS], [-msse]) +m4_define([DEFAULT_X86_SSE2_CFLAGS], [-msse2]) +m4_define([DEFAULT_X86_SSE4_1_CFLAGS], [-msse4.1]) +m4_define([DEFAULT_X86_AVX_CFLAGS], [-mavx]) +m4_define([DEFAULT_ARM_NEON_INTR_CFLAGS], [-mfpu=neon]) +# With GCC on ARM32 softfp architectures (e.g. Android, or older Ubuntu) you need to specify +# -mfloat-abi=softfp for -mfpu=neon to work. However, on ARM32 hardfp architectures (e.g. newer Ubuntu), +# this option will break things. + +# As a heuristic, if host matches arm*eabi* but not arm*hf*, it's probably soft-float. +m4_define([DEFAULT_ARM_NEON_SOFTFP_INTR_CFLAGS], [-mfpu=neon -mfloat-abi=softfp]) + +AS_CASE([$host], + [arm*hf*], [AS_VAR_SET([RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS], "DEFAULT_ARM_NEON_INTR_CFLAGS")], + [arm*eabi*], [AS_VAR_SET([RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS], "DEFAULT_ARM_NEON_SOFTFP_INTR_CFLAGS")], + [AS_VAR_SET([RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS], "DEFAULT_ARM_NEON_INTR_CFLAGS")]) + +AC_ARG_VAR([X86_SSE_CFLAGS], [C compiler flags to compile SSE intrinsics @<:@default=]DEFAULT_X86_SSE_CFLAGS[@:>@]) +AC_ARG_VAR([X86_SSE2_CFLAGS], [C compiler flags to compile SSE2 intrinsics @<:@default=]DEFAULT_X86_SSE2_CFLAGS[@:>@]) +AC_ARG_VAR([X86_SSE4_1_CFLAGS], [C compiler flags to compile SSE4.1 intrinsics @<:@default=]DEFAULT_X86_SSE4_1_CFLAGS[@:>@]) +AC_ARG_VAR([X86_AVX_CFLAGS], [C compiler flags to compile AVX intrinsics @<:@default=]DEFAULT_X86_AVX_CFLAGS[@:>@]) +AC_ARG_VAR([ARM_NEON_INTR_CFLAGS], [C compiler flags to compile ARM NEON intrinsics @<:@default=]DEFAULT_ARM_NEON_INTR_CFLAGS / DEFAULT_ARM_NEON_SOFTFP_INTR_CFLAGS[@:>@]) + +AS_VAR_SET_IF([X86_SSE_CFLAGS], [], [AS_VAR_SET([X86_SSE_CFLAGS], "DEFAULT_X86_SSE_CFLAGS")]) +AS_VAR_SET_IF([X86_SSE2_CFLAGS], [], [AS_VAR_SET([X86_SSE2_CFLAGS], "DEFAULT_X86_SSE2_CFLAGS")]) +AS_VAR_SET_IF([X86_SSE4_1_CFLAGS], [], [AS_VAR_SET([X86_SSE4_1_CFLAGS], "DEFAULT_X86_SSE4_1_CFLAGS")]) +AS_VAR_SET_IF([X86_AVX_CFLAGS], [], [AS_VAR_SET([X86_AVX_CFLAGS], "DEFAULT_X86_AVX_CFLAGS")]) +AS_VAR_SET_IF([ARM_NEON_INTR_CFLAGS], [], [AS_VAR_SET([ARM_NEON_INTR_CFLAGS], ["$RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS"])]) + +AC_DEFUN([OPUS_PATH_NE10], + [ + AC_ARG_WITH(NE10, + AC_HELP_STRING([--with-NE10=PFX],[Prefix where libNE10 is installed (optional)]), + NE10_prefix="$withval", NE10_prefix="") + AC_ARG_WITH(NE10-libraries, + AC_HELP_STRING([--with-NE10-libraries=DIR], + [Directory where libNE10 library is installed (optional)]), + NE10_libraries="$withval", NE10_libraries="") + AC_ARG_WITH(NE10-includes, + AC_HELP_STRING([--with-NE10-includes=DIR], + [Directory where libNE10 header files are installed (optional)]), + NE10_includes="$withval", NE10_includes="") + + if test "x$NE10_libraries" != "x" ; then + NE10_LIBS="-L$NE10_libraries" + elif test "x$NE10_prefix" = "xno" || test "x$NE10_prefix" = "xyes" ; then + NE10_LIBS="" + elif test "x$NE10_prefix" != "x" ; then + NE10_LIBS="-L$NE10_prefix/lib" + elif test "x$prefix" != "xNONE" ; then + NE10_LIBS="-L$prefix/lib" + fi + + if test "x$NE10_prefix" != "xno" ; then + NE10_LIBS="$NE10_LIBS -lNE10" + fi + + if test "x$NE10_includes" != "x" ; then + NE10_CFLAGS="-I$NE10_includes" + elif test "x$NE10_prefix" = "xno" || test "x$NE10_prefix" = "xyes" ; then + NE10_CFLAGS="" + elif test "x$ogg_prefix" != "x" ; then + NE10_CFLAGS="-I$NE10_prefix/include" + elif test "x$prefix" != "xNONE"; then + NE10_CFLAGS="-I$prefix/include" + fi + + AC_MSG_CHECKING(for NE10) + save_CFLAGS="$CFLAGS"; CFLAGS="$NE10_CFLAGS" + save_LIBS="$LIBS"; LIBS="$NE10_LIBS $LIBM" + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM( + [[#include + ]], + [[ + ne10_fft_cfg_float32_t cfg; + cfg = ne10_fft_alloc_c2c_float32_neon(480); + ]] + ) + ],[ + HAVE_ARM_NE10=1 + AC_MSG_RESULT([yes]) + ],[ + HAVE_ARM_NE10=0 + AC_MSG_RESULT([no]) + NE10_CFLAGS="" + NE10_LIBS="" + ] + ) + CFLAGS="$save_CFLAGS"; LIBS="$save_LIBS" + #Now we know if libNE10 is installed or not + AS_IF([test x"$HAVE_ARM_NE10" = x"1"], + [ + AC_DEFINE([HAVE_ARM_NE10], 1, [NE10 library is installed on host. Make sure it is on target!]) + AC_SUBST(HAVE_ARM_NE10) + AC_SUBST(NE10_CFLAGS) + AC_SUBST(NE10_LIBS) + ] + ) + ] +) + +AS_IF([test x"$enable_intrinsics" = x"yes"],[ + intrinsics_support="" + AS_CASE([$host_cpu], + [arm*], + [ + cpu_arm=yes + OPUS_CHECK_INTRINSICS( + [ARM Neon], + [$ARM_NEON_INTR_CFLAGS], + [OPUS_ARM_MAY_HAVE_NEON_INTR], + [OPUS_ARM_PRESUME_NEON_INTR], + [[#include + ]], + [[ + static float32x4_t A0, A1, SUMM; + SUMM = vmlaq_f32(SUMM, A0, A1); + ]] + ) + AS_IF([test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1" && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"], + [ + OPUS_ARM_NEON_INTR_CFLAGS="$ARM_NEON_INTR_CFLAGS" + AC_SUBST([OPUS_ARM_NEON_INTR_CFLAGS]) + ] + ) + + AS_IF([test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"], + [ + AC_DEFINE([OPUS_ARM_MAY_HAVE_NEON_INTR], 1, [Compiler supports ARMv7 Neon Intrinsics]) + intrinsics_support="$intrinsics_support (Neon_Intrinsics)" + + AS_IF([test x"enable_rtcd" != x"" && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"], + [rtcd_support="$rtcd_support (ARMv7_Neon_Intrinsics)"]) + + AS_IF([test x"$OPUS_ARM_PRESUME_NEON_INTR" = x"1"], + [AC_DEFINE([OPUS_ARM_PRESUME_NEON_INTR], 1, [Define if binary requires NEON intrinsics support])]) + + OPUS_PATH_NE10() + AS_IF([test x"$NE10_LIBS" != x""], + [ + intrinsics_support="$intrinsics_support (NE10)" + AS_IF([test x"enable_rtcd" != x"" \ + && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"], + [rtcd_support="$rtcd_support (NE10)"]) + ]) + + AS_IF([test x"$rtcd_support" = x""], + [rtcd_support=no]) + + AS_IF([test x"$intrinsics_support" = x""], + [intrinsics_support=no], + [intrinsics_support="arm$intrinsics_support"]) + ], + [ + AC_MSG_WARN([Compiler does not support ARM intrinsics]) + intrinsics_support=no + ]) + ], + [i?86|x86_64], + [ + OPUS_CHECK_INTRINSICS( + [SSE], + [$X86_SSE_CFLAGS], + [OPUS_X86_MAY_HAVE_SSE], + [OPUS_X86_PRESUME_SSE], + [[#include + ]], + [[ + static __m128 mtest; + mtest = _mm_setzero_ps(); + ]] + ) + AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE" = x"1" && test x"$OPUS_X86_PRESUME_SSE" != x"1"], + [ + OPUS_X86_SSE_CFLAGS="$X86_SSE_CFLAGS" + AC_SUBST([OPUS_X86_SSE_CFLAGS]) + ] + ) + OPUS_CHECK_INTRINSICS( + [SSE2], + [$X86_SSE2_CFLAGS], + [OPUS_X86_MAY_HAVE_SSE2], + [OPUS_X86_PRESUME_SSE2], + [[#include + ]], + [[ + static __m128i mtest; + mtest = _mm_setzero_si128(); + ]] + ) + AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1" && test x"$OPUS_X86_PRESUME_SSE2" != x"1"], + [ + OPUS_X86_SSE2_CFLAGS="$X86_SSE2_CFLAGS" + AC_SUBST([OPUS_X86_SSE2_CFLAGS]) + ] + ) + OPUS_CHECK_INTRINSICS( + [SSE4.1], + [$X86_SSE4_1_CFLAGS], + [OPUS_X86_MAY_HAVE_SSE4_1], + [OPUS_X86_PRESUME_SSE4_1], + [[#include + ]], + [[ + static __m128i mtest; + mtest = _mm_setzero_si128(); + mtest = _mm_cmpeq_epi64(mtest, mtest); + ]] + ) + AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1" && test x"$OPUS_X86_PRESUME_SSE4_1" != x"1"], + [ + OPUS_X86_SSE4_1_CFLAGS="$X86_SSE4_1_CFLAGS" + AC_SUBST([OPUS_X86_SSE4_1_CFLAGS]) + ] + ) + OPUS_CHECK_INTRINSICS( + [AVX], + [$X86_AVX_CFLAGS], + [OPUS_X86_MAY_HAVE_AVX], + [OPUS_X86_PRESUME_AVX], + [[#include + ]], + [[ + static __m256 mtest; + mtest = _mm256_setzero_ps(); + ]] + ) + AS_IF([test x"$OPUS_X86_MAY_HAVE_AVX" = x"1" && test x"$OPUS_X86_PRESUME_AVX" != x"1"], + [ + OPUS_X86_AVX_CFLAGS="$X86_AVX_CFLAGS" + AC_SUBST([OPUS_X86_AVX_CFLAGS]) + ] + ) + AS_IF([test x"$rtcd_support" = x"no"], [rtcd_support=""]) + AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE" = x"1"], + [ + AC_DEFINE([OPUS_X86_MAY_HAVE_SSE], 1, [Compiler supports X86 SSE Intrinsics]) + intrinsics_support="$intrinsics_support SSE" + + AS_IF([test x"$OPUS_X86_PRESUME_SSE" = x"1"], + [AC_DEFINE([OPUS_X86_PRESUME_SSE], 1, [Define if binary requires SSE intrinsics support])], + [rtcd_support="$rtcd_support SSE"]) + ], + [ + AC_MSG_WARN([Compiler does not support SSE intrinsics]) + ]) + + AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1"], + [ + AC_DEFINE([OPUS_X86_MAY_HAVE_SSE2], 1, [Compiler supports X86 SSE2 Intrinsics]) + intrinsics_support="$intrinsics_support SSE2" + + AS_IF([test x"$OPUS_X86_PRESUME_SSE2" = x"1"], + [AC_DEFINE([OPUS_X86_PRESUME_SSE2], 1, [Define if binary requires SSE2 intrinsics support])], + [rtcd_support="$rtcd_support SSE2"]) + ], + [ + AC_MSG_WARN([Compiler does not support SSE2 intrinsics]) + ]) + + AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1"], + [ + AC_DEFINE([OPUS_X86_MAY_HAVE_SSE4_1], 1, [Compiler supports X86 SSE4.1 Intrinsics]) + intrinsics_support="$intrinsics_support SSE4.1" + + AS_IF([test x"$OPUS_X86_PRESUME_SSE4_1" = x"1"], + [AC_DEFINE([OPUS_X86_PRESUME_SSE4_1], 1, [Define if binary requires SSE4.1 intrinsics support])], + [rtcd_support="$rtcd_support SSE4.1"]) + ], + [ + AC_MSG_WARN([Compiler does not support SSE4.1 intrinsics]) + ]) + AS_IF([test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"], + [ + AC_DEFINE([OPUS_X86_MAY_HAVE_AVX], 1, [Compiler supports X86 AVX Intrinsics]) + intrinsics_support="$intrinsics_support AVX" + + AS_IF([test x"$OPUS_X86_PRESUME_AVX" = x"1"], + [AC_DEFINE([OPUS_X86_PRESUME_AVX], 1, [Define if binary requires AVX intrinsics support])], + [rtcd_support="$rtcd_support AVX"]) + ], + [ + AC_MSG_WARN([Compiler does not support AVX intrinsics]) + ]) + + AS_IF([test x"$intrinsics_support" = x""], + [intrinsics_support=no], + [intrinsics_support="x86$intrinsics_support"] + ) + AS_IF([test x"$rtcd_support" = x""], + [rtcd_support=no], + [rtcd_support="x86$rtcd_support"], + ) + + AS_IF([test x"$enable_rtcd" = x"yes" && test x"$rtcd_support" != x""],[ + get_cpuid_by_asm="no" + AC_MSG_CHECKING([How to get X86 CPU Info]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include + ]],[[ + unsigned int CPUInfo0; + unsigned int CPUInfo1; + unsigned int CPUInfo2; + unsigned int CPUInfo3; + unsigned int InfoType; + __asm__ __volatile__ ( + "cpuid": + "=a" (CPUInfo0), + "=b" (CPUInfo1), + "=c" (CPUInfo2), + "=d" (CPUInfo3) : + "a" (InfoType), "c" (0) + ); + ]])], + [get_cpuid_by_asm="yes" + AC_MSG_RESULT([Inline Assembly]) + AC_DEFINE([CPU_INFO_BY_ASM], [1], [Get CPU Info by asm method])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include + ]],[[ + unsigned int CPUInfo0; + unsigned int CPUInfo1; + unsigned int CPUInfo2; + unsigned int CPUInfo3; + unsigned int InfoType; + __get_cpuid(InfoType, &CPUInfo0, &CPUInfo1, &CPUInfo2, &CPUInfo3); + ]])], + [AC_MSG_RESULT([C method]) + AC_DEFINE([CPU_INFO_BY_C], [1], [Get CPU Info by c method])], + [AC_MSG_ERROR([no supported Get CPU Info method, please disable intrinsics])])])]) + ], + [ + AC_MSG_WARN([No intrinsics support for your architecture]) + intrinsics_support="no" + ]) +], +[ + intrinsics_support="no" +]) + +AM_CONDITIONAL([CPU_ARM], [test "$cpu_arm" = "yes"]) +AM_CONDITIONAL([OPUS_ARM_NEON_INTR], + [test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"]) +AM_CONDITIONAL([HAVE_ARM_NE10], + [test x"$HAVE_ARM_NE10" = x"1"]) +AM_CONDITIONAL([HAVE_SSE], + [test x"$OPUS_X86_MAY_HAVE_SSE" = x"1"]) +AM_CONDITIONAL([HAVE_SSE2], + [test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1"]) +AM_CONDITIONAL([HAVE_SSE4_1], + [test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1"]) +AM_CONDITIONAL([HAVE_AVX], + [test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"]) + +AS_IF([test x"$enable_rtcd" = x"yes"],[ + AS_IF([test x"$rtcd_support" != x"no"],[ + AC_DEFINE([OPUS_HAVE_RTCD], [1], + [Use run-time CPU capabilities detection]) + OPUS_HAVE_RTCD=1 + AC_SUBST(OPUS_HAVE_RTCD) + ]) +],[ + rtcd_support="disabled" +]) + +AC_ARG_ENABLE([assertions], + [AS_HELP_STRING([--enable-assertions],[enable additional software error checking])],, + [enable_assertions=no]) + +AS_IF([test "$enable_assertions" = "yes"], [ + AC_DEFINE([ENABLE_ASSERTIONS], [1], [Assertions]) +]) + +AC_ARG_ENABLE([fuzzing], + [AS_HELP_STRING([--enable-fuzzing],[causes the encoder to make random decisions])],, + [enable_fuzzing=no]) + +AS_IF([test "$enable_fuzzing" = "yes"], [ + AC_DEFINE([FUZZING], [1], [Fuzzing]) +]) + +AC_ARG_ENABLE([doc], + [AS_HELP_STRING([--disable-doc], [Do not build API documentation])],, + [enable_doc=yes]) + +AS_IF([test "$enable_doc" = "yes"], [ + AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], [yes], [no]) +],[ + HAVE_DOXYGEN=no +]) + +AM_CONDITIONAL([HAVE_DOXYGEN], [test "$HAVE_DOXYGEN" = "yes"]) + +AC_ARG_ENABLE([extra-programs], + [AS_HELP_STRING([--disable-extra-programs], [Do not build extra programs (demo and tests)])],, + [enable_extra_programs=yes]) + +AM_CONDITIONAL([EXTRA_PROGRAMS], [test "$enable_extra_programs" = "yes"]) + + +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fvisibility=hidden" +AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + [ AC_MSG_RESULT([yes]) ], + [ AC_MSG_RESULT([no]) + CFLAGS="$saved_CFLAGS" + ]) + +CFLAGS="$CFLAGS -W" + +warn_CFLAGS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes" +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $warn_CFLAGS" +AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + [ AC_MSG_RESULT([yes]) ], + [ AC_MSG_RESULT([no]) + CFLAGS="$saved_CFLAGS" + ]) + +saved_LIBS="$LIBS" +LIBS="$LIBS $LIBM" +AC_CHECK_FUNCS([lrintf]) +AC_CHECK_FUNCS([lrint]) +LIBS="$saved_LIBS" + +AC_CHECK_FUNCS([__malloc_hook]) + +AC_SUBST([PC_BUILD]) + +AC_CONFIG_FILES([ + Makefile + opus.pc + opus-uninstalled.pc + celt/arm/armopts.s + doc/Makefile + doc/Doxyfile +]) +AC_CONFIG_HEADERS([config.h]) + +AC_OUTPUT + +AC_MSG_NOTICE([ +------------------------------------------------------------------------ + $PACKAGE_NAME $PACKAGE_VERSION: Automatic configuration OK. + + Compiler support: + + C99 var arrays: ................ ${has_var_arrays} + C99 lrintf: .................... ${ac_cv_func_lrintf} + Use alloca: .................... ${use_alloca} + + General configuration: + + Floating point support: ........ ${enable_float} + Fast float approximations: ..... ${enable_float_approx} + Fixed point debugging: ......... ${enable_fixed_point_debug} + Inline Assembly Optimizations: . ${inline_optimization} + External Assembly Optimizations: ${asm_optimization} + Intrinsics Optimizations.......: ${intrinsics_support} + Run-time CPU detection: ........ ${rtcd_support} + Custom modes: .................. ${enable_custom_modes} + Assertion checking: ............ ${enable_assertions} + Fuzzing: ....................... ${enable_fuzzing} + + API documentation: ............. ${enable_doc} + Extra programs: ................ ${enable_extra_programs} +------------------------------------------------------------------------ + + Type "make; make install" to compile and install + Type "make check" to run the test suite +]) + diff --git a/asm/libs/opus/doc/Doxyfile.in b/asm/libs/opus/doc/Doxyfile.in new file mode 100644 index 00000000..0c016f32 --- /dev/null +++ b/asm/libs/opus/doc/Doxyfile.in @@ -0,0 +1,1724 @@ +# Doxyfile 1.7.4 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = Opus + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = @VERSION@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "Opus audio codec (RFC 6716): API and operations manual" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = @top_srcdir@/include/opus.h \ + @top_srcdir@/include/opus_types.h \ + @top_srcdir@/include/opus_defines.h \ + @top_srcdir@/include/opus_multistream.h \ + @top_srcdir@/include/opus_custom.h + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is advised to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = @top_srcdir@/doc/header.html + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = @top_srcdir@/doc/footer.html + +# If the HTML_TIMESTAMP tag is set to YES then the generated HTML documentation will contain the timesstamp. + +HTML_TIMESTAMP = NO + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = @top_srcdir@/doc/customdoxygen.css + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = @top_srcdir@/doc/opus_logo.svg + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 0 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = letter + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = YES + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = YES + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = OPUS_EXPORT= OPUS_CUSTOM_EXPORT= OPUS_CUSTOM_EXPORT_STATIC= OPUS_WARN_UNUSED_RESULT= OPUS_ARG_NONNULL(_x)= + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/asm/libs/opus/doc/Makefile.am b/asm/libs/opus/doc/Makefile.am new file mode 100644 index 00000000..296c4dd8 --- /dev/null +++ b/asm/libs/opus/doc/Makefile.am @@ -0,0 +1,44 @@ +## Process this file with automake to produce Makefile.in + +DOCINPUTS = $(top_srcdir)/include/opus.h \ + $(top_srcdir)/include/opus_multistream.h \ + $(top_srcdir)/include/opus_defines.h \ + $(top_srcdir)/include/opus_types.h \ + $(top_srcdir)/include/opus_custom.h \ + $(top_srcdir)/doc/header.html \ + $(top_srcdir)/doc/footer.html \ + $(top_srcdir)/doc/customdoxygen.css + +EXTRA_DIST = customdoxygen.css Doxyfile.in footer.html header.html \ + opus_logo.svg trivial_example.c + + +if HAVE_DOXYGEN + +all-local: doxygen-build.stamp + +doxygen-build.stamp: Doxyfile $(DOCINPUTS) + doxygen + touch $@ + +install-data-local: + $(INSTALL) -d $(DESTDIR)$(docdir)/html/search + for f in `find html -type f \! -name "installdox"`; do \ + $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \ + done + + $(INSTALL) -d $(DESTDIR)$(mandir)/man3 + cd man && find man3 -type f -name opus_*.3 \ + -exec $(INSTALL_DATA) \{} $(DESTDIR)$(mandir)/man3 \; + +clean-local: + $(RM) -r html + $(RM) -r latex + $(RM) -r man + $(RM) doxygen-build.stamp + +uninstall-local: + $(RM) -r $(DESTDIR)$(docdir)/html + $(RM) $(DESTDIR)$(mandir)/man3/opus_*.3 $(DESTDIR)$(mandir)/man3/opus.h.3 + +endif diff --git a/asm/libs/opus/doc/build_draft.sh b/asm/libs/opus/doc/build_draft.sh new file mode 100755 index 00000000..d15b22a7 --- /dev/null +++ b/asm/libs/opus/doc/build_draft.sh @@ -0,0 +1,104 @@ +#!/bin/sh + +# Copyright (c) 2011-2012 Xiph.Org Foundation and Mozilla Corporation +# +# This file is extracted from RFC6716. Please see that RFC for additional +# information. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# - Neither the name of Internet Society, IETF or IETF Trust, nor the +# names of specific contributors, may be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#Stop on errors +set -e +#Set the CWD to the location of this script +[ -n "${0%/*}" ] && cd "${0%/*}" + +toplevel=".." +destdir="opus_source" + +echo packaging source code +rm -rf "${destdir}" +mkdir "${destdir}" +mkdir "${destdir}/src" +mkdir "${destdir}/silk" +mkdir "${destdir}/silk/float" +mkdir "${destdir}/silk/fixed" +mkdir "${destdir}/celt" +mkdir "${destdir}/include" +for f in `cat "${toplevel}"/opus_sources.mk "${toplevel}"/celt_sources.mk \ + "${toplevel}"/silk_sources.mk "${toplevel}"/opus_headers.mk \ + "${toplevel}"/celt_headers.mk "${toplevel}"/silk_headers.mk \ + | grep '\.[ch]' | sed -e 's/^.*=//' -e 's/\\\\//'` ; do + cp -a "${toplevel}/${f}" "${destdir}/${f}" +done +cp -a "${toplevel}"/src/opus_demo.c "${destdir}"/src/ +cp -a "${toplevel}"/src/opus_compare.c "${destdir}"/src/ +cp -a "${toplevel}"/celt/opus_custom_demo.c "${destdir}"/celt/ +cp -a "${toplevel}"/Makefile.unix "${destdir}"/Makefile +cp -a "${toplevel}"/opus_sources.mk "${destdir}"/ +cp -a "${toplevel}"/celt_sources.mk "${destdir}"/ +cp -a "${toplevel}"/silk_sources.mk "${destdir}"/ +cp -a "${toplevel}"/README.draft "${destdir}"/README +cp -a "${toplevel}"/COPYING "${destdir}"/COPYING +cp -a "${toplevel}"/tests/run_vectors.sh "${destdir}"/ + +GZIP=-9 tar --owner=root --group=root --format=v7 -czf opus_source.tar.gz "${destdir}" +echo building base64 version +cat opus_source.tar.gz| base64 | tr -d '\n' | fold -w 64 | \ + sed -e 's/^/\###/' -e 's/$/\<\/spanx\>\/' > \ + opus_source.base64 + + +#echo '
' > opus_compare_escaped.c +#echo '' >> opus_compare_escaped.c +#echo '> opus_compare_escaped.c +#cat opus_compare.c >> opus_compare_escaped.c +#echo ']]>' >> opus_compare_escaped.c +#echo '' >> opus_compare_escaped.c +#echo '
' >> opus_compare_escaped.c + +if [[ ! -d ../opus_testvectors ]] ; then + echo "Downloading test vectors..." + wget 'http://opus-codec.org/testvectors/opus_testvectors.tar.gz' + tar -C .. -xvzf opus_testvectors.tar.gz +fi +echo '
' > testvectors_sha1 +echo '' >> testvectors_sha1 +echo '> testvectors_sha1 +(cd ../opus_testvectors; sha1sum *.bit *.dec) >> testvectors_sha1 +#cd opus_testvectors +#sha1sum *.bit *.dec >> ../testvectors_sha1 +#cd .. +echo ']]>' >> testvectors_sha1 +echo '' >> testvectors_sha1 +echo '
' >> testvectors_sha1 + +echo running xml2rfc +xml2rfc draft-ietf-codec-opus.xml draft-ietf-codec-opus.html & +xml2rfc draft-ietf-codec-opus.xml +wait diff --git a/asm/libs/opus/doc/build_isobmff.sh b/asm/libs/opus/doc/build_isobmff.sh new file mode 100755 index 00000000..95ea202e --- /dev/null +++ b/asm/libs/opus/doc/build_isobmff.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +# Copyright (c) 2014 Xiph.Org Foundation and Mozilla Foundation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#Stop on errors +set -e +#Set the CWD to the location of this script +[ -n "${0%/*}" ] && cd "${0%/*}" + +HTML=opus_in_isobmff.html + +echo downloading updates... +CSS=${HTML%%.html}.css +wget -q http://vfrmaniac.fushizen.eu/contents/${HTML} -O ${HTML} +wget -q http://vfrmaniac.fushizen.eu/style.css -O ${CSS} + +echo updating links... +cat ${HTML} | sed -e "s/\\.\\.\\/style.css/${CSS}/" > ${HTML}+ && mv ${HTML}+ ${HTML} + +echo stripping... +cat ${HTML} | sed -e 's///g' > ${HTML}+ && mv ${HTML}+ ${HTML} +cat ${HTML} | sed -e 's/ *$//g' > ${HTML}+ && mv ${HTML}+ ${HTML} +cat ${CSS} | sed -e 's/ *$//g' > ${CSS}+ && mv ${CSS}+ ${CSS} + + +VERSION=$(fgrep Version ${HTML} | sed 's/.*Version \([0-9]\.[0-9]\.[0-9]\).*/\1/') +echo Now at version ${VERSION} diff --git a/asm/libs/opus/doc/build_oggdraft.sh b/asm/libs/opus/doc/build_oggdraft.sh new file mode 100755 index 00000000..30ee534b --- /dev/null +++ b/asm/libs/opus/doc/build_oggdraft.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +# Copyright (c) 2012 Xiph.Org Foundation and Mozilla Corporation +# +# This file is extracted from RFC6716. Please see that RFC for additional +# information. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# - Neither the name of Internet Society, IETF or IETF Trust, nor the +# names of specific contributors, may be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#Stop on errors +set -e +#Set the CWD to the location of this script +[ -n "${0%/*}" ] && cd "${0%/*}" + +if test -z `which xml2rfc 2> /dev/null`; then + echo "Error: couldn't find xml2rfc." + echo + echo "Please install xml2rfc version 2 or later." + echo "E.g. 'pip install xml2rfc' or follow the instructions" + echo "on http://pypi.python.org/pypi/xml2rfc/ or tools.ietf.org." + exit 1 +fi + +echo running xml2rfc +# version 2 syntax +xml2rfc draft-ietf-codec-oggopus.xml --text --html diff --git a/asm/libs/opus/doc/customdoxygen.css b/asm/libs/opus/doc/customdoxygen.css new file mode 100644 index 00000000..70047787 --- /dev/null +++ b/asm/libs/opus/doc/customdoxygen.css @@ -0,0 +1,1011 @@ +/* The standard CSS for doxygen */ + +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 13px; + line-height: 1.3; +} + +/* @group Heading Levels */ + +h1 { + font-size: 150%; +} + +.title { + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2 { + font-size: 120%; +} + +h3 { + font-size: 100%; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #F1F1F1; + border: 1px solid #BDBDBD; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #646464; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #747474; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #B8B8B8; + color: #ffffff; + border: 1px double #A8A8A8; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +.fragment { + font-family: monospace, fixed; + font-size: 105%; +} + +pre.fragment { + border: 1px solid #D5D5D5; + background-color: #FCFCFC; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 8px; + margin-right: 8px; +} + +td.indexkey { + background-color: #F1F1F1; + font-weight: bold; + border: 1px solid #D5D5D5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #F1F1F1; + border: 1px solid #D5D5D5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #F2F2F2; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F9F9F9; + border-left: 2px solid #B8B8B8; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #BDBDBD; +} + +th.dirtab { + background: #F1F1F1; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #7A7A7A; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #FAFAFA; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-top: 1px solid #D5D5D5; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #747474; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #747474; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #F1F1F1; + border: 1px solid #BDBDBD; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; +} + +.memname { + white-space: nowrap; + font-weight: bold; + margin-left: 6px; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #C0C0C0; + border-left: 1px solid #C0C0C0; + border-right: 1px solid #C0C0C0; + padding: 6px 0px 6px 0px; + color: #3D3D3D; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 8px; + border-top-left-radius: 8px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #EAEAEA; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #C0C0C0; + border-left: 1px solid #C0C0C0; + border-right: 1px solid #C0C0C0; + padding: 2px 5px; + background-color: #FCFCFC; + border-top-width: 0; + /* opera specific markup */ + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F9F9F9 95%, #F2F2F2); + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F9F9F9), to(#F2F2F2)); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} + +.params, .retval, .exception, .tparams { + border-spacing: 6px 2px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + + + + +/* @end */ + +/* @group Directory (tree) */ + +/* for the tree view */ + +.ftvtree { + font-family: sans-serif; + margin: 0px; +} + +/* these are for tree view when used as main index */ + +.directory { + font-size: 9pt; + font-weight: bold; + margin: 5px; +} + +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* +The following two styles can be used to replace the root node title +with an image of your choice. Simply uncomment the next two styles, +specify the name of your image and be sure to set 'height' to the +proper pixel height of your image. +*/ + +/* +.directory h3.swap { + height: 61px; + background-repeat: no-repeat; + background-image: url("yourimage.gif"); +} +.directory h3.swap span { + display: none; +} +*/ + +.directory > h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; +} + +address { + font-style: normal; + color: #464646; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #4A4A4A; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #5B5B5B; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + width: 100%; + margin-bottom: 10px; + border: 1px solid #C0C0C0; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #C0C0C0; + border-bottom: 1px solid #C0C0C0; + vertical-align: top; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #C0C0C0; + width: 100%; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #EAEAEA; + font-size: 90%; + color: #3D3D3D; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #C0C0C0; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + height:30px; + line-height:30px; + color:#ABABAB; + border:solid 1px #D3D3D3; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#595959; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; +} + +.navpath li.navelem a:hover +{ + color:#929292; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#595959; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + margin-left: 5px; + font-size: 8pt; + padding-left: 5px; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #FAFAFA; + margin: 0px; + border-bottom: 1px solid #D5D5D5; +} + +div.headertitle +{ + padding: 5px 5px 5px 7px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + border-left:4px solid; + padding: 0 0 0 6px; +} + +dl.note +{ + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + border-color: #00D000; +} + +dl.deprecated +{ + border-color: #505050; +} + +dl.todo +{ + border-color: #00C0E0; +} + +dl.test +{ + border-color: #3030E0; +} + +dl.bug +{ + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 100% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #848484; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #AFAFAF; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#545454; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F7F7F7; + border: 1px solid #E3E3E3; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #747474; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } + pre.fragment + { + overflow: visible; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + } +} diff --git a/asm/libs/opus/doc/draft-ietf-codec-oggopus.xml b/asm/libs/opus/doc/draft-ietf-codec-oggopus.xml new file mode 100644 index 00000000..7489c201 --- /dev/null +++ b/asm/libs/opus/doc/draft-ietf-codec-oggopus.xml @@ -0,0 +1,1751 @@ + + + + + + + + + + + +]> + + + + + +Ogg Encapsulation for the Opus Audio Codec + +Mozilla Corporation +
+ +650 Castro Street +Mountain View +CA +94041 +USA + ++1 650 903-0800 +tterribe@xiph.org +
+
+ + +Voicetronix +
+ +246 Pulteney Street, Level 1 +Adelaide +SA +5000 +Australia + ++61 8 8232 9112 +ron@debian.org +
+
+ + +Mozilla Corporation +
+ +163 West Hastings Street +Vancouver +BC +V6B 1H5 +Canada + ++1 778 785 1540 +giles@xiph.org +
+
+ + +RAI +codec + + + +This document defines the Ogg encapsulation for the Opus interactive speech and + audio codec. +This allows data encoded in the Opus format to be stored in an Ogg logical + bitstream. + + +
+ + +
+ +The IETF Opus codec is a low-latency audio codec optimized for both voice and + general-purpose audio. +See for technical details. +This document defines the encapsulation of Opus in a continuous, logical Ogg + bitstream . +Ogg encapsulation provides Opus with a long-term storage format supporting + all of the essential features, including metadata, fast and accurate seeking, + corruption detection, recapture after errors, low overhead, and the ability to + multiplex Opus with other codecs (including video) with minimal buffering. +It also provides a live streamable format, capable of delivery over a reliable + stream-oriented transport, without requiring all the data, or even the total + length of the data, up-front, in a form that is identical to the on-disk + storage format. + + +Ogg bitstreams are made up of a series of 'pages', each of which contains data + from one or more 'packets'. +Pages are the fundamental unit of multiplexing in an Ogg stream. +Each page is associated with a particular logical stream and contains a capture + pattern and checksum, flags to mark the beginning and end of the logical + stream, and a 'granule position' that represents an absolute position in the + stream, to aid seeking. +A single page can contain up to 65,025 octets of packet data from up to 255 + different packets. +Packets can be split arbitrarily across pages, and continued from one page to + the next (allowing packets much larger than would fit on a single page). +Each page contains 'lacing values' that indicate how the data is partitioned + into packets, allowing a demultiplexer (demuxer) to recover the packet + boundaries without examining the encoded data. +A packet is said to 'complete' on a page when the page contains the final + lacing value corresponding to that packet. + + +This encapsulation defines the contents of the packet data, including + the necessary headers, the organization of those packets into a logical + stream, and the interpretation of the codec-specific granule position field. +It does not attempt to describe or specify the existing Ogg container format. +Readers unfamiliar with the basic concepts mentioned above are encouraged to + review the details in . + + +
+ +
+ +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", + "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this + document are to be interpreted as described in . + + +
+ +
+ +An Ogg Opus stream is organized as follows. + + +There are two mandatory header packets. +The first packet in the logical Ogg bitstream MUST contain the identification + (ID) header, which uniquely identifies a stream as Opus audio. +The format of this header is defined in . +It is placed alone (without any other packet data) on the first page of + the logical Ogg bitstream, and completes on that page. +This page has its 'beginning of stream' flag set. + + +The second packet in the logical Ogg bitstream MUST contain the comment header, + which contains user-supplied metadata. +The format of this header is defined in . +It MAY span multiple pages, beginning on the second page of the logical + stream. +However many pages it spans, the comment header packet MUST finish the page on + which it completes. + + +All subsequent pages are audio data pages, and the Ogg packets they contain are + audio data packets. +Each audio data packet contains one Opus packet for each of N different + streams, where N is typically one for mono or stereo, but MAY be greater than + one for multichannel audio. +The value N is specified in the ID header (see + ), and is fixed over the entire length of the + logical Ogg bitstream. + + +The first (N - 1) Opus packets, if any, are packed one after another + into the Ogg packet, using the self-delimiting framing from Appendix B of + . +The remaining Opus packet is packed at the end of the Ogg packet using the + regular, undelimited framing from Section 3 of . +All of the Opus packets in a single Ogg packet MUST be constrained to have the + same duration. +An implementation of this specification SHOULD treat any Opus packet whose + duration is different from that of the first Opus packet in an Ogg packet as + if it were a malformed Opus packet with an invalid Table Of Contents (TOC) + sequence. + + +The TOC sequence at the beginning of each Opus packet indicates the coding + mode, audio bandwidth, channel count, duration (frame size), and number of + frames per packet, as described in Section 3.1 + of . +The coding mode is one of SILK, Hybrid, or Constrained Energy Lapped Transform + (CELT). +The combination of coding mode, audio bandwidth, and frame size is referred to + as the configuration of an Opus packet. + + +Packets are placed into Ogg pages in order until the end of stream. +Audio data packets might span page boundaries. +The first audio data page could have the 'continued packet' flag set + (indicating the first audio data packet is continued from a previous page) if, + for example, it was a live stream joined mid-broadcast, with the headers + pasted on the front. +A demuxer SHOULD NOT attempt to decode the data for the first packet on a page + with the 'continued packet' flag set if the previous page with packet data + does not end in a continued packet (i.e., did not end with a lacing value of + 255) or if the page sequence numbers are not consecutive, unless the demuxer + has some special knowledge that would allow it to interpret this data + despite the missing pieces. +An implementation MUST treat a zero-octet audio data packet as if it were a + malformed Opus packet as described in + Section 3.4 of . + + +A logical stream ends with a page with the 'end of stream' flag set, but + implementations need to be prepared to deal with truncated streams that do not + have a page marked 'end of stream'. +There is no reason for the final packet on the last page to be a continued + packet, i.e., for the final lacing value to be less than 255. +However, demuxers might encounter such streams, possibly as the result of a + transfer that did not complete or of corruption. +A demuxer SHOULD NOT attempt to decode the data from a packet that continues + onto a subsequent page (i.e., when the page ends with a lacing value of 255) + if the next page with packet data does not have the 'continued packet' flag + set or does not exist, or if the page sequence numbers are not consecutive, + unless the demuxer has some special knowledge that would allow it to interpret + this data despite the missing pieces. +There MUST NOT be any more pages in an Opus logical bitstream after a page + marked 'end of stream'. + +
+ +
+ +The granule position MUST be zero for the ID header page and the + page where the comment header completes. +That is, the first page in the logical stream, and the last header + page before the first audio data page both have a granule position of zero. + + +The granule position of an audio data page encodes the total number of PCM + samples in the stream up to and including the last fully-decodable sample from + the last packet completed on that page. +The granule position of the first audio data page will usually be larger than + zero, as described in . + + + +A page that is entirely spanned by a single packet (that completes on a + subsequent page) has no granule position, and the granule position field is + set to the special value '-1' in two's complement. + + + +The granule position of an audio data page is in units of PCM audio samples at + a fixed rate of 48 kHz (per channel; a stereo stream's granule position + does not increment at twice the speed of a mono stream). +It is possible to run an Opus decoder at other sampling rates, but the value + in the granule position field always counts samples assuming a 48 kHz + decoding rate, and the rest of this specification makes the same assumption. + + + +The duration of an Opus packet can be any multiple of 2.5 ms, up to a + maximum of 120 ms. +This duration is encoded in the TOC sequence at the beginning of each packet. +The number of samples returned by a decoder corresponds to this duration + exactly, even for the first few packets. +For example, a 20 ms packet fed to a decoder running at 48 kHz will + always return 960 samples. +A demuxer can parse the TOC sequence at the beginning of each Ogg packet to + work backwards or forwards from a packet with a known granule position (i.e., + the last packet completed on some page) in order to assign granule positions + to every packet, or even every individual sample. +The one exception is the last page in the stream, as described below. + + + +All other pages with completed packets after the first MUST have a granule + position equal to the number of samples contained in packets that complete on + that page plus the granule position of the most recent page with completed + packets. +This guarantees that a demuxer can assign individual packets the same granule + position when working forwards as when working backwards. +For this to work, there cannot be any gaps. + + +
+ +In order to support capturing a real-time stream that has lost or not + transmitted packets, a multiplexer (muxer) SHOULD emit packets that explicitly + request the use of Packet Loss Concealment (PLC) in place of the missing + packets. +Implementations that fail to do so still MUST NOT increment the granule + position for a page by anything other than the number of samples contained in + packets that actually complete on that page. + + +Only gaps that are a multiple of 2.5 ms are repairable, as these are the + only durations that can be created by packet loss or discontinuous + transmission. +Muxers need not handle other gap sizes. +Creating the necessary packets involves synthesizing a TOC byte (defined in +Section 3.1 of )—and whatever + additional internal framing is needed—to indicate the packet duration + for each stream. +The actual length of each missing Opus frame inside the packet is zero bytes, + as defined in Section 3.2.1 of . + + + +Zero-byte frames MAY be packed into packets using any of codes 0, 1, + 2, or 3. +When successive frames have the same configuration, the higher code packings + reduce overhead. +Likewise, if the TOC configuration matches, the muxer MAY further combine the + empty frames with previous or subsequent non-zero-length frames (using + code 2 or VBR code 3). + + + + does not impose any requirements on the PLC, but this + section outlines choices that are expected to have a positive influence on + most PLC implementations, including the reference implementation. +Synthesized TOC sequences SHOULD maintain the same mode, audio bandwidth, + channel count, and frame size as the previous packet (if any). +This is the simplest and usually the most well-tested case for the PLC to + handle and it covers all losses that do not include a configuration switch, + as defined in Section 4.5 of . + + + +When a previous packet is available, keeping the audio bandwidth and channel + count the same allows the PLC to provide maximum continuity in the concealment + data it generates. +However, if the size of the gap is not a multiple of the most recent frame + size, then the frame size will have to change for at least some frames. +Such changes SHOULD be delayed as long as possible to simplify + things for PLC implementations. + + + +As an example, a 95 ms gap could be encoded as nineteen 5 ms frames + in two bytes with a single CBR code 3 packet. +If the previous frame size was 20 ms, using four 20 ms frames + followed by three 5 ms frames requires 4 bytes (plus an extra byte + of Ogg lacing overhead), but allows the PLC to use its well-tested steady + state behavior for as long as possible. +The total bitrate of the latter approach, including Ogg overhead, is about + 0.4 kbps, so the impact on file size is minimal. + + + +Changing modes is discouraged, since this causes some decoder implementations + to reset their PLC state. +However, SILK and Hybrid mode frames cannot fill gaps that are not a multiple + of 10 ms. +If switching to CELT mode is needed to match the gap size, a muxer SHOULD do + so at the end of the gap to allow the PLC to function for as long as possible. + + + +In the example above, if the previous frame was a 20 ms SILK mode frame, + the better solution is to synthesize a packet describing four 20 ms SILK + frames, followed by a packet with a single 10 ms SILK + frame, and finally a packet with a 5 ms CELT frame, to fill the 95 ms + gap. +This also requires four bytes to describe the synthesized packet data (two + bytes for a CBR code 3 and one byte each for two code 0 packets) but three + bytes of Ogg lacing overhead are needed to mark the packet boundaries. +At 0.6 kbps, this is still a minimal bitrate impact over a naive, low quality + solution. + + + +Since medium-band audio is an option only in the SILK mode, wideband frames + SHOULD be generated if switching from that configuration to CELT mode, to + ensure that any PLC implementation which does try to migrate state between + the modes will be able to preserve all of the available audio bandwidth. + + +
+ +
+ +There is some amount of latency introduced during the decoding process, to + allow for overlap in the CELT mode, stereo mixing in the SILK mode, and + resampling. +The encoder might have introduced additional latency through its own resampling + and analysis (though the exact amount is not specified). +Therefore, the first few samples produced by the decoder do not correspond to + real input audio, but are instead composed of padding inserted by the encoder + to compensate for this latency. +These samples need to be stored and decoded, as Opus is an asymptotically + convergent predictive codec, meaning the decoded contents of each frame depend + on the recent history of decoder inputs. +However, a player will want to skip these samples after decoding them. + + + +A 'pre-skip' field in the ID header (see ) signals + the number of samples that SHOULD be skipped (decoded but discarded) at the + beginning of the stream, though some specific applications might have a reason + for looking at that data. +This amount need not be a multiple of 2.5 ms, MAY be smaller than a single + packet, or MAY span the contents of several packets. +These samples are not valid audio. + + + +For example, if the first Opus frame uses the CELT mode, it will always + produce 120 samples of windowed overlap-add data. +However, the overlap data is initially all zeros (since there is no prior + frame), meaning this cannot, in general, accurately represent the original + audio. +The SILK mode requires additional delay to account for its analysis and + resampling latency. +The encoder delays the original audio to avoid this problem. + + + +The pre-skip field MAY also be used to perform sample-accurate cropping of + already encoded streams. +In this case, a value of at least 3840 samples (80 ms) provides + sufficient history to the decoder that it will have converged + before the stream's output begins. + + +
+ +
+ +The PCM sample position is determined from the granule position using the + formula + +
+ +
+ + +For example, if the granule position of the first audio data page is 59,971, + and the pre-skip is 11,971, then the PCM sample position of the last decoded + sample from that page is 48,000. + + +This can be converted into a playback time using the formula + +
+ +
+ + +The initial PCM sample position before any samples are played is normally '0'. +In this case, the PCM sample position of the first audio sample to be played + starts at '1', because it marks the time on the clock + after that sample has been played, and a stream + that is exactly one second long has a final PCM sample position of '48000', + as in the example here. + + + +Vorbis streams use a granule position smaller than the number of audio samples + contained in the first audio data page to indicate that some of those samples + are trimmed from the output (see ). +However, to do so, Vorbis requires that the first audio data page contains + exactly two packets, in order to allow the decoder to perform PCM position + adjustments before needing to return any PCM data. +Opus uses the pre-skip mechanism for this purpose instead, since the encoder + might introduce more than a single packet's worth of latency, and since very + large packets in streams with a very large number of channels might not fit + on a single page. + +
+ +
+ +The page with the 'end of stream' flag set MAY have a granule position that + indicates the page contains less audio data than would normally be returned by + decoding up through the final packet. +This is used to end the stream somewhere other than an even frame boundary. +The granule position of the most recent audio data page with completed packets + is used to make this determination, or '0' is used if there were no previous + audio data pages with a completed packet. +The difference between these granule positions indicates how many samples to + keep after decoding the packets that completed on the final page. +The remaining samples are discarded. +The number of discarded samples SHOULD be no larger than the number decoded + from the last packet. + +
+ +
+ +The granule position of the first audio data page with a completed packet MAY + be larger than the number of samples contained in packets that complete on + that page, however it MUST NOT be smaller, unless that page has the 'end of + stream' flag set. +Allowing a granule position larger than the number of samples allows the + beginning of a stream to be cropped or a live stream to be joined without + rewriting the granule position of all the remaining pages. +This means that the PCM sample position just before the first sample to be + played MAY be larger than '0'. +Synchronization when multiplexing with other logical streams still uses the PCM + sample position relative to '0' to compute sample times. +This does not affect the behavior of pre-skip: exactly 'pre-skip' samples + SHOULD be skipped from the beginning of the decoded output, even if the + initial PCM sample position is greater than zero. + + + +On the other hand, a granule position that is smaller than the number of + decoded samples prevents a demuxer from working backwards to assign each + packet or each individual sample a valid granule position, since granule + positions are non-negative. +An implementation MUST reject as invalid any stream where the granule position + is smaller than the number of samples contained in packets that complete on + the first audio data page with a completed packet, unless that page has the + 'end of stream' flag set. +It MAY defer this action until it decodes the last packet completed on that + page. + + + +If that page has the 'end of stream' flag set, a demuxer MUST reject as invalid + any stream where its granule position is smaller than the 'pre-skip' amount. +This would indicate that there are more samples to be skipped from the initial + decoded output than exist in the stream. +If the granule position is smaller than the number of decoded samples produced + by the packets that complete on that page, then a demuxer MUST use an initial + granule position of '0', and can work forwards from '0' to timestamp + individual packets. +If the granule position is larger than the number of decoded samples available, + then the demuxer MUST still work backwards as described above, even if the + 'end of stream' flag is set, to determine the initial granule position, and + thus the initial PCM sample position. +Both of these will be greater than '0' in this case. + +
+ +
+ +Seeking in Ogg files is best performed using a bisection search for a page + whose granule position corresponds to a PCM position at or before the seek + target. +With appropriately weighted bisection, accurate seeking can be performed in + just one or two bisections on average, even in multi-gigabyte files. +See for an example of general implementation guidance. + + + +When seeking within an Ogg Opus stream, an implementation SHOULD start decoding + (and discarding the output) at least 3840 samples (80 ms) prior to + the seek target in order to ensure that the output audio is correct by the + time it reaches the seek target. +This 'pre-roll' is separate from, and unrelated to, the 'pre-skip' used at the + beginning of the stream. +If the point 80 ms prior to the seek target comes before the initial PCM + sample position, an implementation SHOULD start decoding from the beginning of + the stream, applying pre-skip as normal, regardless of whether the pre-skip is + larger or smaller than 80 ms, and then continue to discard samples + to reach the seek target (if any). + +
+ +
+ +
+ +An Ogg Opus logical stream contains exactly two mandatory header packets: + an identification header and a comment header. + + +
+ +
+ +
+ + +The fields in the identification (ID) header have the following meaning: + +Magic Signature: + +This is an 8-octet (64-bit) field that allows codec identification and is + human-readable. +It contains, in order, the magic numbers: + +0x4F 'O' +0x70 'p' +0x75 'u' +0x73 's' +0x48 'H' +0x65 'e' +0x61 'a' +0x64 'd' + +Starting with "Op" helps distinguish it from audio data packets, as this is an + invalid TOC sequence. + + +Version (8 bits, unsigned): + +The version number MUST always be '1' for this version of the encapsulation + specification. +Implementations SHOULD treat streams where the upper four bits of the version + number match that of a recognized specification as backwards-compatible with + that specification. +That is, the version number can be split into "major" and "minor" version + sub-fields, with changes to the "minor" sub-field (in the lower four bits) + signaling compatible changes. +For example, an implementation of this specification SHOULD accept any stream + with a version number of '15' or less, and SHOULD assume any stream with a + version number '16' or greater is incompatible. +The initial version '1' was chosen to keep implementations from relying on this + octet as a null terminator for the "OpusHead" string. + + +Output Channel Count 'C' (8 bits, unsigned): + +This is the number of output channels. +This might be different than the number of encoded channels, which can change + on a packet-by-packet basis. +This value MUST NOT be zero. +The maximum allowable value depends on the channel mapping family, and might be + as large as 255. +See for details. + + +Pre-skip (16 bits, unsigned, little + endian): + +This is the number of samples (at 48 kHz) to discard from the decoder + output when starting playback, and also the number to subtract from a page's + granule position to calculate its PCM sample position. +When cropping the beginning of existing Ogg Opus streams, a pre-skip of at + least 3,840 samples (80 ms) is RECOMMENDED to ensure complete + convergence in the decoder. + + +Input Sample Rate (32 bits, unsigned, little + endian): + +This is the sample rate of the original input (before encoding), in Hz. +This field is not the sample rate to use for + playback of the encoded data. + +Opus can switch between internal audio bandwidths of 4, 6, 8, 12, and + 20 kHz. +Each packet in the stream can have a different audio bandwidth. +Regardless of the audio bandwidth, the reference decoder supports decoding any + stream at a sample rate of 8, 12, 16, 24, or 48 kHz. +The original sample rate of the audio passed to the encoder is not preserved + by the lossy compression. + +An Ogg Opus player SHOULD select the playback sample rate according to the + following procedure: + +If the hardware supports 48 kHz playback, decode at 48 kHz. +Otherwise, if the hardware's highest available sample rate is a supported + rate, decode at this sample rate. +Otherwise, if the hardware's highest available sample rate is less than + 48 kHz, decode at the next higher Opus supported rate above the highest + available hardware rate and resample. +Otherwise, decode at 48 kHz and resample. + +However, the 'Input Sample Rate' field allows the muxer to pass the sample + rate of the original input stream as metadata. +This is useful when the user requires the output sample rate to match the + input sample rate. +For example, when not playing the output, an implementation writing PCM format + samples to disk might choose to resample the audio back to the original input + sample rate to reduce surprise to the user, who might reasonably expect to get + back a file with the same sample rate. + +A value of zero indicates 'unspecified'. +Muxers SHOULD write the actual input sample rate or zero, but implementations + which do something with this field SHOULD take care to behave sanely if given + crazy values (e.g., do not actually upsample the output to 10 MHz if + requested). +Implementations SHOULD support input sample rates between 8 kHz and + 192 kHz (inclusive). +Rates outside this range MAY be ignored by falling back to the default rate of + 48 kHz instead. + + +Output Gain (16 bits, signed, little endian): + +This is a gain to be applied when decoding. +It is 20*log10 of the factor by which to scale the decoder output to achieve + the desired playback volume, stored in a 16-bit, signed, two's complement + fixed-point value with 8 fractional bits (i.e., Q7.8). + +To apply the gain, an implementation could use +
+ +
+ where output_gain is the raw 16-bit value from the header. + +Players and media frameworks SHOULD apply it by default. +If a player chooses to apply any volume adjustment or gain modification, such + as the R128_TRACK_GAIN (see ), the adjustment + MUST be applied in addition to this output gain in order to achieve playback + at the normalized volume. + +A muxer SHOULD set this field to zero, and instead apply any gain prior to + encoding, when this is possible and does not conflict with the user's wishes. +A nonzero output gain indicates the gain was adjusted after encoding, or that + a user wished to adjust the gain for playback while preserving the ability + to recover the original signal amplitude. + +Although the output gain has enormous range (+/- 128 dB, enough to amplify + inaudible sounds to the threshold of physical pain), most applications can + only reasonably use a small portion of this range around zero. +The large range serves in part to ensure that gain can always be losslessly + transferred between OpusHead and R128 gain tags (see below) without + saturating. + +
+Channel Mapping Family (8 bits, unsigned): + +This octet indicates the order and semantic meaning of the output channels. + +Each currently specified value of this octet indicates a mapping family, which + defines a set of allowed channel counts, and the ordered set of channel names + for each allowed channel count. +The details are described in . + +Channel Mapping Table: +This table defines the mapping from encoded streams to output channels. +Its contents are specified in . + +
+
+ + +All fields in the ID headers are REQUIRED, except for the channel mapping + table, which MUST be omitted when the channel mapping family is 0, but + is REQUIRED otherwise. +Implementations SHOULD reject streams with ID headers that do not contain + enough data for these fields, even if they contain a valid Magic Signature. +Future versions of this specification, even backwards-compatible versions, + might include additional fields in the ID header. +If an ID header has a compatible major version, but a larger minor version, + an implementation MUST NOT reject it for containing additional data not + specified here, provided it still completes on the first page. + + +
+ +An Ogg Opus stream allows mapping one number of Opus streams (N) to a possibly + larger number of decoded channels (M + N) to yet another number of + output channels (C), which might be larger or smaller than the number of + decoded channels. +The order and meaning of these channels are defined by a channel mapping, + which consists of the 'channel mapping family' octet and, for channel mapping + families other than family 0, a channel mapping table, as illustrated in + . + + +
+ +
+ + +The fields in the channel mapping table have the following meaning: + +Stream Count 'N' (8 bits, unsigned): + +This is the total number of streams encoded in each Ogg packet. +This value is necessary to correctly parse the packed Opus packets inside an + Ogg packet, as described in . +This value MUST NOT be zero, as without at least one Opus packet with a valid + TOC sequence, a demuxer cannot recover the duration of an Ogg packet. + +For channel mapping family 0, this value defaults to 1, and is not coded. + + +Coupled Stream Count 'M' (8 bits, unsigned): +This is the number of streams whose decoders are to be configured to produce + two channels (stereo). +This MUST be no larger than the total number of streams, N. + +Each packet in an Opus stream has an internal channel count of 1 or 2, which + can change from packet to packet. +This is selected by the encoder depending on the bitrate and the audio being + encoded. +The original channel count of the audio passed to the encoder is not + necessarily preserved by the lossy compression. + +Regardless of the internal channel count, any Opus stream can be decoded as + mono (a single channel) or stereo (two channels) by appropriate initialization + of the decoder. +The 'coupled stream count' field indicates that the decoders for the first M + Opus streams are to be initialized for stereo (two-channel) output, and the + remaining (N - M) decoders are to be initialized for mono (a single + channel) only. +The total number of decoded channels, (M + N), MUST be no larger than + 255, as there is no way to index more channels than that in the channel + mapping. + +For channel mapping family 0, this value defaults to (C - 1) + (i.e., 0 for mono and 1 for stereo), and is not coded. + + +Channel Mapping (8*C bits): +This contains one octet per output channel, indicating which decoded channel + is to be used for each one. +Let 'index' be the value of this octet for a particular output channel. +This value MUST either be smaller than (M + N), or be the special + value 255. +If 'index' is less than 2*M, the output MUST be taken from decoding stream + ('index'/2) as stereo and selecting the left channel if 'index' is even, and + the right channel if 'index' is odd. +If 'index' is 2*M or larger, but less than 255, the output MUST be taken from + decoding stream ('index' - M) as mono. +If 'index' is 255, the corresponding output channel MUST contain pure silence. + +The number of output channels, C, is not constrained to match the number of + decoded channels (M + N). +A single index value MAY appear multiple times, i.e., the same decoded channel + might be mapped to multiple output channels. +Some decoded channels might not be assigned to any output channel, as well. + +For channel mapping family 0, the first index defaults to 0, and if + C == 2, the second index defaults to 1. +Neither index is coded. + + + + + +After producing the output channels, the channel mapping family determines the + semantic meaning of each one. +There are three defined mapping families in this specification. + + +
+ +Allowed numbers of channels: 1 or 2. +RTP mapping. +This is the same channel interpretation as . + + + +1 channel: monophonic (mono). +2 channels: stereo (left, right). + +Special mapping: This channel mapping value also + indicates that the contents consists of a single Opus stream that is stereo if + and only if C == 2, with stream index 0 mapped to output + channel 0 (mono, or left channel) and stream index 1 mapped to + output channel 1 (right channel) if stereo. +When the 'channel mapping family' octet has this value, the channel mapping + table MUST be omitted from the ID header packet. + +
+ +
+ +Allowed numbers of channels: 1...8. +Vorbis channel order (see below). + + +Each channel is assigned to a speaker location in a conventional surround + arrangement. +Specific locations depend on the number of channels, and are given below + in order of the corresponding channel indices. + + 1 channel: monophonic (mono). + 2 channels: stereo (left, right). + 3 channels: linear surround (left, center, right) + 4 channels: quadraphonic (front left, front right, rear left, rear right). + 5 channels: 5.0 surround (front left, front center, front right, rear left, rear right). + 6 channels: 5.1 surround (front left, front center, front right, rear left, rear right, LFE). + 7 channels: 6.1 surround (front left, front center, front right, side left, side right, rear center, LFE). + 8 channels: 7.1 surround (front left, front center, front right, side left, side right, rear left, rear right, LFE) + + + +This set of surround options and speaker location orderings is the same + as those used by the Vorbis codec . +The ordering is different from the one used by the + WAVE and + Free Lossless Audio Codec (FLAC) formats, + so correct ordering requires permutation of the output channels when decoding + to or encoding from those formats. +'LFE' here refers to a Low Frequency Effects channel, often mapped to a + subwoofer with no particular spatial position. +Implementations SHOULD identify 'side' or 'rear' speaker locations with + 'surround' and 'back' as appropriate when interfacing with audio formats + or systems which prefer that terminology. + +
+ +
+ +Allowed numbers of channels: 1...255. +No defined channel meaning. + + +Channels are unidentified. +General-purpose players SHOULD NOT attempt to play these streams. +Offline implementations MAY deinterleave the output into separate PCM files, + one per channel. +Implementations SHOULD NOT produce output for channels mapped to stream index + 255 (pure silence) unless they have no other way to indicate the index of + non-silent channels. + +
+ +
+ +The remaining channel mapping families (2...254) are reserved. +A demuxer implementation encountering a reserved channel mapping family value + SHOULD act as though the value is 255. + +
+ +
+ +An Ogg Opus player MUST support any valid channel mapping with a channel + mapping family of 0 or 1, even if the number of channels does not match the + physically connected audio hardware. +Players SHOULD perform channel mixing to increase or reduce the number of + channels as needed. + + + +Implementations MAY use the following matrices to implement downmixing from + multichannel files using Channel Mapping + Family 1, which are known to give acceptable results for stereo. +Matrices for 3 and 4 channels are normalized so each coefficient row sums + to 1 to avoid clipping. +For 5 or more channels they are normalized to 2 as a compromise between + clipping and dynamic range reduction. + + +In these matrices the front left and front right channels are generally +passed through directly. +When a surround channel is split between both the left and right stereo + channels, coefficients are chosen so their squares sum to 1, which + helps preserve the perceived intensity. +Rear channels are mixed more diffusely or attenuated to maintain focus + on the front channels. + + +
+ + +Exact coefficient values are 1 and 1/sqrt(2), multiplied by + 1/(1 + 1/sqrt(2)) for normalization. + +
+ +
+ + +Exact coefficient values are 1, sqrt(3)/2 and 1/2, multiplied by + 1/(1 + sqrt(3)/2 + 1/2) for normalization. + +
+ +
+ + +Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2 and 1/2, multiplied by + 2/(1 + 1/sqrt(2) + sqrt(3)/2 + 1/2) + for normalization. + +
+ +
+ + +Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2 and 1/2, multiplied by +2/(1 + 1/sqrt(2) + sqrt(3)/2 + 1/2 + 1/sqrt(2)) + for normalization. + +
+ +
+ + +Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2, 1/2 and + sqrt(3)/2/sqrt(2), multiplied by + 2/(1 + 1/sqrt(2) + sqrt(3)/2 + 1/2 + + sqrt(3)/2/sqrt(2) + 1/sqrt(2)) for normalization. +The coefficients are in the same order as in , + and the matrices above. + +
+ +
+ + +Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2 and 1/2, multiplied by + 2/(2 + 2/sqrt(2) + sqrt(3)) for normalization. +The coefficients are in the same order as in , + and the matrices above. + +
+ +
+ +
+ +
+ +
+ +
+ +
+ + +The comment header consists of a 64-bit magic signature, followed by data in + the same format as the header used in Ogg + Vorbis, except (like Ogg Theora and Speex) the final "framing bit" specified + in the Vorbis spec is not present. + +Magic Signature: + +This is an 8-octet (64-bit) field that allows codec identification and is + human-readable. +It contains, in order, the magic numbers: + +0x4F 'O' +0x70 'p' +0x75 'u' +0x73 's' +0x54 'T' +0x61 'a' +0x67 'g' +0x73 's' + +Starting with "Op" helps distinguish it from audio data packets, as this is an + invalid TOC sequence. + + +Vendor String Length (32 bits, unsigned, little endian): + +This field gives the length of the following vendor string, in octets. +It MUST NOT indicate that the vendor string is longer than the rest of the + packet. + + +Vendor String (variable length, UTF-8 vector): + +This is a simple human-readable tag for vendor information, encoded as a UTF-8 + string . +No terminating null octet is necessary. + +This tag is intended to identify the codec encoder and encapsulation + implementations, for tracing differences in technical behavior. +User-facing applications can use the 'ENCODER' user comment tag to identify + themselves. + + +User Comment List Length (32 bits, unsigned, little endian): + +This field indicates the number of user-supplied comments. +It MAY indicate there are zero user-supplied comments, in which case there are + no additional fields in the packet. +It MUST NOT indicate that there are so many comments that the comment string + lengths would require more data than is available in the rest of the packet. + + +User Comment #i String Length (32 bits, unsigned, little endian): + +This field gives the length of the following user comment string, in octets. +There is one for each user comment indicated by the 'user comment list length' + field. +It MUST NOT indicate that the string is longer than the rest of the packet. + + +User Comment #i String (variable length, UTF-8 vector): + +This field contains a single user comment string. +There is one for each user comment indicated by the 'user comment list length' + field. + + + + + +The vendor string length and user comment list length are REQUIRED, and + implementations SHOULD reject comment headers that do not contain enough data + for these fields, or that do not contain enough data for the corresponding + vendor string or user comments they describe. +Making this check before allocating the associated memory to contain the data + helps prevent a possible Denial-of-Service (DoS) attack from small comment + headers that claim to contain strings longer than the entire packet or more + user comments than than could possibly fit in the packet. + + + +Immediately following the user comment list, the comment header MAY + contain zero-padding or other binary data which is not specified here. +If the least-significant bit of the first byte of this data is 1, then editors + SHOULD preserve the contents of this data when updating the tags, but if this + bit is 0, all such data MAY be treated as padding, and truncated or discarded + as desired. +This allows informal experimentation with the format of this binary data until + it can be specified later. + + + +The comment header can be arbitrarily large and might be spread over a large + number of Ogg pages. +Implementations MUST avoid attempting to allocate excessive amounts of memory + when presented with a very large comment header. +To accomplish this, implementations MAY reject a comment header larger than + 125,829,120 octets, and MAY ignore individual comments that are not fully + contained within the first 61,440 octets of the comment header. + + +
+ +The user comment strings follow the NAME=value format described by + with the same recommended tag names: + ARTIST, TITLE, DATE, ALBUM, and so on. + + +Two new comment tags are introduced here: + + +First, an optional gain for track normalization: +
+ +
+ + representing the volume shift needed to normalize the track's volume + during isolated playback, in random shuffle, and so on. +The gain is a Q7.8 fixed point number in dB, as in the ID header's 'output + gain' field. +This tag is similar to the REPLAYGAIN_TRACK_GAIN tag in + Vorbis , except that the normal volume + reference is the standard. + +Second, an optional gain for album normalization: +
+ +
+ + representing the volume shift needed to normalize the overall volume when + played as part of a particular collection of tracks. +The gain is also a Q7.8 fixed point number in dB, as in the ID header's + 'output gain' field. + + +An Ogg Opus stream MUST NOT have more than one of each of these tags, and if + present their values MUST be an integer from -32768 to 32767, inclusive, + represented in ASCII as a base 10 number with no whitespace. +A leading '+' or '-' character is valid. +Leading zeros are also permitted, but the value MUST be represented by + no more than 6 characters. +Other non-digit characters MUST NOT be present. + + +If present, R128_TRACK_GAIN and R128_ALBUM_GAIN MUST correctly represent + the R128 normalization gain relative to the 'output gain' field specified + in the ID header. +If a player chooses to make use of the R128_TRACK_GAIN tag or the + R128_ALBUM_GAIN tag, it MUST apply those gains + in addition to the 'output gain' value. +If a tool modifies the ID header's 'output gain' field, it MUST also update or + remove the R128_TRACK_GAIN and R128_ALBUM_GAIN comment tags if present. +A muxer SHOULD place the gain it wants other tools to use by default into the + 'output gain' field, and not the comment tag. + + +To avoid confusion with multiple normalization schemes, an Opus comment header + SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, + REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK tags, unless they are only + to be used in some context where there is guaranteed to be no such confusion. + normalization is preferred to the earlier + REPLAYGAIN schemes because of its clear definition and adoption by industry. +Peak normalizations are difficult to calculate reliably for lossy codecs + because of variation in excursion heights due to decoder differences. +In the authors' investigations they were not applied consistently or broadly + enough to merit inclusion here. + +
+
+ +
+ +
+ +Technically, valid Opus packets can be arbitrarily large due to the padding + format, although the amount of non-padding data they can contain is bounded. +These packets might be spread over a similarly enormous number of Ogg pages. +When encoding, implementations SHOULD limit the use of padding in audio data + packets to no more than is necessary to make a variable bitrate (VBR) stream + constant bitrate (CBR), unless they have no reasonable way to determine what + is necessary. +Demuxers SHOULD reject audio data packets (treat them as if they were malformed + Opus packets with an invalid TOC sequence) larger than 61,440 octets per + Opus stream, unless they have a specific reason for allowing extra padding. +Such packets necessarily contain more padding than needed to make a stream CBR. +Demuxers MUST avoid attempting to allocate excessive amounts of memory when + presented with a very large packet. +Demuxers MAY reject or partially process audio data packets larger than + 61,440 octets in an Ogg Opus stream with channel mapping families 0 + or 1. +Demuxers MAY reject or partially process audio data packets in any Ogg Opus + stream if the packet is larger than 61,440 octets and also larger than + 7,680 octets per Opus stream. +The presence of an extremely large packet in the stream could indicate a + memory exhaustion attack or stream corruption. + + +In an Ogg Opus stream, the largest possible valid packet that does not use + padding has a size of (61,298*N - 2) octets. +With 255 streams, this is 15,630,988 octets and can + span up to 61,298 Ogg pages, all but one of which will have a granule + position of -1. +This is of course a very extreme packet, consisting of 255 streams, each + containing 120 ms of audio encoded as 2.5 ms frames, each frame + using the maximum possible number of octets (1275) and stored in the least + efficient manner allowed (a VBR code 3 Opus packet). +Even in such a packet, most of the data will be zeros as 2.5 ms frames + cannot actually use all 1275 octets. + + +The largest packet consisting of entirely useful data is + (15,326*N - 2) octets. +This corresponds to 120 ms of audio encoded as 10 ms frames in either + SILK or Hybrid mode, but at a data rate of over 1 Mbps, which makes little + sense for the quality achieved. + + +A more reasonable limit is (7,664*N - 2) octets. +This corresponds to 120 ms of audio encoded as 20 ms stereo CELT mode + frames, with a total bitrate just under 511 kbps (not counting the Ogg + encapsulation overhead). +For channel mapping family 1, N=8 provides a reasonable upper bound, as it + allows for each of the 8 possible output channels to be decoded from a + separate stereo Opus stream. +This gives a size of 61,310 octets, which is rounded up to a multiple of + 1,024 octets to yield the audio data packet size of 61,440 octets + that any implementation is expected to be able to process successfully. + +
+ +
+ +When encoding Opus streams, Ogg muxers SHOULD take into account the + algorithmic delay of the Opus encoder. + + +In encoders derived from the reference + implementation , the number of samples can be + queried with: + +
+ +
+ +To achieve good quality in the very first samples of a stream, implementations + MAY use linear predictive coding (LPC) extrapolation to generate at least 120 + extra samples at the beginning to avoid the Opus encoder having to encode a + discontinuous signal. +For more information on linear prediction, see + . +For an input file containing 'length' samples, the implementation SHOULD set + the pre-skip header value to (delay_samples + extra_samples), encode + at least (length + delay_samples + extra_samples) + samples, and set the granule position of the last page to + (length + delay_samples + extra_samples). +This ensures that the encoded file has the same duration as the original, with + no time offset. The best way to pad the end of the stream is to also use LPC + extrapolation, but zero-padding is also acceptable. + + +
+ +The first step in LPC extrapolation is to compute linear prediction + coefficients. +When extending the end of the signal, order-N (typically with N ranging from 8 + to 40) LPC analysis is performed on a window near the end of the signal. +The last N samples are used as memory to an infinite impulse response (IIR) + filter. + + +The filter is then applied on a zero input to extrapolate the end of the signal. +Let a(k) be the kth LPC coefficient and x(n) be the nth sample of the signal, + each new sample past the end of the signal is computed as: + +
+ +
+ +The process is repeated independently for each channel. +It is possible to extend the beginning of the signal by applying the same + process backward in time. +When extending the beginning of the signal, it is best to apply a "fade in" to + the extrapolated signal, e.g. by multiplying it by a half-Hanning window + . + + +
+ +
+ +In some applications, such as Internet radio, it is desirable to cut a long + stream into smaller chains, e.g. so the comment header can be updated. +This can be done simply by separating the input streams into segments and + encoding each segment independently. +The drawback of this approach is that it creates a small discontinuity + at the boundary due to the lossy nature of Opus. +A muxer MAY avoid this discontinuity by using the following procedure: + +Encode the last frame of the first segment as an independent frame by + turning off all forms of inter-frame prediction. +De-emphasis is allowed. +Set the granule position of the last page to a point near the end of the + last frame. +Begin the second segment with a copy of the last frame of the first + segment. +Set the pre-skip value of the second stream in such a way as to properly + join the two streams. +Continue the encoding process normally from there, without any reset to + the encoder. + + + +In encoders derived from the reference implementation, inter-frame prediction + can be turned off by calling: + +
+ +
+ +For best results, this implementation requires that prediction be explicitly + enabled again before resuming normal encoding, even after a reset. + + +
+ +
+ +
+ +A brief summary of major implementations of this draft is available + at , + along with their status. + + +[Note to RFC Editor: please remove this entire section before + final publication per , along with + its references.] + +
+ +
+ +Implementations of the Opus codec need to take appropriate security + considerations into account, as outlined in . +This is just as much a problem for the container as it is for the codec itself. +Robustness against malicious payloads is extremely important. +Malicious payloads MUST NOT cause an implementation to overrun its allocated + memory or to take an excessive amount of resources to decode. +Although problems in encoding applications are typically rarer, the same + applies to the muxer. +Malicious audio input streams MUST NOT cause an implementation to overrun its + allocated memory or consume excessive resources because this would allow an + attacker to attack transcoding gateways. + + + +Like most other container formats, Ogg Opus streams SHOULD NOT be used with + insecure ciphers or cipher modes that are vulnerable to known-plaintext + attacks. +Elements such as the Ogg page capture pattern and the magic signatures in the + ID header and the comment header all have easily predictable values, in + addition to various elements of the codec data itself. + +
+ +
+ +An "Ogg Opus file" consists of one or more sequentially multiplexed segments, + each containing exactly one Ogg Opus stream. +The RECOMMENDED mime-type for Ogg Opus files is "audio/ogg". + + + +If more specificity is desired, one MAY indicate the presence of Opus streams + using the codecs parameter defined in and + , e.g., + +
+ +
+ + for an Ogg Opus file. + + + +The RECOMMENDED filename extension for Ogg Opus files is '.opus'. + + + +When Opus is concurrently multiplexed with other streams in an Ogg container, + one SHOULD use one of the "audio/ogg", "video/ogg", or "application/ogg" + mime-types, as defined in . +Such streams are not strictly "Ogg Opus files" as described above, + since they contain more than a single Opus stream per sequentially + multiplexed segment, e.g. video or multiple audio tracks. +In such cases the the '.opus' filename extension is NOT RECOMMENDED. + + + +In either case, this document updates + to add 'opus' as a codecs parameter value with char[8]: 'OpusHead' + as Codec Identifier. + +
+ +
+ +This document updates the IANA Media Types registry to add .opus + as a file extension for "audio/ogg", and to add itself as a reference + alongside for "audio/ogg", "video/ogg", and + "application/ogg" Media Types. + + +This document defines a new registry "Opus Channel Mapping Families" to + indicate how the semantic meanings of the channels in a multi-channel Opus + stream are described. +IANA SHALL create a new name space of "Opus Channel Mapping Families". +All maintenance within and additions to the contents of this name space MUST be + according to the "Specification Requried with Expert Review" registration + policy as defined in . +Each registry entry consists of a Channel Mapping Family Number, which is + specified in decimal in the range 0 to 255, inclusive, and a Reference (or + list of references) +Each Reference must point to sufficient documentation to describe what + information is coded in the Opus identification header for this channel + mapping family, how a demuxer determines the Stream Count ('N') and Coupled + Stream Count ('M') from this information, and how it determines the proper + interpretation of each of the decoded channels. + + +This document defines three initial assignments for this registry. + + +ValueReference +0[RFCXXXX] +1[RFCXXXX] +255[RFCXXXX] + + +The designated expert will determine if the Reference points to a specification + that meets the requirements for permanence and ready availability laid out + in  and that it specifies the information + described above with sufficient clarity to allow interoperable + implementations. + +
+ +
+ +Thanks to Ben Campbell, Mark Harris, Greg Maxwell, Christopher "Monty" + Montgomery, Jean-Marc Valin, and Mo Zanaty for their valuable contributions to + this document. +Additional thanks to Andrew D'Addesio, Greg Maxwell, and Vincent Penquerc'h for + their feedback based on early implementations. + +
+ +
+ +In , "RFCXXXX" is to be replaced with the RFC number + assigned to this draft. + + +In the Copyright Notice at the start of the document, the following paragraph + is to be appended after the regular copyright notice text: + + +"The licenses granted by the IETF Trust to this RFC under Section 3.c of + the Trust Legal Provisions shall also include the right to extract text from + Sections 1 through 14 of this RFC and create derivative works from + these extracts, and to copy, publish, display, and distribute such derivative + works in any medium and for any purpose, provided that no such derivative work + shall be presented, displayed, or published in a manner that states or implies + that it is part of this RFC or any other IETF Document." + +
+ +
+ + + &rfc2119; + &rfc3533; + &rfc3629; + &rfc4732; + &rfc5226; + &rfc5334; + &rfc6381; + &rfc6716; + + + + Loudness Recommendation EBU R128 + + EBU Technical Committee + + + + + + + +Ogg Vorbis I Format Specification: Comment Field and Header + Specification + + + + + + + + + + + &rfc6982; + &rfc7587; + + + + FLAC - Free Lossless Audio Codec Format Description + + + + + + + + Hann window + + Wikipedia + + + + + + + + Linear Predictive Coding + + Wikipedia + + + + + + + + Autocorrelation LPC coeff generation algorithm + (Vorbis source code) + + + + + + + + + +VorbisComment: Replay Gain + + + + + + + + +Granulepos Encoding and How Seeking Really Works + + + + + + + + + +The Vorbis I Specification, Section 4.3.9 Output Channel Order + + + + + + + + The Vorbis I Specification, Appendix A: Embedding Vorbis + into an Ogg stream + + + + + + + + Multiple Channel Audio Data and WAVE Files + + Microsoft Corporation + + + + + + + + +
diff --git a/asm/libs/opus/doc/draft-ietf-codec-opus-update.xml b/asm/libs/opus/doc/draft-ietf-codec-opus-update.xml new file mode 100644 index 00000000..74147221 --- /dev/null +++ b/asm/libs/opus/doc/draft-ietf-codec-opus-update.xml @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + Updates to the Opus Audio Codec + + +Mozilla Corporation +
+ +331 E. Evelyn Avenue +Mountain View +CA +94041 +USA + ++1 650 903-0800 +jmvalin@jmvalin.ca +
+
+ + +vocTone +
+ + + + + + + + +koenvos74@gmail.com +
+
+ + + + + + + This document addresses minor issues that were found in the specification + of the Opus audio codec in RFC 6716. + +
+ + +
+ This document addresses minor issues that were discovered in the reference + implementation of the Opus codec that serves as the specification in + RFC 6716. Only issues affecting the decoder are + listed here. An up-to-date implementation of the Opus encoder can be found at + http://opus-codec.org/. The updated specification remains fully compatible with + the original specification and only one of the changes results in any difference + in the audio output. + +
+ +
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + document are to be interpreted as described in RFC 2119. +
+ +
+ The reference implementation does not reinitialize the stereo state + during a mode switch. The old stereo memory can produce a brief impulse + (i.e. single sample) in the decoded audio. This can be fixed by changing + silk/dec_API.c at line 72: +
+ sStereo, 0, ++ sizeof(((silk_decoder *)decState)->sStereo)); ++ /* Not strictly needed, but it's cleaner that way */ ++ ((silk_decoder *)decState)->prev_decode_only_middle = 0; + + return ret; + } +]]> +
+ This change affects the normative part of the decoder. Fortunately, + the modified decoder is still compliant with the original specification because + it still easily passes the testvectors. For example, for the float decoder + at 48 kHz, the opus_compare (arbitrary) "quality score" changes from + from 99.9333% to 99.925%. +
+
+ +
+ It was discovered that some invalid packets of very large size could trigger + an out-of-bounds read in the Opus packet parsing code responsible for padding. + This is due to an integer overflow if the signaled padding exceeds 2^31-1 bytes + (the actual packet may be smaller). The code can be fixed by applying the following + changes at line 596 of src/opus_decoder.c: +
+ +
+
+ This packet parsing issue is limited to reading memory up + to about 60 kB beyond the compressed buffer. This can only be triggered + by a compressed packet more than about 16 MB long, so it's not a problem + for RTP. In theory, it could crash a file + decoder (e.g. Opus in Ogg) if the memory just after the incoming packet + is out-of-range, but our attempts to trigger such a crash in a production + application built using an affected version of the Opus decoder failed. +
+ +
+ The SILK resampler had the following issues: + + The calls to memcpy() were using sizeof(opus_int32), but the type of the + local buffer was opus_int16. + Because the size was wrong, this potentially allowed the source + and destination regions of the memcpy() to overlap. + We believe that nSamplesIn is at least fs_in_khZ, + which is at least 8. + Since RESAMPLER_ORDER_FIR_12 is only 8, that should not be a problem once + the type size is fixed. + The size of the buffer used RESAMPLER_MAX_BATCH_SIZE_IN, but the + data stored in it was actually _twice_ the input batch size + (nSamplesIn<<1). + + + The fact that the code never produced any error in testing (including when run under the + Valgrind memory debugger), suggests that in practice + the batch sizes are reasonable enough that none of the issues above + was ever a problem. However, proving that is non-obvious. + + The code can be fixed by applying the following changes to line 70 of silk/resampler_private_IIR_FIR.c: +
+sFIR, RESAMPLER_ORDER_FIR_12 \ +* sizeof( opus_int32 ) ); ++ silk_memcpy( buf, S->sFIR, RESAMPLER_ORDER_FIR_12 \ +* sizeof( opus_int16 ) ); + + /* Iterate over blocks of frameSizeIn input samples */ + index_increment_Q16 = S->invRatio_Q16; + while( 1 ) { + nSamplesIn = silk_min( inLen, S->batchSize ); + + /* Upsample 2x */ + silk_resampler_private_up2_HQ( S->sIIR, &buf[ \ +RESAMPLER_ORDER_FIR_12 ], in, nSamplesIn ); + + max_index_Q16 = silk_LSHIFT32( nSamplesIn, 16 + 1 \ +); /* + 1 because 2x upsampling */ + out = silk_resampler_private_IIR_FIR_INTERPOL( out, \ +buf, max_index_Q16, index_increment_Q16 ); + in += nSamplesIn; + inLen -= nSamplesIn; + + if( inLen > 0 ) { + /* More iterations to do; copy last part of \ +filtered signal to beginning of buffer */ +- silk_memcpy( buf, &buf[ nSamplesIn << 1 ], \ +RESAMPLER_ORDER_FIR_12 * sizeof( opus_int32 ) ); ++ silk_memmove( buf, &buf[ nSamplesIn << 1 ], \ +RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) ); + } else { + break; + } + } + + /* Copy last part of filtered signal to the state for \ +the next call */ +- silk_memcpy( S->sFIR, &buf[ nSamplesIn << 1 ], \ +RESAMPLER_ORDER_FIR_12 * sizeof( opus_int32 ) ); ++ silk_memcpy( S->sFIR, &buf[ nSamplesIn << 1 ], \ +RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) ); + } +]]> +
+ Note: due to RFC formatting conventions, lines exceeding the column width + in the patch above are split using a backslash character. The backslashes + at the end of a line and the white space at the beginning + of the following line are not part of the patch. A properly formatted patch + including the three changes above is available at + . +
+
+ +
+ The last issue is not strictly a bug, but it is an issue that has been reported + when downmixing an Opus decoded stream to mono, whether this is done inside the decoder + or as a post-processing step on the stereo decoder output. Opus intensity stereo allows + optionally coding the two channels 180-degrees out of phase on a per-band basis. + This provides better stereo quality than forcing the two channels to be in phase, + but when the output is downmixed to mono, the energy in the affected bands is cancelled + sometimes resulting in audible artefacts. + + As a work-around for this issue, the decoder MAY choose not to apply the 180-degree + phase shift when the output is meant to be downmixed (inside or + outside of the decoder). + +
+
+ This document makes no request of IANA. + + Note to RFC Editor: this section may be removed on publication as an + RFC. +
+ +
+ We would like to thank Juri Aedla for reporting the issue with the parsing of + the Opus padding. +
+
+ + + + + + + + + +
diff --git a/asm/libs/opus/doc/draft-ietf-codec-opus.xml b/asm/libs/opus/doc/draft-ietf-codec-opus.xml new file mode 100644 index 00000000..334cad97 --- /dev/null +++ b/asm/libs/opus/doc/draft-ietf-codec-opus.xml @@ -0,0 +1,8276 @@ + + + + + + + +Definition of the Opus Audio Codec + + + +Mozilla Corporation +
+ +650 Castro Street +Mountain View +CA +94041 +USA + ++1 650 903-0800 +jmvalin@jmvalin.ca +
+
+ + +Skype Technologies S.A. +
+ +Soder Malarstrand 43 +Stockholm + +11825 +SE + ++46 73 085 7619 +koen.vos@skype.net +
+
+ + +Mozilla Corporation +
+ +650 Castro Street +Mountain View +CA +94041 +USA + ++1 650 903-0800 +tterriberry@mozilla.com +
+
+ + + +General + + + + + +This document defines the Opus interactive speech and audio codec. +Opus is designed to handle a wide range of interactive audio applications, + including Voice over IP, videoconferencing, in-game chat, and even live, + distributed music performances. +It scales from low bitrate narrowband speech at 6 kb/s to very high quality + stereo music at 510 kb/s. +Opus uses both linear prediction (LP) and the Modified Discrete Cosine + Transform (MDCT) to achieve good compression of both speech and music. + + +
+ + + +
+ +The Opus codec is a real-time interactive audio codec designed to meet the requirements +described in . +It is composed of a linear + prediction (LP)-based layer and a Modified Discrete Cosine Transform + (MDCT)-based layer. +The main idea behind using two layers is that in speech, linear prediction + techniques (such as Code-Excited Linear Prediction, or CELP) code low frequencies more efficiently than transform + (e.g., MDCT) domain techniques, while the situation is reversed for music and + higher speech frequencies. +Thus a codec with both layers available can operate over a wider range than + either one alone and, by combining them, achieve better quality than either + one individually. + + + +The primary normative part of this specification is provided by the source code + in . +Only the decoder portion of this software is normative, though a + significant amount of code is shared by both the encoder and decoder. + provides a decoder conformance test. +The decoder contains a great deal of integer and fixed-point arithmetic which + needs to be performed exactly, including all rounding considerations, so any + useful specification requires domain-specific symbolic language to adequately + define these operations. +Additionally, any +conflict between the symbolic representation and the included reference +implementation must be resolved. For the practical reasons of compatibility and +testability it would be advantageous to give the reference implementation +priority in any disagreement. The C language is also one of the most +widely understood human-readable symbolic representations for machine +behavior. +For these reasons this RFC uses the reference implementation as the sole + symbolic representation of the codec. + + +While the symbolic representation is unambiguous and complete it is not +always the easiest way to understand the codec's operation. For this reason +this document also describes significant parts of the codec in English and +takes the opportunity to explain the rationale behind many of the more +surprising elements of the design. These descriptions are intended to be +accurate and informative, but the limitations of common English sometimes +result in ambiguity, so it is expected that the reader will always read +them alongside the symbolic representation. Numerous references to the +implementation are provided for this purpose. The descriptions sometimes +differ from the reference in ordering or through mathematical simplification +wherever such deviation makes an explanation easier to understand. +For example, the right shift and left shift operations in the reference +implementation are often described using division and multiplication in the text. +In general, the text is focused on the "what" and "why" while the symbolic +representation most clearly provides the "how". + + +
+ +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", + "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be + interpreted as described in RFC 2119 . + + +Various operations in the codec require bit-exact fixed-point behavior, even + when writing a floating point implementation. +The notation "Q<n>", where n is an integer, denotes the number of binary + digits to the right of the decimal point in a fixed-point number. +For example, a signed Q14 value in a 16-bit word can represent values from + -2.0 to 1.99993896484375, inclusive. +This notation is for informational purposes only. +Arithmetic, when described, always operates on the underlying integer. +E.g., the text will explicitly indicate any shifts required after a + multiplication. + + +Expressions, where included in the text, follow C operator rules and + precedence, with the exception that the syntax "x**y" indicates x raised to + the power y. +The text also makes use of the following functions: + + +
+ +The smallest of two values x and y. + +
+ +
+ +The largest of two values x and y. + +
+ +
+
+ +
+ +With this definition, if lo > hi, the lower bound is the one that + is enforced. + +
+ +
+ +The sign of x, i.e., +
+ 0 . +]]> +
+
+
+ +
+ +The absolute value of x, i.e., +
+ +
+
+
+ +
+ +The largest integer z such that z <= f. + +
+ +
+ +The smallest integer z such that z >= f. + +
+ +
+ +The integer z nearest to f, with ties rounded towards negative infinity, + i.e., +
+ +
+
+
+ +
+ +The base-two logarithm of f. + +
+ +
+ +The minimum number of bits required to store a positive integer n in two's + complement notation, or 0 for a non-positive integer n. +
+ 0 +]]> +
+Examples: + +ilog(-1) = 0 +ilog(0) = 0 +ilog(1) = 1 +ilog(2) = 2 +ilog(3) = 2 +ilog(4) = 3 +ilog(7) = 3 + +
+
+ +
+ +
+ +
+ + +The Opus codec scales from 6 kb/s narrowband mono speech to 510 kb/s + fullband stereo music, with algorithmic delays ranging from 5 ms to + 65.2 ms. +At any given time, either the LP layer, the MDCT layer, or both, may be active. +It can seamlessly switch between all of its various operating modes, giving it + a great deal of flexibility to adapt to varying content and network + conditions without renegotiating the current session. +The codec allows input and output of various audio bandwidths, defined as + follows: + + +Abbreviation +Audio Bandwidth +Sample Rate (Effective) +NB (narrowband) 4 kHz 8 kHz +MB (medium-band) 6 kHz 12 kHz +WB (wideband) 8 kHz 16 kHz +SWB (super-wideband) 12 kHz 24 kHz +FB (fullband) 20 kHz (*) 48 kHz + + +(*) Although the sampling theorem allows a bandwidth as large as half the + sampling rate, Opus never codes audio above 20 kHz, as that is the + generally accepted upper limit of human hearing. + + + +Opus defines super-wideband (SWB) with an effective sample rate of 24 kHz, + unlike some other audio coding standards that use 32 kHz. +This was chosen for a number of reasons. +The band layout in the MDCT layer naturally allows skipping coefficients for + frequencies over 12 kHz, but does not allow cleanly dropping just those + frequencies over 16 kHz. +A sample rate of 24 kHz also makes resampling in the MDCT layer easier, + as 24 evenly divides 48, and when 24 kHz is sufficient, it can save + computation in other processing, such as Acoustic Echo Cancellation (AEC). +Experimental changes to the band layout to allow a 16 kHz cutoff + (32 kHz effective sample rate) showed potential quality degradations at + other sample rates, and at typical bitrates the number of bits saved by using + such a cutoff instead of coding in fullband (FB) mode is very small. +Therefore, if an application wishes to process a signal sampled at 32 kHz, + it should just use FB. + + + +The LP layer is based on the SILK codec + . +It supports NB, MB, or WB audio and frame sizes from 10 ms to 60 ms, + and requires an additional 5 ms look-ahead for noise shaping estimation. +A small additional delay (up to 1.5 ms) may be required for sampling rate + conversion. +Like Vorbis and many other modern codecs, SILK is inherently designed for + variable-bitrate (VBR) coding, though the encoder can also produce + constant-bitrate (CBR) streams. +The version of SILK used in Opus is substantially modified from, and not + compatible with, the stand-alone SILK codec previously deployed by Skype. +This document does not serve to define that format, but those interested in the + original SILK codec should see instead. + + + +The MDCT layer is based on the CELT codec . +It supports NB, WB, SWB, or FB audio and frame sizes from 2.5 ms to + 20 ms, and requires an additional 2.5 ms look-ahead due to the + overlapping MDCT windows. +The CELT codec is inherently designed for CBR coding, but unlike many CBR + codecs it is not limited to a set of predetermined rates. +It internally allocates bits to exactly fill any given target budget, and an + encoder can produce a VBR stream by varying the target on a per-frame basis. +The MDCT layer is not used for speech when the audio bandwidth is WB or less, + as it is not useful there. +On the other hand, non-speech signals are not always adequately coded using + linear prediction, so for music only the MDCT layer should be used. + + + +A "Hybrid" mode allows the use of both layers simultaneously with a frame size + of 10 or 20 ms and a SWB or FB audio bandwidth. +The LP layer codes the low frequencies by resampling the signal down to WB. +The MDCT layer follows, coding the high frequency portion of the signal. +The cutoff between the two lies at 8 kHz, the maximum WB audio bandwidth. +In the MDCT layer, all bands below 8 kHz are discarded, so there is no + coding redundancy between the two layers. + + + +The sample rate (in contrast to the actual audio bandwidth) can be chosen + independently on the encoder and decoder side, e.g., a fullband signal can be + decoded as wideband, or vice versa. +This approach ensures a sender and receiver can always interoperate, regardless + of the capabilities of their actual audio hardware. +Internally, the LP layer always operates at a sample rate of twice the audio + bandwidth, up to a maximum of 16 kHz, which it continues to use for SWB + and FB. +The decoder simply resamples its output to support different sample rates. +The MDCT layer always operates internally at a sample rate of 48 kHz. +Since all the supported sample rates evenly divide this rate, and since the + the decoder may easily zero out the high frequency portion of the spectrum in + the frequency domain, it can simply decimate the MDCT layer output to achieve + the other supported sample rates very cheaply. + + + +After conversion to the common, desired output sample rate, the decoder simply + adds the output from the two layers together. +To compensate for the different look-ahead required by each layer, the CELT + encoder input is delayed by an additional 2.7 ms. +This ensures that low frequencies and high frequencies arrive at the same time. +This extra delay may be reduced by an encoder by using less look-ahead for noise + shaping or using a simpler resampler in the LP layer, but this will reduce + quality. +However, the base 2.5 ms look-ahead in the CELT layer cannot be reduced in + the encoder because it is needed for the MDCT overlap, whose size is fixed by + the decoder. + + + +Both layers use the same entropy coder, avoiding any waste from "padding bits" + between them. +The hybrid approach makes it easy to support both CBR and VBR coding. +Although the LP layer is VBR, the bit allocation of the MDCT layer can produce + a final stream that is CBR by using all the bits left unused by the LP layer. + + +
+ +The Opus codec includes a number of control parameters which can be changed dynamically during +regular operation of the codec, without interrupting the audio stream from the encoder to the decoder. +These parameters only affect the encoder since any impact they have on the bit-stream is signaled +in-band such that a decoder can decode any Opus stream without any out-of-band signaling. Any Opus +implementation can add or modify these control parameters without affecting interoperability. The most +important encoder control parameters in the reference encoder are listed below. + + +
+ +Opus supports all bitrates from 6 kb/s to 510 kb/s. All other parameters being +equal, higher bitrate results in higher quality. For a frame size of 20 ms, these +are the bitrate "sweet spots" for Opus in various configurations: + +8-12 kb/s for NB speech, +16-20 kb/s for WB speech, +28-40 kb/s for FB speech, +48-64 kb/s for FB mono music, and +64-128 kb/s for FB stereo music. + + +
+ +
+ +Opus can transmit either mono or stereo frames within a single stream. +When decoding a mono frame in a stereo decoder, the left and right channels are + identical, and when decoding a stereo frame in a mono decoder, the mono output + is the average of the left and right channels. +In some cases, it is desirable to encode a stereo input stream in mono (e.g., + because the bitrate is too low to encode stereo with sufficient quality). +The number of channels encoded can be selected in real-time, but by default the + reference encoder attempts to make the best decision possible given the + current bitrate. + +
+ +
+ +The audio bandwidths supported by Opus are listed in + . +Just like for the number of channels, any decoder can decode audio encoded at + any bandwidth. +For example, any Opus decoder operating at 8 kHz can decode a FB Opus + frame, and any Opus decoder operating at 48 kHz can decode a NB frame. +Similarly, the reference encoder can take a 48 kHz input signal and + encode it as NB. +The higher the audio bandwidth, the higher the required bitrate to achieve + acceptable quality. +The audio bandwidth can be explicitly specified in real-time, but by default + the reference encoder attempts to make the best bandwidth decision possible + given the current bitrate. + +
+ + +
+ +Opus can encode frames of 2.5, 5, 10, 20, 40 or 60 ms. +It can also combine multiple frames into packets of up to 120 ms. +For real-time applications, sending fewer packets per second reduces the + bitrate, since it reduces the overhead from IP, UDP, and RTP headers. +However, it increases latency and sensitivity to packet losses, as losing one + packet constitutes a loss of a bigger chunk of audio. +Increasing the frame duration also slightly improves coding efficiency, but the + gain becomes small for frame sizes above 20 ms. +For this reason, 20 ms frames are a good choice for most applications. + +
+ +
+ +There are various aspects of the Opus encoding process where trade-offs +can be made between CPU complexity and quality/bitrate. In the reference +encoder, the complexity is selected using an integer from 0 to 10, where +0 is the lowest complexity and 10 is the highest. Examples of +computations for which such trade-offs may occur are: + +The order of the pitch analysis whitening filter , +The order of the short-term noise shaping filter, +The number of states in delayed decision quantization of the +residual signal, and +The use of certain bit-stream features such as variable time-frequency +resolution and the pitch post-filter. + + +
+ +
+ +Audio codecs often exploit inter-frame correlations to reduce the +bitrate at a cost in error propagation: after losing one packet +several packets need to be received before the decoder is able to +accurately reconstruct the speech signal. The extent to which Opus +exploits inter-frame dependencies can be adjusted on the fly to +choose a trade-off between bitrate and amount of error propagation. + +
+ +
+ + Another mechanism providing robustness against packet loss is the in-band + Forward Error Correction (FEC). Packets that are determined to + contain perceptually important speech information, such as onsets or + transients, are encoded again at a lower bitrate and this re-encoded + information is added to a subsequent packet. + +
+ +
+ +Opus is more efficient when operating with variable bitrate (VBR), which is +the default. However, in some (rare) applications, constant bitrate (CBR) +is required. There are two main reasons to operate in CBR mode: + +When the transport only supports a fixed size for each compressed frame +When encryption is used for an audio stream that is either highly constrained + (e.g. yes/no, recorded prompts) or highly sensitive + + +When low-latency transmission is required over a relatively slow connection, then +constrained VBR can also be used. This uses VBR in a way that simulates a +"bit reservoir" and is equivalent to what MP3 (MPEG 1, Layer 3) and +AAC (Advanced Audio Coding) call CBR (i.e., not true +CBR due to the bit reservoir). + +
+ +
+ + Discontinuous Transmission (DTX) reduces the bitrate during silence + or background noise. When DTX is enabled, only one frame is encoded + every 400 milliseconds. + +
+ +
+ +
+ +
+ + +The Opus encoder produces "packets", which are each a contiguous set of bytes + meant to be transmitted as a single unit. +The packets described here do not include such things as IP, UDP, or RTP + headers which are normally found in a transport-layer packet. +A single packet may contain multiple audio frames, so long as they share a + common set of parameters, including the operating mode, audio bandwidth, frame + size, and channel count (mono vs. stereo). +This section describes the possible combinations of these parameters and the + internal framing used to pack multiple frames into a single packet. +This framing is not self-delimiting. +Instead, it assumes that a higher layer (such as UDP or RTP +or Ogg or Matroska ) + will communicate the length, in bytes, of the packet, and it uses this + information to reduce the framing overhead in the packet itself. +A decoder implementation MUST support the framing described in this section. +An alternative, self-delimiting variant of the framing is described in + . +Support for that variant is OPTIONAL. + + + +All bit diagrams in this document number the bits so that bit 0 is the most + significant bit of the first byte, and bit 7 is the least significant. +Bit 8 is thus the most significant bit of the second byte, etc. +Well-formed Opus packets obey certain requirements, marked [R1] through [R7] + below. +These are summarized in along with + appropriate means of handling malformed packets. + + +
+ +A well-formed Opus packet MUST contain at least one byte [R1]. +This byte forms a table-of-contents (TOC) header that signals which of the + various modes and configurations a given packet uses. +It is composed of a configuration number, "config", a stereo flag, "s", and a + frame count code, "c", arranged as illustrated in + . +A description of each of these fields follows. + + +
+ +
+ + +The top five bits of the TOC byte, labeled "config", encode one of 32 possible + configurations of operating mode, audio bandwidth, and frame size. +As described, the LP (SILK) layer and MDCT (CELT) layer can be combined in three possible + operating modes: + +A SILK-only mode for use in low bitrate connections with an audio bandwidth + of WB or less, +A Hybrid (SILK+CELT) mode for SWB or FB speech at medium bitrates, and +A CELT-only mode for very low delay speech transmission as well as music + transmission (NB to FB). + +The 32 possible configurations each identify which one of these operating modes + the packet uses, as well as the audio bandwidth and the frame size. + lists the parameters for each configuration. + + +Configuration Number(s) +Mode +Bandwidth +Frame Sizes +0...3 SILK-only NB 10, 20, 40, 60 ms +4...7 SILK-only MB 10, 20, 40, 60 ms +8...11 SILK-only WB 10, 20, 40, 60 ms +12...13 Hybrid SWB 10, 20 ms +14...15 Hybrid FB 10, 20 ms +16...19 CELT-only NB 2.5, 5, 10, 20 ms +20...23 CELT-only WB 2.5, 5, 10, 20 ms +24...27 CELT-only SWB 2.5, 5, 10, 20 ms +28...31 CELT-only FB 2.5, 5, 10, 20 ms + + +The configuration numbers in each range (e.g., 0...3 for NB SILK-only) + correspond to the various choices of frame size, in the same order. +For example, configuration 0 has a 10 ms frame size and configuration 3 + has a 60 ms frame size. + + + +One additional bit, labeled "s", signals mono vs. stereo, with 0 indicating + mono and 1 indicating stereo. + + + +The remaining two bits of the TOC byte, labeled "c", code the number of frames + per packet (codes 0 to 3) as follows: + +0: 1 frame in the packet +1: 2 frames in the packet, each with equal compressed size +2: 2 frames in the packet, with different compressed sizes +3: an arbitrary number of frames in the packet + +This draft refers to a packet as a code 0 packet, code 1 packet, etc., based on + the value of "c". + + +
+ +
+ + +This section describes how frames are packed according to each possible value + of "c" in the TOC byte. + + +
+ +When a packet contains multiple VBR frames (i.e., code 2 or 3), the compressed + length of one or more of these frames is indicated with a one- or two-byte + sequence, with the meaning of the first byte as follows: + +0: No frame (discontinuous transmission (DTX) or lost packet) +1...251: Length of the frame in bytes +252...255: A second byte is needed. The total length is (second_byte*4)+first_byte + + + + +The special length 0 indicates that no frame is available, either because it + was dropped during transmission by some intermediary or because the encoder + chose not to transmit it. +Any Opus frame in any mode MAY have a length of 0. + + + +The maximum representable length is 255*4+255=1275 bytes. +For 20 ms frames, this represents a bitrate of 510 kb/s, which is + approximately the highest useful rate for lossily compressed fullband stereo + music. +Beyond this point, lossless codecs are more appropriate. +It is also roughly the maximum useful rate of the MDCT layer, as shortly + thereafter quality no longer improves with additional bits due to limitations + on the codebook sizes. + + + +No length is transmitted for the last frame in a VBR packet, or for any of the + frames in a CBR packet, as it can be inferred from the total size of the + packet and the size of all other data in the packet. +However, the length of any individual frame MUST NOT exceed + 1275 bytes [R2], to allow for repacketization by gateways, + conference bridges, or other software. + +
+ +
+ + +For code 0 packets, the TOC byte is immediately followed by N-1 bytes + of compressed data for a single frame (where N is the size of the packet), + as illustrated in . + +
+ +
+
+ +
+ +For code 1 packets, the TOC byte is immediately followed by the + (N-1)/2 bytes of compressed data for the first frame, followed by + (N-1)/2 bytes of compressed data for the second frame, as illustrated in + . +The number of payload bytes available for compressed data, N-1, MUST be even + for all code 1 packets [R3]. + +
+ +
+
+ +
+ +For code 2 packets, the TOC byte is followed by a one- or two-byte sequence + indicating the length of the first frame (marked N1 in ), + followed by N1 bytes of compressed data for the first frame. +The remaining N-N1-2 or N-N1-3 bytes are the compressed data for the + second frame. +This is illustrated in . +A code 2 packet MUST contain enough bytes to represent a valid length. +For example, a 1-byte code 2 packet is always invalid, and a 2-byte code 2 + packet whose second byte is in the range 252...255 is also invalid. +The length of the first frame, N1, MUST also be no larger than the size of the + payload remaining after decoding that length for all code 2 packets [R4]. +This makes, for example, a 2-byte code 2 packet with a second byte in the range + 1...251 invalid as well (the only valid 2-byte code 2 packet is one where the + length of both frames is zero). + +
+ +
+
+ +
+ +Code 3 packets signal the number of frames, as well as additional + padding, called "Opus padding" to indicate that this padding is added at the + Opus layer, rather than at the transport layer. +Code 3 packets MUST have at least 2 bytes [R6,R7]. +The TOC byte is followed by a byte encoding the number of frames in the packet + in bits 2 to 7 (marked "M" in ), with bit 1 indicating whether + or not Opus padding is inserted (marked "p" in ), and bit 0 + indicating VBR (marked "v" in ). +M MUST NOT be zero, and the audio duration contained within a packet MUST NOT + exceed 120 ms [R5]. +This limits the maximum frame count for any frame size to 48 (for 2.5 ms + frames), with lower limits for longer frame sizes. + illustrates the layout of the frame count + byte. + +
+ +
+ +When Opus padding is used, the number of bytes of padding is encoded in the + bytes following the frame count byte. +Values from 0...254 indicate that 0...254 bytes of padding are included, + in addition to the byte(s) used to indicate the size of the padding. +If the value is 255, then the size of the additional padding is 254 bytes, + plus the padding value encoded in the next byte. +There MUST be at least one more byte in the packet in this case [R6,R7]. +The additional padding bytes appear at the end of the packet, and MUST be set + to zero by the encoder to avoid creating a covert channel. +The decoder MUST accept any value for the padding bytes, however. + + +Although this encoding provides multiple ways to indicate a given number of + padding bytes, each uses a different number of bytes to indicate the padding + size, and thus will increase the total packet size by a different amount. +For example, to add 255 bytes to a packet, set the padding bit, p, to 1, insert + a single byte after the frame count byte with a value of 254, and append 254 + padding bytes with the value zero to the end of the packet. +To add 256 bytes to a packet, set the padding bit to 1, insert two bytes after + the frame count byte with the values 255 and 0, respectively, and append 254 + padding bytes with the value zero to the end of the packet. +By using the value 255 multiple times, it is possible to create a packet of any + specific, desired size. +Let P be the number of header bytes used to indicate the padding size plus the + number of padding bytes themselves (i.e., P is the total number of bytes added + to the packet). +Then P MUST be no more than N-2 [R6,R7]. + + +In the CBR case, let R=N-2-P be the number of bytes remaining in the packet + after subtracting the (optional) padding. +Then the compressed length of each frame in bytes is equal to R/M. +The value R MUST be a non-negative integer multiple of M [R6]. +The compressed data for all M frames follows, each of size + R/M bytes, as illustrated in . + + +
+ +
+ + +In the VBR case, the (optional) padding length is followed by M-1 frame + lengths (indicated by "N1" to "N[M-1]" in ), each encoded in a + one- or two-byte sequence as described above. +The packet MUST contain enough data for the M-1 lengths after removing the + (optional) padding, and the sum of these lengths MUST be no larger than the + number of bytes remaining in the packet after decoding them [R7]. +The compressed data for all M frames follows, each frame consisting of the + indicated number of bytes, with the final frame consuming any remaining bytes + before the final padding, as illustrated in . +The number of header bytes (TOC byte, frame count byte, padding length bytes, + and frame length bytes), plus the signaled length of the first M-1 frames themselves, + plus the signaled length of the padding MUST be no larger than N, the total size of the + packet. + + +
+ +
+
+
+ +
+ +Simplest case, one NB mono 20 ms SILK frame: + + +
+ +
+ + +Two FB mono 5 ms CELT frames of the same compressed size: + + +
+ +
+ + +Two FB mono 20 ms Hybrid frames of different compressed size: + + +
+ +
+ + +Four FB stereo 20 ms CELT frames of the same compressed size: + + +
+ +
+
+ +
+ +A receiver MUST NOT process packets which violate any of the rules above as + normal Opus packets. +They are reserved for future applications, such as in-band headers (containing + metadata, etc.). +Packets which violate these constraints may cause implementations of + this specification to treat them as malformed, and + discard them. + + +These constraints are summarized here for reference: + +Packets are at least one byte. +No implicit frame length is larger than 1275 bytes. +Code 1 packets have an odd total length, N, so that (N-1)/2 is an + integer. +Code 2 packets have enough bytes after the TOC for a valid frame + length, and that length is no larger than the number of bytes remaining in the + packet. +Code 3 packets contain at least one frame, but no more than 120 ms + of audio total. +The length of a CBR code 3 packet, N, is at least two bytes, the number of + bytes added to indicate the padding size plus the trailing padding bytes + themselves, P, is no more than N-2, and the frame count, M, satisfies + the constraint that (N-2-P) is a non-negative integer multiple of M. +VBR code 3 packets are large enough to contain all the header bytes (TOC + byte, frame count byte, any padding length bytes, and any frame length bytes), + plus the length of the first M-1 frames, plus any trailing padding bytes. + + +
+ +
+ +
+ +The Opus decoder consists of two main blocks: the SILK decoder and the CELT + decoder. +At any given time, one or both of the SILK and CELT decoders may be active. +The output of the Opus decode is the sum of the outputs from the SILK and CELT + decoders with proper sample rate conversion and delay compensation on the SILK + side, and optional decimation (when decoding to sample rates less than + 48 kHz) on the CELT side, as illustrated in the block diagram below. + +
+ +| Decoder |--->| Rate |----+ +Bit- +---------+ | | | | Conversion | v +stream | Range |---+ +---------+ +------------+ /---\ Audio +------->| Decoder | | + |------> + | |---+ +---------+ +------------+ \---/ + +---------+ | | CELT | | Decimation | ^ + +->| Decoder |--->| (Optional) |----+ + | | | | + +---------+ +------------+ +]]> + +
+ +
+ +Opus uses an entropy coder based on range coding +, +which is itself a rediscovery of the FIFO arithmetic code introduced by . +It is very similar to arithmetic encoding, except that encoding is done with +digits in any base instead of with bits, +so it is faster when using larger bases (i.e., a byte). All of the +calculations in the range coder must use bit-exact integer arithmetic. + + +Symbols may also be coded as "raw bits" packed directly into the bitstream, + bypassing the range coder. +These are packed backwards starting at the end of the frame, as illustrated in + . +This reduces complexity and makes the stream more resilient to bit errors, as + corruption in the raw bits will not desynchronize the decoding process, unlike + corruption in the input to the range decoder. +Raw bits are only used in the CELT layer. + + +
+ : ++ + +: : ++ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +: | <- Boundary occurs at an arbitrary bit position : ++-+-+-+ + +: <- Raw bits data (packed LSB to MSB) | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +]]> +
+ + +Each symbol coded by the range coder is drawn from a finite alphabet and coded + in a separate "context", which describes the size of the alphabet and the + relative frequency of each symbol in that alphabet. + + +Suppose there is a context with n symbols, identified with an index that ranges + from 0 to n-1. +The parameters needed to encode or decode symbol k in this context are + represented by a three-tuple (fl[k], fh[k], ft), with + 0 <= fl[k] < fh[k] <= ft <= 65535. +The values of this tuple are derived from the probability model for the + symbol, represented by traditional "frequency counts". +Because Opus uses static contexts these are not updated as symbols are decoded. +Let f[i] be the frequency of symbol i. +Then the three-tuple corresponding to symbol k is given by + +
+ +
+ +The range decoder extracts the symbols and integers encoded using the range + encoder in . +The range decoder maintains an internal state vector composed of the two-tuple + (val, rng), representing the difference between the high end of the + current range and the actual coded value, minus one, and the size of the + current range, respectively. +Both val and rng are 32-bit unsigned integer values. + + +
+ +Let b0 be the first input byte (or zero if there are no bytes in this Opus + frame). +The decoder initializes rng to 128 and initializes val to + (127 - (b0>>1)), where (b0>>1) is the top 7 bits of the + first input byte. +It saves the remaining bit, (b0&1), for use in the renormalization + procedure described in , which the + decoder invokes immediately after initialization to read additional bits and + establish the invariant that rng > 2**23. + +
+ +
+ +Decoding a symbol is a two-step process. +The first step determines a 16-bit unsigned value fs, which lies within the + range of some symbol in the current context. +The second step updates the range decoder state with the three-tuple + (fl[k], fh[k], ft) corresponding to that symbol. + + +The first step is implemented by ec_decode() (entdec.c), which computes +
+ +
+The divisions here are integer division. +
+ +The decoder then identifies the symbol in the current context corresponding to + fs; i.e., the value of k whose three-tuple (fl[k], fh[k], ft) + satisfies fl[k] <= fs < fh[k]. +It uses this tuple to update val according to +
+ +
+If fl[k] is greater than zero, then the decoder updates rng using +
+ +
+Otherwise, it updates rng using +
+ +
+
+ +Using a special case for the first symbol (rather than the last symbol, as is + commonly done in other arithmetic coders) ensures that all the truncation + error from the finite precision arithmetic accumulates in symbol 0. +This makes the cost of coding a 0 slightly smaller, on average, than its + estimated probability indicates and makes the cost of coding any other symbol + slightly larger. +When contexts are designed so that 0 is the most probable symbol, which is + often the case, this strategy minimizes the inefficiency introduced by the + finite precision. +It also makes some of the special-case decoding routines in + particularly simple. + + +After the updates, implemented by ec_dec_update() (entdec.c), the decoder + normalizes the range using the procedure in the next section, and returns the + index k. + + +
+ +To normalize the range, the decoder repeats the following process, implemented + by ec_dec_normalize() (entdec.c), until rng > 2**23. +If rng is already greater than 2**23, the entire process is skipped. +First, it sets rng to (rng<<8). +Then it reads the next byte of the Opus frame and forms an 8-bit value sym, + using the left-over bit buffered from the previous byte as the high bit + and the top 7 bits of the byte just read as the other 7 bits of sym. +The remaining bit in the byte just read is buffered for use in the next + iteration. +If no more input bytes remain, it uses zero bits instead. +See for the initialization used to process + the first byte. +Then, it sets +
+ +
+
+ +It is normal and expected that the range decoder will read several bytes + into the raw bits data (if any) at the end of the packet by the time the frame + is completely decoded, as illustrated in . +This same data MUST also be returned as raw bits when requested. +The encoder is expected to terminate the stream in such a way that the decoder + will decode the intended values regardless of the data contained in the raw + bits. + describes a procedure for doing this. +If the range decoder consumes all of the bytes belonging to the current frame, + it MUST continue to use zero when any further input bytes are required, even + if there is additional data in the current packet from padding or other + frames. + + +
+ | : ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + ^ ^ + | End of data buffered by the range coder | +...-----------------------------------------------+ + | + | End of data consumed by raw bits + +-------------------------------------------------------... +]]> +
+
+
+ +
+ +The reference implementation uses three additional decoding methods that are + exactly equivalent to the above, but make assumptions and simplifications that + allow for a more efficient implementation. + +
+ +The first is ec_decode_bin() (entdec.c), defined using the parameter ftb + instead of ft. +It is mathematically equivalent to calling ec_decode() with + ft = (1<<ftb), but avoids one of the divisions. + +
+
+ +The next is ec_dec_bit_logp() (entdec.c), which decodes a single binary symbol, + replacing both the ec_decode() and ec_dec_update() steps. +The context is described by a single parameter, logp, which is the absolute + value of the base-2 logarithm of the probability of a "1". +It is mathematically equivalent to calling ec_decode() with + ft = (1<<logp), followed by ec_dec_update() with + the 3-tuple (fl[k] = 0, + fh[k] = (1<<logp) - 1, + ft = (1<<logp)) if the returned value + of fs is less than (1<<logp) - 1 (a "0" was decoded), and with + (fl[k] = (1<<logp) - 1, + fh[k] = ft = (1<<logp)) otherwise (a "1" was + decoded). +The implementation requires no multiplications or divisions. + +
+
+ +The last is ec_dec_icdf() (entdec.c), which decodes a single symbol with a + table-based context of up to 8 bits, also replacing both the ec_decode() and + ec_dec_update() steps, as well as the search for the decoded symbol in between. +The context is described by two parameters, an icdf + ("inverse" cumulative distribution function) table and ftb. +As with ec_decode_bin(), (1<<ftb) is equivalent to ft. +idcf[k], on the other hand, stores (1<<ftb)-fh[k], which is equal to + (1<<ftb) - fl[k+1]. +fl[0] is assumed to be 0, and the table is terminated by a value of 0 (where + fh[k] == ft). + + +The function is mathematically equivalent to calling ec_decode() with + ft = (1<<ftb), using the returned value fs to search the table + for the first entry where fs < (1<<ftb)-icdf[k], and + calling ec_dec_update() with + fl[k] = (1<<ftb) - icdf[k-1] (or 0 + if k == 0), fh[k] = (1<<ftb) - idcf[k], + and ft = (1<<ftb). +Combining the search with the update allows the division to be replaced by a + series of multiplications (which are usually much cheaper), and using an + inverse CDF allows the use of an ftb as large as 8 in an 8-bit table without + any special cases. +This is the primary interface with the range decoder in the SILK layer, though + it is used in a few places in the CELT layer as well. + + +Although icdf[k] is more convenient for the code, the frequency counts, f[k], + are a more natural representation of the probability distribution function + (PDF) for a given symbol. +Therefore this draft lists the latter, not the former, when describing the + context in which a symbol is coded as a list, e.g., {4, 4, 4, 4}/16 for a + uniform context with four possible values and ft = 16. +The value of ft after the slash is always the sum of the entries in the PDF, + but is included for convenience. +Contexts with identical probabilities, f[k]/ft, but different values of ft + (or equivalently, ftb) are not the same, and cannot, in general, be used in + place of one another. +An icdf table is also not capable of representing a PDF where the first symbol + has 0 probability. +In such contexts, ec_dec_icdf() can decode the symbol by using a table that + drops the entries for any initial zero-probability values and adding the + constant offset of the first value with a non-zero probability to its return + value. + +
+
+ +
+ +The raw bits used by the CELT layer are packed at the end of the packet, with + the least significant bit of the first value packed in the least significant + bit of the last byte, filling up to the most significant bit in the last byte, + continuing on to the least significant bit of the penultimate byte, and so on. +The reference implementation reads them using ec_dec_bits() (entdec.c). +Because the range decoder must read several bytes ahead in the stream, as + described in , the input consumed by the + raw bits may overlap with the input consumed by the range coder, and a decoder + MUST allow this. +The format should render it impossible to attempt to read more raw bits than + there are actual bits in the frame, though a decoder may wish to check for + this and report an error. + +
+ +
+ +The function ec_dec_uint() (entdec.c) decodes one of ft equiprobable values in + the range 0 to (ft - 1), inclusive, each with a frequency of 1, + where ft may be as large as (2**32 - 1). +Because ec_decode() is limited to a total frequency of (2**16 - 1), + it splits up the value into a range coded symbol representing up to 8 of the + high bits, and, if necessary, raw bits representing the remainder of the + value. +The limit of 8 bits in the range coded symbol is a trade-off between + implementation complexity, modeling error (since the symbols no longer truly + have equal coding cost), and rounding error introduced by the range coder + itself (which gets larger as more bits are included). +Using raw bits reduces the maximum number of divisions required in the worst + case, but means that it may be possible to decode a value outside the range + 0 to (ft - 1), inclusive. + + + +ec_dec_uint() takes a single, positive parameter, ft, which is not necessarily + a power of two, and returns an integer, t, whose value lies between 0 and + (ft - 1), inclusive. +Let ftb = ilog(ft - 1), i.e., the number of bits required + to store (ft - 1) in two's complement notation. +If ftb is 8 or less, then t is decoded with t = ec_decode(ft), and + the range coder state is updated using the three-tuple (t, t + 1, + ft). + + +If ftb is greater than 8, then the top 8 bits of t are decoded using +
+> (ftb - 8)) + 1) , +]]> +
+ the decoder state is updated using the three-tuple + (t, t + 1, + ((ft - 1) >> (ftb - 8)) + 1), + and the remaining bits are decoded as raw bits, setting +
+ +
+If, at this point, t >= ft, then the current frame is corrupt. +In that case, the decoder should assume there has been an error in the coding, + decoding, or transmission and SHOULD take measures to conceal the + error and/or report to the application that the error has occurred. +
+ +
+ +
+ +The bit allocation routines in the CELT decoder need a conservative upper bound + on the number of bits that have been used from the current frame thus far, + including both range coder bits and raw bits. +This drives allocation decisions that must match those made in the encoder. +The upper bound is computed in the reference implementation to whole-bit + precision by the function ec_tell() (entcode.h) and to fractional 1/8th bit + precision by the function ec_tell_frac() (entcode.c). +Like all operations in the range coder, it must be implemented in a bit-exact + manner, and must produce exactly the same value returned by the same functions + in the encoder after encoding the same symbols. + + +ec_tell() is guaranteed to return ceil(ec_tell_frac()/8.0). +In various places the codec will check to ensure there is enough room to + contain a symbol before attempting to decode it. +In practice, although the number of bits used so far is an upper bound, + decoding a symbol whose probability model suggests it has a worst-case cost of + p 1/8th bits may actually advance the return value of ec_tell_frac() by + p-1, p, or p+1 1/8th bits, due to approximation error in that upper bound, + truncation error in the range coder, and for large values of ft, modeling + error in ec_dec_uint(). + + +However, this error is bounded, and periodic calls to ec_tell() or + ec_tell_frac() at precisely defined points in the decoding process prevent it + from accumulating. +For a range coder symbol that requires a whole number of bits (i.e., + for which ft/(fh[k] - fl[k]) is a power of two), where there are at + least p 1/8th bits available, decoding the symbol will never cause ec_tell() or + ec_tell_frac() to exceed the size of the frame ("bust the budget"). +In this case the return value of ec_tell_frac() will only advance by more than + p 1/8th bits if there was an additional, fractional number of bits remaining, + and it will never advance beyond the next whole-bit boundary, which is safe, + since frames always contain a whole number of bits. +However, when p is not a whole number of bits, an extra 1/8th bit is required + to ensure that decoding the symbol will not bust the budget. + + +The reference implementation keeps track of the total number of whole bits that + have been processed by the decoder so far in the variable nbits_total, + including the (possibly fractional) number of bits that are currently + buffered, but not consumed, inside the range coder. +nbits_total is initialized to 9 just before the initial range renormalization + process completes (or equivalently, it can be initialized to 33 after the + first renormalization). +The extra two bits over the actual amount buffered by the range coder + guarantees that it is an upper bound and that there is enough room for the + encoder to terminate the stream. +Each iteration through the range coder's renormalization loop increases + nbits_total by 8. +Reading raw bits increases nbits_total by the number of raw bits read. + + +
+ +The whole number of bits buffered in rng may be estimated via lg = ilog(rng). +ec_tell() then becomes a simple matter of removing these bits from the total. +It returns (nbits_total - lg). + + +In a newly initialized decoder, before any symbols have been read, this reports + that 1 bit has been used. +This is the bit reserved for termination of the encoder. + +
+ +
+ +ec_tell_frac() estimates the number of bits buffered in rng to fractional + precision. +Since rng must be greater than 2**23 after renormalization, lg must be at least + 24. +Let +
+ +> (lg-16) , +]]> +
+ so that 32768 <= r_Q15 < 65536, an unsigned Q15 value representing the + fractional part of rng. +Then the following procedure can be used to add one bit of precision to lg. +First, update +
+ +> 15 . +]]> +
+Then add the 16th bit of r_Q15 to lg via +
+ +> 16) . +]]> +
+Finally, if this bit was a 1, reduce r_Q15 by a factor of two via +
+ +> 1 , +]]> +
+ so that it once again lies in the range 32768 <= r_Q15 < 65536. +
+ +This procedure is repeated three times to extend lg to 1/8th bit precision. +ec_tell_frac() then returns (nbits_total*8 - lg). + +
+ +
+ +
+ +
+ +The decoder's LP layer uses a modified version of the SILK codec (herein simply + called "SILK"), which runs a decoded excitation signal through adaptive + long-term and short-term prediction synthesis filters. +It runs at NB, MB, and WB sample rates internally. +When used in a SWB or FB Hybrid frame, the LP layer itself still only runs in + WB. + + +
+ +An overview of the decoder is given in . + +
+ +| Range |--->| Decode |---------------------------+ + 1 | Decoder | 2 | Parameters |----------+ 5 | + +---------+ +------------+ 4 | | + 3 | | | + \/ \/ \/ + +------------+ +------------+ +------------+ + | Generate |-->| LTP |-->| LPC | + | Excitation | | Synthesis | | Synthesis | + +------------+ +------------+ +------------+ + ^ | + | | + +-------------------+----------------+ + | 6 + | +------------+ +-------------+ + +-->| Stereo |-->| Sample Rate |--> + | Unmixing | 7 | Conversion | 8 + +------------+ +-------------+ + +1: Range encoded bitstream +2: Coded parameters +3: Pulses, LSBs, and signs +4: Pitch lags, Long-Term Prediction (LTP) coefficients +5: Linear Predictive Coding (LPC) coefficients and gains +6: Decoded signal (mono or mid-side stereo) +7: Unmixed signal (mono or left-right stereo) +8: Resampled signal +]]> + +
+ + +The decoder feeds the bitstream (1) to the range decoder from + , and then decodes the parameters in it (2) + using the procedures detailed in + Sections  + through . +These parameters (3, 4, 5) are used to generate an excitation signal (see + ), which is fed to an optional + long-term prediction (LTP) filter (voiced frames only, see + ) and then a short-term prediction filter + (see ), producing the decoded signal (6). +For stereo streams, the mid-side representation is converted to separate left + and right channels (7). +The result is finally resampled to the desired output sample rate (e.g., + 48 kHz) so that the resampled signal (8) can be mixed with the CELT + layer. + + +
+ +
+ + +Internally, the LP layer of a single Opus frame is composed of either a single + 10 ms regular SILK frame or between one and three 20 ms regular SILK + frames. +A stereo Opus frame may double the number of regular SILK frames (up to a total + of six), since it includes separate frames for a mid channel and, optionally, + a side channel. +Optional Low Bit-Rate Redundancy (LBRR) frames, which are reduced-bitrate + encodings of previous SILK frames, may be included to aid in recovery from + packet loss. +If present, these appear before the regular SILK frames. +They are in most respects identical to regular, active SILK frames, except that + they are usually encoded with a lower bitrate. +This draft uses "SILK frame" to refer to either one and "regular SILK frame" if + it needs to draw a distinction between the two. + + +Logically, each SILK frame is in turn composed of either two or four 5 ms + subframes. +Various parameters, such as the quantization gain of the excitation and the + pitch lag and filter coefficients can vary on a subframe-by-subframe basis. +Physically, the parameters for each subframe are interleaved in the bitstream, + as described in the relevant sections for each parameter. + + +All of these frames and subframes are decoded from the same range coder, with + no padding between them. +Thus packing multiple SILK frames in a single Opus frame saves, on average, + half a byte per SILK frame. +It also allows some parameters to be predicted from prior SILK frames in the + same Opus frame, since this does not degrade packet loss robustness (beyond + any penalty for merely using fewer, larger packets to store multiple frames). + + + +Stereo support in SILK uses a variant of mid-side coding, allowing a mono + decoder to simply decode the mid channel. +However, the data for the two channels is interleaved, so a mono decoder must + still unpack the data for the side channel. +It would be required to do so anyway for Hybrid Opus frames, or to support + decoding individual 20 ms frames. + + + + summarizes the overall grouping of the contents of + the LP layer. +Figures  + and  illustrate + the ordering of the various SILK frames for a 60 ms Opus frame, for both + mono and stereo, respectively. + + + +Symbol(s) +PDF(s) +Condition + +Voice Activity Detection (VAD) flags +{1, 1}/2 + + +LBRR flag +{1, 1}/2 + + +Per-frame LBRR flags + + + +LBRR Frame(s) + + + +Regular SILK Frame(s) + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +The LP layer begins with two to eight header bits, decoded in silk_Decode() + (dec_API.c). +These consist of one Voice Activity Detection (VAD) bit per frame (up to 3), + followed by a single flag indicating the presence of LBRR frames. +For a stereo packet, these first flags correspond to the mid channel, and a + second set of flags is included for the side channel. + + +Because these are the first symbols decoded by the range coder and because they + are coded as binary values with uniform probability, they can be extracted + directly from the most significant bits of the first byte of compressed data. +Thus, a receiver can determine if an Opus frame contains any active SILK frames + without the overhead of using the range decoder. + +
+ +
+ +For Opus frames longer than 20 ms, a set of LBRR flags is + decoded for each channel that has its LBRR flag set. +Each set contains one flag per 20 ms SILK frame. +40 ms Opus frames use the 2-frame LBRR flag PDF from + , and 60 ms Opus frames use the + 3-frame LBRR flag PDF. +For each channel, the resulting 2- or 3-bit integer contains the corresponding + LBRR flag for each frame, packed in order from the LSB to the MSB. + + + +Frame Size +PDF +40 ms {0, 53, 53, 150}/256 +60 ms {0, 41, 20, 29, 41, 15, 28, 82}/256 + + + +A 10 or 20 ms Opus frame does not contain any per-frame LBRR flags, + as there may be at most one LBRR frame per channel. +The global LBRR flag in the header bits (see ) + is already sufficient to indicate the presence of that single LBRR frame. + + +
+ +
+ +The LBRR frames, if present, contain an encoded representation of the signal + immediately prior to the current Opus frame as if it were encoded with the + current mode, frame size, audio bandwidth, and channel count, even if those + differ from the prior Opus frame. +When one of these parameters changes from one Opus frame to the next, this + implies that the LBRR frames of the current Opus frame may not be simple + drop-in replacements for the contents of the previous Opus frame. + + + +For example, when switching from 20 ms to 60 ms, the 60 ms Opus + frame may contain LBRR frames covering up to three prior 20 ms Opus + frames, even if those frames already contained LBRR frames covering some of + the same time periods. +When switching from 20 ms to 10 ms, the 10 ms Opus frame can + contain an LBRR frame covering at most half the prior 20 ms Opus frame, + potentially leaving a hole that needs to be concealed from even a single + packet loss (see ). +When switching from mono to stereo, the LBRR frames in the first stereo Opus + frame MAY contain a non-trivial side channel. + + + +In order to properly produce LBRR frames under all conditions, an encoder might + need to buffer up to 60 ms of audio and re-encode it during these + transitions. +However, the reference implementation opts to disable LBRR frames at the + transition point for simplicity. +Since transitions are relatively infrequent in normal usage, this does not have + a significant impact on packet loss robustness. + + + +The LBRR frames immediately follow the LBRR flags, prior to any regular SILK + frames. + describes their exact contents. +LBRR frames do not include their own separate VAD flags. +LBRR frames are only meant to be transmitted for active speech, thus all LBRR + frames are treated as active. + + + +In a stereo Opus frame longer than 20 ms, although the per-frame LBRR + flags for the mid channel are coded as a unit before the per-frame LBRR flags + for the side channel, the LBRR frames themselves are interleaved. +The decoder parses an LBRR frame for the mid channel of a given 20 ms + interval (if present) and then immediately parses the corresponding LBRR + frame for the side channel (if present), before proceeding to the next + 20 ms interval. + +
+ +
+ +The regular SILK frame(s) follow the LBRR frames (if any). + describes their contents, as well. +Unlike the LBRR frames, a regular SILK frame is coded for each time interval in + an Opus frame, even if the corresponding VAD flags are unset. +For stereo Opus frames longer than 20 ms, the regular mid and side SILK + frames for each 20 ms interval are interleaved, just as with the LBRR + frames. +The side frame may be skipped by coding an appropriate flag, as detailed in + . + +
+ +
+ +Each SILK frame includes a set of side information that encodes + +The frame type and quantization type (), +Quantization gains (), +Short-term prediction filter coefficients (), +A Line Spectral Frequencies (LSF) interpolation weight (), + +Long-term prediction filter lags and gains (), + and + +A linear congruential generator (LCG) seed (). + +The quantized excitation signal (see ) follows + these at the end of the frame. + details the overall organization of a + SILK frame. + + + +Symbol(s) +PDF(s) +Condition + +Stereo Prediction Weights + + + +Mid-only Flag + + + +Frame Type + + + +Subframe Gains + + + +Normalized LSF Stage-1 Index + + + +Normalized LSF Stage-2 Residual + + + +Normalized LSF Interpolation Weight + +20 ms frame + +Primary Pitch Lag + +Voiced frame + +Subframe Pitch Contour + +Voiced frame + +Periodicity Index + +Voiced frame + +LTP Filter + +Voiced frame + +LTP Scaling + + + +LCG Seed + + + +Excitation Rate Level + + + +Excitation Pulse Counts + + + +Excitation Pulse Locations + +Non-zero pulse count + +Excitation LSBs + + + +Excitation Signs + + + + + +
+ +A SILK frame corresponding to the mid channel of a stereo Opus frame begins + with a pair of side channel prediction weights, designed such that zeros + indicate normal mid-side coupling. +Since these weights can change on every frame, the first portion of each frame + linearly interpolates between the previous weights and the current ones, using + zeros for the previous weights if none are available. +These prediction weights are never included in a mono Opus frame, and the + previous weights are reset to zeros on any transition from mono to stereo. +They are also not included in an LBRR frame for the side channel, even if the + LBRR flags indicate the corresponding mid channel was not coded. +In that case, the previous weights are used, again substituting in zeros if no + previous weights are available since the last decoder reset + (see ). + + + +To summarize, these weights are coded if and only if + +This is a stereo Opus frame (), and +The current SILK frame corresponds to the mid channel. + + + + +The prediction weights are coded in three separate pieces, which are decoded + by silk_stereo_decode_pred() (decode_stereo_pred.c). +The first piece jointly codes the high-order part of a table index for both + weights. +The second piece codes the low-order part of each table index. +The third piece codes an offset used to linearly interpolate between table + indices. +The details are as follows. + + + +Let n be an index decoded with the 25-element stage-1 PDF in + . +Then let i0 and i1 be indices decoded with the stage-2 and stage-3 PDFs in + , respectively, and let i2 and i3 + be two more indices decoded with the stage-2 and stage-3 PDFs, all in that + order. + + + +Stage +PDF +Stage 1 +{7, 2, 1, 1, 1, + 10, 24, 8, 1, 1, + 3, 23, 92, 23, 3, + 1, 1, 8, 24, 10, + 1, 1, 1, 2, 7}/256 + +Stage 2 +{85, 86, 85}/256 + +Stage 3 +{51, 51, 52, 51, 51}/256 + + + +Then use n, i0, and i2 to form two table indices, wi0 and wi1, according to +
+ +
+ where the division is integer division. +The range of these indices is 0 to 14, inclusive. +Let w[i] be the i'th weight from . +Then the two prediction weights, w0_Q13 and w1_Q13, are +
+> 16)*(2*i3 + 1) + +w0_Q13 = w_Q13[wi0] + + ((w_Q13[wi0+1] - w_Q13[wi0])*6554) >> 16)*(2*i1 + 1) + - w1_Q13 +]]> +
+N.b., w1_Q13 is computed first here, because w0_Q13 depends on it. +The constant 6554 is approximately 0.1 in Q16. +Although wi0 and wi1 only have 15 possible values, + contains 16 entries to allow + interpolation between entry wi0 and (wi0 + 1) (and likewise for wi1). +
+ + +Index +Weight (Q13) + 0 -13732 + 1 -10050 + 2 -8266 + 3 -7526 + 4 -6500 + 5 -5000 + 6 -2950 + 7 -820 + 8 820 + 9 2950 +10 5000 +11 6500 +12 7526 +13 8266 +14 10050 +15 13732 + + +
+ +
+ +A flag appears after the stereo prediction weights that indicates if only the + mid channel is coded for this time interval. +It appears only when + +This is a stereo Opus frame (see ), +The current SILK frame corresponds to the mid channel, and +Either + +This is a regular SILK frame where the VAD flags + (see ) indicate that the corresponding side + channel is not active. + +This is an LBRR frame where the LBRR flags + (see and ) + indicate that the corresponding side channel is not coded. + + + + +It is omitted when there are no stereo weights, for all of the same reasons. +It is also omitted for a regular SILK frame when the VAD flag of the + corresponding side channel frame is set (indicating it is active). +The side channel must be coded in this case, making the mid-only flag + redundant. +It is also omitted for an LBRR frame when the corresponding LBRR flags + indicate the side channel is coded. + + + +When the flag is present, the decoder reads a single value using the PDF in + , as implemented in + silk_stereo_decode_mid_only() (decode_stereo_pred.c). +If the flag is set, then there is no corresponding SILK frame for the side + channel, the entire decoding process for the side channel is skipped, and + zeros are fed to the stereo unmixing process (see + ) instead. +As stated above, LBRR frames still include this flag when the LBRR flag + indicates that the side channel is not coded. +In that case, if this flag is zero (indicating that there should be a side + channel), then Packet Loss Concealment (PLC, see + ) SHOULD be invoked to recover a + side channel signal. +Otherwise, the stereo image will collapse. + + + +PDF +{192, 64}/256 + + +
+ +
+ +Each SILK frame contains a single "frame type" symbol that jointly codes the + signal type and quantization offset type of the corresponding frame. +If the current frame is a regular SILK frame whose VAD bit was not set (an + "inactive" frame), then the frame type symbol takes on a value of either 0 or + 1 and is decoded using the first PDF in . +If the frame is an LBRR frame or a regular SILK frame whose VAD flag was set + (an "active" frame), then the value of the symbol may range from 2 to 5, + inclusive, and is decoded using the second PDF in + . + translates between the value of the + frame type symbol and the corresponding signal type and quantization offset + type. + + + +VAD Flag +PDF +Inactive {26, 230, 0, 0, 0, 0}/256 +Active {0, 0, 24, 74, 148, 10}/256 + + + +Frame Type +Signal Type +Quantization Offset Type +0 Inactive Low +1 Inactive High +2 Unvoiced Low +3 Unvoiced High +4 Voiced Low +5 Voiced High + + +
+ +
+ +A separate quantization gain is coded for each 5 ms subframe. +These gains control the step size between quantization levels of the excitation + signal and, therefore, the quality of the reconstruction. +They are independent of and unrelated to the pitch contours coded for voiced + frames. +The quantization gains are themselves uniformly quantized to 6 bits on a + log scale, giving them a resolution of approximately 1.369 dB and a range + of approximately 1.94 dB to 88.21 dB. + + +The subframe gains are either coded independently, or relative to the gain from + the most recent coded subframe in the same channel. +Independent coding is used if and only if + + +This is the first subframe in the current SILK frame, and + +Either + + +This is the first SILK frame of its type (LBRR or regular) for this channel in + the current Opus frame, or + + +The previous SILK frame of the same type (LBRR or regular) for this channel in + the same Opus frame was not coded. + + + + + + + +In an independently coded subframe gain, the 3 most significant bits of the + quantization gain are decoded using a PDF selected from + based on the decoded signal + type (see ). + + + +Signal Type +PDF +Inactive {32, 112, 68, 29, 12, 1, 1, 1}/256 +Unvoiced {2, 17, 45, 60, 62, 47, 19, 4}/256 +Voiced {1, 3, 26, 71, 94, 50, 9, 2}/256 + + + +The 3 least significant bits are decoded using a uniform PDF: + + +PDF +{32, 32, 32, 32, 32, 32, 32, 32}/256 + + + +These 6 bits are combined to form a value, gain_index, between 0 and 63. +When the gain for the previous subframe is available, then the current gain is + limited as follows: +
+ +
+This may help some implementations limit the change in precision of their + internal LTP history. +The indices which this clamp applies to cannot simply be removed from the + codebook, because previous_log_gain will not be available after packet loss. +The clamping is skipped after a decoder reset, and in the side channel if the + previous frame in the side channel was not coded, since there is no value for + previous_log_gain available. +It MAY also be skipped after packet loss. +
+ + +For subframes which do not have an independent gain (including the first + subframe of frames not listed as using independent coding above), the + quantization gain is coded relative to the gain from the previous subframe (in + the same channel). +The PDF in yields a delta_gain_index value + between 0 and 40, inclusive. + + +PDF +{6, 5, 11, 31, 132, 21, 8, 4, + 3, 2, 2, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1}/256 + + +The following formula translates this index into a quantization gain for the + current subframe using the gain from the previous subframe: +
+ +
+
+ +silk_gains_dequant() (gain_quant.c) dequantizes log_gain for the k'th subframe + and converts it into a linear Q16 scale factor via +
+>16) + 2090) +]]> +
+
+ +The function silk_log2lin() (log2lin.c) computes an approximation of + 2**(inLog_Q7/128.0), where inLog_Q7 is its Q7 input. +Let i = inLog_Q7>>7 be the integer part of inLogQ7 and + f = inLog_Q7&127 be the fractional part. +Then +
+>16)+f)*((1<>7) +]]> +
+ yields the approximate exponential. +The final Q16 gain values lies between 81920 and 1686110208, inclusive + (representing scale factors of 1.25 to 25728, respectively). +
+
+ +
+ +A set of normalized Line Spectral Frequency (LSF) coefficients follow the + quantization gains in the bitstream, and represent the Linear Predictive + Coding (LPC) coefficients for the current SILK frame. +Once decoded, the normalized LSFs form an increasing list of Q15 values between + 0 and 1. +These represent the interleaved zeros on the upper half of the unit circle + (between 0 and pi, hence "normalized") in the standard decomposition + of the LPC filter into a symmetric part + and an anti-symmetric part (P and Q in ). +Because of non-linear effects in the decoding process, an implementation SHOULD + match the fixed-point arithmetic described in this section exactly. +An encoder SHOULD also use the same process. + + +The normalized LSFs are coded using a two-stage vector quantizer (VQ) + ( and ). +NB and MB frames use an order-10 predictor, while WB frames use an order-16 + predictor, and thus have different sets of tables. +After reconstructing the normalized LSFs + (), the decoder runs them through a + stabilization process (), interpolates + them between frames (), converts them + back into LPC coefficients (), and then runs + them through further processes to limit the range of the coefficients + () and the gain of the filter + (). +All of this is necessary to ensure the reconstruction process is stable. + + +
+ +The first VQ stage uses a 32-element codebook, coded with one of the PDFs in + , depending on the audio bandwidth and + the signal type of the current SILK frame. +This yields a single index, I1, for the entire frame, which + +Indexes an element in a coarse codebook, +Selects the PDFs for the second stage of the VQ, and +Selects the prediction weights used to remove intra-frame redundancy from + the second stage. + +The actual codebook elements are listed in + and + , but they are not needed until the last + stages of reconstructing the LSF coefficients. + + + +Audio Bandwidth +Signal Type +PDF +NB or MB Inactive or unvoiced + +{44, 34, 30, 19, 21, 12, 11, 3, + 3, 2, 16, 2, 2, 1, 5, 2, + 1, 3, 3, 1, 1, 2, 2, 2, + 3, 1, 9, 9, 2, 7, 2, 1}/256 + +NB or MB Voiced + +{1, 10, 1, 8, 3, 8, 8, 14, +13, 14, 1, 14, 12, 13, 11, 11, +12, 11, 10, 10, 11, 8, 9, 8, + 7, 8, 1, 1, 6, 1, 6, 5}/256 + +WB Inactive or unvoiced + +{31, 21, 3, 17, 1, 8, 17, 4, + 1, 18, 16, 4, 2, 3, 1, 10, + 1, 3, 16, 11, 16, 2, 2, 3, + 2, 11, 1, 4, 9, 8, 7, 3}/256 + +WB Voiced + +{1, 4, 16, 5, 18, 11, 5, 14, +15, 1, 3, 12, 13, 14, 14, 6, +14, 12, 2, 6, 1, 12, 12, 11, +10, 3, 10, 5, 1, 1, 1, 3}/256 + + + +
+ +
+ +A total of 16 PDFs are available for the LSF residual in the second stage: the + 8 (a...h) for NB and MB frames given in + , and the 8 (i...p) for WB frames + given in . +Which PDF is used for which coefficient is driven by the index, I1, + decoded in the first stage. + lists the letter of the + corresponding PDF for each normalized LSF coefficient for NB and MB, and + lists the same information for WB. + + + +Codebook +PDF +a {1, 1, 1, 15, 224, 11, 1, 1, 1}/256 +b {1, 1, 2, 34, 183, 32, 1, 1, 1}/256 +c {1, 1, 4, 42, 149, 55, 2, 1, 1}/256 +d {1, 1, 8, 52, 123, 61, 8, 1, 1}/256 +e {1, 3, 16, 53, 101, 74, 6, 1, 1}/256 +f {1, 3, 17, 55, 90, 73, 15, 1, 1}/256 +g {1, 7, 24, 53, 74, 67, 26, 3, 1}/256 +h {1, 1, 18, 63, 78, 58, 30, 6, 1}/256 + + + +Codebook +PDF +i {1, 1, 1, 9, 232, 9, 1, 1, 1}/256 +j {1, 1, 2, 28, 186, 35, 1, 1, 1}/256 +k {1, 1, 3, 42, 152, 53, 2, 1, 1}/256 +l {1, 1, 10, 49, 126, 65, 2, 1, 1}/256 +m {1, 4, 19, 48, 100, 77, 5, 1, 1}/256 +n {1, 1, 14, 54, 100, 72, 12, 1, 1}/256 +o {1, 1, 15, 61, 87, 61, 25, 4, 1}/256 +p {1, 7, 21, 50, 77, 81, 17, 1, 1}/256 + + + +I1 +Coefficient + +0 1 2 3 4 5 6 7 8 9 + 0 +a a a a a a a a a a + 1 +b d b c c b c b b b + 2 +c b b b b b b b b b + 3 +b c c c c b c b b b + 4 +c d d d d c c c c c + 5 +a f d d c c c c b b + g +a c c c c c c c c b + 7 +c d g e e e f e f f + 8 +c e f f e f e g e e + 9 +c e e h e f e f f e +10 +e d d d c d c c c c +11 +b f f g e f e f f f +12 +c h e g f f f f f f +13 +c h f f f f f g f e +14 +d d f e e f e f e e +15 +c d d f f e e e e e +16 +c e e g e f e f f f +17 +c f e g f f f e f e +18 +c h e f e f e f f f +19 +c f e g h g f g f e +20 +d g h e g f f g e f +21 +c h g e e e f e f f +22 +e f f e g g f g f e +23 +c f f g f g e g e e +24 +e f f f d h e f f e +25 +c d e f f g e f f e +26 +c d c d d e c d d d +27 +b b c c c c c d c c +28 +e f f g g g f g e f +29 +d f f e e e e d d c +30 +c f d h f f e e f e +31 +e e f e f g f g f e + + + +I1 +Coefficient + +0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 + 0 +i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i + 1 +k  l  l  l  l  l  k  k  k  k  k  j  j  j  i  l + 2 +k  n  n  l  p  m  m  n  k  n  m  n  n  m  l  l + 3 +i  k  j  k  k  j  j  j  j  j  i  i  i  i  i  j + 4 +i  o  n  m  o  m  p  n  m  m  m  n  n  m  m  l + 5 +i  l  n  n  m  l  l  n  l  l  l  l  l  l  k  m + 6 +i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i + 7 +i  k  o  l  p  k  n  l  m  n  n  m  l  l  k  l + 8 +i  o  k  o  o  m  n  m  o  n  m  m  n  l  l  l + 9 +k  j  i  i  i  i  i  i  i  i  i  i  i  i  i  i +10 +i  j  i  i  i  i  i  i  i  i  i  i  i  i  i  j +11 +k  k  l  m  n  l  l  l  l  l  l  l  k  k  j  l +12 +k  k  l  l  m  l  l  l  l  l  l  l  l  k  j  l +13 +l  m  m  m  o  m  m  n  l  n  m  m  n  m  l  m +14 +i  o  m  n  m  p  n  k  o  n  p  m  m  l  n  l +15 +i  j  i  j  j  j  j  j  j  j  i  i  i  i  j  i +16 +j  o  n  p  n  m  n  l  m  n  m  m  m  l  l  m +17 +j  l  l  m  m  l  l  n  k  l  l  n  n  n  l  m +18 +k  l  l  k  k  k  l  k  j  k  j  k  j  j  j  m +19 +i  k  l  n  l  l  k  k  k  j  j  i  i  i  i  i +20 +l  m  l  n  l  l  k  k  j  j  j  j  j  k  k  m +21 +k  o  l  p  p  m  n  m  n  l  n  l  l  k  l  l +22 +k  l  n  o  o  l  n  l  m  m  l  l  l  l  k  m +23 +j  l  l  m  m  m  m  l  n  n  n  l  j  j  j  j +24 +k  n  l  o  o  m  p  m  m  n  l  m  m  l  l  l +25 +i  o  j  j  i  i  i  i  i  i  i  i  i  i  i  i +26 +i  o  o  l  n  k  n  n  l  m  m  p  p  m  m  m +27 +l  l  p  l  n  m  l  l  l  k  k  l  l  l  k  l +28 +i  i  j  i  i  i  k  j  k  j  j  k  k  k  j  j +29 +i  l  k  n  l  l  k  l  k  j  i  i  j  i  i  j +30 +l  n  n  m  p  n  l  l  k  l  k  k  j  i  j  i +31 +k  l  n  l  m  l  l  l  k  j  k  o  m  i  i  i + + + +Decoding the second stage residual proceeds as follows. +For each coefficient, the decoder reads a symbol using the PDF corresponding to + I1 from either or + , and subtracts 4 from the result + to give an index in the range -4 to 4, inclusive. +If the index is either -4 or 4, it reads a second symbol using the PDF in + , and adds the value of this second symbol + to the index, using the same sign. +This gives the index, I2[k], a total range of -10 to 10, inclusive. + + + +PDF +{156, 60, 24, 9, 4, 2, 1}/256 + + + +The decoded indices from both stages are translated back into normalized LSF + coefficients in silk_NLSF_decode() (NLSF_decode.c). +The stage-2 indices represent residuals after both the first stage of the VQ + and a separate backwards-prediction step. +The backwards prediction process in the encoder subtracts a prediction from + each residual formed by a multiple of the coefficient that follows it. +The decoder must undo this process. + contains lists of prediction weights + for each coefficient. +There are two lists for NB and MB, and another two lists for WB, giving two + possible prediction weights for each coefficient. + + + +Coefficient +A +B +C +D + 0 179 116 175 68 + 1 138 67 148 62 + 2 140 82 160 66 + 3 148 59 176 60 + 4 151 92 178 72 + 5 149 72 173 117 + 6 153 100 174 85 + 7 151 89 164 90 + 8 163 92 177 118 + 9 174 136 +10 196 151 +11 182 142 +12 198 160 +13 192 142 +14 182 155 + + + +The prediction is undone using the procedure implemented in + silk_NLSF_residual_dequant() (NLSF_decode.c), which is as follows. +Each coefficient selects its prediction weight from one of the two lists based + on the stage-1 index, I1. + gives the selections for each + coefficient for NB and MB, and gives + the selections for WB. +Let d_LPC be the order of the codebook, i.e., 10 for NB and MB, and 16 for WB, + and let pred_Q8[k] be the weight for the k'th coefficient selected by this + process for 0 <= k < d_LPC-1. +Then, the stage-2 residual for each coefficient is computed via +
+>8 : 0) + + ((((I2[k]<<10) - sign(I2[k])*102)*qstep)>>16) , +]]> +
+ where qstep is the Q16 quantization step size, which is 11796 for NB and MB + and 9830 for WB (representing step sizes of approximately 0.18 and 0.15, + respectively). +
+ + +I1 +Coefficient + +0 1 2 3 4 5 6 7 8 + 0 +A B A A A A A A A + 1 +B A A A A A A A A + 2 +A A A A A A A A A + 3 +B B B A A A A B A + 4 +A B A A A A A A A + 5 +A B A A A A A A A + 6 +B A B B A A A B A + 7 +A B B A A B B A A + 8 +A A B B A B A B B + 9 +A A B B A A B B B +10 +A A A A A A A A A +11 +A B A B B B B B A +12 +A B A B B B B B A +13 +A B B B B B B B A +14 +B A B B A B B B B +15 +A B B B B B A B A +16 +A A B B A B A B A +17 +A A B B B A B B B +18 +A B B A A B B B A +19 +A A A B B B A B A +20 +A B B A A B A B A +21 +A B B A A A B B A +22 +A A A A A B B B B +23 +A A B B A A A B B +24 +A A A B A B B B B +25 +A B B B B B B B A +26 +A A A A A A A A A +27 +A A A A A A A A A +28 +A A B A B B A B A +29 +B A A B A A A A A +30 +A A A B B A B A B +31 +B A B B A B B B B + + + +I1 +Coefficient + +0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 + 0 +C  C  C  C  C  C  C  C  C  C  C  C  C  C  D + 1 +C  C  C  C  C  C  C  C  C  C  C  C  C  C  C + 2 +C  C  D  C  C  D  D  D  C  D  D  D  D  C  C + 3 +C  C  C  C  C  C  C  C  C  C  C  C  D  C  C + 4 +C  D  D  C  D  C  D  D  C  D  D  D  D  D  C + 5 +C  C  D  C  C  C  C  C  C  C  C  C  C  C  C + 6 +D  C  C  C  C  C  C  C  C  C  C  D  C  D  C + 7 +C  D  D  C  C  C  D  C  D  D  D  C  D  C  D + 8 +C  D  C  D  D  C  D  C  D  C  D  D  D  D  D + 9 +C  C  C  C  C  C  C  C  C  C  C  C  C  C  D +10 +C  D  C  C  C  C  C  C  C  C  C  C  C  C  C +11 +C  C  D  C  D  D  D  D  D  D  D  C  D  C  C +12 +C  C  D  C  C  D  C  D  C  D  C  C  D  C  C +13 +C  C  C  C  D  D  C  D  C  D  D  D  D  C  C +14 +C  D  C  C  C  D  D  C  D  D  D  C  D  D  D +15 +C  C  D  D  C  C  C  C  C  C  C  C  D  D  C +16 +C  D  D  C  D  C  D  D  D  D  D  C  D  C  C +17 +C  C  D  C  C  C  C  D  C  C  D  D  D  C  C +18 +C  C  C  C  C  C  C  C  C  C  C  C  C  C  D +19 +C  C  C  C  C  C  C  C  C  C  C  C  D  C  C +20 +C  C  C  C  C  C  C  C  C  C  C  C  C  C  C +21 +C  D  C  D  C  D  D  C  D  C  D  C  D  D  C +22 +C  C  D  D  D  D  C  D  D  C  C  D  D  C  C +23 +C  D  D  C  D  C  D  C  D  C  C  C  C  D  C +24 +C  C  C  D  D  C  D  C  D  D  D  D  D  D  D +25 +C  C  C  C  C  C  C  C  C  C  C  C  C  C  D +26 +C  D  D  C  C  C  D  D  C  C  D  D  D  D  D +27 +C  C  C  C  C  D  C  D  D  D  D  C  D  D  D +28 +C  C  C  C  C  C  C  C  C  C  C  C  C  C  D +29 +C  C  C  C  C  C  C  C  C  C  C  C  C  C  D +30 +D  C  C  C  C  C  C  C  C  C  C  D  C  C  C +31 +C  C  D  C  C  D  D  D  C  C  D  C  C  D  C + + +
+ +
+ +Once the stage-1 index I1 and the stage-2 residual res_Q10[] have been decoded, + the final normalized LSF coefficients can be reconstructed. + + +The spectral distortion introduced by the quantization of each LSF coefficient + varies, so the stage-2 residual is weighted accordingly, using the + low-complexity Inverse Harmonic Mean Weighting (IHMW) function proposed in + . +The weights are derived directly from the stage-1 codebook vector. +Let cb1_Q8[k] be the k'th entry of the stage-1 codebook vector from + or + . +Then for 0 <= k < d_LPC the following expression + computes the square of the weight as a Q18 value: +
+ + + +
+ where cb1_Q8[-1] = 0 and cb1_Q8[d_LPC] = 256, and the + division is integer division. +This is reduced to an unsquared, Q9 value using the following square-root + approximation: +
+>(i-8)) & 127 +y = ((i&1) ? 32768 : 46214) >> ((32-i)>>1) +w_Q9[k] = y + ((213*f*y)>>16) +]]> +
+The constant 46214 here is approximately the square root of 2 in Q15. +The cb1_Q8[] vector completely determines these weights, and they may be + tabulated and stored as 13-bit unsigned values (with a range of 1819 to 5227, + inclusive) to avoid computing them when decoding. +The reference implementation already requires code to compute these weights on + unquantized coefficients in the encoder, in silk_NLSF_VQ_weights_laroia() + (NLSF_VQ_weights_laroia.c) and its callers, so it reuses that code in the + decoder instead of using a pre-computed table to reduce the amount of ROM + required. +
+ + +I1 +Codebook (Q8) + + 0   1   2   3   4   5   6   7   8   9 +0 +12  35  60  83 108 132 157 180 206 228 +1 +15  32  55  77 101 125 151 175 201 225 +2 +19  42  66  89 114 137 162 184 209 230 +3 +12  25  50  72  97 120 147 172 200 223 +4 +26  44  69  90 114 135 159 180 205 225 +5 +13  22  53  80 106 130 156 180 205 228 +6 +15  25  44  64  90 115 142 168 196 222 +7 +19  24  62  82 100 120 145 168 190 214 +8 +22  31  50  79 103 120 151 170 203 227 +9 +21  29  45  65 106 124 150 171 196 224 +10 +30  49  75  97 121 142 165 186 209 229 +11 +19  25  52  70  93 116 143 166 192 219 +12 +26  34  62  75  97 118 145 167 194 217 +13 +25  33  56  70  91 113 143 165 196 223 +14 +21  34  51  72  97 117 145 171 196 222 +15 +20  29  50  67  90 117 144 168 197 221 +16 +22  31  48  66  95 117 146 168 196 222 +17 +24  33  51  77 116 134 158 180 200 224 +18 +21  28  70  87 106 124 149 170 194 217 +19 +26  33  53  64  83 117 152 173 204 225 +20 +27  34  65  95 108 129 155 174 210 225 +21 +20  26  72  99 113 131 154 176 200 219 +22 +34  43  61  78  93 114 155 177 205 229 +23 +23  29  54  97 124 138 163 179 209 229 +24 +30  38  56  89 118 129 158 178 200 231 +25 +21  29  49  63  85 111 142 163 193 222 +26 +27  48  77 103 133 158 179 196 215 232 +27 +29  47  74  99 124 151 176 198 220 237 +28 +33  42  61  76  93 121 155 174 207 225 +29 +29  53  87 112 136 154 170 188 208 227 +30 +24  30  52  84 131 150 166 186 203 229 +31 +37  48  64  84 104 118 156 177 201 230 + + + +I1 +Codebook (Q8) + + 0  1  2  3  4   5   6   7   8   9  10  11  12  13  14  15 +0 + 7 23 38 54 69  85 100 116 131 147 162 178 193 208 223 239 +1 +13 25 41 55 69  83  98 112 127 142 157 171 187 203 220 236 +2 +15 21 34 51 61  78  92 106 126 136 152 167 185 205 225 240 +3 +10 21 36 50 63  79  95 110 126 141 157 173 189 205 221 237 +4 +17 20 37 51 59  78  89 107 123 134 150 164 184 205 224 240 +5 +10 15 32 51 67  81  96 112 129 142 158 173 189 204 220 236 +6 + 8 21 37 51 65  79  98 113 126 138 155 168 179 192 209 218 +7 +12 15 34 55 63  78  87 108 118 131 148 167 185 203 219 236 +8 +16 19 32 36 56  79  91 108 118 136 154 171 186 204 220 237 +9 +11 28 43 58 74  89 105 120 135 150 165 180 196 211 226 241 +10 + 6 16 33 46 60  75  92 107 123 137 156 169 185 199 214 225 +11 +11 19 30 44 57  74  89 105 121 135 152 169 186 202 218 234 +12 +12 19 29 46 57  71  88 100 120 132 148 165 182 199 216 233 +13 +17 23 35 46 56  77  92 106 123 134 152 167 185 204 222 237 +14 +14 17 45 53 63  75  89 107 115 132 151 171 188 206 221 240 +15 + 9 16 29 40 56  71  88 103 119 137 154 171 189 205 222 237 +16 +16 19 36 48 57  76  87 105 118 132 150 167 185 202 218 236 +17 +12 17 29 54 71  81  94 104 126 136 149 164 182 201 221 237 +18 +15 28 47 62 79  97 115 129 142 155 168 180 194 208 223 238 +19 + 8 14 30 45 62  78  94 111 127 143 159 175 192 207 223 239 +20 +17 30 49 62 79  92 107 119 132 145 160 174 190 204 220 235 +21 +14 19 36 45 61  76  91 108 121 138 154 172 189 205 222 238 +22 +12 18 31 45 60  76  91 107 123 138 154 171 187 204 221 236 +23 +13 17 31 43 53  70  83 103 114 131 149 167 185 203 220 237 +24 +17 22 35 42 58  78  93 110 125 139 155 170 188 206 224 240 +25 + 8 15 34 50 67  83  99 115 131 146 162 178 193 209 224 239 +26 +13 16 41 66 73  86  95 111 128 137 150 163 183 206 225 241 +27 +17 25 37 52 63  75  92 102 119 132 144 160 175 191 212 231 +28 +19 31 49 65 83 100 117 133 147 161 174 187 200 213 227 242 +29 +18 31 52 68 88 103 117 126 138 149 163 177 192 207 223 239 +30 +16 29 47 61 76  90 106 119 133 147 161 176 193 209 224 240 +31 +15 21 35 50 61  73  86  97 110 119 129 141 175 198 218 237 + + + +Given the stage-1 codebook entry cb1_Q8[], the stage-2 residual res_Q10[], and + their corresponding weights, w_Q9[], the reconstructed normalized LSF + coefficients are +
+ +
+ where the division is integer division. +However, nothing in either the reconstruction process or the + quantization process in the encoder thus far guarantees that the coefficients + are monotonically increasing and separated well enough to ensure a stable + filter . +When using the reference encoder, roughly 2% of frames violate this constraint. +The next section describes a stabilization procedure used to make these + guarantees. +
+ +
+ +
+ +The normalized LSF stabilization procedure is implemented in + silk_NLSF_stabilize() (NLSF_stabilize.c). +This process ensures that consecutive values of the normalized LSF + coefficients, NLSF_Q15[], are spaced some minimum distance apart + (predetermined to be the 0.01 percentile of a large training set). + gives the minimum spacings for NB and MB + and those for WB, where row k is the minimum allowed value of + NLSF_Q[k]-NLSF_Q[k-1]. +For the purposes of computing this spacing for the first and last coefficient, + NLSF_Q15[-1] is taken to be 0, and NLSF_Q15[d_LPC] is taken to be 32768. + + + +Coefficient +NB and MB +WB + 0 250 100 + 1 3 3 + 2 6 40 + 3 3 3 + 4 3 3 + 5 3 3 + 6 4 5 + 7 3 14 + 8 3 14 + 9 3 10 +10 461 11 +11 3 +12 8 +13 9 +14 7 +15 3 +16 347 + + + +The procedure starts off by trying to make small adjustments which attempt to + minimize the amount of distortion introduced. +After 20 such adjustments, it falls back to a more direct method which + guarantees the constraints are enforced but may require large adjustments. + + +Let NDeltaMin_Q15[k] be the minimum required spacing for the current audio + bandwidth from . +First, the procedure finds the index i where + NLSF_Q15[i] - NLSF_Q15[i-1] - NDeltaMin_Q15[i] is the + smallest, breaking ties by using the lower value of i. +If this value is non-negative, then the stabilization stops; the coefficients + satisfy all the constraints. +Otherwise, if i == 0, it sets NLSF_Q15[0] to NDeltaMin_Q15[0], and if + i == d_LPC, it sets NLSF_Q15[d_LPC-1] to + (32768 - NDeltaMin_Q15[d_LPC]). +For all other values of i, both NLSF_Q15[i-1] and NLSF_Q15[i] are updated as + follows: +
+>1) + \ NDeltaMin_Q15[k] + /_ + k=0 + d_LPC + __ + max_center_Q15 = 32768 - (NDeltaMin_Q15[i]>>1) - \ NDeltaMin_Q15[k] + /_ + k=i+1 +center_freq_Q15 = clamp(min_center_Q15[i], + (NLSF_Q15[i-1] + NLSF_Q15[i] + 1)>>1, + max_center_Q15[i]) + + NLSF_Q15[i-1] = center_freq_Q15 - (NDeltaMin_Q15[i]>>1) + + NLSF_Q15[i] = NLSF_Q15[i-1] + NDeltaMin_Q15[i] . +]]> +
+Then the procedure repeats again, until it has either executed 20 times or + has stopped because the coefficients satisfy all the constraints. +
+ +After the 20th repetition of the above procedure, the following fallback + procedure executes once. +First, the values of NLSF_Q15[k] for 0 <= k < d_LPC + are sorted in ascending order. +Then for each value of k from 0 to d_LPC-1, NLSF_Q15[k] is set to +
+ +
+Next, for each value of k from d_LPC-1 down to 0, NLSF_Q15[k] is set to +
+ +
+
+ +
+ +
+ +For 20 ms SILK frames, the first half of the frame (i.e., the first two + subframes) may use normalized LSF coefficients that are interpolated between + the decoded LSFs for the most recent coded frame (in the same channel) and the + current frame. +A Q2 interpolation factor follows the LSF coefficient indices in the bitstream, + which is decoded using the PDF in . +This happens in silk_decode_indices() (decode_indices.c). +After either + +An uncoded regular SILK frame in the side channel, or +A decoder reset (see ), + + the decoder still decodes this factor, but ignores its value and always uses + 4 instead. +For 10 ms SILK frames, this factor is not stored at all. + + + +PDF +{13, 22, 29, 11, 181}/256 + + + +Let n2_Q15[k] be the normalized LSF coefficients decoded by the procedure in + , n0_Q15[k] be the LSF coefficients + decoded for the prior frame, and w_Q2 be the interpolation factor. +Then the normalized LSF coefficients used for the first half of a 20 ms + frame, n1_Q15[k], are +
+> 2) . +]]> +
+This interpolation is performed in silk_decode_parameters() + (decode_parameters.c). +
+
+ +
+ +Any LPC filter A(z) can be split into a symmetric part P(z) and an + anti-symmetric part Q(z) such that +
+ +
+with +
+ +
+The even normalized LSF coefficients correspond to a pair of conjugate roots of + P(z), while the odd coefficients correspond to a pair of conjugate roots of + Q(z), all of which lie on the unit circle. +In addition, P(z) has a root at pi and Q(z) has a root at 0. +Thus, they may be reconstructed mathematically from a set of normalized LSF + coefficients, n[k], as +
+ +
+
+ +However, SILK performs this reconstruction using a fixed-point approximation so + that all decoders can reproduce it in a bit-exact manner to avoid prediction + drift. +The function silk_NLSF2A() (NLSF2A.c) implements this procedure. + + +To start, it approximates cos(pi*n[k]) using a table lookup with linear + interpolation. +The encoder SHOULD use the inverse of this piecewise linear approximation, + rather than the true inverse of the cosine function, when deriving the + normalized LSF coefficients. +These values are also re-ordered to improve numerical accuracy when + constructing the LPC polynomials. + + + +Coefficient +NB and MB +WB + 0 0 0 + 1 9 15 + 2 6 8 + 3 3 7 + 4 4 4 + 5 5 11 + 6 8 12 + 7 1 3 + 8 2 2 + 9 7 13 +10 10 +11 5 +12 6 +13 9 +14 14 +15 1 + + + +The top 7 bits of each normalized LSF coefficient index a value in the table, + and the next 8 bits interpolate between it and the next value. +Let i = (n[k] >> 8) be the integer index and + f = (n[k] & 255) be the fractional part of a given + coefficient. +Then the re-ordered, approximated cosine, c_Q17[ordering[k]], is +
+> 3 , +]]> +
+ where ordering[k] is the k'th entry of the column of + corresponding to the current audio + bandwidth and cos_Q12[i] is the i'th entry of . +
+ + +i ++0 ++1 ++2 ++3 +0 + 4096 4095 4091 4085 +4 + 4076 4065 4052 4036 +8 + 4017 3997 3973 3948 +12 + 3920 3889 3857 3822 +16 + 3784 3745 3703 3659 +20 + 3613 3564 3513 3461 +24 + 3406 3349 3290 3229 +28 + 3166 3102 3035 2967 +32 + 2896 2824 2751 2676 +36 + 2599 2520 2440 2359 +40 + 2276 2191 2106 2019 +44 + 1931 1842 1751 1660 +48 + 1568 1474 1380 1285 +52 + 1189 1093 995 897 +56 + 799 700 601 501 +60 + 401 301 201 101 +64 + 0 -101 -201 -301 +68 + -401 -501 -601 -700 +72 + -799 -897 -995 -1093 +76 +-1189-1285-1380-1474 +80 +-1568-1660-1751-1842 +84 +-1931-2019-2106-2191 +88 +-2276-2359-2440-2520 +92 +-2599-2676-2751-2824 +96 +-2896-2967-3035-3102 +100 +-3166-3229-3290-3349 +104 +-3406-3461-3513-3564 +108 +-3613-3659-3703-3745 +112 +-3784-3822-3857-3889 +116 +-3920-3948-3973-3997 +120 +-4017-4036-4052-4065 +124 +-4076-4085-4091-4095 +128 +-4096 + + + +Given the list of cosine values, silk_NLSF2A_find_poly() (NLSF2A.c) + computes the coefficients of P and Q, described here via a simple recurrence. +Let p_Q16[k][j] and q_Q16[k][j] be the coefficients of the products of the + first (k+1) root pairs for P and Q, with j indexing the coefficient number. +Only the first (k+2) coefficients are needed, as the products are symmetric. +Let p_Q16[0][0] = q_Q16[0][0] = 1<<16, + p_Q16[0][1] = -c_Q17[0], q_Q16[0][1] = -c_Q17[1], and + d2 = d_LPC/2. +As boundary conditions, assume + p_Q16[k][j] = q_Q16[k][j] = 0 for all + j < 0. +Also, assume p_Q16[k][k+2] = p_Q16[k][k] and + q_Q16[k][k+2] = q_Q16[k][k] (because of the symmetry). +Then, for 0 < k < d2 and 0 <= j <= k+1, +
+>16) , + +q_Q16[k][j] = q_Q16[k-1][j] + q_Q16[k-1][j-2] + - ((c_Q17[2*k+1]*q_Q16[k-1][j-1] + 32768)>>16) . +]]> +
+The use of Q17 values for the cosine terms in an otherwise Q16 expression + implicitly scales them by a factor of 2. +The multiplications in this recurrence may require up to 48 bits of precision + in the result to avoid overflow. +In practice, each row of the recurrence only depends on the previous row, so an + implementation does not need to store all of them. +
+ +silk_NLSF2A() uses the values from the last row of this recurrence to + reconstruct a 32-bit version of the LPC filter (without the leading 1.0 + coefficient), a32_Q17[k], 0 <= k < d2: +
+ +
+The sum and difference of two terms from each of the p_Q16 and q_Q16 + coefficient lists reflect the (1 + z**-1) and + (1 - z**-1) factors of P and Q, respectively. +The promotion of the expression from Q16 to Q17 implicitly scales the result + by 1/2. +
+
+ +
+ +The a32_Q17[] coefficients are too large to fit in a 16-bit value, which + significantly increases the cost of applying this filter in fixed-point + decoders. +Reducing them to Q12 precision doesn't incur any significant quality loss, + but still does not guarantee they will fit. +silk_NLSF2A() applies up to 10 rounds of bandwidth expansion to limit + the dynamic range of these coefficients. +Even floating-point decoders SHOULD perform these steps, to avoid mismatch. + + +For each round, the process first finds the index k such that abs(a32_Q17[k]) + is largest, breaking ties by choosing the lowest value of k. +Then, it computes the corresponding Q12 precision value, maxabs_Q12, subject to + an upper bound to avoid overflow in subsequent computations: +
+> 5, 163838) . +]]> +
+If this is larger than 32767, the procedure derives the chirp factor, + sc_Q16[0], to use in the bandwidth expansion as +
+> 2 +]]> +
+ where the division here is integer division. +This is an approximation of the chirp factor needed to reduce the target + coefficient to 32767, though it is both less than 0.999 and, for + k > 0 when maxabs_Q12 is much greater than 32767, still slightly + too large. +The upper bound on maxabs_Q12, 163838, was chosen because it is equal to + ((2**31 - 1) >> 14) + 32767, i.e., the + largest value of maxabs_Q12 that would not overflow the numerator in the + equation above when stored in a signed 32-bit integer. +
+ +silk_bwexpander_32() (bwexpander_32.c) performs the bandwidth expansion (again, + only when maxabs_Q12 is greater than 32767) using the following recurrence: +
+> 16 + +sc_Q16[k+1] = (sc_Q16[0]*sc_Q16[k] + 32768) >> 16 +]]> +
+The first multiply may require up to 48 bits of precision in the result to + avoid overflow. +The second multiply must be unsigned to avoid overflow with only 32 bits of + precision. +The reference implementation uses a slightly more complex formulation that + avoids the 32-bit overflow using signed multiplication, but is otherwise + equivalent. +
+ +After 10 rounds of bandwidth expansion are performed, they are simply saturated + to 16 bits: +
+> 5, 32767) << 5 . +]]> +
+Because this performs the actual saturation in the Q12 domain, but converts the + coefficients back to the Q17 domain for the purposes of prediction gain + limiting, this step must be performed after the 10th round of bandwidth + expansion, regardless of whether or not the Q12 version of any coefficient + still overflows a 16-bit integer. +This saturation is not performed if maxabs_Q12 drops to 32767 or less prior to + the 10th round. +
+
+ +
+ +The prediction gain of an LPC synthesis filter is the square-root of the output + energy when the filter is excited by a unit-energy impulse. +Even if the Q12 coefficients would fit, the resulting filter may still have a + significant gain (especially for voiced sounds), making the filter unstable. +silk_NLSF2A() applies up to 18 additional rounds of bandwidth expansion to + limit the prediction gain. +Instead of controlling the amount of bandwidth expansion using the prediction + gain itself (which may diverge to infinity for an unstable filter), + silk_NLSF2A() uses silk_LPC_inverse_pred_gain_QA() (LPC_inv_pred_gain.c) to + compute the reflection coefficients associated with the filter. +The filter is stable if and only if the magnitude of these coefficients is + sufficiently less than one. +The reflection coefficients, rc[k], can be computed using a simple Levinson + recurrence, initialized with the LPC coefficients + a[d_LPC-1][n] = a[n], and then updated via +
+ +
+
+ +However, silk_LPC_inverse_pred_gain_QA() approximates this using fixed-point + arithmetic to guarantee reproducible results across platforms and + implementations. +Since small changes in the coefficients can make a stable filter unstable, it + takes the real Q12 coefficients that will be used during reconstruction as + input. +Thus, let +
+> 5 +]]> +
+ be the Q12 version of the LPC coefficients that will eventually be used. +As a simple initial check, the decoder computes the DC response as +
+ +
+ and if DC_resp > 4096, the filter is unstable. +
+ +Increasing the precision of these Q12 coefficients to Q24 for intermediate + computations allows more accurate computation of the reflection coefficients, + so the decoder initializes the recurrence via +
+ +
+Then for each k from d_LPC-1 down to 0, if + abs(a32_Q24[k][k]) > 16773022, the filter is unstable and the + recurrence stops. +The constant 16773022 here is approximately 0.99975 in Q24. +Otherwise, row k-1 of a32_Q24 is computed from row k as +
+> 32) , + + b1[k] = ilog(div_Q30[k]) , + + b2[k] = b1[k] - 16 , + + (1<<29) - 1 + inv_Qb2[k] = ----------------------- , + div_Q30[k] >> (b2[k]+1) + + err_Q29[k] = (1<<29) + - ((div_Q30[k]<<(15-b2[k]))*inv_Qb2[k] >> 16) , + + gain_Qb1[k] = ((inv_Qb2[k] << 16) + + (err_Q29[k]*inv_Qb2[k] >> 13)) , + +num_Q24[k-1][n] = a32_Q24[k][n] + - ((a32_Q24[k][k-n-1]*rc_Q31[k] + (1<<30)) >> 31) , + +a32_Q24[k-1][n] = (num_Q24[k-1][n]*gain_Qb1[k] + + (1<<(b1[k]-1))) >> b1[k] , +]]> +
+ where 0 <= n < k. +Here, rc_Q30[k] are the reflection coefficients. +div_Q30[k] is the denominator for each iteration, and gain_Qb1[k] is its + multiplicative inverse (with b1[k] fractional bits, where b1[k] ranges from + 20 to 31). +inv_Qb2[k], which ranges from 16384 to 32767, is a low-precision version of + that inverse (with b2[k] fractional bits). +err_Q29[k] is the residual error, ranging from -32763 to 32392, which is used + to improve the accuracy. +The values t_Q24[k-1][n] for each n are the numerators for the next row of + coefficients in the recursion, and a32_Q24[k-1][n] is the final version of + that row. +Every multiply in this procedure except the one used to compute gain_Qb1[k] + requires more than 32 bits of precision, but otherwise all intermediate + results fit in 32 bits or less. +In practice, because each row only depends on the next one, an implementation + does not need to store them all. +
+ +If abs(a32_Q24[k][k]) <= 16773022 for + 0 <= k < d_LPC, then the filter is considered stable. +However, the problem of determining stability is ill-conditioned when the + filter contains several reflection coefficients whose magnitude is very close + to one. +This fixed-point algorithm is not mathematically guaranteed to correctly + classify filters as stable or unstable in this case, though it does very well + in practice. + + +On round i, 1 <= i <= 18, if the filter passes these + stability checks, then this procedure stops, and the final LPC coefficients to + use for reconstruction in are +
+> 5 . +]]> +
+Otherwise, a round of bandwidth expansion is applied using the same procedure + as in , with +
+ +
+During the 15th round, sc_Q16[0] becomes 0 in the above equation, so a_Q12[k] + is set to 0 for all k, guaranteeing a stable filter. +
+
+ +
+ +
+ +After the normalized LSF indices and, for 20 ms frames, the LSF + interpolation index, voiced frames (see ) + include additional LTP parameters. +There is one primary lag index for each SILK frame, but this is refined to + produce a separate lag index per subframe using a vector quantizer. +Each subframe also gets its own prediction gain coefficient. + + +
+ +The primary lag index is coded either relative to the primary lag of the prior + frame in the same channel, or as an absolute index. +Absolute coding is used if and only if + + +This is the first SILK frame of its type (LBRR or regular) for this channel in + the current Opus frame, + + +The previous SILK frame of the same type (LBRR or regular) for this channel in + the same Opus frame was not coded, or + + +That previous SILK frame was coded, but was not voiced (see + ). + + + + + +With absolute coding, the primary pitch lag may range from 2 ms + (inclusive) up to 18 ms (exclusive), corresponding to pitches from + 500 Hz down to 55.6 Hz, respectively. +It is comprised of a high part and a low part, where the decoder reads the high + part using the 32-entry codebook in + and the low part using the codebook corresponding to the current audio + bandwidth from . +The final primary pitch lag is then +
+ +
+ where lag_high is the high part, lag_low is the low part, and lag_scale + and lag_min are the values from the "Scale" and "Minimum Lag" columns of + , respectively. +
+ + +PDF +{3, 3, 6, 11, 21, 30, 32, 19, + 11, 10, 12, 13, 13, 12, 11, 9, + 8, 7, 6, 4, 2, 2, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1}/256 + + + +Audio Bandwidth +PDF +Scale +Minimum Lag +Maximum Lag +NB {64, 64, 64, 64}/256 4 16 144 +MB {43, 42, 43, 43, 42, 43}/256 6 24 216 +WB {32, 32, 32, 32, 32, 32, 32, 32}/256 8 32 288 + + + +All frames that do not use absolute coding for the primary lag index use + relative coding instead. +The decoder reads a single delta value using the 21-entry PDF in + . +If the resulting value is zero, it falls back to the absolute coding procedure + from the prior paragraph. +Otherwise, the final primary pitch lag is then +
+ +
+ where previous_lag is the primary pitch lag from the most recent frame in the + same channel and delta_lag_index is the value just decoded. +This allows a per-frame change in the pitch lag of -8 to +11 samples. +The decoder does no clamping at this point, so this value can fall outside the + range of 2 ms to 18 ms, and the decoder must use this unclamped + value when using relative coding in the next SILK frame (if any). +However, because an Opus frame can use relative coding for at most two + consecutive SILK frames, integer overflow should not be an issue. +
+ + +PDF +{46, 2, 2, 3, 4, 6, 10, 15, + 26, 38, 30, 22, 15, 10, 7, 6, + 4, 4, 2, 2, 2}/256 + + + +After the primary pitch lag, a "pitch contour", stored as a single entry from + one of four small VQ codebooks, gives lag offsets for each subframe in the + current SILK frame. +The codebook index is decoded using one of the PDFs in + depending on the current frame size + and audio bandwidth. +Tables  + through  + give the corresponding offsets to apply to the primary pitch lag for each + subframe given the decoded codebook index. + + + +Audio Bandwidth +SILK Frame Size +Codebook Size +PDF +NB 10 ms 3 +{143, 50, 63}/256 +NB 20 ms 11 +{68, 12, 21, 17, 19, 22, 30, 24, + 17, 16, 10}/256 +MB or WB 10 ms 12 +{91, 46, 39, 19, 14, 12, 8, 7, + 6, 5, 5, 4}/256 +MB or WB 20 ms 34 +{33, 22, 18, 16, 15, 14, 14, 13, + 13, 10, 9, 9, 8, 6, 6, 6, + 5, 4, 4, 4, 3, 3, 3, 2, + 2, 2, 2, 2, 2, 2, 1, 1, + 1, 1}/256 + + + +Index +Subframe Offsets +0  0  0 +1  1  0 +2  0  1 + + + +Index +Subframe Offsets + 0  0  0  0  0 + 1  2  1  0 -1 + 2 -1  0  1  2 + 3 -1  0  0  1 + 4 -1  0  0  0 + 5  0  0  0  1 + 6  0  0  1  1 + 7  1  1  0  0 + 8  1  0  0  0 + 9  0  0  0 -1 +10  1  0  0 -1 + + + +Index +Subframe Offsets + 0  0  0 + 1  0  1 + 2  1  0 + 3 -1  1 + 4  1 -1 + 5 -1  2 + 6  2 -1 + 7 -2  2 + 8  2 -2 + 9 -2  3 +10  3 -2 +11 -3  3 + + + +Index +Subframe Offsets + 0  0  0  0  0 + 1  0  0  1  1 + 2  1  1  0  0 + 3 -1  0  0  0 + 4  0  0  0  1 + 5  1  0  0  0 + 6 -1  0  0  1 + 7  0  0  0 -1 + 8 -1  0  1  2 + 9  1  0  0 -1 +10 -2 -1  1  2 +11  2  1  0 -1 +12 -2  0  0  2 +13 -2  0  1  3 +14  2  1 -1 -2 +15 -3 -1  1  3 +16  2  0  0 -2 +17  3  1  0 -2 +18 -3 -1  2  4 +19 -4 -1  1  4 +20  3  1 -1 -3 +21 -4 -1  2  5 +22  4  2 -1 -3 +23  4  1 -1 -4 +24 -5 -1  2  6 +25  5  2 -1 -4 +26 -6 -2  2  6 +27 -5 -2  2  5 +28  6  2 -1 -5 +29 -7 -2  3  8 +30  6  2 -2 -6 +31  5  2 -2 -5 +32  8  3 -2 -7 +33 -9 -3  3  9 + + + +The final pitch lag for each subframe is assembled in silk_decode_pitch() + (decode_pitch.c). +Let lag be the primary pitch lag for the current SILK frame, contour_index be + index of the VQ codebook, and lag_cb[contour_index][k] be the corresponding + entry of the codebook from the appropriate table given above for the k'th + subframe. +Then the final pitch lag for that subframe is +
+ +
+ where lag_min and lag_max are the values from the "Minimum Lag" and + "Maximum Lag" columns of , + respectively. +
+ +
+ +
+ +SILK uses a separate 5-tap pitch filter for each subframe, selected from one + of three codebooks. +The three codebooks each represent different rate-distortion trade-offs, with + average rates of 1.61 bits/subframe, 3.68 bits/subframe, and + 4.85 bits/subframe, respectively. + + + +The importance of the filter coefficients generally depends on two factors: the + periodicity of the signal and relative energy between the current subframe and + the signal from one period earlier. +Greater periodicity and decaying energy both lead to more important filter + coefficients, and thus should be coded with lower distortion and higher rate. +These properties are relatively stable over the duration of a single SILK + frame, hence all of the subframes in a SILK frame choose their filter from the + same codebook. +This is signaled with an explicitly-coded "periodicity index". +This immediately follows the subframe pitch lags, and is coded using the + 3-entry PDF from . + + + +PDF +{77, 80, 99}/256 + + + +The indices of the filters for each subframe follow. +They are all coded using the PDF from + corresponding to the periodicity index. +Tables  + through  + contain the corresponding filter taps as signed Q7 integers. + + + +Periodicity Index +Codebook Size +PDF +0 8 {185, 15, 13, 13, 9, 9, 6, 6}/256 +1 16 {57, 34, 21, 20, 15, 13, 12, 13, + 10, 10, 9, 10, 9, 8, 7, 8}/256 +2 32 {15, 16, 14, 12, 12, 12, 11, 11, + 11, 10, 9, 9, 9, 9, 8, 8, + 8, 8, 7, 7, 6, 6, 5, 4, + 5, 4, 4, 4, 3, 4, 3, 2}/256 + + + +Index +Filter Taps (Q7) + 0 +  4   6  24   7   5 + 1 +  0   0   2   0   0 + 2 + 12  28  41  13  -4 + 3 + -9  15  42  25  14 + 4 +  1  -2  62  41  -9 + 5 +-10  37  65  -4   3 + 6 + -6   4  66   7  -8 + 7 + 16  14  38  -3  33 + + + +Index +Filter Taps (Q7) + + 0 + 13  22  39  23  12 + 1 + -1  36  64  27  -6 + 2 + -7  10  55  43  17 + 3 +  1   1   8   1   1 + 4 +  6 -11  74  53  -9 + 5 +-12  55  76 -12   8 + 6 + -3   3  93  27  -4 + 7 + 26  39  59   3  -8 + 8 +  2   0  77  11   9 + 9 + -8  22  44  -6   7 +10 + 40   9  26   3   9 +11 + -7  20 101  -7   4 +12 +  3  -8  42  26   0 +13 +-15  33  68   2  23 +14 + -2  55  46  -2  15 +15 +  3  -1  21  16  41 + + + +Index +Filter Taps (Q7) + 0 + -6  27  61  39   5 + 1 +-11  42  88   4   1 + 2 + -2  60  65   6  -4 + 3 + -1  -5  73  56   1 + 4 + -9  19  94  29  -9 + 5 +  0  12  99   6   4 + 6 +  8 -19 102  46 -13 + 7 +  3   2  13   3   2 + 8 +  9 -21  84  72 -18 + 9 +-11  46 104 -22   8 +10 + 18  38  48  23   0 +11 +-16  70  83 -21  11 +12 +  5 -11 117  22  -8 +13 + -6  23 117 -12   3 +14 +  3  -8  95  28   4 +15 +-10  15  77  60 -15 +16 + -1   4 124   2  -4 +17 +  3  38  84  24 -25 +18 +  2  13  42  13  31 +19 + 21  -4  56  46  -1 +20 + -1  35  79 -13  19 +21 + -7  65  88  -9 -14 +22 + 20   4  81  49 -29 +23 + 20   0  75   3 -17 +24 +  5  -9  44  92  -8 +25 +  1  -3  22  69  31 +26 + -6  95  41 -12   5 +27 + 39  67  16  -4   1 +28 +  0  -6 120  55 -36 +29 +-13  44 122   4 -24 +30 + 81   5  11   3   7 +31 +  2   0   9  10  88 + + +
+ +
+ +An LTP scaling parameter appears after the LTP filter coefficients if and only + if + +This is a voiced frame (see ), and +Either + + +This SILK frame corresponds to the first time interval of the + current Opus frame for its type (LBRR or regular), or + + +This is an LBRR frame where the LBRR flags (see + ) indicate the previous LBRR frame in the same + channel is not coded. + + + + +This allows the encoder to trade off the prediction gain between + packets against the recovery time after packet loss. +Unlike absolute-coding for pitch lags, regular SILK frames that are not at the + start of an Opus frame (i.e., that do not correspond to the first 20 ms + time interval in Opus frames of 40 or 60 ms) do not include this + field, even if the prior frame was not voiced, or (in the case of the side + channel) not even coded. +After an uncoded frame in the side channel, the LTP buffer (see + ) is cleared to zero, and is thus in a + known state. +In contrast, LBRR frames do include this field when the prior frame was not + coded, since the LTP buffer contains the output of the PLC, which is + non-normative. + + +If present, the decoder reads a value using the 3-entry PDF in + . +The three possible values represent Q14 scale factors of 15565, 12288, and + 8192, respectively (corresponding to approximately 0.95, 0.75, and 0.5). +Frames that do not code the scaling parameter use the default factor of 15565 + (approximately 0.95). + + + +PDF +{128, 64, 64}/256 + + +
+ +
+ +
+ +As described in , SILK uses a + linear congruential generator (LCG) to inject pseudorandom noise into the + quantized excitation. +To ensure synchronization of this process between the encoder and decoder, each + SILK frame stores a 2-bit seed after the LTP parameters (if any). +The encoder may consider the choice of seed during quantization, and the + flexibility of this choice lets it reduce distortion, helping to pay for the + bit cost required to signal it. +The decoder reads the seed using the uniform 4-entry PDF in + , yielding a value between 0 and 3, inclusive. + + + +PDF +{64, 64, 64, 64}/256 + + +
+ +
+ +SILK codes the excitation using a modified version of the Pyramid Vector + Quantization (PVQ) codebook . +The PVQ codebook is designed for Laplace-distributed values and consists of all + sums of K signed, unit pulses in a vector of dimension N, where two pulses at + the same position are required to have the same sign. +Thus the codebook includes all integer codevectors y of dimension N that + satisfy +
+ +
+Unlike regular PVQ, SILK uses a variable-length, rather than fixed-length, + encoding. +This encoding is better suited to the more Gaussian-like distribution of the + coefficient magnitudes and the non-uniform distribution of their signs (caused + by the quantization offset described below). +SILK also handles large codebooks by coding the least significant bits (LSBs) + of each coefficient directly. +This adds a small coding efficiency loss, but greatly reduces the computation + time and ROM size required for decoding, as implemented in + silk_decode_pulses() (decode_pulses.c). +
+ + +SILK fixes the dimension of the codebook to N = 16. +The excitation is made up of a number of "shell blocks", each 16 samples in + size. + lists the number of shell blocks + required for a SILK frame for each possible audio bandwidth and frame size. +10 ms MB frames nominally contain 120 samples (10 ms at + 12 kHz), which is not a multiple of 16. +This is handled by coding 8 shell blocks (128 samples) and discarding the final + 8 samples of the last block. +The decoder contains no special case that prevents an encoder from placing + pulses in these samples, and they must be correctly parsed from the bitstream + if present, but they are otherwise ignored. + + + +Audio Bandwidth +Frame Size +Number of Shell Blocks +NB 10 ms 5 +MB 10 ms 8 +WB 10 ms 10 +NB 20 ms 10 +MB 20 ms 15 +WB 20 ms 20 + + +
+ +The first symbol in the excitation is a "rate level", which is an index from 0 + to 8, inclusive, coded using the PDF in + corresponding to the signal type of the current frame (from + ). +The rate level selects the PDF used to decode the number of pulses in + the individual shell blocks. +It does not directly convey any information about the bitrate or the number of + pulses itself, but merely changes the probability of the symbols in + . +Level 0 provides a more efficient encoding at low rates generally, and + level 8 provides a more efficient encoding at high rates generally, + though the most efficient level for a particular SILK frame may depend on the + exact distribution of the coded symbols. +An encoder should, but is not required to, use the most efficient rate level. + + + +Signal Type +PDF +Inactive or Unvoiced +{15, 51, 12, 46, 45, 13, 33, 27, 14}/256 +Voiced +{33, 30, 36, 17, 34, 49, 18, 21, 18}/256 + + +
+ +
+ +The total number of pulses in each of the shell blocks follows the rate level. +The pulse counts for all of the shell blocks are coded consecutively, before + the content of any of the blocks. +Each block may have anywhere from 0 to 16 pulses, inclusive, coded using the + 18-entry PDF in corresponding to the + rate level from . +The special value 17 indicates that this block has one or more additional + LSBs to decode for each coefficient. +If the decoder encounters this value, it decodes another value for the actual + pulse count of the block, but uses the PDF corresponding to the special rate + level 9 instead of the normal rate level. +This process repeats until the decoder reads a value less than 17, and it then + sets the number of extra LSBs used to the number of 17's decoded for that + block. +If it reads the value 17 ten times, then the next iteration uses the special + rate level 10 instead of 9. +The probability of decoding a 17 when using the PDF for rate level 10 is + zero, ensuring that the number of LSBs for a block will not exceed 10. +The cumulative distribution for rate level 10 is just a shifted version of + that for 9 and thus does not require any additional storage. + + + +Rate Level +PDF +0 +{131, 74, 25, 8, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}/256 +1 +{58, 93, 60, 23, 7, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}/256 +2 +{43, 51, 46, 33, 24, 16, 11, 8, 6, 3, 3, 3, 2, 1, 1, 2, 1, 2}/256 +3 +{17, 52, 71, 57, 31, 12, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}/256 +4 +{6, 21, 41, 53, 49, 35, 21, 11, 6, 3, 2, 2, 1, 1, 1, 1, 1, 1}/256 +5 +{7, 14, 22, 28, 29, 28, 25, 20, 17, 13, 11, 9, 7, 5, 4, 4, 3, 10}/256 +6 +{2, 5, 14, 29, 42, 46, 41, 31, 19, 11, 6, 3, 2, 1, 1, 1, 1, 1}/256 +7 +{1, 2, 4, 10, 19, 29, 35, 37, 34, 28, 20, 14, 8, 5, 4, 2, 2, 2}/256 +8 +{1, 2, 2, 5, 9, 14, 20, 24, 27, 28, 26, 23, 20, 15, 11, 8, 6, 15}/256 +9 +{1, 1, 1, 6, 27, 58, 56, 39, 25, 14, 10, 6, 3, 3, 2, 1, 1, 2}/256 +10 +{2, 1, 6, 27, 58, 56, 39, 25, 14, 10, 6, 3, 3, 2, 1, 1, 2, 0}/256 + + +
+ +
+ +The locations of the pulses in each shell block follow the pulse counts, + as decoded by silk_shell_decoder() (shell_coder.c). +As with the pulse counts, these locations are coded for all the shell blocks + before any of the remaining information for each block. +Unlike many other codecs, SILK places no restriction on the distribution of + pulses within a shell block. +All of the pulses may be placed in a single location, or each one in a unique + location, or anything in between. + + + +The location of pulses is coded by recursively partitioning each block into + halves, and coding how many pulses fall on the left side of the split. +All remaining pulses must fall on the right side of the split. +The process then recurses into the left half, and after that returns, the + right half (preorder traversal). +The PDF to use is chosen by the size of the current partition (16, 8, 4, or 2) + and the number of pulses in the partition (1 to 16, inclusive). +Tables  + through  list the + PDFs used for each partition size and pulse count. +This process skips partitions without any pulses, i.e., where the initial pulse + count from was zero, or where the split in + the prior level indicated that all of the pulses fell on the other side. +These partitions have nothing to code, so they require no PDF. + + + +Pulse Count +PDF + 1 {126, 130}/256 + 2 {56, 142, 58}/256 + 3 {25, 101, 104, 26}/256 + 4 {12, 60, 108, 64, 12}/256 + 5 {7, 35, 84, 87, 37, 6}/256 + 6 {4, 20, 59, 86, 63, 21, 3}/256 + 7 {3, 12, 38, 72, 75, 42, 12, 2}/256 + 8 {2, 8, 25, 54, 73, 59, 27, 7, 1}/256 + 9 {2, 5, 17, 39, 63, 65, 42, 18, 4, 1}/256 +10 {1, 4, 12, 28, 49, 63, 54, 30, 11, 3, 1}/256 +11 {1, 4, 8, 20, 37, 55, 57, 41, 22, 8, 2, 1}/256 +12 {1, 3, 7, 15, 28, 44, 53, 48, 33, 16, 6, 1, 1}/256 +13 {1, 2, 6, 12, 21, 35, 47, 48, 40, 25, 12, 5, 1, 1}/256 +14 {1, 1, 4, 10, 17, 27, 37, 47, 43, 33, 21, 9, 4, 1, 1}/256 +15 {1, 1, 1, 8, 14, 22, 33, 40, 43, 38, 28, 16, 8, 1, 1, 1}/256 +16 {1, 1, 1, 1, 13, 18, 27, 36, 41, 41, 34, 24, 14, 1, 1, 1, 1}/256 + + + +Pulse Count +PDF + 1 {127, 129}/256 + 2 {53, 149, 54}/256 + 3 {22, 105, 106, 23}/256 + 4 {11, 61, 111, 63, 10}/256 + 5 {6, 35, 86, 88, 36, 5}/256 + 6 {4, 20, 59, 87, 62, 21, 3}/256 + 7 {3, 13, 40, 71, 73, 41, 13, 2}/256 + 8 {3, 9, 27, 53, 70, 56, 28, 9, 1}/256 + 9 {3, 8, 19, 37, 57, 61, 44, 20, 6, 1}/256 +10 {3, 7, 15, 28, 44, 54, 49, 33, 17, 5, 1}/256 +11 {1, 7, 13, 22, 34, 46, 48, 38, 28, 14, 4, 1}/256 +12 {1, 1, 11, 22, 27, 35, 42, 47, 33, 25, 10, 1, 1}/256 +13 {1, 1, 6, 14, 26, 37, 43, 43, 37, 26, 14, 6, 1, 1}/256 +14 {1, 1, 4, 10, 20, 31, 40, 42, 40, 31, 20, 10, 4, 1, 1}/256 +15 {1, 1, 3, 8, 16, 26, 35, 38, 38, 35, 26, 16, 8, 3, 1, 1}/256 +16 {1, 1, 2, 6, 12, 21, 30, 36, 38, 36, 30, 21, 12, 6, 2, 1, 1}/256 + + + +Pulse Count +PDF + 1 {127, 129}/256 + 2 {49, 157, 50}/256 + 3 {20, 107, 109, 20}/256 + 4 {11, 60, 113, 62, 10}/256 + 5 {7, 36, 84, 87, 36, 6}/256 + 6 {6, 24, 57, 82, 60, 23, 4}/256 + 7 {5, 18, 39, 64, 68, 42, 16, 4}/256 + 8 {6, 14, 29, 47, 61, 52, 30, 14, 3}/256 + 9 {1, 15, 23, 35, 51, 50, 40, 30, 10, 1}/256 +10 {1, 1, 21, 32, 42, 52, 46, 41, 18, 1, 1}/256 +11 {1, 6, 16, 27, 36, 42, 42, 36, 27, 16, 6, 1}/256 +12 {1, 5, 12, 21, 31, 38, 40, 38, 31, 21, 12, 5, 1}/256 +13 {1, 3, 9, 17, 26, 34, 38, 38, 34, 26, 17, 9, 3, 1}/256 +14 {1, 3, 7, 14, 22, 29, 34, 36, 34, 29, 22, 14, 7, 3, 1}/256 +15 {1, 2, 5, 11, 18, 25, 31, 35, 35, 31, 25, 18, 11, 5, 2, 1}/256 +16 {1, 1, 4, 9, 15, 21, 28, 32, 34, 32, 28, 21, 15, 9, 4, 1, 1}/256 + + + +Pulse Count +PDF + 1 {128, 128}/256 + 2 {42, 172, 42}/256 + 3 {21, 107, 107, 21}/256 + 4 {12, 60, 112, 61, 11}/256 + 5 {8, 34, 86, 86, 35, 7}/256 + 6 {8, 23, 55, 90, 55, 20, 5}/256 + 7 {5, 15, 38, 72, 72, 36, 15, 3}/256 + 8 {6, 12, 27, 52, 77, 47, 20, 10, 5}/256 + 9 {6, 19, 28, 35, 40, 40, 35, 28, 19, 6}/256 +10 {4, 14, 22, 31, 37, 40, 37, 31, 22, 14, 4}/256 +11 {3, 10, 18, 26, 33, 38, 38, 33, 26, 18, 10, 3}/256 +12 {2, 8, 13, 21, 29, 36, 38, 36, 29, 21, 13, 8, 2}/256 +13 {1, 5, 10, 17, 25, 32, 38, 38, 32, 25, 17, 10, 5, 1}/256 +14 {1, 4, 7, 13, 21, 29, 35, 36, 35, 29, 21, 13, 7, 4, 1}/256 +15 {1, 2, 5, 10, 17, 25, 32, 36, 36, 32, 25, 17, 10, 5, 2, 1}/256 +16 {1, 2, 4, 7, 13, 21, 28, 34, 36, 34, 28, 21, 13, 7, 4, 2, 1}/256 + + +
+ +
+ +After the decoder reads the pulse locations for all blocks, it reads the LSBs + (if any) for each block in turn. +Inside each block, it reads all the LSBs for each coefficient in turn, even + those where no pulses were allocated, before proceeding to the next one. +For 10 ms MB frames, it reads LSBs even for the extra 8 samples in + the last block. +The LSBs are coded from most significant to least significant, and they all use + the PDF in . + + + +PDF +{136, 120}/256 + + + +The number of LSBs read for each coefficient in a block is determined in + . +The magnitude of the coefficient is initially equal to the number of pulses + placed at that location in . +As each LSB is decoded, the magnitude is doubled, and then the value of the LSB + added to it, to obtain an updated magnitude. + +
+ +
+ +After decoding the pulse locations and the LSBs, the decoder knows the + magnitude of each coefficient in the excitation. +It then decodes a sign for all coefficients with a non-zero magnitude, using + one of the PDFs from . +If the value decoded is 0, then the coefficient magnitude is negated. +Otherwise, it remains positive. + + + +The decoder chooses the PDF for the sign based on the signal type and + quantization offset type (from ) and the + number of pulses in the block (from ). +The number of pulses in the block does not take into account any LSBs. +Most PDFs are skewed towards negative signs because of the quantization offset, + but the PDFs for zero pulses are highly skewed towards positive signs. +If a block contains many positive coefficients, it is sometimes beneficial to + code it solely using LSBs (i.e., with zero pulses), since the encoder may be + able to save enough bits on the signs to justify the less efficient + coefficient magnitude encoding. + + + +Signal Type +Quantization Offset Type +Pulse Count +PDF +Inactive Low 0 {2, 254}/256 +Inactive Low 1 {207, 49}/256 +Inactive Low 2 {189, 67}/256 +Inactive Low 3 {179, 77}/256 +Inactive Low 4 {174, 82}/256 +Inactive Low 5 {163, 93}/256 +Inactive Low 6 or more {157, 99}/256 +Inactive High 0 {58, 198}/256 +Inactive High 1 {245, 11}/256 +Inactive High 2 {238, 18}/256 +Inactive High 3 {232, 24}/256 +Inactive High 4 {225, 31}/256 +Inactive High 5 {220, 36}/256 +Inactive High 6 or more {211, 45}/256 +Unvoiced Low 0 {1, 255}/256 +Unvoiced Low 1 {210, 46}/256 +Unvoiced Low 2 {190, 66}/256 +Unvoiced Low 3 {178, 78}/256 +Unvoiced Low 4 {169, 87}/256 +Unvoiced Low 5 {162, 94}/256 +Unvoiced Low 6 or more {152, 104}/256 +Unvoiced High 0 {48, 208}/256 +Unvoiced High 1 {242, 14}/256 +Unvoiced High 2 {235, 21}/256 +Unvoiced High 3 {224, 32}/256 +Unvoiced High 4 {214, 42}/256 +Unvoiced High 5 {205, 51}/256 +Unvoiced High 6 or more {190, 66}/256 +Voiced Low 0 {1, 255}/256 +Voiced Low 1 {162, 94}/256 +Voiced Low 2 {152, 104}/256 +Voiced Low 3 {147, 109}/256 +Voiced Low 4 {144, 112}/256 +Voiced Low 5 {141, 115}/256 +Voiced Low 6 or more {138, 118}/256 +Voiced High 0 {8, 248}/256 +Voiced High 1 {203, 53}/256 +Voiced High 2 {187, 69}/256 +Voiced High 3 {176, 80}/256 +Voiced High 4 {168, 88}/256 +Voiced High 5 {161, 95}/256 +Voiced High 6 or more {154, 102}/256 + + +
+ +
+ + +After the signs have been read, there is enough information to reconstruct the + complete excitation signal. +This requires adding a constant quantization offset to each non-zero sample, + and then pseudorandomly inverting and offsetting every sample. +The constant quantization offset varies depending on the signal type and + quantization offset type (see ). + + + +Signal Type +Quantization Offset Type +Quantization Offset (Q23) +Inactive Low 25 +Inactive High 60 +Unvoiced Low 25 +Unvoiced High 60 +Voiced Low 8 +Voiced High 25 + + + +Let e_raw[i] be the raw excitation value at position i, with a magnitude + composed of the pulses at that location (see + ) combined with any additional LSBs (see + ), and with the corresponding sign decoded in + . +Additionally, let seed be the current pseudorandom seed, which is initialized + to the value decoded from for the first sample in + the current SILK frame, and updated for each subsequent sample according to + the procedure below. +Finally, let offset_Q23 be the quantization offset from + . +Then the following procedure produces the final reconstructed excitation value, + e_Q23[i]: +
+ +
+When e_raw[i] is zero, sign() returns 0 by the definition in + , so the factor of 20 does not get added. +The final e_Q23[i] value may require more than 16 bits per sample, but will not + require more than 23, including the sign. +
+ +
+ +
+ +
+ + +The remainder of the reconstruction process for the frame does not need to be + bit-exact, as small errors should only introduce proportionally small + distortions. +Although the reference implementation only includes a fixed-point version of + the remaining steps, this section describes them in terms of a floating-point + version for simplicity. +This produces a signal with a nominal range of -1.0 to 1.0. + + + +silk_decode_core() (decode_core.c) contains the code for the main + reconstruction process. +It proceeds subframe-by-subframe, since quantization gains, LTP parameters, and + (in 20 ms SILK frames) LPC coefficients can vary from one to the + next. + + + +Let a_Q12[k] be the LPC coefficients for the current subframe. +If this is the first or second subframe of a 20 ms SILK frame and the LSF + interpolation factor, w_Q2 (see ), is + less than 4, then these correspond to the final LPC coefficients produced by + from the interpolated LSF coefficients, + n1_Q15[k] (computed in ). +Otherwise, they correspond to the final LPC coefficients produced from the + uninterpolated LSF coefficients for the current frame, n2_Q15[k]. + + + +Also, let n be the number of samples in a subframe (40 for NB, 60 for MB, and + 80 for WB), s be the index of the current subframe in this SILK frame (0 or 1 + for 10 ms frames, or 0 to 3 for 20 ms frames), and j be the index of + the first sample in the residual corresponding to the current subframe. + + +
+ +Voiced SILK frames (see ) pass the excitation + through an LTP filter using the parameters decoded in + to produce an LPC residual. +The LTP filter requires LPC residual values from before the current subframe as + input. +However, since the LPC coefficients may have changed, it obtains this residual + by "rewhitening" the corresponding output signal using the LPC coefficients + from the current subframe. +Let out[i] for + (j - pitch_lags[s] - d_LPC - 2) <= i < j + be the fully reconstructed output signal from the last + (pitch_lags[s] + d_LPC + 2) samples of previous subframes + (see ), where pitch_lags[s] is the pitch + lag for the current subframe from . +During reconstruction of the first subframe for this channel after either + +An uncoded regular SILK frame (if this is the side channel), or +A decoder reset (see ), + + out[] is rewhitened into an LPC residual, + res[i], via +
+ +
+This requires storage to buffer up to 306 values of out[i] from previous + subframes. +This corresponds to WB with a maximum pitch lag of + 18 ms * 16 kHz samples, plus 16 samples for d_LPC, plus 2 + samples for the width of the LTP filter. +
+ + +Let e_Q23[i] for j <= i < (j + n) be the + excitation for the current subframe, and b_Q7[k] for + 0 <= k < 5 be the coefficients of the LTP filter + taken from the codebook entry in one of + Tables  + through  + corresponding to the index decoded for the current subframe in + . +Then for i such that j <= i < (j + n), + the LPC residual is +
+ +
+
+ + +For unvoiced frames, the LPC residual for + j <= i < (j + n) is simply a normalized + copy of the excitation signal, i.e., +
+ +
+
+
+ +
+ +LPC synthesis uses the short-term LPC filter to predict the next output + coefficient. +For i such that (j - d_LPC) <= i < j, let + lpc[i] be the result of LPC synthesis from the last d_LPC samples of the + previous subframe, or zeros in the first subframe for this channel after + either + +An uncoded regular SILK frame (if this is the side channel), or +A decoder reset (see ). + +Then for i such that j <= i < (j + n), the + result of LPC synthesis for the current subframe is +
+ +
+The decoder saves the final d_LPC values, i.e., lpc[i] such that + (j + n - d_LPC) <= i < (j + n), + to feed into the LPC synthesis of the next subframe. +This requires storage for up to 16 values of lpc[i] (for WB frames). +
+ + +Then, the signal is clamped into the final nominal range: +
+ +
+This clamping occurs entirely after the LPC synthesis filter has run. +The decoder saves the unclamped values, lpc[i], to feed into the LPC filter for + the next subframe, but saves the clamped values, out[i], for rewhitening in + voiced frames. +
+
+ +
+ +
+ +
+ +For stereo streams, after decoding a frame from each channel, the decoder must + convert the mid-side (MS) representation into a left-right (LR) + representation. +The function silk_stereo_MS_to_LR (stereo_MS_to_LR.c) implements this process. +In it, the decoder predicts the side channel using a) a simple low-passed + version of the mid channel, and b) the unfiltered mid channel, using the + prediction weights decoded in . +This simple low-pass filter imposes a one-sample delay, and the unfiltered +mid channel is also delayed by one sample. +In order to allow seamless switching between stereo and mono, mono streams must + also impose the same one-sample delay. +The encoder requires an additional one-sample delay for both mono and stereo + streams, though an encoder may omit the delay for mono if it knows it will + never switch to stereo. + + + +The unmixing process operates in two phases. +The first phase lasts for 8 ms, during which it interpolates the + prediction weights from the previous frame, prev_w0_Q13 and prev_w1_Q13, to + the values for the current frame, w0_Q13 and w1_Q13. +The second phase simply uses these weights for the remainder of the frame. + + + +Let mid[i] and side[i] be the contents of out[i] (from + ) for the current mid and side channels, + respectively, and let left[i] and right[i] be the corresponding stereo output + channels. +If the side channel is not coded (see ), + then side[i] is set to zero. +Also let j be defined as in , n1 be + the number of samples in phase 1 (64 for NB, 96 for MB, and 128 for WB), + and n2 be the total number of samples in the frame. +Then for i such that j <= i < (j + n2), + the left and right channel output is +
+ +
+These formulas require two samples prior to index j, the start of the + frame, for the mid channel, and one prior sample for the side channel. +For the first frame after a decoder reset, zeros are used instead. +
+ +
+ +
+ +After stereo unmixing (if any), the decoder applies resampling to convert the + decoded SILK output to the sample rate desired by the application. +This is necessary when decoding a Hybrid frame at SWB or FB sample rates, or + whenever the decoder wants the output at a different sample rate than the + internal SILK sampling rate (e.g., to allow a constant sample rate when the + audio bandwidth changes, or to allow mixing with audio from other + applications). +The resampler itself is non-normative, and a decoder can use any method it + wants to perform the resampling. + + + +However, a minimum amount of delay is imposed to allow the resampler to + operate, and this delay is normative, so that the corresponding delay can be + applied to the MDCT layer in the encoder. +A decoder is always free to use a resampler which requires more delay than + allowed for here (e.g., to improve quality), but it must then delay the output + of the MDCT layer by this extra amount. +Keeping as much delay as possible on the encoder side allows an encoder which + knows it will never use any of the SILK or Hybrid modes to skip this delay. +By contrast, if it were all applied by the decoder, then a decoder which + processes audio in fixed-size blocks would be forced to delay the output of + CELT frames just in case of a later switch to a SILK or Hybrid mode. + + + + gives the maximum resampler delay + in samples at 48 kHz for each SILK audio bandwidth. +Because the actual output rate may not be 48 kHz, it may not be possible + to achieve exactly these delays while using a whole number of input or output + samples. +The reference implementation is able to resample to any of the supported + output sampling rates (8, 12, 16, 24, or 48 kHz) within or near this + delay constraint. +Some resampling filters (including those used by the reference implementation) + may add a delay that is not an exact integer, or is not linear-phase, and so + cannot be represented by a single delay at all frequencies. +However, such deviations are unlikely to be perceptible, and the comparison + tool described in is designed to be relatively + insensitive to them. +The delays listed here are the ones that should be targeted by the encoder. + + + +Audio Bandwidth +Delay in millisecond +NB 0.538 +MB 0.692 +WB 0.706 + + + +NB is given a smaller decoder delay allocation than MB and WB to allow a + higher-order filter when resampling to 8 kHz in both the encoder and + decoder. +This implies that the audio content of two SILK frames operating at different + bandwidths are not perfectly aligned in time. +This is not an issue for any transitions described in + , because they all involve a SILK decoder reset. +When the decoder is reset, any samples remaining in the resampling buffer + are discarded, and the resampler is re-initialized with silence. + + +
+ +
+ + +
+ + +The CELT layer of Opus is based on the Modified Discrete Cosine Transform + with partially overlapping windows of 5 to 22.5 ms. +The main principle behind CELT is that the MDCT spectrum is divided into +bands that (roughly) follow the Bark scale, i.e., the scale of the ear's +critical bands . The normal CELT layer uses 21 of those bands, though Opus + Custom (see ) may use a different number of bands. +In Hybrid mode, the first 17 bands (up to 8 kHz) are not coded. +A band can contain as little as one MDCT bin per channel, and as many as 176 +bins per channel, as detailed in . +In each band, the gain (energy) is coded separately from +the shape of the spectrum. Coding the gain explicitly makes it easy to +preserve the spectral envelope of the signal. The remaining unit-norm shape +vector is encoded using a Pyramid Vector Quantizer (PVQ) . + + + +Frame Size: +2.5 ms +5 ms +10 ms +20 ms +Start Frequency +Stop Frequency +Band Bins: + 0 1 2 4 8 0 Hz 200 Hz + 1 1 2 4 8 200 Hz 400 Hz + 2 1 2 4 8 400 Hz 600 Hz + 3 1 2 4 8 600 Hz 800 Hz + 4 1 2 4 8 800 Hz 1000 Hz + 5 1 2 4 8 1000 Hz 1200 Hz + 6 1 2 4 8 1200 Hz 1400 Hz + 7 1 2 4 8 1400 Hz 1600 Hz + 8 2 4 8 16 1600 Hz 2000 Hz + 9 2 4 8 16 2000 Hz 2400 Hz +10 2 4 8 16 2400 Hz 2800 Hz +11 2 4 8 16 2800 Hz 3200 Hz +12 4 8 16 32 3200 Hz 4000 Hz +13 4 8 16 32 4000 Hz 4800 Hz +14 4 8 16 32 4800 Hz 5600 Hz +15 6 12 24 48 5600 Hz 6800 Hz +16 6 12 24 48 6800 Hz 8000 Hz +17 8 16 32 64 8000 Hz 9600 Hz +18 12 24 48 96 9600 Hz 12000 Hz +19 18 36 72 144 12000 Hz 15600 Hz +20 22 44 88 176 15600 Hz 20000 Hz + + + +Transients are notoriously difficult for transform codecs to code. +CELT uses two different strategies for them: + +Using multiple smaller MDCTs instead of a single large MDCT, and +Dynamic time-frequency resolution changes (See ). + +To improve quality on highly tonal and periodic signals, CELT includes +a prefilter/postfilter combination. The prefilter on the encoder side +attenuates the signal's harmonics. The postfilter on the decoder side +restores the original gain of the harmonics, while shaping the coding noise +to roughly follow the harmonics. Such noise shaping reduces the perception +of the noise. + + + +When coding a stereo signal, three coding methods are available: + +mid-side stereo: encodes the mean and the difference of the left and right channels, +intensity stereo: only encodes the mean of the left and right channels (discards the difference), +dual stereo: encodes the left and right channels separately. + + + + +An overview of the decoder is given in . + + +
+| decoder |----+ + | +---------+ | + | | + | +---------+ v + | | Fine | +---+ + +->| decoder |->| + | + | +---------+ +---+ + | ^ | ++---------+ | | | +| Range | | +----------+ v +| Decoder |-+ | Bit | +------+ ++---------+ | |Allocation| | 2**x | + | +----------+ +------+ + | | | + | v v +--------+ + | +---------+ +---+ +-------+ | pitch | + +->| PVQ |->| * |->| IMDCT |->| post- |---> + | | decoder | +---+ +-------+ | filter | + | +---------+ +--------+ + | ^ + +--------------------------------------+ +]]> +
+ + +The decoder is based on the following symbols and sets of symbols: + + + +Symbol(s) +PDF +Condition +silence {32767, 1}/32768 +post-filter {1, 1}/2 +octave uniform (6)post-filter +period raw bits (4+octave)post-filter +gain raw bits (3)post-filter +tapset {2, 1, 1}/4post-filter +transient {7, 1}/8 +intra {7, 1}/8 +coarse energy +tf_change +tf_select {1, 1}/2 +spread {7, 2, 21, 2}/32 +dyn. alloc. +alloc. trim {2, 2, 5, 10, 22, 46, 22, 10, 5, 2, 2}/128 +skip {1, 1}/2 +intensity uniform +dual {1, 1}/2 +fine energy +residual +anti-collapse{1, 1}/2 +finalize + + + +The decoder extracts information from the range-coded bitstream in the order +described in . In some circumstances, it is +possible for a decoded value to be out of range due to a very small amount of redundancy +in the encoding of large integers by the range coder. +In that case, the decoder should assume there has been an error in the coding, +decoding, or transmission and SHOULD take measures to conceal the error and/or report +to the application that a problem has occurred. Such out of range errors cannot occur +in the SILK layer. + + +
+ +The "transient" flag indicates whether the frame uses a single long MDCT or several short MDCTs. +When it is set, then the MDCT coefficients represent multiple +short MDCTs in the frame. When not set, the coefficients represent a single +long MDCT for the frame. The flag is encoded in the bitstream with a probability of 1/8. +In addition to the global transient flag is a per-band +binary flag to change the time-frequency (tf) resolution independently in each band. The +change in tf resolution is defined in tf_select_table[][] in celt.c and depends +on the frame size, whether the transient flag is set, and the value of tf_select. +The tf_select flag uses a 1/2 probability, but is only decoded +if it can have an impact on the result knowing the value of all per-band +tf_change flags. + +
+ +
+ + +It is important to quantize the energy with sufficient resolution because +any energy quantization error cannot be compensated for at a later +stage. Regardless of the resolution used for encoding the spectral shape of a band, +it is perceptually important to preserve the energy in each band. CELT uses a +three-step coarse-fine-fine strategy for encoding the energy in the base-2 log +domain, as implemented in quant_bands.c + +
+ +Coarse quantization of the energy uses a fixed resolution of 6 dB +(integer part of base-2 log). To minimize the bitrate, prediction is applied +both in time (using the previous frame) and in frequency (using the previous +bands). The part of the prediction that is based on the +previous frame can be disabled, creating an "intra" frame where the energy +is coded without reference to prior frames. The decoder first reads the intra flag +to determine what prediction is used. +The 2-D z-transform of +the prediction filter is: +
+ +
+where b is the band index and l is the frame index. The prediction coefficients +applied depend on the frame size in use when not using intra energy and are alpha=0, beta=4915/32768 +when using intra energy. +The time-domain prediction is based on the final fine quantization of the previous +frame, while the frequency domain (within the current frame) prediction is based +on coarse quantization only (because the fine quantization has not been computed +yet). The prediction is clamped internally so that fixed point implementations with +limited dynamic range always remain in the same state as floating point implementations. +We approximate the ideal +probability distribution of the prediction error using a Laplace distribution +with separate parameters for each frame size in intra- and inter-frame modes. These +parameters are held in the e_prob_model table in quant_bands.c. +The +coarse energy quantization is performed by unquant_coarse_energy() and +unquant_coarse_energy_impl() (quant_bands.c). The encoding of the Laplace-distributed values is +implemented in ec_laplace_decode() (laplace.c). +
+ +
+ +
+ +The number of bits assigned to fine energy quantization in each band is determined +by the bit allocation computation described in . +Let B_i be the number of fine energy bits +for band i; the refinement is an integer f in the range [0,2**B_i-1]. The mapping between f +and the correction applied to the coarse energy is equal to (f+1/2)/2**B_i - 1/2. Fine +energy quantization is implemented in quant_fine_energy() (quant_bands.c). + + +When some bits are left "unused" after all other flags have been decoded, these bits +are assigned to a "final" step of fine allocation. In effect, these bits are used +to add one extra fine energy bit per band per channel. The allocation process +determines two "priorities" for the final fine bits. +Any remaining bits are first assigned only to bands of priority 0, starting +from band 0 and going up. If all bands of priority 0 have received one bit per +channel, then bands of priority 1 are assigned an extra bit per channel, +starting from band 0. If any bits are left after this, they are left unused. +This is implemented in unquant_energy_finalise() (quant_bands.c). + + +
+ +
+ +
+ +Because the bit allocation drives the decoding of the range-coder +stream, it MUST be recovered exactly so that identical coding decisions are +made in the encoder and decoder. Any deviation from the reference's resulting +bit allocation will result in corrupted output, though implementers are +free to implement the procedure in any way which produces identical results. + +The per-band gain-shape structure of the CELT layer ensures that using + the same number of bits for the spectral shape of a band in every frame will + result in a roughly constant signal-to-noise ratio in that band. +This results in coding noise that has the same spectral envelope as the signal. +The masking curve produced by a standard psychoacoustic model also closely + follows the spectral envelope of the signal. +This structure means that the ideal allocation is more consistent from frame to + frame than it is for other codecs without an equivalent structure, and that a + fixed allocation provides fairly consistent perceptual + performance . + +Many codecs transmit significant amounts of side information to control the + bit allocation within a frame. +Often this control is only indirect, and must be exercised carefully to + achieve the desired rate constraints. +The CELT layer, however, can adapt over a very wide range of rates, and thus + has a large number of codebook sizes to choose from for each band. +Explicitly signaling the size of each of these codebooks would impose + considerable overhead, even though the allocation is relatively static from + frame to frame. +This is because all of the information required to compute these codebook sizes + must be derived from a single frame by itself, in order to retain robustness + to packet loss, so the signaling cannot take advantage of knowledge of the + allocation in neighboring frames. +This problem is exacerbated in low-latency (small frame size) applications, + which would include this overhead in every frame. + +For this reason, in the MDCT mode Opus uses a primarily implicit bit +allocation. The available bitstream capacity is known in advance to both +the encoder and decoder without additional signaling, ultimately from the +packet sizes expressed by a higher-level protocol. Using this information, +the codec interpolates an allocation from a hard-coded table. + +While the band-energy structure effectively models intra-band masking, +it ignores the weaker inter-band masking, band-temporal masking, and +other less significant perceptual effects. While these effects can +often be ignored, they can become significant for particular samples. One +mechanism available to encoders would be to simply increase the overall +rate for these frames, but this is not possible in a constant rate mode +and can be fairly inefficient. As a result three explicitly signaled +mechanisms are provided to alter the implicit allocation: + + + +Band boost +Allocation trim +Band skipping + + + +The first of these mechanisms, band boost, allows an encoder to boost +the allocation in specific bands. The second, allocation trim, works by +biasing the overall allocation towards higher or lower frequency bands. The third, band +skipping, selects which low-precision high frequency bands +will be allocated no shape bits at all. + +In stereo mode there are two additional parameters +potentially coded as part of the allocation procedure: a parameter to allow the +selective elimination of allocation for the 'side' (i.e., intensity stereo) in jointly coded bands, +and a flag to deactivate joint coding (i.e., dual stereo). These values are not signaled if +they would be meaningless in the overall context of the allocation. + +Because every signaled adjustment increases overhead and implementation +complexity, none were included speculatively: the reference encoder makes use +of all of these mechanisms. While the decision logic in the reference was +found to be effective enough to justify the overhead and complexity, further +analysis techniques may be discovered which increase the effectiveness of these +parameters. As with other signaled parameters, an encoder is free to choose the +values in any manner, but unless a technique is known to deliver superior +perceptual results the methods used by the reference implementation should be +used. + +The allocation process consists of the following steps: determining the per-band +maximum allocation vector, decoding the boosts, decoding the tilt, determining +the remaining capacity of the frame, searching the mode table for the +entry nearest but not exceeding the available space (subject to the tilt, boosts, band +maximums, and band minimums), linear interpolation, reallocation of +unused bits with concurrent skip decoding, determination of the +fine-energy vs. shape split, and final reallocation. This process results +in a per-band shape allocation (in 1/8th bit units), a per-band fine-energy +allocation (in 1 bit per channel units), a set of band priorities for +controlling the use of remaining bits at the end of the frame, and a +remaining balance of unallocated space, which is usually zero except +at very high rates. + + +The "static" bit allocation (in 1/8 bits) for a quality q, excluding the minimums, maximums, +tilt and boosts, is equal to channels*N*alloc[band][q]<<LM>>2, where +alloc[][] is given in and LM=log2(frame_size/120). The allocation +is obtained by linearly interpolating between two values of q (in steps of 1/64) to find the +highest allocation that does not exceed the number of bits remaining. + + + + Rows indicate the MDCT bands, columns are the different quality (q) parameters. The units are 1/32 bit per MDCT bin. +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +090110118126134144152162172200 +080100110119127137145155165200 +07590103112120130138148158200 +0698493104114124132142152200 +063788695103113123133143200 +05671808997107117127137200 +04965758391101111121131200 +0405870788595105115125200 +034516572788898108118198 +029455966728292102112193 +02039536066768696106188 +01832475460708090100183 +0102640475464748494178 +002031394757677787173 +001223324151617181168 +00015253545556575163 +0004172939495969158 +0000122333435363153 +000011626364656148 +000001015203045129 +00000111120104 + + +The maximum allocation vector is an approximation of the maximum space +that can be used by each band for a given mode. The value is +approximate because the shape encoding is variable rate (due +to entropy coding of splitting parameters). Setting the maximum too low reduces the +maximum achievable quality in a band while setting it too high +may result in waste: bitstream capacity available at the end +of the frame which can not be put to any use. The maximums +specified by the codec reflect the average maximum. In the reference +implementation, the maximums in bits/sample are precomputed in a static table +(see cache_caps50[] in static_modes_float.h) for each band, +for each value of LM, and for both mono and stereo. + +Implementations are expected +to simply use the same table data, but the procedure for generating +this table is included in rate.c as part of compute_pulse_cache(). + +To convert the values in cache.caps into the actual maximums: first +set nbBands to the maximum number of bands for this mode, and stereo to +zero if stereo is not in use and one otherwise. For each band set N +to the number of MDCT bins covered by the band (for one channel), set LM +to the shift value for the frame size, +then set i to nbBands*(2*LM+stereo). Then set the maximum for the band to +the i-th index of cache.caps + 64 and multiply by the number of channels +in the current frame (one or two) and by N, then divide the result by 4 +using integer division. The resulting vector will be called +cap[]. The elements fit in signed 16-bit integers but do not fit in 8 bits. +This procedure is implemented in the reference in the function init_caps() in celt.c. + + +The band boosts are represented by a series of binary symbols which +are entropy coded with very low probability. Each band can potentially be boosted +multiple times, subject to the frame actually having enough room to obey +the boost and having enough room to code the boost symbol. The default +coding cost for a boost starts out at six bits (probability p=1/64), but subsequent boosts +in a band cost only a single bit and every time a band is boosted the +initial cost is reduced (down to a minimum of two bits, or p=1/4). Since the initial +cost of coding a boost is 6 bits, the coding cost of the boost symbols when +completely unused is 0.48 bits/frame for a 21 band mode (21*-log2(1-1/2**6)). + +To decode the band boosts: First set 'dynalloc_logp' to 6, the initial +amount of storage required to signal a boost in bits, 'total_bits' to the +size of the frame in 8th bits, 'total_boost' to zero, and 'tell' to the total number +of 8th bits decoded +so far. For each band from the coding start (0 normally, but 17 in Hybrid mode) +to the coding end (which changes depending on the signaled bandwidth), the boost quanta +in units of 1/8 bit is calculated as quanta = min(8*N, max(48, N)). +This represents a boost step size of six bits, subject to a lower limit of +1/8th bit/sample and an upper limit of 1 bit/sample. +Set 'boost' to zero and 'dynalloc_loop_logp' +to dynalloc_logp. While dynalloc_loop_log (the current worst case symbol cost) in +8th bits plus tell is less than total_bits plus total_boost and boost is less than cap[] for this +band: Decode a bit from the bitstream with a with dynalloc_loop_logp as the cost +of a one, update tell to reflect the current used capacity, if the decoded value +is zero break the loop otherwise add quanta to boost and total_boost, subtract quanta from +total_bits, and set dynalloc_loop_log to 1. When the while loop finishes +boost contains the boost for this band. If boost is non-zero and dynalloc_logp +is greater than 2, decrease dynalloc_logp. Once this process has been +executed on all bands, the band boosts have been decoded. This procedure +is implemented around line 2474 of celt.c. + +At very low rates it is possible that there won't be enough available +space to execute the inner loop even once. In these cases band boost +is not possible but its overhead is completely eliminated. Because of the +high cost of band boost when activated, a reasonable encoder should not be +using it at very low rates. The reference implements its dynalloc decision +logic around line 1304 of celt.c. + +The allocation trim is a integer value from 0-10. The default value of +5 indicates no trim. The trim parameter is entropy coded in order to +lower the coding cost of less extreme adjustments. Values lower than +5 bias the allocation towards lower frequencies and values above 5 +bias it towards higher frequencies. Like other signaled parameters, signaling +of the trim is gated so that it is not included if there is insufficient space +available in the bitstream. To decode the trim, first set +the trim value to 5, then if and only if the count of decoded 8th bits so far (ec_tell_frac) +plus 48 (6 bits) is less than or equal to the total frame size in 8th +bits minus total_boost (a product of the above band boost procedure), +decode the trim value using the PDF in . + + +PDF +{1, 1, 2, 5, 10, 22, 46, 22, 10, 5, 2, 2}/128 + + +For 10 ms and 20 ms frames using short blocks and that have at least LM+2 bits left prior to +the allocation process, then one anti-collapse bit is reserved in the allocation process so it can +be decoded later. Following the the anti-collapse reservation, one bit is reserved for skip if available. + +For stereo frames, bits are reserved for intensity stereo and for dual stereo. Intensity stereo +requires ilog2(end-start) bits. Those bits are reserved if there is enough bits left. Following this, one +bit is reserved for dual stereo if available. + + +The allocation computation begins by setting up some initial conditions. +'total' is set to the remaining available 8th bits, computed by taking the +size of the coded frame times 8 and subtracting ec_tell_frac(). From this value, one (8th bit) +is subtracted to ensure that the resulting allocation will be conservative. 'anti_collapse_rsv' +is set to 8 (8th bits) if and only if the frame is a transient, LM is greater than 1, and total is +greater than or equal to (LM+2) * 8. Total is then decremented by anti_collapse_rsv and clamped +to be equal to or greater than zero. 'skip_rsv' is set to 8 (8th bits) if total is greater than +8, otherwise it is zero. Total is then decremented by skip_rsv. This reserves space for the +final skipping flag. + +If the current frame is stereo, intensity_rsv is set to the conservative log2 in 8th bits +of the number of coded bands for this frame (given by the table LOG2_FRAC_TABLE in rate.c). If +intensity_rsv is greater than total then intensity_rsv is set to zero. Otherwise total is +decremented by intensity_rsv, and if total is still greater than 8, dual_stereo_rsv is +set to 8 and total is decremented by dual_stereo_rsv. + +The allocation process then computes a vector representing the hard minimum amounts allocation +any band will receive for shape. This minimum is higher than the technical limit of the PVQ +process, but very low rate allocations produce an excessively sparse spectrum and these bands +are better served by having no allocation at all. For each coded band, set thresh[band] to +twenty-four times the number of MDCT bins in the band and divide by 16. If 8 times the number +of channels is greater, use that instead. This sets the minimum allocation to one bit per channel +or 48 128th bits per MDCT bin, whichever is greater. The band-size dependent part of this +value is not scaled by the channel count, because at the very low rates where this limit is +applicable there will usually be no bits allocated to the side. + +The previously decoded allocation trim is used to derive a vector of per-band adjustments, +'trim_offsets[]'. For each coded band take the alloc_trim and subtract 5 and LM. Then multiply +the result by the number of channels, the number of MDCT bins in the shortest frame size for this mode, +the number of remaining bands, 2**LM, and 8. Then divide this value by 64. Finally, if the +number of MDCT bins in the band per channel is only one, 8 times the number of channels is subtracted +in order to diminish the allocation by one bit, because width 1 bands receive greater benefit +from the coarse energy coding. + + +
+ +
+ +In each band, the normalized "shape" is encoded +using a vector quantization scheme called a "pyramid vector quantizer". + + +In +the simplest case, the number of bits allocated in + is converted to a number of pulses as described +by . Knowing the number of pulses and the +number of samples in the band, the decoder calculates the size of the codebook +as detailed in . The size is used to decode +an unsigned integer (uniform probability model), which is the codeword index. +This index is converted into the corresponding vector as explained in +. This vector is then scaled to unit norm. + + +
+ +Although the allocation is performed in 1/8th bit units, the quantization requires +an integer number of pulses K. To do this, the encoder searches for the value +of K that produces the number of bits nearest to the allocated value +(rounding down if exactly halfway between two values), not to exceed +the total number of bits available. For efficiency reasons, the search is performed against a +precomputed allocation table which only permits some K values for each N. The number of +codebook entries can be computed as explained in . The difference +between the number of bits allocated and the number of bits used is accumulated to a +"balance" (initialized to zero) that helps adjust the +allocation for the next bands. One third of the balance is applied to the +bit allocation of each band to help achieve the target allocation. The only +exceptions are the band before the last and the last band, for which half the balance +and the whole balance are applied, respectively. + +
+ +
+ + +Decoding of PVQ vectors is implemented in decode_pulses() (cwrs.c). +The unique codeword index is decoded as a uniformly-distributed integer value between 0 and +V(N,K)-1, where V(N,K) is the number of possible combinations of K pulses in +N samples. The index is then converted to a vector in the same way specified in +. The indexing is based on the calculation of V(N,K) +(denoted N(L,K) in ). + + + + The number of combinations can be computed recursively as +V(N,K) = V(N-1,K) + V(N,K-1) + V(N-1,K-1), with V(N,0) = 1 and V(0,K) = 0, K != 0. +There are many different ways to compute V(N,K), including precomputed tables and direct +use of the recursive formulation. The reference implementation applies the recursive +formulation one line (or column) at a time to save on memory use, +along with an alternate, +univariate recurrence to initialize an arbitrary line, and direct +polynomial solutions for small N. All of these methods are +equivalent, and have different trade-offs in speed, memory usage, and +code size. Implementations MAY use any methods they like, as long as +they are equivalent to the mathematical definition. + + + +The decoded vector X is recovered as follows. +Let i be the index decoded with the procedure in + with ft = V(N,K), so that 0 <= i < V(N,K). +Let k = K. +Then for j = 0 to (N - 1), inclusive, do: + +Let p = (V(N-j-1,k) + V(N-j,k))/2. + +If i < p, then let sgn = 1, else let sgn = -1 + and set i = i - p. + +Let k0 = k and set p = p - V(N-j-1,k). + +While p > i, set k = k - 1 and + p = p - V(N-j-1,k). + + +Set X[j] = sgn*(k0 - k) and i = i - p. + + + + + +The decoded vector X is then normalized such that its +L2-norm equals one. + +
+ +
+ +The normalized vector decoded in is then rotated +for the purpose of avoiding tonal artifacts. The rotation gain is equal to +
+ +
+ +where N is the number of dimensions, K is the number of pulses, and f_r depends on +the value of the "spread" parameter in the bit-stream. +
+ + +Spread value +f_r + 0 infinite (no rotation) + 1 15 + 2 10 + 3 5 + + + +The rotation angle is then calculated as +
+ +
+A 2-D rotation R(i,j) between points x_i and x_j is defined as: +
+ +
+ +An N-D rotation is then achieved by applying a series of 2-D rotations back and forth, in the +following order: R(x_1, x_2), R(x_2, x_3), ..., R(x_N-2, X_N-1), R(x_N-1, X_N), +R(x_N-2, X_N-1), ..., R(x_1, x_2). +
+ + +If the decoded vector represents more +than one time block, then this spreading process is applied separately on each time block. +Also, if each block represents 8 samples or more, then another N-D rotation, by +(pi/2-theta), is applied before the rotation described above. This +extra rotation is applied in an interleaved manner with a stride equal to round(sqrt(N/nb_blocks)), +i.e., it is applied independently for each set of sample S_k = {stride*n + k}, n=0..N/stride-1. + +
+ +
+ +To avoid the need for multi-precision calculations when decoding PVQ codevectors, +the maximum size allowed for codebooks is 32 bits. When larger codebooks are +needed, the vector is instead split in two sub-vectors of size N/2. +A quantized gain parameter with precision +derived from the current allocation is entropy coded to represent the relative +gains of each side of the split, and the entire decoding process is recursively +applied. Multiple levels of splitting may be applied up to a limit of LM+1 splits. +The same recursive mechanism is applied for the joint coding +of stereo audio. + + +
+ +
+ +The time-frequency (TF) parameters are used to control the time-frequency resolution tradeoff +in each coded band. For each band, there are two possible TF choices. For the first +band coded, the PDF is {3, 1}/4 for frames marked as transient and {15, 1}/16 for +the other frames. For subsequent bands, the TF choice is coded relative to the +previous TF choice with probability {15, 1}/15 for transient frames and {31, 1}/32 +otherwise. The mapping between the decoded TF choices and the adjustment in TF +resolution is shown in the tables below. + + + +Frame size (ms) +0 +1 +2.5 0 -1 +5 0 -1 +10 0 -2 +20 0 -2 + + + +Frame size (ms) +0 +1 +2.5 0 -1 +5 0 -2 +10 0 -3 +20 0 -3 + + + + +Frame size (ms) +0 +1 +2.5 0 -1 +5 1 0 +10 2 0 +20 3 0 + + + +Frame size (ms) +0 +1 +2.5 0 -1 +5 1 -1 +10 1 -1 +20 1 -1 + + + +A negative TF adjustment means that the temporal resolution is increased, +while a positive TF adjustment means that the frequency resolution is increased. +Changes in TF resolution are implemented using the Hadamard transform . To increase +the time resolution by N, N "levels" of the Hadamard transform are applied to the +decoded vector for each interleaved MDCT vector. To increase the frequency resolution +(assumes a transient frame), then N levels of the Hadamard transform are applied +across the interleaved MDCT vector. In the case of increased +time resolution the decoder uses the "sequency order" because the input vector +is sorted in time. + +
+ + +
+ +
+ +The anti-collapse feature is designed to avoid the situation where the use of multiple +short MDCTs causes the energy in one or more of the MDCTs to be zero for +some bands, causing unpleasant artifacts. +When the frame has the transient bit set, an anti-collapse bit is decoded. +When anti-collapse is set, the energy in each small MDCT is prevented +from collapsing to zero. For each band of each MDCT where a collapse is +detected, a pseudo-random signal is inserted with an energy corresponding +to the minimum energy over the two previous frames. A renormalization step is +then required to ensure that the anti-collapse step did not alter the +energy preservation property. + +
+ +
+ +Just as each band was normalized in the encoder, the last step of the decoder before +the inverse MDCT is to denormalize the bands. Each decoded normalized band is +multiplied by the square root of the decoded energy. This is done by denormalise_bands() +(bands.c). + +
+ +
+ + +The inverse MDCT implementation has no special characteristics. The +input is N frequency-domain samples and the output is 2*N time-domain +samples, while scaling by 1/2. A "low-overlap" window reduces the algorithmic delay. +It is derived from a basic (full overlap) 240-sample version of the window used by the Vorbis codec: +
+ +
+The low-overlap window is created by zero-padding the basic window and inserting ones in the +middle, such that the resulting window still satisfies power complementarity . +The IMDCT and +windowing are performed by mdct_backward (mdct.c). +
+ +
+ +The output of the inverse MDCT (after weighted overlap-add) is sent to the +post-filter. Although the post-filter is applied at the end, the post-filter +parameters are encoded at the beginning, just after the silence flag. +The post-filter can be switched on or off using one bit (logp=1). +If the post-filter is enabled, then the octave is decoded as an integer value +between 0 and 6 of uniform probability. Once the octave is known, the fine pitch +within the octave is decoded using 4+octave raw bits. The final pitch period +is equal to (16<<octave)+fine_pitch-1 so it is bounded between 15 and 1022, +inclusively. Next, the gain is decoded as three raw bits and is equal to +G=3*(int_gain+1)/32. The set of post-filter taps is decoded last, using +a pdf equal to {2, 1, 1}/4. Tapset zero corresponds to the filter coefficients +g0 = 0.3066406250, g1 = 0.2170410156, g2 = 0.1296386719. Tapset one +corresponds to the filter coefficients g0 = 0.4638671875, g1 = 0.2680664062, +g2 = 0, and tapset two uses filter coefficients g0 = 0.7998046875, +g1 = 0.1000976562, g2 = 0. + + + +The post-filter response is thus computed as: +
+ + + +
+ +During a transition between different gains, a smooth transition is calculated +using the square of the MDCT window. It is important that values of y(n) be +interpolated one at a time such that the past value of y(n) used is interpolated. +
+
+ +
+ +After the post-filter, +the signal is de-emphasized using the inverse of the pre-emphasis filter +used in the encoder: +
+ +
+where alpha_p=0.8500061035. +
+
+ +
+ +
+ +
+ +Packet loss concealment (PLC) is an optional decoder-side feature that +SHOULD be included when receiving from an unreliable channel. Because +PLC is not part of the bitstream, there are many acceptable ways to +implement PLC with different complexity/quality trade-offs. + + + +The PLC in +the reference implementation depends on the mode of last packet received. +In CELT mode, the PLC finds a periodicity in the decoded +signal and repeats the windowed waveform using the pitch offset. The windowed +waveform is overlapped in such a way as to preserve the time-domain aliasing +cancellation with the previous frame and the next frame. This is implemented +in celt_decode_lost() (mdct.c). In SILK mode, the PLC uses LPC extrapolation +from the previous frame, implemented in silk_PLC() (PLC.c). + + +
+ +Clock drift refers to the gradual desynchronization of two endpoints +whose sample clocks run at different frequencies while they are streaming +live audio. Differences in clock frequencies are generally attributable to +manufacturing variation in the endpoints' clock hardware. For long-lived +streams, the time difference between sender and receiver can grow without +bound. + + + +When the sender's clock runs slower than the receiver's, the effect is similar +to packet loss: too few packets are received. The receiver can distinguish +between drift and loss if the transport provides packet timestamps. A receiver +for live streams SHOULD conceal the effects of drift, and MAY do so by invoking +the PLC. + + + +When the sender's clock runs faster than the receiver's, too many packets will +be received. The receiver MAY respond by skipping any packet (i.e., not +submitting the packet for decoding). This is likely to produce a less severe +artifact than if the frame were dropped after decoding. + + + +A decoder MAY employ a more sophisticated drift compensation method. For +example, the +NetEQ component +of the +Google WebRTC codebase +compensates for drift by adding or removing +one period when the signal is highly periodic. The reference implementation of +Opus allows a caller to learn whether the current frame's signal is highly +periodic, and if so what the period is, using the OPUS_GET_PITCH() request. + +
+ +
+ +
+ + +Switching between the Opus coding modes, audio bandwidths, and channel counts + requires careful consideration to avoid audible glitches. +Switching between any two configurations of the CELT-only mode, any two + configurations of the Hybrid mode, or from WB SILK to Hybrid mode does not + require any special treatment in the decoder, as the MDCT overlap will smooth + the transition. +Switching from Hybrid mode to WB SILK requires adding in the final contents + of the CELT overlap buffer to the first SILK-only packet. +This can be done by decoding a 2.5 ms silence frame with the CELT decoder + using the channel count of the SILK-only packet (and any choice of audio + bandwidth), which will correctly handle the cases when the channel count + changes as well. + + + +When changing the channel count for SILK-only or Hybrid packets, the encoder + can avoid glitches by smoothly varying the stereo width of the input signal + before or after the transition, and SHOULD do so. +However, other transitions between SILK-only packets or between NB or MB SILK + and Hybrid packets may cause glitches, because neither the LSF coefficients + nor the LTP, LPC, stereo unmixing, and resampler buffers are available at the + new sample rate. +These switches SHOULD be delayed by the encoder until quiet periods or + transients, where the inevitable glitches will be less audible. Additionally, + the bit-stream MAY include redundant side information ("redundancy"), in the + form of additional CELT frames embedded in each of the Opus frames around the + transition. + + + +The other transitions that cannot be easily handled are those where the lower + frequencies switch between the SILK LP-based model and the CELT MDCT model. +However, an encoder may not have an opportunity to delay such a switch to a + convenient point. +For example, if the content switches from speech to music, and the encoder does + not have enough latency in its analysis to detect this in advance, there may + be no convenient silence period during which to make the transition for quite + some time. +To avoid or reduce glitches during these problematic mode transitions, and + also between audio bandwidth changes in the SILK-only modes, transitions MAY + include redundant side information ("redundancy"), in the form of an + additional CELT frame embedded in the Opus frame. + + + +A transition between coding the lower frequencies with the LP model and the + MDCT model or a transition that involves changing the SILK bandwidth + is only normatively specified when it includes redundancy. +For those without redundancy, it is RECOMMENDED that the decoder use a + concealment technique (e.g., make use of a PLC algorithm) to "fill in" the + gap or discontinuity caused by the mode transition. +Therefore, PLC MUST NOT be applied during any normative transition, i.e., when + +A packet includes redundancy for this transition (as described below), +The transition is between any WB SILK packet and any Hybrid packet, or vice + versa, +The transition is between any two Hybrid mode packets, or +The transition is between any two CELT mode packets, + + unless there is actual packet loss. + + +
+ +Transitions with side information include an extra 5 ms "redundant" CELT + frame within the Opus frame. +This frame is designed to fill in the gap or discontinuity in the different + layers without requiring the decoder to conceal it. +For transitions from CELT-only to SILK-only or Hybrid, the redundant frame is + inserted in the first Opus frame after the transition (i.e., the first + SILK-only or Hybrid frame). +For transitions from SILK-only or Hybrid to CELT-only, the redundant frame is + inserted in the last Opus frame before the transition (i.e., the last + SILK-only or Hybrid frame). + + +
+ +The presence of redundancy is signaled in all SILK-only and Hybrid frames, not + just those involved in a mode transition. +This allows the frames to be decoded correctly even if an adjacent frame is + lost. +For SILK-only frames, this signaling is implicit, based on the size of the + of the Opus frame and the number of bits consumed decoding the SILK portion of + it. +After decoding the SILK portion of the Opus frame, the decoder uses ec_tell() + (see ) to check if there are at least 17 bits + remaining. +If so, then the frame contains redundancy. + + + +For Hybrid frames, this signaling is explicit. +After decoding the SILK portion of the Opus frame, the decoder uses ec_tell() + (see ) to ensure there are at least 37 bits remaining. +If so, it reads a symbol with the PDF in + , and if the value is 1, then the + frame contains redundancy. +Otherwise (if there were fewer than 37 bits left or the value was 0), the frame + does not contain redundancy. + + + +PDF +{4095, 1}/4096 + +
+ +
+ +Since the current frame is a SILK-only or a Hybrid frame, it must be at least + 10 ms. +Therefore, it needs an additional flag to indicate whether the redundant + 5 ms CELT frame should be mixed into the beginning of the current frame, + or the end. +After determining that a frame contains redundancy, the decoder reads a + 1 bit symbol with a uniform PDF + (). + + + +PDF +{1, 1}/2 + + + +If the value is zero, this is the first frame in the transition, and the + redundancy belongs at the end. +If the value is one, this is the second frame in the transition, and the + redundancy belongs at the beginning. +There is no way to specify that an Opus frame contains separate redundant CELT + frames at both the beginning and the end. + +
+ +
+ +Unlike the CELT portion of a Hybrid frame, the redundant CELT frame does not + use the same entropy coder state as the rest of the Opus frame, because this + would break the CELT bit allocation mechanism in Hybrid frames. +Thus, a redundant CELT frame always starts and ends on a byte boundary, even in + SILK-only frames, where this is not strictly necessary. + + + +For SILK-only frames, the number of bytes in the redundant CELT frame is simply + the number of whole bytes remaining, which must be at least 2, due to the + space check in . +For Hybrid frames, the number of bytes is equal to 2, plus a decoded unsigned + integer less than 256 (see ). +This may be more than the number of whole bytes remaining in the Opus frame, + in which case the frame is invalid. +However, a decoder is not required to ignore the entire frame, as this may be + the result of a bit error that desynchronized the range coder. +There may still be useful data before the error, and a decoder MAY keep any + audio decoded so far instead of invoking the PLC, but it is RECOMMENDED that + the decoder stop decoding and discard the rest of the current Opus frame. + + + +It would have been possible to avoid these invalid states in the design of Opus + by limiting the range of the explicit length decoded from Hybrid frames by the + actual number of whole bytes remaining. +However, this would require an encoder to determine the rate allocation for the + MDCT layer up front, before it began encoding that layer. +By allowing some invalid sizes, the encoder is able to defer that decision + until much later. +When encoding Hybrid frames which do not include redundancy, the encoder must + still decide up-front if it wishes to use the minimum 37 bits required to + trigger encoding of the redundancy flag, but this is a much looser + restriction. + + + +After determining the size of the redundant CELT frame, the decoder reduces + the size of the buffer currently in use by the range coder by that amount. +The CELT layer read any raw bits from the end of this reduced buffer, and all + calculations of the number of bits remaining in the buffer must be done using + this new, reduced size, rather than the original size of the Opus frame. + +
+ +
+ +The redundant frame is decoded like any other CELT-only frame, with the + exception that it does not contain a TOC byte. +The frame size is fixed at 5 ms, the channel count is set to that of the + current frame, and the audio bandwidth is also set to that of the current + frame, with the exception that for MB SILK frames, it is set to WB. + + + +If the redundancy belongs at the beginning (in a CELT-only to SILK-only or + Hybrid transition), the final reconstructed output uses the first 2.5 ms + of audio output by the decoder for the redundant frame as-is, discarding + the corresponding output from the SILK-only or Hybrid portion of the frame. +The remaining 2.5 ms is cross-lapped with the decoded SILK/Hybrid signal + using the CELT's power-complementary MDCT window to ensure a smooth + transition. + + + +If the redundancy belongs at the end (in a SILK-only or Hybrid to CELT-only + transition), only the second half (2.5 ms) of the audio output by the + decoder for the redundant frame is used. +In that case, the second half of the redundant frame is cross-lapped with the + end of the SILK/Hybrid signal, again using CELT's power-complementary MDCT + window to ensure a smooth transition. + +
+ +
+ +
+ +When a transition occurs, the state of the SILK or the CELT decoder (or both) + may need to be reset before decoding a frame in the new mode. +This avoids reusing "out of date" memory, which may not have been updated in + some time or may not be in a well-defined state due to, e.g., PLC. +The SILK state is reset before every SILK-only or Hybrid frame where the + previous frame was CELT-only. +The CELT state is reset every time the operating mode changes and the new mode + is either Hybrid or CELT-only, except when the transition uses redundancy as + described above. +When switching from SILK-only or Hybrid to CELT-only with redundancy, the CELT + state is reset before decoding the redundant CELT frame embedded in the + SILK-only or Hybrid frame, but it is not reset before decoding the following + CELT-only frame. +When switching from CELT-only mode to SILK-only or Hybrid mode with redundancy, + the CELT decoder is not reset for decoding the redundant CELT frame. + +
+ +
+ + + illustrates all of the normative + transitions involving a mode change, an audio bandwidth change, or both. +Each one uses an S, H, or C to represent an Opus frame in the corresponding + mode. +In addition, an R indicates the presence of redundancy in the Opus frame it is + cross-lapped with. +Its location in the first or last 5 ms is assumed to correspond to whether + it is the frame before or after the transition. +Other uses of redundancy are non-normative. +Finally, a c indicates the contents of the CELT overlap buffer after the + previously decoded frame (i.e., as extracted by decoding a silence frame). +
+ S -> S + & + !R -> R + & + ;S -> S -> S + +NB or MB SILK to Hybrid with Redundancy: S -> S -> S + & + !R ->;H -> H -> H + +WB SILK to Hybrid: S -> S -> S ->!H -> H -> H + +SILK to CELT with Redundancy: S -> S -> S + & + !R -> C -> C -> C + +Hybrid to NB or MB SILK with Redundancy: H -> H -> H + & + !R -> R + & + ;S -> S -> S + +Hybrid to WB SILK: H -> H -> H -> c + \ + + > S -> S -> S + +Hybrid to CELT with Redundancy: H -> H -> H + & + !R -> C -> C -> C + +CELT to SILK with Redundancy: C -> C -> C -> R + & + ;S -> S -> S + +CELT to Hybrid with Redundancy: C -> C -> C -> R + & + |H -> H -> H + +Key: +S SILK-only frame ; SILK decoder reset +H Hybrid frame | CELT and SILK decoder resets +C CELT-only frame ! CELT decoder reset +c CELT overlap + Direct mixing +R Redundant CELT frame & Windowed cross-lap +]]> +
+The first two and the last two Opus frames in each example are illustrative, + i.e., there is no requirement that a stream remain in the same configuration + for three consecutive frames before or after a switch. +
+ + +The behavior of transitions without redundancy where PLC is allowed is non-normative. +An encoder might still wish to use these transitions if, for example, it + doesn't want to add the extra bitrate required for redundancy or if it makes + a decision to switch after it has already transmitted the frame that would + have had to contain the redundancy. + illustrates the recommended + cross-lapping and decoder resets for these transitions. +
+ S -> S ;S -> S -> S + +NB or MB SILK to Hybrid: S -> S -> S |H -> H -> H + +SILK to CELT without Redundancy: S -> S -> S -> P + & + !C -> C -> C + +Hybrid to NB or MB SILK: H -> H -> H -> c + + + ;S -> S -> S + +Hybrid to CELT without Redundancy: H -> H -> H -> P + & + !C -> C -> C + +CELT to SILK without Redundancy: C -> C -> C -> P + & + ;S -> S -> S + +CELT to Hybrid without Redundancy: C -> C -> C -> P + & + |H -> H -> H + +Key: +S SILK-only frame ; SILK decoder reset +H Hybrid frame | CELT and SILK decoder resets +C CELT-only frame ! CELT decoder reset +c CELT overlap + Direct mixing +P Packet Loss Concealment & Windowed cross-lap +]]> +
+Encoders SHOULD NOT use other transitions, e.g., those that involve redundancy + in ways not illustrated in . +
+ +
+ +
+ +
+ + + + + + +
+ +Just like the decoder, the Opus encoder also normally consists of two main blocks: the +SILK encoder and the CELT encoder. However, unlike the case of the decoder, a valid +(though potentially suboptimal) Opus encoder is not required to support all modes and +may thus only include a SILK encoder module or a CELT encoder module. +The output bit-stream of the Opus encoding contains bits from the SILK and CELT + encoders, though these are not separable due to the use of a range coder. +A block diagram of the encoder is illustrated below. + +
+ +| Rate |--->| Encoder | V + +-----------+ | | Conversion | | | +---------+ + | Optional | | +------------+ +---------+ | Range | +->| High-pass |--+ | Encoder |----> + | Filter | | +--------------+ +---------+ | | Bit- + +-----------+ | | Delay | | CELT | +---------+ stream + +->| Compensation |->| Encoder | ^ + | | | |------+ + +--------------+ +---------+ +]]> + +
+
+ + +For a normal encoder where both the SILK and the CELT modules are included, an optimal +encoder should select which coding mode to use at run-time depending on the conditions. +In the reference implementation, the frame size is selected by the application, but the +other configuration parameters (number of channels, bandwidth, mode) are automatically +selected (unless explicitly overridden by the application) depend on the following: + +Requested bitrate +Input sampling rate +Type of signal (speech vs music) +Frame size in use + + +The type of signal currently needs to be provided by the application (though it can be +changed in real-time). An Opus encoder implementation could also do automatic detection, +but since Opus is an interactive codec, such an implementation would likely have to either +delay the signal (for non-interactive applications) or delay the mode switching decisions (for +interactive applications). + + + +When the encoder is configured for voice over IP applications, the input signal is +filtered by a high-pass filter to remove the lowest part of the spectrum +that contains little speech energy and may contain background noise. This is a second order +Auto Regressive Moving Average (i.e., with poles and zeros) filter with a cut-off frequency around 50 Hz. +In the future, a music detector may also be used to lower the cut-off frequency when the +input signal is detected to be music rather than speech. + + +
+ +The range coder acts as the bit-packer for Opus. +It is used in three different ways: to encode + + +Entropy-coded symbols with a fixed probability model using ec_encode() + (entenc.c), + + +Integers from 0 to (2**M - 1) using ec_enc_uint() or ec_enc_bits() + (entenc.c), + +Integers from 0 to (ft - 1) (where ft is not a power of two) using + ec_enc_uint() (entenc.c). + + + + + +The range encoder maintains an internal state vector composed of the four-tuple + (val, rng, rem, ext) representing the low end of the current + range, the size of the current range, a single buffered output byte, and a + count of additional carry-propagating output bytes. +Both val and rng are 32-bit unsigned integer values, rem is a byte value or + less than 255 or the special value -1, and ext is an unsigned integer with at + least 11 bits. +This state vector is initialized at the start of each each frame to the value + (0, 2**31, -1, 0). +After encoding a sequence of symbols, the value of rng in the encoder should + exactly match the value of rng in the decoder after decoding the same sequence + of symbols. +This is a powerful tool for detecting errors in either an encoder or decoder + implementation. +The value of val, on the other hand, represents different things in the encoder + and decoder, and is not expected to match. + + + +The decoder has no analog for rem and ext. +These are used to perform carry propagation in the renormalization loop below. +Each iteration of this loop produces 9 bits of output, consisting of 8 data + bits and a carry flag. +The encoder cannot determine the final value of the output bytes until it + propagates these carry flags. +Therefore the reference implementation buffers a single non-propagating output + byte (i.e., one less than 255) in rem and keeps a count of additional + propagating (i.e., 255) output bytes in ext. +An implementation may choose to use any mathematically equivalent scheme to + perform carry propagation. + + +
+ +The main encoding function is ec_encode() (entenc.c), which encodes symbol k in + the current context using the same three-tuple (fl[k], fh[k], ft) + as the decoder to describe the range of the symbol (see + ). + + +ec_encode() updates the state of the encoder as follows. +If fl[k] is greater than zero, then +
+ +
+Otherwise, val is unchanged and +
+ +
+The divisions here are integer division. +
+ +
+ +After this update, the range is normalized using a procedure very similar to + that of , implemented by + ec_enc_normalize() (entenc.c). +The following process is repeated until rng > 2**23. +First, the top 9 bits of val, (val>>23), are sent to the carry buffer, + described in . +Then, the encoder sets +
+ +
+
+
+ +
+ +The function ec_enc_carry_out() (entenc.c) implements carry propagation and + output buffering. +It takes as input a 9-bit value, c, consisting of 8 data bits and an additional + carry bit. +If c is equal to the value 255, then ext is simply incremented, and no other + state updates are performed. +Otherwise, let b = (c>>8) be the carry bit. +Then, + + +If the buffered byte rem contains a value other than -1, the encoder outputs + the byte (rem + b). +Otherwise, if rem is -1, no byte is output. + + +If ext is non-zero, then the encoder outputs ext bytes---all with a value of 0 + if b is set, or 255 if b is unset---and sets ext to 0. + + +rem is set to the 8 data bits: +
+ +
+
+
+
+
+ +
+ +
+ +The reference implementation uses three additional encoding methods that are + exactly equivalent to the above, but make assumptions and simplifications that + allow for a more efficient implementation. + + +
+ +The first is ec_encode_bin() (entenc.c), defined using the parameter ftb + instead of ft. +It is mathematically equivalent to calling ec_encode() with + ft = (1<<ftb), but avoids using division. + +
+ +
+ +The next is ec_enc_bit_logp() (entenc.c), which encodes a single binary symbol. +The context is described by a single parameter, logp, which is the absolute + value of the base-2 logarithm of the probability of a "1". +It is mathematically equivalent to calling ec_encode() with the 3-tuple + (fl[k] = 0, fh[k] = (1<<logp) - 1, + ft = (1<<logp)) if k is 0 and with + (fl[k] = (1<<logp) - 1, + fh[k] = ft = (1<<logp)) if k is 1. +The implementation requires no multiplications or divisions. + +
+ +
+ +The last is ec_enc_icdf() (entenc.c), which encodes a single binary symbol with + a table-based context of up to 8 bits. +This uses the same icdf table as ec_dec_icdf() from + . +The function is mathematically equivalent to calling ec_encode() with + fl[k] = (1<<ftb) - icdf[k-1] (or 0 if + k == 0), fh[k] = (1<<ftb) - icdf[k], and + ft = (1<<ftb). +This only saves a few arithmetic operations over ec_encode_bin(), but allows + the encoder to use the same icdf tables as the decoder. + +
+ +
+ +
+ +The raw bits used by the CELT layer are packed at the end of the buffer using + ec_enc_bits() (entenc.c). +Because the raw bits may continue into the last byte output by the range coder + if there is room in the low-order bits, the encoder must be prepared to merge + these values into a single byte. +The procedure in does this in a way that + ensures both the range coded data and the raw bits can be decoded + successfully. + +
+ +
+ +The function ec_enc_uint() (entenc.c) encodes one of ft equiprobable symbols in + the range 0 to (ft - 1), inclusive, each with a frequency of 1, + where ft may be as large as (2**32 - 1). +Like the decoder (see ), it splits up the + value into a range coded symbol representing up to 8 of the high bits, and, if + necessary, raw bits representing the remainder of the value. + + +ec_enc_uint() takes a two-tuple (t, ft), where t is the value to be + encoded, 0 <= t < ft, and ft is not necessarily a + power of two. +Let ftb = ilog(ft - 1), i.e., the number of bits required + to store (ft - 1) in two's complement notation. +If ftb is 8 or less, then t is encoded directly using ec_encode() with the + three-tuple (t, t + 1, ft). + + +If ftb is greater than 8, then the top 8 bits of t are encoded using the + three-tuple (t>>(ftb - 8), + (t>>(ftb - 8)) + 1, + ((ft - 1)>>(ftb - 8)) + 1), and the + remaining bits, + (t & ((1<<(ftb - 8)) - 1), + are encoded as raw bits with ec_enc_bits(). + +
+ +
+ +After all symbols are encoded, the stream must be finalized by outputting a + value inside the current range. +Let end be the integer in the interval [val, val + rng) with the + largest number of trailing zero bits, b, such that + (end + (1<<b) - 1) is also in the interval + [val, val + rng). +This choice of end allows the maximum number of trailing bits to be set to + arbitrary values while still ensuring the range coded part of the buffer can + be decoded correctly. +Then, while end is not zero, the top 9 bits of end, i.e., (end>>23), are + passed to the carry buffer in accordance with the procedure in + , and end is updated via +
+ +
+Finally, if the buffered output byte, rem, is neither zero nor the special + value -1, or the carry count, ext, is greater than zero, then 9 zero bits are + sent to the carry buffer to flush it to the output buffer. +When outputting the final byte from the range coder, if it would overlap any + raw bits already packed into the end of the output buffer, they should be ORed + into the same byte. +The bit allocation routines in the CELT layer should ensure that this can be + done without corrupting the range coder data so long as end is chosen as + described above. +If there is any space between the end of the range coder data and the end of + the raw bits, it is padded with zero bits. +This entire process is implemented by ec_enc_done() (entenc.c). +
+
+ +
+ + The bit allocation routines in Opus need to be able to determine a + conservative upper bound on the number of bits that have been used + to encode the current frame thus far. This drives allocation + decisions and ensures that the range coder and raw bits will not + overflow the output buffer. This is computed in the + reference implementation to whole-bit precision by + the function ec_tell() (entcode.h) and to fractional 1/8th bit + precision by the function ec_tell_frac() (entcode.c). + Like all operations in the range coder, it must be implemented in a + bit-exact manner, and must produce exactly the same value returned by + the same functions in the decoder after decoding the same symbols. + +
+ +
+ +
+ + In many respects the SILK encoder mirrors the SILK decoder described + in . + Details such as the quantization and range coder tables can be found + there, while this section describes the high-level design choices that + were made. + The diagram below shows the basic modules of the SILK encoder. +
+ +| Rate |--->| Mixing |--->| Core |----------> +Input |Conversion| | | | Encoder | Bitstream + +----------+ +--------+ +---------+ +]]> + +
+
+ +
+ +The input signal's sampling rate is adjusted by a sample rate conversion +module so that it matches the SILK internal sampling rate. +The input to the sample rate converter is delayed by a number of samples +depending on the sample rate ratio, such that the overall delay is constant +for all input and output sample rates. + +
+ +
+ +The stereo mixer is only used for stereo input signals. +It converts a stereo left/right signal into an adaptive +mid/side representation. +The first step is to compute non-adaptive mid/side signals +as half the sum and difference between left and right signals. +The side signal is then minimized in energy by subtracting a +prediction of it based on the mid signal. +This prediction works well when the left and right signals +exhibit linear dependency, for instance for an amplitude-panned +input signal. +Like in the decoder, the prediction coefficients are linearly +interpolated during the first 8 ms of the frame. + The mid signal is always encoded, whereas the residual + side signal is only encoded if it has sufficient + energy compared to the mid signal's energy. + If it has not, + the "mid_only_flag" is set without encoding the side signal. + + +The predictor coefficients are coded regardless of whether +the side signal is encoded. +For each frame, two predictor coefficients are computed, one +that predicts between low-passed mid and side channels, and +one that predicts between high-passed mid and side channels. +The low-pass filter is a simple three-tap filter +and creates a delay of one sample. +The high-pass filtered signal is the difference between +the mid signal delayed by one sample and the low-passed +signal. Instead of explicitly computing the high-passed +signal, it is computationally more efficient to transform +the prediction coefficients before applying them to the +filtered mid signal, as follows +
+ + + +
+where w0 and w1 are the low-pass and high-pass prediction +coefficients, mid(n-1) is the mid signal delayed by one sample, +LP(n) and HP(n) are the low-passed and high-passed +signals and pred(n) is the prediction signal that is subtracted +from the side signal. +
+
+ +
+ +What follows is a description of the core encoder and its components. +For simplicity, the core encoder is referred to simply as the encoder in +the remainder of this section. An overview of the encoder is given in +. + +
+ +| | + +---------+ | +---------+ | | + |Voice | | |LTP |12 | | + +-->|Activity |--+ +----->|Scaling |-----------+---->| | + | |Detector |3 | | |Control |<--+ | | | + | +---------+ | | +---------+ | | | | + | | | +---------+ | | | | + | | | |Gains | | | | | + | | | +-->|Processor|---|---+---|---->| R | + | | | | | |11 | | | | a | + | \/ | | +---------+ | | | | n | + | +---------+ | | +---------+ | | | | g | + | |Pitch | | | |LSF | | | | | e | + | +->|Analysis |---+ | |Quantizer|---|---|---|---->| | + | | | |4 | | | |8 | | | | E |--> + | | +---------+ | | +---------+ | | | | n | 2 + | | | | 9/\ 10| | | | | c | + | | | | | \/ | | | | o | + | | +---------+ | | +----------+ | | | | d | + | | |Noise | +--|-->|Prediction|--+---|---|---->| e | + | +->|Shaping |---|--+ |Analysis |7 | | | | r | + | | |Analysis |5 | | | | | | | | | + | | +---------+ | | +----------+ | | | | | + | | | | /\ | | | | | + | | +----------|--|--------+ | | | | | + | | | \/ \/ \/ \/ \/ | | + | | | +---------+ +------------+ | | + | | | | | |Noise | | | +-+-------+-----+------>|Prefilter|--------->|Shaping |-->| | +1 | | 6 |Quantization|13 | | + +---------+ +------------+ +---+ + +1: Input speech signal +2: Range encoded bitstream +3: Voice activity estimate +4: Pitch lags (per 5 ms) and voicing decision (per 20 ms) +5: Noise shaping quantization coefficients + - Short term synthesis and analysis + noise shaping coefficients (per 5 ms) + - Long term synthesis and analysis noise + shaping coefficients (per 5 ms and for voiced speech only) + - Noise shaping tilt (per 5 ms) + - Quantizer gain/step size (per 5 ms) +6: Input signal filtered with analysis noise shaping filters +7: Short and long term prediction coefficients + LTP (per 5 ms) and LPC (per 20 ms) +8: LSF quantization indices +9: LSF coefficients +10: Quantized LSF coefficients +11: Processed gains, and synthesis noise shape coefficients +12: LTP state scaling coefficient. Controlling error propagation + / prediction gain trade-off +13: Quantized signal +]]> + +
+ +
+ +The input signal is processed by a Voice Activity Detector (VAD) to produce +a measure of voice activity, spectral tilt, and signal-to-noise estimates for +each frame. The VAD uses a sequence of half-band filterbanks to split the +signal into four subbands: 0...Fs/16, Fs/16...Fs/8, Fs/8...Fs/4, and +Fs/4...Fs/2, where Fs is the sampling frequency (8, 12, 16, or 24 kHz). +The lowest subband, from 0 - Fs/16, is high-pass filtered with a first-order +moving average (MA) filter (with transfer function H(z) = 1-z**(-1)) to +reduce the energy at the lowest frequencies. For each frame, the signal +energy per subband is computed. +In each subband, a noise level estimator tracks the background noise level +and a Signal-to-Noise Ratio (SNR) value is computed as the logarithm of the +ratio of energy to noise level. +Using these intermediate variables, the following parameters are calculated +for use in other SILK modules: + + +Average SNR. The average of the subband SNR values. + + + +Smoothed subband SNRs. Temporally smoothed subband SNR values. + + + +Speech activity level. Based on the average SNR and a weighted average of the +subband energies. + + + +Spectral tilt. A weighted average of the subband SNRs, with positive weights +for the low subbands and negative weights for the high subbands. + + + +
+ +
+ +The input signal is processed by the open loop pitch estimator shown in +. +
+ +|sampling|->|Correlator| | + | | | | | |4 + | +--------+ +----------+ \/ + | | 2 +-------+ + | | +-->|Speech |5 + +---------+ +--------+ | \/ | |Type |-> + |LPC | |Down | | +----------+ | | + +->|Analysis | +->|sample |-+------------->|Time- | +-------+ + | | | | |to 8 kHz| |Correlator|-----------> + | +---------+ | +--------+ |__________| 6 + | | | |3 + | \/ | \/ + | +---------+ | +----------+ + | |Whitening| | |Time- | +-+->|Filter |-+--------------------------->|Correlator|-----------> +1 | | | | 7 + +---------+ +----------+ + +1: Input signal +2: Lag candidates from stage 1 +3: Lag candidates from stage 2 +4: Correlation threshold +5: Voiced/unvoiced flag +6: Pitch correlation +7: Pitch lags +]]> + +
+The pitch analysis finds a binary voiced/unvoiced classification, and, for +frames classified as voiced, four pitch lags per frame - one for each +5 ms subframe - and a pitch correlation indicating the periodicity of +the signal. +The input is first whitened using a Linear Prediction (LP) whitening filter, +where the coefficients are computed through standard Linear Prediction Coding +(LPC) analysis. The order of the whitening filter is 16 for best results, but +is reduced to 12 for medium complexity and 8 for low complexity modes. +The whitened signal is analyzed to find pitch lags for which the time +correlation is high. +The analysis consists of three stages for reducing the complexity: + +In the first stage, the whitened signal is downsampled to 4 kHz +(from 8 kHz) and the current frame is correlated to a signal delayed +by a range of lags, starting from a shortest lag corresponding to +500 Hz, to a longest lag corresponding to 56 Hz. + + +The second stage operates on an 8 kHz signal (downsampled from 12, 16, +or 24 kHz) and measures time correlations only near the lags +corresponding to those that had sufficiently high correlations in the first +stage. The resulting correlations are adjusted for a small bias towards +short lags to avoid ending up with a multiple of the true pitch lag. +The highest adjusted correlation is compared to a threshold depending on: + + +Whether the previous frame was classified as voiced + + +The speech activity level + + +The spectral tilt. + + +If the threshold is exceeded, the current frame is classified as voiced and +the lag with the highest adjusted correlation is stored for a final pitch +analysis of the highest precision in the third stage. + + +The last stage operates directly on the whitened input signal to compute time +correlations for each of the four subframes independently in a narrow range +around the lag with highest correlation from the second stage. + + +
+
+ +
+ +The noise shaping analysis finds gains and filter coefficients used in the +prefilter and noise shaping quantizer. These parameters are chosen such that +they will fulfill several requirements: + + +Balancing quantization noise and bitrate. +The quantization gains determine the step size between reconstruction levels +of the excitation signal. Therefore, increasing the quantization gain +amplifies quantization noise, but also reduces the bitrate by lowering +the entropy of the quantization indices. + + +Spectral shaping of the quantization noise; the noise shaping quantizer is +capable of reducing quantization noise in some parts of the spectrum at the +cost of increased noise in other parts without substantially changing the +bitrate. +By shaping the noise such that it follows the signal spectrum, it becomes +less audible. In practice, best results are obtained by making the shape +of the noise spectrum slightly flatter than the signal spectrum. + + +De-emphasizing spectral valleys; by using different coefficients in the +analysis and synthesis part of the prefilter and noise shaping quantizer, +the levels of the spectral valleys can be decreased relative to the levels +of the spectral peaks such as speech formants and harmonics. +This reduces the entropy of the signal, which is the difference between the +coded signal and the quantization noise, thus lowering the bitrate. + + +Matching the levels of the decoded speech formants to the levels of the +original speech formants; an adjustment gain and a first order tilt +coefficient are computed to compensate for the effect of the noise +shaping quantization on the level and spectral tilt. + + + + +
+ + + Frequency + +1: Input signal spectrum +2: De-emphasized and level matched spectrum +3: Quantization noise spectrum +]]> + +
+ shows an example of an +input signal spectrum (1). +After de-emphasis and level matching, the spectrum has deeper valleys (2). +The quantization noise spectrum (3) more or less follows the input signal +spectrum, while having slightly less pronounced peaks. +The entropy, which provides a lower bound on the bitrate for encoding the +excitation signal, is proportional to the area between the de-emphasized +spectrum (2) and the quantization noise spectrum (3). Without de-emphasis, +the entropy is proportional to the area between input spectrum (1) and +quantization noise (3) - clearly higher. +
+ + +The transformation from input signal to de-emphasized signal can be +described as a filtering operation with a filter +
+ + + +
+having an adjustment gain G, a first order tilt adjustment filter with +tilt coefficient c_tilt, and where +
+ + + +
+is the analysis part of the de-emphasis filter, consisting of the short-term +shaping filter with coefficients a_ana(k), and the long-term shaping filter +with coefficients b_ana(k) and pitch lag L. +The parameter d determines the number of long-term shaping filter taps. +
+ + +Similarly, but without the tilt adjustment, the synthesis part can be written as +
+ + + +
+
+ +All noise shaping parameters are computed and applied per subframe of 5 ms. +First, an LPC analysis is performed on a windowed signal block of 15 ms. +The signal block has a look-ahead of 5 ms relative to the current subframe, +and the window is an asymmetric sine window. The LPC analysis is done with the +autocorrelation method, with an order of between 8, in lowest-complexity mode, +and 16, for best quality. + + +Optionally the LPC analysis and noise shaping filters are warped by replacing +the delay elements by first-order allpass filters. +This increases the frequency resolution at low frequencies and reduces it at +high ones, which better matches the human auditory system and improves +quality. +The warped analysis and filtering comes at a cost in complexity +and is therefore only done in higher complexity modes. + + +The quantization gain is found by taking the square root of the residual energy +from the LPC analysis and multiplying it by a value inversely proportional +to the coding quality control parameter and the pitch correlation. + + +Next the two sets of short-term noise shaping coefficients a_ana(k) and +a_syn(k) are obtained by applying different amounts of bandwidth expansion to the +coefficients found in the LPC analysis. +This bandwidth expansion moves the roots of the LPC polynomial towards the +origin, using the formulas +
+ + + +
+where a(k) is the k'th LPC coefficient, and the bandwidth expansion factors +g_ana and g_syn are calculated as +
+ + + +
+where C is the coding quality control parameter between 0 and 1. +Applying more bandwidth expansion to the analysis part than to the synthesis +part gives the desired de-emphasis of spectral valleys in between formants. +
+ + +The long-term shaping is applied only during voiced frames. +It uses three filter taps, described by +
+ + + +
+For unvoiced frames these coefficients are set to 0. The multiplication factors +F_ana and F_syn are chosen between 0 and 1, depending on the coding quality +control parameter, as well as the calculated pitch correlation and smoothed +subband SNR of the lowest subband. By having F_ana less than F_syn, +the pitch harmonics are emphasized relative to the valleys in between the +harmonics. +
+ + +The tilt coefficient c_tilt is for unvoiced frames chosen as +
+ + + +
+and as +
+ + + +
+for voiced frames, where V is the voice activity level between 0 and 1. +
+ +The adjustment gain G serves to correct any level mismatch between the original +and decoded signals that might arise from the noise shaping and de-emphasis. +This gain is computed as the ratio of the prediction gain of the short-term +analysis and synthesis filter coefficients. The prediction gain of an LPC +synthesis filter is the square root of the output energy when the filter is +excited by a unit-energy impulse on the input. +An efficient way to compute the prediction gain is by first computing the +reflection coefficients from the LPC coefficients through the step-down +algorithm, and extracting the prediction gain from the reflection coefficients +as +
+ + + +
+where r_k is the k'th reflection coefficient. +
+ + +Initial values for the quantization gains are computed as the square-root of +the residual energy of the LPC analysis, adjusted by the coding quality control +parameter. +These quantization gains are later adjusted based on the results of the +prediction analysis. + +
+ +
+ +The prediction analysis is performed in one of two ways depending on how +the pitch estimator classified the frame. +The processing for voiced and unvoiced speech is described in + and + , respectively. + Inputs to this function include the pre-whitened signal from the + pitch estimator (see ). + + +
+ + For a frame of voiced speech the pitch pulses will remain dominant in the + pre-whitened input signal. + Further whitening is desirable as it leads to higher quality at the same + available bitrate. + To achieve this, a Long-Term Prediction (LTP) analysis is carried out to + estimate the coefficients of a fifth-order LTP filter for each of four + subframes. + The LTP coefficients are quantized using the method described in + , and the quantized LTP + coefficients are used to compute the LTP residual signal. + This LTP residual signal is the input to an LPC analysis where the LPC coefficients are + estimated using Burg's method , such that the residual energy is minimized. + The estimated LPC coefficients are converted to a Line Spectral Frequency (LSF) vector + and quantized as described in . +After quantization, the quantized LSF vector is converted back to LPC +coefficients using the full procedure in . +By using quantized LTP coefficients and LPC coefficients derived from the +quantized LSF coefficients, the encoder remains fully synchronized with the +decoder. +The quantized LPC and LTP coefficients are also used to filter the input +signal and measure residual energy for each of the four subframes. + +
+
+ +For a speech signal that has been classified as unvoiced, there is no need +for LTP filtering, as it has already been determined that the pre-whitened +input signal is not periodic enough within the allowed pitch period range +for LTP analysis to be worth the cost in terms of complexity and bitrate. +The pre-whitened input signal is therefore discarded, and instead the input +signal is used for LPC analysis using Burg's method. +The resulting LPC coefficients are converted to an LSF vector and quantized +as described in the following section. +They are then transformed back to obtain quantized LPC coefficients, which +are then used to filter the input signal and measure residual energy for +each of the four subframes. + +
+ +The main purpose of linear prediction in SILK is to reduce the bitrate by +minimizing the residual energy. +At least at high bitrates, perceptual aspects are handled +independently by the noise shaping filter. +Burg's method is used because it provides higher prediction gain +than the autocorrelation method and, unlike the covariance method, +produces stable filters (assuming numerical errors don't spoil +that). SILK's implementation of Burg's method is also computationally +faster than the autocovariance method. +The implementation of Burg's method differs from traditional +implementations in two aspects. +The first difference is that it +operates on autocorrelations, similar to the Schur algorithm , but +with a simple update to the autocorrelations after finding each +reflection coefficient to make the result identical to Burg's method. +This brings down the complexity of Burg's method to near that of +the autocorrelation method. +The second difference is that the signal in each subframe is scaled +by the inverse of the residual quantization step size. Subframes with +a small quantization step size will on average spend more bits for a +given amount of residual energy than subframes with a large step size. +Without scaling, Burg's method minimizes the total residual energy in +all subframes, which doesn't necessarily minimize the total number of +bits needed for coding the quantized residual. The residual energy +of the scaled subframes is a better measure for that number of +bits. + +
+
+
+ +
+ +Unlike many other speech codecs, SILK uses variable bitrate coding +for the LSFs. +This improves the average rate-distortion (R-D) tradeoff and reduces outliers. +The variable bitrate coding minimizes a linear combination of the weighted +quantization errors and the bitrate. +The weights for the quantization errors are the Inverse +Harmonic Mean Weighting (IHMW) function proposed by Laroia et al. +(see ). +These weights are referred to here as Laroia weights. + + +The LSF quantizer consists of two stages. +The first stage is an (unweighted) vector quantizer (VQ), with a +codebook size of 32 vectors. +The quantization errors for the codebook vector are sorted, and +for the N best vectors a second stage quantizer is run. +By varying the number N a tradeoff is made between R-D performance +and computational efficiency. +For each of the N codebook vectors the Laroia weights corresponding +to that vector (and not to the input vector) are calculated. +Then the residual between the input LSF vector and the codebook +vector is scaled by the square roots of these Laroia weights. +This scaling partially normalizes error sensitivity for the +residual vector, so that a uniform quantizer with fixed +step sizes can be used in the second stage without too much +performance loss. +And by scaling with Laroia weights determined from the first-stage +codebook vector, the process can be reversed in the decoder. + + +The second stage uses predictive delayed decision scalar +quantization. +The quantization error is weighted by Laroia weights determined +from the LSF input vector. +The predictor multiplies the previous quantized residual value +by a prediction coefficient that depends on the vector index from the +first stage VQ and on the location in the LSF vector. +The prediction is subtracted from the LSF residual value before +quantizing the result, and added back afterwards. +This subtraction can be interpreted as shifting the quantization levels +of the scalar quantizer, and as a result the quantization error of +each value depends on the quantization decision of the previous value. +This dependency is exploited by the delayed decision mechanism to +search for a quantization sequency with best R-D performance +with a Viterbi-like algorithm . +The quantizer processes the residual LSF vector in reverse order +(i.e., it starts with the highest residual LSF value). +This is done because the prediction works slightly +better in the reverse direction. + + +The quantization index of the first stage is entropy coded. +The quantization sequence from the second stage is also entropy +coded, where for each element the probability table is chosen +depending on the vector index from the first stage and the location +of that element in the LSF vector. + + +
+ +If the input is stable, finding the best candidate usually results in a +quantized vector that is also stable. Because of the two-stage approach, +however, it is possible that the best quantization candidate is unstable. +The encoder applies the same stabilization procedure applied by the decoder + (see to ensure the LSF parameters + are within their valid range, increasingly sorted, and have minimum + distances between each other and the border values. + +
+
+ +
+ +For voiced frames, the prediction analysis described in + resulted in four sets +(one set per subframe) of five LTP coefficients, plus four weighting matrices. +The LTP coefficients for each subframe are quantized using entropy constrained +vector quantization. +A total of three vector codebooks are available for quantization, with +different rate-distortion trade-offs. The three codebooks have 10, 20, and +40 vectors and average rates of about 3, 4, and 5 bits per vector, respectively. +Consequently, the first codebook has larger average quantization distortion at +a lower rate, whereas the last codebook has smaller average quantization +distortion at a higher rate. +Given the weighting matrix W_ltp and LTP vector b, the weighted rate-distortion +measure for a codebook vector cb_i with rate r_i is give by +
+ + + +
+where u is a fixed, heuristically-determined parameter balancing the distortion +and rate. +Which codebook gives the best performance for a given LTP vector depends on the +weighting matrix for that LTP vector. +For example, for a low valued W_ltp, it is advantageous to use the codebook +with 10 vectors as it has a lower average rate. +For a large W_ltp, on the other hand, it is often better to use the codebook +with 40 vectors, as it is more likely to contain the best codebook vector. +The weighting matrix W_ltp depends mostly on two aspects of the input signal. +The first is the periodicity of the signal; the more periodic, the larger W_ltp. +The second is the change in signal energy in the current subframe, relative to +the signal one pitch lag earlier. +A decaying energy leads to a larger W_ltp than an increasing energy. +Both aspects fluctuate relatively slowly, which causes the W_ltp matrices for +different subframes of one frame often to be similar. +Because of this, one of the three codebooks typically gives good performance +for all subframes, and therefore the codebook search for the subframe LTP +vectors is constrained to only allow codebook vectors to be chosen from the +same codebook, resulting in a rate reduction. +
+ + +To find the best codebook, each of the three vector codebooks is +used to quantize all subframe LTP vectors and produce a combined +weighted rate-distortion measure for each vector codebook. +The vector codebook with the lowest combined rate-distortion +over all subframes is chosen. The quantized LTP vectors are used +in the noise shaping quantizer, and the index of the codebook +plus the four indices for the four subframe codebook vectors +are passed on to the range encoder. + +
+ +
+ +In the prefilter the input signal is filtered using the spectral valley +de-emphasis filter coefficients from the noise shaping analysis +(see ). +By applying only the noise shaping analysis filter to the input signal, +it provides the input to the noise shaping quantizer. + +
+ +
+ +The noise shaping quantizer independently shapes the signal and coding noise +spectra to obtain a perceptually higher quality at the same bitrate. + + +The prefilter output signal is multiplied with a compensation gain G computed +in the noise shaping analysis. Then the output of a synthesis shaping filter +is added, and the output of a prediction filter is subtracted to create a +residual signal. +The residual signal is multiplied by the inverse quantized quantization gain +from the noise shaping analysis, and input to a scalar quantizer. +The quantization indices of the scalar quantizer represent a signal of pulses +that is input to the pyramid range encoder. +The scalar quantizer also outputs a quantization signal, which is multiplied +by the quantized quantization gain from the noise shaping analysis to create +an excitation signal. +The output of the prediction filter is added to the excitation signal to form +the quantized output signal y(n). +The quantized output signal y(n) is input to the synthesis shaping and +prediction filters. + + +Optionally the noise shaping quantizer operates in a delayed decision +mode. +In this mode it uses a Viterbi algorithm to keep track of +multiple rounding choices in the quantizer and select the best +one after a delay of 32 samples. This improves the rate/distortion +performance of the quantizer. + +
+ +
+ + SILK was designed to run in Variable Bitrate (VBR) mode. However + the reference implementation also has a Constant Bitrate (CBR) mode + for SILK. In CBR mode SILK will attempt to encode each packet with + no more than the allowed number of bits. The Opus wrapper code + then pads the bitstream if any unused bits are left in SILK mode, or + encodes the high band with the remaining number of bits in Hybrid mode. + The number of payload bits is adjusted by changing + the quantization gains and the rate/distortion tradeoff in the noise + shaping quantizer, in an iterative loop + around the noise shaping quantizer and entropy coding. + Compared to the SILK VBR mode, the CBR mode has lower + audio quality at a given average bitrate, and also has higher + computational complexity. + +
+ +
+ +
+ + +
+ +Most of the aspects of the CELT encoder can be directly derived from the description +of the decoder. For example, the filters and rotations in the encoder are simply the +inverse of the operation performed by the decoder. Similarly, the quantizers generally +optimize for the mean square error (because noise shaping is part of the bit-stream itself), +so no special search is required. For this reason, only the less straightforward aspects of the +encoder are described here. + + +
+The pitch prefilter is applied after the pre-emphasis. It is applied +in such a way as to be the inverse of the decoder's post-filter. The main non-obvious aspect of the +prefilter is the selection of the pitch period. The pitch search should be optimized for the +following criteria: + +continuity: it is important that the pitch period +does not change abruptly between frames; and +avoidance of pitch multiples: when the period used is a multiple of the real period +(lower frequency fundamental), the post-filter loses most of its ability to reduce noise + + +
+ +
+ +The MDCT output is divided into bands that are designed to match the ear's critical +bands for the smallest (2.5 ms) frame size. The larger frame sizes use integer +multiples of the 2.5 ms layout. For each band, the encoder +computes the energy that will later be encoded. Each band is then normalized by the +square root of the unquantized energy, such that each band now forms a unit vector X. +The energy and the normalization are computed by compute_band_energies() +and normalise_bands() (bands.c), respectively. + +
+ +
+ + +Energy quantization (both coarse and fine) can be easily understood from the decoding process. +For all useful bitrates, the coarse quantizer always chooses the quantized log energy value that +minimizes the error for each band. Only at very low rate does the encoder allow larger errors to +minimize the rate and avoid using more bits than are available. When the +available CPU requirements allow it, it is best to try encoding the coarse energy both with and without +inter-frame prediction such that the best prediction mode can be selected. The optimal mode depends on +the coding rate, the available bitrate, and the current rate of packet loss. + + +The fine energy quantizer always chooses the quantized log energy value that +minimizes the error for each band because the rate of the fine quantization depends only +on the bit allocation and not on the values that are coded. + +
+ +
+The encoder must use exactly the same bit allocation process as used by the decoder +and described in . The three mechanisms that can be used by the +encoder to adjust the bitrate on a frame-by-frame basis are band boost, allocation trim, +and band skipping. + + +
+The reference encoder makes a decision to boost a band when the energy of that band is significantly +higher than that of the neighboring bands. Let E_j be the log-energy of band j, we define + +D_j = 2*E_j - E_j-1 - E_j+1 + + +The allocation of band j is boosted once if D_j > t1 and twice if D_j > t2. For LM>=1, t1=2 and t2=4, +while for LM<1, t1=3 and t2=5. + + +
+ +
+The allocation trim is a value between 0 and 10 (inclusively) that controls the allocation +balance between the low and high frequencies. The encoder starts with a safe "default" of 5 +and deviates from that default in two different ways. First the trim can deviate by +/- 2 +depending on the spectral tilt of the input signal. For signals with more low frequencies, the +trim is increased by up to 2, while for signals with more high frequencies, the trim is +decreased by up to 2. +For stereo inputs, the trim value can +be decreased by up to 4 when the inter-channel correlation at low frequency (first 8 bands) +is high. +
+ +
+The encoder uses band skipping to ensure that the shape of the bands is only coded +if there is at least 1/2 bit per sample available for the PVQ. If not, then no bit is allocated +and folding is used instead. To ensure continuity in the allocation, some amount of hysteresis is +added to the process, such that a band that received PVQ bits in the previous frame only needs 7/16 +bit/sample to be coded for the current frame, while a band that did not receive PVQ bits in the +previous frames needs at least 9/16 bit/sample to be coded. +
+ +
+ +
+Because CELT applies mid-side stereo coupling in the normalized domain, it does not suffer from +important stereo image problems even when the two channels are completely uncorrelated. For this reason +it is always safe to use stereo coupling on any audio frame. That being said, there are some frames +for which dual (independent) stereo is still more efficient. This decision is made by comparing the estimated +entropy with and without coupling over the first 13 bands, taking into account the fact that all bands with +more than two MDCT bins require one extra degree of freedom when coded in mid-side. Let L1_ms and L1_lr +be the L1-norm of the mid-side vector and the L1-norm of the left-right vector, respectively. The decision +to use mid-side is made if and only if +
+ +
+where bins is the number of MDCT bins in the first 13 bands and E is the number of extra degrees of +freedom for mid-side coding. For LM>1, E=13, otherwise E=5. +
+ +The reference encoder decides on the intensity stereo threshold based on the bitrate alone. After +taking into account the frame size by subtracting 80 bits per frame for coarse energy, the first +band using intensity coding is as follows: + + + +bitrate (kb/s) +start band +<35 8 +35-50 12 +50-68 16 +84-84 18 +84-102 19 +102-130 20 +>130 disabled + + + +
+ +
+ +The choice of time-frequency resolution used in is based on +R-D optimization. The distortion is the L1-norm (sum of absolute values) of each band +after each TF resolution under consideration. The L1 norm is used because it represents the entropy +for a Laplacian source. The number of bits required to code a change in TF resolution between +two bands is higher than the cost of having those two bands use the same resolution, which is +what requires the R-D optimization. The optimal decision is computed using the Viterbi algorithm. +See tf_analysis() in celt/celt.c. + +
+ +
+ +The choice of the spreading value in has an +impact on the nature of the coding noise introduced by CELT. The larger the f_r value, the +lower the impact of the rotation, and the more tonal the coding noise. The +more tonal the signal, the more tonal the noise should be, so the CELT encoder determines +the optimal value for f_r by estimating how tonal the signal is. The tonality estimate +is based on discrete pdf (4-bin histogram) of each band. Bands that have a large number of small +values are considered more tonal and a decision is made by combining all bands with more than +8 samples. See spreading_decision() in celt/bands.c. + +
+ +
+CELT uses a Pyramid Vector Quantization (PVQ) +codebook for quantizing the details of the spectrum in each band that have not +been predicted by the pitch predictor. The PVQ codebook consists of all sums +of K signed pulses in a vector of N samples, where two pulses at the same position +are required to have the same sign. Thus the codebook includes +all integer codevectors y of N dimensions that satisfy sum(abs(y(j))) = K. + + + +In bands where there are sufficient bits allocated PVQ is used to encode +the unit vector that results from the normalization in + directly. Given a PVQ codevector y, +the unit vector X is obtained as X = y/||y||, where ||.|| denotes the +L2 norm. + + + +
+ + +The search for the best codevector y is performed by alg_quant() +(vq.c). There are several possible approaches to the +search, with a trade-off between quality and complexity. The method used in the reference +implementation computes an initial codeword y1 by projecting the normalized spectrum +X onto the codebook pyramid of K-1 pulses: + + +y0 = truncate_towards_zero( (K-1) * X / sum(abs(X))) + + + +Depending on N, K and the input data, the initial codeword y0 may contain from +0 to K-1 non-zero values. All the remaining pulses, with the exception of the last one, +are found iteratively with a greedy search that minimizes the normalized correlation +between y and X: +
+ +
+
+ + +The search described above is considered to be a good trade-off between quality +and computational cost. However, there are other possible ways to search the PVQ +codebook and the implementers MAY use any other search methods. See alg_quant() in celt/vq.c. + +
+ +
+ + +The vector to encode, X, is converted into an index i such that + 0 <= i < V(N,K) as follows. +Let i = 0 and k = 0. +Then for j = (N - 1) down to 0, inclusive, do: + + +If k > 0, set + i = i + (V(N-j-1,k-1) + V(N-j,k-1))/2. + +Set k = k + abs(X[j]). + +If X[j] < 0, set + i = i + (V(N-j-1,k) + V(N-j,k))/2. + + + + + +The index i is then encoded using the procedure in + with ft = V(N,K). + + +
+ +
+ + + + + +
+ +
+ + +
+ + +It is our intention to allow the greatest possible choice of freedom in +implementing the specification. For this reason, outside of the exceptions +noted in this section, conformance is defined through the reference +implementation of the decoder provided in . +Although this document includes an English description of the codec, should +the description contradict the source code of the reference implementation, +the latter shall take precedence. + + + +Compliance with this specification means that in addition to following the normative keywords in this document, + a decoder's output MUST also be + within the thresholds specified by the opus_compare.c tool (included + with the code) when compared to the reference implementation for each of the + test vectors provided (see ) and for each output + sampling rate and channel count supported. In addition, a compliant + decoder implementation MUST have the same final range decoder state as that of the + reference decoder. It is therefore RECOMMENDED that the + decoder implement the same functional behavior as the reference. + + A decoder implementation is not required to support all output sampling + rates or all output channel counts. + + +
+ +Using the reference code provided in , +a test vector can be decoded with + +opus_demo -d <rate> <channels> testvectorX.bit testX.out + +where <rate> is the sampling rate and can be 8000, 12000, 16000, 24000, or 48000, and +<channels> is 1 for mono or 2 for stereo. + + + +If the range decoder state is incorrect for one of the frames, the decoder will exit with +"Error: Range coder state mismatch between encoder and decoder". If the decoder succeeds, then +the output can be compared with the "reference" output with + +opus_compare -s -r <rate> testvectorX.dec testX.out + +for stereo or + +opus_compare -r <rate> testvectorX.dec testX.out + +for mono. + + +In addition to indicating whether the test vector comparison passes, the opus_compare tool +outputs an "Opus quality metric" that indicates how well the tested decoder matches the +reference implementation. A quality of 0 corresponds to the passing threshold, while +a quality of 100 is the highest possible value and means that the output of the tested decoder is identical to the reference +implementation. The passing threshold (quality 0) was calibrated in such a way that it corresponds to +additive white noise with a 48 dB SNR (similar to what can be obtained on a cassette deck). +It is still possible for an implementation to sound very good with such a low quality measure +(e.g. if the deviation is due to inaudible phase distortion), but unless this is verified by +listening tests, it is RECOMMENDED that implementations achieve a quality above 90 for 48 kHz +decoding. For other sampling rates, it is normal for the quality metric to be lower +(typically as low as 50 even for a good implementation) because of harmless mismatch with +the delay and phase of the internal sampling rate conversion. + + + +On POSIX environments, the run_vectors.sh script can be used to verify all test +vectors. This can be done with + +run_vectors.sh <exec path> <vector path> <rate> + +where <exec path> is the directory where the opus_demo and opus_compare executables +are built and <vector path> is the directory containing the test vectors. + +
+ +
+ +Opus Custom is an OPTIONAL part of the specification that is defined to +handle special sample rates and frame rates that are not supported by the +main Opus specification. Use of Opus Custom is discouraged for all but very +special applications for which a frame size different from 2.5, 5, 10, or 20 ms is +needed (for either complexity or latency reasons). Because Opus Custom is +optional, streams encoded using Opus Custom cannot be expected to be decodable by all Opus +implementations. Also, because no in-band mechanism exists for specifying the sampling +rate and frame size of Opus Custom streams, out-of-band signaling is required. +In Opus Custom operation, only the CELT layer is available, using the opus_custom_* function +calls in opus_custom.h. + +
+ +
+ +
+ + +Implementations of the Opus codec need to take appropriate security considerations +into account, as outlined in . +It is extremely important for the decoder to be robust against malicious +payloads. +Malicious payloads must not cause the decoder to overrun its allocated memory + or to take an excessive amount of resources to decode. +Although problems +in encoders are typically rarer, the same applies to the encoder. Malicious +audio streams must not cause the encoder to misbehave because this would +allow an attacker to attack transcoding gateways. + + +The reference implementation contains no known buffer overflow or cases where + a specially crafted packet or audio segment could cause a significant increase + in CPU load. +However, on certain CPU architectures where denormalized floating-point + operations are much slower than normal floating-point operations, it is + possible for some audio content (e.g., silence or near-silence) to cause an + increase in CPU load. +Denormals can be introduced by reordering operations in the compiler and depend + on the target architecture, so it is difficult to guarantee that an implementation + avoids them. +For architectures on which denormals are problematic, adding very small + floating-point offsets to the affected signals to prevent significant numbers + of denormalized operations is RECOMMENDED. +Alternatively, it is often possible to configure the hardware to treat + denormals as zero (DAZ). +No such issue exists for the fixed-point reference implementation. + +The reference implementation was validated in the following conditions: + + +Sending the decoder valid packets generated by the reference encoder and + verifying that the decoder's final range coder state matches that of the + encoder. + + +Sending the decoder packets generated by the reference encoder and then + subjected to random corruption. + +Sending the decoder random packets. + +Sending the decoder packets generated by a version of the reference encoder + modified to make random coding decisions (internal fuzzing), including mode + switching, and verifying that the range coder final states match. + + +In all of the conditions above, both the encoder and the decoder were run + inside the Valgrind memory + debugger, which tracks reads and writes to invalid memory regions as well as + the use of uninitialized memory. +There were no errors reported on any of the tested conditions. + +
+ + +
+ +This document has no actions for IANA. + +
+ +
+ +Thanks to all other developers, including Raymond Chen, Soeren Skak Jensen, Gregory Maxwell, +Christopher Montgomery, and Karsten Vandborg Soerensen. We would also +like to thank Igor Dyakonov, Jan Skoglund, and Christian Hoene for their help with subjective testing of the +Opus codec. Thanks to Ralph Giles, John Ridges, Ben Schwartz, Keith Yan, Christian Hoene, Kat Walsh, and many others on the Opus and CELT mailing lists +for their bug reports and feedback. + +
+ +
+The authors agree to grant third parties the irrevocable right to copy, use and distribute +the work (excluding Code Components available under the simplified BSD license), with or +without modification, in any medium, without royalty, provided that, unless separate +permission is granted, redistributed modified works do not contain misleading author, version, +name of work, or endorsement information. +
+ +
+ + + + + + + +Key words for use in RFCs to Indicate Requirement Levels + + + + + + + + + + + +Requirements for an Internet Audio Codec + + + + + +IETF + + +This document provides specific requirements for an Internet audio + codec. These requirements address quality, sample rate, bitrate, + and packet-loss robustness, as well as other desirable properties. + + + + + + + + + + +SILK Speech Codec + + + + + + + + + + + + + + + + + +Robust and Efficient Quantization of Speech LSP Parameters Using Structured Vector Quantization + + + + + + + + + + + + + + + + +Constrained-Energy Lapped Transform (CELT) Codec + + + + + + + + + + + + + + + + + + +Guidelines for the use of Variable Bit Rate Audio with Secure RTP + + + + + + + + + + + + + + +Internet Denial-of-Service Considerations + + + + + +IAB + + +This document provides an overview of possible avenues for denial-of-service (DoS) attack on Internet systems. The aim is to encourage protocol designers and network engineers towards designs that are more robust. We discuss partial solutions that reduce the effectiveness of attacks, and how some solutions might inadvertently open up alternative vulnerabilities. This memo provides information for the Internet community. + + + + + + +Range encoding: An algorithm for removing redundancy from a digitised message + + + + + + + + +Source coding algorithms for fast data compression + + + + + + + + +A Pyramid Vector Quantizer + + + + + + + + +The Computation of Line Spectral Frequencies Using Chebyshev Polynomials + + + + + + + + + + +Valgrind website + + + + + + +Google NetEQ code + + + + + + +Google WebRTC code + + + + + + + +Opus Git Repository + + + + + + +Opus website + + + + + + +Vorbis website + + + + + + +Matroska website + + + + + + +Opus Testvectors (webside) + + + + + + +Opus Testvectors (proceedings) + + + + + + +Line Spectral Pairs +Wikipedia + + + + + +Range Coding +Wikipedia + + + + + +Hadamard Transform +Wikipedia + + + + + +Viterbi Algorithm +Wikipedia + + + + + +White Noise +Wikipedia + + + + + +Linear Prediction +Wikipedia + + + + + +Modified Discrete Cosine Transform +Wikipedia + + + + + +Fast Fourier Transform +Wikipedia + + + + + +Z-transform +Wikipedia + + + + + + +Maximum Entropy Spectral Analysis + + + + + + +A fixed point computation of partial correlation coefficients + + + + + + + + +Analysis/synthesis filter bank design based on time domain aliasing cancellation + + + + + + + + +A High-Quality Speech and Audio Codec With Less Than 10 ms delay + + + + + + + + + + + + +Subdivision of the audible frequency range into critical bands + + + + + + + + + +
+ +This appendix contains the complete source code for the +reference implementation of the Opus codec written in C. By default, +this implementation relies on floating-point arithmetic, but it can be +compiled to use only fixed-point arithmetic by defining the FIXED_POINT +macro. Information on building and using the reference implementation is +available in the README file. + + +The implementation can be compiled with either a C89 or a C99 +compiler. It is reasonably optimized for most platforms such that +only architecture-specific optimizations are likely to be useful. +The FFT used is a slightly modified version of the KISS-FFT library, +but it is easy to substitute any other FFT library. + + + +While the reference implementation does not rely on any +undefined behavior as defined by C89 or C99, +it relies on common implementation-defined behavior +for two's complement architectures: + +Right shifts of negative values are consistent with two's complement arithmetic, so that a>>b is equivalent to floor(a/(2**b)), +For conversion to a signed integer of N bits, the value is reduced modulo 2**N to be within range of the type, +The result of integer division of a negative value is truncated towards zero, and +The compiler provides a 64-bit integer type (a C99 requirement which is supported by most C89 compilers). + + + + +In its current form, the reference implementation also requires the following +architectural characteristics to obtain acceptable performance: + +Two's complement arithmetic, +At least a 16 bit by 16 bit integer multiplier (32-bit result), and +At least a 32-bit adder/accumulator. + + + + +
+ +The complete source code can be extracted from this draft, by running the +following command line: + + + opus_source.tar.gz +]]> + +tar xzvf opus_source.tar.gz + +cd opus_source +make + +On systems where the provided Makefile does not work, the following command line may be used to compile +the source code: + + + + + +On systems where the base64 utility is not present, the following commands can be used instead: + + opus.b64 +]]> +openssl base64 -d -in opus.b64 > opus_source.tar.gz + + + +
+ +
+ +As of the time of publication of this memo, an up-to-date implementation conforming to +this standard is available in a + Git repository. +Releases and other resources are available at + . However, although that implementation is expected to + remain conformant with the standard, it is the code in this document that shall + remain normative. + +
+ +
+ + + +
+ +
+ +Because of size constraints, the Opus test vectors are not distributed in this +draft. They are available in the proceedings of the 83th IETF meeting (Paris) and from the Opus codec website at +. These test vectors were created specifically to exercise +all aspects of the decoder and therefore the audio quality of the decoded output is +significantly lower than what Opus can achieve in normal operation. + + + +The SHA1 hash of the files in the test vector package are + + + +
+ +
+ +
+ +To use the internal framing described in , the decoder + must know the total length of the Opus packet, in bytes. +This section describes a simple variation of that framing which can be used + when the total length of the packet is not known. +Nothing in the encoding of the packet itself allows a decoder to distinguish + between the regular, undelimited framing and the self-delimiting framing + described in this appendix. +Which one is used and where must be established by context at the transport + layer. +It is RECOMMENDED that a transport layer choose exactly one framing scheme, + rather than allowing an encoder to signal which one it wants to use. + + + +For example, although a regular Opus stream does not support more than two + channels, a multi-channel Opus stream may be formed from several one- and + two-channel streams. +To pack an Opus packet from each of these streams together in a single packet + at the transport layer, one could use the self-delimiting framing for all but + the last stream, and then the regular, undelimited framing for the last one. +Reverting to the undelimited framing for the last stream saves overhead + (because the total size of the transport-layer packet will still be known), + and ensures that a "multi-channel" stream which only has a single Opus stream + uses the same framing as a regular Opus stream does. +This avoids the need for signaling to distinguish these two cases. + + + +The self-delimiting framing is identical to the regular, undelimited framing + from , except that each Opus packet contains one extra + length field, encoded using the same one- or two-byte scheme from + . +This extra length immediately precedes the compressed data of the first Opus + frame in the packet, and is interpreted in the various modes as follows: + + +Code 0 packets: It is the length of the single Opus frame (see + ). + + +Code 1 packets: It is the length used for both of the Opus frames (see + ). + + +Code 2 packets: It is the length of the second Opus frame (see + ). + +CBR Code 3 packets: It is the length used for all of the Opus frames (see + ). + +VBR Code 3 packets: It is the length of the last Opus frame (see + ). + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
diff --git a/asm/libs/opus/doc/draft-ietf-payload-rtp-opus.xml b/asm/libs/opus/doc/draft-ietf-payload-rtp-opus.xml new file mode 100644 index 00000000..c4eb2107 --- /dev/null +++ b/asm/libs/opus/doc/draft-ietf-payload-rtp-opus.xml @@ -0,0 +1,960 @@ + + + + + + + + + + + + + + + + + + + + + + ]> + + + + + + + + + + + + + + + + + + RTP Payload Format for the Opus Speech and Audio Codec + + + +
+ jspittka@gmail.com +
+
+ + + vocTone +
+ + + + + + + + koenvos74@gmail.com +
+
+ + + Mozilla +
+ + 331 E. Evelyn Avenue + Mountain View + CA + 94041 + USA + + jmvalin@jmvalin.ca +
+
+ + + + + + This document defines the Real-time Transport Protocol (RTP) payload + format for packetization of Opus encoded + speech and audio data necessary to integrate the codec in the + most compatible way. It also provides an applicability statement + for the use of Opus over RTP. Further, it describes media type registrations + for the RTP payload format. + + +
+ + +
+ + Opus is a speech and audio codec developed within the + IETF Internet Wideband Audio Codec working group. The codec + has a very low algorithmic delay and it + is highly scalable in terms of audio bandwidth, bitrate, and + complexity. Further, it provides different modes to efficiently encode speech signals + as well as music signals, thus making it the codec of choice for + various applications using the Internet or similar networks. + + + This document defines the Real-time Transport Protocol (RTP) + payload format for packetization + of Opus encoded speech and audio data necessary to + integrate Opus in the + most compatible way. It also provides an applicability statement + for the use of Opus over RTP. + Further, it describes media type registrations for + the RTP payload format. + +
+ +
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + document are to be interpreted as described in . + + + The range of audio frequecies being coded + Constant bitrate + Central Processing Unit + Discontinuous transmission + Forward error correction + Internet Protocol + Speech or audio samples (per channel) + Session Description Protocol + Variable bitrate + + + + Throughout this document, we refer to the following definitions: + + + Abbreviation + Name + Audio Bandwidth (Hz) + Sampling Rate (Hz) + NB + Narrowband + 0 - 4000 + 8000 + + MB + Mediumband + 0 - 6000 + 12000 + + WB + Wideband + 0 - 8000 + 16000 + + SWB + Super-wideband + 0 - 12000 + 24000 + + FB + Fullband + 0 - 20000 + 48000 + + + Audio bandwidth naming + + +
+ +
+ + Opus encodes speech + signals as well as general audio signals. Two different modes can be + chosen, a voice mode or an audio mode, to allow the most efficient coding + depending on the type of the input signal, the sampling frequency of the + input signal, and the intended application. + + + + The voice mode allows efficient encoding of voice signals at lower bit + rates while the audio mode is optimized for general audio signals at medium and + higher bitrates. + + + + Opus is highly scalable in terms of audio + bandwidth, bitrate, and complexity. Further, Opus allows + transmitting stereo signals with in-band signaling in the bit-stream. + + +
+ + Opus supports bitrates from 6 kb/s to 510 kb/s. + The bitrate can be changed dynamically within that range. + All + other parameters being + equal, higher bitrates result in higher audio quality. + +
+ + For a frame size of + 20 ms, these + are the bitrate "sweet spots" for Opus in various configurations: + + + 8-12 kb/s for NB speech, + 16-20 kb/s for WB speech, + 28-40 kb/s for FB speech, + 48-64 kb/s for FB mono music, and + 64-128 kb/s for FB stereo music. + + +
+
+ + For the same average bitrate, variable bitrate (VBR) can achieve higher audio quality + than constant bitrate (CBR). For the majority of voice transmission applications, VBR + is the best choice. One reason for choosing CBR is the potential + information leak that might occur when encrypting the + compressed stream. See for guidelines on when VBR is + appropriate for encrypted audio communications. In the case where an existing + VBR stream needs to be converted to CBR for security reasons, then the Opus padding + mechanism described in is the RECOMMENDED way to achieve padding + because the RTP padding bit is unencrypted. + + + The bitrate can be adjusted at any point in time. To avoid congestion, + the average bitrate SHOULD NOT exceed the available + network bandwidth. If no target bitrate is specified, the bitrates specified in + are RECOMMENDED. + + +
+ +
+ + + Opus can, as described in , + be operated with a variable bitrate. In that case, the encoder will + automatically reduce the bitrate for certain input signals, like periods + of silence. When using continuous transmission, it will reduce the + bitrate when the characteristics of the input signal permit, but + will never interrupt the transmission to the receiver. Therefore, the + received signal will maintain the same high level of audio quality over the + full duration of a transmission while minimizing the average bit + rate over time. + + + + In cases where the bitrate of Opus needs to be reduced even + further or in cases where only constant bitrate is available, + the Opus encoder can use discontinuous + transmission (DTX), where parts of the encoded signal that + correspond to periods of silence in the input speech or audio signal + are not transmitted to the receiver. A receiver can distinguish + between DTX and packet loss by looking for gaps in the sequence + number, as described by Section 4.1 + of . + + + + On the receiving side, the non-transmitted parts will be handled by a + frame loss concealment unit in the Opus decoder which generates a + comfort noise signal to replace the non transmitted parts of the + speech or audio signal. Use of Comfort + Noise (CN) with Opus is discouraged. + The transmitter MUST drop whole frames only, + based on the size of the last transmitted frame, + to ensure successive RTP timestamps differ by a multiple of 120 and + to allow the receiver to use whole frames for concealment. + + + + DTX can be used with both variable and constant bitrate. + It will have a slightly lower speech or audio + quality than continuous transmission. Therefore, using continuous + transmission is RECOMMENDED unless constraints on available network bandwidth + are severe. + + +
+ +
+ +
+ + + Complexity of the encoder can be scaled to optimize for CPU resources in real-time, mostly as + a trade-off between audio quality and bitrate. Also, different modes of Opus have different complexity. + + +
+ +
+ + + The voice mode of Opus allows for embedding "in-band" forward error correction (FEC) + data into the Opus bit stream. This FEC scheme adds + redundant information about the previous packet (N-1) to the current + output packet N. For + each frame, the encoder decides whether to use FEC based on (1) an + externally-provided estimate of the channel's packet loss rate; (2) an + externally-provided estimate of the channel's capacity; (3) the + sensitivity of the audio or speech signal to packet loss; (4) whether + the receiving decoder has indicated it can take advantage of "in-band" + FEC information. The decision to send "in-band" FEC information is + entirely controlled by the encoder and therefore no special precautions + for the payload have to be taken. + + + + On the receiving side, the decoder can take advantage of this + additional information when it loses a packet and the next packet + is available. In order to use the FEC data, the jitter buffer needs + to provide access to payloads with the FEC data. + Instead of performing loss concealment for a missing packet, the + receiver can then configure its decoder to decode the FEC data from the next packet. + + + + Any compliant Opus decoder is capable of ignoring + FEC information when it is not needed, so encoding with FEC cannot cause + interoperability problems. + However, if FEC cannot be used on the receiving side, then FEC + SHOULD NOT be used, as it leads to an inefficient usage of network + resources. Decoder support for FEC SHOULD be indicated at the time a + session is set up. + + +
+ +
+ + + Opus allows for transmission of stereo audio signals. This operation + is signaled in-band in the Opus bit-stream and no special arrangement + is needed in the payload format. An + Opus decoder is capable of handling a stereo encoding, but an + application might only be capable of consuming a single audio + channel. + + + If a decoder cannot take advantage of the benefits of a stereo signal + this SHOULD be indicated at the time a session is set up. In that case + the sending side SHOULD NOT send stereo signals as it leads to an + inefficient usage of network resources. + + +
+ +
+ +
+ The payload format for Opus consists of the RTP header and Opus payload + data. +
+ The format of the RTP header is specified in . + The use of the fields of the RTP header by the Opus payload format is + consistent with that specification. + + The payload length of Opus is an integer number of octets and + therefore no padding is necessary. The payload MAY be padded by an + integer number of octets according to , + although the Opus internal padding is preferred. + + The timestamp, sequence number, and marker bit (M) of the RTP header + are used in accordance with Section 4.1 + of . + + The RTP payload type for Opus is to be assigned dynamically. + + The receiving side MUST be prepared to receive duplicate RTP + packets. The receiver MUST provide at most one of those payloads to the + Opus decoder for decoding, and MUST discard the others. + + Opus supports 5 different audio bandwidths, which can be adjusted during + a stream. + The RTP timestamp is incremented with a 48000 Hz clock rate + for all modes of Opus and all sampling rates. + The unit + for the timestamp is samples per single (mono) channel. The RTP timestamp corresponds to the + sample time of the first encoded sample in the encoded frame. + For data encoded with sampling rates other than 48000 Hz, + the sampling rate has to be adjusted to 48000 Hz. + +
+ +
+ + The Opus encoder can output encoded frames representing 2.5, 5, 10, 20, + 40, or 60 ms of speech or audio data. Further, an arbitrary number of frames can be + combined into a packet, up to a maximum packet duration representing + 120 ms of speech or audio data. The grouping of one or more Opus + frames into a single Opus packet is defined in Section 3 of + . An RTP payload MUST contain exactly one + Opus packet as defined by that document. + + + shows the structure combined with the RTP header. + +
+ + + +
+ + + shows supported frame sizes in + milliseconds of encoded speech or audio data for the speech and audio modes + (Mode) and sampling rates (fs) of Opus and shows how the timestamp is + incremented for packetization (ts incr). If the Opus encoder + outputs multiple encoded frames into a single packet, the timestamp + increment is the sum of the increments for the individual frames. + + + + Mode + fs + 2.5 + 5 + 10 + 20 + 40 + 60 + ts incr + all + 120 + 240 + 480 + 960 + 1920 + 2880 + voice + NB/MB/WB/SWB/FB + x + x + o + o + o + o + audio + NB/WB/SWB/FB + o + o + o + o + x + x + + +
+ +
+ +
+ + The target bitrate of Opus can be adjusted at any point in time, thus + allowing efficient congestion control. Furthermore, the amount + of encoded speech or audio data encoded in a + single packet can be used for congestion control, since the transmission + rate is inversely proportional to the packet duration. A lower packet + transmission rate reduces the amount of header overhead, but at the same + time increases latency and loss sensitivity, so it ought to be used with + care. + + Since UDP does not provide congestion control, applications that use + RTP over UDP SHOULD implement their own congestion control above the + UDP layer . Work in the rmcat working group + describes the + interactions and conceptual interfaces necessary between the application + components that relate to congestion control, including the RTP layer, + the higher-level media codec control layer, and the lower-level + transport interface, as well as components dedicated to congestion + control functions. +
+ +
+ One media subtype (audio/opus) has been defined and registered as + described in the following section. + +
+ Media type registration is done according to and . + + Type name: audio + Subtype name: opus + + Required parameters: + + the RTP timestamp is incremented with a + 48000 Hz clock rate for all modes of Opus and all sampling + rates. For data encoded with sampling rates other than 48000 Hz, + the sampling rate has to be adjusted to 48000 Hz. + + + + Optional parameters: + + + + a hint about the maximum output sampling rate that the receiver is + capable of rendering in Hz. + The decoder MUST be capable of decoding + any audio bandwidth but due to hardware limitations only signals + up to the specified sampling rate can be played back. Sending signals + with higher audio bandwidth results in higher than necessary network + usage and encoding complexity, so an encoder SHOULD NOT encode + frequencies above the audio bandwidth specified by maxplaybackrate. + This parameter can take any value between 8000 and 48000, although + commonly the value will match one of the Opus bandwidths + (). + By default, the receiver is assumed to have no limitations, i.e. 48000. + + + + + a hint about the maximum input sampling rate that the sender is likely to produce. + This is not a guarantee that the sender will never send any higher bandwidth + (e.g. it could send a pre-recorded prompt that uses a higher bandwidth), but it + indicates to the receiver that frequencies above this maximum can safely be discarded. + This parameter is useful to avoid wasting receiver resources by operating the audio + processing pipeline (e.g. echo cancellation) at a higher rate than necessary. + This parameter can take any value between 8000 and 48000, although + commonly the value will match one of the Opus bandwidths + (). + By default, the sender is assumed to have no limitations, i.e. 48000. + + + + the maximum duration of media represented + by a packet (according to Section 6 of + ) that a decoder wants to receive, in + milliseconds rounded up to the next full integer value. + Possible values are 3, 5, 10, 20, 40, 60, or an arbitrary + multiple of an Opus frame size rounded up to the next full integer + value, up to a maximum value of 120, as + defined in . If no value is + specified, the default is 120. + + + the preferred duration of media represented + by a packet (according to Section 6 of + ) that a decoder wants to receive, in + milliseconds rounded up to the next full integer value. + Possible values are 3, 5, 10, 20, 40, 60, or an arbitrary + multiple of an Opus frame size rounded up to the next full integer + value, up to a maximum value of 120, as defined in . If no value is + specified, the default is 20. + + + specifies the maximum average + receive bitrate of a session in bits per second (b/s). The actual + value of the bitrate can vary, as it is dependent on the + characteristics of the media in a packet. Note that the maximum + average bitrate MAY be modified dynamically during a session. Any + positive integer is allowed, but values outside the range + 6000 to 510000 SHOULD be ignored. If no value is specified, the + maximum value specified in + for the corresponding mode of Opus and corresponding maxplaybackrate + is the default. + + + specifies whether the decoder prefers receiving stereo or mono signals. + Possible values are 1 and 0 where 1 specifies that stereo signals are preferred, + and 0 specifies that only mono signals are preferred. + Independent of the stereo parameter every receiver MUST be able to receive and + decode stereo signals but sending stereo signals to a receiver that signaled a + preference for mono signals may result in higher than necessary network + utilization and encoding complexity. If no value is specified, + the default is 0 (mono). + + + + specifies whether the sender is likely to produce stereo audio. + Possible values are 1 and 0, where 1 specifies that stereo signals are likely to + be sent, and 0 specifies that the sender will likely only send mono. + This is not a guarantee that the sender will never send stereo audio + (e.g. it could send a pre-recorded prompt that uses stereo), but it + indicates to the receiver that the received signal can be safely downmixed to mono. + This parameter is useful to avoid wasting receiver resources by operating the audio + processing pipeline (e.g. echo cancellation) in stereo when not necessary. + If no value is specified, the default is 0 + (mono). + + + + specifies if the decoder prefers the use of a constant bitrate versus + variable bitrate. Possible values are 1 and 0, where 1 specifies constant + bitrate and 0 specifies variable bitrate. If no value is specified, + the default is 0 (vbr). When cbr is 1, the maximum average bitrate can still + change, e.g. to adapt to changing network conditions. + + + specifies that the decoder has the capability to + take advantage of the Opus in-band FEC. Possible values are 1 and 0. + Providing 0 when FEC cannot be used on the receiving side is + RECOMMENDED. If no + value is specified, useinbandfec is assumed to be 0. + This parameter is only a preference and the receiver MUST be able to process + packets that include FEC information, even if it means the FEC part is discarded. + + + specifies if the decoder prefers the use of + DTX. Possible values are 1 and 0. If no value is specified, the + default is 0. + + + Encoding considerations: + + The Opus media type is framed and consists of binary data according + to Section 4.8 in . + + + Security considerations: + + See of this document. + + + Interoperability considerations: none + Published specification: RFC [XXXX] + Note to the RFC Editor: Replace [XXXX] with the number of the published + RFC. + + Applications that use this media type: + + Any application that requires the transport of + speech or audio data can use this media type. Some examples are, + but not limited to, audio and video conferencing, Voice over IP, + media streaming. + + + Fragment identifier considerations: N/A + + Person & email address to contact for further information: + + SILK Support silksupport@skype.net + Jean-Marc Valin jmvalin@jmvalin.ca + + + Intended usage: COMMON + + Restrictions on usage: + + + For transfer over RTP, the RTP payload format ( of this document) SHALL be + used. + + + Author: + + Julian Spittka jspittka@gmail.com + Koen Vos koenvos74@gmail.com + Jean-Marc Valin jmvalin@jmvalin.ca + + + Change controller: IETF Payload Working Group delegated from the IESG +
+
+ +
+ The information described in the media type specification has a + specific mapping to fields in the Session Description Protocol (SDP) + , which is commonly used to describe RTP + sessions. When SDP is used to specify sessions employing Opus, + the mapping is as follows: + + + + The media type ("audio") goes in SDP "m=" as the media name. + + The media subtype ("opus") goes in SDP "a=rtpmap" as the encoding + name. The RTP clock rate in "a=rtpmap" MUST be 48000 and the number of + channels MUST be 2. + + The OPTIONAL media type parameters "ptime" and "maxptime" are + mapped to "a=ptime" and "a=maxptime" attributes, respectively, in the + SDP. + + The OPTIONAL media type parameters "maxaveragebitrate", + "maxplaybackrate", "stereo", "cbr", "useinbandfec", and + "usedtx", when present, MUST be included in the "a=fmtp" attribute + in the SDP, expressed as a media type string in the form of a + semicolon-separated list of parameter=value pairs (e.g., + maxplaybackrate=48000). They MUST NOT be specified in an + SSRC-specific "fmtp" source-level attribute (as defined in + Section 6.3 of ). + + The OPTIONAL media type parameters "sprop-maxcapturerate", + and "sprop-stereo" MAY be mapped to the "a=fmtp" SDP attribute by + copying them directly from the media type parameter string as part + of the semicolon-separated list of parameter=value pairs (e.g., + sprop-stereo=1). These same OPTIONAL media type parameters MAY also + be specified using an SSRC-specific "fmtp" source-level attribute + as described in Section 6.3 of . + They MAY be specified in both places, in which case the parameter + in the source-level attribute overrides the one found on the + "a=fmtp" line. The value of any parameter which is not specified in + a source-level source attribute MUST be taken from the "a=fmtp" + line, if it is present there. + + + + + Below are some examples of SDP session descriptions for Opus: + + Example 1: Standard mono session with 48000 Hz clock rate +
+ + + +
+ + + Example 2: 16000 Hz clock rate, maximum packet size of 40 ms, + recommended packet size of 40 ms, maximum average bitrate of 20000 bps, + prefers to receive stereo but only plans to send mono, FEC is desired, + DTX is not desired + +
+ + + +
+ + Example 3: Two-way full-band stereo preferred + +
+ + + +
+ + +
+ + When using the offer-answer procedure described in to negotiate the use of Opus, the following + considerations apply: + + + + Opus supports several clock rates. For signaling purposes only + the highest, i.e. 48000, is used. The actual clock rate of the + corresponding media is signaled inside the payload and is not + restricted by this payload format description. The decoder MUST be + capable of decoding every received clock rate. An example + is shown below: + +
+ + + +
+
+ + The "ptime" and "maxptime" parameters are unidirectional + receive-only parameters and typically will not compromise + interoperability; however, some values might cause application + performance to suffer. defines the SDP offer-answer handling of the + "ptime" parameter. The "maxptime" parameter MUST be handled in the + same way. + + + The "maxplaybackrate" parameter is a unidirectional receive-only + parameter that reflects limitations of the local receiver. When + sending to a single destination, a sender MUST NOT use an audio + bandwidth higher than necessary to make full use of audio sampled at + a sampling rate of "maxplaybackrate". Gateways or senders that + are sending the same encoded audio to multiple destinations + SHOULD NOT use an audio bandwidth higher than necessary to + represent audio sampled at "maxplaybackrate", as this would lead + to inefficient use of network resources. + The "maxplaybackrate" parameter does not + affect interoperability. Also, this parameter SHOULD NOT be used + to adjust the audio bandwidth as a function of the bitrate, as this + is the responsibility of the Opus encoder implementation. + + + The "maxaveragebitrate" parameter is a unidirectional receive-only + parameter that reflects limitations of the local receiver. The sender + of the other side MUST NOT send with an average bitrate higher than + "maxaveragebitrate" as it might overload the network and/or + receiver. The "maxaveragebitrate" parameter typically will not + compromise interoperability; however, some values might cause + application performance to suffer, and ought to be set with + care. + + The "sprop-maxcapturerate" and "sprop-stereo" parameters are + unidirectional sender-only parameters that reflect limitations of + the sender side. + They allow the receiver to set up a reduced-complexity audio + processing pipeline if the sender is not planning to use the full + range of Opus's capabilities. + Neither "sprop-maxcapturerate" nor "sprop-stereo" affect + interoperability and the receiver MUST be capable of receiving any signal. + + + + The "stereo" parameter is a unidirectional receive-only + parameter. When sending to a single destination, a sender MUST + NOT use stereo when "stereo" is 0. Gateways or senders that are + sending the same encoded audio to multiple destinations SHOULD + NOT use stereo when "stereo" is 0, as this would lead to + inefficient use of network resources. The "stereo" parameter does + not affect interoperability. + + + + The "cbr" parameter is a unidirectional receive-only + parameter. + + + The "useinbandfec" parameter is a unidirectional receive-only + parameter. + + The "usedtx" parameter is a unidirectional receive-only + parameter. + + Any unknown parameter in an offer MUST be ignored by the receiver + and MUST be removed from the answer. + +
+ + + The Opus parameters in an SDP Offer/Answer exchange are completely + orthogonal, and there is no relationship between the SDP Offer and + the Answer. + +
+ +
+ + For declarative use of SDP such as in Session Announcement Protocol + (SAP), , and RTSP, , for + Opus, the following needs to be considered: + + + + The values for "maxptime", "ptime", "maxplaybackrate", and + "maxaveragebitrate" ought to be selected carefully to ensure that a + reasonable performance can be achieved for the participants of a session. + + + The values for "maxptime", "ptime", and of the payload + format configuration are recommendations by the decoding side to ensure + the best performance for the decoder. + + + All other parameters of the payload format configuration are declarative + and a participant MUST use the configurations that are provided for + the session. More than one configuration can be provided if necessary + by declaring multiple RTP payload types; however, the number of types + ought to be kept small. + +
+
+ +
+ + Use of variable bitrate (VBR) is subject to the security considerations in + . + + RTP packets using the payload format defined in this specification + are subject to the security considerations discussed in the RTP + specification , and in any applicable RTP profile such as + RTP/AVP , RTP/AVPF , + RTP/SAVP or RTP/SAVPF . + However, as "Securing the RTP Protocol Framework: + Why RTP Does Not Mandate a Single Media Security Solution" + discusses, it is not an RTP payload + format's responsibility to discuss or mandate what solutions are used + to meet the basic security goals like confidentiality, integrity and + source authenticity for RTP in general. This responsibility lays on + anyone using RTP in an application. They can find guidance on + available security mechanisms and important considerations in Options + for Securing RTP Sessions [I-D.ietf-avtcore-rtp-security-options]. + Applications SHOULD use one or more appropriate strong security + mechanisms. + + This payload format and the Opus encoding do not exhibit any + significant non-uniformity in the receiver-end computational load and thus + are unlikely to pose a denial-of-service threat due to the receipt of + pathological datagrams. +
+ +
+ Many people have made useful comments and suggestions contributing to this document. + In particular, we would like to thank + Tina le Grand, Cullen Jennings, Jonathan Lennox, Gregory Maxwell, Colin Perkins, Jan Skoglund, + Timothy B. Terriberry, Martin Thompson, Justin Uberti, Magnus Westerlund, and Mo Zanaty. +
+
+ + + + &rfc2119; + &rfc3389; + &rfc3550; + &rfc3711; + &rfc3551; + &rfc6838; + &rfc4855; + &rfc4566; + &rfc3264; + &rfc2326; + &rfc5576; + &rfc6562; + &rfc6716; + + + + &rfc2974; + &rfc4585; + &rfc5124; + &rfc5405; + &rfc7202; + + + + rmcat documents + + + + + + + + + + + +
diff --git a/asm/libs/opus/doc/footer.html b/asm/libs/opus/doc/footer.html new file mode 100644 index 00000000..8d917c5b --- /dev/null +++ b/asm/libs/opus/doc/footer.html @@ -0,0 +1,20 @@ + + + + + + + +
+For more information visit the Opus Website. +
+ + + diff --git a/asm/libs/opus/doc/footer.html.patch b/asm/libs/opus/doc/footer.html.patch new file mode 100644 index 00000000..23b29da3 --- /dev/null +++ b/asm/libs/opus/doc/footer.html.patch @@ -0,0 +1,22 @@ +--- footer.orig.html 2012-06-11 00:32:00.237427961 -0400 ++++ footer.html 2012-06-11 00:45:51.518437796 -0400 +@@ -6,11 +6,15 @@ + + + +-