diff --git a/src/core/static/js/libs/jplayer/aurora/aac.js b/src/core/static/js/libs/jplayer/aurora/aac.js deleted file mode 100644 index 7a5c4e0..0000000 --- a/src/core/static/js/libs/jplayer/aurora/aac.js +++ /dev/null @@ -1,4651 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o> 1) & 7); - cookie[1] = ((header.samplingIndex & 1) << 7) | (header.chanConfig << 3); - this.emit('cookie', new AV.Buffer(cookie)); - - this.stream.seek(offset); - this.sentHeader = true; - } - - while (this.stream.available(1)) { - var buffer = this.stream.readSingleBuffer(this.stream.remainingBytes()); - this.emit('data', buffer); - } - }; -}); -},{"./tables":11}],2:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -var ICStream = require('./ics'); -var Huffman = require('./huffman'); - -// Channel Coupling Element -function CCEElement(config) { - this.ics = new ICStream(config); - this.channelPair = new Array(8); - this.idSelect = new Int32Array(8); - this.chSelect = new Int32Array(8); - this.gain = new Array(16); -} - -CCEElement.BEFORE_TNS = 0; -CCEElement.AFTER_TNS = 1; -CCEElement.AFTER_IMDCT = 2; - -const CCE_SCALE = new Float32Array([ - 1.09050773266525765921, - 1.18920711500272106672, - 1.4142135623730950488016887, - 2.0 -]); - -CCEElement.prototype = { - decode: function(stream, config) { - var channelPair = this.channelPair, - idSelect = this.idSelect, - chSelect = this.chSelect; - - this.couplingPoint = 2 * stream.read(1); - this.coupledCount = stream.read(3); - - var gainCount = 0; - for (var i = 0; i <= this.coupledCount; i++) { - gainCount++; - channelPair[i] = stream.read(1); - idSelect[i] = stream.read(4); - - if (channelPair[i]) { - chSelect[i] = stream.read(2); - if (chSelect[i] === 3) - gainCount++; - - } else { - chSelect[i] = 2; - } - } - - this.couplingPoint += stream.read(1); - this.couplingPoint |= (this.couplingPoint >>> 1); - - var sign = stream.read(1), - scale = CCE_SCALE[stream.read(2)]; - - this.ics.decode(stream, config, false); - - var groupCount = this.ics.info.groupCount, - maxSFB = this.ics.info.maxSFB, - bandTypes = this.ics.bandTypes; - - for (var i = 0; i < gainCount; i++) { - var idx = 0, - cge = 1, - gain = 0, - gainCache = 1; - - if (i > 0) { - cge = this.couplingPoint === CCEElement.AFTER_IMDCT ? 1 : stream.read(1); - gain = cge ? Huffman.decodeScaleFactor(stream) - 60 : 0; - gainCache = Math.pow(scale, -gain); - } - - var gain_i = this.gain[i] = new Float32Array(120); - - if (this.couplingPoint === CCEElement.AFTER_IMDCT) { - gain_i[0] = gainCache; - } else { - for (var g = 0; g < groupCount; g++) { - for (var sfb = 0; sfb < maxSFB; sfb++) { - if (bandTypes[idx] !== ICStream.ZERO_BT) { - if (cge === 0) { - var t = Huffman.decodeScaleFactor(stream) - 60; - if (t !== 0) { - var s = 1; - t = gain += t; - if (sign) { - s -= 2 * (t * 0x1); - t >>>= 1; - } - gainCache = Math.pow(scale, -t) * s; - } - } - gain_i[idx++] = gainCache; - } - } - } - } - } - }, - - applyIndependentCoupling: function(index, data) { - var gain = this.gain[index][0], - iqData = this.ics.data; - - for (var i = 0; i < data.length; i++) { - data[i] += gain * iqData[i]; - } - }, - - applyDependentCoupling: function(index, data) { - var info = this.ics.info, - swbOffsets = info.swbOffsets, - groupCount = info.groupCount, - maxSFB = info.maxSFB, - bandTypes = this.ics.bandTypes, - iqData = this.ics.data; - - var idx = 0, - offset = 0, - gains = this.gain[index]; - - for (var g = 0; g < groupCount; g++) { - var len = info.groupLength[g]; - - for (var sfb = 0; sfb < maxSFB; sfb++, idx++) { - if (bandTypes[idx] !== ICStream.ZERO_BT) { - var gain = gains[idx]; - for (var group = 0; group < len; group++) { - for (var k = swbOffsets[sfb]; k < swbOffsets[swb + 1]; k++) { - data[offset + group * 128 + k] += gain * iqData[offset + group * 128 + k]; - } - } - } - } - - offset += len * 128; - } - } -}; - -module.exports = CCEElement; - -},{"./huffman":7,"./ics":8}],3:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -var ICStream = require('./ics'); - -// Channel Pair Element -function CPEElement(config) { - this.ms_used = []; - this.left = new ICStream(config); - this.right = new ICStream(config); -} - -const MAX_MS_MASK = 128; - -const MASK_TYPE_ALL_0 = 0, - MASK_TYPE_USED = 1, - MASK_TYPE_ALL_1 = 2, - MASK_TYPE_RESERVED = 3; - -CPEElement.prototype.decode = function(stream, config) { - var left = this.left, - right = this.right, - ms_used = this.ms_used; - - if (this.commonWindow = !!stream.read(1)) { - left.info.decode(stream, config, true); - right.info = left.info; - - var mask = stream.read(2); - this.maskPresent = !!mask; - - switch (mask) { - case MASK_TYPE_USED: - var len = left.info.groupCount * left.info.maxSFB; - for (var i = 0; i < len; i++) { - ms_used[i] = !!stream.read(1); - } - break; - - case MASK_TYPE_ALL_0: - case MASK_TYPE_ALL_1: - var val = !!mask; - for (var i = 0; i < MAX_MS_MASK; i++) { - ms_used[i] = val; - } - break; - - default: - throw new Error("Reserved ms mask type: " + mask); - } - } else { - for (var i = 0; i < MAX_MS_MASK; i++) - ms_used[i] = false; - } - - left.decode(stream, config, this.commonWindow); - right.decode(stream, config, this.commonWindow); -}; - -module.exports = CPEElement; - -},{"./ics":8}],4:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -var AV = (window.AV); -var ADTSDemuxer = require('./adts_demuxer'); -var ICStream = require('./ics'); -var CPEElement = require('./cpe'); -var CCEElement = require('./cce'); -var FilterBank = require('./filter_bank'); -var tables = require('./tables'); - -var AACDecoder = AV.Decoder.extend(function() { - AV.Decoder.register('mp4a', this); - AV.Decoder.register('aac ', this); - - // AAC profiles - const AOT_AAC_MAIN = 1, // no - AOT_AAC_LC = 2, // yes - AOT_AAC_LTP = 4, // no - AOT_ESCAPE = 31; - - // Channel configurations - const CHANNEL_CONFIG_NONE = 0, - CHANNEL_CONFIG_MONO = 1, - CHANNEL_CONFIG_STEREO = 2, - CHANNEL_CONFIG_STEREO_PLUS_CENTER = 3, - CHANNEL_CONFIG_STEREO_PLUS_CENTER_PLUS_REAR_MONO = 4, - CHANNEL_CONFIG_FIVE = 5, - CHANNEL_CONFIG_FIVE_PLUS_ONE = 6, - CHANNEL_CONFIG_SEVEN_PLUS_ONE = 8; - - this.prototype.init = function() { - this.format.floatingPoint = true; - } - - this.prototype.setCookie = function(buffer) { - var data = AV.Stream.fromBuffer(buffer), - stream = new AV.Bitstream(data); - - this.config = {}; - - this.config.profile = stream.read(5); - if (this.config.profile === AOT_ESCAPE) - this.config.profile = 32 + stream.read(6); - - this.config.sampleIndex = stream.read(4); - if (this.config.sampleIndex === 0x0f) { - this.config.sampleRate = stream.read(24); - for (var i = 0; i < tables.SAMPLE_RATES.length; i++) { - if (tables.SAMPLE_RATES[i] === this.config.sampleRate) { - this.config.sampleIndex = i; - break; - } - } - } else { - this.config.sampleRate = tables.SAMPLE_RATES[this.config.sampleIndex]; - } - - this.config.chanConfig = stream.read(4); - this.format.channelsPerFrame = this.config.chanConfig; // sometimes m4a files encode this wrong - - switch (this.config.profile) { - case AOT_AAC_MAIN: - case AOT_AAC_LC: - case AOT_AAC_LTP: - if (stream.read(1)) // frameLengthFlag - throw new Error('frameLengthFlag not supported'); - - this.config.frameLength = 1024; - - if (stream.read(1)) // dependsOnCoreCoder - stream.advance(14); // coreCoderDelay - - if (stream.read(1)) { // extensionFlag - if (this.config.profile > 16) { // error resiliant profile - this.config.sectionDataResilience = stream.read(1); - this.config.scalefactorResilience = stream.read(1); - this.config.spectralDataResilience = stream.read(1); - } - - stream.advance(1); - } - - if (this.config.chanConfig === CHANNEL_CONFIG_NONE) { - stream.advance(4) // element_instance_tag - throw new Error('PCE unimplemented'); - } - - break; - - default: - throw new Error('AAC profile ' + this.config.profile + ' not supported.'); - } - - this.filter_bank = new FilterBank(false, this.config.chanConfig); - this.ics = new ICStream(this.config); - this.cpe = new CPEElement(this.config); - this.cce = new CCEElement(this.config); - }; - - const SCE_ELEMENT = 0, - CPE_ELEMENT = 1, - CCE_ELEMENT = 2, - LFE_ELEMENT = 3, - DSE_ELEMENT = 4, - PCE_ELEMENT = 5, - FIL_ELEMENT = 6, - END_ELEMENT = 7; - - // The main decoding function. - this.prototype.readChunk = function() { - var stream = this.bitstream; - - // check if there is an ADTS header, and read it if so - if (stream.peek(12) === 0xfff) - ADTSDemuxer.readHeader(stream); - - this.cces = []; - var elements = [], - config = this.config, - frameLength = config.frameLength, - elementType = null; - - while ((elementType = stream.read(3)) !== END_ELEMENT) { - var id = stream.read(4); - - switch (elementType) { - // single channel and low frequency elements - case SCE_ELEMENT: - case LFE_ELEMENT: - var ics = this.ics; - ics.id = id; - elements.push(ics); - ics.decode(stream, config, false); - break; - - // channel pair element - case CPE_ELEMENT: - var cpe = this.cpe; - cpe.id = id; - elements.push(cpe); - cpe.decode(stream, config); - break; - - // channel coupling element - case CCE_ELEMENT: - var cce = this.cce; - this.cces.push(cce); - cce.decode(stream, config); - break; - - // data-stream element - case DSE_ELEMENT: - var align = stream.read(1), - count = stream.read(8); - - if (count === 255) - count += stream.read(8); - - if (align) - stream.align(); - - // skip for now... - stream.advance(count * 8); - break; - - // program configuration element - case PCE_ELEMENT: - throw new Error("TODO: PCE_ELEMENT") - break; - - // filler element - case FIL_ELEMENT: - if (id === 15) - id += stream.read(8) - 1; - - // skip for now... - stream.advance(id * 8); - break; - - default: - throw new Error('Unknown element') - } - } - - stream.align(); - this.process(elements); - - // Interleave channels - var data = this.data, - channels = data.length, - output = new Float32Array(frameLength * channels), - j = 0; - - for (var k = 0; k < frameLength; k++) { - for (var i = 0; i < channels; i++) { - output[j++] = data[i][k] / 32768; - } - } - - return output; - }; - - this.prototype.process = function(elements) { - var channels = this.config.chanConfig; - - // if (channels === 1 && psPresent) - // TODO: sbrPresent (2) - var mult = 1; - - var len = mult * this.config.frameLength; - var data = this.data = []; - - // Initialize channels - for (var i = 0; i < channels; i++) { - data[i] = new Float32Array(len); - } - - var channel = 0; - for (var i = 0; i < elements.length && channel < channels; i++) { - var e = elements[i]; - - if (e instanceof ICStream) { // SCE or LFE element - channel += this.processSingle(e, channel); - } else if (e instanceof CPEElement) { - this.processPair(e, channel); - channel += 2; - } else if (e instanceof CCEElement) { - channel++; - } else { - throw new Error("Unknown element found.") - } - } - }; - - this.prototype.processSingle = function(element, channel) { - var profile = this.config.profile, - info = element.info, - data = element.data; - - if (profile === AOT_AAC_MAIN) - throw new Error("Main prediction unimplemented"); - - if (profile === AOT_AAC_LTP) - throw new Error("LTP prediction unimplemented"); - - this.applyChannelCoupling(element, CCEElement.BEFORE_TNS, data, null); - - if (element.tnsPresent) - element.tns.process(element, data, false); - - this.applyChannelCoupling(element, CCEElement.AFTER_TNS, data, null); - - // filterbank - this.filter_bank.process(info, data, this.data[channel], channel); - - if (profile === AOT_AAC_LTP) - throw new Error("LTP prediction unimplemented"); - - this.applyChannelCoupling(element, CCEElement.AFTER_IMDCT, this.data[channel], null); - - if (element.gainPresent) - throw new Error("Gain control not implemented"); - - if (this.sbrPresent) - throw new Error("SBR not implemented"); - - return 1; - }; - - this.prototype.processPair = function(element, channel) { - var profile = this.config.profile, - left = element.left, - right = element.right, - l_info = left.info, - r_info = right.info, - l_data = left.data, - r_data = right.data; - - // Mid-side stereo - if (element.commonWindow && element.maskPresent) - this.processMS(element, l_data, r_data); - - if (profile === AOT_AAC_MAIN) - throw new Error("Main prediction unimplemented"); - - // Intensity stereo - this.processIS(element, l_data, r_data); - - if (profile === AOT_AAC_LTP) - throw new Error("LTP prediction unimplemented"); - - this.applyChannelCoupling(element, CCEElement.BEFORE_TNS, l_data, r_data); - - if (left.tnsPresent) - left.tns.process(left, l_data, false); - - if (right.tnsPresent) - right.tns.process(right, r_data, false); - - this.applyChannelCoupling(element, CCEElement.AFTER_TNS, l_data, r_data); - - // filterbank - this.filter_bank.process(l_info, l_data, this.data[channel], channel); - this.filter_bank.process(r_info, r_data, this.data[channel + 1], channel + 1); - - if (profile === AOT_AAC_LTP) - throw new Error("LTP prediction unimplemented"); - - this.applyChannelCoupling(element, CCEElement.AFTER_IMDCT, this.data[channel], this.data[channel + 1]); - - if (left.gainPresent) - throw new Error("Gain control not implemented"); - - if (right.gainPresent) - throw new Error("Gain control not implemented"); - - if (this.sbrPresent) - throw new Error("SBR not implemented"); - }; - - // Intensity stereo - this.prototype.processIS = function(element, left, right) { - var ics = element.right, - info = ics.info, - offsets = info.swbOffsets, - windowGroups = info.groupCount, - maxSFB = info.maxSFB, - bandTypes = ics.bandTypes, - sectEnd = ics.sectEnd, - scaleFactors = ics.scaleFactors; - - var idx = 0, groupOff = 0; - for (var g = 0; g < windowGroups; g++) { - for (var i = 0; i < maxSFB;) { - var end = sectEnd[idx]; - - if (bandTypes[idx] === ICStream.INTENSITY_BT || bandTypes[idx] === ICStream.INTENSITY_BT2) { - for (; i < end; i++, idx++) { - var c = bandTypes[idx] === ICStream.INTENSITY_BT ? 1 : -1; - if (element.maskPresent) - c *= element.ms_used[idx] ? -1 : 1; - - var scale = c * scaleFactors[idx]; - for (var w = 0; w < info.groupLength[g]; w++) { - var off = groupOff + w * 128 + offsets[i], - len = offsets[i + 1] - offsets[i]; - - for (var j = 0; j < len; j++) { - right[off + j] = left[off + j] * scale; - } - } - } - } else { - idx += end - i; - i = end; - } - } - - groupOff += info.groupLength[g] * 128; - } - }; - - // Mid-side stereo - this.prototype.processMS = function(element, left, right) { - var ics = element.left, - info = ics.info, - offsets = info.swbOffsets, - windowGroups = info.groupCount, - maxSFB = info.maxSFB, - sfbCBl = ics.bandTypes, - sfbCBr = element.right.bandTypes; - - var groupOff = 0, idx = 0; - for (var g = 0; g < windowGroups; g++) { - for (var i = 0; i < maxSFB; i++, idx++) { - if (element.ms_used[idx] && sfbCBl[idx] < ICStream.NOISE_BT && sfbCBr[idx] < ICStream.NOISE_BT) { - for (var w = 0; w < info.groupLength[g]; w++) { - var off = groupOff + w * 128 + offsets[i]; - for (var j = 0; j < offsets[i + 1] - offsets[i]; j++) { - var t = left[off + j] - right[off + j]; - left[off + j] += right[off + j]; - right[off + j] = t; - } - } - } - } - groupOff += info.groupLength[g] * 128; - } - }; - - this.prototype.applyChannelCoupling = function(element, couplingPoint, data1, data2) { - var cces = this.cces, - isChannelPair = element instanceof CPEElement, - applyCoupling = couplingPoint === CCEElement.AFTER_IMDCT ? 'applyIndependentCoupling' : 'applyDependentCoupling'; - - for (var i = 0; i < cces.length; i++) { - var cce = cces[i], - index = 0; - - if (cce.couplingPoint === couplingPoint) { - for (var c = 0; c < cce.coupledCount; c++) { - var chSelect = cce.chSelect[c]; - if (cce.channelPair[c] === isChannelPair && cce.idSelect[c] === element.id) { - if (chSelect !== 1) { - cce[applyCoupling](index, data1); - if (chSelect) index++; - } - - if (chSelect !== 2) - cce[applyCoupling](index++, data2); - - } else { - index += 1 + (chSelect === 3 ? 1 : 0); - } - } - } - } - }; - -}); - -module.exports = AACDecoder; - -},{"./adts_demuxer":1,"./cce":2,"./cpe":3,"./filter_bank":6,"./ics":8,"./tables":11}],5:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -function FFT(length) { - this.length = length; - - switch (length) { - case 64: - this.roots = generateFFTTableShort(64); - break; - - case 512: - this.roots = generateFFTTableLong(512); - break; - - case 60: - this.roots = generateFFTTableShort(60); - break; - - case 480: - this.roots = generateFFTTableLong(480); - break; - - default: - throw new Error("unexpected FFT length: " + length); - } - - // processing buffers - this.rev = new Array(length); - for (var i = 0; i < length; i++) { - this.rev[i] = new Float32Array(2); - } - - this.a = new Float32Array(2); - this.b = new Float32Array(2); - this.c = new Float32Array(2); - this.d = new Float32Array(2); - this.e1 = new Float32Array(2); - this.e2 = new Float32Array(2); -} - -function generateFFTTableShort(len) { - var t = 2 * Math.PI / len, - cosT = Math.cos(t), - sinT = Math.sin(t), - f = new Array(len); - - for (var i = 0; i < len; i++) { - f[i] = new Float32Array(2); - } - - f[0][0] = 1; - f[0][1] = 0; - var lastImag = 0; - - for (var i = 1; i < len; i++) { - f[i][0] = f[i - 1][0] * cosT + lastImag * sinT; - lastImag = lastImag * cosT - f[i - 1][0] * sinT; - f[i][1] = -lastImag; - } - - return f; -} - -function generateFFTTableLong(len) { - var t = 2 * Math.PI / len, - cosT = Math.cos(t), - sinT = Math.sin(t), - f = new Array(len); - - for (var i = 0; i < len; i++) { - f[i] = new Float32Array(3); - } - - f[0][0] = 1; - f[0][1] = 0; - f[0][2] = 0; - - for (var i = 1; i < len; i++) { - f[i][0] = f[i - 1][0] * cosT + f[i - 1][2] * sinT; - f[i][2] = f[i - 1][2] * cosT - f[i - 1][0] * sinT; - f[i][1] = -f[i][2]; - } - - return f; -} - -FFT.prototype.process = function(input, forward) { - var length = this.length, - imOffset = (forward ? 2 : 1), - scale = (forward ? length : 1), - rev = this.rev, - roots = this.roots; - - // bit-reversal - var ii = 0; - for (var i = 0; i < length; i++) { - rev[i][0] = input[ii][0]; - rev[i][1] = input[ii][1]; - - var k = length >>> 1; - while (ii >= k && k > 0) { - ii -= k; - k >>= 1; - } - - ii += k; - } - - var a = this.a, - b = this.b, - c = this.c, - d = this.d, - e1 = this.e1, - e2 = this.e2; - - for (var i = 0; i < length; i++) { - input[i][0] = rev[i][0]; - input[i][1] = rev[i][1]; - } - - // bottom base-4 round - for (var i = 0; i < length; i += 4) { - a[0] = input[i][0] + input[i + 1][0]; - a[1] = input[i][1] + input[i + 1][1]; - b[0] = input[i + 2][0] + input[i + 3][0]; - b[1] = input[i + 2][1] + input[i + 3][1]; - c[0] = input[i][0] - input[i + 1][0]; - c[1] = input[i][1] - input[i + 1][1]; - d[0] = input[i + 2][0] - input[i + 3][0]; - d[1] = input[i + 2][1] - input[i + 3][1]; - input[i][0] = a[0] + b[0]; - input[i][1] = a[1] + b[1]; - input[i + 2][0] = a[0] - b[0]; - input[i + 2][1] = a[1] - b[1]; - - e1[0] = c[0] - d[1]; - e1[1] = c[1] + d[0]; - e2[0] = c[0] + d[1]; - e2[1] = c[1] - d[0]; - - if (forward) { - input[i + 1][0] = e2[0]; - input[i + 1][1] = e2[1]; - input[i + 3][0] = e1[0]; - input[i + 3][1] = e1[1]; - } else { - input[i + 1][0] = e1[0]; - input[i + 1][1] = e1[1]; - input[i + 3][0] = e2[0]; - input[i + 3][1] = e2[1]; - } - } - - // iterations from bottom to top - for (var i = 4; i < length; i <<= 1) { - var shift = i << 1, - m = length / shift; - - for(var j = 0; j < length; j += shift) { - for(var k = 0; k < i; k++) { - var km = k * m, - rootRe = roots[km][0], - rootIm = roots[km][imOffset], - zRe = input[i + j + k][0] * rootRe - input[i + j + k][1] * rootIm, - zIm = input[i + j + k][0] * rootIm + input[i + j + k][1] * rootRe; - - input[i + j + k][0] = (input[j + k][0] - zRe) * scale; - input[i + j + k][1] = (input[j + k][1] - zIm) * scale; - input[j + k][0] = (input[j + k][0] + zRe) * scale; - input[j + k][1] = (input[j + k][1] + zIm) * scale; - } - } - } -}; - -module.exports = FFT; - -},{}],6:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -var ICStream = require('./ics'); -var MDCT = require('./mdct'); - -function FilterBank(smallFrames, channels) { - if (smallFrames) { - throw new Error("WHA?? No small frames allowed."); - } - - this.length = 1024; - this.shortLength = 128; - - this.mid = (this.length - this.shortLength) / 2; - this.trans = this.shortLength / 2; - - this.mdctShort = new MDCT(this.shortLength * 2); - this.mdctLong = new MDCT(this.length * 2); - - this.overlaps = new Array(channels); - for (var i = 0; i < channels; i++) { - this.overlaps[i] = new Float32Array(this.length); - } - - this.buf = new Float32Array(2 * this.length); -} - -function generateSineWindow(len) { - var d = new Float32Array(len); - for (var i = 0; i < len; i++) { - d[i] = Math.sin((i + 0.5) * (Math.PI / (2.0 * len))) - } - return d; -} - -function generateKBDWindow(alpha, len) { - var PIN = Math.PI / len, - out = new Float32Array(len), - sum = 0, - f = new Float32Array(len), - alpha2 = (alpha * PIN) * (alpha * PIN); - - for (var n = 0; n < len; n++) { - var tmp = n * (len - n) * alpha2, - bessel = 1; - - for (var j = 50; j > 0; j--) { - bessel = bessel * tmp / (j * j) + 1; - } - - sum += bessel; - f[n] = sum; - } - - sum++; - for (var n = 0; n < len; n++) { - out[n] = Math.sqrt(f[n] / sum); - } - - return out; -} - -const SINE_1024 = generateSineWindow(1024), - SINE_128 = generateSineWindow(128), - KBD_1024 = generateKBDWindow(4, 1024), - KBD_128 = generateKBDWindow(6, 128), - LONG_WINDOWS = [SINE_1024, KBD_1024], - SHORT_WINDOWS = [SINE_128, KBD_128]; - -FilterBank.prototype.process = function(info, input, output, channel) { - var overlap = this.overlaps[channel], - windowShape = info.windowShape[1], - windowShapePrev = info.windowShape[0], - longWindows = LONG_WINDOWS[windowShape], - shortWindows = SHORT_WINDOWS[windowShape], - longWindowsPrev = LONG_WINDOWS[windowShapePrev], - shortWindowsPrev = SHORT_WINDOWS[windowShapePrev], - length = this.length, - shortLen = this.shortLength, - mid = this.mid, - trans = this.trans, - buf = this.buf, - mdctLong = this.mdctLong, - mdctShort = this.mdctShort; - - switch (info.windowSequence) { - case ICStream.ONLY_LONG_SEQUENCE: - mdctLong.process(input, 0, buf, 0); - - // add second half output of previous frame to windowed output of current frame - for (var i = 0; i < length; i++) { - output[i] = overlap[i] + (buf[i] * longWindowsPrev[i]); - } - - // window the second half and save as overlap for next frame - for (var i = 0; i < length; i++) { - overlap[i] = buf[length + i] * longWindows[length - 1 - i]; - } - - break; - - case ICStream.LONG_START_SEQUENCE: - mdctLong.process(input, 0, buf, 0); - - // add second half output of previous frame to windowed output of current frame - for (var i = 0; i < length; i++) { - output[i] = overlap[i] + (buf[i] * longWindowsPrev[i]); - } - - // window the second half and save as overlap for next frame - for (var i = 0; i < mid; i++) { - overlap[i] = buf[length + i]; - } - - for (var i = 0; i < shortLen; i++) { - overlap[mid + i] = buf[length + mid + i] * shortWindows[shortLen - i - 1]; - } - - for (var i = 0; i < mid; i++) { - overlap[mid + shortLen + i] = 0; - } - - break; - - case ICStream.EIGHT_SHORT_SEQUENCE: - for (var i = 0; i < 8; i++) { - mdctShort.process(input, i * shortLen, buf, 2 * i * shortLen); - } - - // add second half output of previous frame to windowed output of current frame - for (var i = 0; i < mid; i++) { - output[i] = overlap[i]; - } - - for (var i = 0; i < shortLen; i++) { - output[mid + i] = overlap[mid + i] + buf[i] * shortWindowsPrev[i]; - output[mid + 1 * shortLen + i] = overlap[mid + shortLen * 1 + i] + (buf[shortLen * 1 + i] * shortWindows[shortLen - 1 - i]) + (buf[shortLen * 2 + i] * shortWindows[i]); - output[mid + 2 * shortLen + i] = overlap[mid + shortLen * 2 + i] + (buf[shortLen * 3 + i] * shortWindows[shortLen - 1 - i]) + (buf[shortLen * 4 + i] * shortWindows[i]); - output[mid + 3 * shortLen + i] = overlap[mid + shortLen * 3 + i] + (buf[shortLen * 5 + i] * shortWindows[shortLen - 1 - i]) + (buf[shortLen * 6 + i] * shortWindows[i]); - - if (i < trans) - output[mid + 4 * shortLen + i] = overlap[mid + shortLen * 4 + i] + (buf[shortLen * 7 + i] * shortWindows[shortLen - 1 - i]) + (buf[shortLen * 8 + i] * shortWindows[i]); - } - - // window the second half and save as overlap for next frame - for (var i = 0; i < shortLen; i++) { - if(i >= trans) - overlap[mid + 4 * shortLen + i - length] = (buf[shortLen * 7 + i] * shortWindows[shortLen - 1 - i]) + (buf[shortLen * 8 + i] * shortWindows[i]); - - overlap[mid + 5 * shortLen + i - length] = (buf[shortLen * 9 + i] * shortWindows[shortLen - 1 - i]) + (buf[shortLen * 10 + i] * shortWindows[i]); - overlap[mid + 6 * shortLen + i - length] = (buf[shortLen * 11 + i] * shortWindows[shortLen - 1 - i]) + (buf[shortLen * 12 + i]*shortWindows[i]); - overlap[mid + 7 * shortLen + i - length] = (buf[shortLen * 13 + i] * shortWindows[shortLen - 1 - i]) + (buf[shortLen * 14 + i]*shortWindows[i]); - overlap[mid + 8 * shortLen + i - length] = (buf[shortLen * 15 + i] * shortWindows[shortLen - 1 - i]); - } - - for (var i = 0; i < mid; i++) { - overlap[mid + shortLen + i] = 0; - } - - break; - - case ICStream.LONG_STOP_SEQUENCE: - mdctLong.process(input, 0, buf, 0); - - // add second half output of previous frame to windowed output of current frame - // construct first half window using padding with 1's and 0's - for (var i = 0; i < mid; i++) { - output[i] = overlap[i]; - } - - for (var i = 0; i < shortLen; i++) { - output[mid + i] = overlap[mid + i] + (buf[mid + i] * shortWindowsPrev[i]); - } - - for (var i = 0; i < mid; i++) { - output[mid + shortLen + i] = overlap[mid + shortLen + i] + buf[mid + shortLen + i]; - } - - // window the second half and save as overlap for next frame - for (var i = 0; i < length; i++) { - overlap[i] = buf[length + i] * longWindows[length - 1 - i]; - } - - break; - } -}; - -module.exports = FilterBank; - -},{"./ics":8,"./mdct":9}],7:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -// [bit length, codeword, values...] -const HCB1 = [ - [1, 0, 0, 0, 0, 0], - [5, 16, 1, 0, 0, 0], - [5, 17, -1, 0, 0, 0], - [5, 18, 0, 0, 0, -1], - [5, 19, 0, 1, 0, 0], - [5, 20, 0, 0, 0, 1], - [5, 21, 0, 0, -1, 0], - [5, 22, 0, 0, 1, 0], - [5, 23, 0, -1, 0, 0], - [7, 96, 1, -1, 0, 0], - [7, 97, -1, 1, 0, 0], - [7, 98, 0, 0, -1, 1], - [7, 99, 0, 1, -1, 0], - [7, 100, 0, -1, 1, 0], - [7, 101, 0, 0, 1, -1], - [7, 102, 1, 1, 0, 0], - [7, 103, 0, 0, -1, -1], - [7, 104, -1, -1, 0, 0], - [7, 105, 0, -1, -1, 0], - [7, 106, 1, 0, -1, 0], - [7, 107, 0, 1, 0, -1], - [7, 108, -1, 0, 1, 0], - [7, 109, 0, 0, 1, 1], - [7, 110, 1, 0, 1, 0], - [7, 111, 0, -1, 0, 1], - [7, 112, 0, 1, 1, 0], - [7, 113, 0, 1, 0, 1], - [7, 114, -1, 0, -1, 0], - [7, 115, 1, 0, 0, 1], - [7, 116, -1, 0, 0, -1], - [7, 117, 1, 0, 0, -1], - [7, 118, -1, 0, 0, 1], - [7, 119, 0, -1, 0, -1], - [9, 480, 1, 1, -1, 0], - [9, 481, -1, 1, -1, 0], - [9, 482, 1, -1, 1, 0], - [9, 483, 0, 1, 1, -1], - [9, 484, 0, 1, -1, 1], - [9, 485, 0, -1, 1, 1], - [9, 486, 0, -1, 1, -1], - [9, 487, 1, -1, -1, 0], - [9, 488, 1, 0, -1, 1], - [9, 489, 0, 1, -1, -1], - [9, 490, -1, 1, 1, 0], - [9, 491, -1, 0, 1, -1], - [9, 492, -1, -1, 1, 0], - [9, 493, 0, -1, -1, 1], - [9, 494, 1, -1, 0, 1], - [9, 495, 1, -1, 0, -1], - [9, 496, -1, 1, 0, -1], - [9, 497, -1, -1, -1, 0], - [9, 498, 0, -1, -1, -1], - [9, 499, 0, 1, 1, 1], - [9, 500, 1, 0, 1, -1], - [9, 501, 1, 1, 0, 1], - [9, 502, -1, 1, 0, 1], - [9, 503, 1, 1, 1, 0], - [10, 1008, -1, -1, 0, 1], - [10, 1009, -1, 0, -1, -1], - [10, 1010, 1, 1, 0, -1], - [10, 1011, 1, 0, -1, -1], - [10, 1012, -1, 0, -1, 1], - [10, 1013, -1, -1, 0, -1], - [10, 1014, -1, 0, 1, 1], - [10, 1015, 1, 0, 1, 1], - [11, 2032, 1, -1, 1, -1], - [11, 2033, -1, 1, -1, 1], - [11, 2034, -1, 1, 1, -1], - [11, 2035, 1, -1, -1, 1], - [11, 2036, 1, 1, 1, 1], - [11, 2037, -1, -1, 1, 1], - [11, 2038, 1, 1, -1, -1], - [11, 2039, -1, -1, 1, -1], - [11, 2040, -1, -1, -1, -1], - [11, 2041, 1, 1, -1, 1], - [11, 2042, 1, -1, 1, 1], - [11, 2043, -1, 1, 1, 1], - [11, 2044, -1, 1, -1, -1], - [11, 2045, -1, -1, -1, 1], - [11, 2046, 1, -1, -1, -1], - [11, 2047, 1, 1, 1, -1] -]; - -const HCB2 = [ - [3, 0, 0, 0, 0, 0], - [4, 2, 1, 0, 0, 0], - [5, 6, -1, 0, 0, 0], - [5, 7, 0, 0, 0, 1], - [5, 8, 0, 0, -1, 0], - [5, 9, 0, 0, 0, -1], - [5, 10, 0, -1, 0, 0], - [5, 11, 0, 0, 1, 0], - [5, 12, 0, 1, 0, 0], - [6, 26, 0, -1, 1, 0], - [6, 27, -1, 1, 0, 0], - [6, 28, 0, 1, -1, 0], - [6, 29, 0, 0, 1, -1], - [6, 30, 0, 1, 0, -1], - [6, 31, 0, 0, -1, 1], - [6, 32, -1, 0, 0, -1], - [6, 33, 1, -1, 0, 0], - [6, 34, 1, 0, -1, 0], - [6, 35, -1, -1, 0, 0], - [6, 36, 0, 0, -1, -1], - [6, 37, 1, 0, 1, 0], - [6, 38, 1, 0, 0, 1], - [6, 39, 0, -1, 0, 1], - [6, 40, -1, 0, 1, 0], - [6, 41, 0, 1, 0, 1], - [6, 42, 0, -1, -1, 0], - [6, 43, -1, 0, 0, 1], - [6, 44, 0, -1, 0, -1], - [6, 45, -1, 0, -1, 0], - [6, 46, 1, 1, 0, 0], - [6, 47, 0, 1, 1, 0], - [6, 48, 0, 0, 1, 1], - [6, 49, 1, 0, 0, -1], - [7, 100, 0, 1, -1, 1], - [7, 101, 1, 0, -1, 1], - [7, 102, -1, 1, -1, 0], - [7, 103, 0, -1, 1, -1], - [7, 104, 1, -1, 1, 0], - [7, 105, 1, 1, 0, -1], - [7, 106, 1, 0, 1, 1], - [7, 107, -1, 1, 1, 0], - [7, 108, 0, -1, -1, 1], - [7, 109, 1, 1, 1, 0], - [7, 110, -1, 0, 1, -1], - [7, 111, -1, -1, -1, 0], - [7, 112, -1, 0, -1, 1], - [7, 113, 1, -1, -1, 0], - [7, 114, 1, 1, -1, 0], - [8, 230, 1, -1, 0, 1], - [8, 231, -1, 1, 0, -1], - [8, 232, -1, -1, 1, 0], - [8, 233, -1, 0, 1, 1], - [8, 234, -1, -1, 0, 1], - [8, 235, -1, -1, 0, -1], - [8, 236, 0, -1, -1, -1], - [8, 237, 1, 0, 1, -1], - [8, 238, 1, 0, -1, -1], - [8, 239, 0, 1, -1, -1], - [8, 240, 0, 1, 1, 1], - [8, 241, -1, 1, 0, 1], - [8, 242, -1, 0, -1, -1], - [8, 243, 0, 1, 1, -1], - [8, 244, 1, -1, 0, -1], - [8, 245, 0, -1, 1, 1], - [8, 246, 1, 1, 0, 1], - [8, 247, 1, -1, 1, -1], - [8, 248, -1, 1, -1, 1], - [9, 498, 1, -1, -1, 1], - [9, 499, -1, -1, -1, -1], - [9, 500, -1, 1, 1, -1], - [9, 501, -1, 1, 1, 1], - [9, 502, 1, 1, 1, 1], - [9, 503, -1, -1, 1, -1], - [9, 504, 1, -1, 1, 1], - [9, 505, -1, 1, -1, -1], - [9, 506, -1, -1, 1, 1], - [9, 507, 1, 1, -1, -1], - [9, 508, 1, -1, -1, -1], - [9, 509, -1, -1, -1, 1], - [9, 510, 1, 1, -1, 1], - [9, 511, 1, 1, 1, -1] -]; - -const HCB3 = [ - [1, 0, 0, 0, 0, 0], - [4, 8, 1, 0, 0, 0], - [4, 9, 0, 0, 0, 1], - [4, 10, 0, 1, 0, 0], - [4, 11, 0, 0, 1, 0], - [5, 24, 1, 1, 0, 0], - [5, 25, 0, 0, 1, 1], - [6, 52, 0, 1, 1, 0], - [6, 53, 0, 1, 0, 1], - [6, 54, 1, 0, 1, 0], - [6, 55, 0, 1, 1, 1], - [6, 56, 1, 0, 0, 1], - [6, 57, 1, 1, 1, 0], - [7, 116, 1, 1, 1, 1], - [7, 117, 1, 0, 1, 1], - [7, 118, 1, 1, 0, 1], - [8, 238, 2, 0, 0, 0], - [8, 239, 0, 0, 0, 2], - [8, 240, 0, 0, 1, 2], - [8, 241, 2, 1, 0, 0], - [8, 242, 1, 2, 1, 0], - [9, 486, 0, 0, 2, 1], - [9, 487, 0, 1, 2, 1], - [9, 488, 1, 2, 0, 0], - [9, 489, 0, 1, 1, 2], - [9, 490, 2, 1, 1, 0], - [9, 491, 0, 0, 2, 0], - [9, 492, 0, 2, 1, 0], - [9, 493, 0, 1, 2, 0], - [9, 494, 0, 2, 0, 0], - [9, 495, 0, 1, 0, 2], - [9, 496, 2, 0, 1, 0], - [9, 497, 1, 2, 1, 1], - [9, 498, 0, 2, 1, 1], - [9, 499, 1, 1, 2, 0], - [9, 500, 1, 1, 2, 1], - [10, 1002, 1, 2, 0, 1], - [10, 1003, 1, 0, 2, 0], - [10, 1004, 1, 0, 2, 1], - [10, 1005, 0, 2, 0, 1], - [10, 1006, 2, 1, 1, 1], - [10, 1007, 1, 1, 1, 2], - [10, 1008, 2, 1, 0, 1], - [10, 1009, 1, 0, 1, 2], - [10, 1010, 0, 0, 2, 2], - [10, 1011, 0, 1, 2, 2], - [10, 1012, 2, 2, 1, 0], - [10, 1013, 1, 2, 2, 0], - [10, 1014, 1, 0, 0, 2], - [10, 1015, 2, 0, 0, 1], - [10, 1016, 0, 2, 2, 1], - [11, 2034, 2, 2, 0, 0], - [11, 2035, 1, 2, 2, 1], - [11, 2036, 1, 1, 0, 2], - [11, 2037, 2, 0, 1, 1], - [11, 2038, 1, 1, 2, 2], - [11, 2039, 2, 2, 1, 1], - [11, 2040, 0, 2, 2, 0], - [11, 2041, 0, 2, 1, 2], - [12, 4084, 1, 0, 2, 2], - [12, 4085, 2, 2, 0, 1], - [12, 4086, 2, 1, 2, 0], - [12, 4087, 2, 2, 2, 0], - [12, 4088, 0, 2, 2, 2], - [12, 4089, 2, 2, 2, 1], - [12, 4090, 2, 1, 2, 1], - [12, 4091, 1, 2, 1, 2], - [12, 4092, 1, 2, 2, 2], - [13, 8186, 0, 2, 0, 2], - [13, 8187, 2, 0, 2, 0], - [13, 8188, 1, 2, 0, 2], - [14, 16378, 2, 0, 2, 1], - [14, 16379, 2, 1, 1, 2], - [14, 16380, 2, 1, 0, 2], - [15, 32762, 2, 2, 2, 2], - [15, 32763, 2, 2, 1, 2], - [15, 32764, 2, 1, 2, 2], - [15, 32765, 2, 0, 1, 2], - [15, 32766, 2, 0, 0, 2], - [16, 65534, 2, 2, 0, 2], - [16, 65535, 2, 0, 2, 2] -]; - -const HCB4 = [ - [4, 0, 1, 1, 1, 1], - [4, 1, 0, 1, 1, 1], - [4, 2, 1, 1, 0, 1], - [4, 3, 1, 1, 1, 0], - [4, 4, 1, 0, 1, 1], - [4, 5, 1, 0, 0, 0], - [4, 6, 1, 1, 0, 0], - [4, 7, 0, 0, 0, 0], - [4, 8, 0, 0, 1, 1], - [4, 9, 1, 0, 1, 0], - [5, 20, 1, 0, 0, 1], - [5, 21, 0, 1, 1, 0], - [5, 22, 0, 0, 0, 1], - [5, 23, 0, 1, 0, 1], - [5, 24, 0, 0, 1, 0], - [5, 25, 0, 1, 0, 0], - [7, 104, 2, 1, 1, 1], - [7, 105, 1, 1, 2, 1], - [7, 106, 1, 2, 1, 1], - [7, 107, 1, 1, 1, 2], - [7, 108, 2, 1, 1, 0], - [7, 109, 2, 1, 0, 1], - [7, 110, 1, 2, 1, 0], - [7, 111, 2, 0, 1, 1], - [7, 112, 0, 1, 2, 1], - [8, 226, 0, 1, 1, 2], - [8, 227, 1, 1, 2, 0], - [8, 228, 0, 2, 1, 1], - [8, 229, 1, 0, 1, 2], - [8, 230, 1, 2, 0, 1], - [8, 231, 1, 1, 0, 2], - [8, 232, 1, 0, 2, 1], - [8, 233, 2, 1, 0, 0], - [8, 234, 2, 0, 1, 0], - [8, 235, 1, 2, 0, 0], - [8, 236, 2, 0, 0, 1], - [8, 237, 0, 1, 0, 2], - [8, 238, 0, 2, 1, 0], - [8, 239, 0, 0, 1, 2], - [8, 240, 0, 1, 2, 0], - [8, 241, 0, 2, 0, 1], - [8, 242, 1, 0, 0, 2], - [8, 243, 0, 0, 2, 1], - [8, 244, 1, 0, 2, 0], - [8, 245, 2, 0, 0, 0], - [8, 246, 0, 0, 0, 2], - [9, 494, 0, 2, 0, 0], - [9, 495, 0, 0, 2, 0], - [9, 496, 1, 2, 2, 1], - [9, 497, 2, 2, 1, 1], - [9, 498, 2, 1, 2, 1], - [9, 499, 1, 1, 2, 2], - [9, 500, 1, 2, 1, 2], - [9, 501, 2, 1, 1, 2], - [10, 1004, 1, 2, 2, 0], - [10, 1005, 2, 2, 1, 0], - [10, 1006, 2, 1, 2, 0], - [10, 1007, 0, 2, 2, 1], - [10, 1008, 0, 1, 2, 2], - [10, 1009, 2, 2, 0, 1], - [10, 1010, 0, 2, 1, 2], - [10, 1011, 2, 0, 2, 1], - [10, 1012, 1, 0, 2, 2], - [10, 1013, 2, 2, 2, 1], - [10, 1014, 1, 2, 0, 2], - [10, 1015, 2, 0, 1, 2], - [10, 1016, 2, 1, 0, 2], - [10, 1017, 1, 2, 2, 2], - [11, 2036, 2, 1, 2, 2], - [11, 2037, 2, 2, 1, 2], - [11, 2038, 0, 2, 2, 0], - [11, 2039, 2, 2, 0, 0], - [11, 2040, 0, 0, 2, 2], - [11, 2041, 2, 0, 2, 0], - [11, 2042, 0, 2, 0, 2], - [11, 2043, 2, 0, 0, 2], - [11, 2044, 2, 2, 2, 2], - [11, 2045, 0, 2, 2, 2], - [11, 2046, 2, 2, 2, 0], - [12, 4094, 2, 2, 0, 2], - [12, 4095, 2, 0, 2, 2] -]; - -const HCB5 = [ - [1, 0, 0, 0], - [4, 8, -1, 0], - [4, 9, 1, 0], - [4, 10, 0, 1], - [4, 11, 0, -1], - [5, 24, 1, -1], - [5, 25, -1, 1], - [5, 26, -1, -1], - [5, 27, 1, 1], - [7, 112, -2, 0], - [7, 113, 0, 2], - [7, 114, 2, 0], - [7, 115, 0, -2], - [8, 232, -2, -1], - [8, 233, 2, 1], - [8, 234, -1, -2], - [8, 235, 1, 2], - [8, 236, -2, 1], - [8, 237, 2, -1], - [8, 238, -1, 2], - [8, 239, 1, -2], - [8, 240, -3, 0], - [8, 241, 3, 0], - [8, 242, 0, -3], - [8, 243, 0, 3], - [9, 488, -3, -1], - [9, 489, 1, 3], - [9, 490, 3, 1], - [9, 491, -1, -3], - [9, 492, -3, 1], - [9, 493, 3, -1], - [9, 494, 1, -3], - [9, 495, -1, 3], - [9, 496, -2, 2], - [9, 497, 2, 2], - [9, 498, -2, -2], - [9, 499, 2, -2], - [10, 1000, -3, -2], - [10, 1001, 3, -2], - [10, 1002, -2, 3], - [10, 1003, 2, -3], - [10, 1004, 3, 2], - [10, 1005, 2, 3], - [10, 1006, -3, 2], - [10, 1007, -2, -3], - [10, 1008, 0, -4], - [10, 1009, -4, 0], - [10, 1010, 4, 1], - [10, 1011, 4, 0], - [11, 2024, -4, -1], - [11, 2025, 0, 4], - [11, 2026, 4, -1], - [11, 2027, -1, -4], - [11, 2028, 1, 4], - [11, 2029, -1, 4], - [11, 2030, -4, 1], - [11, 2031, 1, -4], - [11, 2032, 3, -3], - [11, 2033, -3, -3], - [11, 2034, -3, 3], - [11, 2035, -2, 4], - [11, 2036, -4, -2], - [11, 2037, 4, 2], - [11, 2038, 2, -4], - [11, 2039, 2, 4], - [11, 2040, 3, 3], - [11, 2041, -4, 2], - [12, 4084, -2, -4], - [12, 4085, 4, -2], - [12, 4086, 3, -4], - [12, 4087, -4, -3], - [12, 4088, -4, 3], - [12, 4089, 3, 4], - [12, 4090, -3, 4], - [12, 4091, 4, 3], - [12, 4092, 4, -3], - [12, 4093, -3, -4], - [13, 8188, 4, -4], - [13, 8189, -4, 4], - [13, 8190, 4, 4], - [13, 8191, -4, -4] -]; - -const HCB6 = [ - [4, 0, 0, 0], - [4, 1, 1, 0], - [4, 2, 0, -1], - [4, 3, 0, 1], - [4, 4, -1, 0], - [4, 5, 1, 1], - [4, 6, -1, 1], - [4, 7, 1, -1], - [4, 8, -1, -1], - [6, 36, 2, -1], - [6, 37, 2, 1], - [6, 38, -2, 1], - [6, 39, -2, -1], - [6, 40, -2, 0], - [6, 41, -1, 2], - [6, 42, 2, 0], - [6, 43, 1, -2], - [6, 44, 1, 2], - [6, 45, 0, -2], - [6, 46, -1, -2], - [6, 47, 0, 2], - [6, 48, 2, -2], - [6, 49, -2, 2], - [6, 50, -2, -2], - [6, 51, 2, 2], - [7, 104, -3, 1], - [7, 105, 3, 1], - [7, 106, 3, -1], - [7, 107, -1, 3], - [7, 108, -3, -1], - [7, 109, 1, 3], - [7, 110, 1, -3], - [7, 111, -1, -3], - [7, 112, 3, 0], - [7, 113, -3, 0], - [7, 114, 0, -3], - [7, 115, 0, 3], - [7, 116, 3, 2], - [8, 234, -3, -2], - [8, 235, -2, 3], - [8, 236, 2, 3], - [8, 237, 3, -2], - [8, 238, 2, -3], - [8, 239, -2, -3], - [8, 240, -3, 2], - [8, 241, 3, 3], - [9, 484, 3, -3], - [9, 485, -3, -3], - [9, 486, -3, 3], - [9, 487, 1, -4], - [9, 488, -1, -4], - [9, 489, 4, 1], - [9, 490, -4, 1], - [9, 491, -4, -1], - [9, 492, 1, 4], - [9, 493, 4, -1], - [9, 494, -1, 4], - [9, 495, 0, -4], - [9, 496, -4, 2], - [9, 497, -4, -2], - [9, 498, 2, 4], - [9, 499, -2, -4], - [9, 500, -4, 0], - [9, 501, 4, 2], - [9, 502, 4, -2], - [9, 503, -2, 4], - [9, 504, 4, 0], - [9, 505, 2, -4], - [9, 506, 0, 4], - [10, 1014, -3, -4], - [10, 1015, -3, 4], - [10, 1016, 3, -4], - [10, 1017, 4, -3], - [10, 1018, 3, 4], - [10, 1019, 4, 3], - [10, 1020, -4, 3], - [10, 1021, -4, -3], - [11, 2044, 4, 4], - [11, 2045, -4, 4], - [11, 2046, -4, -4], - [11, 2047, 4, -4] -]; - -const HCB7 = [ - [1, 0, 0, 0], - [3, 4, 1, 0], - [3, 5, 0, 1], - [4, 12, 1, 1], - [6, 52, 2, 1], - [6, 53, 1, 2], - [6, 54, 2, 0], - [6, 55, 0, 2], - [7, 112, 3, 1], - [7, 113, 1, 3], - [7, 114, 2, 2], - [7, 115, 3, 0], - [7, 116, 0, 3], - [8, 234, 2, 3], - [8, 235, 3, 2], - [8, 236, 1, 4], - [8, 237, 4, 1], - [8, 238, 1, 5], - [8, 239, 5, 1], - [8, 240, 3, 3], - [8, 241, 2, 4], - [8, 242, 0, 4], - [8, 243, 4, 0], - [9, 488, 4, 2], - [9, 489, 2, 5], - [9, 490, 5, 2], - [9, 491, 0, 5], - [9, 492, 6, 1], - [9, 493, 5, 0], - [9, 494, 1, 6], - [9, 495, 4, 3], - [9, 496, 3, 5], - [9, 497, 3, 4], - [9, 498, 5, 3], - [9, 499, 2, 6], - [9, 500, 6, 2], - [9, 501, 1, 7], - [10, 1004, 3, 6], - [10, 1005, 0, 6], - [10, 1006, 6, 0], - [10, 1007, 4, 4], - [10, 1008, 7, 1], - [10, 1009, 4, 5], - [10, 1010, 7, 2], - [10, 1011, 5, 4], - [10, 1012, 6, 3], - [10, 1013, 2, 7], - [10, 1014, 7, 3], - [10, 1015, 6, 4], - [10, 1016, 5, 5], - [10, 1017, 4, 6], - [10, 1018, 3, 7], - [11, 2038, 7, 0], - [11, 2039, 0, 7], - [11, 2040, 6, 5], - [11, 2041, 5, 6], - [11, 2042, 7, 4], - [11, 2043, 4, 7], - [11, 2044, 5, 7], - [11, 2045, 7, 5], - [12, 4092, 7, 6], - [12, 4093, 6, 6], - [12, 4094, 6, 7], - [12, 4095, 7, 7] -]; - -const HCB8 = [ - [3, 0, 1, 1], - [4, 2, 2, 1], - [4, 3, 1, 0], - [4, 4, 1, 2], - [4, 5, 0, 1], - [4, 6, 2, 2], - [5, 14, 0, 0], - [5, 15, 2, 0], - [5, 16, 0, 2], - [5, 17, 3, 1], - [5, 18, 1, 3], - [5, 19, 3, 2], - [5, 20, 2, 3], - [6, 42, 3, 3], - [6, 43, 4, 1], - [6, 44, 1, 4], - [6, 45, 4, 2], - [6, 46, 2, 4], - [6, 47, 3, 0], - [6, 48, 0, 3], - [6, 49, 4, 3], - [6, 50, 3, 4], - [6, 51, 5, 2], - [7, 104, 5, 1], - [7, 105, 2, 5], - [7, 106, 1, 5], - [7, 107, 5, 3], - [7, 108, 3, 5], - [7, 109, 4, 4], - [7, 110, 5, 4], - [7, 111, 0, 4], - [7, 112, 4, 5], - [7, 113, 4, 0], - [7, 114, 2, 6], - [7, 115, 6, 2], - [7, 116, 6, 1], - [7, 117, 1, 6], - [8, 236, 3, 6], - [8, 237, 6, 3], - [8, 238, 5, 5], - [8, 239, 5, 0], - [8, 240, 6, 4], - [8, 241, 0, 5], - [8, 242, 4, 6], - [8, 243, 7, 1], - [8, 244, 7, 2], - [8, 245, 2, 7], - [8, 246, 6, 5], - [8, 247, 7, 3], - [8, 248, 1, 7], - [8, 249, 5, 6], - [8, 250, 3, 7], - [9, 502, 6, 6], - [9, 503, 7, 4], - [9, 504, 6, 0], - [9, 505, 4, 7], - [9, 506, 0, 6], - [9, 507, 7, 5], - [9, 508, 7, 6], - [9, 509, 6, 7], - [10, 1020, 5, 7], - [10, 1021, 7, 0], - [10, 1022, 0, 7], - [10, 1023, 7, 7] -]; - -const HCB9 = [ - [1, 0, 0, 0], - [3, 4, 1, 0], - [3, 5, 0, 1], - [4, 12, 1, 1], - [6, 52, 2, 1], - [6, 53, 1, 2], - [6, 54, 2, 0], - [6, 55, 0, 2], - [7, 112, 3, 1], - [7, 113, 2, 2], - [7, 114, 1, 3], - [8, 230, 3, 0], - [8, 231, 0, 3], - [8, 232, 2, 3], - [8, 233, 3, 2], - [8, 234, 1, 4], - [8, 235, 4, 1], - [8, 236, 2, 4], - [8, 237, 1, 5], - [9, 476, 4, 2], - [9, 477, 3, 3], - [9, 478, 0, 4], - [9, 479, 4, 0], - [9, 480, 5, 1], - [9, 481, 2, 5], - [9, 482, 1, 6], - [9, 483, 3, 4], - [9, 484, 5, 2], - [9, 485, 6, 1], - [9, 486, 4, 3], - [10, 974, 0, 5], - [10, 975, 2, 6], - [10, 976, 5, 0], - [10, 977, 1, 7], - [10, 978, 3, 5], - [10, 979, 1, 8], - [10, 980, 8, 1], - [10, 981, 4, 4], - [10, 982, 5, 3], - [10, 983, 6, 2], - [10, 984, 7, 1], - [10, 985, 0, 6], - [10, 986, 8, 2], - [10, 987, 2, 8], - [10, 988, 3, 6], - [10, 989, 2, 7], - [10, 990, 4, 5], - [10, 991, 9, 1], - [10, 992, 1, 9], - [10, 993, 7, 2], - [11, 1988, 6, 0], - [11, 1989, 5, 4], - [11, 1990, 6, 3], - [11, 1991, 8, 3], - [11, 1992, 0, 7], - [11, 1993, 9, 2], - [11, 1994, 3, 8], - [11, 1995, 4, 6], - [11, 1996, 3, 7], - [11, 1997, 0, 8], - [11, 1998, 10, 1], - [11, 1999, 6, 4], - [11, 2000, 2, 9], - [11, 2001, 5, 5], - [11, 2002, 8, 0], - [11, 2003, 7, 0], - [11, 2004, 7, 3], - [11, 2005, 10, 2], - [11, 2006, 9, 3], - [11, 2007, 8, 4], - [11, 2008, 1, 10], - [11, 2009, 7, 4], - [11, 2010, 6, 5], - [11, 2011, 5, 6], - [11, 2012, 4, 8], - [11, 2013, 4, 7], - [11, 2014, 3, 9], - [11, 2015, 11, 1], - [11, 2016, 5, 8], - [11, 2017, 9, 0], - [11, 2018, 8, 5], - [12, 4038, 10, 3], - [12, 4039, 2, 10], - [12, 4040, 0, 9], - [12, 4041, 11, 2], - [12, 4042, 9, 4], - [12, 4043, 6, 6], - [12, 4044, 12, 1], - [12, 4045, 4, 9], - [12, 4046, 8, 6], - [12, 4047, 1, 11], - [12, 4048, 9, 5], - [12, 4049, 10, 4], - [12, 4050, 5, 7], - [12, 4051, 7, 5], - [12, 4052, 2, 11], - [12, 4053, 1, 12], - [12, 4054, 12, 2], - [12, 4055, 11, 3], - [12, 4056, 3, 10], - [12, 4057, 5, 9], - [12, 4058, 6, 7], - [12, 4059, 8, 7], - [12, 4060, 11, 4], - [12, 4061, 0, 10], - [12, 4062, 7, 6], - [12, 4063, 12, 3], - [12, 4064, 10, 0], - [12, 4065, 10, 5], - [12, 4066, 4, 10], - [12, 4067, 6, 8], - [12, 4068, 2, 12], - [12, 4069, 9, 6], - [12, 4070, 9, 7], - [12, 4071, 4, 11], - [12, 4072, 11, 0], - [12, 4073, 6, 9], - [12, 4074, 3, 11], - [12, 4075, 5, 10], - [13, 8152, 8, 8], - [13, 8153, 7, 8], - [13, 8154, 12, 5], - [13, 8155, 3, 12], - [13, 8156, 11, 5], - [13, 8157, 7, 7], - [13, 8158, 12, 4], - [13, 8159, 11, 6], - [13, 8160, 10, 6], - [13, 8161, 4, 12], - [13, 8162, 7, 9], - [13, 8163, 5, 11], - [13, 8164, 0, 11], - [13, 8165, 12, 6], - [13, 8166, 6, 10], - [13, 8167, 12, 0], - [13, 8168, 10, 7], - [13, 8169, 5, 12], - [13, 8170, 7, 10], - [13, 8171, 9, 8], - [13, 8172, 0, 12], - [13, 8173, 11, 7], - [13, 8174, 8, 9], - [13, 8175, 9, 9], - [13, 8176, 10, 8], - [13, 8177, 7, 11], - [13, 8178, 12, 7], - [13, 8179, 6, 11], - [13, 8180, 8, 11], - [13, 8181, 11, 8], - [13, 8182, 7, 12], - [13, 8183, 6, 12], - [14, 16368, 8, 10], - [14, 16369, 10, 9], - [14, 16370, 8, 12], - [14, 16371, 9, 10], - [14, 16372, 9, 11], - [14, 16373, 9, 12], - [14, 16374, 10, 11], - [14, 16375, 12, 9], - [14, 16376, 10, 10], - [14, 16377, 11, 9], - [14, 16378, 12, 8], - [14, 16379, 11, 10], - [14, 16380, 12, 10], - [14, 16381, 12, 11], - [15, 32764, 10, 12], - [15, 32765, 11, 11], - [15, 32766, 11, 12], - [15, 32767, 12, 12] -]; - -const HCB10 = [ - [4, 0, 1, 1], - [4, 1, 1, 2], - [4, 2, 2, 1], - [5, 6, 2, 2], - [5, 7, 1, 0], - [5, 8, 0, 1], - [5, 9, 1, 3], - [5, 10, 3, 2], - [5, 11, 3, 1], - [5, 12, 2, 3], - [5, 13, 3, 3], - [6, 28, 2, 0], - [6, 29, 0, 2], - [6, 30, 2, 4], - [6, 31, 4, 2], - [6, 32, 1, 4], - [6, 33, 4, 1], - [6, 34, 0, 0], - [6, 35, 4, 3], - [6, 36, 3, 4], - [6, 37, 3, 0], - [6, 38, 0, 3], - [6, 39, 4, 4], - [6, 40, 2, 5], - [6, 41, 5, 2], - [7, 84, 1, 5], - [7, 85, 5, 1], - [7, 86, 5, 3], - [7, 87, 3, 5], - [7, 88, 5, 4], - [7, 89, 4, 5], - [7, 90, 6, 2], - [7, 91, 2, 6], - [7, 92, 6, 3], - [7, 93, 4, 0], - [7, 94, 6, 1], - [7, 95, 0, 4], - [7, 96, 1, 6], - [7, 97, 3, 6], - [7, 98, 5, 5], - [7, 99, 6, 4], - [7, 100, 4, 6], - [8, 202, 6, 5], - [8, 203, 7, 2], - [8, 204, 3, 7], - [8, 205, 2, 7], - [8, 206, 5, 6], - [8, 207, 8, 2], - [8, 208, 7, 3], - [8, 209, 5, 0], - [8, 210, 7, 1], - [8, 211, 0, 5], - [8, 212, 8, 1], - [8, 213, 1, 7], - [8, 214, 8, 3], - [8, 215, 7, 4], - [8, 216, 4, 7], - [8, 217, 2, 8], - [8, 218, 6, 6], - [8, 219, 7, 5], - [8, 220, 1, 8], - [8, 221, 3, 8], - [8, 222, 8, 4], - [8, 223, 4, 8], - [8, 224, 5, 7], - [8, 225, 8, 5], - [8, 226, 5, 8], - [9, 454, 7, 6], - [9, 455, 6, 7], - [9, 456, 9, 2], - [9, 457, 6, 0], - [9, 458, 6, 8], - [9, 459, 9, 3], - [9, 460, 3, 9], - [9, 461, 9, 1], - [9, 462, 2, 9], - [9, 463, 0, 6], - [9, 464, 8, 6], - [9, 465, 9, 4], - [9, 466, 4, 9], - [9, 467, 10, 2], - [9, 468, 1, 9], - [9, 469, 7, 7], - [9, 470, 8, 7], - [9, 471, 9, 5], - [9, 472, 7, 8], - [9, 473, 10, 3], - [9, 474, 5, 9], - [9, 475, 10, 4], - [9, 476, 2, 10], - [9, 477, 10, 1], - [9, 478, 3, 10], - [9, 479, 9, 6], - [9, 480, 6, 9], - [9, 481, 8, 0], - [9, 482, 4, 10], - [9, 483, 7, 0], - [9, 484, 11, 2], - [10, 970, 7, 9], - [10, 971, 11, 3], - [10, 972, 10, 6], - [10, 973, 1, 10], - [10, 974, 11, 1], - [10, 975, 9, 7], - [10, 976, 0, 7], - [10, 977, 8, 8], - [10, 978, 10, 5], - [10, 979, 3, 11], - [10, 980, 5, 10], - [10, 981, 8, 9], - [10, 982, 11, 5], - [10, 983, 0, 8], - [10, 984, 11, 4], - [10, 985, 2, 11], - [10, 986, 7, 10], - [10, 987, 6, 10], - [10, 988, 10, 7], - [10, 989, 4, 11], - [10, 990, 1, 11], - [10, 991, 12, 2], - [10, 992, 9, 8], - [10, 993, 12, 3], - [10, 994, 11, 6], - [10, 995, 5, 11], - [10, 996, 12, 4], - [10, 997, 11, 7], - [10, 998, 12, 5], - [10, 999, 3, 12], - [10, 1000, 6, 11], - [10, 1001, 9, 0], - [10, 1002, 10, 8], - [10, 1003, 10, 0], - [10, 1004, 12, 1], - [10, 1005, 0, 9], - [10, 1006, 4, 12], - [10, 1007, 9, 9], - [10, 1008, 12, 6], - [10, 1009, 2, 12], - [10, 1010, 8, 10], - [11, 2022, 9, 10], - [11, 2023, 1, 12], - [11, 2024, 11, 8], - [11, 2025, 12, 7], - [11, 2026, 7, 11], - [11, 2027, 5, 12], - [11, 2028, 6, 12], - [11, 2029, 10, 9], - [11, 2030, 8, 11], - [11, 2031, 12, 8], - [11, 2032, 0, 10], - [11, 2033, 7, 12], - [11, 2034, 11, 0], - [11, 2035, 10, 10], - [11, 2036, 11, 9], - [11, 2037, 11, 10], - [11, 2038, 0, 11], - [11, 2039, 11, 11], - [11, 2040, 9, 11], - [11, 2041, 10, 11], - [11, 2042, 12, 0], - [11, 2043, 8, 12], - [12, 4088, 12, 9], - [12, 4089, 10, 12], - [12, 4090, 9, 12], - [12, 4091, 11, 12], - [12, 4092, 12, 11], - [12, 4093, 0, 12], - [12, 4094, 12, 10], - [12, 4095, 12, 12] -]; - -const HCB11 = [ - [4, 0, 0, 0], - [4, 1, 1, 1], - [5, 4, 16, 16], - [5, 5, 1, 0], - [5, 6, 0, 1], - [5, 7, 2, 1], - [5, 8, 1, 2], - [5, 9, 2, 2], - [6, 20, 1, 3], - [6, 21, 3, 1], - [6, 22, 3, 2], - [6, 23, 2, 0], - [6, 24, 2, 3], - [6, 25, 0, 2], - [6, 26, 3, 3], - [7, 54, 4, 1], - [7, 55, 1, 4], - [7, 56, 4, 2], - [7, 57, 2, 4], - [7, 58, 4, 3], - [7, 59, 3, 4], - [7, 60, 3, 0], - [7, 61, 0, 3], - [7, 62, 5, 1], - [7, 63, 5, 2], - [7, 64, 2, 5], - [7, 65, 4, 4], - [7, 66, 1, 5], - [7, 67, 5, 3], - [7, 68, 3, 5], - [7, 69, 5, 4], - [8, 140, 4, 5], - [8, 141, 6, 2], - [8, 142, 2, 6], - [8, 143, 6, 1], - [8, 144, 6, 3], - [8, 145, 3, 6], - [8, 146, 1, 6], - [8, 147, 4, 16], - [8, 148, 3, 16], - [8, 149, 16, 5], - [8, 150, 16, 3], - [8, 151, 16, 4], - [8, 152, 6, 4], - [8, 153, 16, 6], - [8, 154, 4, 0], - [8, 155, 4, 6], - [8, 156, 0, 4], - [8, 157, 2, 16], - [8, 158, 5, 5], - [8, 159, 5, 16], - [8, 160, 16, 7], - [8, 161, 16, 2], - [8, 162, 16, 8], - [8, 163, 2, 7], - [8, 164, 7, 2], - [8, 165, 3, 7], - [8, 166, 6, 5], - [8, 167, 5, 6], - [8, 168, 6, 16], - [8, 169, 16, 10], - [8, 170, 7, 3], - [8, 171, 7, 1], - [8, 172, 16, 9], - [8, 173, 7, 16], - [8, 174, 1, 16], - [8, 175, 1, 7], - [8, 176, 4, 7], - [8, 177, 16, 11], - [8, 178, 7, 4], - [8, 179, 16, 12], - [8, 180, 8, 16], - [8, 181, 16, 1], - [8, 182, 6, 6], - [8, 183, 9, 16], - [8, 184, 2, 8], - [8, 185, 5, 7], - [8, 186, 10, 16], - [8, 187, 16, 13], - [8, 188, 8, 3], - [8, 189, 8, 2], - [8, 190, 3, 8], - [8, 191, 5, 0], - [8, 192, 16, 14], - [8, 193, 11, 16], - [8, 194, 7, 5], - [8, 195, 4, 8], - [8, 196, 6, 7], - [8, 197, 7, 6], - [8, 198, 0, 5], - [9, 398, 8, 4], - [9, 399, 16, 15], - [9, 400, 12, 16], - [9, 401, 1, 8], - [9, 402, 8, 1], - [9, 403, 14, 16], - [9, 404, 5, 8], - [9, 405, 13, 16], - [9, 406, 3, 9], - [9, 407, 8, 5], - [9, 408, 7, 7], - [9, 409, 2, 9], - [9, 410, 8, 6], - [9, 411, 9, 2], - [9, 412, 9, 3], - [9, 413, 15, 16], - [9, 414, 4, 9], - [9, 415, 6, 8], - [9, 416, 6, 0], - [9, 417, 9, 4], - [9, 418, 5, 9], - [9, 419, 8, 7], - [9, 420, 7, 8], - [9, 421, 1, 9], - [9, 422, 10, 3], - [9, 423, 0, 6], - [9, 424, 10, 2], - [9, 425, 9, 1], - [9, 426, 9, 5], - [9, 427, 4, 10], - [9, 428, 2, 10], - [9, 429, 9, 6], - [9, 430, 3, 10], - [9, 431, 6, 9], - [9, 432, 10, 4], - [9, 433, 8, 8], - [9, 434, 10, 5], - [9, 435, 9, 7], - [9, 436, 11, 3], - [9, 437, 1, 10], - [9, 438, 7, 0], - [9, 439, 10, 6], - [9, 440, 7, 9], - [9, 441, 3, 11], - [9, 442, 5, 10], - [9, 443, 10, 1], - [9, 444, 4, 11], - [9, 445, 11, 2], - [9, 446, 13, 2], - [9, 447, 6, 10], - [9, 448, 13, 3], - [9, 449, 2, 11], - [9, 450, 16, 0], - [9, 451, 5, 11], - [9, 452, 11, 5], - [10, 906, 11, 4], - [10, 907, 9, 8], - [10, 908, 7, 10], - [10, 909, 8, 9], - [10, 910, 0, 16], - [10, 911, 4, 13], - [10, 912, 0, 7], - [10, 913, 3, 13], - [10, 914, 11, 6], - [10, 915, 13, 1], - [10, 916, 13, 4], - [10, 917, 12, 3], - [10, 918, 2, 13], - [10, 919, 13, 5], - [10, 920, 8, 10], - [10, 921, 6, 11], - [10, 922, 10, 8], - [10, 923, 10, 7], - [10, 924, 14, 2], - [10, 925, 12, 4], - [10, 926, 1, 11], - [10, 927, 4, 12], - [10, 928, 11, 1], - [10, 929, 3, 12], - [10, 930, 1, 13], - [10, 931, 12, 2], - [10, 932, 7, 11], - [10, 933, 3, 14], - [10, 934, 5, 12], - [10, 935, 5, 13], - [10, 936, 14, 4], - [10, 937, 4, 14], - [10, 938, 11, 7], - [10, 939, 14, 3], - [10, 940, 12, 5], - [10, 941, 13, 6], - [10, 942, 12, 6], - [10, 943, 8, 0], - [10, 944, 11, 8], - [10, 945, 2, 12], - [10, 946, 9, 9], - [10, 947, 14, 5], - [10, 948, 6, 13], - [10, 949, 10, 10], - [10, 950, 15, 2], - [10, 951, 8, 11], - [10, 952, 9, 10], - [10, 953, 14, 6], - [10, 954, 10, 9], - [10, 955, 5, 14], - [10, 956, 11, 9], - [10, 957, 14, 1], - [10, 958, 2, 14], - [10, 959, 6, 12], - [10, 960, 1, 12], - [10, 961, 13, 8], - [10, 962, 0, 8], - [10, 963, 13, 7], - [10, 964, 7, 12], - [10, 965, 12, 7], - [10, 966, 7, 13], - [10, 967, 15, 3], - [10, 968, 12, 1], - [10, 969, 6, 14], - [10, 970, 2, 15], - [10, 971, 15, 5], - [10, 972, 15, 4], - [10, 973, 1, 14], - [10, 974, 9, 11], - [10, 975, 4, 15], - [10, 976, 14, 7], - [10, 977, 8, 13], - [10, 978, 13, 9], - [10, 979, 8, 12], - [10, 980, 5, 15], - [10, 981, 3, 15], - [10, 982, 10, 11], - [10, 983, 11, 10], - [10, 984, 12, 8], - [10, 985, 15, 6], - [10, 986, 15, 7], - [10, 987, 8, 14], - [10, 988, 15, 1], - [10, 989, 7, 14], - [10, 990, 9, 0], - [10, 991, 0, 9], - [10, 992, 9, 13], - [10, 993, 9, 12], - [10, 994, 12, 9], - [10, 995, 14, 8], - [10, 996, 10, 13], - [10, 997, 14, 9], - [10, 998, 12, 10], - [10, 999, 6, 15], - [10, 1000, 7, 15], - [11, 2002, 9, 14], - [11, 2003, 15, 8], - [11, 2004, 11, 11], - [11, 2005, 11, 14], - [11, 2006, 1, 15], - [11, 2007, 10, 12], - [11, 2008, 10, 14], - [11, 2009, 13, 11], - [11, 2010, 13, 10], - [11, 2011, 11, 13], - [11, 2012, 11, 12], - [11, 2013, 8, 15], - [11, 2014, 14, 11], - [11, 2015, 13, 12], - [11, 2016, 12, 13], - [11, 2017, 15, 9], - [11, 2018, 14, 10], - [11, 2019, 10, 0], - [11, 2020, 12, 11], - [11, 2021, 9, 15], - [11, 2022, 0, 10], - [11, 2023, 12, 12], - [11, 2024, 11, 0], - [11, 2025, 12, 14], - [11, 2026, 10, 15], - [11, 2027, 13, 13], - [11, 2028, 0, 13], - [11, 2029, 14, 12], - [11, 2030, 15, 10], - [11, 2031, 15, 11], - [11, 2032, 11, 15], - [11, 2033, 14, 13], - [11, 2034, 13, 0], - [11, 2035, 0, 11], - [11, 2036, 13, 14], - [11, 2037, 15, 12], - [11, 2038, 15, 13], - [11, 2039, 12, 15], - [11, 2040, 14, 0], - [11, 2041, 14, 14], - [11, 2042, 13, 15], - [11, 2043, 12, 0], - [11, 2044, 14, 15], - [12, 4090, 0, 14], - [12, 4091, 0, 12], - [12, 4092, 15, 14], - [12, 4093, 15, 0], - [12, 4094, 0, 15], - [12, 4095, 15, 15] -]; - -const HCB_SF = [ - [1, 0, 60], - [3, 4, 59], - [4, 10, 61], - [4, 11, 58], - [4, 12, 62], - [5, 26, 57], - [5, 27, 63], - [6, 56, 56], - [6, 57, 64], - [6, 58, 55], - [6, 59, 65], - [7, 120, 66], - [7, 121, 54], - [7, 122, 67], - [8, 246, 53], - [8, 247, 68], - [8, 248, 52], - [8, 249, 69], - [8, 250, 51], - [9, 502, 70], - [9, 503, 50], - [9, 504, 49], - [9, 505, 71], - [10, 1012, 72], - [10, 1013, 48], - [10, 1014, 73], - [10, 1015, 47], - [10, 1016, 74], - [10, 1017, 46], - [11, 2036, 76], - [11, 2037, 75], - [11, 2038, 77], - [11, 2039, 78], - [11, 2040, 45], - [11, 2041, 43], - [12, 4084, 44], - [12, 4085, 79], - [12, 4086, 42], - [12, 4087, 41], - [12, 4088, 80], - [12, 4089, 40], - [13, 8180, 81], - [13, 8181, 39], - [13, 8182, 82], - [13, 8183, 38], - [13, 8184, 83], - [14, 16370, 37], - [14, 16371, 35], - [14, 16372, 85], - [14, 16373, 33], - [14, 16374, 36], - [14, 16375, 34], - [14, 16376, 84], - [14, 16377, 32], - [15, 32756, 87], - [15, 32757, 89], - [15, 32758, 30], - [15, 32759, 31], - [16, 65520, 86], - [16, 65521, 29], - [16, 65522, 26], - [16, 65523, 27], - [16, 65524, 28], - [16, 65525, 24], - [16, 65526, 88], - [17, 131054, 25], - [17, 131055, 22], - [17, 131056, 23], - [18, 262114, 90], - [18, 262115, 21], - [18, 262116, 19], - [18, 262117, 3], - [18, 262118, 1], - [18, 262119, 2], - [18, 262120, 0], - [19, 524242, 98], - [19, 524243, 99], - [19, 524244, 100], - [19, 524245, 101], - [19, 524246, 102], - [19, 524247, 117], - [19, 524248, 97], - [19, 524249, 91], - [19, 524250, 92], - [19, 524251, 93], - [19, 524252, 94], - [19, 524253, 95], - [19, 524254, 96], - [19, 524255, 104], - [19, 524256, 111], - [19, 524257, 112], - [19, 524258, 113], - [19, 524259, 114], - [19, 524260, 115], - [19, 524261, 116], - [19, 524262, 110], - [19, 524263, 105], - [19, 524264, 106], - [19, 524265, 107], - [19, 524266, 108], - [19, 524267, 109], - [19, 524268, 118], - [19, 524269, 6], - [19, 524270, 8], - [19, 524271, 9], - [19, 524272, 10], - [19, 524273, 5], - [19, 524274, 103], - [19, 524275, 120], - [19, 524276, 119], - [19, 524277, 4], - [19, 524278, 7], - [19, 524279, 15], - [19, 524280, 16], - [19, 524281, 18], - [19, 524282, 20], - [19, 524283, 17], - [19, 524284, 11], - [19, 524285, 12], - [19, 524286, 14], - [19, 524287, 13] -]; - -const CODEBOOKS = [HCB1, HCB2, HCB3, HCB4, HCB5, HCB6, HCB7, HCB8, HCB9, HCB10, HCB11]; -const UNSIGNED = [false, false, true, true, false, false, true, true, true, true, true], - QUAD_LEN = 4, - PAIR_LEN = 2; - -var Huffman = { - findOffset: function(stream, table) { - var off = 0, - len = table[off][0], - cw = stream.read(len); - - while (cw !== table[off][1]) { - var j = table[++off][0] - len; - len = table[off][0]; - cw <<= j; - cw |= stream.read(j); - } - - return off; - }, - - signValues: function(stream, data, off, len) { - for (var i = off; i < off + len; i++) { - if (data[i] && stream.read(1)) - data[i] = -data[i]; - } - }, - - getEscape: function(stream, s) { - var i = 4; - while (stream.read(1)) - i++; - - var j = stream.read(i) | (1 << i); - return s < 0 ? -j : j; - }, - - decodeScaleFactor: function(stream) { - var offset = this.findOffset(stream, HCB_SF); - return HCB_SF[offset][2]; - }, - - decodeSpectralData: function(stream, cb, data, off) { - var HCB = CODEBOOKS[cb - 1], - offset = this.findOffset(stream, HCB); - - data[off] = HCB[offset][2]; - data[off + 1] = HCB[offset][3]; - - if (cb < 5) { - data[off + 2] = HCB[offset][4]; - data[off + 3] = HCB[offset][5]; - } - - // sign and escape - if (cb < 11) { - if (UNSIGNED[cb - 1]) - this.signValues(stream, data, off, cb < 5 ? QUAD_LEN : PAIR_LEN); - - } else if (cb === 11 || cb > 15) { - this.signValues(stream, data, off, cb < 5 ? QUAD_LEN : PAIR_LEN); - - if (Math.abs(data[off]) === 16) - data[off] = this.getEscape(stream, data[off]); - - if (Math.abs(data[off + 1]) === 16) - data[off + 1] = this.getEscape(stream, data[off + 1]); - } else { - throw new Error("Huffman: unknown spectral codebook: " + cb); - } - } -}; - -module.exports = Huffman; - -},{}],8:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -var tables = require('./tables'); -var Huffman = require('./huffman'); -var TNS = require('./tns'); - -// Individual Channel Stream -function ICStream(config) { - this.info = new ICSInfo(); - this.bandTypes = new Int32Array(MAX_SECTIONS); - this.sectEnd = new Int32Array(MAX_SECTIONS); - this.data = new Float32Array(config.frameLength); - this.scaleFactors = new Float32Array(MAX_SECTIONS); - this.randomState = 0x1F2E3D4C; - this.tns = new TNS(config); - this.specBuf = new Int32Array(4); -} - -ICStream.ZERO_BT = 0; // Scalefactors and spectral data are all zero. -ICStream.FIRST_PAIR_BT = 5; // This and later band types encode two values (rather than four) with one code word. -ICStream.ESC_BT = 11; // Spectral data are coded with an escape sequence. -ICStream.NOISE_BT = 13; // Spectral data are scaled white noise not coded in the bitstream. -ICStream.INTENSITY_BT2 = 14; // Scalefactor data are intensity stereo positions. -ICStream.INTENSITY_BT = 15; // Scalefactor data are intensity stereo positions. - -ICStream.ONLY_LONG_SEQUENCE = 0; -ICStream.LONG_START_SEQUENCE = 1; -ICStream.EIGHT_SHORT_SEQUENCE = 2; -ICStream.LONG_STOP_SEQUENCE = 3; - -const MAX_SECTIONS = 120, - MAX_WINDOW_GROUP_COUNT = 8; - -const SF_DELTA = 60, - SF_OFFSET = 200; - -ICStream.prototype = { - decode: function(stream, config, commonWindow) { - this.globalGain = stream.read(8); - - if (!commonWindow) - this.info.decode(stream, config, commonWindow); - - this.decodeBandTypes(stream, config); - this.decodeScaleFactors(stream); - - if (this.pulsePresent = stream.read(1)) { - if (this.info.windowSequence === ICStream.EIGHT_SHORT_SEQUENCE) - throw new Error("Pulse tool not allowed in eight short sequence."); - - this.decodePulseData(stream); - } - - if (this.tnsPresent = stream.read(1)) { - this.tns.decode(stream, this.info); - } - - if (this.gainPresent = stream.read(1)) { - throw new Error("TODO: decode gain control/SSR"); - } - - this.decodeSpectralData(stream); - }, - - decodeBandTypes: function(stream, config) { - var bits = this.info.windowSequence === ICStream.EIGHT_SHORT_SEQUENCE ? 3 : 5, - groupCount = this.info.groupCount, - maxSFB = this.info.maxSFB, - bandTypes = this.bandTypes, - sectEnd = this.sectEnd, - idx = 0, - escape = (1 << bits) - 1; - - for (var g = 0; g < groupCount; g++) { - var k = 0; - while (k < maxSFB) { - var end = k, - bandType = stream.read(4); - - if (bandType === 12) - throw new Error("Invalid band type: 12"); - - var incr; - while ((incr = stream.read(bits)) === escape) - end += incr; - - end += incr; - - if (end > maxSFB) - throw new Error("Too many bands (" + end + " > " + maxSFB + ")"); - - for (; k < end; k++) { - bandTypes[idx] = bandType; - sectEnd[idx++] = end; - } - } - } - }, - - decodeScaleFactors: function(stream) { - var groupCount = this.info.groupCount, - maxSFB = this.info.maxSFB, - offset = [this.globalGain, this.globalGain - 90, 0], // spectrum, noise, intensity - idx = 0, - noiseFlag = true, - scaleFactors = this.scaleFactors, - sectEnd = this.sectEnd, - bandTypes = this.bandTypes; - - for (var g = 0; g < groupCount; g++) { - for (var i = 0; i < maxSFB;) { - var runEnd = sectEnd[idx]; - - switch (bandTypes[idx]) { - case ICStream.ZERO_BT: - for (; i < runEnd; i++, idx++) { - scaleFactors[idx] = 0; - } - break; - - case ICStream.INTENSITY_BT: - case ICStream.INTENSITY_BT2: - for(; i < runEnd; i++, idx++) { - offset[2] += Huffman.decodeScaleFactor(stream) - SF_DELTA; - var tmp = Math.min(Math.max(offset[2], -155), 100); - scaleFactors[idx] = tables.SCALEFACTOR_TABLE[-tmp + SF_OFFSET]; - } - break; - - case ICStream.NOISE_BT: - for(; i < runEnd; i++, idx++) { - if (noiseFlag) { - offset[1] += stream.read(9) - 256; - noiseFlag = false; - } else { - offset[1] += Huffman.decodeScaleFactor(stream) - SF_DELTA; - } - var tmp = Math.min(Math.max(offset[1], -100), 155); - scaleFactors[idx] = -tables.SCALEFACTOR_TABLE[tmp + SF_OFFSET]; - } - break; - - default: - for(; i < runEnd; i++, idx++) { - offset[0] += Huffman.decodeScaleFactor(stream) - SF_DELTA; - if(offset[0] > 255) - throw new Error("Scalefactor out of range: " + offset[0]); - - scaleFactors[idx] = tables.SCALEFACTOR_TABLE[offset[0] - 100 + SF_OFFSET]; - } - break; - } - } - } - }, - - decodePulseData: function(stream) { - var pulseCount = stream.read(2) + 1, - pulseSWB = stream.read(6); - - if (pulseSWB >= this.info.swbCount) - throw new Error("Pulse SWB out of range: " + pulseSWB); - - if (!this.pulseOffset || this.pulseOffset.length !== pulseCount) { - // only reallocate if needed - this.pulseOffset = new Int32Array(pulseCount); - this.pulseAmp = new Int32Array(pulseCount); - } - - this.pulseOffset[0] = this.info.swbOffsets[pulseSWB] + stream.read(5); - this.pulseAmp[0] = stream.read(4); - - if (this.pulseOffset[0] > 1023) - throw new Error("Pulse offset out of range: " + this.pulseOffset[0]); - - for (var i = 1; i < pulseCount; i++) { - this.pulseOffset[i] = stream.read(5) + this.pulseOffset[i - 1]; - if (this.pulseOffset[i] > 1023) - throw new Error("Pulse offset out of range: " + this.pulseOffset[i]); - - this.pulseAmp[i] = stream.read(4); - } - }, - - decodeSpectralData: function(stream) { - var data = this.data, - info = this.info, - maxSFB = info.maxSFB, - windowGroups = info.groupCount, - offsets = info.swbOffsets, - bandTypes = this.bandTypes, - scaleFactors = this.scaleFactors, - buf = this.specBuf; - - var groupOff = 0, idx = 0; - for (var g = 0; g < windowGroups; g++) { - var groupLen = info.groupLength[g]; - - for (var sfb = 0; sfb < maxSFB; sfb++, idx++) { - var hcb = bandTypes[idx], - off = groupOff + offsets[sfb], - width = offsets[sfb + 1] - offsets[sfb]; - - if (hcb === ICStream.ZERO_BT || hcb === ICStream.INTENSITY_BT || hcb === ICStream.INTENSITY_BT2) { - for (var group = 0; group < groupLen; group++, off += 128) { - for (var i = off; i < off + width; i++) { - data[i] = 0; - } - } - } else if (hcb === ICStream.NOISE_BT) { - // fill with random values - for (var group = 0; group < groupLen; group++, off += 128) { - var energy = 0; - - for (var k = 0; k < width; k++) { - this.randomState *= 1664525 + 1013904223; - data[off + k] = this.randomState; - energy += data[off + k] * data[off + k]; - } - - var scale = scaleFactors[idx] / Math.sqrt(energy); - for (var k = 0; k < width; k++) { - data[off + k] *= scale; - } - } - } else { - for (var group = 0; group < groupLen; group++, off += 128) { - var num = (hcb >= ICStream.FIRST_PAIR_BT) ? 2 : 4; - for (var k = 0; k < width; k += num) { - Huffman.decodeSpectralData(stream, hcb, buf, 0); - - // inverse quantization & scaling - for (var j = 0; j < num; j++) { - data[off + k + j] = (buf[j] > 0) ? tables.IQ_TABLE[buf[j]] : -tables.IQ_TABLE[-buf[j]]; - data[off + k + j] *= scaleFactors[idx]; - } - } - } - } - } - groupOff += groupLen << 7; - } - - // add pulse data, if present - if (this.pulsePresent) { - throw new Error('TODO: add pulse data'); - } - } -} - -// Individual Channel Stream Info -function ICSInfo() { - this.windowShape = new Int32Array(2); - this.windowSequence = ICStream.ONLY_LONG_SEQUENCE; - this.groupLength = new Int32Array(MAX_WINDOW_GROUP_COUNT); - this.ltpData1Present = false; - this.ltpData2Present = false; -} - -ICSInfo.prototype = { - decode: function(stream, config, commonWindow) { - stream.advance(1); // reserved - - this.windowSequence = stream.read(2); - this.windowShape[0] = this.windowShape[1]; - this.windowShape[1] = stream.read(1); - - this.groupCount = 1; - this.groupLength[0] = 1; - - if (this.windowSequence === ICStream.EIGHT_SHORT_SEQUENCE) { - this.maxSFB = stream.read(4); - for (var i = 0; i < 7; i++) { - if (stream.read(1)) { - this.groupLength[this.groupCount - 1]++; - } else { - this.groupCount++; - this.groupLength[this.groupCount - 1] = 1; - } - } - - this.windowCount = 8; - this.swbOffsets = tables.SWB_OFFSET_128[config.sampleIndex]; - this.swbCount = tables.SWB_SHORT_WINDOW_COUNT[config.sampleIndex]; - this.predictorPresent = false; - } else { - this.maxSFB = stream.read(6); - this.windowCount = 1; - this.swbOffsets = tables.SWB_OFFSET_1024[config.sampleIndex]; - this.swbCount = tables.SWB_LONG_WINDOW_COUNT[config.sampleIndex]; - this.predictorPresent = !!stream.read(1); - - if (this.predictorPresent) - this.decodePrediction(stream, config, commonWindow); - } - }, - - decodePrediction: function(stream, config, commonWindow) { - throw new Error('Prediction not implemented.'); - - switch (config.profile) { - case AOT_AAC_MAIN: - throw new Error('Prediction not implemented.'); - break; - - case AOT_AAC_LTP: - throw new Error('LTP prediction not implemented.'); - break; - - default: - throw new Error('Unsupported profile for prediction ' + config.profile); - } - } -}; - -module.exports = ICStream; - -},{"./huffman":7,"./tables":11,"./tns":12}],9:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -var tables = require('./mdct_tables'); -var FFT = require('./fft'); - -// Modified Discrete Cosine Transform -function MDCT(length) { - this.N = length; - this.N2 = length >>> 1; - this.N4 = length >>> 2; - this.N8 = length >>> 3; - - switch (length) { - case 2048: - this.sincos = tables.MDCT_TABLE_2048; - break; - - case 256: - this.sincos = tables.MDCT_TABLE_256; - break; - - case 1920: - this.sincos = tables.MDCT_TABLE_1920; - break; - - case 240: - this.sincos = tables.MDCT_TABLE_240; - break; - - default: - throw new Error("unsupported MDCT length: " + length); - } - - this.fft = new FFT(this.N4); - - this.buf = new Array(this.N4); - for (var i = 0; i < this.N4; i++) { - this.buf[i] = new Float32Array(2); - } - - this.tmp = new Float32Array(2); -} - -MDCT.prototype.process = function(input, inOffset, output, outOffset) { - // local access - var N2 = this.N2, - N4 = this.N4, - N8 = this.N8, - buf = this.buf, - tmp = this.tmp, - sincos = this.sincos, - fft = this.fft; - - // pre-IFFT complex multiplication - for (var k = 0; k < N4; k++) { - buf[k][1] = (input[inOffset + 2 * k] * sincos[k][0]) + (input[inOffset + N2 - 1 - 2 * k] * sincos[k][1]); - buf[k][0] = (input[inOffset + N2 - 1 - 2 * k] * sincos[k][0]) - (input[inOffset + 2 * k] * sincos[k][1]); - } - - // complex IFFT, non-scaling - fft.process(buf, false); - - // post-IFFT complex multiplication - for (var k = 0; k < N4; k++) { - tmp[0] = buf[k][0]; - tmp[1] = buf[k][1]; - buf[k][1] = (tmp[1] * sincos[k][0]) + (tmp[0] * sincos[k][1]); - buf[k][0] = (tmp[0] * sincos[k][0]) - (tmp[1] * sincos[k][1]); - } - - // reordering - for (var k = 0; k < N8; k += 2) { - output[outOffset + 2 * k] = buf[N8 + k][1]; - output[outOffset + 2 + 2 * k] = buf[N8 + 1 + k][1]; - - output[outOffset + 1 + 2 * k] = -buf[N8 - 1 - k][0]; - output[outOffset + 3 + 2 * k] = -buf[N8 - 2 - k][0]; - - output[outOffset + N4 + 2 * k] = buf[k][0]; - output[outOffset + N4 + 2 + 2 * k] = buf[1 + k][0]; - - output[outOffset + N4 + 1 + 2 * k] = -buf[N4 - 1 - k][1]; - output[outOffset + N4 + 3 + 2 * k] = -buf[N4 - 2 - k][1]; - - output[outOffset + N2 + 2 * k] = buf[N8 + k][0]; - output[outOffset + N2 + 2 + 2 * k] = buf[N8 + 1 + k][0]; - - output[outOffset + N2 + 1 + 2 * k] = -buf[N8 - 1 - k][1]; - output[outOffset + N2 + 3 + 2 * k] = -buf[N8 - 2 - k][1]; - - output[outOffset + N2 + N4 + 2 * k] = -buf[k][1]; - output[outOffset + N2 + N4 + 2 + 2 * k] = -buf[1 + k][1]; - - output[outOffset + N2 + N4 + 1 + 2 * k] = buf[N4 - 1 - k][0]; - output[outOffset + N2 + N4 + 3 + 2 * k] = buf[N4 - 2 - k][0]; - } -}; - -module.exports = MDCT; - -},{"./fft":5,"./mdct_tables":10}],10:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -exports.MDCT_TABLE_2048 = [ - [0.031249997702054, 0.000011984224612], - [0.031249813866531, 0.000107857810004], - [0.031249335895858, 0.000203730380198], - [0.031248563794535, 0.000299601032804], - [0.031247497569829, 0.000395468865451], - [0.031246137231775, 0.000491332975794], - [0.031244482793177, 0.000587192461525], - [0.031242534269608, 0.000683046420376], - [0.031240291679407, 0.000778893950134], - [0.031237755043684, 0.000874734148645], - [0.031234924386313, 0.000970566113826], - [0.031231799733938, 0.001066388943669], - [0.031228381115970, 0.001162201736253], - [0.031224668564585, 0.001258003589751], - [0.031220662114728, 0.001353793602441], - [0.031216361804108, 0.001449570872710], - [0.031211767673203, 0.001545334499065], - [0.031206879765253, 0.001641083580144], - [0.031201698126266, 0.001736817214719], - [0.031196222805014, 0.001832534501709], - [0.031190453853031, 0.001928234540186], - [0.031184391324617, 0.002023916429386], - [0.031178035276836, 0.002119579268713], - [0.031171385769513, 0.002215222157753], - [0.031164442865236, 0.002310844196278], - [0.031157206629353, 0.002406444484258], - [0.031149677129975, 0.002502022121865], - [0.031141854437973, 0.002597576209488], - [0.031133738626977, 0.002693105847734], - [0.031125329773375, 0.002788610137442], - [0.031116627956316, 0.002884088179689], - [0.031107633257703, 0.002979539075801], - [0.031098345762200, 0.003074961927355], - [0.031088765557222, 0.003170355836197], - [0.031078892732942, 0.003265719904442], - [0.031068727382288, 0.003361053234488], - [0.031058269600939, 0.003456354929021], - [0.031047519487329, 0.003551624091024], - [0.031036477142640, 0.003646859823790], - [0.031025142670809, 0.003742061230921], - [0.031013516178519, 0.003837227416347], - [0.031001597775203, 0.003932357484328], - [0.030989387573042, 0.004027450539462], - [0.030976885686963, 0.004122505686697], - [0.030964092234638, 0.004217522031340], - [0.030951007336485, 0.004312498679058], - [0.030937631115663, 0.004407434735897], - [0.030923963698074, 0.004502329308281], - [0.030910005212362, 0.004597181503027], - [0.030895755789908, 0.004691990427350], - [0.030881215564835, 0.004786755188872], - [0.030866384674000, 0.004881474895632], - [0.030851263256996, 0.004976148656090], - [0.030835851456154, 0.005070775579142], - [0.030820149416533, 0.005165354774124], - [0.030804157285929, 0.005259885350819], - [0.030787875214864, 0.005354366419469], - [0.030771303356593, 0.005448797090784], - [0.030754441867095, 0.005543176475946], - [0.030737290905077, 0.005637503686619], - [0.030719850631972, 0.005731777834961], - [0.030702121211932, 0.005825998033626], - [0.030684102811835, 0.005920163395780], - [0.030665795601276, 0.006014273035101], - [0.030647199752570, 0.006108326065793], - [0.030628315440748, 0.006202321602594], - [0.030609142843557, 0.006296258760782], - [0.030589682141455, 0.006390136656185], - [0.030569933517616, 0.006483954405188], - [0.030549897157919, 0.006577711124743], - [0.030529573250956, 0.006671405932375], - [0.030508961988022, 0.006765037946194], - [0.030488063563118, 0.006858606284900], - [0.030466878172949, 0.006952110067791], - [0.030445406016919, 0.007045548414774], - [0.030423647297133, 0.007138920446372], - [0.030401602218392, 0.007232225283733], - [0.030379270988192, 0.007325462048634], - [0.030356653816724, 0.007418629863497], - [0.030333750916869, 0.007511727851390], - [0.030310562504198, 0.007604755136040], - [0.030287088796968, 0.007697710841838], - [0.030263330016124, 0.007790594093851], - [0.030239286385293, 0.007883404017824], - [0.030214958130781, 0.007976139740197], - [0.030190345481576, 0.008068800388104], - [0.030165448669342, 0.008161385089390], - [0.030140267928416, 0.008253892972610], - [0.030114803495809, 0.008346323167047], - [0.030089055611203, 0.008438674802711], - [0.030063024516947, 0.008530947010354], - [0.030036710458054, 0.008623138921475], - [0.030010113682202, 0.008715249668328], - [0.029983234439732, 0.008807278383932], - [0.029956072983640, 0.008899224202078], - [0.029928629569580, 0.008991086257336], - [0.029900904455860, 0.009082863685067], - [0.029872897903441, 0.009174555621425], - [0.029844610175929, 0.009266161203371], - [0.029816041539579, 0.009357679568679], - [0.029787192263292, 0.009449109855944], - [0.029758062618606, 0.009540451204587], - [0.029728652879702, 0.009631702754871], - [0.029698963323395, 0.009722863647900], - [0.029668994229134, 0.009813933025633], - [0.029638745879000, 0.009904910030891], - [0.029608218557702, 0.009995793807363], - [0.029577412552575, 0.010086583499618], - [0.029546328153577, 0.010177278253107], - [0.029514965653285, 0.010267877214177], - [0.029483325346896, 0.010358379530076], - [0.029451407532220, 0.010448784348962], - [0.029419212509679, 0.010539090819911], - [0.029386740582307, 0.010629298092923], - [0.029353992055740, 0.010719405318933], - [0.029320967238220, 0.010809411649818], - [0.029287666440590, 0.010899316238403], - [0.029254089976290, 0.010989118238474], - [0.029220238161353, 0.011078816804778], - [0.029186111314406, 0.011168411093039], - [0.029151709756664, 0.011257900259961], - [0.029117033811927, 0.011347283463239], - [0.029082083806579, 0.011436559861563], - [0.029046860069582, 0.011525728614630], - [0.029011362932476, 0.011614788883150], - [0.028975592729373, 0.011703739828853], - [0.028939549796957, 0.011792580614500], - [0.028903234474475, 0.011881310403886], - [0.028866647103744, 0.011969928361855], - [0.028829788029135, 0.012058433654299], - [0.028792657597583, 0.012146825448172], - [0.028755256158571, 0.012235102911499], - [0.028717584064137, 0.012323265213377], - [0.028679641668864, 0.012411311523990], - [0.028641429329882, 0.012499241014612], - [0.028602947406859, 0.012587052857618], - [0.028564196262001, 0.012674746226488], - [0.028525176260050, 0.012762320295819], - [0.028485887768276, 0.012849774241331], - [0.028446331156478, 0.012937107239875], - [0.028406506796976, 0.013024318469437], - [0.028366415064615, 0.013111407109155], - [0.028326056336751, 0.013198372339315], - [0.028285430993258, 0.013285213341368], - [0.028244539416515, 0.013371929297933], - [0.028203381991411, 0.013458519392807], - [0.028161959105334, 0.013544982810971], - [0.028120271148172, 0.013631318738598], - [0.028078318512309, 0.013717526363062], - [0.028036101592619, 0.013803604872943], - [0.027993620786463, 0.013889553458039], - [0.027950876493687, 0.013975371309367], - [0.027907869116616, 0.014061057619178], - [0.027864599060052, 0.014146611580959], - [0.027821066731270, 0.014232032389445], - [0.027777272540012, 0.014317319240622], - [0.027733216898487, 0.014402471331737], - [0.027688900221361, 0.014487487861307], - [0.027644322925762, 0.014572368029123], - [0.027599485431266, 0.014657111036262], - [0.027554388159903, 0.014741716085090], - [0.027509031536144, 0.014826182379271], - [0.027463415986904, 0.014910509123778], - [0.027417541941533, 0.014994695524894], - [0.027371409831816, 0.015078740790225], - [0.027325020091965, 0.015162644128704], - [0.027278373158618, 0.015246404750603], - [0.027231469470833, 0.015330021867534], - [0.027184309470088, 0.015413494692460], - [0.027136893600268, 0.015496822439704], - [0.027089222307671, 0.015580004324954], - [0.027041296040997, 0.015663039565269], - [0.026993115251345, 0.015745927379091], - [0.026944680392213, 0.015828666986247], - [0.026895991919487, 0.015911257607961], - [0.026847050291442, 0.015993698466859], - [0.026797855968734, 0.016075988786976], - [0.026748409414401, 0.016158127793763], - [0.026698711093851, 0.016240114714099], - [0.026648761474864, 0.016321948776289], - [0.026598561027585, 0.016403629210082], - [0.026548110224519, 0.016485155246669], - [0.026497409540530, 0.016566526118696], - [0.026446459452830, 0.016647741060271], - [0.026395260440982, 0.016728799306966], - [0.026343812986890, 0.016809700095831], - [0.026292117574797, 0.016890442665397], - [0.026240174691280, 0.016971026255683], - [0.026187984825246, 0.017051450108208], - [0.026135548467924, 0.017131713465990], - [0.026082866112867, 0.017211815573560], - [0.026029938255941, 0.017291755676967], - [0.025976765395322, 0.017371533023784], - [0.025923348031494, 0.017451146863116], - [0.025869686667242, 0.017530596445607], - [0.025815781807646, 0.017609881023449], - [0.025761633960080, 0.017688999850383], - [0.025707243634204, 0.017767952181715], - [0.025652611341960, 0.017846737274313], - [0.025597737597568, 0.017925354386623], - [0.025542622917522, 0.018003802778671], - [0.025487267820581, 0.018082081712071], - [0.025431672827768, 0.018160190450031], - [0.025375838462365, 0.018238128257362], - [0.025319765249906, 0.018315894400484], - [0.025263453718173, 0.018393488147432], - [0.025206904397193, 0.018470908767865], - [0.025150117819228, 0.018548155533070], - [0.025093094518776, 0.018625227715971], - [0.025035835032562, 0.018702124591135], - [0.024978339899534, 0.018778845434780], - [0.024920609660858, 0.018855389524780], - [0.024862644859912, 0.018931756140672], - [0.024804446042284, 0.019007944563666], - [0.024746013755764, 0.019083954076646], - [0.024687348550337, 0.019159783964183], - [0.024628450978184, 0.019235433512536], - [0.024569321593670, 0.019310902009663], - [0.024509960953345, 0.019386188745225], - [0.024450369615932, 0.019461293010596], - [0.024390548142329, 0.019536214098866], - [0.024330497095598, 0.019610951304848], - [0.024270217040961, 0.019685503925087], - [0.024209708545799, 0.019759871257867], - [0.024148972179639, 0.019834052603212], - [0.024088008514157, 0.019908047262901], - [0.024026818123164, 0.019981854540467], - [0.023965401582609, 0.020055473741208], - [0.023903759470567, 0.020128904172192], - [0.023841892367236, 0.020202145142264], - [0.023779800854935, 0.020275195962052], - [0.023717485518092, 0.020348055943974], - [0.023654946943242, 0.020420724402244], - [0.023592185719023, 0.020493200652878], - [0.023529202436167, 0.020565484013703], - [0.023465997687496, 0.020637573804361], - [0.023402572067918, 0.020709469346314], - [0.023338926174419, 0.020781169962854], - [0.023275060606058, 0.020852674979108], - [0.023210975963963, 0.020923983722044], - [0.023146672851322, 0.020995095520475], - [0.023082151873380, 0.021066009705072], - [0.023017413637435, 0.021136725608363], - [0.022952458752826, 0.021207242564742], - [0.022887287830934, 0.021277559910478], - [0.022821901485173, 0.021347676983716], - [0.022756300330983, 0.021417593124488], - [0.022690484985827, 0.021487307674717], - [0.022624456069185, 0.021556819978223], - [0.022558214202547, 0.021626129380729], - [0.022491760009405, 0.021695235229869], - [0.022425094115252, 0.021764136875192], - [0.022358217147572, 0.021832833668171], - [0.022291129735838, 0.021901324962204], - [0.022223832511501, 0.021969610112625], - [0.022156326107988, 0.022037688476709], - [0.022088611160696, 0.022105559413676], - [0.022020688306983, 0.022173222284699], - [0.021952558186166, 0.022240676452909], - [0.021884221439510, 0.022307921283403], - [0.021815678710228, 0.022374956143245], - [0.021746930643469, 0.022441780401478], - [0.021677977886316, 0.022508393429127], - [0.021608821087780, 0.022574794599206], - [0.021539460898790, 0.022640983286719], - [0.021469897972190, 0.022706958868676], - [0.021400132962735, 0.022772720724087], - [0.021330166527077, 0.022838268233979], - [0.021259999323769, 0.022903600781391], - [0.021189632013250, 0.022968717751391], - [0.021119065257845, 0.023033618531071], - [0.021048299721754, 0.023098302509561], - [0.020977336071050, 0.023162769078031], - [0.020906174973670, 0.023227017629698], - [0.020834817099409, 0.023291047559828], - [0.020763263119915, 0.023354858265748], - [0.020691513708680, 0.023418449146848], - [0.020619569541038, 0.023481819604585], - [0.020547431294155, 0.023544969042494], - [0.020475099647023, 0.023607896866186], - [0.020402575280455, 0.023670602483363], - [0.020329858877078, 0.023733085303813], - [0.020256951121327, 0.023795344739427], - [0.020183852699437, 0.023857380204193], - [0.020110564299439, 0.023919191114211], - [0.020037086611150, 0.023980776887692], - [0.019963420326171, 0.024042136944968], - [0.019889566137877, 0.024103270708495], - [0.019815524741412, 0.024164177602859], - [0.019741296833681, 0.024224857054779], - [0.019666883113346, 0.024285308493120], - [0.019592284280817, 0.024345531348888], - [0.019517501038246, 0.024405525055242], - [0.019442534089523, 0.024465289047500], - [0.019367384140264, 0.024524822763141], - [0.019292051897809, 0.024584125641809], - [0.019216538071215, 0.024643197125323], - [0.019140843371246, 0.024702036657681], - [0.019064968510369, 0.024760643685063], - [0.018988914202748, 0.024819017655836], - [0.018912681164234, 0.024877158020562], - [0.018836270112363, 0.024935064232003], - [0.018759681766343, 0.024992735745123], - [0.018682916847054, 0.025050172017095], - [0.018605976077037, 0.025107372507308], - [0.018528860180486, 0.025164336677369], - [0.018451569883247, 0.025221063991110], - [0.018374105912805, 0.025277553914591], - [0.018296468998280, 0.025333805916107], - [0.018218659870421, 0.025389819466194], - [0.018140679261596, 0.025445594037630], - [0.018062527905790, 0.025501129105445], - [0.017984206538592, 0.025556424146920], - [0.017905715897192, 0.025611478641598], - [0.017827056720375, 0.025666292071285], - [0.017748229748511, 0.025720863920056], - [0.017669235723550, 0.025775193674260], - [0.017590075389012, 0.025829280822525], - [0.017510749489986, 0.025883124855762], - [0.017431258773116, 0.025936725267170], - [0.017351603986600, 0.025990081552242], - [0.017271785880180, 0.026043193208768], - [0.017191805205132, 0.026096059736841], - [0.017111662714267, 0.026148680638861], - [0.017031359161915, 0.026201055419541], - [0.016950895303924, 0.026253183585908], - [0.016870271897651, 0.026305064647313], - [0.016789489701954, 0.026356698115431], - [0.016708549477186, 0.026408083504269], - [0.016627451985187, 0.026459220330167], - [0.016546197989277, 0.026510108111806], - [0.016464788254250, 0.026560746370212], - [0.016383223546365, 0.026611134628757], - [0.016301504633341, 0.026661272413168], - [0.016219632284346, 0.026711159251530], - [0.016137607269996, 0.026760794674288], - [0.016055430362340, 0.026810178214254], - [0.015973102334858, 0.026859309406613], - [0.015890623962454, 0.026908187788922], - [0.015807996021446, 0.026956812901119], - [0.015725219289558, 0.027005184285527], - [0.015642294545918, 0.027053301486856], - [0.015559222571044, 0.027101164052208], - [0.015476004146842, 0.027148771531083], - [0.015392640056594, 0.027196123475380], - [0.015309131084956, 0.027243219439406], - [0.015225478017946, 0.027290058979875], - [0.015141681642938, 0.027336641655915], - [0.015057742748656, 0.027382967029073], - [0.014973662125164, 0.027429034663317], - [0.014889440563862, 0.027474844125040], - [0.014805078857474, 0.027520394983066], - [0.014720577800046, 0.027565686808654], - [0.014635938186934, 0.027610719175499], - [0.014551160814797, 0.027655491659740], - [0.014466246481592, 0.027700003839960], - [0.014381195986567, 0.027744255297195], - [0.014296010130247, 0.027788245614933], - [0.014210689714436, 0.027831974379120], - [0.014125235542201, 0.027875441178165], - [0.014039648417870, 0.027918645602941], - [0.013953929147020, 0.027961587246792], - [0.013868078536476, 0.028004265705534], - [0.013782097394294, 0.028046680577462], - [0.013695986529763, 0.028088831463351], - [0.013609746753390, 0.028130717966461], - [0.013523378876898, 0.028172339692540], - [0.013436883713214, 0.028213696249828], - [0.013350262076462, 0.028254787249062], - [0.013263514781960, 0.028295612303478], - [0.013176642646205, 0.028336171028814], - [0.013089646486871, 0.028376463043317], - [0.013002527122799, 0.028416487967743], - [0.012915285373990, 0.028456245425361], - [0.012827922061597, 0.028495735041960], - [0.012740438007915, 0.028534956445849], - [0.012652834036379, 0.028573909267859], - [0.012565110971550, 0.028612593141354], - [0.012477269639111, 0.028651007702224], - [0.012389310865858, 0.028689152588899], - [0.012301235479693, 0.028727027442343], - [0.012213044309615, 0.028764631906065], - [0.012124738185712, 0.028801965626115], - [0.012036317939156, 0.028839028251097], - [0.011947784402191, 0.028875819432161], - [0.011859138408130, 0.028912338823015], - [0.011770380791341, 0.028948586079925], - [0.011681512387245, 0.028984560861718], - [0.011592534032306, 0.029020262829785], - [0.011503446564022, 0.029055691648087], - [0.011414250820918, 0.029090846983152], - [0.011324947642537, 0.029125728504087], - [0.011235537869437, 0.029160335882573], - [0.011146022343175, 0.029194668792871], - [0.011056401906305, 0.029228726911828], - [0.010966677402371, 0.029262509918876], - [0.010876849675891, 0.029296017496036], - [0.010786919572361, 0.029329249327922], - [0.010696887938235, 0.029362205101743], - [0.010606755620926, 0.029394884507308], - [0.010516523468793, 0.029427287237024], - [0.010426192331137, 0.029459412985906], - [0.010335763058187, 0.029491261451573], - [0.010245236501099, 0.029522832334255], - [0.010154613511943, 0.029554125336796], - [0.010063894943698, 0.029585140164654], - [0.009973081650240, 0.029615876525905], - [0.009882174486340, 0.029646334131247], - [0.009791174307650, 0.029676512694001], - [0.009700081970699, 0.029706411930116], - [0.009608898332881, 0.029736031558168], - [0.009517624252453, 0.029765371299366], - [0.009426260588521, 0.029794430877553], - [0.009334808201034, 0.029823210019210], - [0.009243267950778, 0.029851708453456], - [0.009151640699363, 0.029879925912053], - [0.009059927309220, 0.029907862129408], - [0.008968128643591, 0.029935516842573], - [0.008876245566520, 0.029962889791254], - [0.008784278942845, 0.029989980717805], - [0.008692229638191, 0.030016789367235], - [0.008600098518961, 0.030043315487212], - [0.008507886452329, 0.030069558828062], - [0.008415594306230, 0.030095519142772], - [0.008323222949351, 0.030121196186994], - [0.008230773251129, 0.030146589719046], - [0.008138246081733, 0.030171699499915], - [0.008045642312067, 0.030196525293257], - [0.007952962813750, 0.030221066865402], - [0.007860208459119, 0.030245323985357], - [0.007767380121212, 0.030269296424803], - [0.007674478673766, 0.030292983958103], - [0.007581504991203, 0.030316386362302], - [0.007488459948628, 0.030339503417126], - [0.007395344421816, 0.030362334904989], - [0.007302159287206, 0.030384880610993], - [0.007208905421891, 0.030407140322928], - [0.007115583703613, 0.030429113831278], - [0.007022195010752, 0.030450800929220], - [0.006928740222316, 0.030472201412626], - [0.006835220217939, 0.030493315080068], - [0.006741635877866, 0.030514141732814], - [0.006647988082948, 0.030534681174838], - [0.006554277714635, 0.030554933212813], - [0.006460505654964, 0.030574897656119], - [0.006366672786553, 0.030594574316845], - [0.006272779992593, 0.030613963009786], - [0.006178828156839, 0.030633063552447], - [0.006084818163601, 0.030651875765048], - [0.005990750897737, 0.030670399470520], - [0.005896627244644, 0.030688634494512], - [0.005802448090250, 0.030706580665388], - [0.005708214321004, 0.030724237814232], - [0.005613926823871, 0.030741605774849], - [0.005519586486321, 0.030758684383764], - [0.005425194196321, 0.030775473480228], - [0.005330750842327, 0.030791972906214], - [0.005236257313276, 0.030808182506425], - [0.005141714498576, 0.030824102128288], - [0.005047123288102, 0.030839731621963], - [0.004952484572181, 0.030855070840339], - [0.004857799241589, 0.030870119639036], - [0.004763068187541, 0.030884877876411], - [0.004668292301681, 0.030899345413553], - [0.004573472476075, 0.030913522114288], - [0.004478609603205, 0.030927407845180], - [0.004383704575956, 0.030941002475530], - [0.004288758287610, 0.030954305877381], - [0.004193771631837, 0.030967317925516], - [0.004098745502689, 0.030980038497461], - [0.004003680794587, 0.030992467473486], - [0.003908578402316, 0.031004604736602], - [0.003813439221017, 0.031016450172571], - [0.003718264146176, 0.031028003669899], - [0.003623054073616, 0.031039265119839], - [0.003527809899492, 0.031050234416394], - [0.003432532520278, 0.031060911456318], - [0.003337222832760, 0.031071296139114], - [0.003241881734029, 0.031081388367037], - [0.003146510121474, 0.031091188045095], - [0.003051108892766, 0.031100695081051], - [0.002955678945860, 0.031109909385419], - [0.002860221178978, 0.031118830871473], - [0.002764736490604, 0.031127459455239], - [0.002669225779478, 0.031135795055501], - [0.002573689944583, 0.031143837593803], - [0.002478129885137, 0.031151586994444], - [0.002382546500589, 0.031159043184484], - [0.002286940690606, 0.031166206093743], - [0.002191313355067, 0.031173075654800], - [0.002095665394051, 0.031179651802998], - [0.001999997707835, 0.031185934476438], - [0.001904311196878, 0.031191923615985], - [0.001808606761820, 0.031197619165268], - [0.001712885303465, 0.031203021070678], - [0.001617147722782, 0.031208129281370], - [0.001521394920889, 0.031212943749264], - [0.001425627799047, 0.031217464429043], - [0.001329847258653, 0.031221691278159], - [0.001234054201231, 0.031225624256825], - [0.001138249528420, 0.031229263328024], - [0.001042434141971, 0.031232608457502], - [0.000946608943736, 0.031235659613775], - [0.000850774835656, 0.031238416768124], - [0.000754932719759, 0.031240879894597], - [0.000659083498149, 0.031243048970010], - [0.000563228072993, 0.031244923973948], - [0.000467367346520, 0.031246504888762], - [0.000371502221008, 0.031247791699571], - [0.000275633598775, 0.031248784394264], - [0.000179762382174, 0.031249482963498], - [0.000083889473581, 0.031249887400697] -]; - -exports.MDCT_TABLE_256 = [ - [0.088387931675923, 0.000271171628935], - [0.088354655998507, 0.002440238387037], - [0.088268158780110, 0.004607835236780], - [0.088128492123423, 0.006772656498875], - [0.087935740158418, 0.008933398165942], - [0.087690018991670, 0.011088758687994], - [0.087391476636423, 0.013237439756448], - [0.087040292923427, 0.015378147086172], - [0.086636679392621, 0.017509591195118], - [0.086180879165703, 0.019630488181053], - [0.085673166799686, 0.021739560494940], - [0.085113848121515, 0.023835537710479], - [0.084503260043847, 0.025917157289369], - [0.083841770362110, 0.027983165341813], - [0.083129777532952, 0.030032317381813], - [0.082367710434230, 0.032063379076803], - [0.081556028106671, 0.034075126991164], - [0.080695219477356, 0.036066349323177], - [0.079785803065216, 0.038035846634965], - [0.078828326668693, 0.039982432574992], - [0.077823367035766, 0.041904934592675], - [0.076771529516540, 0.043802194644686], - [0.075673447698606, 0.045673069892513], - [0.074529783025390, 0.047516433390863], - [0.073341224397728, 0.049331174766491], - [0.072108487758894, 0.051116200887052], - [0.070832315663343, 0.052870436519557], - [0.069513476829429, 0.054592824978055], - [0.068152765676348, 0.056282328760143], - [0.066751001845620, 0.057937930171918], - [0.065309029707361, 0.059558631940996], - [0.063827717851668, 0.061143457817234], - [0.062307958565413, 0.062691453160784], - [0.060750667294763, 0.064201685517134], - [0.059156782093749, 0.065673245178784], - [0.057527263059216, 0.067105245733220], - [0.055863091752499, 0.068496824596852], - [0.054165270608165, 0.069847143534609], - [0.052434822330188, 0.071155389164853], - [0.050672789275903, 0.072420773449336], - [0.048880232828135, 0.073642534167879], - [0.047058232755862, 0.074819935377512], - [0.045207886563797, 0.075952267855771], - [0.043330308831298, 0.077038849527912], - [0.041426630540984, 0.078079025877766], - [0.039497998397473, 0.079072170341994], - [0.037545574136653, 0.080017684687506], - [0.035570533825892, 0.080914999371817], - [0.033574067155622, 0.081763573886112], - [0.031557376722714, 0.082562897080836], - [0.029521677306074, 0.083312487473584], - [0.027468195134911, 0.084011893539132], - [0.025398167150101, 0.084660693981419], - [0.023312840259098, 0.085258497987320], - [0.021213470584847, 0.085804945462053], - [0.019101322709138, 0.086299707246093], - [0.016977668910873, 0.086742485313442], - [0.014843788399692, 0.087133012951149], - [0.012700966545425, 0.087471054919968], - [0.010550494103830, 0.087756407596056], - [0.008393666439096, 0.087988899093631], - [0.006231782743558, 0.088168389368510], - [0.004066145255116, 0.088294770302461], - [0.001898058472816, 0.088367965768336] -]; - -exports.MDCT_TABLE_1920 = [ - [0.032274858518097, 0.000013202404176], - [0.032274642494505, 0.000118821372483], - [0.032274080835421, 0.000224439068308], - [0.032273173546860, 0.000330054360572], - [0.032271920638538, 0.000435666118218], - [0.032270322123873, 0.000541273210231], - [0.032268378019984, 0.000646874505642], - [0.032266088347691, 0.000752468873546], - [0.032263453131514, 0.000858055183114], - [0.032260472399674, 0.000963632303600], - [0.032257146184092, 0.001069199104358], - [0.032253474520390, 0.001174754454853], - [0.032249457447888, 0.001280297224671], - [0.032245095009606, 0.001385826283535], - [0.032240387252262, 0.001491340501313], - [0.032235334226272, 0.001596838748031], - [0.032229935985750, 0.001702319893890], - [0.032224192588507, 0.001807782809271], - [0.032218104096050, 0.001913226364749], - [0.032211670573582, 0.002018649431111], - [0.032204892090000, 0.002124050879359], - [0.032197768717898, 0.002229429580728], - [0.032190300533560, 0.002334784406698], - [0.032182487616965, 0.002440114229003], - [0.032174330051782, 0.002545417919644], - [0.032165827925374, 0.002650694350905], - [0.032156981328790, 0.002755942395358], - [0.032147790356771, 0.002861160925883], - [0.032138255107744, 0.002966348815672], - [0.032128375683825, 0.003071504938250], - [0.032118152190814, 0.003176628167476], - [0.032107584738196, 0.003281717377568], - [0.032096673439141, 0.003386771443102], - [0.032085418410500, 0.003491789239036], - [0.032073819772804, 0.003596769640711], - [0.032061877650267, 0.003701711523874], - [0.032049592170778, 0.003806613764680], - [0.032036963465906, 0.003911475239711], - [0.032023991670893, 0.004016294825985], - [0.032010676924657, 0.004121071400967], - [0.031997019369789, 0.004225803842586], - [0.031983019152549, 0.004330491029241], - [0.031968676422869, 0.004435131839816], - [0.031953991334348, 0.004539725153692], - [0.031938964044252, 0.004644269850758], - [0.031923594713510, 0.004748764811426], - [0.031907883506716, 0.004853208916638], - [0.031891830592124, 0.004957601047881], - [0.031875436141648, 0.005061940087200], - [0.031858700330859, 0.005166224917208], - [0.031841623338985, 0.005270454421097], - [0.031824205348907, 0.005374627482653], - [0.031806446547156, 0.005478742986267], - [0.031788347123916, 0.005582799816945], - [0.031769907273017, 0.005686796860323], - [0.031751127191935, 0.005790733002674], - [0.031732007081789, 0.005894607130928], - [0.031712547147340, 0.005998418132675], - [0.031692747596989, 0.006102164896182], - [0.031672608642773, 0.006205846310406], - [0.031652130500364, 0.006309461265002], - [0.031631313389067, 0.006413008650337], - [0.031610157531816, 0.006516487357501], - [0.031588663155172, 0.006619896278321], - [0.031566830489325, 0.006723234305370], - [0.031544659768083, 0.006826500331981], - [0.031522151228878, 0.006929693252258], - [0.031499305112758, 0.007032811961088], - [0.031476121664387, 0.007135855354151], - [0.031452601132040, 0.007238822327937], - [0.031428743767604, 0.007341711779751], - [0.031404549826572, 0.007444522607730], - [0.031380019568042, 0.007547253710853], - [0.031355153254712, 0.007649903988952], - [0.031329951152882, 0.007752472342725], - [0.031304413532445, 0.007854957673748], - [0.031278540666888, 0.007957358884484], - [0.031252332833290, 0.008059674878300], - [0.031225790312316, 0.008161904559473], - [0.031198913388214, 0.008264046833205], - [0.031171702348814, 0.008366100605636], - [0.031144157485525, 0.008468064783849], - [0.031116279093331, 0.008569938275893], - [0.031088067470786, 0.008671719990782], - [0.031059522920014, 0.008773408838517], - [0.031030645746705, 0.008875003730092], - [0.031001436260110, 0.008976503577507], - [0.030971894773039, 0.009077907293780], - [0.030942021601857, 0.009179213792959], - [0.030911817066483, 0.009280421990133], - [0.030881281490382, 0.009381530801444], - [0.030850415200566, 0.009482539144097], - [0.030819218527589, 0.009583445936373], - [0.030787691805541, 0.009684250097643], - [0.030755835372048, 0.009784950548375], - [0.030723649568268, 0.009885546210147], - [0.030691134738883, 0.009986036005661], - [0.030658291232103, 0.010086418858753], - [0.030625119399655, 0.010186693694402], - [0.030591619596781, 0.010286859438745], - [0.030557792182239, 0.010386915019088], - [0.030523637518292, 0.010486859363916], - [0.030489155970710, 0.010586691402906], - [0.030454347908763, 0.010686410066936], - [0.030419213705216, 0.010786014288099], - [0.030383753736329, 0.010885502999714], - [0.030347968381849, 0.010984875136338], - [0.030311858025010, 0.011084129633775], - [0.030275423052523, 0.011183265429088], - [0.030238663854579, 0.011282281460612], - [0.030201580824838, 0.011381176667967], - [0.030164174360430, 0.011479949992062], - [0.030126444861948, 0.011578600375117], - [0.030088392733446, 0.011677126760663], - [0.030050018382430, 0.011775528093563], - [0.030011322219859, 0.011873803320018], - [0.029972304660138, 0.011971951387578], - [0.029932966121114, 0.012069971245157], - [0.029893307024070, 0.012167861843041], - [0.029853327793724, 0.012265622132901], - [0.029813028858222, 0.012363251067801], - [0.029772410649132, 0.012460747602215], - [0.029731473601443, 0.012558110692033], - [0.029690218153558, 0.012655339294575], - [0.029648644747289, 0.012752432368600], - [0.029606753827855, 0.012849388874320], - [0.029564545843872, 0.012946207773407], - [0.029522021247356, 0.013042888029011], - [0.029479180493710, 0.013139428605762], - [0.029436024041725, 0.013235828469789], - [0.029392552353570, 0.013332086588727], - [0.029348765894794, 0.013428201931728], - [0.029304665134313, 0.013524173469475], - [0.029260250544412, 0.013620000174189], - [0.029215522600735, 0.013715681019643], - [0.029170481782283, 0.013811214981173], - [0.029125128571406, 0.013906601035686], - [0.029079463453801, 0.014001838161674], - [0.029033486918505, 0.014096925339225], - [0.028987199457889, 0.014191861550031], - [0.028940601567655, 0.014286645777401], - [0.028893693746829, 0.014381277006273], - [0.028846476497755, 0.014475754223221], - [0.028798950326094, 0.014570076416472], - [0.028751115740811, 0.014664242575910], - [0.028702973254178, 0.014758251693091], - [0.028654523381760, 0.014852102761253], - [0.028605766642418, 0.014945794775326], - [0.028556703558297, 0.015039326731945], - [0.028507334654823, 0.015132697629457], - [0.028457660460698, 0.015225906467935], - [0.028407681507891, 0.015318952249187], - [0.028357398331639, 0.015411833976768], - [0.028306811470432, 0.015504550655988], - [0.028255921466016, 0.015597101293927], - [0.028204728863381, 0.015689484899442], - [0.028153234210760, 0.015781700483179], - [0.028101438059619, 0.015873747057582], - [0.028049340964652, 0.015965623636907], - [0.027996943483779, 0.016057329237229], - [0.027944246178133, 0.016148862876456], - [0.027891249612061, 0.016240223574335], - [0.027837954353113, 0.016331410352467], - [0.027784360972039, 0.016422422234315], - [0.027730470042780, 0.016513258245214], - [0.027676282142466, 0.016603917412384], - [0.027621797851405, 0.016694398764938], - [0.027567017753080, 0.016784701333894], - [0.027511942434143, 0.016874824152183], - [0.027456572484404, 0.016964766254662], - [0.027400908496833, 0.017054526678124], - [0.027344951067546, 0.017144104461307], - [0.027288700795801, 0.017233498644904], - [0.027232158283994, 0.017322708271577], - [0.027175324137651, 0.017411732385960], - [0.027118198965418, 0.017500570034678], - [0.027060783379060, 0.017589220266351], - [0.027003077993454, 0.017677682131607], - [0.026945083426576, 0.017765954683088], - [0.026886800299502, 0.017854036975468], - [0.026828229236397, 0.017941928065456], - [0.026769370864511, 0.018029627011808], - [0.026710225814170, 0.018117132875340], - [0.026650794718768, 0.018204444718934], - [0.026591078214767, 0.018291561607551], - [0.026531076941680, 0.018378482608238], - [0.026470791542075, 0.018465206790142], - [0.026410222661558, 0.018551733224515], - [0.026349370948775, 0.018638060984730], - [0.026288237055398, 0.018724189146286], - [0.026226821636121, 0.018810116786819], - [0.026165125348656, 0.018895842986112], - [0.026103148853718, 0.018981366826109], - [0.026040892815028, 0.019066687390916], - [0.025978357899296, 0.019151803766819], - [0.025915544776223, 0.019236715042290], - [0.025852454118485, 0.019321420307998], - [0.025789086601733, 0.019405918656817], - [0.025725442904582, 0.019490209183837], - [0.025661523708606, 0.019574290986376], - [0.025597329698327, 0.019658163163984], - [0.025532861561211, 0.019741824818458], - [0.025468119987662, 0.019825275053848], - [0.025403105671008, 0.019908512976470], - [0.025337819307501, 0.019991537694913], - [0.025272261596305, 0.020074348320047], - [0.025206433239491, 0.020156943965039], - [0.025140334942028, 0.020239323745355], - [0.025073967411776, 0.020321486778774], - [0.025007331359476, 0.020403432185395], - [0.024940427498748, 0.020485159087650], - [0.024873256546079, 0.020566666610309], - [0.024805819220816, 0.020647953880491], - [0.024738116245157, 0.020729020027676], - [0.024670148344147, 0.020809864183709], - [0.024601916245669, 0.020890485482816], - [0.024533420680433, 0.020970883061607], - [0.024464662381971, 0.021051056059087], - [0.024395642086630, 0.021131003616670], - [0.024326360533561, 0.021210724878181], - [0.024256818464715, 0.021290218989868], - [0.024187016624830, 0.021369485100415], - [0.024116955761430, 0.021448522360944], - [0.024046636624808, 0.021527329925030], - [0.023976059968027, 0.021605906948708], - [0.023905226546906, 0.021684252590480], - [0.023834137120014, 0.021762366011328], - [0.023762792448662, 0.021840246374720], - [0.023691193296893, 0.021917892846620], - [0.023619340431478, 0.021995304595495], - [0.023547234621902, 0.022072480792330], - [0.023474876640361, 0.022149420610628], - [0.023402267261751, 0.022226123226426], - [0.023329407263659, 0.022302587818300], - [0.023256297426359, 0.022378813567377], - [0.023182938532797, 0.022454799657339], - [0.023109331368588, 0.022530545274437], - [0.023035476722006, 0.022606049607496], - [0.022961375383975, 0.022681311847926], - [0.022887028148061, 0.022756331189727], - [0.022812435810462, 0.022831106829504], - [0.022737599170003, 0.022905637966469], - [0.022662519028125, 0.022979923802453], - [0.022587196188874, 0.023053963541915], - [0.022511631458899, 0.023127756391950], - [0.022435825647437, 0.023201301562294], - [0.022359779566306, 0.023274598265338], - [0.022283494029900, 0.023347645716133], - [0.022206969855176, 0.023420443132400], - [0.022130207861645, 0.023492989734537], - [0.022053208871367, 0.023565284745628], - [0.021975973708940, 0.023637327391451], - [0.021898503201489, 0.023709116900488], - [0.021820798178663, 0.023780652503931], - [0.021742859472618, 0.023851933435691], - [0.021664687918017, 0.023922958932406], - [0.021586284352013, 0.023993728233451], - [0.021507649614247, 0.024064240580942], - [0.021428784546832, 0.024134495219750], - [0.021349689994350, 0.024204491397504], - [0.021270366803840, 0.024274228364600], - [0.021190815824791, 0.024343705374213], - [0.021111037909128, 0.024412921682298], - [0.021031033911210, 0.024481876547605], - [0.020950804687815, 0.024550569231683], - [0.020870351098134, 0.024618998998889], - [0.020789674003759, 0.024687165116394], - [0.020708774268678, 0.024755066854194], - [0.020627652759262, 0.024822703485116], - [0.020546310344257, 0.024890074284826], - [0.020464747894775, 0.024957178531837], - [0.020382966284284, 0.025024015507516], - [0.020300966388600, 0.025090584496093], - [0.020218749085876, 0.025156884784668], - [0.020136315256592, 0.025222915663218], - [0.020053665783549, 0.025288676424605], - [0.019970801551857, 0.025354166364584], - [0.019887723448925, 0.025419384781811], - [0.019804432364452, 0.025484330977848], - [0.019720929190419, 0.025549004257175], - [0.019637214821078, 0.025613403927192], - [0.019553290152943, 0.025677529298230], - [0.019469156084779, 0.025741379683559], - [0.019384813517595, 0.025804954399392], - [0.019300263354632, 0.025868252764895], - [0.019215506501354, 0.025931274102193], - [0.019130543865439, 0.025994017736379], - [0.019045376356769, 0.026056482995518], - [0.018960004887419, 0.026118669210657], - [0.018874430371648, 0.026180575715833], - [0.018788653725892, 0.026242201848076], - [0.018702675868750, 0.026303546947421], - [0.018616497720974, 0.026364610356909], - [0.018530120205464, 0.026425391422602], - [0.018443544247254, 0.026485889493583], - [0.018356770773502, 0.026546103921965], - [0.018269800713483, 0.026606034062902], - [0.018182634998576, 0.026665679274589], - [0.018095274562256, 0.026725038918274], - [0.018007720340083, 0.026784112358263], - [0.017919973269692, 0.026842898961926], - [0.017832034290785, 0.026901398099707], - [0.017743904345116, 0.026959609145127], - [0.017655584376488, 0.027017531474792], - [0.017567075330734, 0.027075164468401], - [0.017478378155718, 0.027132507508750], - [0.017389493801313, 0.027189559981742], - [0.017300423219401, 0.027246321276391], - [0.017211167363854, 0.027302790784828], - [0.017121727190533, 0.027358967902310], - [0.017032103657269, 0.027414852027226], - [0.016942297723858, 0.027470442561102], - [0.016852310352050, 0.027525738908608], - [0.016762142505537, 0.027580740477564], - [0.016671795149944, 0.027635446678948], - [0.016581269252819, 0.027689856926900], - [0.016490565783622, 0.027743970638730], - [0.016399685713714, 0.027797787234924], - [0.016308630016347, 0.027851306139149], - [0.016217399666655, 0.027904526778260], - [0.016125995641641, 0.027957448582309], - [0.016034418920170, 0.028010070984544], - [0.015942670482954, 0.028062393421421], - [0.015850751312545, 0.028114415332610], - [0.015758662393324, 0.028166136160998], - [0.015666404711489, 0.028217555352697], - [0.015573979255046, 0.028268672357047], - [0.015481387013797, 0.028319486626627], - [0.015388628979331, 0.028369997617257], - [0.015295706145012, 0.028420204788004], - [0.015202619505968, 0.028470107601191], - [0.015109370059084, 0.028519705522399], - [0.015015958802984, 0.028568998020472], - [0.014922386738030, 0.028617984567529], - [0.014828654866302, 0.028666664638963], - [0.014734764191593, 0.028715037713449], - [0.014640715719398, 0.028763103272951], - [0.014546510456900, 0.028810860802724], - [0.014452149412962, 0.028858309791325], - [0.014357633598114, 0.028905449730613], - [0.014262964024545, 0.028952280115756], - [0.014168141706090, 0.028998800445240], - [0.014073167658220, 0.029045010220868], - [0.013978042898030, 0.029090908947771], - [0.013882768444231, 0.029136496134411], - [0.013787345317136, 0.029181771292585], - [0.013691774538648, 0.029226733937433], - [0.013596057132255, 0.029271383587441], - [0.013500194123014, 0.029315719764447], - [0.013404186537539, 0.029359741993647], - [0.013308035403995, 0.029403449803598], - [0.013211741752084, 0.029446842726223], - [0.013115306613032, 0.029489920296820], - [0.013018731019584, 0.029532682054063], - [0.012922016005985, 0.029575127540008], - [0.012825162607977, 0.029617256300097], - [0.012728171862781, 0.029659067883165], - [0.012631044809089, 0.029700561841444], - [0.012533782487056, 0.029741737730567], - [0.012436385938281, 0.029782595109573], - [0.012338856205805, 0.029823133540913], - [0.012241194334091, 0.029863352590452], - [0.012143401369021, 0.029903251827477], - [0.012045478357878, 0.029942830824699], - [0.011947426349339, 0.029982089158259], - [0.011849246393462, 0.030021026407731], - [0.011750939541676, 0.030059642156129], - [0.011652506846768, 0.030097935989909], - [0.011553949362874, 0.030135907498976], - [0.011455268145464, 0.030173556276684], - [0.011356464251335, 0.030210881919845], - [0.011257538738598, 0.030247884028732], - [0.011158492666665, 0.030284562207083], - [0.011059327096240, 0.030320916062102], - [0.010960043089307, 0.030356945204470], - [0.010860641709118, 0.030392649248343], - [0.010761124020182, 0.030428027811361], - [0.010661491088253, 0.030463080514646], - [0.010561743980319, 0.030497806982812], - [0.010461883764593, 0.030532206843968], - [0.010361911510496, 0.030566279729717], - [0.010261828288652, 0.030600025275167], - [0.010161635170872, 0.030633443118931], - [0.010061333230142, 0.030666532903129], - [0.009960923540617, 0.030699294273397], - [0.009860407177603, 0.030731726878888], - [0.009759785217550, 0.030763830372273], - [0.009659058738038, 0.030795604409750], - [0.009558228817767, 0.030827048651045], - [0.009457296536545, 0.030858162759415], - [0.009356262975275, 0.030888946401653], - [0.009255129215945, 0.030919399248091], - [0.009153896341616, 0.030949520972603], - [0.009052565436412, 0.030979311252611], - [0.008951137585505, 0.031008769769084], - [0.008849613875105, 0.031037896206544], - [0.008747995392451, 0.031066690253072], - [0.008646283225794, 0.031095151600306], - [0.008544478464390, 0.031123279943448], - [0.008442582198486, 0.031151074981266], - [0.008340595519310, 0.031178536416098], - [0.008238519519057, 0.031205663953853], - [0.008136355290878, 0.031232457304017], - [0.008034103928871, 0.031258916179656], - [0.007931766528065, 0.031285040297416], - [0.007829344184412, 0.031310829377528], - [0.007726837994772, 0.031336283143813], - [0.007624249056906, 0.031361401323680], - [0.007521578469457, 0.031386183648135], - [0.007418827331946, 0.031410629851778], - [0.007315996744755, 0.031434739672811], - [0.007213087809115, 0.031458512853036], - [0.007110101627101, 0.031481949137863], - [0.007007039301610, 0.031505048276306], - [0.006903901936357, 0.031527810020993], - [0.006800690635862, 0.031550234128164], - [0.006697406505433, 0.031572320357675], - [0.006594050651161, 0.031594068473000], - [0.006490624179905, 0.031615478241233], - [0.006387128199278, 0.031636549433095], - [0.006283563817639, 0.031657281822929], - [0.006179932144080, 0.031677675188707], - [0.006076234288412, 0.031697729312034], - [0.005972471361157, 0.031717443978146], - [0.005868644473532, 0.031736818975914], - [0.005764754737440, 0.031755854097848], - [0.005660803265456, 0.031774549140098], - [0.005556791170816, 0.031792903902453], - [0.005452719567407, 0.031810918188350], - [0.005348589569753, 0.031828591804869], - [0.005244402293001, 0.031845924562742], - [0.005140158852914, 0.031862916276347], - [0.005035860365855, 0.031879566763717], - [0.004931507948778, 0.031895875846539], - [0.004827102719212, 0.031911843350155], - [0.004722645795254, 0.031927469103567], - [0.004618138295554, 0.031942752939435], - [0.004513581339303, 0.031957694694082], - [0.004408976046222, 0.031972294207493], - [0.004304323536549, 0.031986551323320], - [0.004199624931030, 0.032000465888879], - [0.004094881350902, 0.032014037755158], - [0.003990093917884, 0.032027266776813], - [0.003885263754166, 0.032040152812170], - [0.003780391982394, 0.032052695723232], - [0.003675479725661, 0.032064895375674], - [0.003570528107494, 0.032076751638847], - [0.003465538251839, 0.032088264385780], - [0.003360511283053, 0.032099433493181], - [0.003255448325892, 0.032110258841438], - [0.003150350505494, 0.032120740314619], - [0.003045218947373, 0.032130877800478], - [0.002940054777404, 0.032140671190449], - [0.002834859121810, 0.032150120379653], - [0.002729633107153, 0.032159225266897], - [0.002624377860318, 0.032167985754674], - [0.002519094508504, 0.032176401749168], - [0.002413784179212, 0.032184473160250], - [0.002308448000231, 0.032192199901481], - [0.002203087099626, 0.032199581890114], - [0.002097702605728, 0.032206619047093], - [0.001992295647121, 0.032213311297057], - [0.001886867352628, 0.032219658568338], - [0.001781418851302, 0.032225660792960], - [0.001675951272410, 0.032231317906644], - [0.001570465745428, 0.032236629848809], - [0.001464963400018, 0.032241596562566], - [0.001359445366028, 0.032246217994727], - [0.001253912773470, 0.032250494095799], - [0.001148366752513, 0.032254424819990], - [0.001042808433471, 0.032258010125204], - [0.000937238946789, 0.032261249973045], - [0.000831659423030, 0.032264144328817], - [0.000726070992868, 0.032266693161525], - [0.000620474787068, 0.032268896443871], - [0.000514871936481, 0.032270754152261], - [0.000409263572030, 0.032272266266801], - [0.000303650824695, 0.032273432771295], - [0.000198034825504, 0.032274253653254], - [0.000092416705518, 0.032274728903884] -]; - -exports.MDCT_TABLE_240 = [ - [0.091286604111815, 0.000298735779793], - [0.091247502481454, 0.002688238127538], - [0.091145864370807, 0.005075898091152], - [0.090981759437558, 0.007460079287760], - [0.090755300151030, 0.009839147718664], - [0.090466641715108, 0.012211472889198], - [0.090115981961863, 0.014575428926191], - [0.089703561215976, 0.016929395692256], - [0.089229662130024, 0.019271759896156], - [0.088694609490769, 0.021600916198470], - [0.088098769996564, 0.023915268311810], - [0.087442552006035, 0.026213230094844], - [0.086726405258214, 0.028493226639351], - [0.085950820564309, 0.030753695349588], - [0.085116329471329, 0.032993087013213], - [0.084223503897785, 0.035209866863042], - [0.083272955741727, 0.037402515628894], - [0.082265336461381, 0.039569530578832], - [0.081201336628670, 0.041709426549053], - [0.080081685455930, 0.043820736961749], - [0.078907150296148, 0.045902014830227], - [0.077678536117054, 0.047951833750597], - [0.076396684949434, 0.049968788879362], - [0.075062475310050, 0.051951497896226], - [0.073676821599542, 0.053898601951466], - [0.072240673475749, 0.055808766597225], - [0.070755015202858, 0.057680682702068], - [0.069220864976840, 0.059513067348201], - [0.067639274227625, 0.061304664710718], - [0.066011326898512, 0.063054246918278], - [0.064338138703282, 0.064760614894630], - [0.062620856361546, 0.066422599180399], - [0.060860656812842, 0.068039060734572], - [0.059058746410016, 0.069608891715145], - [0.057216360092450, 0.071131016238378], - [0.055334760539699, 0.072604391116154], - [0.053415237306106, 0.074028006570930], - [0.051459105937014, 0.075400886927784], - [0.049467707067153, 0.076722091283096], - [0.047442405501835, 0.077990714149396], - [0.045384589281588, 0.079205886075941], - [0.043295668730857, 0.080366774244592], - [0.041177075491445, 0.081472583040586], - [0.039030261541332, 0.082522554597810], - [0.036856698199564, 0.083515969318206], - [0.034657875117883, 0.084452146364948], - [0.032435299259796, 0.085330444129049], - [0.030190493867775, 0.086150260669096], - [0.027924997419306, 0.086911034123781], - [0.025640362572491, 0.087612243096981], - [0.023338155101933, 0.088253407015092], - [0.021019952825636, 0.088834086456390], - [0.018687344523641, 0.089353883452193], - [0.016341928849164, 0.089812441759604], - [0.013985313232951, 0.090209447105664], - [0.011619112781631, 0.090544627402740], - [0.009244949170797, 0.090817752935000], - [0.006864449533597, 0.091028636515846], - [0.004479245345574, 0.091177133616206], - [0.002090971306534, 0.091263142463585] -]; -},{}],11:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -/******************************************************************************** - * Sample offset into the window indicating the beginning of a scalefactor - * window band - * - * scalefactor window band - term for scalefactor bands within a window, - * given in Table 4.110 to Table 4.128. - * - * scalefactor band - a set of spectral coefficients which are scaled by one - * scalefactor. In case of EIGHT_SHORT_SEQUENCE and grouping a scalefactor band - * may contain several scalefactor window bands of corresponding frequency. For - * all other window_sequences scalefactor bands and scalefactor window bands are - * identical. - *******************************************************************************/ -const SWB_OFFSET_1024_96 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 64, - 72, 80, 88, 96, 108, 120, 132, 144, - 156, 172, 188, 212, 240, 276, 320, 384, - 448, 512, 576, 640, 704, 768, 832, 896, - 960, 1024 -]); - -const SWB_OFFSET_128_96 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128 -]); - -const SWB_OFFSET_1024_64 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 64, - 72, 80, 88, 100, 112, 124, 140, 156, - 172, 192, 216, 240, 268, 304, 344, 384, - 424, 464, 504, 544, 584, 624, 664, 704, - 744, 784, 824, 864, 904, 944, 984, 1024 -]); - -const SWB_OFFSET_128_64 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128 -]); - -const SWB_OFFSET_1024_48 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 48, 56, 64, 72, 80, - 88, 96, 108, 120, 132, 144, 160, 176, - 196, 216, 240, 264, 292, 320, 352, 384, - 416, 448, 480, 512, 544, 576, 608, 640, - 672, 704, 736, 768, 800, 832, 864, 896, - 928, 1024 -]); - -const SWB_OFFSET_128_48 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 28, 36, - 44, 56, 68, 80, 96, 112, 128 -]); - -const SWB_OFFSET_1024_32 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 48, 56, 64, 72, 80, - 88, 96, 108, 120, 132, 144, 160, 176, - 196, 216, 240, 264, 292, 320, 352, 384, - 416, 448, 480, 512, 544, 576, 608, 640, - 672, 704, 736, 768, 800, 832, 864, 896, - 928, 960, 992, 1024 -]); - -const SWB_OFFSET_1024_24 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 52, 60, 68, 76, - 84, 92, 100, 108, 116, 124, 136, 148, - 160, 172, 188, 204, 220, 240, 260, 284, - 308, 336, 364, 396, 432, 468, 508, 552, - 600, 652, 704, 768, 832, 896, 960, 1024 -]); - -const SWB_OFFSET_128_24 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 24, 28, - 36, 44, 52, 64, 76, 92, 108, 128 -]); - -const SWB_OFFSET_1024_16 = new Uint16Array([ - 0, 8, 16, 24, 32, 40, 48, 56, - 64, 72, 80, 88, 100, 112, 124, 136, - 148, 160, 172, 184, 196, 212, 228, 244, - 260, 280, 300, 320, 344, 368, 396, 424, - 456, 492, 532, 572, 616, 664, 716, 772, - 832, 896, 960, 1024 -]); - -const SWB_OFFSET_128_16 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 40, 48, 60, 72, 88, 108, 128 -]); - -const SWB_OFFSET_1024_8 = new Uint16Array([ - 0, 12, 24, 36, 48, 60, 72, 84, - 96, 108, 120, 132, 144, 156, 172, 188, - 204, 220, 236, 252, 268, 288, 308, 328, - 348, 372, 396, 420, 448, 476, 508, 544, - 580, 620, 664, 712, 764, 820, 880, 944, - 1024 -]); - -const SWB_OFFSET_128_8 = new Uint16Array([ - 0, 4, 8, 12, 16, 20, 24, 28, - 36, 44, 52, 60, 72, 88, 108, 128 -]); - -exports.SWB_OFFSET_1024 = [ - SWB_OFFSET_1024_96, - SWB_OFFSET_1024_96, - SWB_OFFSET_1024_64, - SWB_OFFSET_1024_48, - SWB_OFFSET_1024_48, - SWB_OFFSET_1024_32, - SWB_OFFSET_1024_24, - SWB_OFFSET_1024_24, - SWB_OFFSET_1024_16, - SWB_OFFSET_1024_16, - SWB_OFFSET_1024_16, - SWB_OFFSET_1024_8 -]; - -exports.SWB_OFFSET_128 = [ - SWB_OFFSET_128_96, - SWB_OFFSET_128_96, - SWB_OFFSET_128_64, - SWB_OFFSET_128_48, - SWB_OFFSET_128_48, - SWB_OFFSET_128_48, - SWB_OFFSET_128_24, - SWB_OFFSET_128_24, - SWB_OFFSET_128_16, - SWB_OFFSET_128_16, - SWB_OFFSET_128_16, - SWB_OFFSET_128_8 -]; - -exports.SWB_SHORT_WINDOW_COUNT = new Uint8Array([ - 12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15 -]); - -exports.SWB_LONG_WINDOW_COUNT = new Uint8Array([ - 41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40 -]); - -/* - * Scalefactor lookup table - */ -exports.SCALEFACTOR_TABLE = (function() { - var table = new Float32Array(428); - - for (var i = 0; i < 428; i++) { - table[i] = Math.pow(2, (i - 200) / 4); - } - - return table; -})(); - - -/** - * Inverse quantization lookup table - */ -exports.IQ_TABLE = (function() { - var table = new Float32Array(8191), - four_thirds = 4/3; - - for (var i = 0; i < 8191; i++) { - table[i] = Math.pow(i, four_thirds); - } - - return table; -})(); - -exports.SAMPLE_RATES = new Int32Array([ - 96000, 88200, 64000, 48000, 44100, 32000, - 24000, 22050, 16000, 12000, 11025, 8000, 7350 -]); - -},{}],12:[function(require,module,exports){ -/* - * AAC.js - Advanced Audio Coding decoder in JavaScript - * Created by Devon Govett - * Copyright (c) 2012, Official.fm Labs - * - * AAC.js is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. - * - * AAC.js is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. - * If not, see . - */ - -// Temporal Noise Shaping -function TNS(config) { - this.maxBands = TNS_MAX_BANDS_1024[config.sampleIndex] - this.nFilt = new Int32Array(8); - this.length = new Array(8); - this.direction = new Array(8); - this.order = new Array(8); - this.coef = new Array(8); - - // Probably could allocate these as needed - for (var w = 0; w < 8; w++) { - this.length[w] = new Int32Array(4); - this.direction[w] = new Array(4); - this.order[w] = new Int32Array(4); - this.coef[w] = new Array(4); - - for (var filt = 0; filt < 4; filt++) { - this.coef[w][filt] = new Float32Array(TNS_MAX_ORDER); - } - } - - this.lpc = new Float32Array(TNS_MAX_ORDER); - this.tmp = new Float32Array(TNS_MAX_ORDER); -} - -const TNS_MAX_ORDER = 20, - SHORT_BITS = [1, 4, 3], - LONG_BITS = [2, 6, 5]; - -const TNS_COEF_1_3 = [0.00000000, -0.43388373, 0.64278758, 0.34202015], - - TNS_COEF_0_3 = [0.00000000, -0.43388373, -0.78183150, -0.97492790, - 0.98480773, 0.86602539, 0.64278758, 0.34202015], - - TNS_COEF_1_4 = [0.00000000, -0.20791170, -0.40673664, -0.58778524, - 0.67369562, 0.52643216, 0.36124167, 0.18374951], - - TNS_COEF_0_4 = [0.00000000, -0.20791170, -0.40673664, -0.58778524, - -0.74314481, -0.86602539, -0.95105654, -0.99452192, - 0.99573416, 0.96182561, 0.89516330, 0.79801720, - 0.67369562, 0.52643216, 0.36124167, 0.18374951], - - TNS_TABLES = [TNS_COEF_0_3, TNS_COEF_0_4, TNS_COEF_1_3, TNS_COEF_1_4]; - -const TNS_MAX_BANDS_1024 = [31, 31, 34, 40, 42, 51, 46, 46, 42, 42, 42, 39, 39], - TNS_MAX_BANDS_128 = [9, 9, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14]; - -TNS.prototype.decode = function(stream, info) { - var windowCount = info.windowCount, - bits = info.windowSequence === 2 ? SHORT_BITS : LONG_BITS; - - for (var w = 0; w < windowCount; w++) { - if (this.nFilt[w] = stream.read(bits[0])) { - var coefRes = stream.read(1), - nFilt_w = this.nFilt[w], - length_w = this.length[w], - order_w = this.order[w], - direction_w = this.direction[w], - coef_w = this.coef[w]; - - for (var filt = 0; filt < nFilt_w; filt++) { - length_w[filt] = stream.read(bits[1]); - - if ((order_w[filt] = stream.read(bits[2])) > 20) - throw new Error("TNS filter out of range: " + order_w[filt]); - - if (order_w[filt]) { - direction_w[filt] = !!stream.read(1); - var coefCompress = stream.read(1), - coefLen = coefRes + 3 - coefCompress, - tmp = 2 * coefCompress + coefRes, - table = TNS_TABLES[tmp], - order_w_filt = order_w[filt], - coef_w_filt = coef_w[filt]; - - for (var i = 0; i < order_w_filt; i++) - coef_w_filt[i] = table[stream.read(coefLen)]; - } - - } - } - } -}; - -TNS.prototype.process = function(ics, data, decode) { - var mmm = Math.min(this.maxBands, ics.maxSFB), - lpc = this.lpc, - tmp = this.tmp, - info = ics.info, - windowCount = info.windowCount; - - for (var w = 0; w < windowCount; w++) { - var bottom = info.swbCount, - nFilt_w = this.nFilt[w], - length_w = this.length[w], - order_w = this.order[w], - coef_w = this.coef[w], - direction_w = this.direction[w]; - - for (var filt = 0; filt < nFilt_w; filt++) { - var top = bottom, - bottom = Math.max(0, tmp - length_w[filt]), - order = order_w[filt]; - - if (order === 0) continue; - - // calculate lpc coefficients - var autoc = coef_w[filt]; - for (var i = 0; i < order; i++) { - var r = -autoc[i]; - lpc[i] = r; - - for (var j = 0, len = (i + 1) >> 1; j < len; j++) { - var f = lpc[j], - b = lpc[i - 1 - j]; - - lpc[j] = f + r * b; - lpc[i - 1 - j] = b + r * f; - } - } - - var start = info.swbOffsets[Math.min(bottom, mmm)], - end = info.swbOffsets[Math.min(top, mmm)], - size, - inc = 1; - - if ((size = end - start) <= 0) continue; - - if (direction_w[filt]) { - inc = -1; - start = end - 1; - } - - start += w * 128; - - if (decode) { - // ar filter - for (var m = 0; m < size; m++, start += inc) { - for (var i = 1; i <= Math.min(m, order); i++) { - data[start] -= data[start - i * inc] * lpc[i - 1]; - } - } - } else { - // ma filter - for (var m = 0; m < size; m++, start += inc) { - tmp[0] = data[start]; - - for (var i = 1; i <= Math.min(m, order); i++) - data[start] += tmp[i] * lpc[i - 1]; - - for (var i = order; i > 0; i--) - tmp[i] = tmp[i - 1]; - } - } - } - } -}; - -module.exports = TNS; - -},{}]},{},[4]) - - -//# sourceMappingURL=aac.js.map \ No newline at end of file diff --git a/src/core/static/js/libs/jplayer/aurora/aurora.js b/src/core/static/js/libs/jplayer/aurora/aurora.js deleted file mode 100644 index 856b26b..0000000 --- a/src/core/static/js/libs/jplayer/aurora/aurora.js +++ /dev/null @@ -1,3937 +0,0 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.AV=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o> 3); - return this.bitPosition = pos & 7; - }; - - Bitstream.prototype.rewind = function(bits) { - var pos; - pos = this.bitPosition - bits; - this.stream.rewind(Math.abs(pos >> 3)); - return this.bitPosition = pos & 7; - }; - - Bitstream.prototype.seek = function(offset) { - var curOffset; - curOffset = this.offset(); - if (offset > curOffset) { - return this.advance(offset - curOffset); - } else if (offset < curOffset) { - return this.rewind(curOffset - offset); - } - }; - - Bitstream.prototype.align = function() { - if (this.bitPosition !== 0) { - this.bitPosition = 0; - return this.stream.advance(1); - } - }; - - Bitstream.prototype.read = function(bits, signed) { - var a, a0, a1, a2, a3, a4, mBits; - if (bits === 0) { - return 0; - } - mBits = bits + this.bitPosition; - if (mBits <= 8) { - a = ((this.stream.peekUInt8() << this.bitPosition) & 0xff) >>> (8 - bits); - } else if (mBits <= 16) { - a = ((this.stream.peekUInt16() << this.bitPosition) & 0xffff) >>> (16 - bits); - } else if (mBits <= 24) { - a = ((this.stream.peekUInt24() << this.bitPosition) & 0xffffff) >>> (24 - bits); - } else if (mBits <= 32) { - a = (this.stream.peekUInt32() << this.bitPosition) >>> (32 - bits); - } else if (mBits <= 40) { - a0 = this.stream.peekUInt8(0) * 0x0100000000; - a1 = this.stream.peekUInt8(1) << 24 >>> 0; - a2 = this.stream.peekUInt8(2) << 16; - a3 = this.stream.peekUInt8(3) << 8; - a4 = this.stream.peekUInt8(4); - a = a0 + a1 + a2 + a3 + a4; - a %= Math.pow(2, 40 - this.bitPosition); - a = Math.floor(a / Math.pow(2, 40 - this.bitPosition - bits)); - } else { - throw new Error("Too many bits!"); - } - if (signed) { - if (mBits < 32) { - if (a >>> (bits - 1)) { - a = ((1 << bits >>> 0) - a) * -1; - } - } else { - if (a / Math.pow(2, bits - 1) | 0) { - a = (Math.pow(2, bits) - a) * -1; - } - } - } - this.advance(bits); - return a; - }; - - Bitstream.prototype.peek = function(bits, signed) { - var a, a0, a1, a2, a3, a4, mBits; - if (bits === 0) { - return 0; - } - mBits = bits + this.bitPosition; - if (mBits <= 8) { - a = ((this.stream.peekUInt8() << this.bitPosition) & 0xff) >>> (8 - bits); - } else if (mBits <= 16) { - a = ((this.stream.peekUInt16() << this.bitPosition) & 0xffff) >>> (16 - bits); - } else if (mBits <= 24) { - a = ((this.stream.peekUInt24() << this.bitPosition) & 0xffffff) >>> (24 - bits); - } else if (mBits <= 32) { - a = (this.stream.peekUInt32() << this.bitPosition) >>> (32 - bits); - } else if (mBits <= 40) { - a0 = this.stream.peekUInt8(0) * 0x0100000000; - a1 = this.stream.peekUInt8(1) << 24 >>> 0; - a2 = this.stream.peekUInt8(2) << 16; - a3 = this.stream.peekUInt8(3) << 8; - a4 = this.stream.peekUInt8(4); - a = a0 + a1 + a2 + a3 + a4; - a %= Math.pow(2, 40 - this.bitPosition); - a = Math.floor(a / Math.pow(2, 40 - this.bitPosition - bits)); - } else { - throw new Error("Too many bits!"); - } - if (signed) { - if (mBits < 32) { - if (a >>> (bits - 1)) { - a = ((1 << bits >>> 0) - a) * -1; - } - } else { - if (a / Math.pow(2, bits - 1) | 0) { - a = (Math.pow(2, bits) - a) * -1; - } - } - } - return a; - }; - - Bitstream.prototype.readLSB = function(bits, signed) { - var a, mBits; - if (bits === 0) { - return 0; - } - if (bits > 40) { - throw new Error("Too many bits!"); - } - mBits = bits + this.bitPosition; - a = (this.stream.peekUInt8(0)) >>> this.bitPosition; - if (mBits > 8) { - a |= (this.stream.peekUInt8(1)) << (8 - this.bitPosition); - } - if (mBits > 16) { - a |= (this.stream.peekUInt8(2)) << (16 - this.bitPosition); - } - if (mBits > 24) { - a += (this.stream.peekUInt8(3)) << (24 - this.bitPosition) >>> 0; - } - if (mBits > 32) { - a += (this.stream.peekUInt8(4)) * Math.pow(2, 32 - this.bitPosition); - } - if (mBits >= 32) { - a %= Math.pow(2, bits); - } else { - a &= (1 << bits) - 1; - } - if (signed) { - if (mBits < 32) { - if (a >>> (bits - 1)) { - a = ((1 << bits >>> 0) - a) * -1; - } - } else { - if (a / Math.pow(2, bits - 1) | 0) { - a = (Math.pow(2, bits) - a) * -1; - } - } - } - this.advance(bits); - return a; - }; - - Bitstream.prototype.peekLSB = function(bits, signed) { - var a, mBits; - if (bits === 0) { - return 0; - } - if (bits > 40) { - throw new Error("Too many bits!"); - } - mBits = bits + this.bitPosition; - a = (this.stream.peekUInt8(0)) >>> this.bitPosition; - if (mBits > 8) { - a |= (this.stream.peekUInt8(1)) << (8 - this.bitPosition); - } - if (mBits > 16) { - a |= (this.stream.peekUInt8(2)) << (16 - this.bitPosition); - } - if (mBits > 24) { - a += (this.stream.peekUInt8(3)) << (24 - this.bitPosition) >>> 0; - } - if (mBits > 32) { - a += (this.stream.peekUInt8(4)) * Math.pow(2, 32 - this.bitPosition); - } - if (mBits >= 32) { - a %= Math.pow(2, bits); - } else { - a &= (1 << bits) - 1; - } - if (signed) { - if (mBits < 32) { - if (a >>> (bits - 1)) { - a = ((1 << bits >>> 0) - a) * -1; - } - } else { - if (a / Math.pow(2, bits - 1) | 0) { - a = (Math.pow(2, bits) - a) * -1; - } - } - } - return a; - }; - - return Bitstream; - -})(); - -module.exports = Bitstream; - - -},{}],7:[function(_dereq_,module,exports){ -(function (global){ -var AVBuffer; - -AVBuffer = (function() { - var BlobBuilder, URL; - - function AVBuffer(input) { - var _ref; - if (input instanceof Uint8Array) { - this.data = input; - } else if (input instanceof ArrayBuffer || Array.isArray(input) || typeof input === 'number' || ((_ref = global.Buffer) != null ? _ref.isBuffer(input) : void 0)) { - this.data = new Uint8Array(input); - } else if (input.buffer instanceof ArrayBuffer) { - this.data = new Uint8Array(input.buffer, input.byteOffset, input.length * input.BYTES_PER_ELEMENT); - } else if (input instanceof AVBuffer) { - this.data = input.data; - } else { - throw new Error("Constructing buffer with unknown type."); - } - this.length = this.data.length; - this.next = null; - this.prev = null; - } - - AVBuffer.allocate = function(size) { - return new AVBuffer(size); - }; - - AVBuffer.prototype.copy = function() { - return new AVBuffer(new Uint8Array(this.data)); - }; - - AVBuffer.prototype.slice = function(position, length) { - if (length == null) { - length = this.length; - } - if (position === 0 && length >= this.length) { - return new AVBuffer(this.data); - } else { - return new AVBuffer(this.data.subarray(position, position + length)); - } - }; - - BlobBuilder = global.BlobBuilder || global.MozBlobBuilder || global.WebKitBlobBuilder; - - URL = global.URL || global.webkitURL || global.mozURL; - - AVBuffer.makeBlob = function(data, type) { - var bb; - if (type == null) { - type = 'application/octet-stream'; - } - try { - return new Blob([data], { - type: type - }); - } catch (_error) {} - if (BlobBuilder != null) { - bb = new BlobBuilder; - bb.append(data); - return bb.getBlob(type); - } - return null; - }; - - AVBuffer.makeBlobURL = function(data, type) { - return URL != null ? URL.createObjectURL(this.makeBlob(data, type)) : void 0; - }; - - AVBuffer.revokeBlobURL = function(url) { - return URL != null ? URL.revokeObjectURL(url) : void 0; - }; - - AVBuffer.prototype.toBlob = function() { - return AVBuffer.makeBlob(this.data.buffer); - }; - - AVBuffer.prototype.toBlobURL = function() { - return AVBuffer.makeBlobURL(this.data.buffer); - }; - - return AVBuffer; - -})(); - -module.exports = AVBuffer; - - -}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],8:[function(_dereq_,module,exports){ -var BufferList; - -BufferList = (function() { - function BufferList() { - this.first = null; - this.last = null; - this.numBuffers = 0; - this.availableBytes = 0; - this.availableBuffers = 0; - } - - BufferList.prototype.copy = function() { - var result; - result = new BufferList; - result.first = this.first; - result.last = this.last; - result.numBuffers = this.numBuffers; - result.availableBytes = this.availableBytes; - result.availableBuffers = this.availableBuffers; - return result; - }; - - BufferList.prototype.append = function(buffer) { - var _ref; - buffer.prev = this.last; - if ((_ref = this.last) != null) { - _ref.next = buffer; - } - this.last = buffer; - if (this.first == null) { - this.first = buffer; - } - this.availableBytes += buffer.length; - this.availableBuffers++; - return this.numBuffers++; - }; - - BufferList.prototype.advance = function() { - if (this.first) { - this.availableBytes -= this.first.length; - this.availableBuffers--; - this.first = this.first.next; - return this.first != null; - } - return false; - }; - - BufferList.prototype.rewind = function() { - var _ref; - if (this.first && !this.first.prev) { - return false; - } - this.first = ((_ref = this.first) != null ? _ref.prev : void 0) || this.last; - if (this.first) { - this.availableBytes += this.first.length; - this.availableBuffers++; - } - return this.first != null; - }; - - BufferList.prototype.reset = function() { - var _results; - _results = []; - while (this.rewind()) { - continue; - } - return _results; - }; - - return BufferList; - -})(); - -module.exports = BufferList; - - -},{}],9:[function(_dereq_,module,exports){ -var Base, EventEmitter, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __slice = [].slice; - -Base = _dereq_('./base'); - -EventEmitter = (function(_super) { - __extends(EventEmitter, _super); - - function EventEmitter() { - return EventEmitter.__super__.constructor.apply(this, arguments); - } - - EventEmitter.prototype.on = function(event, fn) { - var _base; - if (this.events == null) { - this.events = {}; - } - if ((_base = this.events)[event] == null) { - _base[event] = []; - } - return this.events[event].push(fn); - }; - - EventEmitter.prototype.off = function(event, fn) { - var index, _ref; - if (!((_ref = this.events) != null ? _ref[event] : void 0)) { - return; - } - index = this.events[event].indexOf(fn); - if (~index) { - return this.events[event].splice(index, 1); - } - }; - - EventEmitter.prototype.once = function(event, fn) { - var cb; - return this.on(event, cb = function() { - this.off(event, cb); - return fn.apply(this, arguments); - }); - }; - - EventEmitter.prototype.emit = function() { - var args, event, fn, _i, _len, _ref, _ref1; - event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - if (!((_ref = this.events) != null ? _ref[event] : void 0)) { - return; - } - _ref1 = this.events[event].slice(); - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - fn = _ref1[_i]; - fn.apply(this, args); - } - }; - - return EventEmitter; - -})(Base); - -module.exports = EventEmitter; - - -},{"./base":5}],10:[function(_dereq_,module,exports){ -var AVBuffer, BufferList, Stream, UnderflowError; - -BufferList = _dereq_('./bufferlist'); - -AVBuffer = _dereq_('./buffer'); - -UnderflowError = _dereq_('./underflow'); - -Stream = (function() { - var buf, decodeString, float32, float64, float64Fallback, float80, int16, int32, int8, nativeEndian, uint16, uint32, uint8; - - buf = new ArrayBuffer(16); - - uint8 = new Uint8Array(buf); - - int8 = new Int8Array(buf); - - uint16 = new Uint16Array(buf); - - int16 = new Int16Array(buf); - - uint32 = new Uint32Array(buf); - - int32 = new Int32Array(buf); - - float32 = new Float32Array(buf); - - if (typeof Float64Array !== "undefined" && Float64Array !== null) { - float64 = new Float64Array(buf); - } - - nativeEndian = new Uint16Array(new Uint8Array([0x12, 0x34]).buffer)[0] === 0x3412; - - function Stream(list) { - this.list = list; - this.localOffset = 0; - this.offset = 0; - } - - Stream.fromBuffer = function(buffer) { - var list; - list = new BufferList; - list.append(buffer); - return new Stream(list); - }; - - Stream.prototype.copy = function() { - var result; - result = new Stream(this.list.copy()); - result.localOffset = this.localOffset; - result.offset = this.offset; - return result; - }; - - Stream.prototype.available = function(bytes) { - return bytes <= this.list.availableBytes - this.localOffset; - }; - - Stream.prototype.remainingBytes = function() { - return this.list.availableBytes - this.localOffset; - }; - - Stream.prototype.advance = function(bytes) { - if (!this.available(bytes)) { - throw new UnderflowError(); - } - this.localOffset += bytes; - this.offset += bytes; - while (this.list.first && this.localOffset >= this.list.first.length) { - this.localOffset -= this.list.first.length; - this.list.advance(); - } - return this; - }; - - Stream.prototype.rewind = function(bytes) { - if (bytes > this.offset) { - throw new UnderflowError(); - } - if (!this.list.first) { - this.list.rewind(); - this.localOffset = this.list.first.length; - } - this.localOffset -= bytes; - this.offset -= bytes; - while (this.list.first.prev && this.localOffset < 0) { - this.list.rewind(); - this.localOffset += this.list.first.length; - } - return this; - }; - - Stream.prototype.seek = function(position) { - if (position > this.offset) { - return this.advance(position - this.offset); - } else if (position < this.offset) { - return this.rewind(this.offset - position); - } - }; - - Stream.prototype.readUInt8 = function() { - var a; - if (!this.available(1)) { - throw new UnderflowError(); - } - a = this.list.first.data[this.localOffset]; - this.localOffset += 1; - this.offset += 1; - if (this.localOffset === this.list.first.length) { - this.localOffset = 0; - this.list.advance(); - } - return a; - }; - - Stream.prototype.peekUInt8 = function(offset) { - var buffer; - if (offset == null) { - offset = 0; - } - if (!this.available(offset + 1)) { - throw new UnderflowError(); - } - offset = this.localOffset + offset; - buffer = this.list.first; - while (buffer) { - if (buffer.length > offset) { - return buffer.data[offset]; - } - offset -= buffer.length; - buffer = buffer.next; - } - return 0; - }; - - Stream.prototype.read = function(bytes, littleEndian) { - var i, _i, _j, _ref; - if (littleEndian == null) { - littleEndian = false; - } - if (littleEndian === nativeEndian) { - for (i = _i = 0; _i < bytes; i = _i += 1) { - uint8[i] = this.readUInt8(); - } - } else { - for (i = _j = _ref = bytes - 1; _j >= 0; i = _j += -1) { - uint8[i] = this.readUInt8(); - } - } - }; - - Stream.prototype.peek = function(bytes, offset, littleEndian) { - var i, _i, _j; - if (littleEndian == null) { - littleEndian = false; - } - if (littleEndian === nativeEndian) { - for (i = _i = 0; _i < bytes; i = _i += 1) { - uint8[i] = this.peekUInt8(offset + i); - } - } else { - for (i = _j = 0; _j < bytes; i = _j += 1) { - uint8[bytes - i - 1] = this.peekUInt8(offset + i); - } - } - }; - - Stream.prototype.readInt8 = function() { - this.read(1); - return int8[0]; - }; - - Stream.prototype.peekInt8 = function(offset) { - if (offset == null) { - offset = 0; - } - this.peek(1, offset); - return int8[0]; - }; - - Stream.prototype.readUInt16 = function(littleEndian) { - this.read(2, littleEndian); - return uint16[0]; - }; - - Stream.prototype.peekUInt16 = function(offset, littleEndian) { - if (offset == null) { - offset = 0; - } - this.peek(2, offset, littleEndian); - return uint16[0]; - }; - - Stream.prototype.readInt16 = function(littleEndian) { - this.read(2, littleEndian); - return int16[0]; - }; - - Stream.prototype.peekInt16 = function(offset, littleEndian) { - if (offset == null) { - offset = 0; - } - this.peek(2, offset, littleEndian); - return int16[0]; - }; - - Stream.prototype.readUInt24 = function(littleEndian) { - if (littleEndian) { - return this.readUInt16(true) + (this.readUInt8() << 16); - } else { - return (this.readUInt16() << 8) + this.readUInt8(); - } - }; - - Stream.prototype.peekUInt24 = function(offset, littleEndian) { - if (offset == null) { - offset = 0; - } - if (littleEndian) { - return this.peekUInt16(offset, true) + (this.peekUInt8(offset + 2) << 16); - } else { - return (this.peekUInt16(offset) << 8) + this.peekUInt8(offset + 2); - } - }; - - Stream.prototype.readInt24 = function(littleEndian) { - if (littleEndian) { - return this.readUInt16(true) + (this.readInt8() << 16); - } else { - return (this.readInt16() << 8) + this.readUInt8(); - } - }; - - Stream.prototype.peekInt24 = function(offset, littleEndian) { - if (offset == null) { - offset = 0; - } - if (littleEndian) { - return this.peekUInt16(offset, true) + (this.peekInt8(offset + 2) << 16); - } else { - return (this.peekInt16(offset) << 8) + this.peekUInt8(offset + 2); - } - }; - - Stream.prototype.readUInt32 = function(littleEndian) { - this.read(4, littleEndian); - return uint32[0]; - }; - - Stream.prototype.peekUInt32 = function(offset, littleEndian) { - if (offset == null) { - offset = 0; - } - this.peek(4, offset, littleEndian); - return uint32[0]; - }; - - Stream.prototype.readInt32 = function(littleEndian) { - this.read(4, littleEndian); - return int32[0]; - }; - - Stream.prototype.peekInt32 = function(offset, littleEndian) { - if (offset == null) { - offset = 0; - } - this.peek(4, offset, littleEndian); - return int32[0]; - }; - - Stream.prototype.readFloat32 = function(littleEndian) { - this.read(4, littleEndian); - return float32[0]; - }; - - Stream.prototype.peekFloat32 = function(offset, littleEndian) { - if (offset == null) { - offset = 0; - } - this.peek(4, offset, littleEndian); - return float32[0]; - }; - - Stream.prototype.readFloat64 = function(littleEndian) { - this.read(8, littleEndian); - if (float64) { - return float64[0]; - } else { - return float64Fallback(); - } - }; - - float64Fallback = function() { - var exp, frac, high, low, out, sign; - low = uint32[0], high = uint32[1]; - if (!high || high === 0x80000000) { - return 0.0; - } - sign = 1 - (high >>> 31) * 2; - exp = (high >>> 20) & 0x7ff; - frac = high & 0xfffff; - if (exp === 0x7ff) { - if (frac) { - return NaN; - } - return sign * Infinity; - } - exp -= 1023; - out = (frac | 0x100000) * Math.pow(2, exp - 20); - out += low * Math.pow(2, exp - 52); - return sign * out; - }; - - Stream.prototype.peekFloat64 = function(offset, littleEndian) { - if (offset == null) { - offset = 0; - } - this.peek(8, offset, littleEndian); - if (float64) { - return float64[0]; - } else { - return float64Fallback(); - } - }; - - Stream.prototype.readFloat80 = function(littleEndian) { - this.read(10, littleEndian); - return float80(); - }; - - float80 = function() { - var a0, a1, exp, high, low, out, sign; - high = uint32[0], low = uint32[1]; - a0 = uint8[9]; - a1 = uint8[8]; - sign = 1 - (a0 >>> 7) * 2; - exp = ((a0 & 0x7F) << 8) | a1; - if (exp === 0 && low === 0 && high === 0) { - return 0; - } - if (exp === 0x7fff) { - if (low === 0 && high === 0) { - return sign * Infinity; - } - return NaN; - } - exp -= 16383; - out = low * Math.pow(2, exp - 31); - out += high * Math.pow(2, exp - 63); - return sign * out; - }; - - Stream.prototype.peekFloat80 = function(offset, littleEndian) { - if (offset == null) { - offset = 0; - } - this.peek(10, offset, littleEndian); - return float80(); - }; - - Stream.prototype.readBuffer = function(length) { - var i, result, to, _i; - result = AVBuffer.allocate(length); - to = result.data; - for (i = _i = 0; _i < length; i = _i += 1) { - to[i] = this.readUInt8(); - } - return result; - }; - - Stream.prototype.peekBuffer = function(offset, length) { - var i, result, to, _i; - if (offset == null) { - offset = 0; - } - result = AVBuffer.allocate(length); - to = result.data; - for (i = _i = 0; _i < length; i = _i += 1) { - to[i] = this.peekUInt8(offset + i); - } - return result; - }; - - Stream.prototype.readSingleBuffer = function(length) { - var result; - result = this.list.first.slice(this.localOffset, length); - this.advance(result.length); - return result; - }; - - Stream.prototype.peekSingleBuffer = function(offset, length) { - var result; - result = this.list.first.slice(this.localOffset + offset, length); - return result; - }; - - Stream.prototype.readString = function(length, encoding) { - if (encoding == null) { - encoding = 'ascii'; - } - return decodeString.call(this, 0, length, encoding, true); - }; - - Stream.prototype.peekString = function(offset, length, encoding) { - if (offset == null) { - offset = 0; - } - if (encoding == null) { - encoding = 'ascii'; - } - return decodeString.call(this, offset, length, encoding, false); - }; - - decodeString = function(offset, length, encoding, advance) { - var b1, b2, b3, b4, bom, c, end, littleEndian, nullEnd, pt, result, w1, w2; - encoding = encoding.toLowerCase(); - nullEnd = length === null ? 0 : -1; - if (length == null) { - length = Infinity; - } - end = offset + length; - result = ''; - switch (encoding) { - case 'ascii': - case 'latin1': - while (offset < end && (c = this.peekUInt8(offset++)) !== nullEnd) { - result += String.fromCharCode(c); - } - break; - case 'utf8': - case 'utf-8': - while (offset < end && (b1 = this.peekUInt8(offset++)) !== nullEnd) { - if ((b1 & 0x80) === 0) { - result += String.fromCharCode(b1); - } else if ((b1 & 0xe0) === 0xc0) { - b2 = this.peekUInt8(offset++) & 0x3f; - result += String.fromCharCode(((b1 & 0x1f) << 6) | b2); - } else if ((b1 & 0xf0) === 0xe0) { - b2 = this.peekUInt8(offset++) & 0x3f; - b3 = this.peekUInt8(offset++) & 0x3f; - result += String.fromCharCode(((b1 & 0x0f) << 12) | (b2 << 6) | b3); - } else if ((b1 & 0xf8) === 0xf0) { - b2 = this.peekUInt8(offset++) & 0x3f; - b3 = this.peekUInt8(offset++) & 0x3f; - b4 = this.peekUInt8(offset++) & 0x3f; - pt = (((b1 & 0x0f) << 18) | (b2 << 12) | (b3 << 6) | b4) - 0x10000; - result += String.fromCharCode(0xd800 + (pt >> 10), 0xdc00 + (pt & 0x3ff)); - } - } - break; - case 'utf16-be': - case 'utf16be': - case 'utf16le': - case 'utf16-le': - case 'utf16bom': - case 'utf16-bom': - switch (encoding) { - case 'utf16be': - case 'utf16-be': - littleEndian = false; - break; - case 'utf16le': - case 'utf16-le': - littleEndian = true; - break; - case 'utf16bom': - case 'utf16-bom': - if (length < 2 || (bom = this.peekUInt16(offset)) === nullEnd) { - if (advance) { - this.advance(offset += 2); - } - return result; - } - littleEndian = bom === 0xfffe; - offset += 2; - } - while (offset < end && (w1 = this.peekUInt16(offset, littleEndian)) !== nullEnd) { - offset += 2; - if (w1 < 0xd800 || w1 > 0xdfff) { - result += String.fromCharCode(w1); - } else { - if (w1 > 0xdbff) { - throw new Error("Invalid utf16 sequence."); - } - w2 = this.peekUInt16(offset, littleEndian); - if (w2 < 0xdc00 || w2 > 0xdfff) { - throw new Error("Invalid utf16 sequence."); - } - result += String.fromCharCode(w1, w2); - offset += 2; - } - } - if (w1 === nullEnd) { - offset += 2; - } - break; - default: - throw new Error("Unknown encoding: " + encoding); - } - if (advance) { - this.advance(offset); - } - return result; - }; - - return Stream; - -})(); - -module.exports = Stream; - - -},{"./buffer":7,"./bufferlist":8,"./underflow":11}],11:[function(_dereq_,module,exports){ -var UnderflowError, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -UnderflowError = (function(_super) { - __extends(UnderflowError, _super); - - function UnderflowError() { - UnderflowError.__super__.constructor.apply(this, arguments); - this.name = 'UnderflowError'; - this.stack = new Error().stack; - } - - return UnderflowError; - -})(Error); - -module.exports = UnderflowError; - - -},{}],12:[function(_dereq_,module,exports){ -var Bitstream, BufferList, Decoder, EventEmitter, Stream, UnderflowError, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -EventEmitter = _dereq_('./core/events'); - -BufferList = _dereq_('./core/bufferlist'); - -Stream = _dereq_('./core/stream'); - -Bitstream = _dereq_('./core/bitstream'); - -UnderflowError = _dereq_('./core/underflow'); - -Decoder = (function(_super) { - var codecs; - - __extends(Decoder, _super); - - function Decoder(demuxer, format) { - var list; - this.demuxer = demuxer; - this.format = format; - list = new BufferList; - this.stream = new Stream(list); - this.bitstream = new Bitstream(this.stream); - this.receivedFinalBuffer = false; - this.waiting = false; - this.demuxer.on('cookie', (function(_this) { - return function(cookie) { - var error; - try { - return _this.setCookie(cookie); - } catch (_error) { - error = _error; - return _this.emit('error', error); - } - }; - })(this)); - this.demuxer.on('data', (function(_this) { - return function(chunk) { - list.append(chunk); - if (_this.waiting) { - return _this.decode(); - } - }; - })(this)); - this.demuxer.on('end', (function(_this) { - return function() { - _this.receivedFinalBuffer = true; - if (_this.waiting) { - return _this.decode(); - } - }; - })(this)); - this.init(); - } - - Decoder.prototype.init = function() {}; - - Decoder.prototype.setCookie = function(cookie) {}; - - Decoder.prototype.readChunk = function() {}; - - Decoder.prototype.decode = function() { - var error, offset, packet; - this.waiting = false; - offset = this.bitstream.offset(); - try { - packet = this.readChunk(); - } catch (_error) { - error = _error; - if (!(error instanceof UnderflowError)) { - this.emit('error', error); - return false; - } - } - if (packet) { - this.emit('data', packet); - return true; - } else if (!this.receivedFinalBuffer) { - this.bitstream.seek(offset); - this.waiting = true; - } else { - this.emit('end'); - } - return false; - }; - - Decoder.prototype.seek = function(timestamp) { - var seekPoint; - seekPoint = this.demuxer.seek(timestamp); - this.stream.seek(seekPoint.offset); - return seekPoint.timestamp; - }; - - codecs = {}; - - Decoder.register = function(id, decoder) { - return codecs[id] = decoder; - }; - - Decoder.find = function(id) { - return codecs[id] || null; - }; - - return Decoder; - -})(EventEmitter); - -module.exports = Decoder; - - -},{"./core/bitstream":6,"./core/bufferlist":8,"./core/events":9,"./core/stream":10,"./core/underflow":11}],13:[function(_dereq_,module,exports){ -var Decoder, LPCMDecoder, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -Decoder = _dereq_('../decoder'); - -LPCMDecoder = (function(_super) { - __extends(LPCMDecoder, _super); - - function LPCMDecoder() { - this.readChunk = __bind(this.readChunk, this); - return LPCMDecoder.__super__.constructor.apply(this, arguments); - } - - Decoder.register('lpcm', LPCMDecoder); - - LPCMDecoder.prototype.readChunk = function() { - var chunkSize, i, littleEndian, output, samples, stream, _i, _j, _k, _l, _m, _n; - stream = this.stream; - littleEndian = this.format.littleEndian; - chunkSize = Math.min(4096, stream.remainingBytes()); - samples = chunkSize / (this.format.bitsPerChannel / 8) | 0; - if (chunkSize < this.format.bitsPerChannel / 8) { - return null; - } - if (this.format.floatingPoint) { - switch (this.format.bitsPerChannel) { - case 32: - output = new Float32Array(samples); - for (i = _i = 0; _i < samples; i = _i += 1) { - output[i] = stream.readFloat32(littleEndian); - } - break; - case 64: - output = new Float64Array(samples); - for (i = _j = 0; _j < samples; i = _j += 1) { - output[i] = stream.readFloat64(littleEndian); - } - break; - default: - throw new Error('Unsupported bit depth.'); - } - } else { - switch (this.format.bitsPerChannel) { - case 8: - output = new Int8Array(samples); - for (i = _k = 0; _k < samples; i = _k += 1) { - output[i] = stream.readInt8(); - } - break; - case 16: - output = new Int16Array(samples); - for (i = _l = 0; _l < samples; i = _l += 1) { - output[i] = stream.readInt16(littleEndian); - } - break; - case 24: - output = new Int32Array(samples); - for (i = _m = 0; _m < samples; i = _m += 1) { - output[i] = stream.readInt24(littleEndian); - } - break; - case 32: - output = new Int32Array(samples); - for (i = _n = 0; _n < samples; i = _n += 1) { - output[i] = stream.readInt32(littleEndian); - } - break; - default: - throw new Error('Unsupported bit depth.'); - } - } - return output; - }; - - return LPCMDecoder; - -})(Decoder); - - -},{"../decoder":12}],14:[function(_dereq_,module,exports){ -var Decoder, XLAWDecoder, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -Decoder = _dereq_('../decoder'); - -XLAWDecoder = (function(_super) { - var BIAS, QUANT_MASK, SEG_MASK, SEG_SHIFT, SIGN_BIT; - - __extends(XLAWDecoder, _super); - - function XLAWDecoder() { - this.readChunk = __bind(this.readChunk, this); - return XLAWDecoder.__super__.constructor.apply(this, arguments); - } - - Decoder.register('ulaw', XLAWDecoder); - - Decoder.register('alaw', XLAWDecoder); - - SIGN_BIT = 0x80; - - QUANT_MASK = 0xf; - - SEG_SHIFT = 4; - - SEG_MASK = 0x70; - - BIAS = 0x84; - - XLAWDecoder.prototype.init = function() { - var i, seg, t, table, val, _i, _j; - this.format.bitsPerChannel = 16; - this.table = table = new Int16Array(256); - if (this.format.formatID === 'ulaw') { - for (i = _i = 0; _i < 256; i = ++_i) { - val = ~i; - t = ((val & QUANT_MASK) << 3) + BIAS; - t <<= (val & SEG_MASK) >>> SEG_SHIFT; - table[i] = val & SIGN_BIT ? BIAS - t : t - BIAS; - } - } else { - for (i = _j = 0; _j < 256; i = ++_j) { - val = i ^ 0x55; - t = val & QUANT_MASK; - seg = (val & SEG_MASK) >>> SEG_SHIFT; - if (seg) { - t = (t + t + 1 + 32) << (seg + 2); - } else { - t = (t + t + 1) << 3; - } - table[i] = val & SIGN_BIT ? t : -t; - } - } - }; - - XLAWDecoder.prototype.readChunk = function() { - var i, output, samples, stream, table, _i; - stream = this.stream, table = this.table; - samples = Math.min(4096, this.stream.remainingBytes()); - if (samples === 0) { - return; - } - output = new Int16Array(samples); - for (i = _i = 0; _i < samples; i = _i += 1) { - output[i] = table[stream.readUInt8()]; - } - return output; - }; - - return XLAWDecoder; - -})(Decoder); - - -},{"../decoder":12}],15:[function(_dereq_,module,exports){ -var BufferList, Demuxer, EventEmitter, Stream, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -EventEmitter = _dereq_('./core/events'); - -BufferList = _dereq_('./core/bufferlist'); - -Stream = _dereq_('./core/stream'); - -Demuxer = (function(_super) { - var formats; - - __extends(Demuxer, _super); - - Demuxer.probe = function(buffer) { - return false; - }; - - function Demuxer(source, chunk) { - var list, received; - list = new BufferList; - list.append(chunk); - this.stream = new Stream(list); - received = false; - source.on('data', (function(_this) { - return function(chunk) { - received = true; - list.append(chunk); - return _this.readChunk(chunk); - }; - })(this)); - source.on('error', (function(_this) { - return function(err) { - return _this.emit('error', err); - }; - })(this)); - source.on('end', (function(_this) { - return function() { - if (!received) { - _this.readChunk(chunk); - } - return _this.emit('end'); - }; - })(this)); - this.seekPoints = []; - this.init(); - } - - Demuxer.prototype.init = function() {}; - - Demuxer.prototype.readChunk = function(chunk) {}; - - Demuxer.prototype.addSeekPoint = function(offset, timestamp) { - var index; - index = this.searchTimestamp(timestamp); - return this.seekPoints.splice(index, 0, { - offset: offset, - timestamp: timestamp - }); - }; - - Demuxer.prototype.searchTimestamp = function(timestamp, backward) { - var high, low, mid, time; - low = 0; - high = this.seekPoints.length; - if (high > 0 && this.seekPoints[high - 1].timestamp < timestamp) { - return high; - } - while (low < high) { - mid = (low + high) >> 1; - time = this.seekPoints[mid].timestamp; - if (time < timestamp) { - low = mid + 1; - } else if (time >= timestamp) { - high = mid; - } - } - if (high > this.seekPoints.length) { - high = this.seekPoints.length; - } - return high; - }; - - Demuxer.prototype.seek = function(timestamp) { - var index, seekPoint; - if (this.format && this.format.framesPerPacket > 0 && this.format.bytesPerPacket > 0) { - seekPoint = { - timestamp: timestamp, - offset: this.format.bytesPerPacket * timestamp / this.format.framesPerPacket - }; - return seekPoint; - } else { - index = this.searchTimestamp(timestamp); - return this.seekPoints[index]; - } - }; - - formats = []; - - Demuxer.register = function(demuxer) { - return formats.push(demuxer); - }; - - Demuxer.find = function(buffer) { - var e, format, offset, stream, _i, _len; - stream = Stream.fromBuffer(buffer); - for (_i = 0, _len = formats.length; _i < _len; _i++) { - format = formats[_i]; - offset = stream.offset; - try { - if (format.probe(stream)) { - return format; - } - } catch (_error) { - e = _error; - } - stream.seek(offset); - } - return null; - }; - - return Demuxer; - -})(EventEmitter); - -module.exports = Demuxer; - - -},{"./core/bufferlist":8,"./core/events":9,"./core/stream":10}],16:[function(_dereq_,module,exports){ -var AIFFDemuxer, Demuxer, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -Demuxer = _dereq_('../demuxer'); - -AIFFDemuxer = (function(_super) { - __extends(AIFFDemuxer, _super); - - function AIFFDemuxer() { - return AIFFDemuxer.__super__.constructor.apply(this, arguments); - } - - Demuxer.register(AIFFDemuxer); - - AIFFDemuxer.probe = function(buffer) { - var _ref; - return buffer.peekString(0, 4) === 'FORM' && ((_ref = buffer.peekString(8, 4)) === 'AIFF' || _ref === 'AIFC'); - }; - - AIFFDemuxer.prototype.readChunk = function() { - var buffer, format, offset, _ref; - if (!this.readStart && this.stream.available(12)) { - if (this.stream.readString(4) !== 'FORM') { - return this.emit('error', 'Invalid AIFF.'); - } - this.fileSize = this.stream.readUInt32(); - this.fileType = this.stream.readString(4); - this.readStart = true; - if ((_ref = this.fileType) !== 'AIFF' && _ref !== 'AIFC') { - return this.emit('error', 'Invalid AIFF.'); - } - } - while (this.stream.available(1)) { - if (!this.readHeaders && this.stream.available(8)) { - this.type = this.stream.readString(4); - this.len = this.stream.readUInt32(); - } - switch (this.type) { - case 'COMM': - if (!this.stream.available(this.len)) { - return; - } - this.format = { - formatID: 'lpcm', - channelsPerFrame: this.stream.readUInt16(), - sampleCount: this.stream.readUInt32(), - bitsPerChannel: this.stream.readUInt16(), - sampleRate: this.stream.readFloat80(), - framesPerPacket: 1, - littleEndian: false, - floatingPoint: false - }; - this.format.bytesPerPacket = (this.format.bitsPerChannel / 8) * this.format.channelsPerFrame; - if (this.fileType === 'AIFC') { - format = this.stream.readString(4); - this.format.littleEndian = format === 'sowt' && this.format.bitsPerChannel > 8; - this.format.floatingPoint = format === 'fl32' || format === 'fl64'; - if (format === 'twos' || format === 'sowt' || format === 'fl32' || format === 'fl64' || format === 'NONE') { - format = 'lpcm'; - } - this.format.formatID = format; - this.len -= 4; - } - this.stream.advance(this.len - 18); - this.emit('format', this.format); - this.emit('duration', this.format.sampleCount / this.format.sampleRate * 1000 | 0); - break; - case 'SSND': - if (!(this.readSSNDHeader && this.stream.available(4))) { - offset = this.stream.readUInt32(); - this.stream.advance(4); - this.stream.advance(offset); - this.readSSNDHeader = true; - } - buffer = this.stream.readSingleBuffer(this.len); - this.len -= buffer.length; - this.readHeaders = this.len > 0; - this.emit('data', buffer); - break; - default: - if (!this.stream.available(this.len)) { - return; - } - this.stream.advance(this.len); - } - if (this.type !== 'SSND') { - this.readHeaders = false; - } - } - }; - - return AIFFDemuxer; - -})(Demuxer); - - -},{"../demuxer":15}],17:[function(_dereq_,module,exports){ -var AUDemuxer, Demuxer, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -Demuxer = _dereq_('../demuxer'); - -AUDemuxer = (function(_super) { - var bps, formats; - - __extends(AUDemuxer, _super); - - function AUDemuxer() { - return AUDemuxer.__super__.constructor.apply(this, arguments); - } - - Demuxer.register(AUDemuxer); - - AUDemuxer.probe = function(buffer) { - return buffer.peekString(0, 4) === '.snd'; - }; - - bps = [8, 8, 16, 24, 32, 32, 64]; - - bps[26] = 8; - - formats = { - 1: 'ulaw', - 27: 'alaw' - }; - - AUDemuxer.prototype.readChunk = function() { - var bytes, dataSize, encoding, size; - if (!this.readHeader && this.stream.available(24)) { - if (this.stream.readString(4) !== '.snd') { - return this.emit('error', 'Invalid AU file.'); - } - size = this.stream.readUInt32(); - dataSize = this.stream.readUInt32(); - encoding = this.stream.readUInt32(); - this.format = { - formatID: formats[encoding] || 'lpcm', - littleEndian: false, - floatingPoint: encoding === 6 || encoding === 7, - bitsPerChannel: bps[encoding - 1], - sampleRate: this.stream.readUInt32(), - channelsPerFrame: this.stream.readUInt32(), - framesPerPacket: 1 - }; - if (this.format.bitsPerChannel == null) { - return this.emit('error', 'Unsupported encoding in AU file.'); - } - this.format.bytesPerPacket = (this.format.bitsPerChannel / 8) * this.format.channelsPerFrame; - if (dataSize !== 0xffffffff) { - bytes = this.format.bitsPerChannel / 8; - this.emit('duration', dataSize / bytes / this.format.channelsPerFrame / this.format.sampleRate * 1000 | 0); - } - this.emit('format', this.format); - this.readHeader = true; - } - if (this.readHeader) { - while (this.stream.available(1)) { - this.emit('data', this.stream.readSingleBuffer(this.stream.remainingBytes())); - } - } - }; - - return AUDemuxer; - -})(Demuxer); - - -},{"../demuxer":15}],18:[function(_dereq_,module,exports){ -var CAFDemuxer, Demuxer, M4ADemuxer, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -Demuxer = _dereq_('../demuxer'); - -M4ADemuxer = _dereq_('./m4a'); - -CAFDemuxer = (function(_super) { - __extends(CAFDemuxer, _super); - - function CAFDemuxer() { - return CAFDemuxer.__super__.constructor.apply(this, arguments); - } - - Demuxer.register(CAFDemuxer); - - CAFDemuxer.probe = function(buffer) { - return buffer.peekString(0, 4) === 'caff'; - }; - - CAFDemuxer.prototype.readChunk = function() { - var buffer, byteOffset, cookie, entries, flags, i, key, metadata, offset, sampleOffset, value, _i, _j, _ref; - if (!this.format && this.stream.available(64)) { - if (this.stream.readString(4) !== 'caff') { - return this.emit('error', "Invalid CAF, does not begin with 'caff'"); - } - this.stream.advance(4); - if (this.stream.readString(4) !== 'desc') { - return this.emit('error', "Invalid CAF, 'caff' is not followed by 'desc'"); - } - if (!(this.stream.readUInt32() === 0 && this.stream.readUInt32() === 32)) { - return this.emit('error', "Invalid 'desc' size, should be 32"); - } - this.format = {}; - this.format.sampleRate = this.stream.readFloat64(); - this.format.formatID = this.stream.readString(4); - flags = this.stream.readUInt32(); - if (this.format.formatID === 'lpcm') { - this.format.floatingPoint = Boolean(flags & 1); - this.format.littleEndian = Boolean(flags & 2); - } - this.format.bytesPerPacket = this.stream.readUInt32(); - this.format.framesPerPacket = this.stream.readUInt32(); - this.format.channelsPerFrame = this.stream.readUInt32(); - this.format.bitsPerChannel = this.stream.readUInt32(); - this.emit('format', this.format); - } - while (this.stream.available(1)) { - if (!this.headerCache) { - this.headerCache = { - type: this.stream.readString(4), - oversize: this.stream.readUInt32() !== 0, - size: this.stream.readUInt32() - }; - if (this.headerCache.oversize) { - return this.emit('error', "Holy Shit, an oversized file, not supported in JS"); - } - } - switch (this.headerCache.type) { - case 'kuki': - if (this.stream.available(this.headerCache.size)) { - if (this.format.formatID === 'aac ') { - offset = this.stream.offset + this.headerCache.size; - if (cookie = M4ADemuxer.readEsds(this.stream)) { - this.emit('cookie', cookie); - } - this.stream.seek(offset); - } else { - buffer = this.stream.readBuffer(this.headerCache.size); - this.emit('cookie', buffer); - } - this.headerCache = null; - } - break; - case 'pakt': - if (this.stream.available(this.headerCache.size)) { - if (this.stream.readUInt32() !== 0) { - return this.emit('error', 'Sizes greater than 32 bits are not supported.'); - } - this.numPackets = this.stream.readUInt32(); - if (this.stream.readUInt32() !== 0) { - return this.emit('error', 'Sizes greater than 32 bits are not supported.'); - } - this.numFrames = this.stream.readUInt32(); - this.primingFrames = this.stream.readUInt32(); - this.remainderFrames = this.stream.readUInt32(); - this.emit('duration', this.numFrames / this.format.sampleRate * 1000 | 0); - this.sentDuration = true; - byteOffset = 0; - sampleOffset = 0; - for (i = _i = 0, _ref = this.numPackets; _i < _ref; i = _i += 1) { - this.addSeekPoint(byteOffset, sampleOffset); - byteOffset += this.format.bytesPerPacket || M4ADemuxer.readDescrLen(this.stream); - sampleOffset += this.format.framesPerPacket || M4ADemuxer.readDescrLen(this.stream); - } - this.headerCache = null; - } - break; - case 'info': - entries = this.stream.readUInt32(); - metadata = {}; - for (i = _j = 0; 0 <= entries ? _j < entries : _j > entries; i = 0 <= entries ? ++_j : --_j) { - key = this.stream.readString(null); - value = this.stream.readString(null); - metadata[key] = value; - } - this.emit('metadata', metadata); - this.headerCache = null; - break; - case 'data': - if (!this.sentFirstDataChunk) { - this.stream.advance(4); - this.headerCache.size -= 4; - if (this.format.bytesPerPacket !== 0 && !this.sentDuration) { - this.numFrames = this.headerCache.size / this.format.bytesPerPacket; - this.emit('duration', this.numFrames / this.format.sampleRate * 1000 | 0); - } - this.sentFirstDataChunk = true; - } - buffer = this.stream.readSingleBuffer(this.headerCache.size); - this.headerCache.size -= buffer.length; - this.emit('data', buffer); - if (this.headerCache.size <= 0) { - this.headerCache = null; - } - break; - default: - if (this.stream.available(this.headerCache.size)) { - this.stream.advance(this.headerCache.size); - this.headerCache = null; - } - } - } - }; - - return CAFDemuxer; - -})(Demuxer); - - -},{"../demuxer":15,"./m4a":19}],19:[function(_dereq_,module,exports){ -var Demuxer, M4ADemuxer, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - -Demuxer = _dereq_('../demuxer'); - -M4ADemuxer = (function(_super) { - var BITS_PER_CHANNEL, TYPES, after, atom, atoms, bool, containers, diskTrack, genres, meta, string; - - __extends(M4ADemuxer, _super); - - function M4ADemuxer() { - return M4ADemuxer.__super__.constructor.apply(this, arguments); - } - - Demuxer.register(M4ADemuxer); - - TYPES = ['M4A ', 'M4P ', 'M4B ', 'M4V ', 'isom', 'mp42', 'qt ']; - - M4ADemuxer.probe = function(buffer) { - var _ref; - return buffer.peekString(4, 4) === 'ftyp' && (_ref = buffer.peekString(8, 4), __indexOf.call(TYPES, _ref) >= 0); - }; - - M4ADemuxer.prototype.init = function() { - this.atoms = []; - this.offsets = []; - this.track = null; - return this.tracks = []; - }; - - atoms = {}; - - containers = {}; - - atom = function(name, fn) { - var c, container, _i, _len, _ref; - c = []; - _ref = name.split('.').slice(0, -1); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - container = _ref[_i]; - c.push(container); - containers[c.join('.')] = true; - } - if (atoms[name] == null) { - atoms[name] = {}; - } - return atoms[name].fn = fn; - }; - - after = function(name, fn) { - if (atoms[name] == null) { - atoms[name] = {}; - } - return atoms[name].after = fn; - }; - - M4ADemuxer.prototype.readChunk = function() { - var handler, path, type; - this["break"] = false; - while (this.stream.available(1) && !this["break"]) { - if (!this.readHeaders) { - if (!this.stream.available(8)) { - return; - } - this.len = this.stream.readUInt32() - 8; - this.type = this.stream.readString(4); - if (this.len === 0) { - continue; - } - this.atoms.push(this.type); - this.offsets.push(this.stream.offset + this.len); - this.readHeaders = true; - } - path = this.atoms.join('.'); - handler = atoms[path]; - if (handler != null ? handler.fn : void 0) { - if (!(this.stream.available(this.len) || path === 'mdat')) { - return; - } - handler.fn.call(this); - if (path in containers) { - this.readHeaders = false; - } - } else if (path in containers) { - this.readHeaders = false; - } else { - if (!this.stream.available(this.len)) { - return; - } - this.stream.advance(this.len); - } - while (this.stream.offset >= this.offsets[this.offsets.length - 1]) { - handler = atoms[this.atoms.join('.')]; - if (handler != null ? handler.after : void 0) { - handler.after.call(this); - } - type = this.atoms.pop(); - this.offsets.pop(); - this.readHeaders = false; - } - } - }; - - atom('ftyp', function() { - var _ref; - if (_ref = this.stream.readString(4), __indexOf.call(TYPES, _ref) < 0) { - return this.emit('error', 'Not a valid M4A file.'); - } - return this.stream.advance(this.len - 4); - }); - - atom('moov.trak', function() { - this.track = {}; - return this.tracks.push(this.track); - }); - - atom('moov.trak.tkhd', function() { - this.stream.advance(4); - this.stream.advance(8); - this.track.id = this.stream.readUInt32(); - return this.stream.advance(this.len - 16); - }); - - atom('moov.trak.mdia.hdlr', function() { - this.stream.advance(4); - this.stream.advance(4); - this.track.type = this.stream.readString(4); - this.stream.advance(12); - return this.stream.advance(this.len - 24); - }); - - atom('moov.trak.mdia.mdhd', function() { - this.stream.advance(4); - this.stream.advance(8); - this.track.timeScale = this.stream.readUInt32(); - this.track.duration = this.stream.readUInt32(); - return this.stream.advance(4); - }); - - BITS_PER_CHANNEL = { - ulaw: 8, - alaw: 8, - in24: 24, - in32: 32, - fl32: 32, - fl64: 64 - }; - - atom('moov.trak.mdia.minf.stbl.stsd', function() { - var format, numEntries, version, _ref, _ref1; - this.stream.advance(4); - numEntries = this.stream.readUInt32(); - if (this.track.type !== 'soun') { - return this.stream.advance(this.len - 8); - } - if (numEntries !== 1) { - return this.emit('error', "Only expecting one entry in sample description atom!"); - } - this.stream.advance(4); - format = this.track.format = {}; - format.formatID = this.stream.readString(4); - this.stream.advance(6); - this.stream.advance(2); - version = this.stream.readUInt16(); - this.stream.advance(6); - format.channelsPerFrame = this.stream.readUInt16(); - format.bitsPerChannel = this.stream.readUInt16(); - this.stream.advance(4); - format.sampleRate = this.stream.readUInt16(); - this.stream.advance(2); - if (version === 1) { - format.framesPerPacket = this.stream.readUInt32(); - this.stream.advance(4); - format.bytesPerFrame = this.stream.readUInt32(); - this.stream.advance(4); - } else if (version !== 0) { - this.emit('error', 'Unknown version in stsd atom'); - } - if (BITS_PER_CHANNEL[format.formatID] != null) { - format.bitsPerChannel = BITS_PER_CHANNEL[format.formatID]; - } - format.floatingPoint = (_ref = format.formatID) === 'fl32' || _ref === 'fl64'; - format.littleEndian = format.formatID === 'sowt' && format.bitsPerChannel > 8; - if ((_ref1 = format.formatID) === 'twos' || _ref1 === 'sowt' || _ref1 === 'in24' || _ref1 === 'in32' || _ref1 === 'fl32' || _ref1 === 'fl64' || _ref1 === 'raw ' || _ref1 === 'NONE') { - return format.formatID = 'lpcm'; - } - }); - - atom('moov.trak.mdia.minf.stbl.stsd.alac', function() { - this.stream.advance(4); - return this.track.cookie = this.stream.readBuffer(this.len - 4); - }); - - atom('moov.trak.mdia.minf.stbl.stsd.esds', function() { - var offset; - offset = this.stream.offset + this.len; - this.track.cookie = M4ADemuxer.readEsds(this.stream); - return this.stream.seek(offset); - }); - - atom('moov.trak.mdia.minf.stbl.stsd.wave.enda', function() { - return this.track.format.littleEndian = !!this.stream.readUInt16(); - }); - - M4ADemuxer.readDescrLen = function(stream) { - var c, count, len; - len = 0; - count = 4; - while (count--) { - c = stream.readUInt8(); - len = (len << 7) | (c & 0x7f); - if (!(c & 0x80)) { - break; - } - } - return len; - }; - - M4ADemuxer.readEsds = function(stream) { - var codec_id, flags, len, tag; - stream.advance(4); - tag = stream.readUInt8(); - len = M4ADemuxer.readDescrLen(stream); - if (tag === 0x03) { - stream.advance(2); - flags = stream.readUInt8(); - if (flags & 0x80) { - stream.advance(2); - } - if (flags & 0x40) { - stream.advance(stream.readUInt8()); - } - if (flags & 0x20) { - stream.advance(2); - } - } else { - stream.advance(2); - } - tag = stream.readUInt8(); - len = M4ADemuxer.readDescrLen(stream); - if (tag === 0x04) { - codec_id = stream.readUInt8(); - stream.advance(1); - stream.advance(3); - stream.advance(4); - stream.advance(4); - tag = stream.readUInt8(); - len = M4ADemuxer.readDescrLen(stream); - if (tag === 0x05) { - return stream.readBuffer(len); - } - } - return null; - }; - - atom('moov.trak.mdia.minf.stbl.stts', function() { - var entries, i, _i; - this.stream.advance(4); - entries = this.stream.readUInt32(); - this.track.stts = []; - for (i = _i = 0; _i < entries; i = _i += 1) { - this.track.stts[i] = { - count: this.stream.readUInt32(), - duration: this.stream.readUInt32() - }; - } - return this.setupSeekPoints(); - }); - - atom('moov.trak.mdia.minf.stbl.stsc', function() { - var entries, i, _i; - this.stream.advance(4); - entries = this.stream.readUInt32(); - this.track.stsc = []; - for (i = _i = 0; _i < entries; i = _i += 1) { - this.track.stsc[i] = { - first: this.stream.readUInt32(), - count: this.stream.readUInt32(), - id: this.stream.readUInt32() - }; - } - return this.setupSeekPoints(); - }); - - atom('moov.trak.mdia.minf.stbl.stsz', function() { - var entries, i, _i; - this.stream.advance(4); - this.track.sampleSize = this.stream.readUInt32(); - entries = this.stream.readUInt32(); - if (this.track.sampleSize === 0 && entries > 0) { - this.track.sampleSizes = []; - for (i = _i = 0; _i < entries; i = _i += 1) { - this.track.sampleSizes[i] = this.stream.readUInt32(); - } - } - return this.setupSeekPoints(); - }); - - atom('moov.trak.mdia.minf.stbl.stco', function() { - var entries, i, _i; - this.stream.advance(4); - entries = this.stream.readUInt32(); - this.track.chunkOffsets = []; - for (i = _i = 0; _i < entries; i = _i += 1) { - this.track.chunkOffsets[i] = this.stream.readUInt32(); - } - return this.setupSeekPoints(); - }); - - atom('moov.trak.tref.chap', function() { - var entries, i, _i; - entries = this.len >> 2; - this.track.chapterTracks = []; - for (i = _i = 0; _i < entries; i = _i += 1) { - this.track.chapterTracks[i] = this.stream.readUInt32(); - } - }); - - M4ADemuxer.prototype.setupSeekPoints = function() { - var i, j, offset, position, sampleIndex, size, stscIndex, sttsIndex, sttsSample, timestamp, _i, _j, _len, _ref, _ref1, _results; - if (!((this.track.chunkOffsets != null) && (this.track.stsc != null) && (this.track.sampleSize != null) && (this.track.stts != null))) { - return; - } - stscIndex = 0; - sttsIndex = 0; - sttsIndex = 0; - sttsSample = 0; - sampleIndex = 0; - offset = 0; - timestamp = 0; - this.track.seekPoints = []; - _ref = this.track.chunkOffsets; - _results = []; - for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { - position = _ref[i]; - for (j = _j = 0, _ref1 = this.track.stsc[stscIndex].count; _j < _ref1; j = _j += 1) { - this.track.seekPoints.push({ - offset: offset, - position: position, - timestamp: timestamp - }); - size = this.track.sampleSize || this.track.sampleSizes[sampleIndex++]; - offset += size; - position += size; - timestamp += this.track.stts[sttsIndex].duration; - if (sttsIndex + 1 < this.track.stts.length && ++sttsSample === this.track.stts[sttsIndex].count) { - sttsSample = 0; - sttsIndex++; - } - } - if (stscIndex + 1 < this.track.stsc.length && i + 1 === this.track.stsc[stscIndex + 1].first) { - _results.push(stscIndex++); - } else { - _results.push(void 0); - } - } - return _results; - }; - - after('moov', function() { - var track, _i, _len, _ref; - if (this.mdatOffset != null) { - this.stream.seek(this.mdatOffset - 8); - } - _ref = this.tracks; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - track = _ref[_i]; - if (!(track.type === 'soun')) { - continue; - } - this.track = track; - break; - } - if (this.track.type !== 'soun') { - this.track = null; - return this.emit('error', 'No audio tracks in m4a file.'); - } - this.emit('format', this.track.format); - this.emit('duration', this.track.duration / this.track.timeScale * 1000 | 0); - if (this.track.cookie) { - this.emit('cookie', this.track.cookie); - } - return this.seekPoints = this.track.seekPoints; - }); - - atom('mdat', function() { - var bytes, chunkSize, length, numSamples, offset, sample, size, _i; - if (!this.startedData) { - if (this.mdatOffset == null) { - this.mdatOffset = this.stream.offset; - } - if (this.tracks.length === 0) { - bytes = Math.min(this.stream.remainingBytes(), this.len); - this.stream.advance(bytes); - this.len -= bytes; - return; - } - this.chunkIndex = 0; - this.stscIndex = 0; - this.sampleIndex = 0; - this.tailOffset = 0; - this.tailSamples = 0; - this.startedData = true; - } - if (!this.readChapters) { - this.readChapters = this.parseChapters(); - if (this["break"] = !this.readChapters) { - return; - } - this.stream.seek(this.mdatOffset); - } - offset = this.track.chunkOffsets[this.chunkIndex] + this.tailOffset; - length = 0; - if (!this.stream.available(offset - this.stream.offset)) { - this["break"] = true; - return; - } - this.stream.seek(offset); - while (this.chunkIndex < this.track.chunkOffsets.length) { - numSamples = this.track.stsc[this.stscIndex].count - this.tailSamples; - chunkSize = 0; - for (sample = _i = 0; _i < numSamples; sample = _i += 1) { - size = this.track.sampleSize || this.track.sampleSizes[this.sampleIndex]; - if (!this.stream.available(length + size)) { - break; - } - length += size; - chunkSize += size; - this.sampleIndex++; - } - if (sample < numSamples) { - this.tailOffset += chunkSize; - this.tailSamples += sample; - break; - } else { - this.chunkIndex++; - this.tailOffset = 0; - this.tailSamples = 0; - if (this.stscIndex + 1 < this.track.stsc.length && this.chunkIndex + 1 === this.track.stsc[this.stscIndex + 1].first) { - this.stscIndex++; - } - if (offset + length !== this.track.chunkOffsets[this.chunkIndex]) { - break; - } - } - } - if (length > 0) { - this.emit('data', this.stream.readBuffer(length)); - return this["break"] = this.chunkIndex === this.track.chunkOffsets.length; - } else { - return this["break"] = true; - } - }); - - M4ADemuxer.prototype.parseChapters = function() { - var bom, id, len, nextTimestamp, point, title, track, _i, _len, _ref, _ref1, _ref2, _ref3; - if (!(((_ref = this.track.chapterTracks) != null ? _ref.length : void 0) > 0)) { - return true; - } - id = this.track.chapterTracks[0]; - _ref1 = this.tracks; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - track = _ref1[_i]; - if (track.id === id) { - break; - } - } - if (track.id !== id) { - this.emit('error', 'Chapter track does not exist.'); - } - if (this.chapters == null) { - this.chapters = []; - } - while (this.chapters.length < track.seekPoints.length) { - point = track.seekPoints[this.chapters.length]; - if (!this.stream.available(point.position - this.stream.offset + 32)) { - return false; - } - this.stream.seek(point.position); - len = this.stream.readUInt16(); - title = null; - if (!this.stream.available(len)) { - return false; - } - if (len > 2) { - bom = this.stream.peekUInt16(); - if (bom === 0xfeff || bom === 0xfffe) { - title = this.stream.readString(len, 'utf16-bom'); - } - } - if (title == null) { - title = this.stream.readString(len, 'utf8'); - } - nextTimestamp = (_ref2 = (_ref3 = track.seekPoints[this.chapters.length + 1]) != null ? _ref3.timestamp : void 0) != null ? _ref2 : track.duration; - this.chapters.push({ - title: title, - timestamp: point.timestamp / track.timeScale * 1000 | 0, - duration: (nextTimestamp - point.timestamp) / track.timeScale * 1000 | 0 - }); - } - this.emit('chapters', this.chapters); - return true; - }; - - atom('moov.udta.meta', function() { - this.metadata = {}; - return this.stream.advance(4); - }); - - after('moov.udta.meta', function() { - return this.emit('metadata', this.metadata); - }); - - meta = function(field, name, fn) { - return atom("moov.udta.meta.ilst." + field + ".data", function() { - this.stream.advance(8); - this.len -= 8; - return fn.call(this, name); - }); - }; - - string = function(field) { - return this.metadata[field] = this.stream.readString(this.len, 'utf8'); - }; - - meta('©alb', 'album', string); - - meta('©arg', 'arranger', string); - - meta('©art', 'artist', string); - - meta('©ART', 'artist', string); - - meta('aART', 'albumArtist', string); - - meta('catg', 'category', string); - - meta('©com', 'composer', string); - - meta('©cpy', 'copyright', string); - - meta('cprt', 'copyright', string); - - meta('©cmt', 'comments', string); - - meta('©day', 'releaseDate', string); - - meta('desc', 'description', string); - - meta('©gen', 'genre', string); - - meta('©grp', 'grouping', string); - - meta('©isr', 'ISRC', string); - - meta('keyw', 'keywords', string); - - meta('©lab', 'recordLabel', string); - - meta('ldes', 'longDescription', string); - - meta('©lyr', 'lyrics', string); - - meta('©nam', 'title', string); - - meta('©phg', 'recordingCopyright', string); - - meta('©prd', 'producer', string); - - meta('©prf', 'performers', string); - - meta('purd', 'purchaseDate', string); - - meta('purl', 'podcastURL', string); - - meta('©swf', 'songwriter', string); - - meta('©too', 'encoder', string); - - meta('©wrt', 'composer', string); - - meta('covr', 'coverArt', function(field) { - return this.metadata[field] = this.stream.readBuffer(this.len); - }); - - genres = ["Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B", "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing", "Fast Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A Capella", "Euro-House", "Dance Hall"]; - - meta('gnre', 'genre', function(field) { - return this.metadata[field] = genres[this.stream.readUInt16() - 1]; - }); - - meta('tmpo', 'tempo', function(field) { - return this.metadata[field] = this.stream.readUInt16(); - }); - - meta('rtng', 'rating', function(field) { - var rating; - rating = this.stream.readUInt8(); - return this.metadata[field] = rating === 2 ? 'Clean' : rating !== 0 ? 'Explicit' : 'None'; - }); - - diskTrack = function(field) { - this.stream.advance(2); - this.metadata[field] = this.stream.readUInt16() + ' of ' + this.stream.readUInt16(); - return this.stream.advance(this.len - 6); - }; - - meta('disk', 'diskNumber', diskTrack); - - meta('trkn', 'trackNumber', diskTrack); - - bool = function(field) { - return this.metadata[field] = this.stream.readUInt8() === 1; - }; - - meta('cpil', 'compilation', bool); - - meta('pcst', 'podcast', bool); - - meta('pgap', 'gapless', bool); - - return M4ADemuxer; - -})(Demuxer); - -module.exports = M4ADemuxer; - - -},{"../demuxer":15}],20:[function(_dereq_,module,exports){ -var Demuxer, WAVEDemuxer, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -Demuxer = _dereq_('../demuxer'); - -WAVEDemuxer = (function(_super) { - var formats; - - __extends(WAVEDemuxer, _super); - - function WAVEDemuxer() { - return WAVEDemuxer.__super__.constructor.apply(this, arguments); - } - - Demuxer.register(WAVEDemuxer); - - WAVEDemuxer.probe = function(buffer) { - return buffer.peekString(0, 4) === 'RIFF' && buffer.peekString(8, 4) === 'WAVE'; - }; - - formats = { - 0x0001: 'lpcm', - 0x0003: 'lpcm', - 0x0006: 'alaw', - 0x0007: 'ulaw' - }; - - WAVEDemuxer.prototype.readChunk = function() { - var buffer, bytes, encoding; - if (!this.readStart && this.stream.available(12)) { - if (this.stream.readString(4) !== 'RIFF') { - return this.emit('error', 'Invalid WAV file.'); - } - this.fileSize = this.stream.readUInt32(true); - this.readStart = true; - if (this.stream.readString(4) !== 'WAVE') { - return this.emit('error', 'Invalid WAV file.'); - } - } - while (this.stream.available(1)) { - if (!this.readHeaders && this.stream.available(8)) { - this.type = this.stream.readString(4); - this.len = this.stream.readUInt32(true); - } - switch (this.type) { - case 'fmt ': - encoding = this.stream.readUInt16(true); - if (!(encoding in formats)) { - return this.emit('error', 'Unsupported format in WAV file.'); - } - this.format = { - formatID: formats[encoding], - floatingPoint: encoding === 0x0003, - littleEndian: formats[encoding] === 'lpcm', - channelsPerFrame: this.stream.readUInt16(true), - sampleRate: this.stream.readUInt32(true), - framesPerPacket: 1 - }; - this.stream.advance(4); - this.stream.advance(2); - this.format.bitsPerChannel = this.stream.readUInt16(true); - this.format.bytesPerPacket = (this.format.bitsPerChannel / 8) * this.format.channelsPerFrame; - this.emit('format', this.format); - this.stream.advance(this.len - 16); - break; - case 'data': - if (!this.sentDuration) { - bytes = this.format.bitsPerChannel / 8; - this.emit('duration', this.len / bytes / this.format.channelsPerFrame / this.format.sampleRate * 1000 | 0); - this.sentDuration = true; - } - buffer = this.stream.readSingleBuffer(this.len); - this.len -= buffer.length; - this.readHeaders = this.len > 0; - this.emit('data', buffer); - break; - default: - if (!this.stream.available(this.len)) { - return; - } - this.stream.advance(this.len); - } - if (this.type !== 'data') { - this.readHeaders = false; - } - } - }; - - return WAVEDemuxer; - -})(Demuxer); - - -},{"../demuxer":15}],21:[function(_dereq_,module,exports){ -var AudioDevice, EventEmitter, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -EventEmitter = _dereq_('./core/events'); - -AudioDevice = (function(_super) { - var devices; - - __extends(AudioDevice, _super); - - function AudioDevice(sampleRate, channels) { - this.sampleRate = sampleRate; - this.channels = channels; - this.updateTime = __bind(this.updateTime, this); - this.playing = false; - this.currentTime = 0; - this._lastTime = 0; - } - - AudioDevice.prototype.start = function() { - if (this.playing) { - return; - } - this.playing = true; - if (this.device == null) { - this.device = AudioDevice.create(this.sampleRate, this.channels); - } - if (!this.device) { - throw new Error("No supported audio device found."); - } - this._lastTime = this.device.getDeviceTime(); - this._timer = setInterval(this.updateTime, 200); - return this.device.on('refill', this.refill = (function(_this) { - return function(buffer) { - return _this.emit('refill', buffer); - }; - })(this)); - }; - - AudioDevice.prototype.stop = function() { - if (!this.playing) { - return; - } - this.playing = false; - this.device.off('refill', this.refill); - return clearInterval(this._timer); - }; - - AudioDevice.prototype.destroy = function() { - this.stop(); - return this.device.destroy(); - }; - - AudioDevice.prototype.seek = function(currentTime) { - this.currentTime = currentTime; - if (this.playing) { - this._lastTime = this.device.getDeviceTime(); - } - return this.emit('timeUpdate', this.currentTime); - }; - - AudioDevice.prototype.updateTime = function() { - var time; - time = this.device.getDeviceTime(); - this.currentTime += (time - this._lastTime) / this.device.sampleRate * 1000 | 0; - this._lastTime = time; - return this.emit('timeUpdate', this.currentTime); - }; - - devices = []; - - AudioDevice.register = function(device) { - return devices.push(device); - }; - - AudioDevice.create = function(sampleRate, channels) { - var device, _i, _len; - for (_i = 0, _len = devices.length; _i < _len; _i++) { - device = devices[_i]; - if (device.supported) { - return new device(sampleRate, channels); - } - } - return null; - }; - - return AudioDevice; - -})(EventEmitter); - -module.exports = AudioDevice; - - -},{"./core/events":9}],22:[function(_dereq_,module,exports){ -var AVBuffer, AudioDevice, EventEmitter, MozillaAudioDevice, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -EventEmitter = _dereq_('../core/events'); - -AudioDevice = _dereq_('../device'); - -AVBuffer = _dereq_('../core/buffer'); - -MozillaAudioDevice = (function(_super) { - var createTimer, destroyTimer; - - __extends(MozillaAudioDevice, _super); - - AudioDevice.register(MozillaAudioDevice); - - MozillaAudioDevice.supported = (typeof Audio !== "undefined" && Audio !== null) && 'mozWriteAudio' in new Audio; - - function MozillaAudioDevice(sampleRate, channels) { - this.sampleRate = sampleRate; - this.channels = channels; - this.refill = __bind(this.refill, this); - this.audio = new Audio; - this.audio.mozSetup(this.channels, this.sampleRate); - this.writePosition = 0; - this.prebufferSize = this.sampleRate / 2; - this.tail = null; - this.timer = createTimer(this.refill, 100); - } - - MozillaAudioDevice.prototype.refill = function() { - var available, buffer, currentPosition, written; - if (this.tail) { - written = this.audio.mozWriteAudio(this.tail); - this.writePosition += written; - if (this.writePosition < this.tail.length) { - this.tail = this.tail.subarray(written); - } else { - this.tail = null; - } - } - currentPosition = this.audio.mozCurrentSampleOffset(); - available = currentPosition + this.prebufferSize - this.writePosition; - if (available > 0) { - buffer = new Float32Array(available); - this.emit('refill', buffer); - written = this.audio.mozWriteAudio(buffer); - if (written < buffer.length) { - this.tail = buffer.subarray(written); - } - this.writePosition += written; - } - }; - - MozillaAudioDevice.prototype.destroy = function() { - return destroyTimer(this.timer); - }; - - MozillaAudioDevice.prototype.getDeviceTime = function() { - return this.audio.mozCurrentSampleOffset() / this.channels; - }; - - createTimer = function(fn, interval) { - var url, worker; - url = AVBuffer.makeBlobURL("setInterval(function() { postMessage('ping'); }, " + interval + ");"); - if (url == null) { - return setInterval(fn, interval); - } - worker = new Worker(url); - worker.onmessage = fn; - worker.url = url; - return worker; - }; - - destroyTimer = function(timer) { - if (timer.terminate) { - timer.terminate(); - return URL.revokeObjectURL(timer.url); - } else { - return clearInterval(timer); - } - }; - - return MozillaAudioDevice; - -})(EventEmitter); - - -},{"../core/buffer":7,"../core/events":9,"../device":21}],23:[function(_dereq_,module,exports){ -/* - * This resampler is from XAudioJS: https://github.com/grantgalitz/XAudioJS - * Planned to be replaced with src.js, eventually: https://github.com/jussi-kalliokoski/src.js - */ - -//JavaScript Audio Resampler (c) 2011 - Grant Galitz -function Resampler(fromSampleRate, toSampleRate, channels, outputBufferSize, noReturn) { - this.fromSampleRate = fromSampleRate; - this.toSampleRate = toSampleRate; - this.channels = channels | 0; - this.outputBufferSize = outputBufferSize; - this.noReturn = !!noReturn; - this.initialize(); -} - -Resampler.prototype.initialize = function () { - //Perform some checks: - if (this.fromSampleRate > 0 && this.toSampleRate > 0 && this.channels > 0) { - if (this.fromSampleRate == this.toSampleRate) { - //Setup a resampler bypass: - this.resampler = this.bypassResampler; //Resampler just returns what was passed through. - this.ratioWeight = 1; - } - else { - if (this.fromSampleRate < this.toSampleRate) { - /* - Use generic linear interpolation if upsampling, - as linear interpolation produces a gradient that we want - and works fine with two input sample points per output in this case. - */ - this.compileLinearInterpolationFunction(); - this.lastWeight = 1; - } - else { - /* - Custom resampler I wrote that doesn't skip samples - like standard linear interpolation in high downsampling. - This is more accurate than linear interpolation on downsampling. - */ - this.compileMultiTapFunction(); - this.tailExists = false; - this.lastWeight = 0; - } - this.ratioWeight = this.fromSampleRate / this.toSampleRate; - this.initializeBuffers(); - } - } - else { - throw(new Error("Invalid settings specified for the resampler.")); - } -}; - -Resampler.prototype.compileLinearInterpolationFunction = function () { - var toCompile = "var bufferLength = buffer.length;\ - var outLength = this.outputBufferSize;\ - if ((bufferLength % " + this.channels + ") == 0) {\ - if (bufferLength > 0) {\ - var ratioWeight = this.ratioWeight;\ - var weight = this.lastWeight;\ - var firstWeight = 0;\ - var secondWeight = 0;\ - var sourceOffset = 0;\ - var outputOffset = 0;\ - var outputBuffer = this.outputBuffer;\ - for (; weight < 1; weight += ratioWeight) {\ - secondWeight = weight % 1;\ - firstWeight = 1 - secondWeight;"; - for (var channel = 0; channel < this.channels; ++channel) { - toCompile += "outputBuffer[outputOffset++] = (this.lastOutput[" + channel + "] * firstWeight) + (buffer[" + channel + "] * secondWeight);"; - } - toCompile += "}\ - weight -= 1;\ - for (bufferLength -= " + this.channels + ", sourceOffset = Math.floor(weight) * " + this.channels + "; outputOffset < outLength && sourceOffset < bufferLength;) {\ - secondWeight = weight % 1;\ - firstWeight = 1 - secondWeight;"; - for (var channel = 0; channel < this.channels; ++channel) { - toCompile += "outputBuffer[outputOffset++] = (buffer[sourceOffset" + ((channel > 0) ? (" + " + channel) : "") + "] * firstWeight) + (buffer[sourceOffset + " + (this.channels + channel) + "] * secondWeight);"; - } - toCompile += "weight += ratioWeight;\ - sourceOffset = Math.floor(weight) * " + this.channels + ";\ - }"; - for (var channel = 0; channel < this.channels; ++channel) { - toCompile += "this.lastOutput[" + channel + "] = buffer[sourceOffset++];"; - } - toCompile += "this.lastWeight = weight % 1;\ - return this.bufferSlice(outputOffset);\ - }\ - else {\ - return (this.noReturn) ? 0 : [];\ - }\ - }\ - else {\ - throw(new Error(\"Buffer was of incorrect sample length.\"));\ - }"; - this.resampler = Function("buffer", toCompile); -}; - -Resampler.prototype.compileMultiTapFunction = function () { - var toCompile = "var bufferLength = buffer.length;\ - var outLength = this.outputBufferSize;\ - if ((bufferLength % " + this.channels + ") == 0) {\ - if (bufferLength > 0) {\ - var ratioWeight = this.ratioWeight;\ - var weight = 0;"; - for (var channel = 0; channel < this.channels; ++channel) { - toCompile += "var output" + channel + " = 0;" - } - toCompile += "var actualPosition = 0;\ - var amountToNext = 0;\ - var alreadyProcessedTail = !this.tailExists;\ - this.tailExists = false;\ - var outputBuffer = this.outputBuffer;\ - var outputOffset = 0;\ - var currentPosition = 0;\ - do {\ - if (alreadyProcessedTail) {\ - weight = ratioWeight;"; - for (channel = 0; channel < this.channels; ++channel) { - toCompile += "output" + channel + " = 0;" - } - toCompile += "}\ - else {\ - weight = this.lastWeight;"; - for (channel = 0; channel < this.channels; ++channel) { - toCompile += "output" + channel + " = this.lastOutput[" + channel + "];" - } - toCompile += "alreadyProcessedTail = true;\ - }\ - while (weight > 0 && actualPosition < bufferLength) {\ - amountToNext = 1 + actualPosition - currentPosition;\ - if (weight >= amountToNext) {"; - for (channel = 0; channel < this.channels; ++channel) { - toCompile += "output" + channel + " += buffer[actualPosition++] * amountToNext;" - } - toCompile += "currentPosition = actualPosition;\ - weight -= amountToNext;\ - }\ - else {"; - for (channel = 0; channel < this.channels; ++channel) { - toCompile += "output" + channel + " += buffer[actualPosition" + ((channel > 0) ? (" + " + channel) : "") + "] * weight;" - } - toCompile += "currentPosition += weight;\ - weight = 0;\ - break;\ - }\ - }\ - if (weight == 0) {"; - for (channel = 0; channel < this.channels; ++channel) { - toCompile += "outputBuffer[outputOffset++] = output" + channel + " / ratioWeight;" - } - toCompile += "}\ - else {\ - this.lastWeight = weight;"; - for (channel = 0; channel < this.channels; ++channel) { - toCompile += "this.lastOutput[" + channel + "] = output" + channel + ";" - } - toCompile += "this.tailExists = true;\ - break;\ - }\ - } while (actualPosition < bufferLength && outputOffset < outLength);\ - return this.bufferSlice(outputOffset);\ - }\ - else {\ - return (this.noReturn) ? 0 : [];\ - }\ - }\ - else {\ - throw(new Error(\"Buffer was of incorrect sample length.\"));\ - }"; - this.resampler = Function("buffer", toCompile); -}; - -Resampler.prototype.bypassResampler = function (buffer) { - if (this.noReturn) { - //Set the buffer passed as our own, as we don't need to resample it: - this.outputBuffer = buffer; - return buffer.length; - } - else { - //Just return the buffer passsed: - return buffer; - } -}; - -Resampler.prototype.bufferSlice = function (sliceAmount) { - if (this.noReturn) { - //If we're going to access the properties directly from this object: - return sliceAmount; - } - else { - //Typed array and normal array buffer section referencing: - try { - return this.outputBuffer.subarray(0, sliceAmount); - } - catch (error) { - try { - //Regular array pass: - this.outputBuffer.length = sliceAmount; - return this.outputBuffer; - } - catch (error) { - //Nightly Firefox 4 used to have the subarray function named as slice: - return this.outputBuffer.slice(0, sliceAmount); - } - } - } -}; - -Resampler.prototype.initializeBuffers = function () { - //Initialize the internal buffer: - try { - this.outputBuffer = new Float32Array(this.outputBufferSize); - this.lastOutput = new Float32Array(this.channels); - } - catch (error) { - this.outputBuffer = []; - this.lastOutput = []; - } -}; - -module.exports = Resampler; - -},{}],24:[function(_dereq_,module,exports){ -(function (global){ -var AudioDevice, EventEmitter, Resampler, WebAudioDevice, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -EventEmitter = _dereq_('../core/events'); - -AudioDevice = _dereq_('../device'); - -Resampler = _dereq_('./resampler'); - -WebAudioDevice = (function(_super) { - var AudioContext, createProcessor, sharedContext; - - __extends(WebAudioDevice, _super); - - AudioDevice.register(WebAudioDevice); - - AudioContext = global.AudioContext || global.webkitAudioContext; - - WebAudioDevice.supported = AudioContext && (typeof AudioContext.prototype[createProcessor = 'createScriptProcessor'] === 'function' || typeof AudioContext.prototype[createProcessor = 'createJavaScriptNode'] === 'function'); - - sharedContext = null; - - function WebAudioDevice(sampleRate, channels) { - this.sampleRate = sampleRate; - this.channels = channels; - this.refill = __bind(this.refill, this); - this.context = sharedContext != null ? sharedContext : sharedContext = new AudioContext; - this.deviceSampleRate = this.context.sampleRate; - this.bufferSize = Math.ceil(4096 / (this.deviceSampleRate / this.sampleRate) * this.channels); - this.bufferSize += this.bufferSize % this.channels; - if (this.deviceSampleRate !== this.sampleRate) { - this.resampler = new Resampler(this.sampleRate, this.deviceSampleRate, this.channels, 4096 * this.channels); - } - this.node = this.context[createProcessor](4096, this.channels, this.channels); - this.node.onaudioprocess = this.refill; - this.node.connect(this.context.destination); - } - - WebAudioDevice.prototype.refill = function(event) { - var channelCount, channels, data, i, n, outputBuffer, _i, _j, _k, _ref; - outputBuffer = event.outputBuffer; - channelCount = outputBuffer.numberOfChannels; - channels = new Array(channelCount); - for (i = _i = 0; _i < channelCount; i = _i += 1) { - channels[i] = outputBuffer.getChannelData(i); - } - data = new Float32Array(this.bufferSize); - this.emit('refill', data); - if (this.resampler) { - data = this.resampler.resampler(data); - } - for (i = _j = 0, _ref = outputBuffer.length; _j < _ref; i = _j += 1) { - for (n = _k = 0; _k < channelCount; n = _k += 1) { - channels[n][i] = data[i * channelCount + n]; - } - } - }; - - WebAudioDevice.prototype.destroy = function() { - return this.node.disconnect(0); - }; - - WebAudioDevice.prototype.getDeviceTime = function() { - return this.context.currentTime * this.sampleRate; - }; - - return WebAudioDevice; - -})(EventEmitter); - - -}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../core/events":9,"../device":21,"./resampler":23}],25:[function(_dereq_,module,exports){ -var Filter; - -Filter = (function() { - function Filter(context, key) { - if (context && key) { - Object.defineProperty(this, 'value', { - get: function() { - return context[key]; - } - }); - } - } - - Filter.prototype.process = function(buffer) {}; - - return Filter; - -})(); - -module.exports = Filter; - - -},{}],26:[function(_dereq_,module,exports){ -var BalanceFilter, Filter, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -Filter = _dereq_('../filter'); - -BalanceFilter = (function(_super) { - __extends(BalanceFilter, _super); - - function BalanceFilter() { - return BalanceFilter.__super__.constructor.apply(this, arguments); - } - - BalanceFilter.prototype.process = function(buffer) { - var i, pan, _i, _ref; - if (this.value === 0) { - return; - } - pan = Math.max(-50, Math.min(50, this.value)); - for (i = _i = 0, _ref = buffer.length; _i < _ref; i = _i += 2) { - buffer[i] *= Math.min(1, (50 - pan) / 50); - buffer[i + 1] *= Math.min(1, (50 + pan) / 50); - } - }; - - return BalanceFilter; - -})(Filter); - -module.exports = BalanceFilter; - - -},{"../filter":25}],27:[function(_dereq_,module,exports){ -var Filter, VolumeFilter, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -Filter = _dereq_('../filter'); - -VolumeFilter = (function(_super) { - __extends(VolumeFilter, _super); - - function VolumeFilter() { - return VolumeFilter.__super__.constructor.apply(this, arguments); - } - - VolumeFilter.prototype.process = function(buffer) { - var i, vol, _i, _ref; - if (this.value >= 100) { - return; - } - vol = Math.max(0, Math.min(100, this.value)) / 100; - for (i = _i = 0, _ref = buffer.length; _i < _ref; i = _i += 1) { - buffer[i] *= vol; - } - }; - - return VolumeFilter; - -})(Filter); - -module.exports = VolumeFilter; - - -},{"../filter":25}],28:[function(_dereq_,module,exports){ -var Asset, AudioDevice, BalanceFilter, EventEmitter, Player, Queue, VolumeFilter, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -EventEmitter = _dereq_('./core/events'); - -Asset = _dereq_('./asset'); - -VolumeFilter = _dereq_('./filters/volume'); - -BalanceFilter = _dereq_('./filters/balance'); - -Queue = _dereq_('./queue'); - -AudioDevice = _dereq_('./device'); - -Player = (function(_super) { - __extends(Player, _super); - - function Player(asset) { - this.asset = asset; - this.startPlaying = __bind(this.startPlaying, this); - this.playing = false; - this.buffered = 0; - this.currentTime = 0; - this.duration = 0; - this.volume = 100; - this.pan = 0; - this.metadata = {}; - this.filters = [new VolumeFilter(this, 'volume'), new BalanceFilter(this, 'pan')]; - this.asset.on('buffer', (function(_this) { - return function(buffered) { - _this.buffered = buffered; - return _this.emit('buffer', _this.buffered); - }; - })(this)); - this.asset.on('decodeStart', (function(_this) { - return function() { - _this.queue = new Queue(_this.asset); - return _this.queue.once('ready', _this.startPlaying); - }; - })(this)); - this.asset.on('format', (function(_this) { - return function(format) { - _this.format = format; - return _this.emit('format', _this.format); - }; - })(this)); - this.asset.on('metadata', (function(_this) { - return function(metadata) { - _this.metadata = metadata; - return _this.emit('metadata', _this.metadata); - }; - })(this)); - this.asset.on('duration', (function(_this) { - return function(duration) { - _this.duration = duration; - return _this.emit('duration', _this.duration); - }; - })(this)); - this.asset.on('error', (function(_this) { - return function(error) { - return _this.emit('error', error); - }; - })(this)); - } - - Player.fromURL = function(url) { - return new Player(Asset.fromURL(url)); - }; - - Player.fromFile = function(file) { - return new Player(Asset.fromFile(file)); - }; - - Player.fromBuffer = function(buffer) { - return new Player(Asset.fromBuffer(buffer)); - }; - - Player.prototype.preload = function() { - if (!this.asset) { - return; - } - this.startedPreloading = true; - return this.asset.start(false); - }; - - Player.prototype.play = function() { - var _ref; - if (this.playing) { - return; - } - if (!this.startedPreloading) { - this.preload(); - } - this.playing = true; - return (_ref = this.device) != null ? _ref.start() : void 0; - }; - - Player.prototype.pause = function() { - var _ref; - if (!this.playing) { - return; - } - this.playing = false; - return (_ref = this.device) != null ? _ref.stop() : void 0; - }; - - Player.prototype.togglePlayback = function() { - if (this.playing) { - return this.pause(); - } else { - return this.play(); - } - }; - - Player.prototype.stop = function() { - var _ref; - this.pause(); - this.asset.stop(); - return (_ref = this.device) != null ? _ref.destroy() : void 0; - }; - - Player.prototype.seek = function(timestamp) { - var _ref; - if ((_ref = this.device) != null) { - _ref.stop(); - } - this.queue.once('ready', (function(_this) { - return function() { - var _ref1, _ref2; - if ((_ref1 = _this.device) != null) { - _ref1.seek(_this.currentTime); - } - if (_this.playing) { - return (_ref2 = _this.device) != null ? _ref2.start() : void 0; - } - }; - })(this)); - timestamp = (timestamp / 1000) * this.format.sampleRate; - timestamp = this.asset.decoder.seek(timestamp); - this.currentTime = timestamp / this.format.sampleRate * 1000 | 0; - this.queue.reset(); - return this.currentTime; - }; - - Player.prototype.startPlaying = function() { - var frame, frameOffset; - frame = this.queue.read(); - frameOffset = 0; - this.device = new AudioDevice(this.format.sampleRate, this.format.channelsPerFrame); - this.device.on('timeUpdate', (function(_this) { - return function(currentTime) { - _this.currentTime = currentTime; - return _this.emit('progress', _this.currentTime); - }; - })(this)); - this.refill = (function(_this) { - return function(buffer) { - var bufferOffset, filter, i, max, _i, _j, _len, _ref; - if (!_this.playing) { - return; - } - if (!frame) { - frame = _this.queue.read(); - frameOffset = 0; - } - bufferOffset = 0; - while (frame && bufferOffset < buffer.length) { - max = Math.min(frame.length - frameOffset, buffer.length - bufferOffset); - for (i = _i = 0; _i < max; i = _i += 1) { - buffer[bufferOffset++] = frame[frameOffset++]; - } - if (frameOffset === frame.length) { - frame = _this.queue.read(); - frameOffset = 0; - } - } - _ref = _this.filters; - for (_j = 0, _len = _ref.length; _j < _len; _j++) { - filter = _ref[_j]; - filter.process(buffer); - } - if (!frame) { - if (_this.queue.ended) { - _this.currentTime = _this.duration; - _this.emit('progress', _this.currentTime); - _this.emit('end'); - _this.stop(); - } else { - _this.device.stop(); - } - } - }; - })(this); - this.device.on('refill', this.refill); - if (this.playing) { - this.device.start(); - } - return this.emit('ready'); - }; - - return Player; - -})(EventEmitter); - -module.exports = Player; - - -},{"./asset":2,"./core/events":9,"./device":21,"./filters/balance":26,"./filters/volume":27,"./queue":29}],29:[function(_dereq_,module,exports){ -var EventEmitter, Queue, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -EventEmitter = _dereq_('./core/events'); - -Queue = (function(_super) { - __extends(Queue, _super); - - function Queue(asset) { - this.asset = asset; - this.write = __bind(this.write, this); - this.readyMark = 64; - this.finished = false; - this.buffering = true; - this.ended = false; - this.buffers = []; - this.asset.on('data', this.write); - this.asset.on('end', (function(_this) { - return function() { - return _this.ended = true; - }; - })(this)); - this.asset.decodePacket(); - } - - Queue.prototype.write = function(buffer) { - if (buffer) { - this.buffers.push(buffer); - } - if (this.buffering) { - if (this.buffers.length >= this.readyMark || this.ended) { - this.buffering = false; - return this.emit('ready'); - } else { - return this.asset.decodePacket(); - } - } - }; - - Queue.prototype.read = function() { - if (this.buffers.length === 0) { - return null; - } - this.asset.decodePacket(); - return this.buffers.shift(); - }; - - Queue.prototype.reset = function() { - this.buffers.length = 0; - this.buffering = true; - return this.asset.decodePacket(); - }; - - return Queue; - -})(EventEmitter); - -module.exports = Queue; - - -},{"./core/events":9}],30:[function(_dereq_,module,exports){ -var AVBuffer, EventEmitter, FileSource, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -EventEmitter = _dereq_('../../core/events'); - -AVBuffer = _dereq_('../../core/buffer'); - -FileSource = (function(_super) { - __extends(FileSource, _super); - - function FileSource(file) { - this.file = file; - if (typeof FileReader === "undefined" || FileReader === null) { - return this.emit('error', 'This browser does not have FileReader support.'); - } - this.offset = 0; - this.length = this.file.size; - this.chunkSize = 1 << 20; - this.file[this.slice = 'slice'] || this.file[this.slice = 'webkitSlice'] || this.file[this.slice = 'mozSlice']; - } - - FileSource.prototype.start = function() { - if (this.reader) { - if (!this.active) { - return this.loop(); - } - } - this.reader = new FileReader; - this.active = true; - this.reader.onload = (function(_this) { - return function(e) { - var buf; - buf = new AVBuffer(new Uint8Array(e.target.result)); - _this.offset += buf.length; - _this.emit('data', buf); - _this.active = false; - if (_this.offset < _this.length) { - return _this.loop(); - } - }; - })(this); - this.reader.onloadend = (function(_this) { - return function() { - if (_this.offset === _this.length) { - _this.emit('end'); - return _this.reader = null; - } - }; - })(this); - this.reader.onerror = (function(_this) { - return function(e) { - return _this.emit('error', e); - }; - })(this); - this.reader.onprogress = (function(_this) { - return function(e) { - return _this.emit('progress', (_this.offset + e.loaded) / _this.length * 100); - }; - })(this); - return this.loop(); - }; - - FileSource.prototype.loop = function() { - var blob, endPos; - this.active = true; - endPos = Math.min(this.offset + this.chunkSize, this.length); - blob = this.file[this.slice](this.offset, endPos); - return this.reader.readAsArrayBuffer(blob); - }; - - FileSource.prototype.pause = function() { - var _ref; - this.active = false; - try { - return (_ref = this.reader) != null ? _ref.abort() : void 0; - } catch (_error) {} - }; - - FileSource.prototype.reset = function() { - this.pause(); - return this.offset = 0; - }; - - return FileSource; - -})(EventEmitter); - -module.exports = FileSource; - - -},{"../../core/buffer":7,"../../core/events":9}],31:[function(_dereq_,module,exports){ -var AVBuffer, EventEmitter, HTTPSource, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -EventEmitter = _dereq_('../../core/events'); - -AVBuffer = _dereq_('../../core/buffer'); - -HTTPSource = (function(_super) { - __extends(HTTPSource, _super); - - function HTTPSource(url) { - this.url = url; - this.chunkSize = 1 << 20; - this.inflight = false; - this.reset(); - } - - HTTPSource.prototype.start = function() { - if (this.length) { - if (!this.inflight) { - return this.loop(); - } - } - this.inflight = true; - this.xhr = new XMLHttpRequest(); - this.xhr.onload = (function(_this) { - return function(event) { - _this.length = parseInt(_this.xhr.getResponseHeader("Content-Length")); - _this.inflight = false; - return _this.loop(); - }; - })(this); - this.xhr.onerror = (function(_this) { - return function(err) { - _this.pause(); - return _this.emit('error', err); - }; - })(this); - this.xhr.onabort = (function(_this) { - return function(event) { - return _this.inflight = false; - }; - })(this); - this.xhr.open("HEAD", this.url, true); - return this.xhr.send(null); - }; - - HTTPSource.prototype.loop = function() { - var endPos; - if (this.inflight || !this.length) { - return this.emit('error', 'Something is wrong in HTTPSource.loop'); - } - this.inflight = true; - this.xhr = new XMLHttpRequest(); - this.xhr.onload = (function(_this) { - return function(event) { - var buf, buffer, i, txt, _i, _ref; - if (_this.xhr.response) { - buf = new Uint8Array(_this.xhr.response); - } else { - txt = _this.xhr.responseText; - buf = new Uint8Array(txt.length); - for (i = _i = 0, _ref = txt.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { - buf[i] = txt.charCodeAt(i) & 0xff; - } - } - buffer = new AVBuffer(buf); - _this.offset += buffer.length; - _this.emit('data', buffer); - if (_this.offset >= _this.length) { - _this.emit('end'); - } - _this.inflight = false; - if (!(_this.offset >= _this.length)) { - return _this.loop(); - } - }; - })(this); - this.xhr.onprogress = (function(_this) { - return function(event) { - return _this.emit('progress', (_this.offset + event.loaded) / _this.length * 100); - }; - })(this); - this.xhr.onerror = (function(_this) { - return function(err) { - _this.emit('error', err); - return _this.pause(); - }; - })(this); - this.xhr.onabort = (function(_this) { - return function(event) { - return _this.inflight = false; - }; - })(this); - this.xhr.open("GET", this.url, true); - this.xhr.responseType = "arraybuffer"; - endPos = Math.min(this.offset + this.chunkSize, this.length); - this.xhr.setRequestHeader("Range", "bytes=" + this.offset + "-" + endPos); - this.xhr.overrideMimeType('text/plain; charset=x-user-defined'); - return this.xhr.send(null); - }; - - HTTPSource.prototype.pause = function() { - var _ref; - this.inflight = false; - return (_ref = this.xhr) != null ? _ref.abort() : void 0; - }; - - HTTPSource.prototype.reset = function() { - this.pause(); - return this.offset = 0; - }; - - return HTTPSource; - -})(EventEmitter); - -module.exports = HTTPSource; - - -},{"../../core/buffer":7,"../../core/events":9}],32:[function(_dereq_,module,exports){ -(function (global){ -var AVBuffer, BufferList, BufferSource, EventEmitter, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -EventEmitter = _dereq_('../core/events'); - -BufferList = _dereq_('../core/bufferlist'); - -AVBuffer = _dereq_('../core/buffer'); - -BufferSource = (function(_super) { - var clearImmediate, setImmediate; - - __extends(BufferSource, _super); - - function BufferSource(input) { - this.loop = __bind(this.loop, this); - if (input instanceof AV.BufferList) { - this.list = input; - } else { - this.list = new BufferList; - this.list.append(new AVBuffer(input)); - } - this.paused = true; - } - - setImmediate = global.setImmediate || function(fn) { - return global.setTimeout(fn, 0); - }; - - clearImmediate = global.clearImmediate || function(timer) { - return global.clearTimeout(timer); - }; - - BufferSource.prototype.start = function() { - this.paused = false; - return this._timer = setImmediate(this.loop); - }; - - BufferSource.prototype.loop = function() { - this.emit('progress', (this.list.numBuffers - this.list.availableBuffers + 1) / this.list.numBuffers * 100 | 0); - this.emit('data', this.list.first); - if (this.list.advance()) { - return setImmediate(this.loop); - } else { - return this.emit('end'); - } - }; - - BufferSource.prototype.pause = function() { - clearImmediate(this._timer); - return this.paused = true; - }; - - BufferSource.prototype.reset = function() { - this.pause(); - return this.list.rewind(); - }; - - return BufferSource; - -})(EventEmitter); - -module.exports = BufferSource; - - -}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../core/buffer":7,"../core/bufferlist":8,"../core/events":9}]},{},[1]) - -(1) -}); - -//# sourceMappingURL=aurora.js.map \ No newline at end of file diff --git a/src/core/static/js/libs/jplayer/aurora/flac.js b/src/core/static/js/libs/jplayer/aurora/flac.js deleted file mode 100644 index 86cee3c..0000000 --- a/src/core/static/js/libs/jplayer/aurora/flac.js +++ /dev/null @@ -1,793 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1; ones--) { - stream.advance(2); // == 2 - frame_or_sample_num = (frame_or_sample_num << 6) | stream.read(6); - } - - // block size - if (bsCode === 0) - throw new Error('Reserved blocksize code'); - else if (bsCode === 6) - this.blockSize = stream.read(8) + 1; - else if (bsCode === 7) - this.blockSize = stream.read(16) + 1; - else - this.blockSize = BLOCK_SIZES[bsCode]; - - // sample rate - var sampleRate; - if (srCode < 12) - sampleRate = SAMPLE_RATES[srCode]; - else if (srCode === 12) - sampleRate = stream.read(8) * 1000; - else if (srCode === 13) - sampleRate = stream.read(16); - else if (srCode === 14) - sampleRate = stream.read(16) * 10; - else - throw new Error('Invalid sample rate code'); - - stream.advance(8); // skip CRC check - - // subframes - for (var i = 0; i < channels; i++) - this.decodeSubframe(i); - - stream.align(); - stream.advance(16); // skip CRC frame footer - - var is32 = this.bps > 16, - output = new ArrayBuffer(this.blockSize * channels * (is32 ? 4 : 2)), - buf = is32 ? new Int32Array(output) : new Int16Array(output), - blockSize = this.blockSize, - decoded = this.decoded, - j = 0; - - switch (this.chMode) { - case CHMODE_INDEPENDENT: - for (var k = 0; k < blockSize; k++) { - for (var i = 0; i < channels; i++) { - buf[j++] = decoded[i][k]; - } - } - break; - - case CHMODE_LEFT_SIDE: - for (var i = 0; i < blockSize; i++) { - var left = decoded[0][i], - right = decoded[1][i]; - - buf[j++] = left; - buf[j++] = (left - right); - } - break; - - case CHMODE_RIGHT_SIDE: - for (var i = 0; i < blockSize; i++) { - var left = decoded[0][i], - right = decoded[1][i]; - - buf[j++] = (left + right); - buf[j++] = right; - } - break; - - case CHMODE_MID_SIDE: - for (var i = 0; i < blockSize; i++) { - var left = decoded[0][i], - right = decoded[1][i]; - - left -= right >> 1; - buf[j++] = (left + right); - buf[j++] = left; - } - break; - } - - return buf; - }; - - this.prototype.decodeSubframe = function(channel) { - var wasted = 0, - stream = this.bitstream, - blockSize = this.blockSize, - decoded = this.decoded; - - this.curr_bps = this.bps; - if (channel === 0) { - if (this.chMode === CHMODE_RIGHT_SIDE) - this.curr_bps++; - } else { - if (this.chMode === CHMODE_LEFT_SIDE || this.chMode === CHMODE_MID_SIDE) - this.curr_bps++; - } - - if (stream.read(1)) - throw new Error("Invalid subframe padding"); - - var type = stream.read(6); - - if (stream.read(1)) { - wasted = 1; - while (!stream.read(1)) - wasted++; - - this.curr_bps -= wasted; - } - - if (this.curr_bps > 32) - throw new Error("decorrelated bit depth > 32 (" + this.curr_bps + ")"); - - if (type === 0) { - var tmp = stream.read(this.curr_bps, true); - for (var i = 0; i < blockSize; i++) - decoded[channel][i] = tmp; - - } else if (type === 1) { - var bps = this.curr_bps; - for (var i = 0; i < blockSize; i++) - decoded[channel][i] = stream.read(bps, true); - - } else if ((type >= 8) && (type <= 12)) { - this.decode_subframe_fixed(channel, type & ~0x8); - - } else if (type >= 32) { - this.decode_subframe_lpc(channel, (type & ~0x20) + 1); - - } else { - throw new Error("Invalid coding type"); - } - - if (wasted) { - for (var i = 0; i < blockSize; i++) - decoded[channel][i] <<= wasted; - } - }; - - this.prototype.decode_subframe_fixed = function(channel, predictor_order) { - var decoded = this.decoded[channel], - stream = this.bitstream, - bps = this.curr_bps; - - // warm up samples - for (var i = 0; i < predictor_order; i++) - decoded[i] = stream.read(bps, true); - - this.decode_residuals(channel, predictor_order); - - var a = 0, b = 0, c = 0, d = 0; - - if (predictor_order > 0) - a = decoded[predictor_order - 1]; - - if (predictor_order > 1) - b = a - decoded[predictor_order - 2]; - - if (predictor_order > 2) - c = b - decoded[predictor_order - 2] + decoded[predictor_order - 3]; - - if (predictor_order > 3) - d = c - decoded[predictor_order - 2] + 2 * decoded[predictor_order - 3] - decoded[predictor_order - 4]; - - switch (predictor_order) { - case 0: - break; - - case 1: - case 2: - case 3: - case 4: - var abcd = new Int32Array([a, b, c, d]), - blockSize = this.blockSize; - - for (var i = predictor_order; i < blockSize; i++) { - abcd[predictor_order - 1] += decoded[i]; - - for (var j = predictor_order - 2; j >= 0; j--) { - abcd[j] += abcd[j + 1]; - } - - decoded[i] = abcd[0]; - } - - break; - - default: - throw new Error("Invalid Predictor Order " + predictor_order); - } - }; - - this.prototype.decode_subframe_lpc = function(channel, predictor_order) { - var stream = this.bitstream, - decoded = this.decoded[channel], - bps = this.curr_bps, - blockSize = this.blockSize; - - // warm up samples - for (var i = 0; i < predictor_order; i++) { - decoded[i] = stream.read(bps, true); - } - - var coeff_prec = stream.read(4) + 1; - if (coeff_prec === 16) - throw new Error("Invalid coefficient precision"); - - var qlevel = stream.read(5, true); - if (qlevel < 0) - throw new Error("Negative qlevel, maybe buggy stream"); - - var coeffs = new Int32Array(32); - for (var i = 0; i < predictor_order; i++) { - coeffs[i] = stream.read(coeff_prec, true); - } - - this.decode_residuals(channel, predictor_order); - - if (this.bps <= 16) { - for (var i = predictor_order; i < blockSize - 1; i += 2) { - var d = decoded[i - predictor_order], - s0 = 0, s1 = 0, c = 0; - - for (var j = predictor_order - 1; j > 0; j--) { - c = coeffs[j]; - s0 += c * d; - d = decoded[i - j]; - s1 += c * d; - } - - c = coeffs[0]; - s0 += c * d; - d = decoded[i] += (s0 >> qlevel); - s1 += c * d; - decoded[i + 1] += (s1 >> qlevel); - } - - if (i < blockSize) { - var sum = 0; - for (var j = 0; j < predictor_order; j++) - sum += coeffs[j] * decoded[i - j - 1]; - - decoded[i] += (sum >> qlevel); - } - } else { - // simulate 64 bit integer using an array of two 32 bit ints - var total = this.lpc_total; - for (var i = predictor_order; i < blockSize; i++) { - // reset total to 0 - total[0] = 0; - total[1] = 0; - - for (j = 0; j < predictor_order; j++) { - // simulate `total += coeffs[j] * decoded[i - j - 1]` - multiply_add(total, coeffs[j], decoded[i - j - 1]); - } - - // simulate `decoded[i] += total >> qlevel` - // we know that qlevel < 32 since it is a 5 bit field (see above) - decoded[i] += (total[0] >>> qlevel) | (total[1] << (32 - qlevel)); - } - } - }; - - const TWO_PWR_32_DBL = Math.pow(2, 32); - - // performs `total += a * b` on a simulated 64 bit int - // total is an Int32Array(2) - // a and b are JS numbers (32 bit ints) - function multiply_add(total, a, b) { - // multiply a * b (we can use normal JS multiplication for this) - var r = a * b; - var n = r < 0; - if (n) - r = -r; - - var r_low = (r % TWO_PWR_32_DBL) | 0; - var r_high = (r / TWO_PWR_32_DBL) | 0; - if (n) { - r_low = ~r_low + 1; - r_high = ~r_high; - } - - // add result to total - var a48 = total[1] >>> 16; - var a32 = total[1] & 0xFFFF; - var a16 = total[0] >>> 16; - var a00 = total[0] & 0xFFFF; - - var b48 = r_high >>> 16; - var b32 = r_high & 0xFFFF; - var b16 = r_low >>> 16; - var b00 = r_low & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 + b48; - c48 &= 0xFFFF; - - // store result back in total - total[0] = (c16 << 16) | c00; - total[1] = (c48 << 16) | c32; - } - - const INT_MAX = 32767; - - this.prototype.decode_residuals = function(channel, predictor_order) { - var stream = this.bitstream, - method_type = stream.read(2); - - if (method_type > 1) - throw new Error('Illegal residual coding method ' + method_type); - - var rice_order = stream.read(4), - samples = (this.blockSize >>> rice_order); - - if (predictor_order > samples) - throw new Error('Invalid predictor order ' + predictor_order + ' > ' + samples); - - var decoded = this.decoded[channel], - sample = predictor_order, - i = predictor_order; - - for (var partition = 0; partition < (1 << rice_order); partition++) { - var tmp = stream.read(method_type === 0 ? 4 : 5); - - if (tmp === (method_type === 0 ? 15 : 31)) { - tmp = stream.read(5); - for (; i < samples; i++) - decoded[sample++] = stream.read(tmp, true); - - } else { - for (; i < samples; i++) - decoded[sample++] = this.golomb(tmp, INT_MAX, 0); - } - - i = 0; - } - }; - - const MIN_CACHE_BITS = 25; - - this.prototype.golomb = function(k, limit, esc_len) { - var data = this.bitstream, - offset = data.bitPosition, - buf = data.peek(32 - offset) << offset, - v = 0; - - var log = 31 - clz(buf | 1); // log2(buf) - - if (log - k >= 32 - MIN_CACHE_BITS && 32 - log < limit) { - buf >>>= log - k; - buf += (30 - log) << k; - - data.advance(32 + k - log); - v = buf; - - } else { - for (var i = 0; data.read(1) === 0; i++) - buf = data.peek(32 - offset) << offset; - - if (i < limit - 1) { - if (k) - buf = data.read(k); - else - buf = 0; - - v = buf + (i << k); - - } else if (i === limit - 1) { - buf = data.read(esc_len); - v = buf + 1; - - } else { - v = -1; - } - } - - return (v >> 1) ^ -(v & 1); - }; - - // Should be in the damned standard library... - function clz(input) { - var output = 0, - curbyte = 0; - - while(true) { // emulate goto in JS using the break statement :D - curbyte = input >>> 24; - if (curbyte) break; - output += 8; - - curbyte = input >>> 16; - if (curbyte & 0xff) break; - output += 8; - - curbyte = input >>> 8; - if (curbyte & 0xff) break; - output += 8; - - curbyte = input; - if (curbyte & 0xff) break; - output += 8; - - return output; - } - - if (!(curbyte & 0xf0)) - output += 4; - else - curbyte >>>= 4; - - if (curbyte & 0x8) - return output; - - if (curbyte & 0x4) - return output + 1; - - if (curbyte & 0x2) - return output + 2; - - if (curbyte & 0x1) - return output + 3; - - // shouldn't get here - return output + 4; - } -}); - -module.exports = FLACDecoder; - -},{}],3:[function(require,module,exports){ -/* - * FLAC.js - Free Lossless Audio Codec decoder in JavaScript - * By Devon Govett and Jens Nockert of Official.fm Labs - * - * FLAC.js is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FLAC.js is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - */ - -var AV = (window.AV); - -var FLACDemuxer = AV.Demuxer.extend(function() { - AV.Demuxer.register(this); - - this.probe = function(buffer) { - return buffer.peekString(0, 4) === 'fLaC'; - } - - const STREAMINFO = 0, - PADDING = 1, - APPLICATION = 2, - SEEKTABLE = 3, - VORBIS_COMMENT = 4, - CUESHEET = 5, - PICTURE = 6, - INVALID = 127, - STREAMINFO_SIZE = 34; - - this.prototype.readChunk = function() { - var stream = this.stream; - - if (!this.readHeader && stream.available(4)) { - if (stream.readString(4) !== 'fLaC') - return this.emit('error', 'Invalid FLAC file.'); - - this.readHeader = true; - } - - while (stream.available(1) && !this.last) { - if (!this.readBlockHeaders) { - var tmp = stream.readUInt8(); - this.last = (tmp & 0x80) === 0x80, - this.type = tmp & 0x7F, - this.size = stream.readUInt24(); - } - - if (!this.foundStreamInfo && this.type !== STREAMINFO) - return this.emit('error', 'STREAMINFO must be the first block'); - - if (!stream.available(this.size)) - return; - - switch (this.type) { - case STREAMINFO: - if (this.foundStreamInfo) - return this.emit('error', 'STREAMINFO can only occur once.'); - - if (this.size !== STREAMINFO_SIZE) - return this.emit('error', 'STREAMINFO size is wrong.'); - - this.foundStreamInfo = true; - var bitstream = new AV.Bitstream(stream); - - var cookie = { - minBlockSize: bitstream.read(16), - maxBlockSize: bitstream.read(16), - minFrameSize: bitstream.read(24), - maxFrameSize: bitstream.read(24) - }; - - this.format = { - formatID: 'flac', - sampleRate: bitstream.read(20), - channelsPerFrame: bitstream.read(3) + 1, - bitsPerChannel: bitstream.read(5) + 1 - }; - - this.emit('format', this.format); - this.emit('cookie', cookie); - - var sampleCount = bitstream.read(36); - this.emit('duration', sampleCount / this.format.sampleRate * 1000 | 0); - - stream.advance(16); // skip MD5 hashes - this.readBlockHeaders = false; - break; - - /* - I am only looking at the least significant 32 bits of sample number and offset data - This is more than sufficient for the longest flac file I have (~50 mins 2-channel 16-bit 44.1k which uses about 7.5% of the UInt32 space for the largest offset) - Can certainly be improved by storing sample numbers and offests as doubles, but would require additional overriding of the searchTimestamp and seek functions (possibly more?) - Also the flac faq suggests it would be possible to find frame lengths and thus create seek points on the fly via decoding but I assume this would be slow - I may look into these thigns though as my project progresses - */ - case SEEKTABLE: - for(var s=0; s 0) - { - this.emit('error', 'Seek points with sample number >UInt32 not supported'); - } - var samplenum = stream.readUInt32(); - if(stream.readUInt32() > 0) - { - this.emit('error', 'Seek points with stream offset >UInt32 not supported'); - } - var offset = stream.readUInt32(); - - stream.advance(2); - - this.addSeekPoint(offset, samplenum); - } - } - break; - - case VORBIS_COMMENT: - // see http://www.xiph.org/vorbis/doc/v-comment.html - this.metadata || (this.metadata = {}); - var len = stream.readUInt32(true); - - this.metadata.vendor = stream.readString(len); - var length = stream.readUInt32(true); - - for (var i = 0; i < length; i++) { - len = stream.readUInt32(true); - var str = stream.readString(len, 'utf8'), - idx = str.indexOf('='); - - this.metadata[str.slice(0, idx).toLowerCase()] = str.slice(idx + 1); - } - - // TODO: standardize field names across formats - break; - - case PICTURE: - var type = stream.readUInt32(); - if (type !== 3) { // make sure this is album art (type 3) - stream.advance(this.size - 4); - } else { - var mimeLen = stream.readUInt32(), - mime = stream.readString(mimeLen), - descLen = stream.readUInt32(), - description = stream.readString(descLen), - width = stream.readUInt32(), - height = stream.readUInt32(), - depth = stream.readUInt32(), - colors = stream.readUInt32(), - length = stream.readUInt32(), - picture = stream.readBuffer(length); - - this.metadata || (this.metadata = {}); - this.metadata.coverArt = picture; - } - - // does anyone want the rest of the info? - break; - - default: - stream.advance(this.size); - this.readBlockHeaders = false; - } - - if (this.last && this.metadata) - this.emit('metadata', this.metadata); - } - - while (stream.available(1) && this.last) { - var buffer = stream.readSingleBuffer(stream.remainingBytes()); - this.emit('data', buffer); - } - } - -}); - -module.exports = FLACDemuxer; - -},{}],4:[function(require,module,exports){ -var AV = (window.AV); - -// if ogg.js exists, register a plugin -try { - var OggDemuxer = (window.AV.OggDemuxer); -} catch (e) {}; -if (!OggDemuxer) return; - -OggDemuxer.plugins.push({ - magic: "\177FLAC", - - init: function() { - this.list = new AV.BufferList(); - this.stream = new AV.Stream(this.list); - }, - - readHeaders: function(packet) { - var stream = this.stream; - this.list.append(new AV.Buffer(packet)); - - stream.advance(5); // magic - if (stream.readUInt8() != 1) - throw new Error('Unsupported FLAC version'); - - stream.advance(3); - if (stream.peekString(0, 4) != 'fLaC') - throw new Error('Not flac'); - - this.flac = AV.Demuxer.find(stream.peekSingleBuffer(0, stream.remainingBytes())); - if (!this.flac) - throw new Error('Flac demuxer not found'); - - this.flac.prototype.readChunk.call(this); - return true; - }, - - readPacket: function(packet) { - this.list.append(new AV.Buffer(packet)); - this.flac.prototype.readChunk.call(this); - } -}); - -},{}]},{},[1]) - - -//# sourceMappingURL=flac.js.map \ No newline at end of file diff --git a/src/core/static/js/libs/jplayer/aurora/mp3.js b/src/core/static/js/libs/jplayer/aurora/mp3.js deleted file mode 100644 index 8631e7d..0000000 --- a/src/core/static/js/libs/jplayer/aurora/mp3.js +++ /dev/null @@ -1,7706 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0) { - timestamp = this._super(timestamp); - offset = this.stream.offset; - } else { - offset = timestamp * this.format.bitrate / 8 / this.format.sampleRate; - } - - this.mp3_stream.reset(offset); - - // try to find 3 consecutive valid frame headers in a row - for (var i = 0; i < 4096; i++) { - var pos = offset + i; - for (var j = 0; j < 3; j++) { - this.mp3_stream.reset(pos); - - try { - var header = MP3FrameHeader.decode(this.mp3_stream); - } catch (e) { - break; - } - - // skip the rest of the frame - var size = header.framesize(); - if (size == null) - break; - - pos += size; - } - - // check if we're done - if (j === 3) - break; - } - - // if we didn't find 3 frames, just try the first one and hope for the best - if (j !== 3) - i = 0; - - this.mp3_stream.reset(offset + i); - - // if we guesstimated, update the timestamp to another estimate of where we actually seeked to - if (this.demuxer.seekPoints.length === 0) - timestamp = this.stream.offset / (this.format.bitrate / 8) * this.format.sampleRate; - - this.seeking = true; - return timestamp; - }; -}); - -module.exports = MP3Decoder; - -},{"./frame":4,"./header":5,"./layer1":9,"./layer2":10,"./layer3":11,"./stream":12,"./synth":13}],3:[function(require,module,exports){ -var AV = (window.AV); -var ID3v23Stream = require('./id3').ID3v23Stream; -var ID3v22Stream = require('./id3').ID3v22Stream; -var MP3FrameHeader = require('./header'); -var MP3Stream = require('./stream'); - -var MP3Demuxer = AV.Demuxer.extend(function() { - AV.Demuxer.register(this); - - this.probe = function(stream) { - var off = stream.offset; - - // skip id3 metadata if it exists - var id3header = MP3Demuxer.getID3v2Header(stream); - if (id3header) - stream.advance(10 + id3header.length); - - // attempt to read the header of the first audio frame - var s = new MP3Stream(new AV.Bitstream(stream)); - var header = null; - - try { - header = MP3FrameHeader.decode(s); - } catch (e) {}; - - // go back to the beginning, for other probes - stream.seek(off); - - return !!header; - }; - - this.getID3v2Header = function(stream) { - if (stream.peekString(0, 3) == 'ID3') { - stream = AV.Stream.fromBuffer(stream.peekBuffer(0, 10)); - stream.advance(3); // 'ID3' - - var major = stream.readUInt8(); - var minor = stream.readUInt8(); - var flags = stream.readUInt8(); - var bytes = stream.readBuffer(4).data; - var length = (bytes[0] << 21) | (bytes[1] << 14) | (bytes[2] << 7) | bytes[3]; - - return { - version: '2.' + major + '.' + minor, - major: major, - minor: minor, - flags: flags, - length: length - }; - } - - return null; - }; - - const XING_OFFSETS = [[32, 17], [17, 9]]; - this.prototype.parseDuration = function(header) { - var stream = this.stream; - var frames; - - var offset = stream.offset; - if (!header || header.layer !== 3) - return false; - - // Check for Xing/Info tag - stream.advance(XING_OFFSETS[header.flags & MP3FrameHeader.FLAGS.LSF_EXT ? 1 : 0][header.nchannels() === 1 ? 1 : 0]); - var tag = stream.readString(4); - if (tag === 'Xing' || tag === 'Info') { - var flags = stream.readUInt32(); - if (flags & 1) - frames = stream.readUInt32(); - - if (flags & 2) - var size = stream.readUInt32(); - - if (flags & 4 && frames && size) { - for (var i = 0; i < 100; i++) { - var b = stream.readUInt8(); - var pos = b / 256 * size | 0; - var time = i / 100 * (frames * header.nbsamples() * 32) | 0; - this.addSeekPoint(pos, time); - } - } - - if (flags & 8) - stream.advance(4); - - } else { - // Check for VBRI tag (always 32 bytes after end of mpegaudio header) - stream.seek(offset + 4 + 32); - tag = stream.readString(4); - if (tag == 'VBRI' && stream.readUInt16() === 1) { // Check tag version - stream.advance(4); // skip delay and quality - stream.advance(4); // skip size - frames = stream.readUInt32(); - - var entries = stream.readUInt16(); - var scale = stream.readUInt16(); - var bytesPerEntry = stream.readUInt16(); - var framesPerEntry = stream.readUInt16(); - var fn = 'readUInt' + (bytesPerEntry * 8); - - var pos = 0; - for (var i = 0; i < entries; i++) { - this.addSeekPoint(pos, framesPerEntry * i); - pos += stream[fn](); - } - } - } - - if (!frames) - return false; - - this.emit('duration', (frames * header.nbsamples() * 32) / header.samplerate * 1000 | 0); - return true; - }; - - this.prototype.readChunk = function() { - var stream = this.stream; - - if (!this.sentInfo) { - // read id3 metadata if it exists - var id3header = MP3Demuxer.getID3v2Header(stream); - if (id3header) { - stream.advance(10); - - if (id3header.major > 2) { - var id3 = new ID3v23Stream(id3header, stream); - } else { - var id3 = new ID3v22Stream(id3header, stream); - } - - this.emit('metadata', id3.read()); - } - - // read the header of the first audio frame - var off = stream.offset; - var s = new MP3Stream(new AV.Bitstream(stream)); - - var header = MP3FrameHeader.decode(s); - if (!header) - return this.emit('error', 'Could not find first frame.'); - - this.emit('format', { - formatID: 'mp3', - sampleRate: header.samplerate, - channelsPerFrame: header.nchannels(), - bitrate: header.bitrate, - floatingPoint: true - }); - - var sentDuration = this.parseDuration(header); - stream.advance(off - stream.offset); - - // if there were no Xing/VBRI tags, guesstimate the duration based on data size and bitrate - this.dataSize = 0; - if (!sentDuration) { - this.on('end', function() { - this.emit('duration', this.dataSize * 8 / header.bitrate * 1000 | 0); - }); - } - - this.sentInfo = true; - } - - while (stream.available(1)) { - var buffer = stream.readSingleBuffer(stream.remainingBytes()); - this.dataSize += buffer.length; - this.emit('data', buffer); - } - }; -}); - -module.exports = MP3Demuxer; - -},{"./header":5,"./id3":7,"./stream":12}],4:[function(require,module,exports){ -var MP3FrameHeader = require('./header'); -var utils = require('./utils'); - -function MP3Frame() { - this.header = null; // MPEG audio header - this.options = 0; // decoding options (from stream) - this.sbsample = utils.makeArray([2, 36, 32]); // synthesis subband filter samples - this.overlap = utils.makeArray([2, 32, 18]); // Layer III block overlap data - this.decoders = []; -} - -// included layer decoders are registered here -MP3Frame.layers = []; - -MP3Frame.prototype.decode = function(stream) { - if (!this.header || !(this.header.flags & MP3FrameHeader.FLAGS.INCOMPLETE)) - this.header = MP3FrameHeader.decode(stream); - - this.header.flags &= ~MP3FrameHeader.FLAGS.INCOMPLETE; - - // make an instance of the decoder for this layer if needed - var decoder = this.decoders[this.header.layer - 1]; - if (!decoder) { - var Layer = MP3Frame.layers[this.header.layer]; - if (!Layer) - throw new Error("Layer " + this.header.layer + " is not supported."); - - decoder = this.decoders[this.header.layer - 1] = new Layer(); - } - - decoder.decode(stream, this); -}; - -module.exports = MP3Frame; - -},{"./header":5,"./utils":15}],5:[function(require,module,exports){ -var AV = (window.AV); - -function MP3FrameHeader() { - this.layer = 0; // audio layer (1, 2, or 3) - this.mode = 0; // channel mode (see above) - this.mode_extension = 0; // additional mode info - this.emphasis = 0; // de-emphasis to use (see above) - - this.bitrate = 0; // stream bitrate (bps) - this.samplerate = 0; // sampling frequency (Hz) - - this.crc_check = 0; // frame CRC accumulator - this.crc_target = 0; // final target CRC checksum - - this.flags = 0; // flags (see above) - this.private_bits = 0; // private bits -} - -const BITRATES = [ - // MPEG-1 - [ 0, 32000, 64000, 96000, 128000, 160000, 192000, 224000, // Layer I - 256000, 288000, 320000, 352000, 384000, 416000, 448000 ], - [ 0, 32000, 48000, 56000, 64000, 80000, 96000, 112000, // Layer II - 128000, 160000, 192000, 224000, 256000, 320000, 384000 ], - [ 0, 32000, 40000, 48000, 56000, 64000, 80000, 96000, // Layer III - 112000, 128000, 160000, 192000, 224000, 256000, 320000 ], - - // MPEG-2 LSF - [ 0, 32000, 48000, 56000, 64000, 80000, 96000, 112000, // Layer I - 128000, 144000, 160000, 176000, 192000, 224000, 256000 ], - [ 0, 8000, 16000, 24000, 32000, 40000, 48000, 56000, // Layers - 64000, 80000, 96000, 112000, 128000, 144000, 160000 ] // II & III -]; - -const SAMPLERATES = [ - 44100, 48000, 32000 -]; - -MP3FrameHeader.FLAGS = { - NPRIVATE_III: 0x0007, // number of Layer III private bits - INCOMPLETE : 0x0008, // header but not data is decoded - - PROTECTION : 0x0010, // frame has CRC protection - COPYRIGHT : 0x0020, // frame is copyright - ORIGINAL : 0x0040, // frame is original (else copy) - PADDING : 0x0080, // frame has additional slot - - I_STEREO : 0x0100, // uses intensity joint stereo - MS_STEREO : 0x0200, // uses middle/side joint stereo - FREEFORMAT : 0x0400, // uses free format bitrate - - LSF_EXT : 0x1000, // lower sampling freq. extension - MC_EXT : 0x2000, // multichannel audio extension - MPEG_2_5_EXT: 0x4000 // MPEG 2.5 (unofficial) extension -}; - -const PRIVATE = { - HEADER : 0x0100, // header private bit - III : 0x001f // Layer III private bits (up to 5) -}; - -MP3FrameHeader.MODE = { - SINGLE_CHANNEL: 0, // single channel - DUAL_CHANNEL : 1, // dual channel - JOINT_STEREO : 2, // joint (MS/intensity) stereo - STEREO : 3 // normal LR stereo -}; - -const EMPHASIS = { - NONE : 0, // no emphasis - _50_15_US : 1, // 50/15 microseconds emphasis - CCITT_J_17: 3, // CCITT J.17 emphasis - RESERVED : 2 // unknown emphasis -}; - -MP3FrameHeader.BUFFER_GUARD = 8; -MP3FrameHeader.BUFFER_MDLEN = (511 + 2048 + MP3FrameHeader.BUFFER_GUARD); - -MP3FrameHeader.prototype.copy = function() { - var clone = new MP3FrameHeader(); - var keys = Object.keys(this); - - for (var key in keys) { - clone[key] = this[key]; - } - - return clone; -} - -MP3FrameHeader.prototype.nchannels = function () { - return this.mode === 0 ? 1 : 2; -}; - -MP3FrameHeader.prototype.nbsamples = function() { - return (this.layer === 1 ? 12 : ((this.layer === 3 && (this.flags & MP3FrameHeader.FLAGS.LSF_EXT)) ? 18 : 36)); -}; - -MP3FrameHeader.prototype.framesize = function() { - if (this.bitrate === 0) - return null; - - var padding = (this.flags & MP3FrameHeader.FLAGS.PADDING ? 1 : 0); - switch (this.layer) { - case 1: - var size = (this.bitrate * 12) / this.samplerate | 0; - return (size + padding) * 4; - - case 2: - var size = (this.bitrate * 144) / this.samplerate | 0; - return size + padding; - - case 3: - default: - var lsf = this.flags & MP3FrameHeader.FLAGS.LSF_EXT ? 1 : 0; - var size = (this.bitrate * 144) / (this.samplerate << lsf) | 0; - return size + padding; - } -}; - -MP3FrameHeader.prototype.decode = function(stream) { - this.flags = 0; - this.private_bits = 0; - - // syncword - stream.advance(11); - - // MPEG 2.5 indicator (really part of syncword) - if (stream.read(1) === 0) - this.flags |= MP3FrameHeader.FLAGS.MPEG_2_5_EXT; - - // ID - if (stream.read(1) === 0) { - this.flags |= MP3FrameHeader.FLAGS.LSF_EXT; - } else if (this.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT) { - throw new AV.UnderflowError(); // LOSTSYNC - } - - // layer - this.layer = 4 - stream.read(2); - - if (this.layer === 4) - throw new Error('Invalid layer'); - - // protection_bit - if (stream.read(1) === 0) - this.flags |= MP3FrameHeader.FLAGS.PROTECTION; - - // bitrate_index - var index = stream.read(4); - if (index === 15) - throw new Error('Invalid bitrate'); - - if (this.flags & MP3FrameHeader.FLAGS.LSF_EXT) { - this.bitrate = BITRATES[3 + (this.layer >> 1)][index]; - } else { - this.bitrate = BITRATES[this.layer - 1][index]; - } - - // sampling_frequency - index = stream.read(2); - if (index === 3) - throw new Error('Invalid sampling frequency'); - - this.samplerate = SAMPLERATES[index]; - - if (this.flags & MP3FrameHeader.FLAGS.LSF_EXT) { - this.samplerate /= 2; - - if (this.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT) - this.samplerate /= 2; - } - - // padding_bit - if (stream.read(1)) - this.flags |= MP3FrameHeader.FLAGS.PADDING; - - // private_bit - if (stream.read(1)) - this.private_bits |= PRIVATE.HEADER; - - // mode - this.mode = 3 - stream.read(2); - - // mode_extension - this.mode_extension = stream.read(2); - - // copyright - if (stream.read(1)) - this.flags |= MP3FrameHeader.FLAGS.COPYRIGHT; - - // original/copy - if (stream.read(1)) - this.flags |= MP3FrameHeader.FLAGS.ORIGINAL; - - // emphasis - this.emphasis = stream.read(2); - - // crc_check - if (this.flags & MP3FrameHeader.FLAGS.PROTECTION) - this.crc_target = stream.read(16); -}; - -MP3FrameHeader.decode = function(stream) { - // synchronize - var ptr = stream.next_frame; - var syncing = true; - var header = null; - - while (syncing) { - syncing = false; - - if (stream.sync) { - if (!stream.available(MP3FrameHeader.BUFFER_GUARD)) { - stream.next_frame = ptr; - throw new AV.UnderflowError(); - } else if (!(stream.getU8(ptr) === 0xff && (stream.getU8(ptr + 1) & 0xe0) === 0xe0)) { - // mark point where frame sync word was expected - stream.this_frame = ptr; - stream.next_frame = ptr + 1; - throw new AV.UnderflowError(); // LOSTSYNC - } - } else { - stream.seek(ptr * 8); - if (!stream.doSync()) - throw new AV.UnderflowError(); - - ptr = stream.nextByte(); - } - - // begin processing - stream.this_frame = ptr; - stream.next_frame = ptr + 1; // possibly bogus sync word - - stream.seek(stream.this_frame * 8); - - header = new MP3FrameHeader(); - header.decode(stream); - - if (header.bitrate === 0) { - if (stream.freerate === 0 || !stream.sync || (header.layer === 3 && stream.freerate > 640000)) - MP3FrameHeader.free_bitrate(stream, header); - - header.bitrate = stream.freerate; - header.flags |= MP3FrameHeader.FLAGS.FREEFORMAT; - } - - // calculate beginning of next frame - var pad_slot = (header.flags & MP3FrameHeader.FLAGS.PADDING) ? 1 : 0; - - if (header.layer === 1) { - var N = (((12 * header.bitrate / header.samplerate) << 0) + pad_slot) * 4; - } else { - var slots_per_frame = (header.layer === 3 && (header.flags & MP3FrameHeader.FLAGS.LSF_EXT)) ? 72 : 144; - var N = ((slots_per_frame * header.bitrate / header.samplerate) << 0) + pad_slot; - } - - // verify there is enough data left in buffer to decode this frame - if (!stream.available(N + MP3FrameHeader.BUFFER_GUARD)) { - stream.next_frame = stream.this_frame; - throw new AV.UnderflowError(); - } - - stream.next_frame = stream.this_frame + N; - - if (!stream.sync) { - // check that a valid frame header follows this frame - ptr = stream.next_frame; - - if (!(stream.getU8(ptr) === 0xff && (stream.getU8(ptr + 1) & 0xe0) === 0xe0)) { - ptr = stream.next_frame = stream.this_frame + 1; - - // emulating 'goto sync' - syncing = true; - continue; - } - - stream.sync = true; - } - } - - header.flags |= MP3FrameHeader.FLAGS.INCOMPLETE; - return header; -}; - -MP3FrameHeader.free_bitrate = function(stream, header) { - var pad_slot = header.flags & MP3FrameHeader.FLAGS.PADDING ? 1 : 0, - slots_per_frame = header.layer === 3 && header.flags & MP3FrameHeader.FLAGS.LSF_EXT ? 72 : 144; - - var start = stream.offset(); - var rate = 0; - - while (stream.doSync()) { - var peek_header = header.copy(); - var peek_stream = stream.copy(); - - if (peek_header.decode(peek_stream) && peek_header.layer === header.layer && peek_header.samplerate === header.samplerate) { - var N = stream.nextByte() - stream.this_frame; - - if (header.layer === 1) { - rate = header.samplerate * (N - 4 * pad_slot + 4) / 48 / 1000 | 0; - } else { - rate = header.samplerate * (N - pad_slot + 1) / slots_per_frame / 1000 | 0; - } - - if (rate >= 8) - break; - } - - stream.advance(8); - } - - stream.seek(start); - - if (rate < 8 || (header.layer === 3 && rate > 640)) - throw new AV.UnderflowError(); // LOSTSYNC - - stream.freerate = rate * 1000; -}; - -module.exports = MP3FrameHeader; - -},{}],6:[function(require,module,exports){ -/* - * These are the Huffman code words for Layer III. - * The data for these tables are derived from Table B.7 of ISO/IEC 11172-3. - * - * These tables support decoding up to 4 Huffman code bits at a time. - */ - -var PTR = function(offs, bits) { - return { - final: 0, - ptr: { - bits: bits, - offset: offs - } - }; -}; - -var huffquad_V = function (v, w, x, y, hlen) { - return { - final: 1, - value: { - v: v, - w: w, - x: x, - y: y, - hlen: hlen - } - }; -}; - -const hufftabA = [ - /* 0000 */ PTR(16, 2), - /* 0001 */ PTR(20, 2), - /* 0010 */ PTR(24, 1), - /* 0011 */ PTR(26, 1), - /* 0100 */ huffquad_V(0, 0, 1, 0, 4), - /* 0101 */ huffquad_V(0, 0, 0, 1, 4), - /* 0110 */ huffquad_V(0, 1, 0, 0, 4), - /* 0111 */ huffquad_V(1, 0, 0, 0, 4), - /* 1000 */ huffquad_V(0, 0, 0, 0, 1), - /* 1001 */ huffquad_V(0, 0, 0, 0, 1), - /* 1010 */ huffquad_V(0, 0, 0, 0, 1), - /* 1011 */ huffquad_V(0, 0, 0, 0, 1), - /* 1100 */ huffquad_V(0, 0, 0, 0, 1), - /* 1101 */ huffquad_V(0, 0, 0, 0, 1), - /* 1110 */ huffquad_V(0, 0, 0, 0, 1), - /* 1111 */ huffquad_V(0, 0, 0, 0, 1), - - /* 0000 ... */ - /* 00 */ huffquad_V(1, 0, 1, 1, 2), /* 16 */ - /* 01 */ huffquad_V(1, 1, 1, 1, 2), - /* 10 */ huffquad_V(1, 1, 0, 1, 2), - /* 11 */ huffquad_V(1, 1, 1, 0, 2), - - /* 0001 ... */ - /* 00 */ huffquad_V(0, 1, 1, 1, 2), /* 20 */ - /* 01 */ huffquad_V(0, 1, 0, 1, 2), - /* 10 */ huffquad_V(1, 0, 0, 1, 1), - /* 11 */ huffquad_V(1, 0, 0, 1, 1), - - /* 0010 ... */ - /* 0 */ huffquad_V(0, 1, 1, 0, 1), /* 24 */ - /* 1 */ huffquad_V(0, 0, 1, 1, 1), - - /* 0011 ... */ - /* 0 */ huffquad_V(1, 0, 1, 0, 1), /* 26 */ - /* 1 */ huffquad_V(1, 1, 0, 0, 1) -]; - -const hufftabB = [ - /* 0000 */ huffquad_V(1, 1, 1, 1, 4), - /* 0001 */ huffquad_V(1, 1, 1, 0, 4), - /* 0010 */ huffquad_V(1, 1, 0, 1, 4), - /* 0011 */ huffquad_V(1, 1, 0, 0, 4), - /* 0100 */ huffquad_V(1, 0, 1, 1, 4), - /* 0101 */ huffquad_V(1, 0, 1, 0, 4), - /* 0110 */ huffquad_V(1, 0, 0, 1, 4), - /* 0111 */ huffquad_V(1, 0, 0, 0, 4), - /* 1000 */ huffquad_V(0, 1, 1, 1, 4), - /* 1001 */ huffquad_V(0, 1, 1, 0, 4), - /* 1010 */ huffquad_V(0, 1, 0, 1, 4), - /* 1011 */ huffquad_V(0, 1, 0, 0, 4), - /* 1100 */ huffquad_V(0, 0, 1, 1, 4), - /* 1101 */ huffquad_V(0, 0, 1, 0, 4), - /* 1110 */ huffquad_V(0, 0, 0, 1, 4), - /* 1111 */ huffquad_V(0, 0, 0, 0, 4) -]; - -var V = function (x, y, hlen) { - return { - final: 1, - value: { - x: x, - y: y, - hlen: hlen - } - }; -}; - -const hufftab0 = [ - /* */ V(0, 0, 0) -]; - -const hufftab1 = [ - /* 000 */ V(1, 1, 3), - /* 001 */ V(0, 1, 3), - /* 010 */ V(1, 0, 2), - /* 011 */ V(1, 0, 2), - /* 100 */ V(0, 0, 1), - /* 101 */ V(0, 0, 1), - /* 110 */ V(0, 0, 1), - /* 111 */ V(0, 0, 1) -]; - -const hufftab2 = [ - /* 000 */ PTR(8, 3), - /* 001 */ V(1, 1, 3), - /* 010 */ V(0, 1, 3), - /* 011 */ V(1, 0, 3), - /* 100 */ V(0, 0, 1), - /* 101 */ V(0, 0, 1), - /* 110 */ V(0, 0, 1), - /* 111 */ V(0, 0, 1), - - /* 000 ... */ - /* 000 */ V(2, 2, 3), /* 8 */ - /* 001 */ V(0, 2, 3), - /* 010 */ V(1, 2, 2), - /* 011 */ V(1, 2, 2), - /* 100 */ V(2, 1, 2), - /* 101 */ V(2, 1, 2), - /* 110 */ V(2, 0, 2), - /* 111 */ V(2, 0, 2) -]; - -const hufftab3 = [ - /* 000 */ PTR(8, 3), - /* 001 */ V(1, 0, 3), - /* 010 */ V(1, 1, 2), - /* 011 */ V(1, 1, 2), - /* 100 */ V(0, 1, 2), - /* 101 */ V(0, 1, 2), - /* 110 */ V(0, 0, 2), - /* 111 */ V(0, 0, 2), - - /* 000 ... */ - /* 000 */ V(2, 2, 3), /* 8 */ - /* 001 */ V(0, 2, 3), - /* 010 */ V(1, 2, 2), - /* 011 */ V(1, 2, 2), - /* 100 */ V(2, 1, 2), - /* 101 */ V(2, 1, 2), - /* 110 */ V(2, 0, 2), - /* 111 */ V(2, 0, 2) -]; - -const hufftab5 = [ - /* 000 */ PTR(8, 4), - /* 001 */ V(1, 1, 3), - /* 010 */ V(0, 1, 3), - /* 011 */ V(1, 0, 3), - /* 100 */ V(0, 0, 1), - /* 101 */ V(0, 0, 1), - /* 110 */ V(0, 0, 1), - /* 111 */ V(0, 0, 1), - - /* 000 ... */ - /* 0000 */ PTR(24, 1), /* 8 */ - /* 0001 */ V(3, 2, 4), - /* 0010 */ V(3, 1, 3), - /* 0011 */ V(3, 1, 3), - /* 0100 */ V(1, 3, 4), - /* 0101 */ V(0, 3, 4), - /* 0110 */ V(3, 0, 4), - /* 0111 */ V(2, 2, 4), - /* 1000 */ V(1, 2, 3), - /* 1001 */ V(1, 2, 3), - /* 1010 */ V(2, 1, 3), - /* 1011 */ V(2, 1, 3), - /* 1100 */ V(0, 2, 3), - /* 1101 */ V(0, 2, 3), - /* 1110 */ V(2, 0, 3), - /* 1111 */ V(2, 0, 3), - - /* 000 0000 ... */ - /* 0 */ V(3, 3, 1), /* 24 */ - /* 1 */ V(2, 3, 1) -]; - -const hufftab6 = [ - /* 0000 */ PTR(16, 3), - /* 0001 */ PTR(24, 1), - /* 0010 */ PTR(26, 1), - /* 0011 */ V(1, 2, 4), - /* 0100 */ V(2, 1, 4), - /* 0101 */ V(2, 0, 4), - /* 0110 */ V(0, 1, 3), - /* 0111 */ V(0, 1, 3), - /* 1000 */ V(1, 1, 2), - /* 1001 */ V(1, 1, 2), - /* 1010 */ V(1, 1, 2), - /* 1011 */ V(1, 1, 2), - /* 1100 */ V(1, 0, 3), - /* 1101 */ V(1, 0, 3), - /* 1110 */ V(0, 0, 3), - /* 1111 */ V(0, 0, 3), - - /* 0000 ... */ - /* 000 */ V(3, 3, 3), /* 16 */ - /* 001 */ V(0, 3, 3), - /* 010 */ V(2, 3, 2), - /* 011 */ V(2, 3, 2), - /* 100 */ V(3, 2, 2), - /* 101 */ V(3, 2, 2), - /* 110 */ V(3, 0, 2), - /* 111 */ V(3, 0, 2), - - /* 0001 ... */ - /* 0 */ V(1, 3, 1), /* 24 */ - /* 1 */ V(3, 1, 1), - - /* 0010 ... */ - /* 0 */ V(2, 2, 1), /* 26 */ - /* 1 */ V(0, 2, 1) -]; - -const hufftab7 = [ - /* 0000 */ PTR(16, 4), - /* 0001 */ PTR(32, 4), - /* 0010 */ PTR(48, 2), - /* 0011 */ V(1, 1, 4), - /* 0100 */ V(0, 1, 3), - /* 0101 */ V(0, 1, 3), - /* 0110 */ V(1, 0, 3), - /* 0111 */ V(1, 0, 3), - /* 1000 */ V(0, 0, 1), - /* 1001 */ V(0, 0, 1), - /* 1010 */ V(0, 0, 1), - /* 1011 */ V(0, 0, 1), - /* 1100 */ V(0, 0, 1), - /* 1101 */ V(0, 0, 1), - /* 1110 */ V(0, 0, 1), - /* 1111 */ V(0, 0, 1), - - /* 0000 ... */ - /* 0000 */ PTR(52, 2), /* 16 */ - /* 0001 */ PTR(56, 1), - /* 0010 */ PTR(58, 1), - /* 0011 */ V(1, 5, 4), - /* 0100 */ V(5, 1, 4), - /* 0101 */ PTR(60, 1), - /* 0110 */ V(5, 0, 4), - /* 0111 */ PTR(62, 1), - /* 1000 */ V(2, 4, 4), - /* 1001 */ V(4, 2, 4), - /* 1010 */ V(1, 4, 3), - /* 1011 */ V(1, 4, 3), - /* 1100 */ V(4, 1, 3), - /* 1101 */ V(4, 1, 3), - /* 1110 */ V(4, 0, 3), - /* 1111 */ V(4, 0, 3), - - /* 0001 ... */ - /* 0000 */ V(0, 4, 4), /* 32 */ - /* 0001 */ V(2, 3, 4), - /* 0010 */ V(3, 2, 4), - /* 0011 */ V(0, 3, 4), - /* 0100 */ V(1, 3, 3), - /* 0101 */ V(1, 3, 3), - /* 0110 */ V(3, 1, 3), - /* 0111 */ V(3, 1, 3), - /* 1000 */ V(3, 0, 3), - /* 1001 */ V(3, 0, 3), - /* 1010 */ V(2, 2, 3), - /* 1011 */ V(2, 2, 3), - /* 1100 */ V(1, 2, 2), - /* 1101 */ V(1, 2, 2), - /* 1110 */ V(1, 2, 2), - /* 1111 */ V(1, 2, 2), - - /* 0010 ... */ - /* 00 */ V(2, 1, 1), /* 48 */ - /* 01 */ V(2, 1, 1), - /* 10 */ V(0, 2, 2), - /* 11 */ V(2, 0, 2), - - /* 0000 0000 ... */ - /* 00 */ V(5, 5, 2), /* 52 */ - /* 01 */ V(4, 5, 2), - /* 10 */ V(5, 4, 2), - /* 11 */ V(5, 3, 2), - - /* 0000 0001 ... */ - /* 0 */ V(3, 5, 1), /* 56 */ - /* 1 */ V(4, 4, 1), - - /* 0000 0010 ... */ - /* 0 */ V(2, 5, 1), /* 58 */ - /* 1 */ V(5, 2, 1), - - /* 0000 0101 ... */ - /* 0 */ V(0, 5, 1), /* 60 */ - /* 1 */ V(3, 4, 1), - - /* 0000 0111 ... */ - /* 0 */ V(4, 3, 1), /* 62 */ - /* 1 */ V(3, 3, 1) -]; - -const hufftab8 = [ - /* 0000 */ PTR(16, 4), - /* 0001 */ PTR(32, 4), - /* 0010 */ V(1, 2, 4), - /* 0011 */ V(2, 1, 4), - /* 0100 */ V(1, 1, 2), - /* 0101 */ V(1, 1, 2), - /* 0110 */ V(1, 1, 2), - /* 0111 */ V(1, 1, 2), - /* 1000 */ V(0, 1, 3), - /* 1001 */ V(0, 1, 3), - /* 1010 */ V(1, 0, 3), - /* 1011 */ V(1, 0, 3), - /* 1100 */ V(0, 0, 2), - /* 1101 */ V(0, 0, 2), - /* 1110 */ V(0, 0, 2), - /* 1111 */ V(0, 0, 2), - - /* 0000 ... */ - /* 0000 */ PTR(48, 3), /* 16 */ - /* 0001 */ PTR(56, 2), - /* 0010 */ PTR(60, 1), - /* 0011 */ V(1, 5, 4), - /* 0100 */ V(5, 1, 4), - /* 0101 */ PTR(62, 1), - /* 0110 */ PTR(64, 1), - /* 0111 */ V(2, 4, 4), - /* 1000 */ V(4, 2, 4), - /* 1001 */ V(1, 4, 4), - /* 1010 */ V(4, 1, 3), - /* 1011 */ V(4, 1, 3), - /* 1100 */ V(0, 4, 4), - /* 1101 */ V(4, 0, 4), - /* 1110 */ V(2, 3, 4), - /* 1111 */ V(3, 2, 4), - - /* 0001 ... */ - /* 0000 */ V(1, 3, 4), /* 32 */ - /* 0001 */ V(3, 1, 4), - /* 0010 */ V(0, 3, 4), - /* 0011 */ V(3, 0, 4), - /* 0100 */ V(2, 2, 2), - /* 0101 */ V(2, 2, 2), - /* 0110 */ V(2, 2, 2), - /* 0111 */ V(2, 2, 2), - /* 1000 */ V(0, 2, 2), - /* 1001 */ V(0, 2, 2), - /* 1010 */ V(0, 2, 2), - /* 1011 */ V(0, 2, 2), - /* 1100 */ V(2, 0, 2), - /* 1101 */ V(2, 0, 2), - /* 1110 */ V(2, 0, 2), - /* 1111 */ V(2, 0, 2), - - /* 0000 0000 ... */ - /* 000 */ V(5, 5, 3), /* 48 */ - /* 001 */ V(5, 4, 3), - /* 010 */ V(4, 5, 2), - /* 011 */ V(4, 5, 2), - /* 100 */ V(5, 3, 1), - /* 101 */ V(5, 3, 1), - /* 110 */ V(5, 3, 1), - /* 111 */ V(5, 3, 1), - - /* 0000 0001 ... */ - /* 00 */ V(3, 5, 2), /* 56 */ - /* 01 */ V(4, 4, 2), - /* 10 */ V(2, 5, 1), - /* 11 */ V(2, 5, 1), - - /* 0000 0010 ... */ - /* 0 */ V(5, 2, 1), /* 60 */ - /* 1 */ V(0, 5, 1), - - /* 0000 0101 ... */ - /* 0 */ V(3, 4, 1), /* 62 */ - /* 1 */ V(4, 3, 1), - - /* 0000 0110 ... */ - /* 0 */ V(5, 0, 1), /* 64 */ - /* 1 */ V(3, 3, 1) -]; - -const hufftab9 = [ - /* 0000 */ PTR(16, 4), - /* 0001 */ PTR(32, 3), - /* 0010 */ PTR(40, 2), - /* 0011 */ PTR(44, 2), - /* 0100 */ PTR(48, 1), - /* 0101 */ V(1, 2, 4), - /* 0110 */ V(2, 1, 4), - /* 0111 */ V(2, 0, 4), - /* 1000 */ V(1, 1, 3), - /* 1001 */ V(1, 1, 3), - /* 1010 */ V(0, 1, 3), - /* 1011 */ V(0, 1, 3), - /* 1100 */ V(1, 0, 3), - /* 1101 */ V(1, 0, 3), - /* 1110 */ V(0, 0, 3), - /* 1111 */ V(0, 0, 3), - - /* 0000 ... */ - /* 0000 */ PTR(50, 1), /* 16 */ - /* 0001 */ V(3, 5, 4), - /* 0010 */ V(5, 3, 4), - /* 0011 */ PTR(52, 1), - /* 0100 */ V(4, 4, 4), - /* 0101 */ V(2, 5, 4), - /* 0110 */ V(5, 2, 4), - /* 0111 */ V(1, 5, 4), - /* 1000 */ V(5, 1, 3), - /* 1001 */ V(5, 1, 3), - /* 1010 */ V(3, 4, 3), - /* 1011 */ V(3, 4, 3), - /* 1100 */ V(4, 3, 3), - /* 1101 */ V(4, 3, 3), - /* 1110 */ V(5, 0, 4), - /* 1111 */ V(0, 4, 4), - - /* 0001 ... */ - /* 000 */ V(2, 4, 3), /* 32 */ - /* 001 */ V(4, 2, 3), - /* 010 */ V(3, 3, 3), - /* 011 */ V(4, 0, 3), - /* 100 */ V(1, 4, 2), - /* 101 */ V(1, 4, 2), - /* 110 */ V(4, 1, 2), - /* 111 */ V(4, 1, 2), - - /* 0010 ... */ - /* 00 */ V(2, 3, 2), /* 40 */ - /* 01 */ V(3, 2, 2), - /* 10 */ V(1, 3, 1), - /* 11 */ V(1, 3, 1), - - /* 0011 ... */ - /* 00 */ V(3, 1, 1), /* 44 */ - /* 01 */ V(3, 1, 1), - /* 10 */ V(0, 3, 2), - /* 11 */ V(3, 0, 2), - - /* 0100 ... */ - /* 0 */ V(2, 2, 1), /* 48 */ - /* 1 */ V(0, 2, 1), - - /* 0000 0000 ... */ - /* 0 */ V(5, 5, 1), /* 50 */ - /* 1 */ V(4, 5, 1), - - /* 0000 0011 ... */ - /* 0 */ V(5, 4, 1), /* 52 */ - /* 1 */ V(0, 5, 1) -]; - -const hufftab10 = [ - /* 0000 */ PTR(16, 4), - /* 0001 */ PTR(32, 4), - /* 0010 */ PTR(48, 2), - /* 0011 */ V(1, 1, 4), - /* 0100 */ V(0, 1, 3), - /* 0101 */ V(0, 1, 3), - /* 0110 */ V(1, 0, 3), - /* 0111 */ V(1, 0, 3), - /* 1000 */ V(0, 0, 1), - /* 1001 */ V(0, 0, 1), - /* 1010 */ V(0, 0, 1), - /* 1011 */ V(0, 0, 1), - /* 1100 */ V(0, 0, 1), - /* 1101 */ V(0, 0, 1), - /* 1110 */ V(0, 0, 1), - /* 1111 */ V(0, 0, 1), - - /* 0000 ... */ - /* 0000 */ PTR(52, 3), /* 16 */ - /* 0001 */ PTR(60, 2), - /* 0010 */ PTR(64, 3), - /* 0011 */ PTR(72, 1), - /* 0100 */ PTR(74, 2), - /* 0101 */ PTR(78, 2), - /* 0110 */ PTR(82, 2), - /* 0111 */ V(1, 7, 4), - /* 1000 */ V(7, 1, 4), - /* 1001 */ PTR(86, 1), - /* 1010 */ PTR(88, 2), - /* 1011 */ PTR(92, 2), - /* 1100 */ V(1, 6, 4), - /* 1101 */ V(6, 1, 4), - /* 1110 */ V(6, 0, 4), - /* 1111 */ PTR(96, 1), - - /* 0001 ... */ - /* 0000 */ PTR(98, 1), /* 32 */ - /* 0001 */ PTR(100, 1), - /* 0010 */ V(1, 4, 4), - /* 0011 */ V(4, 1, 4), - /* 0100 */ V(4, 0, 4), - /* 0101 */ V(2, 3, 4), - /* 0110 */ V(3, 2, 4), - /* 0111 */ V(0, 3, 4), - /* 1000 */ V(1, 3, 3), - /* 1001 */ V(1, 3, 3), - /* 1010 */ V(3, 1, 3), - /* 1011 */ V(3, 1, 3), - /* 1100 */ V(3, 0, 3), - /* 1101 */ V(3, 0, 3), - /* 1110 */ V(2, 2, 3), - /* 1111 */ V(2, 2, 3), - - /* 0010 ... */ - /* 00 */ V(1, 2, 2), /* 48 */ - /* 01 */ V(2, 1, 2), - /* 10 */ V(0, 2, 2), - /* 11 */ V(2, 0, 2), - - /* 0000 0000 ... */ - /* 000 */ V(7, 7, 3), /* 52 */ - /* 001 */ V(6, 7, 3), - /* 010 */ V(7, 6, 3), - /* 011 */ V(5, 7, 3), - /* 100 */ V(7, 5, 3), - /* 101 */ V(6, 6, 3), - /* 110 */ V(4, 7, 2), - /* 111 */ V(4, 7, 2), - - /* 0000 0001 ... */ - /* 00 */ V(7, 4, 2), /* 60 */ - /* 01 */ V(5, 6, 2), - /* 10 */ V(6, 5, 2), - /* 11 */ V(3, 7, 2), - - /* 0000 0010 ... */ - /* 000 */ V(7, 3, 2), /* 64 */ - /* 001 */ V(7, 3, 2), - /* 010 */ V(4, 6, 2), - /* 011 */ V(4, 6, 2), - /* 100 */ V(5, 5, 3), - /* 101 */ V(5, 4, 3), - /* 110 */ V(6, 3, 2), - /* 111 */ V(6, 3, 2), - - /* 0000 0011 ... */ - /* 0 */ V(2, 7, 1), /* 72 */ - /* 1 */ V(7, 2, 1), - - /* 0000 0100 ... */ - /* 00 */ V(6, 4, 2), /* 74 */ - /* 01 */ V(0, 7, 2), - /* 10 */ V(7, 0, 1), - /* 11 */ V(7, 0, 1), - - /* 0000 0101 ... */ - /* 00 */ V(6, 2, 1), /* 78 */ - /* 01 */ V(6, 2, 1), - /* 10 */ V(4, 5, 2), - /* 11 */ V(3, 5, 2), - - /* 0000 0110 ... */ - /* 00 */ V(0, 6, 1), /* 82 */ - /* 01 */ V(0, 6, 1), - /* 10 */ V(5, 3, 2), - /* 11 */ V(4, 4, 2), - - /* 0000 1001 ... */ - /* 0 */ V(3, 6, 1), /* 86 */ - /* 1 */ V(2, 6, 1), - - /* 0000 1010 ... */ - /* 00 */ V(2, 5, 2), /* 88 */ - /* 01 */ V(5, 2, 2), - /* 10 */ V(1, 5, 1), - /* 11 */ V(1, 5, 1), - - /* 0000 1011 ... */ - /* 00 */ V(5, 1, 1), /* 92 */ - /* 01 */ V(5, 1, 1), - /* 10 */ V(3, 4, 2), - /* 11 */ V(4, 3, 2), - - /* 0000 1111 ... */ - /* 0 */ V(0, 5, 1), /* 96 */ - /* 1 */ V(5, 0, 1), - - /* 0001 0000 ... */ - /* 0 */ V(2, 4, 1), /* 98 */ - /* 1 */ V(4, 2, 1), - - /* 0001 0001 ... */ - /* 0 */ V(3, 3, 1), /* 100 */ - /* 1 */ V(0, 4, 1) -]; - -const hufftab11 = [ - /* 0000 */ PTR(16, 4), - /* 0001 */ PTR(32, 4), - /* 0010 */ PTR(48, 4), - /* 0011 */ PTR(64, 3), - /* 0100 */ V(1, 2, 4), - /* 0101 */ PTR(72, 1), - /* 0110 */ V(1, 1, 3), - /* 0111 */ V(1, 1, 3), - /* 1000 */ V(0, 1, 3), - /* 1001 */ V(0, 1, 3), - /* 1010 */ V(1, 0, 3), - /* 1011 */ V(1, 0, 3), - /* 1100 */ V(0, 0, 2), - /* 1101 */ V(0, 0, 2), - /* 1110 */ V(0, 0, 2), - /* 1111 */ V(0, 0, 2), - - /* 0000 ... */ - /* 0000 */ PTR(74, 2), /* 16 */ - /* 0001 */ PTR(78, 3), - /* 0010 */ PTR(86, 2), - /* 0011 */ PTR(90, 1), - /* 0100 */ PTR(92, 2), - /* 0101 */ V(2, 7, 4), - /* 0110 */ V(7, 2, 4), - /* 0111 */ PTR(96, 1), - /* 1000 */ V(7, 1, 3), - /* 1001 */ V(7, 1, 3), - /* 1010 */ V(1, 7, 4), - /* 1011 */ V(7, 0, 4), - /* 1100 */ V(3, 6, 4), - /* 1101 */ V(6, 3, 4), - /* 1110 */ V(6, 0, 4), - /* 1111 */ PTR(98, 1), - - /* 0001 ... */ - /* 0000 */ PTR(100, 1), /* 32 */ - /* 0001 */ V(1, 5, 4), - /* 0010 */ V(6, 2, 3), - /* 0011 */ V(6, 2, 3), - /* 0100 */ V(2, 6, 4), - /* 0101 */ V(0, 6, 4), - /* 0110 */ V(1, 6, 3), - /* 0111 */ V(1, 6, 3), - /* 1000 */ V(6, 1, 3), - /* 1001 */ V(6, 1, 3), - /* 1010 */ V(5, 1, 4), - /* 1011 */ V(3, 4, 4), - /* 1100 */ V(5, 0, 4), - /* 1101 */ PTR(102, 1), - /* 1110 */ V(2, 4, 4), - /* 1111 */ V(4, 2, 4), - - /* 0010 ... */ - /* 0000 */ V(1, 4, 4), /* 48 */ - /* 0001 */ V(4, 1, 4), - /* 0010 */ V(0, 4, 4), - /* 0011 */ V(4, 0, 4), - /* 0100 */ V(2, 3, 3), - /* 0101 */ V(2, 3, 3), - /* 0110 */ V(3, 2, 3), - /* 0111 */ V(3, 2, 3), - /* 1000 */ V(1, 3, 2), - /* 1001 */ V(1, 3, 2), - /* 1010 */ V(1, 3, 2), - /* 1011 */ V(1, 3, 2), - /* 1100 */ V(3, 1, 2), - /* 1101 */ V(3, 1, 2), - /* 1110 */ V(3, 1, 2), - /* 1111 */ V(3, 1, 2), - - /* 0011 ... */ - /* 000 */ V(0, 3, 3), /* 64 */ - /* 001 */ V(3, 0, 3), - /* 010 */ V(2, 2, 2), - /* 011 */ V(2, 2, 2), - /* 100 */ V(2, 1, 1), - /* 101 */ V(2, 1, 1), - /* 110 */ V(2, 1, 1), - /* 111 */ V(2, 1, 1), - - /* 0101 ... */ - /* 0 */ V(0, 2, 1), /* 72 */ - /* 1 */ V(2, 0, 1), - - /* 0000 0000 ... */ - /* 00 */ V(7, 7, 2), /* 74 */ - /* 01 */ V(6, 7, 2), - /* 10 */ V(7, 6, 2), - /* 11 */ V(7, 5, 2), - - /* 0000 0001 ... */ - /* 000 */ V(6, 6, 2), /* 78 */ - /* 001 */ V(6, 6, 2), - /* 010 */ V(4, 7, 2), - /* 011 */ V(4, 7, 2), - /* 100 */ V(7, 4, 2), - /* 101 */ V(7, 4, 2), - /* 110 */ V(5, 7, 3), - /* 111 */ V(5, 5, 3), - - /* 0000 0010 ... */ - /* 00 */ V(5, 6, 2), /* 86 */ - /* 01 */ V(6, 5, 2), - /* 10 */ V(3, 7, 1), - /* 11 */ V(3, 7, 1), - - /* 0000 0011 ... */ - /* 0 */ V(7, 3, 1), /* 90 */ - /* 1 */ V(4, 6, 1), - - /* 0000 0100 ... */ - /* 00 */ V(4, 5, 2), /* 92 */ - /* 01 */ V(5, 4, 2), - /* 10 */ V(3, 5, 2), - /* 11 */ V(5, 3, 2), - - /* 0000 0111 ... */ - /* 0 */ V(6, 4, 1), /* 96 */ - /* 1 */ V(0, 7, 1), - - /* 0000 1111 ... */ - /* 0 */ V(4, 4, 1), /* 98 */ - /* 1 */ V(2, 5, 1), - - /* 0001 0000 ... */ - /* 0 */ V(5, 2, 1), /* 100 */ - /* 1 */ V(0, 5, 1), - - /* 0001 1101 ... */ - /* 0 */ V(4, 3, 1), /* 102 */ - /* 1 */ V(3, 3, 1) -]; - -const hufftab12 = [ - /* 0000 */ PTR(16, 4), - /* 0001 */ PTR(32, 4), - /* 0010 */ PTR(48, 4), - /* 0011 */ PTR(64, 2), - /* 0100 */ PTR(68, 3), - /* 0101 */ PTR(76, 1), - /* 0110 */ V(1, 2, 4), - /* 0111 */ V(2, 1, 4), - /* 1000 */ PTR(78, 1), - /* 1001 */ V(0, 0, 4), - /* 1010 */ V(1, 1, 3), - /* 1011 */ V(1, 1, 3), - /* 1100 */ V(0, 1, 3), - /* 1101 */ V(0, 1, 3), - /* 1110 */ V(1, 0, 3), - /* 1111 */ V(1, 0, 3), - - /* 0000 ... */ - /* 0000 */ PTR(80, 2), /* 16 */ - /* 0001 */ PTR(84, 1), - /* 0010 */ PTR(86, 1), - /* 0011 */ PTR(88, 1), - /* 0100 */ V(5, 6, 4), - /* 0101 */ V(3, 7, 4), - /* 0110 */ PTR(90, 1), - /* 0111 */ V(2, 7, 4), - /* 1000 */ V(7, 2, 4), - /* 1001 */ V(4, 6, 4), - /* 1010 */ V(6, 4, 4), - /* 1011 */ V(1, 7, 4), - /* 1100 */ V(7, 1, 4), - /* 1101 */ PTR(92, 1), - /* 1110 */ V(3, 6, 4), - /* 1111 */ V(6, 3, 4), - - /* 0001 ... */ - /* 0000 */ V(4, 5, 4), /* 32 */ - /* 0001 */ V(5, 4, 4), - /* 0010 */ V(4, 4, 4), - /* 0011 */ PTR(94, 1), - /* 0100 */ V(2, 6, 3), - /* 0101 */ V(2, 6, 3), - /* 0110 */ V(6, 2, 3), - /* 0111 */ V(6, 2, 3), - /* 1000 */ V(6, 1, 3), - /* 1001 */ V(6, 1, 3), - /* 1010 */ V(1, 6, 4), - /* 1011 */ V(6, 0, 4), - /* 1100 */ V(3, 5, 4), - /* 1101 */ V(5, 3, 4), - /* 1110 */ V(2, 5, 4), - /* 1111 */ V(5, 2, 4), - - /* 0010 ... */ - /* 0000 */ V(1, 5, 3), /* 48 */ - /* 0001 */ V(1, 5, 3), - /* 0010 */ V(5, 1, 3), - /* 0011 */ V(5, 1, 3), - /* 0100 */ V(3, 4, 3), - /* 0101 */ V(3, 4, 3), - /* 0110 */ V(4, 3, 3), - /* 0111 */ V(4, 3, 3), - /* 1000 */ V(5, 0, 4), - /* 1001 */ V(0, 4, 4), - /* 1010 */ V(2, 4, 3), - /* 1011 */ V(2, 4, 3), - /* 1100 */ V(4, 2, 3), - /* 1101 */ V(4, 2, 3), - /* 1110 */ V(1, 4, 3), - /* 1111 */ V(1, 4, 3), - - /* 0011 ... */ - /* 00 */ V(3, 3, 2), /* 64 */ - /* 01 */ V(4, 1, 2), - /* 10 */ V(2, 3, 2), - /* 11 */ V(3, 2, 2), - - /* 0100 ... */ - /* 000 */ V(4, 0, 3), /* 68 */ - /* 001 */ V(0, 3, 3), - /* 010 */ V(3, 0, 2), - /* 011 */ V(3, 0, 2), - /* 100 */ V(1, 3, 1), - /* 101 */ V(1, 3, 1), - /* 110 */ V(1, 3, 1), - /* 111 */ V(1, 3, 1), - - /* 0101 ... */ - /* 0 */ V(3, 1, 1), /* 76 */ - /* 1 */ V(2, 2, 1), - - /* 1000 ... */ - /* 0 */ V(0, 2, 1), /* 78 */ - /* 1 */ V(2, 0, 1), - - /* 0000 0000 ... */ - /* 00 */ V(7, 7, 2), /* 80 */ - /* 01 */ V(6, 7, 2), - /* 10 */ V(7, 6, 1), - /* 11 */ V(7, 6, 1), - - /* 0000 0001 ... */ - /* 0 */ V(5, 7, 1), /* 84 */ - /* 1 */ V(7, 5, 1), - - /* 0000 0010 ... */ - /* 0 */ V(6, 6, 1), /* 86 */ - /* 1 */ V(4, 7, 1), - - /* 0000 0011 ... */ - /* 0 */ V(7, 4, 1), /* 88 */ - /* 1 */ V(6, 5, 1), - - /* 0000 0110 ... */ - /* 0 */ V(7, 3, 1), /* 90 */ - /* 1 */ V(5, 5, 1), - - /* 0000 1101 ... */ - /* 0 */ V(0, 7, 1), /* 92 */ - /* 1 */ V(7, 0, 1), - - /* 0001 0011 ... */ - /* 0 */ V(0, 6, 1), /* 94 */ - /* 1 */ V(0, 5, 1) -]; - -const hufftab13 = [ - /* 0000 */ PTR(16, 4), - /* 0001 */ PTR(32, 4), - /* 0010 */ PTR(48, 4), - /* 0011 */ PTR(64, 2), - /* 0100 */ V(1, 1, 4), - /* 0101 */ V(0, 1, 4), - /* 0110 */ V(1, 0, 3), - /* 0111 */ V(1, 0, 3), - /* 1000 */ V(0, 0, 1), - /* 1001 */ V(0, 0, 1), - /* 1010 */ V(0, 0, 1), - /* 1011 */ V(0, 0, 1), - /* 1100 */ V(0, 0, 1), - /* 1101 */ V(0, 0, 1), - /* 1110 */ V(0, 0, 1), - /* 1111 */ V(0, 0, 1), - - /* 0000 ... */ - /* 0000 */ PTR(68, 4), /* 16 */ - /* 0001 */ PTR(84, 4), - /* 0010 */ PTR(100, 4), - /* 0011 */ PTR(116, 4), - /* 0100 */ PTR(132, 4), - /* 0101 */ PTR(148, 4), - /* 0110 */ PTR(164, 3), - /* 0111 */ PTR(172, 3), - /* 1000 */ PTR(180, 3), - /* 1001 */ PTR(188, 3), - /* 1010 */ PTR(196, 3), - /* 1011 */ PTR(204, 3), - /* 1100 */ PTR(212, 1), - /* 1101 */ PTR(214, 2), - /* 1110 */ PTR(218, 3), - /* 1111 */ PTR(226, 1), - - /* 0001 ... */ - /* 0000 */ PTR(228, 2), /* 32 */ - /* 0001 */ PTR(232, 2), - /* 0010 */ PTR(236, 2), - /* 0011 */ PTR(240, 2), - /* 0100 */ V(8, 1, 4), - /* 0101 */ PTR(244, 1), - /* 0110 */ PTR(246, 1), - /* 0111 */ PTR(248, 1), - /* 1000 */ PTR(250, 2), - /* 1001 */ PTR(254, 1), - /* 1010 */ V(1, 5, 4), - /* 1011 */ V(5, 1, 4), - /* 1100 */ PTR(256, 1), - /* 1101 */ PTR(258, 1), - /* 1110 */ PTR(260, 1), - /* 1111 */ V(1, 4, 4), - - /* 0010 ... */ - /* 0000 */ V(4, 1, 3), /* 48 */ - /* 0001 */ V(4, 1, 3), - /* 0010 */ V(0, 4, 4), - /* 0011 */ V(4, 0, 4), - /* 0100 */ V(2, 3, 4), - /* 0101 */ V(3, 2, 4), - /* 0110 */ V(1, 3, 3), - /* 0111 */ V(1, 3, 3), - /* 1000 */ V(3, 1, 3), - /* 1001 */ V(3, 1, 3), - /* 1010 */ V(0, 3, 3), - /* 1011 */ V(0, 3, 3), - /* 1100 */ V(3, 0, 3), - /* 1101 */ V(3, 0, 3), - /* 1110 */ V(2, 2, 3), - /* 1111 */ V(2, 2, 3), - - /* 0011 ... */ - /* 00 */ V(1, 2, 2), /* 64 */ - /* 01 */ V(2, 1, 2), - /* 10 */ V(0, 2, 2), - /* 11 */ V(2, 0, 2), - - /* 0000 0000 ... */ - /* 0000 */ PTR(262, 4), /* 68 */ - /* 0001 */ PTR(278, 4), - /* 0010 */ PTR(294, 4), - /* 0011 */ PTR(310, 3), - /* 0100 */ PTR(318, 2), - /* 0101 */ PTR(322, 2), - /* 0110 */ PTR(326, 3), - /* 0111 */ PTR(334, 2), - /* 1000 */ PTR(338, 1), - /* 1001 */ PTR(340, 2), - /* 1010 */ PTR(344, 2), - /* 1011 */ PTR(348, 2), - /* 1100 */ PTR(352, 2), - /* 1101 */ PTR(356, 2), - /* 1110 */ V(1, 15, 4), - /* 1111 */ V(15, 1, 4), - - /* 0000 0001 ... */ - /* 0000 */ V(15, 0, 4), /* 84 */ - /* 0001 */ PTR(360, 1), - /* 0010 */ PTR(362, 1), - /* 0011 */ PTR(364, 1), - /* 0100 */ V(14, 2, 4), - /* 0101 */ PTR(366, 1), - /* 0110 */ V(1, 14, 4), - /* 0111 */ V(14, 1, 4), - /* 1000 */ PTR(368, 1), - /* 1001 */ PTR(370, 1), - /* 1010 */ PTR(372, 1), - /* 1011 */ PTR(374, 1), - /* 1100 */ PTR(376, 1), - /* 1101 */ PTR(378, 1), - /* 1110 */ V(12, 6, 4), - /* 1111 */ V(3, 13, 4), - - /* 0000 0010 ... */ - /* 0000 */ PTR(380, 1), /* 100 */ - /* 0001 */ V(2, 13, 4), - /* 0010 */ V(13, 2, 4), - /* 0011 */ V(1, 13, 4), - /* 0100 */ V(11, 7, 4), - /* 0101 */ PTR(382, 1), - /* 0110 */ PTR(384, 1), - /* 0111 */ V(12, 3, 4), - /* 1000 */ PTR(386, 1), - /* 1001 */ V(4, 11, 4), - /* 1010 */ V(13, 1, 3), - /* 1011 */ V(13, 1, 3), - /* 1100 */ V(0, 13, 4), - /* 1101 */ V(13, 0, 4), - /* 1110 */ V(8, 10, 4), - /* 1111 */ V(10, 8, 4), - - /* 0000 0011 ... */ - /* 0000 */ V(4, 12, 4), /* 116 */ - /* 0001 */ V(12, 4, 4), - /* 0010 */ V(6, 11, 4), - /* 0011 */ V(11, 6, 4), - /* 0100 */ V(3, 12, 3), - /* 0101 */ V(3, 12, 3), - /* 0110 */ V(2, 12, 3), - /* 0111 */ V(2, 12, 3), - /* 1000 */ V(12, 2, 3), - /* 1001 */ V(12, 2, 3), - /* 1010 */ V(5, 11, 3), - /* 1011 */ V(5, 11, 3), - /* 1100 */ V(11, 5, 4), - /* 1101 */ V(8, 9, 4), - /* 1110 */ V(1, 12, 3), - /* 1111 */ V(1, 12, 3), - - /* 0000 0100 ... */ - /* 0000 */ V(12, 1, 3), /* 132 */ - /* 0001 */ V(12, 1, 3), - /* 0010 */ V(9, 8, 4), - /* 0011 */ V(0, 12, 4), - /* 0100 */ V(12, 0, 3), - /* 0101 */ V(12, 0, 3), - /* 0110 */ V(11, 4, 4), - /* 0111 */ V(6, 10, 4), - /* 1000 */ V(10, 6, 4), - /* 1001 */ V(7, 9, 4), - /* 1010 */ V(3, 11, 3), - /* 1011 */ V(3, 11, 3), - /* 1100 */ V(11, 3, 3), - /* 1101 */ V(11, 3, 3), - /* 1110 */ V(8, 8, 4), - /* 1111 */ V(5, 10, 4), - - /* 0000 0101 ... */ - /* 0000 */ V(2, 11, 3), /* 148 */ - /* 0001 */ V(2, 11, 3), - /* 0010 */ V(10, 5, 4), - /* 0011 */ V(6, 9, 4), - /* 0100 */ V(10, 4, 3), - /* 0101 */ V(10, 4, 3), - /* 0110 */ V(7, 8, 4), - /* 0111 */ V(8, 7, 4), - /* 1000 */ V(9, 4, 3), - /* 1001 */ V(9, 4, 3), - /* 1010 */ V(7, 7, 4), - /* 1011 */ V(7, 6, 4), - /* 1100 */ V(11, 2, 2), - /* 1101 */ V(11, 2, 2), - /* 1110 */ V(11, 2, 2), - /* 1111 */ V(11, 2, 2), - - /* 0000 0110 ... */ - /* 000 */ V(1, 11, 2), /* 164 */ - /* 001 */ V(1, 11, 2), - /* 010 */ V(11, 1, 2), - /* 011 */ V(11, 1, 2), - /* 100 */ V(0, 11, 3), - /* 101 */ V(11, 0, 3), - /* 110 */ V(9, 6, 3), - /* 111 */ V(4, 10, 3), - - /* 0000 0111 ... */ - /* 000 */ V(3, 10, 3), /* 172 */ - /* 001 */ V(10, 3, 3), - /* 010 */ V(5, 9, 3), - /* 011 */ V(9, 5, 3), - /* 100 */ V(2, 10, 2), - /* 101 */ V(2, 10, 2), - /* 110 */ V(10, 2, 2), - /* 111 */ V(10, 2, 2), - - /* 0000 1000 ... */ - /* 000 */ V(1, 10, 2), /* 180 */ - /* 001 */ V(1, 10, 2), - /* 010 */ V(10, 1, 2), - /* 011 */ V(10, 1, 2), - /* 100 */ V(0, 10, 3), - /* 101 */ V(6, 8, 3), - /* 110 */ V(10, 0, 2), - /* 111 */ V(10, 0, 2), - - /* 0000 1001 ... */ - /* 000 */ V(8, 6, 3), /* 188 */ - /* 001 */ V(4, 9, 3), - /* 010 */ V(9, 3, 2), - /* 011 */ V(9, 3, 2), - /* 100 */ V(3, 9, 3), - /* 101 */ V(5, 8, 3), - /* 110 */ V(8, 5, 3), - /* 111 */ V(6, 7, 3), - - /* 0000 1010 ... */ - /* 000 */ V(2, 9, 2), /* 196 */ - /* 001 */ V(2, 9, 2), - /* 010 */ V(9, 2, 2), - /* 011 */ V(9, 2, 2), - /* 100 */ V(5, 7, 3), - /* 101 */ V(7, 5, 3), - /* 110 */ V(3, 8, 2), - /* 111 */ V(3, 8, 2), - - /* 0000 1011 ... */ - /* 000 */ V(8, 3, 2), /* 204 */ - /* 001 */ V(8, 3, 2), - /* 010 */ V(6, 6, 3), - /* 011 */ V(4, 7, 3), - /* 100 */ V(7, 4, 3), - /* 101 */ V(5, 6, 3), - /* 110 */ V(6, 5, 3), - /* 111 */ V(7, 3, 3), - - /* 0000 1100 ... */ - /* 0 */ V(1, 9, 1), /* 212 */ - /* 1 */ V(9, 1, 1), - - /* 0000 1101 ... */ - /* 00 */ V(0, 9, 2), /* 214 */ - /* 01 */ V(9, 0, 2), - /* 10 */ V(4, 8, 2), - /* 11 */ V(8, 4, 2), - - /* 0000 1110 ... */ - /* 000 */ V(7, 2, 2), /* 218 */ - /* 001 */ V(7, 2, 2), - /* 010 */ V(4, 6, 3), - /* 011 */ V(6, 4, 3), - /* 100 */ V(2, 8, 1), - /* 101 */ V(2, 8, 1), - /* 110 */ V(2, 8, 1), - /* 111 */ V(2, 8, 1), - - /* 0000 1111 ... */ - /* 0 */ V(8, 2, 1), /* 226 */ - /* 1 */ V(1, 8, 1), - - /* 0001 0000 ... */ - /* 00 */ V(3, 7, 2), /* 228 */ - /* 01 */ V(2, 7, 2), - /* 10 */ V(1, 7, 1), - /* 11 */ V(1, 7, 1), - - /* 0001 0001 ... */ - /* 00 */ V(7, 1, 1), /* 232 */ - /* 01 */ V(7, 1, 1), - /* 10 */ V(5, 5, 2), - /* 11 */ V(0, 7, 2), - - /* 0001 0010 ... */ - /* 00 */ V(7, 0, 2), /* 236 */ - /* 01 */ V(3, 6, 2), - /* 10 */ V(6, 3, 2), - /* 11 */ V(4, 5, 2), - - /* 0001 0011 ... */ - /* 00 */ V(5, 4, 2), /* 240 */ - /* 01 */ V(2, 6, 2), - /* 10 */ V(6, 2, 2), - /* 11 */ V(3, 5, 2), - - /* 0001 0101 ... */ - /* 0 */ V(0, 8, 1), /* 244 */ - /* 1 */ V(8, 0, 1), - - /* 0001 0110 ... */ - /* 0 */ V(1, 6, 1), /* 246 */ - /* 1 */ V(6, 1, 1), - - /* 0001 0111 ... */ - /* 0 */ V(0, 6, 1), /* 248 */ - /* 1 */ V(6, 0, 1), - - /* 0001 1000 ... */ - /* 00 */ V(5, 3, 2), /* 250 */ - /* 01 */ V(4, 4, 2), - /* 10 */ V(2, 5, 1), - /* 11 */ V(2, 5, 1), - - /* 0001 1001 ... */ - /* 0 */ V(5, 2, 1), /* 254 */ - /* 1 */ V(0, 5, 1), - - /* 0001 1100 ... */ - /* 0 */ V(3, 4, 1), /* 256 */ - /* 1 */ V(4, 3, 1), - - /* 0001 1101 ... */ - /* 0 */ V(5, 0, 1), /* 258 */ - /* 1 */ V(2, 4, 1), - - /* 0001 1110 ... */ - /* 0 */ V(4, 2, 1), /* 260 */ - /* 1 */ V(3, 3, 1), - - /* 0000 0000 0000 ... */ - /* 0000 */ PTR(388, 3), /* 262 */ - /* 0001 */ V(15, 15, 4), - /* 0010 */ V(14, 15, 4), - /* 0011 */ V(13, 15, 4), - /* 0100 */ V(14, 14, 4), - /* 0101 */ V(12, 15, 4), - /* 0110 */ V(13, 14, 4), - /* 0111 */ V(11, 15, 4), - /* 1000 */ V(15, 11, 4), - /* 1001 */ V(12, 14, 4), - /* 1010 */ V(13, 12, 4), - /* 1011 */ PTR(396, 1), - /* 1100 */ V(14, 12, 3), - /* 1101 */ V(14, 12, 3), - /* 1110 */ V(13, 13, 3), - /* 1111 */ V(13, 13, 3), - - /* 0000 0000 0001 ... */ - /* 0000 */ V(15, 10, 4), /* 278 */ - /* 0001 */ V(12, 13, 4), - /* 0010 */ V(11, 14, 3), - /* 0011 */ V(11, 14, 3), - /* 0100 */ V(14, 11, 3), - /* 0101 */ V(14, 11, 3), - /* 0110 */ V(9, 15, 3), - /* 0111 */ V(9, 15, 3), - /* 1000 */ V(15, 9, 3), - /* 1001 */ V(15, 9, 3), - /* 1010 */ V(14, 10, 3), - /* 1011 */ V(14, 10, 3), - /* 1100 */ V(11, 13, 3), - /* 1101 */ V(11, 13, 3), - /* 1110 */ V(13, 11, 3), - /* 1111 */ V(13, 11, 3), - - /* 0000 0000 0010 ... */ - /* 0000 */ V(8, 15, 3), /* 294 */ - /* 0001 */ V(8, 15, 3), - /* 0010 */ V(15, 8, 3), - /* 0011 */ V(15, 8, 3), - /* 0100 */ V(12, 12, 3), - /* 0101 */ V(12, 12, 3), - /* 0110 */ V(10, 14, 4), - /* 0111 */ V(9, 14, 4), - /* 1000 */ V(8, 14, 3), - /* 1001 */ V(8, 14, 3), - /* 1010 */ V(7, 15, 4), - /* 1011 */ V(7, 14, 4), - /* 1100 */ V(15, 7, 2), - /* 1101 */ V(15, 7, 2), - /* 1110 */ V(15, 7, 2), - /* 1111 */ V(15, 7, 2), - - /* 0000 0000 0011 ... */ - /* 000 */ V(13, 10, 2), /* 310 */ - /* 001 */ V(13, 10, 2), - /* 010 */ V(10, 13, 3), - /* 011 */ V(11, 12, 3), - /* 100 */ V(12, 11, 3), - /* 101 */ V(15, 6, 3), - /* 110 */ V(6, 15, 2), - /* 111 */ V(6, 15, 2), - - /* 0000 0000 0100 ... */ - /* 00 */ V(14, 8, 2), /* 318 */ - /* 01 */ V(5, 15, 2), - /* 10 */ V(9, 13, 2), - /* 11 */ V(13, 9, 2), - - /* 0000 0000 0101 ... */ - /* 00 */ V(15, 5, 2), /* 322 */ - /* 01 */ V(14, 7, 2), - /* 10 */ V(10, 12, 2), - /* 11 */ V(11, 11, 2), - - /* 0000 0000 0110 ... */ - /* 000 */ V(4, 15, 2), /* 326 */ - /* 001 */ V(4, 15, 2), - /* 010 */ V(15, 4, 2), - /* 011 */ V(15, 4, 2), - /* 100 */ V(12, 10, 3), - /* 101 */ V(14, 6, 3), - /* 110 */ V(15, 3, 2), - /* 111 */ V(15, 3, 2), - - /* 0000 0000 0111 ... */ - /* 00 */ V(3, 15, 1), /* 334 */ - /* 01 */ V(3, 15, 1), - /* 10 */ V(8, 13, 2), - /* 11 */ V(13, 8, 2), - - /* 0000 0000 1000 ... */ - /* 0 */ V(2, 15, 1), /* 338 */ - /* 1 */ V(15, 2, 1), - - /* 0000 0000 1001 ... */ - /* 00 */ V(6, 14, 2), /* 340 */ - /* 01 */ V(9, 12, 2), - /* 10 */ V(0, 15, 1), - /* 11 */ V(0, 15, 1), - - /* 0000 0000 1010 ... */ - /* 00 */ V(12, 9, 2), /* 344 */ - /* 01 */ V(5, 14, 2), - /* 10 */ V(10, 11, 1), - /* 11 */ V(10, 11, 1), - - /* 0000 0000 1011 ... */ - /* 00 */ V(7, 13, 2), /* 348 */ - /* 01 */ V(13, 7, 2), - /* 10 */ V(4, 14, 1), - /* 11 */ V(4, 14, 1), - - /* 0000 0000 1100 ... */ - /* 00 */ V(12, 8, 2), /* 352 */ - /* 01 */ V(13, 6, 2), - /* 10 */ V(3, 14, 1), - /* 11 */ V(3, 14, 1), - - /* 0000 0000 1101 ... */ - /* 00 */ V(11, 9, 1), /* 356 */ - /* 01 */ V(11, 9, 1), - /* 10 */ V(9, 11, 2), - /* 11 */ V(10, 10, 2), - - /* 0000 0001 0001 ... */ - /* 0 */ V(11, 10, 1), /* 360 */ - /* 1 */ V(14, 5, 1), - - /* 0000 0001 0010 ... */ - /* 0 */ V(14, 4, 1), /* 362 */ - /* 1 */ V(8, 12, 1), - - /* 0000 0001 0011 ... */ - /* 0 */ V(6, 13, 1), /* 364 */ - /* 1 */ V(14, 3, 1), - - /* 0000 0001 0101 ... */ - /* 0 */ V(2, 14, 1), /* 366 */ - /* 1 */ V(0, 14, 1), - - /* 0000 0001 1000 ... */ - /* 0 */ V(14, 0, 1), /* 368 */ - /* 1 */ V(5, 13, 1), - - /* 0000 0001 1001 ... */ - /* 0 */ V(13, 5, 1), /* 370 */ - /* 1 */ V(7, 12, 1), - - /* 0000 0001 1010 ... */ - /* 0 */ V(12, 7, 1), /* 372 */ - /* 1 */ V(4, 13, 1), - - /* 0000 0001 1011 ... */ - /* 0 */ V(8, 11, 1), /* 374 */ - /* 1 */ V(11, 8, 1), - - /* 0000 0001 1100 ... */ - /* 0 */ V(13, 4, 1), /* 376 */ - /* 1 */ V(9, 10, 1), - - /* 0000 0001 1101 ... */ - /* 0 */ V(10, 9, 1), /* 378 */ - /* 1 */ V(6, 12, 1), - - /* 0000 0010 0000 ... */ - /* 0 */ V(13, 3, 1), /* 380 */ - /* 1 */ V(7, 11, 1), - - /* 0000 0010 0101 ... */ - /* 0 */ V(5, 12, 1), /* 382 */ - /* 1 */ V(12, 5, 1), - - /* 0000 0010 0110 ... */ - /* 0 */ V(9, 9, 1), /* 384 */ - /* 1 */ V(7, 10, 1), - - /* 0000 0010 1000 ... */ - /* 0 */ V(10, 7, 1), /* 386 */ - /* 1 */ V(9, 7, 1), - - /* 0000 0000 0000 0000 ... */ - /* 000 */ V(15, 14, 3), /* 388 */ - /* 001 */ V(15, 12, 3), - /* 010 */ V(15, 13, 2), - /* 011 */ V(15, 13, 2), - /* 100 */ V(14, 13, 1), - /* 101 */ V(14, 13, 1), - /* 110 */ V(14, 13, 1), - /* 111 */ V(14, 13, 1), - - /* 0000 0000 0000 1011 ... */ - /* 0 */ V(10, 15, 1), /* 396 */ - /* 1 */ V(14, 9, 1) -]; - -const hufftab15 = [ - /* 0000 */ PTR(16, 4), - /* 0001 */ PTR(32, 4), - /* 0010 */ PTR(48, 4), - /* 0011 */ PTR(64, 4), - /* 0100 */ PTR(80, 4), - /* 0101 */ PTR(96, 3), - /* 0110 */ PTR(104, 3), - /* 0111 */ PTR(112, 2), - /* 1000 */ PTR(116, 1), - /* 1001 */ PTR(118, 1), - /* 1010 */ V(1, 1, 3), - /* 1011 */ V(1, 1, 3), - /* 1100 */ V(0, 1, 4), - /* 1101 */ V(1, 0, 4), - /* 1110 */ V(0, 0, 3), - /* 1111 */ V(0, 0, 3), - - /* 0000 ... */ - /* 0000 */ PTR(120, 4), /* 16 */ - /* 0001 */ PTR(136, 4), - /* 0010 */ PTR(152, 4), - /* 0011 */ PTR(168, 4), - /* 0100 */ PTR(184, 4), - /* 0101 */ PTR(200, 3), - /* 0110 */ PTR(208, 3), - /* 0111 */ PTR(216, 4), - /* 1000 */ PTR(232, 3), - /* 1001 */ PTR(240, 3), - /* 1010 */ PTR(248, 3), - /* 1011 */ PTR(256, 3), - /* 1100 */ PTR(264, 2), - /* 1101 */ PTR(268, 3), - /* 1110 */ PTR(276, 3), - /* 1111 */ PTR(284, 2), - - /* 0001 ... */ - /* 0000 */ PTR(288, 2), /* 32 */ - /* 0001 */ PTR(292, 2), - /* 0010 */ PTR(296, 2), - /* 0011 */ PTR(300, 2), - /* 0100 */ PTR(304, 2), - /* 0101 */ PTR(308, 2), - /* 0110 */ PTR(312, 2), - /* 0111 */ PTR(316, 2), - /* 1000 */ PTR(320, 1), - /* 1001 */ PTR(322, 1), - /* 1010 */ PTR(324, 1), - /* 1011 */ PTR(326, 2), - /* 1100 */ PTR(330, 1), - /* 1101 */ PTR(332, 1), - /* 1110 */ PTR(334, 2), - /* 1111 */ PTR(338, 1), - - /* 0010 ... */ - /* 0000 */ PTR(340, 1), /* 48 */ - /* 0001 */ PTR(342, 1), - /* 0010 */ V(9, 1, 4), - /* 0011 */ PTR(344, 1), - /* 0100 */ PTR(346, 1), - /* 0101 */ PTR(348, 1), - /* 0110 */ PTR(350, 1), - /* 0111 */ PTR(352, 1), - /* 1000 */ V(2, 8, 4), - /* 1001 */ V(8, 2, 4), - /* 1010 */ V(1, 8, 4), - /* 1011 */ V(8, 1, 4), - /* 1100 */ PTR(354, 1), - /* 1101 */ PTR(356, 1), - /* 1110 */ PTR(358, 1), - /* 1111 */ PTR(360, 1), - - /* 0011 ... */ - /* 0000 */ V(2, 7, 4), /* 64 */ - /* 0001 */ V(7, 2, 4), - /* 0010 */ V(6, 4, 4), - /* 0011 */ V(1, 7, 4), - /* 0100 */ V(5, 5, 4), - /* 0101 */ V(7, 1, 4), - /* 0110 */ PTR(362, 1), - /* 0111 */ V(3, 6, 4), - /* 1000 */ V(6, 3, 4), - /* 1001 */ V(4, 5, 4), - /* 1010 */ V(5, 4, 4), - /* 1011 */ V(2, 6, 4), - /* 1100 */ V(6, 2, 4), - /* 1101 */ V(1, 6, 4), - /* 1110 */ PTR(364, 1), - /* 1111 */ V(3, 5, 4), - - /* 0100 ... */ - /* 0000 */ V(6, 1, 3), /* 80 */ - /* 0001 */ V(6, 1, 3), - /* 0010 */ V(5, 3, 4), - /* 0011 */ V(4, 4, 4), - /* 0100 */ V(2, 5, 3), - /* 0101 */ V(2, 5, 3), - /* 0110 */ V(5, 2, 3), - /* 0111 */ V(5, 2, 3), - /* 1000 */ V(1, 5, 3), - /* 1001 */ V(1, 5, 3), - /* 1010 */ V(5, 1, 3), - /* 1011 */ V(5, 1, 3), - /* 1100 */ V(0, 5, 4), - /* 1101 */ V(5, 0, 4), - /* 1110 */ V(3, 4, 3), - /* 1111 */ V(3, 4, 3), - - /* 0101 ... */ - /* 000 */ V(4, 3, 3), /* 96 */ - /* 001 */ V(2, 4, 3), - /* 010 */ V(4, 2, 3), - /* 011 */ V(3, 3, 3), - /* 100 */ V(4, 1, 2), - /* 101 */ V(4, 1, 2), - /* 110 */ V(1, 4, 3), - /* 111 */ V(0, 4, 3), - - /* 0110 ... */ - /* 000 */ V(2, 3, 2), /* 104 */ - /* 001 */ V(2, 3, 2), - /* 010 */ V(3, 2, 2), - /* 011 */ V(3, 2, 2), - /* 100 */ V(4, 0, 3), - /* 101 */ V(0, 3, 3), - /* 110 */ V(1, 3, 2), - /* 111 */ V(1, 3, 2), - - /* 0111 ... */ - /* 00 */ V(3, 1, 2), /* 112 */ - /* 01 */ V(3, 0, 2), - /* 10 */ V(2, 2, 1), - /* 11 */ V(2, 2, 1), - - /* 1000 ... */ - /* 0 */ V(1, 2, 1), /* 116 */ - /* 1 */ V(2, 1, 1), - - /* 1001 ... */ - /* 0 */ V(0, 2, 1), /* 118 */ - /* 1 */ V(2, 0, 1), - - /* 0000 0000 ... */ - /* 0000 */ PTR(366, 1), /* 120 */ - /* 0001 */ PTR(368, 1), - /* 0010 */ V(14, 14, 4), - /* 0011 */ PTR(370, 1), - /* 0100 */ PTR(372, 1), - /* 0101 */ PTR(374, 1), - /* 0110 */ V(15, 11, 4), - /* 0111 */ PTR(376, 1), - /* 1000 */ V(13, 13, 4), - /* 1001 */ V(10, 15, 4), - /* 1010 */ V(15, 10, 4), - /* 1011 */ V(11, 14, 4), - /* 1100 */ V(14, 11, 4), - /* 1101 */ V(12, 13, 4), - /* 1110 */ V(13, 12, 4), - /* 1111 */ V(9, 15, 4), - - /* 0000 0001 ... */ - /* 0000 */ V(15, 9, 4), /* 136 */ - /* 0001 */ V(14, 10, 4), - /* 0010 */ V(11, 13, 4), - /* 0011 */ V(13, 11, 4), - /* 0100 */ V(8, 15, 4), - /* 0101 */ V(15, 8, 4), - /* 0110 */ V(12, 12, 4), - /* 0111 */ V(9, 14, 4), - /* 1000 */ V(14, 9, 4), - /* 1001 */ V(7, 15, 4), - /* 1010 */ V(15, 7, 4), - /* 1011 */ V(10, 13, 4), - /* 1100 */ V(13, 10, 4), - /* 1101 */ V(11, 12, 4), - /* 1110 */ V(6, 15, 4), - /* 1111 */ PTR(378, 1), - - /* 0000 0010 ... */ - /* 0000 */ V(12, 11, 3), /* 152 */ - /* 0001 */ V(12, 11, 3), - /* 0010 */ V(15, 6, 3), - /* 0011 */ V(15, 6, 3), - /* 0100 */ V(8, 14, 4), - /* 0101 */ V(14, 8, 4), - /* 0110 */ V(5, 15, 4), - /* 0111 */ V(9, 13, 4), - /* 1000 */ V(15, 5, 3), - /* 1001 */ V(15, 5, 3), - /* 1010 */ V(7, 14, 3), - /* 1011 */ V(7, 14, 3), - /* 1100 */ V(14, 7, 3), - /* 1101 */ V(14, 7, 3), - /* 1110 */ V(10, 12, 3), - /* 1111 */ V(10, 12, 3), - - /* 0000 0011 ... */ - /* 0000 */ V(12, 10, 3), /* 168 */ - /* 0001 */ V(12, 10, 3), - /* 0010 */ V(11, 11, 3), - /* 0011 */ V(11, 11, 3), - /* 0100 */ V(13, 9, 4), - /* 0101 */ V(8, 13, 4), - /* 0110 */ V(4, 15, 3), - /* 0111 */ V(4, 15, 3), - /* 1000 */ V(15, 4, 3), - /* 1001 */ V(15, 4, 3), - /* 1010 */ V(3, 15, 3), - /* 1011 */ V(3, 15, 3), - /* 1100 */ V(15, 3, 3), - /* 1101 */ V(15, 3, 3), - /* 1110 */ V(13, 8, 3), - /* 1111 */ V(13, 8, 3), - - /* 0000 0100 ... */ - /* 0000 */ V(14, 6, 3), /* 184 */ - /* 0001 */ V(14, 6, 3), - /* 0010 */ V(2, 15, 3), - /* 0011 */ V(2, 15, 3), - /* 0100 */ V(15, 2, 3), - /* 0101 */ V(15, 2, 3), - /* 0110 */ V(6, 14, 4), - /* 0111 */ V(15, 0, 4), - /* 1000 */ V(1, 15, 3), - /* 1001 */ V(1, 15, 3), - /* 1010 */ V(15, 1, 3), - /* 1011 */ V(15, 1, 3), - /* 1100 */ V(9, 12, 3), - /* 1101 */ V(9, 12, 3), - /* 1110 */ V(12, 9, 3), - /* 1111 */ V(12, 9, 3), - - /* 0000 0101 ... */ - /* 000 */ V(5, 14, 3), /* 200 */ - /* 001 */ V(10, 11, 3), - /* 010 */ V(11, 10, 3), - /* 011 */ V(14, 5, 3), - /* 100 */ V(7, 13, 3), - /* 101 */ V(13, 7, 3), - /* 110 */ V(4, 14, 3), - /* 111 */ V(14, 4, 3), - - /* 0000 0110 ... */ - /* 000 */ V(8, 12, 3), /* 208 */ - /* 001 */ V(12, 8, 3), - /* 010 */ V(3, 14, 3), - /* 011 */ V(6, 13, 3), - /* 100 */ V(13, 6, 3), - /* 101 */ V(14, 3, 3), - /* 110 */ V(9, 11, 3), - /* 111 */ V(11, 9, 3), - - /* 0000 0111 ... */ - /* 0000 */ V(2, 14, 3), /* 216 */ - /* 0001 */ V(2, 14, 3), - /* 0010 */ V(10, 10, 3), - /* 0011 */ V(10, 10, 3), - /* 0100 */ V(14, 2, 3), - /* 0101 */ V(14, 2, 3), - /* 0110 */ V(1, 14, 3), - /* 0111 */ V(1, 14, 3), - /* 1000 */ V(14, 1, 3), - /* 1001 */ V(14, 1, 3), - /* 1010 */ V(0, 14, 4), - /* 1011 */ V(14, 0, 4), - /* 1100 */ V(5, 13, 3), - /* 1101 */ V(5, 13, 3), - /* 1110 */ V(13, 5, 3), - /* 1111 */ V(13, 5, 3), - - /* 0000 1000 ... */ - /* 000 */ V(7, 12, 3), /* 232 */ - /* 001 */ V(12, 7, 3), - /* 010 */ V(4, 13, 3), - /* 011 */ V(8, 11, 3), - /* 100 */ V(13, 4, 2), - /* 101 */ V(13, 4, 2), - /* 110 */ V(11, 8, 3), - /* 111 */ V(9, 10, 3), - - /* 0000 1001 ... */ - /* 000 */ V(10, 9, 3), /* 240 */ - /* 001 */ V(6, 12, 3), - /* 010 */ V(12, 6, 3), - /* 011 */ V(3, 13, 3), - /* 100 */ V(13, 3, 2), - /* 101 */ V(13, 3, 2), - /* 110 */ V(13, 2, 2), - /* 111 */ V(13, 2, 2), - - /* 0000 1010 ... */ - /* 000 */ V(2, 13, 3), /* 248 */ - /* 001 */ V(0, 13, 3), - /* 010 */ V(1, 13, 2), - /* 011 */ V(1, 13, 2), - /* 100 */ V(7, 11, 2), - /* 101 */ V(7, 11, 2), - /* 110 */ V(11, 7, 2), - /* 111 */ V(11, 7, 2), - - /* 0000 1011 ... */ - /* 000 */ V(13, 1, 2), /* 256 */ - /* 001 */ V(13, 1, 2), - /* 010 */ V(5, 12, 3), - /* 011 */ V(13, 0, 3), - /* 100 */ V(12, 5, 2), - /* 101 */ V(12, 5, 2), - /* 110 */ V(8, 10, 2), - /* 111 */ V(8, 10, 2), - - /* 0000 1100 ... */ - /* 00 */ V(10, 8, 2), /* 264 */ - /* 01 */ V(4, 12, 2), - /* 10 */ V(12, 4, 2), - /* 11 */ V(6, 11, 2), - - /* 0000 1101 ... */ - /* 000 */ V(11, 6, 2), /* 268 */ - /* 001 */ V(11, 6, 2), - /* 010 */ V(9, 9, 3), - /* 011 */ V(0, 12, 3), - /* 100 */ V(3, 12, 2), - /* 101 */ V(3, 12, 2), - /* 110 */ V(12, 3, 2), - /* 111 */ V(12, 3, 2), - - /* 0000 1110 ... */ - /* 000 */ V(7, 10, 2), /* 276 */ - /* 001 */ V(7, 10, 2), - /* 010 */ V(10, 7, 2), - /* 011 */ V(10, 7, 2), - /* 100 */ V(10, 6, 2), - /* 101 */ V(10, 6, 2), - /* 110 */ V(12, 0, 3), - /* 111 */ V(0, 11, 3), - - /* 0000 1111 ... */ - /* 00 */ V(12, 2, 1), /* 284 */ - /* 01 */ V(12, 2, 1), - /* 10 */ V(2, 12, 2), - /* 11 */ V(5, 11, 2), - - /* 0001 0000 ... */ - /* 00 */ V(11, 5, 2), /* 288 */ - /* 01 */ V(1, 12, 2), - /* 10 */ V(8, 9, 2), - /* 11 */ V(9, 8, 2), - - /* 0001 0001 ... */ - /* 00 */ V(12, 1, 2), /* 292 */ - /* 01 */ V(4, 11, 2), - /* 10 */ V(11, 4, 2), - /* 11 */ V(6, 10, 2), - - /* 0001 0010 ... */ - /* 00 */ V(3, 11, 2), /* 296 */ - /* 01 */ V(7, 9, 2), - /* 10 */ V(11, 3, 1), - /* 11 */ V(11, 3, 1), - - /* 0001 0011 ... */ - /* 00 */ V(9, 7, 2), /* 300 */ - /* 01 */ V(8, 8, 2), - /* 10 */ V(2, 11, 2), - /* 11 */ V(5, 10, 2), - - /* 0001 0100 ... */ - /* 00 */ V(11, 2, 1), /* 304 */ - /* 01 */ V(11, 2, 1), - /* 10 */ V(10, 5, 2), - /* 11 */ V(1, 11, 2), - - /* 0001 0101 ... */ - /* 00 */ V(11, 1, 1), /* 308 */ - /* 01 */ V(11, 1, 1), - /* 10 */ V(11, 0, 2), - /* 11 */ V(6, 9, 2), - - /* 0001 0110 ... */ - /* 00 */ V(9, 6, 2), /* 312 */ - /* 01 */ V(4, 10, 2), - /* 10 */ V(10, 4, 2), - /* 11 */ V(7, 8, 2), - - /* 0001 0111 ... */ - /* 00 */ V(8, 7, 2), /* 316 */ - /* 01 */ V(3, 10, 2), - /* 10 */ V(10, 3, 1), - /* 11 */ V(10, 3, 1), - - /* 0001 1000 ... */ - /* 0 */ V(5, 9, 1), /* 320 */ - /* 1 */ V(9, 5, 1), - - /* 0001 1001 ... */ - /* 0 */ V(2, 10, 1), /* 322 */ - /* 1 */ V(10, 2, 1), - - /* 0001 1010 ... */ - /* 0 */ V(1, 10, 1), /* 324 */ - /* 1 */ V(10, 1, 1), - - /* 0001 1011 ... */ - /* 00 */ V(0, 10, 2), /* 326 */ - /* 01 */ V(10, 0, 2), - /* 10 */ V(6, 8, 1), - /* 11 */ V(6, 8, 1), - - /* 0001 1100 ... */ - /* 0 */ V(8, 6, 1), /* 330 */ - /* 1 */ V(4, 9, 1), - - /* 0001 1101 ... */ - /* 0 */ V(9, 4, 1), /* 332 */ - /* 1 */ V(3, 9, 1), - - /* 0001 1110 ... */ - /* 00 */ V(9, 3, 1), /* 334 */ - /* 01 */ V(9, 3, 1), - /* 10 */ V(7, 7, 2), - /* 11 */ V(0, 9, 2), - - /* 0001 1111 ... */ - /* 0 */ V(5, 8, 1), /* 338 */ - /* 1 */ V(8, 5, 1), - - /* 0010 0000 ... */ - /* 0 */ V(2, 9, 1), /* 340 */ - /* 1 */ V(6, 7, 1), - - /* 0010 0001 ... */ - /* 0 */ V(7, 6, 1), /* 342 */ - /* 1 */ V(9, 2, 1), - - /* 0010 0011 ... */ - /* 0 */ V(1, 9, 1), /* 344 */ - /* 1 */ V(9, 0, 1), - - /* 0010 0100 ... */ - /* 0 */ V(4, 8, 1), /* 346 */ - /* 1 */ V(8, 4, 1), - - /* 0010 0101 ... */ - /* 0 */ V(5, 7, 1), /* 348 */ - /* 1 */ V(7, 5, 1), - - /* 0010 0110 ... */ - /* 0 */ V(3, 8, 1), /* 350 */ - /* 1 */ V(8, 3, 1), - - /* 0010 0111 ... */ - /* 0 */ V(6, 6, 1), /* 352 */ - /* 1 */ V(4, 7, 1), - - /* 0010 1100 ... */ - /* 0 */ V(7, 4, 1), /* 354 */ - /* 1 */ V(0, 8, 1), - - /* 0010 1101 ... */ - /* 0 */ V(8, 0, 1), /* 356 */ - /* 1 */ V(5, 6, 1), - - /* 0010 1110 ... */ - /* 0 */ V(6, 5, 1), /* 358 */ - /* 1 */ V(3, 7, 1), - - /* 0010 1111 ... */ - /* 0 */ V(7, 3, 1), /* 360 */ - /* 1 */ V(4, 6, 1), - - /* 0011 0110 ... */ - /* 0 */ V(0, 7, 1), /* 362 */ - /* 1 */ V(7, 0, 1), - - /* 0011 1110 ... */ - /* 0 */ V(0, 6, 1), /* 364 */ - /* 1 */ V(6, 0, 1), - - /* 0000 0000 0000 ... */ - /* 0 */ V(15, 15, 1), /* 366 */ - /* 1 */ V(14, 15, 1), - - /* 0000 0000 0001 ... */ - /* 0 */ V(15, 14, 1), /* 368 */ - /* 1 */ V(13, 15, 1), - - /* 0000 0000 0011 ... */ - /* 0 */ V(15, 13, 1), /* 370 */ - /* 1 */ V(12, 15, 1), - - /* 0000 0000 0100 ... */ - /* 0 */ V(15, 12, 1), /* 372 */ - /* 1 */ V(13, 14, 1), - - /* 0000 0000 0101 ... */ - /* 0 */ V(14, 13, 1), /* 374 */ - /* 1 */ V(11, 15, 1), - - /* 0000 0000 0111 ... */ - /* 0 */ V(12, 14, 1), /* 376 */ - /* 1 */ V(14, 12, 1), - - /* 0000 0001 1111 ... */ - /* 0 */ V(10, 14, 1), /* 378 */ - /* 1 */ V(0, 15, 1) -]; - -const hufftab16 = [ - /* 0000 */ PTR(16, 4), - /* 0001 */ PTR(32, 4), - /* 0010 */ PTR(48, 4), - /* 0011 */ PTR(64, 2), - /* 0100 */ V(1, 1, 4), - /* 0101 */ V(0, 1, 4), - /* 0110 */ V(1, 0, 3), - /* 0111 */ V(1, 0, 3), - /* 1000 */ V(0, 0, 1), - /* 1001 */ V(0, 0, 1), - /* 1010 */ V(0, 0, 1), - /* 1011 */ V(0, 0, 1), - /* 1100 */ V(0, 0, 1), - /* 1101 */ V(0, 0, 1), - /* 1110 */ V(0, 0, 1), - /* 1111 */ V(0, 0, 1), - - /* 0000 ... */ - /* 0000 */ PTR(68, 3), /* 16 */ - /* 0001 */ PTR(76, 3), - /* 0010 */ PTR(84, 2), - /* 0011 */ V(15, 15, 4), - /* 0100 */ PTR(88, 2), - /* 0101 */ PTR(92, 1), - /* 0110 */ PTR(94, 4), - /* 0111 */ V(15, 2, 4), - /* 1000 */ PTR(110, 1), - /* 1001 */ V(1, 15, 4), - /* 1010 */ V(15, 1, 4), - /* 1011 */ PTR(112, 4), - /* 1100 */ PTR(128, 4), - /* 1101 */ PTR(144, 4), - /* 1110 */ PTR(160, 4), - /* 1111 */ PTR(176, 4), - - /* 0001 ... */ - /* 0000 */ PTR(192, 4), /* 32 */ - /* 0001 */ PTR(208, 3), - /* 0010 */ PTR(216, 3), - /* 0011 */ PTR(224, 3), - /* 0100 */ PTR(232, 3), - /* 0101 */ PTR(240, 3), - /* 0110 */ PTR(248, 3), - /* 0111 */ PTR(256, 3), - /* 1000 */ PTR(264, 2), - /* 1001 */ PTR(268, 2), - /* 1010 */ PTR(272, 1), - /* 1011 */ PTR(274, 2), - /* 1100 */ PTR(278, 2), - /* 1101 */ PTR(282, 1), - /* 1110 */ V(5, 1, 4), - /* 1111 */ PTR(284, 1), - - /* 0010 ... */ - /* 0000 */ PTR(286, 1), /* 48 */ - /* 0001 */ PTR(288, 1), - /* 0010 */ PTR(290, 1), - /* 0011 */ V(1, 4, 4), - /* 0100 */ V(4, 1, 4), - /* 0101 */ PTR(292, 1), - /* 0110 */ V(2, 3, 4), - /* 0111 */ V(3, 2, 4), - /* 1000 */ V(1, 3, 3), - /* 1001 */ V(1, 3, 3), - /* 1010 */ V(3, 1, 3), - /* 1011 */ V(3, 1, 3), - /* 1100 */ V(0, 3, 4), - /* 1101 */ V(3, 0, 4), - /* 1110 */ V(2, 2, 3), - /* 1111 */ V(2, 2, 3), - - /* 0011 ... */ - /* 00 */ V(1, 2, 2), /* 64 */ - /* 01 */ V(2, 1, 2), - /* 10 */ V(0, 2, 2), - /* 11 */ V(2, 0, 2), - - /* 0000 0000 ... */ - /* 000 */ V(14, 15, 3), /* 68 */ - /* 001 */ V(15, 14, 3), - /* 010 */ V(13, 15, 3), - /* 011 */ V(15, 13, 3), - /* 100 */ V(12, 15, 3), - /* 101 */ V(15, 12, 3), - /* 110 */ V(11, 15, 3), - /* 111 */ V(15, 11, 3), - - /* 0000 0001 ... */ - /* 000 */ V(10, 15, 2), /* 76 */ - /* 001 */ V(10, 15, 2), - /* 010 */ V(15, 10, 3), - /* 011 */ V(9, 15, 3), - /* 100 */ V(15, 9, 3), - /* 101 */ V(15, 8, 3), - /* 110 */ V(8, 15, 2), - /* 111 */ V(8, 15, 2), - - /* 0000 0010 ... */ - /* 00 */ V(7, 15, 2), /* 84 */ - /* 01 */ V(15, 7, 2), - /* 10 */ V(6, 15, 2), - /* 11 */ V(15, 6, 2), - - /* 0000 0100 ... */ - /* 00 */ V(5, 15, 2), /* 88 */ - /* 01 */ V(15, 5, 2), - /* 10 */ V(4, 15, 1), - /* 11 */ V(4, 15, 1), - - /* 0000 0101 ... */ - /* 0 */ V(15, 4, 1), /* 92 */ - /* 1 */ V(15, 3, 1), - - /* 0000 0110 ... */ - /* 0000 */ V(15, 0, 1), /* 94 */ - /* 0001 */ V(15, 0, 1), - /* 0010 */ V(15, 0, 1), - /* 0011 */ V(15, 0, 1), - /* 0100 */ V(15, 0, 1), - /* 0101 */ V(15, 0, 1), - /* 0110 */ V(15, 0, 1), - /* 0111 */ V(15, 0, 1), - /* 1000 */ V(3, 15, 2), - /* 1001 */ V(3, 15, 2), - /* 1010 */ V(3, 15, 2), - /* 1011 */ V(3, 15, 2), - /* 1100 */ PTR(294, 4), - /* 1101 */ PTR(310, 3), - /* 1110 */ PTR(318, 3), - /* 1111 */ PTR(326, 3), - - /* 0000 1000 ... */ - /* 0 */ V(2, 15, 1), /* 110 */ - /* 1 */ V(0, 15, 1), - - /* 0000 1011 ... */ - /* 0000 */ PTR(334, 2), /* 112 */ - /* 0001 */ PTR(338, 2), - /* 0010 */ PTR(342, 2), - /* 0011 */ PTR(346, 1), - /* 0100 */ PTR(348, 2), - /* 0101 */ PTR(352, 2), - /* 0110 */ PTR(356, 1), - /* 0111 */ PTR(358, 2), - /* 1000 */ PTR(362, 2), - /* 1001 */ PTR(366, 2), - /* 1010 */ PTR(370, 2), - /* 1011 */ V(14, 3, 4), - /* 1100 */ PTR(374, 1), - /* 1101 */ PTR(376, 1), - /* 1110 */ PTR(378, 1), - /* 1111 */ PTR(380, 1), - - /* 0000 1100 ... */ - /* 0000 */ PTR(382, 1), /* 128 */ - /* 0001 */ PTR(384, 1), - /* 0010 */ PTR(386, 1), - /* 0011 */ V(0, 13, 4), - /* 0100 */ PTR(388, 1), - /* 0101 */ PTR(390, 1), - /* 0110 */ PTR(392, 1), - /* 0111 */ V(3, 12, 4), - /* 1000 */ PTR(394, 1), - /* 1001 */ V(1, 12, 4), - /* 1010 */ V(12, 0, 4), - /* 1011 */ PTR(396, 1), - /* 1100 */ V(14, 2, 3), - /* 1101 */ V(14, 2, 3), - /* 1110 */ V(2, 14, 4), - /* 1111 */ V(1, 14, 4), - - /* 0000 1101 ... */ - /* 0000 */ V(13, 3, 4), /* 144 */ - /* 0001 */ V(2, 13, 4), - /* 0010 */ V(13, 2, 4), - /* 0011 */ V(13, 1, 4), - /* 0100 */ V(3, 11, 4), - /* 0101 */ PTR(398, 1), - /* 0110 */ V(1, 13, 3), - /* 0111 */ V(1, 13, 3), - /* 1000 */ V(12, 4, 4), - /* 1001 */ V(6, 11, 4), - /* 1010 */ V(12, 3, 4), - /* 1011 */ V(10, 7, 4), - /* 1100 */ V(2, 12, 3), - /* 1101 */ V(2, 12, 3), - /* 1110 */ V(12, 2, 4), - /* 1111 */ V(11, 5, 4), - - /* 0000 1110 ... */ - /* 0000 */ V(12, 1, 4), /* 160 */ - /* 0001 */ V(0, 12, 4), - /* 0010 */ V(4, 11, 4), - /* 0011 */ V(11, 4, 4), - /* 0100 */ V(6, 10, 4), - /* 0101 */ V(10, 6, 4), - /* 0110 */ V(11, 3, 3), - /* 0111 */ V(11, 3, 3), - /* 1000 */ V(5, 10, 4), - /* 1001 */ V(10, 5, 4), - /* 1010 */ V(2, 11, 3), - /* 1011 */ V(2, 11, 3), - /* 1100 */ V(11, 2, 3), - /* 1101 */ V(11, 2, 3), - /* 1110 */ V(1, 11, 3), - /* 1111 */ V(1, 11, 3), - - /* 0000 1111 ... */ - /* 0000 */ V(11, 1, 3), /* 176 */ - /* 0001 */ V(11, 1, 3), - /* 0010 */ V(0, 11, 4), - /* 0011 */ V(11, 0, 4), - /* 0100 */ V(6, 9, 4), - /* 0101 */ V(9, 6, 4), - /* 0110 */ V(4, 10, 4), - /* 0111 */ V(10, 4, 4), - /* 1000 */ V(7, 8, 4), - /* 1001 */ V(8, 7, 4), - /* 1010 */ V(10, 3, 3), - /* 1011 */ V(10, 3, 3), - /* 1100 */ V(3, 10, 4), - /* 1101 */ V(5, 9, 4), - /* 1110 */ V(2, 10, 3), - /* 1111 */ V(2, 10, 3), - - /* 0001 0000 ... */ - /* 0000 */ V(9, 5, 4), /* 192 */ - /* 0001 */ V(6, 8, 4), - /* 0010 */ V(10, 1, 3), - /* 0011 */ V(10, 1, 3), - /* 0100 */ V(8, 6, 4), - /* 0101 */ V(7, 7, 4), - /* 0110 */ V(9, 4, 3), - /* 0111 */ V(9, 4, 3), - /* 1000 */ V(4, 9, 4), - /* 1001 */ V(5, 7, 4), - /* 1010 */ V(6, 7, 3), - /* 1011 */ V(6, 7, 3), - /* 1100 */ V(10, 2, 2), - /* 1101 */ V(10, 2, 2), - /* 1110 */ V(10, 2, 2), - /* 1111 */ V(10, 2, 2), - - /* 0001 0001 ... */ - /* 000 */ V(1, 10, 2), /* 208 */ - /* 001 */ V(1, 10, 2), - /* 010 */ V(0, 10, 3), - /* 011 */ V(10, 0, 3), - /* 100 */ V(3, 9, 3), - /* 101 */ V(9, 3, 3), - /* 110 */ V(5, 8, 3), - /* 111 */ V(8, 5, 3), - - /* 0001 0010 ... */ - /* 000 */ V(2, 9, 2), /* 216 */ - /* 001 */ V(2, 9, 2), - /* 010 */ V(9, 2, 2), - /* 011 */ V(9, 2, 2), - /* 100 */ V(7, 6, 3), - /* 101 */ V(0, 9, 3), - /* 110 */ V(1, 9, 2), - /* 111 */ V(1, 9, 2), - - /* 0001 0011 ... */ - /* 000 */ V(9, 1, 2), /* 224 */ - /* 001 */ V(9, 1, 2), - /* 010 */ V(9, 0, 3), - /* 011 */ V(4, 8, 3), - /* 100 */ V(8, 4, 3), - /* 101 */ V(7, 5, 3), - /* 110 */ V(3, 8, 3), - /* 111 */ V(8, 3, 3), - - /* 0001 0100 ... */ - /* 000 */ V(6, 6, 3), /* 232 */ - /* 001 */ V(2, 8, 3), - /* 010 */ V(8, 2, 2), - /* 011 */ V(8, 2, 2), - /* 100 */ V(4, 7, 3), - /* 101 */ V(7, 4, 3), - /* 110 */ V(1, 8, 2), - /* 111 */ V(1, 8, 2), - - /* 0001 0101 ... */ - /* 000 */ V(8, 1, 2), /* 240 */ - /* 001 */ V(8, 1, 2), - /* 010 */ V(8, 0, 2), - /* 011 */ V(8, 0, 2), - /* 100 */ V(0, 8, 3), - /* 101 */ V(5, 6, 3), - /* 110 */ V(3, 7, 2), - /* 111 */ V(3, 7, 2), - - /* 0001 0110 ... */ - /* 000 */ V(7, 3, 2), /* 248 */ - /* 001 */ V(7, 3, 2), - /* 010 */ V(6, 5, 3), - /* 011 */ V(4, 6, 3), - /* 100 */ V(2, 7, 2), - /* 101 */ V(2, 7, 2), - /* 110 */ V(7, 2, 2), - /* 111 */ V(7, 2, 2), - - /* 0001 0111 ... */ - /* 000 */ V(6, 4, 3), /* 256 */ - /* 001 */ V(5, 5, 3), - /* 010 */ V(0, 7, 2), - /* 011 */ V(0, 7, 2), - /* 100 */ V(1, 7, 1), - /* 101 */ V(1, 7, 1), - /* 110 */ V(1, 7, 1), - /* 111 */ V(1, 7, 1), - - /* 0001 1000 ... */ - /* 00 */ V(7, 1, 1), /* 264 */ - /* 01 */ V(7, 1, 1), - /* 10 */ V(7, 0, 2), - /* 11 */ V(3, 6, 2), - - /* 0001 1001 ... */ - /* 00 */ V(6, 3, 2), /* 268 */ - /* 01 */ V(4, 5, 2), - /* 10 */ V(5, 4, 2), - /* 11 */ V(2, 6, 2), - - /* 0001 1010 ... */ - /* 0 */ V(6, 2, 1), /* 272 */ - /* 1 */ V(1, 6, 1), - - /* 0001 1011 ... */ - /* 00 */ V(6, 1, 1), /* 274 */ - /* 01 */ V(6, 1, 1), - /* 10 */ V(0, 6, 2), - /* 11 */ V(6, 0, 2), - - /* 0001 1100 ... */ - /* 00 */ V(5, 3, 1), /* 278 */ - /* 01 */ V(5, 3, 1), - /* 10 */ V(3, 5, 2), - /* 11 */ V(4, 4, 2), - - /* 0001 1101 ... */ - /* 0 */ V(2, 5, 1), /* 282 */ - /* 1 */ V(5, 2, 1), - - /* 0001 1111 ... */ - /* 0 */ V(1, 5, 1), /* 284 */ - /* 1 */ V(0, 5, 1), - - /* 0010 0000 ... */ - /* 0 */ V(3, 4, 1), /* 286 */ - /* 1 */ V(4, 3, 1), - - /* 0010 0001 ... */ - /* 0 */ V(5, 0, 1), /* 288 */ - /* 1 */ V(2, 4, 1), - - /* 0010 0010 ... */ - /* 0 */ V(4, 2, 1), /* 290 */ - /* 1 */ V(3, 3, 1), - - /* 0010 0101 ... */ - /* 0 */ V(0, 4, 1), /* 292 */ - /* 1 */ V(4, 0, 1), - - /* 0000 0110 1100 ... */ - /* 0000 */ V(12, 14, 4), /* 294 */ - /* 0001 */ PTR(400, 1), - /* 0010 */ V(13, 14, 3), - /* 0011 */ V(13, 14, 3), - /* 0100 */ V(14, 9, 3), - /* 0101 */ V(14, 9, 3), - /* 0110 */ V(14, 10, 4), - /* 0111 */ V(13, 9, 4), - /* 1000 */ V(14, 14, 2), - /* 1001 */ V(14, 14, 2), - /* 1010 */ V(14, 14, 2), - /* 1011 */ V(14, 14, 2), - /* 1100 */ V(14, 13, 3), - /* 1101 */ V(14, 13, 3), - /* 1110 */ V(14, 11, 3), - /* 1111 */ V(14, 11, 3), - - /* 0000 0110 1101 ... */ - /* 000 */ V(11, 14, 2), /* 310 */ - /* 001 */ V(11, 14, 2), - /* 010 */ V(12, 13, 2), - /* 011 */ V(12, 13, 2), - /* 100 */ V(13, 12, 3), - /* 101 */ V(13, 11, 3), - /* 110 */ V(10, 14, 2), - /* 111 */ V(10, 14, 2), - - /* 0000 0110 1110 ... */ - /* 000 */ V(12, 12, 2), /* 318 */ - /* 001 */ V(12, 12, 2), - /* 010 */ V(10, 13, 3), - /* 011 */ V(13, 10, 3), - /* 100 */ V(7, 14, 3), - /* 101 */ V(10, 12, 3), - /* 110 */ V(12, 10, 2), - /* 111 */ V(12, 10, 2), - - /* 0000 0110 1111 ... */ - /* 000 */ V(12, 9, 3), /* 326 */ - /* 001 */ V(7, 13, 3), - /* 010 */ V(5, 14, 2), - /* 011 */ V(5, 14, 2), - /* 100 */ V(11, 13, 1), - /* 101 */ V(11, 13, 1), - /* 110 */ V(11, 13, 1), - /* 111 */ V(11, 13, 1), - - /* 0000 1011 0000 ... */ - /* 00 */ V(9, 14, 1), /* 334 */ - /* 01 */ V(9, 14, 1), - /* 10 */ V(11, 12, 2), - /* 11 */ V(12, 11, 2), - - /* 0000 1011 0001 ... */ - /* 00 */ V(8, 14, 2), /* 338 */ - /* 01 */ V(14, 8, 2), - /* 10 */ V(9, 13, 2), - /* 11 */ V(14, 7, 2), - - /* 0000 1011 0010 ... */ - /* 00 */ V(11, 11, 2), /* 342 */ - /* 01 */ V(8, 13, 2), - /* 10 */ V(13, 8, 2), - /* 11 */ V(6, 14, 2), - - /* 0000 1011 0011 ... */ - /* 0 */ V(14, 6, 1), /* 346 */ - /* 1 */ V(9, 12, 1), - - /* 0000 1011 0100 ... */ - /* 00 */ V(10, 11, 2), /* 348 */ - /* 01 */ V(11, 10, 2), - /* 10 */ V(14, 5, 2), - /* 11 */ V(13, 7, 2), - - /* 0000 1011 0101 ... */ - /* 00 */ V(4, 14, 1), /* 352 */ - /* 01 */ V(4, 14, 1), - /* 10 */ V(14, 4, 2), - /* 11 */ V(8, 12, 2), - - /* 0000 1011 0110 ... */ - /* 0 */ V(12, 8, 1), /* 356 */ - /* 1 */ V(3, 14, 1), - - /* 0000 1011 0111 ... */ - /* 00 */ V(6, 13, 1), /* 358 */ - /* 01 */ V(6, 13, 1), - /* 10 */ V(13, 6, 2), - /* 11 */ V(9, 11, 2), - - /* 0000 1011 1000 ... */ - /* 00 */ V(11, 9, 2), /* 362 */ - /* 01 */ V(10, 10, 2), - /* 10 */ V(14, 1, 1), - /* 11 */ V(14, 1, 1), - - /* 0000 1011 1001 ... */ - /* 00 */ V(13, 4, 1), /* 366 */ - /* 01 */ V(13, 4, 1), - /* 10 */ V(11, 8, 2), - /* 11 */ V(10, 9, 2), - - /* 0000 1011 1010 ... */ - /* 00 */ V(7, 11, 1), /* 370 */ - /* 01 */ V(7, 11, 1), - /* 10 */ V(11, 7, 2), - /* 11 */ V(13, 0, 2), - - /* 0000 1011 1100 ... */ - /* 0 */ V(0, 14, 1), /* 374 */ - /* 1 */ V(14, 0, 1), - - /* 0000 1011 1101 ... */ - /* 0 */ V(5, 13, 1), /* 376 */ - /* 1 */ V(13, 5, 1), - - /* 0000 1011 1110 ... */ - /* 0 */ V(7, 12, 1), /* 378 */ - /* 1 */ V(12, 7, 1), - - /* 0000 1011 1111 ... */ - /* 0 */ V(4, 13, 1), /* 380 */ - /* 1 */ V(8, 11, 1), - - /* 0000 1100 0000 ... */ - /* 0 */ V(9, 10, 1), /* 382 */ - /* 1 */ V(6, 12, 1), - - /* 0000 1100 0001 ... */ - /* 0 */ V(12, 6, 1), /* 384 */ - /* 1 */ V(3, 13, 1), - - /* 0000 1100 0010 ... */ - /* 0 */ V(5, 12, 1), /* 386 */ - /* 1 */ V(12, 5, 1), - - /* 0000 1100 0100 ... */ - /* 0 */ V(8, 10, 1), /* 388 */ - /* 1 */ V(10, 8, 1), - - /* 0000 1100 0101 ... */ - /* 0 */ V(9, 9, 1), /* 390 */ - /* 1 */ V(4, 12, 1), - - /* 0000 1100 0110 ... */ - /* 0 */ V(11, 6, 1), /* 392 */ - /* 1 */ V(7, 10, 1), - - /* 0000 1100 1000 ... */ - /* 0 */ V(5, 11, 1), /* 394 */ - /* 1 */ V(8, 9, 1), - - /* 0000 1100 1011 ... */ - /* 0 */ V(9, 8, 1), /* 396 */ - /* 1 */ V(7, 9, 1), - - /* 0000 1101 0101 ... */ - /* 0 */ V(9, 7, 1), /* 398 */ - /* 1 */ V(8, 8, 1), - - /* 0000 0110 1100 0001 ... */ - /* 0 */ V(14, 12, 1), /* 400 */ - /* 1 */ V(13, 13, 1) -]; - -const hufftab24 = [ - /* 0000 */ PTR(16, 4), - /* 0001 */ PTR(32, 4), - /* 0010 */ PTR(48, 4), - /* 0011 */ V(15, 15, 4), - /* 0100 */ PTR(64, 4), - /* 0101 */ PTR(80, 4), - /* 0110 */ PTR(96, 4), - /* 0111 */ PTR(112, 4), - /* 1000 */ PTR(128, 4), - /* 1001 */ PTR(144, 4), - /* 1010 */ PTR(160, 3), - /* 1011 */ PTR(168, 2), - /* 1100 */ V(1, 1, 4), - /* 1101 */ V(0, 1, 4), - /* 1110 */ V(1, 0, 4), - /* 1111 */ V(0, 0, 4), - - /* 0000 ... */ - /* 0000 */ V(14, 15, 4), /* 16 */ - /* 0001 */ V(15, 14, 4), - /* 0010 */ V(13, 15, 4), - /* 0011 */ V(15, 13, 4), - /* 0100 */ V(12, 15, 4), - /* 0101 */ V(15, 12, 4), - /* 0110 */ V(11, 15, 4), - /* 0111 */ V(15, 11, 4), - /* 1000 */ V(15, 10, 3), - /* 1001 */ V(15, 10, 3), - /* 1010 */ V(10, 15, 4), - /* 1011 */ V(9, 15, 4), - /* 1100 */ V(15, 9, 3), - /* 1101 */ V(15, 9, 3), - /* 1110 */ V(15, 8, 3), - /* 1111 */ V(15, 8, 3), - - /* 0001 ... */ - /* 0000 */ V(8, 15, 4), /* 32 */ - /* 0001 */ V(7, 15, 4), - /* 0010 */ V(15, 7, 3), - /* 0011 */ V(15, 7, 3), - /* 0100 */ V(6, 15, 3), - /* 0101 */ V(6, 15, 3), - /* 0110 */ V(15, 6, 3), - /* 0111 */ V(15, 6, 3), - /* 1000 */ V(5, 15, 3), - /* 1001 */ V(5, 15, 3), - /* 1010 */ V(15, 5, 3), - /* 1011 */ V(15, 5, 3), - /* 1100 */ V(4, 15, 3), - /* 1101 */ V(4, 15, 3), - /* 1110 */ V(15, 4, 3), - /* 1111 */ V(15, 4, 3), - - /* 0010 ... */ - /* 0000 */ V(3, 15, 3), /* 48 */ - /* 0001 */ V(3, 15, 3), - /* 0010 */ V(15, 3, 3), - /* 0011 */ V(15, 3, 3), - /* 0100 */ V(2, 15, 3), - /* 0101 */ V(2, 15, 3), - /* 0110 */ V(15, 2, 3), - /* 0111 */ V(15, 2, 3), - /* 1000 */ V(15, 1, 3), - /* 1001 */ V(15, 1, 3), - /* 1010 */ V(1, 15, 4), - /* 1011 */ V(15, 0, 4), - /* 1100 */ PTR(172, 3), - /* 1101 */ PTR(180, 3), - /* 1110 */ PTR(188, 3), - /* 1111 */ PTR(196, 3), - - /* 0100 ... */ - /* 0000 */ PTR(204, 4), /* 64 */ - /* 0001 */ PTR(220, 3), - /* 0010 */ PTR(228, 3), - /* 0011 */ PTR(236, 3), - /* 0100 */ PTR(244, 2), - /* 0101 */ PTR(248, 2), - /* 0110 */ PTR(252, 2), - /* 0111 */ PTR(256, 2), - /* 1000 */ PTR(260, 2), - /* 1001 */ PTR(264, 2), - /* 1010 */ PTR(268, 2), - /* 1011 */ PTR(272, 2), - /* 1100 */ PTR(276, 2), - /* 1101 */ PTR(280, 3), - /* 1110 */ PTR(288, 2), - /* 1111 */ PTR(292, 2), - - /* 0101 ... */ - /* 0000 */ PTR(296, 2), /* 80 */ - /* 0001 */ PTR(300, 3), - /* 0010 */ PTR(308, 2), - /* 0011 */ PTR(312, 3), - /* 0100 */ PTR(320, 1), - /* 0101 */ PTR(322, 2), - /* 0110 */ PTR(326, 2), - /* 0111 */ PTR(330, 1), - /* 1000 */ PTR(332, 2), - /* 1001 */ PTR(336, 1), - /* 1010 */ PTR(338, 1), - /* 1011 */ PTR(340, 1), - /* 1100 */ PTR(342, 1), - /* 1101 */ PTR(344, 1), - /* 1110 */ PTR(346, 1), - /* 1111 */ PTR(348, 1), - - /* 0110 ... */ - /* 0000 */ PTR(350, 1), /* 96 */ - /* 0001 */ PTR(352, 1), - /* 0010 */ PTR(354, 1), - /* 0011 */ PTR(356, 1), - /* 0100 */ PTR(358, 1), - /* 0101 */ PTR(360, 1), - /* 0110 */ PTR(362, 1), - /* 0111 */ PTR(364, 1), - /* 1000 */ PTR(366, 1), - /* 1001 */ PTR(368, 1), - /* 1010 */ PTR(370, 2), - /* 1011 */ PTR(374, 1), - /* 1100 */ PTR(376, 2), - /* 1101 */ V(7, 3, 4), - /* 1110 */ PTR(380, 1), - /* 1111 */ V(7, 2, 4), - - /* 0111 ... */ - /* 0000 */ V(4, 6, 4), /* 112 */ - /* 0001 */ V(6, 4, 4), - /* 0010 */ V(5, 5, 4), - /* 0011 */ V(7, 1, 4), - /* 0100 */ V(3, 6, 4), - /* 0101 */ V(6, 3, 4), - /* 0110 */ V(4, 5, 4), - /* 0111 */ V(5, 4, 4), - /* 1000 */ V(2, 6, 4), - /* 1001 */ V(6, 2, 4), - /* 1010 */ V(1, 6, 4), - /* 1011 */ V(6, 1, 4), - /* 1100 */ PTR(382, 1), - /* 1101 */ V(3, 5, 4), - /* 1110 */ V(5, 3, 4), - /* 1111 */ V(4, 4, 4), - - /* 1000 ... */ - /* 0000 */ V(2, 5, 4), /* 128 */ - /* 0001 */ V(5, 2, 4), - /* 0010 */ V(1, 5, 4), - /* 0011 */ PTR(384, 1), - /* 0100 */ V(5, 1, 3), - /* 0101 */ V(5, 1, 3), - /* 0110 */ V(3, 4, 4), - /* 0111 */ V(4, 3, 4), - /* 1000 */ V(2, 4, 3), - /* 1001 */ V(2, 4, 3), - /* 1010 */ V(4, 2, 3), - /* 1011 */ V(4, 2, 3), - /* 1100 */ V(3, 3, 3), - /* 1101 */ V(3, 3, 3), - /* 1110 */ V(1, 4, 3), - /* 1111 */ V(1, 4, 3), - - /* 1001 ... */ - /* 0000 */ V(4, 1, 3), /* 144 */ - /* 0001 */ V(4, 1, 3), - /* 0010 */ V(0, 4, 4), - /* 0011 */ V(4, 0, 4), - /* 0100 */ V(2, 3, 3), - /* 0101 */ V(2, 3, 3), - /* 0110 */ V(3, 2, 3), - /* 0111 */ V(3, 2, 3), - /* 1000 */ V(1, 3, 2), - /* 1001 */ V(1, 3, 2), - /* 1010 */ V(1, 3, 2), - /* 1011 */ V(1, 3, 2), - /* 1100 */ V(3, 1, 2), - /* 1101 */ V(3, 1, 2), - /* 1110 */ V(3, 1, 2), - /* 1111 */ V(3, 1, 2), - - /* 1010 ... */ - /* 000 */ V(0, 3, 3), /* 160 */ - /* 001 */ V(3, 0, 3), - /* 010 */ V(2, 2, 2), - /* 011 */ V(2, 2, 2), - /* 100 */ V(1, 2, 1), - /* 101 */ V(1, 2, 1), - /* 110 */ V(1, 2, 1), - /* 111 */ V(1, 2, 1), - - /* 1011 ... */ - /* 00 */ V(2, 1, 1), /* 168 */ - /* 01 */ V(2, 1, 1), - /* 10 */ V(0, 2, 2), - /* 11 */ V(2, 0, 2), - - /* 0010 1100 ... */ - /* 000 */ V(0, 15, 1), /* 172 */ - /* 001 */ V(0, 15, 1), - /* 010 */ V(0, 15, 1), - /* 011 */ V(0, 15, 1), - /* 100 */ V(14, 14, 3), - /* 101 */ V(13, 14, 3), - /* 110 */ V(14, 13, 3), - /* 111 */ V(12, 14, 3), - - /* 0010 1101 ... */ - /* 000 */ V(14, 12, 3), /* 180 */ - /* 001 */ V(13, 13, 3), - /* 010 */ V(11, 14, 3), - /* 011 */ V(14, 11, 3), - /* 100 */ V(12, 13, 3), - /* 101 */ V(13, 12, 3), - /* 110 */ V(10, 14, 3), - /* 111 */ V(14, 10, 3), - - /* 0010 1110 ... */ - /* 000 */ V(11, 13, 3), /* 188 */ - /* 001 */ V(13, 11, 3), - /* 010 */ V(12, 12, 3), - /* 011 */ V(9, 14, 3), - /* 100 */ V(14, 9, 3), - /* 101 */ V(10, 13, 3), - /* 110 */ V(13, 10, 3), - /* 111 */ V(11, 12, 3), - - /* 0010 1111 ... */ - /* 000 */ V(12, 11, 3), /* 196 */ - /* 001 */ V(8, 14, 3), - /* 010 */ V(14, 8, 3), - /* 011 */ V(9, 13, 3), - /* 100 */ V(13, 9, 3), - /* 101 */ V(7, 14, 3), - /* 110 */ V(14, 7, 3), - /* 111 */ V(10, 12, 3), - - /* 0100 0000 ... */ - /* 0000 */ V(12, 10, 3), /* 204 */ - /* 0001 */ V(12, 10, 3), - /* 0010 */ V(11, 11, 3), - /* 0011 */ V(11, 11, 3), - /* 0100 */ V(8, 13, 3), - /* 0101 */ V(8, 13, 3), - /* 0110 */ V(13, 8, 3), - /* 0111 */ V(13, 8, 3), - /* 1000 */ V(0, 14, 4), - /* 1001 */ V(14, 0, 4), - /* 1010 */ V(0, 13, 3), - /* 1011 */ V(0, 13, 3), - /* 1100 */ V(14, 6, 2), - /* 1101 */ V(14, 6, 2), - /* 1110 */ V(14, 6, 2), - /* 1111 */ V(14, 6, 2), - - /* 0100 0001 ... */ - /* 000 */ V(6, 14, 3), /* 220 */ - /* 001 */ V(9, 12, 3), - /* 010 */ V(12, 9, 2), - /* 011 */ V(12, 9, 2), - /* 100 */ V(5, 14, 2), - /* 101 */ V(5, 14, 2), - /* 110 */ V(11, 10, 2), - /* 111 */ V(11, 10, 2), - - /* 0100 0010 ... */ - /* 000 */ V(14, 5, 2), /* 228 */ - /* 001 */ V(14, 5, 2), - /* 010 */ V(10, 11, 3), - /* 011 */ V(7, 13, 3), - /* 100 */ V(13, 7, 2), - /* 101 */ V(13, 7, 2), - /* 110 */ V(14, 4, 2), - /* 111 */ V(14, 4, 2), - - /* 0100 0011 ... */ - /* 000 */ V(8, 12, 2), /* 236 */ - /* 001 */ V(8, 12, 2), - /* 010 */ V(12, 8, 2), - /* 011 */ V(12, 8, 2), - /* 100 */ V(4, 14, 3), - /* 101 */ V(2, 14, 3), - /* 110 */ V(3, 14, 2), - /* 111 */ V(3, 14, 2), - - /* 0100 0100 ... */ - /* 00 */ V(6, 13, 2), /* 244 */ - /* 01 */ V(13, 6, 2), - /* 10 */ V(14, 3, 2), - /* 11 */ V(9, 11, 2), - - /* 0100 0101 ... */ - /* 00 */ V(11, 9, 2), /* 248 */ - /* 01 */ V(10, 10, 2), - /* 10 */ V(14, 2, 2), - /* 11 */ V(1, 14, 2), - - /* 0100 0110 ... */ - /* 00 */ V(14, 1, 2), /* 252 */ - /* 01 */ V(5, 13, 2), - /* 10 */ V(13, 5, 2), - /* 11 */ V(7, 12, 2), - - /* 0100 0111 ... */ - /* 00 */ V(12, 7, 2), /* 256 */ - /* 01 */ V(4, 13, 2), - /* 10 */ V(8, 11, 2), - /* 11 */ V(11, 8, 2), - - /* 0100 1000 ... */ - /* 00 */ V(13, 4, 2), /* 260 */ - /* 01 */ V(9, 10, 2), - /* 10 */ V(10, 9, 2), - /* 11 */ V(6, 12, 2), - - /* 0100 1001 ... */ - /* 00 */ V(12, 6, 2), /* 264 */ - /* 01 */ V(3, 13, 2), - /* 10 */ V(13, 3, 2), - /* 11 */ V(2, 13, 2), - - /* 0100 1010 ... */ - /* 00 */ V(13, 2, 2), /* 268 */ - /* 01 */ V(1, 13, 2), - /* 10 */ V(7, 11, 2), - /* 11 */ V(11, 7, 2), - - /* 0100 1011 ... */ - /* 00 */ V(13, 1, 2), /* 272 */ - /* 01 */ V(5, 12, 2), - /* 10 */ V(12, 5, 2), - /* 11 */ V(8, 10, 2), - - /* 0100 1100 ... */ - /* 00 */ V(10, 8, 2), /* 276 */ - /* 01 */ V(9, 9, 2), - /* 10 */ V(4, 12, 2), - /* 11 */ V(12, 4, 2), - - /* 0100 1101 ... */ - /* 000 */ V(6, 11, 2), /* 280 */ - /* 001 */ V(6, 11, 2), - /* 010 */ V(11, 6, 2), - /* 011 */ V(11, 6, 2), - /* 100 */ V(13, 0, 3), - /* 101 */ V(0, 12, 3), - /* 110 */ V(3, 12, 2), - /* 111 */ V(3, 12, 2), - - /* 0100 1110 ... */ - /* 00 */ V(12, 3, 2), /* 288 */ - /* 01 */ V(7, 10, 2), - /* 10 */ V(10, 7, 2), - /* 11 */ V(2, 12, 2), - - /* 0100 1111 ... */ - /* 00 */ V(12, 2, 2), /* 292 */ - /* 01 */ V(5, 11, 2), - /* 10 */ V(11, 5, 2), - /* 11 */ V(1, 12, 2), - - /* 0101 0000 ... */ - /* 00 */ V(8, 9, 2), /* 296 */ - /* 01 */ V(9, 8, 2), - /* 10 */ V(12, 1, 2), - /* 11 */ V(4, 11, 2), - - /* 0101 0001 ... */ - /* 000 */ V(12, 0, 3), /* 300 */ - /* 001 */ V(0, 11, 3), - /* 010 */ V(3, 11, 2), - /* 011 */ V(3, 11, 2), - /* 100 */ V(11, 0, 3), - /* 101 */ V(0, 10, 3), - /* 110 */ V(1, 10, 2), - /* 111 */ V(1, 10, 2), - - /* 0101 0010 ... */ - /* 00 */ V(11, 4, 1), /* 308 */ - /* 01 */ V(11, 4, 1), - /* 10 */ V(6, 10, 2), - /* 11 */ V(10, 6, 2), - - /* 0101 0011 ... */ - /* 000 */ V(7, 9, 2), /* 312 */ - /* 001 */ V(7, 9, 2), - /* 010 */ V(9, 7, 2), - /* 011 */ V(9, 7, 2), - /* 100 */ V(10, 0, 3), - /* 101 */ V(0, 9, 3), - /* 110 */ V(9, 0, 2), - /* 111 */ V(9, 0, 2), - - /* 0101 0100 ... */ - /* 0 */ V(11, 3, 1), /* 320 */ - /* 1 */ V(8, 8, 1), - - /* 0101 0101 ... */ - /* 00 */ V(2, 11, 2), /* 322 */ - /* 01 */ V(5, 10, 2), - /* 10 */ V(11, 2, 1), - /* 11 */ V(11, 2, 1), - - /* 0101 0110 ... */ - /* 00 */ V(10, 5, 2), /* 326 */ - /* 01 */ V(1, 11, 2), - /* 10 */ V(11, 1, 2), - /* 11 */ V(6, 9, 2), - - /* 0101 0111 ... */ - /* 0 */ V(9, 6, 1), /* 330 */ - /* 1 */ V(10, 4, 1), - - /* 0101 1000 ... */ - /* 00 */ V(4, 10, 2), /* 332 */ - /* 01 */ V(7, 8, 2), - /* 10 */ V(8, 7, 1), - /* 11 */ V(8, 7, 1), - - /* 0101 1001 ... */ - /* 0 */ V(3, 10, 1), /* 336 */ - /* 1 */ V(10, 3, 1), - - /* 0101 1010 ... */ - /* 0 */ V(5, 9, 1), /* 338 */ - /* 1 */ V(9, 5, 1), - - /* 0101 1011 ... */ - /* 0 */ V(2, 10, 1), /* 340 */ - /* 1 */ V(10, 2, 1), - - /* 0101 1100 ... */ - /* 0 */ V(10, 1, 1), /* 342 */ - /* 1 */ V(6, 8, 1), - - /* 0101 1101 ... */ - /* 0 */ V(8, 6, 1), /* 344 */ - /* 1 */ V(7, 7, 1), - - /* 0101 1110 ... */ - /* 0 */ V(4, 9, 1), /* 346 */ - /* 1 */ V(9, 4, 1), - - /* 0101 1111 ... */ - /* 0 */ V(3, 9, 1), /* 348 */ - /* 1 */ V(9, 3, 1), - - /* 0110 0000 ... */ - /* 0 */ V(5, 8, 1), /* 350 */ - /* 1 */ V(8, 5, 1), - - /* 0110 0001 ... */ - /* 0 */ V(2, 9, 1), /* 352 */ - /* 1 */ V(6, 7, 1), - - /* 0110 0010 ... */ - /* 0 */ V(7, 6, 1), /* 354 */ - /* 1 */ V(9, 2, 1), - - /* 0110 0011 ... */ - /* 0 */ V(1, 9, 1), /* 356 */ - /* 1 */ V(9, 1, 1), - - /* 0110 0100 ... */ - /* 0 */ V(4, 8, 1), /* 358 */ - /* 1 */ V(8, 4, 1), - - /* 0110 0101 ... */ - /* 0 */ V(5, 7, 1), /* 360 */ - /* 1 */ V(7, 5, 1), - - /* 0110 0110 ... */ - /* 0 */ V(3, 8, 1), /* 362 */ - /* 1 */ V(8, 3, 1), - - /* 0110 0111 ... */ - /* 0 */ V(6, 6, 1), /* 364 */ - /* 1 */ V(2, 8, 1), - - /* 0110 1000 ... */ - /* 0 */ V(8, 2, 1), /* 366 */ - /* 1 */ V(1, 8, 1), - - /* 0110 1001 ... */ - /* 0 */ V(4, 7, 1), /* 368 */ - /* 1 */ V(7, 4, 1), - - /* 0110 1010 ... */ - /* 00 */ V(8, 1, 1), /* 370 */ - /* 01 */ V(8, 1, 1), - /* 10 */ V(0, 8, 2), - /* 11 */ V(8, 0, 2), - - /* 0110 1011 ... */ - /* 0 */ V(5, 6, 1), /* 374 */ - /* 1 */ V(6, 5, 1), - - /* 0110 1100 ... */ - /* 00 */ V(1, 7, 1), /* 376 */ - /* 01 */ V(1, 7, 1), - /* 10 */ V(0, 7, 2), - /* 11 */ V(7, 0, 2), - - /* 0110 1110 ... */ - /* 0 */ V(3, 7, 1), /* 380 */ - /* 1 */ V(2, 7, 1), - - /* 0111 1100 ... */ - /* 0 */ V(0, 6, 1), /* 382 */ - /* 1 */ V(6, 0, 1), - - /* 1000 0011 ... */ - /* 0 */ V(0, 5, 1), /* 384 */ - /* 1 */ V(5, 0, 1) -]; - -/* hufftable constructor */ -function MP3Hufftable(table, linbits, startbits) { - this.table = table; - this.linbits = linbits; - this.startbits = startbits; -}; - -/* external tables */ -exports.huff_quad_table = [ hufftabA, hufftabB ]; -exports.huff_pair_table = [ - /* 0 */ new MP3Hufftable(hufftab0, 0, 0), - /* 1 */ new MP3Hufftable(hufftab1, 0, 3), - /* 2 */ new MP3Hufftable(hufftab2, 0, 3), - /* 3 */ new MP3Hufftable(hufftab3, 0, 3), - /* 4 */ null, //new MP3Hufftable(0 /* not used */), - /* 5 */ new MP3Hufftable(hufftab5, 0, 3), - /* 6 */ new MP3Hufftable(hufftab6, 0, 4), - /* 7 */ new MP3Hufftable(hufftab7, 0, 4), - /* 8 */ new MP3Hufftable(hufftab8, 0, 4), - /* 9 */ new MP3Hufftable(hufftab9, 0, 4), - /* 10 */ new MP3Hufftable(hufftab10, 0, 4), - /* 11 */ new MP3Hufftable(hufftab11, 0, 4), - /* 12 */ new MP3Hufftable(hufftab12, 0, 4), - /* 13 */ new MP3Hufftable(hufftab13, 0, 4), - /* 14 */ null, //new MP3Hufftable(0 /* not used */), - /* 15 */ new MP3Hufftable(hufftab15, 0, 4), - /* 16 */ new MP3Hufftable(hufftab16, 1, 4), - /* 17 */ new MP3Hufftable(hufftab16, 2, 4), - /* 18 */ new MP3Hufftable(hufftab16, 3, 4), - /* 19 */ new MP3Hufftable(hufftab16, 4, 4), - /* 20 */ new MP3Hufftable(hufftab16, 6, 4), - /* 21 */ new MP3Hufftable(hufftab16, 8, 4), - /* 22 */ new MP3Hufftable(hufftab16, 10, 4), - /* 23 */ new MP3Hufftable(hufftab16, 13, 4), - /* 24 */ new MP3Hufftable(hufftab24, 4, 4), - /* 25 */ new MP3Hufftable(hufftab24, 5, 4), - /* 26 */ new MP3Hufftable(hufftab24, 6, 4), - /* 27 */ new MP3Hufftable(hufftab24, 7, 4), - /* 28 */ new MP3Hufftable(hufftab24, 8, 4), - /* 29 */ new MP3Hufftable(hufftab24, 9, 4), - /* 30 */ new MP3Hufftable(hufftab24, 11, 4), - /* 31 */ new MP3Hufftable(hufftab24, 13, 4) -]; - -},{}],7:[function(require,module,exports){ -var AV = (window.AV); - -const ENCODINGS = ['latin1', 'utf16-bom', 'utf16-be', 'utf8']; - -var ID3Stream = AV.Base.extend({ - constructor: function(header, stream) { - this.header = header; - this.stream = stream; - this.offset = 0; - }, - - read: function() { - if (!this.data) { - this.data = {}; - - // read all frames - var frame; - while (frame = this.readFrame()) { - // if we already have an instance of this key, add it to an array - if (frame.key in this.data) { - if (!Array.isArray(this.data[frame.key])) - this.data[frame.key] = [this.data[frame.key]]; - - this.data[frame.key].push(frame.value); - } else { - this.data[frame.key] = frame.value; - } - } - } - - return this.data; - }, - - readFrame: function() { - if (this.offset >= this.header.length) - return null; - - // get the header - var header = this.readHeader(); - var decoder = header.identifier; - - if (header.identifier.charCodeAt(0) === 0) { - this.offset += this.header.length + 1; - return null; - } - - // map common frame names to a single type - if (!this.frameTypes[decoder]) { - for (var key in this.map) { - if (this.map[key].indexOf(decoder) !== -1) { - decoder = key; - break; - } - } - } - - if (this.frameTypes[decoder]) { - // decode the frame - var frame = this.decodeFrame(header, this.frameTypes[decoder]), - keys = Object.keys(frame); - - // if it only returned one key, use that as the value - if (keys.length === 1) - frame = frame[keys[0]]; - - var result = { - value: frame - }; - - } else { - // No frame type found, treat it as binary - var result = { - value: this.stream.readBuffer(Math.min(header.length, this.header.length - this.offset)) - }; - } - - result.key = this.names[header.identifier] ? this.names[header.identifier] : header.identifier; - - // special sauce for cover art, which should just be a buffer - if (result.key === 'coverArt') - result.value = result.value.data; - - this.offset += 10 + header.length; - return result; - }, - - decodeFrame: function(header, fields) { - var stream = this.stream, - start = stream.offset; - - var encoding = 0, ret = {}; - var len = Object.keys(fields).length, i = 0; - - for (var key in fields) { - var type = fields[key]; - var rest = header.length - (stream.offset - start); - i++; - - // check for special field names - switch (key) { - case 'encoding': - encoding = stream.readUInt8(); - continue; - - case 'language': - ret.language = stream.readString(3); - continue; - } - - // check types - switch (type) { - case 'latin1': - ret[key] = stream.readString(i === len ? rest : null, 'latin1'); - break; - - case 'string': - ret[key] = stream.readString(i === len ? rest : null, ENCODINGS[encoding]); - break; - - case 'binary': - ret[key] = stream.readBuffer(rest) - break; - - case 'int16': - ret[key] = stream.readInt16(); - break; - - case 'int8': - ret[key] = stream.readInt8(); - break; - - case 'int24': - ret[key] = stream.readInt24(); - break; - - case 'int32': - ret[key] = stream.readInt32(); - break; - - case 'int32+': - ret[key] = stream.readInt32(); - if (rest > 4) - throw new Error('Seriously dude? Stop playing this song and get a life!'); - - break; - - case 'date': - var val = stream.readString(8); - ret[key] = new Date(val.slice(0, 4), val.slice(4, 6) - 1, val.slice(6, 8)); - break; - - case 'frame_id': - ret[key] = stream.readString(4); - break; - - default: - throw new Error('Unknown key type ' + type); - } - } - - // Just in case something went wrong... - var rest = header.length - (stream.offset - start); - if (rest > 0) - stream.advance(rest); - - return ret; - } -}); - -// ID3 v2.3 and v2.4 support -exports.ID3v23Stream = ID3Stream.extend({ - readHeader: function() { - var identifier = this.stream.readString(4); - var length = 0; - - if (this.header.major === 4) { - for (var i = 0; i < 4; i++) - length = (length << 7) + (this.stream.readUInt8() & 0x7f); - } else { - length = this.stream.readUInt32(); - } - - return { - identifier: identifier, - length: length, - flags: this.stream.readUInt16() - }; - }, - - map: { - text: [ - // Identification Frames - 'TIT1', 'TIT2', 'TIT3', 'TALB', 'TOAL', 'TRCK', 'TPOS', 'TSST', 'TSRC', - - // Involved Persons Frames - 'TPE1', 'TPE2', 'TPE3', 'TPE4', 'TOPE', 'TEXT', 'TOLY', 'TCOM', 'TMCL', 'TIPL', 'TENC', - - // Derived and Subjective Properties Frames - 'TBPM', 'TLEN', 'TKEY', 'TLAN', 'TCON', 'TFLT', 'TMED', 'TMOO', - - // Rights and Licence Frames - 'TCOP', 'TPRO', 'TPUB', 'TOWN', 'TRSN', 'TRSO', - - // Other Text Frames - 'TOFN', 'TDLY', 'TDEN', 'TDOR', 'TDRC', 'TDRL', 'TDTG', 'TSSE', 'TSOA', 'TSOP', 'TSOT', - - // Deprecated Text Frames - 'TDAT', 'TIME', 'TORY', 'TRDA', 'TSIZ', 'TYER', - - // Non-standard iTunes Frames - 'TCMP', 'TSO2', 'TSOC' - ], - - url: [ - 'WCOM', 'WCOP', 'WOAF', 'WOAR', 'WOAS', 'WORS', 'WPAY', 'WPUB' - ] - }, - - frameTypes: { - text: { - encoding: 1, - value: 'string' - }, - - url: { - value: 'latin1' - }, - - TXXX: { - encoding: 1, - description: 'string', - value: 'string' - }, - - WXXX: { - encoding: 1, - description: 'string', - value: 'latin1', - }, - - USLT: { - encoding: 1, - language: 1, - description: 'string', - value: 'string' - }, - - COMM: { - encoding: 1, - language: 1, - description: 'string', - value: 'string' - }, - - APIC: { - encoding: 1, - mime: 'latin1', - type: 'int8', - description: 'string', - data: 'binary' - }, - - UFID: { - owner: 'latin1', - identifier: 'binary' - }, - - MCDI: { - value: 'binary' - }, - - PRIV: { - owner: 'latin1', - value: 'binary' - }, - - GEOB: { - encoding: 1, - mime: 'latin1', - filename: 'string', - description: 'string', - data: 'binary' - }, - - PCNT: { - value: 'int32+' - }, - - POPM: { - email: 'latin1', - rating: 'int8', - counter: 'int32+' - }, - - AENC: { - owner: 'latin1', - previewStart: 'int16', - previewLength: 'int16', - encryptionInfo: 'binary' - }, - - ETCO: { - format: 'int8', - data: 'binary' // TODO - }, - - MLLT: { - framesBetweenReference: 'int16', - bytesBetweenReference: 'int24', - millisecondsBetweenReference: 'int24', - bitsForBytesDeviation: 'int8', - bitsForMillisecondsDev: 'int8', - data: 'binary' // TODO - }, - - SYTC: { - format: 'int8', - tempoData: 'binary' // TODO - }, - - SYLT: { - encoding: 1, - language: 1, - format: 'int8', - contentType: 'int8', - description: 'string', - data: 'binary' // TODO - }, - - RVA2: { - identification: 'latin1', - data: 'binary' // TODO - }, - - EQU2: { - interpolationMethod: 'int8', - identification: 'latin1', - data: 'binary' // TODO - }, - - RVRB: { - left: 'int16', - right: 'int16', - bouncesLeft: 'int8', - bouncesRight: 'int8', - feedbackLL: 'int8', - feedbackLR: 'int8', - feedbackRR: 'int8', - feedbackRL: 'int8', - premixLR: 'int8', - premixRL: 'int8' - }, - - RBUF: { - size: 'int24', - flag: 'int8', - offset: 'int32' - }, - - LINK: { - identifier: 'frame_id', - url: 'latin1', - data: 'binary' // TODO stringlist? - }, - - POSS: { - format: 'int8', - position: 'binary' // TODO - }, - - USER: { - encoding: 1, - language: 1, - value: 'string' - }, - - OWNE: { - encoding: 1, - price: 'latin1', - purchaseDate: 'date', - seller: 'string' - }, - - COMR: { - encoding: 1, - price: 'latin1', - validUntil: 'date', - contactURL: 'latin1', - receivedAs: 'int8', - seller: 'string', - description: 'string', - logoMime: 'latin1', - logo: 'binary' - }, - - ENCR: { - owner: 'latin1', - methodSymbol: 'int8', - data: 'binary' - }, - - GRID: { - owner: 'latin1', - groupSymbol: 'int8', - data: 'binary' - }, - - SIGN: { - groupSymbol: 'int8', - signature: 'binary' - }, - - SEEK: { - value: 'int32' - }, - - ASPI: { - dataStart: 'int32', - dataLength: 'int32', - numPoints: 'int16', - bitsPerPoint: 'int8', - data: 'binary' // TODO - }, - - // Deprecated ID3 v2.3 frames - IPLS: { - encoding: 1, - value: 'string' // list? - }, - - RVAD: { - adjustment: 'int8', - bits: 'int8', - data: 'binary' // TODO - }, - - EQUA: { - adjustmentBits: 'int8', - data: 'binary' // TODO - } - }, - - names: { - // Identification Frames - 'TIT1': 'grouping', - 'TIT2': 'title', - 'TIT3': 'subtitle', - 'TALB': 'album', - 'TOAL': 'originalAlbumTitle', - 'TRCK': 'trackNumber', - 'TPOS': 'diskNumber', - 'TSST': 'setSubtitle', - 'TSRC': 'ISRC', - - // Involved Persons Frames - 'TPE1': 'artist', - 'TPE2': 'albumArtist', - 'TPE3': 'conductor', - 'TPE4': 'modifiedBy', - 'TOPE': 'originalArtist', - 'TEXT': 'lyricist', - 'TOLY': 'originalLyricist', - 'TCOM': 'composer', - 'TMCL': 'musicianCreditsList', - 'TIPL': 'involvedPeopleList', - 'TENC': 'encodedBy', - - // Derived and Subjective Properties Frames - 'TBPM': 'tempo', - 'TLEN': 'length', - 'TKEY': 'initialKey', - 'TLAN': 'language', - 'TCON': 'genre', - 'TFLT': 'fileType', - 'TMED': 'mediaType', - 'TMOO': 'mood', - - // Rights and Licence Frames - 'TCOP': 'copyright', - 'TPRO': 'producedNotice', - 'TPUB': 'publisher', - 'TOWN': 'fileOwner', - 'TRSN': 'internetRadioStationName', - 'TRSO': 'internetRadioStationOwner', - - // Other Text Frames - 'TOFN': 'originalFilename', - 'TDLY': 'playlistDelay', - 'TDEN': 'encodingTime', - 'TDOR': 'originalReleaseTime', - 'TDRC': 'recordingTime', - 'TDRL': 'releaseTime', - 'TDTG': 'taggingTime', - 'TSSE': 'encodedWith', - 'TSOA': 'albumSortOrder', - 'TSOP': 'performerSortOrder', - 'TSOT': 'titleSortOrder', - - // User defined text information - 'TXXX': 'userText', - - // Unsynchronised lyrics/text transcription - 'USLT': 'lyrics', - - // Attached Picture Frame - 'APIC': 'coverArt', - - // Unique Identifier Frame - 'UFID': 'uniqueIdentifier', - - // Music CD Identifier Frame - 'MCDI': 'CDIdentifier', - - // Comment Frame - 'COMM': 'comments', - - // URL link frames - 'WCOM': 'commercialInformation', - 'WCOP': 'copyrightInformation', - 'WOAF': 'officialAudioFileWebpage', - 'WOAR': 'officialArtistWebpage', - 'WOAS': 'officialAudioSourceWebpage', - 'WORS': 'officialInternetRadioStationHomepage', - 'WPAY': 'payment', - 'WPUB': 'officialPublisherWebpage', - - // User Defined URL Link Frame - 'WXXX': 'url', - - 'PRIV': 'private', - 'GEOB': 'generalEncapsulatedObject', - 'PCNT': 'playCount', - 'POPM': 'rating', - 'AENC': 'audioEncryption', - 'ETCO': 'eventTimingCodes', - 'MLLT': 'MPEGLocationLookupTable', - 'SYTC': 'synchronisedTempoCodes', - 'SYLT': 'synchronisedLyrics', - 'RVA2': 'volumeAdjustment', - 'EQU2': 'equalization', - 'RVRB': 'reverb', - 'RBUF': 'recommendedBufferSize', - 'LINK': 'link', - 'POSS': 'positionSynchronisation', - 'USER': 'termsOfUse', - 'OWNE': 'ownership', - 'COMR': 'commercial', - 'ENCR': 'encryption', - 'GRID': 'groupIdentifier', - 'SIGN': 'signature', - 'SEEK': 'seek', - 'ASPI': 'audioSeekPointIndex', - - // Deprecated ID3 v2.3 frames - 'TDAT': 'date', - 'TIME': 'time', - 'TORY': 'originalReleaseYear', - 'TRDA': 'recordingDates', - 'TSIZ': 'size', - 'TYER': 'year', - 'IPLS': 'involvedPeopleList', - 'RVAD': 'volumeAdjustment', - 'EQUA': 'equalization', - - // Non-standard iTunes frames - 'TCMP': 'compilation', - 'TSO2': 'albumArtistSortOrder', - 'TSOC': 'composerSortOrder' - } -}); - -// ID3 v2.2 support -exports.ID3v22Stream = exports.ID3v23Stream.extend({ - readHeader: function() { - var id = this.stream.readString(3); - - if (this.frameReplacements[id] && !this.frameTypes[id]) - this.frameTypes[id] = this.frameReplacements[id]; - - return { - identifier: this.replacements[id] || id, - length: this.stream.readUInt24() - }; - }, - - // map 3 char ID3 v2.2 names to 4 char ID3 v2.3/4 names - replacements: { - 'UFI': 'UFID', - 'TT1': 'TIT1', - 'TT2': 'TIT2', - 'TT3': 'TIT3', - 'TP1': 'TPE1', - 'TP2': 'TPE2', - 'TP3': 'TPE3', - 'TP4': 'TPE4', - 'TCM': 'TCOM', - 'TXT': 'TEXT', - 'TLA': 'TLAN', - 'TCO': 'TCON', - 'TAL': 'TALB', - 'TPA': 'TPOS', - 'TRK': 'TRCK', - 'TRC': 'TSRC', - 'TYE': 'TYER', - 'TDA': 'TDAT', - 'TIM': 'TIME', - 'TRD': 'TRDA', - 'TMT': 'TMED', - 'TFT': 'TFLT', - 'TBP': 'TBPM', - 'TCR': 'TCOP', - 'TPB': 'TPUB', - 'TEN': 'TENC', - 'TSS': 'TSSE', - 'TOF': 'TOFN', - 'TLE': 'TLEN', - 'TSI': 'TSIZ', - 'TDY': 'TDLY', - 'TKE': 'TKEY', - 'TOT': 'TOAL', - 'TOA': 'TOPE', - 'TOL': 'TOLY', - 'TOR': 'TORY', - 'TXX': 'TXXX', - - 'WAF': 'WOAF', - 'WAR': 'WOAR', - 'WAS': 'WOAS', - 'WCM': 'WCOM', - 'WCP': 'WCOP', - 'WPB': 'WPUB', - 'WXX': 'WXXX', - - 'IPL': 'IPLS', - 'MCI': 'MCDI', - 'ETC': 'ETCO', - 'MLL': 'MLLT', - 'STC': 'SYTC', - 'ULT': 'USLT', - 'SLT': 'SYLT', - 'COM': 'COMM', - 'RVA': 'RVAD', - 'EQU': 'EQUA', - 'REV': 'RVRB', - - 'GEO': 'GEOB', - 'CNT': 'PCNT', - 'POP': 'POPM', - 'BUF': 'RBUF', - 'CRA': 'AENC', - 'LNK': 'LINK', - - // iTunes stuff - 'TST': 'TSOT', - 'TSP': 'TSOP', - 'TSA': 'TSOA', - 'TCP': 'TCMP', - 'TS2': 'TSO2', - 'TSC': 'TSOC' - }, - - // replacements for ID3 v2.3/4 frames - frameReplacements: { - PIC: { - encoding: 1, - format: 'int24', - type: 'int8', - description: 'string', - data: 'binary' - }, - - CRM: { - owner: 'latin1', - description: 'latin1', - data: 'binary' - } - } -}); -},{}],8:[function(require,module,exports){ -function IMDCT() { - this.tmp_imdct36 = new Float64Array(18); - this.tmp_dctIV = new Float64Array(18); - this.tmp_sdctII = new Float64Array(9); -} - -// perform X[18]->x[36] IMDCT using Szu-Wei Lee's fast algorithm -IMDCT.prototype.imdct36 = function(x, y) { - var tmp = this.tmp_imdct36; - - /* DCT-IV */ - this.dctIV(x, tmp); - - // convert 18-point DCT-IV to 36-point IMDCT - for (var i = 0; i < 9; ++i) { - y[i] = tmp[9 + i]; - } - for (var i = 9; i < 27; ++i) { - y[i] = -tmp[36 - (9 + i) - 1]; - } - for (var i = 27; i < 36; ++i) { - y[i] = -tmp[i - 27]; - } -}; - -var dctIV_scale = []; -for(i = 0; i < 18; i++) { - dctIV_scale[i] = 2 * Math.cos(Math.PI * (2 * i + 1) / (4 * 18)); -} - -IMDCT.prototype.dctIV = function(y, X) { - var tmp = this.tmp_dctIV; - - // scaling - for (var i = 0; i < 18; ++i) { - tmp[i] = y[i] * dctIV_scale[i]; - } - - // SDCT-II - this.sdctII(tmp, X); - - // scale reduction and output accumulation - X[0] /= 2; - for (var i = 1; i < 18; ++i) { - X[i] = X[i] / 2 - X[i - 1]; - } -}; - -var sdctII_scale = []; -for (var i = 0; i < 9; ++i) { - sdctII_scale[i] = 2 * Math.cos(Math.PI * (2 * i + 1) / (2 * 18)); -} - -IMDCT.prototype.sdctII = function(x, X) { - // divide the 18-point SDCT-II into two 9-point SDCT-IIs - var tmp = this.tmp_sdctII; - - // even input butterfly - for (var i = 0; i < 9; ++i) { - tmp[i] = x[i] + x[18 - i - 1]; - } - - fastsdct(tmp, X, 0); - - // odd input butterfly and scaling - for (var i = 0; i < 9; ++i) { - tmp[i] = (x[i] - x[18 - i - 1]) * sdctII_scale[i]; - } - - fastsdct(tmp, X, 1); - - // output accumulation - for (var i = 3; i < 18; i += 2) { - X[i] -= X[i - 2]; - } -}; - -var c0 = 2 * Math.cos( 1 * Math.PI / 18); -var c1 = 2 * Math.cos( 3 * Math.PI / 18); -var c2 = 2 * Math.cos( 4 * Math.PI / 18); -var c3 = 2 * Math.cos( 5 * Math.PI / 18); -var c4 = 2 * Math.cos( 7 * Math.PI / 18); -var c5 = 2 * Math.cos( 8 * Math.PI / 18); -var c6 = 2 * Math.cos(16 * Math.PI / 18); - -function fastsdct(x, y, offset) { - var a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12; - var a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25; - var m0, m1, m2, m3, m4, m5, m6, m7; - - a0 = x[3] + x[5]; - a1 = x[3] - x[5]; - a2 = x[6] + x[2]; - a3 = x[6] - x[2]; - a4 = x[1] + x[7]; - a5 = x[1] - x[7]; - a6 = x[8] + x[0]; - a7 = x[8] - x[0]; - - a8 = a0 + a2; - a9 = a0 - a2; - a10 = a0 - a6; - a11 = a2 - a6; - a12 = a8 + a6; - a13 = a1 - a3; - a14 = a13 + a7; - a15 = a3 + a7; - a16 = a1 - a7; - a17 = a1 + a3; - - m0 = a17 * -c3; - m1 = a16 * -c0; - m2 = a15 * -c4; - m3 = a14 * -c1; - m4 = a5 * -c1; - m5 = a11 * -c6; - m6 = a10 * -c5; - m7 = a9 * -c2; - - a18 = x[4] + a4; - a19 = 2 * x[4] - a4; - a20 = a19 + m5; - a21 = a19 - m5; - a22 = a19 + m6; - a23 = m4 + m2; - a24 = m4 - m2; - a25 = m4 + m1; - - // output to every other slot for convenience - y[offset + 0] = a18 + a12; - y[offset + 2] = m0 - a25; - y[offset + 4] = m7 - a20; - y[offset + 6] = m3; - y[offset + 8] = a21 - m6; - y[offset + 10] = a24 - m1; - y[offset + 12] = a12 - 2 * a18; - y[offset + 14] = a23 + m0; - y[offset + 16] = a22 + m7; -} - -IMDCT.S = [ - /* 0 */ [ 0.608761429, - -0.923879533, - -0.130526192, - 0.991444861, - -0.382683432, - -0.793353340 ], - - /* 6 */ [ -0.793353340, - 0.382683432, - 0.991444861, - 0.130526192, - -0.923879533, - -0.608761429 ], - - /* 1 */ [ 0.382683432, - -0.923879533, - 0.923879533, - -0.382683432, - -0.382683432, - 0.923879533 ], - - /* 7 */ [ -0.923879533, - -0.382683432, - 0.382683432, - 0.923879533, - 0.923879533, - 0.382683432 ], - - /* 2 */ [ 0.130526192, - -0.382683432, - 0.608761429, - -0.793353340, - 0.923879533, - -0.991444861 ], - - /* 8 */ [ -0.991444861, - -0.923879533, - -0.793353340, - -0.608761429, - -0.382683432, - -0.130526192 ] -]; - -module.exports = IMDCT; - -},{}],9:[function(require,module,exports){ -var tables = require('./tables'); -var MP3FrameHeader = require('./header'); -var MP3Frame = require('./frame'); -var utils = require('./utils'); - -function Layer1() { - this.allocation = utils.makeArray([2, 32], Uint8Array); - this.scalefactor = utils.makeArray([2, 32], Uint8Array); -} - -MP3Frame.layers[1] = Layer1; - -// linear scaling table -const LINEAR_TABLE = new Float32Array([ - 1.33333333333333, 1.14285714285714, 1.06666666666667, - 1.03225806451613, 1.01587301587302, 1.00787401574803, - 1.00392156862745, 1.00195694716243, 1.00097751710655, - 1.00048851978505, 1.00024420024420, 1.00012208521548, - 1.00006103888177, 1.00003051850948 -]); - -Layer1.prototype.decode = function(stream, frame) { - var header = frame.header; - var nch = header.nchannels(); - - var bound = 32; - if (header.mode === MP3FrameHeader.MODE.JOINT_STEREO) { - header.flags |= MP3FrameHeader.FLAGS.I_STEREO; - bound = 4 + header.mode_extension * 4; - } - - if (header.flags & MP3FrameHeader.FLAGS.PROTECTION) { - // TODO: crc check - } - - // decode bit allocations - var allocation = this.allocation; - for (var sb = 0; sb < bound; sb++) { - for (var ch = 0; ch < nch; ch++) { - var nb = stream.read(4); - if (nb === 15) - throw new Error("forbidden bit allocation value"); - - allocation[ch][sb] = nb ? nb + 1 : 0; - } - } - - for (var sb = bound; sb < 32; sb++) { - var nb = stream.read(4); - if (nb === 15) - throw new Error("forbidden bit allocation value"); - - allocation[0][sb] = - allocation[1][sb] = nb ? nb + 1 : 0; - } - - // decode scalefactors - var scalefactor = this.scalefactor; - for (var sb = 0; sb < 32; sb++) { - for (var ch = 0; ch < nch; ch++) { - if (allocation[ch][sb]) { - scalefactor[ch][sb] = stream.read(6); - - /* - * Scalefactor index 63 does not appear in Table B.1 of - * ISO/IEC 11172-3. Nonetheless, other implementations accept it, - * so we do as well - */ - } - } - } - - // decode samples - for (var s = 0; s < 12; s++) { - for (var sb = 0; sb < bound; sb++) { - for (var ch = 0; ch < nch; ch++) { - var nb = allocation[ch][sb]; - frame.sbsample[ch][s][sb] = nb ? this.sample(stream, nb) * tables.SF_TABLE[scalefactor[ch][sb]] : 0; - } - } - - for (var sb = bound; sb < 32; sb++) { - var nb = allocation[0][sb]; - if (nb) { - var sample = this.sample(stream, nb); - - for (var ch = 0; ch < nch; ch++) { - frame.sbsample[ch][s][sb] = sample * tables.SF_TABLE[scalefactor[ch][sb]]; - } - } else { - for (var ch = 0; ch < nch; ch++) { - frame.sbsample[ch][s][sb] = 0; - } - } - } - } -}; - -Layer1.prototype.sample = function(stream, nb) { - var sample = stream.read(nb); - - // invert most significant bit, and form a 2's complement sample - sample ^= 1 << (nb - 1); - sample |= -(sample & (1 << (nb - 1))); - sample /= (1 << (nb - 1)); - - // requantize the sample - // s'' = (2^nb / (2^nb - 1)) * (s''' + 2^(-nb + 1)) - sample += 1 >> (nb - 1); - return sample * LINEAR_TABLE[nb - 2]; -}; - -module.exports = Layer1; - -},{"./frame":4,"./header":5,"./tables":14,"./utils":15}],10:[function(require,module,exports){ -var tables = require('./tables'); -var MP3FrameHeader = require('./header'); -var MP3Frame = require('./frame'); -var utils = require('./utils'); - -function Layer2() { - this.samples = new Float64Array(3); - this.allocation = utils.makeArray([2, 32], Uint8Array); - this.scfsi = utils.makeArray([2, 32], Uint8Array); - this.scalefactor = utils.makeArray([2, 32, 3], Uint8Array); -} - -MP3Frame.layers[2] = Layer2; - -// possible quantization per subband table -const SBQUANT = [ - // ISO/IEC 11172-3 Table B.2a - { sblimit: 27, offsets: - [ 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0 ] }, - - // ISO/IEC 11172-3 Table B.2b - { sblimit: 30, offsets: - [ 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0 ] }, - - // ISO/IEC 11172-3 Table B.2c - { sblimit: 8, offsets: - [ 5, 5, 2, 2, 2, 2, 2, 2 ] }, - - // ISO/IEC 11172-3 Table B.2d - { sblimit: 12, offsets: - [ 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ] }, - - // ISO/IEC 13818-3 Table B.1 - { sblimit: 30, offsets: - [ 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] } -]; - -// bit allocation table -const BITALLOC = [ - { nbal: 2, offset: 0 }, // 0 - { nbal: 2, offset: 3 }, // 1 - { nbal: 3, offset: 3 }, // 2 - { nbal: 3, offset: 1 }, // 3 - { nbal: 4, offset: 2 }, // 4 - { nbal: 4, offset: 3 }, // 5 - { nbal: 4, offset: 4 }, // 6 - { nbal: 4, offset: 5 } // 7 -]; - -// offsets into quantization class table -const OFFSETS = [ - [ 0, 1, 16 ], // 0 - [ 0, 1, 2, 3, 4, 5, 16 ], // 1 - [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ], // 2 - [ 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ], // 3 - [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16 ], // 4 - [ 0, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ] // 5 -]; - - - -/* - * These are the Layer II classes of quantization. - * The table is derived from Table B.4 of ISO/IEC 11172-3. - */ -const QC_TABLE = [ - { nlevels: 3, group: 2, bits: 5, C: 1.33333333333, D: 0.50000000000 }, - { nlevels: 5, group: 3, bits: 7, C: 1.60000000000, D: 0.50000000000 }, - { nlevels: 7, group: 0, bits: 3, C: 1.14285714286, D: 0.25000000000 }, - { nlevels: 9, group: 4, bits: 10, C: 1.77777777777, D: 0.50000000000 }, - { nlevels: 15, group: 0, bits: 4, C: 1.06666666666, D: 0.12500000000 }, - { nlevels: 31, group: 0, bits: 5, C: 1.03225806452, D: 0.06250000000 }, - { nlevels: 63, group: 0, bits: 6, C: 1.01587301587, D: 0.03125000000 }, - { nlevels: 127, group: 0, bits: 7, C: 1.00787401575, D: 0.01562500000 }, - { nlevels: 255, group: 0, bits: 8, C: 1.00392156863, D: 0.00781250000 }, - { nlevels: 511, group: 0, bits: 9, C: 1.00195694716, D: 0.00390625000 }, - { nlevels: 1023, group: 0, bits: 10, C: 1.00097751711, D: 0.00195312500 }, - { nlevels: 2047, group: 0, bits: 11, C: 1.00048851979, D: 0.00097656250 }, - { nlevels: 4095, group: 0, bits: 12, C: 1.00024420024, D: 0.00048828125 }, - { nlevels: 8191, group: 0, bits: 13, C: 1.00012208522, D: 0.00024414063 }, - { nlevels: 16383, group: 0, bits: 14, C: 1.00006103888, D: 0.00012207031 }, - { nlevels: 32767, group: 0, bits: 15, C: 1.00003051851, D: 0.00006103516 }, - { nlevels: 65535, group: 0, bits: 16, C: 1.00001525902, D: 0.00003051758 } -]; - -Layer2.prototype.decode = function(stream, frame) { - var header = frame.header; - var nch = header.nchannels(); - var index; - - if (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) { - index = 4; - } else if (header.flags & MP3FrameHeader.FLAGS.FREEFORMAT) { - index = header.samplerate === 48000 ? 0 : 1; - } else { - var bitrate_per_channel = header.bitrate; - - if (nch === 2) { - bitrate_per_channel /= 2; - - /* - * ISO/IEC 11172-3 allows only single channel mode for 32, 48, 56, and - * 80 kbps bitrates in Layer II, but some encoders ignore this - * restriction, so we ignore it as well. - */ - } else { - /* - * ISO/IEC 11172-3 does not allow single channel mode for 224, 256, - * 320, or 384 kbps bitrates in Layer II. - */ - if (bitrate_per_channel > 192000) - throw new Error('bad bitrate/mode combination'); - } - - if (bitrate_per_channel <= 48000) - index = header.samplerate === 32000 ? 3 : 2; - else if (bitrate_per_channel <= 80000) - index = 0; - else - index = header.samplerate === 48000 ? 0 : 1; - } - - var sblimit = SBQUANT[index].sblimit; - var offsets = SBQUANT[index].offsets; - - var bound = 32; - if (header.mode === MP3FrameHeader.MODE.JOINT_STEREO) { - header.flags |= MP3FrameHeader.FLAGS.I_STEREO; - bound = 4 + header.mode_extension * 4; - } - - if (bound > sblimit) - bound = sblimit; - - // decode bit allocations - var allocation = this.allocation; - for (var sb = 0; sb < bound; sb++) { - var nbal = BITALLOC[offsets[sb]].nbal; - - for (var ch = 0; ch < nch; ch++) - allocation[ch][sb] = stream.read(nbal); - } - - for (var sb = bound; sb < sblimit; sb++) { - var nbal = BITALLOC[offsets[sb]].nbal; - - allocation[0][sb] = - allocation[1][sb] = stream.read(nbal); - } - - // decode scalefactor selection info - var scfsi = this.scfsi; - for (var sb = 0; sb < sblimit; sb++) { - for (var ch = 0; ch < nch; ch++) { - if (allocation[ch][sb]) - scfsi[ch][sb] = stream.read(2); - } - } - - if (header.flags & MP3FrameHeader.FLAGS.PROTECTION) { - // TODO: crc check - } - - // decode scalefactors - var scalefactor = this.scalefactor; - for (var sb = 0; sb < sblimit; sb++) { - for (var ch = 0; ch < nch; ch++) { - if (allocation[ch][sb]) { - scalefactor[ch][sb][0] = stream.read(6); - - switch (scfsi[ch][sb]) { - case 2: - scalefactor[ch][sb][2] = - scalefactor[ch][sb][1] = scalefactor[ch][sb][0]; - break; - - case 0: - scalefactor[ch][sb][1] = stream.read(6); - // fall through - - case 1: - case 3: - scalefactor[ch][sb][2] = stream.read(6); - } - - if (scfsi[ch][sb] & 1) - scalefactor[ch][sb][1] = scalefactor[ch][sb][scfsi[ch][sb] - 1]; - - /* - * Scalefactor index 63 does not appear in Table B.1 of - * ISO/IEC 11172-3. Nonetheless, other implementations accept it, - * so we do as well. - */ - } - } - } - - // decode samples - for (var gr = 0; gr < 12; gr++) { - // normal - for (var sb = 0; sb < bound; sb++) { - for (var ch = 0; ch < nch; ch++) { - if (index = allocation[ch][sb]) { - index = OFFSETS[BITALLOC[offsets[sb]].offset][index - 1]; - this.decodeSamples(stream, QC_TABLE[index]); - - var scale = tables.SF_TABLE[scalefactor[ch][sb][gr >> 2]]; - for (var s = 0; s < 3; s++) { - frame.sbsample[ch][3 * gr + s][sb] = this.samples[s] * scale; - } - } else { - for (var s = 0; s < 3; s++) { - frame.sbsample[ch][3 * gr + s][sb] = 0; - } - } - } - } - - // joint stereo - for (var sb = bound; sb < sblimit; sb++) { - if (index = allocation[0][sb]) { - index = OFFSETS[BITALLOC[offsets[sb]].offset][index - 1]; - this.decodeSamples(stream, QC_TABLE[index]); - - for (var ch = 0; ch < nch; ch++) { - var scale = tables.SF_TABLE[scalefactor[ch][sb][gr >> 2]]; - for (var s = 0; s < 3; s++) { - frame.sbsample[ch][3 * gr + s][sb] = this.samples[s] * scale; - } - } - } else { - for (var ch = 0; ch < nch; ch++) { - for (var s = 0; s < 3; s++) { - frame.sbsample[ch][3 * gr + s][sb] = 0; - } - } - } - } - - // the rest - for (var ch = 0; ch < nch; ch++) { - for (var s = 0; s < 3; s++) { - for (var sb = sblimit; sb < 32; sb++) { - frame.sbsample[ch][3 * gr + s][sb] = 0; - } - } - } - } -}; - -Layer2.prototype.decodeSamples = function(stream, quantclass) { - var sample = this.samples; - var nb = quantclass.group; - - if (nb) { - // degrouping - var c = stream.read(quantclass.bits); - var nlevels = quantclass.nlevels; - - for (var s = 0; s < 3; s++) { - sample[s] = c % nlevels; - c = c / nlevels | 0; - } - } else { - nb = quantclass.bits; - for (var s = 0; s < 3; s++) { - sample[s] = stream.read(nb); - } - } - - for (var s = 0; s < 3; s++) { - // invert most significant bit, and form a 2's complement sample - var requantized = sample[s] ^ (1 << (nb - 1)); - requantized |= -(requantized & (1 << (nb - 1))); - requantized /= (1 << (nb - 1)); - - // requantize the sample - sample[s] = (requantized + quantclass.D) * quantclass.C; - } -}; - -module.exports = Layer2; - -},{"./frame":4,"./header":5,"./tables":14,"./utils":15}],11:[function(require,module,exports){ -var AV = (window.AV); -var tables = require('./tables'); -var MP3FrameHeader = require('./header'); -var MP3Frame = require('./frame'); -var huffman = require('./huffman'); -var IMDCT = require('./imdct'); -var utils = require('./utils'); - -function MP3SideInfo() { - this.main_data_begin = null; - this.private_bits = null; - this.gr = [new MP3Granule(), new MP3Granule()]; - this.scfsi = new Uint8Array(2); -} - -function MP3Granule() { - this.ch = [new MP3Channel(), new MP3Channel()]; -} - -function MP3Channel() { - // from side info - this.part2_3_length = null; - this.big_values = null; - this.global_gain = null; - this.scalefac_compress = null; - - this.flags = null; - this.block_type = null; - this.table_select = new Uint8Array(3); - this.subblock_gain = new Uint8Array(3); - this.region0_count = null; - this.region1_count = null; - - // from main_data - this.scalefac = new Uint8Array(39); -} - -function Layer3() { - this.imdct = new IMDCT(); - this.si = new MP3SideInfo(); - - // preallocate reusable typed arrays for performance - this.xr = [new Float64Array(576), new Float64Array(576)]; - this._exponents = new Int32Array(39); - this.reqcache = new Float64Array(16); - this.modes = new Int16Array(39); - this.output = new Float64Array(36); - - this.tmp = utils.makeArray([32, 3, 6]); - this.tmp2 = new Float64Array(32 * 3 * 6); -} - -MP3Frame.layers[3] = Layer3; - -Layer3.prototype.decode = function(stream, frame) { - var header = frame.header; - var next_md_begin = 0; - var md_len = 0; - - var nch = header.nchannels(); - var si_len = (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) ? (nch === 1 ? 9 : 17) : (nch === 1 ? 17 : 32); - - // check frame sanity - if (stream.next_frame - stream.nextByte() < si_len) { - stream.md_len = 0; - throw new Error('Bad frame length'); - } - - // check CRC word - if (header.flags & MP3FrameHeader.FLAGS.PROTECTION) { - // TODO: crc check - } - - // decode frame side information - var sideInfo = this.sideInfo(stream, nch, header.flags & MP3FrameHeader.FLAGS.LSF_EXT); - var si = sideInfo.si; - var data_bitlen = sideInfo.data_bitlen; - var priv_bitlen = sideInfo.priv_bitlen; - - header.flags |= priv_bitlen; - header.private_bits |= si.private_bits; - - // find main_data of next frame - var peek = stream.copy(); - peek.seek(stream.next_frame * 8); - - var nextHeader = peek.read(16); - if ((nextHeader & 0xffe6) === 0xffe2) { // syncword | layer - if ((nextHeader & 1) === 0) // protection bit - peek.advance(16); // crc check - - peek.advance(16); // skip the rest of the header - next_md_begin = peek.read((nextHeader & 8) ? 9 : 8); - } - - // find main_data of this frame - var frame_space = stream.next_frame - stream.nextByte(); - - if (next_md_begin > si.main_data_begin + frame_space) - next_md_begin = 0; - - var md_len = si.main_data_begin + frame_space - next_md_begin; - var frame_used = 0; - var ptr; - - if (si.main_data_begin === 0) { - ptr = stream.stream; - stream.md_len = 0; - frame_used = md_len; - } else { - if (si.main_data_begin > stream.md_len) { - throw new Error('bad main_data_begin pointer'); - } else { - var old_md_len = stream.md_len; - - if (md_len > si.main_data_begin) { - if (stream.md_len + md_len - si.main_data_begin > MP3FrameHeader.BUFFER_MDLEN) { - throw new Error("Assertion failed: (stream.md_len + md_len - si.main_data_begin <= MAD_MP3FrameHeader.BUFFER_MDLEN)"); - } - - frame_used = md_len - si.main_data_begin; - this.memcpy(stream.main_data, stream.md_len, stream.stream.stream, stream.nextByte(), frame_used); - stream.md_len += frame_used; - } - - ptr = new AV.Bitstream(AV.Stream.fromBuffer(new AV.Buffer(stream.main_data))); - ptr.advance((old_md_len - si.main_data_begin) * 8); - } - } - - var frame_free = frame_space - frame_used; - - // decode main_data - this.decodeMainData(ptr, frame, si, nch); - - // preload main_data buffer with up to 511 bytes for next frame(s) - if (frame_free >= next_md_begin) { - this.memcpy(stream.main_data, 0, stream.stream.stream, stream.next_frame - next_md_begin, next_md_begin); - stream.md_len = next_md_begin; - } else { - if (md_len < si.main_data_begin) { - var extra = si.main_data_begin - md_len; - if (extra + frame_free > next_md_begin) - extra = next_md_begin - frame_free; - - if (extra < stream.md_len) { - this.memcpy(stream.main_data, 0, stream.main_data, stream.md_len - extra, extra); - stream.md_len = extra; - } - } else { - stream.md_len = 0; - } - - this.memcpy(stream.main_data, stream.md_len, stream.stream.stream, stream.next_frame - frame_free, frame_free); - stream.md_len += frame_free; - } -}; - -Layer3.prototype.memcpy = function(dst, dstOffset, pSrc, srcOffset, length) { - var subarr; - if (pSrc.subarray) - subarr = pSrc.subarray(srcOffset, srcOffset + length); - else - subarr = pSrc.peekBuffer(srcOffset - pSrc.offset, length).data; - - // oh my, memcpy actually exists in JavaScript? - dst.set(subarr, dstOffset); - return dst; -}; - -Layer3.prototype.sideInfo = function(stream, nch, lsf) { - var si = this.si; - var data_bitlen = 0; - var priv_bitlen = lsf ? ((nch === 1) ? 1 : 2) : ((nch === 1) ? 5 : 3); - - si.main_data_begin = stream.read(lsf ? 8 : 9); - si.private_bits = stream.read(priv_bitlen); - - var ngr = 1; - if (!lsf) { - ngr = 2; - for (var ch = 0; ch < nch; ++ch) - si.scfsi[ch] = stream.read(4); - } - - for (var gr = 0; gr < ngr; gr++) { - var granule = si.gr[gr]; - - for (var ch = 0; ch < nch; ch++) { - var channel = granule.ch[ch]; - - channel.part2_3_length = stream.read(12); - channel.big_values = stream.read(9); - channel.global_gain = stream.read(8); - channel.scalefac_compress = stream.read(lsf ? 9 : 4); - - data_bitlen += channel.part2_3_length; - - if (channel.big_values > 288) - throw new Error('bad big_values count'); - - channel.flags = 0; - - // window_switching_flag - if (stream.read(1)) { - channel.block_type = stream.read(2); - - if (channel.block_type === 0) - throw new Error('reserved block_type'); - - if (!lsf && channel.block_type === 2 && si.scfsi[ch]) - throw new Error('bad scalefactor selection info'); - - channel.region0_count = 7; - channel.region1_count = 36; - - if (stream.read(1)) - channel.flags |= tables.MIXED_BLOCK_FLAG; - else if (channel.block_type === 2) - channel.region0_count = 8; - - for (var i = 0; i < 2; i++) - channel.table_select[i] = stream.read(5); - - for (var i = 0; i < 3; i++) - channel.subblock_gain[i] = stream.read(3); - } else { - channel.block_type = 0; - - for (var i = 0; i < 3; i++) - channel.table_select[i] = stream.read(5); - - channel.region0_count = stream.read(4); - channel.region1_count = stream.read(3); - } - - // [preflag,] scalefac_scale, count1table_select - channel.flags |= stream.read(lsf ? 2 : 3); - } - } - - return { - si: si, - data_bitlen: data_bitlen, - priv_bitlen: priv_bitlen - }; -}; - -Layer3.prototype.decodeMainData = function(stream, frame, si, nch) { - var header = frame.header; - var sfreq = header.samplerate; - - if (header.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT) - sfreq *= 2; - - // 48000 => 0, 44100 => 1, 32000 => 2, - // 24000 => 3, 22050 => 4, 16000 => 5 - var sfreqi = ((sfreq >> 7) & 0x000f) + ((sfreq >> 15) & 0x0001) - 8; - - if (header.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT) - sfreqi += 3; - - // scalefactors, Huffman decoding, requantization - var ngr = (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) ? 1 : 2; - var xr = this.xr; - - for (var gr = 0; gr < ngr; ++gr) { - var granule = si.gr[gr]; - var sfbwidth = []; - var l = 0; - - for (var ch = 0; ch < nch; ++ch) { - var channel = granule.ch[ch]; - var part2_length; - - sfbwidth[ch] = tables.SFBWIDTH_TABLE[sfreqi].l; - if (channel.block_type === 2) { - sfbwidth[ch] = (channel.flags & tables.MIXED_BLOCK_FLAG) ? tables.SFBWIDTH_TABLE[sfreqi].m : tables.SFBWIDTH_TABLE[sfreqi].s; - } - - if (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) { - part2_length = this.scalefactors_lsf(stream, channel, ch === 0 ? 0 : si.gr[1].ch[1], header.mode_extension); - } else { - part2_length = this.scalefactors(stream, channel, si.gr[0].ch[ch], gr === 0 ? 0 : si.scfsi[ch]); - } - - this.huffmanDecode(stream, xr[ch], channel, sfbwidth[ch], part2_length); - } - - // joint stereo processing - if (header.mode === MP3FrameHeader.MODE.JOINT_STEREO && header.mode_extension !== 0) - this.stereo(xr, si.gr, gr, header, sfbwidth[0]); - - // reordering, alias reduction, IMDCT, overlap-add, frequency inversion - for (var ch = 0; ch < nch; ch++) { - var channel = granule.ch[ch]; - var sample = frame.sbsample[ch].slice(18 * gr); - - var sb, l = 0, i, sblimit; - var output = this.output; - - if (channel.block_type === 2) { - this.reorder(xr[ch], channel, sfbwidth[ch]); - - /* - * According to ISO/IEC 11172-3, "Alias reduction is not applied for - * granules with block_type === 2 (short block)." However, other - * sources suggest alias reduction should indeed be performed on the - * lower two subbands of mixed blocks. Most other implementations do - * this, so by default we will too. - */ - if (channel.flags & tables.MIXED_BLOCK_FLAG) - this.aliasreduce(xr[ch], 36); - } else { - this.aliasreduce(xr[ch], 576); - } - - // subbands 0-1 - if (channel.block_type !== 2 || (channel.flags & tables.MIXED_BLOCK_FLAG)) { - var block_type = channel.block_type; - if (channel.flags & tables.MIXED_BLOCK_FLAG) - block_type = 0; - - // long blocks - for (var sb = 0; sb < 2; ++sb, l += 18) { - this.imdct_l(xr[ch].subarray(l, l + 18), output, block_type); - this.overlap(output, frame.overlap[ch][sb], sample, sb); - } - } else { - // short blocks - for (var sb = 0; sb < 2; ++sb, l += 18) { - this.imdct_s(xr[ch].subarray(l, l + 18), output); - this.overlap(output, frame.overlap[ch][sb], sample, sb); - } - } - - this.freqinver(sample, 1); - - // (nonzero) subbands 2-31 - var i = 576; - while (i > 36 && xr[ch][i - 1] === 0) { - --i; - } - - sblimit = 32 - (((576 - i) / 18) << 0); - - if (channel.block_type !== 2) { - // long blocks - for (var sb = 2; sb < sblimit; ++sb, l += 18) { - this.imdct_l(xr[ch].subarray(l, l + 18), output, channel.block_type); - this.overlap(output, frame.overlap[ch][sb], sample, sb); - - if (sb & 1) - this.freqinver(sample, sb); - } - } else { - // short blocks - for (var sb = 2; sb < sblimit; ++sb, l += 18) { - this.imdct_s(xr[ch].subarray(l, l + 18), output); - this.overlap(output, frame.overlap[ch][sb], sample, sb); - - if (sb & 1) - this.freqinver(sample, sb); - } - } - - // remaining (zero) subbands - for (var sb = sblimit; sb < 32; ++sb) { - this.overlap_z(frame.overlap[ch][sb], sample, sb); - - if (sb & 1) - this.freqinver(sample, sb); - } - } - } -}; - -Layer3.prototype.scalefactors = function(stream, channel, gr0ch, scfsi) { - var start = stream.offset(); - var slen1 = tables.SFLEN_TABLE[channel.scalefac_compress].slen1; - var slen2 = tables.SFLEN_TABLE[channel.scalefac_compress].slen2; - var sfbi; - - if (channel.block_type === 2) { - sfbi = 0; - - var nsfb = (channel.flags & tables.MIXED_BLOCK_FLAG) ? 8 + 3 * 3 : 6 * 3; - while (nsfb--) - channel.scalefac[sfbi++] = stream.read(slen1); - - nsfb = 6 * 3; - while (nsfb--) - channel.scalefac[sfbi++] = stream.read(slen2); - - nsfb = 1 * 3; - while (nsfb--) - channel.scalefac[sfbi++] = 0; - } else { - if (scfsi & 0x8) { - for (var sfbi = 0; sfbi < 6; ++sfbi) - channel.scalefac[sfbi] = gr0ch.scalefac[sfbi]; - } else { - for (var sfbi = 0; sfbi < 6; ++sfbi) - channel.scalefac[sfbi] = stream.read(slen1); - } - - if (scfsi & 0x4) { - for (var sfbi = 6; sfbi < 11; ++sfbi) - channel.scalefac[sfbi] = gr0ch.scalefac[sfbi]; - } else { - for (var sfbi = 6; sfbi < 11; ++sfbi) - channel.scalefac[sfbi] = stream.read(slen1); - } - - if (scfsi & 0x2) { - for (var sfbi = 11; sfbi < 16; ++sfbi) - channel.scalefac[sfbi] = gr0ch.scalefac[sfbi]; - } else { - for (var sfbi = 11; sfbi < 16; ++sfbi) - channel.scalefac[sfbi] = stream.read(slen2); - } - - if (scfsi & 0x1) { - for (var sfbi = 16; sfbi < 21; ++sfbi) - channel.scalefac[sfbi] = gr0ch.scalefac[sfbi]; - } else { - for (var sfbi = 16; sfbi < 21; ++sfbi) - channel.scalefac[sfbi] = stream.read(slen2); - } - - channel.scalefac[21] = 0; - } - - return stream.offset() - start; -}; - -Layer3.prototype.scalefactors_lsf = function(stream, channel, gr1ch, mode_extension) { - var start = stream.offset(); - var scalefac_compress = channel.scalefac_compress; - var index = channel.block_type === 2 ? (channel.flags & tables.MIXED_BLOCK_FLAG ? 2 : 1) : 0; - var slen = new Int32Array(4); - var nsfb; - - if (!((mode_extension & tables.I_STEREO) && gr1ch)) { - if (scalefac_compress < 400) { - slen[0] = (scalefac_compress >>> 4) / 5; - slen[1] = (scalefac_compress >>> 4) % 5; - slen[2] = (scalefac_compress % 16) >>> 2; - slen[3] = scalefac_compress % 4; - - nsfb = tables.NSFB_TABLE[0][index]; - } else if (scalefac_compress < 500) { - scalefac_compress -= 400; - - slen[0] = (scalefac_compress >>> 2) / 5; - slen[1] = (scalefac_compress >>> 2) % 5; - slen[2] = scalefac_compress % 4; - slen[3] = 0; - - nsfb = tables.NSFB_TABLE[1][index]; - } else { - scalefac_compress -= 500; - - slen[0] = scalefac_compress / 3; - slen[1] = scalefac_compress % 3; - slen[2] = 0; - slen[3] = 0; - - channel.flags |= tables.PREFLAG; - nsfb = tables.NSFB_TABLE[2][index]; - } - - var n = 0; - for (var part = 0; part < 4; part++) { - for (var i = 0; i < nsfb[part]; i++) { - channel.scalefac[n++] = stream.read(slen[part]); - } - } - - while (n < 39) { - channel.scalefac[n++] = 0; - } - } else { // (mode_extension & tables.I_STEREO) && gr1ch (i.e. ch == 1) - scalefac_compress >>>= 1; - - if (scalefac_compress < 180) { - slen[0] = scalefac_compress / 36; - slen[1] = (scalefac_compress % 36) / 6; - slen[2] = (scalefac_compress % 36) % 6; - slen[3] = 0; - - nsfb = tables.NSFB_TABLE[3][index]; - } else if (scalefac_compress < 244) { - scalefac_compress -= 180; - - slen[0] = (scalefac_compress % 64) >>> 4; - slen[1] = (scalefac_compress % 16) >>> 2; - slen[2] = scalefac_compress % 4; - slen[3] = 0; - - nsfb = tables.NSFB_TABLE[4][index]; - } else { - scalefac_compress -= 244; - - slen[0] = scalefac_compress / 3; - slen[1] = scalefac_compress % 3; - slen[2] = 0; - slen[3] = 0; - - nsfb = tables.NSFB_TABLE[5][index]; - } - - var n = 0; - for (var part = 0; part < 4; ++part) { - var max = (1 << slen[part]) - 1; - for (var i = 0; i < nsfb[part]; ++i) { - var is_pos = stream.read(slen[part]); - - channel.scalefac[n] = is_pos; - gr1ch.scalefac[n++] = is_pos === max ? 1 : 0; - } - } - - while (n < 39) { - channel.scalefac[n] = 0; - gr1ch.scalefac[n++] = 0; // apparently not illegal - } - } - - return stream.offset() - start; -}; - -Layer3.prototype.huffmanDecode = function(stream, xr, channel, sfbwidth, part2_length) { - var exponents = this._exponents; - var sfbwidthptr = 0; - - var bits_left = channel.part2_3_length - part2_length; - if (bits_left < 0) - throw new Error('bad audio data length'); - - this.exponents(channel, sfbwidth, exponents); - - var peek = stream.copy(); - stream.advance(bits_left); - - /* align bit reads to byte boundaries */ - var cachesz = 8 - peek.bitPosition; - cachesz += ((32 - 1 - 24) + (24 - cachesz)) & ~7; - - var bitcache = peek.read(cachesz); - bits_left -= cachesz; - - var xrptr = 0; - - // big_values - var region = 0; - var reqcache = this.reqcache; - - var sfbound = xrptr + sfbwidth[sfbwidthptr++]; - var rcount = channel.region0_count + 1; - - var entry = huffman.huff_pair_table[channel.table_select[region]]; - var table = entry.table; - var linbits = entry.linbits; - var startbits = entry.startbits; - - if (typeof table === 'undefined') - throw new Error('bad Huffman table select'); - - var expptr = 0; - var exp = exponents[expptr++]; - var reqhits = 0; - var big_values = channel.big_values; - - while (big_values-- && cachesz + bits_left > 0) { - if (xrptr === sfbound) { - sfbound += sfbwidth[sfbwidthptr++]; - - // change table if region boundary - if (--rcount === 0) { - if (region === 0) - rcount = channel.region1_count + 1; - else - rcount = 0; // all remaining - - entry = huffman.huff_pair_table[channel.table_select[++region]]; - table = entry.table; - linbits = entry.linbits; - startbits = entry.startbits; - - if (typeof table === 'undefined') - throw new Error('bad Huffman table select'); - } - - if (exp !== exponents[expptr]) { - exp = exponents[expptr]; - reqhits = 0; - } - - ++expptr; - } - - if (cachesz < 21) { - var bits = ((32 - 1 - 21) + (21 - cachesz)) & ~7; - bitcache = (bitcache << bits) | peek.read(bits); - cachesz += bits; - bits_left -= bits; - } - - var clumpsz = startbits; - var pair = table[ (((bitcache) >> ((cachesz) - (clumpsz))) & ((1 << (clumpsz)) - 1))]; - - while (!pair.final) { - cachesz -= clumpsz; - clumpsz = pair.ptr.bits; - pair = table[pair.ptr.offset + (((bitcache) >> ((cachesz) - (clumpsz))) & ((1 << (clumpsz)) - 1))]; - } - - cachesz -= pair.value.hlen; - - if (linbits) { - var value = pair.value.x; - var x_final = false; - - switch (value) { - case 0: - xr[xrptr] = 0; - break; - - case 15: - if (cachesz < linbits + 2) { - bitcache = (bitcache << 16) | peek.read(16); - cachesz += 16; - bits_left -= 16; - } - - value += (((bitcache) >> ((cachesz) - (linbits))) & ((1 << (linbits)) - 1)); - cachesz -= linbits; - - requantized = this.requantize(value, exp); - x_final = true; // simulating goto, yay - break; - - default: - if (reqhits & (1 << value)) { - requantized = reqcache[value]; - } else { - reqhits |= (1 << value); - requantized = reqcache[value] = this.requantize(value, exp); - } - - x_final = true; - } - - if(x_final) { - xr[xrptr] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized; - } - - value = pair.value.y; - var y_final = false; - - switch (value) { - case 0: - xr[xrptr + 1] = 0; - break; - - case 15: - if (cachesz < linbits + 1) { - bitcache = (bitcache << 16) | peek.read(16); - cachesz += 16; - bits_left -= 16; - } - - value += (((bitcache) >> ((cachesz) - (linbits))) & ((1 << (linbits)) - 1)); - cachesz -= linbits; - - requantized = this.requantize(value, exp); - y_final = true; - break; // simulating goto, yayzor - - default: - if (reqhits & (1 << value)) { - requantized = reqcache[value]; - } else { - reqhits |= (1 << value); - reqcache[value] = this.requantize(value, exp); - requantized = reqcache[value]; - } - - y_final = true; - } - - if(y_final) { - xr[xrptr + 1] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized; - } - - } else { - var value = pair.value.x; - - if (value === 0) { - xr[xrptr] = 0; - } else { - if (reqhits & (1 << value)) - requantized = reqcache[value]; - else { - reqhits |= (1 << value); - requantized = reqcache[value] = this.requantize(value, exp); - } - - xr[xrptr] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized; - } - - value = pair.value.y; - - if (value === 0) { - xr[xrptr + 1] = 0; - } else { - if (reqhits & (1 << value)) - requantized = reqcache[value]; - else { - reqhits |= (1 << value); - requantized = reqcache[value] = this.requantize(value, exp); - } - - xr[xrptr + 1] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized; - } - } - - xrptr += 2; - } - - if (cachesz + bits_left < 0) - throw new Error('Huffman data overrun'); - - // count1 - var table = huffman.huff_quad_table[channel.flags & tables.COUNT1TABLE_SELECT]; - var requantized = this.requantize(1, exp); - - while (cachesz + bits_left > 0 && xrptr <= 572) { - if (cachesz < 10) { - bitcache = (bitcache << 16) | peek.read(16); - cachesz += 16; - bits_left -= 16; - } - - var quad = table[(((bitcache) >> ((cachesz) - (4))) & ((1 << (4)) - 1))]; - - // quad tables guaranteed to have at most one extra lookup - if (!quad.final) { - cachesz -= 4; - quad = table[quad.ptr.offset + (((bitcache) >> ((cachesz) - (quad.ptr.bits))) & ((1 << (quad.ptr.bits)) - 1))]; - } - - cachesz -= quad.value.hlen; - - if (xrptr === sfbound) { - sfbound += sfbwidth[sfbwidthptr++]; - - if (exp !== exponents[expptr]) { - exp = exponents[expptr]; - requantized = this.requantize(1, exp); - } - - ++expptr; - } - - // v (0..1) - xr[xrptr] = quad.value.v ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0; - - // w (0..1) - xr[xrptr + 1] = quad.value.w ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0; - - xrptr += 2; - if (xrptr === sfbound) { - sfbound += sfbwidth[sfbwidthptr++]; - - if (exp !== exponents[expptr]) { - exp = exponents[expptr]; - requantized = this.requantize(1, exp); - } - - ++expptr; - } - - // x (0..1) - xr[xrptr] = quad.value.x ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0; - - // y (0..1) - xr[xrptr + 1] = quad.value.y ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0; - - xrptr += 2; - - if (cachesz + bits_left < 0) { - // technically the bitstream is misformatted, but apparently - // some encoders are just a bit sloppy with stuffing bits - xrptr -= 4; - } - } - - if (-bits_left > MP3FrameHeader.BUFFER_GUARD * 8) { - throw new Error("assertion failed: (-bits_left <= MP3FrameHeader.BUFFER_GUARD * CHAR_BIT)"); - } - - // rzero - while (xrptr < 576) { - xr[xrptr] = 0; - xr[xrptr + 1] = 0; - xrptr += 2; - } -}; - -Layer3.prototype.requantize = function(value, exp) { - // usual (x >> 0) tricks to make sure frac and exp stay integers - var frac = (exp % 4) >> 0; // assumes sign(frac) === sign(exp) - exp = (exp / 4) >> 0; - - var requantized = Math.pow(value, 4.0 / 3.0); - requantized *= Math.pow(2.0, (exp / 4.0)); - - if (frac) { - requantized *= Math.pow(2.0, (frac / 4.0)); - } - - if (exp < 0) { - requantized /= Math.pow(2.0, -exp * (3.0 / 4.0)); - } - - return requantized; -}; - -Layer3.prototype.exponents = function(channel, sfbwidth, exponents) { - var gain = channel.global_gain - 210; - var scalefac_multiplier = (channel.flags & tables.SCALEFAC_SCALE) ? 2 : 1; - - if (channel.block_type === 2) { - var sfbi = 0, l = 0; - - if (channel.flags & tables.MIXED_BLOCK_FLAG) { - var premask = (channel.flags & tables.PREFLAG) ? ~0 : 0; - - // long block subbands 0-1 - while (l < 36) { - exponents[sfbi] = gain - ((channel.scalefac[sfbi] + (tables.PRETAB[sfbi] & premask)) << scalefac_multiplier); - l += sfbwidth[sfbi++]; - } - } - - // this is probably wrong for 8000 Hz short/mixed blocks - var gain0 = gain - 8 * channel.subblock_gain[0]; - var gain1 = gain - 8 * channel.subblock_gain[1]; - var gain2 = gain - 8 * channel.subblock_gain[2]; - - while (l < 576) { - exponents[sfbi + 0] = gain0 - (channel.scalefac[sfbi + 0] << scalefac_multiplier); - exponents[sfbi + 1] = gain1 - (channel.scalefac[sfbi + 1] << scalefac_multiplier); - exponents[sfbi + 2] = gain2 - (channel.scalefac[sfbi + 2] << scalefac_multiplier); - - l += 3 * sfbwidth[sfbi]; - sfbi += 3; - } - } else { - if (channel.flags & tables.PREFLAG) { - for (var sfbi = 0; sfbi < 22; sfbi++) { - exponents[sfbi] = gain - ((channel.scalefac[sfbi] + tables.PRETAB[sfbi]) << scalefac_multiplier); - } - } else { - for (var sfbi = 0; sfbi < 22; sfbi++) { - exponents[sfbi] = gain - (channel.scalefac[sfbi] << scalefac_multiplier); - } - } - } -}; - -Layer3.prototype.stereo = function(xr, granules, gr, header, sfbwidth) { - var granule = granules[gr]; - var modes = this.modes; - var sfbi, l, n, i; - - if (granule.ch[0].block_type !== granule.ch[1].block_type || (granule.ch[0].flags & tables.MIXED_BLOCK_FLAG) !== (granule.ch[1].flags & tables.MIXED_BLOCK_FLAG)) - throw new Error('incompatible stereo block_type'); - - for (var i = 0; i < 39; i++) - modes[i] = header.mode_extension; - - // intensity stereo - if (header.mode_extension & tables.I_STEREO) { - var right_ch = granule.ch[1]; - var right_xr = xr[1]; - - header.flags |= MP3FrameHeader.FLAGS.tables.I_STEREO; - - // first determine which scalefactor bands are to be processed - if (right_ch.block_type === 2) { - var lower, start, max, bound = new Uint32Array(3), w; - - lower = start = max = bound[0] = bound[1] = bound[2] = 0; - sfbi = l = 0; - - if (right_ch.flags & tables.MIXED_BLOCK_FLAG) { - while (l < 36) { - n = sfbwidth[sfbi++]; - - for (var i = 0; i < n; ++i) { - if (right_xr[i]) { - lower = sfbi; - break; - } - } - - right_xr += n; - l += n; - } - - start = sfbi; - } - - var w = 0; - while (l < 576) { - n = sfbwidth[sfbi++]; - - for (i = 0; i < n; ++i) { - if (right_xr[i]) { - max = bound[w] = sfbi; - break; - } - } - - right_xr += n; - l += n; - w = (w + 1) % 3; - } - - if (max) - lower = start; - - // long blocks - for (i = 0; i < lower; ++i) - modes[i] = header.mode_extension & ~tables.I_STEREO; - - // short blocks - w = 0; - for (i = start; i < max; ++i) { - if (i < bound[w]) - modes[i] = header.mode_extension & ~tables.I_STEREO; - - w = (w + 1) % 3; - } - } else { - var bound = 0; - for (sfbi = l = 0; l < 576; l += n) { - n = sfbwidth[sfbi++]; - - for (i = 0; i < n; ++i) { - if (right_xr[i]) { - bound = sfbi; - break; - } - } - - right_xr += n; - } - - for (i = 0; i < bound; ++i) - modes[i] = header.mode_extension & ~tables.I_STEREO; - } - - // now do the actual processing - if (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) { - var illegal_pos = granules[gr + 1].ch[1].scalefac; - - // intensity_scale - var lsf_scale = IS_Ltables.SF_TABLE[right_ch.scalefac_compress & 0x1]; - - for (sfbi = l = 0; l < 576; ++sfbi, l += n) { - n = sfbwidth[sfbi]; - - if (!(modes[sfbi] & tables.I_STEREO)) - continue; - - if (illegal_pos[sfbi]) { - modes[sfbi] &= ~tables.I_STEREO; - continue; - } - - is_pos = right_ch.scalefac[sfbi]; - - for (i = 0; i < n; ++i) { - var left = xr[0][l + i]; - - if (is_pos === 0) { - xr[1][l + i] = left; - } else { - var opposite = left * lsf_scale[(is_pos - 1) / 2]; - - if (is_pos & 1) { - xr[0][l + i] = opposite; - xr[1][l + i] = left; - } - else { - xr[1][l + i] = opposite; - } - } - } - } - } else { - for (sfbi = l = 0; l < 576; ++sfbi, l += n) { - n = sfbwidth[sfbi]; - - if (!(modes[sfbi] & tables.I_STEREO)) - continue; - - is_pos = right_ch.scalefac[sfbi]; - - if (is_pos >= 7) { // illegal intensity position - modes[sfbi] &= ~tables.I_STEREO; - continue; - } - - for (i = 0; i < n; ++i) { - var left = xr[0][l + i]; - xr[0][l + i] = left * tables.IS_TABLE[is_pos]; - xr[1][l + i] = left * tables.IS_TABLE[6 - is_pos]; - } - } - } - } - - // middle/side stereo - if (header.mode_extension & tables.MS_STEREO) { - header.flags |= tables.MS_STEREO; - - var invsqrt2 = tables.ROOT_TABLE[3 + -2]; - - for (sfbi = l = 0; l < 576; ++sfbi, l += n) { - n = sfbwidth[sfbi]; - - if (modes[sfbi] !== tables.MS_STEREO) - continue; - - for (i = 0; i < n; ++i) { - var m = xr[0][l + i]; - var s = xr[1][l + i]; - - xr[0][l + i] = (m + s) * invsqrt2; // l = (m + s) / sqrt(2) - xr[1][l + i] = (m - s) * invsqrt2; // r = (m - s) / sqrt(2) - } - } - } -}; - -Layer3.prototype.aliasreduce = function(xr, lines) { - for (var xrPointer = 18; xrPointer < lines; xrPointer += 18) { - for (var i = 0; i < 8; ++i) { - var a = xr[xrPointer - i - 1]; - var b = xr[xrPointer + i]; - - xr[xrPointer - i - 1] = a * tables.CS[i] - b * tables.CA[i]; - xr[xrPointer + i] = b * tables.CS[i] + a * tables.CA[i]; - } - } -}; - -// perform IMDCT and windowing for long blocks -Layer3.prototype.imdct_l = function (X, z, block_type) { - // IMDCT - this.imdct.imdct36(X, z); - - // windowing - switch (block_type) { - case 0: // normal window - for (var i = 0; i < 36; ++i) z[i] = z[i] * tables.WINDOW_L[i]; - break; - - case 1: // start block - for (var i = 0; i < 18; ++i) z[i] = z[i] * tables.WINDOW_L[i]; - for (var i = 24; i < 30; ++i) z[i] = z[i] * tables.WINDOW_S[i - 18]; - for (var i = 30; i < 36; ++i) z[i] = 0; - break; - - case 3: // stop block - for (var i = 0; i < 6; ++i) z[i] = 0; - for (var i = 6; i < 12; ++i) z[i] = z[i] * tables.WINDOW_S[i - 6]; - for (var i = 18; i < 36; ++i) z[i] = z[i] * tables.WINDOW_L[i]; - break; - } -}; - -/* - * perform IMDCT and windowing for short blocks - */ -Layer3.prototype.imdct_s = function (X, z) { - var yptr = 0; - var wptr; - var Xptr = 0; - - var y = new Float64Array(36); - var hi, lo; - - // IMDCT - for (var w = 0; w < 3; ++w) { - var sptr = 0; - - for (var i = 0; i < 3; ++i) { - lo = X[Xptr + 0] * IMDCT.S[sptr][0] + - X[Xptr + 1] * IMDCT.S[sptr][1] + - X[Xptr + 2] * IMDCT.S[sptr][2] + - X[Xptr + 3] * IMDCT.S[sptr][3] + - X[Xptr + 4] * IMDCT.S[sptr][4] + - X[Xptr + 5] * IMDCT.S[sptr][5]; - - - y[yptr + i + 0] = lo; - y[yptr + 5 - i] = -y[yptr + i + 0]; - - ++sptr; - - lo = X[Xptr + 0] * IMDCT.S[sptr][0] + - X[Xptr + 1] * IMDCT.S[sptr][1] + - X[Xptr + 2] * IMDCT.S[sptr][2] + - X[Xptr + 3] * IMDCT.S[sptr][3] + - X[Xptr + 4] * IMDCT.S[sptr][4] + - X[Xptr + 5] * IMDCT.S[sptr][5]; - - y[yptr + i + 6] = lo; - y[yptr + 11 - i] = y[yptr + i + 6]; - - ++sptr; - } - - yptr += 12; - Xptr += 6; - } - - // windowing, overlapping and concatenation - yptr = 0; - var wptr = 0; - - for (var i = 0; i < 6; ++i) { - z[i + 0] = 0; - z[i + 6] = y[yptr + 0 + 0] * tables.WINDOW_S[wptr + 0]; - - lo = y[yptr + 0 + 6] * tables.WINDOW_S[wptr + 6] + - y[yptr + 12 + 0] * tables.WINDOW_S[wptr + 0]; - - z[i + 12] = lo; - - lo = y[yptr + 12 + 6] * tables.WINDOW_S[wptr + 6] + - y[yptr + 24 + 0] * tables.WINDOW_S[wptr + 0]; - - z[i + 18] = lo; - z[i + 24] = y[yptr + 24 + 6] * tables.WINDOW_S[wptr + 6]; - z[i + 30] = 0; - - ++yptr; - ++wptr; - } -}; - -Layer3.prototype.overlap = function (output, overlap, sample, sb) { - for (var i = 0; i < 18; ++i) { - sample[i][sb] = output[i] + overlap[i]; - overlap[i] = output[i + 18]; - } -}; - -Layer3.prototype.freqinver = function (sample, sb) { - for (var i = 1; i < 18; i += 2) - sample[i][sb] = -sample[i][sb]; -}; - -Layer3.prototype.overlap_z = function (overlap, sample, sb) { - for (var i = 0; i < 18; ++i) { - sample[i][sb] = overlap[i]; - overlap[i] = 0; - } -}; - -Layer3.prototype.reorder = function (xr, channel, sfbwidth) { - var sfbwidthPointer = 0; - var tmp = this.tmp; - var sbw = new Uint32Array(3); - var sw = new Uint32Array(3); - - // this is probably wrong for 8000 Hz mixed blocks - - var sb = 0; - if (channel.flags & tables.MIXED_BLOCK_FLAG) { - var sb = 2; - - var l = 0; - while (l < 36) - l += sfbwidth[sfbwidthPointer++]; - } - - for (var w = 0; w < 3; ++w) { - sbw[w] = sb; - sw[w] = 0; - } - - f = sfbwidth[sfbwidthPointer++]; - w = 0; - - for (var l = 18 * sb; l < 576; ++l) { - if (f-- === 0) { - f = sfbwidth[sfbwidthPointer++] - 1; - w = (w + 1) % 3; - } - - tmp[sbw[w]][w][sw[w]++] = xr[l]; - - if (sw[w] === 6) { - sw[w] = 0; - ++sbw[w]; - } - } - - var tmp2 = this.tmp2; - var ptr = 0; - - for (var i = 0; i < 32; i++) { - for (var j = 0; j < 3; j++) { - for (var k = 0; k < 6; k++) { - tmp2[ptr++] = tmp[i][j][k]; - } - } - } - - var len = (576 - 18 * sb); - for (var i = 0; i < len; i++) { - xr[18 * sb + i] = tmp2[sb + i]; - } -}; - -module.exports = Layer3; - -},{"./frame":4,"./header":5,"./huffman":6,"./imdct":8,"./tables":14,"./utils":15}],12:[function(require,module,exports){ -var AV = (window.AV); -var MP3FrameHeader = require('./header'); - -function MP3Stream(stream) { - this.stream = stream; // actual bitstream - this.sync = false; // stream sync found - this.freerate = 0; // free bitrate (fixed) - this.this_frame = stream.stream.offset; // start of current frame - this.next_frame = stream.stream.offset; // start of next frame - - this.main_data = new Uint8Array(MP3FrameHeader.BUFFER_MDLEN); // actual audio data - this.md_len = 0; // length of main data - - // copy methods from actual stream - for (var key in stream) { - if (typeof stream[key] === 'function') - this[key] = stream[key].bind(stream); - } -} - -MP3Stream.prototype.getU8 = function(offset) { - var stream = this.stream.stream; - return stream.peekUInt8(offset - stream.offset); -}; - -MP3Stream.prototype.nextByte = function() { - var stream = this.stream; - return stream.bitPosition === 0 ? stream.stream.offset : stream.stream.offset + 1; -}; - -MP3Stream.prototype.doSync = function() { - var stream = this.stream.stream; - this.align(); - - while (this.available(16) && !(stream.peekUInt8(0) === 0xff && (stream.peekUInt8(1) & 0xe0) === 0xe0)) { - this.advance(8); - } - - if (!this.available(MP3FrameHeader.BUFFER_GUARD)) - return false; - - return true; -}; - -MP3Stream.prototype.reset = function(byteOffset) { - this.seek(byteOffset * 8); - this.next_frame = byteOffset; - this.sync = true; -}; - -module.exports = MP3Stream; - -},{"./header":5}],13:[function(require,module,exports){ -var utils = require('./utils'); - -function MP3Synth() { - this.filter = utils.makeArray([2, 2, 2, 16, 8]); // polyphase filterbank outputs - this.phase = 0; - - this.pcm = { - samplerate: 0, - channels: 0, - length: 0, - samples: [new Float64Array(1152), new Float64Array(1152)] - }; -} - -/* costab[i] = cos(PI / (2 * 32) * i) */ -const costab1 = 0.998795456; -const costab2 = 0.995184727; -const costab3 = 0.989176510; -const costab4 = 0.980785280; -const costab5 = 0.970031253; -const costab6 = 0.956940336; -const costab7 = 0.941544065; -const costab8 = 0.923879533; -const costab9 = 0.903989293; -const costab10 = 0.881921264; -const costab11 = 0.857728610; -const costab12 = 0.831469612; -const costab13 = 0.803207531; -const costab14 = 0.773010453; -const costab15 = 0.740951125; -const costab16 = 0.707106781; -const costab17 = 0.671558955; -const costab18 = 0.634393284; -const costab19 = 0.595699304; -const costab20 = 0.555570233; -const costab21 = 0.514102744; -const costab22 = 0.471396737; -const costab23 = 0.427555093; -const costab24 = 0.382683432; -const costab25 = 0.336889853; -const costab26 = 0.290284677; -const costab27 = 0.242980180; -const costab28 = 0.195090322; -const costab29 = 0.146730474; -const costab30 = 0.098017140; -const costab31 = 0.049067674; - -/* - * NAME: dct32() - * DESCRIPTION: perform fast in[32].out[32] DCT - */ -MP3Synth.dct32 = function (_in, slot, lo, hi) { - var t0, t1, t2, t3, t4, t5, t6, t7; - var t8, t9, t10, t11, t12, t13, t14, t15; - var t16, t17, t18, t19, t20, t21, t22, t23; - var t24, t25, t26, t27, t28, t29, t30, t31; - var t32, t33, t34, t35, t36, t37, t38, t39; - var t40, t41, t42, t43, t44, t45, t46, t47; - var t48, t49, t50, t51, t52, t53, t54, t55; - var t56, t57, t58, t59, t60, t61, t62, t63; - var t64, t65, t66, t67, t68, t69, t70, t71; - var t72, t73, t74, t75, t76, t77, t78, t79; - var t80, t81, t82, t83, t84, t85, t86, t87; - var t88, t89, t90, t91, t92, t93, t94, t95; - var t96, t97, t98, t99, t100, t101, t102, t103; - var t104, t105, t106, t107, t108, t109, t110, t111; - var t112, t113, t114, t115, t116, t117, t118, t119; - var t120, t121, t122, t123, t124, t125, t126, t127; - var t128, t129, t130, t131, t132, t133, t134, t135; - var t136, t137, t138, t139, t140, t141, t142, t143; - var t144, t145, t146, t147, t148, t149, t150, t151; - var t152, t153, t154, t155, t156, t157, t158, t159; - var t160, t161, t162, t163, t164, t165, t166, t167; - var t168, t169, t170, t171, t172, t173, t174, t175; - var t176; - - t0 = _in[0] + _in[31]; t16 = ((_in[0] - _in[31]) * (costab1)); - t1 = _in[15] + _in[16]; t17 = ((_in[15] - _in[16]) * (costab31)); - - t41 = t16 + t17; - t59 = ((t16 - t17) * (costab2)); - t33 = t0 + t1; - t50 = ((t0 - t1) * ( costab2)); - - t2 = _in[7] + _in[24]; t18 = ((_in[7] - _in[24]) * (costab15)); - t3 = _in[8] + _in[23]; t19 = ((_in[8] - _in[23]) * (costab17)); - - t42 = t18 + t19; - t60 = ((t18 - t19) * (costab30)); - t34 = t2 + t3; - t51 = ((t2 - t3) * ( costab30)); - - t4 = _in[3] + _in[28]; t20 = ((_in[3] - _in[28]) * (costab7)); - t5 = _in[12] + _in[19]; t21 = ((_in[12] - _in[19]) * (costab25)); - - t43 = t20 + t21; - t61 = ((t20 - t21) * (costab14)); - t35 = t4 + t5; - t52 = ((t4 - t5) * ( costab14)); - - t6 = _in[4] + _in[27]; t22 = ((_in[4] - _in[27]) * (costab9)); - t7 = _in[11] + _in[20]; t23 = ((_in[11] - _in[20]) * (costab23)); - - t44 = t22 + t23; - t62 = ((t22 - t23) * (costab18)); - t36 = t6 + t7; - t53 = ((t6 - t7) * ( costab18)); - - t8 = _in[1] + _in[30]; t24 = ((_in[1] - _in[30]) * (costab3)); - t9 = _in[14] + _in[17]; t25 = ((_in[14] - _in[17]) * (costab29)); - - t45 = t24 + t25; - t63 = ((t24 - t25) * (costab6)); - t37 = t8 + t9; - t54 = ((t8 - t9) * ( costab6)); - - t10 = _in[6] + _in[25]; t26 = ((_in[6] - _in[25]) * (costab13)); - t11 = _in[9] + _in[22]; t27 = ((_in[9] - _in[22]) * (costab19)); - - t46 = t26 + t27; - t64 = ((t26 - t27) * (costab26)); - t38 = t10 + t11; - t55 = ((t10 - t11) * (costab26)); - - t12 = _in[2] + _in[29]; t28 = ((_in[2] - _in[29]) * (costab5)); - t13 = _in[13] + _in[18]; t29 = ((_in[13] - _in[18]) * (costab27)); - - t47 = t28 + t29; - t65 = ((t28 - t29) * (costab10)); - t39 = t12 + t13; - t56 = ((t12 - t13) * (costab10)); - - t14 = _in[5] + _in[26]; t30 = ((_in[5] - _in[26]) * (costab11)); - t15 = _in[10] + _in[21]; t31 = ((_in[10] - _in[21]) * (costab21)); - - t48 = t30 + t31; - t66 = ((t30 - t31) * (costab22)); - t40 = t14 + t15; - t57 = ((t14 - t15) * (costab22)); - - t69 = t33 + t34; t89 = ((t33 - t34) * (costab4)); - t70 = t35 + t36; t90 = ((t35 - t36) * (costab28)); - t71 = t37 + t38; t91 = ((t37 - t38) * (costab12)); - t72 = t39 + t40; t92 = ((t39 - t40) * (costab20)); - t73 = t41 + t42; t94 = ((t41 - t42) * (costab4)); - t74 = t43 + t44; t95 = ((t43 - t44) * (costab28)); - t75 = t45 + t46; t96 = ((t45 - t46) * (costab12)); - t76 = t47 + t48; t97 = ((t47 - t48) * (costab20)); - - t78 = t50 + t51; t100 = ((t50 - t51) * (costab4)); - t79 = t52 + t53; t101 = ((t52 - t53) * (costab28)); - t80 = t54 + t55; t102 = ((t54 - t55) * (costab12)); - t81 = t56 + t57; t103 = ((t56 - t57) * (costab20)); - - t83 = t59 + t60; t106 = ((t59 - t60) * (costab4)); - t84 = t61 + t62; t107 = ((t61 - t62) * (costab28)); - t85 = t63 + t64; t108 = ((t63 - t64) * (costab12)); - t86 = t65 + t66; t109 = ((t65 - t66) * (costab20)); - - t113 = t69 + t70; - t114 = t71 + t72; - - /* 0 */ hi[15][slot] = t113 + t114; - /* 16 */ lo[ 0][slot] = ((t113 - t114) * (costab16)); - - t115 = t73 + t74; - t116 = t75 + t76; - - t32 = t115 + t116; - - /* 1 */ hi[14][slot] = t32; - - t118 = t78 + t79; - t119 = t80 + t81; - - t58 = t118 + t119; - - /* 2 */ hi[13][slot] = t58; - - t121 = t83 + t84; - t122 = t85 + t86; - - t67 = t121 + t122; - - t49 = (t67 * 2) - t32; - - /* 3 */ hi[12][slot] = t49; - - t125 = t89 + t90; - t126 = t91 + t92; - - t93 = t125 + t126; - - /* 4 */ hi[11][slot] = t93; - - t128 = t94 + t95; - t129 = t96 + t97; - - t98 = t128 + t129; - - t68 = (t98 * 2) - t49; - - /* 5 */ hi[10][slot] = t68; - - t132 = t100 + t101; - t133 = t102 + t103; - - t104 = t132 + t133; - - t82 = (t104 * 2) - t58; - - /* 6 */ hi[ 9][slot] = t82; - - t136 = t106 + t107; - t137 = t108 + t109; - - t110 = t136 + t137; - - t87 = (t110 * 2) - t67; - - t77 = (t87 * 2) - t68; - - /* 7 */ hi[ 8][slot] = t77; - - t141 = ((t69 - t70) * (costab8)); - t142 = ((t71 - t72) * (costab24)); - t143 = t141 + t142; - - /* 8 */ hi[ 7][slot] = t143; - /* 24 */ lo[ 8][slot] = - (((t141 - t142) * (costab16) * 2)) - t143; - - t144 = ((t73 - t74) * (costab8)); - t145 = ((t75 - t76) * (costab24)); - t146 = t144 + t145; - - t88 = (t146 * 2) - t77; - - /* 9 */ hi[ 6][slot] = t88; - - t148 = ((t78 - t79) * (costab8)); - t149 = ((t80 - t81) * (costab24)); - t150 = t148 + t149; - - t105 = (t150 * 2) - t82; - - /* 10 */ hi[ 5][slot] = t105; - - t152 = ((t83 - t84) * (costab8)); - t153 = ((t85 - t86) * (costab24)); - t154 = t152 + t153; - - t111 = (t154 * 2) - t87; - - t99 = (t111 * 2) - t88; - - /* 11 */ hi[ 4][slot] = t99; - - t157 = ((t89 - t90) * (costab8)); - t158 = ((t91 - t92) * (costab24)); - t159 = t157 + t158; - - t127 = (t159 * 2) - t93; - - /* 12 */ hi[ 3][slot] = t127; - - t160 = (((t125 - t126) * (costab16) * 2)) - t127; - - /* 20 */ lo[ 4][slot] = t160; - /* 28 */ lo[12][slot] = - (((((t157 - t158) * (costab16) * 2) - t159) * 2)) - t160; - - t161 = ((t94 - t95) * (costab8)); - t162 = ((t96 - t97) * (costab24)); - t163 = t161 + t162; - - t130 = (t163 * 2) - t98; - - t112 = (t130 * 2) - t99; - - /* 13 */ hi[ 2][slot] = t112; - - t164 = (((t128 - t129) * (costab16) * 2)) - t130; - - t166 = ((t100 - t101) * (costab8)); - t167 = ((t102 - t103) * (costab24)); - t168 = t166 + t167; - - t134 = (t168 * 2) - t104; - - t120 = (t134 * 2) - t105; - - /* 14 */ hi[ 1][slot] = t120; - - t135 = (((t118 - t119) * (costab16) * 2)) - t120; - - /* 18 */ lo[ 2][slot] = t135; - - t169 = (((t132 - t133) * (costab16) * 2)) - t134; - - t151 = (t169 * 2) - t135; - - /* 22 */ lo[ 6][slot] = t151; - - t170 = (((((t148 - t149) * (costab16) * 2) - t150) * 2)) - t151; - - /* 26 */ lo[10][slot] = t170; - /* 30 */ lo[14][slot] = - (((((((t166 - t167) * (costab16)) * 2 - - t168) * 2) - t169) * 2) - t170); - - t171 = ((t106 - t107) * (costab8)); - t172 = ((t108 - t109) * (costab24)); - t173 = t171 + t172; - - t138 = (t173 * 2) - t110; - t123 = (t138 * 2) - t111; - t139 = (((t121 - t122) * (costab16) * 2)) - t123; - t117 = (t123 * 2) - t112; - - /* 15 */ hi[ 0][slot] = t117; - - t124 = (((t115 - t116) * (costab16) * 2)) - t117; - - /* 17 */ lo[ 1][slot] = t124; - - t131 = (t139 * 2) - t124; - - /* 19 */ lo[ 3][slot] = t131; - - t140 = (t164 * 2) - t131; - - /* 21 */ lo[ 5][slot] = t140; - - t174 = (((t136 - t137) * (costab16) * 2)) - t138; - t155 = (t174 * 2) - t139; - t147 = (t155 * 2) - t140; - - /* 23 */ lo[ 7][slot] = t147; - - t156 = (((((t144 - t145) * (costab16) * 2) - t146) * 2)) - t147; - - /* 25 */ lo[ 9][slot] = t156; - - t175 = (((((t152 - t153) * (costab16) * 2) - t154) * 2)) - t155; - t165 = (t175 * 2) - t156; - - /* 27 */ lo[11][slot] = t165; - - t176 = (((((((t161 - t162) * (costab16) * 2)) - - t163) * 2) - t164) * 2) - t165; - - /* 29 */ lo[13][slot] = t176; - /* 31 */ lo[15][slot] = - (((((((((t171 - t172) * (costab16)) * 2 - - t173) * 2) - t174) * 2) - t175) * 2) - t176); - - /* - * Totals: - * 80 multiplies - * 80 additions - * 119 subtractions - * 49 shifts (not counting SSO) - */ -}; - -/* - * These are the coefficients for the subband synthesis window. This is a - * reordered version of Table B.3 from ISO/IEC 11172-3. - */ -const D = [ - [ 0.000000000, /* 0 */ - -0.000442505, - 0.003250122, - -0.007003784, - 0.031082153, - -0.078628540, - 0.100311279, - -0.572036743, - 1.144989014, - 0.572036743, - 0.100311279, - 0.078628540, - 0.031082153, - 0.007003784, - 0.003250122, - 0.000442505, - - 0.000000000, - -0.000442505, - 0.003250122, - -0.007003784, - 0.031082153, - -0.078628540, - 0.100311279, - -0.572036743, - 1.144989014, - 0.572036743, - 0.100311279, - 0.078628540, - 0.031082153, - 0.007003784, - 0.003250122, - 0.000442505 ], - - [ -0.000015259, /* 1 */ - -0.000473022, - 0.003326416, - -0.007919312, - 0.030517578, - -0.084182739, - 0.090927124, - -0.600219727, - 1.144287109, - 0.543823242, - 0.108856201, - 0.073059082, - 0.031478882, - 0.006118774, - 0.003173828, - 0.000396729, - - -0.000015259, - -0.000473022, - 0.003326416, - -0.007919312, - 0.030517578, - -0.084182739, - 0.090927124, - -0.600219727, - 1.144287109, - 0.543823242, - 0.108856201, - 0.073059082, - 0.031478882, - 0.006118774, - 0.003173828, - 0.000396729 ], - - [ -0.000015259, /* 2 */ - -0.000534058, - 0.003387451, - -0.008865356, - 0.029785156, - -0.089706421, - 0.080688477, - -0.628295898, - 1.142211914, - 0.515609741, - 0.116577148, - 0.067520142, - 0.031738281, - 0.005294800, - 0.003082275, - 0.000366211, - - -0.000015259, - -0.000534058, - 0.003387451, - -0.008865356, - 0.029785156, - -0.089706421, - 0.080688477, - -0.628295898, - 1.142211914, - 0.515609741, - 0.116577148, - 0.067520142, - 0.031738281, - 0.005294800, - 0.003082275, - 0.000366211 ], - - [ -0.000015259, /* 3 */ - -0.000579834, - 0.003433228, - -0.009841919, - 0.028884888, - -0.095169067, - 0.069595337, - -0.656219482, - 1.138763428, - 0.487472534, - 0.123474121, - 0.061996460, - 0.031845093, - 0.004486084, - 0.002990723, - 0.000320435, - - -0.000015259, - -0.000579834, - 0.003433228, - -0.009841919, - 0.028884888, - -0.095169067, - 0.069595337, - -0.656219482, - 1.138763428, - 0.487472534, - 0.123474121, - 0.061996460, - 0.031845093, - 0.004486084, - 0.002990723, - 0.000320435 ], - - [ -0.000015259, /* 4 */ - -0.000625610, - 0.003463745, - -0.010848999, - 0.027801514, - -0.100540161, - 0.057617187, - -0.683914185, - 1.133926392, - 0.459472656, - 0.129577637, - 0.056533813, - 0.031814575, - 0.003723145, - 0.002899170, - 0.000289917, - - -0.000015259, - -0.000625610, - 0.003463745, - -0.010848999, - 0.027801514, - -0.100540161, - 0.057617187, - -0.683914185, - 1.133926392, - 0.459472656, - 0.129577637, - 0.056533813, - 0.031814575, - 0.003723145, - 0.002899170, - 0.000289917 ], - - [ -0.000015259, /* 5 */ - -0.000686646, - 0.003479004, - -0.011886597, - 0.026535034, - -0.105819702, - 0.044784546, - -0.711318970, - 1.127746582, - 0.431655884, - 0.134887695, - 0.051132202, - 0.031661987, - 0.003005981, - 0.002792358, - 0.000259399, - - -0.000015259, - -0.000686646, - 0.003479004, - -0.011886597, - 0.026535034, - -0.105819702, - 0.044784546, - -0.711318970, - 1.127746582, - 0.431655884, - 0.134887695, - 0.051132202, - 0.031661987, - 0.003005981, - 0.002792358, - 0.000259399 ], - - [ -0.000015259, /* 6 */ - -0.000747681, - 0.003479004, - -0.012939453, - 0.025085449, - -0.110946655, - 0.031082153, - -0.738372803, - 1.120223999, - 0.404083252, - 0.139450073, - 0.045837402, - 0.031387329, - 0.002334595, - 0.002685547, - 0.000244141, - - -0.000015259, - -0.000747681, - 0.003479004, - -0.012939453, - 0.025085449, - -0.110946655, - 0.031082153, - -0.738372803, - 1.120223999, - 0.404083252, - 0.139450073, - 0.045837402, - 0.031387329, - 0.002334595, - 0.002685547, - 0.000244141 ], - - [ -0.000030518, /* 7 */ - -0.000808716, - 0.003463745, - -0.014022827, - 0.023422241, - -0.115921021, - 0.016510010, - -0.765029907, - 1.111373901, - 0.376800537, - 0.143264771, - 0.040634155, - 0.031005859, - 0.001693726, - 0.002578735, - 0.000213623, - - -0.000030518, - -0.000808716, - 0.003463745, - -0.014022827, - 0.023422241, - -0.115921021, - 0.016510010, - -0.765029907, - 1.111373901, - 0.376800537, - 0.143264771, - 0.040634155, - 0.031005859, - 0.001693726, - 0.002578735, - 0.000213623 ], - - [ -0.000030518, /* 8 */ - -0.000885010, - 0.003417969, - -0.015121460, - 0.021575928, - -0.120697021, - 0.001068115, - -0.791213989, - 1.101211548, - 0.349868774, - 0.146362305, - 0.035552979, - 0.030532837, - 0.001098633, - 0.002456665, - 0.000198364, - - -0.000030518, - -0.000885010, - 0.003417969, - -0.015121460, - 0.021575928, - -0.120697021, - 0.001068115, - -0.791213989, - 1.101211548, - 0.349868774, - 0.146362305, - 0.035552979, - 0.030532837, - 0.001098633, - 0.002456665, - 0.000198364 ], - - [ -0.000030518, /* 9 */ - -0.000961304, - 0.003372192, - -0.016235352, - 0.019531250, - -0.125259399, - -0.015228271, - -0.816864014, - 1.089782715, - 0.323318481, - 0.148773193, - 0.030609131, - 0.029937744, - 0.000549316, - 0.002349854, - 0.000167847, - - -0.000030518, - -0.000961304, - 0.003372192, - -0.016235352, - 0.019531250, - -0.125259399, - -0.015228271, - -0.816864014, - 1.089782715, - 0.323318481, - 0.148773193, - 0.030609131, - 0.029937744, - 0.000549316, - 0.002349854, - 0.000167847 ], - - [ -0.000030518, /* 10 */ - -0.001037598, - 0.003280640, - -0.017349243, - 0.017257690, - -0.129562378, - -0.032379150, - -0.841949463, - 1.077117920, - 0.297210693, - 0.150497437, - 0.025817871, - 0.029281616, - 0.000030518, - 0.002243042, - 0.000152588, - - -0.000030518, - -0.001037598, - 0.003280640, - -0.017349243, - 0.017257690, - -0.129562378, - -0.032379150, - -0.841949463, - 1.077117920, - 0.297210693, - 0.150497437, - 0.025817871, - 0.029281616, - 0.000030518, - 0.002243042, - 0.000152588 ], - - [ -0.000045776, /* 11 */ - -0.001113892, - 0.003173828, - -0.018463135, - 0.014801025, - -0.133590698, - -0.050354004, - -0.866363525, - 1.063217163, - 0.271591187, - 0.151596069, - 0.021179199, - 0.028533936, - -0.000442505, - 0.002120972, - 0.000137329, - - -0.000045776, - -0.001113892, - 0.003173828, - -0.018463135, - 0.014801025, - -0.133590698, - -0.050354004, - -0.866363525, - 1.063217163, - 0.271591187, - 0.151596069, - 0.021179199, - 0.028533936, - -0.000442505, - 0.002120972, - 0.000137329 ], - - [ -0.000045776, /* 12 */ - -0.001205444, - 0.003051758, - -0.019577026, - 0.012115479, - -0.137298584, - -0.069168091, - -0.890090942, - 1.048156738, - 0.246505737, - 0.152069092, - 0.016708374, - 0.027725220, - -0.000869751, - 0.002014160, - 0.000122070, - - -0.000045776, - -0.001205444, - 0.003051758, - -0.019577026, - 0.012115479, - -0.137298584, - -0.069168091, - -0.890090942, - 1.048156738, - 0.246505737, - 0.152069092, - 0.016708374, - 0.027725220, - -0.000869751, - 0.002014160, - 0.000122070 ], - - [ -0.000061035, /* 13 */ - -0.001296997, - 0.002883911, - -0.020690918, - 0.009231567, - -0.140670776, - -0.088775635, - -0.913055420, - 1.031936646, - 0.221984863, - 0.151962280, - 0.012420654, - 0.026840210, - -0.001266479, - 0.001907349, - 0.000106812, - - -0.000061035, - -0.001296997, - 0.002883911, - -0.020690918, - 0.009231567, - -0.140670776, - -0.088775635, - -0.913055420, - 1.031936646, - 0.221984863, - 0.151962280, - 0.012420654, - 0.026840210, - -0.001266479, - 0.001907349, - 0.000106812 ], - - [ -0.000061035, /* 14 */ - -0.001388550, - 0.002700806, - -0.021789551, - 0.006134033, - -0.143676758, - -0.109161377, - -0.935195923, - 1.014617920, - 0.198059082, - 0.151306152, - 0.008316040, - 0.025909424, - -0.001617432, - 0.001785278, - 0.000106812, - - -0.000061035, - -0.001388550, - 0.002700806, - -0.021789551, - 0.006134033, - -0.143676758, - -0.109161377, - -0.935195923, - 1.014617920, - 0.198059082, - 0.151306152, - 0.008316040, - 0.025909424, - -0.001617432, - 0.001785278, - 0.000106812 ], - - [ -0.000076294, /* 15 */ - -0.001480103, - 0.002487183, - -0.022857666, - 0.002822876, - -0.146255493, - -0.130310059, - -0.956481934, - 0.996246338, - 0.174789429, - 0.150115967, - 0.004394531, - 0.024932861, - -0.001937866, - 0.001693726, - 0.000091553, - - -0.000076294, - -0.001480103, - 0.002487183, - -0.022857666, - 0.002822876, - -0.146255493, - -0.130310059, - -0.956481934, - 0.996246338, - 0.174789429, - 0.150115967, - 0.004394531, - 0.024932861, - -0.001937866, - 0.001693726, - 0.000091553 ], - - [ -0.000076294, /* 16 */ - -0.001586914, - 0.002227783, - -0.023910522, - -0.000686646, - -0.148422241, - -0.152206421, - -0.976852417, - 0.976852417, - 0.152206421, - 0.148422241, - 0.000686646, - 0.023910522, - -0.002227783, - 0.001586914, - 0.000076294, - - -0.000076294, - -0.001586914, - 0.002227783, - -0.023910522, - -0.000686646, - -0.148422241, - -0.152206421, - -0.976852417, - 0.976852417, - 0.152206421, - 0.148422241, - 0.000686646, - 0.023910522, - -0.002227783, - 0.001586914, - 0.000076294 ] -]; - -/* - * perform full frequency PCM synthesis - */ -MP3Synth.prototype.full = function(frame, nch, ns) { - var Dptr, hi, lo, ptr; - - for (var ch = 0; ch < nch; ++ch) { - var sbsample = frame.sbsample[ch]; - var filter = this.filter[ch]; - var phase = this.phase; - var pcm = this.pcm.samples[ch]; - var pcm1Ptr = 0; - var pcm2Ptr = 0; - - for (var s = 0; s < ns; ++s) { - MP3Synth.dct32(sbsample[s], phase >> 1, filter[0][phase & 1], filter[1][phase & 1]); - - var pe = phase & ~1; - var po = ((phase - 1) & 0xf) | 1; - - /* calculate 32 samples */ - var fe = filter[0][ phase & 1]; - var fx = filter[0][~phase & 1]; - var fo = filter[1][~phase & 1]; - - var fePtr = 0; - var fxPtr = 0; - var foPtr = 0; - - Dptr = 0; - - ptr = D[Dptr]; - _fx = fx[fxPtr]; - _fe = fe[fePtr]; - - lo = _fx[0] * ptr[po + 0]; - lo += _fx[1] * ptr[po + 14]; - lo += _fx[2] * ptr[po + 12]; - lo += _fx[3] * ptr[po + 10]; - lo += _fx[4] * ptr[po + 8]; - lo += _fx[5] * ptr[po + 6]; - lo += _fx[6] * ptr[po + 4]; - lo += _fx[7] * ptr[po + 2]; - lo = -lo; - - lo += _fe[0] * ptr[pe + 0]; - lo += _fe[1] * ptr[pe + 14]; - lo += _fe[2] * ptr[pe + 12]; - lo += _fe[3] * ptr[pe + 10]; - lo += _fe[4] * ptr[pe + 8]; - lo += _fe[5] * ptr[pe + 6]; - lo += _fe[6] * ptr[pe + 4]; - lo += _fe[7] * ptr[pe + 2]; - - pcm[pcm1Ptr++] = lo; - pcm2Ptr = pcm1Ptr + 30; - - for (var sb = 1; sb < 16; ++sb) { - ++fePtr; - ++Dptr; - - /* D[32 - sb][i] === -D[sb][31 - i] */ - - ptr = D[Dptr]; - _fo = fo[foPtr]; - _fe = fe[fePtr]; - - lo = _fo[0] * ptr[po + 0]; - lo += _fo[1] * ptr[po + 14]; - lo += _fo[2] * ptr[po + 12]; - lo += _fo[3] * ptr[po + 10]; - lo += _fo[4] * ptr[po + 8]; - lo += _fo[5] * ptr[po + 6]; - lo += _fo[6] * ptr[po + 4]; - lo += _fo[7] * ptr[po + 2]; - lo = -lo; - - lo += _fe[7] * ptr[pe + 2]; - lo += _fe[6] * ptr[pe + 4]; - lo += _fe[5] * ptr[pe + 6]; - lo += _fe[4] * ptr[pe + 8]; - lo += _fe[3] * ptr[pe + 10]; - lo += _fe[2] * ptr[pe + 12]; - lo += _fe[1] * ptr[pe + 14]; - lo += _fe[0] * ptr[pe + 0]; - - pcm[pcm1Ptr++] = lo; - - lo = _fe[0] * ptr[-pe + 31 - 16]; - lo += _fe[1] * ptr[-pe + 31 - 14]; - lo += _fe[2] * ptr[-pe + 31 - 12]; - lo += _fe[3] * ptr[-pe + 31 - 10]; - lo += _fe[4] * ptr[-pe + 31 - 8]; - lo += _fe[5] * ptr[-pe + 31 - 6]; - lo += _fe[6] * ptr[-pe + 31 - 4]; - lo += _fe[7] * ptr[-pe + 31 - 2]; - - lo += _fo[7] * ptr[-po + 31 - 2]; - lo += _fo[6] * ptr[-po + 31 - 4]; - lo += _fo[5] * ptr[-po + 31 - 6]; - lo += _fo[4] * ptr[-po + 31 - 8]; - lo += _fo[3] * ptr[-po + 31 - 10]; - lo += _fo[2] * ptr[-po + 31 - 12]; - lo += _fo[1] * ptr[-po + 31 - 14]; - lo += _fo[0] * ptr[-po + 31 - 16]; - - pcm[pcm2Ptr--] = lo; - ++foPtr; - } - - ++Dptr; - - ptr = D[Dptr]; - _fo = fo[foPtr]; - - lo = _fo[0] * ptr[po + 0]; - lo += _fo[1] * ptr[po + 14]; - lo += _fo[2] * ptr[po + 12]; - lo += _fo[3] * ptr[po + 10]; - lo += _fo[4] * ptr[po + 8]; - lo += _fo[5] * ptr[po + 6]; - lo += _fo[6] * ptr[po + 4]; - lo += _fo[7] * ptr[po + 2]; - - pcm[pcm1Ptr] = -lo; - pcm1Ptr += 16; - phase = (phase + 1) % 16; - } - } -}; - -// TODO: synth.half() - -/* - * NAME: synth.frame() - * DESCRIPTION: perform PCM synthesis of frame subband samples - */ -MP3Synth.prototype.frame = function (frame) { - var nch = frame.header.nchannels(); - var ns = frame.header.nbsamples(); - - this.pcm.samplerate = frame.header.samplerate; - this.pcm.channels = nch; - this.pcm.length = 32 * ns; - - /* - if (frame.options & Mad.Option.HALFSAMPLERATE) { - this.pcm.samplerate /= 2; - this.pcm.length /= 2; - - throw new Error("HALFSAMPLERATE is not supported. What do you think? As if I have the time for this"); - } - */ - - this.full(frame, nch, ns); - this.phase = (this.phase + ns) % 16; -}; - -module.exports = MP3Synth; - -},{"./utils":15}],14:[function(require,module,exports){ -/* - * These are the scalefactor values for Layer I and Layer II. - * The values are from Table B.1 of ISO/IEC 11172-3. - * - * Strictly speaking, Table B.1 has only 63 entries (0-62), thus a strict - * interpretation of ISO/IEC 11172-3 would suggest that a scalefactor index of - * 63 is invalid. However, for better compatibility with current practices, we - * add a 64th entry. - */ -exports.SF_TABLE = new Float32Array([ - 2.000000000000, 1.587401051968, 1.259921049895, 1.000000000000, - 0.793700525984, 0.629960524947, 0.500000000000, 0.396850262992, - 0.314980262474, 0.250000000000, 0.198425131496, 0.157490131237, - 0.125000000000, 0.099212565748, 0.078745065618, 0.062500000000, - 0.049606282874, 0.039372532809, 0.031250000000, 0.024803141437, - 0.019686266405, 0.015625000000, 0.012401570719, 0.009843133202, - 0.007812500000, 0.006200785359, 0.004921566601, 0.003906250000, - 0.003100392680, 0.002460783301, 0.001953125000, 0.001550196340, - 0.001230391650, 0.000976562500, 0.000775098170, 0.000615195825, - 0.000488281250, 0.000387549085, 0.000307597913, 0.000244140625, - 0.000193774542, 0.000153798956, 0.000122070313, 0.000096887271, - 0.000076899478, 0.000061035156, 0.000048443636, 0.000038449739, - 0.000030517578, 0.000024221818, 0.000019224870, 0.000015258789, - 0.000012110909, 0.000009612435, 0.000007629395, 0.000006055454, - 0.000004806217, 0.000003814697, 0.000003027727, 0.000002403109, - 0.000001907349, 0.000001513864, 0.000001201554, 0.000000000000 -]); - -/* - * MPEG-1 scalefactor band widths - * derived from Table B.8 of ISO/IEC 11172-3 - */ -const SFB_48000_LONG = new Uint8Array([ - 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 10, - 12, 16, 18, 22, 28, 34, 40, 46, 54, 54, 192 -]); - -const SFB_44100_LONG = new Uint8Array([ - 4, 4, 4, 4, 4, 4, 6, 6, 8, 8, 10, - 12, 16, 20, 24, 28, 34, 42, 50, 54, 76, 158 -]); - -const SFB_32000_LONG = new Uint8Array([ - 4, 4, 4, 4, 4, 4, 6, 6, 8, 10, 12, - 16, 20, 24, 30, 38, 46, 56, 68, 84, 102, 26 -]); - -const SFB_48000_SHORT = new Uint8Array([ - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, - 6, 6, 6, 6, 6, 10, 10, 10, 12, 12, 12, 14, 14, - 14, 16, 16, 16, 20, 20, 20, 26, 26, 26, 66, 66, 66 -]); - -const SFB_44100_SHORT = new Uint8Array([ - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, - 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, - 14, 18, 18, 18, 22, 22, 22, 30, 30, 30, 56, 56, 56 -]); - -const SFB_32000_SHORT = new Uint8Array([ - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, - 6, 6, 8, 8, 8, 12, 12, 12, 16, 16, 16, 20, 20, - 20, 26, 26, 26, 34, 34, 34, 42, 42, 42, 12, 12, 12 -]); - -const SFB_48000_MIXED = new Uint8Array([ - /* long */ 4, 4, 4, 4, 4, 4, 6, 6, - /* short */ 4, 4, 4, 6, 6, 6, 6, 6, 6, 10, - 10, 10, 12, 12, 12, 14, 14, 14, 16, 16, - 16, 20, 20, 20, 26, 26, 26, 66, 66, 66 -]); - -const SFB_44100_MIXED = new Uint8Array([ - /* long */ 4, 4, 4, 4, 4, 4, 6, 6, - /* short */ 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, - 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, - 18, 22, 22, 22, 30, 30, 30, 56, 56, 56 -]); - -const SFB_32000_MIXED = new Uint8Array([ - /* long */ 4, 4, 4, 4, 4, 4, 6, 6, - /* short */ 4, 4, 4, 6, 6, 6, 8, 8, 8, 12, - 12, 12, 16, 16, 16, 20, 20, 20, 26, 26, - 26, 34, 34, 34, 42, 42, 42, 12, 12, 12 -]); - -/* - * MPEG-2 scalefactor band widths - * derived from Table B.2 of ISO/IEC 13818-3 - */ -const SFB_24000_LONG = new Uint8Array([ - 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, - 18, 22, 26, 32, 38, 46, 54, 62, 70, 76, 36 -]); - -const SFB_22050_LONG = new Uint8Array([ - 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, - 20, 24, 28, 32, 38, 46, 52, 60, 68, 58, 54 -]); - -const SFB_16000_LONG = SFB_22050_LONG; - -const SFB_24000_SHORT = new Uint8Array([ - 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, - 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, - 18, 24, 24, 24, 32, 32, 32, 44, 44, 44, 12, 12, 12 -]); - -const SFB_22050_SHORT = new Uint8Array([ - 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, - 6, 6, 8, 8, 8, 10, 10, 10, 14, 14, 14, 18, 18, - 18, 26, 26, 26, 32, 32, 32, 42, 42, 42, 18, 18, 18 -]); - -const SFB_16000_SHORT = new Uint8Array([ - 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, - 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, - 18, 24, 24, 24, 30, 30, 30, 40, 40, 40, 18, 18, 18 -]); - -const SFB_24000_MIXED = new Uint8Array([ - /* long */ 6, 6, 6, 6, 6, 6, - /* short */ 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, - 12, 12, 14, 14, 14, 18, 18, 18, 24, 24, - 24, 32, 32, 32, 44, 44, 44, 12, 12, 12 -]); - -const SFB_22050_MIXED = new Uint8Array([ - /* long */ 6, 6, 6, 6, 6, 6, - /* short */ 6, 6, 6, 6, 6, 6, 8, 8, 8, 10, - 10, 10, 14, 14, 14, 18, 18, 18, 26, 26, - 26, 32, 32, 32, 42, 42, 42, 18, 18, 18 -]); - -const SFB_16000_MIXED = new Uint8Array([ - /* long */ 6, 6, 6, 6, 6, 6, - /* short */ 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, - 12, 12, 14, 14, 14, 18, 18, 18, 24, 24, - 24, 30, 30, 30, 40, 40, 40, 18, 18, 18 -]); - -/* - * MPEG 2.5 scalefactor band widths - * derived from public sources - */ -const SFB_12000_LONG = SFB_16000_LONG; -const SFB_11025_LONG = SFB_12000_LONG; - -const SFB_8000_LONG = new Uint8Array([ - 12, 12, 12, 12, 12, 12, 16, 20, 24, 28, 32, - 40, 48, 56, 64, 76, 90, 2, 2, 2, 2, 2 -]); - -const SFB_12000_SHORT = SFB_16000_SHORT; -const SFB_11025_SHORT = SFB_12000_SHORT; - -const SFB_8000_SHORT = new Uint8Array([ - 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 16, - 16, 16, 20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36, - 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 26, 26, 26 -]); - -const SFB_12000_MIXED = SFB_16000_MIXED; -const SFB_11025_MIXED = SFB_12000_MIXED; - -/* the 8000 Hz short block scalefactor bands do not break after - the first 36 frequency lines, so this is probably wrong */ -const SFB_8000_MIXED = new Uint8Array([ - /* long */ 12, 12, 12, - /* short */ 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16, - 20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36, 36, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 26, 26, 26 -]); - -exports.SFBWIDTH_TABLE = [ - { l: SFB_48000_LONG, s: SFB_48000_SHORT, m: SFB_48000_MIXED }, - { l: SFB_44100_LONG, s: SFB_44100_SHORT, m: SFB_44100_MIXED }, - { l: SFB_32000_LONG, s: SFB_32000_SHORT, m: SFB_32000_MIXED }, - { l: SFB_24000_LONG, s: SFB_24000_SHORT, m: SFB_24000_MIXED }, - { l: SFB_22050_LONG, s: SFB_22050_SHORT, m: SFB_22050_MIXED }, - { l: SFB_16000_LONG, s: SFB_16000_SHORT, m: SFB_16000_MIXED }, - { l: SFB_12000_LONG, s: SFB_12000_SHORT, m: SFB_12000_MIXED }, - { l: SFB_11025_LONG, s: SFB_11025_SHORT, m: SFB_11025_MIXED }, - { l: SFB_8000_LONG, s: SFB_8000_SHORT, m: SFB_8000_MIXED } -]; - -exports.PRETAB = new Uint8Array([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0 -]); - -/* - * fractional powers of two - * used for requantization and joint stereo decoding - * - * ROOT_TABLE[3 + x] = 2^(x/4) - */ -exports.ROOT_TABLE = new Float32Array([ - /* 2^(-3/4) */ 0.59460355750136, - /* 2^(-2/4) */ 0.70710678118655, - /* 2^(-1/4) */ 0.84089641525371, - /* 2^( 0/4) */ 1.00000000000000, - /* 2^(+1/4) */ 1.18920711500272, - /* 2^(+2/4) */ 1.41421356237310, - /* 2^(+3/4) */ 1.68179283050743 -]); - -exports.CS = new Float32Array([ - +0.857492926 , +0.881741997, - +0.949628649 , +0.983314592, - +0.995517816 , +0.999160558, - +0.999899195 , +0.999993155 -]); - -exports.CA = new Float32Array([ - -0.514495755, -0.471731969, - -0.313377454, -0.181913200, - -0.094574193, -0.040965583, - -0.014198569, -0.003699975 -]); - -exports.COUNT1TABLE_SELECT = 0x01; -exports.SCALEFAC_SCALE = 0x02; -exports.PREFLAG = 0x04; -exports.MIXED_BLOCK_FLAG = 0x08; - -exports.I_STEREO = 0x1; -exports.MS_STEREO = 0x2; - -/* - * windowing coefficients for long blocks - * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3 - * - * WINDOW_L[i] = sin((PI / 36) * (i + 1/2)) - */ -exports.WINDOW_L = new Float32Array([ - 0.043619387, 0.130526192, - 0.216439614, 0.300705800, - 0.382683432, 0.461748613, - 0.537299608, 0.608761429, - 0.675590208, 0.737277337, - 0.793353340, 0.843391446, - - 0.887010833, 0.923879533, - 0.953716951, 0.976296007, - 0.991444861, 0.999048222, - 0.999048222, 0.991444861, - 0.976296007, 0.953716951, - 0.923879533, 0.887010833, - - 0.843391446, 0.793353340, - 0.737277337, 0.675590208, - 0.608761429, 0.537299608, - 0.461748613, 0.382683432, - 0.300705800, 0.216439614, - 0.130526192, 0.043619387 -]); - -/* - * windowing coefficients for short blocks - * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3 - * - * WINDOW_S[i] = sin((PI / 12) * (i + 1/2)) - */ -exports.WINDOW_S = new Float32Array([ - 0.130526192, 0.382683432, - 0.608761429, 0.793353340, - 0.923879533, 0.991444861, - 0.991444861, 0.923879533, - 0.793353340, 0.608761429, - 0.382683432, 0.130526192 -]); - -/* - * coefficients for intensity stereo processing - * derived from section 2.4.3.4.9.3 of ISO/IEC 11172-3 - * - * is_ratio[i] = tan(i * (PI / 12)) - * IS_TABLE[i] = is_ratio[i] / (1 + is_ratio[i]) - */ -exports.IS_TABLE = new Float32Array([ - 0.000000000, - 0.211324865, - 0.366025404, - 0.500000000, - 0.633974596, - 0.788675135, - 1.000000000 -]); - -/* - * coefficients for LSF intensity stereo processing - * derived from section 2.4.3.2 of ISO/IEC 13818-3 - * - * IS_LSF_TABLE[0][i] = (1 / sqrt(sqrt(2)))^(i + 1) - * IS_LSF_TABLE[1][i] = (1 / sqrt(2)) ^(i + 1) - */ -exports.IS_LSF_TABLE = [ - new Float32Array([ - 0.840896415, - 0.707106781, - 0.594603558, - 0.500000000, - 0.420448208, - 0.353553391, - 0.297301779, - 0.250000000, - 0.210224104, - 0.176776695, - 0.148650889, - 0.125000000, - 0.105112052, - 0.088388348, - 0.074325445 - ]), - new Float32Array([ - 0.707106781, - 0.500000000, - 0.353553391, - 0.250000000, - 0.176776695, - 0.125000000, - 0.088388348, - 0.062500000, - 0.044194174, - 0.031250000, - 0.022097087, - 0.015625000, - 0.011048543, - 0.007812500, - 0.005524272 - ]) -]; - -/* - * scalefactor bit lengths - * derived from section 2.4.2.7 of ISO/IEC 11172-3 - */ -exports.SFLEN_TABLE = [ - { slen1: 0, slen2: 0 }, { slen1: 0, slen2: 1 }, { slen1: 0, slen2: 2 }, { slen1: 0, slen2: 3 }, - { slen1: 3, slen2: 0 }, { slen1: 1, slen2: 1 }, { slen1: 1, slen2: 2 }, { slen1: 1, slen2: 3 }, - { slen1: 2, slen2: 1 }, { slen1: 2, slen2: 2 }, { slen1: 2, slen2: 3 }, { slen1: 3, slen2: 1 }, - { slen1: 3, slen2: 2 }, { slen1: 3, slen2: 3 }, { slen1: 4, slen2: 2 }, { slen1: 4, slen2: 3 } -]; - -/* - * number of LSF scalefactor band values - * derived from section 2.4.3.2 of ISO/IEC 13818-3 - */ -exports.NSFB_TABLE = [ - [ [ 6, 5, 5, 5 ], - [ 9, 9, 9, 9 ], - [ 6, 9, 9, 9 ] ], - - [ [ 6, 5, 7, 3 ], - [ 9, 9, 12, 6 ], - [ 6, 9, 12, 6 ] ], - - [ [ 11, 10, 0, 0 ], - [ 18, 18, 0, 0 ], - [ 15, 18, 0, 0 ] ], - - [ [ 7, 7, 7, 0 ], - [ 12, 12, 12, 0 ], - [ 6, 15, 12, 0 ] ], - - [ [ 6, 6, 6, 3 ], - [ 12, 9, 9, 6 ], - [ 6, 12, 9, 6 ] ], - - [ [ 8, 8, 5, 0 ], - [ 15, 12, 9, 0 ], - [ 6, 18, 9, 0 ] ] -]; - -},{}],15:[function(require,module,exports){ -/** - * Makes a multidimensional array - */ -exports.makeArray = function(lengths, Type) { - if (!Type) Type = Float64Array; - - if (lengths.length === 1) { - return new Type(lengths[0]); - } - - var ret = [], - len = lengths[0]; - - for (var j = 0; j < len; j++) { - ret[j] = exports.makeArray(lengths.slice(1), Type); - } - - return ret; -}; - -},{}]},{},[1]) - - -//# sourceMappingURL=mp3.js.map \ No newline at end of file diff --git a/src/core/static/js/libs/jplayer/aurora/ogg.js b/src/core/static/js/libs/jplayer/aurora/ogg.js deleted file mode 100644 index 060b927..0000000 --- a/src/core/static/js/libs/jplayer/aurora/ogg.js +++ /dev/null @@ -1,100 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o?/.test(type))return true;return type[0]=="%"},INT_TYPES:{"i1":0,"i8":0,"i16":0,"i32":0,"i64":0},FLOAT_TYPES:{"float":0,"double":0},or64:(function(x,y){var l=x|0|(y|0);var h=(Math.round(x/4294967296)|Math.round(y/4294967296))*4294967296;return l+h}),and64:(function(x,y){var l=(x|0)&(y|0);var h=(Math.round(x/4294967296)&Math.round(y/4294967296))*4294967296;return l+h}),xor64:(function(x,y){var l=(x|0)^(y|0);var h=(Math.round(x/4294967296)^Math.round(y/4294967296))*4294967296;return l+h}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),dedup:function dedup(items,ident){var seen={};if(ident){return items.filter((function(item){if(seen[item[ident]])return false;seen[item[ident]]=true;return true}))}else{return items.filter((function(item){if(seen[item])return false;seen[item]=true;return true}))}},set:function set(){var args=typeof arguments[0]==="object"?arguments[0]:arguments;var ret={};for(var i=0;i=0){diffs.push(curr-prev)}prev=curr;return curr}));if(type.name_&&type.name_[0]==="["){type.flatSize=parseInt(type.name_.substr(1))*type.flatSize/2}type.flatSize=Runtime.alignMemory(type.flatSize,type.alignSize);if(diffs.length==0){type.flatFactor=type.flatSize}else if(Runtime.dedup(diffs).length==1){type.flatFactor=diffs[0]}type.needsFlattening=type.flatFactor!=1;return type.flatIndexes},generateStructInfo:(function(struct,typeName,offset){var type,alignment;if(typeName){offset=offset||0;type=(typeof Types==="undefined"?Runtime.typeInfo:Types.types)[typeName];if(!type)return null;if(type.fields.length!=struct.length){printErr("Number of named fields must match the type for "+typeName+": possibly duplicate struct names. Cannot return structInfo");return null}alignment=type.flatIndexes}else{var type={fields:struct.map((function(item){return item[0]}))};alignment=Runtime.calculateStructAlignment(type)}var ret={__size__:type.flatSize};if(typeName){struct.forEach((function(item,i){if(typeof item==="string"){ret[item]=alignment[i]+offset}else{var key;for(var k in item)key=k;ret[key]=Runtime.generateStructInfo(item[key],type.fields[i],alignment[i])}}))}else{struct.forEach((function(item,i){ret[item[1]]=alignment[i]}))}return ret}),dynCall:(function(sig,ptr,args){if(args&&args.length){if(!args.splice)args=Array.prototype.slice.call(args);args.splice(0,0,ptr);return Module["dynCall_"+sig].apply(null,args)}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],addFunction:(function(func){for(var i=0;i0)return""}var c1=buffer[0];var c2=buffer[1];var c3=buffer[2];var c4=buffer[3];var ret;if(buffer.length==2){ret=String.fromCharCode((c1&31)<<6|c2&63)}else if(buffer.length==3){ret=String.fromCharCode((c1&15)<<12|(c2&63)<<6|c3&63)}else{var codePoint=(c1&7)<<18|(c2&63)<<12|(c3&63)<<6|c4&63;ret=String.fromCharCode(Math.floor((codePoint-65536)/1024)+55296,(codePoint-65536)%1024+56320)}buffer.length=0;return ret});this.processJSString=function processJSString(string){string=unescape(encodeURIComponent(string));var ret=[];for(var i=0;i=TOTAL_MEMORY)enlargeMemory();return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:8))*(quantum?quantum:8);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;function jsCall(){var args=Array.prototype.slice.call(arguments);return Runtime.functionPointers[args[0]].apply(null,args.slice(1))}var __THREW__=0;var ABORT=false;var EXITSTATUS=0;var undef=0;var tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempDouble,tempFloat;var tempI64,tempI64b;var tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var globalScope=this;function getCFunc(ident){var func=Module["_"+ident];if(!func){try{func=eval("_"+ident)}catch(e){}}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func}var cwrap,ccall;((function(){var stack=0;var JSfuncs={"stackSave":(function(){stack=Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore(stack)}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=Runtime.stackAlloc(str.length+1);writeStringToMemory(str,ret)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};ccall=function ccallFunc(ident,returnType,argTypes,args){var func=getCFunc(ident);var cArgs=[];if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}return null}Module["getValue"]=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];if(t>=128)hasUtf=true;else if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(!hasUtf){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}var utf8=new Runtime.UTF8Processor;for(i=0;i>0];ret+=utf8.processCChar(t)}return ret}Module["Pointer_stringify"]=Pointer_stringify;function UTF16ToString(ptr){var i=0;var str="";while(1){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)return str;++i;str+=String.fromCharCode(codeUnit)}}Module["UTF16ToString"]=UTF16ToString;function stringToUTF16(str,outPtr){for(var i=0;i>1]=codeUnit}HEAP16[outPtr+str.length*2>>1]=0}Module["stringToUTF16"]=stringToUTF16;function UTF32ToString(ptr){var i=0;var str="";while(1){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)return str;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}}Module["UTF32ToString"]=UTF32ToString;function stringToUTF32(str,outPtr){var iChar=0;for(var iCodeUnit=0;iCodeUnit=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++iCodeUnit);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr+iChar*4>>2]=codeUnit;++iChar}HEAP32[outPtr+iChar*4>>2]=0}Module["stringToUTF32"]=stringToUTF32;function demangle(func){var i=3;var basicTypes={"v":"void","b":"bool","c":"char","s":"short","i":"int","l":"long","f":"float","d":"double","w":"wchar_t","a":"signed char","h":"unsigned char","t":"unsigned short","j":"unsigned int","m":"unsigned long","x":"long long","y":"unsigned long long","z":"..."};var subs=[];var first=true;function dump(x){if(x)Module.print(x);Module.print(func);var pre="";for(var a=0;a"}else{ret=name}paramLoop:while(i0){var c=func[i++];if(c in basicTypes){list.push(basicTypes[c])}else{switch(c){case"P":list.push(parse(true,1,true)[0]+"*");break;case"R":list.push(parse(true,1,true)[0]+"&");break;case"L":{i++;var end=func.indexOf("E",i);var size=end-i;list.push(func.substr(i,size));i+=size+2;break};case"A":{var size=parseInt(func.substr(i));i+=size.toString().length;if(func[i]!=="_")throw"?";i++;list.push(parse(true,1,true)[0]+" ["+size+"]");break};case"E":break paramLoop;default:ret+="?"+c;break paramLoop}}}if(!allowVoid&&list.length===1&&list[0]==="void")list=[];if(rawList){if(ret){list.push(ret+"?")}return list}else{return ret+flushList()}}try{if(func=="Object._main"||func=="_main"){return"main()"}if(typeof func==="number")func=Pointer_stringify(func);if(func[0]!=="_")return func;if(func[1]!=="_")return func;if(func[2]!=="Z")return func;switch(func[3]){case"n":return"operator new()";case"d":return"operator delete()"}return parse()}catch(e){return func}}function demangleAll(text){return text.replace(/__Z[\w\d_]+/g,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function stackTrace(){var stack=(new Error).stack;return stack?demangleAll(stack):"(no stack trace available)"}var PAGE_SIZE=4096;function alignMemoryPage(x){return x+4095&-4096}var HEAP;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var STATIC_BASE=0,STATICTOP=0,staticSealed=false;var STACK_BASE=0,STACKTOP=0,STACK_MAX=0;var DYNAMIC_BASE=0,DYNAMICTOP=0;function enlargeMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.")}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;var FAST_MEMORY=Module["FAST_MEMORY"]||2097152;var totalMemory=4096;while(totalMemory0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Runtime.dynCall("v",func)}else{Runtime.dynCall("vi",func,[callback.arg])}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeInitialized=false}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}Module["addOnPreRun"]=Module.addOnPreRun=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=Module.addOnInit=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=Module.addOnPreMain=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=Module.addOnExit=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=Module.addOnPostRun=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var ret=(new Runtime.UTF8Processor).processJSString(stringy);if(length){ret.length=length}if(!dontAddNull){ret.push(0)}return ret}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){var array=intArrayFromString(string,dontAddNull);var i=0;while(i>0]=chr;i=i+1}}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){for(var i=0;i>0]=array[i]}}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer+str.length>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;function unSign(value,bits,ignore){if(value>=0){return value}return bits<=32?2*Math.abs(1<=half&&(bits<=32||value>half)){value=-2*half+value}return value}if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};Math.imul=Math["imul"];var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;STATIC_BASE=8;STATICTOP=STATIC_BASE+Runtime.alignMemory(1739);__ATINIT__.push();allocate([0,0,0,0,183,29,193,4,110,59,130,9,217,38,67,13,220,118,4,19,107,107,197,23,178,77,134,26,5,80,71,30,184,237,8,38,15,240,201,34,214,214,138,47,97,203,75,43,100,155,12,53,211,134,205,49,10,160,142,60,189,189,79,56,112,219,17,76,199,198,208,72,30,224,147,69,169,253,82,65,172,173,21,95,27,176,212,91,194,150,151,86,117,139,86,82,200,54,25,106,127,43,216,110,166,13,155,99,17,16,90,103,20,64,29,121,163,93,220,125,122,123,159,112,205,102,94,116,224,182,35,152,87,171,226,156,142,141,161,145,57,144,96,149,60,192,39,139,139,221,230,143,82,251,165,130,229,230,100,134,88,91,43,190,239,70,234,186,54,96,169,183,129,125,104,179,132,45,47,173,51,48,238,169,234,22,173,164,93,11,108,160,144,109,50,212,39,112,243,208,254,86,176,221,73,75,113,217,76,27,54,199,251,6,247,195,34,32,180,206,149,61,117,202,40,128,58,242,159,157,251,246,70,187,184,251,241,166,121,255,244,246,62,225,67,235,255,229,154,205,188,232,45,208,125,236,119,112,134,52,192,109,71,48,25,75,4,61,174,86,197,57,171,6,130,39,28,27,67,35,197,61,0,46,114,32,193,42,207,157,142,18,120,128,79,22,161,166,12,27,22,187,205,31,19,235,138,1,164,246,75,5,125,208,8,8,202,205,201,12,7,171,151,120,176,182,86,124,105,144,21,113,222,141,212,117,219,221,147,107,108,192,82,111,181,230,17,98,2,251,208,102,191,70,159,94,8,91,94,90,209,125,29,87,102,96,220,83,99,48,155,77,212,45,90,73,13,11,25,68,186,22,216,64,151,198,165,172,32,219,100,168,249,253,39,165,78,224,230,161,75,176,161,191,252,173,96,187,37,139,35,182,146,150,226,178,47,43,173,138,152,54,108,142,65,16,47,131,246,13,238,135,243,93,169,153,68,64,104,157,157,102,43,144,42,123,234,148,231,29,180,224,80,0,117,228,137,38,54,233,62,59,247,237,59,107,176,243,140,118,113,247,85,80,50,250,226,77,243,254,95,240,188,198,232,237,125,194,49,203,62,207,134,214,255,203,131,134,184,213,52,155,121,209,237,189,58,220,90,160,251,216,238,224,12,105,89,253,205,109,128,219,142,96,55,198,79,100,50,150,8,122,133,139,201,126,92,173,138,115,235,176,75,119,86,13,4,79,225,16,197,75,56,54,134,70,143,43,71,66,138,123,0,92,61,102,193,88,228,64,130,85,83,93,67,81,158,59,29,37,41,38,220,33,240,0,159,44,71,29,94,40,66,77,25,54,245,80,216,50,44,118,155,63,155,107,90,59,38,214,21,3,145,203,212,7,72,237,151,10,255,240,86,14,250,160,17,16,77,189,208,20,148,155,147,25,35,134,82,29,14,86,47,241,185,75,238,245,96,109,173,248,215,112,108,252,210,32,43,226,101,61,234,230,188,27,169,235,11,6,104,239,182,187,39,215,1,166,230,211,216,128,165,222,111,157,100,218,106,205,35,196,221,208,226,192,4,246,161,205,179,235,96,201,126,141,62,189,201,144,255,185,16,182,188,180,167,171,125,176,162,251,58,174,21,230,251,170,204,192,184,167,123,221,121,163,198,96,54,155,113,125,247,159,168,91,180,146,31,70,117,150,26,22,50,136,173,11,243,140,116,45,176,129,195,48,113,133,153,144,138,93,46,141,75,89,247,171,8,84,64,182,201,80,69,230,142,78,242,251,79,74,43,221,12,71,156,192,205,67,33,125,130,123,150,96,67,127,79,70,0,114,248,91,193,118,253,11,134,104,74,22,71,108,147,48,4,97,36,45,197,101,233,75,155,17,94,86,90,21,135,112,25,24,48,109,216,28,53,61,159,2,130,32,94,6,91,6,29,11,236,27,220,15,81,166,147,55,230,187,82,51,63,157,17,62,136,128,208,58,141,208,151,36,58,205,86,32,227,235,21,45,84,246,212,41,121,38,169,197,206,59,104,193,23,29,43,204,160,0,234,200,165,80,173,214,18,77,108,210,203,107,47,223,124,118,238,219,193,203,161,227,118,214,96,231,175,240,35,234,24,237,226,238,29,189,165,240,170,160,100,244,115,134,39,249,196,155,230,253,9,253,184,137,190,224,121,141,103,198,58,128,208,219,251,132,213,139,188,154,98,150,125,158,187,176,62,147,12,173,255,151,177,16,176,175,6,13,113,171,223,43,50,166,104,54,243,162,109,102,180,188,218,123,117,184,3,93,54,181,180,64,247,177,79,103,103,83,0,0,0,0,33,111,103,103,95,115,121,110,99,95,105,110,105,116,40,38,111,103,103,45,62,115,116,97,116,101,41,0,0,0,0,0,115,114,99,47,111,103,103,46,99,0,0,0,0,0,0,0,65,86,79,103,103,73,110,105,116,0,0,0,0,0,0,0,33,111,103,103,95,115,121,110,99,95,119,114,111,116,101,40,38,111,103,103,45,62,115,116,97,116,101,44,32,98,117,102,108,101,110,41,0,0,0,0,65,86,79,103,103,82,101,97,100,0,0,0,0,0,0,0,33,111,103,103,95,115,116,114,101,97,109,95,105,110,105,116,40,38,111,103,103,45,62,115,116,114,101,97,109,44,32,115,101,114,105,97,108,41,0,0,33,111,103,103,95,115,116,114,101,97,109,95,112,97,103,101,105,110,40,38,111,103,103,45,62,115,116,114,101,97,109,44,32,38,111,103,103,45,62,112,97,103,101,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);function copyTempFloat(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3]}function copyTempDouble(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3];HEAP8[tempDoublePtr+4]=HEAP8[ptr+4];HEAP8[tempDoublePtr+5]=HEAP8[ptr+5];HEAP8[tempDoublePtr+6]=HEAP8[ptr+6];HEAP8[tempDoublePtr+7]=HEAP8[ptr+7]}Module["_i64Add"]=_i64Add;function _sbrk(bytes){var self=_sbrk;if(!self.called){DYNAMICTOP=alignMemoryPage(DYNAMICTOP);self.called=true;assert(Runtime.dynamicAlloc);self.alloc=Runtime.dynamicAlloc;Runtime.dynamicAlloc=(function(){abort("cannot dynamically allocate, sbrk now has control")})}var ret=DYNAMICTOP;if(bytes!=0)self.alloc(bytes);return ret}var ___errno_state=0;function ___setErrNo(value){HEAP32[___errno_state>>2]=value;return value}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(name){switch(name){case 30:return PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 79:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1}}___setErrNo(ERRNO_CODES.EINVAL);return-1}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;Module["_memmove"]=_memmove;Module["_memset"]=_memset;function ___errno_location(){return ___errno_state}Module["_bitshift64Shl"]=_bitshift64Shl;function _abort(){Module["abort"]()}var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};var TTY={ttys:[],init:(function(){}),shutdown:(function(){}),register:(function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)}),stream_ops:{open:(function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}stream.tty=tty;stream.seekable=false}),close:(function(stream){if(stream.tty.output.length){stream.tty.ops.put_char(stream.tty,10)}}),read:(function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(ERRNO_CODES.ENXIO)}var bytesRead=0;for(var i=0;inode.contents.length){node.contents=MEMFS.getFileDataAsRegularArray(node);node.usedBytes=node.contents.length}if(!node.contents||node.contents.subarray){var prevCapacity=node.contents?node.contents.buffer.byteLength:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return}if(!node.contents&&newCapacity>0)node.contents=[];while(node.contents.lengthnewSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++}}));var remove=[];Object.keys(dst.entries).forEach((function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}}));if(!total){return callback(null)}var errored=false;var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=(function(){done(this.error)});create.sort().forEach((function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)}))}else{IDBFS.loadLocalEntry(path,(function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)}))}}));remove.sort().reverse().forEach((function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}}))})};var NODEFS={isWindows:false,staticInit:(function(){NODEFS.isWindows=!!process.platform.match(/^win/)}),mount:(function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)}),createNode:(function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node}),getMode:(function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&146)>>1}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return stat.mode}),realPath:(function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)}),flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:(function(flags){if(flags in NODEFS.flagsToPermissionStringMap){return NODEFS.flagsToPermissionStringMap[flags]}else{return flags}}),node_ops:{getattr:(function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}}),setattr:(function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),lookup:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)}),mknod:(function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return node}),rename:(function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),unlink:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),rmdir:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readdir:(function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),symlink:(function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readlink:(function(node){var path=NODEFS.realPath(node);try{return fs.readlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}})},stream_ops:{open:(function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsToPermissionString(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),close:(function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),read:(function(stream,buffer,offset,length,position){var nbuffer=new Buffer(length);var res;try{res=fs.readSync(stream.nfd,nbuffer,0,length,position)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(res>0){for(var i=0;i8){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}var parts=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}}}return{path:current_path,node:current}}),getPath:(function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}}),hashName:(function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length}),hashAddNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node}),hashRemoveNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}}),lookupNode:(function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)}),createNode:(function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=(function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev});FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:(function(){return(this.mode&readMode)===readMode}),set:(function(val){val?this.mode|=readMode:this.mode&=~readMode})},write:{get:(function(){return(this.mode&writeMode)===writeMode}),set:(function(val){val?this.mode|=writeMode:this.mode&=~writeMode})},isFolder:{get:(function(){return FS.isDir(this.mode)})},isDevice:{get:(function(){return FS.isChrdev(this.mode)})}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node}),destroyNode:(function(node){FS.hashRemoveNode(node)}),isRoot:(function(node){return node===node.parent}),isMountpoint:(function(node){return!!node.mounted}),isFile:(function(mode){return(mode&61440)===32768}),isDir:(function(mode){return(mode&61440)===16384}),isLink:(function(mode){return(mode&61440)===40960}),isChrdev:(function(mode){return(mode&61440)===8192}),isBlkdev:(function(mode){return(mode&61440)===24576}),isFIFO:(function(mode){return(mode&61440)===4096}),isSocket:(function(mode){return(mode&49152)===49152}),flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:(function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags}),flagsToPermissionString:(function(flag){var accmode=flag&2097155;var perms=["r","w","rw"][accmode];if(flag&512){perms+="w"}return perms}),nodePermissions:(function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return ERRNO_CODES.EACCES}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return ERRNO_CODES.EACCES}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return ERRNO_CODES.EACCES}return 0}),mayLookup:(function(dir){return FS.nodePermissions(dir,"x")}),mayCreate:(function(dir,name){try{var node=FS.lookupNode(dir,name);return ERRNO_CODES.EEXIST}catch(e){}return FS.nodePermissions(dir,"wx")}),mayDelete:(function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return ERRNO_CODES.ENOTDIR}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return ERRNO_CODES.EBUSY}}else{if(FS.isDir(node.mode)){return ERRNO_CODES.EISDIR}}return 0}),mayOpen:(function(node,flags){if(!node){return ERRNO_CODES.ENOENT}if(FS.isLink(node.mode)){return ERRNO_CODES.ELOOP}else if(FS.isDir(node.mode)){if((flags&2097155)!==0||flags&512){return ERRNO_CODES.EISDIR}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))}),MAX_OPEN_FDS:4096,nextfd:(function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(ERRNO_CODES.EMFILE)}),getStream:(function(fd){return FS.streams[fd]}),createStream:(function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=(function(){});FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:(function(){return this.node}),set:(function(val){this.node=val})},isRead:{get:(function(){return(this.flags&2097155)!==1})},isWrite:{get:(function(){return(this.flags&2097155)!==0})},isAppend:{get:(function(){return this.flags&1024})}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream}),closeStream:(function(fd){FS.streams[fd]=null}),getStreamFromPtr:(function(ptr){return FS.streams[ptr-1]}),getPtrForStream:(function(stream){return stream?stream.fd+1:0}),chrdev_stream_ops:{open:(function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}}),llseek:(function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)})},major:(function(dev){return dev>>8}),minor:(function(dev){return dev&255}),makedev:(function(ma,mi){return ma<<8|mi}),registerDevice:(function(dev,ops){FS.devices[dev]={stream_ops:ops}}),getDevice:(function(dev){return FS.devices[dev]}),getMounts:(function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts}),syncfs:(function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}var mounts=FS.getMounts(FS.root.mount);var completed=0;function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=mounts.length){callback(null)}}mounts.forEach((function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)}))}),mount:(function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot}),unmount:(function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach((function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}}));node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(idx!==-1);node.mount.mounts.splice(idx,1)}),lookup:(function(parent,name){return parent.node_ops.lookup(parent,name)}),mknod:(function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.mknod(parent,name,mode,dev)}),create:(function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)}),mkdir:(function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)}),mkdev:(function(path,mode,dev){if(typeof dev==="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)}),symlink:(function(oldpath,newpath){var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;var newname=PATH.basename(newpath);var err=FS.mayCreate(parent,newname);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.symlink(parent,newname,oldpath)}),rename:(function(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;try{lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(ERRNO_CODES.EXDEV)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}relative=PATH.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var err=FS.mayDelete(old_dir,old_name,isdir);if(err){throw new FS.ErrnoError(err)}err=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(err){throw new FS.ErrnoError(err)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(new_dir!==old_dir){err=FS.nodePermissions(old_dir,"w");if(err){throw new FS.ErrnoError(err)}}try{if(FS.trackingDelegate["willMovePath"]){FS.trackingDelegate["willMovePath"](old_path,new_path)}}catch(e){console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{if(FS.trackingDelegate["onMovePath"])FS.trackingDelegate["onMovePath"](old_path,new_path)}catch(e){console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}}),rmdir:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,true);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readdir:(function(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}return node.node_ops.readdir(node)}),unlink:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,false);if(err){if(err===ERRNO_CODES.EISDIR)err=ERRNO_CODES.EPERM;throw new FS.ErrnoError(err)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readlink:(function(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link.node_ops.readlink){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return link.node_ops.readlink(link)}),stat:(function(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node.node_ops.getattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return node.node_ops.getattr(node)}),lstat:(function(path){return FS.stat(path,true)}),chmod:(function(path,mode,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})}),lchmod:(function(path,mode){FS.chmod(path,mode,true)}),fchmod:(function(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chmod(stream.node,mode)}),chown:(function(path,uid,gid,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{timestamp:Date.now()})}),lchown:(function(path,uid,gid){FS.chown(path,uid,gid,true)}),fchown:(function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chown(stream.node,uid,gid)}),truncate:(function(path,len){if(len<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var err=FS.nodePermissions(node,"w");if(err){throw new FS.ErrnoError(err)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})}),ftruncate:(function(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}FS.truncate(stream.node,len)}),utime:(function(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})}),open:(function(path,flags,mode,fd_start,fd_end){if(path===""){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}flags=typeof flags==="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode==="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path==="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}}else{node=FS.mknod(path,mode,0)}}if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(FS.isChrdev(node.mode)){flags&=~512}var err=FS.mayOpen(node,flags);if(err){throw new FS.ErrnoError(err)}if(flags&512){FS.truncate(node,0)}flags&=~(128|512);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;Module["printErr"]("read file: "+path)}}try{if(FS.trackingDelegate["onOpenFile"]){var trackingFlags=0;if((flags&2097155)!==1){trackingFlags|=FS.tracking.openFlags.READ}if((flags&2097155)!==0){trackingFlags|=FS.tracking.openFlags.WRITE}FS.trackingDelegate["onOpenFile"](path,trackingFlags)}}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: "+e.message)}return stream}),close:(function(stream){try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}}),llseek:(function(stream,offset,whence){if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}return stream.stream_ops.llseek(stream,offset,whence)}),read:(function(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.read){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead}),write:(function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.write){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if(stream.flags&1024){FS.llseek(stream,0,2)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate["onWriteToFile"])FS.trackingDelegate["onWriteToFile"](stream.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return bytesWritten}),allocate:(function(stream,offset,length){if(offset<0||length<=0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP)}stream.stream_ops.allocate(stream,offset,length)}),mmap:(function(stream,buffer,offset,length,position,prot,flags){if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EACCES)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}return stream.stream_ops.mmap(stream,buffer,offset,length,position,prot,flags)}),ioctl:(function(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(ERRNO_CODES.ENOTTY)}return stream.stream_ops.ioctl(stream,cmd,arg)}),readFile:(function(path,opts){opts=opts||{};opts.flags=opts.flags||"r";opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret="";var utf8=new Runtime.UTF8Processor;for(var i=0;i>2]=FS.getPtrForStream(stdin);assert(stdin.fd===0,"invalid handle for stdin ("+stdin.fd+")");var stdout=FS.open("/dev/stdout","w");HEAP32[_stdout>>2]=FS.getPtrForStream(stdout);assert(stdout.fd===1,"invalid handle for stdout ("+stdout.fd+")");var stderr=FS.open("/dev/stderr","w");HEAP32[_stderr>>2]=FS.getPtrForStream(stderr);assert(stderr.fd===2,"invalid handle for stderr ("+stderr.fd+")")}),ensureErrnoError:(function(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}this.message=ERRNO_MESSAGES[errno]};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[ERRNO_CODES.ENOENT].forEach((function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""}))}),staticInit:(function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices()}),init:(function(input,output,error){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()}),quit:(function(){FS.init.initialized=false;for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=Math.floor(idx/this.chunkSize);return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}});var lazyArray=this;lazyArray.setDataGetter((function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]}));this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperty(lazyArray,"length",{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._length})});Object.defineProperty(lazyArray,"chunkSize",{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize})});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperty(node,"usedBytes",{get:(function(){return this.contents.length})});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach((function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return fn.apply(null,arguments)}}));stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}),normalize:(function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path}),dirname:(function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir}),basename:(function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)}),extname:(function(path){return PATH.splitPath(path)[3]}),join:(function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))}),join2:(function(l,r){return PATH.normalize(l+"/"+r)}),resolve:(function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter((function(p){return!!p})),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."}),relative:(function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout((function(){finish(audio)}),1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);var canvas=Module["canvas"];function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===canvas||document["mozPointerLockElement"]===canvas||document["webkitPointerLockElement"]===canvas||document["msPointerLockElement"]===canvas}if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||(function(){});canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||(function(){});canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",(function(ev){if(!Browser.pointerLock&&canvas.requestPointerLock){canvas.requestPointerLock();ev.preventDefault()}}),false)}}}),createContext:(function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx)return Module.ctx;var ctx;var errorInfo="?";function onContextCreationError(event){errorInfo=event.statusMessage||errorInfo}try{if(useWebGL){var contextAttributes={antialias:false,alpha:false};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}canvas.addEventListener("webglcontextcreationerror",onContextCreationError,false);try{["experimental-webgl","webgl"].some((function(webglId){return ctx=canvas.getContext(webglId,contextAttributes)}))}finally{canvas.removeEventListener("webglcontextcreationerror",onContextCreationError,false)}}else{ctx=canvas.getContext("2d")}if(!ctx)throw":("}catch(e){Module.print("Could not create canvas: "+[errorInfo,e]);return null}if(useWebGL){canvas.style.backgroundColor="black"}if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GLctx=ctx;Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach((function(callback){callback()}));Browser.init()}return ctx}),destroyContext:(function(canvas,useWebGL,setInModule){}),fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:(function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullScreenChange(){Browser.isFullScreen=false;var canvasContainer=canvas.parentNode;if((document["webkitFullScreenElement"]||document["webkitFullscreenElement"]||document["mozFullScreenElement"]||document["mozFullscreenElement"]||document["fullScreenElement"]||document["fullscreenElement"]||document["msFullScreenElement"]||document["msFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.cancelFullScreen=document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["webkitCancelFullScreen"]||document["msExitFullscreen"]||document["exitFullscreen"]||(function(){});canvas.cancelFullScreen=canvas.cancelFullScreen.bind(document);if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullScreen=true;if(Browser.resizeCanvas)Browser.setFullScreenCanvasSize()}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas)Browser.setWindowedCanvasSize()}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullScreen);Browser.updateCanvasDimensions(canvas)}if(!Browser.fullScreenHandlersInstalled){Browser.fullScreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullScreenChange,false);document.addEventListener("mozfullscreenchange",fullScreenChange,false);document.addEventListener("webkitfullscreenchange",fullScreenChange,false);document.addEventListener("MSFullscreenChange",fullScreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullScreen=canvasContainer["requestFullScreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullScreen"]?(function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}):null);canvasContainer.requestFullScreen()}),nextRAF:0,fakeRequestAnimationFrame:(function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)}),requestAnimationFrame:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:(function(func){return(function(){if(!ABORT)return func.apply(null,arguments)})}),safeRequestAnimationFrame:(function(func){return Browser.requestAnimationFrame((function(){if(!ABORT)func()}))}),safeSetTimeout:(function(func,timeout){Module["noExitRuntime"]=true;return setTimeout((function(){if(!ABORT)func()}),timeout)}),safeSetInterval:(function(func,timeout){Module["noExitRuntime"]=true;return setInterval((function(){if(!ABORT)func()}),timeout)}),getMimetype:(function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]}),getUserMedia:(function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)}),getMovementX:(function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0}),getMovementY:(function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0}),getMouseWheelDelta:(function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail;break;case"mousewheel":delta=-event.wheelDelta;break;case"wheel":delta=event.deltaY;break;default:throw"unrecognized mouse wheel event: "+event.type}return Math.max(-1,Math.min(1,delta))}),mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:(function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){Browser.lastTouches[touch.identifier]=Browser.touches[touch.identifier];Browser.touches[touch.identifier]={x:adjustedX,y:adjustedY}}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}}),xhrLoad:(function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)}),asyncLoad:(function(url,onload,onerror,noRunDep){Browser.xhrLoad(url,(function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(!noRunDep)removeRunDependency("al "+url)}),(function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}}));if(!noRunDep)addRunDependency("al "+url)}),resizeListeners:[],updateResizeListeners:(function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach((function(listener){listener(canvas.width,canvas.height)}))}),setCanvasSize:(function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()}),windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags|8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),setWindowedCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags&~8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),updateCanvasDimensions:(function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2]=ret}return ret}Module["_strlen"]=_strlen;___errno_state=Runtime.staticAlloc(4);HEAP32[___errno_state>>2]=0;Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas){Browser.requestFullScreen(lockPointer,resizeCanvas)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};FS.staticInit();__ATINIT__.unshift({func:(function(){if(!Module["noFSInit"]&&!FS.init.initialized)FS.init()})});__ATMAIN__.push({func:(function(){FS.ignorePermissions=false})});__ATEXIT__.push({func:(function(){FS.quit()})});Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;__ATINIT__.unshift({func:(function(){TTY.init()})});__ATEXIT__.push({func:(function(){TTY.shutdown()})});TTY.utf8=new Runtime.UTF8Processor;if(ENVIRONMENT_IS_NODE){var fs=require("fs");NODEFS.staticInit()}STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);staticSealed=true;STACK_MAX=STACK_BASE+5242880;DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX);assert(DYNAMIC_BASE>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0]}function xa(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0];a[k+4>>0]=a[b+4>>0];a[k+5>>0]=a[b+5>>0];a[k+6>>0]=a[b+6>>0];a[k+7>>0]=a[b+7>>0]}function ya(a){a=a|0;D=a}function za(){return D|0}function Aa(b){b=b|0;return a[(c[b>>2]|0)+5>>0]&2|0}function Ba(a){a=a|0;a=c[a>>2]|0;return(d[a+15>>0]|0)<<8|(d[a+14>>0]|0)|(d[a+16>>0]|0)<<16|(d[a+17>>0]|0)<<24|0}function Ca(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;if((a|0)==0){j=-1;i=d;return j|0}ab(a|0,0,360)|0;c[a+4>>2]=16384;c[a+24>>2]=1024;h=Qa(16384)|0;c[a>>2]=h;f=Qa(4096)|0;g=a+16|0;c[g>>2]=f;j=Qa(8192)|0;e=a+20|0;c[e>>2]=j;do{if((h|0)!=0){if((f|0)==0|(j|0)==0){Ra(h);f=c[g>>2]|0;break}c[a+336>>2]=b;j=0;i=d;return j|0}}while(0);if((f|0)!=0){Ra(f)}e=c[e>>2]|0;if((e|0)!=0){Ra(e)}ab(a|0,0,360)|0;j=-1;i=d;return j|0}function Da(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=a+24|0;f=c[e>>2]|0;if((f-b|0)>(c[a+28>>2]|0)){h=0;i=d;return h|0}if((f|0)>(2147483647-b|0)){if((a|0)==0){h=-1;i=d;return h|0}b=c[a>>2]|0;if((b|0)!=0){Ra(b)}b=c[a+16>>2]|0;if((b|0)!=0){Ra(b)}b=c[a+20>>2]|0;if((b|0)!=0){Ra(b)}ab(a|0,0,360)|0;h=-1;i=d;return h|0}g=f+b|0;g=(g|0)<2147483615?g+32|0:g;b=a+16|0;f=Ta(c[b>>2]|0,g<<2)|0;if((f|0)==0){e=c[a>>2]|0;if((e|0)!=0){Ra(e)}b=c[b>>2]|0;if((b|0)!=0){Ra(b)}b=c[a+20>>2]|0;if((b|0)!=0){Ra(b)}ab(a|0,0,360)|0;h=-1;i=d;return h|0}c[b>>2]=f;f=a+20|0;h=Ta(c[f>>2]|0,g<<3)|0;if((h|0)!=0){c[f>>2]=h;c[e>>2]=g;h=0;i=d;return h|0}e=c[a>>2]|0;if((e|0)!=0){Ra(e)}b=c[b>>2]|0;if((b|0)!=0){Ra(b)}b=c[f>>2]|0;if((b|0)!=0){Ra(b)}ab(a|0,0,360)|0;h=-1;i=d;return h|0}function Ea(a){a=a|0;var b=0;b=i;if((a|0)==0){i=b;return 0}c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[a+20>>2]=0;c[a+24>>2]=0;i=b;return 0}function Fa(a){a=a|0;var b=0,d=0;b=i;if((a|0)!=0){d=c[a>>2]|0;if((d|0)!=0){Ra(d)}Ra(a)}i=b;return 0}function Ga(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;f=a+4|0;h=c[f>>2]|0;if(!((h|0)>-1)){k=0;i=d;return k|0}g=a+12|0;j=c[g>>2]|0;e=a+8|0;if((j|0)!=0){k=(c[e>>2]|0)-j|0;c[e>>2]=k;if((k|0)>0){h=c[a>>2]|0;$a(h|0,h+j|0,k|0)|0;h=c[f>>2]|0}c[g>>2]=0}g=c[e>>2]|0;do{if((h-g|0)<(b|0)){b=b+4096+g|0;g=c[a>>2]|0;if((g|0)==0){g=Qa(b)|0}else{g=Ta(g,b)|0}if((g|0)!=0){c[a>>2]=g;c[f>>2]=b;a=g;g=c[e>>2]|0;break}if((a|0)==0){k=0;i=d;return k|0}e=c[a>>2]|0;if((e|0)!=0){Ra(e)}c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[a+20>>2]=0;c[a+24>>2]=0;k=0;i=d;return k|0}else{a=c[a>>2]|0}}while(0);k=a+g|0;i=d;return k|0}function Ha(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;e=c[a+4>>2]|0;if((e|0)>-1?(g=a+8|0,f=(c[g>>2]|0)+b|0,(f|0)<=(e|0)):0){c[g>>2]=f;a=0}else{a=-1}i=d;return a|0}function Ia(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;f=i;i=i+16|0;o=f;n=c[b>>2]|0;g=b+12|0;l=c[g>>2]|0;j=n+l|0;k=b+8|0;m=(c[k>>2]|0)-l|0;if(!((c[b+4>>2]|0)>-1)){z=0;i=f;return z|0}h=b+20|0;r=c[h>>2]|0;do{if((r|0)==0){if((m|0)<27){z=0;i=f;return z|0}if((Xa(j,1032,4)|0)!=0){p=b+24|0;break}q=n+(l+26)|0;r=a[q>>0]|0;p=(r&255)+27|0;if((m|0)<(p|0)){z=0;i=f;return z|0}if(!(r<<24>>24==0)){s=l+27|0;r=b+24|0;u=c[r>>2]|0;t=0;do{u=u+(d[n+(s+t)>>0]|0)|0;c[r>>2]=u;t=t+1|0}while((t|0)<(d[q>>0]|0|0))}c[h>>2]=p;r=p;q=11}else{q=11}}while(0);do{if((q|0)==11){p=b+24|0;if((r+(c[p>>2]|0)|0)>(m|0)){z=0;i=f;return z|0}r=n+(l+22)|0;s=d[r>>0]|d[r+1>>0]<<8|d[r+2>>0]<<16|d[r+3>>0]<<24;c[o>>2]=s;a[r>>0]=0;a[r+1>>0]=0;a[r+2>>0]=0;a[r+3>>0]=0;x=c[h>>2]|0;w=x+l|0;v=c[p>>2]|0;a[r>>0]=0;q=n+(l+23)|0;a[q>>0]=0;u=n+(l+24)|0;a[u>>0]=0;t=n+(l+25)|0;a[t>>0]=0;if((x|0)>0){z=0;y=0;do{z=c[8+(((d[n+(y+l)>>0]|0)^z>>>24)<<2)>>2]^z<<8;y=y+1|0}while((y|0)!=(x|0))}else{z=0}if((v|0)>0){x=0;do{z=c[8+(((d[n+(w+x)>>0]|0)^z>>>24)<<2)>>2]^z<<8;x=x+1|0}while((x|0)!=(v|0))}a[r>>0]=z;a[q>>0]=z>>>8;a[u>>0]=z>>>16;a[t>>0]=z>>>24;if((Xa(o,r,4)|0)!=0){a[r>>0]=s;a[r+1>>0]=s>>8;a[r+2>>0]=s>>16;a[r+3>>0]=s>>24;break}k=c[b>>2]|0;j=c[g>>2]|0;if((e|0)==0){e=c[p>>2]|0;k=c[h>>2]|0}else{c[e>>2]=k+j;z=c[h>>2]|0;c[e+4>>2]=z;c[e+8>>2]=k+(z+j);k=c[p>>2]|0;c[e+12>>2]=k;e=k;k=z}c[b+16>>2]=0;z=e+k|0;c[g>>2]=j+z;c[h>>2]=0;c[p>>2]=0;i=f;return z|0}}while(0);c[h>>2]=0;c[p>>2]=0;h=Wa(n+(l+1)|0,79,m+ -1|0)|0;b=c[b>>2]|0;if((h|0)==0){h=b+(c[k>>2]|0)|0}z=h;c[g>>2]=z-b;z=j-z|0;i=f;return z|0}function Ja(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;a:do{if((c[a+4>>2]|0)>-1){e=a+16|0;do{f=Ia(a,b)|0;if((f|0)>0){a=1;break a}if((f|0)==0){a=0;break a}}while((c[e>>2]|0)!=0);c[e>>2]=1;a=-1}else{a=0}}while(0);i=d;return a|0}function Ka(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;f=i;j=c[e>>2]|0;q=c[e+8>>2]|0;p=c[e+12>>2]|0;u=a[j+4>>0]|0;l=d[j+5>>0]|0;r=l&1;o=l&2;l=l&4;h=bb(d[j+13>>0]|0|0,0,8)|0;h=bb(h|(d[j+12>>0]|0)|0,D|0,8)|0;h=bb(h|(d[j+11>>0]|0)|0,D|0,8)|0;h=bb(h|(d[j+10>>0]|0)|0,D|0,8)|0;h=bb(h|(d[j+9>>0]|0)|0,D|0,8)|0;h=bb(h|(d[j+8>>0]|0)|0,D|0,8)|0;h=bb(h|(d[j+7>>0]|0)|0,D|0,8)|0;e=D;h=h|(d[j+6>>0]|0);t=(d[j+15>>0]|0)<<8|(d[j+14>>0]|0)|(d[j+16>>0]|0)<<16|(d[j+17>>0]|0)<<24;k=(d[j+19>>0]|0)<<8|(d[j+18>>0]|0)|(d[j+20>>0]|0)<<16|(d[j+21>>0]|0)<<24;m=d[j+26>>0]|0;if((b|0)==0){A=-1;i=f;return A|0}w=c[b>>2]|0;if((w|0)==0){A=-1;i=f;return A|0}s=b+36|0;n=c[s>>2]|0;v=b+12|0;y=c[v>>2]|0;if((y|0)!=0){z=b+8|0;A=c[z>>2]|0;x=A-y|0;c[z>>2]=x;if((A|0)!=(y|0)){$a(w|0,w+y|0,x|0)|0}c[v>>2]=0}if((n|0)!=0){v=b+28|0;w=c[v>>2]|0;if((w|0)==(n|0)){w=n}else{A=c[b+16>>2]|0;$a(A|0,A+(n<<2)|0,w-n<<2|0)|0;w=c[b+20>>2]|0;$a(w|0,w+(n<<3)|0,(c[v>>2]|0)-n<<3|0)|0;w=c[v>>2]|0}c[v>>2]=w-n;A=b+32|0;c[A>>2]=(c[A>>2]|0)-n;c[s>>2]=0}if(u<<24>>24!=0?1:(t|0)!=(c[b+336>>2]|0)){A=-1;i=f;return A|0}if((Da(b,m+1|0)|0)!=0){A=-1;i=f;return A|0}n=b+340|0;v=c[n>>2]|0;if((k|0)!=(v|0)){y=b+32|0;A=c[y>>2]|0;z=b+28|0;w=c[z>>2]|0;if((A|0)<(w|0)){x=c[b+16>>2]|0;s=b+8|0;u=c[s>>2]|0;t=A;do{u=u-(c[x+(t<<2)>>2]&255)|0;t=t+1|0}while((t|0)<(w|0));c[s>>2]=u}c[z>>2]=A;if(!((v|0)==-1)){x=A+1|0;c[z>>2]=x;c[(c[b+16>>2]|0)+(A<<2)>>2]=1024;c[y>>2]=x}}a:do{if((r|0)==0){r=0}else{A=c[b+28>>2]|0;if((A|0)>=1?(c[(c[b+16>>2]|0)+(A+ -1<<2)>>2]|0)!=1024:0){r=0;break}else{r=0}while(1){if((r|0)>=(m|0)){o=0;break a}A=a[j+(r+27)>>0]|0;z=A&255;q=q+z|0;p=p-z|0;r=r+1|0;if(!(A<<24>>24==-1)){o=0;break}}}}while(0);if((p|0)!=0){t=b+4|0;v=c[t>>2]|0;s=b+8|0;u=c[s>>2]|0;do{if((v-p|0)>(u|0)){t=c[b>>2]|0}else{if((v|0)>(2147483647-p|0)){g=c[b>>2]|0;if((g|0)!=0){Ra(g)}g=c[b+16>>2]|0;if((g|0)!=0){Ra(g)}g=c[b+20>>2]|0;if((g|0)!=0){Ra(g)}ab(b|0,0,360)|0;A=-1;i=f;return A|0}u=v+p|0;u=(u|0)<2147482623?u+1024|0:u;v=Ta(c[b>>2]|0,u)|0;if((v|0)!=0){c[t>>2]=u;c[b>>2]=v;t=v;u=c[s>>2]|0;break}g=c[b>>2]|0;if((g|0)!=0){Ra(g)}g=c[b+16>>2]|0;if((g|0)!=0){Ra(g)}g=c[b+20>>2]|0;if((g|0)!=0){Ra(g)}ab(b|0,0,360)|0;A=-1;i=f;return A|0}}while(0);_a(t+u|0,q|0,p|0)|0;c[s>>2]=(c[s>>2]|0)+p}if((r|0)<(m|0)){q=b+28|0;p=b+32|0;s=c[b+16>>2]|0;t=c[b+20>>2]|0;w=c[q>>2]|0;u=-1;b:while(1){v=w;while(1){w=a[j+(r+27)>>0]|0;x=w&255;y=s+(v<<2)|0;c[y>>2]=x;A=t+(v<<3)|0;c[A>>2]=-1;c[A+4>>2]=-1;if((o|0)!=0){c[y>>2]=x|256}o=v+1|0;c[q>>2]=o;r=r+1|0;if(!(w<<24>>24==-1)){break}if((r|0)>=(m|0)){break b}else{v=o;o=0}}c[p>>2]=o;if((r|0)<(m|0)){w=o;o=0;u=v}else{u=v;break}}if(!((u|0)==-1)){A=(c[b+20>>2]|0)+(u<<3)|0;c[A>>2]=h;c[A+4>>2]=e}}if((l|0)!=0?(c[b+328>>2]=1,g=c[b+28>>2]|0,(g|0)>0):0){A=(c[b+16>>2]|0)+(g+ -1<<2)|0;c[A>>2]=c[A>>2]|512}c[n>>2]=k+1;A=0;i=f;return A|0}function La(a,b){a=a|0;b=b|0;var d=0;d=i;if((a|0)!=0?(c[a>>2]|0)!=0:0){a=Ma(a,b,1)|0}else{a=0}i=d;return a|0}function Ma(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;e=a+36|0;k=c[e>>2]|0;if((c[a+32>>2]|0)<=(k|0)){m=0;i=f;return m|0}j=c[a+16>>2]|0;h=c[j+(k<<2)>>2]|0;if((h&1024|0)!=0){c[e>>2]=k+1;m=a+344|0;l=m;l=Za(c[l>>2]|0,c[l+4>>2]|0,1,0)|0;c[m>>2]=l;c[m+4>>2]=D;m=-1;i=f;return m|0}g=(b|0)!=0;d=(d|0)==0;if(d&(g^1)){m=1;i=f;return m|0}l=h&255;m=h&512;h=h&256;if((l|0)==255){l=255;do{k=k+1|0;o=c[j+(k<<2)>>2]|0;n=o&255;m=(o&512|0)==0?m:512;l=n+l|0}while((n|0)==255)}if(g){c[b+12>>2]=m;c[b+8>>2]=h;c[b>>2]=(c[a>>2]|0)+(c[a+12>>2]|0);o=a+344|0;n=c[o+4>>2]|0;m=b+24|0;c[m>>2]=c[o>>2];c[m+4>>2]=n;m=(c[a+20>>2]|0)+(k<<3)|0;n=c[m+4>>2]|0;o=b+16|0;c[o>>2]=c[m>>2];c[o+4>>2]=n;c[b+4>>2]=l}if(d){o=1;i=f;return o|0}o=a+12|0;c[o>>2]=(c[o>>2]|0)+l;c[e>>2]=k+1;o=a+344|0;n=o;n=Za(c[n>>2]|0,c[n+4>>2]|0,1,0)|0;c[o>>2]=n;c[o+4>>2]=D;o=1;i=f;return o|0}function Na(){var a=0,b=0;b=i;a=Sa(1,440)|0;if((Ea(a)|0)==0){i=b;return a|0}else{oa(1040,1072,17,1088)}return 0}function Oa(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;_a(Ga(a,d)|0,b|0,d|0)|0;if((Ha(a,d)|0)!=0){oa(1104,1072,25,1144)}g=a+28|0;if((Ja(a,g)|0)!=1){i=f;return 0}d=a+48|0;h=a+408|0;j=a+412|0;while(1){b=Ba(g)|0;if((Aa(g)|0)!=0?(Ca(d,b)|0)!=0:0){e=8;break}if((Ka(d,g)|0)!=0){e=11;break}if((La(d,h)|0)==1){do{ra[e&127](c[h>>2]|0,c[j>>2]|0)}while((La(d,h)|0)==1)}if((Ja(a,g)|0)!=1){e=13;break}}if((e|0)==8){oa(1160,1072,32,1144)}else if((e|0)==11){oa(1200,1072,34,1144)}else if((e|0)==13){i=f;return 0}return 0}function Pa(a){a=a|0;var b=0;b=i;Fa(a)|0;Ra(a);i=b;return}function Qa(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;b=i;do{if(a>>>0<245){if(a>>>0<11){a=16}else{a=a+11&-8}v=a>>>3;p=c[312]|0;w=p>>>v;if((w&3|0)!=0){h=(w&1^1)+v|0;g=h<<1;e=1288+(g<<2)|0;g=1288+(g+2<<2)|0;j=c[g>>2]|0;d=j+8|0;f=c[d>>2]|0;do{if((e|0)!=(f|0)){if(f>>>0<(c[1264>>2]|0)>>>0){ja()}k=f+12|0;if((c[k>>2]|0)==(j|0)){c[k>>2]=e;c[g>>2]=f;break}else{ja()}}else{c[312]=p&~(1<>2]=H|3;H=j+(H|4)|0;c[H>>2]=c[H>>2]|1;H=d;i=b;return H|0}if(a>>>0>(c[1256>>2]|0)>>>0){if((w|0)!=0){h=2<>>12&16;h=h>>>d;f=h>>>5&8;h=h>>>f;g=h>>>2&4;h=h>>>g;e=h>>>1&2;h=h>>>e;j=h>>>1&1;j=(f|d|g|e|j)+(h>>>j)|0;h=j<<1;e=1288+(h<<2)|0;h=1288+(h+2<<2)|0;g=c[h>>2]|0;d=g+8|0;f=c[d>>2]|0;do{if((e|0)!=(f|0)){if(f>>>0<(c[1264>>2]|0)>>>0){ja()}k=f+12|0;if((c[k>>2]|0)==(g|0)){c[k>>2]=e;c[h>>2]=f;break}else{ja()}}else{c[312]=p&~(1<>2]=a|3;e=g+a|0;c[g+(a|4)>>2]=f|1;c[g+h>>2]=f;h=c[1256>>2]|0;if((h|0)!=0){g=c[1268>>2]|0;k=h>>>3;j=k<<1;h=1288+(j<<2)|0;l=c[312]|0;k=1<>2]|0;if(k>>>0<(c[1264>>2]|0)>>>0){ja()}else{D=j;C=k}}else{c[312]=l|k;D=1288+(j+2<<2)|0;C=h}c[D>>2]=g;c[C+12>>2]=g;c[g+8>>2]=C;c[g+12>>2]=h}c[1256>>2]=f;c[1268>>2]=e;H=d;i=b;return H|0}p=c[1252>>2]|0;if((p|0)!=0){e=(p&0-p)+ -1|0;G=e>>>12&16;e=e>>>G;F=e>>>5&8;e=e>>>F;H=e>>>2&4;e=e>>>H;f=e>>>1&2;e=e>>>f;d=e>>>1&1;d=c[1552+((F|G|H|f|d)+(e>>>d)<<2)>>2]|0;e=(c[d+4>>2]&-8)-a|0;f=d;while(1){g=c[f+16>>2]|0;if((g|0)==0){g=c[f+20>>2]|0;if((g|0)==0){break}}f=(c[g+4>>2]&-8)-a|0;H=f>>>0>>0;e=H?f:e;f=g;d=H?g:d}h=c[1264>>2]|0;if(d>>>0>>0){ja()}f=d+a|0;if(!(d>>>0>>0)){ja()}g=c[d+24>>2]|0;k=c[d+12>>2]|0;do{if((k|0)==(d|0)){k=d+20|0;j=c[k>>2]|0;if((j|0)==0){k=d+16|0;j=c[k>>2]|0;if((j|0)==0){B=0;break}}while(1){l=j+20|0;m=c[l>>2]|0;if((m|0)!=0){j=m;k=l;continue}m=j+16|0;l=c[m>>2]|0;if((l|0)==0){break}else{j=l;k=m}}if(k>>>0>>0){ja()}else{c[k>>2]=0;B=j;break}}else{j=c[d+8>>2]|0;if(j>>>0>>0){ja()}h=j+12|0;if((c[h>>2]|0)!=(d|0)){ja()}l=k+8|0;if((c[l>>2]|0)==(d|0)){c[h>>2]=k;c[l>>2]=j;B=k;break}else{ja()}}}while(0);do{if((g|0)!=0){h=c[d+28>>2]|0;j=1552+(h<<2)|0;if((d|0)==(c[j>>2]|0)){c[j>>2]=B;if((B|0)==0){c[1252>>2]=c[1252>>2]&~(1<>>0<(c[1264>>2]|0)>>>0){ja()}h=g+16|0;if((c[h>>2]|0)==(d|0)){c[h>>2]=B}else{c[g+20>>2]=B}if((B|0)==0){break}}if(B>>>0<(c[1264>>2]|0)>>>0){ja()}c[B+24>>2]=g;g=c[d+16>>2]|0;do{if((g|0)!=0){if(g>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[B+16>>2]=g;c[g+24>>2]=B;break}}}while(0);g=c[d+20>>2]|0;if((g|0)!=0){if(g>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[B+20>>2]=g;c[g+24>>2]=B;break}}}}while(0);if(e>>>0<16){H=e+a|0;c[d+4>>2]=H|3;H=d+(H+4)|0;c[H>>2]=c[H>>2]|1}else{c[d+4>>2]=a|3;c[d+(a|4)>>2]=e|1;c[d+(e+a)>>2]=e;h=c[1256>>2]|0;if((h|0)!=0){g=c[1268>>2]|0;l=h>>>3;j=l<<1;h=1288+(j<<2)|0;k=c[312]|0;l=1<>2]|0;if(k>>>0<(c[1264>>2]|0)>>>0){ja()}else{A=j;z=k}}else{c[312]=k|l;A=1288+(j+2<<2)|0;z=h}c[A>>2]=g;c[z+12>>2]=g;c[g+8>>2]=z;c[g+12>>2]=h}c[1256>>2]=e;c[1268>>2]=f}H=d+8|0;i=b;return H|0}}}else{if(!(a>>>0>4294967231)){z=a+11|0;a=z&-8;B=c[1252>>2]|0;if((B|0)!=0){A=0-a|0;z=z>>>8;if((z|0)!=0){if(a>>>0>16777215){C=31}else{G=(z+1048320|0)>>>16&8;H=z<>>16&4;H=H<>>16&2;C=14-(F|G|C)+(H<>>15)|0;C=a>>>(C+7|0)&1|C<<1}}else{C=0}D=c[1552+(C<<2)>>2]|0;a:do{if((D|0)==0){F=0;z=0}else{if((C|0)==31){z=0}else{z=25-(C>>>1)|0}F=0;E=a<>2]&-8;G=H-a|0;if(G>>>0>>0){if((H|0)==(a|0)){A=G;F=D;z=D;break a}else{A=G;z=D}}H=c[D+20>>2]|0;D=c[D+(E>>>31<<2)+16>>2]|0;F=(H|0)==0|(H|0)==(D|0)?F:H;if((D|0)==0){break}else{E=E<<1}}}}while(0);if((F|0)==0&(z|0)==0){H=2<>>12&16;H=H>>>D;C=H>>>5&8;H=H>>>C;E=H>>>2&4;H=H>>>E;G=H>>>1&2;H=H>>>G;F=H>>>1&1;F=c[1552+((C|D|E|G|F)+(H>>>F)<<2)>>2]|0}if((F|0)!=0){while(1){H=(c[F+4>>2]&-8)-a|0;B=H>>>0>>0;A=B?H:A;z=B?F:z;B=c[F+16>>2]|0;if((B|0)!=0){F=B;continue}F=c[F+20>>2]|0;if((F|0)==0){break}}}if((z|0)!=0?A>>>0<((c[1256>>2]|0)-a|0)>>>0:0){f=c[1264>>2]|0;if(z>>>0>>0){ja()}d=z+a|0;if(!(z>>>0>>0)){ja()}e=c[z+24>>2]|0;h=c[z+12>>2]|0;do{if((h|0)==(z|0)){h=z+20|0;g=c[h>>2]|0;if((g|0)==0){h=z+16|0;g=c[h>>2]|0;if((g|0)==0){x=0;break}}while(1){j=g+20|0;k=c[j>>2]|0;if((k|0)!=0){g=k;h=j;continue}j=g+16|0;k=c[j>>2]|0;if((k|0)==0){break}else{g=k;h=j}}if(h>>>0>>0){ja()}else{c[h>>2]=0;x=g;break}}else{g=c[z+8>>2]|0;if(g>>>0>>0){ja()}f=g+12|0;if((c[f>>2]|0)!=(z|0)){ja()}j=h+8|0;if((c[j>>2]|0)==(z|0)){c[f>>2]=h;c[j>>2]=g;x=h;break}else{ja()}}}while(0);do{if((e|0)!=0){g=c[z+28>>2]|0;f=1552+(g<<2)|0;if((z|0)==(c[f>>2]|0)){c[f>>2]=x;if((x|0)==0){c[1252>>2]=c[1252>>2]&~(1<>>0<(c[1264>>2]|0)>>>0){ja()}f=e+16|0;if((c[f>>2]|0)==(z|0)){c[f>>2]=x}else{c[e+20>>2]=x}if((x|0)==0){break}}if(x>>>0<(c[1264>>2]|0)>>>0){ja()}c[x+24>>2]=e;e=c[z+16>>2]|0;do{if((e|0)!=0){if(e>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[x+16>>2]=e;c[e+24>>2]=x;break}}}while(0);e=c[z+20>>2]|0;if((e|0)!=0){if(e>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[x+20>>2]=e;c[e+24>>2]=x;break}}}}while(0);b:do{if(!(A>>>0<16)){c[z+4>>2]=a|3;c[z+(a|4)>>2]=A|1;c[z+(A+a)>>2]=A;f=A>>>3;if(A>>>0<256){h=f<<1;e=1288+(h<<2)|0;g=c[312]|0;f=1<>2]|0;if(!(g>>>0<(c[1264>>2]|0)>>>0)){w=f;v=g;break}ja()}}while(0);c[w>>2]=d;c[v+12>>2]=d;c[z+(a+8)>>2]=v;c[z+(a+12)>>2]=e;break}e=A>>>8;if((e|0)!=0){if(A>>>0>16777215){e=31}else{G=(e+1048320|0)>>>16&8;H=e<>>16&4;H=H<>>16&2;e=14-(F|G|e)+(H<>>15)|0;e=A>>>(e+7|0)&1|e<<1}}else{e=0}f=1552+(e<<2)|0;c[z+(a+28)>>2]=e;c[z+(a+20)>>2]=0;c[z+(a+16)>>2]=0;h=c[1252>>2]|0;g=1<>2]=h|g;c[f>>2]=d;c[z+(a+24)>>2]=f;c[z+(a+12)>>2]=d;c[z+(a+8)>>2]=d;break}f=c[f>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}c:do{if((c[f+4>>2]&-8|0)!=(A|0)){e=A<>>31<<2)+16|0;h=c[g>>2]|0;if((h|0)==0){break}if((c[h+4>>2]&-8|0)==(A|0)){p=h;break c}else{e=e<<1;f=h}}if(g>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[g>>2]=d;c[z+(a+24)>>2]=f;c[z+(a+12)>>2]=d;c[z+(a+8)>>2]=d;break b}}else{p=f}}while(0);f=p+8|0;e=c[f>>2]|0;g=c[1264>>2]|0;if(p>>>0>>0){ja()}if(e>>>0>>0){ja()}else{c[e+12>>2]=d;c[f>>2]=d;c[z+(a+8)>>2]=e;c[z+(a+12)>>2]=p;c[z+(a+24)>>2]=0;break}}else{H=A+a|0;c[z+4>>2]=H|3;H=z+(H+4)|0;c[H>>2]=c[H>>2]|1}}while(0);H=z+8|0;i=b;return H|0}}}else{a=-1}}}while(0);p=c[1256>>2]|0;if(!(a>>>0>p>>>0)){e=p-a|0;d=c[1268>>2]|0;if(e>>>0>15){c[1268>>2]=d+a;c[1256>>2]=e;c[d+(a+4)>>2]=e|1;c[d+p>>2]=e;c[d+4>>2]=a|3}else{c[1256>>2]=0;c[1268>>2]=0;c[d+4>>2]=p|3;H=d+(p+4)|0;c[H>>2]=c[H>>2]|1}H=d+8|0;i=b;return H|0}p=c[1260>>2]|0;if(a>>>0

>>0){G=p-a|0;c[1260>>2]=G;H=c[1272>>2]|0;c[1272>>2]=H+a;c[H+(a+4)>>2]=G|1;c[H+4>>2]=a|3;H=H+8|0;i=b;return H|0}do{if((c[430]|0)==0){p=ia(30)|0;if((p+ -1&p|0)==0){c[1728>>2]=p;c[1724>>2]=p;c[1732>>2]=-1;c[1736>>2]=-1;c[1740>>2]=0;c[1692>>2]=0;c[430]=(ma(0)|0)&-16^1431655768;break}else{ja()}}}while(0);w=a+48|0;p=c[1728>>2]|0;x=a+47|0;z=p+x|0;p=0-p|0;v=z&p;if(!(v>>>0>a>>>0)){H=0;i=b;return H|0}A=c[1688>>2]|0;if((A|0)!=0?(G=c[1680>>2]|0,H=G+v|0,H>>>0<=G>>>0|H>>>0>A>>>0):0){H=0;i=b;return H|0}d:do{if((c[1692>>2]&4|0)==0){B=c[1272>>2]|0;e:do{if((B|0)!=0){A=1696|0;while(1){C=c[A>>2]|0;if(!(C>>>0>B>>>0)?(y=A+4|0,(C+(c[y>>2]|0)|0)>>>0>B>>>0):0){break}A=c[A+8>>2]|0;if((A|0)==0){o=182;break e}}if((A|0)!=0){B=z-(c[1260>>2]|0)&p;if(B>>>0<2147483647){p=la(B|0)|0;A=(p|0)==((c[A>>2]|0)+(c[y>>2]|0)|0);y=p;z=B;p=A?p:-1;A=A?B:0;o=191}else{A=0}}else{o=182}}else{o=182}}while(0);do{if((o|0)==182){p=la(0)|0;if((p|0)!=(-1|0)){z=p;A=c[1724>>2]|0;y=A+ -1|0;if((y&z|0)==0){A=v}else{A=v-z+(y+z&0-A)|0}y=c[1680>>2]|0;z=y+A|0;if(A>>>0>a>>>0&A>>>0<2147483647){H=c[1688>>2]|0;if((H|0)!=0?z>>>0<=y>>>0|z>>>0>H>>>0:0){A=0;break}y=la(A|0)|0;o=(y|0)==(p|0);z=A;p=o?p:-1;A=o?A:0;o=191}else{A=0}}else{A=0}}}while(0);f:do{if((o|0)==191){o=0-z|0;if((p|0)!=(-1|0)){q=A;o=202;break d}do{if((y|0)!=(-1|0)&z>>>0<2147483647&z>>>0>>0?(u=c[1728>>2]|0,u=x-z+u&0-u,u>>>0<2147483647):0){if((la(u|0)|0)==(-1|0)){la(o|0)|0;break f}else{z=u+z|0;break}}}while(0);if((y|0)!=(-1|0)){p=y;q=z;o=202;break d}}}while(0);c[1692>>2]=c[1692>>2]|4;o=199}else{A=0;o=199}}while(0);if((((o|0)==199?v>>>0<2147483647:0)?(t=la(v|0)|0,s=la(0)|0,(s|0)!=(-1|0)&(t|0)!=(-1|0)&t>>>0>>0):0)?(r=s-t|0,q=r>>>0>(a+40|0)>>>0,q):0){p=t;q=q?r:A;o=202}if((o|0)==202){r=(c[1680>>2]|0)+q|0;c[1680>>2]=r;if(r>>>0>(c[1684>>2]|0)>>>0){c[1684>>2]=r}r=c[1272>>2]|0;g:do{if((r|0)!=0){v=1696|0;while(1){t=c[v>>2]|0;u=v+4|0;s=c[u>>2]|0;if((p|0)==(t+s|0)){o=214;break}w=c[v+8>>2]|0;if((w|0)==0){break}else{v=w}}if(((o|0)==214?(c[v+12>>2]&8|0)==0:0)?r>>>0>=t>>>0&r>>>0

>>0:0){c[u>>2]=s+q;d=(c[1260>>2]|0)+q|0;e=r+8|0;if((e&7|0)==0){e=0}else{e=0-e&7}H=d-e|0;c[1272>>2]=r+e;c[1260>>2]=H;c[r+(e+4)>>2]=H|1;c[r+(d+4)>>2]=40;c[1276>>2]=c[1736>>2];break}if(p>>>0<(c[1264>>2]|0)>>>0){c[1264>>2]=p}t=p+q|0;s=1696|0;while(1){if((c[s>>2]|0)==(t|0)){o=224;break}u=c[s+8>>2]|0;if((u|0)==0){break}else{s=u}}if((o|0)==224?(c[s+12>>2]&8|0)==0:0){c[s>>2]=p;h=s+4|0;c[h>>2]=(c[h>>2]|0)+q;h=p+8|0;if((h&7|0)==0){h=0}else{h=0-h&7}j=p+(q+8)|0;if((j&7|0)==0){n=0}else{n=0-j&7}o=p+(n+q)|0;j=h+a|0;k=p+j|0;m=o-(p+h)-a|0;c[p+(h+4)>>2]=a|3;h:do{if((o|0)!=(c[1272>>2]|0)){if((o|0)==(c[1268>>2]|0)){H=(c[1256>>2]|0)+m|0;c[1256>>2]=H;c[1268>>2]=k;c[p+(j+4)>>2]=H|1;c[p+(H+j)>>2]=H;break}r=q+4|0;t=c[p+(r+n)>>2]|0;if((t&3|0)==1){a=t&-8;s=t>>>3;i:do{if(!(t>>>0<256)){l=c[p+((n|24)+q)>>2]|0;u=c[p+(q+12+n)>>2]|0;do{if((u|0)==(o|0)){u=n|16;t=p+(r+u)|0;s=c[t>>2]|0;if((s|0)==0){t=p+(u+q)|0;s=c[t>>2]|0;if((s|0)==0){g=0;break}}while(1){u=s+20|0;v=c[u>>2]|0;if((v|0)!=0){s=v;t=u;continue}u=s+16|0;v=c[u>>2]|0;if((v|0)==0){break}else{s=v;t=u}}if(t>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[t>>2]=0;g=s;break}}else{t=c[p+((n|8)+q)>>2]|0;if(t>>>0<(c[1264>>2]|0)>>>0){ja()}v=t+12|0;if((c[v>>2]|0)!=(o|0)){ja()}s=u+8|0;if((c[s>>2]|0)==(o|0)){c[v>>2]=u;c[s>>2]=t;g=u;break}else{ja()}}}while(0);if((l|0)==0){break}t=c[p+(q+28+n)>>2]|0;s=1552+(t<<2)|0;do{if((o|0)!=(c[s>>2]|0)){if(l>>>0<(c[1264>>2]|0)>>>0){ja()}s=l+16|0;if((c[s>>2]|0)==(o|0)){c[s>>2]=g}else{c[l+20>>2]=g}if((g|0)==0){break i}}else{c[s>>2]=g;if((g|0)!=0){break}c[1252>>2]=c[1252>>2]&~(1<>>0<(c[1264>>2]|0)>>>0){ja()}c[g+24>>2]=l;l=n|16;o=c[p+(l+q)>>2]|0;do{if((o|0)!=0){if(o>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[g+16>>2]=o;c[o+24>>2]=g;break}}}while(0);l=c[p+(r+l)>>2]|0;if((l|0)==0){break}if(l>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[g+20>>2]=l;c[l+24>>2]=g;break}}else{r=c[p+((n|8)+q)>>2]|0;g=c[p+(q+12+n)>>2]|0;t=1288+(s<<1<<2)|0;do{if((r|0)!=(t|0)){if(r>>>0<(c[1264>>2]|0)>>>0){ja()}if((c[r+12>>2]|0)==(o|0)){break}ja()}}while(0);if((g|0)==(r|0)){c[312]=c[312]&~(1<>>0<(c[1264>>2]|0)>>>0){ja()}s=g+8|0;if((c[s>>2]|0)==(o|0)){l=s;break}ja()}}while(0);c[r+12>>2]=g;c[l>>2]=r}}while(0);o=p+((a|n)+q)|0;m=a+m|0}g=o+4|0;c[g>>2]=c[g>>2]&-2;c[p+(j+4)>>2]=m|1;c[p+(m+j)>>2]=m;g=m>>>3;if(m>>>0<256){m=g<<1;d=1288+(m<<2)|0;l=c[312]|0;g=1<>2]|0;if(!(g>>>0<(c[1264>>2]|0)>>>0)){f=l;e=g;break}ja()}}while(0);c[f>>2]=k;c[e+12>>2]=k;c[p+(j+8)>>2]=e;c[p+(j+12)>>2]=d;break}e=m>>>8;do{if((e|0)==0){e=0}else{if(m>>>0>16777215){e=31;break}G=(e+1048320|0)>>>16&8;H=e<>>16&4;H=H<>>16&2;e=14-(F|G|e)+(H<>>15)|0;e=m>>>(e+7|0)&1|e<<1}}while(0);l=1552+(e<<2)|0;c[p+(j+28)>>2]=e;c[p+(j+20)>>2]=0;c[p+(j+16)>>2]=0;f=c[1252>>2]|0;g=1<>2]=f|g;c[l>>2]=k;c[p+(j+24)>>2]=l;c[p+(j+12)>>2]=k;c[p+(j+8)>>2]=k;break}l=c[l>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}j:do{if((c[l+4>>2]&-8|0)!=(m|0)){e=m<>>31<<2)+16|0;f=c[g>>2]|0;if((f|0)==0){break}if((c[f+4>>2]&-8|0)==(m|0)){d=f;break j}else{e=e<<1;l=f}}if(g>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[g>>2]=k;c[p+(j+24)>>2]=l;c[p+(j+12)>>2]=k;c[p+(j+8)>>2]=k;break h}}else{d=l}}while(0);f=d+8|0;e=c[f>>2]|0;g=c[1264>>2]|0;if(d>>>0>>0){ja()}if(e>>>0>>0){ja()}else{c[e+12>>2]=k;c[f>>2]=k;c[p+(j+8)>>2]=e;c[p+(j+12)>>2]=d;c[p+(j+24)>>2]=0;break}}else{H=(c[1260>>2]|0)+m|0;c[1260>>2]=H;c[1272>>2]=k;c[p+(j+4)>>2]=H|1}}while(0);H=p+(h|8)|0;i=b;return H|0}e=1696|0;while(1){d=c[e>>2]|0;if(!(d>>>0>r>>>0)?(n=c[e+4>>2]|0,m=d+n|0,m>>>0>r>>>0):0){break}e=c[e+8>>2]|0}e=d+(n+ -39)|0;if((e&7|0)==0){e=0}else{e=0-e&7}d=d+(n+ -47+e)|0;d=d>>>0<(r+16|0)>>>0?r:d;e=d+8|0;f=p+8|0;if((f&7|0)==0){f=0}else{f=0-f&7}H=q+ -40-f|0;c[1272>>2]=p+f;c[1260>>2]=H;c[p+(f+4)>>2]=H|1;c[p+(q+ -36)>>2]=40;c[1276>>2]=c[1736>>2];c[d+4>>2]=27;c[e+0>>2]=c[1696>>2];c[e+4>>2]=c[1700>>2];c[e+8>>2]=c[1704>>2];c[e+12>>2]=c[1708>>2];c[1696>>2]=p;c[1700>>2]=q;c[1708>>2]=0;c[1704>>2]=e;e=d+28|0;c[e>>2]=7;if((d+32|0)>>>0>>0){do{H=e;e=e+4|0;c[e>>2]=7}while((H+8|0)>>>0>>0)}if((d|0)!=(r|0)){d=d-r|0;e=r+(d+4)|0;c[e>>2]=c[e>>2]&-2;c[r+4>>2]=d|1;c[r+d>>2]=d;e=d>>>3;if(d>>>0<256){g=e<<1;d=1288+(g<<2)|0;f=c[312]|0;e=1<>2]|0;if(!(e>>>0<(c[1264>>2]|0)>>>0)){k=f;j=e;break}ja()}}while(0);c[k>>2]=r;c[j+12>>2]=r;c[r+8>>2]=j;c[r+12>>2]=d;break}e=d>>>8;if((e|0)!=0){if(d>>>0>16777215){e=31}else{G=(e+1048320|0)>>>16&8;H=e<>>16&4;H=H<>>16&2;e=14-(F|G|e)+(H<>>15)|0;e=d>>>(e+7|0)&1|e<<1}}else{e=0}j=1552+(e<<2)|0;c[r+28>>2]=e;c[r+20>>2]=0;c[r+16>>2]=0;f=c[1252>>2]|0;g=1<>2]=f|g;c[j>>2]=r;c[r+24>>2]=j;c[r+12>>2]=r;c[r+8>>2]=r;break}f=c[j>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}k:do{if((c[f+4>>2]&-8|0)!=(d|0)){e=d<>>31<<2)+16|0;g=c[j>>2]|0;if((g|0)==0){break}if((c[g+4>>2]&-8|0)==(d|0)){h=g;break k}else{e=e<<1;f=g}}if(j>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[j>>2]=r;c[r+24>>2]=f;c[r+12>>2]=r;c[r+8>>2]=r;break g}}else{h=f}}while(0);f=h+8|0;e=c[f>>2]|0;d=c[1264>>2]|0;if(h>>>0>>0){ja()}if(e>>>0>>0){ja()}else{c[e+12>>2]=r;c[f>>2]=r;c[r+8>>2]=e;c[r+12>>2]=h;c[r+24>>2]=0;break}}}else{H=c[1264>>2]|0;if((H|0)==0|p>>>0>>0){c[1264>>2]=p}c[1696>>2]=p;c[1700>>2]=q;c[1708>>2]=0;c[1284>>2]=c[430];c[1280>>2]=-1;d=0;do{H=d<<1;G=1288+(H<<2)|0;c[1288+(H+3<<2)>>2]=G;c[1288+(H+2<<2)>>2]=G;d=d+1|0}while((d|0)!=32);d=p+8|0;if((d&7|0)==0){d=0}else{d=0-d&7}H=q+ -40-d|0;c[1272>>2]=p+d;c[1260>>2]=H;c[p+(d+4)>>2]=H|1;c[p+(q+ -36)>>2]=40;c[1276>>2]=c[1736>>2]}}while(0);d=c[1260>>2]|0;if(d>>>0>a>>>0){G=d-a|0;c[1260>>2]=G;H=c[1272>>2]|0;c[1272>>2]=H+a;c[H+(a+4)>>2]=G|1;c[H+4>>2]=a|3;H=H+8|0;i=b;return H|0}}c[(pa()|0)>>2]=12;H=0;i=b;return H|0}function Ra(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;b=i;if((a|0)==0){i=b;return}q=a+ -8|0;r=c[1264>>2]|0;if(q>>>0>>0){ja()}o=c[a+ -4>>2]|0;n=o&3;if((n|0)==1){ja()}j=o&-8;h=a+(j+ -8)|0;do{if((o&1|0)==0){u=c[q>>2]|0;if((n|0)==0){i=b;return}q=-8-u|0;o=a+q|0;n=u+j|0;if(o>>>0>>0){ja()}if((o|0)==(c[1268>>2]|0)){d=a+(j+ -4)|0;if((c[d>>2]&3|0)!=3){d=o;m=n;break}c[1256>>2]=n;c[d>>2]=c[d>>2]&-2;c[a+(q+4)>>2]=n|1;c[h>>2]=n;i=b;return}t=u>>>3;if(u>>>0<256){d=c[a+(q+8)>>2]|0;m=c[a+(q+12)>>2]|0;p=1288+(t<<1<<2)|0;if((d|0)!=(p|0)){if(d>>>0>>0){ja()}if((c[d+12>>2]|0)!=(o|0)){ja()}}if((m|0)==(d|0)){c[312]=c[312]&~(1<>>0>>0){ja()}p=m+8|0;if((c[p>>2]|0)==(o|0)){s=p}else{ja()}}else{s=m+8|0}c[d+12>>2]=m;c[s>>2]=d;d=o;m=n;break}s=c[a+(q+24)>>2]|0;t=c[a+(q+12)>>2]|0;do{if((t|0)==(o|0)){u=a+(q+20)|0;t=c[u>>2]|0;if((t|0)==0){u=a+(q+16)|0;t=c[u>>2]|0;if((t|0)==0){p=0;break}}while(1){w=t+20|0;v=c[w>>2]|0;if((v|0)!=0){t=v;u=w;continue}v=t+16|0;w=c[v>>2]|0;if((w|0)==0){break}else{t=w;u=v}}if(u>>>0>>0){ja()}else{c[u>>2]=0;p=t;break}}else{u=c[a+(q+8)>>2]|0;if(u>>>0>>0){ja()}r=u+12|0;if((c[r>>2]|0)!=(o|0)){ja()}v=t+8|0;if((c[v>>2]|0)==(o|0)){c[r>>2]=t;c[v>>2]=u;p=t;break}else{ja()}}}while(0);if((s|0)!=0){t=c[a+(q+28)>>2]|0;r=1552+(t<<2)|0;if((o|0)==(c[r>>2]|0)){c[r>>2]=p;if((p|0)==0){c[1252>>2]=c[1252>>2]&~(1<>>0<(c[1264>>2]|0)>>>0){ja()}r=s+16|0;if((c[r>>2]|0)==(o|0)){c[r>>2]=p}else{c[s+20>>2]=p}if((p|0)==0){d=o;m=n;break}}if(p>>>0<(c[1264>>2]|0)>>>0){ja()}c[p+24>>2]=s;r=c[a+(q+16)>>2]|0;do{if((r|0)!=0){if(r>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[p+16>>2]=r;c[r+24>>2]=p;break}}}while(0);q=c[a+(q+20)>>2]|0;if((q|0)!=0){if(q>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[p+20>>2]=q;c[q+24>>2]=p;d=o;m=n;break}}else{d=o;m=n}}else{d=o;m=n}}else{d=q;m=j}}while(0);if(!(d>>>0>>0)){ja()}n=a+(j+ -4)|0;o=c[n>>2]|0;if((o&1|0)==0){ja()}if((o&2|0)==0){if((h|0)==(c[1272>>2]|0)){w=(c[1260>>2]|0)+m|0;c[1260>>2]=w;c[1272>>2]=d;c[d+4>>2]=w|1;if((d|0)!=(c[1268>>2]|0)){i=b;return}c[1268>>2]=0;c[1256>>2]=0;i=b;return}if((h|0)==(c[1268>>2]|0)){w=(c[1256>>2]|0)+m|0;c[1256>>2]=w;c[1268>>2]=d;c[d+4>>2]=w|1;c[d+w>>2]=w;i=b;return}m=(o&-8)+m|0;n=o>>>3;do{if(!(o>>>0<256)){l=c[a+(j+16)>>2]|0;q=c[a+(j|4)>>2]|0;do{if((q|0)==(h|0)){o=a+(j+12)|0;n=c[o>>2]|0;if((n|0)==0){o=a+(j+8)|0;n=c[o>>2]|0;if((n|0)==0){k=0;break}}while(1){p=n+20|0;q=c[p>>2]|0;if((q|0)!=0){n=q;o=p;continue}p=n+16|0;q=c[p>>2]|0;if((q|0)==0){break}else{n=q;o=p}}if(o>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[o>>2]=0;k=n;break}}else{o=c[a+j>>2]|0;if(o>>>0<(c[1264>>2]|0)>>>0){ja()}p=o+12|0;if((c[p>>2]|0)!=(h|0)){ja()}n=q+8|0;if((c[n>>2]|0)==(h|0)){c[p>>2]=q;c[n>>2]=o;k=q;break}else{ja()}}}while(0);if((l|0)!=0){n=c[a+(j+20)>>2]|0;o=1552+(n<<2)|0;if((h|0)==(c[o>>2]|0)){c[o>>2]=k;if((k|0)==0){c[1252>>2]=c[1252>>2]&~(1<>>0<(c[1264>>2]|0)>>>0){ja()}n=l+16|0;if((c[n>>2]|0)==(h|0)){c[n>>2]=k}else{c[l+20>>2]=k}if((k|0)==0){break}}if(k>>>0<(c[1264>>2]|0)>>>0){ja()}c[k+24>>2]=l;h=c[a+(j+8)>>2]|0;do{if((h|0)!=0){if(h>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[k+16>>2]=h;c[h+24>>2]=k;break}}}while(0);h=c[a+(j+12)>>2]|0;if((h|0)!=0){if(h>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[k+20>>2]=h;c[h+24>>2]=k;break}}}}else{k=c[a+j>>2]|0;a=c[a+(j|4)>>2]|0;j=1288+(n<<1<<2)|0;if((k|0)!=(j|0)){if(k>>>0<(c[1264>>2]|0)>>>0){ja()}if((c[k+12>>2]|0)!=(h|0)){ja()}}if((a|0)==(k|0)){c[312]=c[312]&~(1<>>0<(c[1264>>2]|0)>>>0){ja()}j=a+8|0;if((c[j>>2]|0)==(h|0)){l=j}else{ja()}}else{l=a+8|0}c[k+12>>2]=a;c[l>>2]=k}}while(0);c[d+4>>2]=m|1;c[d+m>>2]=m;if((d|0)==(c[1268>>2]|0)){c[1256>>2]=m;i=b;return}}else{c[n>>2]=o&-2;c[d+4>>2]=m|1;c[d+m>>2]=m}h=m>>>3;if(m>>>0<256){a=h<<1;e=1288+(a<<2)|0;j=c[312]|0;h=1<>2]|0;if(a>>>0<(c[1264>>2]|0)>>>0){ja()}else{f=h;g=a}}else{c[312]=j|h;f=1288+(a+2<<2)|0;g=e}c[f>>2]=d;c[g+12>>2]=d;c[d+8>>2]=g;c[d+12>>2]=e;i=b;return}f=m>>>8;if((f|0)!=0){if(m>>>0>16777215){f=31}else{v=(f+1048320|0)>>>16&8;w=f<>>16&4;w=w<>>16&2;f=14-(u|v|f)+(w<>>15)|0;f=m>>>(f+7|0)&1|f<<1}}else{f=0}g=1552+(f<<2)|0;c[d+28>>2]=f;c[d+20>>2]=0;c[d+16>>2]=0;a=c[1252>>2]|0;h=1<>2]|0;if((f|0)==31){f=0}else{f=25-(f>>>1)|0}b:do{if((c[g+4>>2]&-8|0)!=(m|0)){f=m<>>31<<2)+16|0;g=c[h>>2]|0;if((g|0)==0){break}if((c[g+4>>2]&-8|0)==(m|0)){e=g;break b}else{f=f<<1;a=g}}if(h>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[h>>2]=d;c[d+24>>2]=a;c[d+12>>2]=d;c[d+8>>2]=d;break a}}else{e=g}}while(0);g=e+8|0;f=c[g>>2]|0;h=c[1264>>2]|0;if(e>>>0>>0){ja()}if(f>>>0>>0){ja()}else{c[f+12>>2]=d;c[g>>2]=d;c[d+8>>2]=f;c[d+12>>2]=e;c[d+24>>2]=0;break}}else{c[1252>>2]=a|h;c[g>>2]=d;c[d+24>>2]=g;c[d+12>>2]=d;c[d+8>>2]=d}}while(0);w=(c[1280>>2]|0)+ -1|0;c[1280>>2]=w;if((w|0)==0){d=1704|0}else{i=b;return}while(1){d=c[d>>2]|0;if((d|0)==0){break}else{d=d+8|0}}c[1280>>2]=-1;i=b;return}function Sa(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;if((a|0)!=0){e=$(b,a)|0;if((b|a)>>>0>65535){e=((e>>>0)/(a>>>0)|0|0)==(b|0)?e:-1}}else{e=0}a=Qa(e)|0;if((a|0)==0){i=d;return a|0}if((c[a+ -4>>2]&3|0)==0){i=d;return a|0}ab(a|0,0,e|0)|0;i=d;return a|0}function Ta(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;do{if((a|0)!=0){if(b>>>0>4294967231){c[(pa()|0)>>2]=12;e=0;break}if(b>>>0<11){e=16}else{e=b+11&-8}e=Ua(a+ -8|0,e)|0;if((e|0)!=0){e=e+8|0;break}e=Qa(b)|0;if((e|0)==0){e=0}else{f=c[a+ -4>>2]|0;f=(f&-8)-((f&3|0)==0?8:4)|0;_a(e|0,a|0,(f>>>0>>0?f:b)|0)|0;Ra(a)}}else{e=Qa(b)|0}}while(0);i=d;return e|0}function Ua(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=i;e=a+4|0;g=c[e>>2]|0;j=g&-8;f=a+j|0;l=c[1264>>2]|0;if(a>>>0>>0){ja()}n=g&3;if(!((n|0)!=1&a>>>0>>0)){ja()}h=a+(j|4)|0;o=c[h>>2]|0;if((o&1|0)==0){ja()}if((n|0)==0){if(b>>>0<256){q=0;i=d;return q|0}if(!(j>>>0<(b+4|0)>>>0)?!((j-b|0)>>>0>c[1728>>2]<<1>>>0):0){q=a;i=d;return q|0}q=0;i=d;return q|0}if(!(j>>>0>>0)){f=j-b|0;if(!(f>>>0>15)){q=a;i=d;return q|0}c[e>>2]=g&1|b|2;c[a+(b+4)>>2]=f|3;c[h>>2]=c[h>>2]|1;Va(a+b|0,f);q=a;i=d;return q|0}if((f|0)==(c[1272>>2]|0)){f=(c[1260>>2]|0)+j|0;if(!(f>>>0>b>>>0)){q=0;i=d;return q|0}q=f-b|0;c[e>>2]=g&1|b|2;c[a+(b+4)>>2]=q|1;c[1272>>2]=a+b;c[1260>>2]=q;q=a;i=d;return q|0}if((f|0)==(c[1268>>2]|0)){h=(c[1256>>2]|0)+j|0;if(h>>>0>>0){q=0;i=d;return q|0}f=h-b|0;if(f>>>0>15){c[e>>2]=g&1|b|2;c[a+(b+4)>>2]=f|1;c[a+h>>2]=f;q=a+(h+4)|0;c[q>>2]=c[q>>2]&-2;b=a+b|0}else{c[e>>2]=g&1|h|2;b=a+(h+4)|0;c[b>>2]=c[b>>2]|1;b=0;f=0}c[1256>>2]=f;c[1268>>2]=b;q=a;i=d;return q|0}if((o&2|0)!=0){q=0;i=d;return q|0}h=(o&-8)+j|0;if(h>>>0>>0){q=0;i=d;return q|0}g=h-b|0;n=o>>>3;do{if(!(o>>>0<256)){m=c[a+(j+24)>>2]|0;o=c[a+(j+12)>>2]|0;do{if((o|0)==(f|0)){o=a+(j+20)|0;n=c[o>>2]|0;if((n|0)==0){o=a+(j+16)|0;n=c[o>>2]|0;if((n|0)==0){k=0;break}}while(1){q=n+20|0;p=c[q>>2]|0;if((p|0)!=0){n=p;o=q;continue}q=n+16|0;p=c[q>>2]|0;if((p|0)==0){break}else{n=p;o=q}}if(o>>>0>>0){ja()}else{c[o>>2]=0;k=n;break}}else{n=c[a+(j+8)>>2]|0;if(n>>>0>>0){ja()}p=n+12|0;if((c[p>>2]|0)!=(f|0)){ja()}l=o+8|0;if((c[l>>2]|0)==(f|0)){c[p>>2]=o;c[l>>2]=n;k=o;break}else{ja()}}}while(0);if((m|0)!=0){l=c[a+(j+28)>>2]|0;n=1552+(l<<2)|0;if((f|0)==(c[n>>2]|0)){c[n>>2]=k;if((k|0)==0){c[1252>>2]=c[1252>>2]&~(1<>>0<(c[1264>>2]|0)>>>0){ja()}l=m+16|0;if((c[l>>2]|0)==(f|0)){c[l>>2]=k}else{c[m+20>>2]=k}if((k|0)==0){break}}if(k>>>0<(c[1264>>2]|0)>>>0){ja()}c[k+24>>2]=m;f=c[a+(j+16)>>2]|0;do{if((f|0)!=0){if(f>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[k+16>>2]=f;c[f+24>>2]=k;break}}}while(0);f=c[a+(j+20)>>2]|0;if((f|0)!=0){if(f>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[k+20>>2]=f;c[f+24>>2]=k;break}}}}else{k=c[a+(j+8)>>2]|0;j=c[a+(j+12)>>2]|0;o=1288+(n<<1<<2)|0;if((k|0)!=(o|0)){if(k>>>0>>0){ja()}if((c[k+12>>2]|0)!=(f|0)){ja()}}if((j|0)==(k|0)){c[312]=c[312]&~(1<>>0>>0){ja()}l=j+8|0;if((c[l>>2]|0)==(f|0)){m=l}else{ja()}}else{m=j+8|0}c[k+12>>2]=j;c[m>>2]=k}}while(0);if(g>>>0<16){c[e>>2]=h|c[e>>2]&1|2;q=a+(h|4)|0;c[q>>2]=c[q>>2]|1;q=a;i=d;return q|0}else{c[e>>2]=c[e>>2]&1|b|2;c[a+(b+4)>>2]=g|3;q=a+(h|4)|0;c[q>>2]=c[q>>2]|1;Va(a+b|0,g);q=a;i=d;return q|0}return 0}function Va(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=i;h=a+b|0;l=c[a+4>>2]|0;do{if((l&1|0)==0){p=c[a>>2]|0;if((l&3|0)==0){i=d;return}l=a+(0-p)|0;m=p+b|0;q=c[1264>>2]|0;if(l>>>0>>0){ja()}if((l|0)==(c[1268>>2]|0)){e=a+(b+4)|0;if((c[e>>2]&3|0)!=3){e=l;n=m;break}c[1256>>2]=m;c[e>>2]=c[e>>2]&-2;c[a+(4-p)>>2]=m|1;c[h>>2]=m;i=d;return}s=p>>>3;if(p>>>0<256){e=c[a+(8-p)>>2]|0;n=c[a+(12-p)>>2]|0;o=1288+(s<<1<<2)|0;if((e|0)!=(o|0)){if(e>>>0>>0){ja()}if((c[e+12>>2]|0)!=(l|0)){ja()}}if((n|0)==(e|0)){c[312]=c[312]&~(1<>>0>>0){ja()}o=n+8|0;if((c[o>>2]|0)==(l|0)){r=o}else{ja()}}else{r=n+8|0}c[e+12>>2]=n;c[r>>2]=e;e=l;n=m;break}r=c[a+(24-p)>>2]|0;t=c[a+(12-p)>>2]|0;do{if((t|0)==(l|0)){u=16-p|0;t=a+(u+4)|0;s=c[t>>2]|0;if((s|0)==0){t=a+u|0;s=c[t>>2]|0;if((s|0)==0){o=0;break}}while(1){u=s+20|0;v=c[u>>2]|0;if((v|0)!=0){s=v;t=u;continue}v=s+16|0;u=c[v>>2]|0;if((u|0)==0){break}else{s=u;t=v}}if(t>>>0>>0){ja()}else{c[t>>2]=0;o=s;break}}else{s=c[a+(8-p)>>2]|0;if(s>>>0>>0){ja()}u=s+12|0;if((c[u>>2]|0)!=(l|0)){ja()}q=t+8|0;if((c[q>>2]|0)==(l|0)){c[u>>2]=t;c[q>>2]=s;o=t;break}else{ja()}}}while(0);if((r|0)!=0){q=c[a+(28-p)>>2]|0;s=1552+(q<<2)|0;if((l|0)==(c[s>>2]|0)){c[s>>2]=o;if((o|0)==0){c[1252>>2]=c[1252>>2]&~(1<>>0<(c[1264>>2]|0)>>>0){ja()}q=r+16|0;if((c[q>>2]|0)==(l|0)){c[q>>2]=o}else{c[r+20>>2]=o}if((o|0)==0){e=l;n=m;break}}if(o>>>0<(c[1264>>2]|0)>>>0){ja()}c[o+24>>2]=r;p=16-p|0;q=c[a+p>>2]|0;do{if((q|0)!=0){if(q>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[o+16>>2]=q;c[q+24>>2]=o;break}}}while(0);p=c[a+(p+4)>>2]|0;if((p|0)!=0){if(p>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[o+20>>2]=p;c[p+24>>2]=o;e=l;n=m;break}}else{e=l;n=m}}else{e=l;n=m}}else{e=a;n=b}}while(0);l=c[1264>>2]|0;if(h>>>0>>0){ja()}m=a+(b+4)|0;o=c[m>>2]|0;if((o&2|0)==0){if((h|0)==(c[1272>>2]|0)){v=(c[1260>>2]|0)+n|0;c[1260>>2]=v;c[1272>>2]=e;c[e+4>>2]=v|1;if((e|0)!=(c[1268>>2]|0)){i=d;return}c[1268>>2]=0;c[1256>>2]=0;i=d;return}if((h|0)==(c[1268>>2]|0)){v=(c[1256>>2]|0)+n|0;c[1256>>2]=v;c[1268>>2]=e;c[e+4>>2]=v|1;c[e+v>>2]=v;i=d;return}n=(o&-8)+n|0;m=o>>>3;do{if(!(o>>>0<256)){k=c[a+(b+24)>>2]|0;m=c[a+(b+12)>>2]|0;do{if((m|0)==(h|0)){o=a+(b+20)|0;m=c[o>>2]|0;if((m|0)==0){o=a+(b+16)|0;m=c[o>>2]|0;if((m|0)==0){j=0;break}}while(1){q=m+20|0;p=c[q>>2]|0;if((p|0)!=0){m=p;o=q;continue}p=m+16|0;q=c[p>>2]|0;if((q|0)==0){break}else{m=q;o=p}}if(o>>>0>>0){ja()}else{c[o>>2]=0;j=m;break}}else{o=c[a+(b+8)>>2]|0;if(o>>>0>>0){ja()}l=o+12|0;if((c[l>>2]|0)!=(h|0)){ja()}p=m+8|0;if((c[p>>2]|0)==(h|0)){c[l>>2]=m;c[p>>2]=o;j=m;break}else{ja()}}}while(0);if((k|0)!=0){l=c[a+(b+28)>>2]|0;m=1552+(l<<2)|0;if((h|0)==(c[m>>2]|0)){c[m>>2]=j;if((j|0)==0){c[1252>>2]=c[1252>>2]&~(1<>>0<(c[1264>>2]|0)>>>0){ja()}l=k+16|0;if((c[l>>2]|0)==(h|0)){c[l>>2]=j}else{c[k+20>>2]=j}if((j|0)==0){break}}if(j>>>0<(c[1264>>2]|0)>>>0){ja()}c[j+24>>2]=k;h=c[a+(b+16)>>2]|0;do{if((h|0)!=0){if(h>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[j+16>>2]=h;c[h+24>>2]=j;break}}}while(0);h=c[a+(b+20)>>2]|0;if((h|0)!=0){if(h>>>0<(c[1264>>2]|0)>>>0){ja()}else{c[j+20>>2]=h;c[h+24>>2]=j;break}}}}else{j=c[a+(b+8)>>2]|0;a=c[a+(b+12)>>2]|0;b=1288+(m<<1<<2)|0;if((j|0)!=(b|0)){if(j>>>0>>0){ja()}if((c[j+12>>2]|0)!=(h|0)){ja()}}if((a|0)==(j|0)){c[312]=c[312]&~(1<>>0>>0){ja()}b=a+8|0;if((c[b>>2]|0)==(h|0)){k=b}else{ja()}}else{k=a+8|0}c[j+12>>2]=a;c[k>>2]=j}}while(0);c[e+4>>2]=n|1;c[e+n>>2]=n;if((e|0)==(c[1268>>2]|0)){c[1256>>2]=n;i=d;return}}else{c[m>>2]=o&-2;c[e+4>>2]=n|1;c[e+n>>2]=n}a=n>>>3;if(n>>>0<256){b=a<<1;h=1288+(b<<2)|0;j=c[312]|0;a=1<>2]|0;if(a>>>0<(c[1264>>2]|0)>>>0){ja()}else{g=b;f=a}}else{c[312]=j|a;g=1288+(b+2<<2)|0;f=h}c[g>>2]=e;c[f+12>>2]=e;c[e+8>>2]=f;c[e+12>>2]=h;i=d;return}f=n>>>8;if((f|0)!=0){if(n>>>0>16777215){f=31}else{u=(f+1048320|0)>>>16&8;v=f<>>16&4;v=v<>>16&2;f=14-(t|u|f)+(v<>>15)|0;f=n>>>(f+7|0)&1|f<<1}}else{f=0}a=1552+(f<<2)|0;c[e+28>>2]=f;c[e+20>>2]=0;c[e+16>>2]=0;h=c[1252>>2]|0;g=1<>2]=h|g;c[a>>2]=e;c[e+24>>2]=a;c[e+12>>2]=e;c[e+8>>2]=e;i=d;return}g=c[a>>2]|0;if((f|0)==31){f=0}else{f=25-(f>>>1)|0}a:do{if((c[g+4>>2]&-8|0)!=(n|0)){f=n<>>31<<2)+16|0;g=c[h>>2]|0;if((g|0)==0){break}if((c[g+4>>2]&-8|0)==(n|0)){break a}else{f=f<<1;a=g}}if(h>>>0<(c[1264>>2]|0)>>>0){ja()}c[h>>2]=e;c[e+24>>2]=a;c[e+12>>2]=e;c[e+8>>2]=e;i=d;return}}while(0);f=g+8|0;a=c[f>>2]|0;h=c[1264>>2]|0;if(g>>>0>>0){ja()}if(a>>>0>>0){ja()}c[a+12>>2]=e;c[f>>2]=e;c[e+8>>2]=a;c[e+12>>2]=g;c[e+24>>2]=0;i=d;return}function Wa(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;g=d&255;j=(e|0)==0;a:do{if((b&3|0)==0|j){h=5}else{h=d&255;while(1){if((a[b>>0]|0)==h<<24>>24){h=6;break a}b=b+1|0;e=e+ -1|0;j=(e|0)==0;if((b&3|0)==0|j){h=5;break}}}}while(0);if((h|0)==5){if(j){e=0}else{h=6}}b:do{if((h|0)==6){d=d&255;if(!((a[b>>0]|0)==d<<24>>24)){g=$(g,16843009)|0;c:do{if(e>>>0>3){do{j=c[b>>2]^g;if(((j&-2139062144^-2139062144)&j+ -16843009|0)!=0){break c}b=b+4|0;e=e+ -4|0}while(e>>>0>3)}}while(0);if((e|0)==0){e=0}else{while(1){if((a[b>>0]|0)==d<<24>>24){break b}b=b+1|0;e=e+ -1|0;if((e|0)==0){e=0;break}}}}}}while(0);i=f;return((e|0)!=0?b:0)|0}function Xa(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=i;a:do{if((d|0)==0){d=0}else{while(1){f=a[b>>0]|0;g=a[c>>0]|0;if(!(f<<24>>24==g<<24>>24)){break}d=d+ -1|0;if((d|0)==0){d=0;break a}else{b=b+1|0;c=c+1|0}}d=(f&255)-(g&255)|0}}while(0);i=e;return d|0}function Ya(){}function Za(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return(D=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function _a(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((e|0)>=4096)return na(b|0,d|0,e|0)|0;f=b|0;if((b&3)==(d&3)){while(b&3){if((e|0)==0)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function $a(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{_a(b,c,d)|0}return b|0}function ab(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;i=b&3;h=d|d<<8|d<<16|d<<24;g=f&~3;if(i){i=b+4-i|0;while((b|0)<(i|0)){a[b>>0]=d;b=b+1|0}}while((b|0)<(g|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return b-e|0}function bb(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){D=b<>>32-c;return a<>0]|0){c=c+1|0}return c-b|0}function db(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;b=b-d-(c>>>0>a>>>0|0)>>>0;return(D=b,a-c>>>0|0)|0}function eb(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){D=b>>>c;return a>>>c|(b&(1<>>c-32|0}function fb(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){D=b>>c;return a>>>c|(b&(1<>c-32|0}function gb(b){b=b|0;var c=0;c=a[n+(b>>>24)>>0]|0;if((c|0)<8)return c|0;c=a[n+(b>>16&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[n+(b>>8&255)>>0]|0;if((c|0)<8)return c+16|0;return(a[n+(b&255)>>0]|0)+24|0}function hb(b){b=b|0;var c=0;c=a[m+(b&255)>>0]|0;if((c|0)<8)return c|0;c=a[m+(b>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[m+(b>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return(a[m+(b>>>24)>>0]|0)+24|0}function ib(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;d=b&65535;c=$(d,f)|0;e=a>>>16;d=(c>>>16)+($(d,e)|0)|0;b=b>>>16;a=$(b,f)|0;return(D=(d>>>16)+($(b,e)|0)+(((d&65535)+a|0)>>>16)|0,d+a<<16|c&65535|0)|0}function jb(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=b>>31|((b|0)<0?-1:0)<<1;i=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;f=d>>31|((d|0)<0?-1:0)<<1;e=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;h=db(j^a,i^b,j,i)|0;g=D;b=f^j;a=e^i;a=db((ob(h,g,db(f^c,e^d,f,e)|0,D,0)|0)^b,D^a,b,a)|0;return a|0}function kb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+8|0;j=f|0;h=b>>31|((b|0)<0?-1:0)<<1;g=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;l=e>>31|((e|0)<0?-1:0)<<1;k=((e|0)<0?-1:0)>>31|((e|0)<0?-1:0)<<1;b=db(h^a,g^b,h,g)|0;a=D;ob(b,a,db(l^d,k^e,l,k)|0,D,j)|0;a=db(c[j>>2]^h,c[j+4>>2]^g,h,g)|0;b=D;i=f;return(D=b,a)|0}function lb(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;a=ib(e,f)|0;c=D;return(D=($(b,f)|0)+($(d,e)|0)+c|c&0,a|0|0)|0}function mb(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=ob(a,b,c,d,0)|0;return a|0}function nb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;g=i;i=i+8|0;f=g|0;ob(a,b,d,e,f)|0;i=g;return(D=c[f+4>>2]|0,c[f>>2]|0)|0}function ob(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;h=a;j=b;i=j;l=d;g=e;k=g;if((i|0)==0){g=(f|0)!=0;if((k|0)==0){if(g){c[f>>2]=(h>>>0)%(l>>>0);c[f+4>>2]=0}k=0;m=(h>>>0)/(l>>>0)>>>0;return(D=k,m)|0}else{if(!g){l=0;m=0;return(D=l,m)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;l=0;m=0;return(D=l,m)|0}}m=(k|0)==0;do{if((l|0)!=0){if(!m){k=(gb(k|0)|0)-(gb(i|0)|0)|0;if(k>>>0<=31){m=k+1|0;l=31-k|0;a=k-31>>31;j=m;b=h>>>(m>>>0)&a|i<>>(m>>>0)&a;k=0;l=h<>2]=a|0;c[f+4>>2]=j|b&0;l=0;m=0;return(D=l,m)|0}k=l-1|0;if((k&l|0)!=0){l=(gb(l|0)|0)+33-(gb(i|0)|0)|0;p=64-l|0;m=32-l|0;n=m>>31;o=l-32|0;a=o>>31;j=l;b=m-1>>31&i>>>(o>>>0)|(i<>>(l>>>0))&a;a=a&i>>>(l>>>0);k=h<>>(o>>>0))&n|h<>31;break}if((f|0)!=0){c[f>>2]=k&h;c[f+4>>2]=0}if((l|0)==1){o=j|b&0;p=a|0|0;return(D=o,p)|0}else{p=hb(l|0)|0;o=i>>>(p>>>0)|0;p=i<<32-p|h>>>(p>>>0)|0;return(D=o,p)|0}}else{if(m){if((f|0)!=0){c[f>>2]=(i>>>0)%(l>>>0);c[f+4>>2]=0}o=0;p=(i>>>0)/(l>>>0)>>>0;return(D=o,p)|0}if((h|0)==0){if((f|0)!=0){c[f>>2]=0;c[f+4>>2]=(i>>>0)%(k>>>0)}o=0;p=(i>>>0)/(k>>>0)>>>0;return(D=o,p)|0}l=k-1|0;if((l&k|0)==0){if((f|0)!=0){c[f>>2]=a|0;c[f+4>>2]=l&i|b&0}o=0;p=i>>>((hb(k|0)|0)>>>0);return(D=o,p)|0}k=(gb(k|0)|0)-(gb(i|0)|0)|0;if(k>>>0<=30){a=k+1|0;l=31-k|0;j=a;b=i<>>(a>>>0);a=i>>>(a>>>0);k=0;l=h<>2]=a|0;c[f+4>>2]=j|b&0;o=0;p=0;return(D=o,p)|0}}while(0);if((j|0)==0){g=l;e=0;i=0}else{h=d|0|0;g=g|e&0;e=Za(h,g,-1,-1)|0;d=D;i=0;do{m=l;l=k>>>31|l<<1;k=i|k<<1;m=b<<1|m>>>31|0;n=b>>>31|a<<1|0;db(e,d,m,n)|0;p=D;o=p>>31|((p|0)<0?-1:0)<<1;i=o&1;b=db(m,n,o&h,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&g)|0;a=D;j=j-1|0}while((j|0)!=0);g=l;e=0}h=0;if((f|0)!=0){c[f>>2]=b;c[f+4>>2]=a}o=(k|0)>>>31|(g|h)<<1|(h<<1|k>>>31)&0|e;p=(k<<1|0>>>31)&-2|i;return(D=o,p)|0}function pb(a,b,c){a=a|0;b=b|0;c=c|0;ra[a&127](b|0,c|0)}function qb(a,b){a=a|0;b=b|0;fa(0,a|0,b|0)}function rb(a,b){a=a|0;b=b|0;fa(1,a|0,b|0)}function sb(a,b){a=a|0;b=b|0;fa(2,a|0,b|0)}function tb(a,b){a=a|0;b=b|0;fa(3,a|0,b|0)}function ub(a,b){a=a|0;b=b|0;fa(4,a|0,b|0)}function vb(a,b){a=a|0;b=b|0;fa(5,a|0,b|0)}function wb(a,b){a=a|0;b=b|0;fa(6,a|0,b|0)}function xb(a,b){a=a|0;b=b|0;fa(7,a|0,b|0)}function yb(a,b){a=a|0;b=b|0;fa(8,a|0,b|0)}function zb(a,b){a=a|0;b=b|0;fa(9,a|0,b|0)}function Ab(a,b){a=a|0;b=b|0;fa(10,a|0,b|0)}function Bb(a,b){a=a|0;b=b|0;fa(11,a|0,b|0)}function Cb(a,b){a=a|0;b=b|0;fa(12,a|0,b|0)}function Db(a,b){a=a|0;b=b|0;fa(13,a|0,b|0)}function Eb(a,b){a=a|0;b=b|0;fa(14,a|0,b|0)}function Fb(a,b){a=a|0;b=b|0;fa(15,a|0,b|0)}function Gb(a,b){a=a|0;b=b|0;fa(16,a|0,b|0)}function Hb(a,b){a=a|0;b=b|0;fa(17,a|0,b|0)}function Ib(a,b){a=a|0;b=b|0;fa(18,a|0,b|0)}function Jb(a,b){a=a|0;b=b|0;fa(19,a|0,b|0)}function Kb(a,b){a=a|0;b=b|0;fa(20,a|0,b|0)}function Lb(a,b){a=a|0;b=b|0;fa(21,a|0,b|0)}function Mb(a,b){a=a|0;b=b|0;fa(22,a|0,b|0)}function Nb(a,b){a=a|0;b=b|0;fa(23,a|0,b|0)}function Ob(a,b){a=a|0;b=b|0;fa(24,a|0,b|0)}function Pb(a,b){a=a|0;b=b|0;fa(25,a|0,b|0)}function Qb(a,b){a=a|0;b=b|0;fa(26,a|0,b|0)}function Rb(a,b){a=a|0;b=b|0;fa(27,a|0,b|0)}function Sb(a,b){a=a|0;b=b|0;fa(28,a|0,b|0)}function Tb(a,b){a=a|0;b=b|0;fa(29,a|0,b|0)}function Ub(a,b){a=a|0;b=b|0;fa(30,a|0,b|0)}function Vb(a,b){a=a|0;b=b|0;fa(31,a|0,b|0)}function Wb(a,b){a=a|0;b=b|0;fa(32,a|0,b|0)}function Xb(a,b){a=a|0;b=b|0;fa(33,a|0,b|0)}function Yb(a,b){a=a|0;b=b|0;fa(34,a|0,b|0)}function Zb(a,b){a=a|0;b=b|0;fa(35,a|0,b|0)}function _b(a,b){a=a|0;b=b|0;fa(36,a|0,b|0)}function $b(a,b){a=a|0;b=b|0;fa(37,a|0,b|0)}function ac(a,b){a=a|0;b=b|0;fa(38,a|0,b|0)}function bc(a,b){a=a|0;b=b|0;fa(39,a|0,b|0)}function cc(a,b){a=a|0;b=b|0;fa(40,a|0,b|0)}function dc(a,b){a=a|0;b=b|0;fa(41,a|0,b|0)}function ec(a,b){a=a|0;b=b|0;fa(42,a|0,b|0)}function fc(a,b){a=a|0;b=b|0;fa(43,a|0,b|0)}function gc(a,b){a=a|0;b=b|0;fa(44,a|0,b|0)}function hc(a,b){a=a|0;b=b|0;fa(45,a|0,b|0)}function ic(a,b){a=a|0;b=b|0;fa(46,a|0,b|0)}function jc(a,b){a=a|0;b=b|0;fa(47,a|0,b|0)}function kc(a,b){a=a|0;b=b|0;fa(48,a|0,b|0)}function lc(a,b){a=a|0;b=b|0;fa(49,a|0,b|0)}function mc(a,b){a=a|0;b=b|0;aa(0)} - - - - -// EMSCRIPTEN_END_FUNCS -var ra=[mc,mc,qb,mc,rb,mc,sb,mc,tb,mc,ub,mc,vb,mc,wb,mc,xb,mc,yb,mc,zb,mc,Ab,mc,Bb,mc,Cb,mc,Db,mc,Eb,mc,Fb,mc,Gb,mc,Hb,mc,Ib,mc,Jb,mc,Kb,mc,Lb,mc,Mb,mc,Nb,mc,Ob,mc,Pb,mc,Qb,mc,Rb,mc,Sb,mc,Tb,mc,Ub,mc,Vb,mc,Wb,mc,Xb,mc,Yb,mc,Zb,mc,_b,mc,$b,mc,ac,mc,bc,mc,cc,mc,dc,mc,ec,mc,fc,mc,gc,mc,hc,mc,ic,mc,jc,mc,kc,mc,lc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc,mc];return{_strlen:cb,_free:Ra,_AVOggDestroy:Pa,_AVOggInit:Na,_i64Add:Za,_AVOggRead:Oa,_realloc:Ta,_memset:ab,_malloc:Qa,_memcpy:_a,_memmove:$a,_calloc:Sa,_bitshift64Shl:bb,runPostSets:Ya,stackAlloc:sa,stackSave:ta,stackRestore:ua,setThrew:va,setTempRet0:ya,getTempRet0:za,dynCall_vii:pb} -// EMSCRIPTEN_END_ASM - -})({"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array},{"abort":abort,"assert":assert,"asmPrintInt":asmPrintInt,"asmPrintFloat":asmPrintFloat,"min":Math_min,"jsCall":jsCall,"invoke_vii":invoke_vii,"_fflush":_fflush,"_sysconf":_sysconf,"_abort":_abort,"___setErrNo":___setErrNo,"_sbrk":_sbrk,"_time":_time,"_emscripten_memcpy_big":_emscripten_memcpy_big,"___assert_fail":___assert_fail,"___errno_location":___errno_location,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"cttz_i8":cttz_i8,"ctlz_i8":ctlz_i8,"NaN":NaN,"Infinity":Infinity},buffer);var _strlen=Module["_strlen"]=asm["_strlen"];var _free=Module["_free"]=asm["_free"];var _AVOggDestroy=Module["_AVOggDestroy"]=asm["_AVOggDestroy"];var _AVOggInit=Module["_AVOggInit"]=asm["_AVOggInit"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _AVOggRead=Module["_AVOggRead"]=asm["_AVOggRead"];var _realloc=Module["_realloc"]=asm["_realloc"];var _memset=Module["_memset"]=asm["_memset"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _memmove=Module["_memmove"]=asm["_memmove"];var _calloc=Module["_calloc"]=asm["_calloc"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];Runtime.stackAlloc=asm["stackAlloc"];Runtime.stackSave=asm["stackSave"];Runtime.stackRestore=asm["stackRestore"];Runtime.setTempRet0=asm["setTempRet0"];Runtime.getTempRet0=asm["getTempRet0"];var i64Math=(function(){var goog={math:{}};goog.math.Long=(function(low,high){this.low_=low|0;this.high_=high|0});goog.math.Long.IntCache_={};goog.math.Long.fromInt=(function(value){if(-128<=value&&value<128){var cachedObj=goog.math.Long.IntCache_[value];if(cachedObj){return cachedObj}}var obj=new goog.math.Long(value|0,value<0?-1:0);if(-128<=value&&value<128){goog.math.Long.IntCache_[value]=obj}return obj});goog.math.Long.fromNumber=(function(value){if(isNaN(value)||!isFinite(value)){return goog.math.Long.ZERO}else if(value<=-goog.math.Long.TWO_PWR_63_DBL_){return goog.math.Long.MIN_VALUE}else if(value+1>=goog.math.Long.TWO_PWR_63_DBL_){return goog.math.Long.MAX_VALUE}else if(value<0){return goog.math.Long.fromNumber(-value).negate()}else{return new goog.math.Long(value%goog.math.Long.TWO_PWR_32_DBL_|0,value/goog.math.Long.TWO_PWR_32_DBL_|0)}});goog.math.Long.fromBits=(function(lowBits,highBits){return new goog.math.Long(lowBits,highBits)});goog.math.Long.fromString=(function(str,opt_radix){if(str.length==0){throw Error("number format error: empty string")}var radix=opt_radix||10;if(radix<2||36=0){throw Error('number format error: interior "-" character: '+str)}var radixToPower=goog.math.Long.fromNumber(Math.pow(radix,8));var result=goog.math.Long.ZERO;for(var i=0;i=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_});goog.math.Long.prototype.getNumBitsAbs=(function(){if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){return 64}else{return this.negate().getNumBitsAbs()}}else{var val=this.high_!=0?this.high_:this.low_;for(var bit=31;bit>0;bit--){if((val&1<0});goog.math.Long.prototype.greaterThanOrEqual=(function(other){return this.compare(other)>=0});goog.math.Long.prototype.compare=(function(other){if(this.equals(other)){return 0}var thisNeg=this.isNegative();var otherNeg=other.isNegative();if(thisNeg&&!otherNeg){return-1}if(!thisNeg&&otherNeg){return 1}if(this.subtract(other).isNegative()){return-1}else{return 1}});goog.math.Long.prototype.negate=(function(){if(this.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.MIN_VALUE}else{return this.not().add(goog.math.Long.ONE)}});goog.math.Long.prototype.add=(function(other){var a48=this.high_>>>16;var a32=this.high_&65535;var a16=this.low_>>>16;var a00=this.low_&65535;var b48=other.high_>>>16;var b32=other.high_&65535;var b16=other.low_>>>16;var b00=other.low_&65535;var c48=0,c32=0,c16=0,c00=0;c00+=a00+b00;c16+=c00>>>16;c00&=65535;c16+=a16+b16;c32+=c16>>>16;c16&=65535;c32+=a32+b32;c48+=c32>>>16;c32&=65535;c48+=a48+b48;c48&=65535;return goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)});goog.math.Long.prototype.subtract=(function(other){return this.add(other.negate())});goog.math.Long.prototype.multiply=(function(other){if(this.isZero()){return goog.math.Long.ZERO}else if(other.isZero()){return goog.math.Long.ZERO}if(this.equals(goog.math.Long.MIN_VALUE)){return other.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO}else if(other.equals(goog.math.Long.MIN_VALUE)){return this.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO}if(this.isNegative()){if(other.isNegative()){return this.negate().multiply(other.negate())}else{return this.negate().multiply(other).negate()}}else if(other.isNegative()){return this.multiply(other.negate()).negate()}if(this.lessThan(goog.math.Long.TWO_PWR_24_)&&other.lessThan(goog.math.Long.TWO_PWR_24_)){return goog.math.Long.fromNumber(this.toNumber()*other.toNumber())}var a48=this.high_>>>16;var a32=this.high_&65535;var a16=this.low_>>>16;var a00=this.low_&65535;var b48=other.high_>>>16;var b32=other.high_&65535;var b16=other.low_>>>16;var b00=other.low_&65535;var c48=0,c32=0,c16=0,c00=0;c00+=a00*b00;c16+=c00>>>16;c00&=65535;c16+=a16*b00;c32+=c16>>>16;c16&=65535;c16+=a00*b16;c32+=c16>>>16;c16&=65535;c32+=a32*b00;c48+=c32>>>16;c32&=65535;c32+=a16*b16;c48+=c32>>>16;c32&=65535;c32+=a00*b32;c48+=c32>>>16;c32&=65535;c48+=a48*b00+a32*b16+a16*b32+a00*b48;c48&=65535;return goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)});goog.math.Long.prototype.div=(function(other){if(other.isZero()){throw Error("division by zero")}else if(this.isZero()){return goog.math.Long.ZERO}if(this.equals(goog.math.Long.MIN_VALUE)){if(other.equals(goog.math.Long.ONE)||other.equals(goog.math.Long.NEG_ONE)){return goog.math.Long.MIN_VALUE}else if(other.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.ONE}else{var halfThis=this.shiftRight(1);var approx=halfThis.div(other).shiftLeft(1);if(approx.equals(goog.math.Long.ZERO)){return other.isNegative()?goog.math.Long.ONE:goog.math.Long.NEG_ONE}else{var rem=this.subtract(other.multiply(approx));var result=approx.add(rem.div(other));return result}}}else if(other.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.ZERO}if(this.isNegative()){if(other.isNegative()){return this.negate().div(other.negate())}else{return this.negate().div(other).negate()}}else if(other.isNegative()){return this.div(other.negate()).negate()}var res=goog.math.Long.ZERO;var rem=this;while(rem.greaterThanOrEqual(other)){var approx=Math.max(1,Math.floor(rem.toNumber()/other.toNumber()));var log2=Math.ceil(Math.log(approx)/Math.LN2);var delta=log2<=48?1:Math.pow(2,log2-48);var approxRes=goog.math.Long.fromNumber(approx);var approxRem=approxRes.multiply(other);while(approxRem.isNegative()||approxRem.greaterThan(rem)){approx-=delta;approxRes=goog.math.Long.fromNumber(approx);approxRem=approxRes.multiply(other)}if(approxRes.isZero()){approxRes=goog.math.Long.ONE}res=res.add(approxRes);rem=rem.subtract(approxRem)}return res});goog.math.Long.prototype.modulo=(function(other){return this.subtract(this.div(other).multiply(other))});goog.math.Long.prototype.not=(function(){return goog.math.Long.fromBits(~this.low_,~this.high_)});goog.math.Long.prototype.and=(function(other){return goog.math.Long.fromBits(this.low_&other.low_,this.high_&other.high_)});goog.math.Long.prototype.or=(function(other){return goog.math.Long.fromBits(this.low_|other.low_,this.high_|other.high_)});goog.math.Long.prototype.xor=(function(other){return goog.math.Long.fromBits(this.low_^other.low_,this.high_^other.high_)});goog.math.Long.prototype.shiftLeft=(function(numBits){numBits&=63;if(numBits==0){return this}else{var low=this.low_;if(numBits<32){var high=this.high_;return goog.math.Long.fromBits(low<>>32-numBits)}else{return goog.math.Long.fromBits(0,low<>>numBits|high<<32-numBits,high>>numBits)}else{return goog.math.Long.fromBits(high>>numBits-32,high>=0?0:-1)}}});goog.math.Long.prototype.shiftRightUnsigned=(function(numBits){numBits&=63;if(numBits==0){return this}else{var high=this.high_;if(numBits<32){var low=this.low_;return goog.math.Long.fromBits(low>>>numBits|high<<32-numBits,high>>>numBits)}else if(numBits==32){return goog.math.Long.fromBits(high,0)}else{return goog.math.Long.fromBits(high>>>numBits-32,0)}}});var navigator={appName:"Modern Browser"};var dbits;var canary=0xdeadbeefcafe;var j_lm=(canary&16777215)==15715070;function BigInteger(a,b,c){if(a!=null)if("number"==typeof a)this.fromNumber(a,b,c);else if(b==null&&"string"!=typeof a)this.fromString(a,256);else this.fromString(a,b)}function nbi(){return new BigInteger(null)}function am1(i,x,w,j,c,n){while(--n>=0){var v=x*this[i++]+w[j]+c;c=Math.floor(v/67108864);w[j++]=v&67108863}return c}function am2(i,x,w,j,c,n){var xl=x&32767,xh=x>>15;while(--n>=0){var l=this[i]&32767;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&32767)<<15)+w[j]+(c&1073741823);c=(l>>>30)+(m>>>15)+xh*h+(c>>>30);w[j++]=l&1073741823}return c}function am3(i,x,w,j,c,n){var xl=x&16383,xh=x>>14;while(--n>=0){var l=this[i]&16383;var h=this[i++]>>14;var m=xh*l+h*xl;l=xl*l+((m&16383)<<14)+w[j]+c;c=(l>>28)+(m>>14)+xh*h;w[j++]=l&268435455}return c}if(j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}else if(j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<=0;--i)r[i]=this[i];r.t=this.t;r.s=this.s}function bnpFromInt(x){this.t=1;this.s=x<0?-1:0;if(x>0)this[0]=x;else if(x<-1)this[0]=x+DV;else this.t=0}function nbv(i){var r=nbi();r.fromInt(i);return r}function bnpFromString(s,b){var k;if(b==16)k=4;else if(b==8)k=3;else if(b==256)k=8;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else{this.fromRadix(s,b);return}this.t=0;this.s=0;var i=s.length,mi=false,sh=0;while(--i>=0){var x=k==8?s[i]&255:intAt(s,i);if(x<0){if(s.charAt(i)=="-")mi=true;continue}mi=false;if(sh==0)this[this.t++]=x;else if(sh+k>this.DB){this[this.t-1]|=(x&(1<>this.DB-sh}else this[this.t-1]|=x<=this.DB)sh-=this.DB}if(k==8&&(s[0]&128)!=0){this.s=-1;if(sh>0)this[this.t-1]|=(1<0&&this[this.t-1]==c)--this.t}function bnToString(b){if(this.s<0)return"-"+this.negate().toString(b);var k;if(b==16)k=4;else if(b==8)k=3;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else return this.toRadix(b);var km=(1<0){if(p>p)>0){m=true;r=int2char(d)}while(i>=0){if(p>(p+=this.DB-k)}else{d=this[i]>>(p-=k)&km;if(p<=0){p+=this.DB;--i}}if(d>0)m=true;if(m)r+=int2char(d)}}return m?r:"0"}function bnNegate(){var r=nbi();BigInteger.ZERO.subTo(this,r);return r}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var r=this.s-a.s;if(r!=0)return r;var i=this.t;r=i-a.t;if(r!=0)return this.s<0?-r:r;while(--i>=0)if((r=this[i]-a[i])!=0)return r;return 0}function nbits(x){var r=1,t;if((t=x>>>16)!=0){x=t;r+=16}if((t=x>>8)!=0){x=t;r+=8}if((t=x>>4)!=0){x=t;r+=4}if((t=x>>2)!=0){x=t;r+=2}if((t=x>>1)!=0){x=t;r+=1}return r}function bnBitLength(){if(this.t<=0)return 0;return this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(n,r){var i;for(i=this.t-1;i>=0;--i)r[i+n]=this[i];for(i=n-1;i>=0;--i)r[i]=0;r.t=this.t+n;r.s=this.s}function bnpDRShiftTo(n,r){for(var i=n;i=0;--i){r[i+ds+1]=this[i]>>cbs|c;c=(this[i]&bm)<=0;--i)r[i]=0;r[ds]=c;r.t=this.t+ds+1;r.s=this.s;r.clamp()}function bnpRShiftTo(n,r){r.s=this.s;var ds=Math.floor(n/this.DB);if(ds>=this.t){r.t=0;return}var bs=n%this.DB;var cbs=this.DB-bs;var bm=(1<>bs;for(var i=ds+1;i>bs}if(bs>0)r[this.t-ds-1]|=(this.s&bm)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c-=a.s}r.s=c<0?-1:0;if(c<-1)r[i++]=this.DV+c;else if(c>0)r[i++]=c;r.t=i;r.clamp()}function bnpMultiplyTo(a,r){var x=this.abs(),y=a.abs();var i=x.t;r.t=i+y.t;while(--i>=0)r[i]=0;for(i=0;i=0)r[i]=0;for(i=0;i=x.DV){r[i+x.t]-=x.DV;r[i+x.t+1]=1}}if(r.t>0)r[r.t-1]+=x.am(i,x[i],r,2*i,0,1);r.s=0;r.clamp()}function bnpDivRemTo(m,q,r){var pm=m.abs();if(pm.t<=0)return;var pt=this.abs();if(pt.t0){pm.lShiftTo(nsh,y);pt.lShiftTo(nsh,r)}else{pm.copyTo(y);pt.copyTo(r)}var ys=y.t;var y0=y[ys-1];if(y0==0)return;var yt=y0*(1<1?y[ys-2]>>this.F2:0);var d1=this.FV/yt,d2=(1<=0){r[r.t++]=1;r.subTo(t,r)}BigInteger.ONE.dlShiftTo(ys,t);t.subTo(y,y);while(y.t=0){var qd=r[--i]==y0?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);if((r[i]+=y.am(0,qd,r,j,0,ys))0)r.rShiftTo(nsh,r);if(ts<0)BigInteger.ZERO.subTo(r,r)}function bnMod(a){var r=nbi();this.abs().divRemTo(a,null,r);if(this.s<0&&r.compareTo(BigInteger.ZERO)>0)a.subTo(r,r);return r}function Classic(m){this.m=m}function cConvert(x){if(x.s<0||x.compareTo(this.m)>=0)return x.mod(this.m);else return x}function cRevert(x){return x}function cReduce(x){x.divRemTo(this.m,null,x)}function cMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}function cSqrTo(x,r){x.squareTo(r);this.reduce(r)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1)return 0;var x=this[0];if((x&1)==0)return 0;var y=x&3;y=y*(2-(x&15)*y)&15;y=y*(2-(x&255)*y)&255;y=y*(2-((x&65535)*y&65535))&65535;y=y*(2-x*y%this.DV)%this.DV;return y>0?this.DV-y:-y}function Montgomery(m){this.m=m;this.mp=m.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<0)this.m.subTo(r,r);return r}function montRevert(x){var r=nbi();x.copyTo(r);this.reduce(r);return r}function montReduce(x){while(x.t<=this.mt2)x[x.t++]=0;for(var i=0;i>15)*this.mpl&this.um)<<15)&x.DM;j=i+this.m.t;x[j]+=this.m.am(0,u0,x,i,0,this.m.t);while(x[j]>=x.DV){x[j]-=x.DV;x[++j]++}}x.clamp();x.drShiftTo(this.m.t,x);if(x.compareTo(this.m)>=0)x.subTo(this.m,x)}function montSqrTo(x,r){x.squareTo(r);this.reduce(r)}function montMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(e,z){if(e>4294967295||e<1)return BigInteger.ONE;var r=nbi(),r2=nbi(),g=z.convert(this),i=nbits(e)-1;g.copyTo(r);while(--i>=0){z.sqrTo(r,r2);if((e&1<0)z.mulTo(r2,g,r);else{var t=r;r=r2;r2=t}}return z.revert(r)}function bnModPowInt(e,m){var z;if(e<256||m.isEven())z=new Classic(m);else z=new Montgomery(m);return this.exp(e,z)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnpFromRadix(s,b){this.fromInt(0);if(b==null)b=10;var cs=this.chunkSize(b);var d=Math.pow(b,cs),mi=false,j=0,w=0;for(var i=0;i=cs){this.dMultiply(d);this.dAddOffset(w,0);j=0;w=0}}if(j>0){this.dMultiply(Math.pow(b,j));this.dAddOffset(w,0)}if(mi)BigInteger.ZERO.subTo(this,this)}function bnpChunkSize(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}function bnSigNum(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function bnpDMultiply(n){this[this.t]=this.am(0,n-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(n,w){if(n==0)return;while(this.t<=w)this[this.t++]=0;this[w]+=n;while(this[w]>=this.DV){this[w]-=this.DV;if(++w>=this.t)this[this.t++]=0;++this[w]}}function bnpToRadix(b){if(b==null)b=10;if(this.signum()==0||b<2||b>36)return"0";var cs=this.chunkSize(b);var a=Math.pow(b,cs);var d=nbv(a),y=nbi(),z=nbi(),r="";this.divRemTo(d,y,z);while(y.signum()>0){r=(a+z.intValue()).toString(b).substr(1)+r;y.divRemTo(d,y,z)}return z.intValue().toString(b)+r}function bnIntValue(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c+=a.s}r.s=c<0?-1:0;if(c>0)r[i++]=c;else if(c<-1)r[i++]=this.DV+c;r.t=i;r.clamp()}BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.addTo=bnpAddTo;var Wrapper={abs:(function(l,h){var x=new goog.math.Long(l,h);var ret;if(x.isNegative()){ret=x.negate()}else{ret=x}HEAP32[tempDoublePtr>>2]=ret.low_;HEAP32[tempDoublePtr+4>>2]=ret.high_}),ensureTemps:(function(){if(Wrapper.ensuredTemps)return;Wrapper.ensuredTemps=true;Wrapper.two32=new BigInteger;Wrapper.two32.fromString("4294967296",10);Wrapper.two64=new BigInteger;Wrapper.two64.fromString("18446744073709551616",10);Wrapper.temp1=new BigInteger;Wrapper.temp2=new BigInteger}),lh2bignum:(function(l,h){var a=new BigInteger;a.fromString(h.toString(),10);var b=new BigInteger;a.multiplyTo(Wrapper.two32,b);var c=new BigInteger;c.fromString(l.toString(),10);var d=new BigInteger;c.addTo(b,d);return d}),stringify:(function(l,h,unsigned){var ret=(new goog.math.Long(l,h)).toString();if(unsigned&&ret[0]=="-"){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(ret,10);ret=new BigInteger;Wrapper.two64.addTo(bignum,ret);ret=ret.toString(10)}return ret}),fromString:(function(str,base,min,max,unsigned){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(str,base);var bigmin=new BigInteger;bigmin.fromString(min,10);var bigmax=new BigInteger;bigmax.fromString(max,10);if(unsigned&&bignum.compareTo(BigInteger.ZERO)<0){var temp=new BigInteger;bignum.addTo(Wrapper.two64,temp);bignum=temp}var error=false;if(bignum.compareTo(bigmin)<0){bignum=bigmin;error=true}else if(bignum.compareTo(bigmax)>0){bignum=bigmax;error=true}var ret=goog.math.Long.fromString(bignum.toString());HEAP32[tempDoublePtr>>2]=ret.low_;HEAP32[tempDoublePtr+4>>2]=ret.high_;if(error)throw"range error"})};return Wrapper})();if(memoryInitializer){if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,STATIC_BASE)}else{addRunDependency("memory initializer");Browser.asyncLoad(memoryInitializer,(function(data){HEAPU8.set(data,STATIC_BASE);removeRunDependency("memory initializer")}),(function(data){throw"could not load memory initializer "+memoryInitializer}))}}function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"]&&shouldRunNow)run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called");args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0)}}var argv=[allocate(intArrayFromString(Module["thisProgram"]||"/bin/this.program"),"i8",ALLOC_NORMAL)];pad();for(var i=0;i0){Module.printErr("run() called, but dependencies remain, so not running");return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;ensureInitRuntime();preMain();if(ENVIRONMENT_IS_WEB&&preloadStartTime!==null){Module.printErr("pre-main prep time: "+(Date.now()-preloadStartTime)+" ms")}if(Module["_main"]&&shouldRunNow){Module["callMain"](args)}postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);if(!ABORT)doRun()}),1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status){ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();throw new ExitStatus(status)}Module["exit"]=Module.exit=exit;function abort(text){if(text){Module.print(text);Module.printErr(text)}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw"abort() at "+stackTrace()+extra}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run() - - - - -module.exports = Module - -},{}],2:[function(require,module,exports){ -(function (global){ -var AV = (typeof window !== "undefined" ? window.AV : typeof global !== "undefined" ? global.AV : null); -var Ogg = require('../build/libogg'); - -var OggDemuxer = AV.Demuxer.extend(function() { - AV.Demuxer.register(this); - - this.probe = function(buffer) { - return buffer.peekString(0, 4) === 'OggS'; - }; - - this.plugins = []; - var BUFFER_SIZE = 8192; - - this.prototype.init = function() { - this.ogg = Ogg._AVOggInit(); - this.buf = Ogg._malloc(BUFFER_SIZE); - - var self = this; - var plugin = null; - var doneHeaders = false; - - // copy the stream in case we override it, e.g. flac - this._stream = this.stream; - - this.callback = Ogg.Runtime.addFunction(function(packet, bytes) { - var data = new Uint8Array(Ogg.HEAPU8.subarray(packet, packet + bytes)); - - // find plugin for codec - if (!plugin) { - for (var i = 0; i < OggDemuxer.plugins.length; i++) { - var cur = OggDemuxer.plugins[i]; - var magic = data.subarray(0, cur.magic.length); - if (String.fromCharCode.apply(String, magic) === cur.magic) { - plugin = cur; - break; - } - } - - if (!plugin) - throw new Error("Unknown format in Ogg file."); - - if (plugin.init) - plugin.init.call(self); - } - - // send packet to plugin - if (!doneHeaders) - doneHeaders = plugin.readHeaders.call(self, data); - else - plugin.readPacket.call(self, data); - }); - }; - - this.prototype.readChunk = function() { - while (this._stream.available(BUFFER_SIZE)) { - Ogg.HEAPU8.set(this._stream.readBuffer(BUFFER_SIZE).data, this.buf); - Ogg._AVOggRead(this.ogg, this.buf, BUFFER_SIZE, this.callback); - } - }; - - this.prototype.destroy = function() { - this._super(); - Ogg.Runtime.removeFunction(this.callback); - Ogg._AVOggDestroy(this.ogg); - Ogg._free(this.buf); - - this.ogg = null; - this.buf = null; - this.callback = null; - }; -}); - -module.exports = OggDemuxer; -AV.OggDemuxer = OggDemuxer; // for browser - -}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../build/libogg":1}]},{},[2]) \ No newline at end of file diff --git a/src/core/static/js/libs/jplayer/aurora/opus.js b/src/core/static/js/libs/jplayer/aurora/opus.js deleted file mode 100644 index 41350c0..0000000 --- a/src/core/static/js/libs/jplayer/aurora/opus.js +++ /dev/null @@ -1,139 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o?/.test(type))return true;return type[0]=="%"},INT_TYPES:{"i1":0,"i8":0,"i16":0,"i32":0,"i64":0},FLOAT_TYPES:{"float":0,"double":0},or64:(function(x,y){var l=x|0|(y|0);var h=(Math.round(x/4294967296)|Math.round(y/4294967296))*4294967296;return l+h}),and64:(function(x,y){var l=(x|0)&(y|0);var h=(Math.round(x/4294967296)&Math.round(y/4294967296))*4294967296;return l+h}),xor64:(function(x,y){var l=(x|0)^(y|0);var h=(Math.round(x/4294967296)^Math.round(y/4294967296))*4294967296;return l+h}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),dedup:function dedup(items,ident){var seen={};if(ident){return items.filter((function(item){if(seen[item[ident]])return false;seen[item[ident]]=true;return true}))}else{return items.filter((function(item){if(seen[item])return false;seen[item]=true;return true}))}},set:function set(){var args=typeof arguments[0]==="object"?arguments[0]:arguments;var ret={};for(var i=0;i=0){diffs.push(curr-prev)}prev=curr;return curr}));if(type.name_&&type.name_[0]==="["){type.flatSize=parseInt(type.name_.substr(1))*type.flatSize/2}type.flatSize=Runtime.alignMemory(type.flatSize,type.alignSize);if(diffs.length==0){type.flatFactor=type.flatSize}else if(Runtime.dedup(diffs).length==1){type.flatFactor=diffs[0]}type.needsFlattening=type.flatFactor!=1;return type.flatIndexes},generateStructInfo:(function(struct,typeName,offset){var type,alignment;if(typeName){offset=offset||0;type=(typeof Types==="undefined"?Runtime.typeInfo:Types.types)[typeName];if(!type)return null;if(type.fields.length!=struct.length){printErr("Number of named fields must match the type for "+typeName+": possibly duplicate struct names. Cannot return structInfo");return null}alignment=type.flatIndexes}else{var type={fields:struct.map((function(item){return item[0]}))};alignment=Runtime.calculateStructAlignment(type)}var ret={__size__:type.flatSize};if(typeName){struct.forEach((function(item,i){if(typeof item==="string"){ret[item]=alignment[i]+offset}else{var key;for(var k in item)key=k;ret[key]=Runtime.generateStructInfo(item[key],type.fields[i],alignment[i])}}))}else{struct.forEach((function(item,i){ret[item[1]]=alignment[i]}))}return ret}),dynCall:(function(sig,ptr,args){if(args&&args.length){if(!args.splice)args=Array.prototype.slice.call(args);args.splice(0,0,ptr);return Module["dynCall_"+sig].apply(null,args)}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[],addFunction:(function(func){for(var i=0;i0)return""}var c1=buffer[0];var c2=buffer[1];var c3=buffer[2];var c4=buffer[3];var ret;if(buffer.length==2){ret=String.fromCharCode((c1&31)<<6|c2&63)}else if(buffer.length==3){ret=String.fromCharCode((c1&15)<<12|(c2&63)<<6|c3&63)}else{var codePoint=(c1&7)<<18|(c2&63)<<12|(c3&63)<<6|c4&63;ret=String.fromCharCode(Math.floor((codePoint-65536)/1024)+55296,(codePoint-65536)%1024+56320)}buffer.length=0;return ret});this.processJSString=function processJSString(string){string=unescape(encodeURIComponent(string));var ret=[];for(var i=0;i=TOTAL_MEMORY)enlargeMemory();return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:8))*(quantum?quantum:8);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var __THREW__=0;var ABORT=false;var EXITSTATUS=0;var undef=0;var tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempDouble,tempFloat;var tempI64,tempI64b;var tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var globalScope=this;function getCFunc(ident){var func=Module["_"+ident];if(!func){try{func=eval("_"+ident)}catch(e){}}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func}var cwrap,ccall;((function(){var stack=0;var JSfuncs={"stackSave":(function(){stack=Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore(stack)}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=Runtime.stackAlloc(str.length+1);writeStringToMemory(str,ret)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};ccall=function ccallFunc(ident,returnType,argTypes,args){var func=getCFunc(ident);var cArgs=[];if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}return null}Module["getValue"]=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];if(t>=128)hasUtf=true;else if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(!hasUtf){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}var utf8=new Runtime.UTF8Processor;for(i=0;i>0];ret+=utf8.processCChar(t)}return ret}Module["Pointer_stringify"]=Pointer_stringify;function UTF16ToString(ptr){var i=0;var str="";while(1){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)return str;++i;str+=String.fromCharCode(codeUnit)}}Module["UTF16ToString"]=UTF16ToString;function stringToUTF16(str,outPtr){for(var i=0;i>1]=codeUnit}HEAP16[outPtr+str.length*2>>1]=0}Module["stringToUTF16"]=stringToUTF16;function UTF32ToString(ptr){var i=0;var str="";while(1){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)return str;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}}Module["UTF32ToString"]=UTF32ToString;function stringToUTF32(str,outPtr){var iChar=0;for(var iCodeUnit=0;iCodeUnit=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++iCodeUnit);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr+iChar*4>>2]=codeUnit;++iChar}HEAP32[outPtr+iChar*4>>2]=0}Module["stringToUTF32"]=stringToUTF32;function demangle(func){var i=3;var basicTypes={"v":"void","b":"bool","c":"char","s":"short","i":"int","l":"long","f":"float","d":"double","w":"wchar_t","a":"signed char","h":"unsigned char","t":"unsigned short","j":"unsigned int","m":"unsigned long","x":"long long","y":"unsigned long long","z":"..."};var subs=[];var first=true;function dump(x){if(x)Module.print(x);Module.print(func);var pre="";for(var a=0;a"}else{ret=name}paramLoop:while(i0){var c=func[i++];if(c in basicTypes){list.push(basicTypes[c])}else{switch(c){case"P":list.push(parse(true,1,true)[0]+"*");break;case"R":list.push(parse(true,1,true)[0]+"&");break;case"L":{i++;var end=func.indexOf("E",i);var size=end-i;list.push(func.substr(i,size));i+=size+2;break};case"A":{var size=parseInt(func.substr(i));i+=size.toString().length;if(func[i]!=="_")throw"?";i++;list.push(parse(true,1,true)[0]+" ["+size+"]");break};case"E":break paramLoop;default:ret+="?"+c;break paramLoop}}}if(!allowVoid&&list.length===1&&list[0]==="void")list=[];if(rawList){if(ret){list.push(ret+"?")}return list}else{return ret+flushList()}}try{if(func=="Object._main"||func=="_main"){return"main()"}if(typeof func==="number")func=Pointer_stringify(func);if(func[0]!=="_")return func;if(func[1]!=="_")return func;if(func[2]!=="Z")return func;switch(func[3]){case"n":return"operator new()";case"d":return"operator delete()"}return parse()}catch(e){return func}}function demangleAll(text){return text.replace(/__Z[\w\d_]+/g,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function stackTrace(){var stack=(new Error).stack;return stack?demangleAll(stack):"(no stack trace available)"}var PAGE_SIZE=4096;function alignMemoryPage(x){return x+4095&-4096}var HEAP;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var STATIC_BASE=0,STATICTOP=0,staticSealed=false;var STACK_BASE=0,STACKTOP=0,STACK_MAX=0;var DYNAMIC_BASE=0,DYNAMICTOP=0;function enlargeMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.")}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;var FAST_MEMORY=Module["FAST_MEMORY"]||2097152;var totalMemory=4096;while(totalMemory0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Runtime.dynCall("v",func)}else{Runtime.dynCall("vi",func,[callback.arg])}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeInitialized=false}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}Module["addOnPreRun"]=Module.addOnPreRun=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=Module.addOnInit=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=Module.addOnPreMain=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=Module.addOnExit=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=Module.addOnPostRun=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var ret=(new Runtime.UTF8Processor).processJSString(stringy);if(length){ret.length=length}if(!dontAddNull){ret.push(0)}return ret}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){var array=intArrayFromString(string,dontAddNull);var i=0;while(i>0]=chr;i=i+1}}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){for(var i=0;i>0]=array[i]}}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer+str.length>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;function unSign(value,bits,ignore){if(value>=0){return value}return bits<=32?2*Math.abs(1<=half&&(bits<=32||value>half)){value=-2*half+value}return value}if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};Math.imul=Math["imul"];var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;STATIC_BASE=8;STATICTOP=STATIC_BASE+Runtime.alignMemory(19883);__ATINIT__.push();allocate([0,64,202,69,27,76,255,82,130,90,179,98,162,107,96,117,0,1,1,1,2,3,3,3,2,3,3,3,2,3,3,3,0,3,12,15,48,51,60,63,192,195,204,207,240,243,252,255,1,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,7,0,0,0,0,0,0,0,4,0,0,0,3,0,0,0,6,0,0,0,1,0,0,0,5,0,0,0,2,0,0,0,15,0,0,0,0,0,0,0,8,0,0,0,7,0,0,0,12,0,0,0,3,0,0,0,11,0,0,0,4,0,0,0,14,0,0,0,1,0,0,0,9,0,0,0,6,0,0,0,13,0,0,0,2,0,0,0,10,0,0,0,5,0,0,0,64,39,200,27,152,16,96,59,80,34,0,0,96,102,208,12,0,0,0,0,0,0,0,0,0,255,0,255,0,255,0,255,0,255,0,254,1,0,1,255,0,254,0,253,2,0,1,255,0,254,0,253,3,0,1,255,2,1,0,0,0,0,0,0,25,23,2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,0,23,0,0,0,25,0,0,0,27,0,0,0,29,0,0,0,31,0,0,0,33,0,0,0,35,0,0,0,37,0,0,0,39,0,0,0,41,0,0,0,43,0,0,0,45,0,0,0,47,0,0,0,49,0,0,0,51,0,0,0,53,0,0,0,55,0,0,0,57,0,0,0,59,0,0,0,61,0,0,0,63,0,0,0,65,0,0,0,67,0,0,0,69,0,0,0,71,0,0,0,73,0,0,0,75,0,0,0,77,0,0,0,79,0,0,0,81,0,0,0,83,0,0,0,85,0,0,0,87,0,0,0,89,0,0,0,91,0,0,0,93,0,0,0,95,0,0,0,97,0,0,0,99,0,0,0,101,0,0,0,103,0,0,0,105,0,0,0,107,0,0,0,109,0,0,0,111,0,0,0,113,0,0,0,115,0,0,0,117,0,0,0,119,0,0,0,121,0,0,0,123,0,0,0,125,0,0,0,127,0,0,0,129,0,0,0,131,0,0,0,133,0,0,0,135,0,0,0,137,0,0,0,139,0,0,0,141,0,0,0,143,0,0,0,145,0,0,0,147,0,0,0,149,0,0,0,151,0,0,0,153,0,0,0,155,0,0,0,157,0,0,0,159,0,0,0,161,0,0,0,163,0,0,0,165,0,0,0,167,0,0,0,169,0,0,0,171,0,0,0,173,0,0,0,175,0,0,0,177,0,0,0,179,0,0,0,181,0,0,0,183,0,0,0,185,0,0,0,187,0,0,0,189,0,0,0,191,0,0,0,193,0,0,0,195,0,0,0,197,0,0,0,199,0,0,0,201,0,0,0,203,0,0,0,205,0,0,0,207,0,0,0,209,0,0,0,211,0,0,0,213,0,0,0,215,0,0,0,217,0,0,0,219,0,0,0,221,0,0,0,223,0,0,0,225,0,0,0,227,0,0,0,229,0,0,0,231,0,0,0,233,0,0,0,235,0,0,0,237,0,0,0,239,0,0,0,241,0,0,0,243,0,0,0,245,0,0,0,247,0,0,0,249,0,0,0,251,0,0,0,253,0,0,0,255,0,0,0,1,1,0,0,3,1,0,0,5,1,0,0,7,1,0,0,9,1,0,0,11,1,0,0,13,1,0,0,15,1,0,0,17,1,0,0,19,1,0,0,21,1,0,0,23,1,0,0,25,1,0,0,27,1,0,0,29,1,0,0,31,1,0,0,33,1,0,0,35,1,0,0,37,1,0,0,39,1,0,0,41,1,0,0,43,1,0,0,45,1,0,0,47,1,0,0,49,1,0,0,51,1,0,0,53,1,0,0,55,1,0,0,57,1,0,0,59,1,0,0,61,1,0,0,63,1,0,0,65,1,0,0,67,1,0,0,69,1,0,0,71,1,0,0,73,1,0,0,75,1,0,0,77,1,0,0,79,1,0,0,81,1,0,0,83,1,0,0,85,1,0,0,87,1,0,0,89,1,0,0,91,1,0,0,93,1,0,0,95,1,0,0,13,0,0,0,25,0,0,0,41,0,0,0,61,0,0,0,85,0,0,0,113,0,0,0,145,0,0,0,181,0,0,0,221,0,0,0,9,1,0,0,57,1,0,0,109,1,0,0,165,1,0,0,225,1,0,0,33,2,0,0,101,2,0,0,173,2,0,0,249,2,0,0,73,3,0,0,157,3,0,0,245,3,0,0,81,4,0,0,177,4,0,0,21,5,0,0,125,5,0,0,233,5,0,0,89,6,0,0,205,6,0,0,69,7,0,0,193,7,0,0,65,8,0,0,197,8,0,0,77,9,0,0,217,9,0,0,105,10,0,0,253,10,0,0,149,11,0,0,49,12,0,0,209,12,0,0,117,13,0,0,29,14,0,0,201,14,0,0,121,15,0,0,45,16,0,0,229,16,0,0,161,17,0,0,97,18,0,0,37,19,0,0,237,19,0,0,185,20,0,0,137,21,0,0,93,22,0,0,53,23,0,0,17,24,0,0,241,24,0,0,213,25,0,0,189,26,0,0,169,27,0,0,153,28,0,0,141,29,0,0,133,30,0,0,129,31,0,0,129,32,0,0,133,33,0,0,141,34,0,0,153,35,0,0,169,36,0,0,189,37,0,0,213,38,0,0,241,39,0,0,17,41,0,0,53,42,0,0,93,43,0,0,137,44,0,0,185,45,0,0,237,46,0,0,37,48,0,0,97,49,0,0,161,50,0,0,229,51,0,0,45,53,0,0,121,54,0,0,201,55,0,0,29,57,0,0,117,58,0,0,209,59,0,0,49,61,0,0,149,62,0,0,253,63,0,0,105,65,0,0,217,66,0,0,77,68,0,0,197,69,0,0,65,71,0,0,193,72,0,0,69,74,0,0,205,75,0,0,89,77,0,0,233,78,0,0,125,80,0,0,21,82,0,0,177,83,0,0,81,85,0,0,245,86,0,0,157,88,0,0,73,90,0,0,249,91,0,0,173,93,0,0,101,95,0,0,33,97,0,0,225,98,0,0,165,100,0,0,109,102,0,0,57,104,0,0,9,106,0,0,221,107,0,0,181,109,0,0,145,111,0,0,113,113,0,0,85,115,0,0,61,117,0,0,41,119,0,0,25,121,0,0,13,123,0,0,5,125,0,0,1,127,0,0,1,129,0,0,5,131,0,0,13,133,0,0,25,135,0,0,41,137,0,0,61,139,0,0,85,141,0,0,113,143,0,0,145,145,0,0,181,147,0,0,221,149,0,0,9,152,0,0,57,154,0,0,109,156,0,0,165,158,0,0,225,160,0,0,33,163,0,0,101,165,0,0,173,167,0,0,249,169,0,0,73,172,0,0,157,174,0,0,245,176,0,0,81,179,0,0,177,181,0,0,21,184,0,0,125,186,0,0,233,188,0,0,89,191,0,0,205,193,0,0,69,196,0,0,193,198,0,0,65,201,0,0,197,203,0,0,77,206,0,0,217,208,0,0,105,211,0,0,253,213,0,0,149,216,0,0,49,219,0,0,209,221,0,0,117,224,0,0,29,227,0,0,201,229,0,0,121,232,0,0,45,235,0,0,229,237,0,0,161,240,0,0,63,0,0,0,129,0,0,0,231,0,0,0,121,1,0,0,63,2,0,0,65,3,0,0,135,4,0,0,25,6,0,0,255,7,0,0,65,10,0,0,231,12,0,0,249,15,0,0,127,19,0,0,129,23,0,0,7,28,0,0,25,33,0,0,191,38,0,0,1,45,0,0,231,51,0,0,121,59,0,0,191,67,0,0,193,76,0,0,135,86,0,0,25,97,0,0,127,108,0,0,193,120,0,0,231,133,0,0,249,147,0,0,255,162,0,0,1,179,0,0,7,196,0,0,25,214,0,0,63,233,0,0,129,253,0,0,231,18,1,0,121,41,1,0,63,65,1,0,65,90,1,0,135,116,1,0,25,144,1,0,255,172,1,0,65,203,1,0,231,234,1,0,249,11,2,0,127,46,2,0,129,82,2,0,7,120,2,0,25,159,2,0,191,199,2,0,1,242,2,0,231,29,3,0,121,75,3,0,191,122,3,0,193,171,3,0,135,222,3,0,25,19,4,0,127,73,4,0,193,129,4,0,231,187,4,0,249,247,4,0,255,53,5,0,1,118,5,0,7,184,5,0,25,252,5,0,63,66,6,0,129,138,6,0,231,212,6,0,121,33,7,0,63,112,7,0,65,193,7,0,135,20,8,0,25,106,8,0,255,193,8,0,65,28,9,0,231,120,9,0,249,215,9,0,127,57,10,0,129,157,10,0,7,4,11,0,25,109,11,0,191,216,11,0,1,71,12,0,231,183,12,0,121,43,13,0,191,161,13,0,193,26,14,0,135,150,14,0,25,21,15,0,127,150,15,0,193,26,16,0,231,161,16,0,249,43,17,0,255,184,17,0,1,73,18,0,7,220,18,0,25,114,19,0,63,11,20,0,129,167,20,0,231,70,21,0,121,233,21,0,63,143,22,0,65,56,23,0,135,228,23,0,25,148,24,0,255,70,25,0,65,253,25,0,231,182,26,0,249,115,27,0,127,52,28,0,129,248,28,0,7,192,29,0,25,139,30,0,191,89,31,0,1,44,32,0,231,1,33,0,121,219,33,0,191,184,34,0,193,153,35,0,135,126,36,0,25,103,37,0,127,83,38,0,193,67,39,0,231,55,40,0,249,47,41,0,255,43,42,0,1,44,43,0,7,48,44,0,25,56,45,0,63,68,46,0,129,84,47,0,231,104,48,0,121,129,49,0,63,158,50,0,65,191,51,0,135,228,52,0,25,14,54,0,255,59,55,0,65,110,56,0,231,164,57,0,249,223,58,0,127,31,60,0,129,99,61,0,7,172,62,0,25,249,63,0,191,74,65,0,1,161,66,0,231,251,67,0,121,91,69,0,191,191,70,0,193,40,72,0,135,150,73,0,25,9,75,0,127,128,76,0,193,252,77,0,231,125,79,0,249,3,81,0,255,142,82,0,1,31,84,0,7,180,85,0,25,78,87,0,63,237,88,0,129,145,90,0,231,58,92,0,121,233,93,0,63,157,95,0,65,86,97,0,135,20,99,0,25,216,100,0,255,160,102,0,65,111,104,0,231,66,106,0,249,27,108,0,127,250,109,0,65,1,0,0,169,2,0,0,9,5,0,0,193,8,0,0,65,14,0,0,9,22,0,0,169,32,0,0,193,46,0,0,1,65,0,0,41,88,0,0,9,117,0,0,129,152,0,0,129,195,0,0,9,247,0,0,41,52,1,0,1,124,1,0,193,207,1,0,169,48,2,0,9,160,2,0,65,31,3,0,193,175,3,0,9,83,4,0,169,10,5,0,65,216,5,0,129,189,6,0,41,188,7,0,9,214,8,0,1,13,10,0,1,99,11,0,9,218,12,0,41,116,14,0,129,51,16,0,65,26,18,0,169,42,20,0,9,103,22,0,193,209,24,0,65,109,27,0,9,60,30,0,169,64,33,0,193,125,36,0,1,246,39,0,41,172,43,0,9,163,47,0,129,221,51,0,129,94,56,0,9,41,61,0,41,64,66,0,1,167,71,0,193,96,77,0,169,112,83,0,9,218,89,0,65,160,96,0,193,198,103,0,9,81,111,0,169,66,119,0,65,159,127,0,129,106,136,0,41,168,145,0,9,92,155,0,1,138,165,0,1,54,176,0,9,100,187,0,41,24,199,0,129,86,211,0,65,35,224,0,169,130,237,0,9,121,251,0,193,10,10,1,65,60,25,1,9,18,41,1,169,144,57,1,193,188,74,1,1,155,92,1,41,48,111,1,9,129,130,1,129,146,150,1,129,105,171,1,9,11,193,1,41,124,215,1,1,194,238,1,193,225,6,2,169,224,31,2,9,196,57,2,65,145,84,2,193,77,112,2,9,255,140,2,169,170,170,2,65,86,201,2,129,7,233,2,41,196,9,3,9,146,43,3,1,119,78,3,1,121,114,3,9,158,151,3,41,236,189,3,129,105,229,3,65,28,14,4,169,10,56,4,9,59,99,4,193,179,143,4,65,123,189,4,9,152,236,4,169,16,29,5,193,235,78,5,1,48,130,5,41,228,182,5,9,15,237,5,129,183,36,6,129,228,93,6,9,157,152,6,41,232,212,6,1,205,18,7,193,82,82,7,169,128,147,7,9,94,214,7,65,242,26,8,193,68,97,8,9,93,169,8,169,66,243,8,65,253,62,9,129,148,140,9,41,16,220,9,9,120,45,10,1,212,128,10,1,44,214,10,9,136,45,11,41,240,134,11,129,108,226,11,65,5,64,12,169,194,159,12,9,173,1,13,193,204,101,13,65,42,204,13,9,206,52,14,169,192,159,14,193,10,13,15,1,181,124,15,41,200,238,15,9,77,99,16,129,76,218,16,129,207,83,17,9,223,207,17,41,132,78,18,1,200,207,18,193,179,83,19,169,80,218,19,9,168,99,20,65,195,239,20,193,171,126,21,9,107,16,22,169,10,165,22,65,148,60,23,129,17,215,23,41,140,116,24,9,14,21,25,1,161,184,25,1,79,95,26,9,34,9,27,41,36,182,27,129,95,102,28,65,222,25,29,169,170,208,29,9,207,138,30,193,85,72,31,65,73,9,32,9,180,205,32,169,160,149,33,193,25,97,34,1,42,48,35,41,220,2,36,9,59,217,36,129,81,179,37,147,6,0,0,69,14,0,0,15,28,0,0,17,51,0,0,91,87,0,0,13,142,0,0,119,221,0,0,57,77,1,0,99,230,1,0,149,179,2,0,31,193,3,0,33,29,5,0,171,215,6,0,221,2,9,0,7,179,11,0,201,254,14,0,51,255,18,0,229,207,23,0,47,143,29,0,49,94,36,0,251,96,44,0,173,190,53,0,151,161,64,0,89,55,77,0,3,177,91,0,53,67,108,0,63,38,127,0,65,150,148,0,75,211,172,0,125,33,200,0,39,201,230,0,233,22,9,1,211,91,47,1,133,237,89,1,79,38,137,1,81,101,189,1,155,14,247,1,77,139,54,2,183,73,124,2,121,189,200,2,163,95,28,3,213,174,119,3,95,47,219,3,97,107,71,4,235,242,188,4,29,92,60,5,71,67,198,5,9,75,91,6,115,28,252,6,37,103,169,7,111,225,99,8,113,72,44,9,59,96,3,10,237,243,233,10,215,213,224,11,153,223,232,12,67,242,2,14,117,246,47,15,127,220,112,16,129,156,198,17,139,54,50,19,189,178,180,20,103,33,79,22,41,155,2,24,19,65,208,25,197,60,185,27,143,192,190,29,145,7,226,31,219,85,36,34,141,248,134,36,247,69,11,39,185,157,178,41,227,104,126,44,21,26,112,47,159,45,137,50,161,41,203,53,43,158,55,57,93,37,208,60,135,99,150,64,73,7,140,68,179,201,178,72,101,110,12,77,175,195,154,81,177,162,95,86,123,239,92,91,45,153,148,96,23,154,8,102,217,247,186,107,131,195,173,113,181,25,227,119,191,34,93,126,29,35,0,0,113,77,0,0,145,156,0,0,253,38,1,0,101,12,2,0,233,119,3,0,153,162,5,0,53,214,8,0,45,112,13,0,225,228,19,0,33,195,28,0,237,183,40,0,117,146,56,0,89,72,77,0,41,250,103,0,37,248,137,0,61,199,180,0,81,38,234,0,177,19,44,1,221,210,124,1,133,242,222,1,201,82,85,2,185,43,227,2,21,20,140,3,77,8,84,4,193,113,63,5,65,46,83,6,205,151,148,7,149,140,9,9,57,119,184,10,73,87,168,12,5,202,224,14,93,19,106,17,49,39,77,20,209,178,147,23,189,38,72,27,165,192,117,31,169,149,40,36,217,156,109,41,245,185,82,47,109,200,230,53,161,166,57,61,97,65,92,69,173,159,96,78,181,238,89,88,25,142,92,99,105,28,126,111,229,131,213,124,255,189,0,0,1,168,1,0,143,107,3,0,241,158,6,0,63,35,12,0,193,61,21,0,143,182,35,0,241,252,57,0,255,81,91,0,1,250,139,0,15,117,209,0,113,191,50,1,63,154,184,1,193,220,109,2,15,207,95,3,113,142,158,4,255,123,61,6,1,182,83,8,143,156,252,10,241,97,88,14,63,167,140,18,193,37,197,23,143,101,52,30,241,129,20,38,255,251,167,47,1,156,58,59,15,98,34,73,113,134,192,89,63,138,130,109,193,88,227,132,1,14,4,0,145,33,9,0,17,44,19,0,65,238,37,0,65,79,71,0,145,67,128,0,17,247,221,0,1,70,115,1,1,146,90,2,17,1,184,3,145,53,188,5,65,143,167,8,65,6,206,12,17,178,155,18,145,15,154,26,1,26,118,37,1,76,7,52,145,158,87,71,17,157,172,96,65,166,145,129,35,81,22,0,197,158,50,0,23,185,107,0,153,246,216,0,107,137,160,1,13,196,254,2,31,1,80,5,33,217,29,9,51,108,48,15,213,162,164,24,167,103,8,39,41,253,125,60,123,181,231,91,29,119,29,137,175,160,45,201,173,142,123,0,137,230,25,1,57,150,94,2,61,22,216,4,181,99,119,9,225,40,198,17,33,3,52,32,117,72,130,56,125,87,87,96,191,91,175,2,129,216,39,6,247,132,94,13,233,254,173,27,127,139,235,54,129,183,229,104,23,3,156,193,193,12,255,14,57,106,133,34,25,238,145,75,129,120,43,158,51,225,9,84,149,139,0,0,55,152,0,0,255,165,0,0,4,181,0,0,103,197,0,0,69,215,0,0,193,234,0,0,255,255,0,0,135,90,41,45,61,244,163,6,104,253,0,0,0,0,0,0,96,21,0,0,0,0,0,0,128,187,0,0,120,0,0,0,21,0,0,0,21,0,0,0,205,108,0,0,0,16,0,32,200,21,0,0,3,0,0,0,8,0,0,0,120,0,0,0,11,0,0,0,248,21,0,0,224,22,0,0,16,23,0,0,128,7,0,0,3,0,0,0,0,24,0,0,56,24,0,0,112,24,0,0,168,24,0,0,224,24,0,0,136,1,0,0,240,38,0,0,200,39,0,0,80,41,0,0,0,0,0,0,0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,10,0,12,0,14,0,16,0,20,0,24,0,28,0,34,0,40,0,48,0,60,0,78,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,80,75,69,63,56,49,40,34,29,20,18,10,0,0,0,0,0,0,0,0,110,100,90,84,78,71,65,58,51,45,39,32,26,20,12,0,0,0,0,0,0,118,110,103,93,86,80,75,70,65,59,53,47,40,31,23,15,4,0,0,0,0,126,119,112,104,95,89,83,78,72,66,60,54,47,39,32,25,17,12,1,0,0,134,127,120,114,103,97,91,85,78,72,66,60,54,47,41,35,29,23,16,10,1,144,137,130,124,113,107,101,95,88,82,76,70,64,57,51,45,39,33,26,15,1,152,145,138,132,123,117,111,105,98,92,86,80,74,67,61,55,49,43,36,20,1,162,155,148,142,133,127,121,115,108,102,96,90,84,77,71,65,59,53,46,30,1,172,165,158,152,143,137,131,125,118,112,106,100,94,87,81,75,69,63,56,45,20,200,200,200,200,200,200,200,200,198,193,188,183,178,173,168,163,158,153,148,129,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,8,0,8,0,8,0,16,0,16,0,16,0,21,0,21,0,24,0,29,0,34,0,36,0,0,0,0,0,0,0,2,0,20,0,55,0,108,0,178,0,10,1,116,1,238,1,123,2,24,3,198,3,133,4,85,5,54,6,39,7,41,8,58,9,91,10,140,11,204,12,27,14,121,15,229,16,95,18,230,19,123,21,28,23,202,24,132,26,73,28,25,30,243,31,215,33,196,35,185,37,183,39,188,41,199,43,216,45,239,47,10,50,41,52,75,54,111,56,149,58,187,60,226,62,8,65,45,67,80,69,111,71,139,73,163,75,181,77,194,79,200,81,199,83,190,85,173,87,147,89,111,91,66,93,10,95,198,96,120,98,29,100,183,101,67,103,195,104,54,106,156,107,245,108,64,110,125,111,173,112,207,113,227,114,234,115,228,116,208,117,176,118,130,119,72,120,1,121,175,121,81,122,231,122,114,123,243,123,105,124,214,124,57,125,148,125,229,125,47,126,114,126,173,126,225,126,16,127,56,127,92,127,122,127,149,127,171,127,189,127,205,127,217,127,228,127,236,127,242,127,246,127,250,127,252,127,254,127,255,127,255,127,255,127,255,127,255,127,255,127,224,1,0,0,68,68,0,0,8,0,0,0,255,255,255,255,5,0,96,0,3,0,32,0,4,0,8,0,2,0,4,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,192,52,0,0,112,42,0,0,240,0,0,0,68,68,0,0,7,0,0,0,1,0,0,0,5,0,48,0,3,0,16,0,4,0,4,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,50,0,0,112,42,0,0,120,0,0,0,68,68,0,0,6,0,0,0,2,0,0,0,5,0,24,0,3,0,8,0,2,0,4,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,49,0,0,112,42,0,0,60,0,0,0,68,68,0,0,5,0,0,0,3,0,0,0,5,0,12,0,3,0,4,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,41,0,0,112,42,0,0,255,127,255,127,255,127,254,127,253,127,251,127,249,127,247,127,244,127,241,127,238,127,234,127,230,127,226,127,221,127,216,127,210,127,205,127,198,127,192,127,185,127,178,127,170,127,162,127,154,127,145,127,136,127,127,127,117,127,107,127,97,127,86,127,75,127,64,127,52,127,40,127,27,127,14,127,1,127,244,126,230,126,216,126,201,126,186,126,171,126,155,126,139,126,123,126,106,126,89,126,72,126,54,126,36,126,18,126,255,125,236,125,217,125,197,125,177,125,157,125,136,125,115,125,93,125,71,125,49,125,27,125,4,125,237,124,213,124,189,124,165,124,140,124,115,124,90,124,65,124,39,124,12,124,242,123,215,123,188,123,160,123,132,123,104,123,75,123,46,123,17,123,243,122,213,122,183,122,152,122,121,122,90,122,58,122,26,122,250,121,217,121,184,121,151,121,117,121,83,121,49,121,14,121,235,120,200,120,164,120,128,120,92,120,55,120,18,120,237,119,199,119,161,119,123,119,84,119,45,119,6,119,222,118,182,118,142,118,101,118,61,118,19,118,234,117,192,117,150,117,107,117,64,117,21,117,234,116,190,116,146,116,101,116,56,116,11,116,222,115,176,115,130,115,84,115,37,115,246,114,199,114,151,114,103,114,55,114,6,114,214,113,164,113,115,113,65,113,15,113,220,112,170,112,119,112,67,112,16,112,220,111,167,111,115,111,62,111,9,111,211,110,157,110,103,110,49,110,250,109,195,109,140,109,84,109,28,109,228,108,172,108,115,108,58,108,0,108,199,107,141,107,82,107,24,107,221,106,162,106,102,106,42,106,238,105,178,105,117,105,56,105,251,104,190,104,128,104,66,104,4,104,197,103,134,103,71,103,7,103,200,102,135,102,71,102,7,102,198,101,132,101,67,101,1,101,191,100,125,100,58,100,248,99,180,99,113,99,45,99,234,98,165,98,97,98,28,98,215,97,146,97,76,97,6,97,192,96,122,96,51,96,237,95,165,95,94,95,22,95,206,94,134,94,62,94,245,93,172,93,99,93,26,93,208,92,134,92,60,92,241,91,166,91,91,91,16,91,197,90,121,90,45,90,225,89,148,89,72,89,251,88,173,88,96,88,18,88,196,87,118,87,40,87,217,86,138,86,59,86,236,85,156,85,76,85,252,84,172,84,91,84,11,84,186,83,104,83,23,83,197,82,115,82,33,82,207,81,124,81,41,81,214,80,131,80,48,80,220,79,136,79,52,79,224,78,139,78,54,78,225,77,140,77,55,77,225,76,139,76,53,76,223,75,136,75,50,75,219,74,132,74,44,74,213,73,125,73,37,73,205,72,117,72,28,72,196,71,107,71,18,71,184,70,95,70,5,70,171,69,81,69,247,68,157,68,66,68,231,67,140,67,49,67,214,66,122,66,31,66,195,65,103,65,10,65,174,64,81,64,244,63,151,63,58,63,221,62,127,62,34,62,196,61,102,61,8,61,169,60,75,60,236,59,141,59,46,59,207,58,112,58,16,58,177,57,81,57,241,56,145,56,49,56,208,55,112,55,15,55,174,54,77,54,236,53,138,53,41,53,199,52,102,52,4,52,162,51,63,51,221,50,123,50,24,50,181,49,82,49,239,48,140,48,41,48,198,47,98,47,254,46,154,46,55,46,210,45,110,45,10,45,166,44,65,44,220,43,120,43,19,43,174,42,72,42,227,41,126,41,24,41,179,40,77,40,231,39,129,39,27,39,181,38,79,38,232,37,130,37,27,37,181,36,78,36,231,35,128,35,25,35,178,34,74,34,227,33,124,33,20,33,172,32,69,32,221,31,117,31,13,31,165,30,61,30,213,29,108,29,4,29,155,28,51,28,202,27,97,27,249,26,144,26,39,26,190,25,85,25,236,24,130,24,25,24,176,23,70,23,221,22,115,22,10,22,160,21,54,21,205,20,99,20,249,19,143,19,37,19,187,18,81,18,231,17,124,17,18,17,168,16,61,16,211,15,105,15,254,14,148,14,41,14,190,13,84,13,233,12,126,12,20,12,169,11,62,11,211,10,104,10,254,9,147,9,40,9,189,8,82,8,231,7,124,7,17,7,166,6,58,6,207,5,100,5,249,4,142,4,35,4,184,3,76,3,225,2,118,2,11,2,160,1,52,1,201,0,94,0,243,255,135,255,28,255,177,254,70,254,218,253,111,253,4,253,153,252,46,252,194,251,87,251,236,250,129,250,22,250,171,249,64,249,213,248,106,248,255,247,147,247,41,247,190,246,83,246,232,245,125,245,18,245,167,244,60,244,210,243,103,243,252,242,145,242,39,242,188,241,82,241,231,240,125,240,18,240,168,239,62,239,211,238,105,238,255,237,149,237,43,237,193,236,87,236,237,235,131,235,25,235,175,234,70,234,220,233,114,233,9,233,159,232,54,232,205,231,99,231,250,230,145,230,40,230,191,229,86,229,237,228,132,228,28,228,179,227,75,227,226,226,122,226,17,226,169,225,65,225,217,224,113,224,9,224,161,223,58,223,210,222,107,222,3,222,156,221,53,221,205,220,102,220,255,219,153,219,50,219,203,218,101,218,254,217,152,217,50,217,203,216,101,216,255,215,154,215,52,215,206,214,105,214,4,214,158,213,57,213,212,212,111,212,11,212,166,211,65,211,221,210,121,210,20,210,176,209,77,209,233,208,133,208,34,208,190,207,91,207,248,206,149,206,50,206,207,205,109,205,10,205,168,204,70,204,228,203,130,203,32,203,191,202,93,202,252,201,155,201,58,201,217,200,120,200,24,200,183,199,87,199,247,198,151,198,55,198,216,197,120,197,25,197,186,196,91,196,252,195,157,195,63,195,225,194,131,194,37,194,199,193,105,193,12,193,174,192,81,192,244,191,152,191,59,191,223,190,130,190,38,190,203,189,111,189,19,189,184,188,93,188,2,188,167,187,77,187,242,186,152,186,62,186,228,185,139,185,49,185,216,184,127,184,38,184,205,183,117,183,29,183,197,182,109,182,21,182,190,181,102,181,15,181,185,180,98,180,12,180,181,179,95,179,10,179,180,178,95,178,9,178,181,177,96,177,11,177,183,176,99,176,15,176,187,175,104,175,21,175,194,174,111,174,29,174,202,173,120,173,38,173,213,172,131,172,50,172,225,171,144,171,64,171,240,170,160,170,80,170,0,170,177,169,98,169,19,169,197,168,118,168,40,168,218,167,141,167,63,167,242,166,165,166,89,166,12,166,192,165,116,165,40,165,221,164,146,164,71,164,252,163,178,163,104,163,30,163,212,162,139,162,66,162,249,161,176,161,104,161,32,161,216,160,144,160,73,160,2,160,187,159,116,159,46,159,232,158,162,158,93,158,24,158,211,157,142,157,74,157,5,157,194,156,126,156,59,156,248,155,181,155,114,155,48,155,238,154,173,154,107,154,42,154,233,153,169,153,104,153,41,153,233,152,169,152,106,152,43,152,237,151,175,151,113,151,51,151,245,150,184,150,123,150,63,150,3,150,199,149,139,149,80,149,20,149,218,148,159,148,101,148,43,148,241,147,184,147,127,147,70,147,14,147,214,146,158,146,102,146,47,146,248,145,193,145,139,145,85,145,31,145,234,144,181,144,128,144,76,144,23,144,227,143,176,143,125,143,74,143,23,143,229,142,178,142,129,142,79,142,30,142,237,141,189,141,141,141,93,141,45,141,254,140,207,140,161,140,114,140,68,140,23,140,233,139,188,139,144,139,99,139,55,139,11,139,224,138,181,138,138,138,96,138,54,138,12,138,226,137,185,137,144,137,104,137,64,137,24,137,240,136,201,136,162,136,124,136,85,136,48,136,10,136,229,135,192,135,155,135,119,135,83,135,47,135,12,135,233,134,199,134,164,134,130,134,97,134,64,134,31,134,254,133,222,133,190,133,158,133,127,133,96,133,66,133,35,133,5,133,232,132,203,132,174,132,145,132,117,132,89,132,62,132,34,132,7,132,237,131,211,131,185,131,159,131,134,131,109,131,85,131,61,131,37,131,14,131,246,130,224,130,201,130,179,130,157,130,136,130,115,130,94,130,74,130,54,130,34,130,15,130,252,129,233,129,215,129,197,129,179,129,162,129,145,129,129,129,113,129,97,129,81,129,66,129,51,129,37,129,23,129,9,129,251,128,238,128,226,128,213,128,201,128,189,128,178,128,167,128,156,128,146,128,136,128,127,128,117,128,109,128,100,128,92,128,84,128,76,128,69,128,62,128,56,128,50,128,44,128,39,128,34,128,29,128,25,128,21,128,17,128,14,128,11,128,8,128,6,128,4,128,3,128,1,128,1,128,1,128,255,127,255,127,253,127,249,127,244,127,238,127,230,127,220,127,210,127,198,127,184,127,169,127,153,127,135,127,116,127,96,127,74,127,50,127,26,127,0,127,228,126,199,126,169,126,137,126,104,126,70,126,34,126,253,125,214,125,174,125,133,125,90,125,46,125,1,125,210,124,162,124,112,124,61,124,9,124,212,123,157,123,100,123,42,123,239,122,179,122,117,122,54,122,246,121,180,121,113,121,44,121,231,120,160,120,87,120,13,120,194,119,118,119,40,119,217,118,137,118,55,118,229,117,144,117,59,117,228,116,140,116,51,116,216,115,124,115,31,115,193,114,97,114,0,114,158,113,59,113,214,112,112,112,9,112,161,111,55,111,205,110,97,110,243,109,133,109,21,109,164,108,50,108,191,107,75,107,213,106,95,106,231,105,110,105,244,104,120,104,252,103,126,103,255,102,127,102,254,101,124,101,249,100,117,100,239,99,105,99,225,98,88,98,206,97,68,97,184,96,43,96,157,95,13,95,125,94,236,93,90,93,199,92,50,92,157,91,7,91,112,90,215,89,62,89,164,88,9,88,108,87,207,86,49,86,146,85,242,84,81,84,175,83,13,83,105,82,197,81,31,81,121,80,210,79,41,79,128,78,215,77,44,77,128,76,212,75,39,75,121,74,202,73,26,73,106,72,185,71,7,71,84,70,160,69,236,68,55,68,129,67,202,66,19,66,91,65,162,64,233,63,47,63,116,62,184,61,252,60,63,60,130,59,195,58,4,58,69,57,133,56,196,55,3,55,65,54,126,53,187,52,247,51,51,51,110,50,169,49,227,48,29,48,86,47,142,46,198,45,253,44,52,44,107,43,161,42,214,41,12,41,64,40,116,39,168,38,219,37,14,37,65,36,115,35,165,34,214,33,7,33,56,32,104,31,152,30,199,29,247,28,38,28,84,27,131,26,177,25,222,24,12,24,57,23,102,22,147,21,191,20,236,19,24,19,67,18,111,17,155,16,198,15,241,14,28,14,71,13,113,12,156,11,198,10,240,9,26,9,68,8,110,7,152,6,194,5,236,4,21,4,63,3,105,2,146,1,188,0,229,255,15,255,56,254,98,253,139,252,181,251,223,250,8,250,50,249,92,248,134,247,176,246,218,245,5,245,47,244,89,243,132,242,175,241,218,240,5,240,48,239,92,238,136,237,179,236,223,235,12,235,56,234,101,233,146,232,191,231,237,230,27,230,73,229,119,228,166,227,213,226,4,226,52,225,100,224,148,223,197,222,246,221,40,221,89,220,140,219,190,218,241,217,37,217,89,216,141,215,194,214,247,213,45,213,99,212,153,211,208,210,8,210,64,209,121,208,178,207,235,206,38,206,96,205,156,204,216,203,20,203,81,202,143,201,205,200,12,200,75,199,139,198,204,197,13,197,79,196,146,195,213,194,25,194,93,193,163,192,233,191,47,191,119,190,191,189,8,189,82,188,156,187,231,186,51,186,127,185,205,184,27,184,106,183,186,182,10,182,92,181,174,180,1,180,85,179,169,178,255,177,85,177,172,176,5,176,94,175,183,174,18,174,110,173,203,172,40,172,134,171,230,170,70,170,167,169,9,169,108,168,209,167,54,167,156,166,3,166,107,165,212,164,62,164,168,163,20,163,129,162,240,161,95,161,207,160,64,160,178,159,37,159,154,158,15,158,133,157,253,156,118,156,239,155,106,155,230,154,99,154,225,153,96,153,225,152,98,152,229,151,105,151,238,150,116,150,251,149,132,149,13,149,152,148,36,148,177,147,63,147,207,146,95,146,241,145,132,145,25,145,174,144,69,144,221,143,118,143,17,143,172,142,73,142,231,141,135,141,39,141,201,140,109,140,17,140,183,139,94,139,6,139,176,138,90,138,7,138,180,137,99,137,19,137,196,136,119,136,43,136,224,135,151,135,79,135,8,135,194,134,126,134,60,134,250,133,186,133,123,133,62,133,2,133,199,132,142,132,86,132,31,132,234,131,182,131,131,131,82,131,34,131,244,130,198,130,155,130,112,130,71,130,32,130,250,129,213,129,177,129,143,129,111,129,79,129,49,129,21,129,250,128,224,128,200,128,177,128,155,128,135,128,116,128,99,128,83,128,68,128,55,128,44,128,33,128,24,128,17,128,11,128,6,128,2,128,1,128,255,127,252,127,243,127,229,127,208,127,182,127,151,127,114,127,71,127,23,127,225,126,165,126,100,126,30,126,209,125,128,125,41,125,204,124,106,124,3,124,150,123,35,123,171,122,46,122,172,121,36,121,151,120,4,120,108,119,207,118,45,118,134,117,217,116,40,116,113,115,181,114,244,113,46,113,99,112,148,111,191,110,230,109,7,109,36,108,60,107,80,106,95,105,105,104,110,103,111,102,108,101,100,100,88,99,71,98,50,97,25,96,251,94,218,93,180,92,138,91,93,90,43,89,245,87,188,86,126,85,61,84,248,82,176,81,100,80,20,79,193,77,107,76,17,75,180,73,84,72,240,70,138,69,32,68,179,66,68,65,210,63,92,62,228,60,106,59,237,57,109,56,235,54,102,53,223,51,86,50,202,48,61,47,173,45,27,44,136,42,242,40,91,39,194,37,39,36,139,34,237,32,78,31,173,29,12,28,104,26,196,24,31,23,120,21,209,19,41,18,128,16,214,14,44,13,129,11,213,9,42,8,125,6,209,4,36,3,119,1,202,255,29,254,113,252,196,250,24,249,107,247,192,245,20,244,105,242,191,240,22,239,109,237,197,235,30,234,120,232,211,230,47,229,140,227,234,225,74,224,171,222,14,221,114,219,216,217,63,216,168,214,19,213,128,211,239,209,96,208,211,206,72,205,191,203,57,202,181,200,51,199,180,197,55,196,189,194,70,193,210,191,96,190,241,188,133,187,28,186,183,184,84,183,244,181,152,180,63,179,234,177,151,176,73,175,254,173,182,172,114,171,50,170,246,168,189,167,136,166,88,165,43,164,2,163,221,161,189,160,160,159,136,158,116,157,101,156,90,155,83,154,80,153,83,152,89,151,101,150,117,149,137,148,163,147,193,146,228,145,11,145,56,144,105,143,160,142,219,141,28,141,97,140,172,139,251,138,80,138,170,137,9,137,109,136,215,135,70,135,186,134,51,134,178,133,54,133,192,132,79,132,227,131,125,131,28,131,193,130,107,130,27,130,208,129,139,129,75,129,17,129,221,128,174,128,133,128,97,128,67,128,42,128,23,128,10,128,2,128,255,127,242,127,205,127,146,127,65,127,217,126,92,126,200,125,29,125,93,124,136,123,156,122,155,121,133,120,89,119,24,118,195,116,90,115,220,113,74,112,164,110,235,108,31,107,64,105,79,103,75,101,54,99,15,97,215,94,143,92,55,90,206,87,86,85,207,82,58,80,151,77,230,74,40,72,93,69,134,66,163,63,181,60,189,57,186,54,174,51,153,48,123,45,85,42,40,39,244,35,185,32,121,29,52,26,234,22,156,19,75,16,247,12,160,9,72,6,239,2,149,255,59,252,226,248,138,245,52,242,225,238,144,235,67,232,250,228,182,225,119,222,63,219,12,216,225,212,189,209,161,206,142,203,132,200,132,197,142,194,163,191,195,188,239,185,40,183,109,180,191,177,31,175,141,172,10,170,150,167,50,165,221,162,153,160,102,158,67,156,50,154,51,152,70,150,108,148,165,146,241,144,80,143,195,141,74,140,229,138,149,137,90,136,52,135,35,134,39,133,65,132,113,131,182,130,17,130,131,129,11,129,168,128,93,128,39,128,9,128,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,41,0,41,0,41,0,82,0,82,0,123,0,164,0,200,0,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,0,41,0,41,0,41,0,123,0,123,0,123,0,164,0,164,0,240,0,10,1,27,1,39,1,41,0,41,0,41,0,41,0,41,0,41,0,41,0,41,0,123,0,123,0,123,0,123,0,240,0,240,0,240,0,10,1,10,1,49,1,62,1,72,1,80,1,123,0,123,0,123,0,123,0,123,0,123,0,123,0,123,0,240,0,240,0,240,0,240,0,49,1,49,1,49,1,62,1,62,1,87,1,95,1,102,1,108,1,240,0,240,0,240,0,240,0,240,0,240,0,240,0,240,0,49,1,49,1,49,1,49,1,87,1,87,1,87,1,95,1,95,1,114,1,120,1,126,1,131,1,0,0,0,0,0,0,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],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);allocate([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,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,0,0,12,0,24,0,36,0,48,0,4,0,16,0,28,0,40,0,52,0,8,0,20,0,32,0,44,0,56,0,1,0,13,0,25,0,37,0,49,0,5,0,17,0,29,0,41,0,53,0,9,0,21,0,33,0,45,0,57,0,2,0,14,0,26,0,38,0,50,0,6,0,18,0,30,0,42,0,54,0,10,0,22,0,34,0,46,0,58,0,3,0,15,0,27,0,39,0,51,0,7,0,19,0,31,0,43,0,55,0,11,0,23,0,35,0,47,0,59,0,255,127,0,0,254,127,83,254,245,127,166,252,231,127,249,250,212,127,77,249,186,127,161,247,155,127,246,245,119,127,74,244,76,127,159,242,29,127,245,240,232,126,75,239,173,126,163,237,108,126,251,235,39,126,84,234,219,125,173,232,138,125,7,231,51,125,99,229,216,124,193,227,119,124,30,226,16,124,125,224,164,123,223,222,51,123,65,221,187,122,166,219,62,122,12,218,189,121,114,216,54,121,220,214,169,120,71,213,23,120,180,211,128,119,35,210,228,118,147,208,66,118,4,207,155,117,121,205,240,116,240,203,62,116,106,202,137,115,229,200,206,114,99,199,13,114,229,197,72,113,103,196,125,112,237,194,174,111,118,193,219,110,0,192,2,110,143,190,36,109,33,189,66,108,180,187,90,107,75,186,110,106,227,184,126,105,128,183,136,104,33,182,142,103,196,180,145,102,106,179,141,101,21,178,134,100,194,176,122,99,115,175,106,98,40,174,86,97,223,172,61,96,155,171,33,95,90,170,255,93,30,169,218,92,229,167,177,91,175,166,131,90,125,165,82,89,80,164,29,88,39,163,228,86,1,162,167,85,224,160,102,84,196,159,34,83,171,158,218,81,150,157,142,80,135,156,64,79,123,155,237,77,115,154,151,76,113,153,61,75,115,152,226,73,120,151,129,72,132,150,29,71,146,149,182,69,167,148,77,68,191,147,226,66,220,146,115,65,254,145,1,64,38,145,140,62,82,144,20,61,131,143,154,59,185,142,30,58,243,141,158,56,51,141,28,55,120,140,152,53,195,139,17,52,18,139,137,50,101,138,252,48,190,137,110,47,29,137,224,45,128,136,78,44,233,135,187,42,87,135,38,41,202,134,143,39,68,134,246,37,194,133,91,36,70,133,191,34,207,132,34,33,92,132,131,31,241,131,226,29,138,131,65,28,40,131,159,26,205,130,249,24,118,130,85,23,37,130,173,21,218,129,7,20,148,129,95,18,83,129,182,16,25,129,12,15,227,128,98,13,180,128,183,11,138,128,12,10,101,128,96,8,70,128,180,6,44,128,7,5,26,128,92,3,11,128,174,1,2,128,0,0,1,128,83,254,2,128,166,252,11,128,249,250,25,128,77,249,44,128,161,247,70,128,246,245,101,128,74,244,137,128,159,242,180,128,245,240,227,128,75,239,24,129,163,237,83,129,251,235,148,129,84,234,217,129,173,232,37,130,7,231,118,130,99,229,205,130,193,227,40,131,30,226,137,131,125,224,240,131,223,222,92,132,65,221,205,132,166,219,69,133,12,218,194,133,114,216,67,134,220,214,202,134,71,213,87,135,180,211,233,135,35,210,128,136,147,208,28,137,4,207,190,137,121,205,101,138,240,203,16,139,106,202,194,139,229,200,119,140,99,199,50,141,229,197,243,141,103,196,184,142,237,194,131,143,118,193,82,144,0,192,37,145,143,190,254,145,33,189,220,146,180,187,190,147,75,186,166,148,227,184,146,149,128,183,130,150,33,182,120,151,196,180,114,152,106,179,111,153,21,178,115,154,194,176,122,155,115,175,134,156,40,174,150,157,223,172,170,158,155,171,195,159,90,170,223,160,30,169,1,162,229,167,38,163,175,166,79,164,125,165,125,165,80,164,174,166,39,163,227,167,1,162,28,169,224,160,89,170,196,159,154,171,171,158,222,172,150,157,38,174,135,156,114,175,123,155,192,176,115,154,19,178,113,153,105,179,115,152,195,180,120,151,30,182,132,150,127,183,146,149,227,184,167,148,74,186,191,147,179,187,220,146,30,189,254,145,141,190,38,145,255,191,82,144,116,193,131,143,236,194,185,142,102,196,243,141,226,197,51,141,98,199,120,140,228,200,195,139,104,202,18,139,239,203,101,138,119,205,190,137,4,207,29,137,146,208,128,136,32,210,233,135,178,211,87,135,69,213,202,134,218,214,68,134,113,216,194,133,10,218,70,133,165,219,207,132,65,221,92,132,222,222,241,131,125,224,138,131,30,226,40,131,191,227,205,130,97,229,118,130,7,231,37,130,171,232,218,129,83,234,148,129,249,235,83,129,161,237,25,129,74,239,227,128,244,240,180,128,158,242,138,128,73,244,101,128,244,245,70,128,160,247,44,128,76,249,26,128,249,250,11,128,164,252,2,128,82,254,1,128,0,0,2,128,173,1,11,128,90,3,25,128,7,5,44,128,179,6,70,128,95,8,101,128,10,10,137,128,182,11,180,128,97,13,227,128,11,15,24,129,181,16,83,129,93,18,148,129,5,20,217,129,172,21,37,130,83,23,118,130,249,24,205,130,157,26,40,131,63,28,137,131,226,29,240,131,131,31,92,132,33,33,205,132,191,34,69,133,90,36,194,133,244,37,67,134,142,39,202,134,36,41,87,135,185,42,233,135,76,44,128,136,221,45,28,137,109,47,190,137,252,48,101,138,135,50,16,139,16,52,194,139,150,53,119,140,27,55,50,141,157,56,243,141,27,58,184,142,153,59,131,143,19,61,82,144,138,62,37,145,0,64,254,145,113,65,220,146,223,66,190,147,76,68,166,148,181,69,146,149,29,71,130,150,128,72,120,151,223,73,114,152,60,75,111,153,150,76,115,154,235,77,122,155,62,79,134,156,141,80,150,157,216,81,170,158,33,83,195,159,101,84,223,160,166,85,1,162,226,86,38,163,27,88,79,164,81,89,125,165,131,90,174,166,176,91,227,167,217,92,28,169,255,93,89,170,32,95,154,171,60,96,222,172,85,97,38,174,106,98,114,175,121,99,192,176,133,100,19,178,141,101,105,179,143,102,195,180,141,103,30,182,136,104,127,183,124,105,227,184,110,106,74,186,89,107,179,187,65,108,30,189,36,109,141,190,2,110,255,191,218,110,116,193,174,111,236,194,125,112,102,196,71,113,226,197,13,114,98,199,205,114,228,200,136,115,104,202,61,116,239,203,238,116,119,205,155,117,4,207,66,118,146,208,227,118,32,210,128,119,178,211,23,120,69,213,169,120,218,214,54,121,113,216,188,121,10,218,62,122,165,219,186,122,65,221,49,123,222,222,164,123,125,224,15,124,30,226,118,124,191,227,216,124,97,229,51,125,7,231,138,125,171,232,219,125,83,234,38,126,249,235,108,126,161,237,173,126,74,239,231,126,244,240,29,127,158,242,76,127,73,244,118,127,244,245,155,127,160,247,186,127,76,249,212,127,249,250,230,127,164,252,245,127,82,254,254,127,0,0,255,127,173,1,254,127,90,3,245,127,7,5,231,127,179,6,212,127,95,8,186,127,10,10,155,127,182,11,119,127,97,13,76,127,11,15,29,127,181,16,232,126,93,18,173,126,5,20,108,126,172,21,39,126,83,23,219,125,249,24,138,125,157,26,51,125,63,28,216,124,226,29,119,124,131,31,16,124,33,33,164,123,191,34,51,123,90,36,187,122,244,37,62,122,142,39,189,121,36,41,54,121,185,42,169,120,76,44,23,120,221,45,128,119,109,47,228,118,252,48,66,118,135,50,155,117,16,52,240,116,150,53,62,116,27,55,137,115,157,56,206,114,27,58,13,114,153,59,72,113,19,61,125,112,138,62,174,111,0,64,219,110,113,65,2,110,223,66,36,109,76,68,66,108,181,69,90,107,29,71,110,106,128,72,126,105,223,73,136,104,60,75,142,103,150,76,145,102,235,77,141,101,62,79,134,100,141,80,122,99,216,81,106,98,33,83,86,97,101,84,61,96,166,85,33,95,226,86,255,93,27,88,218,92,81,89,177,91,131,90,131,90,176,91,82,89,217,92,29,88,255,93,228,86,32,95,167,85,60,96,102,84,85,97,34,83,106,98,218,81,121,99,142,80,133,100,64,79,141,101,237,77,143,102,151,76,141,103,61,75,136,104,226,73,124,105,129,72,110,106,29,71,89,107,182,69,65,108,77,68,36,109,226,66,2,110,115,65,218,110,1,64,174,111,140,62,125,112,20,61,71,113,154,59,13,114,30,58,205,114,158,56,136,115,28,55,61,116,152,53,238,116,17,52,155,117,137,50,66,118,252,48,227,118,110,47,128,119,224,45,23,120,78,44,169,120,187,42,54,121,38,41,188,121,143,39,62,122,246,37,186,122,91,36,49,123,191,34,164,123,34,33,15,124,131,31,118,124,226,29,216,124,65,28,51,125,159,26,138,125,249,24,219,125,85,23,38,126,173,21,108,126,7,20,173,126,95,18,231,126,182,16,29,127,12,15,76,127,98,13,118,127,183,11,155,127,12,10,186,127,96,8,212,127,180,6,230,127,7,5,245,127,92,3,254,127,174,1,0,0,24,0,48,0,72,0,96,0,8,0,32,0,56,0,80,0,104,0,16,0,40,0,64,0,88,0,112,0,4,0,28,0,52,0,76,0,100,0,12,0,36,0,60,0,84,0,108,0,20,0,44,0,68,0,92,0,116,0,1,0,25,0,49,0,73,0,97,0,9,0,33,0,57,0,81,0,105,0,17,0,41,0,65,0,89,0,113,0,5,0,29,0,53,0,77,0,101,0,13,0,37,0,61,0,85,0,109,0,21,0,45,0,69,0,93,0,117,0,2,0,26,0,50,0,74,0,98,0,10,0,34,0,58,0,82,0,106,0,18,0,42,0,66,0,90,0,114,0,6,0,30,0,54,0,78,0,102,0,14,0,38,0,62,0,86,0,110,0,22,0,46,0,70,0,94,0,118,0,3,0,27,0,51,0,75,0,99,0,11,0,35,0,59,0,83,0,107,0,19,0,43,0,67,0,91,0,115,0,7,0,31,0,55,0,79,0,103,0,15,0,39,0,63,0,87,0,111,0,23,0,47,0,71,0,95,0,119,0,0,0,48,0,96,0,144,0,192,0,16,0,64,0,112,0,160,0,208,0,32,0,80,0,128,0,176,0,224,0,4,0,52,0,100,0,148,0,196,0,20,0,68,0,116,0,164,0,212,0,36,0,84,0,132,0,180,0,228,0,8,0,56,0,104,0,152,0,200,0,24,0,72,0,120,0,168,0,216,0,40,0,88,0,136,0,184,0,232,0,12,0,60,0,108,0,156,0,204,0,28,0,76,0,124,0,172,0,220,0,44,0,92,0,140,0,188,0,236,0,1,0,49,0,97,0,145,0,193,0,17,0,65,0,113,0,161,0,209,0,33,0,81,0,129,0,177,0,225,0,5,0,53,0,101,0,149,0,197,0,21,0,69,0,117,0,165,0,213,0,37,0,85,0,133,0,181,0,229,0,9,0,57,0,105,0,153,0,201,0,25,0,73,0,121,0,169,0,217,0,41,0,89,0,137,0,185,0,233,0,13,0,61,0,109,0,157,0,205,0,29,0,77,0,125,0,173,0,221,0,45,0,93,0,141,0,189,0,237,0,2,0,50,0,98,0,146,0,194,0,18,0,66,0,114,0,162,0,210,0,34,0,82,0,130,0,178,0,226,0,6,0,54,0,102,0,150,0,198,0,22,0,70,0,118,0,166,0,214,0,38,0,86,0,134,0,182,0,230,0,10,0,58,0,106,0,154,0,202,0,26,0,74,0,122,0,170,0,218,0,42,0,90,0,138,0,186,0,234,0,14,0,62,0,110,0,158,0,206,0,30,0,78,0,126,0,174,0,222,0,46,0,94,0,142,0,190,0,238,0,3,0,51,0,99,0,147,0,195,0,19,0,67,0,115,0,163,0,211,0,35,0,83,0,131,0,179,0,227,0,7,0,55,0,103,0,151,0,199,0,23,0,71,0,119,0,167,0,215,0,39,0,87,0,135,0,183,0,231,0,11,0,59,0,107,0,155,0,203,0,27,0,75,0,123,0,171,0,219,0,43,0,91,0,139,0,187,0,235,0,15,0,63,0,111,0,159,0,207,0,31,0,79,0,127,0,175,0,223,0,47,0,95,0,143,0,191,0,239,0,0,0,96,0,192,0,32,1,128,1,32,0,128,0,224,0,64,1,160,1,64,0,160,0,0,1,96,1,192,1,8,0,104,0,200,0,40,1,136,1,40,0,136,0,232,0,72,1,168,1,72,0,168,0,8,1,104,1,200,1,16,0,112,0,208,0,48,1,144,1,48,0,144,0,240,0,80,1,176,1,80,0,176,0,16,1,112,1,208,1,24,0,120,0,216,0,56,1,152,1,56,0,152,0,248,0,88,1,184,1,88,0,184,0,24,1,120,1,216,1,4,0,100,0,196,0,36,1,132,1,36,0,132,0,228,0,68,1,164,1,68,0,164,0,4,1,100,1,196,1,12,0,108,0,204,0,44,1,140,1,44,0,140,0,236,0,76,1,172,1,76,0,172,0,12,1,108,1,204,1,20,0,116,0,212,0,52,1,148,1,52,0,148,0,244,0,84,1,180,1,84,0,180,0,20,1,116,1,212,1,28,0,124,0,220,0,60,1,156,1,60,0,156,0,252,0,92,1,188,1,92,0,188,0,28,1,124,1,220,1,1,0,97,0,193,0,33,1,129,1,33,0,129,0,225,0,65,1,161,1,65,0,161,0,1,1,97,1,193,1,9,0,105,0,201,0,41,1,137,1,41,0,137,0,233,0,73,1,169,1,73,0,169,0,9,1,105,1,201,1,17,0,113,0,209,0,49,1,145,1,49,0,145,0,241,0,81,1,177,1,81,0,177,0,17,1,113,1,209,1,25,0,121,0,217,0,57,1,153,1,57,0,153,0,249,0,89,1,185,1,89,0,185,0,25,1,121,1,217,1,5,0,101,0,197,0,37,1,133,1,37,0,133,0,229,0,69,1,165,1,69,0,165,0,5,1,101,1,197,1,13,0,109,0,205,0,45,1,141,1,45,0,141,0,237,0,77,1,173,1,77,0,173,0,13,1,109,1,205,1,21,0,117,0,213,0,53,1,149,1,53,0,149,0,245,0,85,1,181,1,85,0,181,0,21,1,117,1,213,1,29,0,125,0,221,0,61,1,157,1,61,0,157,0,253,0,93,1,189,1,93,0,189,0,29,1,125,1,221,1,2,0,98,0,194,0,34,1,130,1,34,0,130,0,226,0,66,1,162,1,66,0,162,0,2,1,98,1,194,1,10,0,106,0,202,0,42,1,138,1,42,0,138,0,234,0,74,1,170,1,74,0,170,0,10,1,106,1,202,1,18,0,114,0,210,0,50,1,146,1,50,0,146,0,242,0,82,1,178,1,82,0,178,0,18,1,114,1,210,1,26,0,122,0,218,0,58,1,154,1,58,0,154,0,250,0,90,1,186,1,90,0,186,0,26,1,122,1,218,1,6,0,102,0,198,0,38,1,134,1,38,0,134,0,230,0,70,1,166,1,70,0,166,0,6,1,102,1,198,1,14,0,110,0,206,0,46,1,142,1,46,0,142,0,238,0,78,1,174,1,78,0,174,0,14,1,110,1,206,1,22,0,118,0,214,0,54,1,150,1,54,0,150,0,246,0,86,1,182,1,86,0,182,0,22,1,118,1,214,1,30,0,126,0,222,0,62,1,158,1,62,0,158,0,254,0,94,1,190,1,94,0,190,0,30,1,126,1,222,1,3,0,99,0,195,0,35,1,131,1,35,0,131,0,227,0,67,1,163,1,67,0,163,0,3,1,99,1,195,1,11,0,107,0,203,0,43,1,139,1,43,0,139,0,235,0,75,1,171,1,75,0,171,0,11,1,107,1,203,1,19,0,115,0,211,0,51,1,147,1,51,0,147,0,243,0,83,1,179,1,83,0,179,0,19,1,115,1,211,1,27,0,123,0,219,0,59,1,155,1,59,0,155,0,251,0,91,1,187,1,91,0,187,0,27,1,123,1,219,1,7,0,103,0,199,0,39,1,135,1,39,0,135,0,231,0,71,1,167,1,71,0,167,0,7,1,103,1,199,1,15,0,111,0,207,0,47,1,143,1,47,0,143,0,239,0,79,1,175,1,79,0,175,0,15,1,111,1,207,1,23,0,119,0,215,0,55,1,151,1,55,0,151,0,247,0,87,1,183,1,87,0,183,0,23,1,119,1,215,1,31,0,127,0,223,0,63,1,159,1,63,0,159,0,255,0,95,1,191,1,95,0,191,0,31,1,127,1,223,1,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,0,0,0,0,0,0,0,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,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,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,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,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,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,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,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,0,115,0,102,0,83,0,64,195,117,10,87,92,47,154,25,2,1,0,0,0,0,0,0,0,8,13,16,19,21,23,24,26,27,28,29,30,31,32,32,33,34,34,35,36,36,37,37,15,0,0,0,10,0,0,0,5,0,0,0,0,0,0,0,0,15,8,7,4,11,12,3,2,13,10,5,6,9,14,1,0,9,6,3,4,5,8,1,2,7,0,0,0,0,0,0,184,126,154,121,0,0,0,0,154,121,102,102,0,0,0,0,184,126,51,115,0,0,0,0,6,0,0,0,4,0,0,0,3,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,255,1,255,2,254,2,254,3,253,0,1,0,1,255,2,255,2,254,3,254,3,0,2,255,255,255,0,0,1,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,255,2,1,0,1,1,0,0,255,255,0,0,0,0,0,0,1,255,0,1,255,0,255,1,254,2,254,254,2,253,2,3,253,252,3,252,4,4,251,5,250,251,6,249,6,5,8,247,0,0,1,0,0,0,0,0,0,0,255,1,0,0,1,255,0,1,255,255,1,255,2,1,255,2,254,254,2,254,2,2,3,253,0,1,0,0,0,0,0,0,1,0,1,0,0,1,255,1,0,0,2,1,255,2,255,255,2,255,2,2,255,3,254,254,254,3,0,1,0,0,1,0,1,255,2,255,2,255,2,3,254,3,254,254,4,4,253,5,253,252,6,252,6,5,251,8,250,251,249,9,6,0,3,0,7,3,0,1,10,0,2,6,18,10,12,0,4,0,2,0,0,0,9,4,7,4,0,3,12,7,7,0,210,6,138,58,171,152,0,0,198,26,169,100,246,216,0,0,42,175,213,201,207,255,64,0,17,0,99,255,97,1,16,254,163,0,39,43,189,86,217,255,6,0,91,0,86,255,186,0,23,0,128,252,192,24,216,77,237,255,220,255,102,0,167,255,232,255,72,1,73,252,8,10,37,62,0,0,0,0,0,0,135,199,61,201,64,0,128,0,134,255,36,0,54,1,0,253,72,2,51,36,69,69,12,0,128,0,18,0,114,255,32,1,139,255,159,252,27,16,123,56,104,2,13,200,246,255,39,0,58,0,210,255,172,255,120,0,184,0,197,254,227,253,4,5,4,21,64,35,0,0,0,0,230,62,198,196,243,255,0,0,20,0,26,0,5,0,225,255,213,255,252,255,65,0,90,0,7,0,99,255,8,255,212,255,81,2,47,6,52,10,199,12,228,87,5,197,3,0,242,255,236,255,241,255,2,0,25,0,37,0,25,0,240,255,185,255,149,255,177,255,50,0,36,1,111,2,214,3,8,5,184,5,148,107,103,196,17,0,12,0,8,0,1,0,246,255,234,255,226,255,224,255,234,255,3,0,44,0,100,0,168,0,243,0,61,1,125,1,173,1,199,1,189,0,168,253,105,2,103,119,117,0,97,255,210,251,8,116,52,0,221,0,168,246,116,110,252,255,17,2,234,242,229,102,208,255,246,2,140,240,165,93,176,255,137,3,117,239,6,83,157,255,204,3,130,239,102,71,149,255,199,3,139,240,39,59,153,255,128,3,97,242,174,46,165,255,5,3,207,244,94,34,185,255,99,2,161,247,152,22,210,255,169,1,161,250,180,11,0,32,254,31,246,31,234,31,216,31,194,31,168,31,136,31,98,31,58,31,10,31,216,30,160,30,98,30,34,30,220,29,144,29,66,29,238,28,150,28,58,28,216,27,114,27,10,27,156,26,42,26,180,25,58,25,188,24,60,24,182,23,46,23,160,22,16,22,126,21,232,20,78,20,176,19,16,19,110,18,200,17,30,17,116,16,198,15,22,15,100,14,174,13,248,12,64,12,132,11,200,10,10,10,74,9,138,8,198,7,2,7,62,6,120,5,178,4,234,3,34,3,90,2,146,1,202,0,0,0,54,255,110,254,166,253,222,252,22,252,78,251,136,250,194,249,254,248,58,248,118,247,182,246,246,245,56,245,124,244,192,243,8,243,82,242,156,241,234,240,58,240,140,239,226,238,56,238,146,237,240,236,80,236,178,235,24,235,130,234,240,233,96,233,210,232,74,232,196,231,68,231,198,230,76,230,214,229,100,229,246,228,142,228,40,228,198,227,106,227,18,227,190,226,112,226,36,226,222,225,158,225,96,225,40,225,246,224,198,224,158,224,120,224,88,224,62,224,40,224,22,224,10,224,2,224,0,224,0,0,0,0,0,0,179,99,0,0,0,0,0,0,71,56,43,30,21,12,6,0,199,165,144,124,109,96,84,71,61,51,42,32,23,15,8,0,241,225,211,199,187,175,164,153,142,132,123,114,105,96,88,80,72,64,57,50,44,38,33,29,24,20,16,12,9,5,2,0,240,61,0,0,248,61,0,0,8,62,0,0,0,0,0,0,4,6,24,7,5,0,0,2,0,0,12,28,41,13,252,247,15,42,25,14,1,254,62,41,247,246,37,65,252,3,250,4,66,7,248,16,14,38,253,33,13,22,39,23,12,255,36,64,27,250,249,10,55,43,17,1,1,8,1,1,6,245,74,53,247,244,55,76,244,8,253,3,93,27,252,26,39,59,3,248,2,0,77,11,9,248,22,44,250,7,40,9,26,3,9,249,20,101,249,4,3,248,42,26,0,241,33,68,2,23,254,55,46,254,15,3,255,21,16,41,250,27,61,39,5,245,42,88,4,1,254,60,65,6,252,255,251,73,56,1,247,19,94,29,247,0,12,99,6,4,8,237,102,46,243,3,2,13,3,2,9,235,84,72,238,245,46,104,234,8,18,38,48,23,0,240,70,83,235,11,5,245,117,22,248,250,23,117,244,3,3,248,95,28,4,246,15,77,60,241,255,4,124,2,252,3,38,84,24,231,2,13,42,13,31,21,252,56,46,255,255,35,79,243,19,249,65,88,247,242,20,4,81,49,227,20,0,75,3,239,5,247,44,92,248,1,253,22,69,31,250,95,41,244,5,39,67,16,252,1,0,250,120,55,220,243,44,122,4,232,81,5,11,3,7,2,0,9,10,88,56,62,0,0,96,62,0,0,176,62,0,0,0,0,0,0,12,35,60,83,108,132,157,180,206,228,15,32,55,77,101,125,151,175,201,225,19,42,66,89,114,137,162,184,209,230,12,25,50,72,97,120,147,172,200,223,26,44,69,90,114,135,159,180,205,225,13,22,53,80,106,130,156,180,205,228,15,25,44,64,90,115,142,168,196,222,19,24,62,82,100,120,145,168,190,214,22,31,50,79,103,120,151,170,203,227,21,29,45,65,106,124,150,171,196,224,30,49,75,97,121,142,165,186,209,229,19,25,52,70,93,116,143,166,192,219,26,34,62,75,97,118,145,167,194,217,25,33,56,70,91,113,143,165,196,223,21,34,51,72,97,117,145,171,196,222,20,29,50,67,90,117,144,168,197,221,22,31,48,66,95,117,146,168,196,222,24,33,51,77,116,134,158,180,200,224,21,28,70,87,106,124,149,170,194,217,26,33,53,64,83,117,152,173,204,225,27,34,65,95,108,129,155,174,210,225,20,26,72,99,113,131,154,176,200,219,34,43,61,78,93,114,155,177,205,229,23,29,54,97,124,138,163,179,209,229,30,38,56,89,118,129,158,178,200,231,21,29,49,63,85,111,142,163,193,222,27,48,77,103,133,158,179,196,215,232,29,47,74,99,124,151,176,198,220,237,33,42,61,76,93,121,155,174,207,225,29,53,87,112,136,154,170,188,208,227,24,30,52,84,131,150,166,186,203,229,37,48,64,84,104,118,156,177,201,230,212,178,148,129,108,96,85,82,79,77,61,59,57,56,51,49,48,45,42,41,40,38,36,34,31,30,21,12,10,3,1,0,255,245,244,236,233,225,217,203,190,176,175,161,149,136,125,114,102,91,81,71,60,52,43,35,28,20,19,18,12,11,5,0,179,138,140,148,151,149,153,151,163,116,67,82,59,92,72,100,89,92,0,0,0,0,0,0,16,0,0,0,0,99,66,36,36,34,36,34,34,34,34,83,69,36,52,34,116,102,70,68,68,176,102,68,68,34,65,85,68,84,36,116,141,152,139,170,132,187,184,216,137,132,249,168,185,139,104,102,100,68,68,178,218,185,185,170,244,216,187,187,170,244,187,187,219,138,103,155,184,185,137,116,183,155,152,136,132,217,184,184,170,164,217,171,155,139,244,169,184,185,170,164,216,223,218,138,214,143,188,218,168,244,141,136,155,170,168,138,220,219,139,164,219,202,216,137,168,186,246,185,139,116,185,219,185,138,100,100,134,100,102,34,68,68,100,68,168,203,221,218,168,167,154,136,104,70,164,246,171,137,139,137,155,218,219,139,255,254,253,238,14,3,2,1,0,255,254,252,218,35,3,2,1,0,255,254,250,208,59,4,2,1,0,255,254,246,194,71,10,2,1,0,255,252,236,183,82,8,2,1,0,255,252,235,180,90,17,2,1,0,255,248,224,171,97,30,4,1,0,255,254,236,173,95,37,7,1,0,255,255,255,131,6,145,255,255,255,255,255,236,93,15,96,255,255,255,255,255,194,83,25,71,221,255,255,255,255,162,73,34,66,162,255,255,255,210,126,73,43,57,173,255,255,255,201,125,71,48,58,130,255,255,255,166,110,73,57,62,104,210,255,255,251,123,65,55,68,100,171,255,250,0,3,0,6,0,3,0,3,0,3,0,4,0,3,0,3,0,3,0,205,1,0,0,32,0,10,0,20,46,100,1,96,63,0,0,160,64,0,0,224,64,0,0,248,64,0,0,152,65,0,0,224,65,0,0,40,66,0,0,0,0,0,0,7,23,38,54,69,85,100,116,131,147,162,178,193,208,223,239,13,25,41,55,69,83,98,112,127,142,157,171,187,203,220,236,15,21,34,51,61,78,92,106,126,136,152,167,185,205,225,240,10,21,36,50,63,79,95,110,126,141,157,173,189,205,221,237,17,20,37,51,59,78,89,107,123,134,150,164,184,205,224,240,10,15,32,51,67,81,96,112,129,142,158,173,189,204,220,236,8,21,37,51,65,79,98,113,126,138,155,168,179,192,209,218,12,15,34,55,63,78,87,108,118,131,148,167,185,203,219,236,16,19,32,36,56,79,91,108,118,136,154,171,186,204,220,237,11,28,43,58,74,89,105,120,135,150,165,180,196,211,226,241,6,16,33,46,60,75,92,107,123,137,156,169,185,199,214,225,11,19,30,44,57,74,89,105,121,135,152,169,186,202,218,234,12,19,29,46,57,71,88,100,120,132,148,165,182,199,216,233,17,23,35,46,56,77,92,106,123,134,152,167,185,204,222,237,14,17,45,53,63,75,89,107,115,132,151,171,188,206,221,240,9,16,29,40,56,71,88,103,119,137,154,171,189,205,222,237,16,19,36,48,57,76,87,105,118,132,150,167,185,202,218,236,12,17,29,54,71,81,94,104,126,136,149,164,182,201,221,237,15,28,47,62,79,97,115,129,142,155,168,180,194,208,223,238,8,14,30,45,62,78,94,111,127,143,159,175,192,207,223,239,17,30,49,62,79,92,107,119,132,145,160,174,190,204,220,235,14,19,36,45,61,76,91,108,121,138,154,172,189,205,222,238,12,18,31,45,60,76,91,107,123,138,154,171,187,204,221,236,13,17,31,43,53,70,83,103,114,131,149,167,185,203,220,237,17,22,35,42,58,78,93,110,125,139,155,170,188,206,224,240,8,15,34,50,67,83,99,115,131,146,162,178,193,209,224,239,13,16,41,66,73,86,95,111,128,137,150,163,183,206,225,241,17,25,37,52,63,75,92,102,119,132,144,160,175,191,212,231,19,31,49,65,83,100,117,133,147,161,174,187,200,213,227,242,18,31,52,68,88,103,117,126,138,149,163,177,192,207,223,239,16,29,47,61,76,90,106,119,133,147,161,176,193,209,224,240,15,21,35,50,61,73,86,97,110,119,129,141,175,198,218,237,225,204,201,184,183,175,158,154,153,135,119,115,113,110,109,99,98,95,79,68,52,50,48,45,43,32,31,27,18,10,3,0,255,251,235,230,212,201,196,182,167,166,163,151,138,124,110,104,90,78,76,70,69,57,45,34,24,21,11,6,5,4,3,0,175,148,160,176,178,173,174,164,177,174,196,182,198,192,182,68,62,66,60,72,117,85,90,118,136,151,142,160,142,155,0,0,0,0,0,0,0,0,0,1,100,102,102,68,68,36,34,96,164,107,158,185,180,185,139,102,64,66,36,34,34,0,1,32,208,139,141,191,152,185,155,104,96,171,104,166,102,102,102,132,1,0,0,0,0,16,16,0,80,109,78,107,185,139,103,101,208,212,141,139,173,153,123,103,36,0,0,0,0,0,0,1,48,0,0,0,0,0,0,32,68,135,123,119,119,103,69,98,68,103,120,118,118,102,71,98,134,136,157,184,182,153,139,134,208,168,248,75,189,143,121,107,32,49,34,34,34,0,17,2,210,235,139,123,185,137,105,134,98,135,104,182,100,183,171,134,100,70,68,70,66,66,34,131,64,166,102,68,36,2,1,0,134,166,102,68,34,34,66,132,212,246,158,139,107,107,87,102,100,219,125,122,137,118,103,132,114,135,137,105,171,106,50,34,164,214,141,143,185,151,121,103,192,34,0,0,0,0,0,1,208,109,74,187,134,249,159,137,102,110,154,118,87,101,119,101,0,2,0,36,36,66,68,35,96,164,102,100,36,0,2,33,167,138,174,102,100,84,2,2,100,107,120,119,36,197,24,0,255,254,253,244,12,3,2,1,0,255,254,252,224,38,3,2,1,0,255,254,251,209,57,4,2,1,0,255,254,244,195,69,4,2,1,0,255,251,232,184,84,7,2,1,0,255,254,240,186,86,14,2,1,0,255,254,239,178,91,30,5,1,0,255,248,227,177,100,19,2,1,0,255,255,255,156,4,154,255,255,255,255,255,227,102,15,92,255,255,255,255,255,213,83,24,72,236,255,255,255,255,150,76,33,63,214,255,255,255,190,121,77,43,55,185,255,255,255,245,137,71,43,59,139,255,255,255,255,131,66,50,66,107,194,255,255,166,116,76,55,53,125,255,255,100,0,3,0,40,0,3,0,3,0,3,0,5,0,14,0,14,0,10,0,11,0,3,0,8,0,9,0,7,0,3,0,91,1,0,0,0,0,0,0,32,0,16,0,102,38,171,1,104,66,0,0,104,68,0,0,168,68,0,0,200,68,0,0,200,69,0,0,16,70,0,0,88,70,0,0,0,0,0,0,224,112,44,15,3,2,1,0,254,237,192,132,70,23,4,0,255,252,226,155,61,11,2,0,250,245,234,203,71,50,42,38,35,33,31,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,92,202,190,216,182,223,154,226,156,230,120,236,122,244,204,252,52,3,134,11,136,19,100,25,102,29,74,32,66,39,164,53,249,247,246,245,244,234,210,202,201,200,197,174,82,59,56,55,54,46,22,12,11,10,9,7,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,203,150,0,0,0,0,0,0,215,195,166,125,110,82,0,0,56,71,0,0,64,71,0,0,120,0,0,0,0,0,0,0,128,64,0,0,0,0,0,0,232,158,10,0,0,0,0,0,230,0,0,0,0,0,0,0,243,221,192,181,0,0,0,0,100,0,240,0,32,0,100,0,205,60,0,48,0,32,0,0,171,85,0,0,0,0,0,0,192,128,64,0,0,0,0,0,205,154,102,51,0,0,0,0,213,171,128,85,43,0,0,0,224,192,160,128,96,64,32,0,100,40,16,7,3,1,0,0,253,250,244,233,212,182,150,131,120,110,98,85,72,60,49,40,32,25,19,15,13,11,9,8,7,6,5,4,3,2,1,0,210,208,206,203,199,193,183,168,142,104,74,52,37,27,20,14,10,6,4,2,0,0,0,0,223,201,183,167,152,138,124,111,98,88,79,70,62,56,50,44,39,35,31,27,24,21,18,16,14,12,10,8,6,4,3,2,1,0,0,0,0,0,0,0,188,176,155,138,119,97,67,43,26,10,0,0,0,0,0,0,165,119,80,61,47,35,27,20,14,9,4,0,0,0,0,0,113,63,0,0,0,0,0,0,125,51,26,18,15,12,11,10,9,8,7,6,5,4,3,2,1,0,198,105,45,22,15,12,11,10,9,8,7,6,5,4,3,2,1,0,213,162,116,83,59,43,32,24,18,15,12,9,7,6,5,3,2,0,239,187,116,59,28,16,11,10,9,8,7,6,5,4,3,2,1,0,250,229,188,135,86,51,30,19,13,10,8,6,5,4,3,2,1,0,249,235,213,185,156,128,103,83,66,53,42,33,26,21,17,13,10,0,254,249,235,206,164,118,77,46,27,16,10,7,5,4,3,2,1,0,255,253,249,239,220,191,156,119,85,57,37,23,15,10,6,4,2,0,255,253,251,246,237,223,203,179,152,124,98,75,55,40,29,21,15,0,255,254,253,247,220,162,106,67,42,28,18,12,9,6,4,3,2,0,0,0,0,0,241,190,178,132,87,74,41,14,0,223,193,157,140,106,57,39,18,0,0,0,0,0,0,0,128,0,214,42,0,235,128,21,0,244,184,72,11,0,248,214,128,42,7,0,248,225,170,80,25,5,0,251,236,198,126,54,18,3,0,250,238,211,159,82,35,15,5,0,250,231,203,168,128,88,53,25,6,0,252,238,216,185,148,108,71,40,18,4,0,253,243,225,199,166,128,90,57,31,13,3,0,254,246,233,212,183,147,109,73,44,23,10,2,0,255,250,240,223,198,166,128,90,58,33,16,6,1,0,255,251,244,231,210,181,146,110,75,46,25,12,5,1,0,255,253,248,238,221,196,164,128,92,60,35,18,8,3,1,0,255,253,249,242,229,208,180,146,110,76,48,27,14,7,3,1,0,129,0,207,50,0,236,129,20,0,245,185,72,10,0,249,213,129,42,6,0,250,226,169,87,27,4,0,251,233,194,130,62,20,4,0,250,236,207,160,99,47,17,3,0,255,240,217,182,131,81,41,11,1,0,255,254,233,201,159,107,61,20,2,1,0,255,249,233,206,170,128,86,50,23,7,1,0,255,250,238,217,186,148,108,70,39,18,6,1,0,255,252,243,226,200,166,128,90,56,30,13,4,1,0,255,252,245,231,209,180,146,110,76,47,25,11,4,1,0,255,253,248,237,219,194,163,128,93,62,37,19,8,3,1,0,255,254,250,241,226,205,177,145,111,79,51,30,15,6,2,1,0,129,0,203,54,0,234,129,23,0,245,184,73,10,0,250,215,129,41,5,0,252,232,173,86,24,3,0,253,240,200,129,56,15,2,0,253,244,217,164,94,38,10,1,0,253,245,226,189,132,71,27,7,1,0,253,246,231,203,159,105,56,23,6,1,0,255,248,235,213,179,133,85,47,19,5,1,0,255,254,243,221,194,159,117,70,37,12,2,1,0,255,254,248,234,208,171,128,85,48,22,8,2,1,0,255,254,250,240,220,189,149,107,67,36,16,6,2,1,0,255,254,251,243,227,201,166,128,90,55,29,13,5,2,1,0,255,254,252,246,234,213,183,147,109,73,43,22,10,4,2,1,0,130,0,200,58,0,231,130,26,0,244,184,76,12,0,249,214,130,43,6,0,252,232,173,87,24,3,0,253,241,203,131,56,14,2,0,254,246,221,167,94,35,8,1,0,254,249,232,193,130,65,23,5,1,0,255,251,239,211,162,99,45,15,4,1,0,255,251,243,223,186,131,74,33,11,3,1,0,255,252,245,230,202,158,105,57,24,8,2,1,0,255,253,247,235,214,179,132,84,44,19,7,2,1,0,255,254,250,240,223,196,159,112,69,36,15,6,2,1,0,255,254,253,245,231,209,176,136,93,55,27,11,3,2,1,0,255,254,253,252,239,221,194,158,117,76,42,18,4,3,2,1,0,0,0,2,5,9,14,20,27,35,44,54,65,77,90,104,119,135,0,0,0,0,0,0,0,254,49,67,77,82,93,99,198,11,18,24,31,36,45,255,46,66,78,87,94,104,208,14,21,32,42,51,66,255,94,104,109,112,115,118,248,53,69,80,88,95,102,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+10240);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);function copyTempFloat(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3]}function copyTempDouble(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3];HEAP8[tempDoublePtr+4]=HEAP8[ptr+4];HEAP8[tempDoublePtr+5]=HEAP8[ptr+5];HEAP8[tempDoublePtr+6]=HEAP8[ptr+6];HEAP8[tempDoublePtr+7]=HEAP8[ptr+7]}Module["_bitshift64Ashr"]=_bitshift64Ashr;var ___errno_state=0;function ___setErrNo(value){HEAP32[___errno_state>>2]=value;return value}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(name){switch(name){case 30:return PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 79:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1}}___setErrNo(ERRNO_CODES.EINVAL);return-1}var ctlz_i8=allocate([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",ALLOC_STATIC);Module["_llvm_ctlz_i32"]=_llvm_ctlz_i32;Module["_memset"]=_memset;function _abort(){Module["abort"]()}Module["_strlen"]=_strlen;function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;Module["_i64Add"]=_i64Add;function _llvm_stackrestore(p){var self=_llvm_stacksave;var ret=self.LLVM_SAVEDSTACKS[p];self.LLVM_SAVEDSTACKS.splice(p,1);Runtime.stackRestore(ret)}function _sbrk(bytes){var self=_sbrk;if(!self.called){DYNAMICTOP=alignMemoryPage(DYNAMICTOP);self.called=true;assert(Runtime.dynamicAlloc);self.alloc=Runtime.dynamicAlloc;Runtime.dynamicAlloc=(function(){abort("cannot dynamically allocate, sbrk now has control")})}var ret=DYNAMICTOP;if(bytes!=0)self.alloc(bytes);return ret}function _llvm_stacksave(){var self=_llvm_stacksave;if(!self.LLVM_SAVEDSTACKS){self.LLVM_SAVEDSTACKS=[]}self.LLVM_SAVEDSTACKS.push(Runtime.stackSave());return self.LLVM_SAVEDSTACKS.length-1}Module["_memmove"]=_memmove;function ___errno_location(){return ___errno_state}function _abs(){return Math_abs.apply(null,arguments)}var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};var TTY={ttys:[],init:(function(){}),shutdown:(function(){}),register:(function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)}),stream_ops:{open:(function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}stream.tty=tty;stream.seekable=false}),close:(function(stream){if(stream.tty.output.length){stream.tty.ops.put_char(stream.tty,10)}}),read:(function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(ERRNO_CODES.ENXIO)}var bytesRead=0;for(var i=0;inode.contents.length){node.contents=MEMFS.getFileDataAsRegularArray(node);node.usedBytes=node.contents.length}if(!node.contents||node.contents.subarray){var prevCapacity=node.contents?node.contents.buffer.byteLength:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return}if(!node.contents&&newCapacity>0)node.contents=[];while(node.contents.lengthnewSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++}}));var remove=[];Object.keys(dst.entries).forEach((function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}}));if(!total){return callback(null)}var errored=false;var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=(function(){done(this.error)});create.sort().forEach((function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)}))}else{IDBFS.loadLocalEntry(path,(function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)}))}}));remove.sort().reverse().forEach((function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}}))})};var NODEFS={isWindows:false,staticInit:(function(){NODEFS.isWindows=!!process.platform.match(/^win/)}),mount:(function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)}),createNode:(function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node}),getMode:(function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&146)>>1}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return stat.mode}),realPath:(function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)}),flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:(function(flags){if(flags in NODEFS.flagsToPermissionStringMap){return NODEFS.flagsToPermissionStringMap[flags]}else{return flags}}),node_ops:{getattr:(function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}}),setattr:(function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),lookup:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)}),mknod:(function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return node}),rename:(function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),unlink:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),rmdir:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readdir:(function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),symlink:(function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readlink:(function(node){var path=NODEFS.realPath(node);try{return fs.readlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}})},stream_ops:{open:(function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsToPermissionString(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),close:(function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),read:(function(stream,buffer,offset,length,position){var nbuffer=new Buffer(length);var res;try{res=fs.readSync(stream.nfd,nbuffer,0,length,position)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(res>0){for(var i=0;i8){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}var parts=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}}}return{path:current_path,node:current}}),getPath:(function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}}),hashName:(function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length}),hashAddNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node}),hashRemoveNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}}),lookupNode:(function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)}),createNode:(function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=(function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev});FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:(function(){return(this.mode&readMode)===readMode}),set:(function(val){val?this.mode|=readMode:this.mode&=~readMode})},write:{get:(function(){return(this.mode&writeMode)===writeMode}),set:(function(val){val?this.mode|=writeMode:this.mode&=~writeMode})},isFolder:{get:(function(){return FS.isDir(this.mode)})},isDevice:{get:(function(){return FS.isChrdev(this.mode)})}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node}),destroyNode:(function(node){FS.hashRemoveNode(node)}),isRoot:(function(node){return node===node.parent}),isMountpoint:(function(node){return!!node.mounted}),isFile:(function(mode){return(mode&61440)===32768}),isDir:(function(mode){return(mode&61440)===16384}),isLink:(function(mode){return(mode&61440)===40960}),isChrdev:(function(mode){return(mode&61440)===8192}),isBlkdev:(function(mode){return(mode&61440)===24576}),isFIFO:(function(mode){return(mode&61440)===4096}),isSocket:(function(mode){return(mode&49152)===49152}),flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:(function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags}),flagsToPermissionString:(function(flag){var accmode=flag&2097155;var perms=["r","w","rw"][accmode];if(flag&512){perms+="w"}return perms}),nodePermissions:(function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return ERRNO_CODES.EACCES}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return ERRNO_CODES.EACCES}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return ERRNO_CODES.EACCES}return 0}),mayLookup:(function(dir){return FS.nodePermissions(dir,"x")}),mayCreate:(function(dir,name){try{var node=FS.lookupNode(dir,name);return ERRNO_CODES.EEXIST}catch(e){}return FS.nodePermissions(dir,"wx")}),mayDelete:(function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return ERRNO_CODES.ENOTDIR}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return ERRNO_CODES.EBUSY}}else{if(FS.isDir(node.mode)){return ERRNO_CODES.EISDIR}}return 0}),mayOpen:(function(node,flags){if(!node){return ERRNO_CODES.ENOENT}if(FS.isLink(node.mode)){return ERRNO_CODES.ELOOP}else if(FS.isDir(node.mode)){if((flags&2097155)!==0||flags&512){return ERRNO_CODES.EISDIR}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))}),MAX_OPEN_FDS:4096,nextfd:(function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(ERRNO_CODES.EMFILE)}),getStream:(function(fd){return FS.streams[fd]}),createStream:(function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=(function(){});FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:(function(){return this.node}),set:(function(val){this.node=val})},isRead:{get:(function(){return(this.flags&2097155)!==1})},isWrite:{get:(function(){return(this.flags&2097155)!==0})},isAppend:{get:(function(){return this.flags&1024})}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream}),closeStream:(function(fd){FS.streams[fd]=null}),getStreamFromPtr:(function(ptr){return FS.streams[ptr-1]}),getPtrForStream:(function(stream){return stream?stream.fd+1:0}),chrdev_stream_ops:{open:(function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}}),llseek:(function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)})},major:(function(dev){return dev>>8}),minor:(function(dev){return dev&255}),makedev:(function(ma,mi){return ma<<8|mi}),registerDevice:(function(dev,ops){FS.devices[dev]={stream_ops:ops}}),getDevice:(function(dev){return FS.devices[dev]}),getMounts:(function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts}),syncfs:(function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}var mounts=FS.getMounts(FS.root.mount);var completed=0;function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=mounts.length){callback(null)}}mounts.forEach((function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)}))}),mount:(function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot}),unmount:(function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach((function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}}));node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(idx!==-1);node.mount.mounts.splice(idx,1)}),lookup:(function(parent,name){return parent.node_ops.lookup(parent,name)}),mknod:(function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.mknod(parent,name,mode,dev)}),create:(function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)}),mkdir:(function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)}),mkdev:(function(path,mode,dev){if(typeof dev==="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)}),symlink:(function(oldpath,newpath){var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;var newname=PATH.basename(newpath);var err=FS.mayCreate(parent,newname);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.symlink(parent,newname,oldpath)}),rename:(function(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;try{lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(ERRNO_CODES.EXDEV)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}relative=PATH.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var err=FS.mayDelete(old_dir,old_name,isdir);if(err){throw new FS.ErrnoError(err)}err=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(err){throw new FS.ErrnoError(err)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(new_dir!==old_dir){err=FS.nodePermissions(old_dir,"w");if(err){throw new FS.ErrnoError(err)}}try{if(FS.trackingDelegate["willMovePath"]){FS.trackingDelegate["willMovePath"](old_path,new_path)}}catch(e){console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{if(FS.trackingDelegate["onMovePath"])FS.trackingDelegate["onMovePath"](old_path,new_path)}catch(e){console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}}),rmdir:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,true);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readdir:(function(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}return node.node_ops.readdir(node)}),unlink:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,false);if(err){if(err===ERRNO_CODES.EISDIR)err=ERRNO_CODES.EPERM;throw new FS.ErrnoError(err)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readlink:(function(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link.node_ops.readlink){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return link.node_ops.readlink(link)}),stat:(function(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node.node_ops.getattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return node.node_ops.getattr(node)}),lstat:(function(path){return FS.stat(path,true)}),chmod:(function(path,mode,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})}),lchmod:(function(path,mode){FS.chmod(path,mode,true)}),fchmod:(function(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chmod(stream.node,mode)}),chown:(function(path,uid,gid,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{timestamp:Date.now()})}),lchown:(function(path,uid,gid){FS.chown(path,uid,gid,true)}),fchown:(function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chown(stream.node,uid,gid)}),truncate:(function(path,len){if(len<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var err=FS.nodePermissions(node,"w");if(err){throw new FS.ErrnoError(err)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})}),ftruncate:(function(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}FS.truncate(stream.node,len)}),utime:(function(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})}),open:(function(path,flags,mode,fd_start,fd_end){if(path===""){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}flags=typeof flags==="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode==="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path==="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}}else{node=FS.mknod(path,mode,0)}}if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(FS.isChrdev(node.mode)){flags&=~512}var err=FS.mayOpen(node,flags);if(err){throw new FS.ErrnoError(err)}if(flags&512){FS.truncate(node,0)}flags&=~(128|512);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;Module["printErr"]("read file: "+path)}}try{if(FS.trackingDelegate["onOpenFile"]){var trackingFlags=0;if((flags&2097155)!==1){trackingFlags|=FS.tracking.openFlags.READ}if((flags&2097155)!==0){trackingFlags|=FS.tracking.openFlags.WRITE}FS.trackingDelegate["onOpenFile"](path,trackingFlags)}}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: "+e.message)}return stream}),close:(function(stream){try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}}),llseek:(function(stream,offset,whence){if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}return stream.stream_ops.llseek(stream,offset,whence)}),read:(function(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.read){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead}),write:(function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.write){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if(stream.flags&1024){FS.llseek(stream,0,2)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate["onWriteToFile"])FS.trackingDelegate["onWriteToFile"](stream.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return bytesWritten}),allocate:(function(stream,offset,length){if(offset<0||length<=0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP)}stream.stream_ops.allocate(stream,offset,length)}),mmap:(function(stream,buffer,offset,length,position,prot,flags){if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EACCES)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}return stream.stream_ops.mmap(stream,buffer,offset,length,position,prot,flags)}),ioctl:(function(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(ERRNO_CODES.ENOTTY)}return stream.stream_ops.ioctl(stream,cmd,arg)}),readFile:(function(path,opts){opts=opts||{};opts.flags=opts.flags||"r";opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret="";var utf8=new Runtime.UTF8Processor;for(var i=0;i>2]=FS.getPtrForStream(stdin);assert(stdin.fd===0,"invalid handle for stdin ("+stdin.fd+")");var stdout=FS.open("/dev/stdout","w");HEAP32[_stdout>>2]=FS.getPtrForStream(stdout);assert(stdout.fd===1,"invalid handle for stdout ("+stdout.fd+")");var stderr=FS.open("/dev/stderr","w");HEAP32[_stderr>>2]=FS.getPtrForStream(stderr);assert(stderr.fd===2,"invalid handle for stderr ("+stderr.fd+")")}),ensureErrnoError:(function(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}this.message=ERRNO_MESSAGES[errno]};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[ERRNO_CODES.ENOENT].forEach((function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""}))}),staticInit:(function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices()}),init:(function(input,output,error){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()}),quit:(function(){FS.init.initialized=false;for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=Math.floor(idx/this.chunkSize);return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}});var lazyArray=this;lazyArray.setDataGetter((function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]}));this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperty(lazyArray,"length",{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._length})});Object.defineProperty(lazyArray,"chunkSize",{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize})});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperty(node,"usedBytes",{get:(function(){return this.contents.length})});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach((function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return fn.apply(null,arguments)}}));stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}),normalize:(function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path}),dirname:(function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir}),basename:(function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)}),extname:(function(path){return PATH.splitPath(path)[3]}),join:(function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))}),join2:(function(l,r){return PATH.normalize(l+"/"+r)}),resolve:(function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter((function(p){return!!p})),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."}),relative:(function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout((function(){finish(audio)}),1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);var canvas=Module["canvas"];function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===canvas||document["mozPointerLockElement"]===canvas||document["webkitPointerLockElement"]===canvas||document["msPointerLockElement"]===canvas}if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||(function(){});canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||(function(){});canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",(function(ev){if(!Browser.pointerLock&&canvas.requestPointerLock){canvas.requestPointerLock();ev.preventDefault()}}),false)}}}),createContext:(function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx)return Module.ctx;var ctx;var errorInfo="?";function onContextCreationError(event){errorInfo=event.statusMessage||errorInfo}try{if(useWebGL){var contextAttributes={antialias:false,alpha:false};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}canvas.addEventListener("webglcontextcreationerror",onContextCreationError,false);try{["experimental-webgl","webgl"].some((function(webglId){return ctx=canvas.getContext(webglId,contextAttributes)}))}finally{canvas.removeEventListener("webglcontextcreationerror",onContextCreationError,false)}}else{ctx=canvas.getContext("2d")}if(!ctx)throw":("}catch(e){Module.print("Could not create canvas: "+[errorInfo,e]);return null}if(useWebGL){canvas.style.backgroundColor="black"}if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GLctx=ctx;Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach((function(callback){callback()}));Browser.init()}return ctx}),destroyContext:(function(canvas,useWebGL,setInModule){}),fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:(function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullScreenChange(){Browser.isFullScreen=false;var canvasContainer=canvas.parentNode;if((document["webkitFullScreenElement"]||document["webkitFullscreenElement"]||document["mozFullScreenElement"]||document["mozFullscreenElement"]||document["fullScreenElement"]||document["fullscreenElement"]||document["msFullScreenElement"]||document["msFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.cancelFullScreen=document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["webkitCancelFullScreen"]||document["msExitFullscreen"]||document["exitFullscreen"]||(function(){});canvas.cancelFullScreen=canvas.cancelFullScreen.bind(document);if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullScreen=true;if(Browser.resizeCanvas)Browser.setFullScreenCanvasSize()}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas)Browser.setWindowedCanvasSize()}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullScreen);Browser.updateCanvasDimensions(canvas)}if(!Browser.fullScreenHandlersInstalled){Browser.fullScreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullScreenChange,false);document.addEventListener("mozfullscreenchange",fullScreenChange,false);document.addEventListener("webkitfullscreenchange",fullScreenChange,false);document.addEventListener("MSFullscreenChange",fullScreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullScreen=canvasContainer["requestFullScreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullScreen"]?(function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}):null);canvasContainer.requestFullScreen()}),nextRAF:0,fakeRequestAnimationFrame:(function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)}),requestAnimationFrame:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:(function(func){return(function(){if(!ABORT)return func.apply(null,arguments)})}),safeRequestAnimationFrame:(function(func){return Browser.requestAnimationFrame((function(){if(!ABORT)func()}))}),safeSetTimeout:(function(func,timeout){Module["noExitRuntime"]=true;return setTimeout((function(){if(!ABORT)func()}),timeout)}),safeSetInterval:(function(func,timeout){Module["noExitRuntime"]=true;return setInterval((function(){if(!ABORT)func()}),timeout)}),getMimetype:(function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]}),getUserMedia:(function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)}),getMovementX:(function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0}),getMovementY:(function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0}),getMouseWheelDelta:(function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail;break;case"mousewheel":delta=-event.wheelDelta;break;case"wheel":delta=event.deltaY;break;default:throw"unrecognized mouse wheel event: "+event.type}return Math.max(-1,Math.min(1,delta))}),mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:(function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){Browser.lastTouches[touch.identifier]=Browser.touches[touch.identifier];Browser.touches[touch.identifier]={x:adjustedX,y:adjustedY}}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}}),xhrLoad:(function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)}),asyncLoad:(function(url,onload,onerror,noRunDep){Browser.xhrLoad(url,(function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(!noRunDep)removeRunDependency("al "+url)}),(function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}}));if(!noRunDep)addRunDependency("al "+url)}),resizeListeners:[],updateResizeListeners:(function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach((function(listener){listener(canvas.width,canvas.height)}))}),setCanvasSize:(function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()}),windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags|8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),setWindowedCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags&~8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),updateCanvasDimensions:(function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2]=ret}return ret}___errno_state=Runtime.staticAlloc(4);HEAP32[___errno_state>>2]=0;Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas){Browser.requestFullScreen(lockPointer,resizeCanvas)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};FS.staticInit();__ATINIT__.unshift({func:(function(){if(!Module["noFSInit"]&&!FS.init.initialized)FS.init()})});__ATMAIN__.push({func:(function(){FS.ignorePermissions=false})});__ATEXIT__.push({func:(function(){FS.quit()})});Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;__ATINIT__.unshift({func:(function(){TTY.init()})});__ATEXIT__.push({func:(function(){TTY.shutdown()})});TTY.utf8=new Runtime.UTF8Processor;if(ENVIRONMENT_IS_NODE){var fs=require("fs");NODEFS.staticInit()}STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);staticSealed=true;STACK_MAX=STACK_BASE+5242880;DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX);assert(DYNAMIC_BASE>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0]}function wa(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0];a[k+4>>0]=a[b+4>>0];a[k+5>>0]=a[b+5>>0];a[k+6>>0]=a[b+6>>0];a[k+7>>0]=a[b+7>>0]}function xa(a){a=a|0;D=a}function ya(){return D|0}function za(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=($(1664525,c[d>>2]|0)|0)+1013904223|0;i=b;return a|0}function Aa(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=32-(We(c[d>>2]|0)|0)-1&65535;i=b;return a|0}function Ba(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)<=0){a=0}else{a=(Aa(c[d>>2]|0)|0)<<16>>16}i=b;return a&65535|0}function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)|0;c[y>>2]=$(c[u>>2]|0,b[(c[v>>2]|0)+((c[n>>2]|0)+1<<1)>>1]|0)|0;b[t>>1]=(b[(c[z>>2]|0)+(c[n>>2]<<1)>>1]|0)+(((a[14464+(c[n>>2]|0)>>0]&65535)<<6&65535)<<16>>16);c[r>>2]=16-(b[t>>1]>>10);if((c[r>>2]|0)>31){c[r>>2]=0;b[s>>1]=0}else{b[s>>1]=Da(b[t>>1]&1023)|0}if((c[r>>2]|0)<0){if((c[r>>2]|0)<-2){b[s>>1]=32767;c[r>>2]=-2}do{d=c[E>>2]|0;c[E>>2]=d+2;d=$(b[d>>1]|0,b[s>>1]|0)|0;d=d<<0-(c[r>>2]|0);H=c[C>>2]|0;c[C>>2]=H+4;c[H>>2]=d;H=(c[x>>2]|0)+1|0;c[x>>2]=H}while((H|0)<(c[y>>2]|0))}else{do{d=c[E>>2]|0;c[E>>2]=d+2;d=$(b[d>>1]|0,b[s>>1]|0)|0;d=d>>c[r>>2];H=c[C>>2]|0;c[C>>2]=H+4;c[H>>2]=d;H=(c[x>>2]|0)+1|0;c[x>>2]=H}while((H|0)<(c[y>>2]|0))}c[n>>2]=(c[n>>2]|0)+1}Xe((c[B>>2]|0)+(c[w>>2]<<2)|0,0,(c[p>>2]|0)-(c[w>>2]|0)<<2|0)|0;i=q;return}function Da(a){a=a|0;var c=0,d=0,f=0;c=i;i=i+16|0;f=c+2|0;d=c;b[f>>1]=a;b[d>>1]=e[f>>1]<<4;a=(16383+((($(b[d>>1]|0,(22804+((($(b[d>>1]|0,(14819+(((b[d>>1]|0)*10204>>15&65535)<<16>>16)&65535)<<16>>16)|0)>>15&65535)<<16>>16)&65535)<<16>>16)|0)>>15&65535)<<16>>16)&65535)<<16>>16;i=c;return a|0}function Ea(a,e,f,g,h,j,k,l,m,n,o,p,q){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=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1]|0:b[C>>1]|0)<<16>>16>>1;W=($(b[D>>1]|0,b[C>>1]|0)|0)>>15;b[C>>1]=W>>c[E>>2];W=(c[F>>2]|0)+(($(c[y>>2]|0,c[r>>2]|0)|0)<<1)|0;c[I>>2]=W+(b[(c[(c[H>>2]|0)+24>>2]|0)+(c[v>>2]<<1)>>1]<>2]<<1);c[z>>2]=0;while(1){if((c[z>>2]|0)>=(1<>2]|0)){break}W=$(c[v>>2]|0,c[w>>2]|0)|0;if((d[(c[x>>2]|0)+(W+(c[y>>2]|0))>>0]&1<>2]|0)==0){c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[u>>2]|0)){break}c[J>>2]=za(c[J>>2]|0)|0;W=b[C>>1]|0;b[(c[I>>2]|0)+((c[t>>2]<>2])+(c[z>>2]|0)<<1)>>1]=(c[J>>2]&32768|0)!=0?W:0-W|0;c[t>>2]=(c[t>>2]|0)+1}c[G>>2]=1}c[z>>2]=(c[z>>2]|0)+1}if((c[G>>2]|0)!=0){Oc(c[I>>2]|0,c[u>>2]<>2],32767)}W=(c[y>>2]|0)+1|0;c[y>>2]=W}while((W|0)<(c[w>>2]|0));c[v>>2]=(c[v>>2]|0)+1}i=N;return}function Fa(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0)>>>0)/((c[d>>2]|0)>>>0)|0|0}function Ga(a){a=a|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+4|0;g=d+10|0;f=d;h=d+8|0;b[g>>1]=a;c[f>>2]=b[g>>1]>>10;if((c[f>>2]|0)>14){c[e>>2]=2130706432;h=c[e>>2]|0;i=d;return h|0}if((c[f>>2]|0)<-15){c[e>>2]=0;h=c[e>>2]|0;i=d;return h|0}b[h>>1]=Da((b[g>>1]|0)-(((c[f>>2]&65535)<<10&65535)<<16>>16)&65535)|0;g=b[h>>1]|0;a=0-(c[f>>2]|0)-2|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a>>2]|0)-1|0)){if(3<((c[sa>>2]|0)-(c[F>>2]|0)|0)){g=3}else{g=(c[sa>>2]|0)-(c[F>>2]|0)|0}c[ma>>2]=Ja(c[ra>>2]|0,g)|0;if(((c[ka>>2]|0)+1|0)<((c[(c[la>>2]|0)+(c[F>>2]<<2)>>2]|0)+(c[ma>>2]|0)|0)){g=(c[ka>>2]|0)+1|0}else{g=(c[(c[la>>2]|0)+(c[F>>2]<<2)>>2]|0)+(c[ma>>2]|0)|0}do{if(16383>=(g|0)){if(((c[ka>>2]|0)+1|0)<((c[(c[la>>2]|0)+(c[F>>2]<<2)>>2]|0)+(c[ma>>2]|0)|0)){g=(c[ka>>2]|0)+1|0;break}else{g=(c[(c[la>>2]|0)+(c[F>>2]<<2)>>2]|0)+(c[ma>>2]|0)|0;break}}else{g=16383}}while(0);do{if(0<=(g|0)){if(((c[ka>>2]|0)+1|0)<((c[(c[la>>2]|0)+(c[F>>2]<<2)>>2]|0)+(c[ma>>2]|0)|0)){g=(c[ka>>2]|0)+1|0}else{g=(c[(c[la>>2]|0)+(c[F>>2]<<2)>>2]|0)+(c[ma>>2]|0)|0}if(16383>=(g|0)){if(((c[ka>>2]|0)+1|0)<((c[(c[la>>2]|0)+(c[F>>2]<<2)>>2]|0)+(c[ma>>2]|0)|0)){g=(c[ka>>2]|0)+1|0;break}else{g=(c[(c[la>>2]|0)+(c[F>>2]<<2)>>2]|0)+(c[ma>>2]|0)|0;break}}else{g=16383}}else{g=0}}while(0);c[ja>>2]=g}else{c[ja>>2]=0}do{if((c[ca>>2]|0)!=0?(za=$(c[O>>2]|0,b[(c[P>>2]|0)+(c[F>>2]<<1)>>1]|0)|0,(za-(c[S>>2]|0)|0)>=($(c[O>>2]|0,b[(c[P>>2]|0)+(c[ha>>2]<<1)>>1]|0)|0)):0){if((c[fa>>2]|0)==0?(c[T>>2]|0)!=0:0){break}c[T>>2]=c[F>>2]}}while(0);c[W>>2]=c[(c[da>>2]|0)+(c[F>>2]<<2)>>2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b[r>>1]|0,b[r>>1]|0)|0)|0)|0);b[j>>1]=(b[s>>1]<<14|0)/(b[t>>1]|0)|0;b[k>>1]=(b[r>>1]<<14|0)/(b[t>>1]|0)|0;c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[p>>2]|0)){break}b[m>>1]=b[(c[l>>2]|0)+(c[q>>2]<<1)>>1]|0;b[o>>1]=b[(c[n>>2]|0)+(c[q>>2]<<1)>>1]|0;z=$(b[j>>1]|0,b[m>>1]|0)|0;z=z+($(b[k>>1]|0,b[o>>1]|0)|0)>>14&65535;b[(c[l>>2]|0)+(c[q>>2]<<1)>>1]=z;c[q>>2]=(c[q>>2]|0)+1}i=u;return}function Sa(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+32|0;j=f+20|0;l=f+16|0;h=f+12|0;g=f+8|0;m=f+4|0;k=f;c[j>>2]=a;c[l>>2]=d;c[h>>2]=e;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[h>>2]|0)){break}c[k>>2]=(b[(c[j>>2]|0)+(c[g>>2]<<1)>>1]|0)*23170;c[m>>2]=(b[(c[l>>2]|0)+(c[g>>2]<<1)>>1]|0)*23170;b[(c[j>>2]|0)+(c[g>>2]<<1)>>1]=(c[k>>2]|0)+(c[m>>2]|0)>>15;b[(c[l>>2]|0)+(c[g>>2]<<1)>>1]=(c[m>>2]|0)-(c[k>>2]|0)>>15;c[g>>2]=(c[g>>2]|0)+1}i=f;return}function Ta(a){a=a|0;var d=0,e=0,f=0,g=0;e=i;i=i+16|0;g=e+6|0;f=e;d=e+4|0;b[g>>1]=a;c[f>>2]=4096+($(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+($(b[d>>1]|0,((16384+($(b[d>>1]|0,(8277+(16384+($(-626,b[d>>1]|0)|0)>>15)&65535)<<16>>16)|0)>>15)+ -7651&65535)<<16>>16)|0)>>15);i=e;return 1+(b[d>>1]|0)&65535|0}function Ua(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;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-(We(c[e>>2]|0)|0);c[h>>2]=32-(We(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+($((c[f>>2]&65535)<<16>>16,((16384+($((c[f>>2]&65535)<<16>>16,-2597)|0)>>15)+7932&65535)<<16>>16)|0)>>15)|0;a=a-(16384+($((c[e>>2]&65535)<<16>>16,((16384+($((c[e>>2]&65535)<<16>>16,-2597)|0)>>15)+7932&65535)<<16>>16)|0)>>15)|0;i=d;return a|0}function Va(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;k=i;i=i+48|0;n=k+28|0;m=k+16|0;o=k+4|0;q=k+8|0;g=k+32|0;l=k;h=k+12|0;j=k+24|0;p=k+20|0;c[n>>2]=a;c[m>>2]=d;c[o>>2]=e;c[q>>2]=f;c[h>>2]=$(c[m>>2]|0,c[o>>2]|0)|0;a=c[h>>2]|0;c[j>>2]=ia()|0;f=i;i=i+((2*a|0)+15&-16)|0;if((c[q>>2]|0)!=0){c[p>>2]=56+(c[o>>2]<<2)+ -8;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[o>>2]|0)){break}c[l>>2]=0;while(1){if((c[l>>2]|0)>=(c[m>>2]|0)){break}a=$(c[l>>2]|0,c[o>>2]|0)|0;q=$(c[(c[p>>2]|0)+(c[g>>2]<<2)>>2]|0,c[m>>2]|0)|0;b[f+(q+(c[l>>2]|0)<<1)>>1]=b[(c[n>>2]|0)+(a+(c[g>>2]|0)<<1)>>1]|0;c[l>>2]=(c[l>>2]|0)+1}c[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2]|0)>=6){break}c[o>>2]=(c[n>>2]|0)+(c[k>>2]|0)+1>>1;g=c[o>>2]|0;if((d[(c[m>>2]|0)+(c[o>>2]|0)>>0]|0)>=(c[l>>2]|0)){c[k>>2]=g}else{c[n>>2]=g}c[p>>2]=(c[p>>2]|0)+1}if((c[n>>2]|0)==0){o=-1}else{o=d[(c[m>>2]|0)+(c[n>>2]|0)>>0]|0}if(((c[l>>2]|0)-o|0)<=((d[(c[m>>2]|0)+(c[k>>2]|0)>>0]|0)-(c[l>>2]|0)|0)){c[h>>2]=c[n>>2];s=c[h>>2]|0;i=j;return s|0}else{c[h>>2]=c[k>>2];s=c[h>>2]|0;i=j;return s|0}return 0}function Za(a,e,f,g){a=a|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0;h=i;i=i+32|0;m=h+16|0;l=h+12|0;n=h+8|0;k=h+4|0;j=h;c[m>>2]=a;c[l>>2]=e;c[n>>2]=f;c[k>>2]=g;c[n>>2]=(c[n>>2]|0)+1;a=$(c[n>>2]|0,c[(c[m>>2]|0)+8>>2]|0)|0;c[j>>2]=(c[(c[m>>2]|0)+92>>2]|0)+(b[(c[(c[m>>2]|0)+88>>2]|0)+(a+(c[l>>2]|0)<<1)>>1]|0);if((c[k>>2]|0)==0){n=0;i=h;return n|0}n=(d[(c[j>>2]|0)+(c[k>>2]|0)>>0]|0)+1|0;i=h;return n|0}function _a(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=c[d>>2]|0;if((c[d>>2]|0)<8){i=b;return a|0}a=8+(a&7)<<(c[d>>2]>>3)-1;i=b;return a|0}function $a(a){a=a|0;var b=0,d=0,e=0;d=i;i=i+16|0;e=d+4|0;b=d;c[e>>2]=a;a=c[e>>2]|0;if((a|0)==48e3){c[b>>2]=1}else if((a|0)==24e3){c[b>>2]=2}else if((a|0)==16e3){c[b>>2]=3}else if((a|0)==12e3){c[b>>2]=4}else if((a|0)==8e3){c[b>>2]=6}else{c[b>>2]=0}i=d;return c[b>>2]|0}function ab(a,d,e,f,g,h,j,k,l,m,n){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;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;F=i;i=i+80|0;p=F+32|0;q=F+36|0;D=F+20|0;t=F+12|0;r=F+44|0;K=F+72|0;x=F+66|0;L=F+52|0;M=F+8|0;A=F+4|0;y=F+28|0;s=F+56|0;C=F+60|0;E=F+74|0;o=F+70|0;u=F+62|0;v=F+68|0;w=F+64|0;z=F+24|0;H=F+16|0;G=F;I=F+48|0;J=F+40|0;B=F+76|0;c[p>>2]=a;c[q>>2]=d;c[D>>2]=e;c[t>>2]=f;c[r>>2]=g;b[K>>1]=h;b[x>>1]=j;c[L>>2]=k;c[M>>2]=l;c[A>>2]=m;c[y>>2]=n;if((b[K>>1]|0)==0?(b[x>>1]|0)==0:0){if((c[q>>2]|0)==(c[p>>2]|0)){i=F;return}$e(c[p>>2]|0,c[q>>2]|0,(c[r>>2]<<2)+0|0)|0;i=F;return}b[C>>1]=16384+($(b[K>>1]|0,b[176+((c[L>>2]|0)*6|0)>>1]|0)|0)>>15;b[E>>1]=16384+($(b[K>>1]|0,b[178+((c[L>>2]|0)*6|0)>>1]|0)|0)>>15;b[o>>1]=16384+($(b[K>>1]|0,b[180+((c[L>>2]|0)*6|0)>>1]|0)|0)>>15;b[u>>1]=16384+($(b[x>>1]|0,b[176+((c[M>>2]|0)*6|0)>>1]|0)|0)>>15;b[v>>1]=16384+($(b[x>>1]|0,b[178+((c[M>>2]|0)*6|0)>>1]|0)|0)>>15;b[w>>1]=16384+($(b[x>>1]|0,b[180+((c[M>>2]|0)*6|0)>>1]|0)|0)>>15;c[H>>2]=c[(c[q>>2]|0)+(0-(c[t>>2]|0)+1<<2)>>2];c[G>>2]=c[(c[q>>2]|0)+(0-(c[t>>2]|0)<<2)>>2];c[I>>2]=c[(c[q>>2]|0)+(0-(c[t>>2]|0)-1<<2)>>2];c[J>>2]=c[(c[q>>2]|0)+(0-(c[t>>2]|0)-2<<2)>>2];if(((b[K>>1]|0)==(b[x>>1]|0)?(c[D>>2]|0)==(c[t>>2]|0):0)?(c[L>>2]|0)==(c[M>>2]|0):0){c[y>>2]=0}c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[y>>2]|0)){break}c[z>>2]=c[(c[q>>2]|0)+((c[s>>2]|0)-(c[t>>2]|0)+2<<2)>>2];b[B>>1]=($(b[(c[A>>2]|0)+(c[s>>2]<<1)>>1]|0,b[(c[A>>2]|0)+(c[s>>2]<<1)>>1]|0)|0)>>15;d=(($((32767-(b[B>>1]|0)&65535)<<16>>16,b[C>>1]|0)|0)>>15&65535)<<16>>16;d=($(d,(c[(c[q>>2]|0)+((c[s>>2]|0)-(c[D>>2]|0)<<2)>>2]>>16&65535)<<16>>16)|0)<<1;e=(($((32767-(b[B>>1]|0)&65535)<<16>>16,b[C>>1]|0)|0)>>15&65535)<<16>>16;e=(c[(c[q>>2]|0)+(c[s>>2]<<2)>>2]|0)+(d+(($(e,c[(c[q>>2]|0)+((c[s>>2]|0)-(c[D>>2]|0)<<2)>>2]&65535&65535)|0)>>15))|0;d=(($((32767-(b[B>>1]|0)&65535)<<16>>16,b[E>>1]|0)|0)>>15&65535)<<16>>16;d=($(d,((c[(c[q>>2]|0)+((c[s>>2]|0)-(c[D>>2]|0)+1<<2)>>2]|0)+(c[(c[q>>2]|0)+((c[s>>2]|0)-(c[D>>2]|0)-1<<2)>>2]|0)>>16&65535)<<16>>16)|0)<<1;a=(($((32767-(b[B>>1]|0)&65535)<<16>>16,b[E>>1]|0)|0)>>15&65535)<<16>>16;a=e+(d+(($(a,(c[(c[q>>2]|0)+((c[s>>2]|0)-(c[D>>2]|0)+1<<2)>>2]|0)+(c[(c[q>>2]|0)+((c[s>>2]|0)-(c[D>>2]|0)-1<<2)>>2]|0)&65535&65535)|0)>>15))|0;d=(($((32767-(b[B>>1]|0)&65535)<<16>>16,b[o>>1]|0)|0)>>15&65535)<<16>>16;d=($(d,((c[(c[q>>2]|0)+((c[s>>2]|0)-(c[D>>2]|0)+2<<2)>>2]|0)+(c[(c[q>>2]|0)+((c[s>>2]|0)-(c[D>>2]|0)-2<<2)>>2]|0)>>16&65535)<<16>>16)|0)<<1;e=(($((32767-(b[B>>1]|0)&65535)<<16>>16,b[o>>1]|0)|0)>>15&65535)<<16>>16;e=a+(d+(($(e,(c[(c[q>>2]|0)+((c[s>>2]|0)-(c[D>>2]|0)+2<<2)>>2]|0)+(c[(c[q>>2]|0)+((c[s>>2]|0)-(c[D>>2]|0)-2<<2)>>2]|0)&65535&65535)|0)>>15))|0;d=(($(b[B>>1]|0,b[u>>1]|0)|0)>>15&65535)<<16>>16;d=($(d,(c[G>>2]>>16&65535)<<16>>16)|0)<<1;a=(($(b[B>>1]|0,b[u>>1]|0)|0)>>15&65535)<<16>>16;a=e+(d+(($(a,c[G>>2]&65535&65535)|0)>>15))|0;d=(($(b[B>>1]|0,b[v>>1]|0)|0)>>15&65535)<<16>>16;d=($(d,((c[H>>2]|0)+(c[I>>2]|0)>>16&65535)<<16>>16)|0)<<1;e=(($(b[B>>1]|0,b[v>>1]|0)|0)>>15&65535)<<16>>16;e=a+(d+(($(e,(c[H>>2]|0)+(c[I>>2]|0)&65535&65535)|0)>>15))|0;d=(($(b[B>>1]|0,b[w>>1]|0)|0)>>15&65535)<<16>>16;d=($(d,((c[z>>2]|0)+(c[J>>2]|0)>>16&65535)<<16>>16)|0)<<1;a=(($(b[B>>1]|0,b[w>>1]|0)|0)>>15&65535)<<16>>16;a=e+(d+(($(a,(c[z>>2]|0)+(c[J>>2]|0)&65535&65535)|0)>>15))|0;c[(c[p>>2]|0)+(c[s>>2]<<2)>>2]=a;c[J>>2]=c[I>>2];c[I>>2]=c[G>>2];c[G>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s>>1]|0,((c[k>>2]|0)+(c[u>>2]|0)>>16&65535)<<16>>16)|0)<<1;d=a+(d+(($(b[s>>1]|0,(c[k>>2]|0)+(c[u>>2]|0)&65535&65535)|0)>>15))|0;a=($(b[v>>1]|0,((c[p>>2]|0)+(c[w>>2]|0)>>16&65535)<<16>>16)|0)<<1;a=d+(a+(($(b[v>>1]|0,(c[p>>2]|0)+(c[w>>2]|0)&65535&65535)|0)>>15))|0;c[(c[x>>2]|0)+(c[l>>2]<<2)>>2]=a;c[w>>2]=c[u>>2];c[u>>2]=c[r>>2];c[r>>2]=c[k>>2];c[k>>2]=c[p>>2];c[l>>2]=(c[l>>2]|0)+1}i=t;return}function cb(a,e,f,g){a=a|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0;m=i;i=i+32|0;k=m+20|0;o=m+16|0;l=m+12|0;n=m+8|0;j=m+4|0;h=m;c[k>>2]=a;c[o>>2]=e;c[l>>2]=f;c[n>>2]=g;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[(c[k>>2]|0)+8>>2]|0)){break}c[h>>2]=(b[(c[(c[k>>2]|0)+24>>2]|0)+((c[j>>2]|0)+1<<1)>>1]|0)-(b[(c[(c[k>>2]|0)+24>>2]|0)+(c[j>>2]<<1)>>1]|0)<>2];a=$(c[(c[k>>2]|0)+8>>2]|0,(c[l>>2]<<1)+(c[n>>2]|0)-1|0)|0;a=$((d[(c[(c[k>>2]|0)+96>>2]|0)+(a+(c[j>>2]|0))>>0]|0)+64|0,c[n>>2]|0)|0;a=($(a,c[h>>2]|0)|0)>>2;c[(c[o>>2]|0)+(c[j>>2]<<2)>>2]=a;c[j>>2]=(c[j>>2]|0)+1}i=m;return}function db(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=qc(48e3,960,0)|0;a=eb(c[e>>2]|0,c[d>>2]|0)|0;i=b;return a|0}function eb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;a=84+(($(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<<1)+(c[(c[f>>2]|0)+8>>2]<<3<<1);i=e;return c[d>>2]|0}function fb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e+16|0;j=e+12|0;h=e+8|0;k=e+4|0;g=e;c[j>>2]=a;c[h>>2]=b;c[k>>2]=d;b=c[j>>2]|0;a=qc(48e3,960,0)|0;c[g>>2]=gb(b,a,c[k>>2]|0)|0;if((c[g>>2]|0)!=0){c[f>>2]=c[g>>2];k=c[f>>2]|0;i=e;return k|0}k=$a(c[h>>2]|0)|0;c[(c[j>>2]|0)+16>>2]=k;if((c[(c[j>>2]|0)+16>>2]|0)==0){c[f>>2]=-1;k=c[f>>2]|0;i=e;return k|0}else{c[f>>2]=0;k=c[f>>2]|0;i=e;return k|0}return 0}function gb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if((c[j>>2]|0)<0|(c[j>>2]|0)>2){c[f>>2]=-1;a=c[f>>2]|0;i=e;return a|0}if((c[g>>2]|0)==0){c[f>>2]=-7;a=c[f>>2]|0;i=e;return a|0}else{a=c[g>>2]|0;Xe(a|0,0,eb(c[h>>2]|0,c[j>>2]|0)|0)|0;c[c[g>>2]>>2]=c[h>>2];c[(c[g>>2]|0)+4>>2]=c[(c[h>>2]|0)+4>>2];a=c[j>>2]|0;c[(c[g>>2]|0)+8>>2]=a;c[(c[g>>2]|0)+12>>2]=a;c[(c[g>>2]|0)+16>>2]=1;c[(c[g>>2]|0)+20>>2]=0;c[(c[g>>2]|0)+24>>2]=c[(c[c[g>>2]>>2]|0)+12>>2];c[(c[g>>2]|0)+28>>2]=1;a=vb()|0;c[(c[g>>2]|0)+32>>2]=a;c[(c[g>>2]|0)+48>>2]=0;ob(c[g>>2]|0,4028,e)|0;c[f>>2]=0;a=c[f>>2]|0;i=e;return a|0}return 0}function hb(a,d,e,f,g,h,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ja=0,ka=0,la=0,ma=0,oa=0,pa=0,qa=0,ra=0;C=i;i=i+288|0;p=C+164|0;t=C+148|0;pa=C+8|0;k=C+4|0;l=C+240|0;F=C+264|0;A=C+156|0;E=C+24|0;u=C+28|0;B=C+32|0;v=C+36|0;P=C+40|0;_=C+44|0;qa=C+48|0;aa=C+96|0;m=C+104|0;ra=C+112|0;n=C+116|0;x=C+120|0;y=C+124|0;G=C+128|0;X=C+132|0;N=C+136|0;la=C+140|0;q=C+244|0;J=C+252|0;H=C+260|0;o=C+268|0;w=C+272|0;V=C+276|0;Q=C+168|0;Z=C+172|0;K=C+176|0;L=C+280|0;R=C+184|0;Y=C+188|0;ba=C+192|0;T=C+196|0;ca=C+200|0;da=C+204|0;M=C+208|0;S=C+212|0;W=C+216|0;U=C+220|0;O=C+224|0;z=C+228|0;D=C+232|0;I=C+16|0;ka=C;oa=C+12|0;ma=C+236|0;r=C+144|0;ja=C+248|0;ha=C+152|0;fa=C+256|0;ea=C+20|0;ga=C+160|0;s=C+180|0;c[t>>2]=a;c[pa>>2]=d;c[k>>2]=e;c[l>>2]=f;c[F>>2]=g;c[A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0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ja=0;o=i;i=i+2464|0;k=o+20|0;l=o+80|0;r=o+4|0;n=o+248|0;f=o+256|0;j=o+76|0;g=o+272|0;E=o+24|0;B=o+32|0;x=o+36|0;ha=o+40|0;ja=o+44|0;v=o+48|0;p=o+52|0;z=o+56|0;h=o+60|0;H=o+64|0;m=o+236|0;ga=o+244|0;M=o+252|0;D=o+260|0;w=o+264|0;y=o+184|0;F=o+188|0;C=o+192|0;A=o+2384|0;u=o+200|0;s=o+204|0;t=o+208|0;da=o+212|0;X=o+2442|0;P=o+220|0;fa=o+224|0;S=o+336|0;R=o+2444|0;Q=o+280|0;G=o+68|0;J=o+232|0;T=o+72|0;K=o+240|0;aa=o+8|0;O=o;ca=o+84|0;ba=o+288|0;V=o+16|0;W=o+228|0;Y=o+12|0;_=o+216|0;Z=o+2446|0;U=o+2448|0;N=o+2392|0;q=o+196|0;L=o+284|0;I=o+282|0;ea=o+2440|0;c[k>>2]=a;c[l>>2]=d;c[r>>2]=e;c[j>>2]=c[(c[k>>2]|0)+8>>2];c[p>>2]=c[c[k>>2]>>2];c[z>>2]=c[(c[p>>2]|0)+8>>2];c[h>>2]=c[(c[p>>2]|0)+4>>2];c[M>>2]=c[(c[p>>2]|0)+24>>2];c[n>>2]=0;do{a=(c[k>>2]|0)+80+(($(c[n>>2]|0,2048+(c[h>>2]|0)|0)|0)<<2)|0;c[g+(c[n>>2]<<2)>>2]=a;c[E+(c[n>>2]<<2)>>2]=(c[g+(c[n>>2]<<2)>>2]|0)+8192+(0-(c[l>>2]|0)<<2);a=(c[n>>2]|0)+1|0;c[n>>2]=a}while((a|0)<(c[j>>2]|0));c[B>>2]=(c[k>>2]|0)+80+(($(2048+(c[h>>2]|0)|0,c[j>>2]|0)|0)<<2);c[x>>2]=(c[B>>2]|0)+((c[j>>2]|0)*24<<1);c[ha>>2]=(c[x>>2]|0)+(c[z>>2]<<1<<1);c[ja>>2]=(c[ha>>2]|0)+(c[z>>2]<<1<<1);c[v>>2]=(c[ja>>2]|0)+(c[z>>2]<<1<<1);c[m>>2]=c[(c[k>>2]|0)+48>>2];c[H>>2]=c[(c[k>>2]|0)+20>>2];if((c[m>>2]|0)>=5){e=1}else{e=(c[H>>2]|0)!=0}c[ga>>2]=e&1;if((c[ga>>2]|0)!=0){c[y>>2]=c[(c[k>>2]|0)+24>>2];if((c[y>>2]|0)<(c[(c[p>>2]|0)+12>>2]|0)){q=c[y>>2]|0}else{q=c[(c[p>>2]|0)+12>>2]|0}do{if((c[H>>2]|0)<=(q|0)){if((c[y>>2]|0)<(c[(c[p>>2]|0)+12>>2]|0)){q=c[y>>2]|0;break}else{q=c[(c[p>>2]|0)+12>>2]|0;break}}else{q=c[H>>2]|0}}while(0);c[F>>2]=q;a=$(c[j>>2]|0,c[l>>2]|0)|0;c[C>>2]=ia()|0;q=i;i=i+((2*a|0)+15&-16)|0;if((c[m>>2]|0)>=5){c[w>>2]=c[v>>2]}else{b[A>>1]=(c[m>>2]|0)==0?1536:512;c[n>>2]=0;do{c[f>>2]=c[H>>2];while(1){if((c[f>>2]|0)>=(c[y>>2]|0)){break}a=$(c[n>>2]|0,c[z>>2]|0)|0;a=(c[x>>2]|0)+(a+(c[f>>2]|0)<<1)|0;b[a>>1]=(b[a>>1]|0)-(b[A>>1]|0);c[f>>2]=(c[f>>2]|0)+1}a=(c[n>>2]|0)+1|0;c[n>>2]=a}while((a|0)<(c[j>>2]|0));c[w>>2]=c[x>>2]}c[D>>2]=c[(c[k>>2]|0)+36>>2];c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[j>>2]|0)){break}c[f>>2]=c[H>>2];while(1){if((c[f>>2]|0)>=(c[F>>2]|0)){break}a=$(c[l>>2]|0,c[n>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>>2]<<1)>>1]=(c[(c[J>>2]|0)+(1024+(c[f>>2]|0)<<2)>>2]|0)+2048>>12;c[f>>2]=(c[f>>2]|0)+1}if((c[m>>2]|0)==0){Ab(S,ca,c[da>>2]|0,c[h>>2]|0,24,1024,c[(c[k>>2]|0)+32>>2]|0)|0;c[ca>>2]=(c[ca>>2]|0)+(c[ca>>2]>>13);c[f>>2]=1;while(1){if((c[f>>2]|0)>24){break}a=(($(c[f>>2]<<1,c[f>>2]|0)|0)&65535)<<16>>16;a=($(a,(c[ca+(c[f>>2]<<2)>>2]>>16&65535)<<16>>16)|0)<<1;d=(($(c[f>>2]<<1,c[f>>2]|0)|0)&65535)<<16>>16;d=a+(($(d,c[ca+(c[f>>2]<<2)>>2]&65535&65535)|0)>>15)|0;a=ca+(c[f>>2]<<2)|0;c[a>>2]=(c[a>>2]|0)-d;c[f>>2]=(c[f>>2]|0)+1}wb((c[B>>2]|0)+((c[n>>2]|0)*24<<1)|0,ca,24)}if((c[P>>2]<<1|0)<1024){p=c[P>>2]<<1}else{p=1024}c[aa>>2]=p;c[f>>2]=0;while(1){if((c[f>>2]|0)>=24){break}b[ba+(c[f>>2]<<1)>>1]=(c[(c[J>>2]|0)+(2048-(c[aa>>2]|0)-1-(c[f>>2]|0)<<2)>>2]|0)+2048>>12;c[f>>2]=(c[f>>2]|0)+1}xb(S+2048+(0-(c[aa>>2]|0)<<1)|0,(c[B>>2]|0)+((c[n>>2]|0)*24<<1)|0,S+2048+(0-(c[aa>>2]|0)<<1)|0,c[aa>>2]|0,24,ba);c[V>>2]=1;c[W>>2]=1;if(0>(((sb(tb(S+(1024-(c[aa>>2]|0)<<1)|0,c[aa>>2]|0)|0)|0)<<16>>16<<1)-20|0)){p=0}else{p=((sb(tb(S+(1024-(c[aa>>2]|0)<<1)|0,c[aa>>2]|0)|0)|0)<<16>>16<<1)-20|0}c[_>>2]=p;c[Y>>2]=c[aa>>2]>>1;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[Y>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l>>2]|0)-1-(c[f>>2]|0)<<2)>>2]|0)+2048>>12;c[f>>2]=(c[f>>2]|0)+1}zb((c[J>>2]|0)+8192+(0-(c[l>>2]|0)<<2)|0,(c[B>>2]|0)+((c[n>>2]|0)*24<<1)|0,(c[J>>2]|0)+8192+(0-(c[l>>2]|0)<<2)|0,c[K>>2]|0,24,N);c[q>>2]=0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[K>>2]|0)){break}b[L>>1]=(c[(c[J>>2]|0)+(2048-(c[l>>2]|0)+(c[f>>2]|0)<<2)>>2]|0)+2048>>12;a=($(b[L>>1]|0,b[L>>1]|0)|0)>>8;c[q>>2]=(c[q>>2]|0)+a;c[f>>2]=(c[f>>2]|0)+1}a:do{if((c[G>>2]|0)>(c[q>>2]>>2|0)){if((c[G>>2]|0)<(c[q>>2]|0)){b[I>>1]=mc(ic((c[G>>2]>>1)+1|0,(c[q>>2]|0)+1|0)|0)|0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[h>>2]|0)){break}b[ea>>1]=32767-(($(b[(c[da>>2]|0)+(c[f>>2]<<1)>>1]|0,(32767-(b[I>>1]|0)&65535)<<16>>16)|0)>>15);a=($(b[ea>>1]|0,(c[(c[J>>2]|0)+(2048-(c[l>>2]|0)+(c[f>>2]|0)<<2)>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[ea>>1]|0,c[(c[J>>2]|0)+(2048-(c[l>>2]|0)+(c[f>>2]|0)<<2)>>2]&65535&65535)|0)>>15)|0;c[(c[J>>2]|0)+(2048-(c[l>>2]|0)+(c[f>>2]|0)<<2)>>2]=a;c[f>>2]=(c[f>>2]|0)+1}c[f>>2]=c[h>>2];while(1){if((c[f>>2]|0)>=(c[K>>2]|0)){break a}a=($(b[I>>1]|0,(c[(c[J>>2]|0)+(2048-(c[l>>2]|0)+(c[f>>2]|0)<<2)>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[I>>1]|0,c[(c[J>>2]|0)+(2048-(c[l>>2]|0)+(c[f>>2]|0)<<2)>>2]&65535&65535)|0)>>15)|0;c[(c[J>>2]|0)+(2048-(c[l>>2]|0)+(c[f>>2]|0)<<2)>>2]=a;c[f>>2]=(c[f>>2]|0)+1}}}else{c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[K>>2]|0)){break a}c[(c[J>>2]|0)+(2048-(c[l>>2]|0)+(c[f>>2]|0)<<2)>>2]=0;c[f>>2]=(c[f>>2]|0)+1}}}while(0);ab(r,(c[J>>2]|0)+8192|0,c[(c[k>>2]|0)+52>>2]|0,c[(c[k>>2]|0)+52>>2]|0,c[h>>2]|0,0-(b[(c[k>>2]|0)+60>>1]|0)&65535,0-(b[(c[k>>2]|0)+60>>1]|0)&65535,c[(c[k>>2]|0)+64>>2]|0,c[(c[k>>2]|0)+64>>2]|0,0,0);c[f>>2]=0;while(1){if((c[f>>2]|0)>=((c[h>>2]|0)/2|0|0)){break}d=($(b[(c[da>>2]|0)+(c[f>>2]<<1)>>1]|0,(c[r+((c[h>>2]|0)-1-(c[f>>2]|0)<<2)>>2]>>16&65535)<<16>>16)|0)<<1;d=d+(($(b[(c[da>>2]|0)+(c[f>>2]<<1)>>1]|0,c[r+((c[h>>2]|0)-1-(c[f>>2]|0)<<2)>>2]&65535&65535)|0)>>15)|0;a=($(b[(c[da>>2]|0)+((c[h>>2]|0)-(c[f>>2]|0)-1<<1)>>1]|0,(c[r+(c[f>>2]<<2)>>2]>>16&65535)<<16>>16)|0)<<1;a=d+(a+(($(b[(c[da>>2]|0)+((c[h>>2]|0)-(c[f>>2]|0)-1<<1)>>1]|0,c[r+(c[f>>2]<<2)>>2]&65535&65535)|0)>>15))|0;c[(c[J>>2]|0)+(2048+(c[f>>2]|0)<<2)>>2]=a;c[f>>2]=(c[f>>2]|0)+1}a=(c[n>>2]|0)+1|0;c[n>>2]=a}while((a|0)<(c[j>>2]|0));na(c[fa>>2]|0);d=c[m>>2]|0;d=d+1|0;a=c[k>>2]|0;a=a+48|0;c[a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=a;c[n>>2]=(c[n>>2]|0)+1}}else{while(1){if((c[n>>2]|0)>=(c[x>>2]|0)){break a}c[B>>2]=(c[(c[m>>2]|0)+(c[n>>2]<<2)>>2]|0)+(c[u>>2]|0)+0;a=($(b[A>>1]|0,(c[B>>2]>>16&65535)<<16>>16)|0)<<1;c[u>>2]=a+(($(b[A>>1]|0,c[B>>2]&65535&65535)|0)>>15);a=qb(c[B>>2]|0)|0;F=$(c[n>>2]|0,c[v>>2]|0)|0;b[(c[p>>2]|0)+(F<<1)>>1]=a;c[n>>2]=(c[n>>2]|0)+1}}}else{c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[x>>2]|0)){break}c[C>>2]=(c[(c[m>>2]|0)+(c[n>>2]<<2)>>2]|0)+(c[u>>2]|0)+0;F=($(b[A>>1]|0,(c[C>>2]>>16&65535)<<16>>16)|0)<<1;c[u>>2]=F+(($(b[A>>1]|0,c[C>>2]&65535&65535)|0)>>15);c[k+(c[n>>2]<<2)>>2]=c[C>>2];c[n>>2]=(c[n>>2]|0)+1}c[w>>2]=1}}while(0);c[(c[l>>2]|0)+(c[y>>2]<<2)>>2]=c[u>>2];b:do{if((c[w>>2]|0)!=0){F=(c[r>>2]|0)!=0;c[n>>2]=0;if(F){while(1){if((c[n>>2]|0)>=(c[o>>2]|0)){break b}a=$(c[n>>2]|0,c[v>>2]|0)|0;a=b[(c[p>>2]|0)+(a<<1)>>1]|0;a=pb(a+((qb(c[k+(($(c[n>>2]|0,c[q>>2]|0)|0)<<2)>>2]|0)|0)<<16>>16)|0)|0;F=$(c[n>>2]|0,c[v>>2]|0)|0;b[(c[p>>2]|0)+(F<<1)>>1]=a;c[n>>2]=(c[n>>2]|0)+1}}else{while(1){if((c[n>>2]|0)>=(c[o>>2]|0)){break b}a=qb(c[k+(($(c[n>>2]|0,c[q>>2]|0)|0)<<2)>>2]|0)|0;F=$(c[n>>2]|0,c[v>>2]|0)|0;b[(c[p>>2]|0)+(F<<1)>>1]=a;c[n>>2]=(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var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;g=i;i=i+96|0;f=g+32|0;j=g+24|0;y=g+44|0;l=g+64|0;k=g+12|0;m=g+40|0;n=g+48|0;o=g+56|0;p=g+80|0;q=g+84|0;t=g+8|0;s=g+4|0;r=g;h=g+36|0;u=g+16|0;v=g+20|0;w=g+52|0;x=g+28|0;c[j>>2]=a;c[y>>2]=d;c[l>>2]=e;a:do{switch(c[y>>2]|0){case 10010:{a=c[l>>2]|0;y=c[a>>2]|0;c[l>>2]=a+4;c[k>>2]=y;if((c[k>>2]|0)>=0?(c[k>>2]|0)<(c[(c[c[j>>2]>>2]|0)+8>>2]|0):0){c[(c[j>>2]|0)+20>>2]=c[k>>2];h=24}else{h=25}break};case 10012:{a=c[l>>2]|0;y=c[a>>2]|0;c[l>>2]=a+4;c[m>>2]=y;if((c[m>>2]|0)>=1?(c[m>>2]|0)<=(c[(c[c[j>>2]>>2]|0)+8>>2]|0):0){c[(c[j>>2]|0)+24>>2]=c[m>>2];h=24}else{h=25}break};case 10008:{a=c[l>>2]|0;y=c[a>>2]|0;c[l>>2]=a+4;c[n>>2]=y;if((c[n>>2]|0)<1|(c[n>>2]|0)>2){h=25}else{c[(c[j>>2]|0)+12>>2]=c[n>>2];h=24}break};case 10007:{a=c[l>>2]|0;y=c[a>>2]|0;c[l>>2]=a+4;c[o>>2]=y;if((c[o>>2]|0)==0){h=25}else{c[c[o>>2]>>2]=c[(c[j>>2]|0)+40>>2];c[(c[j>>2]|0)+40>>2]=0;h=24}break};case 4027:{a=c[l>>2]|0;y=c[a>>2]|0;c[l>>2]=a+4;c[p>>2]=y;if((c[p>>2]|0)==0){h=25}else{c[c[p>>2]>>2]=(c[(c[j>>2]|0)+4>>2]|0)/(c[(c[j>>2]|0)+16>>2]|0)|0;h=24}break};case 4028:{c[t>>2]=(c[j>>2]|0)+80+(($(2048+(c[(c[j>>2]|0)+4>>2]|0)|0,c[(c[j>>2]|0)+8>>2]|0)|0)<<2);c[s>>2]=(c[t>>2]|0)+((c[(c[j>>2]|0)+8>>2]|0)*24<<1);c[r>>2]=(c[s>>2]|0)+(c[(c[c[j>>2]>>2]|0)+8>>2]<<1<<1);c[h>>2]=(c[r>>2]|0)+(c[(c[c[j>>2]>>2]|0)+8>>2]<<1<<1);Xe((c[j>>2]|0)+36|0,0,(eb(c[c[j>>2]>>2]|0,c[(c[j>>2]|0)+8>>2]|0)|0)-((c[j>>2]|0)+36-(c[j>>2]|0))|0)|0;c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[(c[c[j>>2]>>2]|0)+8>>2]<<1|0)){h=24;break a}b[(c[h>>2]|0)+(c[q>>2]<<1)>>1]=-28672;b[(c[r>>2]|0)+(c[q>>2]<<1)>>1]=-28672;c[q>>2]=(c[q>>2]|0)+1}};case 4033:{a=c[l>>2]|0;y=c[a>>2]|0;c[l>>2]=a+4;c[u>>2]=y;if((c[u>>2]|0)==0){h=25}else{c[c[u>>2]>>2]=c[(c[j>>2]|0)+52>>2];h=24}break};case 10015:{a=c[l>>2]|0;y=c[a>>2]|0;c[l>>2]=a+4;c[v>>2]=y;if((c[v>>2]|0)==0){h=25}else{c[c[v>>2]>>2]=c[c[j>>2]>>2];h=24}break};case 10016:{y=c[l>>2]|0;h=c[y>>2]|0;c[l>>2]=y+4;c[w>>2]=h;c[(c[j>>2]|0)+28>>2]=c[w>>2];h=24;break};case 4031:{a=c[l>>2]|0;y=c[a>>2]|0;c[l>>2]=a+4;c[x>>2]=y;if((c[x>>2]|0)==0){h=25}else{c[c[x>>2]>>2]=c[(c[j>>2]|0)+36>>2];h=24}break};default:{c[f>>2]=-5;y=c[f>>2]|0;i=g;return y|0}}}while(0);if((h|0)==24){c[f>>2]=0;y=c[f>>2]|0;i=g;return y|0}else if((h|0)==25){c[f>>2]=-1;y=c[f>>2]|0;i=g;return y|0}return 0}function pb(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)<=32767){if((c[d>>2]|0)<-32768){a=-32768}else{a=(c[d>>2]&65535)<<16>>16}}else{a=32767}i=b;return a&65535|0}function qb(a){a=a|0;var b=0,d=0;d=i;i=i+16|0;b=d;c[b>>2]=a;c[b>>2]=(c[b>>2]|0)+2048>>12;c[b>>2]=(c[b>>2]|0)>-32768?c[b>>2]|0:-32768;c[b>>2]=(c[b>>2]|0)<32767?c[b>>2]|0:32767;i=d;return c[b>>2]&65535|0}function rb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;f=i;i=i+2064|0;k=f+12|0;j=f+8|0;g=f+4|0;e=f;h=f+16|0;c[k>>2]=a;c[j>>2]=b;c[g>>2]=d;rc(c[k>>2]|0,h,2048,c[j>>2]|0,c[g>>2]|0);yc(h+720|0,h,1328,620,e,c[g>>2]|0);c[e>>2]=720-(c[e>>2]|0);i=f;return c[e>>2]|0}function sb(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)<=0){a=0}else{a=(ub(c[d>>2]|0)|0)<<16>>16}i=b;return a&65535|0}function tb(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;h=f+8|0;k=f+4|0;e=f;j=f+14|0;g=f+12|0;c[h>>2]=a;c[k>>2]=d;b[j>>1]=0;b[g>>1]=0;c[e>>2]=0;while(1){d=b[j>>1]|0;if((c[e>>2]|0)>=(c[k>>2]|0)){break}if((d|0)>(b[(c[h>>2]|0)+(c[e>>2]<<1)>>1]|0)){d=b[j>>1]|0}else{d=b[(c[h>>2]|0)+(c[e>>2]<<1)>>1]|0}b[j>>1]=d<<16>>16;if((b[g>>1]|0)<(b[(c[h>>2]|0)+(c[e>>2]<<1)>>1]|0)){d=b[g>>1]|0}else{d=b[(c[h>>2]|0)+(c[e>>2]<<1)>>1]|0}b[g>>1]=d<<16>>16;c[e>>2]=(c[e>>2]|0)+1}if((d|0)>(0-(b[g>>1]|0)|0)){a=b[j>>1]|0;i=f;return a|0}else{a=0-(b[g>>1]|0)|0;i=f;return a|0}return 0}function ub(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=32-(We(c[d>>2]|0)|0)-1&65535;i=b;return a|0}function vb(){return 0}function wb(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;m=i;i=i+144|0;r=m+128|0;l=m+16|0;h=m;g=m+120|0;f=m+124|0;j=m+132|0;k=m+12|0;n=m+24|0;q=m+20|0;o=m+8|0;p=m+4|0;c[r>>2]=a;c[l>>2]=d;c[h>>2]=e;c[k>>2]=c[c[l>>2]>>2];c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[h>>2]|0)){break}c[n+(c[g>>2]<<2)>>2]=0;c[g>>2]=(c[g>>2]|0)+1}a:do{if((c[c[l>>2]>>2]|0)!=0){c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[h>>2]|0)){break a}c[q>>2]=0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[g>>2]|0)){break}a=($((c[n+(c[f>>2]<<2)>>2]>>16&65535)<<16>>16,(c[(c[l>>2]|0)+((c[g>>2]|0)-(c[f>>2]|0)<<2)>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($((c[n+(c[f>>2]<<2)>>2]>>16&65535)<<16>>16,c[(c[l>>2]|0)+((c[g>>2]|0)-(c[f>>2]|0)<<2)>>2]&65535&65535)|0)>>15)|0;a=a+(($((c[(c[l>>2]|0)+((c[g>>2]|0)-(c[f>>2]|0)<<2)>>2]>>16&65535)<<16>>16,c[n+(c[f>>2]<<2)>>2]&65535&65535)|0)>>15)|0;c[q>>2]=(c[q>>2]|0)+a;c[f>>2]=(c[f>>2]|0)+1}c[q>>2]=(c[q>>2]|0)+(c[(c[l>>2]|0)+((c[g>>2]|0)+1<<2)>>2]>>3);c[j>>2]=0-(ic(c[q>>2]<<3,c[k>>2]|0)|0);c[n+(c[g>>2]<<2)>>2]=c[j>>2]>>3;c[f>>2]=0;while(1){if((c[f>>2]|0)>=((c[g>>2]|0)+1>>1|0)){break}c[o>>2]=c[n+(c[f>>2]<<2)>>2];c[p>>2]=c[n+((c[g>>2]|0)-1-(c[f>>2]|0)<<2)>>2];a=($((c[j>>2]>>16&65535)<<16>>16,(c[p>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($((c[j>>2]>>16&65535)<<16>>16,c[p>>2]&65535&65535)|0)>>15)|0;a=(c[o>>2]|0)+(a+(($((c[p>>2]>>16&65535)<<16>>16,c[j>>2]&65535&65535)|0)>>15))|0;c[n+(c[f>>2]<<2)>>2]=a;a=($((c[j>>2]>>16&65535)<<16>>16,(c[o>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($((c[j>>2]>>16&65535)<<16>>16,c[o>>2]&65535&65535)|0)>>15)|0;a=(c[p>>2]|0)+(a+(($((c[o>>2]>>16&65535)<<16>>16,c[j>>2]&65535&65535)|0)>>15))|0;c[n+((c[g>>2]|0)-1-(c[f>>2]|0)<<2)>>2]=a;c[f>>2]=(c[f>>2]|0)+1}a=($((c[j>>2]>>16&65535)<<16>>16,(c[j>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($((c[j>>2]>>16&65535)<<16>>16,c[j>>2]&65535&65535)|0)>>15)|0;a=(a+(($((c[j>>2]>>16&65535)<<16>>16,c[j>>2]&65535&65535)|0)>>15)>>16&65535)<<16>>16;a=($(a,(c[k>>2]>>16&65535)<<16>>16)|0)<<1;d=($((c[j>>2]>>16&65535)<<16>>16,(c[j>>2]>>16&65535)<<16>>16)|0)<<1;d=d+(($((c[j>>2]>>16&65535)<<16>>16,c[j>>2]&65535&65535)|0)>>15)|0;d=(d+(($((c[j>>2]>>16&65535)<<16>>16,c[j>>2]&65535&65535)|0)>>15)>>16&65535)<<16>>16;d=a+(($(d,c[k>>2]&65535&65535)|0)>>15)|0;a=($((c[j>>2]>>16&65535)<<16>>16,(c[j>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($((c[j>>2]>>16&65535)<<16>>16,c[j>>2]&65535&65535)|0)>>15)|0;c[k>>2]=(c[k>>2]|0)-(d+(($((c[k>>2]>>16&65535)<<16>>16,a+(($((c[j>>2]>>16&65535)<<16>>16,c[j>>2]&65535&65535)|0)>>15)&65535&65535)|0)>>15));if((c[k>>2]|0)<(c[c[l>>2]>>2]>>10|0)){break a}c[g>>2]=(c[g>>2]|0)+1}}}while(0);c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[h>>2]|0)){break}b[(c[r>>2]|0)+(c[g>>2]<<1)>>1]=(c[n+(c[g>>2]<<2)>>2]|0)+32768>>16;c[g>>2]=(c[g>>2]|0)+1}i=m;return}function xb(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 j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;p=i;i=i+64|0;j=p+48|0;u=p+28|0;o=p;n=p+40|0;q=p+44|0;t=p+52|0;m=p+24|0;l=p+36|0;r=p+32|0;s=p+8|0;k=p+4|0;c[j>>2]=a;c[u>>2]=d;c[o>>2]=e;c[n>>2]=f;c[q>>2]=g;c[t>>2]=h;e=c[q>>2]|0;c[r>>2]=ia()|0;f=i;i=i+((2*e|0)+15&-16)|0;e=i;i=i+((2*((c[n>>2]|0)+(c[q>>2]|0)|0)|0)+15&-16)|0;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[q>>2]|0)){break}b[f+(c[m>>2]<<1)>>1]=b[(c[u>>2]|0)+((c[q>>2]|0)-(c[m>>2]|0)-1<<1)>>1]|0;c[m>>2]=(c[m>>2]|0)+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[q>>2]|0)){break}b[e+(c[m>>2]<<1)>>1]=b[(c[t>>2]|0)+((c[q>>2]|0)-(c[m>>2]|0)-1<<1)>>1]|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}b[e+((c[m>>2]|0)+(c[q>>2]|0)<<1)>>1]=b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]|0;c[m>>2]=(c[m>>2]|0)+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[q>>2]|0)){break}b[(c[t>>2]|0)+(c[m>>2]<<1)>>1]=b[(c[j>>2]|0)+((c[n>>2]|0)-(c[m>>2]|0)-1<<1)>>1]|0;c[m>>2]=(c[m>>2]|0)+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=((c[n>>2]|0)-3|0)){break}c[s+0>>2]=0;c[s+4>>2]=0;c[s+8>>2]=0;c[s+12>>2]=0;yb(f,e+(c[m>>2]<<1)|0,s,c[q>>2]|0);if(((b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]|0)+((c[s>>2]|0)+2048>>12)|0)<=32767){if(((b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]|0)+((c[s>>2]|0)+2048>>12)|0)<-32768){t=-32768}else{t=(b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]|0)+((c[s>>2]|0)+2048>>12)|0}}else{t=32767}b[(c[o>>2]|0)+(c[m>>2]<<1)>>1]=t;if(((b[(c[j>>2]|0)+((c[m>>2]|0)+1<<1)>>1]|0)+((c[s+4>>2]|0)+2048>>12)|0)<=32767){if(((b[(c[j>>2]|0)+((c[m>>2]|0)+1<<1)>>1]|0)+((c[s+4>>2]|0)+2048>>12)|0)<-32768){t=-32768}else{t=(b[(c[j>>2]|0)+((c[m>>2]|0)+1<<1)>>1]|0)+((c[s+4>>2]|0)+2048>>12)|0}}else{t=32767}b[(c[o>>2]|0)+((c[m>>2]|0)+1<<1)>>1]=t;if(((b[(c[j>>2]|0)+((c[m>>2]|0)+2<<1)>>1]|0)+((c[s+8>>2]|0)+2048>>12)|0)<=32767){if(((b[(c[j>>2]|0)+((c[m>>2]|0)+2<<1)>>1]|0)+((c[s+8>>2]|0)+2048>>12)|0)<-32768){t=-32768}else{t=(b[(c[j>>2]|0)+((c[m>>2]|0)+2<<1)>>1]|0)+((c[s+8>>2]|0)+2048>>12)|0}}else{t=32767}b[(c[o>>2]|0)+((c[m>>2]|0)+2<<1)>>1]=t;if(((b[(c[j>>2]|0)+((c[m>>2]|0)+3<<1)>>1]|0)+((c[s+12>>2]|0)+2048>>12)|0)<=32767){if(((b[(c[j>>2]|0)+((c[m>>2]|0)+3<<1)>>1]|0)+((c[s+12>>2]|0)+2048>>12)|0)<-32768){t=-32768}else{t=(b[(c[j>>2]|0)+((c[m>>2]|0)+3<<1)>>1]|0)+((c[s+12>>2]|0)+2048>>12)|0}}else{t=32767}b[(c[o>>2]|0)+((c[m>>2]|0)+3<<1)>>1]=t;c[m>>2]=(c[m>>2]|0)+4}while(1){if((c[m>>2]|0)>=(c[n>>2]|0)){break}c[k>>2]=0;c[l>>2]=0;while(1){if((c[l>>2]|0)>=(c[q>>2]|0)){break}c[k>>2]=(c[k>>2]|0)+($(b[f+(c[l>>2]<<1)>>1]|0,b[e+((c[m>>2]|0)+(c[l>>2]|0)<<1)>>1]|0)|0);c[l>>2]=(c[l>>2]|0)+1}if(((b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]|0)+((c[k>>2]|0)+2048>>12)|0)<=32767){if(((b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]|0)+((c[k>>2]|0)+2048>>12)|0)<-32768){s=-32768}else{s=(b[(c[j>>2]|0)+(c[m>>2]<<1)>>1]|0)+((c[k>>2]|0)+2048>>12)|0}}else{s=32767}b[(c[o>>2]|0)+(c[m>>2]<<1)>>1]=s;c[m>>2]=(c[m>>2]|0)+1}na(c[r>>2]|0);i=p;return}function yb(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;p=i;i=i+48|0;h=p+8|0;k=p+12|0;m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|0)>(c[p>>2]|0)){break}c[o>>2]=(c[u>>2]|0)+(c[v>>2]|0);c[x>>2]=0;while(1){y=c[x>>2]|0;if((c[o>>2]|0)>=(c[t>>2]|0)){break}c[x>>2]=y+($(b[(c[w>>2]|0)+(c[o>>2]<<1)>>1]|0,b[(c[w>>2]|0)+((c[o>>2]|0)-(c[u>>2]|0)<<1)>>1]|0)|0);c[o>>2]=(c[o>>2]|0)+1}a=(c[q>>2]|0)+(c[u>>2]<<2)|0;c[a>>2]=(c[a>>2]|0)+y;c[u>>2]=(c[u>>2]|0)+1}c[s>>2]=c[s>>2]<<1;if((c[s>>2]|0)<=0){a=c[q>>2]|0;c[a>>2]=(c[a>>2]|0)+(1<<0-(c[s>>2]|0))}t=c[c[q>>2]>>2]|0;if((c[c[q>>2]>>2]|0)<268435456){c[r>>2]=29-(32-(We(t|0)|0));c[o>>2]=0;while(1){if((c[o>>2]|0)>(c[p>>2]|0)){break}c[(c[q>>2]|0)+(c[o>>2]<<2)>>2]=c[(c[q>>2]|0)+(c[o>>2]<<2)>>2]<>2];c[o>>2]=(c[o>>2]|0)+1}c[s>>2]=(c[s>>2]|0)-(c[r>>2]|0);a=c[s>>2]|0;c[l>>2]=1;d=c[m>>2]|0;na(d|0);i=n;return a|0}if((t|0)<536870912){a=c[s>>2]|0;c[l>>2]=1;d=c[m>>2]|0;na(d|0);i=n;return a|0}c[k>>2]=1;if((c[c[q>>2]>>2]|0)>=1073741824){c[k>>2]=(c[k>>2]|0)+1}c[o>>2]=0;while(1){if((c[o>>2]|0)>(c[p>>2]|0)){break}c[(c[q>>2]|0)+(c[o>>2]<<2)>>2]=c[(c[q>>2]|0)+(c[o>>2]<<2)>>2]>>c[k>>2];c[o>>2]=(c[o>>2]|0)+1}c[s>>2]=(c[s>>2]|0)+(c[k>>2]|0);a=c[s>>2]|0;c[l>>2]=1;d=c[m>>2]|0;na(d|0);i=n;return a|0}function Bb(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>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>2]|0)-(c[b>>2]|0)|0}function Hb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;h=e+4|0;g=e;c[f>>2]=a;c[h>>2]=b;c[g>>2]=d;c[c[f>>2]>>2]=c[h>>2];c[(c[f>>2]|0)+4>>2]=c[g>>2];c[(c[f>>2]|0)+8>>2]=0;c[(c[f>>2]|0)+12>>2]=0;c[(c[f>>2]|0)+16>>2]=0;c[(c[f>>2]|0)+20>>2]=9;c[(c[f>>2]|0)+24>>2]=0;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);i=e;return}function Ib(a){a=a|0;var b=0,e=0,f=0;b=i;i=i+16|0;e=b;c[e>>2]=a;if(!((c[(c[e>>2]|0)+24>>2]|0)>>>0<(c[(c[e>>2]|0)+4>>2]|0)>>>0)){e=0;i=b;return e|0}f=(c[e>>2]|0)+24|0;a=c[f>>2]|0;c[f>>2]=a+1;e=d[(c[c[e>>2]>>2]|0)+a>>0]|0;i=b;return e|0}function Jb(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;while(1){if(!((c[(c[d>>2]|0)+28>>2]|0)>>>0<=8388608)){break}a=(c[d>>2]|0)+20|0;c[a>>2]=(c[a>>2]|0)+8;a=(c[d>>2]|0)+28|0;c[a>>2]=c[a>>2]<<8;c[e>>2]=c[(c[d>>2]|0)+40>>2];a=Ib(c[d>>2]|0)|0;c[(c[d>>2]|0)+40>>2]=a;c[e>>2]=(c[e>>2]<<8|c[(c[d>>2]|0)+40>>2])>>1;c[(c[d>>2]|0)+32>>2]=(c[(c[d>>2]|0)+32>>2]<<8)+(255&~c[e>>2])&2147483647}i=b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0)-(c[j>>2]|0)|0)|0;a=(c[g>>2]|0)+28|0;c[a>>2]=(c[a>>2]|0)-b;a=c[g>>2]|0;Vb(a);i=f;return}}function Ub(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0)>>>0)/((c[d>>2]|0)>>>0)|0|0}function Vb(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;while(1){if(!((c[(c[d>>2]|0)+28>>2]|0)>>>0<=8388608)){break}_b(c[d>>2]|0,(c[(c[d>>2]|0)+32>>2]|0)>>>23);c[(c[d>>2]|0)+32>>2]=c[(c[d>>2]|0)+32>>2]<<8&2147483647;a=(c[d>>2]|0)+28|0;c[a>>2]=c[a>>2]<<8;a=(c[d>>2]|0)+20|0;c[a>>2]=(c[a>>2]|0)+8}i=b;return}function Wb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;f=e+20|0;j=e+16|0;l=e+12|0;g=e+8|0;h=e+4|0;k=e;c[f>>2]=a;c[j>>2]=b;c[l>>2]=d;c[g>>2]=c[(c[f>>2]|0)+28>>2];c[k>>2]=c[(c[f>>2]|0)+32>>2];c[h>>2]=(c[g>>2]|0)>>>(c[l>>2]|0);c[g>>2]=(c[g>>2]|0)-(c[h>>2]|0);if((c[j>>2]|0)!=0){c[(c[f>>2]|0)+32>>2]=(c[k>>2]|0)+(c[g>>2]|0)}c[(c[f>>2]|0)+28>>2]=(c[j>>2]|0)!=0?c[h>>2]|0:c[g>>2]|0;Vb(c[f>>2]|0);i=e;return}function Xb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;h=e+20|0;g=e+16|0;l=e+12|0;j=e+8|0;k=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[l>>2]=d;c[l>>2]=(c[l>>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;i=e;return b|0}else{d=c[h>>2]&255;h=c[(c[g>>2]|0)+4>>2]|0;j=(c[g>>2]|0)+8|0;b=(c[j>>2]|0)+1|0;c[j>>2]=b;a[(c[c[g>>2]>>2]|0)+(h-b)>>0]=d;c[f>>2]=0;b=c[f>>2]|0;i=e;return b|0}return 0}function _b(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+12|0;h=d+8|0;f=d+4|0;g=d;c[e>>2]=a;c[h>>2]=b;if((c[h>>2]|0)==255){a=(c[e>>2]|0)+36|0;c[a>>2]=(c[a>>2]|0)+1;i=d;return}c[f>>2]=c[h>>2]>>8;if((c[(c[e>>2]|0)+40>>2]|0)>=0){b=$b(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{a=$b(c[e>>2]|0,c[g>>2]|0)|0;f=(c[e>>2]|0)+44|0;c[f>>2]=c[f>>2]|a;f=(c[e>>2]|0)+36|0;a=(c[f>>2]|0)+ -1|0;c[f>>2]=a}while(a>>>0>0)}c[(c[e>>2]|0)+40>>2]=c[h>>2]&255;i=d;return}function $b(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[g>>2]=b;c[h>>2]=d;if(((c[(c[g>>2]|0)+24>>2]|0)+(c[(c[g>>2]|0)+8>>2]|0)|0)>>>0>=(c[(c[g>>2]|0)+4>>2]|0)>>>0){c[f>>2]=-1;b=c[f>>2]|0;i=e;return b|0}else{h=c[h>>2]&255;d=(c[g>>2]|0)+24|0;b=c[d>>2]|0;c[d>>2]=b+1;a[(c[c[g>>2]>>2]|0)+b>>0]=h;c[f>>2]=0;b=c[f>>2]|0;i=e;return b|0}return 0}function ac(a,d){a=a|0;d=d|0;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[o>>2]|0);c[(c[m>>2]|0)+24>>2]=(c[n>>2]|0)-(c[o+4>>2]|0);c[(c[m>>2]|0)+28>>2]=(c[n+4>>2]|0)+(c[o>>2]|0);c[m>>2]=(c[m>>2]|0)+32;c[k>>2]=(c[k>>2]|0)+1}i=u;return}c[y>>2]=c[q>>2]<<1;c[z>>2]=(c[q>>2]|0)*3;c[r>>2]=c[m>>2];c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[l>>2]|0)){break}c[m>>2]=(c[r>>2]|0)+(($(c[k>>2]|0,c[s>>2]|0)|0)<<3);a=c[(c[t>>2]|0)+52>>2]|0;c[j>>2]=a;c[v>>2]=a;c[w>>2]=a;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[q>>2]|0)){break}a=($(b[c[j>>2]>>1]|0,(c[(c[m>>2]|0)+(c[q>>2]<<3)>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[c[j>>2]>>1]|0,c[(c[m>>2]|0)+(c[q>>2]<<3)>>2]&65535&65535)|0)>>15)|0;d=($(b[(c[j>>2]|0)+2>>1]|0,(c[(c[m>>2]|0)+(c[q>>2]<<3)+4>>2]>>16&65535)<<16>>16)|0)<<1;c[x>>2]=a-(d+(($(b[(c[j>>2]|0)+2>>1]|0,c[(c[m>>2]|0)+(c[q>>2]<<3)+4>>2]&65535&65535)|0)>>15));d=($(b[(c[j>>2]|0)+2>>1]|0,(c[(c[m>>2]|0)+(c[q>>2]<<3)>>2]>>16&65535)<<16>>16)|0)<<1;d=d+(($(b[(c[j>>2]|0)+2>>1]|0,c[(c[m>>2]|0)+(c[q>>2]<<3)>>2]&65535&65535)|0)>>15)|0;a=($(b[c[j>>2]>>1]|0,(c[(c[m>>2]|0)+(c[q>>2]<<3)+4>>2]>>16&65535)<<16>>16)|0)<<1;c[x+4>>2]=d+(a+(($(b[c[j>>2]>>1]|0,c[(c[m>>2]|0)+(c[q>>2]<<3)+4>>2]&65535&65535)|0)>>15));a=($(b[c[v>>2]>>1]|0,(c[(c[m>>2]|0)+(c[y>>2]<<3)>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[c[v>>2]>>1]|0,c[(c[m>>2]|0)+(c[y>>2]<<3)>>2]&65535&65535)|0)>>15)|0;d=($(b[(c[v>>2]|0)+2>>1]|0,(c[(c[m>>2]|0)+(c[y>>2]<<3)+4>>2]>>16&65535)<<16>>16)|0)<<1;c[x+8>>2]=a-(d+(($(b[(c[v>>2]|0)+2>>1]|0,c[(c[m>>2]|0)+(c[y>>2]<<3)+4>>2]&65535&65535)|0)>>15));d=($(b[(c[v>>2]|0)+2>>1]|0,(c[(c[m>>2]|0)+(c[y>>2]<<3)>>2]>>16&65535)<<16>>16)|0)<<1;d=d+(($(b[(c[v>>2]|0)+2>>1]|0,c[(c[m>>2]|0)+(c[y>>2]<<3)>>2]&65535&65535)|0)>>15)|0;a=($(b[c[v>>2]>>1]|0,(c[(c[m>>2]|0)+(c[y>>2]<<3)+4>>2]>>16&65535)<<16>>16)|0)<<1;c[x+12>>2]=d+(a+(($(b[c[v>>2]>>1]|0,c[(c[m>>2]|0)+(c[y>>2]<<3)+4>>2]&65535&65535)|0)>>15));a=($(b[c[w>>2]>>1]|0,(c[(c[m>>2]|0)+(c[z>>2]<<3)>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[c[w>>2]>>1]|0,c[(c[m>>2]|0)+(c[z>>2]<<3)>>2]&65535&65535)|0)>>15)|0;d=($(b[(c[w>>2]|0)+2>>1]|0,(c[(c[m>>2]|0)+(c[z>>2]<<3)+4>>2]>>16&65535)<<16>>16)|0)<<1;c[x+16>>2]=a-(d+(($(b[(c[w>>2]|0)+2>>1]|0,c[(c[m>>2]|0)+(c[z>>2]<<3)+4>>2]&65535&65535)|0)>>15));d=($(b[(c[w>>2]|0)+2>>1]|0,(c[(c[m>>2]|0)+(c[z>>2]<<3)>>2]>>16&65535)<<16>>16)|0)<<1;d=d+(($(b[(c[w>>2]|0)+2>>1]|0,c[(c[m>>2]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)<<16>>16)|0)<<1;d=d+(($(b[(c[k>>2]|0)+2>>1]|0,c[(c[l>>2]|0)+(c[m>>2]<<3)>>2]&65535&65535)|0)>>15)|0;a=($(b[c[k>>2]>>1]|0,(c[(c[l>>2]|0)+(c[m>>2]<<3)+4>>2]>>16&65535)<<16>>16)|0)<<1;c[n+12>>2]=d+(a+(($(b[c[k>>2]>>1]|0,c[(c[l>>2]|0)+(c[m>>2]<<3)+4>>2]&65535&65535)|0)>>15));a=($(b[c[o>>2]>>1]|0,(c[(c[l>>2]|0)+(c[p>>2]<<3)>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[c[o>>2]>>1]|0,c[(c[l>>2]|0)+(c[p>>2]<<3)>>2]&65535&65535)|0)>>15)|0;d=($(b[(c[o>>2]|0)+2>>1]|0,(c[(c[l>>2]|0)+(c[p>>2]<<3)+4>>2]>>16&65535)<<16>>16)|0)<<1;c[n+16>>2]=a-(d+(($(b[(c[o>>2]|0)+2>>1]|0,c[(c[l>>2]|0)+(c[p>>2]<<3)+4>>2]&65535&65535)|0)>>15));d=($(b[(c[o>>2]|0)+2>>1]|0,(c[(c[l>>2]|0)+(c[p>>2]<<3)>>2]>>16&65535)<<16>>16)|0)<<1;d=d+(($(b[(c[o>>2]|0)+2>>1]|0,c[(c[l>>2]|0)+(c[p>>2]<<3)>>2]&65535&65535)|0)>>15)|0;a=($(b[c[o>>2]>>1]|0,(c[(c[l>>2]|0)+(c[p>>2]<<3)+4>>2]>>16&65535)<<16>>16)|0)<<1;c[n+20>>2]=d+(a+(($(b[c[o>>2]>>1]|0,c[(c[l>>2]|0)+(c[p>>2]<<3)+4>>2]&65535&65535)|0)>>15));c[n+24>>2]=(c[n+8>>2]|0)+(c[n+16>>2]|0);c[n+28>>2]=(c[n+12>>2]|0)+(c[n+20>>2]|0);c[n>>2]=(c[n+8>>2]|0)-(c[n+16>>2]|0);c[n+4>>2]=(c[n+12>>2]|0)-(c[n+20>>2]|0);c[k>>2]=(c[k>>2]|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0,N=0,O=0,P=0,Q=0;u=i;i=i+784|0;l=u+64|0;Q=u+48|0;x=u+44|0;s=u+108|0;P=u+100|0;G=u+16|0;q=u+20|0;C=u+24|0;D=u+28|0;v=u+32|0;t=u+36|0;A=u+96|0;w=u+104|0;N=u+112|0;r=u+120|0;F=u+128|0;B=u+68|0;n=u+72|0;o=u+76|0;I=u+80|0;y=u+84|0;E=u+12|0;O=u+8|0;M=u+136|0;L=u+4|0;p=u;J=u+40|0;H=u+92|0;m=u+52|0;z=u+88|0;c[Q>>2]=d;c[x>>2]=e;c[s>>2]=f;c[P>>2]=g;c[G>>2]=h;c[q>>2]=j;c[C>>2]=k;c[t>>2]=0;c[A>>2]=0;c[F+0>>2]=0;c[F+4>>2]=0;c[n>>2]=c[Q>>2];c[o>>2]=c[n>>2];a:do{if((c[P>>2]|0)!=0){c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[(c[x>>2]|0)+4>>2]|0)){break a}c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2388>>2]=0;c[v>>2]=(c[v>>2]|0)+1}}}while(0);if((c[(c[x>>2]|0)+4>>2]|0)>(c[(c[n>>2]|0)+8536>>2]|0)){Q=be((c[o>>2]|0)+4260|0)|0;c[A>>2]=(c[A>>2]|0)+Q}if((c[(c[x>>2]|0)+4>>2]|0)==1?(c[(c[n>>2]|0)+8536>>2]|0)==2:0){j=(c[(c[x>>2]|0)+12>>2]|0)==((c[(c[o>>2]|0)+2316>>2]|0)*1e3|0)}else{j=0}c[y>>2]=j&1;b:do{if((c[(c[o>>2]|0)+2388>>2]|0)==0){c[v>>2]=0;c:while(1){if((c[v>>2]|0)>=(c[(c[x>>2]|0)+4>>2]|0)){break b}do{if((c[(c[x>>2]|0)+16>>2]|0)==0){c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2392>>2]=1;c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2324>>2]=2}else{if((c[(c[x>>2]|0)+16>>2]|0)==10){c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2392>>2]=1;c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2324>>2]=2;break}if((c[(c[x>>2]|0)+16>>2]|0)==20){c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2392>>2]=1;c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2324>>2]=4;break}if((c[(c[x>>2]|0)+16>>2]|0)==40){c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2392>>2]=2;c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2324>>2]=4;break}if((c[(c[x>>2]|0)+16>>2]|0)!=60){K=23;break c}c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2392>>2]=3;c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2324>>2]=4}}while(0);c[O>>2]=(c[(c[x>>2]|0)+12>>2]>>10)+1;if((c[O>>2]|0)!=8&(c[O>>2]|0)!=12&(c[O>>2]|0)!=16){K=25;break}Q=Zd((c[o>>2]|0)+((c[v>>2]|0)*4260|0)|0,c[O>>2]|0,c[(c[x>>2]|0)+8>>2]|0)|0;c[A>>2]=(c[A>>2]|0)+Q;c[v>>2]=(c[v>>2]|0)+1}if((K|0)==23){c[l>>2]=-203;Q=c[l>>2]|0;i=u;return Q|0}else if((K|0)==25){c[l>>2]=-200;Q=c[l>>2]|0;i=u;return Q|0}}}while(0);do{if((c[c[x>>2]>>2]|0)==2?(c[(c[x>>2]|0)+4>>2]|0)==2:0){if((c[(c[n>>2]|0)+8532>>2]|0)!=1?(c[(c[n>>2]|0)+8536>>2]|0)!=1:0){break}Q=(c[n>>2]|0)+8520|0;b[Q+0>>1]=0;b[Q+2>>1]=0;Q=(c[n>>2]|0)+8528|0;b[Q+0>>1]=0;b[Q+2>>1]=0;Ze((c[o>>2]|0)+6692|0,(c[o>>2]|0)+2432|0,300)|0}}while(0);c[(c[n>>2]|0)+8532>>2]=c[c[x>>2]>>2];c[(c[n>>2]|0)+8536>>2]=c[(c[x>>2]|0)+4>>2];if((c[(c[x>>2]|0)+8>>2]|0)<=48e3?(c[(c[x>>2]|0)+8>>2]|0)>=8e3:0){d:do{if((c[s>>2]|0)!=1?(c[(c[o>>2]|0)+2388>>2]|0)==0:0){c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[(c[x>>2]|0)+4>>2]|0)){break}c[D>>2]=0;while(1){Q=(c[D>>2]|0)<(c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2392>>2]|0);O=Ob(c[G>>2]|0,1)|0;if(!Q){break}c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2404+(c[D>>2]<<2)>>2]=O;c[D>>2]=(c[D>>2]|0)+1}c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2416>>2]=O;c[v>>2]=(c[v>>2]|0)+1}c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[(c[x>>2]|0)+4>>2]|0)){break}Q=(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2420|0;c[Q+0>>2]=0;c[Q+4>>2]=0;c[Q+8>>2]=0;e:do{if((c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2416>>2]|0)!=0){if((c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2392>>2]|0)==1){c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2420>>2]=1;break}c[N>>2]=(Pb(c[G>>2]|0,c[18248+((c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2392>>2]|0)-2<<2)>>2]|0,8)|0)+1;c[D>>2]=0;while(1){if((c[D>>2]|0)>=(c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2392>>2]|0)){break e}c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2420+(c[D>>2]<<2)>>2]=c[N>>2]>>c[D>>2]&1;c[D>>2]=(c[D>>2]|0)+1}}}while(0);c[v>>2]=(c[v>>2]|0)+1}if((c[s>>2]|0)==0){c[D>>2]=0;while(1){if((c[D>>2]|0)>=(c[(c[o>>2]|0)+2392>>2]|0)){break d}c[v>>2]=0;while(1){N=c[D>>2]|0;if((c[v>>2]|0)>=(c[(c[x>>2]|0)+4>>2]|0)){break}if((c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2420+(N<<2)>>2]|0)!=0){do{if((c[(c[x>>2]|0)+4>>2]|0)==2){if((c[v>>2]|0)!=0){break}qe(c[G>>2]|0,F);if((c[(c[o>>2]|0)+6680+(c[D>>2]<<2)>>2]|0)!=0){break}re(c[G>>2]|0,t)}}while(0);do{if((c[D>>2]|0)>0){if((c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2420+((c[D>>2]|0)-1<<2)>>2]|0)==0){K=65;break}c[L>>2]=2}else{K=65}}while(0);if((K|0)==65){K=0;c[L>>2]=0}Vd((c[o>>2]|0)+((c[v>>2]|0)*4260|0)|0,c[G>>2]|0,c[D>>2]|0,1,c[L>>2]|0);Yd(c[G>>2]|0,M,a[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2765>>0]|0,a[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2766>>0]|0,c[(c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2328>>2]|0)}c[v>>2]=(c[v>>2]|0)+1}c[D>>2]=N+1}}}}while(0);f:do{if((c[(c[x>>2]|0)+4>>2]|0)==2){do{if((c[s>>2]|0)!=0){if((c[s>>2]|0)==2?(c[(c[o>>2]|0)+2420+(c[(c[o>>2]|0)+2388>>2]<<2)>>2]|0)==1:0){break}c[v>>2]=0;while(1){if((c[v>>2]|0)>=2){break f}c[F+(c[v>>2]<<2)>>2]=b[(c[n>>2]|0)+8520+(c[v>>2]<<1)>>1]|0;c[v>>2]=(c[v>>2]|0)+1}}}while(0);qe(c[G>>2]|0,F);if(!((c[s>>2]|0)==0?(c[(c[o>>2]|0)+6664+(c[(c[o>>2]|0)+2388>>2]<<2)>>2]|0)==0:0)){K=75}do{if((K|0)==75){if((c[s>>2]|0)==2?(c[(c[o>>2]|0)+6680+(c[(c[o>>2]|0)+2388>>2]<<2)>>2]|0)==0:0){break}c[t>>2]=0;break f}}while(0);re(c[G>>2]|0,t)}}while(0);if(((c[(c[x>>2]|0)+4>>2]|0)==2?(c[t>>2]|0)==0:0)?(c[(c[n>>2]|0)+8540>>2]|0)==1:0){Xe((c[n>>2]|0)+5608|0,0,960)|0;L=(c[n>>2]|0)+5544|0;K=L+64|0;do{c[L>>2]=0;L=L+4|0}while((L|0)<(K|0));c[(c[n>>2]|0)+6568>>2]=100;a[(c[n>>2]|0)+6572>>0]=10;c[(c[n>>2]|0)+8424>>2]=0;c[(c[n>>2]|0)+6636>>2]=1}Q=$(c[(c[x>>2]|0)+12>>2]|0,c[(c[x>>2]|0)+4>>2]|0)|0;c[E>>2]=(Q|0)<($(c[(c[x>>2]|0)+8>>2]|0,c[c[x>>2]>>2]|0)|0)&1;if((c[E>>2]|0)!=0){K=1}else{K=$(c[(c[x>>2]|0)+4>>2]|0,(c[(c[o>>2]|0)+2328>>2]|0)+2|0)|0}c[p>>2]=ia()|0;L=i;i=i+((2*K|0)+15&-16)|0;if((c[E>>2]|0)!=0){c[r>>2]=c[q>>2];c[r+4>>2]=(c[q>>2]|0)+(c[(c[o>>2]|0)+2328>>2]<<1)+4}else{c[r>>2]=L;c[r+4>>2]=L+(c[(c[o>>2]|0)+2328>>2]<<1)+4}if((c[s>>2]|0)==0){c[I>>2]=((c[t>>2]|0)!=0^1)&1}else{if((c[(c[n>>2]|0)+8540>>2]|0)!=0){if((c[(c[x>>2]|0)+4>>2]|0)==2?(c[s>>2]|0)==2:0){K=(c[(c[o>>2]|0)+6680+(c[(c[o>>2]|0)+6648>>2]<<2)>>2]|0)==1}else{K=0}}else{K=1}c[I>>2]=K&1}c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[(c[x>>2]|0)+4>>2]|0)){break}if((c[v>>2]|0)!=0?(c[I>>2]|0)==0:0){Xe((c[r+(c[v>>2]<<2)>>2]|0)+4|0,0,c[w>>2]<<1|0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2]|0,(c[(c[o>>2]|0)+2328>>2]|0)+2|0)|0}else{F=1}G=i;i=i+((2*F|0)+15&-16)|0;if((c[E>>2]|0)!=0){Q=($(c[(c[x>>2]|0)+4>>2]|0,(c[(c[o>>2]|0)+2328>>2]|0)+2|0)|0)<<1;Ze(G|0,c[q>>2]|0,Q+0|0)|0;c[r>>2]=G;c[r+4>>2]=G+(c[(c[o>>2]|0)+2328>>2]<<1)+4}c[v>>2]=0;while(1){E=c[x>>2]|0;if((c[c[x>>2]>>2]|0)<(c[(c[x>>2]|0)+4>>2]|0)){E=c[E>>2]|0}else{E=c[E+4>>2]|0}if((c[v>>2]|0)>=(E|0)){break}Q=ee((c[o>>2]|0)+((c[v>>2]|0)*4260|0)+2432|0,c[B>>2]|0,(c[r+(c[v>>2]<<2)>>2]|0)+2|0,c[w>>2]|0)|0;c[A>>2]=(c[A>>2]|0)+Q;h:do{if((c[c[x>>2]>>2]|0)==2){c[D>>2]=0;while(1){if((c[D>>2]|0)>=(c[c[C>>2]>>2]|0)){break h}b[(c[q>>2]|0)+((c[v>>2]|0)+(c[D>>2]<<1)<<1)>>1]=b[(c[B>>2]|0)+(c[D>>2]<<1)>>1]|0;c[D>>2]=(c[D>>2]|0)+1}}}while(0);c[v>>2]=(c[v>>2]|0)+1}i:do{if((c[c[x>>2]>>2]|0)==2){if((c[(c[x>>2]|0)+4>>2]|0)!=1){break}if((c[y>>2]|0)!=0){Q=ee((c[o>>2]|0)+6692|0,c[B>>2]|0,(c[r>>2]|0)+2|0,c[w>>2]|0)|0;c[A>>2]=(c[A>>2]|0)+Q;c[D>>2]=0;while(1){if((c[D>>2]|0)>=(c[c[C>>2]>>2]|0)){break i}b[(c[q>>2]|0)+(1+(c[D>>2]<<1)<<1)>>1]=b[(c[B>>2]|0)+(c[D>>2]<<1)>>1]|0;c[D>>2]=(c[D>>2]|0)+1}}else{c[D>>2]=0;while(1){if((c[D>>2]|0)>=(c[c[C>>2]>>2]|0)){break i}b[(c[q>>2]|0)+(1+(c[D>>2]<<1)<<1)>>1]=b[(c[q>>2]|0)+(0+(c[D>>2]<<1)<<1)>>1]|0;c[D>>2]=(c[D>>2]|0)+1}}}}while(0);if((c[(c[o>>2]|0)+4164>>2]|0)==2){c[m+0>>2]=c[14952>>2];c[m+4>>2]=c[14956>>2];c[m+8>>2]=c[14960>>2];Q=$(c[(c[o>>2]|0)+2308>>2]|0,c[m+((c[(c[o>>2]|0)+2316>>2]|0)-8>>2<<2)>>2]|0)|0;c[(c[x>>2]|0)+20>>2]=Q}else{c[(c[x>>2]|0)+20>>2]=0}j:do{if((c[s>>2]|0)==1){c[D>>2]=0;while(1){if((c[D>>2]|0)>=(c[(c[n>>2]|0)+8536>>2]|0)){break j}a[(c[n>>2]|0)+((c[D>>2]|0)*4260|0)+2312>>0]=10;c[D>>2]=(c[D>>2]|0)+1}}else{c[(c[n>>2]|0)+8540>>2]=c[t>>2]}}while(0);c[l>>2]=c[A>>2];c[z>>2]=1;na(c[p>>2]|0);Q=c[l>>2]|0;i=u;return Q|0}c[A>>2]=-200;c[l>>2]=c[A>>2];Q=c[l>>2]|0;i=u;return Q|0}function Qd(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;F=i;i=i+144|0;B=F+48|0;p=F+40|0;k=F;I=F+84|0;x=F+4|0;n=F+16|0;h=F+20|0;A=F+24|0;m=F+28|0;z=F+72|0;t=F+80|0;q=F+88|0;s=F+92|0;l=F+96|0;r=F+104|0;C=F+56|0;D=F+60|0;u=F+8|0;v=F+64|0;w=F+12|0;H=F+32|0;G=F+68|0;j=F+36|0;y=F+76|0;o=F+44|0;E=F+52|0;c[B>>2]=d;c[p>>2]=e;c[k>>2]=f;c[I>>2]=g;c[h>>2]=0;g=c[(c[B>>2]|0)+2336>>2]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]=c[(c[B>>2]|0)+2308>>2]}b:do{if((c[t>>2]|0)==2){c[h>>2]=c[(c[p>>2]|0)+(c[n>>2]<<2)>>2];do{if((c[n>>2]|0)!=0){if((c[n>>2]|0)==2?(c[z>>2]|0)!=0:0){break}if((c[w>>2]|0)==65536){break b}c[x>>2]=0;while(1){if((c[x>>2]|0)>=((c[h>>2]|0)+2|0)){break b}K=$(c[w>>2]>>16,(c[g+((c[m>>2]|0)-(c[x>>2]|0)-1<<2)>>2]&65535)<<16>>16)|0;K=K+(($(c[w>>2]&65535,(c[g+((c[m>>2]|0)-(c[x>>2]|0)-1<<2)>>2]&65535)<<16>>16)|0)>>16)|0;K=K+($(c[w>>2]|0,(c[g+((c[m>>2]|0)-(c[x>>2]|0)-1<<2)>>2]>>15)+1>>1)|0)|0;c[g+((c[m>>2]|0)-(c[x>>2]|0)-1<<2)>>2]=K;c[x>>2]=(c[x>>2]|0)+1}}}while(0);c[A>>2]=(c[(c[B>>2]|0)+2336>>2]|0)-(c[h>>2]|0)-(c[(c[B>>2]|0)+2340>>2]|0)-2;if((c[n>>2]|0)==2){Ze((c[B>>2]|0)+1348+(c[(c[B>>2]|0)+2336>>2]<<1)|0,c[k>>2]|0,c[(c[B>>2]|0)+2332>>2]<<1<<1|0)|0}K=(c[A>>2]|0)+($(c[n>>2]|0,c[(c[B>>2]|0)+2332>>2]|0)|0)|0;ad(f+(c[A>>2]<<1)|0,(c[B>>2]|0)+1348+(K<<1)|0,c[q>>2]|0,(c[(c[B>>2]|0)+2336>>2]|0)-(c[A>>2]|0)|0,c[(c[B>>2]|0)+2340>>2]|0);if((c[n>>2]|0)==0){K=$(c[v>>2]>>16,(c[(c[p>>2]|0)+136>>2]&65535)<<16>>16)|0;c[v>>2]=K+(($(c[v>>2]&65535,(c[(c[p>>2]|0)+136>>2]&65535)<<16>>16)|0)>>16)<<2}c[x>>2]=0;while(1){if((c[x>>2]|0)>=((c[h>>2]|0)+2|0)){break b}K=$(c[v>>2]>>16,b[f+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+(16+(c[x>>2]|0)-7<<2)>>2]>>16,b[r+12>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(K+(($(c[e+(16+(c[x>>2]|0)-7<<2)>>2]&65535,b[r+12>>1]|0)|0)>>16));K=$(c[e+(16+(c[x>>2]|0)-8<<2)>>2]>>16,b[r+14>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(K+(($(c[e+(16+(c[x>>2]|0)-8<<2)>>2]&65535,b[r+14>>1]|0)|0)>>16));K=$(c[e+(16+(c[x>>2]|0)-9<<2)>>2]>>16,b[r+16>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(K+(($(c[e+(16+(c[x>>2]|0)-9<<2)>>2]&65535,b[r+16>>1]|0)|0)>>16));K=$(c[e+(16+(c[x>>2]|0)-10<<2)>>2]>>16,b[r+18>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(K+(($(c[e+(16+(c[x>>2]|0)-10<<2)>>2]&65535,b[r+18>>1]|0)|0)>>16));if((c[(c[B>>2]|0)+2340>>2]|0)==16){K=$(c[e+(16+(c[x>>2]|0)-11<<2)>>2]>>16,b[r+20>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(K+(($(c[e+(16+(c[x>>2]|0)-11<<2)>>2]&65535,b[r+20>>1]|0)|0)>>16));K=$(c[e+(16+(c[x>>2]|0)-12<<2)>>2]>>16,b[r+22>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(K+(($(c[e+(16+(c[x>>2]|0)-12<<2)>>2]&65535,b[r+22>>1]|0)|0)>>16));K=$(c[e+(16+(c[x>>2]|0)-13<<2)>>2]>>16,b[r+24>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(K+(($(c[e+(16+(c[x>>2]|0)-13<<2)>>2]&65535,b[r+24>>1]|0)|0)>>16));K=$(c[e+(16+(c[x>>2]|0)-14<<2)>>2]>>16,b[r+26>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(K+(($(c[e+(16+(c[x>>2]|0)-14<<2)>>2]&65535,b[r+26>>1]|0)|0)>>16));K=$(c[e+(16+(c[x>>2]|0)-15<<2)>>2]>>16,b[r+28>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(K+(($(c[e+(16+(c[x>>2]|0)-15<<2)>>2]&65535,b[r+28>>1]|0)|0)>>16));K=$(c[e+(16+(c[x>>2]|0)-16<<2)>>2]>>16,b[r+30>>1]|0)|0;c[D>>2]=(c[D>>2]|0)+(K+(($(c[e+(16+(c[x>>2]|0)-16<<2)>>2]&65535,b[r+30>>1]|0)|0)>>16))}c[e+(16+(c[x>>2]|0)<<2)>>2]=(c[(c[o>>2]|0)+(c[x>>2]<<2)>>2]|0)+(c[D>>2]<<4);K=$(c[e+(16+(c[x>>2]|0)<<2)>>2]>>16,(c[u>>2]&65535)<<16>>16)|0;K=K+(($(c[e+(16+(c[x>>2]|0)<<2)>>2]&65535,(c[u>>2]&65535)<<16>>16)|0)>>16)|0;if(((K+($(c[e+(16+(c[x>>2]|0)<<2)>>2]|0,(c[u>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){K=$(c[e+(16+(c[x>>2]|0)<<2)>>2]>>16,(c[u>>2]&65535)<<16>>16)|0;K=K+(($(c[e+(16+(c[x>>2]|0)<<2)>>2]&65535,(c[u>>2]&65535)<<16>>16)|0)>>16)|0;if(((K+($(c[e+(16+(c[x>>2]|0)<<2)>>2]|0,(c[u>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768){G=-32768}else{G=$(c[e+(16+(c[x>>2]|0)<<2)>>2]>>16,(c[u>>2]&65535)<<16>>16)|0;G=G+(($(c[e+(16+(c[x>>2]|0)<<2)>>2]&65535,(c[u>>2]&65535)<<16>>16)|0)>>16)|0;G=(G+($(c[e+(16+(c[x>>2]|0)<<2)>>2]|0,(c[u>>2]>>15)+1>>1)|0)>>7)+1>>1}}else{G=32767}b[(c[l>>2]|0)+(c[x>>2]<<1)>>1]=G;c[x>>2]=(c[x>>2]|0)+1}I=e+0|0;H=e+(c[(c[B>>2]|0)+2332>>2]<<2)+0|0;G=I+64|0;do{c[I>>2]=c[H>>2];I=I+4|0;H=H+4|0}while((I|0)<(G|0));c[y>>2]=(c[y>>2]|0)+(c[(c[B>>2]|0)+2332>>2]<<2);c[l>>2]=(c[l>>2]|0)+(c[(c[B>>2]|0)+2332>>2]<<1);c[n>>2]=(c[n>>2]|0)+1}I=(c[B>>2]|0)+1284|0;H=e+0|0;G=I+64|0;do{c[I>>2]=c[H>>2];I=I+4|0;H=H+4|0}while((I|0)<(G|0));na(c[E>>2]|0);i=F;return}function Rd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+48|0;e=d+28|0;n=d+16|0;h=d+4|0;j=d+8|0;f=d+32|0;k=d;m=d+12|0;l=d+24|0;g=d+20|0;c[n>>2]=a;c[h>>2]=b;b=c[n>>2]|0;c[j>>2]=(Td((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[k>>2]=536870911/(c[m>>2]>>16|0)|0;c[g>>2]=c[k>>2]<<16;b=$(c[m>>2]>>16,(c[k>>2]&65535)<<16>>16)|0;c[l>>2]=536870912-(b+(($(c[m>>2]&65535,(c[k>>2]&65535)<<16>>16)|0)>>16))<<3;b=$(c[l>>2]>>16,(c[k>>2]&65535)<<16>>16)|0;b=(c[g>>2]|0)+(b+(($(c[l>>2]&65535,(c[k>>2]&65535)<<16>>16)|0)>>16))|0;c[g>>2]=b+($(c[l>>2]|0,(c[k>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[j>>2]|0)-(c[h>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0){if((b|0)<32){c[e>>2]=c[g>>2]>>c[f>>2];n=c[e>>2]|0;i=d;return n|0}else{c[e>>2]=0;n=c[e>>2]|0;i=d;return n|0}}h=c[g>>2]|0;a=0-(c[f>>2]|0)|0;do{if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((h|0)>(-2147483648>>a|0)){g=-2147483648>>0-(c[f>>2]|0);break}if((c[g>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){g=2147483647>>0-(c[f>>2]|0);break}else{g=c[g>>2]|0;break}}else{if((h|0)>(2147483647>>a|0)){g=2147483647>>0-(c[f>>2]|0);break}if((c[g>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){g=-2147483648>>0-(c[f>>2]|0);break}else{g=c[g>>2]|0;break}}}while(0);c[e>>2]=g<<0-(c[f>>2]|0);n=c[e>>2]|0;i=d;return n|0}function Sd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;g=i;i=i+48|0;e=g+36|0;q=g+16|0;p=g;j=g+28|0;l=g+32|0;k=g+40|0;f=g+12|0;m=g+24|0;n=g+20|0;o=g+8|0;h=g+4|0;c[q>>2]=a;c[p>>2]=b;c[j>>2]=d;a=c[q>>2]|0;c[l>>2]=(Td((c[q>>2]|0)>0?a:0-a|0)|0)-1;c[n>>2]=c[q>>2]<>2];a=c[p>>2]|0;c[k>>2]=(Td((c[p>>2]|0)>0?a:0-a|0)|0)-1;c[o>>2]=c[p>>2]<>2];c[m>>2]=536870911/(c[o>>2]>>16|0)|0;a=$(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[h>>2]=a+(($(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16);a=c[n>>2]|0;d=c[o>>2]|0;b=c[h>>2]|0;b=hf(d|0,((d|0)<0)<<31>>31|0,b|0,((b|0)<0)<<31>>31|0)|0;b=Ve(b|0,D|0,32)|0;c[n>>2]=a-(b<<3);b=$(c[n>>2]>>16,(c[m>>2]&65535)<<16>>16)|0;c[h>>2]=(c[h>>2]|0)+(b+(($(c[n>>2]&65535,(c[m>>2]&65535)<<16>>16)|0)>>16));c[f>>2]=29+(c[l>>2]|0)-(c[k>>2]|0)-(c[j>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>=0){if((b|0)<32){c[e>>2]=c[h>>2]>>c[f>>2];q=c[e>>2]|0;i=g;return q|0}else{c[e>>2]=0;q=c[e>>2]|0;i=g;return q|0}}a=c[h>>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)){h=-2147483648>>0-(c[f>>2]|0);break}if((c[h>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){h=2147483647>>0-(c[f>>2]|0);break}else{h=c[h>>2]|0;break}}else{if((a|0)>(2147483647>>d|0)){h=2147483647>>0-(c[f>>2]|0);break}if((c[h>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){h=-2147483648>>0-(c[f>>2]|0);break}else{h=c[h>>2]|0;break}}}while(0);c[e>>2]=h<<0-(c[f>>2]|0);q=c[e>>2]|0;i=g;return q|0}function Td(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)==0){d=32;i=b;return d|0}d=32-(32-(We(c[d>>2]|0)|0))|0;i=b;return d|0}function Ud(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;q=i;i=i+192|0;s=q+172|0;t=q+152|0;m=q;p=q+164|0;u=q+168|0;v=q+176|0;o=q+148|0;l=q+160|0;r=q+156|0;n=q+8|0;j=q+4|0;c[s>>2]=b;c[t>>2]=d;c[m>>2]=e;c[p>>2]=f;c[u>>2]=g;c[v>>2]=h;c[r>>2]=0;c[o>>2]=c[(c[s>>2]|0)+2328>>2];c[n+136>>2]=0;do{if((c[u>>2]|0)==0){k=4}else{if((c[u>>2]|0)==2?(c[(c[s>>2]|0)+2420+(c[(c[s>>2]|0)+2388>>2]<<2)>>2]|0)==1:0){k=4;break}vd(c[s>>2]|0,n,c[m>>2]|0,1)}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p>>2]=h;if((c[v>>2]|0)==0?(c[(c[r>>2]|0)+2404+(c[u>>2]<<2)>>2]|0)==0:0){c[s>>2]=Pb(c[o>>2]|0,18280,8)|0}else{c[s>>2]=(Pb(c[o>>2]|0,18272,8)|0)+2}a[(c[r>>2]|0)+2765>>0]=c[s>>2]>>1;a[(c[r>>2]|0)+2766>>0]=c[s>>2]&1;h=c[o>>2]|0;if((c[p>>2]|0)==2){v=(Pb(h,18112,8)|0)&255;a[(c[r>>2]|0)+2736>>0]=v}else{u=(Pb(h,18088+(a[(c[r>>2]|0)+2765>>0]<<3)|0,8)|0)<<3&255;a[(c[r>>2]|0)+2736>>0]=u;u=((Pb(c[o>>2]|0,18344,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){h=c[o>>2]|0;if((c[k>>2]|0)>=(c[(c[r>>2]|0)+2324>>2]|0)){break}v=(Pb(h,18112,8)|0)&255;a[(c[r>>2]|0)+2736+(c[k>>2]|0)>>0]=v;c[k>>2]=(c[k>>2]|0)+1}v=$(a[(c[r>>2]|0)+2765>>0]>>1,b[c[(c[r>>2]|0)+2732>>2]>>1]|0)|0;v=(Pb(h,(c[(c[(c[r>>2]|0)+2732>>2]|0)+12>>2]|0)+v|0,8)|0)&255;a[(c[r>>2]|0)+2744>>0]=v;td(q,t,c[(c[r>>2]|0)+2732>>2]|0,a[(c[r>>2]|0)+2744>>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[s>>2]=Pb(c[o>>2]|0,(c[(c[(c[r>>2]|0)+2732>>2]|0)+24>>2]|0)+(b[q+(c[k>>2]<<1)>>1]|0)|0,8)|0;if((c[s>>2]|0)!=0){if((c[s>>2]|0)==8){v=Pb(c[o>>2]|0,18352,8)|0;c[s>>2]=(c[s>>2]|0)+v}}else{v=Pb(c[o>>2]|0,18352,8)|0;c[s>>2]=(c[s>>2]|0)-v}a[(c[r>>2]|0)+2744+((c[k>>2]|0)+1)>>0]=(c[s>>2]|0)-4;c[k>>2]=(c[k>>2]|0)+1}if((c[(c[r>>2]|0)+2324>>2]|0)==4){v=(Pb(c[o>>2]|0,18288,8)|0)&255;a[(c[r>>2]|0)+2767>>0]=v}else{a[(c[r>>2]|0)+2767>>0]=4}if((a[(c[r>>2]|0)+2765>>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[o>>2]|0;u=Pb(u,18320,8)|0;u=u&255;v=c[r>>2]|0;v=v+2736|0;v=v+34|0;a[v>>0]=u;i=l;return}c[n>>2]=1;if(((c[p>>2]|0)==2?(c[(c[r>>2]|0)+2396>>2]|0)==2:0)?(c[j>>2]=((Pb(c[o>>2]|0,18392,8)|0)&65535)<<16>>16,(c[j>>2]|0)>0):0){c[j>>2]=(c[j>>2]|0)-9;b[(c[r>>2]|0)+2762>>1]=(b[(c[r>>2]|0)+2400>>1]|0)+(c[j>>2]|0);c[n>>2]=0}if((c[n>>2]|0)!=0){u=((Pb(c[o>>2]|0,18360,8)|0)&65535)<<16>>16;u=($(u,c[(c[r>>2]|0)+2316>>2]>>1)|0)&65535;b[(c[r>>2]|0)+2762>>1]=u;u=((Pb(c[o>>2]|0,c[(c[r>>2]|0)+2380>>2]|0,8)|0)&65535)<<16>>16;v=(c[r>>2]|0)+2762|0;b[v>>1]=(b[v>>1]|0)+u}b[(c[r>>2]|0)+2400>>1]=b[(c[r>>2]|0)+2762>>1]|0;v=(Pb(c[o>>2]|0,c[(c[r>>2]|0)+2384>>2]|0,8)|0)&255;a[(c[r>>2]|0)+2764>>0]=v;v=(Pb(c[o>>2]|0,15848,8)|0)&255;a[(c[r>>2]|0)+2768>>0]=v;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[r>>2]|0)+2324>>2]|0)){break}v=(Pb(c[o>>2]|0,c[15912+(a[(c[r>>2]|0)+2768>>0]<<2)>>2]|0,8)|0)&255;a[(c[r>>2]|0)+2740+(c[m>>2]|0)>>0]=v;c[m>>2]=(c[m>>2]|0)+1}if((c[p>>2]|0)==0){v=(Pb(c[o>>2]|0,18264,8)|0)&255;a[(c[r>>2]|0)+2769>>0]=v;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[o>>2]|0;u=Pb(u,18320,8)|0;u=u&255;v=c[r>>2]|0;v=v+2736|0;v=v+34|0;a[v>>0]=u;i=l;return}else{a[(c[r>>2]|0)+2769>>0]=0;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[o>>2]|0;u=Pb(u,18320,8)|0;u=u&255;v=c[r>>2]|0;v=v+2736|0;v=v+34|0;a[v>>0]=u;i=l;return}}function Wd(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;j=i;i=i+96|0;h=j+4|0;m=j+16|0;q=j+12|0;o=j+8|0;l=j+24|0;p=j;g=j+32|0;n=j+64|0;k=j+20|0;c[h>>2]=d;c[m>>2]=e;c[q>>2]=f;$d((c[m>>2]|0)+16|0,(c[h>>2]|0)+2736|0,(c[h>>2]|0)+2312|0,(c[q>>2]|0)==2&1,c[(c[h>>2]|0)+2324>>2]|0);kd(g,(c[h>>2]|0)+2744|0,c[(c[h>>2]|0)+2732>>2]|0);fd((c[m>>2]|0)+64|0,g,c[(c[h>>2]|0)+2340>>2]|0);if((c[(c[h>>2]|0)+2376>>2]|0)==1){a[(c[h>>2]|0)+2767>>0]=4}if((a[(c[h>>2]|0)+2767>>0]|0)<4){c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[(c[h>>2]|0)+2340>>2]|0)){break}q=(b[(c[h>>2]|0)+2344+(c[o>>2]<<1)>>1]|0)+(($(a[(c[h>>2]|0)+2767>>0]|0,(b[g+(c[o>>2]<<1)>>1]|0)-(b[(c[h>>2]|0)+2344+(c[o>>2]<<1)>>1]|0)|0)|0)>>2)&65535;b[n+(c[o>>2]<<1)>>1]=q;c[o>>2]=(c[o>>2]|0)+1}fd((c[m>>2]|0)+32|0,n,c[(c[h>>2]|0)+2340>>2]|0)}else{Ze((c[m>>2]|0)+32|0,(c[m>>2]|0)+64|0,c[(c[h>>2]|0)+2340>>2]<<1|0)|0}Ze((c[h>>2]|0)+2344|0,g|0,c[(c[h>>2]|0)+2340>>2]<<1|0)|0;if((c[(c[h>>2]|0)+4160>>2]|0)!=0){Kd((c[m>>2]|0)+32|0,c[(c[h>>2]|0)+2340>>2]|0,63570);Kd((c[m>>2]|0)+64|0,c[(c[h>>2]|0)+2340>>2]|0,63570)}if((a[(c[h>>2]|0)+2765>>0]|0)!=2){Xe(c[m>>2]|0,0,c[(c[h>>2]|0)+2324>>2]<<2|0)|0;Xe((c[m>>2]|0)+96|0,0,(c[(c[h>>2]|0)+2324>>2]|0)*5<<1|0)|0;a[(c[h>>2]|0)+2768>>0]=0;c[(c[m>>2]|0)+136>>2]=0;i=j;return}Xd(b[(c[h>>2]|0)+2762>>1]|0,a[(c[h>>2]|0)+2764>>0]|0,c[m>>2]|0,c[(c[h>>2]|0)+2316>>2]|0,c[(c[h>>2]|0)+2324>>2]|0);c[k>>2]=c[16208+(a[(c[h>>2]|0)+2768>>0]<<2)>>2];c[l>>2]=0;while(1){if((c[l>>2]|0)>=(c[(c[h>>2]|0)+2324>>2]|0)){break}c[p>>2]=a[(c[h>>2]|0)+2740+(c[l>>2]|0)>>0]|0;c[o>>2]=0;while(1){if((c[o>>2]|0)>=5){break}b[(c[m>>2]|0)+96+(((c[l>>2]|0)*5|0)+(c[o>>2]|0)<<1)>>1]=a[(c[k>>2]|0)+(((c[p>>2]|0)*5|0)+(c[o>>2]|0))>>0]<<7;c[o>>2]=(c[o>>2]|0)+1}c[l>>2]=(c[l>>2]|0)+1}c[p>>2]=a[(c[h>>2]|0)+2769>>0]|0;c[(c[m>>2]|0)+136>>2]=b[18304+(c[p>>2]<<1)>>1]|0;i=j;return}function Xd(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;s=i;i=i+48|0;u=s+36|0;o=s+38|0;j=s+8|0;t=s+20|0;k=s+28|0;m=s+32|0;p=s+12|0;q=s+24|0;r=s+4|0;l=s;n=s+16|0;b[u>>1]=d;a[o>>0]=e;c[j>>2]=f;c[t>>2]=g;c[k>>2]=h;h=(c[k>>2]|0)==4;do{if((c[t>>2]|0)==8){if(h){c[n>>2]=15e3;c[l>>2]=11;break}else{c[n>>2]=14968;c[l>>2]=3;break}}else{if(h){c[n>>2]=15048;c[l>>2]=34;break}else{c[n>>2]=14976;c[l>>2]=12;break}}}while(0);c[q>>2]=(c[t>>2]&65535)<<16>>16<<1;c[r>>2]=((c[t>>2]&65535)<<16>>16)*18;c[m>>2]=(c[q>>2]|0)+(b[u>>1]|0);c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[k>>2]|0)){break}t=$(c[p>>2]|0,c[l>>2]|0)|0;c[(c[j>>2]|0)+(c[p>>2]<<2)>>2]=(c[m>>2]|0)+(a[(c[n>>2]|0)+(t+(a[o>>0]|0))>>0]|0);t=c[(c[j>>2]|0)+(c[p>>2]<<2)>>2]|0;do{if((c[q>>2]|0)>(c[r>>2]|0)){if((t|0)>(c[q>>2]|0)){t=c[q>>2]|0;break}if((c[(c[j>>2]|0)+(c[p>>2]<<2)>>2]|0)<(c[r>>2]|0)){t=c[r>>2]|0;break}else{t=c[(c[j>>2]|0)+(c[p>>2]<<2)>>2]|0;break}}else{if((t|0)>(c[r>>2]|0)){t=c[r>>2]|0;break}if((c[(c[j>>2]|0)+(c[p>>2]<<2)>>2]|0)<(c[q>>2]|0)){t=c[q>>2]|0;break}else{t=c[(c[j>>2]|0)+(c[p>>2]<<2)>>2]|0;break}}}while(0);c[(c[j>>2]|0)+(c[p>>2]<<2)>>2]=t;c[p>>2]=(c[p>>2]|0)+1}i=s;return}function Yd(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;o=i;i=i+224|0;u=o+84|0;q=o+180|0;l=o+200|0;m=o+208|0;k=o+188|0;h=o+196|0;w=o+204|0;t=o+212|0;j=o+216|0;v=o+80|0;r=o+184|0;y=o+88|0;n=o;p=o+96|0;s=o+192|0;x=o+176|0;c[u>>2]=a;c[q>>2]=d;c[l>>2]=e;c[m>>2]=f;c[k>>2]=g;c[y>>2]=Pb(c[u>>2]|0,18680+((c[l>>2]>>1)*9|0)|0,8)|0;c[j>>2]=c[k>>2]>>4;if((c[j>>2]<<4|0)<(c[k>>2]|0)){c[j>>2]=(c[j>>2]|0)+1}c[x>>2]=18496+((c[y>>2]|0)*18|0);c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[j>>2]|0)){break}c[p+(c[h>>2]<<2)>>2]=0;a=Pb(c[u>>2]|0,c[x>>2]|0,8)|0;c[n+(c[h>>2]<<2)>>2]=a;while(1){g=c[h>>2]|0;if((c[n+(c[h>>2]<<2)>>2]|0)!=17){break}a=p+(g<<2)|0;c[a>>2]=(c[a>>2]|0)+1;a=Pb(c[u>>2]|0,((c[p+(c[h>>2]<<2)>>2]|0)==10&1)+18658|0,8)|0;c[n+(c[h>>2]<<2)>>2]=a}c[h>>2]=g+1}c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[j>>2]|0)){break}x=(c[q>>2]|0)+((c[h>>2]&65535)<<16>>16<<4<<1)|0;if((c[n+(c[h>>2]<<2)>>2]|0)>0){me(x,c[u>>2]|0,c[n+(c[h>>2]<<2)>>2]|0)}else{g=x+0|0;x=g+32|0;do{b[g>>1]=0;g=g+2|0}while((g|0)<(x|0))}c[h>>2]=(c[h>>2]|0)+1}c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[j>>2]|0)){break}if((c[p+(c[h>>2]<<2)>>2]|0)>0){c[r>>2]=c[p+(c[h>>2]<<2)>>2];c[s>>2]=(c[q>>2]|0)+((c[h>>2]&65535)<<16>>16<<4<<1);c[t>>2]=0;while(1){if((c[t>>2]|0)>=16){break}c[v>>2]=b[(c[s>>2]|0)+(c[t>>2]<<1)>>1]|0;c[w>>2]=0;while(1){x=c[v>>2]|0;if((c[w>>2]|0)>=(c[r>>2]|0)){break}c[v>>2]=x<<1;a=Pb(c[u>>2]|0,18256,8)|0;c[v>>2]=(c[v>>2]|0)+a;c[w>>2]=(c[w>>2]|0)+1}b[(c[s>>2]|0)+(c[t>>2]<<1)>>1]=x;c[t>>2]=(c[t>>2]|0)+1}a=n+(c[h>>2]<<2)|0;c[a>>2]=c[a>>2]|c[r>>2]<<5}c[h>>2]=(c[h>>2]|0)+1}Md(c[u>>2]|0,c[q>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,n);i=o;return}function Zd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+32|0;g=f+16|0;h=f+12|0;l=f+8|0;j=f+4|0;k=f;c[g>>2]=b;c[h>>2]=d;c[l>>2]=e;c[k>>2]=0;c[(c[g>>2]|0)+2332>>2]=((c[h>>2]&65535)<<16>>16)*5;c[j>>2]=$((c[(c[g>>2]|0)+2324>>2]&65535)<<16>>16,(c[(c[g>>2]|0)+2332>>2]&65535)<<16>>16)|0;if(!((c[(c[g>>2]|0)+2316>>2]|0)==(c[h>>2]|0)?(c[(c[g>>2]|0)+2320>>2]|0)==(c[l>>2]|0):0)){b=de((c[g>>2]|0)+2432|0,((c[h>>2]&65535)<<16>>16)*1e3|0,c[l>>2]|0,0)|0;c[k>>2]=(c[k>>2]|0)+b;c[(c[g>>2]|0)+2320>>2]=c[l>>2]}if((c[(c[g>>2]|0)+2316>>2]|0)==(c[h>>2]|0)?(c[j>>2]|0)==(c[(c[g>>2]|0)+2328>>2]|0):0){b=c[k>>2]|0;i=f;return b|0}l=(c[(c[g>>2]|0)+2324>>2]|0)==4;d=(c[g>>2]|0)+2384|0;do{if((c[h>>2]|0)==8){if(l){c[d>>2]=18456;break}else{c[d>>2]=18488;break}}else{if(l){c[d>>2]=18416;break}else{c[d>>2]=18472;break}}}while(0);if((c[(c[g>>2]|0)+2316>>2]|0)!=(c[h>>2]|0)){c[(c[g>>2]|0)+2336>>2]=((c[h>>2]&65535)<<16>>16)*20;d=(c[g>>2]|0)+2340|0;if((c[h>>2]|0)==8|(c[h>>2]|0)==12){c[d>>2]=10;c[(c[g>>2]|0)+2732>>2]=16960}else{c[d>>2]=16;c[(c[g>>2]|0)+2732>>2]=18048}do{if((c[h>>2]|0)!=16){if((c[h>>2]|0)==12){c[(c[g>>2]|0)+2380>>2]=18336;break}if((c[h>>2]|0)==8){c[(c[g>>2]|0)+2380>>2]=18320}}else{c[(c[g>>2]|0)+2380>>2]=18344}}while(0);c[(c[g>>2]|0)+2376>>2]=1;c[(c[g>>2]|0)+2308>>2]=100;a[(c[g>>2]|0)+2312>>0]=10;c[(c[g>>2]|0)+4164>>2]=0;Xe((c[g>>2]|0)+1348|0,0,960)|0;l=(c[g>>2]|0)+1284|0;d=l+64|0;do{c[l>>2]=0;l=l+4|0}while((l|0)<(d|0))}c[(c[g>>2]|0)+2316>>2]=c[h>>2];c[(c[g>>2]|0)+2328>>2]=c[j>>2];b=c[k>>2]|0;i=f;return b|0}function _d(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function $d(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;q=i;i=i+32|0;p=q+4|0;l=q+16|0;k=q+8|0;n=q+20|0;o=q+28|0;m=q;r=q+12|0;h=q+24|0;c[p>>2]=b;c[l>>2]=d;c[k>>2]=e;c[n>>2]=f;c[o>>2]=g;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[o>>2]|0)){break}if((c[m>>2]|0)==0?(c[n>>2]|0)==0:0){b=(ae(a[(c[l>>2]|0)+(c[m>>2]|0)>>0]|0,(a[c[k>>2]>>0]|0)-16|0)|0)&255;a[c[k>>2]>>0]=b}else{j=6}do{if((j|0)==6){j=0;c[r>>2]=(a[(c[l>>2]|0)+(c[m>>2]|0)>>0]|0)+ -4;c[h>>2]=8+(a[c[k>>2]>>0]|0);g=c[r>>2]|0;if((c[r>>2]|0)>(c[h>>2]|0)){b=c[k>>2]|0;a[b>>0]=(a[b>>0]|0)+((g<<1)-(c[h>>2]|0));break}else{b=c[k>>2]|0;a[b>>0]=(a[b>>0]|0)+g;break}}}while(0);if((a[c[k>>2]>>0]|0)<=63){if((a[c[k>>2]>>0]|0)<0){g=0}else{g=a[c[k>>2]>>0]|0}}else{g=63}a[c[k>>2]>>0]=g;b=ce(_d(((a[c[k>>2]>>0]<<16>>16)*29|0)+((a[c[k>>2]>>0]<<16>>16)*7281>>16)+2090|0,3967)|0)|0;c[(c[p>>2]|0)+(c[m>>2]<<2)>>2]=b;c[m>>2]=(c[m>>2]|0)+1}i=q;return}function ae(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function be(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;Xe(c[d>>2]|0,0,4260)|0;c[(c[d>>2]|0)+2376>>2]=1;c[c[d>>2]>>2]=65536;Vc(c[d>>2]|0);ud(c[d>>2]|0);i=b;return 0}function ce(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[e>>2]=a;if((c[e>>2]|0)<0){c[d>>2]=0;h=c[d>>2]|0;i=b;return h|0}if((c[e>>2]|0)>=3967){c[d>>2]=2147483647;h=c[d>>2]|0;i=b;return h|0}c[f>>2]=1<<(c[e>>2]>>7);c[g>>2]=c[e>>2]&127;h=c[f>>2]|0;a=c[f>>2]|0;if((c[e>>2]|0)<2048){e=$(($((c[g>>2]&65535)<<16>>16,(128-(c[g>>2]|0)&65535)<<16>>16)|0)>>16,-174)|0;c[f>>2]=h+(($(a,(c[g>>2]|0)+(e+(($(($((c[g>>2]&65535)<<16>>16,(128-(c[g>>2]|0)&65535)<<16>>16)|0)&65535,-174)|0)>>16))|0)|0)>>7)}else{e=$(($((c[g>>2]&65535)<<16>>16,(128-(c[g>>2]|0)&65535)<<16>>16)|0)>>16,-174)|0;c[f>>2]=h+($(a>>7,(c[g>>2]|0)+(e+(($(($((c[g>>2]&65535)<<16>>16,(128-(c[g>>2]|0)&65535)<<16>>16)|0)&65535,-174)|0)>>16))|0)|0)}c[d>>2]=c[f>>2];h=c[d>>2]|0;i=b;return h|0}function de(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;l=i;i=i+32|0;k=l+20|0;j=l+16|0;m=l+12|0;h=l+8|0;n=l+4|0;g=l;c[j>>2]=b;c[m>>2]=d;c[h>>2]=e;c[n>>2]=f;Xe(c[j>>2]|0,0,300)|0;e=(c[m>>2]|0)!=8e3&(c[m>>2]|0)!=12e3&(c[m>>2]|0)!=16e3;do{if((c[n>>2]|0)!=0){if(!(e&(c[m>>2]|0)!=24e3&(c[m>>2]|0)!=48e3)?!((c[h>>2]|0)!=8e3&(c[h>>2]|0)!=12e3&(c[h>>2]|0)!=16e3):0){c[(c[j>>2]|0)+292>>2]=a[15184+((((c[m>>2]>>12)-((c[m>>2]|0)>16e3&1)>>((c[m>>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[k>>2]=-1;n=c[k>>2]|0;i=l;return n|0}else{if(!e?!((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){c[(c[j>>2]|0)+292>>2]=a[15200+((((c[m>>2]>>12)-((c[m>>2]|0)>16e3&1)>>((c[m>>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[k>>2]=-1;n=c[k>>2]|0;i=l;return n|0}}while(0);c[(c[j>>2]|0)+284>>2]=(c[m>>2]|0)/1e3|0;c[(c[j>>2]|0)+288>>2]=(c[h>>2]|0)/1e3|0;c[(c[j>>2]|0)+268>>2]=(c[(c[j>>2]|0)+284>>2]|0)*10;c[g>>2]=0;f=c[h>>2]|0;e=c[m>>2]|0;do{if((c[h>>2]|0)>(c[m>>2]|0)){d=(c[j>>2]|0)+264|0;if((f|0)==(e<<1|0)){c[d>>2]=1;break}else{c[d>>2]=2;c[g>>2]=1;break}}else{d=(c[j>>2]|0)+264|0;if((f|0)>=(e|0)){c[d>>2]=0;break}c[d>>2]=3;if((c[h>>2]<<2|0)==((c[m>>2]|0)*3|0)){c[(c[j>>2]|0)+280>>2]=3;c[(c[j>>2]|0)+276>>2]=18;c[(c[j>>2]|0)+296>>2]=15232;break}if(((c[h>>2]|0)*3|0)==(c[m>>2]<<1|0)){c[(c[j>>2]|0)+280>>2]=2;c[(c[j>>2]|0)+276>>2]=18;c[(c[j>>2]|0)+296>>2]=15296;break}if((c[h>>2]<<1|0)==(c[m>>2]|0)){c[(c[j>>2]|0)+280>>2]=1;c[(c[j>>2]|0)+276>>2]=24;c[(c[j>>2]|0)+296>>2]=15336;break}if(((c[h>>2]|0)*3|0)==(c[m>>2]|0)){c[(c[j>>2]|0)+280>>2]=1;c[(c[j>>2]|0)+276>>2]=36;c[(c[j>>2]|0)+296>>2]=15368;break}if((c[h>>2]<<2|0)==(c[m>>2]|0)){c[(c[j>>2]|0)+280>>2]=1;c[(c[j>>2]|0)+276>>2]=36;c[(c[j>>2]|0)+296>>2]=15408;break}if(((c[h>>2]|0)*6|0)==(c[m>>2]|0)){c[(c[j>>2]|0)+280>>2]=1;c[(c[j>>2]|0)+276>>2]=36;c[(c[j>>2]|0)+296>>2]=15448;break}c[k>>2]=-1;n=c[k>>2]|0;i=l;return n|0}}while(0);c[(c[j>>2]|0)+272>>2]=((c[m>>2]<<14+(c[g>>2]|0)|0)/(c[h>>2]|0)|0)<<2;while(1){n=$(c[(c[j>>2]|0)+272>>2]>>16,(c[h>>2]&65535)<<16>>16)|0;n=n+(($(c[(c[j>>2]|0)+272>>2]&65535,(c[h>>2]&65535)<<16>>16)|0)>>16)|0;n=n+($(c[(c[j>>2]|0)+272>>2]|0,(c[h>>2]>>15)+1>>1)|0)|0;if((n|0)>=(c[m>>2]<>2]|0)){break}n=(c[j>>2]|0)+272|0;c[n>>2]=(c[n>>2]|0)+1}c[k>>2]=0;n=c[k>>2]|0;i=l;return n|0}function ee(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;k=i;i=i+32|0;g=k+16|0;l=k+12|0;j=k+8|0;h=k+4|0;f=k;c[g>>2]=a;c[l>>2]=b;c[j>>2]=d;c[h>>2]=e;c[f>>2]=(c[(c[g>>2]|0)+284>>2]|0)-(c[(c[g>>2]|0)+292>>2]|0);Ze((c[g>>2]|0)+168+(c[(c[g>>2]|0)+292>>2]<<1)|0,c[j>>2]|0,c[f>>2]<<1|0)|0;e=c[(c[g>>2]|0)+264>>2]|0;if((e|0)==2){ge(c[g>>2]|0,c[l>>2]|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2]=(c[j>>2]|0)+($(b[(c[g>>2]|0)+4>>1]|0,b[15492+(c[l>>2]<<3)>>1]|0)|0);c[j>>2]=(c[j>>2]|0)+($(b[(c[g>>2]|0)+6>>1]|0,b[15494+(c[l>>2]<<3)>>1]|0)|0);c[j>>2]=(c[j>>2]|0)+($(b[(c[g>>2]|0)+8>>1]|0,b[15494+(11-(c[l>>2]|0)<<3)>>1]|0)|0);c[j>>2]=(c[j>>2]|0)+($(b[(c[g>>2]|0)+10>>1]|0,b[15492+(11-(c[l>>2]|0)<<3)>>1]|0)|0);c[j>>2]=(c[j>>2]|0)+($(b[(c[g>>2]|0)+12>>1]|0,b[15490+(11-(c[l>>2]|0)<<3)>>1]|0)|0);c[j>>2]=(c[j>>2]|0)+($(b[(c[g>>2]|0)+14>>1]|0,b[15488+(11-(c[l>>2]|0)<<3)>>1]|0)|0);if(((c[j>>2]>>14)+1>>1|0)<=32767){if(((c[j>>2]>>14)+1>>1|0)<-32768){f=-32768}else{f=(c[j>>2]>>14)+1>>1}}else{f=32767}a=c[h>>2]|0;c[h>>2]=a+2;b[a>>1]=f;c[k>>2]=(c[k>>2]|0)+(c[p>>2]|0)}i=n;return c[h>>2]|0}function ie(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;j=i;i=i+48|0;q=j;m=j+16|0;k=j+28|0;p=j+4|0;n=j+32|0;g=j+36|0;l=j+12|0;o=j+24|0;f=j+20|0;h=j+8|0;c[q>>2]=a;c[m>>2]=b;c[k>>2]=d;c[p>>2]=e;c[n>>2]=c[q>>2];a=(c[(c[n>>2]|0)+268>>2]|0)+(c[(c[n>>2]|0)+276>>2]|0)|0;c[h>>2]=ia()|0;e=i;i=i+((4*a|0)+15&-16)|0;Ze(e|0,(c[n>>2]|0)+24|0,c[(c[n>>2]|0)+276>>2]<<2|0)|0;c[f>>2]=(c[(c[n>>2]|0)+296>>2]|0)+4;c[o>>2]=c[(c[n>>2]|0)+272>>2];while(1){if((c[p>>2]|0)<(c[(c[n>>2]|0)+268>>2]|0)){d=c[p>>2]|0}else{d=c[(c[n>>2]|0)+268>>2]|0}c[g>>2]=d;fe(c[n>>2]|0,e+(c[(c[n>>2]|0)+276>>2]<<2)|0,c[k>>2]|0,c[(c[n>>2]|0)+296>>2]|0,c[g>>2]|0);c[l>>2]=c[g>>2]<<16;c[m>>2]=je(c[m>>2]|0,e,c[f>>2]|0,c[(c[n>>2]|0)+276>>2]|0,c[(c[n>>2]|0)+280>>2]|0,c[l>>2]|0,c[o>>2]|0)|0;c[k>>2]=(c[k>>2]|0)+(c[g>>2]<<1);c[p>>2]=(c[p>>2]|0)-(c[g>>2]|0);if((c[p>>2]|0)<=1){break}Ze(e|0,e+(c[g>>2]<<2)|0,c[(c[n>>2]|0)+276>>2]<<2|0)|0}Ze((c[n>>2]|0)+24|0,e+(c[g>>2]<<2)|0,c[(c[n>>2]|0)+276>>2]<<2|0)|0;na(c[h>>2]|0);i=j;return}function je(a,d,e,f,g,h,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;q=i;i=i+48|0;r=q+4|0;n=q+16|0;s=q+36|0;w=q;v=q+32|0;k=q+40|0;l=q+44|0;o=q+24|0;m=q+20|0;p=q+8|0;u=q+12|0;t=q+28|0;c[r>>2]=a;c[n>>2]=d;c[s>>2]=e;c[w>>2]=f;c[v>>2]=g;c[k>>2]=h;c[l>>2]=j;j=c[w>>2]|0;if((j|0)==18){c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[k>>2]|0)){break}c[p>>2]=(c[n>>2]|0)+(c[o>>2]>>16<<2);w=$((c[o>>2]&65535)>>16,(c[v>>2]&65535)<<16>>16)|0;c[u>>2]=w+(($(c[o>>2]&65535,(c[v>>2]&65535)<<16>>16)|0)>>16);c[t>>2]=(c[s>>2]|0)+((c[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c[(c[p>>2]|0)+44>>2]&65535,b[(c[t>>2]|0)+12>>1]|0)|0)>>16));w=$(c[(c[p>>2]|0)+40>>2]>>16,b[(c[t>>2]|0)+14>>1]|0)|0;c[m>>2]=(c[m>>2]|0)+(w+(($(c[(c[p>>2]|0)+40>>2]&65535,b[(c[t>>2]|0)+14>>1]|0)|0)>>16));w=$(c[(c[p>>2]|0)+36>>2]>>16,b[(c[t>>2]|0)+16>>1]|0)|0;c[m>>2]=(c[m>>2]|0)+(w+(($(c[(c[p>>2]|0)+36>>2]&65535,b[(c[t>>2]|0)+16>>1]|0)|0)>>16));if(((c[m>>2]>>5)+1>>1|0)<=32767){if(((c[m>>2]>>5)+1>>1|0)<-32768){j=-32768}else{j=(c[m>>2]>>5)+1>>1}}else{j=32767}w=c[r>>2]|0;c[r>>2]=w+2;b[w>>1]=j;c[o>>2]=(c[o>>2]|0)+(c[l>>2]|0)}w=c[r>>2]|0;i=q;return w|0}else if((j|0)==24){c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[k>>2]|0)){break}c[p>>2]=(c[n>>2]|0)+(c[o>>2]>>16<<2);w=$((c[c[p>>2]>>2]|0)+(c[(c[p>>2]|0)+92>>2]|0)>>16,b[c[s>>2]>>1]|0)|0;c[m>>2]=w+(($((c[c[p>>2]>>2]|0)+(c[(c[p>>2]|0)+92>>2]|0)&65535,b[c[s>>2]>>1]|0)|0)>>16);w=$((c[(c[p>>2]|0)+4>>2]|0)+(c[(c[p>>2]|0)+88>>2]|0)>>16,b[(c[s>>2]|0)+2>>1]|0)|0;c[m>>2]=(c[m>>2]|0)+(w+(($((c[(c[p>>2]|0)+4>>2]|0)+(c[(c[p>>2]|0)+88>>2]|0)&65535,b[(c[s>>2]|0)+2>>1]|0)|0)>>16));w=$((c[(c[p>>2]|0)+8>>2]|0)+(c[(c[p>>2]|0)+84>>2]|0)>>16,b[(c[s>>2]|0)+4>>1]|0)|0;c[m>>2]=(c[m>>2]|0)+(w+(($((c[(c[p>>2]|0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]|0)+60>>2]|0)>>16,b[(c[s>>2]|0)+16>>1]|0)|0;c[m>>2]=(c[m>>2]|0)+(w+(($((c[(c[p>>2]|0)+32>>2]|0)+(c[(c[p>>2]|0)+60>>2]|0)&65535,b[(c[s>>2]|0)+16>>1]|0)|0)>>16));w=$((c[(c[p>>2]|0)+36>>2]|0)+(c[(c[p>>2]|0)+56>>2]|0)>>16,b[(c[s>>2]|0)+18>>1]|0)|0;c[m>>2]=(c[m>>2]|0)+(w+(($((c[(c[p>>2]|0)+36>>2]|0)+(c[(c[p>>2]|0)+56>>2]|0)&65535,b[(c[s>>2]|0)+18>>1]|0)|0)>>16));w=$((c[(c[p>>2]|0)+40>>2]|0)+(c[(c[p>>2]|0)+52>>2]|0)>>16,b[(c[s>>2]|0)+20>>1]|0)|0;c[m>>2]=(c[m>>2]|0)+(w+(($((c[(c[p>>2]|0)+40>>2]|0)+(c[(c[p>>2]|0)+52>>2]|0)&65535,b[(c[s>>2]|0)+20>>1]|0)|0)>>16));w=$((c[(c[p>>2]|0)+44>>2]|0)+(c[(c[p>>2]|0)+48>>2]|0)>>16,b[(c[s>>2]|0)+22>>1]|0)|0;c[m>>2]=(c[m>>2]|0)+(w+(($((c[(c[p>>2]|0)+44>>2]|0)+(c[(c[p>>2]|0)+48>>2]|0)&65535,b[(c[s>>2]|0)+22>>1]|0)|0)>>16));if(((c[m>>2]>>5)+1>>1|0)<=32767){if(((c[m>>2]>>5)+1>>1|0)<-32768){t=-32768}else{t=(c[m>>2]>>5)+1>>1}}else{t=32767}w=c[r>>2]|0;c[r>>2]=w+2;b[w>>1]=t;c[o>>2]=(c[o>>2]|0)+(c[l>>2]|0)}w=c[r>>2]|0;i=q;return w|0}else if((j|0)==36){c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[k>>2]|0)){break}c[p>>2]=(c[n>>2]|0)+(c[o>>2]>>16<<2);w=$((c[c[p>>2]>>2]|0)+(c[(c[p>>2]|0)+140>>2]|0)>>16,b[c[s>>2]>>1]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72>>2]|0)>>16,b[(c[s>>2]|0)+34>>1]|0)|0;c[m>>2]=(c[m>>2]|0)+(w+(($((c[(c[p>>2]|0)+68>>2]|0)+(c[(c[p>>2]|0)+72>>2]|0)&65535,b[(c[s>>2]|0)+34>>1]|0)|0)>>16));if(((c[m>>2]>>5)+1>>1|0)<=32767){if(((c[m>>2]>>5)+1>>1|0)<-32768){t=-32768}else{t=(c[m>>2]>>5)+1>>1}}else{t=32767}w=c[r>>2]|0;c[r>>2]=w+2;b[w>>1]=t;c[o>>2]=(c[o>>2]|0)+(c[l>>2]|0)}w=c[r>>2]|0;i=q;return w|0}else{w=c[r>>2]|0;i=q;return w|0}return 0}function ke(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;o=i;i=i+48|0;l=o;m=o+16|0;q=o+28|0;r=o+4|0;j=o+32|0;k=o+36|0;h=o+12|0;p=o+24|0;g=o+20|0;n=o+8|0;c[l>>2]=a;c[m>>2]=d;c[q>>2]=e;c[r>>2]=f;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[r>>2]|0)){break}c[k>>2]=b[(c[q>>2]|0)+(c[j>>2]<<1)>>1]<<10;c[g>>2]=(c[k>>2]|0)-(c[c[l>>2]>>2]|0);a=$(c[g>>2]>>16,b[7608]|0)|0;c[n>>2]=a+(($(c[g>>2]&65535,b[7608]|0)|0)>>16);c[h>>2]=(c[c[l>>2]>>2]|0)+(c[n>>2]|0);c[c[l>>2]>>2]=(c[k>>2]|0)+(c[n>>2]|0);c[g>>2]=(c[h>>2]|0)-(c[(c[l>>2]|0)+4>>2]|0);a=$(c[g>>2]>>16,b[15218>>1]|0)|0;c[n>>2]=a+(($(c[g>>2]&65535,b[15218>>1]|0)|0)>>16);c[p>>2]=(c[(c[l>>2]|0)+4>>2]|0)+(c[n>>2]|0);c[(c[l>>2]|0)+4>>2]=(c[h>>2]|0)+(c[n>>2]|0);c[g>>2]=(c[p>>2]|0)-(c[(c[l>>2]|0)+8>>2]|0);a=$(c[g>>2]>>16,b[15220>>1]|0)|0;c[n>>2]=(c[g>>2]|0)+(a+(($(c[g>>2]&65535,b[15220>>1]|0)|0)>>16));c[h>>2]=(c[(c[l>>2]|0)+8>>2]|0)+(c[n>>2]|0);c[(c[l>>2]|0)+8>>2]=(c[p>>2]|0)+(c[n>>2]|0);if(((c[h>>2]>>9)+1>>1|0)<=32767){if(((c[h>>2]>>9)+1>>1|0)<-32768){f=-32768}else{f=(c[h>>2]>>9)+1>>1}}else{f=32767}b[(c[m>>2]|0)+(c[j>>2]<<1<<1)>>1]=f;c[g>>2]=(c[k>>2]|0)-(c[(c[l>>2]|0)+12>>2]|0);a=$(c[g>>2]>>16,b[7612]|0)|0;c[n>>2]=a+(($(c[g>>2]&65535,b[7612]|0)|0)>>16);c[h>>2]=(c[(c[l>>2]|0)+12>>2]|0)+(c[n>>2]|0);c[(c[l>>2]|0)+12>>2]=(c[k>>2]|0)+(c[n>>2]|0);c[g>>2]=(c[h>>2]|0)-(c[(c[l>>2]|0)+16>>2]|0);a=$(c[g>>2]>>16,b[15226>>1]|0)|0;c[n>>2]=a+(($(c[g>>2]&65535,b[15226>>1]|0)|0)>>16);c[p>>2]=(c[(c[l>>2]|0)+16>>2]|0)+(c[n>>2]|0);c[(c[l>>2]|0)+16>>2]=(c[h>>2]|0)+(c[n>>2]|0);c[g>>2]=(c[p>>2]|0)-(c[(c[l>>2]|0)+20>>2]|0);a=$(c[g>>2]>>16,b[15228>>1]|0)|0;c[n>>2]=(c[g>>2]|0)+(a+(($(c[g>>2]&65535,b[15228>>1]|0)|0)>>16));c[h>>2]=(c[(c[l>>2]|0)+20>>2]|0)+(c[n>>2]|0);c[(c[l>>2]|0)+20>>2]=(c[p>>2]|0)+(c[n>>2]|0);if(((c[h>>2]>>9)+1>>1|0)<=32767){if(((c[h>>2]>>9)+1>>1|0)<-32768){f=-32768}else{f=(c[h>>2]>>9)+1>>1}}else{f=32767}b[(c[m>>2]|0)+((c[j>>2]<<1)+1<<1)>>1]=f;c[j>>2]=(c[j>>2]|0)+1}i=o;return}function le(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+32|0;l=f+16|0;j=f+12|0;h=f+8|0;g=f+4|0;k=f;c[l>>2]=a;c[j>>2]=b;c[h>>2]=d;c[g>>2]=e;c[k>>2]=c[l>>2];ke(c[k>>2]|0,c[j>>2]|0,c[h>>2]|0,c[g>>2]|0);i=f;return}function me(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+48|0;j=f+8|0;h=f+4|0;m=f;l=f+40|0;k=f+32|0;g=f+16|0;c[j>>2]=a;c[h>>2]=d;c[m>>2]=e;ne(l,l+2|0,c[h>>2]|0,c[m>>2]|0,19160);ne(k,k+2|0,c[h>>2]|0,b[l>>1]|0,19008);ne(g,g+2|0,c[h>>2]|0,b[k>>1]|0,18856);ne(c[j>>2]|0,(c[j>>2]|0)+2|0,c[h>>2]|0,b[g>>1]|0,18704);ne((c[j>>2]|0)+4|0,(c[j>>2]|0)+6|0,c[h>>2]|0,b[g+2>>1]|0,18704);ne(g+4|0,g+6|0,c[h>>2]|0,b[k+2>>1]|0,18856);ne((c[j>>2]|0)+8|0,(c[j>>2]|0)+10|0,c[h>>2]|0,b[g+4>>1]|0,18704);ne((c[j>>2]|0)+12|0,(c[j>>2]|0)+14|0,c[h>>2]|0,b[g+6>>1]|0,18704);ne(k+4|0,k+6|0,c[h>>2]|0,b[l+2>>1]|0,19008);ne(g+8|0,g+10|0,c[h>>2]|0,b[k+4>>1]|0,18856);ne((c[j>>2]|0)+16|0,(c[j>>2]|0)+18|0,c[h>>2]|0,b[g+8>>1]|0,18704);ne((c[j>>2]|0)+20|0,(c[j>>2]|0)+22|0,c[h>>2]|0,b[g+10>>1]|0,18704);ne(g+12|0,g+14|0,c[h>>2]|0,b[k+6>>1]|0,18856);ne((c[j>>2]|0)+24|0,(c[j>>2]|0)+26|0,c[h>>2]|0,b[g+12>>1]|0,18704);ne((c[j>>2]|0)+28|0,(c[j>>2]|0)+30|0,c[h>>2]|0,b[g+14>>1]|0,18704);i=f;return}function ne(a,e,f,g,h){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0;n=i;i=i+32|0;l=n+16|0;k=n+12|0;o=n+8|0;m=n+4|0;j=n;c[l>>2]=a;c[k>>2]=e;c[o>>2]=f;c[m>>2]=g;c[j>>2]=h;if((c[m>>2]|0)>0){a=(Pb(c[o>>2]|0,(c[j>>2]|0)+(d[19312+(c[m>>2]|0)>>0]|0)|0,8)|0)&65535;b[c[l>>2]>>1]=a;b[c[k>>2]>>1]=(c[m>>2]|0)-(b[c[l>>2]>>1]|0);i=n;return}else{b[c[l>>2]>>1]=0;b[c[k>>2]>>1]=0;i=n;return}}function oe(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e+16|0;k=e+12|0;h=e+8|0;g=e+4|0;j=e;c[f>>2]=a;c[k>>2]=d;c[g>>2]=1;while(1){if((c[g>>2]|0)>=(c[k>>2]|0)){break}c[h>>2]=b[(c[f>>2]|0)+(c[g>>2]<<1)>>1]|0;c[j>>2]=(c[g>>2]|0)-1;while(1){if((c[j>>2]|0)<0){break}if((c[h>>2]|0)>=(b[(c[f>>2]|0)+(c[j>>2]<<1)>>1]|0)){break}b[(c[f>>2]|0)+((c[j>>2]|0)+1<<1)>>1]=b[(c[f>>2]|0)+(c[j>>2]<<1)>>1]|0;c[j>>2]=(c[j>>2]|0)+ -1}b[(c[f>>2]|0)+((c[j>>2]|0)+1<<1)>>1]=c[h>>2];c[g>>2]=(c[g>>2]|0)+1}i=e;return}function pe(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 j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0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|0)+1<<1)>>1]<<1)<<9;x=$(c[m>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;c[m>>2]=(b[(c[l>>2]|0)+((c[o>>2]|0)+1<<1)>>1]<<8)+(x+(($(c[m>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16));x=$(b[(c[p>>2]|0)+((c[o>>2]|0)+1<<1)>>1]<<11>>16,(c[s>>2]&65535)<<16>>16)|0;c[m>>2]=(c[m>>2]|0)+(x+(($(b[(c[p>>2]|0)+((c[o>>2]|0)+1<<1)>>1]<<11&65535,(c[s>>2]&65535)<<16>>16)|0)>>16));if(((c[m>>2]>>7)+1>>1|0)<=32767){if(((c[m>>2]>>7)+1>>1|0)<-32768){h=-32768}else{h=(c[m>>2]>>7)+1>>1}}else{h=32767}b[(c[l>>2]|0)+((c[o>>2]|0)+1<<1)>>1]=h;c[o>>2]=(c[o>>2]|0)+1}c[r>>2]=c[c[t>>2]>>2];c[s>>2]=c[(c[t>>2]|0)+4>>2];c[o>>2]=c[u>>2]<<3;while(1){if((c[o>>2]|0)>=(c[j>>2]|0)){break}c[m>>2]=(b[(c[p>>2]|0)+(c[o>>2]<<1)>>1]|0)+(b[(c[p>>2]|0)+((c[o>>2]|0)+2<<1)>>1]|0)+(b[(c[p>>2]|0)+((c[o>>2]|0)+1<<1)>>1]<<1)<<9;x=$(c[m>>2]>>16,(c[r>>2]&65535)<<16>>16)|0;c[m>>2]=(b[(c[l>>2]|0)+((c[o>>2]|0)+1<<1)>>1]<<8)+(x+(($(c[m>>2]&65535,(c[r>>2]&65535)<<16>>16)|0)>>16));x=$(b[(c[p>>2]|0)+((c[o>>2]|0)+1<<1)>>1]<<11>>16,(c[s>>2]&65535)<<16>>16)|0;c[m>>2]=(c[m>>2]|0)+(x+(($(b[(c[p>>2]|0)+((c[o>>2]|0)+1<<1)>>1]<<11&65535,(c[s>>2]&65535)<<16>>16)|0)>>16));if(((c[m>>2]>>7)+1>>1|0)<=32767){if(((c[m>>2]>>7)+1>>1|0)<-32768){u=-32768}else{u=(c[m>>2]>>7)+1>>1}}else{u=32767}b[(c[l>>2]|0)+((c[o>>2]|0)+1<<1)>>1]=u;c[o>>2]=(c[o>>2]|0)+1}b[c[q>>2]>>1]=c[c[t>>2]>>2];b[(c[q>>2]|0)+2>>1]=c[(c[t>>2]|0)+4>>2];c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[j>>2]|0)){break}c[m>>2]=(b[(c[p>>2]|0)+((c[o>>2]|0)+1<<1)>>1]|0)+(b[(c[l>>2]|0)+((c[o>>2]|0)+1<<1)>>1]|0);c[n>>2]=(b[(c[p>>2]|0)+((c[o>>2]|0)+1<<1)>>1]|0)-(b[(c[l>>2]|0)+((c[o>>2]|0)+1<<1)>>1]|0);if((c[m>>2]|0)>32767){q=32767}else{q=(c[m>>2]|0)<-32768?-32768:c[m>>2]|0}b[(c[p>>2]|0)+((c[o>>2]|0)+1<<1)>>1]=q;if((c[n>>2]|0)>32767){q=32767}else{q=(c[n>>2]|0)<-32768?-32768:c[n>>2]|0}b[(c[l>>2]|0)+((c[o>>2]|0)+1<<1)>>1]=q;c[o>>2]=(c[o>>2]|0)+1}i=k;return}function qe(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+48|0;l=f+40|0;e=f+36|0;g=f+32|0;h=f+8|0;j=f+4|0;k=f;c[l>>2]=a;c[e>>2]=d;c[g>>2]=Pb(c[l>>2]|0,18192,8)|0;c[h+8>>2]=(c[g>>2]|0)/5|0;c[h+20>>2]=(c[g>>2]|0)-((c[h+8>>2]|0)*5|0);c[g>>2]=0;while(1){if((c[g>>2]|0)>=2){break}a=Pb(c[l>>2]|0,18312,8)|0;c[h+((c[g>>2]|0)*12|0)>>2]=a;a=Pb(c[l>>2]|0,18328,8)|0;c[h+((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}a=h+((c[g>>2]|0)*12|0)|0;c[a>>2]=(c[a>>2]|0)+((c[h+((c[g>>2]|0)*12|0)+8>>2]|0)*3|0);c[j>>2]=b[18160+(c[h+((c[g>>2]|0)*12|0)>>2]<<1)>>1]|0;c[k>>2]=(((b[18160+((c[h+((c[g>>2]|0)*12|0)>>2]|0)+1<<1)>>1]|0)-(c[j>>2]|0)>>16)*6554|0)+(((b[18160+((c[h+((c[g>>2]|0)*12|0)>>2]|0)+1<<1)>>1]|0)-(c[j>>2]|0)&65535)*6554>>16);a=(c[j>>2]|0)+($((c[k>>2]&65535)<<16>>16,((c[h+((c[g>>2]|0)*12|0)+4>>2]<<1)+1&65535)<<16>>16)|0)|0;c[(c[e>>2]|0)+(c[g>>2]<<2)>>2]=a;c[g>>2]=(c[g>>2]|0)+1}a=c[e>>2]|0;c[a>>2]=(c[a>>2]|0)-(c[(c[e>>2]|0)+4>>2]|0);i=f;return}function re(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;a=Pb(c[f>>2]|0,18224,8)|0;c[c[e>>2]>>2]=a;i=d;return}function se(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;l=i;i=i+32|0;k=l+4|0;h=l+16|0;m=l+8|0;p=l+20|0;g=l+28|0;n=l;o=l+12|0;j=l+24|0;c[k>>2]=a;c[h>>2]=d;c[m>>2]=e;c[p>>2]=f;c[j>>2]=0;c[n>>2]=0;c[p>>2]=(c[p>>2]|0)+ -1;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[p>>2]|0)){break}c[j>>2]=(c[j>>2]|0)+($(b[(c[m>>2]|0)+(c[g>>2]<<1)>>1]|0,b[(c[m>>2]|0)+(c[g>>2]<<1)>>1]|0)|0);c[j>>2]=(c[j>>2]|0)+($(b[(c[m>>2]|0)+((c[g>>2]|0)+1<<1)>>1]|0,b[(c[m>>2]|0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e|0}j=d[c[j>>2]>>0]|0;if((b&96|0)!=96){c[f>>2]=j>>3&3;h=c[h>>2]|0;if((c[f>>2]|0)==3){c[f>>2]=(h*60|0)/1e3|0;e=c[f>>2]|0;i=g;return e|0}else{c[f>>2]=(h<>2]|0)/100|0;e=c[f>>2]|0;i=g;return e|0}}else{h=c[h>>2]|0;if((j&8|0)!=0){h=(h|0)/50|0}else{h=(h|0)/100|0}c[f>>2]=h;e=c[f>>2]|0;i=g;return e|0}return 0}function ue(e,f,g,h,j,k,l,m){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;D=i;i=i+80|0;p=D+36|0;r=D+24|0;B=D+44|0;E=D+60|0;n=D+12|0;s=D+16|0;v=D+48|0;x=D+56|0;q=D+64|0;t=D+68|0;y=D+72|0;u=D+8|0;C=D;G=D+76|0;F=D+77|0;J=D+20|0;z=D+52|0;A=D+28|0;w=D+32|0;H=D+40|0;I=D+4|0;c[r>>2]=e;c[B>>2]=f;c[E>>2]=g;c[n>>2]=h;c[s>>2]=j;c[v>>2]=k;c[x>>2]=l;c[q>>2]=m;c[A>>2]=0;c[w>>2]=c[r>>2];if((c[v>>2]|0)==0){c[p>>2]=-1;e=c[p>>2]|0;i=D;return e|0}c[J>>2]=te(c[r>>2]|0,48e3)|0;c[C>>2]=0;m=c[r>>2]|0;c[r>>2]=m+1;a[F>>0]=a[m>>0]|0;c[B>>2]=(c[B>>2]|0)+ -1;c[z>>2]=c[B>>2];m=a[F>>0]&3;a:do{if((m|0)==1){c[u>>2]=2;c[C>>2]=1;if((c[E>>2]|0)==0){if((c[B>>2]&1|0)==0){c[z>>2]=(c[B>>2]|0)/2|0;b[c[v>>2]>>1]=c[z>>2];break}c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}}else if((m|0)==2){c[u>>2]=2;c[y>>2]=ve(c[r>>2]|0,c[B>>2]|0,c[v>>2]|0)|0;c[B>>2]=(c[B>>2]|0)-(c[y>>2]|0);if((b[c[v>>2]>>1]|0)>=0?(b[c[v>>2]>>1]|0)<=(c[B>>2]|0):0){c[r>>2]=(c[r>>2]|0)+(c[y>>2]|0);c[z>>2]=(c[B>>2]|0)-(b[c[v>>2]>>1]|0);break}c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}else if((m|0)==0){c[u>>2]=1}else{if((c[B>>2]|0)<1){c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}e=c[r>>2]|0;c[r>>2]=e+1;a[G>>0]=a[e>>0]|0;c[u>>2]=a[G>>0]&63;if((c[u>>2]|0)>0?($(c[J>>2]|0,c[u>>2]|0)|0)<=5760:0){c[B>>2]=(c[B>>2]|0)+ -1;b:do{if((a[G>>0]&64|0)!=0){while(1){if((c[B>>2]|0)<=0){break}e=c[r>>2]|0;c[r>>2]=e+1;c[H>>2]=d[e>>0]|0;c[B>>2]=(c[B>>2]|0)+ -1;c[I>>2]=(c[H>>2]|0)==255?254:c[H>>2]|0;c[B>>2]=(c[B>>2]|0)-(c[I>>2]|0);c[A>>2]=(c[A>>2]|0)+(c[I>>2]|0);if((c[H>>2]|0)!=255){break b}}c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}}while(0);if((c[B>>2]|0)<0){c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}c[C>>2]=((a[G>>0]&128|0)!=0^1)&1;if((c[C>>2]|0)!=0){if((c[E>>2]|0)!=0){break}c[z>>2]=(c[B>>2]|0)/(c[u>>2]|0)|0;e=$(c[z>>2]|0,c[u>>2]|0)|0;if((e|0)!=(c[B>>2]|0)){c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}c[t>>2]=0;while(1){if((c[t>>2]|0)>=((c[u>>2]|0)-1|0)){break a}b[(c[v>>2]|0)+(c[t>>2]<<1)>>1]=c[z>>2];c[t>>2]=(c[t>>2]|0)+1}}c[z>>2]=c[B>>2];c[t>>2]=0;while(1){if((c[t>>2]|0)>=((c[u>>2]|0)-1|0)){break}c[y>>2]=ve(c[r>>2]|0,c[B>>2]|0,(c[v>>2]|0)+(c[t>>2]<<1)|0)|0;c[B>>2]=(c[B>>2]|0)-(c[y>>2]|0);if((b[(c[v>>2]|0)+(c[t>>2]<<1)>>1]|0)<0){o=29;break}if((b[(c[v>>2]|0)+(c[t>>2]<<1)>>1]|0)>(c[B>>2]|0)){o=29;break}c[r>>2]=(c[r>>2]|0)+(c[y>>2]|0);c[z>>2]=(c[z>>2]|0)-((c[y>>2]|0)+(b[(c[v>>2]|0)+(c[t>>2]<<1)>>1]|0));c[t>>2]=(c[t>>2]|0)+1}if((o|0)==29){c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}if((c[z>>2]|0)>=0){break}c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}}while(0);c:do{if((c[E>>2]|0)!=0){c[y>>2]=ve(c[r>>2]|0,c[B>>2]|0,(c[v>>2]|0)+(c[u>>2]<<1)+ -2|0)|0;c[B>>2]=(c[B>>2]|0)-(c[y>>2]|0);if((b[(c[v>>2]|0)+((c[u>>2]|0)-1<<1)>>1]|0)>=0?(b[(c[v>>2]|0)+((c[u>>2]|0)-1<<1)>>1]|0)<=(c[B>>2]|0):0){c[r>>2]=(c[r>>2]|0)+(c[y>>2]|0);if((c[C>>2]|0)==0){if(((c[y>>2]|0)+(b[(c[v>>2]|0)+((c[u>>2]|0)-1<<1)>>1]|0)|0)<=(c[z>>2]|0)){break}c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}e=$(b[(c[v>>2]|0)+((c[u>>2]|0)-1<<1)>>1]|0,c[u>>2]|0)|0;if((e|0)>(c[B>>2]|0)){c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}c[t>>2]=0;while(1){if((c[t>>2]|0)>=((c[u>>2]|0)-1|0)){break c}b[(c[v>>2]|0)+(c[t>>2]<<1)>>1]=b[(c[v>>2]|0)+((c[u>>2]|0)-1<<1)>>1]|0;c[t>>2]=(c[t>>2]|0)+1}}c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}else{if((c[z>>2]|0)<=1275){b[(c[v>>2]|0)+((c[u>>2]|0)-1<<1)>>1]=c[z>>2];break}c[p>>2]=-4;e=c[p>>2]|0;i=D;return e|0}}while(0);if((c[x>>2]|0)!=0){c[c[x>>2]>>2]=(c[r>>2]|0)-(c[w>>2]|0)}c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[u>>2]|0)){break}if((c[s>>2]|0)!=0){c[(c[s>>2]|0)+(c[t>>2]<<2)>>2]=c[r>>2]}c[r>>2]=(c[r>>2]|0)+(b[(c[v>>2]|0)+(c[t>>2]<<1)>>1]|0);c[t>>2]=(c[t>>2]|0)+1}if((c[q>>2]|0)!=0){c[c[q>>2]>>2]=(c[A>>2]|0)+((c[r>>2]|0)-(c[w>>2]|0))}if((c[n>>2]|0)!=0){a[c[n>>2]>>0]=a[F>>0]|0}c[p>>2]=c[u>>2];e=c[p>>2]|0;i=D;return e|0}function ve(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0;g=i;i=i+16|0;h=g+12|0;k=g+8|0;l=g+4|0;j=g;c[k>>2]=a;c[l>>2]=e;c[j>>2]=f;if((c[l>>2]|0)<1){b[c[j>>2]>>1]=-1;c[h>>2]=-1;a=c[h>>2]|0;i=g;return a|0}if((d[c[k>>2]>>0]|0|0)<252){b[c[j>>2]>>1]=d[c[k>>2]>>0]|0;c[h>>2]=1;a=c[h>>2]|0;i=g;return a|0}if((c[l>>2]|0)<2){b[c[j>>2]>>1]=-1;c[h>>2]=-1;a=c[h>>2]|0;i=g;return a|0}else{b[c[j>>2]>>1]=((d[(c[k>>2]|0)+1>>0]|0)<<2)+(d[c[k>>2]>>0]|0);c[h>>2]=2;a=c[h>>2]|0;i=g;return a|0}return 0}function we(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+32|0;d=b+16|0;f=b+12|0;e=b+8|0;g=b+4|0;h=b;c[f>>2]=a;if((c[f>>2]|0)<1|(c[f>>2]|0)>2){c[d>>2]=0;h=c[d>>2]|0;i=b;return h|0}c[h>>2]=Nd(e)|0;if((c[h>>2]|0)!=0){c[d>>2]=0;h=c[d>>2]|0;i=b;return h|0}else{c[e>>2]=xe(c[e>>2]|0)|0;c[g>>2]=db(c[f>>2]|0)|0;h=xe(76)|0;c[d>>2]=h+(c[e>>2]|0)+(c[g>>2]|0);h=c[d>>2]|0;i=b;return h|0}return 0}function xe(a){a=a|0;var b=0,d=0;d=i;i=i+16|0;b=d;c[b>>2]=a;i=d;return(c[b>>2]|0)+4-1&-4|0}function ye(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;k=i;i=i+48|0;h=k;f=k+24|0;j=k+20|0;e=k+8|0;l=k+16|0;o=k+4|0;g=k+12|0;m=k+28|0;n=k+32|0;c[j>>2]=a;c[e>>2]=b;c[l>>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)?!((c[l>>2]|0)!=1&(c[l>>2]|0)!=2):0){a=c[j>>2]|0;Xe(a|0,0,we(c[l>>2]|0)|0)|0;c[m>>2]=Nd(n)|0;if((c[m>>2]|0)!=0){c[f>>2]=-3;a=c[f>>2]|0;i=k;return a|0}c[n>>2]=xe(c[n>>2]|0)|0;a=xe(76)|0;c[(c[j>>2]|0)+4>>2]=a;c[c[j>>2]>>2]=(c[(c[j>>2]|0)+4>>2]|0)+(c[n>>2]|0);c[o>>2]=(c[j>>2]|0)+(c[(c[j>>2]|0)+4>>2]|0);c[g>>2]=(c[j>>2]|0)+(c[c[j>>2]>>2]|0);a=c[l>>2]|0;c[(c[j>>2]|0)+8>>2]=a;c[(c[j>>2]|0)+44>>2]=a;c[(c[j>>2]|0)+12>>2]=c[e>>2];c[(c[j>>2]|0)+24>>2]=c[(c[j>>2]|0)+12>>2];c[(c[j>>2]|0)+16>>2]=c[(c[j>>2]|0)+8>>2];c[m>>2]=Od(c[o>>2]|0)|0;if((c[m>>2]|0)!=0){c[f>>2]=-3;a=c[f>>2]|0;i=k;return a|0}c[m>>2]=fb(c[g>>2]|0,c[e>>2]|0,c[l>>2]|0)|0;if((c[m>>2]|0)!=0){c[f>>2]=-3;a=c[f>>2]|0;i=k;return a|0}else{a=c[g>>2]|0;c[h>>2]=0;ob(a,10016,h)|0;c[(c[j>>2]|0)+56>>2]=0;c[(c[j>>2]|0)+60>>2]=(c[e>>2]|0)/400|0;c[f>>2]=0;a=c[f>>2]|0;i=k;return a|0}}c[f>>2]=-1;a=c[f>>2]|0;i=k;return a|0}function ze(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+32|0;e=f+20|0;k=f+16|0;l=f+12|0;g=f+8|0;j=f+4|0;h=f;c[k>>2]=a;c[l>>2]=b;c[g>>2]=d;if(!((c[k>>2]|0)!=48e3&(c[k>>2]|0)!=24e3&(c[k>>2]|0)!=16e3&(c[k>>2]|0)!=12e3&(c[k>>2]|0)!=8e3)?!((c[l>>2]|0)!=1&(c[l>>2]|0)!=2):0){c[h>>2]=Ae(we(c[l>>2]|0)|0)|0;if((c[h>>2]|0)==0){if((c[g>>2]|0)!=0){c[c[g>>2]>>2]=-7}c[e>>2]=0;a=c[e>>2]|0;i=f;return a|0}c[j>>2]=ye(c[h>>2]|0,c[k>>2]|0,c[l>>2]|0)|0;if((c[g>>2]|0)!=0){c[c[g>>2]>>2]=c[j>>2]}if((c[j>>2]|0)!=0){Be(c[h>>2]|0);c[h>>2]=0}c[e>>2]=c[h>>2];a=c[e>>2]|0;i=f;return a|0}if((c[g>>2]|0)!=0){c[c[g>>2]>>2]=-1}c[e>>2]=0;a=c[e>>2]|0;i=f;return a|0}function Ae(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Se(c[d>>2]|0)|0;i=b;return a|0}function Be(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;Te(c[d>>2]|0);i=b;return}function Ce(a,d,e,f,g,h,j,k,l){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;r=i;i=i+208|0;n=r+44|0;p=r+4|0;M=r;H=r+76|0;o=r+36|0;q=r+16|0;G=r+20|0;I=r+24|0;K=r+64|0;C=r+72|0;v=r+80|0;E=r+84|0;L=r+88|0;F=r+48|0;J=r+192|0;A=r+8|0;z=r+56|0;y=r+28|0;B=r+60|0;u=r+96|0;s=r+32|0;t=r+68|0;w=r+40|0;D=r+12|0;x=r+52|0;c[p>>2]=a;c[M>>2]=d;c[H>>2]=e;c[o>>2]=f;c[q>>2]=g;c[G>>2]=h;c[I>>2]=j;c[K>>2]=k;c[C>>2]=l;if((c[G>>2]|0)<0|(c[G>>2]|0)>1){c[n>>2]=-1;a=c[n>>2]|0;i=r;return a|0}if(!(((c[G>>2]|0)==0?(c[H>>2]|0)!=0:0)?(c[M>>2]|0)!=0:0)){m=6}if((m|0)==6?((c[q>>2]|0)%((c[(c[p>>2]|0)+12>>2]|0)/400|0|0)|0|0)!=0:0){c[n>>2]=-1;a=c[n>>2]|0;i=r;return a|0}if((c[H>>2]|0)!=0?(c[M>>2]|0)!=0:0){if((c[H>>2]|0)<0){c[n>>2]=-1;a=c[n>>2]|0;i=r;return a|0}c[y>>2]=Fe(c[M>>2]|0)|0;c[z>>2]=Ge(c[M>>2]|0)|0;c[A>>2]=te(c[M>>2]|0,c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A>>2]|0)|0,0,0,0,c[C>>2]|0)|0,(c[D>>2]|0)<0):0){c[(c[p>>2]|0)+68>>2]=c[w>>2];c[n>>2]=c[D>>2];a=c[n>>2]|0;i=r;return a|0}c[(c[p>>2]|0)+52>>2]=c[y>>2];c[(c[p>>2]|0)+48>>2]=c[z>>2];c[(c[p>>2]|0)+60>>2]=c[A>>2];c[(c[p>>2]|0)+44>>2]=c[B>>2];a=(c[o>>2]|0)+(($(c[(c[p>>2]|0)+8>>2]|0,(c[q>>2]|0)-(c[A>>2]|0)|0)|0)<<1)|0;c[D>>2]=De(c[p>>2]|0,c[M>>2]|0,b[u>>1]|0,a,c[A>>2]|0,1)|0;if((c[D>>2]|0)<0){c[n>>2]=c[D>>2];a=c[n>>2]|0;i=r;return a|0}else{Ee()|0;c[(c[p>>2]|0)+68>>2]=c[q>>2];c[n>>2]=c[q>>2];a=c[n>>2]|0;i=r;return a|0}}c[n>>2]=Ce(c[p>>2]|0,0,0,c[o>>2]|0,c[q>>2]|0,0,0,0,c[C>>2]|0)|0;a=c[n>>2]|0;i=r;return a|0}c[s>>2]=0;while(1){u=(c[o>>2]|0)+(($(c[s>>2]|0,c[(c[p>>2]|0)+8>>2]|0)|0)<<1)|0;c[t>>2]=De(c[p>>2]|0,0,0,u,(c[q>>2]|0)-(c[s>>2]|0)|0,0)|0;u=c[t>>2]|0;if((c[t>>2]|0)<0){m=12;break}c[s>>2]=(c[s>>2]|0)+u;if((c[s>>2]|0)>=(c[q>>2]|0)){m=14;break}}if((m|0)==12){c[n>>2]=u;a=c[n>>2]|0;i=r;return a|0}else if((m|0)==14){Ee()|0;c[(c[p>>2]|0)+68>>2]=c[s>>2];c[n>>2]=c[s>>2];a=c[n>>2]|0;i=r;return a|0}return 0}function De(d,e,f,g,h,j){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0;k=i;i=i+240|0;P=k;n=k+128|0;l=k+124|0;J=k+208|0;w=k+216|0;o=k+200|0;s=k+20|0;L=k+24|0;_=k+28|0;K=k+32|0;B=k+36|0;Z=k+40|0;r=k+44|0;v=k+48|0;ba=k+96|0;ca=k+8|0;U=k+104|0;ea=k+108|0;S=k+112|0;T=k+196|0;m=k+204|0;C=k+212|0;H=k+220|0;D=k+224|0;u=k+228|0;F=k+140|0;x=k+144|0;G=k+148|0;N=k+152|0;E=k+156|0;da=k+160|0;y=k+164|0;O=k+168|0;z=k+172|0;Q=k+176|0;fa=k+180|0;p=k+184|0;q=k+16|0;W=k+12|0;X=k+188|0;Y=k+100|0;aa=k+136|0;V=k+116|0;I=k+192|0;R=k+232|0;M=k+120|0;t=k+132|0;A=k+4|0;c[l>>2]=d;c[J>>2]=e;c[w>>2]=f;c[o>>2]=g;c[s>>2]=h;c[L>>2]=j;c[Z>>2]=0;c[r>>2]=0;c[S>>2]=0;c[H>>2]=0;c[u>>2]=0;c[F>>2]=0;c[x>>2]=0;c[z>>2]=0;c[_>>2]=(c[l>>2]|0)+(c[(c[l>>2]|0)+4>>2]|0);c[K>>2]=(c[l>>2]|0)+(c[c[l>>2]>>2]|0);c[y>>2]=(c[(c[l>>2]|0)+12>>2]|0)/50|0;c[da>>2]=c[y>>2]>>1;c[E>>2]=c[da>>2]>>1;c[N>>2]=c[E>>2]>>1;if((c[s>>2]|0)<(c[N>>2]|0)){c[n>>2]=-2;d=c[n>>2]|0;i=k;return d|0}if((c[s>>2]|0)<(((c[(c[l>>2]|0)+12>>2]|0)/25|0)*3|0)){j=c[s>>2]|0}else{j=((c[(c[l>>2]|0)+12>>2]|0)/25|0)*3|0}c[s>>2]=j;if((c[w>>2]|0)<=1){c[J>>2]=0;if((c[s>>2]|0)<(c[(c[l>>2]|0)+60>>2]|0)){j=c[s>>2]|0}else{j=c[(c[l>>2]|0)+60>>2]|0}c[s>>2]=j}do{if((c[J>>2]|0)==0){c[m>>2]=c[s>>2];c[C>>2]=c[(c[l>>2]|0)+56>>2];if((c[C>>2]|0)==0){c[B>>2]=0;while(1){if((c[B>>2]|0)>=($(c[m>>2]|0,c[(c[l>>2]|0)+8>>2]|0)|0)){break}b[(c[o>>2]|0)+(c[B>>2]<<1)>>1]=0;c[B>>2]=(c[B>>2]|0)+1}c[n>>2]=c[m>>2];d=c[n>>2]|0;i=k;return d|0}if((c[m>>2]|0)>(c[y>>2]|0)){while(1){c[fa>>2]=De(c[l>>2]|0,0,0,c[o>>2]|0,(c[m>>2]|0)<(c[y>>2]|0)?c[m>>2]|0:c[y>>2]|0,0)|0;p=c[fa>>2]|0;if((c[fa>>2]|0)<0){fa=20;break}d=$(p,c[(c[l>>2]|0)+8>>2]|0)|0;c[o>>2]=(c[o>>2]|0)+(d<<1);c[m>>2]=(c[m>>2]|0)-(c[fa>>2]|0);if((c[m>>2]|0)<=0){fa=22;break}}if((fa|0)==20){c[n>>2]=p;d=c[n>>2]|0;i=k;return d|0}else if((fa|0)==22){c[n>>2]=c[s>>2];d=c[n>>2]|0;i=k;return d|0}}if((c[m>>2]|0)<(c[y>>2]|0)){if((c[m>>2]|0)>(c[da>>2]|0)){c[m>>2]=c[da>>2];break}if(((c[C>>2]|0)!=1e3?(c[m>>2]|0)>(c[E>>2]|0):0)?(c[m>>2]|0)<(c[da>>2]|0):0){c[m>>2]=c[E>>2]}}}else{c[m>>2]=c[(c[l>>2]|0)+60>>2];c[C>>2]=c[(c[l>>2]|0)+52>>2];Hb(v,c[J>>2]|0,c[w>>2]|0)}}while(0);if((c[C>>2]|0)!=1002){fa=(c[s>>2]|0)>=(c[da>>2]|0)}else{fa=0}c[Q>>2]=fa&1;c[U>>2]=1;c[ea>>2]=1;do{if((c[J>>2]|0)!=0?(c[(c[l>>2]|0)+56>>2]|0)>0:0){if(!(((c[C>>2]|0)==1002?(c[(c[l>>2]|0)+56>>2]|0)!=1002:0)?(c[(c[l>>2]|0)+64>>2]|0)==0:0)){if((c[C>>2]|0)==1002){break}if((c[(c[l>>2]|0)+56>>2]|0)!=1002){break}}c[H>>2]=1;fa=$(c[E>>2]|0,c[(c[l>>2]|0)+8>>2]|0)|0;if((c[C>>2]|0)==1002){c[ea>>2]=fa;break}else{c[U>>2]=fa;break}}}while(0);d=c[ea>>2]|0;c[p>>2]=ia()|0;ea=i;i=i+((2*d|0)+15&-16)|0;if((c[H>>2]|0)!=0?(c[C>>2]|0)==1002:0){c[S>>2]=ea;De(c[l>>2]|0,0,0,c[S>>2]|0,(c[E>>2]|0)<(c[m>>2]|0)?c[E>>2]|0:c[m>>2]|0,0)|0}a:do{if((c[m>>2]|0)>(c[s>>2]|0)){c[n>>2]=-1;c[q>>2]=1}else{c[s>>2]=c[m>>2];if((c[C>>2]|0)!=1002?(c[Q>>2]|0)==0:0){da=$((c[da>>2]|0)>(c[s>>2]|0)?c[da>>2]|0:c[s>>2]|0,c[(c[l>>2]|0)+8>>2]|0)|0}else{da=1}c[ca>>2]=da;da=i;i=i+((2*(c[ca>>2]|0)|0)+15&-16)|0;b:do{if((c[C>>2]|0)!=1002){if((c[Q>>2]|0)!=0){c[Y>>2]=c[o>>2]}else{c[Y>>2]=da}if((c[(c[l>>2]|0)+56>>2]|0)==1002){Od(c[_>>2]|0)|0}if(10>(((c[m>>2]|0)*1e3|0)/(c[(c[l>>2]|0)+12>>2]|0)|0|0)){ca=10}else{ca=((c[m>>2]|0)*1e3|0)/(c[(c[l>>2]|0)+12>>2]|0)|0}c[(c[l>>2]|0)+32>>2]=ca;do{if((c[J>>2]|0)!=0){c[(c[l>>2]|0)+20>>2]=c[(c[l>>2]|0)+44>>2];ca=c[l>>2]|0;if((c[C>>2]|0)!=1e3){c[ca+28>>2]=16e3;break}ea=c[l>>2]|0;if((c[ca+48>>2]|0)==1101){c[ea+28>>2]=8e3;break}if((c[ea+48>>2]|0)==1102){c[(c[l>>2]|0)+28>>2]=12e3;break}else{c[(c[l>>2]|0)+28>>2]=16e3;break}}}while(0);if((c[J>>2]|0)==0){ca=1}else{ca=c[L>>2]<<1}c[W>>2]=ca;c[X>>2]=0;c:while(1){c[aa>>2]=(c[X>>2]|0)==0&1;c[Z>>2]=Pd(c[_>>2]|0,(c[l>>2]|0)+16|0,c[W>>2]|0,c[aa>>2]|0,v,c[Y>>2]|0,ba)|0;d:do{if((c[Z>>2]|0)!=0){if((c[W>>2]|0)==0){break c}c[ba>>2]=c[s>>2];c[B>>2]=0;while(1){if((c[B>>2]|0)>=($(c[s>>2]|0,c[(c[l>>2]|0)+8>>2]|0)|0)){break d}b[(c[Y>>2]|0)+(c[B>>2]<<1)>>1]=0;c[B>>2]=(c[B>>2]|0)+1}}}while(0);d=$(c[ba>>2]|0,c[(c[l>>2]|0)+8>>2]|0)|0;c[Y>>2]=(c[Y>>2]|0)+(d<<1);c[X>>2]=(c[X>>2]|0)+(c[ba>>2]|0);if((c[X>>2]|0)>=(c[s>>2]|0)){break b}}c[n>>2]=-3;c[q>>2]=1;break a}}while(0);c[D>>2]=0;if((((c[L>>2]|0)==0?(c[C>>2]|0)!=1002:0)?(c[J>>2]|0)!=0:0)?(d=(Ne(v)|0)+17|0,(d+(((c[(c[l>>2]|0)+52>>2]|0)==1001&1)*20|0)|0)<=(c[w>>2]<<3|0)):0){if((c[C>>2]|0)==1001){c[u>>2]=Ob(v,12)|0}else{c[u>>2]=1}if((c[u>>2]|0)!=0){c[x>>2]=Ob(v,1)|0;if((c[C>>2]|0)==1001){W=(Qb(v,256)|0)+2|0}else{W=c[w>>2]|0;W=W-((Ne(v)|0)+7>>3)|0}c[F>>2]=W;c[w>>2]=(c[w>>2]|0)-(c[F>>2]|0);d=c[w>>2]<<3;if((d|0)<(Ne(v)|0)){c[w>>2]=0;c[F>>2]=0;c[u>>2]=0}d=v+4|0;c[d>>2]=(c[d>>2]|0)-(c[F>>2]|0)}}if((c[C>>2]|0)!=1002){c[D>>2]=17}c[V>>2]=21;switch(c[(c[l>>2]|0)+48>>2]|0){case 1101:{c[V>>2]=13;break};case 1103:case 1102:{c[V>>2]=17;break};case 1104:{c[V>>2]=19;break};case 1105:{c[V>>2]=21;break};default:{}}d=c[K>>2]|0;c[P>>2]=c[V>>2];ob(d,10012,P)|0;d=c[K>>2]|0;c[P>>2]=c[(c[l>>2]|0)+44>>2];ob(d,10008,P)|0;if((c[u>>2]|0)!=0){c[H>>2]=0;c[U>>2]=1}V=i;i=i+((2*(c[U>>2]|0)|0)+15&-16)|0;if((c[H>>2]|0)!=0?(c[C>>2]|0)!=1002:0){c[S>>2]=V;De(c[l>>2]|0,0,0,c[S>>2]|0,(c[E>>2]|0)<(c[m>>2]|0)?c[E>>2]|0:c[m>>2]|0,0)|0}if((c[u>>2]|0)!=0){U=$(c[E>>2]|0,c[(c[l>>2]|0)+8>>2]|0)|0}else{U=1}c[T>>2]=U;U=i;i=i+((2*(c[T>>2]|0)|0)+15&-16)|0;if((c[u>>2]|0)!=0?(c[x>>2]|0)!=0:0){d=c[K>>2]|0;c[P>>2]=0;ob(d,10010,P)|0;hb(c[K>>2]|0,(c[J>>2]|0)+(c[w>>2]|0)|0,c[F>>2]|0,U,c[E>>2]|0,0,0)|0;d=c[K>>2]|0;c[P>>2]=z+(((z-z|0)/4|0)<<2);ob(d,4031,P)|0}d=c[K>>2]|0;c[P>>2]=c[D>>2];ob(d,10010,P)|0;e:do{if((c[C>>2]|0)!=1e3){c[I>>2]=(c[y>>2]|0)<(c[s>>2]|0)?c[y>>2]|0:c[s>>2]|0;do{if((c[C>>2]|0)!=(c[(c[l>>2]|0)+56>>2]|0)){if((c[(c[l>>2]|0)+56>>2]|0)<=0){break}if((c[(c[l>>2]|0)+64>>2]|0)!=0){break}ob(c[K>>2]|0,4028,P)|0}}while(0);c[r>>2]=hb(c[K>>2]|0,(c[L>>2]|0)!=0?0:c[J>>2]|0,c[w>>2]|0,c[o>>2]|0,c[I>>2]|0,v,c[Q>>2]|0)|0}else{a[R+0>>0]=a[19384>>0]|0;a[R+1>>0]=a[19385>>0]|0;f:do{if((c[Q>>2]|0)==0){c[B>>2]=0;while(1){if((c[B>>2]|0)>=($(c[s>>2]|0,c[(c[l>>2]|0)+8>>2]|0)|0)){break f}b[(c[o>>2]|0)+(c[B>>2]<<1)>>1]=0;c[B>>2]=(c[B>>2]|0)+1}}}while(0);if((c[(c[l>>2]|0)+56>>2]|0)!=1001){break}do{if((c[u>>2]|0)!=0){if((c[x>>2]|0)==0){break}if((c[(c[l>>2]|0)+64>>2]|0)!=0){break e}}}while(0);d=c[K>>2]|0;c[P>>2]=0;ob(d,10010,P)|0;hb(c[K>>2]|0,R,2,c[o>>2]|0,c[N>>2]|0,0,c[Q>>2]|0)|0}}while(0);g:do{if((c[C>>2]|0)!=1002){if((c[Q>>2]|0)!=0){break}c[B>>2]=0;while(1){if((c[B>>2]|0)>=($(c[s>>2]|0,c[(c[l>>2]|0)+8>>2]|0)|0)){break g}d=Oe((b[(c[o>>2]|0)+(c[B>>2]<<1)>>1]|0)+(b[da+(c[B>>2]<<1)>>1]|0)|0)|0;b[(c[o>>2]|0)+(c[B>>2]<<1)>>1]=d;c[B>>2]=(c[B>>2]|0)+1}}}while(0);d=c[K>>2]|0;c[P>>2]=M+(((M-M|0)/4|0)<<2);ob(d,10015,P)|0;c[O>>2]=c[(c[M>>2]|0)+52>>2];do{if((c[u>>2]|0)!=0){if((c[x>>2]|0)!=0){break}ob(c[K>>2]|0,4028,P)|0;f=c[K>>2]|0;c[P>>2]=0;ob(f,10010,P)|0;hb(c[K>>2]|0,(c[J>>2]|0)+(c[w>>2]|0)|0,c[F>>2]|0,U,c[E>>2]|0,0,0)|0;f=c[K>>2]|0;c[P>>2]=z+(((z-z|0)/4|0)<<2);ob(f,4031,P)|0;f=(c[o>>2]|0)+(($(c[(c[l>>2]|0)+8>>2]|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o>>2]|0)+(c[B>>2]<<1)>>1]=b[(c[S>>2]|0)+(c[B>>2]<<1)>>1]|0;c[B>>2]=(c[B>>2]|0)+1}f=(c[S>>2]|0)+(($(c[(c[l>>2]|0)+8>>2]|0,c[N>>2]|0)|0)<<1)|0;e=(c[o>>2]|0)+(($(c[(c[l>>2]|0)+8>>2]|0,c[N>>2]|0)|0)<<1)|0;d=(c[o>>2]|0)+(($(c[(c[l>>2]|0)+8>>2]|0,c[N>>2]|0)|0)<<1)|0;Pe(f,e,d,c[N>>2]|0,c[(c[l>>2]|0)+8>>2]|0,c[O>>2]|0,c[(c[l>>2]|0)+12>>2]|0)}}while(0);h:do{if((c[(c[l>>2]|0)+40>>2]|0)!=0){c[t>>2]=Qe(16384+(((c[(c[l>>2]|0)+40>>2]&65535)<<16>>16)*21771|0)>>15&65535)|0;c[B>>2]=0;while(1){if((c[B>>2]|0)>=($(c[s>>2]|0,c[(c[l>>2]|0)+8>>2]|0)|0)){break h}d=$(b[(c[o>>2]|0)+(c[B>>2]<<1)>>1]|0,(c[t>>2]>>16&65535)<<16>>16)|0;c[A>>2]=d+(($(b[(c[o>>2]|0)+(c[B>>2]<<1)>>1]|0,c[t>>2]&65535&65535)|0)+32768>>16);if((c[A>>2]|0)>32767){y=32767}else{y=(c[A>>2]|0)<-32767?-32767:c[A>>2]|0}b[(c[o>>2]|0)+(c[B>>2]<<1)>>1]=y;c[B>>2]=(c[B>>2]|0)+1}}}while(0);if((c[w>>2]|0)<=1){c[(c[l>>2]|0)+72>>2]=0}else{c[(c[l>>2]|0)+72>>2]=c[v+28>>2]^c[z>>2]}c[(c[l>>2]|0)+56>>2]=c[C>>2];if((c[u>>2]|0)!=0){o=(c[x>>2]|0)!=0^1}else{o=0}c[(c[l>>2]|0)+64>>2]=o&1;if((c[r>>2]|0)>=0){Ee()|0}c[n>>2]=(c[r>>2]|0)<0?c[r>>2]|0:c[m>>2]|0;c[q>>2]=1}}while(0);na(c[p>>2]|0);d=c[n>>2]|0;i=k;return d|0}function Ee(){return 0}function Fe(b){b=b|0;var d=0,e=0,f=0;e=i;i=i+16|0;f=e+4|0;d=e;c[f>>2]=b;do{if((a[c[f>>2]>>0]&128|0)==0){if((a[c[f>>2]>>0]&96|0)==96){c[d>>2]=1001;break}else{c[d>>2]=1e3;break}}else{c[d>>2]=1002}}while(0);i=e;return c[d>>2]|0}function Ge(b){b=b|0;var e=0,f=0,g=0;e=i;i=i+16|0;g=e+4|0;f=e;c[g>>2]=b;b=d[c[g>>2]>>0]|0;if((a[c[g>>2]>>0]&128|0)!=0){b=1102+(b>>5&3)|0;c[f>>2]=b;c[f>>2]=(c[f>>2]|0)==1102?1101:b;b=c[f>>2]|0;i=e;return b|0}g=d[c[g>>2]>>0]|0;if((b&96|0)==96){c[f>>2]=(g&16|0)!=0?1105:1104;b=c[f>>2]|0;i=e;return b|0}else{c[f>>2]=1101+(g>>5&3);b=c[f>>2]|0;i=e;return b|0}return 0}function He(b){b=b|0;var d=0,e=0;e=i;i=i+16|0;d=e;c[d>>2]=b;i=e;return((a[c[d>>2]>>0]&4|0)!=0?2:1)|0}function Ie(a,d,e,f,h,j){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;j=j|0;var 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;t=i;i=i+48|0;q=t+4|0;r=t+16|0;s=t+36|0;l=t;v=t+32|0;k=t+40|0;u=t+44|0;n=t+24|0;m=t+20|0;w=t+8|0;p=t+12|0;o=t+28|0;c[r>>2]=a;c[s>>2]=d;c[l>>2]=e;c[v>>2]=f;c[k>>2]=h;c[u>>2]=j;if((c[k>>2]|0)<=0){c[q>>2]=-1;a=c[q>>2]|0;i=t;return a|0}do{if(((c[s>>2]|0)!=0?(c[l>>2]|0)>0:0)?(c[u>>2]|0)==0:0){c[w>>2]=Je(c[r>>2]|0,c[s>>2]|0,c[l>>2]|0)|0;if((c[w>>2]|0)>0){c[k>>2]=(c[k>>2]|0)<(c[w>>2]|0)?c[k>>2]|0:c[w>>2]|0;break}c[q>>2]=-4;a=c[q>>2]|0;i=t;return a|0}}while(0);a=$(c[k>>2]|0,c[(c[r>>2]|0)+8>>2]|0)|0;c[p>>2]=ia()|0;w=i;i=i+((2*a|0)+15&-16)|0;c[n>>2]=Ce(c[r>>2]|0,c[s>>2]|0,c[l>>2]|0,w,c[k>>2]|0,c[u>>2]|0,0,0,0)|0;a:do{if((c[n>>2]|0)>0){c[m>>2]=0;while(1){if((c[m>>2]|0)>=($(c[n>>2]|0,c[(c[r>>2]|0)+8>>2]|0)|0)){break a}g[(c[v>>2]|0)+(c[m>>2]<<2)>>2]=+(b[w+(c[m>>2]<<1)>>1]|0)*30517578125.0e-15;c[m>>2]=(c[m>>2]|0)+1}}}while(0);c[q>>2]=c[n>>2];c[o>>2]=1;na(c[p>>2]|0);a=c[q>>2]|0;i=t;return a|0}function Je(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;h=e+4|0;g=e;c[f>>2]=a;c[h>>2]=b;c[g>>2]=d;a=Me(c[h>>2]|0,c[g>>2]|0,c[(c[f>>2]|0)+12>>2]|0)|0;i=e;return a|0}function Ke(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;Be(c[d>>2]|0);i=b;return}function Le(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;f=i;i=i+16|0;e=f+12|0;g=f+8|0;h=f+4|0;j=f;c[g>>2]=b;c[h>>2]=d;do{if((c[h>>2]|0)>=1){c[j>>2]=a[c[g>>2]>>0]&3;if((c[j>>2]|0)==0){c[e>>2]=1;break}if((c[j>>2]|0)!=3){c[e>>2]=2;break}if((c[h>>2]|0)<2){c[e>>2]=-4;break}else{c[e>>2]=a[(c[g>>2]|0)+1>>0]&63;break}}else{c[e>>2]=-1}}while(0);i=f;return c[e>>2]|0}function Me(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;f=e+20|0;h=e+16|0;l=e+12|0;j=e+8|0;g=e+4|0;k=e;c[h>>2]=a;c[l>>2]=b;c[j>>2]=d;c[k>>2]=Le(c[h>>2]|0,c[l>>2]|0)|0;d=c[k>>2]|0;if((c[k>>2]|0)<0){c[f>>2]=d;l=c[f>>2]|0;i=e;return l|0}c[g>>2]=$(d,te(c[h>>2]|0,c[j>>2]|0)|0)|0;if(((c[g>>2]|0)*25|0)>((c[j>>2]|0)*3|0)){c[f>>2]=-4;l=c[f>>2]|0;i=e;return l|0}else{c[f>>2]=c[g>>2];l=c[f>>2]|0;i=e;return l|0}return 0}function Ne(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=c[(c[d>>2]|0)+20>>2]|0;a=a-(32-(We(c[(c[d>>2]|0)+28>>2]|0)|0))|0;i=b;return a|0}function Oe(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)<=32767){if((c[d>>2]|0)<-32768){a=-32768}else{a=(c[d>>2]&65535)<<16>>16}}else{a=32767}i=b;return a&65535|0}function Pe(a,d,e,f,g,h,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;s=i;i=i+48|0;t=s+36|0;k=s+16|0;u=s+28|0;m=s+4|0;o=s+32|0;q=s;v=s+12|0;l=s+24|0;n=s+20|0;p=s+8|0;r=s+40|0;c[t>>2]=a;c[k>>2]=d;c[u>>2]=e;c[m>>2]=f;c[o>>2]=g;c[q>>2]=h;c[v>>2]=j;c[p>>2]=48e3/(c[v>>2]|0)|0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[o>>2]|0)){break}c[l>>2]=0;while(1){if((c[l>>2]|0)>=(c[m>>2]|0)){break}a=$(c[l>>2]|0,c[p>>2]|0)|0;v=$(c[l>>2]|0,c[p>>2]|0)|0;b[r>>1]=($(b[(c[q>>2]|0)+(a<<1)>>1]|0,b[(c[q>>2]|0)+(v<<1)>>1]|0)|0)>>15;v=$(c[l>>2]|0,c[o>>2]|0)|0;v=$(b[r>>1]|0,b[(c[k>>2]|0)+(v+(c[n>>2]|0)<<1)>>1]|0)|0;a=$(c[l>>2]|0,c[o>>2]|0)|0;a=v+($((32767-(b[r>>1]|0)&65535)<<16>>16,b[(c[t>>2]|0)+(a+(c[n>>2]|0)<<1)>>1]|0)|0)>>15&65535;v=$(c[l>>2]|0,c[o>>2]|0)|0;b[(c[u>>2]|0)+(v+(c[n>>2]|0)<<1)>>1]=a;c[l>>2]=(c[l>>2]|0)+1}c[n>>2]=(c[n>>2]|0)+1}i=s;return}function Qe(a){a=a|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+4|0;g=d+10|0;f=d;h=d+8|0;b[g>>1]=a;c[f>>2]=b[g>>1]>>10;if((c[f>>2]|0)>14){c[e>>2]=2130706432;h=c[e>>2]|0;i=d;return h|0}if((c[f>>2]|0)<-15){c[e>>2]=0;h=c[e>>2]|0;i=d;return h|0}b[h>>1]=Re((b[g>>1]|0)-(((c[f>>2]&65535)<<10&65535)<<16>>16)&65535)|0;g=b[h>>1]|0;a=0-(c[f>>2]|0)-2|0;if((0-(c[f>>2]|0)-2|0)>0){f=g>>a}else{f=g<<0-a}c[e>>2]=f;h=c[e>>2]|0;i=d;return h|0}function Re(a){a=a|0;var c=0,d=0,f=0;c=i;i=i+16|0;f=c+2|0;d=c;b[f>>1]=a;b[d>>1]=e[f>>1]<<4;a=(16383+((($(b[d>>1]|0,(22804+((($(b[d>>1]|0,(14819+(((b[d>>1]|0)*10204>>15&65535)<<16>>16)&65535)<<16>>16)|0)>>15&65535)<<16>>16)&65535)<<16>>16)|0)>>15&65535)<<16>>16)&65535)<<16>>16;i=c;return a|0}function Se(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;b=i;do{if(a>>>0<245){if(a>>>0<11){a=16}else{a=a+11&-8}v=a>>>3;p=c[4848]|0;w=p>>>v;if((w&3|0)!=0){h=(w&1^1)+v|0;g=h<<1;e=19432+(g<<2)|0;g=19432+(g+2<<2)|0;j=c[g>>2]|0;d=j+8|0;f=c[d>>2]|0;do{if((e|0)!=(f|0)){if(f>>>0<(c[19408>>2]|0)>>>0){ga()}k=f+12|0;if((c[k>>2]|0)==(j|0)){c[k>>2]=e;c[g>>2]=f;break}else{ga()}}else{c[4848]=p&~(1<>2]=H|3;H=j+(H|4)|0;c[H>>2]=c[H>>2]|1;H=d;i=b;return H|0}if(a>>>0>(c[19400>>2]|0)>>>0){if((w|0)!=0){h=2<>>12&16;h=h>>>d;f=h>>>5&8;h=h>>>f;g=h>>>2&4;h=h>>>g;e=h>>>1&2;h=h>>>e;j=h>>>1&1;j=(f|d|g|e|j)+(h>>>j)|0;h=j<<1;e=19432+(h<<2)|0;h=19432+(h+2<<2)|0;g=c[h>>2]|0;d=g+8|0;f=c[d>>2]|0;do{if((e|0)!=(f|0)){if(f>>>0<(c[19408>>2]|0)>>>0){ga()}k=f+12|0;if((c[k>>2]|0)==(g|0)){c[k>>2]=e;c[h>>2]=f;break}else{ga()}}else{c[4848]=p&~(1<>2]=a|3;e=g+a|0;c[g+(a|4)>>2]=f|1;c[g+h>>2]=f;h=c[19400>>2]|0;if((h|0)!=0){g=c[19412>>2]|0;k=h>>>3;j=k<<1;h=19432+(j<<2)|0;l=c[4848]|0;k=1<>2]|0;if(k>>>0<(c[19408>>2]|0)>>>0){ga()}else{D=j;C=k}}else{c[4848]=l|k;D=19432+(j+2<<2)|0;C=h}c[D>>2]=g;c[C+12>>2]=g;c[g+8>>2]=C;c[g+12>>2]=h}c[19400>>2]=f;c[19412>>2]=e;H=d;i=b;return H|0}p=c[19396>>2]|0;if((p|0)!=0){e=(p&0-p)+ -1|0;G=e>>>12&16;e=e>>>G;F=e>>>5&8;e=e>>>F;H=e>>>2&4;e=e>>>H;f=e>>>1&2;e=e>>>f;d=e>>>1&1;d=c[19696+((F|G|H|f|d)+(e>>>d)<<2)>>2]|0;e=(c[d+4>>2]&-8)-a|0;f=d;while(1){g=c[f+16>>2]|0;if((g|0)==0){g=c[f+20>>2]|0;if((g|0)==0){break}}f=(c[g+4>>2]&-8)-a|0;H=f>>>0>>0;e=H?f:e;f=g;d=H?g:d}h=c[19408>>2]|0;if(d>>>0>>0){ga()}f=d+a|0;if(!(d>>>0>>0)){ga()}g=c[d+24>>2]|0;k=c[d+12>>2]|0;do{if((k|0)==(d|0)){k=d+20|0;j=c[k>>2]|0;if((j|0)==0){k=d+16|0;j=c[k>>2]|0;if((j|0)==0){B=0;break}}while(1){l=j+20|0;m=c[l>>2]|0;if((m|0)!=0){j=m;k=l;continue}m=j+16|0;l=c[m>>2]|0;if((l|0)==0){break}else{j=l;k=m}}if(k>>>0>>0){ga()}else{c[k>>2]=0;B=j;break}}else{j=c[d+8>>2]|0;if(j>>>0>>0){ga()}h=j+12|0;if((c[h>>2]|0)!=(d|0)){ga()}l=k+8|0;if((c[l>>2]|0)==(d|0)){c[h>>2]=k;c[l>>2]=j;B=k;break}else{ga()}}}while(0);do{if((g|0)!=0){h=c[d+28>>2]|0;j=19696+(h<<2)|0;if((d|0)==(c[j>>2]|0)){c[j>>2]=B;if((B|0)==0){c[19396>>2]=c[19396>>2]&~(1<>>0<(c[19408>>2]|0)>>>0){ga()}h=g+16|0;if((c[h>>2]|0)==(d|0)){c[h>>2]=B}else{c[g+20>>2]=B}if((B|0)==0){break}}if(B>>>0<(c[19408>>2]|0)>>>0){ga()}c[B+24>>2]=g;g=c[d+16>>2]|0;do{if((g|0)!=0){if(g>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[B+16>>2]=g;c[g+24>>2]=B;break}}}while(0);g=c[d+20>>2]|0;if((g|0)!=0){if(g>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[B+20>>2]=g;c[g+24>>2]=B;break}}}}while(0);if(e>>>0<16){H=e+a|0;c[d+4>>2]=H|3;H=d+(H+4)|0;c[H>>2]=c[H>>2]|1}else{c[d+4>>2]=a|3;c[d+(a|4)>>2]=e|1;c[d+(e+a)>>2]=e;h=c[19400>>2]|0;if((h|0)!=0){g=c[19412>>2]|0;l=h>>>3;j=l<<1;h=19432+(j<<2)|0;k=c[4848]|0;l=1<>2]|0;if(k>>>0<(c[19408>>2]|0)>>>0){ga()}else{A=j;z=k}}else{c[4848]=k|l;A=19432+(j+2<<2)|0;z=h}c[A>>2]=g;c[z+12>>2]=g;c[g+8>>2]=z;c[g+12>>2]=h}c[19400>>2]=e;c[19412>>2]=f}H=d+8|0;i=b;return H|0}}}else{if(!(a>>>0>4294967231)){z=a+11|0;a=z&-8;B=c[19396>>2]|0;if((B|0)!=0){A=0-a|0;z=z>>>8;if((z|0)!=0){if(a>>>0>16777215){C=31}else{G=(z+1048320|0)>>>16&8;H=z<>>16&4;H=H<>>16&2;C=14-(F|G|C)+(H<>>15)|0;C=a>>>(C+7|0)&1|C<<1}}else{C=0}D=c[19696+(C<<2)>>2]|0;a:do{if((D|0)==0){F=0;z=0}else{if((C|0)==31){z=0}else{z=25-(C>>>1)|0}F=0;E=a<>2]&-8;G=H-a|0;if(G>>>0>>0){if((H|0)==(a|0)){A=G;F=D;z=D;break a}else{A=G;z=D}}H=c[D+20>>2]|0;D=c[D+(E>>>31<<2)+16>>2]|0;F=(H|0)==0|(H|0)==(D|0)?F:H;if((D|0)==0){break}else{E=E<<1}}}}while(0);if((F|0)==0&(z|0)==0){H=2<>>12&16;H=H>>>D;C=H>>>5&8;H=H>>>C;E=H>>>2&4;H=H>>>E;G=H>>>1&2;H=H>>>G;F=H>>>1&1;F=c[19696+((C|D|E|G|F)+(H>>>F)<<2)>>2]|0}if((F|0)!=0){while(1){H=(c[F+4>>2]&-8)-a|0;B=H>>>0>>0;A=B?H:A;z=B?F:z;B=c[F+16>>2]|0;if((B|0)!=0){F=B;continue}F=c[F+20>>2]|0;if((F|0)==0){break}}}if((z|0)!=0?A>>>0<((c[19400>>2]|0)-a|0)>>>0:0){f=c[19408>>2]|0;if(z>>>0>>0){ga()}d=z+a|0;if(!(z>>>0>>0)){ga()}e=c[z+24>>2]|0;h=c[z+12>>2]|0;do{if((h|0)==(z|0)){h=z+20|0;g=c[h>>2]|0;if((g|0)==0){h=z+16|0;g=c[h>>2]|0;if((g|0)==0){x=0;break}}while(1){j=g+20|0;k=c[j>>2]|0;if((k|0)!=0){g=k;h=j;continue}j=g+16|0;k=c[j>>2]|0;if((k|0)==0){break}else{g=k;h=j}}if(h>>>0>>0){ga()}else{c[h>>2]=0;x=g;break}}else{g=c[z+8>>2]|0;if(g>>>0>>0){ga()}f=g+12|0;if((c[f>>2]|0)!=(z|0)){ga()}j=h+8|0;if((c[j>>2]|0)==(z|0)){c[f>>2]=h;c[j>>2]=g;x=h;break}else{ga()}}}while(0);do{if((e|0)!=0){g=c[z+28>>2]|0;f=19696+(g<<2)|0;if((z|0)==(c[f>>2]|0)){c[f>>2]=x;if((x|0)==0){c[19396>>2]=c[19396>>2]&~(1<>>0<(c[19408>>2]|0)>>>0){ga()}f=e+16|0;if((c[f>>2]|0)==(z|0)){c[f>>2]=x}else{c[e+20>>2]=x}if((x|0)==0){break}}if(x>>>0<(c[19408>>2]|0)>>>0){ga()}c[x+24>>2]=e;e=c[z+16>>2]|0;do{if((e|0)!=0){if(e>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[x+16>>2]=e;c[e+24>>2]=x;break}}}while(0);e=c[z+20>>2]|0;if((e|0)!=0){if(e>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[x+20>>2]=e;c[e+24>>2]=x;break}}}}while(0);b:do{if(!(A>>>0<16)){c[z+4>>2]=a|3;c[z+(a|4)>>2]=A|1;c[z+(A+a)>>2]=A;f=A>>>3;if(A>>>0<256){h=f<<1;e=19432+(h<<2)|0;g=c[4848]|0;f=1<>2]|0;if(!(g>>>0<(c[19408>>2]|0)>>>0)){w=f;v=g;break}ga()}}while(0);c[w>>2]=d;c[v+12>>2]=d;c[z+(a+8)>>2]=v;c[z+(a+12)>>2]=e;break}e=A>>>8;if((e|0)!=0){if(A>>>0>16777215){e=31}else{G=(e+1048320|0)>>>16&8;H=e<>>16&4;H=H<>>16&2;e=14-(F|G|e)+(H<>>15)|0;e=A>>>(e+7|0)&1|e<<1}}else{e=0}f=19696+(e<<2)|0;c[z+(a+28)>>2]=e;c[z+(a+20)>>2]=0;c[z+(a+16)>>2]=0;h=c[19396>>2]|0;g=1<>2]=h|g;c[f>>2]=d;c[z+(a+24)>>2]=f;c[z+(a+12)>>2]=d;c[z+(a+8)>>2]=d;break}f=c[f>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}c:do{if((c[f+4>>2]&-8|0)!=(A|0)){e=A<>>31<<2)+16|0;h=c[g>>2]|0;if((h|0)==0){break}if((c[h+4>>2]&-8|0)==(A|0)){p=h;break c}else{e=e<<1;f=h}}if(g>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[g>>2]=d;c[z+(a+24)>>2]=f;c[z+(a+12)>>2]=d;c[z+(a+8)>>2]=d;break b}}else{p=f}}while(0);f=p+8|0;e=c[f>>2]|0;g=c[19408>>2]|0;if(p>>>0>>0){ga()}if(e>>>0>>0){ga()}else{c[e+12>>2]=d;c[f>>2]=d;c[z+(a+8)>>2]=e;c[z+(a+12)>>2]=p;c[z+(a+24)>>2]=0;break}}else{H=A+a|0;c[z+4>>2]=H|3;H=z+(H+4)|0;c[H>>2]=c[H>>2]|1}}while(0);H=z+8|0;i=b;return H|0}}}else{a=-1}}}while(0);p=c[19400>>2]|0;if(!(a>>>0>p>>>0)){e=p-a|0;d=c[19412>>2]|0;if(e>>>0>15){c[19412>>2]=d+a;c[19400>>2]=e;c[d+(a+4)>>2]=e|1;c[d+p>>2]=e;c[d+4>>2]=a|3}else{c[19400>>2]=0;c[19412>>2]=0;c[d+4>>2]=p|3;H=d+(p+4)|0;c[H>>2]=c[H>>2]|1}H=d+8|0;i=b;return H|0}p=c[19404>>2]|0;if(a>>>0

>>0){G=p-a|0;c[19404>>2]=G;H=c[19416>>2]|0;c[19416>>2]=H+a;c[H+(a+4)>>2]=G|1;c[H+4>>2]=a|3;H=H+8|0;i=b;return H|0}do{if((c[4966]|0)==0){p=oa(30)|0;if((p+ -1&p|0)==0){c[19872>>2]=p;c[19868>>2]=p;c[19876>>2]=-1;c[19880>>2]=-1;c[19884>>2]=0;c[19836>>2]=0;c[4966]=(ka(0)|0)&-16^1431655768;break}else{ga()}}}while(0);w=a+48|0;p=c[19872>>2]|0;x=a+47|0;z=p+x|0;p=0-p|0;v=z&p;if(!(v>>>0>a>>>0)){H=0;i=b;return H|0}A=c[19832>>2]|0;if((A|0)!=0?(G=c[19824>>2]|0,H=G+v|0,H>>>0<=G>>>0|H>>>0>A>>>0):0){H=0;i=b;return H|0}d:do{if((c[19836>>2]&4|0)==0){B=c[19416>>2]|0;e:do{if((B|0)!=0){A=19840|0;while(1){C=c[A>>2]|0;if(!(C>>>0>B>>>0)?(y=A+4|0,(C+(c[y>>2]|0)|0)>>>0>B>>>0):0){break}A=c[A+8>>2]|0;if((A|0)==0){o=182;break e}}if((A|0)!=0){B=z-(c[19404>>2]|0)&p;if(B>>>0<2147483647){p=ja(B|0)|0;A=(p|0)==((c[A>>2]|0)+(c[y>>2]|0)|0);y=p;z=B;p=A?p:-1;A=A?B:0;o=191}else{A=0}}else{o=182}}else{o=182}}while(0);do{if((o|0)==182){p=ja(0)|0;if((p|0)!=(-1|0)){z=p;A=c[19868>>2]|0;y=A+ -1|0;if((y&z|0)==0){A=v}else{A=v-z+(y+z&0-A)|0}y=c[19824>>2]|0;z=y+A|0;if(A>>>0>a>>>0&A>>>0<2147483647){H=c[19832>>2]|0;if((H|0)!=0?z>>>0<=y>>>0|z>>>0>H>>>0:0){A=0;break}y=ja(A|0)|0;o=(y|0)==(p|0);z=A;p=o?p:-1;A=o?A:0;o=191}else{A=0}}else{A=0}}}while(0);f:do{if((o|0)==191){o=0-z|0;if((p|0)!=(-1|0)){q=A;o=202;break d}do{if((y|0)!=(-1|0)&z>>>0<2147483647&z>>>0>>0?(u=c[19872>>2]|0,u=x-z+u&0-u,u>>>0<2147483647):0){if((ja(u|0)|0)==(-1|0)){ja(o|0)|0;break f}else{z=u+z|0;break}}}while(0);if((y|0)!=(-1|0)){p=y;q=z;o=202;break d}}}while(0);c[19836>>2]=c[19836>>2]|4;o=199}else{A=0;o=199}}while(0);if((((o|0)==199?v>>>0<2147483647:0)?(t=ja(v|0)|0,s=ja(0)|0,(s|0)!=(-1|0)&(t|0)!=(-1|0)&t>>>0>>0):0)?(r=s-t|0,q=r>>>0>(a+40|0)>>>0,q):0){p=t;q=q?r:A;o=202}if((o|0)==202){r=(c[19824>>2]|0)+q|0;c[19824>>2]=r;if(r>>>0>(c[19828>>2]|0)>>>0){c[19828>>2]=r}r=c[19416>>2]|0;g:do{if((r|0)!=0){v=19840|0;while(1){t=c[v>>2]|0;u=v+4|0;s=c[u>>2]|0;if((p|0)==(t+s|0)){o=214;break}w=c[v+8>>2]|0;if((w|0)==0){break}else{v=w}}if(((o|0)==214?(c[v+12>>2]&8|0)==0:0)?r>>>0>=t>>>0&r>>>0

>>0:0){c[u>>2]=s+q;d=(c[19404>>2]|0)+q|0;e=r+8|0;if((e&7|0)==0){e=0}else{e=0-e&7}H=d-e|0;c[19416>>2]=r+e;c[19404>>2]=H;c[r+(e+4)>>2]=H|1;c[r+(d+4)>>2]=40;c[19420>>2]=c[19880>>2];break}if(p>>>0<(c[19408>>2]|0)>>>0){c[19408>>2]=p}t=p+q|0;s=19840|0;while(1){if((c[s>>2]|0)==(t|0)){o=224;break}u=c[s+8>>2]|0;if((u|0)==0){break}else{s=u}}if((o|0)==224?(c[s+12>>2]&8|0)==0:0){c[s>>2]=p;h=s+4|0;c[h>>2]=(c[h>>2]|0)+q;h=p+8|0;if((h&7|0)==0){h=0}else{h=0-h&7}j=p+(q+8)|0;if((j&7|0)==0){n=0}else{n=0-j&7}o=p+(n+q)|0;j=h+a|0;k=p+j|0;m=o-(p+h)-a|0;c[p+(h+4)>>2]=a|3;h:do{if((o|0)!=(c[19416>>2]|0)){if((o|0)==(c[19412>>2]|0)){H=(c[19400>>2]|0)+m|0;c[19400>>2]=H;c[19412>>2]=k;c[p+(j+4)>>2]=H|1;c[p+(H+j)>>2]=H;break}r=q+4|0;t=c[p+(r+n)>>2]|0;if((t&3|0)==1){a=t&-8;s=t>>>3;i:do{if(!(t>>>0<256)){l=c[p+((n|24)+q)>>2]|0;u=c[p+(q+12+n)>>2]|0;do{if((u|0)==(o|0)){u=n|16;t=p+(r+u)|0;s=c[t>>2]|0;if((s|0)==0){t=p+(u+q)|0;s=c[t>>2]|0;if((s|0)==0){g=0;break}}while(1){u=s+20|0;v=c[u>>2]|0;if((v|0)!=0){s=v;t=u;continue}u=s+16|0;v=c[u>>2]|0;if((v|0)==0){break}else{s=v;t=u}}if(t>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[t>>2]=0;g=s;break}}else{t=c[p+((n|8)+q)>>2]|0;if(t>>>0<(c[19408>>2]|0)>>>0){ga()}v=t+12|0;if((c[v>>2]|0)!=(o|0)){ga()}s=u+8|0;if((c[s>>2]|0)==(o|0)){c[v>>2]=u;c[s>>2]=t;g=u;break}else{ga()}}}while(0);if((l|0)==0){break}t=c[p+(q+28+n)>>2]|0;s=19696+(t<<2)|0;do{if((o|0)!=(c[s>>2]|0)){if(l>>>0<(c[19408>>2]|0)>>>0){ga()}s=l+16|0;if((c[s>>2]|0)==(o|0)){c[s>>2]=g}else{c[l+20>>2]=g}if((g|0)==0){break i}}else{c[s>>2]=g;if((g|0)!=0){break}c[19396>>2]=c[19396>>2]&~(1<>>0<(c[19408>>2]|0)>>>0){ga()}c[g+24>>2]=l;l=n|16;o=c[p+(l+q)>>2]|0;do{if((o|0)!=0){if(o>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[g+16>>2]=o;c[o+24>>2]=g;break}}}while(0);l=c[p+(r+l)>>2]|0;if((l|0)==0){break}if(l>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[g+20>>2]=l;c[l+24>>2]=g;break}}else{r=c[p+((n|8)+q)>>2]|0;g=c[p+(q+12+n)>>2]|0;t=19432+(s<<1<<2)|0;do{if((r|0)!=(t|0)){if(r>>>0<(c[19408>>2]|0)>>>0){ga()}if((c[r+12>>2]|0)==(o|0)){break}ga()}}while(0);if((g|0)==(r|0)){c[4848]=c[4848]&~(1<>>0<(c[19408>>2]|0)>>>0){ga()}s=g+8|0;if((c[s>>2]|0)==(o|0)){l=s;break}ga()}}while(0);c[r+12>>2]=g;c[l>>2]=r}}while(0);o=p+((a|n)+q)|0;m=a+m|0}g=o+4|0;c[g>>2]=c[g>>2]&-2;c[p+(j+4)>>2]=m|1;c[p+(m+j)>>2]=m;g=m>>>3;if(m>>>0<256){m=g<<1;d=19432+(m<<2)|0;l=c[4848]|0;g=1<>2]|0;if(!(g>>>0<(c[19408>>2]|0)>>>0)){f=l;e=g;break}ga()}}while(0);c[f>>2]=k;c[e+12>>2]=k;c[p+(j+8)>>2]=e;c[p+(j+12)>>2]=d;break}e=m>>>8;do{if((e|0)==0){e=0}else{if(m>>>0>16777215){e=31;break}G=(e+1048320|0)>>>16&8;H=e<>>16&4;H=H<>>16&2;e=14-(F|G|e)+(H<>>15)|0;e=m>>>(e+7|0)&1|e<<1}}while(0);l=19696+(e<<2)|0;c[p+(j+28)>>2]=e;c[p+(j+20)>>2]=0;c[p+(j+16)>>2]=0;f=c[19396>>2]|0;g=1<>2]=f|g;c[l>>2]=k;c[p+(j+24)>>2]=l;c[p+(j+12)>>2]=k;c[p+(j+8)>>2]=k;break}l=c[l>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}j:do{if((c[l+4>>2]&-8|0)!=(m|0)){e=m<>>31<<2)+16|0;f=c[g>>2]|0;if((f|0)==0){break}if((c[f+4>>2]&-8|0)==(m|0)){d=f;break j}else{e=e<<1;l=f}}if(g>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[g>>2]=k;c[p+(j+24)>>2]=l;c[p+(j+12)>>2]=k;c[p+(j+8)>>2]=k;break h}}else{d=l}}while(0);f=d+8|0;e=c[f>>2]|0;g=c[19408>>2]|0;if(d>>>0>>0){ga()}if(e>>>0>>0){ga()}else{c[e+12>>2]=k;c[f>>2]=k;c[p+(j+8)>>2]=e;c[p+(j+12)>>2]=d;c[p+(j+24)>>2]=0;break}}else{H=(c[19404>>2]|0)+m|0;c[19404>>2]=H;c[19416>>2]=k;c[p+(j+4)>>2]=H|1}}while(0);H=p+(h|8)|0;i=b;return H|0}e=19840|0;while(1){d=c[e>>2]|0;if(!(d>>>0>r>>>0)?(n=c[e+4>>2]|0,m=d+n|0,m>>>0>r>>>0):0){break}e=c[e+8>>2]|0}e=d+(n+ -39)|0;if((e&7|0)==0){e=0}else{e=0-e&7}d=d+(n+ -47+e)|0;d=d>>>0<(r+16|0)>>>0?r:d;e=d+8|0;f=p+8|0;if((f&7|0)==0){f=0}else{f=0-f&7}H=q+ -40-f|0;c[19416>>2]=p+f;c[19404>>2]=H;c[p+(f+4)>>2]=H|1;c[p+(q+ -36)>>2]=40;c[19420>>2]=c[19880>>2];c[d+4>>2]=27;c[e+0>>2]=c[19840>>2];c[e+4>>2]=c[19844>>2];c[e+8>>2]=c[19848>>2];c[e+12>>2]=c[19852>>2];c[19840>>2]=p;c[19844>>2]=q;c[19852>>2]=0;c[19848>>2]=e;e=d+28|0;c[e>>2]=7;if((d+32|0)>>>0>>0){do{H=e;e=e+4|0;c[e>>2]=7}while((H+8|0)>>>0>>0)}if((d|0)!=(r|0)){d=d-r|0;e=r+(d+4)|0;c[e>>2]=c[e>>2]&-2;c[r+4>>2]=d|1;c[r+d>>2]=d;e=d>>>3;if(d>>>0<256){g=e<<1;d=19432+(g<<2)|0;f=c[4848]|0;e=1<>2]|0;if(!(e>>>0<(c[19408>>2]|0)>>>0)){k=f;j=e;break}ga()}}while(0);c[k>>2]=r;c[j+12>>2]=r;c[r+8>>2]=j;c[r+12>>2]=d;break}e=d>>>8;if((e|0)!=0){if(d>>>0>16777215){e=31}else{G=(e+1048320|0)>>>16&8;H=e<>>16&4;H=H<>>16&2;e=14-(F|G|e)+(H<>>15)|0;e=d>>>(e+7|0)&1|e<<1}}else{e=0}j=19696+(e<<2)|0;c[r+28>>2]=e;c[r+20>>2]=0;c[r+16>>2]=0;f=c[19396>>2]|0;g=1<>2]=f|g;c[j>>2]=r;c[r+24>>2]=j;c[r+12>>2]=r;c[r+8>>2]=r;break}f=c[j>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}k:do{if((c[f+4>>2]&-8|0)!=(d|0)){e=d<>>31<<2)+16|0;g=c[j>>2]|0;if((g|0)==0){break}if((c[g+4>>2]&-8|0)==(d|0)){h=g;break k}else{e=e<<1;f=g}}if(j>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[j>>2]=r;c[r+24>>2]=f;c[r+12>>2]=r;c[r+8>>2]=r;break g}}else{h=f}}while(0);f=h+8|0;e=c[f>>2]|0;d=c[19408>>2]|0;if(h>>>0>>0){ga()}if(e>>>0>>0){ga()}else{c[e+12>>2]=r;c[f>>2]=r;c[r+8>>2]=e;c[r+12>>2]=h;c[r+24>>2]=0;break}}}else{H=c[19408>>2]|0;if((H|0)==0|p>>>0>>0){c[19408>>2]=p}c[19840>>2]=p;c[19844>>2]=q;c[19852>>2]=0;c[19428>>2]=c[4966];c[19424>>2]=-1;d=0;do{H=d<<1;G=19432+(H<<2)|0;c[19432+(H+3<<2)>>2]=G;c[19432+(H+2<<2)>>2]=G;d=d+1|0}while((d|0)!=32);d=p+8|0;if((d&7|0)==0){d=0}else{d=0-d&7}H=q+ -40-d|0;c[19416>>2]=p+d;c[19404>>2]=H;c[p+(d+4)>>2]=H|1;c[p+(q+ -36)>>2]=40;c[19420>>2]=c[19880>>2]}}while(0);d=c[19404>>2]|0;if(d>>>0>a>>>0){G=d-a|0;c[19404>>2]=G;H=c[19416>>2]|0;c[19416>>2]=H+a;c[H+(a+4)>>2]=G|1;c[H+4>>2]=a|3;H=H+8|0;i=b;return H|0}}c[(pa()|0)>>2]=12;H=0;i=b;return H|0}function Te(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;b=i;if((a|0)==0){i=b;return}q=a+ -8|0;r=c[19408>>2]|0;if(q>>>0>>0){ga()}o=c[a+ -4>>2]|0;n=o&3;if((n|0)==1){ga()}j=o&-8;h=a+(j+ -8)|0;do{if((o&1|0)==0){u=c[q>>2]|0;if((n|0)==0){i=b;return}q=-8-u|0;o=a+q|0;n=u+j|0;if(o>>>0>>0){ga()}if((o|0)==(c[19412>>2]|0)){d=a+(j+ -4)|0;if((c[d>>2]&3|0)!=3){d=o;m=n;break}c[19400>>2]=n;c[d>>2]=c[d>>2]&-2;c[a+(q+4)>>2]=n|1;c[h>>2]=n;i=b;return}t=u>>>3;if(u>>>0<256){d=c[a+(q+8)>>2]|0;m=c[a+(q+12)>>2]|0;p=19432+(t<<1<<2)|0;if((d|0)!=(p|0)){if(d>>>0>>0){ga()}if((c[d+12>>2]|0)!=(o|0)){ga()}}if((m|0)==(d|0)){c[4848]=c[4848]&~(1<>>0>>0){ga()}p=m+8|0;if((c[p>>2]|0)==(o|0)){s=p}else{ga()}}else{s=m+8|0}c[d+12>>2]=m;c[s>>2]=d;d=o;m=n;break}s=c[a+(q+24)>>2]|0;t=c[a+(q+12)>>2]|0;do{if((t|0)==(o|0)){u=a+(q+20)|0;t=c[u>>2]|0;if((t|0)==0){u=a+(q+16)|0;t=c[u>>2]|0;if((t|0)==0){p=0;break}}while(1){w=t+20|0;v=c[w>>2]|0;if((v|0)!=0){t=v;u=w;continue}v=t+16|0;w=c[v>>2]|0;if((w|0)==0){break}else{t=w;u=v}}if(u>>>0>>0){ga()}else{c[u>>2]=0;p=t;break}}else{u=c[a+(q+8)>>2]|0;if(u>>>0>>0){ga()}r=u+12|0;if((c[r>>2]|0)!=(o|0)){ga()}v=t+8|0;if((c[v>>2]|0)==(o|0)){c[r>>2]=t;c[v>>2]=u;p=t;break}else{ga()}}}while(0);if((s|0)!=0){t=c[a+(q+28)>>2]|0;r=19696+(t<<2)|0;if((o|0)==(c[r>>2]|0)){c[r>>2]=p;if((p|0)==0){c[19396>>2]=c[19396>>2]&~(1<>>0<(c[19408>>2]|0)>>>0){ga()}r=s+16|0;if((c[r>>2]|0)==(o|0)){c[r>>2]=p}else{c[s+20>>2]=p}if((p|0)==0){d=o;m=n;break}}if(p>>>0<(c[19408>>2]|0)>>>0){ga()}c[p+24>>2]=s;r=c[a+(q+16)>>2]|0;do{if((r|0)!=0){if(r>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[p+16>>2]=r;c[r+24>>2]=p;break}}}while(0);q=c[a+(q+20)>>2]|0;if((q|0)!=0){if(q>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[p+20>>2]=q;c[q+24>>2]=p;d=o;m=n;break}}else{d=o;m=n}}else{d=o;m=n}}else{d=q;m=j}}while(0);if(!(d>>>0>>0)){ga()}n=a+(j+ -4)|0;o=c[n>>2]|0;if((o&1|0)==0){ga()}if((o&2|0)==0){if((h|0)==(c[19416>>2]|0)){w=(c[19404>>2]|0)+m|0;c[19404>>2]=w;c[19416>>2]=d;c[d+4>>2]=w|1;if((d|0)!=(c[19412>>2]|0)){i=b;return}c[19412>>2]=0;c[19400>>2]=0;i=b;return}if((h|0)==(c[19412>>2]|0)){w=(c[19400>>2]|0)+m|0;c[19400>>2]=w;c[19412>>2]=d;c[d+4>>2]=w|1;c[d+w>>2]=w;i=b;return}m=(o&-8)+m|0;n=o>>>3;do{if(!(o>>>0<256)){l=c[a+(j+16)>>2]|0;q=c[a+(j|4)>>2]|0;do{if((q|0)==(h|0)){o=a+(j+12)|0;n=c[o>>2]|0;if((n|0)==0){o=a+(j+8)|0;n=c[o>>2]|0;if((n|0)==0){k=0;break}}while(1){p=n+20|0;q=c[p>>2]|0;if((q|0)!=0){n=q;o=p;continue}p=n+16|0;q=c[p>>2]|0;if((q|0)==0){break}else{n=q;o=p}}if(o>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[o>>2]=0;k=n;break}}else{o=c[a+j>>2]|0;if(o>>>0<(c[19408>>2]|0)>>>0){ga()}p=o+12|0;if((c[p>>2]|0)!=(h|0)){ga()}n=q+8|0;if((c[n>>2]|0)==(h|0)){c[p>>2]=q;c[n>>2]=o;k=q;break}else{ga()}}}while(0);if((l|0)!=0){n=c[a+(j+20)>>2]|0;o=19696+(n<<2)|0;if((h|0)==(c[o>>2]|0)){c[o>>2]=k;if((k|0)==0){c[19396>>2]=c[19396>>2]&~(1<>>0<(c[19408>>2]|0)>>>0){ga()}n=l+16|0;if((c[n>>2]|0)==(h|0)){c[n>>2]=k}else{c[l+20>>2]=k}if((k|0)==0){break}}if(k>>>0<(c[19408>>2]|0)>>>0){ga()}c[k+24>>2]=l;h=c[a+(j+8)>>2]|0;do{if((h|0)!=0){if(h>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[k+16>>2]=h;c[h+24>>2]=k;break}}}while(0);h=c[a+(j+12)>>2]|0;if((h|0)!=0){if(h>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[k+20>>2]=h;c[h+24>>2]=k;break}}}}else{k=c[a+j>>2]|0;a=c[a+(j|4)>>2]|0;j=19432+(n<<1<<2)|0;if((k|0)!=(j|0)){if(k>>>0<(c[19408>>2]|0)>>>0){ga()}if((c[k+12>>2]|0)!=(h|0)){ga()}}if((a|0)==(k|0)){c[4848]=c[4848]&~(1<>>0<(c[19408>>2]|0)>>>0){ga()}j=a+8|0;if((c[j>>2]|0)==(h|0)){l=j}else{ga()}}else{l=a+8|0}c[k+12>>2]=a;c[l>>2]=k}}while(0);c[d+4>>2]=m|1;c[d+m>>2]=m;if((d|0)==(c[19412>>2]|0)){c[19400>>2]=m;i=b;return}}else{c[n>>2]=o&-2;c[d+4>>2]=m|1;c[d+m>>2]=m}h=m>>>3;if(m>>>0<256){a=h<<1;e=19432+(a<<2)|0;j=c[4848]|0;h=1<>2]|0;if(a>>>0<(c[19408>>2]|0)>>>0){ga()}else{f=h;g=a}}else{c[4848]=j|h;f=19432+(a+2<<2)|0;g=e}c[f>>2]=d;c[g+12>>2]=d;c[d+8>>2]=g;c[d+12>>2]=e;i=b;return}f=m>>>8;if((f|0)!=0){if(m>>>0>16777215){f=31}else{v=(f+1048320|0)>>>16&8;w=f<>>16&4;w=w<>>16&2;f=14-(u|v|f)+(w<>>15)|0;f=m>>>(f+7|0)&1|f<<1}}else{f=0}g=19696+(f<<2)|0;c[d+28>>2]=f;c[d+20>>2]=0;c[d+16>>2]=0;a=c[19396>>2]|0;h=1<>2]|0;if((f|0)==31){f=0}else{f=25-(f>>>1)|0}b:do{if((c[g+4>>2]&-8|0)!=(m|0)){f=m<>>31<<2)+16|0;g=c[h>>2]|0;if((g|0)==0){break}if((c[g+4>>2]&-8|0)==(m|0)){e=g;break b}else{f=f<<1;a=g}}if(h>>>0<(c[19408>>2]|0)>>>0){ga()}else{c[h>>2]=d;c[d+24>>2]=a;c[d+12>>2]=d;c[d+8>>2]=d;break a}}else{e=g}}while(0);g=e+8|0;f=c[g>>2]|0;h=c[19408>>2]|0;if(e>>>0>>0){ga()}if(f>>>0>>0){ga()}else{c[f+12>>2]=d;c[g>>2]=d;c[d+8>>2]=f;c[d+12>>2]=e;c[d+24>>2]=0;break}}else{c[19396>>2]=a|h;c[g>>2]=d;c[d+24>>2]=g;c[d+12>>2]=d;c[d+8>>2]=d}}while(0);w=(c[19424>>2]|0)+ -1|0;c[19424>>2]=w;if((w|0)==0){d=19848|0}else{i=b;return}while(1){d=c[d>>2]|0;if((d|0)==0){break}else{d=d+8|0}}c[19424>>2]=-1;i=b;return}function Ue(){}function Ve(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){D=b>>c;return a>>>c|(b&(1<>c-32|0}function We(b){b=b|0;var c=0;c=a[n+(b>>>24)>>0]|0;if((c|0)<8)return c|0;c=a[n+(b>>16&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[n+(b>>8&255)>>0]|0;if((c|0)<8)return c+16|0;return(a[n+(b&255)>>0]|0)+24|0}function Xe(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;i=b&3;h=d|d<<8|d<<16|d<<24;g=f&~3;if(i){i=b+4-i|0;while((b|0)<(i|0)){a[b>>0]=d;b=b+1|0}}while((b|0)<(g|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return b-e|0}function Ye(b){b=b|0;var c=0;c=b;while(a[c>>0]|0){c=c+1|0}return c-b|0}function Ze(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((e|0)>=4096)return ma(b|0,d|0,e|0)|0;f=b|0;if((b&3)==(d&3)){while(b&3){if((e|0)==0)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function _e(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return(D=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function $e(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{Ze(b,c,d)|0}return b|0}function af(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;b=b-d-(c>>>0>a>>>0|0)>>>0;return(D=b,a-c>>>0|0)|0}function bf(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){D=b<>>32-c;return a<>>c;return a>>>c|(b&(1<>>c-32|0}function df(b){b=b|0;var c=0;c=a[m+(b&255)>>0]|0;if((c|0)<8)return c|0;c=a[m+(b>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[m+(b>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return(a[m+(b>>>24)>>0]|0)+24|0}function ef(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;d=b&65535;c=$(d,f)|0;e=a>>>16;d=(c>>>16)+($(d,e)|0)|0;b=b>>>16;a=$(b,f)|0;return(D=(d>>>16)+($(b,e)|0)+(((d&65535)+a|0)>>>16)|0,d+a<<16|c&65535|0)|0}function ff(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=b>>31|((b|0)<0?-1:0)<<1;i=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;f=d>>31|((d|0)<0?-1:0)<<1;e=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;h=af(j^a,i^b,j,i)|0;g=D;b=f^j;a=e^i;a=af((lf(h,g,af(f^c,e^d,f,e)|0,D,0)|0)^b,D^a,b,a)|0;return a|0}function gf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+8|0;j=f|0;h=b>>31|((b|0)<0?-1:0)<<1;g=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;l=e>>31|((e|0)<0?-1:0)<<1;k=((e|0)<0?-1:0)>>31|((e|0)<0?-1:0)<<1;b=af(h^a,g^b,h,g)|0;a=D;lf(b,a,af(l^d,k^e,l,k)|0,D,j)|0;a=af(c[j>>2]^h,c[j+4>>2]^g,h,g)|0;b=D;i=f;return(D=b,a)|0}function hf(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;a=ef(e,f)|0;c=D;return(D=($(b,f)|0)+($(d,e)|0)+c|c&0,a|0|0)|0}function jf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=lf(a,b,c,d,0)|0;return a|0}function kf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;g=i;i=i+8|0;f=g|0;lf(a,b,d,e,f)|0;i=g;return(D=c[f+4>>2]|0,c[f>>2]|0)|0}function lf(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;h=a;j=b;i=j;l=d;g=e;k=g;if((i|0)==0){g=(f|0)!=0;if((k|0)==0){if(g){c[f>>2]=(h>>>0)%(l>>>0);c[f+4>>2]=0}k=0;m=(h>>>0)/(l>>>0)>>>0;return(D=k,m)|0}else{if(!g){l=0;m=0;return(D=l,m)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;l=0;m=0;return(D=l,m)|0}}m=(k|0)==0;do{if((l|0)!=0){if(!m){k=(We(k|0)|0)-(We(i|0)|0)|0;if(k>>>0<=31){m=k+1|0;l=31-k|0;a=k-31>>31;j=m;b=h>>>(m>>>0)&a|i<>>(m>>>0)&a;k=0;l=h<>2]=a|0;c[f+4>>2]=j|b&0;l=0;m=0;return(D=l,m)|0}k=l-1|0;if((k&l|0)!=0){l=(We(l|0)|0)+33-(We(i|0)|0)|0;p=64-l|0;m=32-l|0;n=m>>31;o=l-32|0;a=o>>31;j=l;b=m-1>>31&i>>>(o>>>0)|(i<>>(l>>>0))&a;a=a&i>>>(l>>>0);k=h<>>(o>>>0))&n|h<>31;break}if((f|0)!=0){c[f>>2]=k&h;c[f+4>>2]=0}if((l|0)==1){o=j|b&0;p=a|0|0;return(D=o,p)|0}else{p=df(l|0)|0;o=i>>>(p>>>0)|0;p=i<<32-p|h>>>(p>>>0)|0;return(D=o,p)|0}}else{if(m){if((f|0)!=0){c[f>>2]=(i>>>0)%(l>>>0);c[f+4>>2]=0}o=0;p=(i>>>0)/(l>>>0)>>>0;return(D=o,p)|0}if((h|0)==0){if((f|0)!=0){c[f>>2]=0;c[f+4>>2]=(i>>>0)%(k>>>0)}o=0;p=(i>>>0)/(k>>>0)>>>0;return(D=o,p)|0}l=k-1|0;if((l&k|0)==0){if((f|0)!=0){c[f>>2]=a|0;c[f+4>>2]=l&i|b&0}o=0;p=i>>>((df(k|0)|0)>>>0);return(D=o,p)|0}k=(We(k|0)|0)-(We(i|0)|0)|0;if(k>>>0<=30){a=k+1|0;l=31-k|0;j=a;b=i<>>(a>>>0);a=i>>>(a>>>0);k=0;l=h<>2]=a|0;c[f+4>>2]=j|b&0;o=0;p=0;return(D=o,p)|0}}while(0);if((j|0)==0){g=l;e=0;i=0}else{h=d|0|0;g=g|e&0;e=_e(h,g,-1,-1)|0;d=D;i=0;do{m=l;l=k>>>31|l<<1;k=i|k<<1;m=b<<1|m>>>31|0;n=b>>>31|a<<1|0;af(e,d,m,n)|0;p=D;o=p>>31|((p|0)<0?-1:0)<<1;i=o&1;b=af(m,n,o&h,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&g)|0;a=D;j=j-1|0}while((j|0)!=0);g=l;e=0}h=0;if((f|0)!=0){c[f>>2]=b;c[f+4>>2]=a}o=(k|0)>>>31|(g|h)<<1|(h<<1|k>>>31)&0|e;p=(k<<1|0>>>31)&-2|i;return(D=o,p)|0} - - - -function ec(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 j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;u=i;i=i+176|0;n=u+4|0;x=u+144|0;B=u+124|0;p=u+120|0;v=u+132|0;m=u+140|0;o=u+148|0;q=u+156|0;r=u+8|0;s=u+160|0;t=u+128|0;l=u+12|0;j=u;w=u+16|0;y=u+136|0;z=u+164|0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w+60>>2]|0)+(c[w+68>>2]|0));B=($(b[z>>1]|0,(c[w+56>>2]>>16&65535)<<16>>16)|0)<<1;B=(c[w>>2]|0)+(B+(($(b[z>>1]|0,c[w+56>>2]&65535&65535)|0)>>15))|0;a=($(b[A>>1]|0,(c[w+64>>2]>>16&65535)<<16>>16)|0)<<1;c[w+40>>2]=B+(a+(($(b[A>>1]|0,c[w+64>>2]&65535&65535)|0)>>15));a=($(b[z>>1]|0,(c[w+60>>2]>>16&65535)<<16>>16)|0)<<1;a=(c[w+4>>2]|0)+(a+(($(b[z>>1]|0,c[w+60>>2]&65535&65535)|0)>>15))|0;B=($(b[A>>1]|0,(c[w+68>>2]>>16&65535)<<16>>16)|0)<<1;c[w+44>>2]=a+(B+(($(b[A>>1]|0,c[w+68>>2]&65535&65535)|0)>>15));B=($(b[z+2>>1]|0,(c[w+84>>2]>>16&65535)<<16>>16)|0)<<1;B=B+(($(b[z+2>>1]|0,c[w+84>>2]&65535&65535)|0)>>15)|0;a=($(b[A+2>>1]|0,(c[w+76>>2]>>16&65535)<<16>>16)|0)<<1;c[w+48>>2]=B+(a+(($(b[A+2>>1]|0,c[w+76>>2]&65535&65535)|0)>>15));a=($(b[z+2>>1]|0,(c[w+80>>2]>>16&65535)<<16>>16)|0)<<1;a=0-(a+(($(b[z+2>>1]|0,c[w+80>>2]&65535&65535)|0)>>15))|0;B=($(b[A+2>>1]|0,(c[w+72>>2]>>16&65535)<<16>>16)|0)<<1;c[w+52>>2]=a-(B+(($(b[A+2>>1]|0,c[w+72>>2]&65535&65535)|0)>>15));c[c[q>>2]>>2]=(c[w+40>>2]|0)-(c[w+48>>2]|0);c[(c[q>>2]|0)+4>>2]=(c[w+44>>2]|0)-(c[w+52>>2]|0);c[c[t>>2]>>2]=(c[w+40>>2]|0)+(c[w+48>>2]|0);c[(c[t>>2]|0)+4>>2]=(c[w+44>>2]|0)+(c[w+52>>2]|0);B=($(b[A>>1]|0,(c[w+56>>2]>>16&65535)<<16>>16)|0)<<1;B=(c[w>>2]|0)+(B+(($(b[A>>1]|0,c[w+56>>2]&65535&65535)|0)>>15))|0;a=($(b[z>>1]|0,(c[w+64>>2]>>16&65535)<<16>>16)|0)<<1;c[w+88>>2]=B+(a+(($(b[z>>1]|0,c[w+64>>2]&65535&65535)|0)>>15));a=($(b[A>>1]|0,(c[w+60>>2]>>16&65535)<<16>>16)|0)<<1;a=(c[w+4>>2]|0)+(a+(($(b[A>>1]|0,c[w+60>>2]&65535&65535)|0)>>15))|0;B=($(b[z>>1]|0,(c[w+68>>2]>>16&65535)<<16>>16)|0)<<1;c[w+92>>2]=a+(B+(($(b[z>>1]|0,c[w+68>>2]&65535&65535)|0)>>15));B=($(b[A+2>>1]|0,(c[w+84>>2]>>16&65535)<<16>>16)|0)<<1;B=0-(B+(($(b[A+2>>1]|0,c[w+84>>2]&65535&65535)|0)>>15))|0;a=($(b[z+2>>1]|0,(c[w+76>>2]>>16&65535)<<16>>16)|0)<<1;c[w+96>>2]=B+(a+(($(b[z+2>>1]|0,c[w+76>>2]&65535&65535)|0)>>15));a=($(b[A+2>>1]|0,(c[w+80>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[A+2>>1]|0,c[w+80>>2]&65535&65535)|0)>>15)|0;B=($(b[z+2>>1]|0,(c[w+72>>2]>>16&65535)<<16>>16)|0)<<1;c[w+100>>2]=a-(B+(($(b[z+2>>1]|0,c[w+72>>2]&65535&65535)|0)>>15));c[c[r>>2]>>2]=(c[w+88>>2]|0)+(c[w+96>>2]|0);c[(c[r>>2]|0)+4>>2]=(c[w+92>>2]|0)+(c[w+100>>2]|0);c[c[s>>2]>>2]=(c[w+88>>2]|0)-(c[w+96>>2]|0);c[(c[s>>2]|0)+4>>2]=(c[w+92>>2]|0)-(c[w+100>>2]|0);c[o>>2]=(c[o>>2]|0)+8;c[q>>2]=(c[q>>2]|0)+8;c[r>>2]=(c[r>>2]|0)+8;c[s>>2]=(c[s>>2]|0)+8;c[t>>2]=(c[t>>2]|0)+8;c[j>>2]=(c[j>>2]|0)+1}c[l>>2]=(c[l>>2]|0)+1}i=u;return}function fc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+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=($(c[f>>2]|0,16384-(c[e>>2]|0)|0)|0)>>>15;i=d;return a|0}function gc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+32|0;k=e+8|0;g=e+16|0;m=e+20|0;h=e+24|0;f=e+4|0;l=e;j=e+12|0;c[k>>2]=a;c[g>>2]=b;c[m>>2]=d;c[h>>2]=0;c[l>>2]=Mb(c[k>>2]|0,15)|0;c[f>>2]=0;do{if((c[l>>2]|0)>>>0>=(c[g>>2]|0)>>>0){c[h>>2]=(c[h>>2]|0)+1;c[f>>2]=c[g>>2];c[g>>2]=(fc(c[g>>2]|0,c[m>>2]|0)|0)+1;while(1){if((c[g>>2]|0)>>>0>1){b=(c[l>>2]|0)>>>0>=((c[f>>2]|0)+(c[g>>2]<<1)|0)>>>0}else{b=0}d=c[g>>2]|0;if(!b){break}c[g>>2]=d<<1;c[f>>2]=(c[f>>2]|0)+(c[g>>2]|0);c[g>>2]=($((c[g>>2]|0)-2|0,c[m>>2]|0)|0)>>>15;c[g>>2]=(c[g>>2]|0)+1;c[h>>2]=(c[h>>2]|0)+1}if(d>>>0<=1){c[j>>2]=((c[l>>2]|0)-(c[f>>2]|0)|0)>>>1;c[h>>2]=(c[h>>2]|0)+(c[j>>2]|0);c[f>>2]=(c[f>>2]|0)+(c[j>>2]<<1)}if((c[l>>2]|0)>>>0<((c[f>>2]|0)+(c[g>>2]|0)|0)>>>0){c[h>>2]=0-(c[h>>2]|0);break}else{c[f>>2]=(c[f>>2]|0)+(c[g>>2]|0);break}}}while(0);k=c[k>>2]|0;j=c[f>>2]|0;if(!(((c[f>>2]|0)+(c[g>>2]|0)|0)>>>0<32768)){a=32768;Nb(k,j,a,32768);a=c[h>>2]|0;i=e;return a|0}a=(c[f>>2]|0)+(c[g>>2]|0)|0;Nb(k,j,a,32768);a=c[h>>2]|0;i=e;return a|0}function hc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+32|0;g=b+16|0;e=b+12|0;d=b+8|0;f=b+4|0;h=b;c[g>>2]=a;c[d>>2]=0;c[f>>2]=32-(We(c[g>>2]|0)|0)-1>>1;c[e>>2]=1<>2];do{c[h>>2]=(c[d>>2]<<1)+(c[e>>2]|0)<>2];if((c[h>>2]|0)>>>0<=(c[g>>2]|0)>>>0){c[d>>2]=(c[d>>2]|0)+(c[e>>2]|0);c[g>>2]=(c[g>>2]|0)-(c[h>>2]|0)}c[e>>2]=(c[e>>2]|0)>>>1;c[f>>2]=(c[f>>2]|0)+ -1}while((c[f>>2]|0)>=0);i=b;return c[d>>2]|0}function ic(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+32|0;l=e+8|0;h=e+16|0;f=e+20|0;g=e+24|0;j=e+4|0;k=e;m=e+12|0;c[h>>2]=a;c[f>>2]=d;c[m>>2]=((jc(c[f>>2]|0)|0)<<16>>16)-29;a=c[h>>2]|0;d=c[m>>2]|0;if((c[m>>2]|0)>0){d=a>>d}else{d=a<<0-d}c[h>>2]=d;d=c[f>>2]|0;a=c[m>>2]|0;if((c[m>>2]|0)>0){m=d>>a}else{m=d<<0-a}c[f>>2]=m;b[g>>1]=(kc(((c[f>>2]|0)+32768>>16&65535)<<16>>16)|0)+4>>3;a=($(b[g>>1]|0,(c[h>>2]>>16&65535)<<16>>16)|0)<<1;c[j>>2]=a+(($(b[g>>1]|0,c[h>>2]&65535&65535)|0)>>15);a=($((c[j>>2]>>16&65535)<<16>>16,(c[f>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($((c[j>>2]>>16&65535)<<16>>16,c[f>>2]&65535&65535)|0)>>15)|0;c[k>>2]=((c[h>>2]|0)+2>>2)-(a+(($((c[f>>2]>>16&65535)<<16>>16,c[j>>2]&65535&65535)|0)>>15));a=($(b[g>>1]|0,(c[k>>2]>>16&65535)<<16>>16)|0)<<1;c[j>>2]=(c[j>>2]|0)+(a+(($(b[g>>1]|0,c[k>>2]&65535&65535)|0)>>15)<<2);if((c[j>>2]|0)>=536870912){c[l>>2]=2147483647;a=c[l>>2]|0;i=e;return a|0}if((c[j>>2]|0)<=-536870912){c[l>>2]=-2147483647;a=c[l>>2]|0;i=e;return a|0}else{c[l>>2]=c[j>>2]<<2;a=c[l>>2]|0;i=e;return a|0}return 0}function jc(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=32-(We(c[d>>2]|0)|0)-1&65535;i=b;return a|0}function kc(a){a=a|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;h=d+4|0;e=d;f=d+10|0;g=d+8|0;c[h>>2]=a;c[e>>2]=(jc(c[h>>2]|0)|0)<<16>>16;h=c[h>>2]|0;a=(c[e>>2]|0)-15|0;if(((c[e>>2]|0)-15|0)>0){a=h>>a}else{a=h<<0-a}b[f>>1]=a-32768;b[g>>1]=30840+((($(-15420,b[f>>1]|0)|0)>>15&65535)<<16>>16);h=(($(b[g>>1]|0,b[f>>1]|0)|0)>>15&65535)<<16>>16;b[g>>1]=(b[g>>1]|0)-((($(b[g>>1]|0,(h+(((b[g>>1]|0)+ -32768&65535)<<16>>16)&65535)<<16>>16)|0)>>15&65535)<<16>>16);f=(($(b[g>>1]|0,b[f>>1]|0)|0)>>15&65535)<<16>>16;b[g>>1]=(b[g>>1]|0)-((1+((($(b[g>>1]|0,(f+(((b[g>>1]|0)+ -32768&65535)<<16>>16)&65535)<<16>>16)|0)>>15&65535)<<16>>16)&65535)<<16>>16);g=b[g>>1]|0;f=(c[e>>2]|0)-16|0;if(((c[e>>2]|0)-16|0)>0){h=g>>f;i=d;return h|0}else{h=g<<0-f;i=d;return h|0}return 0}function lc(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+16|0;j=d;h=d+10|0;f=d+8|0;g=d+6|0;e=d+4|0;c[j>>2]=a;b[h>>1]=(c[j>>2]|0)-32768;b[f>>1]=23557+((($(b[h>>1]|0,((((b[h>>1]|0)*6713>>15&65535)<<16>>16)+ -13490&65535)<<16>>16)|0)>>15&65535)<<16>>16);b[g>>1]=($(b[f>>1]|0,b[f>>1]|0)|0)>>15;a=(($(b[g>>1]|0,b[h>>1]|0)|0)>>15&65535)<<16>>16;b[e>>1]=(((a+(b[g>>1]|0)&65535)<<16>>16)-16384&65535)<<1;a=(b[f>>1]|0)+((($(b[f>>1]|0,(($(b[e>>1]|0,((((b[e>>1]|0)*12288>>15&65535)<<16>>16)-16384&65535)<<16>>16)|0)>>15&65535)<<16>>16)|0)>>15&65535)<<16>>16)&65535;i=d;return a|0}function mc(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;f=i;i=i+32|0;d=f+12|0;h=f+8|0;g=f+4|0;j=f+16|0;e=f;c[h>>2]=a;if((c[h>>2]|0)==0){c[d>>2]=0;k=c[d>>2]|0;i=f;return k|0}if((c[h>>2]|0)>=1073741824){c[d>>2]=32767;k=c[d>>2]|0;i=f;return k|0}c[g>>2]=((jc(c[h>>2]|0)|0)<<16>>16>>1)-7;k=c[h>>2]|0;a=c[g>>2]<<1;if((c[g>>2]<<1|0)>0){a=k>>a}else{a=k<<0-a}c[h>>2]=a;b[j>>1]=(c[h>>2]|0)-32768;c[e>>2]=((b[2724]|0)+((($(b[j>>1]|0,((b[5450>>1]|0)+((($(b[j>>1]|0,((b[5452>>1]|0)+((($(b[j>>1]|0,((b[5454>>1]|0)+((($(b[j>>1]|0,b[5456>>1]|0)|0)>>15&65535)<<16>>16)&65535)<<16>>16)|0)>>15&65535)<<16>>16)&65535)<<16>>16)|0)>>15&65535)<<16>>16)&65535)<<16>>16)|0)>>15&65535)<<16>>16)&65535)<<16>>16;j=c[e>>2]|0;h=7-(c[g>>2]|0)|0;if((7-(c[g>>2]|0)|0)>0){g=j>>h}else{g=j<<0-h}c[e>>2]=g;c[d>>2]=c[e>>2];k=c[d>>2]|0;i=f;return k|0}function nc(a){a=a|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[f>>2]=a;c[f>>2]=c[f>>2]&131071;if((c[f>>2]|0)>65536){c[f>>2]=131072-(c[f>>2]|0)}a=c[f>>2]|0;do{if((c[f>>2]&32767|0)!=0){f=c[f>>2]|0;if((a|0)<32768){b[e>>1]=oc(f&65535)|0;break}else{b[e>>1]=0-((oc(65536-f&65535)|0)<<16>>16);break}}else{if((a&65535|0)!=0){b[e>>1]=0;break}if((c[f>>2]&131071|0)!=0){b[e>>1]=-32767;break}else{b[e>>1]=32767;break}}}while(0);i=d;return b[e>>1]|0}function oc(a){a=a|0;var c=0,d=0,e=0;c=i;i=i+16|0;e=c+2|0;d=c;b[e>>1]=a;b[d>>1]=16384+($(b[e>>1]|0,b[e>>1]|0)|0)>>15;if(32766<(32767-(b[d>>1]|0)+(16384+($(b[d>>1]|0,((16384+($(b[d>>1]|0,(8277+(16384+($(-626,b[d>>1]|0)|0)>>15)&65535)<<16>>16)|0)>>15)+ -7651&65535)<<16>>16)|0)>>15)|0)){e=32766;e=e&65535;e=e<<16>>16;e=1+e|0;e=e&65535;i=c;return e|0}e=32767-(b[d>>1]|0)+(16384+($(b[d>>1]|0,((16384+($(b[d>>1]|0,(8277+(16384+($(-626,b[d>>1]|0)|0)>>15)&65535)<<16>>16)|0)>>15)+ -7651&65535)<<16>>16)|0)>>15)|0;e=e&65535;e=e<<16>>16;e=1+e|0;e=e&65535;i=c;return e|0}function pc(a,d,e,f,g,h,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=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c[C>>2]|0)<<1)>>1]|0;a=($(b[A>>1]|0,(c[x>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[A>>1]|0,c[x>>2]&65535&65535)|0)>>15)|0;d=($(b[B>>1]|0,(c[y>>2]>>16&65535)<<16>>16)|0)<<1;c[k>>2]=a+(d+(($(b[B>>1]|0,c[y>>2]&65535&65535)|0)>>15));d=($(b[B>>1]|0,(c[x>>2]>>16&65535)<<16>>16)|0)<<1;d=d+(($(b[B>>1]|0,c[x>>2]&65535&65535)|0)>>15)|0;a=($(b[A>>1]|0,(c[y>>2]>>16&65535)<<16>>16)|0)<<1;c[D>>2]=d-(a+(($(b[A>>1]|0,c[y>>2]&65535&65535)|0)>>15));c[x>>2]=c[(c[E>>2]|0)+4>>2];c[y>>2]=c[c[E>>2]>>2];c[c[w>>2]>>2]=c[k>>2];c[(c[E>>2]|0)+4>>2]=c[D>>2];b[A>>1]=b[(c[z>>2]|0)+((c[v>>2]|0)-(c[C>>2]|0)-1<<1)>>1]|0;b[B>>1]=b[(c[z>>2]|0)+((c[l>>2]|0)-(c[C>>2]|0)-1<<1)>>1]|0;a=($(b[A>>1]|0,(c[x>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[A>>1]|0,c[x>>2]&65535&65535)|0)>>15)|0;d=($(b[B>>1]|0,(c[y>>2]>>16&65535)<<16>>16)|0)<<1;c[k>>2]=a+(d+(($(b[B>>1]|0,c[y>>2]&65535&65535)|0)>>15));d=($(b[B>>1]|0,(c[x>>2]>>16&65535)<<16>>16)|0)<<1;d=d+(($(b[B>>1]|0,c[x>>2]&65535&65535)|0)>>15)|0;a=($(b[A>>1]|0,(c[y>>2]>>16&65535)<<16>>16)|0)<<1;c[D>>2]=d-(a+(($(b[A>>1]|0,c[y>>2]&65535&65535)|0)>>15));c[c[E>>2]>>2]=c[k>>2];c[(c[w>>2]|0)+4>>2]=c[D>>2];c[w>>2]=(c[w>>2]|0)+8;c[E>>2]=(c[E>>2]|0)+ -8;c[C>>2]=(c[C>>2]|0)+1}c[n>>2]=(c[t>>2]|0)+(c[m>>2]<<2)+ -4;c[p>>2]=c[t>>2];c[s>>2]=c[u>>2];c[r>>2]=(c[u>>2]|0)+(c[m>>2]<<1)+ -2;c[C>>2]=0;while(1){if((c[C>>2]|0)>=((c[m>>2]|0)/2|0|0)){break}c[o>>2]=c[c[n>>2]>>2];c[q>>2]=c[c[p>>2]>>2];a=($(b[c[r>>2]>>1]|0,(c[q>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[c[r>>2]>>1]|0,c[q>>2]&65535&65535)|0)>>15)|0;d=($(b[c[s>>2]>>1]|0,(c[o>>2]>>16&65535)<<16>>16)|0)<<1;d=a-(d+(($(b[c[s>>2]>>1]|0,c[o>>2]&65535&65535)|0)>>15))|0;a=c[p>>2]|0;c[p>>2]=a+4;c[a>>2]=d;a=($(b[c[s>>2]>>1]|0,(c[q>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[c[s>>2]>>1]|0,c[q>>2]&65535&65535)|0)>>15)|0;d=($(b[c[r>>2]>>1]|0,(c[o>>2]>>16&65535)<<16>>16)|0)<<1;d=a+(d+(($(b[c[r>>2]>>1]|0,c[o>>2]&65535&65535)|0)>>15))|0;a=c[n>>2]|0;c[n>>2]=a+ -4;c[a>>2]=d;c[s>>2]=(c[s>>2]|0)+2;c[r>>2]=(c[r>>2]|0)+ -2;c[C>>2]=(c[C>>2]|0)+1}i=F;return}function qc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+32|0;h=f+20|0;k=f+16|0;l=f+12|0;g=f+8|0;e=f+4|0;j=f;c[k>>2]=a;c[l>>2]=b;c[g>>2]=d;c[e>>2]=0;a:while(1){if((c[e>>2]|0)>=1){j=12;break}c[j>>2]=0;while(1){if((c[j>>2]|0)>=4){break}if((c[k>>2]|0)==(c[c[5464+(c[e>>2]<<2)>>2]>>2]|0)?(c[l>>2]<>2]|0)==($(c[(c[5464+(c[e>>2]<<2)>>2]|0)+36>>2]|0,c[(c[5464+(c[e>>2]<<2)>>2]|0)+32>>2]|0)|0):0){j=7;break a}c[j>>2]=(c[j>>2]|0)+1}c[e>>2]=(c[e>>2]|0)+1}if((j|0)==7){if((c[g>>2]|0)!=0){c[c[g>>2]>>2]=0}c[h>>2]=c[5464+(c[e>>2]<<2)>>2];a=c[h>>2]|0;i=f;return a|0}else if((j|0)==12){if((c[g>>2]|0)!=0){c[c[g>>2]>>2]=-1}c[h>>2]=0;a=c[h>>2]|0;i=f;return a|0}return 0}function rc(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;o=i;i=i+96|0;s=o+52|0;l=o+32|0;m=o+4|0;v=o+8|0;h=o+48|0;p=o;q=o+12|0;u=o+56|0;r=o+64|0;n=o+72|0;j=o+84|0;k=o+82|0;t=o+44|0;w=o+36|0;x=o+40|0;c[s>>2]=a;c[l>>2]=d;c[m>>2]=e;c[v>>2]=f;c[h>>2]=g;b[u>>1]=32767;b[n+0>>1]=0;b[n+2>>1]=0;b[n+4>>1]=0;b[n+6>>1]=0;b[n+8>>1]=0;b[k>>1]=26214;c[w>>2]=sc(c[c[s>>2]>>2]|0,c[m>>2]|0)|0;if((c[v>>2]|0)==2){c[x>>2]=sc(c[(c[s>>2]|0)+4>>2]|0,c[m>>2]|0)|0;c[w>>2]=(c[w>>2]|0)>(c[x>>2]|0)?c[w>>2]|0:c[x>>2]|0}if((c[w>>2]|0)<1){c[w>>2]=1}a=((tc(c[w>>2]|0)|0)<<16>>16)-10|0;c[t>>2]=a;c[t>>2]=(c[t>>2]|0)<0?0:a;if((c[v>>2]|0)==2){c[t>>2]=(c[t>>2]|0)+1}c[p>>2]=1;while(1){if((c[p>>2]|0)>=(c[m>>2]>>1|0)){break}b[(c[l>>2]|0)+(c[p>>2]<<1)>>1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,4);c[p>>2]=0;while(1){if((c[p>>2]|0)>=4){break}b[u>>1]=(b[u>>1]|0)*29491>>15;a=($(b[r+(c[p>>2]<<1)>>1]|0,b[u>>1]|0)|0)>>15&65535;b[r+(c[p>>2]<<1)>>1]=a;c[p>>2]=(c[p>>2]|0)+1}b[j>>1]=(b[r>>1]|0)+3277;b[j+2>>1]=(b[r+2>>1]|0)+(($(b[k>>1]|0,b[r>>1]|0)|0)>>15);b[j+4>>1]=(b[r+4>>1]|0)+(($(b[k>>1]|0,b[r+2>>1]|0)|0)>>15);b[j+6>>1]=(b[r+6>>1]|0)+(($(b[k>>1]|0,b[r+4>>1]|0)|0)>>15);b[j+8>>1]=($(b[k>>1]|0,b[r+6>>1]|0)|0)>>15;uc(c[l>>2]|0,j,c[l>>2]|0,c[m>>2]>>1,n);i=o;return}function sc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;e=i;i=i+32|0;g=e+16|0;j=e+12|0;d=e+8|0;h=e+4|0;f=e;c[g>>2]=a;c[j>>2]=b;c[h>>2]=0;c[f>>2]=0;c[d>>2]=0;while(1){b=c[h>>2]|0;if((c[d>>2]|0)>=(c[j>>2]|0)){break}if((b|0)>(c[(c[g>>2]|0)+(c[d>>2]<<2)>>2]|0)){b=c[h>>2]|0}else{b=c[(c[g>>2]|0)+(c[d>>2]<<2)>>2]|0}c[h>>2]=b;if((c[f>>2]|0)<(c[(c[g>>2]|0)+(c[d>>2]<<2)>>2]|0)){b=c[f>>2]|0}else{b=c[(c[g>>2]|0)+(c[d>>2]<<2)>>2]|0}c[f>>2]=b;c[d>>2]=(c[d>>2]|0)+1}if((b|0)>(0-(c[f>>2]|0)|0)){a=c[h>>2]|0;i=e;return a|0}else{a=0-(c[f>>2]|0)|0;i=e;return a|0}return 0}function tc(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=32-(We(c[d>>2]|0)|0)-1&65535;i=b;return a|0}function uc(a,d,e,f,g){a=a|0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>>2]|0;d=a-d|0;a=c[y>>2]|0;c[a>>2]=d;a=c[z>>2]|0;na(a|0);i=A;return}else{c[k>>2]=0;a=c[x>>2]|0;a=a<<1;d=c[k>>2]|0;d=a-d|0;a=c[y>>2]|0;c[a>>2]=d;a=c[z>>2]|0;na(a|0);i=A;return}}c[k>>2]=0;a=c[x>>2]|0;a=a<<1;d=c[k>>2]|0;d=a-d|0;a=c[y>>2]|0;c[a>>2]=d;a=c[z>>2]|0;na(a|0);i=A;return}function zc(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;h=f+8|0;k=f+4|0;e=f;j=f+14|0;g=f+12|0;c[h>>2]=a;c[k>>2]=d;b[j>>1]=0;b[g>>1]=0;c[e>>2]=0;while(1){d=b[j>>1]|0;if((c[e>>2]|0)>=(c[k>>2]|0)){break}if((d|0)>(b[(c[h>>2]|0)+(c[e>>2]<<1)>>1]|0)){d=b[j>>1]|0}else{d=b[(c[h>>2]|0)+(c[e>>2]<<1)>>1]|0}b[j>>1]=d<<16>>16;if((b[g>>1]|0)<(b[(c[h>>2]|0)+(c[e>>2]<<1)>>1]|0)){d=b[g>>1]|0}else{d=b[(c[h>>2]|0)+(c[e>>2]<<1)>>1]|0}b[g>>1]=d<<16>>16;c[e>>2]=(c[e>>2]|0)+1}if((d|0)>(0-(b[g>>1]|0)|0)){a=b[j>>1]|0;i=f;return a|0}else{a=0-(b[g>>1]|0)|0;i=f;return a|0}return 0}function Ac(a,d,e,f,g,h,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;v=i;i=i+80|0;q=v+8|0;u=v+16|0;l=v+44|0;t=v;x=v+40|0;w=v+48|0;z=v+52|0;k=v+56|0;y=v+4|0;p=v+24|0;o=v+60|0;n=v+32|0;s=v+20|0;m=v+64|0;r=v+12|0;c[q>>2]=a;c[u>>2]=d;c[l>>2]=e;c[t>>2]=f;c[x>>2]=g;c[w>>2]=h;c[z>>2]=j;c[p>>2]=1;c[s>>2]=((tc(c[z>>2]|0)|0)<<16>>16)-14;b[o>>1]=-1;b[o+2>>1]=-1;c[n>>2]=0;c[n+4>>2]=0;c[c[x>>2]>>2]=0;c[(c[x>>2]|0)+4>>2]=1;c[y>>2]=0;while(1){if((c[y>>2]|0)>=(c[l>>2]|0)){break}z=$(b[(c[u>>2]|0)+(c[y>>2]<<1)>>1]|0,b[(c[u>>2]|0)+(c[y>>2]<<1)>>1]|0)|0;c[p>>2]=(c[p>>2]|0)+(z>>c[w>>2]);c[y>>2]=(c[y>>2]|0)+1}c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[t>>2]|0)){break}do{if((c[(c[q>>2]|0)+(c[k>>2]<<2)>>2]|0)>0){y=c[(c[q>>2]|0)+(c[k>>2]<<2)>>2]|0;j=c[s>>2]|0;if((c[s>>2]|0)>0){j=y>>j}else{j=y<<0-j}c[r>>2]=(j&65535)<<16>>16;b[m>>1]=($((c[r>>2]&65535)<<16>>16,(c[r>>2]&65535)<<16>>16)|0)>>15;a=($(b[m>>1]|0,(c[n+4>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[m>>1]|0,c[n+4>>2]&65535&65535)|0)>>15)|0;z=($(b[o+2>>1]|0,(c[p>>2]>>16&65535)<<16>>16)|0)<<1;if((a|0)>(z+(($(b[o+2>>1]|0,c[p>>2]&65535&65535)|0)>>15)|0)){a=($(b[m>>1]|0,(c[n>>2]>>16&65535)<<16>>16)|0)<<1;a=a+(($(b[m>>1]|0,c[n>>2]&65535&65535)|0)>>15)|0;z=($(b[o>>1]|0,(c[p>>2]>>16&65535)<<16>>16)|0)<<1;if((a|0)>(z+(($(b[o>>1]|0,c[p>>2]&65535&65535)|0)>>15)|0)){b[o+2>>1]=b[o>>1]|0;c[n+4>>2]=c[n>>2];c[(c[x>>2]|0)+4>>2]=c[c[x>>2]>>2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H=c[D>>2]|0;c[E>>2]=1;na(c[F>>2]|0);i=G;return H|0}function Jc(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 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;s=i;i=i+48|0;p=s+12|0;n=s+16|0;k=s+8|0;m=s+20|0;u=s+28|0;j=s;l=s+32|0;q=s+36|0;r=s+38|0;v=s+42|0;w=s+40|0;o=s+4|0;t=s+24|0;c[p>>2]=a;c[n>>2]=d;c[k>>2]=e;c[m>>2]=f;c[u>>2]=g;c[j>>2]=h;c[o>>2]=0;if((c[u>>2]<<1|0)>=(c[n>>2]|0)){i=s;return}if((c[j>>2]|0)==0){i=s;return}c[t>>2]=c[14880+((c[j>>2]|0)-1<<2)>>2];a=(((c[n>>2]&65535)<<16>>16)*32767>>16&65535)<<16>>16;a=($(a,((kc((c[n>>2]|0)+($(c[t>>2]|0,c[u>>2]|0)|0)|0)|0)>>16&65535)<<16>>16)|0)<<1;d=(((c[n>>2]&65535)<<16>>16)*32767>>16&65535)<<16>>16;d=a+(($(d,(kc((c[n>>2]|0)+($(c[t>>2]|0,c[u>>2]|0)|0)|0)|0)&65535&65535)|0)>>15)|0;a=((kc((c[n>>2]|0)+($(c[t>>2]|0,c[u>>2]|0)|0)|0)|0)>>16&65535)<<16>>16;b[v>>1]=d+(($(a,((c[n>>2]&65535)<<16>>16)*32767&65535&65535)|0)>>15);b[w>>1]=($(b[v>>1]|0,b[v>>1]|0)|0)>>15>>1;b[q>>1]=nc(b[w>>1]|0)|0;b[r>>1]=nc(32767-(b[w>>1]|0)|0)|0;a:do{if((c[n>>2]|0)>=(c[m>>2]<<3|0)){c[o>>2]=1;while(1){a=$(c[o>>2]|0,c[o>>2]|0)|0;a=$(a+(c[o>>2]|0)|0,c[m>>2]|0)|0;if((a+(c[m>>2]>>2)|0)>=(c[n>>2]|0)){break a}c[o>>2]=(c[o>>2]|0)+1}}}while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c[q>>2]=(c[q>>2]|0)+1}a=c[m>>2]|0;a=mc(a)|0;a=a&65535;b[j>>1]=a;a=c[l>>2]|0;a=mc(a)|0;a=a&65535;b[k>>1]=a;a=b[k>>1]|0;t=b[j>>1]|0;t=Rc(a,t)|0;t=t<<16>>16;t=t*20861|0;t=t>>15;c[h>>2]=t;t=c[h>>2]|0;i=o;return t|0}function Rc(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+12|0;h=e+10|0;j=e+8|0;g=e+4|0;k=e;b[h>>1]=a;b[j>>1]=d;if((b[h>>1]|0)<(b[j>>1]|0)){a=(b[h>>1]<<15>>16&65535)<<16>>16;a=($(a,((kc(b[j>>1]|0)|0)>>16&65535)<<16>>16)|0)<<1;k=(b[h>>1]<<15>>16&65535)<<16>>16;k=a+(($(k,(kc(b[j>>1]|0)|0)&65535&65535)|0)>>15)|0;a=((kc(b[j>>1]|0)|0)>>16&65535)<<16>>16;a=k+(($(a,b[h>>1]<<15&65535&65535)|0)>>15)|0;c[g>>2]=a;c[g>>2]=(c[g>>2]|0)>=32767?32767:a;b[f>>1]=(Sc(c[g>>2]&65535)|0)<<16>>16>>1;a=b[f>>1]|0;i=e;return a|0}else{a=(b[j>>1]<<15>>16&65535)<<16>>16;a=($(a,((kc(b[h>>1]|0)|0)>>16&65535)<<16>>16)|0)<<1;g=(b[j>>1]<<15>>16&65535)<<16>>16;g=a+(($(g,(kc(b[h>>1]|0)|0)&65535&65535)|0)>>15)|0;a=((kc(b[h>>1]|0)|0)>>16&65535)<<16>>16;a=g+(($(a,b[j>>1]<<15&65535&65535)|0)>>15)|0;c[k>>2]=a;c[k>>2]=(c[k>>2]|0)>=32767?32767:a;b[f>>1]=25736-((Sc(c[k>>2]&65535)|0)<<16>>16>>1);a=b[f>>1]|0;i=e;return a|0}return 0}function Sc(a){a=a|0;var c=0,d=0;c=i;i=i+16|0;d=c;b[d>>1]=a;a=16384+($(b[d>>1]|0,(32767+(16384+($(b[d>>1]|0,((16384+($(b[d>>1]|0,((16384+((b[d>>1]|0)*4936|0)>>15)+ -11943&65535)<<16>>16)|0)>>15)+ -21&65535)<<16>>16)|0)>>15)&65535)<<16>>16)|0)>>15&65535;i=c;return a|0}function Tc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0)>>>0)/((c[d>>2]|0)>>>0)|0|0}function Uc(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;q=i;i=i+48|0;r=q+4|0;s=q+8|0;m=q;o=q+24|0;p=q+20|0;j=q+16|0;h=q+22|0;k=q+12|0;t=q+26|0;u=q+28|0;l=q+30|0;n=q+32|0;c[r>>2]=a;c[s>>2]=d;c[m>>2]=e;b[o>>1]=f;b[p>>1]=g;c[k>>2]=c[r>>2];b[h>>1]=0-(b[p>>1]|0);c[j>>2]=0;while(1){if((c[j>>2]|0)>=((c[s>>2]|0)-(c[m>>2]|0)|0)){break}b[t>>1]=b[c[k>>2]>>1]|0;b[u>>1]=b[(c[k>>2]|0)+(c[m>>2]<<1)>>1]|0;d=$(b[o>>1]|0,b[u>>1]|0)|0;d=d+($(b[p>>1]|0,b[t>>1]|0)|0)+16384>>15&65535;b[(c[k>>2]|0)+(c[m>>2]<<1)>>1]=d;d=$(b[o>>1]|0,b[t>>1]|0)|0;d=d+($(b[h>>1]|0,b[u>>1]|0)|0)+16384>>15&65535;a=c[k>>2]|0;c[k>>2]=a+2;b[a>>1]=d;c[j>>2]=(c[j>>2]|0)+1}c[k>>2]=(c[r>>2]|0)+((c[s>>2]|0)-(c[m>>2]<<1)-1<<1);c[j>>2]=(c[s>>2]|0)-(c[m>>2]<<1)-1;while(1){if((c[j>>2]|0)<0){break}b[l>>1]=b[c[k>>2]>>1]|0;b[n>>1]=b[(c[k>>2]|0)+(c[m>>2]<<1)>>1]|0;d=$(b[o>>1]|0,b[n>>1]|0)|0;d=d+($(b[p>>1]|0,b[l>>1]|0)|0)+16384>>15&65535;b[(c[k>>2]|0)+(c[m>>2]<<1)>>1]=d;d=$(b[o>>1]|0,b[l>>1]|0)|0;d=d+($(b[h>>1]|0,b[n>>1]|0)|0)+16384>>15&65535;a=c[k>>2]|0;c[k>>2]=a+ -2;b[a>>1]=d;c[j>>2]=(c[j>>2]|0)+ -1}i=q;return}function Vc(a){a=a|0;var d=0,e=0,f=0,g=0,h=0;e=i;i=i+16|0;d=e+12|0;f=e+8|0;h=e+4|0;g=e;c[d>>2]=a;c[h>>2]=32767/((c[(c[d>>2]|0)+2340>>2]|0)+1|0)|0;c[g>>2]=0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[d>>2]|0)+2340>>2]|0)){break}c[g>>2]=(c[g>>2]|0)+(c[h>>2]|0);b[(c[d>>2]|0)+4052+(c[f>>2]<<1)>>1]=c[g>>2];c[f>>2]=(c[f>>2]|0)+1}c[(c[d>>2]|0)+4148>>2]=0;c[(c[d>>2]|0)+4152>>2]=3176576;i=e;return}function Wc(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;j=i;i=i+80|0;m=j+12|0;t=j+16|0;h=j+28|0;l=j+4|0;k=j+32|0;r=j+36|0;g=j+40|0;s=j+24|0;q=j+20|0;n=j+48|0;o=j;p=j+8|0;c[m>>2]=a;c[t>>2]=d;c[h>>2]=e;c[l>>2]=f;c[o>>2]=(c[m>>2]|0)+2772;if((c[(c[m>>2]|0)+2316>>2]|0)!=(c[(c[o>>2]|0)+1384>>2]|0)){Vc(c[m>>2]|0);c[(c[o>>2]|0)+1384>>2]=c[(c[m>>2]|0)+2316>>2]}a:do{if((c[(c[m>>2]|0)+4160>>2]|0)==0?(c[(c[m>>2]|0)+4164>>2]|0)==0:0){c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[(c[m>>2]|0)+2340>>2]|0)){break}a=(c[o>>2]|0)+1280+(c[k>>2]<<1)|0;b[a>>1]=(b[a>>1]|0)+((((b[(c[m>>2]|0)+2344+(c[k>>2]<<1)>>1]|0)-(b[(c[o>>2]|0)+1280+(c[k>>2]<<1)>>1]|0)>>16)*16348|0)+(((b[(c[m>>2]|0)+2344+(c[k>>2]<<1)>>1]|0)-(b[(c[o>>2]|0)+1280+(c[k>>2]<<1)>>1]|0)&65535)*16348>>16));c[k>>2]=(c[k>>2]|0)+1}c[s>>2]=0;c[r>>2]=0;c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[(c[m>>2]|0)+2324>>2]|0)){break}if((c[(c[t>>2]|0)+16+(c[k>>2]<<2)>>2]|0)>(c[s>>2]|0)){c[s>>2]=c[(c[t>>2]|0)+16+(c[k>>2]<<2)>>2];c[r>>2]=c[k>>2]}c[k>>2]=(c[k>>2]|0)+1}$e((c[o>>2]|0)+(c[(c[m>>2]|0)+2332>>2]<<2)|0,c[o>>2]|0,($((c[(c[m>>2]|0)+2324>>2]|0)-1|0,c[(c[m>>2]|0)+2332>>2]|0)|0)<<2|0)|0;a=$(c[r>>2]|0,c[(c[m>>2]|0)+2332>>2]|0)|0;Ze(c[o>>2]|0,(c[m>>2]|0)+4+(a<<2)|0,c[(c[m>>2]|0)+2332>>2]<<2|0)|0;c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[(c[m>>2]|0)+2324>>2]|0)){break a}a=(c[o>>2]|0)+1376|0;c[a>>2]=(c[a>>2]|0)+((((c[(c[t>>2]|0)+16+(c[k>>2]<<2)>>2]|0)-(c[(c[o>>2]|0)+1376>>2]|0)>>16)*4634|0)+(((c[(c[t>>2]|0)+16+(c[k>>2]<<2)>>2]|0)-(c[(c[o>>2]|0)+1376>>2]|0)&65535)*4634>>16));c[k>>2]=(c[k>>2]|0)+1}}}while(0);if((c[(c[m>>2]|0)+4160>>2]|0)==0){Xe((c[o>>2]|0)+1312|0,0,c[(c[m>>2]|0)+2340>>2]<<2|0)|0;i=j;return}a=(c[l>>2]|0)+16|0;c[p>>2]=ia()|0;r=i;i=i+((4*a|0)+15&-16)|0;a=$(b[(c[m>>2]|0)+4224>>1]>>16,(c[(c[m>>2]|0)+4244>>2]&65535)<<16>>16)|0;a=a+(($(b[(c[m>>2]|0)+4224>>1]&65535,(c[(c[m>>2]|0)+4244>>2]&65535)<<16>>16)|0)>>16)|0;c[q>>2]=a+($(b[(c[m>>2]|0)+4224>>1]|0,(c[(c[m>>2]|0)+4244>>2]>>15)+1>>1)|0);if((c[q>>2]|0)<2097152?(c[(c[o>>2]|0)+1376>>2]|0)<=8388608:0){a=$(c[q>>2]>>16,(c[q>>2]&65535)<<16>>16)|0;a=a+(($(c[q>>2]&65535,(c[q>>2]&65535)<<16>>16)|0)>>16)|0;c[q>>2]=a+($(c[q>>2]|0,(c[q>>2]>>15)+1>>1)|0);a=$(c[(c[o>>2]|0)+1376>>2]>>16,(c[(c[o>>2]|0)+1376>>2]&65535)<<16>>16)|0;a=a+(($(c[(c[o>>2]|0)+1376>>2]&65535,(c[(c[o>>2]|0)+1376>>2]&65535)<<16>>16)|0)>>16)|0;a=a+($(c[(c[o>>2]|0)+1376>>2]|0,(c[(c[o>>2]|0)+1376>>2]>>15)+1>>1)|0)|0;c[q>>2]=a-(c[q>>2]<<5);c[q>>2]=(Xc(c[q>>2]|0)|0)<<8}else{c[q>>2]=$(c[q>>2]>>16,c[q>>2]>>16)|0;a=$(c[(c[o>>2]|0)+1376>>2]>>16,c[(c[o>>2]|0)+1376>>2]>>16)|0;c[q>>2]=a-(c[q>>2]<<5);c[q>>2]=(Xc(c[q>>2]|0)|0)<<16}Yc(r+64|0,c[o>>2]|0,c[q>>2]|0,c[l>>2]|0,(c[o>>2]|0)+1380|0);fd(n,(c[o>>2]|0)+1280|0,c[(c[m>>2]|0)+2340>>2]|0);s=r+0|0;f=(c[o>>2]|0)+1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=$(c[r+(16+(c[k>>2]|0)-8<<2)>>2]>>16,b[n+14>>1]|0)|0;c[g>>2]=(c[g>>2]|0)+(a+(($(c[r+(16+(c[k>>2]|0)-8<<2)>>2]&65535,b[n+14>>1]|0)|0)>>16));a=$(c[r+(16+(c[k>>2]|0)-9<<2)>>2]>>16,b[n+16>>1]|0)|0;c[g>>2]=(c[g>>2]|0)+(a+(($(c[r+(16+(c[k>>2]|0)-9<<2)>>2]&65535,b[n+16>>1]|0)|0)>>16));a=$(c[r+(16+(c[k>>2]|0)-10<<2)>>2]>>16,b[n+18>>1]|0)|0;c[g>>2]=(c[g>>2]|0)+(a+(($(c[r+(16+(c[k>>2]|0)-10<<2)>>2]&65535,b[n+18>>1]|0)|0)>>16));if((c[(c[m>>2]|0)+2340>>2]|0)==16){a=$(c[r+(16+(c[k>>2]|0)-11<<2)>>2]>>16,b[n+20>>1]|0)|0;c[g>>2]=(c[g>>2]|0)+(a+(($(c[r+(16+(c[k>>2]|0)-11<<2)>>2]&65535,b[n+20>>1]|0)|0)>>16));a=$(c[r+(16+(c[k>>2]|0)-12<<2)>>2]>>16,b[n+22>>1]|0)|0;c[g>>2]=(c[g>>2]|0)+(a+(($(c[r+(16+(c[k>>2]|0)-12<<2)>>2]&65535,b[n+22>>1]|0)|0)>>16));a=$(c[r+(16+(c[k>>2]|0)-13<<2)>>2]>>16,b[n+24>>1]|0)|0;c[g>>2]=(c[g>>2]|0)+(a+(($(c[r+(16+(c[k>>2]|0)-13<<2)>>2]&65535,b[n+24>>1]|0)|0)>>16));a=$(c[r+(16+(c[k>>2]|0)-14<<2)>>2]>>16,b[n+26>>1]|0)|0;c[g>>2]=(c[g>>2]|0)+(a+(($(c[r+(16+(c[k>>2]|0)-14<<2)>>2]&65535,b[n+26>>1]|0)|0)>>16));a=$(c[r+(16+(c[k>>2]|0)-15<<2)>>2]>>16,b[n+28>>1]|0)|0;c[g>>2]=(c[g>>2]|0)+(a+(($(c[r+(16+(c[k>>2]|0)-15<<2)>>2]&65535,b[n+28>>1]|0)|0)>>16));a=$(c[r+(16+(c[k>>2]|0)-16<<2)>>2]>>16,b[n+30>>1]|0)|0;c[g>>2]=(c[g>>2]|0)+(a+(($(c[r+(16+(c[k>>2]|0)-16<<2)>>2]&65535,b[n+30>>1]|0)|0)>>16))}c[r+(16+(c[k>>2]|0)<<2)>>2]=(c[r+(16+(c[k>>2]|0)<<2)>>2]|0)+(c[g>>2]<<4);if(((b[(c[h>>2]|0)+(c[k>>2]<<1)>>1]|0)+((c[r+(16+(c[k>>2]|0)<<2)>>2]>>9)+1>>1)|0)<=32767){if(((b[(c[h>>2]|0)+(c[k>>2]<<1)>>1]|0)+((c[r+(16+(c[k>>2]|0)<<2)>>2]>>9)+1>>1)|0)<-32768){q=-32768}else{q=(b[(c[h>>2]|0)+(c[k>>2]<<1)>>1]|0)+((c[r+(16+(c[k>>2]|0)<<2)>>2]>>9)+1>>1)|0}}else{q=32767}b[(c[h>>2]|0)+(c[k>>2]<<1)>>1]=q;c[k>>2]=(c[k>>2]|0)+1}s=(c[o>>2]|0)+1312|0;f=r+(c[l>>2]<<2)+0|0;q=s+64|0;do{c[s>>2]=c[f>>2];s=s+4|0;f=f+4|0}while((s|0)<(q|0));na(c[p>>2]|0);i=j;return}function Xc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+32|0;d=b+16|0;h=b+12|0;e=b+8|0;f=b+4|0;g=b;c[h>>2]=a;if((c[h>>2]|0)<=0){c[d>>2]=0;h=c[d>>2]|0;i=b;return h|0}Zc(c[h>>2]|0,f,g);if((c[f>>2]&1|0)!=0){c[e>>2]=32768}else{c[e>>2]=46214}c[e>>2]=c[e>>2]>>(c[f>>2]>>1);h=$(c[e>>2]>>16,(((c[g>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(h+(($(c[e>>2]&65535,(((c[g>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[d>>2]=c[e>>2];h=c[d>>2]|0;i=b;return h|0}function Yc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=i;i=i+48|0;q=h+28|0;j=h+16|0;l=h+4|0;p=h+8|0;o=h+32|0;m=h;g=h+12|0;k=h+24|0;n=h+20|0;c[q>>2]=a;c[j>>2]=b;c[l>>2]=d;c[p>>2]=e;c[o>>2]=f;c[n>>2]=255;while(1){if((c[n>>2]|0)<=(c[p>>2]|0)){break}c[n>>2]=c[n>>2]>>1}c[m>>2]=c[c[o>>2]>>2];c[g>>2]=0;while(1){f=c[m>>2]|0;if((c[g>>2]|0)>=(c[p>>2]|0)){break}c[m>>2]=907633515+($(f,196314165)|0);c[k>>2]=c[m>>2]>>24&c[n>>2];a=$(c[(c[j>>2]|0)+(c[k>>2]<<2)>>2]>>16,(c[l>>2]>>4&65535)<<16>>16)|0;a=a+(($(c[(c[j>>2]|0)+(c[k>>2]<<2)>>2]&65535,(c[l>>2]>>4&65535)<<16>>16)|0)>>16)|0;if((a+($(c[(c[j>>2]|0)+(c[k>>2]<<2)>>2]|0,(c[l>>2]>>4>>15)+1>>1)|0)|0)<=32767){a=$(c[(c[j>>2]|0)+(c[k>>2]<<2)>>2]>>16,(c[l>>2]>>4&65535)<<16>>16)|0;a=a+(($(c[(c[j>>2]|0)+(c[k>>2]<<2)>>2]&65535,(c[l>>2]>>4&65535)<<16>>16)|0)>>16)|0;if((a+($(c[(c[j>>2]|0)+(c[k>>2]<<2)>>2]|0,(c[l>>2]>>4>>15)+1>>1)|0)|0)<-32768){f=-32768}else{f=$(c[(c[j>>2]|0)+(c[k>>2]<<2)>>2]>>16,(c[l>>2]>>4&65535)<<16>>16)|0;f=f+(($(c[(c[j>>2]|0)+(c[k>>2]<<2)>>2]&65535,(c[l>>2]>>4&65535)<<16>>16)|0)>>16)|0;f=f+($(c[(c[j>>2]|0)+(c[k>>2]<<2)>>2]|0,(c[l>>2]>>4>>15)+1>>1)|0)|0}}else{f=32767}c[(c[q>>2]|0)+(c[g>>2]<<2)>>2]=(f&65535)<<16>>16;c[g>>2]=(c[g>>2]|0)+1}c[c[o>>2]>>2]=f;i=h;return}function Zc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;h=e+12|0;j=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[j>>2]=b;c[f>>2]=d;c[g>>2]=_c(c[h>>2]|0)|0;c[c[j>>2]>>2]=c[g>>2];a=($c(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=a;i=e;return}function _c(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)==0){d=32;i=b;return d|0}d=32-(32-(We(c[d>>2]|0)|0))|0;i=b;return d|0}function $c(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+20|0;k=d+16|0;j=d+12|0;g=d+8|0;h=d+4|0;f=d;c[k>>2]=a;c[j>>2]=b;c[g>>2]=c[k>>2];c[h>>2]=c[j>>2];c[f>>2]=0-(c[j>>2]|0);if((c[j>>2]|0)==0){c[e>>2]=c[k>>2];a=c[e>>2]|0;i=d;return a|0}b=c[g>>2]|0;if((c[j>>2]|0)<0){c[e>>2]=b<>2]|(c[g>>2]|0)>>>(32-(c[f>>2]|0)|0);a=c[e>>2]|0;i=d;return a|0}else{c[e>>2]=b<<32-(c[h>>2]|0)|(c[g>>2]|0)>>>(c[h>>2]|0);a=c[e>>2]|0;i=d;return a|0}return 0}function ad(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;o=i;i=i+96|0;n=o+20|0;l=o+12|0;q=o+16|0;h=o+8|0;k=o;j=o+4|0;p=o+56|0;m=o+24|0;c[n>>2]=a;c[l>>2]=d;c[q>>2]=e;c[h>>2]=f;c[k>>2]=g;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[k>>2]|0)){break}b[m+(c[j>>2]<<1)>>1]=0-(b[(c[q>>2]|0)+(c[j>>2]<<1)>>1]|0);c[j>>2]=(c[j>>2]|0)+1}c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[k>>2]|0)){break}b[p+(c[j>>2]<<1)>>1]=b[(c[l>>2]|0)+((c[k>>2]|0)-(c[j>>2]|0)-1<<1)>>1]|0;c[j>>2]=(c[j>>2]|0)+1}xb((c[l>>2]|0)+(c[k>>2]<<1)|0,m,(c[n>>2]|0)+(c[k>>2]<<1)|0,(c[h>>2]|0)-(c[k>>2]|0)|0,c[k>>2]|0,p);c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[k>>2]|0)){break}b[(c[n>>2]|0)+(c[j>>2]<<1)>>1]=0;c[j>>2]=(c[j>>2]|0)+1}i=o;return}function bd(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+160|0;e=f+136|0;l=f+144|0;h=f+148|0;k=f+152|0;g=f+8|0;m=f;j=f+140|0;c[l>>2]=a;c[h>>2]=d;c[j>>2]=0;c[m>>2]=g+((c[h>>2]&1)<<6);c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[h>>2]|0)){break}c[j>>2]=(c[j>>2]|0)+(b[(c[l>>2]|0)+(c[k>>2]<<1)>>1]|0);c[(c[m>>2]|0)+(c[k>>2]<<2)>>2]=b[(c[l>>2]|0)+(c[k>>2]<<1)>>1]<<12;c[k>>2]=(c[k>>2]|0)+1}if((c[j>>2]|0)>=4096){c[e>>2]=0;a=c[e>>2]|0;i=f;return a|0}else{c[e>>2]=cd(g,c[h>>2]|0)|0;a=c[e>>2]|0;i=f;return a|0}return 0}function cd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;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0,((b|0)<0)<<31>>31|0,a|0,((a|0)<0)<<31>>31|0)|0;b=D;if(s){a=Ve(a|0,b|0,1)|0;s=D;t=c[r>>2]|0;b=c[d>>2]|0;b=hf(t|0,((t|0)<0)<<31>>31|0,b|0,((b|0)<0)<<31>>31|0)|0;b=_e(a|0,s|0,b&1|0,0)|0}else{b=Ve(a|0,b|0,(c[m>>2]|0)-1|0)|0;b=_e(b|0,D|0,1,0)|0;b=Ve(b|0,D|0,1)|0}c[(c[n>>2]|0)+(c[q>>2]<<2)>>2]=b;c[q>>2]=(c[q>>2]|0)+1}c[l>>2]=(c[l>>2]|0)+ -1}if((e|0)==5){c[j>>2]=0;t=c[j>>2]|0;i=k;return t|0}if((c[c[n>>2]>>2]|0)<=16773022?!((c[c[n>>2]>>2]|0)<-16773022):0){c[f>>2]=0-(c[c[n>>2]>>2]<<7);t=c[f>>2]|0;s=c[f>>2]|0;s=hf(t|0,((t|0)<0)<<31>>31|0,s|0,((s|0)<0)<<31>>31|0)|0;s=Ve(s|0,D|0,32)|0;c[g>>2]=1073741824-s;s=c[h>>2]|0;t=c[g>>2]|0;t=hf(s|0,((s|0)<0)<<31>>31|0,t|0,((t|0)<0)<<31>>31|0)|0;t=Ve(t|0,D|0,32)|0;c[h>>2]=t<<2;c[j>>2]=c[h>>2];t=c[j>>2]|0;i=k;return t|0}c[j>>2]=0;t=c[j>>2]|0;i=k;return t|0}function dd(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)==0){d=32;i=b;return d|0}d=32-(32-(We(c[d>>2]|0)|0))|0;i=b;return d|0}function ed(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+48|0;e=d+28|0;n=d+16|0;h=d+4|0;j=d+8|0;f=d+32|0;k=d;m=d+12|0;l=d+24|0;g=d+20|0;c[n>>2]=a;c[h>>2]=b;b=c[n>>2]|0;c[j>>2]=(dd((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[k>>2]=536870911/(c[m>>2]>>16|0)|0;c[g>>2]=c[k>>2]<<16;b=$(c[m>>2]>>16,(c[k>>2]&65535)<<16>>16)|0;c[l>>2]=536870912-(b+(($(c[m>>2]&65535,(c[k>>2]&65535)<<16>>16)|0)>>16))<<3;b=$(c[l>>2]>>16,(c[k>>2]&65535)<<16>>16)|0;b=(c[g>>2]|0)+(b+(($(c[l>>2]&65535,(c[k>>2]&65535)<<16>>16)|0)>>16))|0;c[g>>2]=b+($(c[l>>2]|0,(c[k>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[j>>2]|0)-(c[h>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0){if((b|0)<32){c[e>>2]=c[g>>2]>>c[f>>2];n=c[e>>2]|0;i=d;return n|0}else{c[e>>2]=0;n=c[e>>2]|0;i=d;return n|0}}h=c[g>>2]|0;a=0-(c[f>>2]|0)|0;do{if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((h|0)>(-2147483648>>a|0)){g=-2147483648>>0-(c[f>>2]|0);break}if((c[g>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){g=2147483647>>0-(c[f>>2]|0);break}else{g=c[g>>2]|0;break}}else{if((h|0)>(2147483647>>a|0)){g=2147483647>>0-(c[f>>2]|0);break}if((c[g>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){g=-2147483648>>0-(c[f>>2]|0);break}else{g=c[g>>2]|0;break}}}while(0);c[e>>2]=g<<0-(c[f>>2]|0);n=c[e>>2]|0;i=d;return n|0}function fd(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;g=i;i=i+272|0;l=g+264|0;x=g+48|0;k=g+24|0;C=g+36|0;j=g+224|0;m=g+16|0;s=g+20|0;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>2]|0)>(c[o>>2]|0)){c[o>>2]=c[p>>2];c[q>>2]=c[j>>2]}c[j>>2]=(c[j>>2]|0)+1}c[o>>2]=(c[o>>2]>>4)+1>>1;if((c[o>>2]|0)<=32767){break}c[o>>2]=(c[o>>2]|0)<163838?c[o>>2]|0:163838;c[r>>2]=65470-(((c[o>>2]|0)-32767<<14|0)/(($(c[o>>2]|0,(c[q>>2]|0)+1|0)|0)>>2|0)|0);Ld(h,c[k>>2]|0,c[r>>2]|0);c[m>>2]=(c[m>>2]|0)+1}a=(c[m>>2]|0)==10;c[j>>2]=0;a:do{if(a){while(1){if((c[j>>2]|0)>=(c[k>>2]|0)){break a}if(((c[h+(c[j>>2]<<2)>>2]>>4)+1>>1|0)<=32767){if(((c[h+(c[j>>2]<<2)>>2]>>4)+1>>1|0)<-32768){n=-32768}else{n=(c[h+(c[j>>2]<<2)>>2]>>4)+1>>1}}else{n=32767}b[(c[l>>2]|0)+(c[j>>2]<<1)>>1]=n;c[h+(c[j>>2]<<2)>>2]=b[(c[l>>2]|0)+(c[j>>2]<<1)>>1]<<5;c[j>>2]=(c[j>>2]|0)+1}}else{while(1){if((c[j>>2]|0)>=(c[k>>2]|0)){break a}b[(c[l>>2]|0)+(c[j>>2]<<1)>>1]=(c[h+(c[j>>2]<<2)>>2]>>4)+1>>1;c[j>>2]=(c[j>>2]|0)+1}}}while(0);c[m>>2]=0;while(1){if((c[m>>2]|0)>=16){h=31;break}if((bd(c[l>>2]|0,c[k>>2]|0)|0)>=107374){h=31;break}Ld(h,c[k>>2]|0,65536-(2<>2])|0);c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[k>>2]|0)){break}b[(c[l>>2]|0)+(c[j>>2]<<1)>>1]=(c[h+(c[j>>2]<<2)>>2]>>4)+1>>1;c[j>>2]=(c[j>>2]|0)+1}c[m>>2]=(c[m>>2]|0)+1}if((h|0)==31){i=g;return}}function gd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k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1]|0,1)|0;c[h>>2]=131072/(c[h>>2]|0)|0;c[j>>2]=id((b[(c[f>>2]|0)+2>>1]|0)-(b[c[f>>2]>>1]|0)|0,1)|0;c[j>>2]=131072/(c[j>>2]|0)|0;a=(jd((c[h>>2]|0)+(c[j>>2]|0)|0,32767)|0)&65535;b[c[k>>2]>>1]=a;c[m>>2]=1;while(1){if((c[m>>2]|0)>=((c[g>>2]|0)-1|0)){break}c[h>>2]=id((b[(c[f>>2]|0)+((c[m>>2]|0)+1<<1)>>1]|0)-(b[(c[f>>2]|0)+(c[m>>2]<<1)>>1]|0)|0,1)|0;c[h>>2]=131072/(c[h>>2]|0)|0;a=(jd((c[h>>2]|0)+(c[j>>2]|0)|0,32767)|0)&65535;b[(c[k>>2]|0)+(c[m>>2]<<1)>>1]=a;c[j>>2]=id((b[(c[f>>2]|0)+((c[m>>2]|0)+2<<1)>>1]|0)-(b[(c[f>>2]|0)+((c[m>>2]|0)+1<<1)>>1]|0)|0,1)|0;c[j>>2]=131072/(c[j>>2]|0)|0;a=(jd((c[h>>2]|0)+(c[j>>2]|0)|0,32767)|0)&65535;b[(c[k>>2]|0)+((c[m>>2]|0)+1<<1)>>1]=a;c[m>>2]=(c[m>>2]|0)+2}c[h>>2]=id(32768-(b[(c[f>>2]|0)+((c[g>>2]|0)-1<<1)>>1]|0)|0,1)|0;c[h>>2]=131072/(c[h>>2]|0)|0;a=(jd((c[h>>2]|0)+(c[j>>2]|0)|0,32767)|0)&65535;b[(c[k>>2]|0)+((c[g>>2]|0)-1<<1)>>1]=a;i=l;return}function id(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function jd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0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;i=i+32|0;r=q+24|0;p=q+16|0;m=q+12|0;k=q+8|0;s=q+28|0;n=q;l=q+20|0;o=q+4|0;c[r>>2]=e;c[p>>2]=f;c[m>>2]=g;c[k>>2]=h;b[s>>1]=j;c[l>>2]=0;c[n>>2]=(b[s>>1]|0)-1;while(1){if((c[n>>2]|0)<0){break}c[o>>2]=($((c[l>>2]&65535)<<16>>16,d[(c[m>>2]|0)+(c[n>>2]|0)>>0]|0)|0)>>8;c[l>>2]=a[(c[p>>2]|0)+(c[n>>2]|0)>>0]<<10;j=c[l>>2]|0;if((c[l>>2]|0)<=0){if((j|0)<0){c[l>>2]=(c[l>>2]|0)+102}}else{c[l>>2]=j-102}s=$(c[l>>2]>>16,(c[k>>2]&65535)<<16>>16)|0;c[l>>2]=(c[o>>2]|0)+(s+(($(c[l>>2]&65535,(c[k>>2]&65535)<<16>>16)|0)>>16));b[(c[r>>2]|0)+(c[n>>2]<<1)>>1]=c[l>>2];c[n>>2]=(c[n>>2]|0)+ -1}i=q;return}function md(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+32|0;d=b+16|0;h=b+12|0;e=b+8|0;f=b+4|0;g=b;c[h>>2]=a;if((c[h>>2]|0)<=0){c[d>>2]=0;h=c[d>>2]|0;i=b;return h|0}nd(c[h>>2]|0,f,g);if((c[f>>2]&1|0)!=0){c[e>>2]=32768}else{c[e>>2]=46214}c[e>>2]=c[e>>2]>>(c[f>>2]>>1);h=$(c[e>>2]>>16,(((c[g>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(h+(($(c[e>>2]&65535,(((c[g>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[d>>2]=c[e>>2];h=c[d>>2]|0;i=b;return h|0}function nd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;h=e+12|0;j=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[j>>2]=b;c[f>>2]=d;c[g>>2]=od(c[h>>2]|0)|0;c[c[j>>2]>>2]=c[g>>2];a=(pd(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=a;i=e;return}function od(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)==0){d=32;i=b;return d|0}d=32-(32-(We(c[d>>2]|0)|0))|0;i=b;return d|0}function pd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+20|0;k=d+16|0;j=d+12|0;g=d+8|0;h=d+4|0;f=d;c[k>>2]=a;c[j>>2]=b;c[g>>2]=c[k>>2];c[h>>2]=c[j>>2];c[f>>2]=0-(c[j>>2]|0);if((c[j>>2]|0)==0){c[e>>2]=c[k>>2];a=c[e>>2]|0;i=d;return a|0}b=c[g>>2]|0;if((c[j>>2]|0)<0){c[e>>2]=b<>2]|(c[g>>2]|0)>>>(32-(c[f>>2]|0)|0);a=c[e>>2]|0;i=d;return a|0}else{c[e>>2]=b<<32-(c[h>>2]|0)|(c[g>>2]|0)>>>(c[h>>2]|0);a=c[e>>2]|0;i=d;return a|0}return 0}function qd(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;p=i;i=i+48|0;h=p+12|0;k=p+16|0;j=p+28|0;l=p+4|0;f=p+32|0;r=p+36|0;m=p+40|0;t=p+44|0;n=p+20|0;o=p+8|0;q=p;s=p+24|0;c[h>>2]=a;c[k>>2]=d;c[j>>2]=e;c[f>>2]=0;c[m>>2]=0;while(1){if((c[m>>2]|0)>=20){break}c[o>>2]=(b[c[h>>2]>>1]|0)-(b[c[k>>2]>>1]|0);c[f>>2]=0;c[l>>2]=1;while(1){if((c[l>>2]|0)>((c[j>>2]|0)-1|0)){break}c[n>>2]=(b[(c[h>>2]|0)+(c[l>>2]<<1)>>1]|0)-((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((c[m>>2]|0)!=20){i=p;return}oe(c[h>>2]|0,c[j>>2]|0);a=(rd(b[c[h>>2]>>1]|0,b[c[k>>2]>>1]|0)|0)&65535;b[c[h>>2]>>1]=a;c[l>>2]=1;while(1){if((c[l>>2]|0)>=(c[j>>2]|0)){break}a=(rd(b[(c[h>>2]|0)+(c[l>>2]<<1)>>1]|0,(b[(c[h>>2]|0)+((c[l>>2]|0)-1<<1)>>1]|0)+(b[(c[k>>2]|0)+(c[l>>2]<<1)>>1]|0)|0)|0)&65535;b[(c[h>>2]|0)+(c[l>>2]<<1)>>1]=a;c[l>>2]=(c[l>>2]|0)+1}a=(sd(b[(c[h>>2]|0)+((c[j>>2]|0)-1<<1)>>1]|0,32768-(b[(c[k>>2]|0)+(c[j>>2]<<1)>>1]|0)|0)|0)&65535;b[(c[h>>2]|0)+((c[j>>2]|0)-1<<1)>>1]=a;c[l>>2]=(c[j>>2]|0)-2;while(1){if((c[l>>2]|0)<0){break}a=(sd(b[(c[h>>2]|0)+(c[l>>2]<<1)>>1]|0,(b[(c[h>>2]|0)+((c[l>>2]|0)+1<<1)>>1]|0)-(b[(c[k>>2]|0)+((c[l>>2]|0)+1<<1)>>1]|0)|0)|0)&65535;b[(c[h>>2]|0)+(c[l>>2]<<1)>>1]=a;c[l>>2]=(c[l>>2]|0)+ -1}i=p;return}function rd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function sd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function td(e,f,g,h){e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;n=i;i=i+32|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c[(c[g>>2]|0)+4248>>2]|0)){ud(c[g>>2]|0);c[(c[g>>2]|0)+4248>>2]=c[(c[g>>2]|0)+2316>>2]}e=c[g>>2]|0;k=c[k>>2]|0;if((c[f>>2]|0)!=0){wd(e,k,c[j>>2]|0);a=(c[g>>2]|0)+4160|0;c[a>>2]=(c[a>>2]|0)+1;i=h;return}else{xd(e,k);i=h;return}}function wd(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;h=i;i=i+160|0;j=h+60|0;o=h+96|0;s=h+48|0;r=h+52|0;u=h+88|0;E=h+16|0;p=h+20|0;w=h+24|0;G=h+28|0;I=h+32|0;J=h+84|0;f=h+92|0;x=h+100|0;y=h+108|0;v=h+56|0;H=h+112|0;K=h+64|0;B=h+68|0;D=h+72|0;g=h+76|0;F=h+12|0;m=h+116|0;C=h+80|0;t=h+36|0;n=h+120|0;l=h+4|0;k=h+40|0;q=h+104|0;z=h;A=h+8|0;c[j>>2]=a;c[o>>2]=d;c[s>>2]=e;c[l>>2]=(c[j>>2]|0)+4168;d=(c[(c[j>>2]|0)+2336>>2]|0)+(c[(c[j>>2]|0)+2328>>2]|0)|0;c[q>>2]=ia()|0;a=i;i=i+((4*d|0)+15&-16)|0;d=i;i=i+((2*(c[(c[j>>2]|0)+2336>>2]|0)|0)+15&-16)|0;c[k>>2]=c[(c[l>>2]|0)+72>>2]>>6;c[k+4>>2]=c[(c[l>>2]|0)+76>>2]>>6;if((c[(c[j>>2]|0)+2376>>2]|0)!=0){L=(c[l>>2]|0)+14|0;e=L+32|0;do{b[L>>1]=0;L=L+2|0}while((L|0)<(e|0))}Ed(H,I,K,J,(c[j>>2]|0)+4|0,k,c[(c[j>>2]|0)+2332>>2]|0,c[(c[j>>2]|0)+2324>>2]|0);e=c[(c[l>>2]|0)+84>>2]|0;if((c[H>>2]>>c[J>>2]|0)<(c[K>>2]>>c[I>>2]|0)){L=Fd(0,($(e-1|0,c[(c[l>>2]|0)+88>>2]|0)|0)-128|0)|0;c[B>>2]=(c[j>>2]|0)+4+(L<<2)}else{L=Fd(0,($(e,c[(c[l>>2]|0)+88>>2]|0)|0)-128|0)|0;c[B>>2]=(c[j>>2]|0)+4+(L<<2)}c[C>>2]=(c[l>>2]|0)+4;b[m>>1]=b[(c[l>>2]|0)+56>>1]|0;c[x>>2]=b[14928+((Gd(1,c[(c[j>>2]|0)+4160>>2]|0)|0)<<1)>>1]|0;L=(c[(c[j>>2]|0)+4164>>2]|0)==2;H=Gd(1,c[(c[j>>2]|0)+4160>>2]|0)|0;if(L){c[y>>2]=b[14936+(H<<1)>>1]|0}else{c[y>>2]=b[14944+(H<<1)>>1]|0}Kd((c[l>>2]|0)+14|0,c[(c[j>>2]|0)+2340>>2]|0,64881);Ze(n|0,(c[l>>2]|0)+14|0,c[(c[j>>2]|0)+2340>>2]<<1|0)|0;do{if((c[(c[j>>2]|0)+4160>>2]|0)==0){b[m>>1]=16384;if((c[(c[j>>2]|0)+4164>>2]|0)!=2){c[z>>2]=bd((c[l>>2]|0)+14|0,c[(c[j>>2]|0)+2340>>2]|0)|0;c[A>>2]=Id(134217728,c[z>>2]|0)|0;c[A>>2]=Ad(4194304,c[A>>2]|0)|0;c[A>>2]=c[A>>2]<<3;L=$(c[A>>2]>>16,(c[y>>2]&65535)<<16>>16)|0;c[y>>2]=L+(($(c[A>>2]&65535,(c[y>>2]&65535)<<16>>16)|0)>>16)>>14;break}c[r>>2]=0;while(1){if((c[r>>2]|0)>=5){break}b[m>>1]=(b[m>>1]|0)-(b[(c[C>>2]|0)+(c[r>>2]<<1)>>1]|0);c[r>>2]=(c[r>>2]|0)+1}b[m>>1]=Hd(3277,b[m>>1]|0)|0;b[m>>1]=($(b[m>>1]|0,b[(c[l>>2]|0)+68>>1]|0)|0)>>14}}while(0);c[f>>2]=c[(c[l>>2]|0)+52>>2];c[p>>2]=(c[c[l>>2]>>2]>>7)+1>>1;c[G>>2]=c[(c[j>>2]|0)+2336>>2];c[w>>2]=(c[(c[j>>2]|0)+2336>>2]|0)-(c[p>>2]|0)-(c[(c[j>>2]|0)+2340>>2]|0)-2;ad(d+(c[w>>2]<<1)|0,(c[j>>2]|0)+1348+(c[w>>2]<<1)|0,n,(c[(c[j>>2]|0)+2336>>2]|0)-(c[w>>2]|0)|0,c[(c[j>>2]|0)+2340>>2]|0);c[v>>2]=Jd(c[(c[l>>2]|0)+76>>2]|0,46)|0;c[v>>2]=(c[v>>2]|0)<1073741823?c[v>>2]|0:1073741823;c[r>>2]=(c[w>>2]|0)+(c[(c[j>>2]|0)+2340>>2]|0);while(1){if((c[r>>2]|0)>=(c[(c[j>>2]|0)+2336>>2]|0)){break}L=$(c[v>>2]>>16,b[d+(c[r>>2]<<1)>>1]|0)|0;L=L+(($(c[v>>2]&65535,b[d+(c[r>>2]<<1)>>1]|0)|0)>>16)|0;c[a+(c[r>>2]<<2)>>2]=L;c[r>>2]=(c[r>>2]|0)+1}c[E>>2]=0;while(1){if((c[E>>2]|0)>=(c[(c[j>>2]|0)+2324>>2]|0)){break}c[D>>2]=a+((c[G>>2]|0)-(c[p>>2]|0)+2<<2);c[r>>2]=0;while(1){if((c[r>>2]|0)>=(c[(c[j>>2]|0)+2332>>2]|0)){break}c[F>>2]=2;L=$(c[c[D>>2]>>2]>>16,b[c[C>>2]>>1]|0)|0;c[F>>2]=(c[F>>2]|0)+(L+(($(c[c[D>>2]>>2]&65535,b[c[C>>2]>>1]|0)|0)>>16));L=$(c[(c[D>>2]|0)+ -4>>2]>>16,b[(c[C>>2]|0)+2>>1]|0)|0;c[F>>2]=(c[F>>2]|0)+(L+(($(c[(c[D>>2]|0)+ -4>>2]&65535,b[(c[C>>2]|0)+2>>1]|0)|0)>>16));L=$(c[(c[D>>2]|0)+ -8>>2]>>16,b[(c[C>>2]|0)+4>>1]|0)|0;c[F>>2]=(c[F>>2]|0)+(L+(($(c[(c[D>>2]|0)+ -8>>2]&65535,b[(c[C>>2]|0)+4>>1]|0)|0)>>16));L=$(c[(c[D>>2]|0)+ -12>>2]>>16,b[(c[C>>2]|0)+6>>1]|0)|0;c[F>>2]=(c[F>>2]|0)+(L+(($(c[(c[D>>2]|0)+ -12>>2]&65535,b[(c[C>>2]|0)+6>>1]|0)|0)>>16));L=$(c[(c[D>>2]|0)+ -16>>2]>>16,b[(c[C>>2]|0)+8>>1]|0)|0;c[F>>2]=(c[F>>2]|0)+(L+(($(c[(c[D>>2]|0)+ -16>>2]&65535,b[(c[C>>2]|0)+8>>1]|0)|0)>>16));c[D>>2]=(c[D>>2]|0)+4;c[f>>2]=907633515+($(c[f>>2]|0,196314165)|0);c[w>>2]=c[f>>2]>>25&127;L=$(c[(c[B>>2]|0)+(c[w>>2]<<2)>>2]>>16,b[m>>1]|0)|0;L=(c[F>>2]|0)+(L+(($(c[(c[B>>2]|0)+(c[w>>2]<<2)>>2]&65535,b[m>>1]|0)|0)>>16))<<2;c[a+(c[G>>2]<<2)>>2]=L;c[G>>2]=(c[G>>2]|0)+1;c[r>>2]=(c[r>>2]|0)+1}c[u>>2]=0;while(1){if((c[u>>2]|0)>=5){break}L=($((c[x>>2]&65535)<<16>>16,b[(c[C>>2]|0)+(c[u>>2]<<1)>>1]|0)|0)>>15&65535;b[(c[C>>2]|0)+(c[u>>2]<<1)>>1]=L;c[u>>2]=(c[u>>2]|0)+1}b[m>>1]=($(b[m>>1]|0,(c[y>>2]&65535)<<16>>16)|0)>>15;c[c[l>>2]>>2]=(c[c[l>>2]>>2]|0)+(((c[c[l>>2]>>2]>>16)*655|0)+((c[c[l>>2]>>2]&65535)*655>>16));L=Id(c[c[l>>2]>>2]|0,((c[(c[j>>2]|0)+2316>>2]&65535)<<16>>16)*18<<8)|0;c[c[l>>2]>>2]=L;c[p>>2]=(c[c[l>>2]>>2]>>7)+1>>1;c[E>>2]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<2)>>2]|0)+(c[g>>2]<<4);L=$(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]>>16,(c[k+4>>2]&65535)<<16>>16)|0;L=L+(($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]&65535,(c[k+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((L+($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]|0,(c[k+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){L=$(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]>>16,(c[k+4>>2]&65535)<<16>>16)|0;L=L+(($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]&65535,(c[k+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((L+($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]|0,(c[k+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768){v=-32768}else{v=$(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]>>16,(c[k+4>>2]&65535)<<16>>16)|0;v=v+(($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]&65535,(c[k+4>>2]&65535)<<16>>16)|0)>>16)|0;v=(v+($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]|0,(c[k+4>>2]>>15)+1>>1)|0)>>7)+1>>1}}else{v=32767}if((v|0)<=32767){L=$(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]>>16,(c[k+4>>2]&65535)<<16>>16)|0;L=L+(($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]&65535,(c[k+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((L+($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]|0,(c[k+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){L=$(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]>>16,(c[k+4>>2]&65535)<<16>>16)|0;L=L+(($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]&65535,(c[k+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((L+($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]|0,(c[k+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768){v=-32768}else{v=$(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]>>16,(c[k+4>>2]&65535)<<16>>16)|0;v=v+(($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]&65535,(c[k+4>>2]&65535)<<16>>16)|0)>>16)|0;v=(v+($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]|0,(c[k+4>>2]>>15)+1>>1)|0)>>7)+1>>1}}else{v=32767}if(!((v|0)<-32768)){L=$(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]>>16,(c[k+4>>2]&65535)<<16>>16)|0;L=L+(($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]&65535,(c[k+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((L+($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]|0,(c[k+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<=32767){L=$(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]>>16,(c[k+4>>2]&65535)<<16>>16)|0;L=L+(($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]&65535,(c[k+4>>2]&65535)<<16>>16)|0)>>16)|0;if(((L+($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]|0,(c[k+4>>2]>>15)+1>>1)|0)>>7)+1>>1|0)<-32768){v=-32768}else{v=$(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]>>16,(c[k+4>>2]&65535)<<16>>16)|0;v=v+(($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]&65535,(c[k+4>>2]&65535)<<16>>16)|0)>>16)|0;v=(v+($(c[(c[t>>2]|0)+(16+(c[r>>2]|0)<<2)>>2]|0,(c[k+4>>2]>>15)+1>>1)|0)>>7)+1>>1}}else{v=32767}}else{v=-32768}}else{v=32767}b[(c[s>>2]|0)+(c[r>>2]<<1)>>1]=v;c[r>>2]=(c[r>>2]|0)+1}L=v+1284|0;v=(c[t>>2]|0)+(c[(c[j>>2]|0)+2328>>2]<<2)+0|0;e=L+64|0;do{c[L>>2]=c[v>>2];L=L+4|0;v=v+4|0}while((L|0)<(e|0));c[(c[l>>2]|0)+52>>2]=c[f>>2];b[(c[l>>2]|0)+56>>1]=b[m>>1]|0;c[r>>2]=0;while(1){if((c[r>>2]|0)>=4){break}c[(c[o>>2]|0)+(c[r>>2]<<2)>>2]=c[p>>2];c[r>>2]=(c[r>>2]|0)+1}na(c[q>>2]|0);i=h;return}function xd(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;j=i;i=i+48|0;h=j+36|0;g=j+16|0;n=j;q=j+28|0;k=j+32|0;r=j+40|0;m=j+12|0;l=j+24|0;f=j+20|0;p=j+8|0;o=j+4|0;c[h>>2]=d;c[g>>2]=e;c[m>>2]=(c[h>>2]|0)+4168;c[(c[h>>2]|0)+4164>>2]=a[(c[h>>2]|0)+2765>>0]|0;c[n>>2]=0;a:do{if((a[(c[h>>2]|0)+2765>>0]|0)==2){c[r>>2]=0;while(1){d=$(c[r>>2]|0,c[(c[h>>2]|0)+2332>>2]|0)|0;if((d|0)>=(c[(c[g>>2]|0)+((c[(c[h>>2]|0)+2324>>2]|0)-1<<2)>>2]|0)){break}if((c[r>>2]|0)==(c[(c[h>>2]|0)+2324>>2]|0)){break}c[q>>2]=0;c[k>>2]=0;while(1){if((c[k>>2]|0)>=5){break}c[q>>2]=(c[q>>2]|0)+(b[(c[g>>2]|0)+96+((((c[(c[h>>2]|0)+2324>>2]|0)-1-(c[r>>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&65535)<<16>>16)*18<<8;d=(c[m>>2]|0)+4|0;b[d+0>>1]=0;b[d+2>>1]=0;b[d+4>>1]=0;b[d+6>>1]=0;b[d+8>>1]=0}}while(0);Ze((c[m>>2]|0)+14|0,(c[g>>2]|0)+64|0,c[(c[h>>2]|0)+2340>>2]<<1|0)|0;b[(c[m>>2]|0)+68>>1]=c[(c[g>>2]|0)+136>>2];d=(c[m>>2]|0)+72|0;r=(c[g>>2]|0)+16+((c[(c[h>>2]|0)+2324>>2]|0)-2<<2)|0;c[d+0>>2]=c[r+0>>2];c[d+4>>2]=c[r+4>>2];c[(c[m>>2]|0)+88>>2]=c[(c[h>>2]|0)+2332>>2];c[(c[m>>2]|0)+84>>2]=c[(c[h>>2]|0)+2324>>2];i=j;return}function yd(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;m=i;i=i+48|0;r=m+36|0;j=m+16|0;h=m;q=m+28|0;l=m+32|0;k=m+40|0;g=m+12|0;n=m+24|0;f=m+20|0;o=m+8|0;p=m+4|0;c[r>>2]=a;c[j>>2]=d;c[h>>2]=e;c[g>>2]=(c[r>>2]|0)+4168;if((c[(c[r>>2]|0)+4160>>2]|0)!=0){se((c[g>>2]|0)+60|0,(c[g>>2]|0)+64|0,c[j>>2]|0,c[h>>2]|0);c[(c[g>>2]|0)+48>>2]=1;i=m;return}a:do{if((c[(c[r>>2]|0)+4216>>2]|0)!=0){se(k,l,c[j>>2]|0,c[h>>2]|0);if((c[l>>2]|0)<=(c[(c[g>>2]|0)+64>>2]|0)){if((c[l>>2]|0)<(c[(c[g>>2]|0)+64>>2]|0)){c[k>>2]=c[k>>2]>>(c[(c[g>>2]|0)+64>>2]|0)-(c[l>>2]|0)}}else{c[(c[g>>2]|0)+60>>2]=c[(c[g>>2]|0)+60>>2]>>(c[l>>2]|0)-(c[(c[g>>2]|0)+64>>2]|0)}if((c[k>>2]|0)>(c[(c[g>>2]|0)+60>>2]|0)){c[f>>2]=zd(c[(c[g>>2]|0)+60>>2]|0)|0;c[f>>2]=(c[f>>2]|0)-1;c[(c[g>>2]|0)+60>>2]=c[(c[g>>2]|0)+60>>2]<>2];a=c[k>>2]|0;c[k>>2]=a>>(Ad(24-(c[f>>2]|0)|0,0)|0);c[n>>2]=(c[(c[g>>2]|0)+60>>2]|0)/(((c[k>>2]|0)>1?c[k>>2]|0:1)|0)|0;c[o>>2]=(Bd(c[n>>2]|0)|0)<<4;c[p>>2]=(65536-(c[o>>2]|0)|0)/(c[h>>2]|0)|0;c[p>>2]=c[p>>2]<<2;c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[h>>2]|0)){break a}a=$(c[o>>2]>>16,b[(c[j>>2]|0)+(c[q>>2]<<1)>>1]|0)|0;a=a+(($(c[o>>2]&65535,b[(c[j>>2]|0)+(c[q>>2]<<1)>>1]|0)|0)>>16)&65535;b[(c[j>>2]|0)+(c[q>>2]<<1)>>1]=a;c[o>>2]=(c[o>>2]|0)+(c[p>>2]|0);if((c[o>>2]|0)>65536){break a}c[q>>2]=(c[q>>2]|0)+1}}}}while(0);c[(c[g>>2]|0)+48>>2]=0;i=m;return}function zd(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)==0){d=32;i=b;return d|0}d=32-(32-(We(c[d>>2]|0)|0))|0;i=b;return d|0}function Ad(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0)>(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Bd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+32|0;d=b+16|0;h=b+12|0;e=b+8|0;f=b+4|0;g=b;c[h>>2]=a;if((c[h>>2]|0)<=0){c[d>>2]=0;h=c[d>>2]|0;i=b;return h|0}Cd(c[h>>2]|0,f,g);if((c[f>>2]&1|0)!=0){c[e>>2]=32768}else{c[e>>2]=46214}c[e>>2]=c[e>>2]>>(c[f>>2]>>1);h=$(c[e>>2]>>16,(((c[g>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0;c[e>>2]=(c[e>>2]|0)+(h+(($(c[e>>2]&65535,(((c[g>>2]&65535)<<16>>16)*213&65535)<<16>>16)|0)>>16));c[d>>2]=c[e>>2];h=c[d>>2]|0;i=b;return h|0}function Cd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;h=e+12|0;j=e+8|0;f=e+4|0;g=e;c[h>>2]=a;c[j>>2]=b;c[f>>2]=d;c[g>>2]=zd(c[h>>2]|0)|0;c[c[j>>2]>>2]=c[g>>2];a=(Dd(c[h>>2]|0,24-(c[g>>2]|0)|0)|0)&127;c[c[f>>2]>>2]=a;i=e;return}function Dd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+20|0;k=d+16|0;j=d+12|0;g=d+8|0;h=d+4|0;f=d;c[k>>2]=a;c[j>>2]=b;c[g>>2]=c[k>>2];c[h>>2]=c[j>>2];c[f>>2]=0-(c[j>>2]|0);if((c[j>>2]|0)==0){c[e>>2]=c[k>>2];a=c[e>>2]|0;i=d;return a|0}b=c[g>>2]|0;if((c[j>>2]|0)<0){c[e>>2]=b<>2]|(c[g>>2]|0)>>>(32-(c[f>>2]|0)|0);a=c[e>>2]|0;i=d;return a|0}else{c[e>>2]=b<<32-(c[h>>2]|0)|(c[g>>2]|0)>>>(c[h>>2]|0);a=c[e>>2]|0;i=d;return a|0}return 0}function Ed(a,d,e,f,g,h,j,k){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;l=i;i=i+48|0;v=l+4|0;r=l+16|0;o=l+36|0;p=l;w=l+32|0;x=l+40|0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|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+2|0;d=f;b[e>>1]=a;b[d>>1]=c;i=f;return((b[e>>1]|0)>(b[d>>1]|0)?b[e>>1]|0:b[d>>1]|0)<<16>>16&65535|0}function Id(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;e=f+4|0;d=f;c[e>>2]=a;c[d>>2]=b;i=f;return((c[e>>2]|0)<(c[d>>2]|0)?c[e>>2]|0:c[d>>2]|0)|0}function Jd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+48|0;e=d+28|0;n=d+16|0;h=d+4|0;j=d+8|0;f=d+32|0;k=d;m=d+12|0;l=d+24|0;g=d+20|0;c[n>>2]=a;c[h>>2]=b;b=c[n>>2]|0;c[j>>2]=(zd((c[n>>2]|0)>0?b:0-b|0)|0)-1;c[m>>2]=c[n>>2]<>2];c[k>>2]=536870911/(c[m>>2]>>16|0)|0;c[g>>2]=c[k>>2]<<16;b=$(c[m>>2]>>16,(c[k>>2]&65535)<<16>>16)|0;c[l>>2]=536870912-(b+(($(c[m>>2]&65535,(c[k>>2]&65535)<<16>>16)|0)>>16))<<3;b=$(c[l>>2]>>16,(c[k>>2]&65535)<<16>>16)|0;b=(c[g>>2]|0)+(b+(($(c[l>>2]&65535,(c[k>>2]&65535)<<16>>16)|0)>>16))|0;c[g>>2]=b+($(c[l>>2]|0,(c[k>>2]>>15)+1>>1)|0);c[f>>2]=61-(c[j>>2]|0)-(c[h>>2]|0);b=c[f>>2]|0;if((c[f>>2]|0)>0){if((b|0)<32){c[e>>2]=c[g>>2]>>c[f>>2];n=c[e>>2]|0;i=d;return n|0}else{c[e>>2]=0;n=c[e>>2]|0;i=d;return n|0}}h=c[g>>2]|0;a=0-(c[f>>2]|0)|0;do{if((-2147483648>>0-b|0)>(2147483647>>0-(c[f>>2]|0)|0)){if((h|0)>(-2147483648>>a|0)){g=-2147483648>>0-(c[f>>2]|0);break}if((c[g>>2]|0)<(2147483647>>0-(c[f>>2]|0)|0)){g=2147483647>>0-(c[f>>2]|0);break}else{g=c[g>>2]|0;break}}else{if((h|0)>(2147483647>>a|0)){g=2147483647>>0-(c[f>>2]|0);break}if((c[g>>2]|0)<(-2147483648>>0-(c[f>>2]|0)|0)){g=-2147483648>>0-(c[f>>2]|0);break}else{g=c[g>>2]|0;break}}}while(0);c[e>>2]=g<<0-(c[f>>2]|0);n=c[e>>2]|0;i=d;return n|0}function Kd(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;h=i;i=i+32|0;f=h+16|0;g=h+12|0;j=h+8|0;k=h+4|0;l=h;c[f>>2]=a;c[g>>2]=d;c[j>>2]=e;c[l>>2]=(c[j>>2]|0)-65536;c[k>>2]=0;while(1){e=c[j>>2]|0;if((c[k>>2]|0)>=((c[g>>2]|0)-1|0)){break}a=(($(e,b[(c[f>>2]|0)+(c[k>>2]<<1)>>1]|0)|0)>>15)+1>>1&65535;b[(c[f>>2]|0)+(c[k>>2]<<1)>>1]=a;a=(($(c[j>>2]|0,c[l>>2]|0)|0)>>15)+1>>1;c[j>>2]=(c[j>>2]|0)+a;c[k>>2]=(c[k>>2]|0)+1}a=(($(e,b[(c[f>>2]|0)+((c[g>>2]|0)-1<<1)>>1]|0)|0)>>15)+1>>1&65535;b[(c[f>>2]|0)+((c[g>>2]|0)-1<<1)>>1]=a;i=h;return}function Ld(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;h=i;i=i+32|0;e=h+16|0;f=h+12|0;g=h+8|0;j=h+4|0;k=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;c[k>>2]=(c[g>>2]|0)-65536;c[j>>2]=0;while(1){d=c[g>>2]>>16;if((c[j>>2]|0)>=((c[f>>2]|0)-1|0)){break}a=$(d,(c[(c[e>>2]|0)+(c[j>>2]<<2)>>2]&65535)<<16>>16)|0;a=a+(($(c[g>>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+j>>0]|0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=16){break a}if((b[(c[s>>2]|0)+(c[n>>2]<<1)>>1]|0)>0){v=((Pb(c[t>>2]|0,m,8)|0)<<1)-1|0;w=(c[s>>2]|0)+(c[n>>2]<<1)|0;b[w>>1]=$(b[w>>1]|0,v)|0}c[n>>2]=(c[n>>2]|0)+1}}}while(0);c[s>>2]=(c[s>>2]|0)+32;c[q>>2]=(c[q>>2]|0)+1}i=r;return}function Nd(a){a=a|0;var b=0,d=0,e=0;d=i;i=i+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=0;c[c[e>>2]>>2]=8544;i=d;return c[b>>2]|0}function Od(a){a=a|0;var d=0,e=0,f=0,g=0,h=0;e=i;i=i+16|0;d=e+12|0;g=e+8|0;f=e+4|0;h=e;c[d>>2]=a;c[f>>2]=0;c[h>>2]=c[d>>2];c[g>>2]=0;while(1){if((c[g>>2]|0)>=2){break}c[f>>2]=be((c[h>>2]|0)+((c[g>>2]|0)*4260|0)|0)|0;c[g>>2]=(c[g>>2]|0)+1}h=(c[d>>2]|0)+8520|0;b[h+0>>1]=0;b[h+2>>1]=0;b[h+4>>1]=0;b[h+6>>1]=0;b[h+8>>1]=0;b[h+10>>1]=0;c[(c[d>>2]|0)+8540>>2]=0;i=e;return c[f>>2]|0} - - - - -// EMSCRIPTEN_END_FUNCS -return{_strlen:Ye,_free:Te,_opus_decoder_create:ze,_i64Add:_e,_memmove:$e,_opus_decode_float:Ie,_bitshift64Ashr:Ve,_memset:Xe,_malloc:Se,_opus_decoder_destroy:Ke,_memcpy:Ze,_llvm_ctlz_i32:We,runPostSets:Ue,stackAlloc:ra,stackSave:sa,stackRestore:ta,setThrew:ua,setTempRet0:xa,getTempRet0:ya} -// EMSCRIPTEN_END_ASM - -})({"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array},{"abort":abort,"assert":assert,"asmPrintInt":asmPrintInt,"asmPrintFloat":asmPrintFloat,"min":Math_min,"_fflush":_fflush,"_abort":_abort,"___setErrNo":___setErrNo,"_llvm_stacksave":_llvm_stacksave,"_sbrk":_sbrk,"_time":_time,"_abs":_abs,"_emscripten_memcpy_big":_emscripten_memcpy_big,"_llvm_stackrestore":_llvm_stackrestore,"_sysconf":_sysconf,"___errno_location":___errno_location,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"cttz_i8":cttz_i8,"ctlz_i8":ctlz_i8,"NaN":NaN,"Infinity":Infinity},buffer);var _strlen=Module["_strlen"]=asm["_strlen"];var _free=Module["_free"]=asm["_free"];var _opus_decoder_create=Module["_opus_decoder_create"]=asm["_opus_decoder_create"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _memmove=Module["_memmove"]=asm["_memmove"];var _opus_decode_float=Module["_opus_decode_float"]=asm["_opus_decode_float"];var _bitshift64Ashr=Module["_bitshift64Ashr"]=asm["_bitshift64Ashr"];var _memset=Module["_memset"]=asm["_memset"];var _malloc=Module["_malloc"]=asm["_malloc"];var _opus_decoder_destroy=Module["_opus_decoder_destroy"]=asm["_opus_decoder_destroy"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _llvm_ctlz_i32=Module["_llvm_ctlz_i32"]=asm["_llvm_ctlz_i32"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];Runtime.stackAlloc=asm["stackAlloc"];Runtime.stackSave=asm["stackSave"];Runtime.stackRestore=asm["stackRestore"];Runtime.setTempRet0=asm["setTempRet0"];Runtime.getTempRet0=asm["getTempRet0"];var i64Math=(function(){var goog={math:{}};goog.math.Long=(function(low,high){this.low_=low|0;this.high_=high|0});goog.math.Long.IntCache_={};goog.math.Long.fromInt=(function(value){if(-128<=value&&value<128){var cachedObj=goog.math.Long.IntCache_[value];if(cachedObj){return cachedObj}}var obj=new goog.math.Long(value|0,value<0?-1:0);if(-128<=value&&value<128){goog.math.Long.IntCache_[value]=obj}return obj});goog.math.Long.fromNumber=(function(value){if(isNaN(value)||!isFinite(value)){return goog.math.Long.ZERO}else if(value<=-goog.math.Long.TWO_PWR_63_DBL_){return goog.math.Long.MIN_VALUE}else if(value+1>=goog.math.Long.TWO_PWR_63_DBL_){return goog.math.Long.MAX_VALUE}else if(value<0){return goog.math.Long.fromNumber(-value).negate()}else{return new goog.math.Long(value%goog.math.Long.TWO_PWR_32_DBL_|0,value/goog.math.Long.TWO_PWR_32_DBL_|0)}});goog.math.Long.fromBits=(function(lowBits,highBits){return new goog.math.Long(lowBits,highBits)});goog.math.Long.fromString=(function(str,opt_radix){if(str.length==0){throw Error("number format error: empty string")}var radix=opt_radix||10;if(radix<2||36=0){throw Error('number format error: interior "-" character: '+str)}var radixToPower=goog.math.Long.fromNumber(Math.pow(radix,8));var result=goog.math.Long.ZERO;for(var i=0;i=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_});goog.math.Long.prototype.getNumBitsAbs=(function(){if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){return 64}else{return this.negate().getNumBitsAbs()}}else{var val=this.high_!=0?this.high_:this.low_;for(var bit=31;bit>0;bit--){if((val&1<0});goog.math.Long.prototype.greaterThanOrEqual=(function(other){return this.compare(other)>=0});goog.math.Long.prototype.compare=(function(other){if(this.equals(other)){return 0}var thisNeg=this.isNegative();var otherNeg=other.isNegative();if(thisNeg&&!otherNeg){return-1}if(!thisNeg&&otherNeg){return 1}if(this.subtract(other).isNegative()){return-1}else{return 1}});goog.math.Long.prototype.negate=(function(){if(this.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.MIN_VALUE}else{return this.not().add(goog.math.Long.ONE)}});goog.math.Long.prototype.add=(function(other){var a48=this.high_>>>16;var a32=this.high_&65535;var a16=this.low_>>>16;var a00=this.low_&65535;var b48=other.high_>>>16;var b32=other.high_&65535;var b16=other.low_>>>16;var b00=other.low_&65535;var c48=0,c32=0,c16=0,c00=0;c00+=a00+b00;c16+=c00>>>16;c00&=65535;c16+=a16+b16;c32+=c16>>>16;c16&=65535;c32+=a32+b32;c48+=c32>>>16;c32&=65535;c48+=a48+b48;c48&=65535;return goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)});goog.math.Long.prototype.subtract=(function(other){return this.add(other.negate())});goog.math.Long.prototype.multiply=(function(other){if(this.isZero()){return goog.math.Long.ZERO}else if(other.isZero()){return goog.math.Long.ZERO}if(this.equals(goog.math.Long.MIN_VALUE)){return other.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO}else if(other.equals(goog.math.Long.MIN_VALUE)){return this.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO}if(this.isNegative()){if(other.isNegative()){return this.negate().multiply(other.negate())}else{return this.negate().multiply(other).negate()}}else if(other.isNegative()){return this.multiply(other.negate()).negate()}if(this.lessThan(goog.math.Long.TWO_PWR_24_)&&other.lessThan(goog.math.Long.TWO_PWR_24_)){return goog.math.Long.fromNumber(this.toNumber()*other.toNumber())}var a48=this.high_>>>16;var a32=this.high_&65535;var a16=this.low_>>>16;var a00=this.low_&65535;var b48=other.high_>>>16;var b32=other.high_&65535;var b16=other.low_>>>16;var b00=other.low_&65535;var c48=0,c32=0,c16=0,c00=0;c00+=a00*b00;c16+=c00>>>16;c00&=65535;c16+=a16*b00;c32+=c16>>>16;c16&=65535;c16+=a00*b16;c32+=c16>>>16;c16&=65535;c32+=a32*b00;c48+=c32>>>16;c32&=65535;c32+=a16*b16;c48+=c32>>>16;c32&=65535;c32+=a00*b32;c48+=c32>>>16;c32&=65535;c48+=a48*b00+a32*b16+a16*b32+a00*b48;c48&=65535;return goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)});goog.math.Long.prototype.div=(function(other){if(other.isZero()){throw Error("division by zero")}else if(this.isZero()){return goog.math.Long.ZERO}if(this.equals(goog.math.Long.MIN_VALUE)){if(other.equals(goog.math.Long.ONE)||other.equals(goog.math.Long.NEG_ONE)){return goog.math.Long.MIN_VALUE}else if(other.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.ONE}else{var halfThis=this.shiftRight(1);var approx=halfThis.div(other).shiftLeft(1);if(approx.equals(goog.math.Long.ZERO)){return other.isNegative()?goog.math.Long.ONE:goog.math.Long.NEG_ONE}else{var rem=this.subtract(other.multiply(approx));var result=approx.add(rem.div(other));return result}}}else if(other.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.ZERO}if(this.isNegative()){if(other.isNegative()){return this.negate().div(other.negate())}else{return this.negate().div(other).negate()}}else if(other.isNegative()){return this.div(other.negate()).negate()}var res=goog.math.Long.ZERO;var rem=this;while(rem.greaterThanOrEqual(other)){var approx=Math.max(1,Math.floor(rem.toNumber()/other.toNumber()));var log2=Math.ceil(Math.log(approx)/Math.LN2);var delta=log2<=48?1:Math.pow(2,log2-48);var approxRes=goog.math.Long.fromNumber(approx);var approxRem=approxRes.multiply(other);while(approxRem.isNegative()||approxRem.greaterThan(rem)){approx-=delta;approxRes=goog.math.Long.fromNumber(approx);approxRem=approxRes.multiply(other)}if(approxRes.isZero()){approxRes=goog.math.Long.ONE}res=res.add(approxRes);rem=rem.subtract(approxRem)}return res});goog.math.Long.prototype.modulo=(function(other){return this.subtract(this.div(other).multiply(other))});goog.math.Long.prototype.not=(function(){return goog.math.Long.fromBits(~this.low_,~this.high_)});goog.math.Long.prototype.and=(function(other){return goog.math.Long.fromBits(this.low_&other.low_,this.high_&other.high_)});goog.math.Long.prototype.or=(function(other){return goog.math.Long.fromBits(this.low_|other.low_,this.high_|other.high_)});goog.math.Long.prototype.xor=(function(other){return goog.math.Long.fromBits(this.low_^other.low_,this.high_^other.high_)});goog.math.Long.prototype.shiftLeft=(function(numBits){numBits&=63;if(numBits==0){return this}else{var low=this.low_;if(numBits<32){var high=this.high_;return goog.math.Long.fromBits(low<>>32-numBits)}else{return goog.math.Long.fromBits(0,low<>>numBits|high<<32-numBits,high>>numBits)}else{return goog.math.Long.fromBits(high>>numBits-32,high>=0?0:-1)}}});goog.math.Long.prototype.shiftRightUnsigned=(function(numBits){numBits&=63;if(numBits==0){return this}else{var high=this.high_;if(numBits<32){var low=this.low_;return goog.math.Long.fromBits(low>>>numBits|high<<32-numBits,high>>>numBits)}else if(numBits==32){return goog.math.Long.fromBits(high,0)}else{return goog.math.Long.fromBits(high>>>numBits-32,0)}}});var navigator={appName:"Modern Browser"};var dbits;var canary=0xdeadbeefcafe;var j_lm=(canary&16777215)==15715070;function BigInteger(a,b,c){if(a!=null)if("number"==typeof a)this.fromNumber(a,b,c);else if(b==null&&"string"!=typeof a)this.fromString(a,256);else this.fromString(a,b)}function nbi(){return new BigInteger(null)}function am1(i,x,w,j,c,n){while(--n>=0){var v=x*this[i++]+w[j]+c;c=Math.floor(v/67108864);w[j++]=v&67108863}return c}function am2(i,x,w,j,c,n){var xl=x&32767,xh=x>>15;while(--n>=0){var l=this[i]&32767;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&32767)<<15)+w[j]+(c&1073741823);c=(l>>>30)+(m>>>15)+xh*h+(c>>>30);w[j++]=l&1073741823}return c}function am3(i,x,w,j,c,n){var xl=x&16383,xh=x>>14;while(--n>=0){var l=this[i]&16383;var h=this[i++]>>14;var m=xh*l+h*xl;l=xl*l+((m&16383)<<14)+w[j]+c;c=(l>>28)+(m>>14)+xh*h;w[j++]=l&268435455}return c}if(j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}else if(j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<=0;--i)r[i]=this[i];r.t=this.t;r.s=this.s}function bnpFromInt(x){this.t=1;this.s=x<0?-1:0;if(x>0)this[0]=x;else if(x<-1)this[0]=x+DV;else this.t=0}function nbv(i){var r=nbi();r.fromInt(i);return r}function bnpFromString(s,b){var k;if(b==16)k=4;else if(b==8)k=3;else if(b==256)k=8;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else{this.fromRadix(s,b);return}this.t=0;this.s=0;var i=s.length,mi=false,sh=0;while(--i>=0){var x=k==8?s[i]&255:intAt(s,i);if(x<0){if(s.charAt(i)=="-")mi=true;continue}mi=false;if(sh==0)this[this.t++]=x;else if(sh+k>this.DB){this[this.t-1]|=(x&(1<>this.DB-sh}else this[this.t-1]|=x<=this.DB)sh-=this.DB}if(k==8&&(s[0]&128)!=0){this.s=-1;if(sh>0)this[this.t-1]|=(1<0&&this[this.t-1]==c)--this.t}function bnToString(b){if(this.s<0)return"-"+this.negate().toString(b);var k;if(b==16)k=4;else if(b==8)k=3;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else return this.toRadix(b);var km=(1<0){if(p>p)>0){m=true;r=int2char(d)}while(i>=0){if(p>(p+=this.DB-k)}else{d=this[i]>>(p-=k)&km;if(p<=0){p+=this.DB;--i}}if(d>0)m=true;if(m)r+=int2char(d)}}return m?r:"0"}function bnNegate(){var r=nbi();BigInteger.ZERO.subTo(this,r);return r}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var r=this.s-a.s;if(r!=0)return r;var i=this.t;r=i-a.t;if(r!=0)return this.s<0?-r:r;while(--i>=0)if((r=this[i]-a[i])!=0)return r;return 0}function nbits(x){var r=1,t;if((t=x>>>16)!=0){x=t;r+=16}if((t=x>>8)!=0){x=t;r+=8}if((t=x>>4)!=0){x=t;r+=4}if((t=x>>2)!=0){x=t;r+=2}if((t=x>>1)!=0){x=t;r+=1}return r}function bnBitLength(){if(this.t<=0)return 0;return this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(n,r){var i;for(i=this.t-1;i>=0;--i)r[i+n]=this[i];for(i=n-1;i>=0;--i)r[i]=0;r.t=this.t+n;r.s=this.s}function bnpDRShiftTo(n,r){for(var i=n;i=0;--i){r[i+ds+1]=this[i]>>cbs|c;c=(this[i]&bm)<=0;--i)r[i]=0;r[ds]=c;r.t=this.t+ds+1;r.s=this.s;r.clamp()}function bnpRShiftTo(n,r){r.s=this.s;var ds=Math.floor(n/this.DB);if(ds>=this.t){r.t=0;return}var bs=n%this.DB;var cbs=this.DB-bs;var bm=(1<>bs;for(var i=ds+1;i>bs}if(bs>0)r[this.t-ds-1]|=(this.s&bm)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c-=a.s}r.s=c<0?-1:0;if(c<-1)r[i++]=this.DV+c;else if(c>0)r[i++]=c;r.t=i;r.clamp()}function bnpMultiplyTo(a,r){var x=this.abs(),y=a.abs();var i=x.t;r.t=i+y.t;while(--i>=0)r[i]=0;for(i=0;i=0)r[i]=0;for(i=0;i=x.DV){r[i+x.t]-=x.DV;r[i+x.t+1]=1}}if(r.t>0)r[r.t-1]+=x.am(i,x[i],r,2*i,0,1);r.s=0;r.clamp()}function bnpDivRemTo(m,q,r){var pm=m.abs();if(pm.t<=0)return;var pt=this.abs();if(pt.t0){pm.lShiftTo(nsh,y);pt.lShiftTo(nsh,r)}else{pm.copyTo(y);pt.copyTo(r)}var ys=y.t;var y0=y[ys-1];if(y0==0)return;var yt=y0*(1<1?y[ys-2]>>this.F2:0);var d1=this.FV/yt,d2=(1<=0){r[r.t++]=1;r.subTo(t,r)}BigInteger.ONE.dlShiftTo(ys,t);t.subTo(y,y);while(y.t=0){var qd=r[--i]==y0?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);if((r[i]+=y.am(0,qd,r,j,0,ys))0)r.rShiftTo(nsh,r);if(ts<0)BigInteger.ZERO.subTo(r,r)}function bnMod(a){var r=nbi();this.abs().divRemTo(a,null,r);if(this.s<0&&r.compareTo(BigInteger.ZERO)>0)a.subTo(r,r);return r}function Classic(m){this.m=m}function cConvert(x){if(x.s<0||x.compareTo(this.m)>=0)return x.mod(this.m);else return x}function cRevert(x){return x}function cReduce(x){x.divRemTo(this.m,null,x)}function cMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}function cSqrTo(x,r){x.squareTo(r);this.reduce(r)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1)return 0;var x=this[0];if((x&1)==0)return 0;var y=x&3;y=y*(2-(x&15)*y)&15;y=y*(2-(x&255)*y)&255;y=y*(2-((x&65535)*y&65535))&65535;y=y*(2-x*y%this.DV)%this.DV;return y>0?this.DV-y:-y}function Montgomery(m){this.m=m;this.mp=m.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<0)this.m.subTo(r,r);return r}function montRevert(x){var r=nbi();x.copyTo(r);this.reduce(r);return r}function montReduce(x){while(x.t<=this.mt2)x[x.t++]=0;for(var i=0;i>15)*this.mpl&this.um)<<15)&x.DM;j=i+this.m.t;x[j]+=this.m.am(0,u0,x,i,0,this.m.t);while(x[j]>=x.DV){x[j]-=x.DV;x[++j]++}}x.clamp();x.drShiftTo(this.m.t,x);if(x.compareTo(this.m)>=0)x.subTo(this.m,x)}function montSqrTo(x,r){x.squareTo(r);this.reduce(r)}function montMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(e,z){if(e>4294967295||e<1)return BigInteger.ONE;var r=nbi(),r2=nbi(),g=z.convert(this),i=nbits(e)-1;g.copyTo(r);while(--i>=0){z.sqrTo(r,r2);if((e&1<0)z.mulTo(r2,g,r);else{var t=r;r=r2;r2=t}}return z.revert(r)}function bnModPowInt(e,m){var z;if(e<256||m.isEven())z=new Classic(m);else z=new Montgomery(m);return this.exp(e,z)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnpFromRadix(s,b){this.fromInt(0);if(b==null)b=10;var cs=this.chunkSize(b);var d=Math.pow(b,cs),mi=false,j=0,w=0;for(var i=0;i=cs){this.dMultiply(d);this.dAddOffset(w,0);j=0;w=0}}if(j>0){this.dMultiply(Math.pow(b,j));this.dAddOffset(w,0)}if(mi)BigInteger.ZERO.subTo(this,this)}function bnpChunkSize(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}function bnSigNum(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function bnpDMultiply(n){this[this.t]=this.am(0,n-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(n,w){if(n==0)return;while(this.t<=w)this[this.t++]=0;this[w]+=n;while(this[w]>=this.DV){this[w]-=this.DV;if(++w>=this.t)this[this.t++]=0;++this[w]}}function bnpToRadix(b){if(b==null)b=10;if(this.signum()==0||b<2||b>36)return"0";var cs=this.chunkSize(b);var a=Math.pow(b,cs);var d=nbv(a),y=nbi(),z=nbi(),r="";this.divRemTo(d,y,z);while(y.signum()>0){r=(a+z.intValue()).toString(b).substr(1)+r;y.divRemTo(d,y,z)}return z.intValue().toString(b)+r}function bnIntValue(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c+=a.s}r.s=c<0?-1:0;if(c>0)r[i++]=c;else if(c<-1)r[i++]=this.DV+c;r.t=i;r.clamp()}BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.addTo=bnpAddTo;var Wrapper={abs:(function(l,h){var x=new goog.math.Long(l,h);var ret;if(x.isNegative()){ret=x.negate()}else{ret=x}HEAP32[tempDoublePtr>>2]=ret.low_;HEAP32[tempDoublePtr+4>>2]=ret.high_}),ensureTemps:(function(){if(Wrapper.ensuredTemps)return;Wrapper.ensuredTemps=true;Wrapper.two32=new BigInteger;Wrapper.two32.fromString("4294967296",10);Wrapper.two64=new BigInteger;Wrapper.two64.fromString("18446744073709551616",10);Wrapper.temp1=new BigInteger;Wrapper.temp2=new BigInteger}),lh2bignum:(function(l,h){var a=new BigInteger;a.fromString(h.toString(),10);var b=new BigInteger;a.multiplyTo(Wrapper.two32,b);var c=new BigInteger;c.fromString(l.toString(),10);var d=new BigInteger;c.addTo(b,d);return d}),stringify:(function(l,h,unsigned){var ret=(new goog.math.Long(l,h)).toString();if(unsigned&&ret[0]=="-"){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(ret,10);ret=new BigInteger;Wrapper.two64.addTo(bignum,ret);ret=ret.toString(10)}return ret}),fromString:(function(str,base,min,max,unsigned){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(str,base);var bigmin=new BigInteger;bigmin.fromString(min,10);var bigmax=new BigInteger;bigmax.fromString(max,10);if(unsigned&&bignum.compareTo(BigInteger.ZERO)<0){var temp=new BigInteger;bignum.addTo(Wrapper.two64,temp);bignum=temp}var error=false;if(bignum.compareTo(bigmin)<0){bignum=bigmin;error=true}else if(bignum.compareTo(bigmax)>0){bignum=bigmax;error=true}var ret=goog.math.Long.fromString(bignum.toString());HEAP32[tempDoublePtr>>2]=ret.low_;HEAP32[tempDoublePtr+4>>2]=ret.high_;if(error)throw"range error"})};return Wrapper})();if(memoryInitializer){if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,STATIC_BASE)}else{addRunDependency("memory initializer");Browser.asyncLoad(memoryInitializer,(function(data){HEAPU8.set(data,STATIC_BASE);removeRunDependency("memory initializer")}),(function(data){throw"could not load memory initializer "+memoryInitializer}))}}function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"]&&shouldRunNow)run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called");args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0)}}var argv=[allocate(intArrayFromString(Module["thisProgram"]||"/bin/this.program"),"i8",ALLOC_NORMAL)];pad();for(var i=0;i0){Module.printErr("run() called, but dependencies remain, so not running");return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;ensureInitRuntime();preMain();if(ENVIRONMENT_IS_WEB&&preloadStartTime!==null){Module.printErr("pre-main prep time: "+(Date.now()-preloadStartTime)+" ms")}if(Module["_main"]&&shouldRunNow){Module["callMain"](args)}postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);if(!ABORT)doRun()}),1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status){ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();throw new ExitStatus(status)}Module["exit"]=Module.exit=exit;function abort(text){if(text){Module.print(text);Module.printErr(text)}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw"abort() at "+stackTrace()+extra}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run() - - - - -module.exports = Module - -},{}],2:[function(require,module,exports){ -exports.OpusDecoder = require('./src/decoder'); -exports.OggDemuxer = require('./src/demuxer'); - -},{"./src/decoder":3,"./src/demuxer":4}],3:[function(require,module,exports){ -var AV = (typeof window !== "undefined" ? window.AV : typeof global !== "undefined" ? global.AV : null); -var opus = require('../build/libopus'); - -var OpusDecoder = AV.Decoder.extend(function() { - AV.Decoder.register('opus', this); - - this.prototype.init = function() { - this.buflen = 4096; - this.buf = opus._malloc(this.buflen); - - this.outlen = 4096; - this.outbuf = opus._malloc(this.outlen * this.format.channelsPerFrame * 4); - this.f32 = this.outbuf >> 2; - - this.opus = opus._opus_decoder_create(this.format.sampleRate, this.format.channelsPerFrame, this.buf); - }; - - this.prototype.readChunk = function() { - if (!this.stream.available(1)) - throw new AV.UnderflowError(); - - var list = this.stream.list; - var packet = list.first; - list.advance(); - - if (this.buflen < packet.length) { - this.buf = opus._realloc(this.buf, packet.length); - this.buflen = packet.length; - } - - opus.HEAPU8.set(packet.data, this.buf); - - var len = opus._opus_decode_float(this.opus, this.buf, packet.length, this.outbuf, this.outlen, 0); - if (len < 0) - throw new Error("Opus decoding error: " + len); - - var samples = opus.HEAPF32.subarray(this.f32, this.f32 + len * this.format.channelsPerFrame); - return new Float32Array(samples); - }; - - this.prototype.destroy = function() { - this._super(); - opus._free(this.buf); - opus._free(this.outbuf); - opus._opus_decoder_destroy(this.opus); - - this.buf = null; - this.outbuf = null; - this.opus = null; - }; -}); - -module.exports = OpusDecoder; - -},{"../build/libopus":1}],4:[function(require,module,exports){ -var AV = (typeof window !== "undefined" ? window.AV : typeof global !== "undefined" ? global.AV : null); -var OggDemuxer = (typeof window !== "undefined" ? window.AV.OggDemuxer : typeof global !== "undefined" ? global.AV.OggDemuxer : null); - -OggDemuxer.plugins.push({ - magic: "OpusHead", - - readHeaders: function(packet) { - if (packet[8] !== 1) - throw new Error("Unknown opus version"); - - this.emit('format', { - formatID: 'opus', - sampleRate: 48000, - channelsPerFrame: packet[9], - floatingPoint: true - }); - - return true; - }, - - readPacket: function(packet) { - var tag = packet.subarray(0, 8); - if (String.fromCharCode.apply(String, tag) === "OpusTags") { - var stream = AV.Stream.fromBuffer(new AV.Buffer(packet)); - stream.advance(8); - - var metadata = {}; - var len = stream.readUInt32(true); - metadata.vendor = stream.readString(len); - - var length = stream.readUInt32(true); - - for (var i = 0; i < length; i++) { - len = stream.readUInt32(true); - var str = stream.readString(len, 'utf8'), - idx = str.indexOf('='); - - metadata[str.slice(0, idx).toLowerCase()] = str.slice(idx + 1); - } - - this.emit('metadata', metadata); - } else { - this.emit('data', new AV.Buffer(packet)); - } - } -}); - -module.exports = OggDemuxer; - -},{}]},{},[2]) \ No newline at end of file diff --git a/src/core/static/js/libs/jplayer/aurora/vorbis.js b/src/core/static/js/libs/jplayer/aurora/vorbis.js deleted file mode 100644 index 1ced3d1..0000000 --- a/src/core/static/js/libs/jplayer/aurora/vorbis.js +++ /dev/null @@ -1,161 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o?/.test(type))return true;return type[0]=="%"},INT_TYPES:{"i1":0,"i8":0,"i16":0,"i32":0,"i64":0},FLOAT_TYPES:{"float":0,"double":0},or64:(function(x,y){var l=x|0|(y|0);var h=(Math.round(x/4294967296)|Math.round(y/4294967296))*4294967296;return l+h}),and64:(function(x,y){var l=(x|0)&(y|0);var h=(Math.round(x/4294967296)&Math.round(y/4294967296))*4294967296;return l+h}),xor64:(function(x,y){var l=(x|0)^(y|0);var h=(Math.round(x/4294967296)^Math.round(y/4294967296))*4294967296;return l+h}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),dedup:function dedup(items,ident){var seen={};if(ident){return items.filter((function(item){if(seen[item[ident]])return false;seen[item[ident]]=true;return true}))}else{return items.filter((function(item){if(seen[item])return false;seen[item]=true;return true}))}},set:function set(){var args=typeof arguments[0]==="object"?arguments[0]:arguments;var ret={};for(var i=0;i=0){diffs.push(curr-prev)}prev=curr;return curr}));if(type.name_&&type.name_[0]==="["){type.flatSize=parseInt(type.name_.substr(1))*type.flatSize/2}type.flatSize=Runtime.alignMemory(type.flatSize,type.alignSize);if(diffs.length==0){type.flatFactor=type.flatSize}else if(Runtime.dedup(diffs).length==1){type.flatFactor=diffs[0]}type.needsFlattening=type.flatFactor!=1;return type.flatIndexes},generateStructInfo:(function(struct,typeName,offset){var type,alignment;if(typeName){offset=offset||0;type=(typeof Types==="undefined"?Runtime.typeInfo:Types.types)[typeName];if(!type)return null;if(type.fields.length!=struct.length){printErr("Number of named fields must match the type for "+typeName+": possibly duplicate struct names. Cannot return structInfo");return null}alignment=type.flatIndexes}else{var type={fields:struct.map((function(item){return item[0]}))};alignment=Runtime.calculateStructAlignment(type)}var ret={__size__:type.flatSize};if(typeName){struct.forEach((function(item,i){if(typeof item==="string"){ret[item]=alignment[i]+offset}else{var key;for(var k in item)key=k;ret[key]=Runtime.generateStructInfo(item[key],type.fields[i],alignment[i])}}))}else{struct.forEach((function(item,i){ret[item[1]]=alignment[i]}))}return ret}),dynCall:(function(sig,ptr,args){if(args&&args.length){if(!args.splice)args=Array.prototype.slice.call(args);args.splice(0,0,ptr);return Module["dynCall_"+sig].apply(null,args)}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],addFunction:(function(func){for(var i=0;i0)return""}var c1=buffer[0];var c2=buffer[1];var c3=buffer[2];var c4=buffer[3];var ret;if(buffer.length==2){ret=String.fromCharCode((c1&31)<<6|c2&63)}else if(buffer.length==3){ret=String.fromCharCode((c1&15)<<12|(c2&63)<<6|c3&63)}else{var codePoint=(c1&7)<<18|(c2&63)<<12|(c3&63)<<6|c4&63;ret=String.fromCharCode(Math.floor((codePoint-65536)/1024)+55296,(codePoint-65536)%1024+56320)}buffer.length=0;return ret});this.processJSString=function processJSString(string){string=unescape(encodeURIComponent(string));var ret=[];for(var i=0;i=TOTAL_MEMORY)enlargeMemory();return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:8))*(quantum?quantum:8);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;function jsCall(){var args=Array.prototype.slice.call(arguments);return Runtime.functionPointers[args[0]].apply(null,args.slice(1))}var __THREW__=0;var ABORT=false;var EXITSTATUS=0;var undef=0;var tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempDouble,tempFloat;var tempI64,tempI64b;var tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var globalScope=this;function getCFunc(ident){var func=Module["_"+ident];if(!func){try{func=eval("_"+ident)}catch(e){}}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func}var cwrap,ccall;((function(){var stack=0;var JSfuncs={"stackSave":(function(){stack=Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore(stack)}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=Runtime.stackAlloc(str.length+1);writeStringToMemory(str,ret)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};ccall=function ccallFunc(ident,returnType,argTypes,args){var func=getCFunc(ident);var cArgs=[];if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}return null}Module["getValue"]=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];if(t>=128)hasUtf=true;else if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(!hasUtf){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}var utf8=new Runtime.UTF8Processor;for(i=0;i>0];ret+=utf8.processCChar(t)}return ret}Module["Pointer_stringify"]=Pointer_stringify;function UTF16ToString(ptr){var i=0;var str="";while(1){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)return str;++i;str+=String.fromCharCode(codeUnit)}}Module["UTF16ToString"]=UTF16ToString;function stringToUTF16(str,outPtr){for(var i=0;i>1]=codeUnit}HEAP16[outPtr+str.length*2>>1]=0}Module["stringToUTF16"]=stringToUTF16;function UTF32ToString(ptr){var i=0;var str="";while(1){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)return str;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}}Module["UTF32ToString"]=UTF32ToString;function stringToUTF32(str,outPtr){var iChar=0;for(var iCodeUnit=0;iCodeUnit=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++iCodeUnit);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr+iChar*4>>2]=codeUnit;++iChar}HEAP32[outPtr+iChar*4>>2]=0}Module["stringToUTF32"]=stringToUTF32;function demangle(func){var i=3;var basicTypes={"v":"void","b":"bool","c":"char","s":"short","i":"int","l":"long","f":"float","d":"double","w":"wchar_t","a":"signed char","h":"unsigned char","t":"unsigned short","j":"unsigned int","m":"unsigned long","x":"long long","y":"unsigned long long","z":"..."};var subs=[];var first=true;function dump(x){if(x)Module.print(x);Module.print(func);var pre="";for(var a=0;a"}else{ret=name}paramLoop:while(i0){var c=func[i++];if(c in basicTypes){list.push(basicTypes[c])}else{switch(c){case"P":list.push(parse(true,1,true)[0]+"*");break;case"R":list.push(parse(true,1,true)[0]+"&");break;case"L":{i++;var end=func.indexOf("E",i);var size=end-i;list.push(func.substr(i,size));i+=size+2;break};case"A":{var size=parseInt(func.substr(i));i+=size.toString().length;if(func[i]!=="_")throw"?";i++;list.push(parse(true,1,true)[0]+" ["+size+"]");break};case"E":break paramLoop;default:ret+="?"+c;break paramLoop}}}if(!allowVoid&&list.length===1&&list[0]==="void")list=[];if(rawList){if(ret){list.push(ret+"?")}return list}else{return ret+flushList()}}try{if(func=="Object._main"||func=="_main"){return"main()"}if(typeof func==="number")func=Pointer_stringify(func);if(func[0]!=="_")return func;if(func[1]!=="_")return func;if(func[2]!=="Z")return func;switch(func[3]){case"n":return"operator new()";case"d":return"operator delete()"}return parse()}catch(e){return func}}function demangleAll(text){return text.replace(/__Z[\w\d_]+/g,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function stackTrace(){var stack=(new Error).stack;return stack?demangleAll(stack):"(no stack trace available)"}var PAGE_SIZE=4096;function alignMemoryPage(x){return x+4095&-4096}var HEAP;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var STATIC_BASE=0,STATICTOP=0,staticSealed=false;var STACK_BASE=0,STACKTOP=0,STACK_MAX=0;var DYNAMIC_BASE=0,DYNAMICTOP=0;function enlargeMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.")}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;var FAST_MEMORY=Module["FAST_MEMORY"]||2097152;var totalMemory=4096;while(totalMemory0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Runtime.dynCall("v",func)}else{Runtime.dynCall("vi",func,[callback.arg])}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeInitialized=false}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}Module["addOnPreRun"]=Module.addOnPreRun=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=Module.addOnInit=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=Module.addOnPreMain=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=Module.addOnExit=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=Module.addOnPostRun=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var ret=(new Runtime.UTF8Processor).processJSString(stringy);if(length){ret.length=length}if(!dontAddNull){ret.push(0)}return ret}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){var array=intArrayFromString(string,dontAddNull);var i=0;while(i>0]=chr;i=i+1}}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){for(var i=0;i>0]=array[i]}}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer+str.length>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;function unSign(value,bits,ignore){if(value>=0){return value}return bits<=32?2*Math.abs(1<=half&&(bits<=32||value>half)){value=-2*half+value}return value}if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};Math.imul=Math["imul"];var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;STATIC_BASE=8;STATICTOP=STATIC_BASE+Runtime.alignMemory(58939);__ATINIT__.push();allocate([0,0,0,0,1,0,0,0,3,0,0,0,7,0,0,0,15,0,0,0,31,0,0,0,63,0,0,0,127,0,0,0,255,0,0,0,255,1,0,0,255,3,0,0,255,7,0,0,255,15,0,0,255,31,0,0,255,63,0,0,255,127,0,0,255,255,0,0,255,255,1,0,255,255,3,0,255,255,7,0,255,255,15,0,255,255,31,0,255,255,63,0,255,255,127,0,255,255,255,0,255,255,255,1,255,255,255,3,255,255,255,7,255,255,255,15,255,255,255,31,255,255,255,63,255,255,255,127,255,255,255,255,0,0,0,0,4,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,192,0,0,0,64,1,0,0,64,2,0,0,64,4,0,0,64,8,0,0,64,16,0,0,64,32,0,0,64,64,0,0,24,0,120,58,76,70,11,60,242,204,192,60,116,252,59,61,86,73,154,61,241,93,228,61,248,163,29,62,180,231,78,62,54,157,130,62,78,220,159,62,193,174,190,62,65,132,222,62,173,194,254,62,186,101,15,63,248,0,31,63,29,233,45,63,249,219,59,63,45,162,72,63,160,17,84,63,38,15,94,63,46,143,102,63,112,149,109,63,174,51,115,63,159,135,119,63,66,184,122,63,196,242,124,63,75,103,126,63,196,69,127,63,241,186,127,63,217,237,127,63,162,253,127,63,248,255,127,63,168,9,120,57,17,119,11,59,135,139,193,59,74,113,61,60,148,82,156,60,94,8,233,60,42,83,34,61,74,118,87,61,138,227,137,61,7,140,171,61,34,154,208,61,108,239,248,61,164,52,18,62,100,112,41,62,65,21,66,62,67,11,92,62,47,56,119,62,197,191,137,62,92,97,152,62,135,112,167,62,4,220,182,62,188,145,198,62,231,126,214,62,48,144,230,62,227,177,246,62,13,104,3,63,121,107,11,63,98,89,19,63,42,40,27,63,137,206,34,63,166,67,42,63,49,127,49,63,126,121,56,63,153,43,63,63,92,143,69,63,127,159,75,63,165,87,81,63,104,180,86,63,89,179,91,63,8,83,96,63,252,146,100,63,177,115,104,63,138,246,107,63,198,29,111,63,109,236,113,63,62,102,116,63,154,143,118,63,104,109,120,63,3,5,122,63,26,92,123,63,153,120,124,63,143,96,125,63,17,26,126,63,39,171,126,63,176,25,127,63,74,107,127,63,68,165,127,63,132,204,127,63,123,229,127,63,17,244,127,63,158,251,127,63,219,254,127,63,218,255,127,63,0,0,128,63,5,12,120,56,50,131,11,58,118,186,193,58,226,203,61,59,38,207,156,59,139,32,234,59,245,102,35,60,63,100,89,60,184,127,139,60,59,23,174,60,239,114,212,60,96,140,254,60,45,46,22,61,114,237,46,61,155,127,73,61,220,223,101,61,123,4,130,61,159,250,145,61,71,207,162,61,38,127,180,61,173,6,199,61,16,98,218,61,63,141,238,61,244,193,1,62,185,160,12,62,128,224,23,62,182,126,35,62,166,120,47,62,116,203,59,62,34,116,72,62,141,111,85,62,107,186,98,62,83,81,112,62,180,48,126,62,110,42,134,62,252,92,141,62,9,174,148,62,138,27,156,62,100,163,163,62,112,67,171,62,119,249,178,62,54,195,186,62,93,158,194,62,147,136,202,62,118,127,210,62,154,128,218,62,142,137,226,62,217,151,234,62,2,169,242,62,139,186,250,62,251,100,1,63,99,106,5,63,65,108,9,63,89,105,13,63,116,96,17,63,94,80,21,63,231,55,25,63,231,21,29,63,58,233,32,63,197,176,36,63,116,107,40,63,62,24,44,63,35,182,47,63,43,68,51,63,109,193,54,63,10,45,58,63,48,134,61,63,26,204,64,63,17,254,67,63,107,27,71,63,142,35,74,63,238,21,77,63,15,242,79,63,132,183,82,63,239,101,85,63,3,253,87,63,129,124,90,63,60,228,92,63,21,52,95,63,254,107,97,63,246,139,99,63,14,148,101,63,98,132,103,63,33,93,105,63,133,30,107,63,213,200,108,63,103,92,110,63,155,217,111,63,224,64,113,63,172,146,114,63,131,207,115,63,241,247,116,63,139,12,118,63,239,13,119,63,193,252,119,63,172,217,120,63,99,165,121,63,155,96,122,63,15,12,123,63,124,168,123,63,163,54,124,63,71,183,124,63,41,43,125,63,13,147,125,63,183,239,125,63,229,65,126,63,89,138,126,63,205,201,126,63,251,0,127,63,150,48,127,63,78,89,127,63,205,123,127,63,182,152,127,63,167,176,127,63,53,196,127,63,239,211,127,63,91,224,127,63,245,233,127,63,51,241,127,63,127,246,127,63,59,250,127,63,190,252,127,63,84,254,127,63,64,255,127,63,186,255,127,63,238,255,127,63,254,255,127,63,0,0,128,63,169,12,120,55,54,134,11,57,38,198,193,57,94,226,61,58,234,237,156,58,85,101,234,58,56,170,35,59,207,219,89,59,169,226,139,59,42,178,174,59,13,91,213,59,204,219,255,59,91,25,23,60,250,46,48,60,194,45,75,60,156,20,104,60,46,113,131,60,225,202,147,60,185,22,165,60,1,84,183,60,245,129,202,60,198,159,222,60,155,172,243,60,199,211,4,61,213,71,16,61,250,49,28,61,174,145,40,61,101,102,53,61,141,175,66,61,140,108,80,61,193,156,94,61,133,63,109,61,41,84,124,61,252,236,133,61,26,232,141,61,13,27,150,61,110,133,158,61,212,38,167,61,210,254,175,61,245,12,185,61,200,80,194,61,209,201,203,61,146,119,213,61,139,89,223,61,51,111,233,61,2,184,243,61,105,51,254,61,106,112,4,62,214,223,9,62,171,103,15,62,153,7,21,62,77,191,26,62,116,142,32,62,181,116,38,62,184,113,44,62,34,133,50,62,149,174,56,62,178,237,62,62,21,66,69,62,92,171,75,62,30,41,82,62,243,186,88,62,112,96,95,62,40,25,102,62,170,228,108,62,132,194,115,62,68,178,122,62,185,217,128,62,203,98,132,62,26,244,135,62,105,141,139,62,120,46,143,62,6,215,146,62,211,134,150,62,156,61,154,62,29,251,157,62,19,191,161,62,57,137,165,62,71,89,169,62,249,46,173,62,5,10,177,62,36,234,180,62,13,207,184,62,117,184,188,62,18,166,192,62,153,151,196,62,190,140,200,62,52,133,204,62,175,128,208,62,225,126,212,62,125,127,216,62,52,130,220,62,184,134,224,62,185,140,228,62,233,147,232,62,248,155,236,62,150,164,240,62,117,173,244,62,67,182,248,62,178,190,252,62,57,99,0,63,153,102,2,63,82,105,4,63,60,107,6,63,48,108,8,63,6,108,10,63,151,106,12,63,188,103,14,63,78,99,16,63,39,93,18,63,33,85,20,63,21,75,22,63,222,62,24,63,87,48,26,63,92,31,28,63,199,11,30,63,117,245,31,63,66,220,33,63,12,192,35,63,176,160,37,63,12,126,39,63,254,87,41,63,104,46,43,63,39,1,45,63,29,208,46,63,43,155,48,63,51,98,50,63,23,37,52,63,188,227,53,63,4,158,55,63,214,83,57,63,23,5,59,63,173,177,60,63,128,89,62,63,120,252,63,63,126,154,65,63,124,51,67,63,93,199,68,63,12,86,70,63,119,223,71,63,138,99,73,63,54,226,74,63,104,91,76,63,17,207,77,63,35,61,79,63,145,165,80,63,76,8,82,63,75,101,83,63,130,188,84,63,231,13,86,63,114,89,87,63,26,159,88,63,218,222,89,63,172,24,91,63,138,76,92,63,113,122,93,63,93,162,94,63,78,196,95,63,67,224,96,63,58,246,97,63,54,6,99,63,56,16,100,63,67,20,101,63,92,18,102,63,133,10,103,63,198,252,103,63,37,233,104,63,168,207,105,63,89,176,106,63,64,139,107,63,102,96,108,63,216,47,109,63,159,249,109,63,201,189,110,63,97,124,111,63,118,53,112,63,23,233,112,63,81,151,113,63,53,64,114,63,212,227,114,63,61,130,115,63,131,27,116,63,184,175,116,63,238,62,117,63,56,201,117,63,171,78,118,63,90,207,118,63,90,75,119,63,192,194,119,63,162,53,120,63,21,164,120,63,48,14,121,63,8,116,121,63,182,213,121,63,79,51,122,63,235,140,122,63,162,226,122,63,139,52,123,63,191,130,123,63,85,205,123,63,102,20,124,63,9,88,124,63,88,152,124,63,106,213,124,63,88,15,125,63,58,70,125,63,41,122,125,63,62,171,125,63,143,217,125,63,54,5,126,63,75,46,126,63,228,84,126,63,27,121,126,63,7,155,126,63,190,186,126,63,88,216,126,63,236,243,126,63,144,13,127,63,91,37,127,63,99,59,127,63,188,79,127,63,125,98,127,63,185,115,127,63,135,131,127,63,249,145,127,63,36,159,127,63,26,171,127,63,238,181,127,63,179,191,127,63,122,200,127,63,85,208,127,63,84,215,127,63,136,221,127,63,0,227,127,63,204,231,127,63,249,235,127,63,150,239,127,63,177,242,127,63,85,245,127,63,144,247,127,63,109,249,127,63,246,250,127,63,54,252,127,63,55,253,127,63,1,254,127,63,156,254,127,63,18,255,127,63,103,255,127,63,163,255,127,63,204,255,127,63,229,255,127,63,244,255,127,63,252,255,127,63,255,255,127,63,0,0,128,63,0,0,128,63,60,12,120,54,253,134,11,56,19,201,193,56,248,231,61,57,148,245,156,57,115,118,234,57,238,186,35,58,113,249,89,58,32,251,139,58,96,216,174,58,34,148,213,58,3,23,0,59,209,82,23,59,65,125,48,59,21,150,75,59,8,157,104,59,233,200,131,59,20,58,148,59,218,161,165,59,16,0,184,59,136,84,203,59,16,159,223,59,118,223,244,59,194,138,5,60,128,32,17,60,217,48,29,60,172,187,41,60,219,192,54,60,67,64,68,60,194,57,82,60,52,173,96,60,115,154,111,60,88,1,127,60,222,112,135,60,186,157,143,60,42,7,152,60,25,173,160,60,112,143,169,60,23,174,178,60,246,8,188,60,243,159,197,60,245,114,207,60,225,129,217,60,156,204,227,60,10,83,238,60,14,21,249,60,70,9,2,61,177,165,7,61,187,95,13,61,81,55,19,61,102,44,25,61,230,62,31,61,195,110,37,61,233,187,43,61,71,38,50,61,202,173,56,61,97,82,63,61,247,19,70,61,121,242,76,61,210,237,83,61,240,5,91,61,187,58,98,61,32,140,105,61,8,250,112,61,93,132,120,61,132,21,128,61,249,246,131,61,130,230,135,61,19,228,139,61,159,239,143,61,26,9,148,61,119,48,152,61,169,101,156,61,163,168,160,61,88,249,164,61,186,87,169,61,186,195,173,61,76,61,178,61,95,196,182,61,230,88,187,61,209,250,191,61,18,170,196,61,152,102,201,61,85,48,206,61,56,7,211,61,48,235,215,61,47,220,220,61,34,218,225,61,248,228,230,61,161,252,235,61,11,33,241,61,35,82,246,61,217,143,251,61,13,109,0,62,105,24,3,62,247,201,5,62,174,129,8,62,133,63,11,62,113,3,14,62,104,205,16,62,96,157,19,62,79,115,22,62,42,79,25,62,232,48,28,62,124,24,31,62,221,5,34,62,255,248,36,62,215,241,39,62,90,240,42,62,125,244,45,62,51,254,48,62,114,13,52,62,45,34,55,62,88,60,58,62,232,91,61,62,208,128,64,62,3,171,67,62,118,218,70,62,26,15,74,62,229,72,77,62,199,135,80,62,181,203,83,62,162,20,87,62,127,98,90,62,63,181,93,62,213,12,97,62,50,105,100,62,73,202,103,62,12,48,107,62,108,154,110,62,92,9,114,62,203,124,117,62,173,244,120,62,241,112,124,62,138,241,127,62,52,187,129,62,190,127,131,62,91,70,133,62,4,15,135,62,176,217,136,62,89,166,138,62,245,116,140,62,126,69,142,62,234,23,144,62,50,236,145,62,78,194,147,62,54,154,149,62,224,115,151,62,70,79,153,62,93,44,155,62,31,11,157,62,130,235,158,62,127,205,160,62,11,177,162,62,31,150,164,62,177,124,166,62,186,100,168,62,47,78,170,62,9,57,172,62,62,37,174,62,198,18,176,62,150,1,178,62,167,241,179,62,238,226,181,62,100,213,183,62,254,200,185,62,179,189,187,62,122,179,189,62,74,170,191,62,25,162,193,62,221,154,195,62,142,148,197,62,34,143,199,62,142,138,201,62,203,134,203,62,205,131,205,62,140,129,207,62,253,127,209,62,24,127,211,62,210,126,213,62,33,127,215,62,252,127,217,62,88,129,219,62,45,131,221,62,112,133,223,62,23,136,225,62,25,139,227,62,108,142,229,62,5,146,231,62,219,149,233,62,228,153,235,62,21,158,237,62,102,162,239,62,203,166,241,62,59,171,243,62,173,175,245,62,21,180,247,62,107,184,249,62,164,188,251,62,181,192,253,62,150,196,255,62,30,228,0,63,207,229,1,63,88,231,2,63,182,232,3,63,226,233,4,63,215,234,5,63,146,235,6,63,12,236,7,63,66,236,8,63,45,236,9,63,202,235,10,63,19,235,11,63,4,234,12,63,151,232,13,63,200,230,14,63,145,228,15,63,239,225,16,63,220,222,17,63,84,219,18,63,81,215,19,63,208,210,20,63,202,205,21,63,61,200,22,63,34,194,23,63,117,187,24,63,50,180,25,63,85,172,26,63,215,163,27,63,182,154,28,63,236,144,29,63,117,134,30,63,77,123,31,63,110,111,32,63,214,98,33,63,126,85,34,63,100,71,35,63,130,56,36,63,212,40,37,63,87,24,38,63,5,7,39,63,219,244,39,63,213,225,40,63,239,205,41,63,36,185,42,63,113,163,43,63,209,140,44,63,64,117,45,63,188,92,46,63,63,67,47,63,199,40,48,63,78,13,49,63,211,240,49,63,80,211,50,63,195,180,51,63,39,149,52,63,122,116,53,63,184,82,54,63,220,47,55,63,229,11,56,63,206,230,56,63,149,192,57,63,54,153,58,63,174,112,59,63,249,70,60,63,21,28,61,63,255,239,61,63,179,194,62,63,48,148,63,63,113,100,64,63,116,51,65,63,55,1,66,63,182,205,66,63,239,152,67,63,224,98,68,63,134,43,69,63,222,242,69,63,230,184,70,63,156,125,71,63,253,64,72,63,7,3,73,63,184,195,73,63,14,131,74,63,6,65,75,63,159,253,75,63,215,184,76,63,172,114,77,63,28,43,78,63,38,226,78,63,199,151,79,63,253,75,80,63,201,254,80,63,39,176,81,63,22,96,82,63,150,14,83,63,164,187,83,63,63,103,84,63,103,17,85,63,26,186,85,63,86,97,86,63,28,7,87,63,105,171,87,63,62,78,88,63,152,239,88,63,120,143,89,63,221,45,90,63,198,202,90,63,50,102,91,63,33,0,92,63,147,152,92,63,134,47,93,63,251,196,93,63,242,88,94,63,105,235,94,63,98,124,95,63,219,11,96,63,213,153,96,63,80,38,97,63,76,177,97,63,201,58,98,63,199,194,98,63,70,73,99,63,71,206,99,63,202,81,100,63,208,211,100,63,88,84,101,63,100,211,101,63,244,80,102,63,9,205,102,63,163,71,103,63,195,192,103,63,107,56,104,63,154,174,104,63,82,35,105,63,147,150,105,63,96,8,106,63,184,120,106,63,157,231,106,63,16,85,107,63,19,193,107,63,166,43,108,63,203,148,108,63,132,252,108,63,209,98,109,63,180,199,109,63,48,43,110,63,68,141,110,63,244,237,110,63,64,77,111,63,42,171,111,63,181,7,112,63,225,98,112,63,177,188,112,63,38,21,113,63,67,108,113,63,10,194,113,63,123,22,114,63,155,105,114,63,106,187,114,63,234,11,115,63,31,91,115,63,9,169,115,63,172,245,115,63,9,65,116,63,35,139,116,63,252,211,116,63,151,27,117,63,245,97,117,63,26,167,117,63,8,235,117,63,193,45,118,63,72,111,118,63,159,175,118,63,202,238,118,63,201,44,119,63,161,105,119,63,84,165,119,63,228,223,119,63,85,25,120,63,168,81,120,63,226,136,120,63,3,191,120,63,16,244,120,63,11,40,121,63,247,90,121,63,215,140,121,63,173,189,121,63,125,237,121,63,73,28,122,63,20,74,122,63,226,118,122,63,181,162,122,63,144,205,122,63,118,247,122,63,107,32,123,63,112,72,123,63,138,111,123,63,186,149,123,63,5,187,123,63,109,223,123,63,245,2,124,63,160,37,124,63,113,71,124,63,108,104,124,63,147,136,124,63,233,167,124,63,114,198,124,63,48,228,124,63,38,1,125,63,89,29,125,63,201,56,125,63,124,83,125,63,115,109,125,63,178,134,125,63,60,159,125,63,19,183,125,63,60,206,125,63,184,228,125,63,139,250,125,63,184,15,126,63,66,36,126,63,44,56,126,63,120,75,126,63,43,94,126,63,70,112,126,63,204,129,126,63,194,146,126,63,41,163,126,63,4,179,126,63,86,194,126,63,35,209,126,63,109,223,126,63,55,237,126,63,131,250,126,63,85,7,127,63,175,19,127,63,148,31,127,63,7,43,127,63,10,54,127,63,160,64,127,63,205,74,127,63,146,84,127,63,242,93,127,63,239,102,127,63,141,111,127,63,206,119,127,63,181,127,127,63,67,135,127,63,124,142,127,63,98,149,127,63,247,155,127,63,61,162,127,63,56,168,127,63,233,173,127,63,83,179,127,63,120,184,127,63,90,189,127,63,252,193,127,63,95,198,127,63,134,202,127,63,116,206,127,63,41,210,127,63,168,213,127,63,244,216,127,63,13,220,127,63,247,222,127,63,179,225,127,63,67,228,127,63,168,230,127,63,229,232,127,63,252,234,127,63,237,236,127,63,188,238,127,63,105,240,127,63,246,241,127,63,101,243,127,63,183,244,127,63,238,245,127,63,11,247,127,63,16,248,127,63,254,248,127,63,214,249,127,63,155,250,127,63,76,251,127,63,236,251,127,63,124,252,127,63,252,252,127,63,110,253,127,63,211,253,127,63,44,254,127,63,121,254,127,63,189,254,127,63,247,254,127,63,42,255,127,63,84,255,127,63,120,255,127,63,150,255,127,63,175,255,127,63,195,255,127,63,211,255,127,63,224,255,127,63,234,255,127,63,241,255,127,63,246,255,127,63,250,255,127,63,253,255,127,63,254,255,127,63,255,255,127,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,171,15,120,53,24,135,11,55,225,201,193,55,107,233,61,56,128,247,156,56,187,122,234,56,24,191,35,57,213,0,90,57,56,1,140,57,229,225,174,57,88,162,213,57,60,33,0,58,24,97,23,58,175,144,48,58,243,175,75,58,212,190,104,58,159,222,131,58,143,85,148,58,48,196,165,58,119,42,184,58,90,136,203,58,204,221,223,58,191,42,245,58,148,183,5,59,124,85,17,59,16,111,29,59,73,4,42,59,31,21,55,59,138,161,68,59,129,169,82,59,252,44,97,59,241,43,112,59,88,166,127,59,19,206,135,59,169,6,144,59,233,124,152,59,204,48,161,59,79,34,170,59,106,81,179,59,26,190,188,59,86,104,198,59,26,80,208,59,95,117,218,59,31,216,228,59,83,120,239,59,244,85,250,59,126,184,2,60,177,100,8,60,145,47,14,60,25,25,20,60,70,33,26,60,19,72,32,60,126,141,38,60,129,241,44,60,25,116,51,60,65,21,58,60,246,212,64,60,50,179,71,60,243,175,78,60,50,203,85,60,235,4,93,60,26,93,100,60,186,211,107,60,198,104,115,60,58,28,123,60,7,119,129,60,33,111,133,60,102,118,137,60,212,140,141,60,105,178,145,60,33,231,149,60,251,42,154,60,243,125,158,60,6,224,162,60,50,81,167,60,115,209,171,60,199,96,176,60,43,255,180,60,154,172,185,60,19,105,190,60,146,52,195,60,20,15,200,60,149,248,204,60,19,241,209,60,137,248,214,60,245,14,220,60,83,52,225,60,160,104,230,60,215,171,235,60,246,253,240,60,249,94,246,60,220,206,251,60,205,166,0,61,153,109,3,61,207,59,6,61,109,17,9,61,114,238,11,61,220,210,14,61,167,190,17,61,211,177,20,61,94,172,23,61,68,174,26,61,133,183,29,61,30,200,32,61,12,224,35,61,78,255,38,61,225,37,42,61,196,83,45,61,243,136,48,61,109,197,51,61,47,9,55,61,55,84,58,61,130,166,61,61,15,0,65,61,218,96,68,61,226,200,71,61,35,56,75,61,156,174,78,61,73,44,82,61,40,177,85,61,55,61,89,61,115,208,92,61,217,106,96,61,103,12,100,61,25,181,103,61,238,100,107,61,227,27,111,61,244,217,114,61,30,159,118,61,96,107,122,61,182,62,126,61,143,12,129,61,73,253,130,61,138,241,132,61,79,233,134,61,150,228,136,61,94,227,138,61,167,229,140,61,109,235,142,61,175,244,144,61,109,1,147,61,164,17,149,61,83,37,151,61,120,60,153,61,17,87,155,61,30,117,157,61,155,150,159,61,136,187,161,61,226,227,163,61,169,15,166,61,218,62,168,61,116,113,170,61,116,167,172,61,218,224,174,61,162,29,177,61,205,93,179,61,87,161,181,61,62,232,183,61,130,50,186,61,32,128,188,61,22,209,190,61,98,37,193,61,2,125,195,61,245,215,197,61,57,54,200,61,203,151,202,61,169,252,204,61,211,100,207,61,68,208,209,61,252,62,212,61,249,176,214,61,56,38,217,61,184,158,219,61,117,26,222,61,111,153,224,61,163,27,227,61,14,161,229,61,175,41,232,61,132,181,234,61,138,68,237,61,191,214,239,61,33,108,242,61,174,4,245,61,99,160,247,61,62,63,250,61,61,225,252,61,93,134,255,61,78,23,1,62,252,108,2,62,56,196,3,62,255,28,5,62,81,119,6,62,45,211,7,62,145,48,9,62,125,143,10,62,238,239,11,62,228,81,13,62,94,181,14,62,89,26,16,62,214,128,17,62,210,232,18,62,77,82,20,62,69,189,21,62,184,41,23,62,166,151,24,62,13,7,26,62,236,119,27,62,65,234,28,62,11,94,30,62,73,211,31,62,250,73,33,62,28,194,34,62,173,59,36,62,172,182,37,62,24,51,39,62,240,176,40,62,50,48,42,62,220,176,43,62,238,50,45,62,101,182,46,62,64,59,48,62,126,193,49,62,30,73,51,62,29,210,52,62,123,92,54,62,54,232,55,62,76,117,57,62,187,3,59,62,131,147,60,62,162,36,62,62,22,183,63,62,222,74,65,62,248,223,66,62,98,118,68,62,28,14,70,62,35,167,71,62,117,65,73,62,18,221,74,62,247,121,76,62,35,24,78,62,149,183,79,62,74,88,81,62,66,250,82,62,121,157,84,62,240,65,86,62,163,231,87,62,146,142,89,62,186,54,91,62,26,224,92,62,177,138,94,62,124,54,96,62,122,227,97,62,169,145,99,62,7,65,101,62,147,241,102,62,75,163,104,62,44,86,106,62,54,10,108,62,102,191,109,62,187,117,111,62,51,45,113,62,204,229,114,62,132,159,116,62,90,90,118,62,75,22,120,62,85,211,121,62,120,145,123,62,176,80,125,62,253,16,127,62,46,105,128,62,101,74,129,62,36,44,130,62,105,14,131,62,52,241,131,62,130,212,132,62,84,184,133,62,169,156,134,62,127,129,135,62,213,102,136,62,171,76,137,62,255,50,138,62,209,25,139,62,32,1,140,62,233,232,140,62,46,209,141,62,236,185,142,62,34,163,143,62,208,140,144,62,244,118,145,62,142,97,146,62,156,76,147,62,29,56,148,62,17,36,149,62,118,16,150,62,76,253,150,62,144,234,151,62,67,216,152,62,99,198,153,62,239,180,154,62,230,163,155,62,71,147,156,62,17,131,157,62,67,115,158,62,219,99,159,62,218,84,160,62,60,70,161,62,3,56,162,62,43,42,163,62,181,28,164,62,160,15,165,62,233,2,166,62,145,246,166,62,149,234,167,62,245,222,168,62,176,211,169,62,197,200,170,62,50,190,171,62,246,179,172,62,17,170,173,62,129,160,174,62,69,151,175,62,91,142,176,62,196,133,177,62,125,125,178,62,133,117,179,62,220,109,180,62,128,102,181,62,112,95,182,62,171,88,183,62,47,82,184,62,252,75,185,62,17,70,186,62,108,64,187,62,11,59,188,62,239,53,189,62,22,49,190,62,126,44,191,62,38,40,192,62,13,36,193,62,51,32,194,62,150,28,195,62,52,25,196,62,12,22,197,62,30,19,198,62,104,16,199,62,233,13,200,62,159,11,201,62,138,9,202,62,169,7,203,62,249,5,204,62,123,4,205,62,44,3,206,62,11,2,207,62,24,1,208,62,81,0,209,62,181,255,209,62,66,255,210,62,248,254,211,62,213,254,212,62,216,254,213,62,255,254,214,62,75,255,215,62,184,255,216,62,71,0,218,62,245,0,219,62,195,1,220,62,173,2,221,62,180,3,222,62,214,4,223,62,17,6,224,62,101,7,225,62,208,8,226,62,81,10,227,62,231,11,228,62,144,13,229,62,76,15,230,62,25,17,231,62,245,18,232,62,224,20,233,62,217,22,234,62,221,24,235,62,236,26,236,62,5,29,237,62,39,31,238,62,79,33,239,62,125,35,240,62,176,37,241,62,230,39,242,62,31,42,243,62,88,44,244,62,145,46,245,62,200,48,246,62,253,50,247,62,45,53,248,62,88,55,249,62,124,57,250,62,153,59,251,62,172,61,252,62,181,63,253,62,179,65,254,62,163,67,255,62,195,34,0,63,173,163,0,63,142,36,1,63,102,165,1,63,53,38,2,63,250,166,2,63,180,39,3,63,99,168,3,63,5,41,4,63,155,169,4,63,36,42,5,63,159,170,5,63,12,43,6,63,105,171,6,63,183,43,7,63,244,171,7,63,32,44,8,63,59,172,8,63,68,44,9,63,58,172,9,63,28,44,10,63,235,171,10,63,164,43,11,63,73,171,11,63,216,42,12,63,80,170,12,63,177,41,13,63,251,168,13,63,44,40,14,63,69,167,14,63,68,38,15,63,41,165,15,63,243,35,16,63,162,162,16,63,53,33,17,63,172,159,17,63,5,30,18,63,65,156,18,63,95,26,19,63,94,152,19,63,61,22,20,63,252,147,20,63,155,17,21,63,24,143,21,63,116,12,22,63,173,137,22,63,195,6,23,63,182,131,23,63,133,0,24,63,46,125,24,63,179,249,24,63,18,118,25,63,74,242,25,63,91,110,26,63,69,234,26,63,6,102,27,63,159,225,27,63,14,93,28,63,84,216,28,63,111,83,29,63,95,206,29,63,36,73,30,63,188,195,30,63,40,62,31,63,102,184,31,63,119,50,32,63,90,172,32,63,14,38,33,63,146,159,33,63,230,24,34,63,10,146,34,63,253,10,35,63,190,131,35,63,77,252,35,63,169,116,36,63,211,236,36,63,200,100,37,63,138,220,37,63,22,84,38,63,110,203,38,63,143,66,39,63,122,185,39,63,47,48,40,63,172,166,40,63,241,28,41,63,254,146,41,63,210,8,42,63,108,126,42,63,205,243,42,63,243,104,43,63,223,221,43,63,143,82,44,63,3,199,44,63,59,59,45,63,54,175,45,63,244,34,46,63,116,150,46,63,182,9,47,63,185,124,47,63,125,239,47,63,1,98,48,63,69,212,48,63,72,70,49,63,10,184,49,63,139,41,50,63,202,154,50,63,198,11,51,63,127,124,51,63,246,236,51,63,40,93,52,63,22,205,52,63,191,60,53,63,36,172,53,63,66,27,54,63,27,138,54,63,174,248,54,63,249,102,55,63,254,212,55,63,187,66,56,63,47,176,56,63,91,29,57,63,63,138,57,63,217,246,57,63,41,99,58,63,48,207,58,63,236,58,59,63,93,166,59,63,130,17,60,63,93,124,60,63,235,230,60,63,44,81,61,63,33,187,61,63,201,36,62,63,35,142,62,63,48,247,62,63,238,95,63,63,94,200,63,63,126,48,64,63,80,152,64,63,209,255,64,63,3,103,65,63,228,205,65,63,117,52,66,63,181,154,66,63,163,0,67,63,64,102,67,63,139,203,67,63,131,48,68,63,41,149,68,63,124,249,68,63,123,93,69,63,39,193,69,63,127,36,70,63,132,135,70,63,51,234,70,63,142,76,71,63,148,174,71,63,68,16,72,63,159,113,72,63,164,210,72,63,83,51,73,63,172,147,73,63,174,243,73,63,89,83,74,63,173,178,74,63,169,17,75,63,77,112,75,63,154,206,75,63,143,44,76,63,43,138,76,63,110,231,76,63,89,68,77,63,234,160,77,63,34,253,77,63,0,89,78,63,133,180,78,63,176,15,79,63,128,106,79,63,246,196,79,63,18,31,80,63,210,120,80,63,56,210,80,63,66,43,81,63,242,131,81,63,69,220,81,63,61,52,82,63,217,139,82,63,24,227,82,63,252,57,83,63,131,144,83,63,174,230,83,63,123,60,84,63,236,145,84,63,0,231,84,63,183,59,85,63,16,144,85,63,12,228,85,63,170,55,86,63,235,138,86,63,206,221,86,63,83,48,87,63,121,130,87,63,66,212,87,63,172,37,88,63,184,118,88,63,101,199,88,63,180,23,89,63,164,103,89,63,53,183,89,63,104,6,90,63,59,85,90,63,175,163,90,63,197,241,90,63,123,63,91,63,210,140,91,63,201,217,91,63,97,38,92,63,154,114,92,63,115,190,92,63,237,9,93,63,7,85,93,63,194,159,93,63,29,234,93,63,24,52,94,63,179,125,94,63,239,198,94,63,203,15,95,63,72,88,95,63,100,160,95,63,33,232,95,63,126,47,96,63,123,118,96,63,24,189,96,63,85,3,97,63,51,73,97,63,177,142,97,63,207,211,97,63,141,24,98,63,236,92,98,63,235,160,98,63,138,228,98,63,202,39,99,63,170,106,99,63,42,173,99,63,75,239,99,63,13,49,100,63,111,114,100,63,114,179,100,63,21,244,100,63,90,52,101,63,63,116,101,63,197,179,101,63,236,242,101,63,180,49,102,63,29,112,102,63,39,174,102,63,211,235,102,63,32,41,103,63,15,102,103,63,159,162,103,63,209,222,103,63,164,26,104,63,26,86,104,63,49,145,104,63,235,203,104,63,71,6,105,63,69,64,105,63,230,121,105,63,42,179,105,63,16,236,105,63,153,36,106,63,197,92,106,63,148,148,106,63,7,204,106,63,29,3,107,63,214,57,107,63,52,112,107,63,53,166,107,63,218,219,107,63,36,17,108,63,18,70,108,63,164,122,108,63,220,174,108,63,184,226,108,63,57,22,109,63,96,73,109,63,44,124,109,63,157,174,109,63,181,224,109,63,115,18,110,63,214,67,110,63,225,116,110,63,146,165,110,63,233,213,110,63,232,5,111,63,142,53,111,63,219,100,111,63,209,147,111,63,110,194,111,63,179,240,111,63,160,30,112,63,54,76,112,63,117,121,112,63,93,166,112,63,239,210,112,63,41,255,112,63,14,43,113,63,156,86,113,63,213,129,113,63,184,172,113,63,70,215,113,63,127,1,114,63,99,43,114,63,243,84,114,63,46,126,114,63,21,167,114,63,169,207,114,63,233,247,114,63,214,31,115,63,113,71,115,63,184,110,115,63,173,149,115,63,80,188,115,63,162,226,115,63,161,8,116,63,80,46,116,63,174,83,116,63,187,120,116,63,119,157,116,63,228,193,116,63,1,230,116,63,206,9,117,63,76,45,117,63,123,80,117,63,92,115,117,63,238,149,117,63,51,184,117,63,42,218,117,63,211,251,117,63,48,29,118,63,64,62,118,63,3,95,118,63,122,127,118,63,166,159,118,63,134,191,118,63,27,223,118,63,101,254,118,63,101,29,119,63,27,60,119,63,135,90,119,63,169,120,119,63,131,150,119,63,19,180,119,63,91,209,119,63,91,238,119,63,20,11,120,63,132,39,120,63,174,67,120,63,145,95,120,63,46,123,120,63,132,150,120,63,149,177,120,63,96,204,120,63,231,230,120,63,41,1,121,63,38,27,121,63,223,52,121,63,85,78,121,63,136,103,121,63,120,128,121,63,37,153,121,63,144,177,121,63,185,201,121,63,161,225,121,63,72,249,121,63,174,16,122,63,212,39,122,63,185,62,122,63,96,85,122,63,198,107,122,63,238,129,122,63,216,151,122,63,131,173,122,63,241,194,122,63,33,216,122,63,20,237,122,63,202,1,123,63,68,22,123,63,130,42,123,63,133,62,123,63,77,82,123,63,217,101,123,63,43,121,123,63,68,140,123,63,34,159,123,63,200,177,123,63,52,196,123,63,104,214,123,63,99,232,123,63,39,250,123,63,180,11,124,63,9,29,124,63,40,46,124,63,17,63,124,63,196,79,124,63,65,96,124,63,137,112,124,63,156,128,124,63,124,144,124,63,39,160,124,63,158,175,124,63,226,190,124,63,244,205,124,63,211,220,124,63,128,235,124,63,251,249,124,63,69,8,125,63,94,22,125,63,71,36,125,63,255,49,125,63,136,63,125,63,225,76,125,63,11,90,125,63,7,103,125,63,212,115,125,63,115,128,125,63,229,140,125,63,42,153,125,63,66,165,125,63,46,177,125,63,238,188,125,63,130,200,125,63,235,211,125,63,41,223,125,63,61,234,125,63,38,245,125,63,230,255,125,63,124,10,126,63,234,20,126,63,47,31,126,63,75,41,126,63,64,51,126,63,13,61,126,63,180,70,126,63,51,80,126,63,140,89,126,63,191,98,126,63,205,107,126,63,181,116,126,63,120,125,126,63,23,134,126,63,146,142,126,63,233,150,126,63,28,159,126,63,44,167,126,63,26,175,126,63,229,182,126,63,142,190,126,63,22,198,126,63,124,205,126,63,194,212,126,63,231,219,126,63,235,226,126,63,208,233,126,63,149,240,126,63,59,247,126,63,195,253,126,63,44,4,127,63,118,10,127,63,163,16,127,63,179,22,127,63,165,28,127,63,123,34,127,63,52,40,127,63,210,45,127,63,83,51,127,63,186,56,127,63,5,62,127,63,53,67,127,63,75,72,127,63,72,77,127,63,42,82,127,63,243,86,127,63,163,91,127,63,58,96,127,63,185,100,127,63,32,105,127,63,111,109,127,63,166,113,127,63,199,117,127,63,208,121,127,63,196,125,127,63,161,129,127,63,104,133,127,63,25,137,127,63,182,140,127,63,61,144,127,63,176,147,127,63,14,151,127,63,89,154,127,63,143,157,127,63,179,160,127,63,195,163,127,63,192,166,127,63,171,169,127,63,132,172,127,63,74,175,127,63,255,177,127,63,163,180,127,63,53,183,127,63,183,185,127,63,40,188,127,63,137,190,127,63,217,192,127,63,26,195,127,63,76,197,127,63,111,199,127,63,130,201,127,63,135,203,127,63,126,205,127,63,102,207,127,63,65,209,127,63,14,211,127,63,205,212,127,63,128,214,127,63,38,216,127,63,191,217,127,63,76,219,127,63,204,220,127,63,65,222,127,63,170,223,127,63,8,225,127,63,91,226,127,63,163,227,127,63,224,228,127,63,19,230,127,63,59,231,127,63,90,232,127,63,110,233,127,63,122,234,127,63,124,235,127,63,116,236,127,63,100,237,127,63,75,238,127,63,42,239,127,63,1,240,127,63,207,240,127,63,149,241,127,63,84,242,127,63,12,243,127,63,188,243,127,63,101,244,127,63,7,245,127,63,162,245,127,63,55,246,127,63,198,246,127,63,78,247,127,63,209,247,127,63,77,248,127,63,196,248,127,63,54,249,127,63,162,249,127,63,9,250,127,63,108,250,127,63,201,250,127,63,34,251,127,63,118,251,127,63,198,251,127,63,18,252,127,63,89,252,127,63,157,252,127,63,221,252,127,63,26,253,127,63,83,253,127,63,136,253,127,63,187,253,127,63,234,253,127,63,22,254,127,63,64,254,127,63,103,254,127,63,139,254,127,63,173,254,127,63,204,254,127,63,234,254,127,63,5,255,127,63,30,255,127,63,53,255,127,63,74,255,127,63,94,255,127,63,112,255,127,63,128,255,127,63,143,255,127,63,157,255,127,63,169,255,127,63,180,255,127,63,191,255,127,63,200,255,127,63,208,255,127,63,215,255,127,63,221,255,127,63,227,255,127,63,232,255,127,63,236,255,127,63,239,255,127,63,243,255,127,63,245,255,127,63,248,255,127,63,249,255,127,63,251,255,127,63,252,255,127,63,253,255,127,63,254,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,204,8,120,52,171,134,11,54,79,202,193,54,190,233,61,55,238,247,156,55,192,123,234,55,43,192,35,56,161,2,90,56,189,2,140,56,76,228,174,56,227,165,213,56,199,35,0,57,168,100,23,57,134,149,48,57,104,182,75,57,64,199,104,57,7,228,131,57,105,92,148,57,191,204,165,57,6,53,184,57,65,149,203,57,105,237,223,57,120,61,245,57,184,194,5,58,166,98,17,58,134,126,29,58,81,22,42,58,9,42,55,58,172,185,68,58,54,197,82,58,165,76,97,58,250,79,112,58,47,207,127,58,34,229,135,58,154,32,144,58,255,153,152,58,80,81,161,58,139,70,170,58,174,121,179,58,186,234,188,58,171,153,198,58,129,134,208,58,58,177,218,58,212,25,229,58,79,192,239,58,167,164,250,58,109,227,2,59,117,147,8,59,105,98,14,59,73,80,20,59,19,93,26,59,199,136,32,59,100,211,38,59,232,60,45,59,83,197,51,59,164,108,58,59,218,50,65,59,243,23,72,59,239,27,79,59,204,62,86,59,138,128,93,59,38,225,100,59,161,96,108,59,249,254,115,59,45,188,123,59,29,204,129,59,145,201,133,59,113,214,137,59,188,242,141,59,113,30,146,59,145,89,150,59,26,164,154,59,12,254,158,59,102,103,163,59,40,224,167,59,80,104,172,59,222,255,176,59,209,166,181,59,40,93,186,59,228,34,191,59,2,248,195,59,131,220,200,59,101,208,205,59,168,211,210,59,74,230,215,59,76,8,221,59,172,57,226,59,105,122,231,59,131,202,236,59,249,41,242,59,202,152,247,59,245,22,253,59,60,82,1,60,170,32,4,60,196,246,6,60,137,212,9,60,249,185,12,60,19,167,15,60,216,155,18,60,69,152,21,60,92,156,24,60,26,168,27,60,129,187,30,60,143,214,33,60,69,249,36,60,160,35,40,60,162,85,43,60,73,143,46,60,149,208,49,60,133,25,53,60,26,106,56,60,81,194,59,60,44,34,63,60,168,137,66,60,199,248,69,60,134,111,73,60,230,237,76,60,231,115,80,60,134,1,84,60,197,150,87,60,162,51,91,60,28,216,94,60,52,132,98,60,232,55,102,60,56,243,105,60,35,182,109,60,170,128,113,60,202,82,117,60,131,44,121,60,214,13,125,60,96,123,128,60,161,115,130,60,174,111,132,60,134,111,134,60,40,115,136,60,149,122,138,60,205,133,140,60,206,148,142,60,152,167,144,60,44,190,146,60,136,216,148,60,173,246,150,60,154,24,153,60,78,62,155,60,202,103,157,60,13,149,159,60,23,198,161,60,231,250,163,60,125,51,166,60,217,111,168,60,249,175,170,60,223,243,172,60,137,59,175,60,247,134,177,60,40,214,179,60,29,41,182,60,213,127,184,60,80,218,186,60,140,56,189,60,138,154,191,60,74,0,194,60,202,105,196,60,11,215,198,60,12,72,201,60,205,188,203,60,77,53,206,60,140,177,208,60,137,49,211,60,69,181,213,60,189,60,216,60,243,199,218,60,230,86,221,60,149,233,223,60,0,128,226,60,39,26,229,60,8,184,231,60,164,89,234,60,250,254,236,60,9,168,239,60,210,84,242,60,83,5,245,60,141,185,247,60,126,113,250,60,39,45,253,60,134,236,255,60,206,87,1,61,52,187,2,61,117,32,4,61,144,135,5,61,133,240,6,61,84,91,8,61,253,199,9,61,128,54,11,61,219,166,12,61,16,25,14,61,29,141,15,61,3,3,17,61,193,122,18,61,87,244,19,61,197,111,21,61,10,237,22,61,39,108,24,61,26,237,25,61,228,111,27,61,132,244,28,61,251,122,30,61,71,3,32,61,105,141,33,61,96,25,35,61,45,167,36,61,206,54,38,61,67,200,39,61,141,91,41,61,171,240,42,61,156,135,44,61,96,32,46,61,248,186,47,61,99,87,49,61,160,245,50,61,175,149,52,61,144,55,54,61,67,219,55,61,199,128,57,61,28,40,59,61,65,209,60,61,56,124,62,61,254,40,64,61,148,215,65,61,250,135,67,61,47,58,69,61,51,238,70,61,5,164,72,61,166,91,74,61,20,21,76,61,80,208,77,61,90,141,79,61,49,76,81,61,212,12,83,61,68,207,84,61,128,147,86,61,135,89,88,61,90,33,90,61,248,234,91,61,97,182,93,61,148,131,95,61,145,82,97,61,88,35,99,61,232,245,100,61,65,202,102,61,100,160,104,61,78,120,106,61,1,82,108,61,123,45,110,61,188,10,112,61,197,233,113,61,148,202,115,61,41,173,117,61,133,145,119,61,166,119,121,61,140,95,123,61,55,73,125,61,166,52,127,61,237,144,128,61,105,136,129,61,198,128,130,61,5,122,131,61,37,116,132,61,39,111,133,61,9,107,134,61,204,103,135,61,112,101,136,61,244,99,137,61,88,99,138,61,157,99,139,61,193,100,140,61,196,102,141,61,167,105,142,61,106,109,143,61,11,114,144,61,139,119,145,61,234,125,146,61,40,133,147,61,67,141,148,61,61,150,149,61,20,160,150,61,201,170,151,61,92,182,152,61,203,194,153,61,24,208,154,61,66,222,155,61,72,237,156,61,42,253,157,61,233,13,159,61,132,31,160,61,250,49,161,61,76,69,162,61,122,89,163,61,130,110,164,61,101,132,165,61,35,155,166,61,188,178,167,61,47,203,168,61,124,228,169,61,162,254,170,61,163,25,172,61,124,53,173,61,47,82,174,61,187,111,175,61,31,142,176,61,92,173,177,61,113,205,178,61,94,238,179,61,35,16,181,61,192,50,182,61,52,86,183,61,127,122,184,61,160,159,185,61,153,197,186,61,104,236,187,61,13,20,189,61,136,60,190,61,217,101,191,61,255,143,192,61,250,186,193,61,202,230,194,61,111,19,196,61,233,64,197,61,55,111,198,61,89,158,199,61,78,206,200,61,23,255,201,61,179,48,203,61,35,99,204,61,101,150,205,61,121,202,206,61,96,255,207,61,25,53,209,61,164,107,210,61,0,163,211,61,45,219,212,61,44,20,214,61,251,77,215,61,154,136,216,61,10,196,217,61,74,0,219,61,89,61,220,61,56,123,221,61,230,185,222,61,99,249,223,61,174,57,225,61,200,122,226,61,176,188,227,61,102,255,228,61,233,66,230,61,58,135,231,61,88,204,232,61,66,18,234,61,249,88,235,61,124,160,236,61,203,232,237,61,230,49,239,61,204,123,240,61,125,198,241,61,249,17,243,61,63,94,244,61,79,171,245,61,42,249,246,61,206,71,248,61,60,151,249,61,114,231,250,61,114,56,252,61,58,138,253,61,202,220,254,61,17,24,0,62,33,194,0,62,149,108,1,62,108,23,2,62,166,194,2,62,68,110,3,62,69,26,4,62,168,198,4,62,111,115,5,62,152,32,6,62,35,206,6,62,17,124,7,62,98,42,8,62,20,217,8,62,40,136,9,62,157,55,10,62,117,231,10,62,173,151,11,62,71,72,12,62,66,249,12,62,158,170,13,62,91,92,14,62,120,14,15,62,246,192,15,62,213,115,16,62,19,39,17,62,177,218,17,62,175,142,18,62,13,67,19,62,202,247,19,62,231,172,20,62,99,98,21,62,62,24,22,62,120,206,22,62,16,133,23,62,7,60,24,62,92,243,24,62,16,171,25,62,33,99,26,62,145,27,27,62,94,212,27,62,137,141,28,62,17,71,29,62,246,0,30,62,56,187,30,62,215,117,31,62,211,48,32,62,43,236,32,62,224,167,33,62,241,99,34,62,93,32,35,62,38,221,35,62,74,154,36,62,202,87,37,62,165,21,38,62,219,211,38,62,108,146,39,62,88,81,40,62,159,16,41,62,64,208,41,62,59,144,42,62,144,80,43,62,63,17,44,62,72,210,44,62,170,147,45,62,102,85,46,62,122,23,47,62,232,217,47,62,175,156,48,62,206,95,49,62,69,35,50,62,21,231,50,62,61,171,51,62,189,111,52,62,148,52,53,62,195,249,53,62,73,191,54,62,38,133,55,62,91,75,56,62,230,17,57,62,199,216,57,62,255,159,58,62,141,103,59,62,113,47,60,62,171,247,60,62,59,192,61,62,31,137,62,62,89,82,63,62,232,27,64,62,204,229,64,62,5,176,65,62,146,122,66,62,115,69,67,62,168,16,68,62,49,220,68,62,14,168,69,62,62,116,70,62,194,64,71,62,152,13,72,62,193,218,72,62,61,168,73,62,12,118,74,62,44,68,75,62,159,18,76,62,100,225,76,62,122,176,77,62,225,127,78,62,154,79,79,62,164,31,80,62,255,239,80,62,170,192,81,62,166,145,82,62,242,98,83,62,141,52,84,62,121,6,85,62,180,216,85,62,63,171,86,62,25,126,87,62,65,81,88,62,185,36,89,62,126,248,89,62,147,204,90,62,245,160,91,62,165,117,92,62,163,74,93,62],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);allocate([238,31,94,62,135,245,94,62,109,203,95,62,159,161,96,62,30,120,97,62,233,78,98,62,1,38,99,62,100,253,99,62,19,213,100,62,14,173,101,62,84,133,102,62,229,93,103,62,193,54,104,62,231,15,105,62,88,233,105,62,19,195,106,62,24,157,107,62,103,119,108,62,255,81,109,62,224,44,110,62,11,8,111,62,126,227,111,62,58,191,112,62,62,155,113,62,139,119,114,62,31,84,115,62,251,48,116,62,31,14,117,62,138,235,117,62,59,201,118,62,52,167,119,62,115,133,120,62,248,99,121,62,196,66,122,62,213,33,123,62,44,1,124,62,200,224,124,62,170,192,125,62,208,160,126,62,59,129,127,62,245,48,128,62,111,161,128,62,11,18,129,62,201,130,129,62,168,243,129,62,169,100,130,62,204,213,130,62,15,71,131,62,117,184,131,62,251,41,132,62,162,155,132,62,107,13,133,62,84,127,133,62,93,241,133,62,136,99,134,62,210,213,134,62,61,72,135,62,200,186,135,62,116,45,136,62,63,160,136,62,42,19,137,62,52,134,137,62,94,249,137,62,168,108,138,62,17,224,138,62,153,83,139,62,64,199,139,62,6,59,140,62,235,174,140,62,239,34,141,62,17,151,141,62,82,11,142,62,177,127,142,62,46,244,142,62,201,104,143,62,130,221,143,62,89,82,144,62,78,199,144,62,96,60,145,62,143,177,145,62,220,38,146,62,70,156,146,62,205,17,147,62,113,135,147,62,50,253,147,62,16,115,148,62,9,233,148,62,32,95,149,62,82,213,149,62,161,75,150,62,12,194,150,62,146,56,151,62,53,175,151,62,243,37,152,62,204,156,152,62,193,19,153,62,209,138,153,62,252,1,154,62,66,121,154,62,163,240,154,62,31,104,155,62,181,223,155,62,101,87,156,62,48,207,156,62,21,71,157,62,20,191,157,62,45,55,158,62,96,175,158,62,172,39,159,62,18,160,159,62,145,24,160,62,41,145,160,62,218,9,161,62,165,130,161,62,136,251,161,62,132,116,162,62,152,237,162,62,197,102,163,62,10,224,163,62,103,89,164,62,220,210,164,62,105,76,165,62,14,198,165,62,202,63,166,62,158,185,166,62,137,51,167,62,139,173,167,62,164,39,168,62,213,161,168,62,27,28,169,62,121,150,169,62,237,16,170,62,119,139,170,62,24,6,171,62,206,128,171,62,155,251,171,62,125,118,172,62,117,241,172,62,130,108,173,62,165,231,173,62,221,98,174,62,42,222,174,62,140,89,175,62,2,213,175,62,142,80,176,62,46,204,176,62,226,71,177,62,170,195,177,62,135,63,178,62,119,187,178,62,124,55,179,62,148,179,179,62,191,47,180,62,254,171,180,62,80,40,181,62,181,164,181,62,45,33,182,62,184,157,182,62,85,26,183,62,5,151,183,62,199,19,184,62,156,144,184,62,130,13,185,62,123,138,185,62,133,7,186,62,161,132,186,62,206,1,187,62,13,127,187,62,93,252,187,62,190,121,188,62,48,247,188,62,178,116,189,62,70,242,189,62,233,111,190,62,157,237,190,62,98,107,191,62,54,233,191,62,26,103,192,62,14,229,192,62,17,99,193,62,36,225,193,62,70,95,194,62,119,221,194,62,184,91,195,62,7,218,195,62,100,88,196,62,209,214,196,62,75,85,197,62,212,211,197,62,107,82,198,62,16,209,198,62,195,79,199,62,132,206,199,62,82,77,200,62,45,204,200,62,21,75,201,62,11,202,201,62,13,73,202,62,29,200,202,62,56,71,203,62,97,198,203,62,149,69,204,62,214,196,204,62,34,68,205,62,123,195,205,62,223,66,206,62,79,194,206,62,202,65,207,62,81,193,207,62,226,64,208,62,127,192,208,62,38,64,209,62,216,191,209,62,148,63,210,62,91,191,210,62,44,63,211,62,7,191,211,62,235,62,212,62,218,190,212,62,210,62,213,62,211,190,213,62,222,62,214,62,242,190,214,62,15,63,215,62,53,191,215,62,99,63,216,62,154,191,216,62,217,63,217,62,32,192,217,62,112,64,218,62,199,192,218,62,38,65,219,62,140,193,219,62,250,65,220,62,112,194,220,62,236,66,221,62,112,195,221,62,250,67,222,62,139,196,222,62,34,69,223,62,192,197,223,62,100,70,224,62,14,199,224,62,189,71,225,62,115,200,225,62,46,73,226,62,239,201,226,62,181,74,227,62,127,203,227,62,79,76,228,62,36,205,228,62,253,77,229,62,219,206,229,62,190,79,230,62,164,208,230,62,142,81,231,62,125,210,231,62,111,83,232,62,100,212,232,62,93,85,233,62,89,214,233,62,89,87,234,62,91,216,234,62,96,89,235,62,104,218,235,62,114,91,236,62,126,220,236,62,141,93,237,62,158,222,237,62,176,95,238,62,196,224,238,62,218,97,239,62,241,226,239,62,10,100,240,62,35,229,240,62,62,102,241,62,89,231,241,62,116,104,242,62,145,233,242,62,173,106,243,62,202,235,243,62,230,108,244,62,3,238,244,62,31,111,245,62,59,240,245,62,86,113,246,62,112,242,246,62,137,115,247,62,161,244,247,62,184,117,248,62,206,246,248,62,226,119,249,62,244,248,249,62,4,122,250,62,18,251,250,62,30,124,251,62,40,253,251,62,47,126,252,62,52,255,252,62,54,128,253,62,52,1,254,62,48,130,254,62,40,3,255,62,29,132,255,62,135,2,0,63,254,66,0,63,115,131,0,63,230,195,0,63,86,4,1,63,197,68,1,63,49,133,1,63,155,197,1,63,3,6,2,63,103,70,2,63,202,134,2,63,42,199,2,63,135,7,3,63,225,71,3,63,56,136,3,63,141,200,3,63,222,8,4,63,44,73,4,63,119,137,4,63,191,201,4,63,3,10,5,63,68,74,5,63,130,138,5,63,188,202,5,63,242,10,6,63,36,75,6,63,83,139,6,63,126,203,6,63,165,11,7,63,199,75,7,63,230,139,7,63,1,204,7,63,23,12,8,63,41,76,8,63,54,140,8,63,63,204,8,63,67,12,9,63,67,76,9,63,62,140,9,63,52,204,9,63,37,12,10,63,18,76,10,63,249,139,10,63,219,203,10,63,184,11,11,63,144,75,11,63,98,139,11,63,47,203,11,63,246,10,12,63,184,74,12,63,116,138,12,63,43,202,12,63,219,9,13,63,134,73,13,63,43,137,13,63,202,200,13,63,98,8,14,63,245,71,14,63,129,135,14,63,7,199,14,63,135,6,15,63,0,70,15,63,114,133,15,63,222,196,15,63,67,4,16,63,161,67,16,63,249,130,16,63,73,194,16,63,147,1,17,63,213,64,17,63,17,128,17,63,69,191,17,63,114,254,17,63,151,61,18,63,181,124,18,63,203,187,18,63,218,250,18,63,225,57,19,63,225,120,19,63,216,183,19,63,200,246,19,63,176,53,20,63,143,116,20,63,103,179,20,63,54,242,20,63,253,48,21,63,188,111,21,63,114,174,21,63,32,237,21,63,197,43,22,63,98,106,22,63,246,168,22,63,129,231,22,63,3,38,23,63,125,100,23,63,237,162,23,63,84,225,23,63,178,31,24,63,7,94,24,63,83,156,24,63,149,218,24,63,206,24,25,63,253,86,25,63,35,149,25,63,63,211,25,63,82,17,26,63,90,79,26,63,89,141,26,63,78,203,26,63,57,9,27,63,25,71,27,63,240,132,27,63,188,194,27,63,126,0,28,63,54,62,28,63,227,123,28,63,134,185,28,63,30,247,28,63,172,52,29,63,47,114,29,63,167,175,29,63,20,237,29,63,118,42,30,63,206,103,30,63,26,165,30,63,91,226,30,63,145,31,31,63,188,92,31,63,219,153,31,63,239,214,31,63,247,19,32,63,244,80,32,63,230,141,32,63,203,202,32,63,165,7,33,63,115,68,33,63,53,129,33,63,235,189,33,63,150,250,33,63,52,55,34,63,198,115,34,63,75,176,34,63,197,236,34,63,50,41,35,63,146,101,35,63,230,161,35,63,46,222,35,63,105,26,36,63,151,86,36,63,185,146,36,63,205,206,36,63,213,10,37,63,208,70,37,63,190,130,37,63,158,190,37,63,114,250,37,63,56,54,38,63,241,113,38,63,157,173,38,63,59,233,38,63,204,36,39,63,79,96,39,63,197,155,39,63,45,215,39,63,135,18,40,63,211,77,40,63,18,137,40,63,66,196,40,63,101,255,40,63,121,58,41,63,128,117,41,63,120,176,41,63,98,235,41,63,62,38,42,63,11,97,42,63,202,155,42,63,122,214,42,63,28,17,43,63,175,75,43,63,52,134,43,63,170,192,43,63,16,251,43,63,105,53,44,63,178,111,44,63,236,169,44,63,23,228,44,63,51,30,45,63,64,88,45,63,61,146,45,63,43,204,45,63,10,6,46,63,218,63,46,63,154,121,46,63,74,179,46,63,235,236,46,63,124,38,47,63,254,95,47,63,112,153,47,63,210,210,47,63,36,12,48,63,102,69,48,63,152,126,48,63,186,183,48,63,204,240,48,63,205,41,49,63,191,98,49,63,160,155,49,63,113,212,49,63,49,13,50,63,225,69,50,63,128,126,50,63,15,183,50,63,141,239,50,63,251,39,51,63,87,96,51,63,163,152,51,63,222,208,51,63,8,9,52,63,34,65,52,63,42,121,52,63,33,177,52,63,7,233,52,63,219,32,53,63,159,88,53,63,81,144,53,63,242,199,53,63,129,255,53,63,255,54,54,63,108,110,54,63,198,165,54,63,16,221,54,63,71,20,55,63,109,75,55,63,129,130,55,63,131,185,55,63,116,240,55,63,82,39,56,63,30,94,56,63,217,148,56,63,129,203,56,63,23,2,57,63,155,56,57,63,13,111,57,63,108,165,57,63,185,219,57,63,244,17,58,63,28,72,58,63,50,126,58,63,53,180,58,63,38,234,58,63,4,32,59,63,207,85,59,63,135,139,59,63,45,193,59,63,192,246,59,63,64,44,60,63,173,97,60,63,7,151,60,63,78,204,60,63,130,1,61,63,163,54,61,63,177,107,61,63,171,160,61,63,146,213,61,63,102,10,62,63,39,63,62,63,212,115,62,63,110,168,62,63,244,220,62,63,103,17,63,63,198,69,63,63,17,122,63,63,73,174,63,63,109,226,63,63,126,22,64,63,122,74,64,63,99,126,64,63,56,178,64,63,248,229,64,63,165,25,65,63,62,77,65,63,195,128,65,63,52,180,65,63,144,231,65,63,216,26,66,63,13,78,66,63,44,129,66,63,56,180,66,63,47,231,66,63,18,26,67,63,224,76,67,63,154,127,67,63,64,178,67,63,208,228,67,63,77,23,68,63,180,73,68,63,7,124,68,63,69,174,68,63,111,224,68,63,131,18,69,63,131,68,69,63,110,118,69,63,68,168,69,63,5,218,69,63,177,11,70,63,72,61,70,63,202,110,70,63,55,160,70,63,143,209,70,63,210,2,71,63,255,51,71,63,23,101,71,63,26,150,71,63,8,199,71,63,224,247,71,63,163,40,72,63,81,89,72,63,233,137,72,63,107,186,72,63,216,234,72,63,48,27,73,63,114,75,73,63,158,123,73,63,181,171,73,63,181,219,73,63,161,11,74,63,118,59,74,63,54,107,74,63,224,154,74,63,116,202,74,63,242,249,74,63,90,41,75,63,173,88,75,63,233,135,75,63,15,183,75,63,32,230,75,63,26,21,76,63,254,67,76,63,204,114,76,63,132,161,76,63,38,208,76,63,177,254,76,63,38,45,77,63,133,91,77,63,206,137,77,63,0,184,77,63,28,230,77,63,34,20,78,63,17,66,78,63,234,111,78,63,172,157,78,63,88,203,78,63,238,248,78,63,108,38,79,63,213,83,79,63,38,129,79,63,97,174,79,63,134,219,79,63,147,8,80,63,138,53,80,63,107,98,80,63,52,143,80,63,231,187,80,63,131,232,80,63,8,21,81,63,119,65,81,63,206,109,81,63,15,154,81,63,57,198,81,63,76,242,81,63,71,30,82,63,44,74,82,63,250,117,82,63,177,161,82,63,81,205,82,63,218,248,82,63,76,36,83,63,166,79,83,63,234,122,83,63,22,166,83,63,44,209,83,63,42,252,83,63,17,39,84,63,224,81,84,63,153,124,84,63,58,167,84,63,196,209,84,63,54,252,84,63,146,38,85,63,214,80,85,63,2,123,85,63,24,165,85,63,22,207,85,63,252,248,85,63,204,34,86,63,131,76,86,63,36,118,86,63,172,159,86,63,30,201,86,63,120,242,86,63,186,27,87,63,229,68,87,63,248,109,87,63,244,150,87,63,216,191,87,63,165,232,87,63,90,17,88,63,248,57,88,63,126,98,88,63,236,138,88,63,67,179,88,63,130,219,88,63,169,3,89,63,185,43,89,63,177,83,89,63,145,123,89,63,90,163,89,63,11,203,89,63,164,242,89,63,37,26,90,63,143,65,90,63,225,104,90,63,27,144,90,63,62,183,90,63,72,222,90,63,59,5,91,63,22,44,91,63,217,82,91,63,133,121,91,63,24,160,91,63,148,198,91,63,248,236,91,63,68,19,92,63,120,57,92,63,149,95,92,63,153,133,92,63,134,171,92,63,91,209,92,63,24,247,92,63,189,28,93,63,74,66,93,63,191,103,93,63,28,141,93,63,98,178,93,63,143,215,93,63,165,252,93,63,162,33,94,63,136,70,94,63,86,107,94,63,11,144,94,63,169,180,94,63,47,217,94,63,157,253,94,63,243,33,95,63,49,70,95,63,88,106,95,63,102,142,95,63,92,178,95,63,59,214,95,63,1,250,95,63,175,29,96,63,70,65,96,63,196,100,96,63,43,136,96,63,122,171,96,63,176,206,96,63,207,241,96,63,214,20,97,63,197,55,97,63,155,90,97,63,90,125,97,63,1,160,97,63,144,194,97,63,8,229,97,63,103,7,98,63,174,41,98,63,221,75,98,63,245,109,98,63,244,143,98,63,220,177,98,63,171,211,98,63,99,245,98,63,3,23,99,63,139,56,99,63,251,89,99,63,83,123,99,63,147,156,99,63,188,189,99,63,204,222,99,63,197,255,99,63,166,32,100,63,110,65,100,63,32,98,100,63,185,130,100,63,58,163,100,63,164,195,100,63,245,227,100,63,47,4,101,63,82,36,101,63,92,68,101,63,78,100,101,63,41,132,101,63,236,163,101,63,151,195,101,63,43,227,101,63,167,2,102,63,11,34,102,63,87,65,102,63,139,96,102,63,168,127,102,63,174,158,102,63,155,189,102,63,113,220,102,63,47,251,102,63,214,25,103,63,101,56,103,63,220,86,103,63,59,117,103,63,132,147,103,63,180,177,103,63,205,207,103,63,206,237,103,63,184,11,104,63,138,41,104,63,69,71,104,63,233,100,104,63,116,130,104,63,233,159,104,63,69,189,104,63,139,218,104,63,185,247,104,63,207,20,105,63,207,49,105,63,182,78,105,63,135,107,105,63,64,136,105,63,225,164,105,63,108,193,105,63,223,221,105,63,59,250,105,63,127,22,106,63,172,50,106,63,195,78,106,63,193,106,106,63,169,134,106,63,121,162,106,63,51,190,106,63,213,217,106,63,96,245,106,63,212,16,107,63,48,44,107,63,118,71,107,63,165,98,107,63,188,125,107,63,189,152,107,63,167,179,107,63,121,206,107,63,53,233,107,63,218,3,108,63,104,30,108,63,223,56,108,63,63,83,108,63,136,109,108,63,187,135,108,63,214,161,108,63,219,187,108,63,201,213,108,63,161,239,108,63,97,9,109,63,11,35,109,63,159,60,109,63,27,86,109,63,129,111,109,63,209,136,109,63,9,162,109,63,44,187,109,63,56,212,109,63,45,237,109,63,12,6,110,63,212,30,110,63,134,55,110,63,33,80,110,63,166,104,110,63,21,129,110,63,110,153,110,63,176,177,110,63,220,201,110,63,241,225,110,63,241,249,110,63,218,17,111,63,173,41,111,63,106,65,111,63,16,89,111,63,161,112,111,63,28,136,111,63,128,159,111,63,207,182,111,63,7,206,111,63,42,229,111,63,54,252,111,63,45,19,112,63,14,42,112,63,217,64,112,63,142,87,112,63,46,110,112,63,184,132,112,63,43,155,112,63,138,177,112,63,210,199,112,63,5,222,112,63,35,244,112,63,42,10,113,63,29,32,113,63,249,53,113,63,193,75,113,63,114,97,113,63,15,119,113,63,150,140,113,63,7,162,113,63,99,183,113,63,170,204,113,63,220,225,113,63,249,246,113,63,0,12,114,63,242,32,114,63,207,53,114,63,151,74,114,63,73,95,114,63,231,115,114,63,112,136,114,63,227,156,114,63,66,177,114,63,140,197,114,63,193,217,114,63,225,237,114,63,236,1,115,63,227,21,115,63,197,41,115,63,146,61,115,63,74,81,115,63,238,100,115,63,125,120,115,63,248,139,115,63,94,159,115,63,175,178,115,63,236,197,115,63,21,217,115,63,41,236,115,63,41,255,115,63,21,18,116,63,236,36,116,63,175,55,116,63,94,74,116,63,248,92,116,63,127,111,116,63,241,129,116,63,80,148,116,63,154,166,116,63,208,184,116,63,242,202,116,63,1,221,116,63,251,238,116,63,226,0,117,63,181,18,117,63,116,36,117,63,31,54,117,63,183,71,117,63,59,89,117,63,171,106,117,63,8,124,117,63,81,141,117,63,135,158,117,63,169,175,117,63,184,192,117,63,179,209,117,63,155,226,117,63,112,243,117,63,50,4,118,63,224,20,118,63,123,37,118,63,3,54,118,63,120,70,118,63,217,86,118,63,40,103,118,63,100,119,118,63,140,135,118,63,162,151,118,63,165,167,118,63,149,183,118,63,114,199,118,63,61,215,118,63,245,230,118,63,154,246,118,63,44,6,119,63,172,21,119,63,26,37,119,63,117,52,119,63,189,67,119,63,243,82,119,63,22,98,119,63,40,113,119,63,39,128,119,63,19,143,119,63,238,157,119,63,182,172,119,63,108,187,119,63,16,202,119,63,162,216,119,63,34,231,119,63,144,245,119,63,236,3,120,63,55,18,120,63,111,32,120,63,150,46,120,63,170,60,120,63,174,74,120,63,159,88,120,63,127,102,120,63,77,116,120,63,10,130,120,63,181,143,120,63,79,157,120,63,215,170,120,63,78,184,120,63,180,197,120,63,8,211,120,63,76,224,120,63,126,237,120,63,158,250,120,63,174,7,121,63,173,20,121,63,155,33,121,63,119,46,121,63,67,59,121,63,254,71,121,63,168,84,121,63,66,97,121,63,202,109,121,63,66,122,121,63,169,134,121,63,0,147,121,63,70,159,121,63,124,171,121,63,161,183,121,63,181,195,121,63,186,207,121,63,173,219,121,63,145,231,121,63,100,243,121,63,40,255,121,63,219,10,122,63,126,22,122,63,16,34,122,63,147,45,122,63,6,57,122,63,105,68,122,63,188,79,122,63,255,90,122,63,51,102,122,63,86,113,122,63,106,124,122,63,111,135,122,63,99,146,122,63,72,157,122,63,30,168,122,63,228,178,122,63,155,189,122,63,66,200,122,63,218,210,122,63,99,221,122,63,221,231,122,63,71,242,122,63,162,252,122,63,238,6,123,63,43,17,123,63,89,27,123,63,120,37,123,63,137,47,123,63,138,57,123,63,124,67,123,63,96,77,123,63,53,87,123,63,252,96,123,63,179,106,123,63,92,116,123,63,247,125,123,63,131,135,123,63,1,145,123,63,112,154,123,63,209,163,123,63,36,173,123,63,104,182,123,63,158,191,123,63,198,200,123,63,224,209,123,63,236,218,123,63,234,227,123,63,218,236,123,63,188,245,123,63,144,254,123,63,86,7,124,63,14,16,124,63,185,24,124,63,86,33,124,63,230,41,124,63,104,50,124,63,220,58,124,63,67,67,124,63,156,75,124,63,232,83,124,63,39,92,124,63,88,100,124,63,124,108,124,63,147,116,124,63,157,124,124,63,153,132,124,63,137,140,124,63,107,148,124,63,65,156,124,63,9,164,124,63,197,171,124,63,116,179,124,63,22,187,124,63,172,194,124,63,52,202,124,63,176,209,124,63,32,217,124,63,131,224,124,63,217,231,124,63,35,239,124,63,97,246,124,63,146,253,124,63,183,4,125,63,208,11,125,63,221,18,125,63,221,25,125,63,209,32,125,63,185,39,125,63,150,46,125,63,102,53,125,63,42,60,125,63,227,66,125,63,143,73,125,63,48,80,125,63,197,86,125,63,78,93,125,63,204,99,125,63,62,106,125,63,165,112,125,63,0,119,125,63,80,125,125,63,148,131,125,63,205,137,125,63,251,143,125,63,29,150,125,63,52,156,125,63,64,162,125,63,65,168,125,63,55,174,125,63,34,180,125,63,2,186,125,63,215,191,125,63,161,197,125,63,96,203,125,63,21,209,125,63,190,214,125,63,93,220,125,63,242,225,125,63,124,231,125,63,251,236,125,63,112,242,125,63,218,247,125,63,58,253,125,63,143,2,126,63,219,7,126,63,28,13,126,63,82,18,126,63,127,23,126,63,161,28,126,63,186,33,126,63,200,38,126,63,204,43,126,63,199,48,126,63,183,53,126,63,158,58,126,63,123,63,126,63,78,68,126,63,23,73,126,63,215,77,126,63,141,82,126,63,58,87,126,63,221,91,126,63,118,96,126,63,6,101,126,63,141,105,126,63,10,110,126,63,126,114,126,63,233,118,126,63,75,123,126,63,164,127,126,63,243,131,126,63,57,136,126,63,119,140,126,63,171,144,126,63,214,148,126,63,249,152,126,63,18,157,126,63,35,161,126,63,44,165,126,63,43,169,126,63,34,173,126,63,16,177,126,63,246,180,126,63,211,184,126,63,167,188,126,63,115,192,126,63,55,196,126,63,243,199,126,63,166,203,126,63,81,207,126,63,243,210,126,63,142,214,126,63,32,218,126,63,171,221,126,63,45,225,126,63,167,228,126,63,26,232,126,63,132,235,126,63,231,238,126,63,66,242,126,63,149,245,126,63,224,248,126,63,36,252,126,63,96,255,126,63,148,2,127,63,193,5,127,63,230,8,127,63,4,12,127,63,27,15,127,63,42,18,127,63,50,21,127,63,50,24,127,63,43,27,127,63,29,30,127,63,8,33,127,63,236,35,127,63,201,38,127,63,158,41,127,63,109,44,127,63,53,47,127,63,246,49,127,63,175,52,127,63,99,55,127,63,15,58,127,63,181,60,127,63,83,63,127,63,236,65,127,63,125,68,127,63,8,71,127,63,141,73,127,63,11,76,127,63,131,78,127,63,244,80,127,63,95,83,127,63,195,85,127,63,33,88,127,63,121,90,127,63,203,92,127,63,23,95,127,63,92,97,127,63,155,99,127,63,213,101,127,63,8,104,127,63,54,106,127,63,93,108,127,63,127,110,127,63,155,112,127,63,177,114,127,63,193,116,127,63,203,118,127,63,208,120,127,63,207,122,127,63,201,124,127,63,189,126,127,63,171,128,127,63,148,130,127,63,120,132,127,63,86,134,127,63,47,136,127,63,2,138,127,63,209,139,127,63,153,141,127,63,93,143,127,63,28,145,127,63,213,146,127,63,137,148,127,63,57,150,127,63,227,151,127,63,136,153,127,63,40,155,127,63,196,156,127,63,90,158,127,63,236,159,127,63,121,161,127,63,1,163,127,63,132,164,127,63,3,166,127,63,125,167,127,63,242,168,127,63,99,170,127,63,207,171,127,63,55,173,127,63,154,174,127,63,249,175,127,63,84,177,127,63,170,178,127,63,251,179,127,63,73,181,127,63,146,182,127,63,215,183,127,63,24,185,127,63,85,186,127,63,141,187,127,63,193,188,127,63,242,189,127,63,30,191,127,63,71,192,127,63,107,193,127,63,140,194,127,63,168,195,127,63,193,196,127,63,214,197,127,63,231,198,127,63,245,199,127,63,255,200,127,63,5,202,127,63,7,203,127,63,6,204,127,63,1,205,127,63,249,205,127,63,237,206,127,63,222,207,127,63,203,208,127,63,181,209,127,63,156,210,127,63,127,211,127,63,95,212,127,63,59,213,127,63,20,214,127,63,234,214,127,63,189,215,127,63,141,216,127,63,90,217,127,63,35,218,127,63,233,218,127,63,173,219,127,63,109,220,127,63,43,221,127,63,229,221,127,63,156,222,127,63,81,223,127,63,3,224,127,63,178,224,127,63,94,225,127,63,7,226,127,63,174,226,127,63,82,227,127,63,243,227,127,63,146,228,127,63,46,229,127,63,199,229,127,63,94,230,127,63,242,230,127,63,132,231,127,63,19,232,127,63,160,232,127,63,42,233,127,63,178,233,127,63,56,234,127,63,187,234,127,63,60,235,127,63,187,235,127,63,55,236,127,63,177,236,127,63,41,237,127,63,159,237,127,63,18,238,127,63,132,238,127,63,243,238,127,63,96,239,127,63,204,239,127,63,53,240,127,63,156,240,127,63,1,241,127,63,101,241,127,63,198,241,127,63,37,242,127,63,131,242,127,63,222,242,127,63,56,243,127,63,144,243,127,63,231,243,127,63,59,244,127,63,142,244,127,63,223,244,127,63,46,245,127,63,124,245,127,63,200,245,127,63,19,246,127,63,91,246,127,63,163,246,127,63,233,246,127,63,45,247,127,63,111,247,127,63,177,247,127,63,240,247,127,63,47,248,127,63,108,248,127,63,167,248,127,63,225,248,127,63,26,249,127,63,82,249,127,63,136,249,127,63,188,249,127,63,240,249,127,63,34,250,127,63,83,250,127,63,131,250,127,63,178,250,127,63,224,250,127,63,12,251,127,63,55,251,127,63,97,251,127,63,138,251,127,63,178,251,127,63,217,251,127,63,255,251,127,63,36,252,127,63,72,252,127,63,107,252,127,63,141,252,127,63,173,252,127,63,205,252,127,63,237,252,127,63,11,253,127,63,40,253,127,63,69,253,127,63,96,253,127,63,123,253,127,63,149,253,127,63,174,253,127,63,199,253,127,63,222,253,127,63,245,253,127,63,12,254,127,63,33,254,127,63,54,254,127,63,74,254,127,63,93,254,127,63,112,254,127,63,130,254,127,63,148,254,127,63,165,254,127,63,181,254,127,63,197,254,127,63,212,254,127,63,227,254,127,63,241,254,127,63,254,254,127,63,11,255,127,63,24,255,127,63,36,255,127,63,47,255,127,63,59,255,127,63,69,255,127,63,79,255,127,63,89,255,127,63,99,255,127,63,108,255,127,63,116,255,127,63,124,255,127,63,132,255,127,63,140,255,127,63,147,255,127,63,154,255,127,63,160,255,127,63,166,255,127,63,172,255,127,63,178,255,127,63,183,255,127,63,188,255,127,63,193,255,127,63,197,255,127,63,202,255,127,63,206,255,127,63,209,255,127,63,213,255,127,63,216,255,127,63,220,255,127,63,223,255,127,63,225,255,127,63,228,255,127,63,230,255,127,63,233,255,127,63,235,255,127,63,237,255,127,63,239,255,127,63,240,255,127,63,242,255,127,63,243,255,127,63,245,255,127,63,246,255,127,63,247,255,127,63,248,255,127,63,249,255,127,63,250,255,127,63,251,255,127,63,251,255,127,63,252,255,127,63,252,255,127,63,253,255,127,63,253,255,127,63,254,255,127,63,254,255,127,63,254,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,198,63,120,51,98,136,11,53,151,200,193,53,80,233,61,54,183,247,156,54,46,124,234,54,153,192,35,55,244,2,90,55,56,3,140,55,227,228,174,55,177,166,213,55,108,36,0,56,146,101,23,56,201,150,48,56,18,184,75,56,81,201,104,56,94,229,131,56,29,94,148,56,229,206,165,56,167,55,184,56,128,152,203,56,85,241,223,56,36,66,245,56,126,197,5,57,238,101,17,57,99,130,29,57,207,26,42,57,63,47,55,57,179,191,68,57,30,204,82,57,141,84,97,57,243,88,112,57,94,217,127,57,227,234,135,57,18,39,144,57,64,161,152,57,105,89,161,57,146,79,170,57,181,131,179,57,215,245,188,57,245,165,198,57,14,148,208,57,34,192,218,57,46,42,229,57,57,210,239,57,60,184,250,57,27,238,2,58,22,159,8,58,13,111,14,58,0,94,20,58,239,107,26,58,218,152,32,58,192,228,38,58,161,79,45,58,124,217,51,58,83,130,58,58,37,74,65,58,240,48,72,58,182,54,79,58,116,91,86,58,45,159,93,58,222,1,101,58,136,131,108,58,42,36,116,58,196,227,123,58,44,225,129,58,241,223,133,58,49,238,137,58,238,11,142,58,37,57,146,58,215,117,150,58,5,194,154,58,174,29,159,58,209,136,163,58,110,3,168,58,134,141,172,58,24,39,177,58,36,208,181,58,169,136,186,58,169,80,191,58,33,40,196,58,19,15,201,58,126,5,206,58,98,11,211,58,191,32,216,58,148,69,221,58,225,121,226,58,166,189,231,58,227,16,237,58,152,115,242,58,196,229,247,58,103,103,253,58,65,124,1,59,137,76,4,59,141,36,7,59,76,4,10,59,198,235,12,59,251,218,15,59,235,209,18,59,149,208,21,59,251,214,24,59,26,229,27,59,244,250,30,59,136,24,34,59,215,61,37,59,223,106,40,59,161,159,43,59,29,220,46,59,83,32,50,59,66,108,53,59,234,191,56,59,76,27,60,59,103,126,63,59,59,233,66,59,199,91,70,59,12,214,73,59,10,88,77,59,193,225,80,59,48,115,84,59,86,12,88,59,53,173,91,59,204,85,95,59,26,6,99,59,32,190,102,59,222,125,106,59,82,69,110,59,127,20,114,59,97,235,117,59,251,201,121,59,76,176,125,59,41,207,128,59,8,202,130,59,194,200,132,59,87,203,134,59,198,209,136,59,17,220,138,59,55,234,140,59,55,252,142,59,18,18,145,59,199,43,147,59,87,73,149,59,194,106,151,59,6,144,153,59,37,185,155,59,30,230,157,59,241,22,160,59,158,75,162,59,37,132,164,59,134,192,166,59,192,0,169,59,212,68,171,59,193,140,173,59,137,216,175,59,41,40,178,59,163,123,180,59,245,210,182,59,33,46,185,59,38,141,187,59,4,240,189,59,186,86,192,59,73,193,194,59,177,47,197,59,242,161,199,59,10,24,202,59,251,145,204,59,196,15,207,59,102,145,209,59,223,22,212,59,49,160,214,59,90,45,217,59,91,190,219,59,51,83,222,59,227,235,224,59,107,136,227,59,201,40,230,59,255,204,232,59,12,117,235,59,240,32,238,59,171,208,240,59,61,132,243,59,165,59,246,59,228,246,248,59,250,181,251,59,229,120,254,59,212,159,0,60,32,5,2,60,87,108,3,60,121,213,4,60,134,64,6,60,126,173,7,60,96,28,9,60,45,141,10,60,229,255,11,60,136,116,13,60,21,235,14,60,141,99,16,60,239,221,17,60,59,90,19,60,114,216,20,60,147,88,22,60,158,218,23,60,147,94,25,60,115,228,26,60,60,108,28,60,240,245,29,60,141,129,31,60,20,15,33,60,133,158,34,60,224,47,36,60,36,195,37,60,82,88,39,60,105,239,40,60,106,136,42,60,84,35,44,60,40,192,45,60,229,94,47,60,139,255,48,60,26,162,50,60,146,70,52,60,243,236,53,60,61,149,55,60,112,63,57,60,140,235,58,60,145,153,60,60,126,73,62,60,84,251,63,60,18,175,65,60,185,100,67,60,72,28,69,60,192,213,70,60,31,145,72,60,103,78,74,60,151,13,76,60,175,206,77,60,176,145,79,60,152,86,81,60,103,29,83,60,31,230,84,60,190,176,86,60,69,125,88,60,179,75,90,60,9,28,92,60,71,238,93,60,107,194,95,60,119,152,97,60,106,112,99,60,68,74,101,60,5,38,103,60,173,3,105,60,60,227,106,60,178,196,108,60,14,168,110,60,81,141,112,60,123,116,114,60,139,93,116,60,130,72,118,60,95,53,120,60,34,36,122,60,203,20,124,60,90,7,126,60,208,251,127,60,22,249,128,60,54,245,129,60,74,242,130,60,80,240,131,60,73,239,132,60,53,239,133,60,19,240,134,60,229,241,135,60,169,244,136,60,95,248,137,60,8,253,138,60,164,2,140,60,50,9,141,60,178,16,142,60,37,25,143,60,139,34,144,60,226,44,145,60,44,56,146,60,104,68,147,60,150,81,148,60,182,95,149,60,201,110,150,60,205,126,151,60,196,143,152,60,172,161,153,60,135,180,154,60,83,200,155,60,17,221,156,60,193,242,157,60,98,9,159,60,245,32,160,60,122,57,161,60,241,82,162,60,89,109,163,60,178,136,164,60,253,164,165,60,57,194,166,60,103,224,167,60,134,255,168,60,151,31,170,60,152,64,171,60,139,98,172,60,111,133,173,60,68,169,174,60,10,206,175,60,193,243,176,60,105,26,178,60,2,66,179,60,139,106,180,60,6,148,181,60,113,190,182,60,205,233,183,60,26,22,185,60,87,67,186,60,133,113,187,60,163,160,188,60,177,208,189,60,177,1,191,60,160,51,192,60,128,102,193,60,80,154,194,60,16,207,195,60,193,4,197,60,97,59,198,60,242,114,199,60,114,171,200,60,227,228,201,60,67,31,203,60,147,90,204,60,211,150,205,60,3,212,206,60,34,18,208,60,49,81,209,60,48,145,210,60,30,210,211,60,252,19,213,60,201,86,214,60,133,154,215,60,49,223,216,60,204,36,218,60,86,107,219,60,208,178,220,60,56,251,221,60,144,68,223,60,214,142,224,60,12,218,225,60,48,38,227,60,67,115,228,60,69,193,229,60,54,16,231,60,21,96,232,60,227,176,233,60,160,2,235,60,75,85,236,60,228,168,237,60,108,253,238,60,226,82,240,60,70,169,241,60,153,0,243,60,218,88,244,60,8,178,245,60,37,12,247,60,48,103,248,60,41,195,249,60,15,32,251,60,228,125,252,60,166,220,253,60,85,60,255,60,121,78,0,61,63,255,0,61,123,176,1,61,46,98,2,61,88,20,3,61,248,198,3,61,15,122,4,61,156,45,5,61,161,225,5,61,27,150,6,61,12,75,7,61,116,0,8,61,82,182,8,61,167,108,9,61,113,35,10,61,179,218,10,61,106,146,11,61,152,74,12,61,60,3,13,61,87,188,13,61,231,117,14,61,238,47,15,61,107,234,15,61,94,165,16,61,199,96,17,61,166,28,18,61,251,216,18,61,198,149,19,61,7,83,20,61,190,16,21,61,234,206,21,61,141,141,22,61,165,76,23,61,52,12,24,61,56,204,24,61,177,140,25,61,161,77,26,61,6,15,27,61,224,208,27,61,48,147,28,61,246,85,29,61,49,25,30,61,226,220,30,61,8,161,31,61,164,101,32,61,181,42,33,61,59,240,33,61,55,182,34,61,168,124,35,61,142,67,36,61,233,10,37,61,186,210,37,61,255,154,38,61,186,99,39,61,234,44,40,61,143,246,40,61,168,192,41,61,55,139,42,61,59,86,43,61,180,33,44,61,161,237,44,61,4,186,45,61,219,134,46,61,38,84,47,61,231,33,48,61,28,240,48,61,198,190,49,61,229,141,50,61,120,93,51,61,127,45,52,61,251,253,52,61,236,206,53,61,81,160,54,61,42,114,55,61,120,68,56,61,58,23,57,61,112,234,57,61,27,190,58,61,58,146,59,61,204,102,60,61,211,59,61,61,79,17,62,61,62,231,62,61,161,189,63,61,120,148,64,61,195,107,65,61,130,67,66,61,181,27,67,61,92,244,67,61,118,205,68,61,4,167,69,61,6,129,70,61,124,91,71,61,101,54,72,61,194,17,73,61,146,237,73,61,214,201,74,61,141,166,75,61,184,131,76,61,86,97,77,61,104,63,78,61,236,29,79,61,229,252,79,61,80,220,80,61,46,188,81,61,128,156,82,61,69,125,83,61,125,94,84,61,40,64,85,61,69,34,86,61,214,4,87,61,218,231,87,61,81,203,88,61,58,175,89,61,150,147,90,61,101,120,91,61,167,93,92,61,91,67,93,61,130,41,94,61,28,16,95,61,40,247,95,61,167,222,96,61,152,198,97,61,251,174,98,61,209,151,99,61,25,129,100,61,212,106,101,61,0,85,102,61,159,63,103,61,176,42,104,61,51,22,105,61,41,2,106,61,144,238,106,61,105,219,107,61,180,200,108,61,113,182,109,61,160,164,110,61,65,147,111,61,84,130,112,61,216,113,113,61,206,97,114,61,54,82,115,61,15,67,116,61,89,52,117,61,22,38,118,61,67,24,119,61,226,10,120,61,243,253,120,61,117,241,121,61,104,229,122,61,204,217,123,61,162,206,124,61,232,195,125,61,160,185,126,61,201,175,127,61,49,83,128,61,183,206,128,61,117,74,129,61,107,198,129,61,154,66,130,61,1,191,130,61,160,59,131,61,120,184,131,61,136,53,132,61,209,178,132,61,81,48,133,61,10,174,133,61,251,43,134,61,37,170,134,61,134,40,135,61,32,167,135,61,242,37,136,61,252,164,136,61,62,36,137,61,184,163,137,61,106,35,138,61,84,163,138,61,118,35,139,61,209,163,139,61,99,36,140,61,45,165,140,61,46,38,141,61,104,167,141,61,218,40,142,61,131,170,142,61,100,44,143,61,125,174,143,61,206,48,144,61,86,179,144,61,23,54,145,61,14,185,145,61,62,60,146,61,165,191,146,61,67,67,147,61,26,199,147,61,39,75,148,61,109,207,148,61,234,83,149,61,158,216,149,61,138,93,150,61,173,226,150,61,7,104,151,61,153,237,151,61,98,115,152,61,99,249,152,61,155,127,153,61,10,6,154,61,176,140,154,61,142,19,155,61,163,154,155,61,239,33,156,61,114,169,156,61,44,49,157,61,29,185,157,61,69,65,158,61,165,201,158,61,59,82,159,61,8,219,159,61,13,100,160,61,72,237,160,61,186,118,161,61,99,0,162,61,67,138,162,61,90,20,163,61,167,158,163,61,43,41,164,61,230,179,164,61,216,62,165,61,0,202,165,61,95,85,166,61,245,224,166,61,193,108,167,61,196,248,167,61,254,132,168,61,110,17,169,61,20,158,169,61,241,42,170,61,4,184,170,61,78,69,171,61,206,210,171,61,133,96,172,61,113,238,172,61,149,124,173,61,238,10,174,61,126,153,174,61,67,40,175,61,63,183,175,61,114,70,176,61,218,213,176,61,120,101,177,61,77,245,177,61,88,133,178,61,152,21,179,61,15,166,179,61,187,54,180,61,158,199,180,61,182,88,181,61,4,234,181,61,137,123,182,61,67,13,183,61,50,159,183,61,88,49,184,61,179,195,184,61,68,86,185,61,11,233,185,61,7,124,186,61,57,15,187,61,160,162,187,61,61,54,188,61,16,202,188,61,24,94,189,61,85,242,189,61,200,134,190,61,112,27,191,61,78,176,191,61,97,69,192,61,170,218,192,61,39,112,193,61,218,5,194,61,194,155,194,61,224,49,195,61,50,200,195,61,186,94,196,61,119,245,196,61,104,140,197,61,143,35,198,61,235,186,198,61,124,82,199,61,66,234,199,61,61,130,200,61,108,26,201,61,209,178,201,61,106,75,202,61,57,228,202,61,59,125,203,61,115,22,204,61,224,175,204,61,129,73,205,61,86,227,205,61,97,125,206,61,159,23,207,61,19,178,207,61,187,76,208,61,151,231,208,61,168,130,209,61,237,29,210,61,103,185,210,61,21,85,211,61,248,240,211,61,14,141,212,61,89,41,213,61,216,197,213,61,140,98,214,61,115,255,214,61,143,156,215,61,223,57,216,61,99,215,216,61,27,117,217,61,7,19,218,61,38,177,218,61,122,79,219,61,2,238,219,61,189,140,220,61,173,43,221,61,208,202,221,61,39,106,222,61,178,9,223,61,112,169,223,61,98,73,224,61,136,233,224,61,226,137,225,61,111,42,226,61,47,203,226,61,35,108,227,61,74,13,228,61,165,174,228,61,52,80,229,61,245,241,229,61,234,147,230,61,19,54,231,61,110,216,231,61,253,122,232,61,191,29,233,61,180,192,233,61,221,99,234,61,56,7,235,61,199,170,235,61,136,78,236,61,125,242,236,61,164,150,237,61,255,58,238,61,140,223,238,61,76,132,239,61,63,41,240,61,101,206,240,61,189,115,241,61,73,25,242,61,7,191,242,61,247,100,243,61,26,11,244,61,112,177,244,61,248,87,245,61,179,254,245,61,160,165,246,61,192,76,247,61,18,244,247,61,151,155,248,61,77,67,249,61,55,235,249,61,82,147,250,61,159,59,251,61,31,228,251,61,209,140,252,61,181,53,253,61,203,222,253,61,19,136,254,61,141,49,255,61,57,219,255,61,140,66,0,62,148,151,0,62,181,236,0,62,238,65,1,62,65,151,1,62,173,236,1,62,49,66,2,62,206,151,2,62,132,237,2,62,83,67,3,62,59,153,3,62,59,239,3,62,84,69,4,62,134,155,4,62,209,241,4,62,52,72,5,62,176,158,5,62,68,245,5,62,242,75,6,62,183,162,6,62,150,249,6,62,141,80,7,62,156,167,7,62,196,254,7,62,5,86,8,62,94,173,8,62,207,4,9,62,89,92,9,62,252,179,9,62,183,11,10,62,138,99,10,62,118,187,10,62,122,19,11,62,150,107,11,62,203,195,11,62,24,28,12,62,125,116,12,62,250,204,12,62,144,37,13,62,62,126,13,62,4,215,13,62,227,47,14,62,217,136,14,62,232,225,14,62,15,59,15,62,78,148,15,62,165,237,15,62,20,71,16,62,155,160,16,62,58,250,16,62,241,83,17,62,193,173,17,62,168,7,18,62,167,97,18,62,190,187,18,62,237,21,19,62,51,112,19,62,146,202,19,62,9,37,20,62,151,127,20,62,61,218,20,62,251,52,21,62,209,143,21,62,190,234,21,62,195,69,22,62,224,160,22,62,21,252,22,62,97,87,23,62,197,178,23,62,64,14,24,62,211,105,24,62,126,197,24,62,64,33,25,62,26,125,25,62,11,217,25,62,20,53,26,62,52,145,26,62,108,237,26,62,187,73,27,62,34,166,27,62,160,2,28,62,53,95,28,62,226,187,28,62,166,24,29,62,129,117,29,62,116,210,29,62,126,47,30,62,159,140,30,62,215,233,30,62,39,71,31,62,141,164,31,62,11,2,32,62,160,95,32,62,76,189,32,62,16,27,33,62,234,120,33,62,219,214,33,62,228,52,34,62,3,147,34,62,58,241,34,62,135,79,35,62,235,173,35,62,103,12,36,62,249,106,36,62,162,201,36,62,98,40,37,62,56,135,37,62,38,230,37,62,42,69,38,62,69,164,38,62,119,3,39,62,192,98,39,62,31,194,39,62,149,33,40,62,33,129,40,62,197,224,40,62,126,64,41,62,79,160,41,62,54,0,42,62,51,96,42,62,72,192,42,62,114,32,43,62,179,128,43,62,11,225,43,62,121,65,44,62,253,161,44,62,152,2,45,62,73,99,45,62,16,196,45,62,238,36,46,62,226,133,46,62,237,230,46,62,13,72,47,62,68,169,47,62,145,10,48,62,245,107,48,62,110,205,48,62,254,46,49,62,163,144,49,62,95,242,49,62,49,84,50,62,25,182,50,62,23,24,51,62,43,122,51,62,85,220,51,62,148,62,52,62,234,160,52,62,86,3,53,62,216,101,53,62,111,200,53,62,28,43,54,62,223,141,54,62,184,240,54,62,167,83,55,62,171,182,55,62,197,25,56,62,245,124,56,62,59,224,56,62,150,67,57,62,7,167,57,62,141,10,58,62,41,110,58,62,219,209,58,62,162,53,59,62,126,153,59,62,112,253,59,62,120,97,60,62,149,197,60,62,199,41,61,62,15,142,61,62,108,242,61,62,222,86,62,62,102,187,62,62,3,32,63,62,181,132,63,62,125,233,63,62,90,78,64,62,75,179,64,62,83,24,65,62,111,125,65,62,160,226,65,62,231,71,66,62,66,173,66,62,179,18,67,62,57,120,67,62,211,221,67,62,131,67,68,62,71,169,68,62,33,15,69,62,15,117,69,62,18,219,69,62,42,65,70,62,87,167,70,62,153,13,71,62,240,115,71,62,91,218,71,62,219,64,72,62,111,167,72,62,25,14,73,62,215,116,73,62,169,219,73,62,144,66,74,62,140,169,74,62,157,16,75,62,193,119,75,62,251,222,75,62,73,70,76,62,171,173,76,62,34,21,77,62,173,124,77,62,76,228,77,62,0,76,78,62,200,179,78,62,164,27,79,62,149,131,79,62,154,235,79,62,179,83,80,62,225,187,80,62,34,36,81,62,120,140,81,62,225,244,81,62,95,93,82,62,241,197,82,62,151,46,83,62,81,151,83,62,31,0,84,62,1,105,84,62,247,209,84,62,0,59,85,62,30,164,85,62,79,13,86,62,149,118,86,62,238,223,86,62,91,73,87,62,219,178,87,62,112,28,88,62,24,134,88,62,211,239,88,62,163,89,89,62,134,195,89,62,124,45,90,62,134,151,90,62,164,1,91,62,213,107,91,62,26,214,91,62,114,64,92,62,221,170,92,62,92,21,93,62,239,127,93,62,148,234,93,62,77,85,94,62,26,192,94,62,249,42,95,62,236,149,95,62,242,0,96,62,11,108,96,62,55,215,96,62,119,66,97,62,202,173,97,62,47,25,98,62,168,132,98,62,52,240,98,62,210,91,99,62],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+10240);allocate([132,199,99,62,73,51,100,62,32,159,100,62,11,11,101,62,8,119,101,62,24,227,101,62,59,79,102,62,113,187,102,62,186,39,103,62,21,148,103,62,131,0,104,62,3,109,104,62,151,217,104,62,60,70,105,62,245,178,105,62,192,31,106,62,157,140,106,62,141,249,106,62,144,102,107,62,165,211,107,62,204,64,108,62,6,174,108,62,82,27,109,62,176,136,109,62,33,246,109,62,164,99,110,62,57,209,110,62,225,62,111,62,154,172,111,62,102,26,112,62,68,136,112,62,52,246,112,62,55,100,113,62,75,210,113,62,113,64,114,62,169,174,114,62,243,28,115,62,80,139,115,62,190,249,115,62,61,104,116,62,207,214,116,62,115,69,117,62,40,180,117,62,239,34,118,62,200,145,118,62,179,0,119,62,175,111,119,62,189,222,119,62,221,77,120,62,14,189,120,62,80,44,121,62,165,155,121,62,10,11,122,62,130,122,122,62,10,234,122,62,164,89,123,62,80,201,123,62,13,57,124,62,219,168,124,62,186,24,125,62,171,136,125,62,173,248,125,62,192,104,126,62,228,216,126,62,26,73,127,62,96,185,127,62,220,20,128,62,16,77,128,62,77,133,128,62,147,189,128,62,225,245,128,62,55,46,129,62,150,102,129,62,253,158,129,62,109,215,129,62,229,15,130,62,102,72,130,62,238,128,130,62,128,185,130,62,25,242,130,62,187,42,131,62,102,99,131,62,24,156,131,62,211,212,131,62,150,13,132,62,98,70,132,62,53,127,132,62,17,184,132,62,245,240,132,62,226,41,133,62,214,98,133,62,211,155,133,62,216,212,133,62,229,13,134,62,250,70,134,62,23,128,134,62,61,185,134,62,106,242,134,62,160,43,135,62,221,100,135,62,35,158,135,62,112,215,135,62,198,16,136,62,35,74,136,62,137,131,136,62,247,188,136,62,108,246,136,62,233,47,137,62,111,105,137,62,252,162,137,62,145,220,137,62,46,22,138,62,211,79,138,62,127,137,138,62,52,195,138,62,240,252,138,62,180,54,139,62,128,112,139,62,84,170,139,62,47,228,139,62,18,30,140,62,253,87,140,62,239,145,140,62,233,203,140,62,235,5,141,62,245,63,141,62,6,122,141,62,31,180,141,62,63,238,141,62,103,40,142,62,150,98,142,62,205,156,142,62,12,215,142,62,82,17,143,62,159,75,143,62,245,133,143,62,81,192,143,62,181,250,143,62,33,53,144,62,147,111,144,62,14,170,144,62,143,228,144,62,25,31,145,62,169,89,145,62,65,148,145,62,224,206,145,62,134,9,146,62,52,68,146,62,233,126,146,62,165,185,146,62,105,244,146,62,52,47,147,62,6,106,147,62,223,164,147,62,191,223,147,62,167,26,148,62,150,85,148,62,139,144,148,62,136,203,148,62,140,6,149,62,152,65,149,62,170,124,149,62,195,183,149,62,227,242,149,62,11,46,150,62,57,105,150,62,111,164,150,62,171,223,150,62,238,26,151,62,56,86,151,62,138,145,151,62,226,204,151,62,65,8,152,62,167,67,152,62,19,127,152,62,135,186,152,62,1,246,152,62,130,49,153,62,10,109,153,62,153,168,153,62,47,228,153,62,203,31,154,62,110,91,154,62,24,151,154,62,200,210,154,62,127,14,155,62,61,74,155,62,2,134,155,62,205,193,155,62,158,253,155,62,119,57,156,62,85,117,156,62,59,177,156,62,39,237,156,62,25,41,157,62,18,101,157,62,18,161,157,62,24,221,157,62,36,25,158,62,55,85,158,62,80,145,158,62,112,205,158,62,150,9,159,62,195,69,159,62,246,129,159,62,47,190,159,62,111,250,159,62,180,54,160,62,1,115,160,62,83,175,160,62,172,235,160,62,11,40,161,62,112,100,161,62,219,160,161,62,77,221,161,62,196,25,162,62,66,86,162,62,198,146,162,62,81,207,162,62,225,11,163,62,119,72,163,62,20,133,163,62,182,193,163,62,95,254,163,62,13,59,164,62,194,119,164,62,125,180,164,62,61,241,164,62,4,46,165,62,208,106,165,62,162,167,165,62,123,228,165,62,89,33,166,62,61,94,166,62,39,155,166,62,23,216,166,62,12,21,167,62,7,82,167,62,8,143,167,62,15,204,167,62,28,9,168,62,46,70,168,62,70,131,168,62,100,192,168,62,136,253,168,62,177,58,169,62,223,119,169,62,20,181,169,62,78,242,169,62,141,47,170,62,211,108,170,62,29,170,170,62,109,231,170,62,195,36,171,62,31,98,171,62,127,159,171,62,230,220,171,62,81,26,172,62,194,87,172,62,57,149,172,62,181,210,172,62,54,16,173,62,189,77,173,62,73,139,173,62,218,200,173,62,113,6,174,62,13,68,174,62,174,129,174,62,85,191,174,62,0,253,174,62,177,58,175,62,103,120,175,62,35,182,175,62,227,243,175,62,169,49,176,62,116,111,176,62,68,173,176,62,25,235,176,62,243,40,177,62,210,102,177,62,182,164,177,62,160,226,177,62,142,32,178,62,129,94,178,62,121,156,178,62,119,218,178,62,121,24,179,62,128,86,179,62,140,148,179,62,157,210,179,62,178,16,180,62,205,78,180,62,236,140,180,62,16,203,180,62,57,9,181,62,103,71,181,62,154,133,181,62,209,195,181,62,13,2,182,62,78,64,182,62,147,126,182,62,221,188,182,62,44,251,182,62,127,57,183,62,215,119,183,62,52,182,183,62,149,244,183,62,251,50,184,62,101,113,184,62,212,175,184,62,71,238,184,62,191,44,185,62,59,107,185,62,188,169,185,62,65,232,185,62,202,38,186,62,88,101,186,62,235,163,186,62,129,226,186,62,28,33,187,62,188,95,187,62,95,158,187,62,7,221,187,62,180,27,188,62,100,90,188,62,25,153,188,62,210,215,188,62,143,22,189,62,80,85,189,62,22,148,189,62,223,210,189,62,173,17,190,62,127,80,190,62,85,143,190,62,47,206,190,62,13,13,191,62,239,75,191,62,213,138,191,62,191,201,191,62,173,8,192,62,159,71,192,62,149,134,192,62,143,197,192,62,141,4,193,62,143,67,193,62,148,130,193,62,158,193,193,62,171,0,194,62,188,63,194,62,209,126,194,62,234,189,194,62,6,253,194,62,38,60,195,62,74,123,195,62,113,186,195,62,157,249,195,62,204,56,196,62,254,119,196,62,52,183,196,62,110,246,196,62,171,53,197,62,236,116,197,62,49,180,197,62,121,243,197,62,196,50,198,62,19,114,198,62,102,177,198,62,188,240,198,62,21,48,199,62,114,111,199,62,210,174,199,62,54,238,199,62,157,45,200,62,7,109,200,62,117,172,200,62,230,235,200,62,90,43,201,62,209,106,201,62,76,170,201,62,202,233,201,62,75,41,202,62,208,104,202,62,88,168,202,62,226,231,202,62,112,39,203,62,1,103,203,62,149,166,203,62,45,230,203,62,199,37,204,62,100,101,204,62,4,165,204,62,168,228,204,62,78,36,205,62,248,99,205,62,164,163,205,62,83,227,205,62,5,35,206,62,186,98,206,62,114,162,206,62,45,226,206,62,234,33,207,62,171,97,207,62,110,161,207,62,52,225,207,62,253,32,208,62,200,96,208,62,150,160,208,62,103,224,208,62,59,32,209,62,17,96,209,62,234,159,209,62,198,223,209,62,164,31,210,62,133,95,210,62,104,159,210,62,78,223,210,62,55,31,211,62,33,95,211,62,15,159,211,62,255,222,211,62,241,30,212,62,230,94,212,62,221,158,212,62,215,222,212,62,211,30,213,62,209,94,213,62,210,158,213,62,213,222,213,62,219,30,214,62,226,94,214,62,236,158,214,62,248,222,214,62,7,31,215,62,24,95,215,62,42,159,215,62,63,223,215,62,87,31,216,62,112,95,216,62,139,159,216,62,169,223,216,62,200,31,217,62,234,95,217,62,14,160,217,62,51,224,217,62,91,32,218,62,133,96,218,62,176,160,218,62,222,224,218,62,13,33,219,62,63,97,219,62,114,161,219,62,167,225,219,62,222,33,220,62,23,98,220,62,82,162,220,62,142,226,220,62,204,34,221,62,12,99,221,62,78,163,221,62,146,227,221,62,215,35,222,62,29,100,222,62,102,164,222,62,176,228,222,62,252,36,223,62,73,101,223,62,152,165,223,62,232,229,223,62,58,38,224,62,142,102,224,62,227,166,224,62,57,231,224,62,145,39,225,62,234,103,225,62,69,168,225,62,161,232,225,62,255,40,226,62,94,105,226,62,190,169,226,62,32,234,226,62,131,42,227,62,231,106,227,62,76,171,227,62,179,235,227,62,27,44,228,62,132,108,228,62,238,172,228,62,90,237,228,62,199,45,229,62,52,110,229,62,163,174,229,62,19,239,229,62,133,47,230,62,247,111,230,62,106,176,230,62,222,240,230,62,83,49,231,62,202,113,231,62,65,178,231,62,185,242,231,62,50,51,232,62,172,115,232,62,38,180,232,62,162,244,232,62,31,53,233,62,156,117,233,62,26,182,233,62,153,246,233,62,25,55,234,62,153,119,234,62,26,184,234,62,156,248,234,62,31,57,235,62,162,121,235,62,38,186,235,62,170,250,235,62,47,59,236,62,181,123,236,62,59,188,236,62,194,252,236,62,73,61,237,62,209,125,237,62,89,190,237,62,226,254,237,62,107,63,238,62,245,127,238,62,127,192,238,62,10,1,239,62,149,65,239,62,32,130,239,62,171,194,239,62,55,3,240,62,196,67,240,62,80,132,240,62,221,196,240,62,106,5,241,62,247,69,241,62,132,134,241,62,18,199,241,62,160,7,242,62,45,72,242,62,187,136,242,62,74,201,242,62,216,9,243,62,102,74,243,62,244,138,243,62,131,203,243,62,17,12,244,62,159,76,244,62,46,141,244,62,188,205,244,62,74,14,245,62,216,78,245,62,102,143,245,62,244,207,245,62,129,16,246,62,15,81,246,62,156,145,246,62,41,210,246,62,182,18,247,62,67,83,247,62,207,147,247,62,91,212,247,62,231,20,248,62,115,85,248,62,254,149,248,62,136,214,248,62,19,23,249,62,157,87,249,62,38,152,249,62,175,216,249,62,56,25,250,62,192,89,250,62,72,154,250,62,207,218,250,62,86,27,251,62,220,91,251,62,97,156,251,62,230,220,251,62,106,29,252,62,238,93,252,62,113,158,252,62,243,222,252,62,117,31,253,62,245,95,253,62,118,160,253,62,245,224,253,62,116,33,254,62,241,97,254,62,110,162,254,62,235,226,254,62,102,35,255,62,224,99,255,62,90,164,255,62,211,228,255,62,165,18,0,63,225,50,0,63,27,83,0,63,86,115,0,63,144,147,0,63,201,179,0,63,2,212,0,63,58,244,0,63,114,20,1,63,169,52,1,63,224,84,1,63,22,117,1,63,76,149,1,63,129,181,1,63,181,213,1,63,233,245,1,63,28,22,2,63,78,54,2,63,128,86,2,63,178,118,2,63,226,150,2,63,18,183,2,63,65,215,2,63,112,247,2,63,157,23,3,63,203,55,3,63,247,87,3,63,35,120,3,63,78,152,3,63,120,184,3,63,161,216,3,63,202,248,3,63,242,24,4,63,25,57,4,63,63,89,4,63,101,121,4,63,137,153,4,63,173,185,4,63,208,217,4,63,243,249,4,63,20,26,5,63,52,58,5,63,84,90,5,63,115,122,5,63,145,154,5,63,173,186,5,63,202,218,5,63,229,250,5,63,255,26,6,63,24,59,6,63,48,91,6,63,72,123,6,63,94,155,6,63,116,187,6,63,136,219,6,63,155,251,6,63,174,27,7,63,191,59,7,63,208,91,7,63,223,123,7,63,237,155,7,63,250,187,7,63,7,220,7,63,18,252,7,63,28,28,8,63,37,60,8,63,44,92,8,63,51,124,8,63,57,156,8,63,61,188,8,63,64,220,8,63,67,252,8,63,68,28,9,63,68,60,9,63,66,92,9,63,64,124,9,63,60,156,9,63,55,188,9,63,49,220,9,63,41,252,9,63,33,28,10,63,23,60,10,63,12,92,10,63,255,123,10,63,242,155,10,63,227,187,10,63,211,219,10,63,193,251,10,63,174,27,11,63,154,59,11,63,133,91,11,63,110,123,11,63,86,155,11,63,60,187,11,63,33,219,11,63,5,251,11,63,231,26,12,63,200,58,12,63,168,90,12,63,134,122,12,63,98,154,12,63,62,186,12,63,23,218,12,63,240,249,12,63,199,25,13,63,156,57,13,63,112,89,13,63,66,121,13,63,19,153,13,63,227,184,13,63,176,216,13,63,125,248,13,63,72,24,14,63,17,56,14,63,216,87,14,63,159,119,14,63,99,151,14,63,38,183,14,63,232,214,14,63,167,246,14,63,101,22,15,63,34,54,15,63,221,85,15,63,150,117,15,63,78,149,15,63,4,181,15,63,184,212,15,63,106,244,15,63,27,20,16,63,202,51,16,63,120,83,16,63,36,115,16,63,206,146,16,63,118,178,16,63,28,210,16,63,193,241,16,63,100,17,17,63,6,49,17,63,165,80,17,63,67,112,17,63,223,143,17,63,121,175,17,63,17,207,17,63,167,238,17,63,60,14,18,63,206,45,18,63,95,77,18,63,238,108,18,63,123,140,18,63,7,172,18,63,144,203,18,63,23,235,18,63,157,10,19,63,32,42,19,63,162,73,19,63,34,105,19,63,159,136,19,63,27,168,19,63,149,199,19,63,13,231,19,63,131,6,20,63,247,37,20,63,104,69,20,63,216,100,20,63,70,132,20,63,178,163,20,63,27,195,20,63,131,226,20,63,233,1,21,63,76,33,21,63,174,64,21,63,13,96,21,63,106,127,21,63,197,158,21,63,31,190,21,63,117,221,21,63,202,252,21,63,29,28,22,63,109,59,22,63,188,90,22,63,8,122,22,63,82,153,22,63,153,184,22,63,223,215,22,63,34,247,22,63,100,22,23,63,162,53,23,63,223,84,23,63,26,116,23,63,82,147,23,63,136,178,23,63,187,209,23,63,237,240,23,63,28,16,24,63,73,47,24,63,115,78,24,63,155,109,24,63,193,140,24,63,228,171,24,63,6,203,24,63,36,234,24,63,65,9,25,63,91,40,25,63,115,71,25,63,136,102,25,63,155,133,25,63,171,164,25,63,185,195,25,63,197,226,25,63,206,1,26,63,213,32,26,63,217,63,26,63,219,94,26,63,218,125,26,63,215,156,26,63,210,187,26,63,202,218,26,63,191,249,26,63,178,24,27,63,162,55,27,63,144,86,27,63,123,117,27,63,100,148,27,63,74,179,27,63,46,210,27,63,15,241,27,63,237,15,28,63,201,46,28,63,162,77,28,63,121,108,28,63,77,139,28,63,31,170,28,63,237,200,28,63,185,231,28,63,131,6,29,63,74,37,29,63,14,68,29,63,207,98,29,63,142,129,29,63,74,160,29,63,3,191,29,63,186,221,29,63,110,252,29,63,31,27,30,63,205,57,30,63,121,88,30,63,34,119,30,63,200,149,30,63,107,180,30,63,12,211,30,63,170,241,30,63,69,16,31,63,221,46,31,63,114,77,31,63,5,108,31,63,148,138,31,63,33,169,31,63,171,199,31,63,50,230,31,63,182,4,32,63,56,35,32,63,182,65,32,63,50,96,32,63,170,126,32,63,32,157,32,63,147,187,32,63,3,218,32,63,112,248,32,63,218,22,33,63,65,53,33,63,165,83,33,63,6,114,33,63,100,144,33,63,191,174,33,63,23,205,33,63,108,235,33,63,190,9,34,63,13,40,34,63,89,70,34,63,162,100,34,63,232,130,34,63,43,161,34,63,107,191,34,63,167,221,34,63,225,251,34,63,24,26,35,63,75,56,35,63,123,86,35,63,168,116,35,63,211,146,35,63,249,176,35,63,29,207,35,63,62,237,35,63,91,11,36,63,118,41,36,63,141,71,36,63,161,101,36,63,177,131,36,63,191,161,36,63,201,191,36,63,208,221,36,63,212,251,36,63,213,25,37,63,210,55,37,63,204,85,37,63,195,115,37,63,183,145,37,63,167,175,37,63,148,205,37,63,126,235,37,63,101,9,38,63,72,39,38,63,40,69,38,63,4,99,38,63,221,128,38,63,179,158,38,63,134,188,38,63,85,218,38,63,33,248,38,63,233,21,39,63,174,51,39,63,112,81,39,63,46,111,39,63,233,140,39,63,160,170,39,63,84,200,39,63,4,230,39,63,178,3,40,63,91,33,40,63,1,63,40,63,164,92,40,63,67,122,40,63,223,151,40,63,120,181,40,63,12,211,40,63,158,240,40,63,43,14,41,63,182,43,41,63,60,73,41,63,192,102,41,63,63,132,41,63,187,161,41,63,52,191,41,63,169,220,41,63,26,250,41,63,136,23,42,63,242,52,42,63,89,82,42,63,188,111,42,63,28,141,42,63,119,170,42,63,208,199,42,63,36,229,42,63,117,2,43,63,194,31,43,63,12,61,43,63,82,90,43,63,148,119,43,63,211,148,43,63,14,178,43,63,69,207,43,63,120,236,43,63,168,9,44,63,212,38,44,63,252,67,44,63,33,97,44,63,66,126,44,63,95,155,44,63,120,184,44,63,142,213,44,63,159,242,44,63,173,15,45,63,184,44,45,63,190,73,45,63,193,102,45,63,191,131,45,63,186,160,45,63,177,189,45,63,165,218,45,63,148,247,45,63,128,20,46,63,103,49,46,63,75,78,46,63,43,107,46,63,7,136,46,63,224,164,46,63,180,193,46,63,132,222,46,63,81,251,46,63,26,24,47,63,222,52,47,63,159,81,47,63,92,110,47,63,21,139,47,63,202,167,47,63,123,196,47,63,40,225,47,63,209,253,47,63,118,26,48,63,23,55,48,63,180,83,48,63,77,112,48,63,226,140,48,63,115,169,48,63,0,198,48,63,137,226,48,63,14,255,48,63,142,27,49,63,11,56,49,63,132,84,49,63,248,112,49,63,105,141,49,63,214,169,49,63,62,198,49,63,162,226,49,63,2,255,49,63,95,27,50,63,182,55,50,63,10,84,50,63,90,112,50,63,166,140,50,63,237,168,50,63,48,197,50,63,111,225,50,63,170,253,50,63,225,25,51,63,19,54,51,63,66,82,51,63,108,110,51,63,146,138,51,63,180,166,51,63,209,194,51,63,234,222,51,63,0,251,51,63,16,23,52,63,29,51,52,63,37,79,52,63,41,107,52,63,41,135,52,63,37,163,52,63,28,191,52,63,15,219,52,63,253,246,52,63,232,18,53,63,206,46,53,63,176,74,53,63,141,102,53,63,102,130,53,63,59,158,53,63,11,186,53,63,215,213,53,63,159,241,53,63,98,13,54,63,33,41,54,63,220,68,54,63,146,96,54,63,68,124,54,63,241,151,54,63,154,179,54,63,63,207,54,63,223,234,54,63,123,6,55,63,18,34,55,63,165,61,55,63,52,89,55,63,190,116,55,63,67,144,55,63,196,171,55,63,65,199,55,63,185,226,55,63,45,254,55,63,156,25,56,63,7,53,56,63,109,80,56,63,207,107,56,63,44,135,56,63,133,162,56,63,217,189,56,63,40,217,56,63,115,244,56,63,186,15,57,63,252,42,57,63,57,70,57,63,114,97,57,63,166,124,57,63,214,151,57,63,1,179,57,63,40,206,57,63,74,233,57,63,103,4,58,63,128,31,58,63,148,58,58,63,163,85,58,63,174,112,58,63,180,139,58,63,182,166,58,63,179,193,58,63,171,220,58,63,159,247,58,63,142,18,59,63,120,45,59,63,94,72,59,63,63,99,59,63,27,126,59,63,243,152,59,63,197,179,59,63,148,206,59,63,93,233,59,63,34,4,60,63,226,30,60,63,157,57,60,63,84,84,60,63,5,111,60,63,178,137,60,63,91,164,60,63,254,190,60,63,157,217,60,63,55,244,60,63,204,14,61,63,93,41,61,63,232,67,61,63,111,94,61,63,241,120,61,63,110,147,61,63,231,173,61,63,91,200,61,63,201,226,61,63,51,253,61,63,152,23,62,63,249,49,62,63,84,76,62,63,171,102,62,63,252,128,62,63,73,155,62,63,145,181,62,63,212,207,62,63,19,234,62,63,76,4,63,63,128,30,63,63,176,56,63,63,219,82,63,63,0,109,63,63,33,135,63,63,61,161,63,63,84,187,63,63,102,213,63,63,115,239,63,63,123,9,64,63,127,35,64,63,125,61,64,63,118,87,64,63,106,113,64,63,90,139,64,63,68,165,64,63,42,191,64,63,10,217,64,63,229,242,64,63,188,12,65,63,141,38,65,63,90,64,65,63,33,90,65,63,228,115,65,63,161,141,65,63,89,167,65,63,13,193,65,63,187,218,65,63,100,244,65,63,8,14,66,63,167,39,66,63,65,65,66,63,214,90,66,63,102,116,66,63,241,141,66,63,119,167,66,63,248,192,66,63,115,218,66,63,234,243,66,63,91,13,67,63,199,38,67,63,47,64,67,63,145,89,67,63,238,114,67,63,69,140,67,63,152,165,67,63,230,190,67,63,46,216,67,63,113,241,67,63,175,10,68,63,232,35,68,63,28,61,68,63,75,86,68,63,116,111,68,63,153,136,68,63,184,161,68,63,210,186,68,63,230,211,68,63,246,236,68,63,0,6,69,63,5,31,69,63,5,56,69,63,0,81,69,63,245,105,69,63,230,130,69,63,209,155,69,63,182,180,69,63,151,205,69,63,114,230,69,63,72,255,69,63,25,24,70,63,229,48,70,63,171,73,70,63,108,98,70,63,40,123,70,63,222,147,70,63,143,172,70,63,59,197,70,63,226,221,70,63,131,246,70,63,31,15,71,63,182,39,71,63,71,64,71,63,211,88,71,63,90,113,71,63,220,137,71,63,88,162,71,63,207,186,71,63,64,211,71,63,172,235,71,63,19,4,72,63,116,28,72,63,209,52,72,63,39,77,72,63,121,101,72,63,197,125,72,63,11,150,72,63,77,174,72,63,137,198,72,63,191,222,72,63,240,246,72,63,28,15,73,63,66,39,73,63,99,63,73,63,127,87,73,63,149,111,73,63,166,135,73,63,177,159,73,63,183,183,73,63,183,207,73,63,178,231,73,63,168,255,73,63,152,23,74,63,131,47,74,63,104,71,74,63,72,95,74,63,34,119,74,63,247,142,74,63,199,166,74,63,145,190,74,63,85,214,74,63,20,238,74,63,206,5,75,63,130,29,75,63,49,53,75,63,218,76,75,63,126,100,75,63,28,124,75,63,181,147,75,63,72,171,75,63,213,194,75,63,93,218,75,63,224,241,75,63,93,9,76,63,213,32,76,63,71,56,76,63,179,79,76,63,26,103,76,63,124,126,76,63,216,149,76,63,46,173,76,63,127,196,76,63,202,219,76,63,16,243,76,63,80,10,77,63,139,33,77,63,192,56,77,63,240,79,77,63,26,103,77,63,62,126,77,63,93,149,77,63,118,172,77,63,137,195,77,63,151,218,77,63,160,241,77,63,163,8,78,63,160,31,78,63,151,54,78,63,137,77,78,63,118,100,78,63,93,123,78,63,62,146,78,63,25,169,78,63,239,191,78,63,192,214,78,63,138,237,78,63,79,4,79,63,15,27,79,63,201,49,79,63,125,72,79,63,43,95,79,63,212,117,79,63,119,140,79,63,21,163,79,63,172,185,79,63,63,208,79,63,203,230,79,63,82,253,79,63,211,19,80,63,79,42,80,63,197,64,80,63,53,87,80,63,159,109,80,63,4,132,80,63,99,154,80,63,189,176,80,63,16,199,80,63,94,221,80,63,167,243,80,63,233,9,81,63,38,32,81,63,93,54,81,63,143,76,81,63,187,98,81,63,225,120,81,63,1,143,81,63,28,165,81,63,48,187,81,63,64,209,81,63,73,231,81,63,77,253,81,63,75,19,82,63,67,41,82,63,53,63,82,63,34,85,82,63,9,107,82,63,234,128,82,63,198,150,82,63,155,172,82,63,107,194,82,63,53,216,82,63,250,237,82,63,185,3,83,63,113,25,83,63,37,47,83,63,210,68,83,63,121,90,83,63,27,112,83,63,183,133,83,63,77,155,83,63,222,176,83,63,104,198,83,63,237,219,83,63,108,241,83,63,230,6,84,63,89,28,84,63,199,49,84,63,46,71,84,63,145,92,84,63,237,113,84,63,67,135,84,63,148,156,84,63,223,177,84,63,35,199,84,63,99,220,84,63,156,241,84,63,207,6,85,63,253,27,85,63,37,49,85,63,71,70,85,63,99,91,85,63,121,112,85,63,138,133,85,63,149,154,85,63,153,175,85,63,152,196,85,63,146,217,85,63,133,238,85,63,114,3,86,63,90,24,86,63,60,45,86,63,24,66,86,63,238,86,86,63,190,107,86,63,136,128,86,63,76,149,86,63,11,170,86,63,196,190,86,63,118,211,86,63,35,232,86,63,203,252,86,63,108,17,87,63,7,38,87,63,156,58,87,63,44,79,87,63,182,99,87,63,58,120,87,63,183,140,87,63,47,161,87,63,162,181,87,63,14,202,87,63,116,222,87,63,213,242,87,63,47,7,88,63,132,27,88,63,211,47,88,63,28,68,88,63,95,88,88,63,156,108,88,63,211,128,88,63,4,149,88,63,47,169,88,63,85,189,88,63,116,209,88,63,142,229,88,63,162,249,88,63,175,13,89,63,183,33,89,63,185,53,89,63,181,73,89,63,171,93,89,63,155,113,89,63,134,133,89,63,106,153,89,63,72,173,89,63,33,193,89,63,243,212,89,63,192,232,89,63,135,252,89,63,71,16,90,63,2,36,90,63,183,55,90,63,102,75,90,63,15,95,90,63,178,114,90,63,79,134,90,63,230,153,90,63,119,173,90,63,3,193,90,63,136,212,90,63,7,232,90,63,129,251,90,63,244,14,91,63,98,34,91,63,201,53,91,63,43,73,91,63,135,92,91,63,220,111,91,63,44,131,91,63,118,150,91,63,186,169,91,63,248,188,91,63,47,208,91,63,97,227,91,63,141,246,91,63,179,9,92,63,212,28,92,63,238,47,92,63,2,67,92,63,16,86,92,63,24,105,92,63,26,124,92,63,23,143,92,63,13,162,92,63,253,180,92,63,232,199,92,63,204,218,92,63,171,237,92,63,131,0,93,63,86,19,93,63,34,38,93,63,233,56,93,63,169,75,93,63,100,94,93,63,24,113,93,63,199,131,93,63,112,150,93,63,18,169,93,63,175,187,93,63,70,206,93,63,215,224,93,63,97,243,93,63,230,5,94,63,101,24,94,63,222,42,94,63,81,61,94,63,190,79,94,63,36,98,94,63,133,116,94,63,224,134,94,63,53,153,94,63,132,171,94,63,205,189,94,63,16,208,94,63,77,226,94,63,132,244,94,63,181,6,95,63,224,24,95,63,5,43,95,63,36,61,95,63,61,79,95,63,80,97,95,63,93,115,95,63,101,133,95,63,102,151,95,63,97,169,95,63,86,187,95,63,69,205,95,63,46,223,95,63,18,241,95,63,239,2,96,63,198,20,96,63,151,38,96,63,98,56,96,63,40,74,96,63,231,91,96,63,160,109,96,63,84,127,96,63,1,145,96,63,168,162,96,63,73,180,96,63,229,197,96,63,122,215,96,63,10,233,96,63,147,250,96,63,22,12,97,63,148,29,97,63,11,47,97,63,125,64,97,63,232,81,97,63,77,99,97,63,173,116,97,63,6,134,97,63,90,151,97,63,167,168,97,63,239,185,97,63,48,203,97,63,108,220,97,63,162,237,97,63,209,254,97,63,251,15,98,63,30,33,98,63,60,50,98,63,84,67,98,63,101,84,98,63,113,101,98,63,119,118,98,63,119,135,98,63,112,152,98,63,100,169,98,63,82,186,98,63,58,203,98,63,28,220,98,63,247,236,98,63,205,253,98,63,157,14,99,63,103,31,99,63,43,48,99,63,233,64,99,63,161,81,99,63,83,98,99,63,255,114,99,63,165,131,99,63,69,148,99,63,224,164,99,63,116,181,99,63,2,198,99,63,138,214,99,63,13,231,99,63,137,247,99,63,255,7,100,63,112,24,100,63,218,40,100,63,62,57,100,63,157,73,100,63,246,89,100,63,72,106,100,63,149,122,100,63,219,138,100,63,28,155,100,63,87,171,100,63,140,187,100,63,186,203,100,63,227,219,100,63,6,236,100,63,35,252,100,63,58,12,101,63,75,28,101,63,86,44,101,63,91,60,101,63,91,76,101,63,84,92,101,63,71,108,101,63,53,124,101,63,28,140,101,63,254,155,101,63,217,171,101,63,175,187,101,63,126,203,101,63,72,219,101,63,12,235,101,63,202,250,101,63,130,10,102,63,52,26,102,63,224,41,102,63,134,57,102,63,38,73,102,63,193,88,102,63,85,104,102,63,227,119,102,63,108,135,102,63,238,150,102,63,107,166,102,63,226,181,102,63,83,197,102,63,190,212,102,63,35,228,102,63,130,243,102,63,219,2,103,63,46,18,103,63,124,33,103,63,195,48,103,63,5,64,103,63,64,79,103,63,118,94,103,63,166,109,103,63,208,124,103,63,244,139,103,63,18,155,103,63,42,170,103,63,61,185,103,63,73,200,103,63,80,215,103,63,80,230,103,63,75,245,103,63,64,4,104,63,47,19,104,63,24,34,104,63,251,48,104,63,217,63,104,63,176,78,104,63,130,93,104,63,78,108,104,63,20,123,104,63,212,137,104,63,142,152,104,63,66,167,104,63,240,181,104,63,153,196,104,63,60,211,104,63,217,225,104,63,112,240,104,63,1,255,104,63,140,13,105,63,17,28,105,63,145,42,105,63,11,57,105,63,127,71,105,63,237,85,105,63,85,100,105,63,183,114,105,63,20,129,105,63,106,143,105,63,187,157,105,63,6,172,105,63,75,186,105,63,139,200,105,63,196,214,105,63,248,228,105,63,38,243,105,63,78,1,106,63,112,15,106,63,141,29,106,63,163,43,106,63,180,57,106,63,191,71,106,63,196,85,106,63,196,99,106,63,189,113,106,63,177,127,106,63,159,141,106,63,135,155,106,63,106,169,106,63,70,183,106,63,29,197,106,63,238,210,106,63,186,224,106,63,127,238,106,63,63,252,106,63,249,9,107,63,173,23,107,63,91,37,107,63,4,51,107,63,167,64,107,63,68,78,107,63,219,91,107,63,109,105,107,63,249,118,107,63,127,132,107,63,255,145,107,63,122,159,107,63,238,172,107,63,94,186,107,63,199,199,107,63,42,213,107,63,136,226,107,63,224,239,107,63,51,253,107,63,128,10,108,63,198,23,108,63,8,37,108,63,67,50,108,63,121,63,108,63,169,76,108,63,211,89,108,63,248,102,108,63,23,116,108,63,48,129,108,63,68,142,108,63,82,155,108,63,90,168,108,63,92,181,108,63,89,194,108,63,80,207,108,63,65,220,108,63,45,233,108,63,19,246,108,63,243,2,109,63,206,15,109,63,163,28,109,63,114,41,109,63,60,54,109,63,0,67,109,63,190,79,109,63,119,92,109,63,42,105,109,63,215,117,109,63,127,130,109,63,33,143,109,63,189,155,109,63,84,168,109,63,229,180,109,63,113,193,109,63,247,205,109,63,119,218,109,63,242,230,109,63,103,243,109,63,214,255,109,63,64,12,110,63,164,24,110,63,3,37,110,63,91,49,110,63,175,61,110,63,253,73,110,63,69,86,110,63,135,98,110,63,196,110,110,63,252,122,110,63,45,135,110,63,90,147,110,63,128,159,110,63,161,171,110,63,189,183,110,63,211,195,110,63,227,207,110,63,238,219,110,63,243,231,110,63,243,243,110,63,237,255,110,63,226,11,111,63,209,23,111,63,186,35,111,63,158,47,111,63,125,59,111,63,85,71,111,63,41,83,111,63,247,94,111,63,191,106,111,63,130,118,111,63,63,130,111,63,247,141,111,63,169,153,111,63,86,165,111,63,253,176,111,63,159,188,111,63,59,200,111,63,210,211,111,63,99,223,111,63,239,234,111,63,117,246,111,63,246,1,112,63,114,13,112,63,231,24,112,63,88,36,112,63,195,47,112,63,40,59,112,63,137,70,112,63,227,81,112,63,56,93,112,63,136,104,112,63,210,115,112,63,23,127,112,63,87,138,112,63,145,149,112,63,197,160,112,63,244,171,112,63,30,183,112,63,66,194,112,63,97,205,112,63,123,216,112,63,143,227,112,63,157,238,112,63,167,249,112,63,171,4,113,63,169,15,113,63,162,26,113,63,150,37,113,63,132,48,113,63,109,59,113,63,81,70,113,63,47,81,113,63,8,92,113,63,219,102,113,63,170,113,113,63,114,124,113,63,54,135,113,63,244,145,113,63,173,156,113,63,96,167,113,63,14,178,113,63,183,188,113,63,91,199,113,63,249,209,113,63,146,220,113,63,37,231,113,63,179,241,113,63,60,252,113,63,192,6,114,63,62,17,114,63,183,27,114,63,43,38,114,63,154,48,114,63,3,59,114,63,103,69,114,63,197,79,114,63,31,90,114,63,115,100,114,63,194,110,114,63,11,121,114,63,79,131,114,63,143,141,114,63,200,151,114,63,253,161,114,63,44,172,114,63,87,182,114,63,123,192,114,63,155,202,114,63,182,212,114,63,203,222,114,63,219,232,114,63,230,242,114,63,235,252,114,63,236,6,115,63,231,16,115,63,221,26,115,63,206,36,115,63,186,46,115,63,160,56,115,63,130,66,115,63,94,76,115,63,53,86,115,63,7,96,115,63,212,105,115,63,155,115,115,63,94,125,115,63,27,135,115,63,211,144,115,63,134,154,115,63,52,164,115,63,221,173,115,63,128,183,115,63,31,193,115,63,184,202,115,63,77,212,115,63,220,221,115,63,102,231,115,63,235,240,115,63,107,250,115,63,230,3,116,63,92,13,116,63,204,22,116,63,56,32,116,63,159,41,116,63,0,51,116,63,93,60,116,63,180,69,116,63,6,79,116,63,84,88,116,63,156,97,116,63,223,106,116,63,29,116,116,63,87,125,116,63,139,134,116,63,186,143,116,63,228,152,116,63,9,162,116,63,41,171,116,63,68,180,116,63,91,189,116,63,108,198,116,63,120,207,116,63,127,216,116,63,129,225,116,63,127,234,116,63,119,243,116,63,106,252,116,63,89,5,117,63,66,14,117,63,38,23,117,63,6,32,117,63,225,40,117,63,182,49,117,63,135,58,117,63,83,67,117,63,26,76,117,63,220,84,117,63,153,93,117,63,81,102,117,63,4,111,117,63,179,119,117,63,92,128,117,63,1,137,117,63,160,145,117,63,59,154,117,63,209,162,117,63,98,171,117,63,239,179,117,63,118,188,117,63,249,196,117,63,118,205,117,63,239,213,117,63,99,222,117,63,210,230,117,63,61,239,117,63,162,247,117,63,3,0,118,63,95,8,118,63,182,16,118,63,8,25,118,63,86,33,118,63,159,41,118,63,227,49,118,63,34,58,118,63,92,66,118,63,146,74,118,63,195,82,118,63,239,90,118,63,22,99,118,63,57,107,118,63,86,115,118,63,112,123,118,63,132,131,118,63,148,139,118,63,158,147,118,63,165,155,118,63,166,163,118,63,163,171,118,63,155,179,118,63,142,187,118,63,125,195,118,63,103,203,118,63,76,211,118,63,45,219,118,63,9,227,118,63,224,234,118,63,178,242,118,63,128,250,118,63,74,2,119,63,14,10,119,63,206,17,119,63,137,25,119,63,64,33,119,63,242,40,119,63,160,48,119,63,72,56,119,63,237,63,119,63,140,71,119,63,39,79,119,63,190,86,119,63,79,94,119,63,220,101,119,63,101,109,119,63,233,116,119,63,105,124,119,63,228,131,119,63,90,139,119,63,204,146,119,63,57,154,119,63,162,161,119,63,6,169,119,63,101,176,119,63,192,183,119,63,23,191,119,63,105,198,119,63,182,205,119,63,255,212,119,63,68,220,119,63,132,227,119,63,191,234,119,63,246,241,119,63,41,249,119,63,87,0,120,63,129,7,120,63,166,14,120,63,198,21,120,63,227,28,120,63,250,35,120,63,14,43,120,63,28,50,120,63,39,57,120,63,45,64,120,63,46,71,120,63,44,78,120,63,36,85,120,63,25,92,120,63,9,99,120,63,244,105,120,63,219,112,120,63,190,119,120,63,156,126,120,63,118,133,120,63,76,140,120,63,29,147,120,63,234,153,120,63,179,160,120,63,119,167,120,63,55,174,120,63,242,180,120,63,169,187,120,63,92,194,120,63,11,201,120,63,181,207,120,63,91,214,120,63,252,220,120,63,154,227,120,63,51,234,120,63,199,240,120,63,88,247,120,63,228,253,120,63,108,4,121,63,240,10,121,63,111,17,121,63,234,23,121,63,97,30,121,63,211,36,121,63,66,43,121,63,172,49,121,63,18,56,121,63,116,62,121,63,209,68,121,63,42,75,121,63,127,81,121,63,208,87,121,63,29,94,121,63,101,100,121,63,170,106,121,63,234,112,121,63,38,119,121,63,93,125,121,63,145,131,121,63,193,137,121,63,236,143,121,63,19,150,121,63,54,156,121,63,85,162,121,63,112,168,121,63,134,174,121,63,153,180,121,63,167,186,121,63,178,192,121,63,184,198,121,63,186,204,121,63,184,210,121,63,178,216,121,63,168,222,121,63,154,228,121,63,135,234,121,63,113,240,121,63,87,246,121,63,56,252,121,63,22,2,122,63,239,7,122,63,197,13,122,63,150,19,122,63,100,25,122,63,45,31,122,63,243,36,122,63,180,42,122,63,113,48,122,63,43,54,122,63,224,59,122,63,146,65,122,63,63,71,122,63,233,76,122,63,142,82,122,63,48,88,122,63,206,93,122,63,103,99,122,63,253,104,122,63,143,110,122,63,29,116,122,63,167,121,122,63,45,127,122,63,175,132,122,63,45,138,122,63,168,143,122,63,30,149,122,63,145,154,122,63,255,159,122,63,106,165,122,63,209,170,122,63,52,176,122,63,147,181,122,63,239,186,122,63,70,192,122,63,154,197,122,63,234,202,122,63,54,208,122,63,126,213,122,63,194,218,122,63,3,224,122,63,64,229,122,63,121,234,122,63,174,239,122,63,223,244,122,63,13,250,122,63,55,255,122,63,93,4,123,63,127,9,123,63,157,14,123,63,184,19,123,63,207,24,123,63,227,29,123,63,242,34,123,63,254,39,123,63,6,45,123,63,10,50,123,63,11,55,123,63,8,60,123,63,1,65,123,63,247,69,123,63,233,74,123,63,215,79,123,63,193,84,123,63,168,89,123,63,139,94,123,63,107,99,123,63,71,104,123,63,31,109,123,63,243,113,123,63,196,118,123,63,146,123,123,63,91,128,123,63,33,133,123,63,228,137,123,63,163,142,123,63,94,147,123,63,22,152,123,63,202,156,123,63,122,161,123,63,39,166,123,63,208,170,123,63,118,175,123,63,24,180,123,63,183,184,123,63,82,189,123,63,233,193,123,63,125,198,123,63,14,203,123,63,155,207,123,63,36,212,123,63,170,216,123,63,45,221,123,63,172,225,123,63,39,230,123,63,159,234,123,63,19,239,123,63,132,243,123,63,242,247,123,63,92,252,123,63,195,0,124,63,38,5,124,63,133,9,124,63,226,13,124,63,58,18,124,63,144,22,124,63,226,26,124,63,48,31,124,63,123,35,124,63,195,39,124,63,7,44,124,63,72,48,124,63,134,52,124,63,192,56,124,63,247,60,124,63,42,65,124,63,90,69,124,63,135,73,124,63,176,77,124,63,214,81,124,63,249,85,124,63,24,90,124,63,52,94,124,63,77,98,124,63,98,102,124,63,116,106,124,63,131,110,124,63,142,114,124,63,150,118,124,63,155,122,124,63,157,126,124,63,155,130,124,63,150,134,124,63,142,138,124,63,130,142,124,63,116,146,124,63,98,150,124,63,77,154,124,63,52,158,124,63,24,162,124,63,249,165,124,63,215,169,124,63,178,173,124,63,137,177,124,63,94,181,124,63,47,185,124,63,253,188,124,63,199,192,124,63,143,196,124,63,83,200,124,63,20,204,124,63,211,207,124,63,141,211,124,63,69,215,124,63,250,218,124,63,171,222,124,63,90,226,124,63,5,230,124,63,173,233,124,63,82,237,124,63,244,240,124,63,147,244,124,63,46,248,124,63,199,251,124,63,93,255,124,63,239,2,125,63,127,6,125,63,11,10,125,63,148,13,125,63,27,17,125,63,158,20,125,63,30,24,125,63,155,27,125,63,21,31,125,63,140,34,125,63,0,38,125,63,114,41,125,63,224,44,125,63,75,48,125,63,179,51,125,63,24,55,125,63,122,58,125,63,217,61,125,63,54,65,125,63,143,68,125,63,229,71,125,63,56,75,125,63,137,78,125,63,214,81,125,63,33,85,125,63,104,88,125,63,173,91,125,63,239,94,125,63,46,98,125,63,106,101,125,63,163,104,125,63,217,107,125,63,12,111,125,63,61,114,125,63,106,117,125,63,149,120,125,63,189,123,125,63,226,126,125,63,4,130,125,63,36,133,125,63,64,136,125,63,90,139,125,63,112,142,125,63,133,145,125,63,150,148,125,63,164,151,125,63,176,154,125,63,185,157,125,63,191,160,125,63,194,163,125,63,194,166,125,63,192,169,125,63,187,172,125,63,179,175,125,63,168,178,125,63,155,181,125,63,139,184,125,63,120,187,125,63,99,190,125,63,74,193,125,63,48,196,125,63,18,199,125,63,241,201,125,63,206,204,125,63,169,207,125,63,128,210,125,63,85,213,125,63,39,216,125,63,247,218,125,63,196,221,125,63,142,224,125,63,85,227,125,63,26,230,125,63,220,232,125,63,156,235,125,63,89,238,125,63,19,241,125,63,203,243,125,63,128,246,125,63,51,249,125,63,227,251,125,63,144,254,125,63,59,1,126,63,227,3,126,63,137,6,126,63,44,9,126,63,204,11,126,63,106,14,126,63,6,17,126,63,158,19,126,63,53,22,126,63,200,24,126,63,90,27,126,63,232,29,126,63,116,32,126,63,254,34,126,63,133,37,126,63,10,40,126,63,140,42,126,63,12,45,126,63,137,47,126,63,4,50,126,63,124,52,126,63,242,54,126,63,101,57,126,63,214,59,126,63,68,62,126,63,176,64,126,63,26,67,126,63,129,69,126,63,230,71,126,63,72,74,126,63,168,76,126,63,5,79,126,63,96,81,126,63,185,83,126,63,15,86,126,63,99,88,126,63,181,90,126,63,4,93,126,63,81,95,126,63,155,97,126,63,227,99,126,63,41,102,126,63,108,104,126,63,173,106,126,63,236,108,126,63,40,111,126,63,98,113,126,63,154,115,126,63,208,117,126,63,3,120,126,63,51,122,126,63,98,124,126,63,142,126,126,63,184,128,126,63,224,130,126,63,5,133,126,63,40,135,126,63,73,137,126,63,104,139,126,63,132,141,126,63,159,143,126,63,183,145,126,63,204,147,126,63,224,149,126,63,241,151,126,63,0,154,126,63,13,156,126,63,24,158,126,63,32,160,126,63,38,162,126,63,42,164,126,63,44,166,126,63,44,168,126,63,41,170,126,63,37,172,126,63,30,174,126,63,21,176,126,63,10,178,126,63,253,179,126,63,238,181,126,63,220,183,126,63,201,185,126,63,179,187,126,63,155,189,126,63,129,191,126,63,101,193,126,63,71,195,126,63,39,197,126,63,5,199,126,63,224,200,126,63,186,202,126,63,145,204,126,63,103,206,126,63,58,208,126,63,12,210,126,63,219,211,126,63,168,213,126,63,115,215,126,63,61,217,126,63,4,219,126,63,201,220,126,63,140,222,126,63,77,224,126,63,12,226,126,63,202,227,126,63,133,229,126,63,62,231,126,63,245,232,126,63,170,234,126,63,94,236,126,63,15,238,126,63,190,239,126,63,108,241,126,63,23,243,126,63,193,244,126,63,104,246,126,63,14,248,126,63,178,249,126,63,84,251,126,63,243,252,126,63,145,254,126,63,46,0,127,63,200,1,127,63,96,3,127,63,247,4,127,63,139,6,127,63,30,8,127,63,175,9,127,63,62,11,127,63,203,12,127,63,86,14,127,63,223,15,127,63,103,17,127,63,237,18,127,63,112,20,127,63,242,21,127,63,115,23,127,63,241,24,127,63,110,26,127,63,233,27,127,63,98,29,127,63,217,30,127,63,78,32,127,63,194,33,127,63,52,35,127,63,164,36,127,63,18,38,127,63,127,39,127,63,234,40,127,63,83,42,127,63,186,43,127,63,32,45,127,63,131,46,127,63,230,47,127,63,70,49,127,63,165,50,127,63,2,52,127,63,93,53,127,63,182,54,127,63,14,56,127,63,100,57,127,63,185,58,127,63,12,60,127,63,93,61,127,63,172,62,127,63,250,63,127,63,70,65,127,63,145,66,127,63,217,67,127,63,33,69,127,63,102,70,127,63,170,71,127,63,236,72,127,63,45,74,127,63,108,75,127,63,169,76,127,63,229,77,127,63,31,79,127,63,88,80,127,63,143,81,127,63,196,82,127,63,248,83,127,63,42,85,127,63,91,86,127,63,138,87,127,63,184,88,127,63,228,89,127,63,14,91,127,63,55,92,127,63,94,93,127,63,132,94,127,63,169,95,127,63,203,96,127,63,237,97,127,63,12,99,127,63,42,100,127,63,71,101,127,63,98,102,127,63,124,103,127,63,148,104,127,63,171,105,127,63,192,106,127,63,212,107,127,63,230,108,127,63,247,109,127,63,6,111,127,63,20,112,127,63,33,113,127,63,44,114,127,63,53,115,127,63,61,116,127,63,68,117,127,63,73,118,127,63,77,119,127,63,79,120,127,63,80,121,127,63,80,122,127,63,78,123,127,63,75,124,127,63,70,125,127,63],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+20480);allocate([64,126,127,63,57,127,127,63,48,128,127,63,38,129,127,63,27,130,127,63,14,131,127,63,0,132,127,63,240,132,127,63,223,133,127,63,205,134,127,63,185,135,127,63,164,136,127,63,142,137,127,63,118,138,127,63,93,139,127,63,67,140,127,63,40,141,127,63,11,142,127,63,237,142,127,63,205,143,127,63,173,144,127,63,139,145,127,63,103,146,127,63,67,147,127,63,29,148,127,63,246,148,127,63,205,149,127,63,164,150,127,63,121,151,127,63,77,152,127,63,31,153,127,63,241,153,127,63,193,154,127,63,144,155,127,63,93,156,127,63,42,157,127,63,245,157,127,63,191,158,127,63,136,159,127,63,79,160,127,63,22,161,127,63,219,161,127,63,159,162,127,63,98,163,127,63,36,164,127,63,228,164,127,63,163,165,127,63,98,166,127,63,31,167,127,63,219,167,127,63,149,168,127,63,79,169,127,63,7,170,127,63,190,170,127,63,117,171,127,63,42,172,127,63,221,172,127,63,144,173,127,63,66,174,127,63,242,174,127,63,162,175,127,63,80,176,127,63,253,176,127,63,169,177,127,63,85,178,127,63,254,178,127,63,167,179,127,63,79,180,127,63,246,180,127,63,156,181,127,63,64,182,127,63,228,182,127,63,134,183,127,63,40,184,127,63,200,184,127,63,103,185,127,63,6,186,127,63,163,186,127,63,63,187,127,63,219,187,127,63,117,188,127,63,14,189,127,63,166,189,127,63,61,190,127,63,212,190,127,63,105,191,127,63,253,191,127,63,144,192,127,63,34,193,127,63,180,193,127,63,68,194,127,63,211,194,127,63,98,195,127,63,239,195,127,63,123,196,127,63,7,197,127,63,145,197,127,63,27,198,127,63,163,198,127,63,43,199,127,63,178,199,127,63,56,200,127,63,189,200,127,63,65,201,127,63,196,201,127,63,70,202,127,63,199,202,127,63,71,203,127,63,199,203,127,63,69,204,127,63,195,204,127,63,64,205,127,63,187,205,127,63,54,206,127,63,177,206,127,63,42,207,127,63,162,207,127,63,26,208,127,63,144,208,127,63,6,209,127,63,123,209,127,63,239,209,127,63,98,210,127,63,213,210,127,63,70,211,127,63,183,211,127,63,39,212,127,63,150,212,127,63,4,213,127,63,114,213,127,63,222,213,127,63,74,214,127,63,181,214,127,63,32,215,127,63,137,215,127,63,242,215,127,63,89,216,127,63,192,216,127,63,39,217,127,63,140,217,127,63,241,217,127,63,85,218,127,63,184,218,127,63,27,219,127,63,124,219,127,63,221,219,127,63,61,220,127,63,157,220,127,63,251,220,127,63,89,221,127,63,183,221,127,63,19,222,127,63,111,222,127,63,202,222,127,63,36,223,127,63,126,223,127,63,215,223,127,63,47,224,127,63,134,224,127,63,221,224,127,63,51,225,127,63,137,225,127,63,221,225,127,63,49,226,127,63,133,226,127,63,215,226,127,63,41,227,127,63,122,227,127,63,203,227,127,63,27,228,127,63,106,228,127,63,185,228,127,63,7,229,127,63,84,229,127,63,161,229,127,63,237,229,127,63,56,230,127,63,131,230,127,63,205,230,127,63,23,231,127,63,96,231,127,63,168,231,127,63,239,231,127,63,54,232,127,63,125,232,127,63,195,232,127,63,8,233,127,63,76,233,127,63,144,233,127,63,212,233,127,63,23,234,127,63,89,234,127,63,154,234,127,63,219,234,127,63,28,235,127,63,92,235,127,63,155,235,127,63,218,235,127,63,24,236,127,63,86,236,127,63,147,236,127,63,207,236,127,63,11,237,127,63,71,237,127,63,130,237,127,63,188,237,127,63,246,237,127,63,47,238,127,63,104,238,127,63,160,238,127,63,216,238,127,63,15,239,127,63,69,239,127,63,123,239,127,63,177,239,127,63,230,239,127,63,27,240,127,63,79,240,127,63,130,240,127,63,182,240,127,63,232,240,127,63,26,241,127,63,76,241,127,63,125,241,127,63,174,241,127,63,222,241,127,63,14,242,127,63,61,242,127,63,108,242,127,63,154,242,127,63,200,242,127,63,245,242,127,63,34,243,127,63,79,243,127,63,123,243,127,63,166,243,127,63,209,243,127,63,252,243,127,63,38,244,127,63,80,244,127,63,121,244,127,63,162,244,127,63,203,244,127,63,243,244,127,63,27,245,127,63,66,245,127,63,105,245,127,63,143,245,127,63,181,245,127,63,219,245,127,63,0,246,127,63,37,246,127,63,73,246,127,63,109,246,127,63,145,246,127,63,180,246,127,63,215,246,127,63,250,246,127,63,28,247,127,63,62,247,127,63,95,247,127,63,128,247,127,63,160,247,127,63,193,247,127,63,225,247,127,63,0,248,127,63,31,248,127,63,62,248,127,63,93,248,127,63,123,248,127,63,152,248,127,63,182,248,127,63,211,248,127,63,240,248,127,63,12,249,127,63,40,249,127,63,68,249,127,63,95,249,127,63,122,249,127,63,149,249,127,63,175,249,127,63,202,249,127,63,227,249,127,63,253,249,127,63,22,250,127,63,47,250,127,63,71,250,127,63,96,250,127,63,120,250,127,63,143,250,127,63,166,250,127,63,190,250,127,63,212,250,127,63,235,250,127,63,1,251,127,63,23,251,127,63,44,251,127,63,66,251,127,63,87,251,127,63,108,251,127,63,128,251,127,63,148,251,127,63,168,251,127,63,188,251,127,63,208,251,127,63,227,251,127,63,246,251,127,63,8,252,127,63,27,252,127,63,45,252,127,63,63,252,127,63,81,252,127,63,98,252,127,63,115,252,127,63,132,252,127,63,149,252,127,63,165,252,127,63,182,252,127,63,198,252,127,63,213,252,127,63,229,252,127,63,244,252,127,63,3,253,127,63,18,253,127,63,33,253,127,63,47,253,127,63,62,253,127,63,76,253,127,63,89,253,127,63,103,253,127,63,116,253,127,63,130,253,127,63,143,253,127,63,155,253,127,63,168,253,127,63,181,253,127,63,193,253,127,63,205,253,127,63,217,253,127,63,228,253,127,63,240,253,127,63,251,253,127,63,6,254,127,63,17,254,127,63,28,254,127,63,38,254,127,63,49,254,127,63,59,254,127,63,69,254,127,63,79,254,127,63,89,254,127,63,98,254,127,63,108,254,127,63,117,254,127,63,126,254,127,63,135,254,127,63,144,254,127,63,152,254,127,63,161,254,127,63,169,254,127,63,177,254,127,63,185,254,127,63,193,254,127,63,201,254,127,63,208,254,127,63,216,254,127,63,223,254,127,63,230,254,127,63,237,254,127,63,244,254,127,63,251,254,127,63,2,255,127,63,8,255,127,63,14,255,127,63,21,255,127,63,27,255,127,63,33,255,127,63,39,255,127,63,45,255,127,63,50,255,127,63,56,255,127,63,61,255,127,63,67,255,127,63,72,255,127,63,77,255,127,63,82,255,127,63,87,255,127,63,92,255,127,63,96,255,127,63,101,255,127,63,105,255,127,63,110,255,127,63,114,255,127,63,118,255,127,63,122,255,127,63,126,255,127,63,130,255,127,63,134,255,127,63,138,255,127,63,142,255,127,63,145,255,127,63,149,255,127,63,152,255,127,63,155,255,127,63,159,255,127,63,162,255,127,63,165,255,127,63,168,255,127,63,171,255,127,63,174,255,127,63,176,255,127,63,179,255,127,63,182,255,127,63,184,255,127,63,187,255,127,63,189,255,127,63,192,255,127,63,194,255,127,63,196,255,127,63,198,255,127,63,201,255,127,63,203,255,127,63,205,255,127,63,207,255,127,63,209,255,127,63,210,255,127,63,212,255,127,63,214,255,127,63,216,255,127,63,217,255,127,63,219,255,127,63,220,255,127,63,222,255,127,63,223,255,127,63,225,255,127,63,226,255,127,63,227,255,127,63,229,255,127,63,230,255,127,63,231,255,127,63,232,255,127,63,233,255,127,63,234,255,127,63,235,255,127,63,236,255,127,63,237,255,127,63,238,255,127,63,239,255,127,63,240,255,127,63,241,255,127,63,241,255,127,63,242,255,127,63,243,255,127,63,244,255,127,63,244,255,127,63,245,255,127,63,246,255,127,63,246,255,127,63,247,255,127,63,247,255,127,63,248,255,127,63,248,255,127,63,249,255,127,63,249,255,127,63,250,255,127,63,250,255,127,63,250,255,127,63,251,255,127,63,251,255,127,63,251,255,127,63,252,255,127,63,252,255,127,63,252,255,127,63,253,255,127,63,253,255,127,63,253,255,127,63,253,255,127,63,254,255,127,63,254,255,127,63,254,255,127,63,254,255,127,63,254,255,127,63,254,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,255,255,127,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,0,0,76,194,0,0,80,194,0,0,84,194,0,0,88,194,0,0,92,194,0,0,96,194,0,0,100,194,0,0,104,194,0,0,108,194,0,0,112,194,0,0,116,194,0,0,120,194,0,0,124,194,0,0,128,194,0,0,130,194,0,0,132,194,0,0,134,194,0,0,136,194,0,0,138,194,0,0,140,194,0,0,142,194,0,0,144,194,0,0,146,194,0,0,148,194,0,0,150,194,0,0,152,194,0,0,154,194,0,0,156,194,0,0,160,194,0,0,162,194,0,0,164,194,0,0,166,194,0,0,168,194,0,0,170,194,0,0,172,194,0,0,174,194,0,0,176,194,0,0,176,194,0,0,178,194,0,0,178,194,0,0,180,194,0,0,182,194,0,0,182,194,0,0,184,194,0,0,186,194,0,0,188,194,0,0,190,194,0,0,192,194,0,0,192,194,0,0,194,194,0,0,196,194,0,0,196,194,0,0,198,194,0,0,198,194,0,0,200,194,0,0,200,194,0,0,202,194,0,0,204,194,0,0,206,194,0,0,208,194,0,0,212,194,0,0,214,194,0,0,214,194,0,0,214,194,0,0,214,194,0,0,210,194,0,0,206,194,0,0,204,194,0,0,202,194,0,0,198,194,0,0,196,194,0,0,192,194,0,0,190,194,0,0,190,194,0,0,192,194,0,0,194,194,0,0,192,194,0,0,190,194,0,0,186,194,0,0,180,194,0,0,160,194,0,0,140,194,0,0,72,194,0,0,32,194,0,0,240,193,0,0,240,193,0,0,240,193,0,0,240,193,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,248,63,0,0,0,0,0,0,4,64,0,0,0,0,0,0,18,64,0,0,0,0,0,0,33,64,0,0,0,0,0,128,48,64,0,0,0,4,107,244,52,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,248,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,4,64,0,0,0,0,0,0,18,64,0,0,0,0,0,0,33,64,0,0,0,4,107,244,52,66,62,180,228,51,9,145,243,51,139,178,1,52,60,32,10,52,35,26,19,52,96,169,28,52,167,215,38,52,75,175,49,52,80,59,61,52,112,135,73,52,35,160,86,52,184,146,100,52,85,109,115,52,136,159,129,52,252,11,138,52,147,4,147,52,105,146,156,52,50,191,166,52,63,149,177,52,147,31,189,52,228,105,201,52,173,128,214,52,54,113,228,52,166,73,243,52,136,140,1,53,192,247,9,53,6,239,18,53,118,123,28,53,192,166,38,53,55,123,49,53,218,3,61,53,94,76,73,53,59,97,86,53,185,79,100,53,252,37,115,53,138,121,129,53,134,227,137,53,124,217,146,53,133,100,156,53,82,142,166,53,51,97,177,53,37,232,188,53,220,46,201,53,206,65,214,53,65,46,228,53,87,2,243,53,143,102,1,54,79,207,9,54,245,195,18,54,152,77,28,54,232,117,38,54,50,71,49,54,116,204,60,54,94,17,73,54,101,34,86,54,206,12,100,54,184,222,114,54,151,83,129,54,28,187,137,54,114,174,146,54,175,54,156,54,129,93,166,54,53,45,177,54,199,176,188,54,228,243,200,54,1,3,214,54,96,235,227,54,30,187,242,54,162,64,1,55,235,166,9,55,241,152,18,55,201,31,28,55,30,69,38,55,61,19,49,55,30,149,60,55,111,214,72,55,162,227,85,55,247,201,99,55,137,151,114,55,175,45,129,55,190,146,137,55,116,131,146,55,230,8,156,55,190,44,166,55,71,249,176,55,121,121,188,55,254,184,200,55,71,196,213,55,146,168,227,55,248,115,242,55,192,26,1,56,147,126,9,56,249,109,18,56,6,242,27,56,98,20,38,56,86,223,48,56,216,93,60,56,146,155,72,56,242,164,85,56,51,135,99,56,110,80,114,56,211,7,129,56,107,106,137,56,130,88,146,56,42,219,155,56,9,252,165,56,104,197,176,56,59,66,188,56,41,126,200,56,160,133,213,56,217,101,227,56,232,44,242,56,233,244,0,57,70,86,9,57,14,67,18,57,81,196,27,57,181,227,37,57,127,171,48,57,162,38,60,57,197,96,72,57,83,102,85,57,131,68,99,57,104,9,114,57,1,226,128,57,36,66,137,57,157,45,146,57,123,173,155,57,99,203,165,57,153,145,176,57,13,11,188,57,102,67,200,57,11,71,213,57,50,35,227,57,237,229,241,57,29,207,0,58,5,46,9,58,48,24,18,58,169,150,27,58,21,179,37,58,183,119,48,58,124,239,59,58,10,38,72,58,199,39,85,58,230,1,99,58,120,194,113,58,59,188,128,58,233,25,137,58,198,2,146,58,219,127,155,58,203,154,165,58,216,93,176,58,239,211,187,58,179,8,200,58,136,8,213,58,159,224,226,58,7,159,241,58,92,169,0,59,208,5,9,59,94,237,17,59,15,105,27,59,132,130,37,59,253,67,48,59,103,184,59,59,97,235,71,59,77,233,84,59,93,191,98,59,156,123,113,59,127,150,128,59,186,241,136,59,249,215,145,59,71,82,155,59,65,106,165,59,39,42,176,59,226,156,187,59,18,206,199,59,23,202,212,59,32,158,226,59,53,88,241,59,166,131,0,60,167,221,8,60,152,194,17,60,130,59,27,60,1,82,37,60,84,16,48,60,97,129,59,60,200,176,71,60,229,170,84,60,232,124,98,60,212,52,113,60,207,112,128,60,150,201,136,60,58,173,145,60,192,36,155,60,197,57,165,60,133,246,175,60,229,101,187,60,130,147,199,60,185,139,212,60,180,91,226,60,121,17,241,60,251,93,0,61,137,181,8,61,223,151,17,61,2,14,27,61,141,33,37,61,185,220,47,61,109,74,59,61,64,118,71,61,145,108,84,61,133,58,98,61,34,238,112,61,42,75,128,61,127,161,136,61,136,130,145,61,72,247,154,61,88,9,165,61,242,194,175,61,248,46,187,61,3,89,199,61,109,77,212,61,92,25,226,61,209,202,240,61,91,56,0,62,119,141,8,62,51,109,17,62,144,224,26,62,39,241,36,62,46,169,47,62,135,19,59,62,202,59,71,62,77,46,84,62,55,248,97,62,132,167,112,62,143,37,128,62,115,121,136,62,226,87,145,62,220,201,154,62,249,216,164,62,109,143,175,62,27,248,186,62,149,30,199,62,51,15,212,62,23,215,225,62,61,132,240,62,198,18,0,63,114,101,8,63,147,66,17,63,43,179,26,63,206,192,36,63,177,117,47,63,178,220,58,63,101,1,71,63,29,240,83,63,251,181,97,63,251,96,112,63,0,0,128,63,0,0,112,194,0,0,112,194,0,0,112,194,0,0,112,194,0,0,112,194,0,0,112,194,0,0,112,194,0,0,112,194,0,0,112,194,0,0,112,194,0,0,112,194,0,0,112,194,0,0,120,194,0,0,120,194,0,0,130,194,0,0,146,194,0,0,138,194,0,0,136,194,0,0,136,194,0,0,134,194,0,0,140,194,0,0,140,194,0,0,144,194,0,0,148,194,0,0,150,194,0,0,158,194,0,0,158,194,0,0,160,194,0,0,166,194,0,0,176,194,0,0,186,194,0,0,200,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,64,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,84,194,0,0,116,194,0,0,132,194,0,0,132,194,0,0,136,194,0,0,134,194,0,0,140,194,0,0,152,194,0,0,152,194,0,0,144,194,0,0,146,194,0,0,150,194,0,0,152,194,0,0,156,194,0,0,158,194,0,0,166,194,0,0,176,194,0,0,186,194,0,0,200,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,20,194,0,0,20,194,0,0,20,194,0,0,20,194,0,0,20,194,0,0,20,194,0,0,20,194,0,0,20,194,0,0,24,194,0,0,32,194,0,0,40,194,0,0,56,194,0,0,64,194,0,0,84,194,0,0,92,194,0,0,120,194,0,0,130,194,0,0,104,194,0,0,96,194,0,0,96,194,0,0,116,194,0,0,112,194,0,0,130,194,0,0,134,194,0,0,138,194,0,0,142,194,0,0,154,194,0,0,154,194,0,0,156,194,0,0,160,194,0,0,164,194,0,0,168,194,0,0,176,194,0,0,186,194,0,0,196,194,0,0,212,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,200,193,0,0,200,193,0,0,200,193,0,0,200,193,0,0,200,193,0,0,200,193,0,0,200,193,0,0,200,193,0,0,200,193,0,0,208,193,0,0,216,193,0,0,232,193,0,0,0,194,0,0,24,194,0,0,64,194,0,0,80,194,0,0,80,194,0,0,72,194,0,0,64,194,0,0,64,194,0,0,76,194,0,0,80,194,0,0,88,194,0,0,112,194,0,0,134,194,0,0,134,194,0,0,132,194,0,0,136,194,0,0,138,194,0,0,146,194,0,0,146,194,0,0,152,194,0,0,160,194,0,0,162,194,0,0,162,194,0,0,170,194,0,0,170,194,0,0,172,194,0,0,176,194,0,0,186,194,0,0,200,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,128,193,0,0,128,193,0,0,128,193,0,0,128,193,0,0,128,193,0,0,128,193,0,0,128,193,0,0,128,193,0,0,136,193,0,0,152,193,0,0,160,193,0,0,176,193,0,0,208,193,0,0,224,193,0,0,248,193,0,0,32,194,0,0,60,194,0,0,28,194,0,0,28,194,0,0,32,194,0,0,40,194,0,0,44,194,0,0,60,194,0,0,76,194,0,0,100,194,0,0,80,194,0,0,92,194,0,0,92,194,0,0,112,194,0,0,104,194,0,0,120,194,0,0,124,194,0,0,140,194,0,0,134,194,0,0,138,194,0,0,144,194,0,0,146,194,0,0,154,194,0,0,160,194,0,0,164,194,0,0,166,194,0,0,174,194,0,0,180,194,0,0,188,194,0,0,196,194,0,0,208,194,0,0,230,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,0,193,0,0,0,193,0,0,0,193,0,0,0,193,0,0,0,193,0,0,0,193,0,0,0,193,0,0,0,193,0,0,0,193,0,0,0,193,0,0,32,193,0,0,48,193,0,0,112,193,0,0,152,193,0,0,200,193,0,0,240,193,0,0,8,194,0,0,248,193,0,0,240,193,0,0,248,193,0,0,232,193,0,0,0,194,0,0,12,194,0,0,40,194,0,0,64,194,0,0,40,194,0,0,48,194,0,0,56,194,0,0,72,194,0,0,72,194,0,0,76,194,0,0,80,194,0,0,108,194,0,0,88,194,0,0,92,194,0,0,92,194,0,0,104,194,0,0,120,194,0,0,124,194,0,0,132,194,0,0,144,194,0,0,146,194,0,0,152,194,0,0,150,194,0,0,156,194,0,0,160,194,0,0,160,194,0,0,162,194,0,0,168,194,0,0,176,194,0,0,180,194,0,0,188,194,0,0,196,194,0,0,202,194,0,0,212,194,0,0,220,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,134,194,0,0,134,194,0,0,134,194,0,0,152,194,0,0,144,194,0,0,142,194,0,0,148,194,0,0,152,194,0,0,152,194,0,0,150,194,0,0,156,194,0,0,158,194,0,0,158,194,0,0,162,194,0,0,166,194,0,0,172,194,0,0,178,194,0,0,186,194,0,0,194,194,0,0,200,194,0,0,210,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,60,194,0,0,60,194,0,0,60,194,0,0,60,194,0,0,60,194,0,0,60,194,0,0,60,194,0,0,60,194,0,0,60,194,0,0,60,194,0,0,60,194,0,0,64,194,0,0,76,194,0,0,92,194,0,0,108,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,134,194,0,0,132,194,0,0,136,194,0,0,138,194,0,0,140,194,0,0,148,194,0,0,158,194,0,0,154,194,0,0,154,194,0,0,156,194,0,0,160,194,0,0,162,194,0,0,164,194,0,0,168,194,0,0,172,194,0,0,176,194,0,0,182,194,0,0,190,194,0,0,200,194,0,0,216,194,0,0,232,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,20,194,0,0,20,194,0,0,36,194,0,0,48,194,0,0,64,194,0,0,76,194,0,0,104,194,0,0,120,194,0,0,112,194,0,0,100,194,0,0,108,194,0,0,108,194,0,0,112,194,0,0,124,194,0,0,130,194,0,0,144,194,0,0,142,194,0,0,140,194,0,0,144,194,0,0,148,194,0,0,154,194,0,0,152,194,0,0,156,194,0,0,162,194,0,0,162,194,0,0,160,194,0,0,166,194,0,0,172,194,0,0,182,194,0,0,192,194,0,0,200,194,0,0,210,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,224,193,0,0,224,193,0,0,224,193,0,0,224,193,0,0,224,193,0,0,224,193,0,0,224,193,0,0,224,193,0,0,224,193,0,0,240,193,0,0,0,194,0,0,0,194,0,0,4,194,0,0,12,194,0,0,36,194,0,0,68,194,0,0,72,194,0,0,68,194,0,0,60,194,0,0,64,194,0,0,64,194,0,0,80,194,0,0,76,194,0,0,100,194,0,0,130,194,0,0,116,194,0,0,108,194,0,0,116,194,0,0,128,194,0,0,138,194,0,0,140,194,0,0,148,194,0,0,154,194,0,0,154,194,0,0,156,194,0,0,162,194,0,0,168,194,0,0,170,194,0,0,174,194,0,0,180,194,0,0,184,194,0,0,192,194,0,0,200,194,0,0,214,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,152,193,0,0,152,193,0,0,152,193,0,0,152,193,0,0,152,193,0,0,152,193,0,0,152,193,0,0,152,193,0,0,160,193,0,0,168,193,0,0,184,193,0,0,216,193,0,0,240,193,0,0,12,194,0,0,16,194,0,0,36,194,0,0,56,194,0,0,48,194,0,0,40,194,0,0,32,194,0,0,36,194,0,0,36,194,0,0,44,194,0,0,64,194,0,0,92,194,0,0,84,194,0,0,80,194,0,0,84,194,0,0,96,194,0,0,108,194,0,0,104,194,0,0,112,194,0,0,134,194,0,0,132,194,0,0,138,194,0,0,142,194,0,0,144,194,0,0,150,194,0,0,158,194,0,0,162,194,0,0,168,194,0,0,174,194,0,0,180,194,0,0,186,194,0,0,194,194,0,0,202,194,0,0,214,194,0,0,228,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,16,193,0,0,16,193,0,0,16,193,0,0,16,193,0,0,16,193,0,0,16,193,0,0,16,193,0,0,16,193,0,0,48,193,0,0,64,193,0,0,64,193,0,0,112,193,0,0,128,193,0,0,160,193,0,0,184,193,0,0,240,193,0,0,20,194,0,0,8,194,0,0,4,194,0,0,8,194,0,0,248,193,0,0,0,194,0,0,0,194,0,0,24,194,0,0,60,194,0,0,48,194,0,0,36,194,0,0,32,194,0,0,60,194,0,0,68,194,0,0,56,194,0,0,56,194,0,0,104,194,0,0,72,194,0,0,72,194,0,0,88,194,0,0,104,194,0,0,120,194,0,0,128,194,0,0,134,194,0,0,134,194,0,0,140,194,0,0,144,194,0,0,152,194,0,0,158,194,0,0,166,194,0,0,174,194,0,0,182,194,0,0,192,194,0,0,200,194,0,0,208,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,120,194,0,0,120,194,0,0,120,194,0,0,120,194,0,0,120,194,0,0,120,194,0,0,120,194,0,0,120,194,0,0,120,194,0,0,120,194,0,0,124,194,0,0,128,194,0,0,132,194,0,0,134,194,0,0,132,194,0,0,136,194,0,0,150,194,0,0,144,194,0,0,152,194,0,0,150,194,0,0,152,194,0,0,156,194,0,0,158,194,0,0,164,194,0,0,168,194,0,0,170,194,0,0,180,194,0,0,188,194,0,0,202,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,108,194,0,0,108,194,0,0,108,194,0,0,108,194,0,0,108,194,0,0,108,194,0,0,108,194,0,0,108,194,0,0,108,194,0,0,108,194,0,0,108,194,0,0,112,194,0,0,112,194,0,0,116,194,0,0,124,194,0,0,132,194,0,0,142,194,0,0,136,194,0,0,140,194,0,0,140,194,0,0,142,194,0,0,144,194,0,0,144,194,0,0,150,194,0,0,162,194,0,0,156,194,0,0,158,194,0,0,164,194,0,0,166,194,0,0,172,194,0,0,180,194,0,0,194,194,0,0,206,194,0,0,226,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,84,194,0,0,84,194,0,0,84,194,0,0,84,194,0,0,84,194,0,0,84,194,0,0,84,194,0,0,84,194,0,0,84,194,0,0,88,194,0,0,92,194,0,0,100,194,0,0,96,194,0,0,100,194,0,0,92,194,0,0,116,194,0,0,130,194,0,0,112,194,0,0,112,194,0,0,120,194,0,0,124,194,0,0,124,194,0,0,132,194,0,0,136,194,0,0,148,194,0,0,146,194,0,0,150,194,0,0,150,194,0,0,156,194,0,0,160,194,0,0,160,194,0,0,164,194,0,0,170,194,0,0,180,194,0,0,192,194,0,0,202,194,0,0,216,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,56,194,0,0,56,194,0,0,56,194,0,0,56,194,0,0,56,194,0,0,56,194,0,0,56,194,0,0,56,194,0,0,56,194,0,0,56,194,0,0,60,194,0,0,60,194,0,0,60,194,0,0,60,194,0,0,64,194,0,0,76,194,0,0,100,194,0,0,76,194,0,0,68,194,0,0,72,194,0,0,76,194,0,0,84,194,0,0,88,194,0,0,108,194,0,0,132,194,0,0,112,194,0,0,120,194,0,0,134,194,0,0,134,194,0,0,140,194,0,0,144,194,0,0,150,194,0,0,152,194,0,0,156,194,0,0,162,194,0,0,170,194,0,0,176,194,0,0,188,194,0,0,194,194,0,0,208,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,16,194,0,0,28,194,0,0,36,194,0,0,40,194,0,0,40,194,0,0,28,194,0,0,24,194,0,0,36,194,0,0,44,194,0,0,80,194,0,0,48,194,0,0,32,194,0,0,28,194,0,0,20,194,0,0,20,194,0,0,32,194,0,0,60,194,0,0,88,194,0,0,72,194,0,0,64,194,0,0,72,194,0,0,92,194,0,0,116,194,0,0,108,194,0,0,120,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,138,194,0,0,138,194,0,0,146,194,0,0,148,194,0,0,148,194,0,0,150,194,0,0,154,194,0,0,158,194,0,0,164,194,0,0,174,194,0,0,182,194,0,0,190,194,0,0,200,194,0,0,216,194,0,0,230,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,224,193,0,0,208,193,0,0,192,193,0,0,176,193,0,0,160,193,0,0,160,193,0,0,184,193,0,0,232,193,0,0,240,193,0,0,248,193,0,0,224,193,0,0,216,193,0,0,224,193,0,0,224,193,0,0,224,193,0,0,12,194,0,0,32,194,0,0,4,194,0,0,0,194,0,0,232,193,0,0,240,193,0,0,240,193,0,0,240,193,0,0,20,194,0,0,52,194,0,0,36,194,0,0,20,194,0,0,24,194,0,0,52,194,0,0,60,194,0,0,60,194,0,0,64,194,0,0,84,194,0,0,68,194,0,0,64,194,0,0,72,194,0,0,68,194,0,0,68,194,0,0,76,194,0,0,80,194,0,0,104,194,0,0,96,194,0,0,100,194,0,0,96,194,0,0,112,194,0,0,116,194,0,0,120,194,0,0,140,194,0,0,144,194,0,0,148,194,0,0,156,194,0,0,166,194,0,0,176,194,0,0,186,194,0,0,200,194,0,0,212,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,210,194,0,0,200,194,0,0,190,194,0,0,182,194,0,0,174,194,0,0,166,194,0,0,160,194,0,0,156,194,0,0,152,194,0,0,156,194,0,0,156,194,0,0,162,194,0,0,166,194,0,0,170,194,0,0,172,194,0,0,170,194,0,0,172,194,0,0,174,194,0,0,180,194,0,0,194,194,0,0,214,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,210,194,0,0,200,194,0,0,190,194,0,0,180,194,0,0,170,194,0,0,162,194,0,0,154,194,0,0,146,194,0,0,140,194,0,0,134,194,0,0,134,194,0,0,136,194,0,0,150,194,0,0,146,194,0,0,140,194,0,0,138,194,0,0,140,194,0,0,144,194,0,0,150,194,0,0,158,194,0,0,168,194,0,0,166,194,0,0,168,194,0,0,172,194,0,0,176,194,0,0,178,194,0,0,178,194,0,0,186,194,0,0,196,194,0,0,210,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,200,194,0,0,190,194,0,0,180,194,0,0,170,194,0,0,160,194,0,0,152,194,0,0,142,194,0,0,136,194,0,0,136,194,0,0,130,194,0,0,124,194,0,0,124,194,0,0,120,194,0,0,120,194,0,0,128,194,0,0,130,194,0,0,128,194,0,0,116,194,0,0,120,194,0,0,124,194,0,0,128,194,0,0,132,194,0,0,136,194,0,0,146,194,0,0,146,194,0,0,148,194,0,0,150,194,0,0,152,194,0,0,162,194,0,0,166,194,0,0,170,194,0,0,176,194,0,0,178,194,0,0,184,194,0,0,190,194,0,0,200,194,0,0,216,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,160,194,0,0,150,194,0,0,142,194,0,0,136,194,0,0,130,194,0,0,124,194,0,0,120,194,0,0,116,194,0,0,116,194,0,0,116,194,0,0,116,194,0,0,108,194,0,0,96,194,0,0,100,194,0,0,84,194,0,0,72,194,0,0,104,194,0,0,80,194,0,0,72,194,0,0,72,194,0,0,80,194,0,0,84,194,0,0,88,194,0,0,104,194,0,0,134,194,0,0,124,194,0,0,134,194,0,0,136,194,0,0,144,194,0,0,150,194,0,0,156,194,0,0,160,194,0,0,162,194,0,0,162,194,0,0,164,194,0,0,170,194,0,0,178,194,0,0,180,194,0,0,186,194,0,0,194,194,0,0,202,194,0,0,214,194,0,0,228,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,130,194,0,0,116,194,0,0,108,194,0,0,100,194,0,0,96,194,0,0,92,194,0,0,92,194,0,0,96,194,0,0,96,194,0,0,100,194,0,0,92,194,0,0,84,194,0,0,80,194,0,0,60,194,0,0,48,194,0,0,48,194,0,0,72,194,0,0,48,194,0,0,36,194,0,0,28,194,0,0,28,194,0,0,40,194,0,0,32,194,0,0,56,194,0,0,76,194,0,0,68,194,0,0,72,194,0,0,84,194,0,0,88,194,0,0,124,194,0,0,112,194,0,0,116,194,0,0,120,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,140,194,0,0,146,194,0,0,148,194,0,0,150,194,0,0,152,194,0,0,150,194,0,0,158,194,0,0,170,194,0,0,178,194,0,0,182,194,0,0,192,194,0,0,204,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,80,194,0,0,72,194,0,0,68,194,0,0,68,194,0,0,64,194,0,0,64,194,0,0,64,194,0,0,68,194,0,0,72,194,0,0,72,194,0,0,68,194,0,0,56,194,0,0,44,194,0,0,28,194,0,0,12,194,0,0,4,194,0,0,24,194,0,0,16,194,0,0,0,194,0,0,232,193,0,0,0,194,0,0,0,194,0,0,0,194,0,0,12,194,0,0,48,194,0,0,28,194,0,0,24,194,0,0,24,194,0,0,56,194,0,0,72,194,0,0,52,194,0,0,56,194,0,0,84,194,0,0,72,194,0,0,72,194,0,0,72,194,0,0,88,194,0,0,88,194,0,0,84,194,0,0,84,194,0,0,96,194,0,0,100,194,0,0,108,194,0,0,132,194,0,0,140,194,0,0,144,194,0,0,148,194,0,0,158,194,0,0,166,194,0,0,170,194,0,0,180,194,0,0,194,194,0,0,228,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,210,194,0,0,200,194,0,0,190,194,0,0,180,194,0,0,172,194,0,0,160,194,0,0,150,194,0,0,150,194,0,0,158,194,0,0,160,194,0,0,158,194,0,0,160,194,0,0,162,194,0,0,164,194,0,0,176,194,0,0,190,194,0,0,206,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,216,194,0,0,206,194,0,0,196,194,0,0,186,194,0,0,176,194,0,0,166,194,0,0,158,194,0,0,156,194,0,0,150,194,0,0,142,194,0,0,134,194,0,0,136,194,0,0,146,194,0,0,146,194,0,0,144,194,0,0,146,194,0,0,150,194,0,0,154,194,0,0,160,194,0,0,164,194,0,0,176,194,0,0,186,194,0,0,200,194,0,0,214,194,0,0,228,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,210,194,0,0,202,194,0,0,192,194,0,0,180,194,0,0,172,194,0,0,162,194,0,0,154,194,0,0,146,194,0,0,138,194,0,0,132,194,0,0,116,194,0,0,120,194,0,0,132,194,0,0,128,194,0,0,120,194,0,0,130,194,0,0,132,194,0,0,140,194,0,0,144,194,0,0,152,194,0,0,162,194,0,0,160,194,0,0,168,194,0,0,180,194,0,0,190,194,0,0,204,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,214,194,0,0,206,194,0,0,194,194,0,0,184,194,0,0,176,194,0,0,166,194,0,0,158,194,0,0,148,194,0,0,140,194,0,0,132,194,0,0,108,194,0,0,84,194,0,0,104,194,0,0,120,194,0,0,92,194,0,0,88,194,0,0,88,194,0,0,88,194,0,0,104,194,0,0,116,194,0,0,120,194,0,0,144,194,0,0,140,194,0,0,144,194,0,0,150,194,0,0,156,194,0,0,160,194,0,0,162,194,0,0,160,194,0,0,166,194,0,0,166,194,0,0,176,194,0,0,186,194,0,0,200,194,0,0,214,194,0,0,230,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,200,194,0,0,190,194,0,0,180,194,0,0,170,194,0,0,160,194,0,0,150,194,0,0,140,194,0,0,132,194,0,0,120,194,0,0,96,194,0,0,64,194,0,0,48,194,0,0,64,194,0,0,56,194,0,0,56,194,0,0,44,194,0,0,56,194,0,0,64,194,0,0,64,194,0,0,76,194,0,0,104,194,0,0,104,194,0,0,108,194,0,0,112,194,0,0,120,194,0,0,120,194,0,0,116,194,0,0,116,194,0,0,130,194,0,0,128,194,0,0,130,194,0,0,136,194,0,0,140,194,0,0,148,194,0,0,150,194,0,0,156,194,0,0,162,194,0,0,172,194,0,0,190,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,200,194,0,0,190,194,0,0,180,194,0,0,170,194,0,0,160,194,0,0,150,194,0,0,140,194,0,0,130,194,0,0,116,194,0,0,92,194,0,0,68,194,0,0,28,194,0,0,4,194,0,0,32,194,0,0,12,194,0,0,0,194,0,0,24,194,0,0,32,194,0,0,4,194,0,0,12,194,0,0,20,194,0,0,56,194,0,0,36,194,0,0,52,194,0,0,48,194,0,0,56,194,0,0,40,194],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+30720);allocate([0,0,52,194,0,0,56,194,0,0,80,194,0,0,72,194,0,0,72,194,0,0,72,194,0,0,88,194,0,0,88,194,0,0,92,194,0,0,100,194,0,0,120,194,0,0,128,194,0,0,132,194,0,0,136,194,0,0,140,194,0,0,152,194,0,0,162,194,0,0,180,194,0,0,200,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,196,194,0,0,180,194,0,0,170,194,0,0,164,194,0,0,166,194,0,0,160,194,0,0,156,194,0,0,168,194,0,0,158,194,0,0,160,194,0,0,166,194,0,0,174,194,0,0,178,194,0,0,182,194,0,0,186,194,0,0,198,194,0,0,212,194,0,0,234,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,196,194,0,0,180,194,0,0,170,194,0,0,160,194,0,0,150,194,0,0,140,194,0,0,136,194,0,0,148,194,0,0,144,194,0,0,148,194,0,0,154,194,0,0,160,194,0,0,164,194,0,0,170,194,0,0,174,194,0,0,184,194,0,0,178,194,0,0,182,194,0,0,190,194,0,0,200,194,0,0,212,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,196,194,0,0,180,194,0,0,166,194,0,0,150,194,0,0,142,194,0,0,124,194,0,0,128,194,0,0,134,194,0,0,120,194,0,0,128,194,0,0,134,194,0,0,140,194,0,0,146,194,0,0,154,194,0,0,162,194,0,0,168,194,0,0,166,194,0,0,170,194,0,0,178,194,0,0,180,194,0,0,186,194,0,0,196,194,0,0,208,194,0,0,218,194,0,0,228,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,206,194,0,0,192,194,0,0,176,194,0,0,162,194,0,0,150,194,0,0,136,194,0,0,104,194,0,0,88,194,0,0,96,194,0,0,88,194,0,0,96,194,0,0,96,194,0,0,104,194,0,0,112,194,0,0,124,194,0,0,132,194,0,0,148,194,0,0,138,194,0,0,144,194,0,0,144,194,0,0,150,194,0,0,148,194,0,0,154,194,0,0,162,194,0,0,162,194,0,0,164,194,0,0,168,194,0,0,174,194,0,0,186,194,0,0,192,194,0,0,198,194,0,0,208,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,216,194,0,0,204,194,0,0,192,194,0,0,182,194,0,0,170,194,0,0,160,194,0,0,148,194,0,0,136,194,0,0,112,194,0,0,76,194,0,0,56,194,0,0,64,194,0,0,56,194,0,0,44,194,0,0,52,194,0,0,60,194,0,0,60,194,0,0,68,194,0,0,64,194,0,0,96,194,0,0,84,194,0,0,92,194,0,0,104,194,0,0,100,194,0,0,124,194,0,0,104,194,0,0,112,194,0,0,132,194,0,0,128,194,0,0,134,194,0,0,140,194,0,0,140,194,0,0,148,194,0,0,154,194,0,0,168,194,0,0,172,194,0,0,178,194,0,0,182,194,0,0,186,194,0,0,188,194,0,0,202,194,0,0,218,194,0,0,236,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,216,194,0,0,206,194,0,0,196,194,0,0,186,194,0,0,176,194,0,0,166,194,0,0,156,194,0,0,146,194,0,0,136,194,0,0,112,194,0,0,84,194,0,0,48,194,0,0,12,194,0,0,24,194,0,0,24,194,0,0,8,194,0,0,8,194,0,0,16,194,0,0,32,194,0,0,36,194,0,0,48,194,0,0,76,194,0,0,52,194,0,0,56,194,0,0,60,194,0,0,56,194,0,0,88,194,0,0,72,194,0,0,68,194,0,0,72,194,0,0,72,194,0,0,72,194,0,0,76,194,0,0,88,194,0,0,100,194,0,0,104,194,0,0,112,194,0,0,132,194,0,0,132,194,0,0,132,194,0,0,128,194,0,0,130,194,0,0,136,194,0,0,154,194,0,0,164,194,0,0,174,194,0,0,190,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,214,194,0,0,204,194,0,0,194,194,0,0,184,194,0,0,174,194,0,0,166,194,0,0,156,194,0,0,150,194,0,0,164,194,0,0,158,194,0,0,166,194,0,0,170,194,0,0,178,194,0,0,184,194,0,0,190,194,0,0,196,194,0,0,202,194,0,0,210,194,0,0,218,194,0,0,226,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,212,194,0,0,200,194,0,0,190,194,0,0,180,194,0,0,172,194,0,0,162,194,0,0,156,194,0,0,148,194,0,0,138,194,0,0,148,194,0,0,148,194,0,0,152,194,0,0,158,194,0,0,166,194,0,0,168,194,0,0,172,194,0,0,178,194,0,0,184,194,0,0,194,194,0,0,186,194,0,0,200,194,0,0,206,194,0,0,214,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,212,194,0,0,200,194,0,0,190,194,0,0,180,194,0,0,174,194,0,0,166,194,0,0,160,194,0,0,150,194,0,0,138,194,0,0,112,194,0,0,132,194,0,0,132,194,0,0,136,194,0,0,140,194,0,0,148,194,0,0,156,194,0,0,158,194,0,0,162,194,0,0,162,194,0,0,166,194,0,0,168,194,0,0,174,194,0,0,186,194,0,0,192,194,0,0,198,194,0,0,206,194,0,0,214,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,216,194,0,0,206,194,0,0,196,194,0,0,186,194,0,0,178,194,0,0,170,194,0,0,164,194,0,0,156,194,0,0,142,194,0,0,120,194,0,0,92,194,0,0,104,194,0,0,104,194,0,0,88,194,0,0,88,194,0,0,92,194,0,0,108,194,0,0,116,194,0,0,120,194,0,0,140,194,0,0,132,194,0,0,132,194,0,0,134,194,0,0,140,194,0,0,144,194,0,0,150,194,0,0,156,194,0,0,168,194,0,0,168,194,0,0,168,194,0,0,176,194,0,0,182,194,0,0,180,194,0,0,190,194,0,0,196,194,0,0,204,194,0,0,206,194,0,0,212,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,216,194,0,0,206,194,0,0,196,194,0,0,188,194,0,0,180,194,0,0,174,194,0,0,164,194,0,0,158,194,0,0,146,194,0,0,134,194,0,0,104,194,0,0,60,194,0,0,72,194,0,0,52,194,0,0,36,194,0,0,52,194,0,0,64,194,0,0,48,194,0,0,48,194,0,0,68,194,0,0,88,194,0,0,76,194,0,0,64,194,0,0,60,194,0,0,68,194,0,0,72,194,0,0,76,194,0,0,100,194,0,0,104,194,0,0,112,194,0,0,124,194,0,0,138,194,0,0,140,194,0,0,138,194,0,0,142,194,0,0,148,194,0,0,156,194,0,0,164,194,0,0,180,194,0,0,190,194,0,0,202,194,0,0,210,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,202,194,0,0,194,194,0,0,186,194,0,0,180,194,0,0,170,194,0,0,160,194,0,0,154,194,0,0,144,194,0,0,130,194,0,0,96,194,0,0,64,194,0,0,20,194,0,0,32,194,0,0,16,194,0,0,8,194,0,0,32,194,0,0,72,194,0,0,60,194,0,0,24,194,0,0,36,194,0,0,60,194,0,0,24,194,0,0,12,194,0,0,28,194,0,0,24,194,0,0,44,194,0,0,32,194,0,0,52,194,0,0,72,194,0,0,52,194,0,0,48,194,0,0,60,194,0,0,72,194,0,0,92,194,0,0,64,194,0,0,64,194,0,0,80,194,0,0,132,194,0,0,140,194,0,0,152,194,0,0,164,194,0,0,180,194,0,0,194,194,0,0,210,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,216,194,0,0,206,194,0,0,196,194,0,0,186,194,0,0,172,194,0,0,158,194,0,0,152,194,0,0,166,194,0,0,162,194,0,0,170,194,0,0,174,194,0,0,178,194,0,0,186,194,0,0,196,194,0,0,204,194,0,0,214,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,216,194,0,0,206,194,0,0,196,194,0,0,186,194,0,0,172,194,0,0,158,194,0,0,142,194,0,0,154,194,0,0,148,194,0,0,154,194,0,0,158,194,0,0,162,194,0,0,168,194,0,0,170,194,0,0,180,194,0,0,184,194,0,0,186,194,0,0,184,194,0,0,196,194,0,0,202,194,0,0,216,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,216,194,0,0,206,194,0,0,196,194,0,0,186,194,0,0,174,194,0,0,156,194,0,0,136,194,0,0,130,194,0,0,132,194,0,0,120,194,0,0,130,194,0,0,134,194,0,0,140,194,0,0,146,194,0,0,150,194,0,0,156,194,0,0,164,194,0,0,164,194,0,0,166,194,0,0,168,194,0,0,182,194,0,0,186,194,0,0,196,194,0,0,204,194,0,0,212,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,200,194,0,0,190,194,0,0,180,194,0,0,164,194,0,0,148,194,0,0,120,194,0,0,100,194,0,0,104,194,0,0,96,194,0,0,76,194,0,0,80,194,0,0,80,194,0,0,88,194,0,0,88,194,0,0,104,194,0,0,132,194,0,0,108,194,0,0,112,194,0,0,124,194,0,0,132,194,0,0,138,194,0,0,146,194,0,0,158,194,0,0,166,194,0,0,168,194,0,0,160,194,0,0,162,194,0,0,162,194,0,0,164,194,0,0,176,194,0,0,184,194,0,0,196,194,0,0,210,194,0,0,226,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,214,194,0,0,204,194,0,0,194,194,0,0,184,194,0,0,168,194,0,0,158,194,0,0,138,194,0,0,100,194,0,0,60,194,0,0,80,194,0,0,60,194,0,0,48,194,0,0,52,194,0,0,72,194,0,0,80,194,0,0,40,194,0,0,40,194,0,0,84,194,0,0,44,194,0,0,44,194,0,0,64,194,0,0,76,194,0,0,96,194,0,0,92,194,0,0,80,194,0,0,100,194,0,0,108,194,0,0,116,194,0,0,120,194,0,0,134,194,0,0,142,194,0,0,156,194,0,0,166,194,0,0,172,194,0,0,188,194,0,0,196,194,0,0,206,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,200,194,0,0,190,194,0,0,180,194,0,0,168,194,0,0,156,194,0,0,140,194,0,0,116,194,0,0,76,194,0,0,36,194,0,0,32,194,0,0,24,194,0,0,32,194,0,0,56,194,0,0,80,194,0,0,76,194,0,0,36,194,0,0,32,194,0,0,56,194,0,0,32,194,0,0,24,194,0,0,24,194,0,0,36,194,0,0,56,194,0,0,36,194,0,0,56,194,0,0,60,194,0,0,44,194,0,0,44,194,0,0,52,194,0,0,36,194,0,0,52,194,0,0,96,194,0,0,134,194,0,0,136,194,0,0,166,194,0,0,174,194,0,0,180,194,0,0,190,194,0,0,204,194,0,0,214,194,0,0,226,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,218,194,0,0,210,194,0,0,202,194,0,0,192,194,0,0,182,194,0,0,168,194,0,0,154,194,0,0,164,194,0,0,164,194,0,0,170,194,0,0,178,194,0,0,188,194,0,0,200,194,0,0,212,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,212,194,0,0,206,194,0,0,196,194,0,0,184,194,0,0,170,194,0,0,160,194,0,0,142,194,0,0,150,194,0,0,144,194,0,0,152,194,0,0,160,194,0,0,168,194,0,0,172,194,0,0,178,194,0,0,186,194,0,0,200,194,0,0,214,194,0,0,226,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,214,194,0,0,208,194,0,0,202,194,0,0,194,194,0,0,184,194,0,0,176,194,0,0,168,194,0,0,160,194,0,0,128,194,0,0,132,194,0,0,124,194,0,0,128,194,0,0,132,194,0,0,138,194,0,0,146,194,0,0,154,194,0,0,166,194,0,0,166,194,0,0,172,194,0,0,182,194,0,0,196,194,0,0,208,194,0,0,222,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,214,194,0,0,208,194,0,0,202,194,0,0,194,194,0,0,184,194,0,0,180,194,0,0,168,194,0,0,148,194,0,0,100,194,0,0,104,194,0,0,80,194,0,0,92,194,0,0,88,194,0,0,72,194,0,0,80,194,0,0,72,194,0,0,80,194,0,0,124,194,0,0,120,194,0,0,138,194,0,0,152,194,0,0,154,194,0,0,156,194,0,0,156,194,0,0,158,194,0,0,164,194,0,0,176,194,0,0,188,194,0,0,200,194,0,0,212,194,0,0,222,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,212,194,0,0,204,194,0,0,196,194,0,0,190,194,0,0,180,194,0,0,170,194,0,0,166,194,0,0,156,194,0,0,140,194,0,0,72,194,0,0,72,194,0,0,36,194,0,0,48,194,0,0,68,194,0,0,60,194,0,0,72,194,0,0,72,194,0,0,48,194,0,0,92,194,0,0,56,194,0,0,60,194,0,0,64,194,0,0,64,194,0,0,88,194,0,0,68,194,0,0,68,194,0,0,104,194,0,0,120,194,0,0,142,194,0,0,162,194,0,0,174,194,0,0,184,194,0,0,194,194,0,0,204,194,0,0,216,194,0,0,228,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,212,194,0,0,204,194,0,0,196,194,0,0,190,194,0,0,180,194,0,0,170,194,0,0,166,194,0,0,156,194,0,0,140,194,0,0,52,194,0,0,44,194,0,0,36,194,0,0,60,194,0,0,72,194,0,0,76,194,0,0,72,194,0,0,68,194,0,0,52,194,0,0,60,194,0,0,36,194,0,0,48,194,0,0,36,194,0,0,28,194,0,0,44,194,0,0,24,194,0,0,20,194,0,0,32,194,0,0,36,194,0,0,48,194,0,0,72,194,0,0,104,194,0,0,130,194,0,0,146,194,0,0,158,194,0,0,170,194,0,0,184,194,0,0,194,194,0,0,202,194,0,0,210,194,0,0,218,194,0,0,226,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,214,194,0,0,200,194,0,0,190,194,0,0,174,194,0,0,162,194,0,0,170,194,0,0,166,194,0,0,176,194,0,0,186,194,0,0,200,194,0,0,214,194,0,0,228,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,214,194,0,0,202,194,0,0,190,194,0,0,176,194,0,0,166,194,0,0,152,194,0,0,146,194,0,0,144,194,0,0,158,194,0,0,168,194,0,0,180,194,0,0,190,194,0,0,200,194,0,0,210,194,0,0,220,194,0,0,230,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,208,194,0,0,196,194,0,0,184,194,0,0,174,194,0,0,162,194,0,0,140,194,0,0,130,194,0,0,120,194,0,0,134,194,0,0,142,194,0,0,148,194,0,0,160,194,0,0,170,194,0,0,182,194,0,0,190,194,0,0,198,194,0,0,206,194,0,0,216,194,0,0,222,194,0,0,228,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,206,194,0,0,194,194,0,0,180,194,0,0,170,194,0,0,152,194,0,0,112,194,0,0,96,194,0,0,88,194,0,0,112,194,0,0,120,194,0,0,116,194,0,0,96,194,0,0,124,194,0,0,130,194,0,0,146,194,0,0,148,194,0,0,154,194,0,0,150,194,0,0,156,194,0,0,162,194,0,0,172,194,0,0,174,194,0,0,176,194,0,0,182,194,0,0,188,194,0,0,196,194,0,0,206,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,200,194,0,0,194,194,0,0,184,194,0,0,172,194,0,0,162,194,0,0,158,194,0,0,140,194,0,0,100,194,0,0,76,194,0,0,60,194,0,0,76,194,0,0,104,194,0,0,112,194,0,0,96,194,0,0,84,194,0,0,72,194,0,0,104,194,0,0,80,194,0,0,72,194,0,0,72,194,0,0,84,194,0,0,92,194,0,0,128,194,0,0,138,194,0,0,142,194,0,0,170,194,0,0,164,194,0,0,156,194,0,0,162,194,0,0,170,194,0,0,190,194,0,0,204,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,200,194,0,0,194,194,0,0,184,194,0,0,170,194,0,0,166,194,0,0,158,194,0,0,144,194,0,0,68,194,0,0,32,194,0,0,44,194,0,0,44,194,0,0,88,194,0,0,96,194,0,0,76,194,0,0,72,194,0,0,32,194,0,0,44,194,0,0,24,194,0,0,16,194,0,0,12,194,0,0,20,194,0,0,24,194,0,0,20,194,0,0,48,194,0,0,88,194,0,0,112,194,0,0,100,194,0,0,112,194,0,0,140,194,0,0,150,194,0,0,168,194,0,0,184,194,0,0,206,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,204,194,0,0,190,194,0,0,178,194,0,0,164,194,0,0,166,194,0,0,168,194,0,0,180,194,0,0,184,194,0,0,198,194,0,0,214,194,0,0,226,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,214,194,0,0,202,194,0,0,190,194,0,0,178,194,0,0,166,194,0,0,144,194,0,0,148,194,0,0,156,194,0,0,170,194,0,0,176,194,0,0,176,194,0,0,180,194,0,0,184,194,0,0,196,194,0,0,210,194,0,0,222,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,218,194,0,0,206,194,0,0,194,194,0,0,186,194,0,0,174,194,0,0,162,194,0,0,140,194,0,0,140,194,0,0,134,194,0,0,150,194,0,0,146,194,0,0,152,194,0,0,158,194,0,0,162,194,0,0,166,194,0,0,176,194,0,0,178,194,0,0,194,194,0,0,206,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,214,194,0,0,200,194,0,0,188,194,0,0,176,194,0,0,166,194,0,0,150,194,0,0,124,194,0,0,108,194,0,0,108,194,0,0,124,194,0,0,132,194,0,0,112,194,0,0,120,194,0,0,134,194,0,0,134,194,0,0,154,194,0,0,152,194,0,0,162,194,0,0,176,194,0,0,172,194,0,0,184,194,0,0,192,194,0,0,204,194,0,0,218,194,0,0,232,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,196,194,0,0,184,194,0,0,172,194,0,0,162,194,0,0,146,194,0,0,96,194,0,0,80,194,0,0,60,194,0,0,92,194,0,0,112,194,0,0,104,194,0,0,80,194,0,0,76,194,0,0,52,194,0,0,68,194,0,0,72,194,0,0,84,194,0,0,88,194,0,0,116,194,0,0,142,194,0,0,140,194,0,0,138,194,0,0,156,194,0,0,158,194,0,0,174,194,0,0,180,194,0,0,192,194,0,0,208,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,206,194,0,0,192,194,0,0,180,194,0,0,172,194,0,0,156,194,0,0,140,194,0,0,76,194,0,0,40,194,0,0,60,194,0,0,64,194,0,0,92,194,0,0,88,194,0,0,88,194,0,0,84,194,0,0,40,194,0,0,12,194,0,0,224,193,0,0,4,194,0,0,24,194,0,0,20,194,0,0,48,194,0,0,60,194,0,0,68,194,0,0,88,194,0,0,124,194,0,0,136,194,0,0,156,194,0,0,164,194,0,0,178,194,0,0,188,194,0,0,198,194,0,0,208,194,0,0,218,194,0,0,228,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,200,194,0,0,180,194,0,0,158,194,0,0,170,194,0,0,162,194,0,0,164,194,0,0,164,194,0,0,178,194,0,0,188,194,0,0,198,194,0,0,206,194,0,0,218,194,0,0,230,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,194,194,0,0,170,194,0,0,144,194,0,0,148,194,0,0,140,194,0,0,140,194,0,0,140,194,0,0,152,194,0,0,170,194,0,0,182,194,0,0,186,194,0,0,194,194,0,0,206,194,0,0,218,194,0,0,230,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,224,194,0,0,186,194,0,0,162,194,0,0,136,194,0,0,120,194,0,0,112,194,0,0,112,194,0,0,100,194,0,0,124,194,0,0,140,194,0,0,154,194,0,0,164,194,0,0,180,194,0,0,186,194,0,0,196,194,0,0,208,194,0,0,218,194,0,0,226,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,226,194,0,0,200,194,0,0,186,194,0,0,168,194,0,0,124,194,0,0,104,194,0,0,64,194,0,0,84,194,0,0,88,194,0,0,80,194,0,0,80,194,0,0,100,194,0,0,128,194,0,0,132,194,0,0,152,194,0,0,166,194,0,0,162,194,0,0,170,194,0,0,170,194,0,0,180,194,0,0,190,194,0,0,196,194,0,0,202,194,0,0,206,194,0,0,212,194,0,0,216,194,0,0,222,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,210,194,0,0,190,194,0,0,172,194,0,0,148,194,0,0,84,194,0,0,72,194,0,0,24,194,0,0,44,194,0,0,68,194,0,0,44,194,0,0,40,194,0,0,28,194,0,0,28,194,0,0,56,194,0,0,80,194,0,0,100,194,0,0,96,194,0,0,144,194,0,0,138,194,0,0,148,194,0,0,162,194,0,0,174,194,0,0,184,194,0,0,188,194,0,0,194,194,0,0,198,194,0,0,204,194,0,0,210,194,0,0,216,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,216,194,0,0,198,194,0,0,180,194,0,0,152,194,0,0,132,194,0,0,52,194,0,0,44,194,0,0,36,194,0,0,48,194,0,0,60,194,0,0,44,194,0,0,60,194,0,0,32,194,0,0,240,193,0,0,248,193,0,0,248,193,0,0,28,194,0,0,4,194,0,0,32,194,0,0,36,194,0,0,44,194,0,0,84,194,0,0,108,194,0,0,140,194,0,0,146,194,0,0,154,194,0,0,158,194,0,0,164,194,0,0,168,194,0,0,174,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,182,194,0,0,152,194,0,0,150,194,0,0,170,194,0,0,186,194,0,0,196,194,0,0,208,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,182,194,0,0,140,194,0,0,140,194,0,0,150,194,0,0,172,194,0,0,178,194,0,0,188,194,0,0,196,194,0,0,202,194,0,0,212,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,190,194,0,0,160,194,0,0,112,194,0,0,130,194,0,0,128,194,0,0,148,194,0,0,166,194,0,0,176,194,0,0,182,194,0,0,190,194,0,0,198,194,0,0,206,194,0,0,214,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,190,194],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+40960);allocate([0,0,160,194,0,0,104,194,0,0,92,194,0,0,68,194,0,0,132,194,0,0,136,194,0,0,142,194,0,0,156,194,0,0,156,194,0,0,160,194,0,0,176,194,0,0,170,194,0,0,178,194,0,0,194,194,0,0,200,194,0,0,210,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,190,194,0,0,160,194,0,0,84,194,0,0,80,194,0,0,36,194,0,0,108,194,0,0,108,194,0,0,68,194,0,0,104,194,0,0,96,194,0,0,124,194,0,0,172,194,0,0,158,194,0,0,180,194,0,0,186,194,0,0,196,194,0,0,206,194,0,0,214,194,0,0,224,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,194,194,0,0,182,194,0,0,146,194,0,0,52,194,0,0,32,194,0,0,4,194,0,0,84,194,0,0,116,194,0,0,68,194,0,0,88,194,0,0,72,194,0,0,72,194,0,0,112,194,0,0,80,194,0,0,134,194,0,0,148,194,0,0,162,194,0,0,184,194,0,0,192,194,0,0,200,194,0,0,210,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,226,194,0,0,212,194,0,0,198,194,0,0,184,194,0,0,154,194,0,0,160,194,0,0,176,194,0,0,194,194,0,0,212,194,0,0,230,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,232,194,0,0,218,194,0,0,204,194,0,0,190,194,0,0,178,194,0,0,148,194,0,0,144,194,0,0,176,194,0,0,174,194,0,0,190,194,0,0,204,194,0,0,218,194,0,0,232,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,232,194,0,0,218,194,0,0,204,194,0,0,190,194,0,0,178,194,0,0,150,194,0,0,132,194,0,0,148,194,0,0,154,194,0,0,156,194,0,0,172,194,0,0,174,194,0,0,180,194,0,0,192,194,0,0,210,194,0,0,230,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,230,194,0,0,216,194,0,0,202,194,0,0,188,194,0,0,176,194,0,0,132,194,0,0,96,194,0,0,116,194,0,0,140,194,0,0,130,194,0,0,156,194,0,0,144,194,0,0,166,194,0,0,168,194,0,0,186,194,0,0,196,194,0,0,210,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,210,194,0,0,190,194,0,0,178,194,0,0,164,194,0,0,100,194,0,0,80,194,0,0,80,194,0,0,108,194,0,0,96,194,0,0,108,194,0,0,104,194,0,0,138,194,0,0,134,194,0,0,176,194,0,0,164,194,0,0,164,194,0,0,178,194,0,0,188,194,0,0,200,194,0,0,216,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,202,194,0,0,192,194,0,0,180,194,0,0,166,194,0,0,154,194,0,0,88,194,0,0,44,194,0,0,24,194,0,0,72,194,0,0,64,194,0,0,80,194,0,0,64,194,0,0,40,194,0,0,40,194,0,0,76,194,0,0,80,194,0,0,84,194,0,0,108,194,0,0,130,194,0,0,142,194,0,0,156,194,0,0,170,194,0,0,190,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,240,194,0,0,210,194,0,0,172,194,0,0,136,194,0,0,156,194,0,0,158,194,0,0,180,194,0,0,200,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,240,194,0,0,210,194,0,0,172,194,0,0,132,194,0,0,146,194,0,0,154,194,0,0,176,194,0,0,192,194,0,0,210,194,0,0,230,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,240,194,0,0,210,194,0,0,184,194,0,0,160,194,0,0,116,194,0,0,128,194,0,0,136,194,0,0,160,194,0,0,174,194,0,0,184,194,0,0,200,194,0,0,220,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,240,194,0,0,208,194,0,0,182,194,0,0,158,194,0,0,80,194,0,0,112,194,0,0,88,194,0,0,128,194,0,0,138,194,0,0,154,194,0,0,160,194,0,0,164,194,0,0,168,194,0,0,170,194,0,0,174,194,0,0,176,194,0,0,180,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,236,194,0,0,200,194,0,0,174,194,0,0,154,194,0,0,68,194,0,0,72,194,0,0,48,194,0,0,104,194,0,0,116,194,0,0,116,194,0,0,134,194,0,0,130,194,0,0,120,194,0,0,120,194,0,0,120,194,0,0,130,194,0,0,136,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,230,194,0,0,196,194,0,0,168,194,0,0,120,194,0,0,68,194,0,0,48,194,0,0,24,194,0,0,56,194,0,0,68,194,0,0,68,194,0,0,56,194,0,0,28,194,0,0,20,194,0,0,28,194,0,0,32,194,0,0,40,194,0,0,44,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,176,194,0,0,148,194,0,0,154,194,0,0,164,194,0,0,164,194,0,0,170,194,0,0,180,194,0,0,188,194,0,0,198,194,0,0,208,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,176,194,0,0,132,194,0,0,140,194,0,0,162,194,0,0,160,194,0,0,162,194,0,0,168,194,0,0,176,194,0,0,182,194,0,0,186,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,176,194,0,0,116,194,0,0,124,194,0,0,140,194,0,0,142,194,0,0,148,194,0,0,154,194,0,0,160,194,0,0,166,194,0,0,170,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,172,194,0,0,120,194,0,0,124,194,0,0,120,194,0,0,120,194,0,0,104,194,0,0,80,194,0,0,72,194,0,0,72,194,0,0,80,194,0,0,88,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,236,194,0,0,216,194,0,0,168,194,0,0,84,194,0,0,72,194,0,0,72,194,0,0,72,194,0,0,92,194,0,0,60,194,0,0,52,194,0,0,32,194,0,0,32,194,0,0,32,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,236,194,0,0,200,194,0,0,146,194,0,0,44,194,0,0,20,194,0,0,40,194,0,0,44,194,0,0,84,194,0,0,24,194,0,0,20,194,0,0,12,194,0,0,12,194,0,0,24,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,200,194,0,0,182,194,0,0,168,194,0,0,148,194,0,0,160,194,0,0,160,194,0,0,160,194,0,0,160,194,0,0,160,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,200,194,0,0,182,194,0,0,168,194,0,0,148,194,0,0,136,194,0,0,136,194,0,0,136,194,0,0,136,194,0,0,136,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,200,194,0,0,172,194,0,0,156,194,0,0,140,194,0,0,112,194,0,0,52,194,0,0,240,193,0,0,168,193,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,200,194,0,0,174,194,0,0,156,194,0,0,134,194,0,0,64,194,0,0,24,194,0,0,232,193,0,0,168,193,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,200,194,0,0,172,194,0,0,138,194,0,0,96,194,0,0,52,194,0,0,12,194,0,0,4,194,0,0,232,193,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,0,220,194,0,0,200,194,0,0,166,194,0,0,142,194,0,0,64,194,0,0,216,193,0,0,24,194,0,0,20,194,0,0,8,194,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,0,192,121,196,118,111,114,98,105,115,0,0,102,0,0,0,102,0,0,0,103,0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,102,0,0,0,0,0,0,0,62,180,228,51,9,145,243,51,139,178,1,52,60,32,10,52,35,26,19,52,96,169,28,52,167,215,38,52,75,175,49,52,80,59,61,52,112,135,73,52,35,160,86,52,184,146,100,52,85,109,115,52,136,159,129,52,252,11,138,52,147,4,147,52,105,146,156,52,50,191,166,52,63,149,177,52,147,31,189,52,228,105,201,52,173,128,214,52,54,113,228,52,166,73,243,52,136,140,1,53,192,247,9,53,6,239,18,53,118,123,28,53,192,166,38,53,55,123,49,53,218,3,61,53,94,76,73,53,59,97,86,53,185,79,100,53,252,37,115,53,138,121,129,53,134,227,137,53,124,217,146,53,133,100,156,53,82,142,166,53,51,97,177,53,37,232,188,53,220,46,201,53,206,65,214,53,65,46,228,53,87,2,243,53,143,102,1,54,79,207,9,54,245,195,18,54,152,77,28,54,232,117,38,54,50,71,49,54,116,204,60,54,94,17,73,54,101,34,86,54,206,12,100,54,184,222,114,54,151,83,129,54,28,187,137,54,114,174,146,54,175,54,156,54,129,93,166,54,53,45,177,54,199,176,188,54,228,243,200,54,1,3,214,54,96,235,227,54,30,187,242,54,162,64,1,55,235,166,9,55,241,152,18,55,201,31,28,55,30,69,38,55,61,19,49,55,30,149,60,55,111,214,72,55,162,227,85,55,247,201,99,55,137,151,114,55,175,45,129,55,190,146,137,55,116,131,146,55,230,8,156,55,190,44,166,55,71,249,176,55,121,121,188,55,254,184,200,55,71,196,213,55,146,168,227,55,248,115,242,55,192,26,1,56,147,126,9,56,249,109,18,56,6,242,27,56,98,20,38,56,86,223,48,56,216,93,60,56,146,155,72,56,242,164,85,56,51,135,99,56,110,80,114,56,211,7,129,56,107,106,137,56,130,88,146,56,42,219,155,56,9,252,165,56,104,197,176,56,59,66,188,56,41,126,200,56,160,133,213,56,217,101,227,56,232,44,242,56,233,244,0,57,70,86,9,57,14,67,18,57,81,196,27,57,181,227,37,57,127,171,48,57,162,38,60,57,197,96,72,57,83,102,85,57,131,68,99,57,104,9,114,57,1,226,128,57,36,66,137,57,157,45,146,57,123,173,155,57,99,203,165,57,153,145,176,57,13,11,188,57,102,67,200,57,11,71,213,57,50,35,227,57,237,229,241,57,29,207,0,58,5,46,9,58,48,24,18,58,169,150,27,58,21,179,37,58,183,119,48,58,124,239,59,58,10,38,72,58,199,39,85,58,230,1,99,58,120,194,113,58,59,188,128,58,233,25,137,58,198,2,146,58,219,127,155,58,203,154,165,58,216,93,176,58,239,211,187,58,179,8,200,58,136,8,213,58,159,224,226,58,7,159,241,58,92,169,0,59,208,5,9,59,94,237,17,59,15,105,27,59,132,130,37,59,253,67,48,59,103,184,59,59,97,235,71,59,77,233,84,59,93,191,98,59,156,123,113,59,127,150,128,59,186,241,136,59,249,215,145,59,71,82,155,59,65,106,165,59,39,42,176,59,226,156,187,59,18,206,199,59,23,202,212,59,32,158,226,59,53,88,241,59,166,131,0,60,167,221,8,60,152,194,17,60,130,59,27,60,1,82,37,60,84,16,48,60,97,129,59,60,200,176,71,60,229,170,84,60,232,124,98,60,212,52,113,60,207,112,128,60,150,201,136,60,58,173,145,60,192,36,155,60,197,57,165,60,133,246,175,60,229,101,187,60,130,147,199,60,185,139,212,60,180,91,226,60,121,17,241,60,251,93,0,61,137,181,8,61,223,151,17,61,2,14,27,61,141,33,37,61,185,220,47,61,109,74,59,61,64,118,71,61,145,108,84,61,133,58,98,61,34,238,112,61,42,75,128,61,127,161,136,61,136,130,145,61,72,247,154,61,88,9,165,61,242,194,175,61,248,46,187,61,3,89,199,61,109,77,212,61,92,25,226,61,209,202,240,61,91,56,0,62,119,141,8,62,51,109,17,62,144,224,26,62,39,241,36,62,46,169,47,62,135,19,59,62,202,59,71,62,77,46,84,62,55,248,97,62,132,167,112,62,143,37,128,62,115,121,136,62,226,87,145,62,220,201,154,62,249,216,164,62,109,143,175,62,27,248,186,62,149,30,199,62,51,15,212,62,23,215,225,62,61,132,240,62,198,18,0,63,114,101,8,63,147,66,17,63,43,179,26,63,206,192,36,63,177,117,47,63,178,220,58,63,101,1,71,63,29,240,83,63,251,181,97,63,251,96,112,63,0,0,128,63,0,0,0,0,105,0,0,0,106,0,0,0,104,0,0,0,105,0,0,0,107,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,108,0,0,0,109,0,0,0,106,0,0,0,107,0,0,0,0,0,0,0,0,0,0,0,102,0,0,0,103,0,0,0,108,0,0,0,109,0,0,0,106,0,0,0,107,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+51200);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);function copyTempFloat(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3]}function copyTempDouble(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3];HEAP8[tempDoublePtr+4]=HEAP8[ptr+4];HEAP8[tempDoublePtr+5]=HEAP8[ptr+5];HEAP8[tempDoublePtr+6]=HEAP8[ptr+6];HEAP8[tempDoublePtr+7]=HEAP8[ptr+7]}function _rint(x){if(Math.abs(x%1)!==.5)return Math.round(x);return x+x%2+(x<0?1:-1)}function _rintf(){return _rint.apply(null,arguments)}function _fabsf(){return Math_abs.apply(null,arguments)}var ___errno_state=0;function ___setErrNo(value){HEAP32[___errno_state>>2]=value;return value}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(name){switch(name){case 30:return PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 79:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1}}___setErrNo(ERRNO_CODES.EINVAL);return-1}function _atan(){return Math_atan.apply(null,arguments)}Module["_memset"]=_memset;function _ceil(){return Math_ceil.apply(null,arguments)}Module["_bitshift64Shl"]=_bitshift64Shl;function _abort(){Module["abort"]()}Module["_i64Subtract"]=_i64Subtract;Module["_strlen"]=_strlen;function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;function _log(){return Math_log.apply(null,arguments)}function _cos(){return Math_cos.apply(null,arguments)}Module["_i64Add"]=_i64Add;function _sbrk(bytes){var self=_sbrk;if(!self.called){DYNAMICTOP=alignMemoryPage(DYNAMICTOP);self.called=true;assert(Runtime.dynamicAlloc);self.alloc=Runtime.dynamicAlloc;Runtime.dynamicAlloc=(function(){abort("cannot dynamically allocate, sbrk now has control")})}var ret=DYNAMICTOP;if(bytes!=0)self.alloc(bytes);return ret}function _floor(){return Math_floor.apply(null,arguments)}function ___errno_location(){return ___errno_state}var _BItoD=true;function _sqrt(){return Math_sqrt.apply(null,arguments)}var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};var TTY={ttys:[],init:(function(){}),shutdown:(function(){}),register:(function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)}),stream_ops:{open:(function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}stream.tty=tty;stream.seekable=false}),close:(function(stream){if(stream.tty.output.length){stream.tty.ops.put_char(stream.tty,10)}}),read:(function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(ERRNO_CODES.ENXIO)}var bytesRead=0;for(var i=0;inode.contents.length){node.contents=MEMFS.getFileDataAsRegularArray(node);node.usedBytes=node.contents.length}if(!node.contents||node.contents.subarray){var prevCapacity=node.contents?node.contents.buffer.byteLength:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return}if(!node.contents&&newCapacity>0)node.contents=[];while(node.contents.lengthnewSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++}}));var remove=[];Object.keys(dst.entries).forEach((function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}}));if(!total){return callback(null)}var errored=false;var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=(function(){done(this.error)});create.sort().forEach((function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)}))}else{IDBFS.loadLocalEntry(path,(function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)}))}}));remove.sort().reverse().forEach((function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}}))})};var NODEFS={isWindows:false,staticInit:(function(){NODEFS.isWindows=!!process.platform.match(/^win/)}),mount:(function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)}),createNode:(function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node}),getMode:(function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&146)>>1}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return stat.mode}),realPath:(function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)}),flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:(function(flags){if(flags in NODEFS.flagsToPermissionStringMap){return NODEFS.flagsToPermissionStringMap[flags]}else{return flags}}),node_ops:{getattr:(function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}}),setattr:(function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),lookup:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)}),mknod:(function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return node}),rename:(function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),unlink:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),rmdir:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readdir:(function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),symlink:(function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readlink:(function(node){var path=NODEFS.realPath(node);try{return fs.readlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}})},stream_ops:{open:(function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsToPermissionString(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),close:(function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),read:(function(stream,buffer,offset,length,position){var nbuffer=new Buffer(length);var res;try{res=fs.readSync(stream.nfd,nbuffer,0,length,position)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(res>0){for(var i=0;i8){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}var parts=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}}}return{path:current_path,node:current}}),getPath:(function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}}),hashName:(function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length}),hashAddNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node}),hashRemoveNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}}),lookupNode:(function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)}),createNode:(function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=(function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev});FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:(function(){return(this.mode&readMode)===readMode}),set:(function(val){val?this.mode|=readMode:this.mode&=~readMode})},write:{get:(function(){return(this.mode&writeMode)===writeMode}),set:(function(val){val?this.mode|=writeMode:this.mode&=~writeMode})},isFolder:{get:(function(){return FS.isDir(this.mode)})},isDevice:{get:(function(){return FS.isChrdev(this.mode)})}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node}),destroyNode:(function(node){FS.hashRemoveNode(node)}),isRoot:(function(node){return node===node.parent}),isMountpoint:(function(node){return!!node.mounted}),isFile:(function(mode){return(mode&61440)===32768}),isDir:(function(mode){return(mode&61440)===16384}),isLink:(function(mode){return(mode&61440)===40960}),isChrdev:(function(mode){return(mode&61440)===8192}),isBlkdev:(function(mode){return(mode&61440)===24576}),isFIFO:(function(mode){return(mode&61440)===4096}),isSocket:(function(mode){return(mode&49152)===49152}),flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:(function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags}),flagsToPermissionString:(function(flag){var accmode=flag&2097155;var perms=["r","w","rw"][accmode];if(flag&512){perms+="w"}return perms}),nodePermissions:(function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return ERRNO_CODES.EACCES}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return ERRNO_CODES.EACCES}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return ERRNO_CODES.EACCES}return 0}),mayLookup:(function(dir){return FS.nodePermissions(dir,"x")}),mayCreate:(function(dir,name){try{var node=FS.lookupNode(dir,name);return ERRNO_CODES.EEXIST}catch(e){}return FS.nodePermissions(dir,"wx")}),mayDelete:(function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return ERRNO_CODES.ENOTDIR}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return ERRNO_CODES.EBUSY}}else{if(FS.isDir(node.mode)){return ERRNO_CODES.EISDIR}}return 0}),mayOpen:(function(node,flags){if(!node){return ERRNO_CODES.ENOENT}if(FS.isLink(node.mode)){return ERRNO_CODES.ELOOP}else if(FS.isDir(node.mode)){if((flags&2097155)!==0||flags&512){return ERRNO_CODES.EISDIR}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))}),MAX_OPEN_FDS:4096,nextfd:(function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(ERRNO_CODES.EMFILE)}),getStream:(function(fd){return FS.streams[fd]}),createStream:(function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=(function(){});FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:(function(){return this.node}),set:(function(val){this.node=val})},isRead:{get:(function(){return(this.flags&2097155)!==1})},isWrite:{get:(function(){return(this.flags&2097155)!==0})},isAppend:{get:(function(){return this.flags&1024})}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream}),closeStream:(function(fd){FS.streams[fd]=null}),getStreamFromPtr:(function(ptr){return FS.streams[ptr-1]}),getPtrForStream:(function(stream){return stream?stream.fd+1:0}),chrdev_stream_ops:{open:(function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}}),llseek:(function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)})},major:(function(dev){return dev>>8}),minor:(function(dev){return dev&255}),makedev:(function(ma,mi){return ma<<8|mi}),registerDevice:(function(dev,ops){FS.devices[dev]={stream_ops:ops}}),getDevice:(function(dev){return FS.devices[dev]}),getMounts:(function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts}),syncfs:(function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}var mounts=FS.getMounts(FS.root.mount);var completed=0;function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=mounts.length){callback(null)}}mounts.forEach((function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)}))}),mount:(function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot}),unmount:(function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach((function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}}));node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(idx!==-1);node.mount.mounts.splice(idx,1)}),lookup:(function(parent,name){return parent.node_ops.lookup(parent,name)}),mknod:(function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.mknod(parent,name,mode,dev)}),create:(function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)}),mkdir:(function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)}),mkdev:(function(path,mode,dev){if(typeof dev==="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)}),symlink:(function(oldpath,newpath){var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;var newname=PATH.basename(newpath);var err=FS.mayCreate(parent,newname);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.symlink(parent,newname,oldpath)}),rename:(function(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;try{lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(ERRNO_CODES.EXDEV)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}relative=PATH.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var err=FS.mayDelete(old_dir,old_name,isdir);if(err){throw new FS.ErrnoError(err)}err=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(err){throw new FS.ErrnoError(err)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(new_dir!==old_dir){err=FS.nodePermissions(old_dir,"w");if(err){throw new FS.ErrnoError(err)}}try{if(FS.trackingDelegate["willMovePath"]){FS.trackingDelegate["willMovePath"](old_path,new_path)}}catch(e){console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{if(FS.trackingDelegate["onMovePath"])FS.trackingDelegate["onMovePath"](old_path,new_path)}catch(e){console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}}),rmdir:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,true);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readdir:(function(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}return node.node_ops.readdir(node)}),unlink:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,false);if(err){if(err===ERRNO_CODES.EISDIR)err=ERRNO_CODES.EPERM;throw new FS.ErrnoError(err)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readlink:(function(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link.node_ops.readlink){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return link.node_ops.readlink(link)}),stat:(function(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node.node_ops.getattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return node.node_ops.getattr(node)}),lstat:(function(path){return FS.stat(path,true)}),chmod:(function(path,mode,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})}),lchmod:(function(path,mode){FS.chmod(path,mode,true)}),fchmod:(function(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chmod(stream.node,mode)}),chown:(function(path,uid,gid,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{timestamp:Date.now()})}),lchown:(function(path,uid,gid){FS.chown(path,uid,gid,true)}),fchown:(function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chown(stream.node,uid,gid)}),truncate:(function(path,len){if(len<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var err=FS.nodePermissions(node,"w");if(err){throw new FS.ErrnoError(err)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})}),ftruncate:(function(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}FS.truncate(stream.node,len)}),utime:(function(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})}),open:(function(path,flags,mode,fd_start,fd_end){if(path===""){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}flags=typeof flags==="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode==="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path==="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}}else{node=FS.mknod(path,mode,0)}}if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(FS.isChrdev(node.mode)){flags&=~512}var err=FS.mayOpen(node,flags);if(err){throw new FS.ErrnoError(err)}if(flags&512){FS.truncate(node,0)}flags&=~(128|512);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;Module["printErr"]("read file: "+path)}}try{if(FS.trackingDelegate["onOpenFile"]){var trackingFlags=0;if((flags&2097155)!==1){trackingFlags|=FS.tracking.openFlags.READ}if((flags&2097155)!==0){trackingFlags|=FS.tracking.openFlags.WRITE}FS.trackingDelegate["onOpenFile"](path,trackingFlags)}}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: "+e.message)}return stream}),close:(function(stream){try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}}),llseek:(function(stream,offset,whence){if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}return stream.stream_ops.llseek(stream,offset,whence)}),read:(function(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.read){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead}),write:(function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.write){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if(stream.flags&1024){FS.llseek(stream,0,2)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate["onWriteToFile"])FS.trackingDelegate["onWriteToFile"](stream.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return bytesWritten}),allocate:(function(stream,offset,length){if(offset<0||length<=0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP)}stream.stream_ops.allocate(stream,offset,length)}),mmap:(function(stream,buffer,offset,length,position,prot,flags){if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EACCES)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}return stream.stream_ops.mmap(stream,buffer,offset,length,position,prot,flags)}),ioctl:(function(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(ERRNO_CODES.ENOTTY)}return stream.stream_ops.ioctl(stream,cmd,arg)}),readFile:(function(path,opts){opts=opts||{};opts.flags=opts.flags||"r";opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret="";var utf8=new Runtime.UTF8Processor;for(var i=0;i>2]=FS.getPtrForStream(stdin);assert(stdin.fd===0,"invalid handle for stdin ("+stdin.fd+")");var stdout=FS.open("/dev/stdout","w");HEAP32[_stdout>>2]=FS.getPtrForStream(stdout);assert(stdout.fd===1,"invalid handle for stdout ("+stdout.fd+")");var stderr=FS.open("/dev/stderr","w");HEAP32[_stderr>>2]=FS.getPtrForStream(stderr);assert(stderr.fd===2,"invalid handle for stderr ("+stderr.fd+")")}),ensureErrnoError:(function(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}this.message=ERRNO_MESSAGES[errno]};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[ERRNO_CODES.ENOENT].forEach((function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""}))}),staticInit:(function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices()}),init:(function(input,output,error){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()}),quit:(function(){FS.init.initialized=false;for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=Math.floor(idx/this.chunkSize);return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}});var lazyArray=this;lazyArray.setDataGetter((function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]}));this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperty(lazyArray,"length",{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._length})});Object.defineProperty(lazyArray,"chunkSize",{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize})});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperty(node,"usedBytes",{get:(function(){return this.contents.length})});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach((function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return fn.apply(null,arguments)}}));stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}),normalize:(function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path}),dirname:(function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir}),basename:(function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)}),extname:(function(path){return PATH.splitPath(path)[3]}),join:(function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))}),join2:(function(l,r){return PATH.normalize(l+"/"+r)}),resolve:(function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter((function(p){return!!p})),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."}),relative:(function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout((function(){finish(audio)}),1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);var canvas=Module["canvas"];function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===canvas||document["mozPointerLockElement"]===canvas||document["webkitPointerLockElement"]===canvas||document["msPointerLockElement"]===canvas}if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||(function(){});canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||(function(){});canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",(function(ev){if(!Browser.pointerLock&&canvas.requestPointerLock){canvas.requestPointerLock();ev.preventDefault()}}),false)}}}),createContext:(function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx)return Module.ctx;var ctx;var errorInfo="?";function onContextCreationError(event){errorInfo=event.statusMessage||errorInfo}try{if(useWebGL){var contextAttributes={antialias:false,alpha:false};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}canvas.addEventListener("webglcontextcreationerror",onContextCreationError,false);try{["experimental-webgl","webgl"].some((function(webglId){return ctx=canvas.getContext(webglId,contextAttributes)}))}finally{canvas.removeEventListener("webglcontextcreationerror",onContextCreationError,false)}}else{ctx=canvas.getContext("2d")}if(!ctx)throw":("}catch(e){Module.print("Could not create canvas: "+[errorInfo,e]);return null}if(useWebGL){canvas.style.backgroundColor="black"}if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GLctx=ctx;Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach((function(callback){callback()}));Browser.init()}return ctx}),destroyContext:(function(canvas,useWebGL,setInModule){}),fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:(function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullScreenChange(){Browser.isFullScreen=false;var canvasContainer=canvas.parentNode;if((document["webkitFullScreenElement"]||document["webkitFullscreenElement"]||document["mozFullScreenElement"]||document["mozFullscreenElement"]||document["fullScreenElement"]||document["fullscreenElement"]||document["msFullScreenElement"]||document["msFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.cancelFullScreen=document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["webkitCancelFullScreen"]||document["msExitFullscreen"]||document["exitFullscreen"]||(function(){});canvas.cancelFullScreen=canvas.cancelFullScreen.bind(document);if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullScreen=true;if(Browser.resizeCanvas)Browser.setFullScreenCanvasSize()}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas)Browser.setWindowedCanvasSize()}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullScreen);Browser.updateCanvasDimensions(canvas)}if(!Browser.fullScreenHandlersInstalled){Browser.fullScreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullScreenChange,false);document.addEventListener("mozfullscreenchange",fullScreenChange,false);document.addEventListener("webkitfullscreenchange",fullScreenChange,false);document.addEventListener("MSFullscreenChange",fullScreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullScreen=canvasContainer["requestFullScreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullScreen"]?(function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}):null);canvasContainer.requestFullScreen()}),nextRAF:0,fakeRequestAnimationFrame:(function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)}),requestAnimationFrame:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:(function(func){return(function(){if(!ABORT)return func.apply(null,arguments)})}),safeRequestAnimationFrame:(function(func){return Browser.requestAnimationFrame((function(){if(!ABORT)func()}))}),safeSetTimeout:(function(func,timeout){Module["noExitRuntime"]=true;return setTimeout((function(){if(!ABORT)func()}),timeout)}),safeSetInterval:(function(func,timeout){Module["noExitRuntime"]=true;return setInterval((function(){if(!ABORT)func()}),timeout)}),getMimetype:(function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]}),getUserMedia:(function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)}),getMovementX:(function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0}),getMovementY:(function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0}),getMouseWheelDelta:(function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail;break;case"mousewheel":delta=-event.wheelDelta;break;case"wheel":delta=event.deltaY;break;default:throw"unrecognized mouse wheel event: "+event.type}return Math.max(-1,Math.min(1,delta))}),mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:(function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){Browser.lastTouches[touch.identifier]=Browser.touches[touch.identifier];Browser.touches[touch.identifier]={x:adjustedX,y:adjustedY}}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}}),xhrLoad:(function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)}),asyncLoad:(function(url,onload,onerror,noRunDep){Browser.xhrLoad(url,(function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(!noRunDep)removeRunDependency("al "+url)}),(function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}}));if(!noRunDep)addRunDependency("al "+url)}),resizeListeners:[],updateResizeListeners:(function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach((function(listener){listener(canvas.width,canvas.height)}))}),setCanvasSize:(function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()}),windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags|8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),setWindowedCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags&~8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),updateCanvasDimensions:(function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2]=ret}return ret}function _exp(){return Math_exp.apply(null,arguments)}function _llvm_pow_f64(){return Math_pow.apply(null,arguments)}function __exit(status){Module["exit"](status)}function _exit(status){__exit(status)}function _sin(){return Math_sin.apply(null,arguments)}___errno_state=Runtime.staticAlloc(4);HEAP32[___errno_state>>2]=0;Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas){Browser.requestFullScreen(lockPointer,resizeCanvas)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};FS.staticInit();__ATINIT__.unshift({func:(function(){if(!Module["noFSInit"]&&!FS.init.initialized)FS.init()})});__ATMAIN__.push({func:(function(){FS.ignorePermissions=false})});__ATEXIT__.push({func:(function(){FS.quit()})});Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;__ATINIT__.unshift({func:(function(){TTY.init()})});__ATEXIT__.push({func:(function(){TTY.shutdown()})});TTY.utf8=new Runtime.UTF8Processor;if(ENVIRONMENT_IS_NODE){var fs=require("fs");NODEFS.staticInit()}STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);staticSealed=true;STACK_MAX=STACK_BASE+5242880;DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX);assert(DYNAMIC_BASE>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0]}function Ya(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0];a[k+4>>0]=a[b+4>>0];a[k+5>>0]=a[b+5>>0];a[k+6>>0]=a[b+6>>0];a[k+7>>0]=a[b+7>>0]}function Za(a){a=a|0;D=a}function _a(){return D|0}function $a(b){b=b|0;var d=0,e=0;d=i;c[b+0>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;e=ld(256)|0;c[b+8>>2]=e;c[b+12>>2]=e;a[e>>0]=0;c[b+16>>2]=256;i=d;return}function ab(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0;g=i;do{if(!(f>>>0>32)){h=b+16|0;k=c[h>>2]|0;j=b+12|0;l=c[j>>2]|0;if((c[b>>2]|0)<(k+ -4|0)){h=l}else{if((l|0)==0){i=g;return}if((k|0)>2147483391){break}l=b+8|0;k=od(c[l>>2]|0,k+256|0)|0;if((k|0)==0){break}c[l>>2]=k;c[h>>2]=(c[h>>2]|0)+256;h=k+(c[b>>2]|0)|0;c[j>>2]=h}e=c[8+(f<<2)>>2]&e;j=b+4|0;l=c[j>>2]|0;f=l+f|0;k=b+12|0;a[h>>0]=d[h>>0]|0|e<7?(a[(c[k>>2]|0)+1>>0]=e>>>(8-(c[j>>2]|0)|0),(f|0)>15):0)?(a[(c[k>>2]|0)+2>>0]=e>>>(16-(c[j>>2]|0)|0),(f|0)>23):0)?(a[(c[k>>2]|0)+3>>0]=e>>>(24-(c[j>>2]|0)|0),(f|0)>31):0){h=c[j>>2]|0;if((h|0)==0){a[(c[k>>2]|0)+4>>0]=0;break}else{a[(c[k>>2]|0)+4>>0]=e>>>(32-h|0);break}}}while(0);l=(f|0)/8|0;c[b>>2]=(c[b>>2]|0)+l;c[k>>2]=(c[k>>2]|0)+l;c[j>>2]=f&7;i=g;return}}while(0);f=c[b+8>>2]|0;if((f|0)!=0){md(f)}c[b+0>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;i=g;return}function bb(a){a=a|0;var b=0,d=0;b=i;d=c[a+8>>2]|0;if((d|0)!=0){md(d)}c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;i=b;return}function cb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=i;c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+12>>2]=b;c[a+8>>2]=b;c[a+16>>2]=d;i=e;return}function db(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,j=0;f=i;if(b>>>0>32){j=-1;i=f;return j|0}e=c[8+(b<<2)>>2]|0;g=c[a+4>>2]|0;b=g+b|0;h=c[a>>2]|0;j=c[a+16>>2]|0;if((h|0)>=(j+ -4|0)){if((h|0)>(j-(b+7>>3)|0)){j=-1;i=f;return j|0}if((b|0)==0){j=0;i=f;return j|0}}a=c[a+12>>2]|0;h=(d[a>>0]|0)>>>g;if((b|0)>8){h=(d[a+1>>0]|0)<<8-g|h;if((b|0)>16){h=(d[a+2>>0]|0)<<16-g|h;if((b|0)>24){h=(d[a+3>>0]|0)<<24-g|h;if(!((b|0)<33|(g|0)==0)){h=(d[a+4>>0]|0)<<32-g|h}}}}j=h&e;i=f;return j|0}function eb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=a+4|0;f=(c[e>>2]|0)+b|0;g=c[a>>2]|0;b=c[a+16>>2]|0;if((g|0)>(b-(f+7>>3)|0)){c[a+12>>2]=0;c[a>>2]=b;g=1;c[e>>2]=g;i=d;return}else{b=(f|0)/8|0;h=a+12|0;c[h>>2]=(c[h>>2]|0)+b;c[a>>2]=g+b;g=f&7;c[e>>2]=g;i=d;return}}function fb(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;do{if(b>>>0>32){g=a+4|0;f=a;k=c[a+16>>2]|0}else{f=c[8+(b<<2)>>2]|0;g=a+4|0;h=c[g>>2]|0;b=h+b|0;j=c[a>>2]|0;k=c[a+16>>2]|0;if((j|0)>=(k+ -4|0)){if((j|0)>(k-(b+7>>3)|0)){f=a;break}if((b|0)==0){m=0;i=e;return m|0}}k=a+12|0;l=c[k>>2]|0;m=(d[l>>0]|0)>>>h;if((b|0)>8){m=(d[l+1>>0]|0)<<8-h|m;if((b|0)>16){m=(d[l+2>>0]|0)<<16-h|m;if((b|0)>24){m=(d[l+3>>0]|0)<<24-h|m;if(!((b|0)<33|(h|0)==0)){m=(d[l+4>>0]|0)<<32-h|m}}}}h=(b|0)/8|0;c[k>>2]=l+h;c[a>>2]=j+h;c[g>>2]=b&7;m=m&f;i=e;return m|0}}while(0);c[a+12>>2]=0;c[f>>2]=k;c[g>>2]=1;m=-1;i=e;return m|0}function gb(a){a=a|0;return(((c[a+4>>2]|0)+7|0)/8|0)+(c[a>>2]|0)|0}function hb(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0,h=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0;f=i;l=(b|0)/4|0;d=ld(l<<2)|0;k=ld(l+b<<2)|0;h=b>>1;e=+(b|0);j=~~+Ha(+(+Z(+e)*1.4426950408889634));c[a+4>>2]=j;c[a>>2]=b;c[a+8>>2]=k;c[a+12>>2]=d;if((b|0)<=3){o=4.0/e;p=a+16|0;g[p>>2]=o;i=f;return}n=3.141592653589793/+(b|0);o=3.141592653589793/+(b<<1|0);m=0;do{q=+(m<<2|0)*n;p=m<<1;g[k+(p<<2)>>2]=+R(+q);r=p|1;g[k+(r<<2)>>2]=-+S(+q);q=+(r|0)*o;p=p+h|0;g[k+(p<<2)>>2]=+R(+q);g[k+(p+1<<2)>>2]=+S(+q);m=m+1|0}while((m|0)<(l|0));h=(b|0)/8|0;l=(b|0)>7;if(!l){q=4.0/e;r=a+16|0;g[r>>2]=q;i=f;return}n=3.141592653589793/+(b|0);m=0;do{q=+(m<<2|2|0)*n;r=(m<<1)+b|0;g[k+(r<<2)>>2]=+R(+q)*.5;g[k+(r+1<<2)>>2]=+S(+q)*-.5;m=m+1|0}while((m|0)<(h|0));k=(1<>2]=q;i=f;return}do{b=j;p=0;l=0;do{if((b&m|0)!=0){p=p|1<>l}while((b|0)!=0);r=m<<1;c[d+(r<<2)>>2]=(k&~p)+ -1;c[d+((r|1)<<2)>>2]=p;m=m+1|0}while((m|0)<(h|0));q=4.0/e;r=a+16|0;g[r>>2]=q;i=f;return}function ib(a){a=a|0;var b=0,d=0;b=i;if((a|0)==0){i=b;return}d=c[a+8>>2]|0;if((d|0)!=0){md(d)}d=c[a+12>>2]|0;if((d|0)!=0){md(d)}c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;i=b;return}function jb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0;e=i;j=c[a>>2]|0;k=j>>1;j=j>>2;f=d+(k+j<<2)|0;m=a+8|0;l=c[m>>2]|0;n=l+(j<<2)|0;h=n;o=b+(k+ -7<<2)|0;p=f;while(1){q=p;p=p+ -16|0;s=o+8|0;t=h+12|0;r=h+8|0;g[p>>2]=-(+g[s>>2]*+g[t>>2])- +g[o>>2]*+g[r>>2];g[q+ -12>>2]=+g[o>>2]*+g[t>>2]- +g[s>>2]*+g[r>>2];r=o+24|0;s=h+4|0;t=o+16|0;g[q+ -8>>2]=-(+g[r>>2]*+g[s>>2])- +g[t>>2]*+g[h>>2];g[q+ -4>>2]=+g[t>>2]*+g[s>>2]- +g[r>>2]*+g[h>>2];o=o+ -32|0;if(o>>>0>>0){break}else{h=h+16|0}}h=d+(k<<2)|0;o=b+(k+ -8<<2)|0;p=f;while(1){q=o+16|0;t=n+ -4|0;s=o+24|0;r=n+ -8|0;g[p>>2]=+g[q>>2]*+g[t>>2]+ +g[s>>2]*+g[r>>2];g[p+4>>2]=+g[q>>2]*+g[r>>2]- +g[s>>2]*+g[t>>2];t=n+ -12|0;n=n+ -16|0;s=o+8|0;g[p+8>>2]=+g[o>>2]*+g[t>>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*+g[F>>2];g[D>>2]=B*+g[F>>2]-C*+g[E>>2];h=h+ -32|0;if(h>>>0>>0){break}else{k=k+(n<<2)|0;j=j+ -32|0}}x=x+1|0}while((x|0)!=(m|0))}l=l+1|0}while((l|0)!=(f|0))}if((d|0)>0){b=0}else{i=e;return}do{aa=c+(b<<2)|0;v=c+((b|30)<<2)|0;L=+g[v>>2];V=c+((b|14)<<2)|0;O=+g[V>>2];G=c+((b|31)<<2)|0;K=+g[G>>2];l=c+((b|15)<<2)|0;B=+g[l>>2];g[v>>2]=L+O;g[G>>2]=K+B;g[V>>2]=L-O;g[l>>2]=K-B;w=c+((b|28)<<2)|0;B=+g[w>>2];f=c+((b|12)<<2)|0;K=+g[f>>2];O=B-K;H=c+((b|29)<<2)|0;L=+g[H>>2];m=c+((b|13)<<2)|0;Q=+g[m>>2];U=L-Q;g[w>>2]=B+K;g[H>>2]=L+Q;g[f>>2]=O*.9238795042037964-U*.3826834261417389;g[m>>2]=O*.3826834261417389+U*.9238795042037964;D=c+((b|26)<<2)|0;U=+g[D>>2];j=c+((b|10)<<2)|0;O=+g[j>>2];Q=U-O;E=c+((b|27)<<2)|0;L=+g[E>>2];k=c+((b|11)<<2)|0;K=+g[k>>2];B=L-K;g[D>>2]=U+O;g[E>>2]=L+K;g[j>>2]=(Q-B)*.7071067690849304;g[k>>2]=(Q+B)*.7071067690849304;x=c+((b|24)<<2)|0;B=+g[x>>2];h=c+((b|8)<<2)|0;Q=+g[h>>2];K=B-Q;F=c+((b|25)<<2)|0;L=+g[F>>2];a=c+((b|9)<<2)|0;O=+g[a>>2];U=L-O;g[x>>2]=B+Q;g[F>>2]=L+O;O=K*.3826834261417389-U*.9238795042037964;U=K*.9238795042037964+U*.3826834261417389;n=c+((b|22)<<2)|0;K=+g[n>>2];ca=c+((b|6)<<2)|0;L=+g[ca>>2];X=c+((b|7)<<2)|0;Q=+g[X>>2];t=c+((b|23)<<2)|0;B=+g[t>>2];g[n>>2]=K+L;g[t>>2]=Q+B;g[ca>>2]=Q-B;g[X>>2]=K-L;ba=c+((b|4)<<2)|0;L=+g[ba>>2];o=c+((b|20)<<2)|0;K=+g[o>>2];B=L-K;W=c+((b|5)<<2)|0;Q=+g[W>>2];u=c+((b|21)<<2)|0;S=+g[u>>2];z=Q-S;g[o>>2]=L+K;g[u>>2]=Q+S;S=B*.3826834261417389+z*.9238795042037964;B=z*.3826834261417389-B*.9238795042037964;_=c+((b|2)<<2)|0;z=+g[_>>2];q=c+((b|18)<<2)|0;Q=+g[q>>2];K=z-Q;Z=c+((b|3)<<2)|0;L=+g[Z>>2];r=c+((b|19)<<2)|0;M=+g[r>>2];C=L-M;g[q>>2]=z+Q;g[r>>2]=L+M;M=(K+C)*.7071067690849304;K=(C-K)*.7071067690849304;C=+g[aa>>2];p=c+((b|16)<<2)|0;L=+g[p>>2];Q=C-L;Y=c+((b|1)<<2)|0;z=+g[Y>>2];s=c+((b|17)<<2)|0;J=+g[s>>2];A=z-J;g[p>>2]=C+L;g[s>>2]=z+J;J=Q*.9238795042037964+A*.3826834261417389;Q=A*.9238795042037964-Q*.3826834261417389;A=Q-U;z=J-O;J=O+J;Q=U+Q;U=A+z;z=A-z;A=+g[k>>2];O=K-A;L=+g[j>>2];C=L-M;L=M+L;A=K+A;K=+g[f>>2];M=K-S;N=+g[m>>2];y=N-B;K=S+K;N=B+N;B=M-y;y=M+y;M=+g[V>>2];S=+g[ca>>2];R=M-S;T=+g[l>>2];I=+g[X>>2];P=T-I;S=M+S;I=T+I;T=O+R;O=R-O;R=(U+B)*.7071067690849304;U=(B-U)*.7071067690849304;g[ca>>2]=T+R;g[ba>>2]=T-R;R=(y-z)*.7071067690849304;T=P-C;g[aa>>2]=O+R;g[_>>2]=O-R;y=(z+y)*.7071067690849304;P=C+P;g[Z>>2]=U+T;g[Y>>2]=T-U;g[X>>2]=y+P;g[W>>2]=P-y;y=L+S;L=S-L;S=K+J;J=K-J;g[V>>2]=S+y;g[f>>2]=y-S;S=N-Q;y=I-A;g[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;y=+g[s+ -8>>2]- +g[q>>2];s=s+ -16|0;x=+g[s>>2]- +g[q+8>>2];w=p+ -4|0;g[j+(r+h<<2)>>2]=x*+g[w>>2]+y*+g[u>>2];g[j+((r|1)+h<<2)>>2]=x*+g[u>>2]-y*+g[w>>2];q=q+16|0;r=r+2|0;if((r|0)>=(o|0)){break}else{p=u}}}if((r|0)<(h|0)){b=b+(n<<2)|0;while(1){y=-+g[b+ -8>>2]- +g[q>>2];b=b+ -16|0;x=-+g[b>>2]- +g[q+8>>2];w=u+ -4|0;u=u+ -8|0;g[j+(r+h<<2)>>2]=x*+g[w>>2]+y*+g[u>>2];g[j+((r|1)+h<<2)>>2]=x*+g[u>>2]-y*+g[w>>2];r=r+2|0;if((r|0)>=(h|0)){break}else{q=q+16|0}}}kb(c[a+4>>2]|0,l,m,h);lb(c[a>>2]|0,c[k>>2]|0,c[a+12>>2]|0,j);if((e|0)<=0){i=f;return}a=a+16|0;k=(c[k>>2]|0)+(h<<2)|0;l=0;h=d+(h<<2)|0;while(1){h=h+ -4|0;w=j+4|0;v=k+4|0;g[d+(l<<2)>>2]=+g[a>>2]*(+g[j>>2]*+g[k>>2]+ +g[w>>2]*+g[v>>2]);g[h>>2]=+g[a>>2]*(+g[j>>2]*+g[v>>2]- +g[w>>2]*+g[k>>2]);l=l+1|0;if((l|0)==(e|0)){break}else{k=k+8|0;j=j+8|0}}i=f;return}function nb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=i;d=c[a>>2]|0;if((d|0)==1){i=e;return}f=c[a+4>>2]|0;j=c[a+8>>2]|0;a=c[j+4>>2]|0;if((a|0)<=0){i=e;return}l=a+1|0;k=d+ -1|0;n=d;m=0;h=d;o=1;do{r=c[j+(l-m<<2)>>2]|0;q=(d|0)/(h|0)|0;h=(h|0)/(r|0)|0;s=$(q,h)|0;n=n-($(q,r+ -1|0)|0)|0;p=1-o|0;do{if((r|0)==4){r=n+q|0;t=f+(k+n<<2)|0;s=f+(k+r<<2)|0;r=f+(k+q+r<<2)|0;if((o|0)==1){qb(q,h,b,f,t,s,r);o=p;break}else{qb(q,h,f,b,t,s,r);o=p;break}}else if((r|0)==2){r=f+(k+n<<2)|0;if((o|0)==1){rb(q,h,b,f,r);o=p;break}else{rb(q,h,f,b,r);o=p;break}}else{t=f+(k+n<<2)|0;if((((q|0)==1?o:p)|0)==0){sb(q,r,h,s,b,b,b,f,f,t);o=1;break}else{sb(q,r,h,s,f,f,f,b,b,t);o=0;break}}}while(0);m=m+1|0}while((m|0)!=(a|0));if((o|0)!=1&(d|0)>0){a=0}else{i=e;return}do{g[b+(a<<2)>>2]=+g[f+(a<<2)>>2];a=a+1|0}while((a|0)!=(d|0));i=e;return}function ob(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,h=0.0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0,w=0,x=0,y=0.0;f=i;c[a>>2]=b;e=nd(b*3|0,4)|0;c[a+4>>2]=e;d=nd(32,4)|0;c[a+8>>2]=d;if((b|0)==1){i=f;return}j=d+8|0;k=0;a=0;p=b;l=0;a:while(1){if((k|0)<4){l=c[144+(k<<2)>>2]|0}else{l=l+2|0}m=(l|0)!=2;while(1){o=(p|0)/(l|0)|0;if((p|0)!=($(o,l)|0)){break}q=a+1|0;c[d+(a+2<<2)>>2]=l;p=(a|0)==0;if(!(m|p)){if((a|0)>0){r=1;do{x=q-r|0;c[d+(x+2<<2)>>2]=c[d+(x+1<<2)>>2];r=r+1|0}while((r|0)<(q|0))}c[j>>2]=2}if((o|0)==1){break a}else{a=q;p=o}}k=k+1|0}c[d>>2]=b;c[d+4>>2]=q;h=6.2831854820251465/+(b|0);if(!((a|0)>0&(p^1))){i=f;return}k=b+1|0;x=0;l=0;j=1;do{r=c[d+(l+2<<2)>>2]|0;q=j;j=$(r,j)|0;s=(b|0)/(j|0)|0;r=r+ -1|0;if((r|0)>0){p=(s|0)>2;m=x;w=0;v=0;while(1){v=v+q|0;u=h*+(v|0);if(p){n=0.0;t=m;o=2;while(1){n=n+1.0;y=u*n;g[e+(t+b<<2)>>2]=+R(+y);g[e+(k+t<<2)>>2]=+S(+y);o=o+2|0;if((o|0)>=(s|0)){break}else{t=t+2|0}}}w=w+1|0;if((w|0)==(r|0)){break}else{m=m+s|0}}x=($(s,r)|0)+x|0}l=l+1|0}while((l|0)!=(a|0));i=f;return}function pb(a){a=a|0;var b=0,d=0;b=i;if((a|0)==0){i=b;return}d=c[a+4>>2]|0;if((d|0)!=0){md(d)}d=c[a+8>>2]|0;if((d|0)!=0){md(d)}c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;i=b;return}function qb(a,b,c,d,e,f,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0;k=i;j=$(b,a)|0;l=j<<1;m=(b|0)>0;if(m){o=(a<<2)+ -1|0;p=a<<1;u=0;q=j;r=l+j|0;s=0;t=l;while(1){w=c+(q<<2)|0;x=c+(r<<2)|0;A=+g[w>>2]+ +g[x>>2];z=c+(s<<2)|0;y=c+(t<<2)|0;B=+g[z>>2]+ +g[y>>2];v=s<<2;g[d+(v<<2)>>2]=A+B;g[d+(o+v<<2)>>2]=B-A;v=v+p|0;g[d+(v+ -1<<2)>>2]=+g[z>>2]- +g[y>>2];g[d+(v<<2)>>2]=+g[x>>2]- +g[w>>2];u=u+1|0;if((u|0)==(b|0)){break}else{q=q+a|0;r=r+a|0;s=s+a|0;t=t+a|0}}}if((a|0)<2){i=k;return}if((a|0)!=2){if(m?(n=a<<1,(a|0)>2):0){r=0;q=0;while(1){t=q<<2;s=2;p=q;o=t;t=t+n|0;do{z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o+a|0}}i=k;return}function rb(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0;h=i;j=$(b,a)|0;f=a<<1;k=(b|0)>0;if(k){n=f+ -1|0;l=0;m=0;o=j;while(1){q=c+(m<<2)|0;r=c+(o<<2)|0;s=m<<1;g[d+(s<<2)>>2]=+g[q>>2]+ +g[r>>2];g[d+(n+s<<2)>>2]=+g[q>>2]- +g[r>>2];l=l+1|0;if((l|0)==(b|0)){break}else{m=m+a|0;o=o+a|0}}}if((a|0)<2){i=h;return}if((a|0)!=2){if(k&(a|0)>2){r=0;p=0;q=j;while(1){l=p<<1;s=2;n=q;m=l+f|0;o=p;do{t=m;m=m+ -2|0;v=o;o=o+2|0;w=l;l=l+2|0;B=+g[e+(s+ -2<<2)>>2];z=+g[c+(n+1<<2)>>2];n=n+2|0;y=+g[e+(s+ -1<<2)>>2];A=+g[c+(n<<2)>>2];u=B*z+y*A;y=B*A-z*y;x=c+(o<<2)|0;g[d+(l<<2)>>2]=+g[x>>2]+y;g[d+(m<<2)>>2]=y- +g[x>>2];v=c+(v+1<<2)|0;g[d+((w|1)<<2)>>2]=u+ +g[v>>2];g[d+(t+ -3<<2)>>2]=+g[v>>2]-u;s=s+2|0}while((s|0)<(a|0));r=r+1|0;if((r|0)==(b|0)){break}else{p=p+a|0;q=q+a|0}}}if(((a|0)%2|0|0)==1){i=h;return}}l=a+ -1|0;if(!k){i=h;return}k=0;e=a;j=j+l|0;while(1){g[d+(e<<2)>>2]=-+g[c+(j<<2)>>2];g[d+(e+ -1<<2)>>2]=+g[c+(l<<2)>>2];k=k+1|0;if((k|0)==(b|0)){break}else{e=e+f|0;j=j+a|0;l=l+a|0}}i=h;return}function sb(a,b,c,d,e,f,h,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0,v=0.0,w=0,x=0,y=0,z=0.0,A=0,B=0.0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0.0,K=0,L=0,M=0,N=0;m=i;t=6.2831854820251465/+(b|0);s=+R(+t);t=+S(+t);p=b+1>>1;q=a+ -1>>1;n=$(c,a)|0;o=$(b,a)|0;r=(a|0)==1;a:do{if(!r){if((d|0)>0){u=0;do{g[k+(u<<2)>>2]=+g[h+(u<<2)>>2];u=u+1|0}while((u|0)!=(d|0))}u=(b|0)>1;if(u){A=(c|0)>0;x=1;C=0;do{C=C+n|0;if(A){y=0;w=C;while(1){g[j+(w<<2)>>2]=+g[f+(w<<2)>>2];y=y+1|0;if((y|0)==(c|0)){break}else{w=w+a|0}}}x=x+1|0}while((x|0)!=(b|0))}x=0-a|0;if((q|0)>(c|0)){if(u){w=(c|0)>0;u=(a|0)>2;F=1;E=0;do{E=E+n|0;x=x+a|0;if(w){D=x+ -1|0;C=0;H=E-a|0;do{H=H+a|0;if(u){A=2;G=D;y=H;do{M=l+(G+1<<2)|0;G=G+2|0;N=y+1|0;y=y+2|0;K=f+(N<<2)|0;I=l+(G<<2)|0;L=f+(y<<2)|0;g[j+(N<<2)>>2]=+g[M>>2]*+g[K>>2]+ +g[I>>2]*+g[L>>2];g[j+(y<<2)>>2]=+g[M>>2]*+g[L>>2]- +g[I>>2]*+g[K>>2];A=A+2|0}while((A|0)<(a|0))}C=C+1|0}while((C|0)!=(c|0))}F=F+1|0}while((F|0)!=(b|0))}}else{if(u){w=(a|0)>2;u=(c|0)>0;D=1;E=0;do{x=x+a|0;E=E+n|0;if(w){y=2;C=x+ -1|0;A=E;do{F=C;C=C+2|0;A=A+2|0;if(u){H=l+(F+1<<2)|0;I=l+(C<<2)|0;G=0;F=A;while(1){L=F+ -1|0;N=f+(L<<2)|0;M=f+(F<<2)|0;g[j+(L<<2)>>2]=+g[H>>2]*+g[N>>2]+ +g[I>>2]*+g[M>>2];g[j+(F<<2)>>2]=+g[H>>2]*+g[M>>2]- +g[I>>2]*+g[N>>2];G=G+1|0;if((G|0)==(c|0)){break}else{F=F+a|0}}}y=y+2|0}while((y|0)<(a|0))}D=D+1|0}while((D|0)!=(b|0))}}G=$(n,b)|0;l=(p|0)>1;if((q|0)>=(c|0)){if(!l){break}x=(c|0)>0;u=(a|0)>2;l=1;w=0;while(1){w=w+n|0;G=G-n|0;if(x){C=0;y=w;A=G;while(1){if(u){D=2;F=y;E=A;do{K=F+1|0;F=F+2|0;N=j+(K<<2)|0;I=E+1|0;E=E+2|0;M=j+(I<<2)|0;g[f+(K<<2)>>2]=+g[N>>2]+ +g[M>>2];K=j+(F<<2)|0;L=j+(E<<2)|0;g[f+(I<<2)>>2]=+g[K>>2]- +g[L>>2];g[f+(F<<2)>>2]=+g[K>>2]+ +g[L>>2];g[f+(E<<2)>>2]=+g[M>>2]- +g[N>>2];D=D+2|0}while((D|0)<(a|0))}C=C+1|0;if((C|0)==(c|0)){break}else{y=y+a|0;A=A+a|0}}}l=l+1|0;if((l|0)==(p|0)){break a}}}if(l){u=(a|0)>2;l=(c|0)>0;w=1;x=0;do{x=x+n|0;G=G-n|0;if(u){y=2;C=x;A=G;do{C=C+2|0;A=A+2|0;if(l){F=0;E=C-a|0;D=A-a|0;do{E=E+a|0;D=D+a|0;K=E+ -1|0;N=j+(K<<2)|0;I=D+ -1|0;M=j+(I<<2)|0;g[f+(K<<2)>>2]=+g[N>>2]+ +g[M>>2];K=j+(E<<2)|0;L=j+(D<<2)|0;g[f+(I<<2)>>2]=+g[K>>2]- +g[L>>2];g[f+(E<<2)>>2]=+g[K>>2]+ +g[L>>2];g[f+(D<<2)>>2]=+g[M>>2]- +g[N>>2];F=F+1|0}while((F|0)!=(c|0))}y=y+2|0}while((y|0)<(a|0))}w=w+1|0}while((w|0)!=(p|0))}}}while(0);u=(d|0)>0;if(u){l=0;do{g[h+(l<<2)>>2]=+g[k+(l<<2)>>2];l=l+1|0}while((l|0)!=(d|0))}A=$(d,b)|0;l=(p|0)>1;if(l){E=(c|0)>0;F=1;w=0;x=A;do{w=w+n|0;x=x-n|0;if(E){y=0;D=w-a|0;C=x-a|0;do{D=D+a|0;C=C+a|0;N=j+(D<<2)|0;M=j+(C<<2)|0;g[f+(D<<2)>>2]=+g[N>>2]+ +g[M>>2];g[f+(C<<2)>>2]=+g[M>>2]- +g[N>>2];y=y+1|0}while((y|0)!=(c|0))}F=F+1|0}while((F|0)!=(p|0));x=$(b+ -1|0,d)|0;if(l){w=(p|0)>2;v=0.0;z=1.0;f=1;y=0;do{y=y+d|0;A=A-d|0;v=s*v+t*z;z=s*z-t*v;if(u){G=0;C=y;D=A;E=x;F=d;while(1){g[k+(C<<2)>>2]=+g[h+(G<<2)>>2]+z*+g[h+(F<<2)>>2];g[k+(D<<2)>>2]=v*+g[h+(E<<2)>>2];G=G+1|0;if((G|0)==(d|0)){break}else{C=C+1|0;D=D+1|0;E=E+1|0;F=F+1|0}}}if(w){J=v;B=z;K=2;H=d;I=x;do{H=H+d|0;I=I-d|0;J=z*J+v*B;B=z*B-v*J;if(u){C=0;G=y;F=A;E=H;D=I;while(1){N=k+(G<<2)|0;g[N>>2]=+g[N>>2]+B*+g[h+(E<<2)>>2];N=k+(F<<2)|0;g[N>>2]=+g[N>>2]+J*+g[h+(D<<2)>>2];C=C+1|0;if((C|0)==(d|0)){break}else{G=G+1|0;F=F+1|0;E=E+1|0;D=D+1|0}}}K=K+1|0}while((K|0)!=(p|0))}f=f+1|0}while((f|0)!=(p|0));if(l){f=1;w=0;do{w=w+d|0;if(u){y=0;x=w;while(1){N=k+(y<<2)|0;g[N>>2]=+g[h+(x<<2)>>2]+ +g[N>>2];y=y+1|0;if((y|0)==(d|0)){break}else{x=x+1|0}}}f=f+1|0}while((f|0)!=(p|0))}}}if((a|0)<(c|0)){if((a|0)>0){d=(c|0)>0;k=0;do{if(d){u=0;h=k;f=k;while(1){g[e+(f<<2)>>2]=+g[j+(h<<2)>>2];u=u+1|0;if((u|0)==(c|0)){break}else{h=h+a|0;f=f+o|0}}}k=k+1|0}while((k|0)!=(a|0))}}else{if((c|0)>0){u=(a|0)>0;x=0;f=0;h=0;while(1){if(u){k=0;w=f;d=h;while(1){g[e+(d<<2)>>2]=+g[j+(w<<2)>>2];k=k+1|0;if((k|0)==(a|0)){break}else{w=w+1|0;d=d+1|0}}}x=x+1|0;if((x|0)==(c|0)){break}else{f=f+a|0;h=h+o|0}}}}d=a<<1;b=$(n,b)|0;if(l){w=(c|0)>0;x=1;C=0;A=0;y=b;do{C=C+d|0;A=A+n|0;y=y-n|0;if(w){h=0;k=C;u=A;f=y;while(1){g[e+(k+ -1<<2)>>2]=+g[j+(u<<2)>>2];g[e+(k<<2)>>2]=+g[j+(f<<2)>>2];h=h+1|0;if((h|0)==(c|0)){break}else{k=k+o|0;u=u+a|0;f=f+a|0}}}x=x+1|0}while((x|0)!=(p|0))}if(r){i=m;return}h=0-a|0;if((q|0)>=(c|0)){if(l){q=1;r=0;k=0}else{i=m;return}do{h=h+d|0;r=r+d|0;k=k+n|0;b=b-n|0;if(!((c|0)<1|(a|0)<3)){y=0;u=h;f=r;w=k;x=b;while(1){l=2;do{M=l+w|0;H=j+(M+ -1<<2)|0;L=l+x|0;I=j+(L+ -1<<2)|0;K=l+f|0;g[e+(K+ -1<<2)>>2]=+g[H>>2]+ +g[I>>2];N=a-l+u|0;g[e+(N+ -1<<2)>>2]=+g[H>>2]- +g[I>>2];M=j+(M<<2)|0;L=j+(L<<2)|0;g[e+(K<<2)>>2]=+g[M>>2]+ +g[L>>2];g[e+(N<<2)>>2]=+g[L>>2]- +g[M>>2];l=l+2|0}while((l|0)<(a|0));y=y+1|0;if((y|0)==(c|0)){break}else{u=u+o|0;f=f+o|0;w=w+a|0;x=x+a|0}}}q=q+1|0}while((q|0)!=(p|0));i=m;return}if(!l){i=m;return}r=(a|0)>2;q=(c|0)>0;k=1;l=0;f=0;do{h=h+d|0;l=l+d|0;f=f+n|0;b=b-n|0;b:do{if(r){C=h+a|0;if(q){A=2}else{u=2;while(1){u=u+2|0;if((u|0)>=(a|0)){break b}}}do{x=0;D=C-A|0;w=A+l|0;u=A+f|0;y=A+b|0;while(1){M=j+(u+ -1<<2)|0;N=j+(y+ -1<<2)|0;g[e+(w+ -1<<2)>>2]=+g[M>>2]+ +g[N>>2];g[e+(D+ -1<<2)>>2]=+g[M>>2]- +g[N>>2];N=j+(u<<2)|0;M=j+(y<<2)|0;g[e+(w<<2)>>2]=+g[N>>2]+ +g[M>>2];g[e+(D<<2)>>2]=+g[M>>2]- +g[N>>2];x=x+1|0;if((x|0)==(c|0)){break}else{D=D+o|0;w=w+o|0;u=u+a|0;y=y+a|0}}A=A+2|0}while((A|0)<(a|0))}}while(0);k=k+1|0}while((k|0)!=(p|0));i=m;return}function tb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,h=0;d=i;f=b+0|0;e=f+112|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(e|0));c[b+64>>2]=a;c[b+76>>2]=0;c[b+68>>2]=0;if((c[a>>2]|0)==0){i=d;return 0}a=nd(1,72)|0;c[b+104>>2]=a;g[a+4>>2]=-9999.0;e=b+4|0;b=a+12|0;f=0;while(1){if((f|0)!=7){h=nd(1,20)|0;c[b+(f<<2)>>2]=h;$a(h);f=f+1|0;if((f|0)==15){break}else{continue}}else{c[a+40>>2]=e;$a(e);f=f+1|0;continue}}i=d;return 0}function ub(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;e=b+7&-8;b=a+72|0;f=c[b>>2]|0;h=a+76|0;j=a+68|0;g=c[j>>2]|0;if((f+e|0)<=(c[h>>2]|0)){j=g;h=f;j=j+h|0;h=h+e|0;c[b>>2]=h;i=d;return j|0}if((g|0)!=0){k=ld(8)|0;l=a+80|0;c[l>>2]=(c[l>>2]|0)+f;f=a+84|0;c[k+4>>2]=c[f>>2];c[k>>2]=g;c[f>>2]=k}c[h>>2]=e;l=ld(e)|0;c[j>>2]=l;c[b>>2]=0;k=0;l=l+k|0;k=k+e|0;c[b>>2]=k;i=d;return l|0}function vb(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;d=i;b=a+84|0;e=c[b>>2]|0;if((e|0)!=0){do{f=e;e=c[e+4>>2]|0;md(c[f>>2]|0);md(f)}while((e|0)!=0)}f=a+80|0;e=c[f>>2]|0;if((e|0)==0){f=a+72|0;c[f>>2]=0;c[b>>2]=0;i=d;return}h=a+68|0;g=a+76|0;c[h>>2]=od(c[h>>2]|0,(c[g>>2]|0)+e|0)|0;c[g>>2]=(c[g>>2]|0)+(c[f>>2]|0);c[f>>2]=0;f=a+72|0;c[f>>2]=0;c[b>>2]=0;i=d;return}function wb(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;d=c[a+104>>2]|0;e=a+84|0;f=c[e>>2]|0;if((f|0)!=0){do{j=f;f=c[f+4>>2]|0;md(c[j>>2]|0);md(j)}while((f|0)!=0)}j=a+80|0;f=c[j>>2]|0;g=a+68|0;h=c[g>>2]|0;if((f|0)!=0){k=a+76|0;h=od(h,(c[k>>2]|0)+f|0)|0;c[g>>2]=h;c[k>>2]=(c[k>>2]|0)+(c[j>>2]|0);c[j>>2]=0}c[a+72>>2]=0;c[e>>2]=0;if((h|0)!=0){md(h)}if((d|0)==0){d=a+0|0;a=d+112|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(a|0));i=b;return 0}e=d+12|0;f=0;while(1){g=e+(f<<2)|0;bb(c[g>>2]|0);if((f|0)!=7){md(c[g>>2]|0);f=f+1|0;if((f|0)==15){break}else{continue}}else{f=f+1|0;continue}}md(d);d=a+0|0;a=d+112|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(a|0));i=b;return 0}function xb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;f=c[b+28>>2]|0;if((f|0)==0){q=1;i=e;return q|0}o=c[f+3656>>2]|0;h=a+0|0;g=h+112|0;do{c[h>>2]=0;h=h+4|0}while((h|0)<(g|0));g=nd(1,136)|0;c[a+104>>2]=g;c[a+4>>2]=b;h=c[f+8>>2]|0;h=(h|0)==0?0:h+ -1|0;if((h|0)==0){p=0}else{p=0;do{p=p+1|0;h=h>>>1}while((h|0)!=0)}c[g+44>>2]=p;r=nd(1,4)|0;c[g+12>>2]=r;q=nd(1,4)|0;p=g+16|0;c[p>>2]=q;h=nd(1,20)|0;c[r>>2]=h;c[q>>2]=nd(1,20)|0;hb(h,c[f>>2]>>o);h=f+4|0;hb(c[c[p>>2]>>2]|0,c[h>>2]>>o);o=c[f>>2]|0;p=(o|0)==0?0:o+ -1|0;if((p|0)==0){p=-6}else{q=0;while(1){p=p>>>1;if((p|0)==0){break}else{q=q+1|0}}p=q+ -5|0}c[g+4>>2]=p;q=c[h>>2]|0;q=(q|0)==0?0:q+ -1|0;if((q|0)==0){p=-6}else{p=0;while(1){q=q>>>1;if((q|0)==0){break}else{p=p+1|0}}p=p+ -5|0}c[g+8>>2]=p;a:do{if((d|0)==0){n=f+2848|0;if((c[n>>2]|0)==0?(j=f+24|0,c[n>>2]=nd(c[j>>2]|0,56)|0,m=c[j>>2]|0,(m|0)>0):0){l=f+1824|0;p=0;while(1){o=l+(p<<2)|0;d=c[o>>2]|0;if((d|0)==0){break}if((Yc((c[n>>2]|0)+(p*56|0)|0,d)|0)!=0){k=27;break}Vc(c[o>>2]|0);c[o>>2]=0;p=p+1|0;m=c[j>>2]|0;if((p|0)>=(m|0)){break a}}if((k|0)==27){m=c[j>>2]|0}if((m|0)>0){f=0;do{b=l+(f<<2)|0;g=c[b>>2]|0;if((g|0)!=0){Vc(g);c[b>>2]=0;m=c[j>>2]|0}f=f+1|0}while((f|0)<(m|0))}yb(a);r=-1;i=e;return r|0}}else{ob(g+20|0,o);ob(g+32|0,c[h>>2]|0);j=f+2848|0;b:do{if((c[j>>2]|0)==0?(l=f+24|0,n=nd(c[l>>2]|0,56)|0,c[j>>2]=n,(c[l>>2]|0)>0):0){k=f+1824|0;m=0;while(1){Xc(n+(m*56|0)|0,c[k+(m<<2)>>2]|0)|0;m=m+1|0;if((m|0)>=(c[l>>2]|0)){break b}n=c[j>>2]|0}}}while(0);m=f+28|0;d=nd(c[m>>2]|0,52)|0;l=g+56|0;c[l>>2]=d;c:do{if((c[m>>2]|0)>0){k=f+2852|0;j=f+2868|0;n=b+8|0;o=0;while(1){r=c[k+(o<<2)>>2]|0;Kb(d+(o*52|0)|0,r,j,(c[f+(c[r>>2]<<2)>>2]|0)/2|0,c[n>>2]|0);o=o+1|0;if((o|0)>=(c[m>>2]|0)){break c}d=c[l>>2]|0}}}while(0);c[a>>2]=1}}while(0);j=c[h>>2]|0;c[a+16>>2]=j;k=c[b+4>>2]|0;r=k<<2;l=ld(r)|0;b=a+8|0;c[b>>2]=l;c[a+12>>2]=ld(r)|0;d:do{if((k|0)>0){m=0;while(1){c[l+(m<<2)>>2]=nd(j,4)|0;m=m+1|0;if((m|0)>=(k|0)){break d}l=c[b>>2]|0}}}while(0);c[a+36>>2]=0;c[a+40>>2]=0;j=(c[h>>2]|0)/2|0;c[a+48>>2]=j;c[a+20>>2]=j;j=f+16|0;h=g+48|0;c[h>>2]=nd(c[j>>2]|0,4)|0;b=f+20|0;g=g+52|0;c[g>>2]=nd(c[b>>2]|0,4)|0;if((c[j>>2]|0)>0){m=f+800|0;l=f+1056|0;k=0;do{r=Ra[c[(c[58416+(c[m+(k<<2)>>2]<<2)>>2]|0)+8>>2]&127](a,c[l+(k<<2)>>2]|0)|0;c[(c[h>>2]|0)+(k<<2)>>2]=r;k=k+1|0}while((k|0)<(c[j>>2]|0))}if((c[b>>2]|0)<=0){r=0;i=e;return r|0}h=f+1312|0;f=f+1568|0;j=0;do{r=Ra[c[(c[58424+(c[h+(j<<2)>>2]<<2)>>2]|0)+8>>2]&127](a,c[f+(j<<2)>>2]|0)|0;c[(c[g>>2]|0)+(j<<2)>>2]=r;j=j+1|0}while((j|0)<(c[b>>2]|0));a=0;i=e;return a|0}function yb(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=i;if((a|0)==0){i=b;return}j=c[a+4>>2]|0;h=(j|0)!=0;if(h){l=c[j+28>>2]|0}else{l=0}d=c[a+104>>2]|0;e=(d|0)!=0;if(e){o=c[d>>2]|0;if((o|0)!=0){Db(o);md(c[d>>2]|0)}p=d+12|0;o=c[p>>2]|0;if((o|0)!=0){ib(c[o>>2]|0);md(c[c[p>>2]>>2]|0);md(c[p>>2]|0)}p=d+16|0;o=c[p>>2]|0;if((o|0)!=0){ib(c[o>>2]|0);md(c[c[p>>2]>>2]|0);md(c[p>>2]|0)}o=d+48|0;q=c[o>>2]|0;if((q|0)!=0){if((l|0)!=0?(n=l+16|0,(c[n>>2]|0)>0):0){p=0;do{Ma[c[(c[58416+(c[l+(p<<2)+800>>2]<<2)>>2]|0)+16>>2]&127](c[q+(p<<2)>>2]|0);p=p+1|0;q=c[o>>2]|0}while((p|0)<(c[n>>2]|0))}md(q)}n=d+52|0;p=c[n>>2]|0;if((p|0)!=0){if((l|0)!=0?(m=l+20|0,(c[m>>2]|0)>0):0){o=0;do{Ma[c[(c[58424+(c[l+(o<<2)+1312>>2]<<2)>>2]|0)+16>>2]&127](c[p+(o<<2)>>2]|0);o=o+1|0;p=c[n>>2]|0}while((o|0)<(c[m>>2]|0))}md(p)}m=d+56|0;n=c[m>>2]|0;if((n|0)!=0){if((l|0)!=0?(k=l+28|0,(c[k>>2]|0)>0):0){l=0;do{Mb(n+(l*52|0)|0);l=l+1|0;n=c[m>>2]|0}while((l|0)<(c[k>>2]|0))}md(n)}k=c[d+60>>2]|0;if((k|0)!=0){Ib(k)}_c(d+80|0);pb(d+20|0);pb(d+32|0)}k=a+8|0;l=c[k>>2]|0;if((l|0)!=0){if(h?(f=j+4|0,g=c[f>>2]|0,(g|0)>0):0){h=0;do{j=c[l+(h<<2)>>2]|0;if((j|0)!=0){md(j);g=c[f>>2]|0}h=h+1|0;l=c[k>>2]|0}while((h|0)<(g|0))}md(l);f=c[a+12>>2]|0;if((f|0)!=0){md(f)}}if(e){e=c[d+64>>2]|0;if((e|0)!=0){md(e)}e=c[d+68>>2]|0;if((e|0)!=0){md(e)}e=c[d+72>>2]|0;if((e|0)!=0){md(e)}md(d)}d=a+0|0;a=d+112|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(a|0));i=b;return}function zb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;if((xb(a,b,0)|0)!=0){yb(a);e=1;i=d;return e|0}e=c[a+4>>2]|0;b=c[a+104>>2]|0;if((b|0)==0|(e|0)==0){e=0;i=d;return e|0}e=c[e+28>>2]|0;if((e|0)==0){e=0;i=d;return e|0}f=c[e+3656>>2]|0;e=c[e+4>>2]>>f+1;c[a+48>>2]=e;c[a+20>>2]=e>>f;c[a+24>>2]=-1;f=a+56|0;e=a+32|0;c[f+0>>2]=-1;c[f+4>>2]=-1;c[f+8>>2]=-1;c[f+12>>2]=-1;c[e>>2]=0;e=b+128|0;c[e>>2]=-1;c[e+4>>2]=-1;e=0;i=d;return e|0}function Ab(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;f=i;w=c[a+4>>2]|0;n=c[w+28>>2]|0;p=c[a+104>>2]|0;d=c[n+3656>>2]|0;if((b|0)==0){N=-131;i=f;return N|0}e=a+20|0;s=c[e>>2]|0;j=a+24|0;x=c[j>>2]|0;if(!((s|0)<=(x|0)|(x|0)==-1)){N=-131;i=f;return N|0}m=a+40|0;K=c[m>>2]|0;o=a+36|0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|0)!=0;a:do{if((K|0)==0){M=Eb((c[H>>2]|0)-d|0)|0;K=c[(c[G>>2]|0)+(J<<2)>>2]|0;L=c[(c[b>>2]|0)+(J<<2)>>2]|0;if(!N){if(y){N=0}else{break}while(1){O=K+(N+q<<2)|0;g[O>>2]=+g[O>>2]*+g[M+(z-N<<2)>>2]+ +g[L+(N<<2)>>2]*+g[M+(N<<2)>>2];N=N+1|0;if((N|0)==(u|0)){break a}}}if(y){N=0;do{O=K+(N+q<<2)|0;g[O>>2]=+g[O>>2]*+g[M+(z-N<<2)>>2]+ +g[L+(N+x<<2)>>2]*+g[M+(N<<2)>>2];N=N+1|0}while((N|0)!=(u|0));M=u}else{M=0}if((M|0)<(F|0)){do{g[K+(M+q<<2)>>2]=+g[L+(M+x<<2)>>2];M=M+1|0}while((M|0)!=(F|0))}}else{if(N){N=Eb((c[B>>2]|0)-d|0)|0;K=c[(c[G>>2]|0)+(J<<2)>>2]|0;L=c[(c[b>>2]|0)+(J<<2)>>2]|0;if(E){M=0}else{break}do{O=K+(M+q<<2)|0;g[O>>2]=+g[O>>2]*+g[N+(C-M<<2)>>2]+ +g[L+(M<<2)>>2]*+g[N+(M<<2)>>2];M=M+1|0}while((M|0)!=(t|0))}else{M=Eb((c[H>>2]|0)-d|0)|0;K=c[(c[G>>2]|0)+(J<<2)>>2]|0;L=c[(c[b>>2]|0)+(J<<2)>>2]|0;if(y){N=0}else{break}do{O=K+(I+N<<2)|0;g[O>>2]=+g[O>>2]*+g[M+(z-N<<2)>>2]+ +g[L+(N<<2)>>2]*+g[M+(N<<2)>>2];N=N+1|0}while((N|0)!=(u|0))}}}while(0);if(A){M=0;do{g[K+(M+r<<2)>>2]=+g[L+(M+v<<2)>>2];M=M+1|0}while((M|0)!=(v|0))}J=J+1|0;if((J|0)>=(c[w>>2]|0)){break}K=c[o>>2]|0;L=c[m>>2]|0}y=c[s>>2]|0;x=c[j>>2]|0}c[s>>2]=(y|0)==0?t:0;if((x|0)==-1){c[j>>2]=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0)<0?0:O)>>d)}O=p;c[O>>2]=j;c[O+4>>2]=k}}}while(0);if((c[b+44>>2]|0)==0){O=0;i=f;return O|0}c[a+32>>2]=1;O=0;i=f;return O|0}function Bb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;e=c[a+24>>2]|0;if(!((e|0)>-1)){j=0;i=d;return j|0}f=c[a+20>>2]|0;if((e|0)>=(f|0)){j=0;i=d;return j|0}if((b|0)!=0){g=c[(c[a+4>>2]|0)+4>>2]|0;if((g|0)>0){h=a+8|0;a=a+12|0;j=0;do{c[(c[a>>2]|0)+(j<<2)>>2]=(c[(c[h>>2]|0)+(j<<2)>>2]|0)+(e<<2);j=j+1|0}while((j|0)<(g|0))}else{a=a+12|0}c[b>>2]=c[a>>2]}j=f-e|0;i=d;return j|0}function Cb(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;e=c[a+24>>2]|0;if((b|0)!=0?(e+b|0)>(c[a+20>>2]|0):0){a=-131;i=d;return a|0}c[a+24>>2]=e+b;a=0;i=d;return a|0}function Db(a){a=a|0;var b=0;b=i;ib(a+16|0);md(c[a+48>>2]|0);md(c[a+64>>2]|0);md(c[a+80>>2]|0);md(c[a+96>>2]|0);md(c[a+112>>2]|0);md(c[a+128>>2]|0);md(c[a+144>>2]|0);md(c[a+36>>2]|0);md(c[a+152>>2]|0);md(c[a+160>>2]|0);ud(a|0,0,180)|0;i=b;return}function Eb(a){a=a|0;return c[160+(a<<2)>>2]|0}function Fb(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 j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;j=i;l=(f|0)!=0;p=l?e:0;l=l?h:0;h=c[160+(c[b+(p<<2)>>2]<<2)>>2]|0;b=c[160+(c[b+(l<<2)>>2]<<2)>>2]|0;f=c[d+(f<<2)>>2]|0;p=c[d+(p<<2)>>2]|0;l=c[d+(l<<2)>>2]|0;n=(f|0)/4|0;q=(p|0)/4|0;o=n-q|0;p=(p|0)/2|0;k=((f|0)/2|0)+n+((l|0)/-4|0)|0;e=(l|0)/2|0;d=k+e|0;if((o|0)>0){ud(a|0,0,o<<2|0)|0;m=o}else{m=0}if((m|0)<(o+p|0)){n=n+p-m-q|0;o=0;while(1){q=a+(m<<2)|0;g[q>>2]=+g[h+(o<<2)>>2]*+g[q>>2];o=o+1|0;if((o|0)==(n|0)){break}else{m=m+1|0}}}if((l|0)>1){l=k+1|0;h=(d|0)>(l|0);do{e=e+ -1|0;q=a+(k<<2)|0;g[q>>2]=+g[b+(e<<2)>>2]*+g[q>>2];k=k+1|0}while((k|0)<(d|0));k=h?d:l}if((k|0)>=(f|0)){i=j;return}ud(a+(k<<2)|0,0,f-k<<2|0)|0;i=j;return}function Gb(a,b,d,e,f,h,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;j=+j;k=+k;var l=0,m=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0;l=i;m=3.141592653589793/+(e|0);if((h|0)>0){e=0;do{r=f+(e<<2)|0;g[r>>2]=+R(+(+g[r>>2]))*2.0;e=e+1|0}while((e|0)!=(h|0))}if((d|0)<=0){i=l;return}if((h|0)>1){n=0}else{n=0;do{e=c[b+(n<<2)>>2]|0;p=+R(+(m*+(e|0)))*2.0;if((h|0)==1){q=(p- +g[f>>2])*.5;o=4.0-p*p;p=q*q}else{o=2.0-p;p=(p+2.0)*.25}o=+Y(+((j/+P(+(o*.25+p))-k)*.1151292473077774));r=a+(n<<2)|0;g[r>>2]=+g[r>>2]*o;n=n+1|0;if((c[b+(n<<2)>>2]|0)==(e|0)){do{r=a+(n<<2)|0;g[r>>2]=o*+g[r>>2];n=n+1|0}while((c[b+(n<<2)>>2]|0)==(e|0))}}while((n|0)<(d|0));i=l;return}do{e=c[b+(n<<2)>>2]|0;o=+R(+(m*+(e|0)))*2.0;r=1;q=.5;p=.5;do{p=p*(o- +g[f+(r+ -1<<2)>>2]);q=q*(o- +g[f+(r<<2)>>2]);r=r+2|0}while((r|0)<(h|0));if((r|0)==(h|0)){p=p*(o- +g[f+(h+ -1<<2)>>2]);q=(4.0-o*o)*q*q;o=p*p}else{q=(2.0-o)*q*q;o=(o+2.0)*p*p}o=+Y(+((j/+P(+(q+o))-k)*.1151292473077774));r=a+(n<<2)|0;g[r>>2]=+g[r>>2]*o;n=n+1|0;if((c[b+(n<<2)>>2]|0)==(e|0)){do{r=a+(n<<2)|0;g[r>>2]=o*+g[r>>2];n=n+1|0}while((c[b+(n<<2)>>2]|0)==(e|0))}}while((n|0)<(d|0));i=l;return}function Hb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;g=(a|0)!=0;if(g?(e=c[a+64>>2]|0,(e|0)!=0):0){k=c[e+104>>2]|0;f=c[e+4>>2]|0;if((f|0)==0){j=0;l=1;e=0;f=0}else{j=0;l=0;e=c[f+28>>2]|0}}else{k=0;j=1;l=1;e=0;f=0}h=g?a+4|0:0;if(j|(k|0)==0|l|(e|0)==0|(h|0)==0){l=-136;i=d;return l|0}vb(a);cb(h,c[b>>2]|0,c[b+4>>2]|0);if((fb(h,1)|0)!=0){l=-135;i=d;return l|0}g=fb(h,c[k+44>>2]|0)|0;if((g|0)==-1){l=-136;i=d;return l|0}c[a+40>>2]=g;g=e+(g<<2)+32|0;j=c[g>>2]|0;if((j|0)==0){l=-136;i=d;return l|0}l=c[j>>2]|0;j=a+28|0;c[j>>2]=l;do{if((l|0)!=0){c[a+24>>2]=fb(h,1)|0;l=fb(h,1)|0;c[a+32>>2]=l;if((l|0)==-1){l=-136;i=d;return l|0}else{h=c[j>>2]|0;break}}else{c[a+24>>2]=0;c[a+32>>2]=0;h=0}}while(0);l=b+16|0;k=c[l+4>>2]|0;j=a+48|0;c[j>>2]=c[l>>2];c[j+4>>2]=k;j=b+24|0;k=c[j+4>>2]|0;l=a+56|0;c[l>>2]=c[j>>2];c[l+4>>2]=k;c[a+44>>2]=c[b+12>>2];b=a+36|0;c[b>>2]=c[e+(h<<2)>>2];f=f+4|0;c[a>>2]=ub(a,c[f>>2]<<2)|0;if((c[f>>2]|0)>0){h=0;do{l=ub(a,c[b>>2]<<2)|0;c[(c[a>>2]|0)+(h<<2)>>2]=l;h=h+1|0}while((h|0)<(c[f>>2]|0))}l=c[(c[g>>2]|0)+12>>2]|0;l=Ra[c[(c[58440+(c[e+(l<<2)+288>>2]<<2)>>2]|0)+16>>2]&127](a,c[e+(l<<2)+544>>2]|0)|0;i=d;return l|0}function Ib(a){a=a|0;var b=0;b=i;if((a|0)!=0){md(a)}i=b;return}function Jb(a){a=a|0;var b=0;b=i;if((a|0)!=0){md(a)}i=b;return}function Kb(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0.0,w=0,x=0,y=0.0,z=0,A=0,B=0.0;h=i;m=a+0|0;k=m+48|0;do{c[m>>2]=0;m=m+4|0}while((m|0)<(k|0));c[a+36>>2]=c[d>>2];m=c[d>>2]|0;p=~~(+Ha(+(+Z(+(+(m|0)*8.0))*1.4426950408889634))+-1.0);c[a+32>>2]=p;y=+(f|0);l=+(e|0);n=+(1<>2]=m;c[a+40>>2]=1-m+~~((+Z(+((+(e|0)+.25)*y*.5/l))*1.4426950216293335+-5.965784072875977)*n+.5);m=e<<2;p=ld(m)|0;c[a+16>>2]=p;d=ld(m)|0;c[a+20>>2]=d;o=ld(m)|0;c[a+24>>2]=o;k=a+4|0;c[k>>2]=b;c[a>>2]=e;c[a+44>>2]=f;q=a+48|0;g[q>>2]=1.0;do{if((f|0)>=26e3){if((f|0)<38e3){g[q>>2]=.9399999976158142;break}if((f|0)>46e3){g[q>>2]=1.274999976158142}}else{g[q>>2]=0.0}}while(0);j=+(f|0);q=0;s=0;a:while(1){do{if((q|0)>=87){break a}A=q;q=q+1|0;r=~~+Ha(+(l*+Y(+(+(q|0)*.08664337545633316+2.7488713472395148))*2.0/j));y=+g[32832+(A<<2)>>2]}while((s|0)>=(r|0));v=(+g[32832+(q<<2)>>2]-y)/+(r-s|0);if((s|0)>=(e|0)){continue}A=s-r|0;r=s-e|0;r=s-(A>>>0>r>>>0?A:r)|0;while(1){g[p+(s<<2)>>2]=y+100.0;s=s+1|0;if((s|0)==(r|0)){s=r;continue a}else{y=v+y}}}if((s|0)<(e|0)){do{g[p+(s<<2)>>2]=+g[p+(s+ -1<<2)>>2];s=s+1|0}while((s|0)!=(e|0))}p=(e|0)>0;if(p){q=(f|0)/(e<<1|0)|0;t=c[b+120>>2]|0;f=b+124|0;s=b+116|0;r=b+112|0;w=1;u=0;x=-99;do{A=$(q,u)|0;v=+(A|0);v=+W(+(v*.0007399999885819852))*13.100000381469727+ +W(+(+($(A,A)|0)*1.8499999754340024e-8))*2.240000009536743+v*9999999747378752.0e-20;b:do{if((t+x|0)<(u|0)){y=v- +g[r>>2];while(1){A=$(x,q)|0;B=+(A|0);z=x+1|0;if(!(B*9999999747378752.0e-20+(+W(+(B*.0007399999885819852))*13.100000381469727+ +W(+(+($(A,A)|0)*1.8499999754340024e-8))*2.240000009536743)>2]|0)+u|0;while(1){if((w|0)>=(z|0)?(A=$(w,q)|0,B=+(A|0),B=B*9999999747378752.0e-20+(+W(+(B*.0007399999885819852))*13.100000381469727+ +W(+(+($(A,A)|0)*1.8499999754340024e-8))*2.240000009536743),!(B>2])):0){break c}A=w+1|0;if((w|0)<(e|0)){w=A}else{w=A;break}}}}while(0);c[o+(u<<2)>>2]=(x<<16)+ -65537+w;u=u+1|0}while((u|0)<(e|0));if(p){o=0;do{c[d+(o<<2)>>2]=~~((+Z(+(j*(+(o|0)+.25)*.5/l))*1.4426950216293335+-5.965784072875977)*n+.5);o=o+1|0}while((o|0)!=(e|0))}}c[a+8>>2]=Lb(b+36|0,j*.5/l,e,+g[b+24>>2],+g[b+28>>2])|0;A=ld(12)|0;c[a+12>>2]=A;a=ld(m)|0;c[A>>2]=a;b=ld(m)|0;c[A+4>>2]=b;m=ld(m)|0;c[A+8>>2]=m;if(!p){i=h;return}l=l*2.0;d=c[k>>2]|0;k=0;do{B=+Z(+(j*(+(k|0)+.5)/l))*2.885390043258667+-11.931568145751953;B=B<0.0?0.0:B;B=!(B>=16.0)?B:16.0;z=~~B;B=B- +(z|0);y=1.0-B;A=z+1|0;g[a+(k<<2)>>2]=y*+g[d+(z<<2)+132>>2]+B*+g[d+(A<<2)+132>>2];g[b+(k<<2)>>2]=y*+g[d+(z<<2)+200>>2]+B*+g[d+(A<<2)+200>>2];g[m+(k<<2)>>2]=y*+g[d+(z<<2)+268>>2]+B*+g[d+(A<<2)+268>>2];k=k+1|0}while((k|0)!=(e|0));i=h;return}function Lb(a,b,d,e,f){a=a|0;b=+b;d=d|0;e=+e;f=+f;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0,y=0.0,z=0,A=0,B=0,C=0,D=0;j=i;i=i+32480|0;p=j+32256|0;l=j+1792|0;o=j;h=i;i=i+((1*(d<<2)|0)+15&-16)|0;k=ld(68)|0;ud(l|0,0,30464)|0;q=e>0.0;n=e<0.0;m=0;do{s=m<<2;r=0;do{t=r+s|0;if((t|0)<88){w=+g[32832+(t<<2)>>2]}else{w=-30.0}u=t+1|0;if((u|0)<88){y=+g[32832+(u<<2)>>2];if(w>y){w=y}}else{if(w>-30.0){w=-30.0}}u=t+2|0;if((u|0)<88){y=+g[32832+(u<<2)>>2];if(w>y){w=y}}else{if(w>-30.0){w=-30.0}}t=t+3|0;if((t|0)<88){y=+g[32832+(t<<2)>>2];if(w>y){w=y}}else{if(w>-30.0){w=-30.0}}g[p+(r<<2)>>2]=w;r=r+1|0}while((r|0)!=56);C=34352+(m*1344|0)|0;yd(l+(m*1792|0)+448|0,C|0,224)|0;yd(l+(m*1792|0)+672|0,34576+(m*1344|0)|0,224)|0;yd(l+(m*1792|0)+896|0,34800+(m*1344|0)|0,224)|0;yd(l+(m*1792|0)+1120|0,35024+(m*1344|0)|0,224)|0;yd(l+(m*1792|0)+1344|0,35248+(m*1344|0)|0,224)|0;yd(l+(m*1792|0)+1568|0,35472+(m*1344|0)|0,224)|0;yd(l+(m*1792|0)|0,C|0,224)|0;yd(l+(m*1792|0)+224|0,C|0,224)|0;if(q){r=0;do{if(n){s=0;do{C=16-s|0;y=+(((C|0)>-1?C:0-C|0)|0)*f+e;y=y<0.0?0.0:y;C=l+(m*1792|0)+(r*224|0)+(s<<2)|0;g[C>>2]=(y>0.0?0.0:y)+ +g[C>>2];s=s+1|0}while((s|0)!=56)}else{s=0;do{C=16-s|0;y=+(((C|0)>-1?C:0-C|0)|0)*f+e;C=l+(m*1792|0)+(r*224|0)+(s<<2)|0;g[C>>2]=(y<0.0?0.0:y)+ +g[C>>2];s=s+1|0}while((s|0)!=56)}r=r+1|0}while((r|0)!=8)}else{r=0;do{if(n){s=0;do{C=16-s|0;y=+(((C|0)>-1?C:0-C|0)|0)*f+e;C=l+(m*1792|0)+(r*224|0)+(s<<2)|0;g[C>>2]=(y>0.0?0.0:y)+ +g[C>>2];s=s+1|0}while((s|0)!=56)}else{s=0;do{B=16-s|0;C=l+(m*1792|0)+(r*224|0)+(s<<2)|0;g[C>>2]=+(((B|0)>-1?B:0-B|0)|0)*f+e+ +g[C>>2];s=s+1|0}while((s|0)!=56)}r=r+1|0}while((r|0)!=8)}w=+g[a+(m<<2)>>2]+100.0;r=0;do{y=w-((r|0)<2?20.0:+(r|0)*10.0)+-30.0;s=0;do{C=l+(m*1792|0)+(r*224|0)+(s<<2)|0;g[C>>2]=y+ +g[C>>2];s=s+1|0}while((s|0)!=56);yd(o+(r*224|0)|0,p|0,224)|0;y=100.0- +(r|0)*10.0+-30.0;s=0;do{C=o+(r*224|0)+(s<<2)|0;g[C>>2]=y+ +g[C>>2];s=s+1|0}while((s|0)!=56);s=0;do{y=+g[l+(m*1792|0)+(r*224|0)+(s<<2)>>2];t=o+(r*224|0)+(s<<2)|0;if(y>+g[t>>2]){g[t>>2]=y}s=s+1|0}while((s|0)!=56);r=r+1|0}while((r|0)!=8);r=1;do{s=r+ -1|0;t=0;do{w=+g[o+(s*224|0)+(t<<2)>>2];u=o+(r*224|0)+(t<<2)|0;if(w<+g[u>>2]){g[u>>2]=w}t=t+1|0}while((t|0)!=56);s=0;do{w=+g[o+(r*224|0)+(s<<2)>>2];t=l+(m*1792|0)+(r*224|0)+(s<<2)|0;if(w<+g[t>>2]){g[t>>2]=w}s=s+1|0}while((s|0)!=56);r=r+1|0}while((r|0)!=8);m=m+1|0}while((m|0)!=17);f=b;p=(d|0)>0;n=~d;q=0;do{t=ld(32)|0;c[k+(q<<2)>>2]=t;y=+(q|0);e=y*.5;r=~~+N(+(+Y(+(y*.34657350182533264+4.135165354540845))/f));a=~~+_(+(+Z(+(+(r|0)*b+1.0))*2.885390043258667+-11.931568145751953));r=~~+N(+(+Z(+(+(r+1|0)*b))*2.885390043258667+-11.931568145751953));a=(a|0)>(q|0)?q:a;a=(a|0)<0?0:a;r=(r|0)>16?16:r;s=(a|0)>(r|0);q=q+1|0;m=(q|0)<17;o=0;do{u=ld(232)|0;c[t+(o<<2)>>2]=u;if(p){v=0;do{g[h+(v<<2)>>2]=999.0;v=v+1|0}while((v|0)!=(d|0))}if(!s){v=a;while(1){w=+(v|0)*.5;x=0;B=0;while(1){y=w+ +(x|0)*.125;C=~~(+Y(+((y+3.9032840728759766)*.6931470036506653))/f);A=~~(+Y(+((y+4.028284072875977)*.6931470036506653))/f+1.0);z=(C|0)<0?0:C;z=(z|0)>(d|0)?d:z;z=(z|0)<(B|0)?z:B;D=(A|0)<0?0:A;if((z|0)<(d|0)?(z|0)<(((D|0)>(d|0)?d:D)|0):0){y=+g[l+(v*1792|0)+(o*224|0)+(x<<2)>>2];D=~B;D=(D|0)>(n|0)?D:n;C=(C|0)>0?~C:-1;C=(D|0)>(C|0)?D:C;D=(A|0)>0?~A:-1;D=((D|0)<(n|0)?n:D)-C|0;A=~(C+d);A=~C-(D>>>0>A>>>0?D:A)|0;do{B=h+(z<<2)|0;if(+g[B>>2]>y){g[B>>2]=y}z=z+1|0}while((z|0)!=(A|0));z=A}x=x+1|0;if((x|0)==56){break}else{B=z}}if((z|0)<(d|0)){w=+g[l+(v*1792|0)+(o*224|0)+220>>2];do{x=h+(z<<2)|0;if(+g[x>>2]>w){g[x>>2]=w}z=z+1|0}while((z|0)!=(d|0))}if((v|0)<(r|0)){v=v+1|0}else{break}}}if(m){v=0;A=0;while(1){y=e+ +(v|0)*.125;B=~~(+Y(+((y+3.9032840728759766)*.6931470036506653))/f);z=~~(+Y(+((y+4.028284072875977)*.6931470036506653))/f+1.0);x=(B|0)<0?0:B;x=(x|0)>(d|0)?d:x;x=(x|0)<(A|0)?x:A;D=(z|0)<0?0:z;if((x|0)<(d|0)?(x|0)<(((D|0)>(d|0)?d:D)|0):0){w=+g[l+(q*1792|0)+(o*224|0)+(v<<2)>>2];D=~A;D=(D|0)>(n|0)?D:n;C=(B|0)>0?~B:-1;C=(D|0)>(C|0)?D:C;D=(z|0)>0?~z:-1;D=((D|0)<(n|0)?n:D)-C|0;z=~(C+d);z=~C-(D>>>0>z>>>0?D:z)|0;do{A=h+(x<<2)|0;if(+g[A>>2]>w){g[A>>2]=w}x=x+1|0}while((x|0)!=(z|0));x=z}v=v+1|0;if((v|0)==56){break}else{A=x}}if((x|0)<(d|0)){w=+g[l+(q*1792|0)+(o*224|0)+220>>2];do{v=h+(x<<2)|0;if(+g[v>>2]>w){g[v>>2]=w}x=x+1|0}while((x|0)!=(d|0));x=0}else{x=0}}else{x=0}do{v=~~(+Y(+((e+ +(x|0)*.125+3.9657840728759766)*.6931470036506653))/f);do{if((v|0)>=0){if((v|0)<(d|0)){g[u+(x+2<<2)>>2]=+g[h+(v<<2)>>2];break}else{g[u+(x+2<<2)>>2]=-999.0;break}}else{g[u+(x+2<<2)>>2]=-999.0}}while(0);x=x+1|0}while((x|0)!=56);v=0;while(1){x=v+1|0;if(+g[u+(v+2<<2)>>2]>-200.0){break}if((x|0)<16){v=x}else{v=x;break}}g[u>>2]=+(v|0);v=55;while(1){x=v+ -1|0;if(+g[u+(v+2<<2)>>2]>-200.0){break}if((x|0)>17){v=x}else{v=x;break}}g[u+4>>2]=+(v|0);o=o+1|0}while((o|0)!=8)}while((q|0)!=17);i=j;return k|0}function Mb(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;if((a|0)==0){i=b;return}d=c[a+16>>2]|0;if((d|0)!=0){md(d)}d=c[a+20>>2]|0;if((d|0)!=0){md(d)}d=c[a+24>>2]|0;if((d|0)!=0){md(d)}d=a+8|0;e=c[d>>2]|0;if((e|0)!=0){f=0;do{md(c[c[e+(f<<2)>>2]>>2]|0);md(c[(c[(c[d>>2]|0)+(f<<2)>>2]|0)+4>>2]|0);md(c[(c[(c[d>>2]|0)+(f<<2)>>2]|0)+8>>2]|0);md(c[(c[(c[d>>2]|0)+(f<<2)>>2]|0)+12>>2]|0);md(c[(c[(c[d>>2]|0)+(f<<2)>>2]|0)+16>>2]|0);md(c[(c[(c[d>>2]|0)+(f<<2)>>2]|0)+20>>2]|0);md(c[(c[(c[d>>2]|0)+(f<<2)>>2]|0)+24>>2]|0);md(c[(c[(c[d>>2]|0)+(f<<2)>>2]|0)+28>>2]|0);md(c[(c[d>>2]|0)+(f<<2)>>2]|0);f=f+1|0;e=c[d>>2]|0}while((f|0)!=17);md(e)}e=a+12|0;d=c[e>>2]|0;if((d|0)!=0){md(c[d>>2]|0);md(c[(c[e>>2]|0)+4>>2]|0);md(c[(c[e>>2]|0)+8>>2]|0);md(c[e>>2]|0)}d=a+0|0;a=d+52|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(a|0));i=b;return}function Nb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,j=0,k=0,l=0;h=i;e=c[a>>2]|0;f=i;i=i+((1*(e<<2)|0)+15&-16)|0;k=a+24|0;Ob(e,c[k>>2]|0,b,d,140.0,-1);j=(e|0)>0;if(j){l=0;do{g[f+(l<<2)>>2]=+g[b+(l<<2)>>2]- +g[d+(l<<2)>>2];l=l+1|0}while((l|0)!=(e|0))}a=a+4|0;Ob(e,c[k>>2]|0,f,d,0.0,c[(c[a>>2]|0)+128>>2]|0);if(j){k=0}else{i=h;return}do{l=f+(k<<2)|0;g[l>>2]=+g[b+(k<<2)>>2]- +g[l>>2];k=k+1|0}while((k|0)!=(e|0));if(!j){i=h;return}j=c[a>>2]|0;b=0;do{l=d+(b<<2)|0;a=~~(+g[l>>2]+.5);a=(a|0)>39?39:a;g[l>>2]=+g[f+(b<<2)>>2]+ +g[j+(((a|0)<0?0:a)<<2)+336>>2];b=b+1|0}while((b|0)!=(e|0));i=h;return}function Ob(a,b,d,e,f,h){a=a|0;b=b|0;d=d|0;e=e|0;f=+f;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0.0,w=0,x=0.0,y=0.0,z=0.0,A=0.0;j=i;w=a<<2;k=i;i=i+((1*w|0)+15&-16)|0;o=i;i=i+((1*w|0)+15&-16)|0;l=i;i=i+((1*w|0)+15&-16)|0;m=i;i=i+((1*w|0)+15&-16)|0;n=i;i=i+((1*w|0)+15&-16)|0;v=+g[d>>2]+f;v=v<1.0?1.0:v;r=v*v*.5;v=v*r;g[k>>2]=r;g[o>>2]=r;g[l>>2]=0.0;g[m>>2]=v;g[n>>2]=0.0;if((a|0)>1){p=1;q=r;s=0.0;t=0.0;x=1.0;while(1){z=+g[d+(p<<2)>>2]+f;z=z<1.0?1.0:z;A=z*z;q=q+A;y=x*A;r=r+y;s=s+x*y;v=v+z*A;t=t+z*y;g[k+(p<<2)>>2]=q;g[o+(p<<2)>>2]=r;g[l+(p<<2)>>2]=s;g[m+(p<<2)>>2]=v;g[n+(p<<2)>>2]=t;p=p+1|0;if((p|0)==(a|0)){break}else{x=x+1.0}}}d=c[b>>2]|0;u=d>>16;if((u|0)>-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+(w<<2)>>2];q=v*r-t*z;r=A*z-t*r;t=A*v-t*t;v=(q+s*r)/t-f;u=e+(d<<2)|0;if(v<+g[u>>2]){g[u>>2]=v}d=d+1|0;s=s+1.0;w=b+d|0;if((d|0)==(p|0)){d=p;break}else{u=w;w=w-h|0}}}u=d+b|0;if((u|0)<(a|0)){p=a-b|0;while(1){w=u-h|0;A=+g[k+(u<<2)>>2]- +g[k+(w<<2)>>2];t=+g[o+(u<<2)>>2]- +g[o+(w<<2)>>2];v=+g[l+(u<<2)>>2]- +g[l+(w<<2)>>2];r=+g[m+(u<<2)>>2]- +g[m+(w<<2)>>2];z=+g[n+(u<<2)>>2]- +g[n+(w<<2)>>2];q=v*r-t*z;r=A*z-t*r;t=A*v-t*t;v=(q+s*r)/t-f;u=e+(d<<2)|0;if(v<+g[u>>2]){g[u>>2]=v}d=d+1|0;s=s+1.0;if((d|0)==(p|0)){break}else{u=d+b|0}}}else{p=d}if((p|0)>=(a|0)){i=j;return}while(1){v=(q+r*s)/t-f;h=e+(p<<2)|0;if(v<+g[h>>2]){g[h>>2]=v}p=p+1|0;if((p|0)==(a|0)){break}else{s=s+1.0}}i=j;return}function Pb(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=+e;f=+f;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0;h=i;p=c[a>>2]|0;j=a+40|0;m=c[j>>2]|0;k=i;i=i+((1*(m<<2)|0)+15&-16)|0;l=a+4|0;x=c[l>>2]|0;f=+g[x+4>>2]+f;if((m|0)>0){w=0;do{g[k+(w<<2)>>2]=-9999.0;w=w+1|0}while((w|0)<(m|0))}F=+g[x+8>>2];f=f0;if(y){z=c[a+16>>2]|0;w=0;do{g[d+(w<<2)>>2]=f+ +g[z+(w<<2)>>2];w=w+1|0}while((w|0)!=(p|0));w=c[a+8>>2]|0;e=+g[x+496>>2]-e;if(y){A=c[a+20>>2]|0;x=a+32|0;y=a+36|0;z=a+28|0;D=0;while(1){C=c[A+(D<<2)>>2]|0;B=D;f=+g[b+(D<<2)>>2];a:while(1){E=B;while(1){B=E+1|0;if((B|0)>=(p|0)){D=0;break a}if((c[A+(B<<2)>>2]|0)!=(C|0)){D=1;break a}F=+g[b+(B<<2)>>2];if(F>f){f=F;continue a}else{E=B}}}if(f+6.0>+g[d+(E<<2)>>2]?(t=C>>c[x>>2],t=(t|0)>16?16:t,s=c[y>>2]|0,u=~~((e+f+-30.0)*.10000000149011612),u=(u|0)<0?0:u,u=c[(c[w+(((t|0)<0?0:t)<<2)>>2]|0)+(((u|0)>7?7:u)<<2)>>2]|0,t=~~+g[u+4>>2],v=+g[u>>2],o=~~v,(o|0)<(t|0)):0){C=o;E=~~(+(s|0)*(v+-16.0)+ +((c[A+(E<<2)>>2]|0)-(c[z>>2]|0)|0)- +(s>>1|0));do{if((E|0)>0?(q=f+ +g[u+(C+2<<2)>>2],r=k+(E<<2)|0,+g[r>>2]>2]=q}E=E+s|0;C=C+1|0}while((E|0)<(m|0)&(C|0)<(t|0))}if(D){D=B}else{break}}}else{n=7}}else{n=7}if((n|0)==7){y=a+36|0}p=c[y>>2]|0;Ub(k,p,m);m=c[a>>2]|0;b:do{if((m|0)>1){n=c[a+20>>2]|0;E=c[n>>2]|0;a=c[a+28>>2]|0;l=(c[l>>2]|0)+32|0;r=1;o=E;b=0;p=E-(p>>1)-a|0;while(1){q=+g[k+(p<<2)>>2];r=((c[n+(r<<2)>>2]|0)+o>>1)-a|0;F=+g[l>>2];q=q>F?F:q;c:do{if((p|0)<(r|0)){while(1){s=q==-9999.0;while(1){p=p+1|0;v=+g[k+(p<<2)>>2];if(v>-9999.0){if(v=(r|0)){break c}}if((p|0)<(r|0)){q=v}else{q=v;break}}}}while(0);r=p+a|0;d:do{if(!((b|0)>=(m|0)|(o|0)>(r|0))){do{o=d+(b<<2)|0;if(+g[o>>2]>2]=q}b=b+1|0;if((b|0)>=(m|0)){break d}}while((c[n+(b<<2)>>2]|0)<=(r|0))}}while(0);r=b+1|0;if((r|0)>=(m|0)){break b}o=c[n+(b<<2)>>2]|0}}else{b=0}}while(0);q=+g[k+((c[j>>2]|0)+ -1<<2)>>2];if((b|0)>=(m|0)){i=h;return}do{j=d+(b<<2)|0;if(+g[j>>2]>2]=q}b=b+1|0}while((b|0)!=(m|0));i=h;return}function Qb(a,b,d,e,f,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;j=j|0;var k=0.0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0;m=i;l=c[a>>2]|0;o=c[a+4>>2]|0;k=+g[o+(e<<2)+12>>2];if((l|0)<=0){i=m;return}n=c[(c[a+12>>2]|0)+(e<<2)>>2]|0;o=o+108|0;e=(e|0)==1;p=+g[a+48>>2];a=0;do{q=+g[b+(a<<2)>>2]+ +g[n+(a<<2)>>2];r=+g[o>>2];q=q>r?r:q;r=k+ +g[d+(a<<2)>>2];g[f+(a<<2)>>2]=q>2];q=r+17.200000762939453;if(r>-17.200000762939453){q=1.0-p*q*.005;if(q<0.0){q=9999999747378752.0e-20}}else{q=1.0-p*q*3.0e-4}s=h+(a<<2)|0;g[s>>2]=q*+g[s>>2]}a=a+1|0}while((a|0)!=(l|0));i=m;return}function Rb(a,b,d,e,f,j,k,l,m){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0.0,A=0.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,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0.0,ca=0.0,da=0.0;n=i;o=c[d>>2]|0;q=d+4|0;d=c[q>>2]|0;if((c[d+500>>2]|0)==0){r=16}else{r=c[d+508>>2]|0}w=c[b+((c[d>>2]|0)*60|0)+(a<<2)+132>>2]|0;z=+h[33184+(c[b+(a<<2)+252>>2]<<3)>>3];y=m<<2;x=i;i=i+((1*y|0)+15&-16)|0;s=i;i=i+((1*y|0)+15&-16)|0;t=i;i=i+((1*y|0)+15&-16)|0;u=i;i=i+((1*y|0)+15&-16)|0;v=i;i=i+((1*y|0)+15&-16)|0;d=e+1156|0;A=+h[((o|0)>1e3?33256:33184)+(c[b+(a<<2)+312>>2]<<3)>>3];b=$(y,r)|0;a=i;i=i+((1*b|0)+15&-16)|0;c[x>>2]=a;B=i;i=i+((1*b|0)+15&-16)|0;c[s>>2]=B;C=i;i=i+((1*b|0)+15&-16)|0;c[t>>2]=C;D=i;i=i+((1*b|0)+15&-16)|0;c[u>>2]=D;a:do{if((m|0)>1){E=1;while(1){aa=$(E,r)|0;c[x+(E<<2)>>2]=a+(aa<<2);c[s+(E<<2)>>2]=B+(aa<<2);c[t+(E<<2)>>2]=C+(aa<<2);c[u+(E<<2)>>2]=D+(aa<<2);E=E+1|0;if((E|0)==(m|0)){break a}a=c[x>>2]|0;B=c[s>>2]|0;C=c[t>>2]|0;D=c[u>>2]|0}}}while(0);X=c[d>>2]|0;if((o|0)>0){B=c[u>>2]|0;a=(m|0)>0;C=~r;D=0;E=~o;while(1){G=~((E|0)>(C|0)?E:C);F=o-D|0;F=(r|0)>(F|0)?F:r;yd(v|0,k|0,y|0)|0;ud(B|0,0,b|0)|0;if(a){I=(F|0)>0;H=w-D|0;J=0;do{M=c[j+(J<<2)>>2]|0;L=M+(D<<2)|0;if((c[v+(J<<2)>>2]|0)==0){if(I){Q=c[t+(J<<2)>>2]|0;P=c[x+(J<<2)>>2]|0;K=c[s+(J<<2)>>2]|0;N=c[u+(J<<2)>>2]|0;L=0;do{g[Q+(L<<2)>>2]=1.000000013351432e-10;g[P+(L<<2)>>2]=0.0;g[K+(L<<2)>>2]=0.0;c[N+(L<<2)>>2]=0;c[M+(L+D<<2)>>2]=0;L=L+1|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{m=k+(c[e+(j<<2)+1160>>2]<<2)|0;f=e+(j<<2)+2184|0;if(!((c[m>>2]|0)==0?(c[k+(c[f>>2]<<2)>>2]|0)==0:0)){c[m>>2]=1;c[k+(c[f>>2]<<2)>>2]=1;X=c[d>>2]|0}j=j+1|0}while((j|0)<(X|0));i=n;return}function Sb(a,b,d,e,f,j,l,m,n){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;j=j|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0.0,t=0,u=0.0,v=0,w=0.0,x=0;o=i;p=i;i=i+((1*(m<<2)|0)+15&-16)|0;if((c[a+500>>2]|0)==0){t=m}else{t=(c[a+504>>2]|0)-l|0}if((((t|0)>(m|0)?m:t)|0)>0){r=(j|0)==0;v=~t;t=~m;t=~((v|0)>(t|0)?v:t);v=0;do{if(!(!r?(c[j+(v<<2)>>2]|0)!=0:0)){q=9}do{if((q|0)==9){q=0;x=+g[d+(v<<2)>>2]<0.0;s=+Ha(+(+P(+(+g[e+(v<<2)>>2]/+g[f+(v<<2)>>2]))));if(x){c[n+(v<<2)>>2]=~~-s;break}else{c[n+(v<<2)>>2]=~~s;break}}}while(0);v=v+1|0}while((v|0)!=(t|0))}else{t=0}if((t|0)>=(m|0)){w=0.0;i=o;return+w}r=(j|0)!=0;b=b-l|0;s=0.0;l=0;do{if(!(r?(c[j+(t<<2)>>2]|0)!=0:0)){q=15}do{if((q|0)==15){q=0;v=e+(t<<2)|0;u=+g[f+(t<<2)>>2];w=+g[v>>2]/u;if(w<.25?!(r&(t|0)<(b|0)):0){c[p+(l<<2)>>2]=v;s=s+w;l=l+1|0;break}x=+g[d+(t<<2)>>2]<0.0;w=+Ha(+(+P(+w)));if(x){x=~~-w;c[n+(t<<2)>>2]=x}else{x=~~w;c[n+(t<<2)>>2]=x}g[v>>2]=u*+($(x,x)|0)}}while(0);t=t+1|0}while((t|0)!=(m|0));if((l|0)==0){w=s;i=o;return+w}jd(p,l,4,112);if((l|0)<=0){w=s;i=o;return+w}m=e;u=+h[a+512>>3];a=0;do{q=(c[p+(a<<2)>>2]|0)-m>>2;if(!(s>=u)){c[n+(q<<2)>>2]=0;g[e+(q<<2)>>2]=0.0}else{c[n+(q<<2)>>2]=~~(c[k>>2]=(g[k>>2]=+g[d+(q<<2)>>2],c[k>>2]|0)&-2147483648|1065353216,+g[k>>2]);g[e+(q<<2)>>2]=+g[f+(q<<2)>>2];s=s+-1.0}a=a+1|0}while((a|0)!=(l|0));i=o;return+s}function Tb(a,b){a=a|0;b=b|0;var d=0.0,e=0.0;e=+g[c[a>>2]>>2];d=+g[c[b>>2]>>2];return(ed&1)|0}function Ub(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0,r=0.0;f=i;q=d<<2;h=i;i=i+((1*q|0)+15&-16)|0;j=i;i=i+((1*q|0)+15&-16)|0;if((d|0)>0){m=0;l=0}else{i=f;return}do{do{if((l|0)>=2){o=+g[a+(m<<2)>>2];k=l;while(1){l=k+ -1|0;r=+g[j+(l<<2)>>2];if(o1?(m|0)<((c[h+(l<<2)>>2]|0)+b|0):0)){l=12;break}n=k+ -2|0;if(!(r<=+g[j+(n<<2)>>2])){l=12;break}if((m|0)<((c[h+(n<<2)>>2]|0)+b|0)){k=l}else{l=12;break}}if((l|0)==8){c[h+(k<<2)>>2]=m;g[j+(k<<2)>>2]=o;break}else if((l|0)==12){c[h+(k<<2)>>2]=m;g[j+(k<<2)>>2]=o;break}}else{c[h+(l<<2)>>2]=m;g[j+(l<<2)>>2]=+g[a+(m<<2)>>2];k=l}}while(0);l=k+1|0;m=m+1|0}while((m|0)!=(d|0));if(!((k|0)>-1)){i=f;return}m=b+1|0;n=~d;b=0;p=0;do{if((b|0)<(k|0)?(e=b+1|0,+g[j+(e<<2)>>2]>+g[j+(b<<2)>>2]):0){q=c[h+(e<<2)>>2]|0}else{q=m+(c[h+(b<<2)>>2]|0)|0}if((p|0)<(((q|0)>(d|0)?d:q)|0)){o=+g[j+(b<<2)>>2];q=~q;q=~((q|0)>(n|0)?q:n);do{g[a+(p<<2)>>2]=o;p=p+1|0}while((p|0)!=(q|0));p=q}b=b+1|0}while((b|0)!=(l|0));i=f;return}function Vb(a){a=a|0;var b=0;b=i;c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;i=b;return}function Wb(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;if((a|0)==0){i=b;return}g=c[a>>2]|0;if((g|0)!=0){d=a+8|0;e=c[d>>2]|0;if((e|0)>0){f=0;do{h=c[g+(f<<2)>>2]|0;if((h|0)!=0){md(h);e=c[d>>2]|0;g=c[a>>2]|0}f=f+1|0}while((f|0)<(e|0))}md(g)}d=c[a+4>>2]|0;if((d|0)!=0){md(d)}d=c[a+12>>2]|0;if((d|0)!=0){md(d)}c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;i=b;return}function Xb(a){a=a|0;var b=0;b=i;c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[a+20>>2]=0;c[a+24>>2]=0;c[a+28>>2]=nd(1,3664)|0;i=b;return}function Yb(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;d=c[a+28>>2]|0;if((d|0)==0){c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[a+20>>2]=0;c[a+24>>2]=0;c[a+28>>2]=0;i=b;return}f=d+8|0;h=c[f>>2]|0;if((h|0)>0){e=d+32|0;g=0;do{j=c[e+(g<<2)>>2]|0;if((j|0)!=0){md(j);h=c[f>>2]|0}g=g+1|0}while((g|0)<(h|0))}e=d+12|0;k=c[e>>2]|0;if((k|0)>0){g=d+544|0;f=d+288|0;h=0;do{j=c[g+(h<<2)>>2]|0;if((j|0)!=0){Ma[c[(c[58440+(c[f+(h<<2)>>2]<<2)>>2]|0)+8>>2]&127](j);k=c[e>>2]|0}h=h+1|0}while((h|0)<(k|0))}g=d+16|0;j=c[g>>2]|0;if((j|0)>0){e=d+1056|0;f=d+800|0;h=0;do{k=c[e+(h<<2)>>2]|0;if((k|0)!=0){Ma[c[(c[58416+(c[f+(h<<2)>>2]<<2)>>2]|0)+12>>2]&127](k);j=c[g>>2]|0}h=h+1|0}while((h|0)<(j|0))}f=d+20|0;j=c[f>>2]|0;if((j|0)>0){g=d+1568|0;e=d+1312|0;h=0;do{k=c[g+(h<<2)>>2]|0;if((k|0)!=0){Ma[c[(c[58424+(c[e+(h<<2)>>2]<<2)>>2]|0)+12>>2]&127](k);j=c[f>>2]|0}h=h+1|0}while((h|0)<(j|0))}e=d+24|0;if((c[e>>2]|0)>0){g=d+1824|0;f=d+2848|0;h=0;do{j=c[g+(h<<2)>>2]|0;if((j|0)!=0){Vc(j)}j=c[f>>2]|0;if((j|0)!=0){Wc(j+(h*56|0)|0)}h=h+1|0}while((h|0)<(c[e>>2]|0))}else{f=d+2848|0}e=c[f>>2]|0;if((e|0)!=0){md(e)}e=d+28|0;if((c[e>>2]|0)>0){f=d+2852|0;g=0;do{Jb(c[f+(g<<2)>>2]|0);g=g+1|0}while((g|0)<(c[e>>2]|0))}md(d);c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[a+20>>2]=0;c[a+24>>2]=0;c[a+28>>2]=0;i=b;return}function Zb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+32|0;g=f;j=f+20|0;if((e|0)==0){l=-133;i=f;return l|0}cb(g,c[e>>2]|0,c[e+4>>2]|0);k=fb(g,8)|0;a[j+0>>0]=0;a[j+1>>0]=0;a[j+2>>0]=0;a[j+3>>0]=0;a[j+4>>0]=0;a[j>>0]=fb(g,8)|0;a[j+1>>0]=fb(g,8)|0;a[j+2>>0]=fb(g,8)|0;a[j+3>>0]=fb(g,8)|0;a[j+4>>0]=fb(g,8)|0;a[j+5>>0]=fb(g,8)|0;if((sd(j,57200,6)|0)!=0){l=-132;i=f;return l|0}if((k|0)==1){if((c[e+8>>2]|0)==0){l=-133;i=f;return l|0}h=b+8|0;if((c[h>>2]|0)!=0){l=-133;i=f;return l|0}d=c[b+28>>2]|0;if((d|0)==0){l=-129;i=f;return l|0}l=fb(g,32)|0;c[b>>2]=l;if((l|0)!=0){l=-134;i=f;return l|0}l=b+4|0;c[l>>2]=fb(g,8)|0;c[h>>2]=fb(g,32)|0;c[b+12>>2]=fb(g,32)|0;c[b+16>>2]=fb(g,32)|0;c[b+20>>2]=fb(g,32)|0;c[d>>2]=1<<(fb(g,4)|0);j=1<<(fb(g,4)|0);c[d+4>>2]=j;if((((c[h>>2]|0)>=1?(c[l>>2]|0)>=1:0)?(l=c[d>>2]|0,!((l|0)<64|(j|0)<(l|0)|(j|0)>8192)):0)?(fb(g,1)|0)==1:0){l=0;i=f;return l|0}Yb(b);l=-133;i=f;return l|0}else if((k|0)==5){if((c[b+8>>2]|0)==0){l=-133;i=f;return l|0}if((c[d+12>>2]|0)==0){l=-133;i=f;return l|0}d=c[b+28>>2]|0;if((d|0)==0){l=-129;i=f;return l|0}l=fb(g,8)|0;h=d+24|0;c[h>>2]=l+1;a:do{if((l|0)>=0){e=d+1824|0;j=0;do{l=Jc(g)|0;c[e+(j<<2)>>2]=l;j=j+1|0;if((l|0)==0){break a}}while((j|0)<(c[h>>2]|0));h=fb(g,6)|0;if((h|0)>=0){j=0;while(1){if((fb(g,16)|0)!=0){break a}if((j|0)<(h|0)){j=j+1|0}else{break}}l=fb(g,6)|0;h=d+16|0;c[h>>2]=l+1;if((l|0)>=0){e=d+800|0;j=d+1056|0;k=0;do{l=fb(g,16)|0;c[e+(k<<2)>>2]=l;if(l>>>0>1){break a}l=Ra[c[(c[58416+(l<<2)>>2]|0)+4>>2]&127](b,g)|0;c[j+(k<<2)>>2]=l;k=k+1|0;if((l|0)==0){break a}}while((k|0)<(c[h>>2]|0));l=fb(g,6)|0;h=d+20|0;c[h>>2]=l+1;if((l|0)>=0){l=d+1312|0;j=d+1568|0;e=0;do{k=fb(g,16)|0;c[l+(e<<2)>>2]=k;if(k>>>0>2){break a}k=Ra[c[(c[58424+(k<<2)>>2]|0)+4>>2]&127](b,g)|0;c[j+(e<<2)>>2]=k;e=e+1|0;if((k|0)==0){break a}}while((e|0)<(c[h>>2]|0));l=fb(g,6)|0;h=d+12|0;c[h>>2]=l+1;if((l|0)>=0){l=d+288|0;k=d+544|0;e=(c[14610]|0)+4|0;j=0;do{m=fb(g,16)|0;c[l+(j<<2)>>2]=m;if((m|0)!=0){break a}m=Ra[c[e>>2]&127](b,g)|0;c[k+(j<<2)>>2]=m;j=j+1|0;if((m|0)==0){break a}}while((j|0)<(c[h>>2]|0));m=fb(g,6)|0;j=d+8|0;c[j>>2]=m+1;if((m|0)>=0){k=d+32|0;e=0;do{l=k+(e<<2)|0;c[l>>2]=nd(1,16)|0;d=fb(g,1)|0;c[c[l>>2]>>2]=d;d=fb(g,16)|0;c[(c[l>>2]|0)+4>>2]=d;d=fb(g,16)|0;c[(c[l>>2]|0)+8>>2]=d;d=fb(g,8)|0;l=c[l>>2]|0;c[l+12>>2]=d;if((c[l+4>>2]|0)>0){break a}if((c[l+8>>2]|0)>0){break a}e=e+1|0;if((d|0)<0?1:(d|0)>=(c[h>>2]|0)){break a}}while((e|0)<(c[j>>2]|0));if((fb(g,1)|0)==1){m=0;i=f;return m|0}}}}}}}}while(0);Yb(b);m=-133;i=f;return m|0}else if((k|0)==3){if((c[b+8>>2]|0)==0){m=-133;i=f;return m|0}j=fb(g,32)|0;b:do{if((j|0)>=0?(h=g+16|0,(j|0)<=((c[h>>2]|0)+ -8|0)):0){b=nd(j+1|0,1)|0;c[d+12>>2]=b;if((j|0)!=0){while(1){j=j+ -1|0;a[b>>0]=fb(g,8)|0;if((j|0)==0){break}else{b=b+1|0}}}e=fb(g,32)|0;if((e|0)>=0?(m=c[h>>2]|0,(e|0)<=(m-(gb(g)|0)>>2|0)):0){b=d+8|0;c[b>>2]=e;m=e+1|0;c[d>>2]=nd(m,4)|0;j=d+4|0;c[j>>2]=nd(m,4)|0;if((e|0)>0){e=0;do{l=fb(g,32)|0;if((l|0)<0){break b}m=c[h>>2]|0;if((l|0)>(m-(gb(g)|0)|0)){break b}c[(c[j>>2]|0)+(e<<2)>>2]=l;m=nd(l+1|0,1)|0;c[(c[d>>2]|0)+(e<<2)>>2]=m;if((l|0)!=0){k=c[(c[d>>2]|0)+(e<<2)>>2]|0;while(1){l=l+ -1|0;a[k>>0]=fb(g,8)|0;if((l|0)==0){break}else{k=k+1|0}}}e=e+1|0}while((e|0)<(c[b>>2]|0))}if((fb(g,1)|0)==1){m=0;i=f;return m|0}}}}while(0);Wb(d);m=-133;i=f;return m|0}else{m=-133;i=f;return m|0}return 0}function _b(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,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.0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0.0,aa=0.0,ba=0;f=i;i=i+4912|0;w=f;j=f+3588|0;k=f+4384|0;o=f+3852|0;p=f+4124|0;q=f+4644|0;y=f+4904|0;x=f+4116|0;r=f+4112|0;s=f+3848|0;t=f+3584|0;u=f+4120|0;l=c[b+1296>>2]|0;z=c[b+1288>>2]|0;h=c[b+1284>>2]|0;A=(h|0)>0;if(A){B=0;do{c[j+(B<<2)>>2]=-200;B=B+1|0}while((B|0)!=(h|0));if(A){B=0;do{c[k+(B<<2)>>2]=-200;B=B+1|0}while((B|0)!=(h|0));if(A){ud(o|0,0,h<<2|0)|0;B=0;do{c[p+(B<<2)>>2]=1;B=B+1|0}while((B|0)!=(h|0));if(A){ud(q|0,-1,h<<2|0)|0}}}}if((h|0)==0){I=w+0|0;J=I+56|0;do{c[I>>2]=0;I=I+4|0}while((I|0)<(J|0));c[w>>2]=0;c[w+4>>2]=z;G=z+ -1|0;if((z|0)<1){F=0;L=0;M=0;N=0;I=0;H=0;E=0;D=0;C=0;B=0;z=0;A=0}else{J=l+1112|0;K=0;F=0;L=0;M=0;N=0;I=0;H=0;E=0;D=0;C=0;B=0;z=0;A=0;while(1){S=+g[e+(K<<2)>>2];O=~~(S*7.314285755157471+1023.5);if((O|0)<=1023){O=(O|0)<0?0:O;if((O|0)!=0){v=17}}else{O=1023;v=17}do{if((v|0)==17){v=0;if(!(+g[d+(K<<2)>>2]+ +g[J>>2]>=S)){L=L+1|0;N=($(K,K)|0)+N|0;H=K+H|0;D=($(O,K)|0)+D|0;B=($(O,O)|0)+B|0;A=O+A|0;break}else{F=F+1|0;M=($(K,K)|0)+M|0;I=K+I|0;E=($(O,K)|0)+E|0;C=($(O,O)|0)+C|0;z=O+z|0;break}}}while(0);if((K|0)<(G|0)){K=K+1|0}else{break}}}c[w+8>>2]=I;c[w+12>>2]=z;c[w+16>>2]=M;c[w+20>>2]=C;c[w+24>>2]=E;c[w+28>>2]=F;c[w+32>>2]=H;c[w+36>>2]=A;c[w+40>>2]=N;c[w+44>>2]=B;c[w+48>>2]=D;c[w+52>>2]=L}else{E=h+ -1|0;if((E|0)<=0){Z=0;i=f;return Z|0}D=z+ -1|0;C=l+1112|0;B=c[b>>2]|0;A=0;F=0;do{G=A;A=A+1|0;P=B;B=c[b+(A<<2)>>2]|0;H=w+(G*56|0)|0;I=H+0|0;J=I+56|0;do{c[I>>2]=0;I=I+4|0}while((I|0)<(J|0));c[H>>2]=P;c[w+(G*56|0)+4>>2]=B;O=(B|0)<(z|0)?B:D;if((O|0)<(P|0)){V=0;U=0;T=0;R=0;Q=0;N=0;M=0;L=0;K=0;J=0;H=0;I=0}else{V=0;U=0;T=0;R=0;Q=0;N=0;M=0;L=0;K=0;J=0;H=0;I=0;while(1){S=+g[e+(P<<2)>>2];W=~~(S*7.314285755157471+1023.5);if((W|0)<=1023){W=(W|0)<0?0:W;if((W|0)!=0){v=25}}else{W=1023;v=25}do{if((v|0)==25){v=0;if(!(+g[d+(P<<2)>>2]+ +g[C>>2]>=S)){U=U+1|0;R=($(P,P)|0)+R|0;N=P+N|0;L=($(W,P)|0)+L|0;J=($(W,W)|0)+J|0;I=W+I|0;break}else{V=V+1|0;T=($(P,P)|0)+T|0;Q=P+Q|0;M=($(W,P)|0)+M|0;K=($(W,W)|0)+K|0;H=W+H|0;break}}}while(0);if((P|0)<(O|0)){P=P+1|0}else{break}}}c[w+(G*56|0)+8>>2]=Q;c[w+(G*56|0)+12>>2]=H;c[w+(G*56|0)+16>>2]=T;c[w+(G*56|0)+20>>2]=K;c[w+(G*56|0)+24>>2]=M;c[w+(G*56|0)+28>>2]=V;c[w+(G*56|0)+32>>2]=N;c[w+(G*56|0)+36>>2]=I;c[w+(G*56|0)+40>>2]=R;c[w+(G*56|0)+44>>2]=J;c[w+(G*56|0)+48>>2]=L;c[w+(G*56|0)+52>>2]=U;F=V+F|0}while((A|0)!=(E|0))}if((F|0)==0){Z=0;i=f;return Z|0}c[y>>2]=-200;c[x>>2]=-200;$b(w,h+ -1|0,y,x,l)|0;A=c[y>>2]|0;c[j>>2]=A;c[k>>2]=A;x=c[x>>2]|0;y=k+4|0;c[y>>2]=x;z=j+4|0;c[z>>2]=x;x=(h|0)>2;do{if(x){C=l+1112|0;A=l+1096|0;F=l+1100|0;B=l+1104|0;D=2;a:while(1){G=c[b+(D<<2)+520>>2]|0;E=c[o+(G<<2)>>2]|0;H=c[p+(G<<2)>>2]|0;I=q+(E<<2)|0;b:do{if((c[I>>2]|0)!=(H|0)){L=c[b+(E<<2)+520>>2]|0;K=c[b+(H<<2)+520>>2]|0;c[I>>2]=H;U=c[l+(E<<2)+836>>2]|0;O=c[l+(H<<2)+836>>2]|0;I=c[j+(E<<2)>>2]|0;J=k+(E<<2)|0;M=c[J>>2]|0;if((I|0)>=0){if((M|0)<0){M=I}else{M=M+I>>1}}I=j+(H<<2)|0;P=c[I>>2]|0;N=c[k+(H<<2)>>2]|0;if((P|0)>=0){if((N|0)<0){N=P}else{N=N+P>>1}}if((M|0)==-1|(N|0)==-1){v=41;break a}T=N-M|0;R=O-U|0;Q=(T|0)/(R|0)|0;P=T>>31|1;_=+g[e+(U<<2)>>2];V=~~(_*7.314285755157471+1023.5);if((V|0)>1023){V=1023}else{V=(V|0)<0?0:V}Y=$(Q,R)|0;T=((T|0)>-1?T:0-T|0)-((Y|0)>-1?Y:0-Y|0)|0;Y=M-V|0;Y=$(Y,Y)|0;S=+g[C>>2];if(+g[d+(U<<2)>>2]+S>=_){_=+(M|0);aa=+(V|0);if(!(_+ +g[A>>2]>2]>aa):0){v=47}}else{v=47}c:do{if((v|0)==47){v=0;U=U+1|0;if((U|0)<(O|0)){V=0;X=1;W=M;do{ba=V+T|0;Z=(ba|0)<(R|0);V=ba-(Z?0:R)|0;W=W+Q+(Z?0:P)|0;_=+g[e+(U<<2)>>2];Z=~~(_*7.314285755157471+1023.5);if((Z|0)>1023){Z=1023}else{Z=(Z|0)<0?0:Z}ba=W-Z|0;Y=($(ba,ba)|0)+Y|0;X=X+1|0;if(!((Z|0)==0?1:!(S+ +g[d+(U<<2)>>2]>=_))){_=+(W|0);aa=+(Z|0);if(_+ +g[A>>2]>2]>aa){break c}}U=U+1|0}while((U|0)<(O|0))}else{X=1}aa=+g[A>>2];S=+(X|0);_=+g[B>>2];if((!(aa*aa/S>_)?(aa=+g[F>>2],!(aa*aa/S>_)):0)?+((Y|0)/(X|0)|0|0)>_:0){break}c[j+(D<<2)>>2]=-200;c[k+(D<<2)>>2]=-200;break b}}while(0);c[r>>2]=-200;c[s>>2]=-200;c[t>>2]=-200;c[u>>2]=-200;ba=$b(w+(L*56|0)|0,G-L|0,r,s,l)|0;L=$b(w+(G*56|0)|0,K-G|0,t,u,l)|0;K=(ba|0)!=0;if(K){c[r>>2]=M;c[s>>2]=c[t>>2]}if((L|0)!=0?(c[t>>2]=c[s>>2],c[u>>2]=N,K):0){c[j+(D<<2)>>2]=-200;c[k+(D<<2)>>2]=-200;break}K=c[r>>2]|0;c[J>>2]=K;if((E|0)==0){c[j>>2]=K}K=c[s>>2]|0;c[j+(D<<2)>>2]=K;J=c[t>>2]|0;c[k+(D<<2)>>2]=J;L=c[u>>2]|0;c[I>>2]=L;if((H|0)==1){c[y>>2]=L}if((K&J|0)>-1){d:do{if((G|0)>0){J=G;do{J=J+ -1|0;I=p+(J<<2)|0;if((c[I>>2]|0)!=(H|0)){break d}c[I>>2]=D}while((J|0)>0)}}while(0);G=G+1|0;if((G|0)<(h|0)){do{H=o+(G<<2)|0;if((c[H>>2]|0)!=(E|0)){break b}c[H>>2]=D;G=G+1|0}while((G|0)<(h|0))}}}}while(0);D=D+1|0;if((D|0)>=(h|0)){v=75;break}}if((v|0)==41){Ja(1)}else if((v|0)==75){n=c[j>>2]|0;m=c[k>>2]|0;break}}else{n=A;m=A}}while(0);o=ub(a,h<<2)|0;if((n|0)>=0){if((m|0)<0){m=n}else{m=m+n>>1}}c[o>>2]=m;m=c[z>>2]|0;n=c[y>>2]|0;if((m|0)>=0){if((n|0)>=0){m=n+m>>1}}else{m=n}c[o+4>>2]=m;if(x){m=2}else{ba=o;i=f;return ba|0}do{ba=m+ -2|0;n=c[b+(ba<<2)+1032>>2]|0;ba=c[b+(ba<<2)+780>>2]|0;q=c[l+(n<<2)+836>>2]|0;n=c[o+(n<<2)>>2]&32767;p=(c[o+(ba<<2)>>2]&32767)-n|0;q=($((p|0)>-1?p:0-p|0,(c[l+(m<<2)+836>>2]|0)-q|0)|0)/((c[l+(ba<<2)+836>>2]|0)-q|0)|0;n=((p|0)<0?0-q|0:q)+n|0;q=c[j+(m<<2)>>2]|0;p=c[k+(m<<2)>>2]|0;if((q|0)>=0){if((p|0)<0){p=q}else{p=p+q>>1}}if((p|0)<0|(n|0)==(p|0)){c[o+(m<<2)>>2]=n|32768}else{c[o+(m<<2)>>2]=p}m=m+1|0}while((m|0)!=(h|0));i=f;return o|0}function $b(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0;h=i;k=c[a>>2]|0;j=c[a+((b+ -1|0)*56|0)+4>>2]|0;if((b|0)>0){o=+g[f+1108>>2];p=0.0;f=0;q=0.0;m=0.0;n=0.0;l=0.0;do{t=c[a+(f*56|0)+52>>2]|0;s=c[a+(f*56|0)+28>>2]|0;r=o*+(s+t|0)/+(s+1|0)+1.0;m=m+(+(c[a+(f*56|0)+32>>2]|0)+r*+(c[a+(f*56|0)+8>>2]|0));l=l+(+(c[a+(f*56|0)+36>>2]|0)+r*+(c[a+(f*56|0)+12>>2]|0));q=q+(+(c[a+(f*56|0)+40>>2]|0)+r*+(c[a+(f*56|0)+16>>2]|0));n=n+(+(c[a+(f*56|0)+48>>2]|0)+r*+(c[a+(f*56|0)+24>>2]|0));p=p+(+(t|0)+ +(s|0)*r);f=f+1|0}while((f|0)!=(b|0))}else{p=0.0;q=0.0;m=0.0;n=0.0;l=0.0}b=c[d>>2]|0;if((b|0)>-1){p=p+1.0;q=+($(k,k)|0)+q;m=+(k|0)+m;n=n+ +($(b,k)|0);l=l+ +(b|0)}b=c[e>>2]|0;if((b|0)>-1){p=p+1.0;q=+($(j,j)|0)+q;m=+(j|0)+m;n=n+ +($(b,j)|0);l=l+ +(b|0)}o=p*q-m*m;if(!(o>0.0)){c[d>>2]=0;c[e>>2]=0;t=1;i=h;return t|0}q=(q*l-n*m)/o;r=(p*n-l*m)/o;c[d>>2]=~~+Ha(+(q+ +(k|0)*r));j=~~+Ha(+(q+ +(j|0)*r));c[e>>2]=j;k=c[d>>2]|0;if((k|0)>1023){c[d>>2]=1023;j=c[e>>2]|0;k=1023}if((j|0)>1023){c[e>>2]=1023;k=c[d>>2]|0;j=1023}if((k|0)<0){c[d>>2]=0;j=c[e>>2]|0}if((j|0)>=0){t=0;i=h;return t|0}c[e>>2]=0;t=0;i=h;return t|0}function ac(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;g=i;b=c[b+1284>>2]|0;if((d|0)==0|(e|0)==0){l=0;i=g;return l|0}a=ub(a,b<<2)|0;if((b|0)<=0){l=a;i=g;return l|0}h=65536-f|0;j=0;do{n=d+(j<<2)|0;l=$(c[n>>2]&32767,h)|0;m=e+(j<<2)|0;l=l+32768+($(c[m>>2]&32767,f)|0)>>16;k=a+(j<<2)|0;c[k>>2]=l;if((c[n>>2]&32768|0)!=0?(c[m>>2]&32768|0)!=0:0){c[k>>2]=l|32768}j=j+1|0}while((j|0)!=(b|0));i=g;return a|0}function bc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;g=i;i=i+336|0;q=g+64|0;n=g+32|0;l=g;h=c[d+1296>>2]|0;j=d+1284|0;r=c[j>>2]|0;k=c[(c[(c[b+64>>2]|0)+4>>2]|0)+28>>2]|0;o=k+1824|0;m=c[k+2848>>2]|0;if((e|0)==0){ab(a,0,1);ud(f|0,0,((c[b+36>>2]|0)/2|0)<<2|0)|0;E=0;i=g;return E|0}if((r|0)>0){t=h+832|0;s=0;do{v=e+(s<<2)|0;u=c[v>>2]|0;w=u&32767;x=c[t>>2]|0;if((x|0)==2){w=w>>>3}else if((x|0)==3){w=(w>>>0)/12|0}else if((x|0)==1){w=w>>>2}else if((x|0)==4){w=w>>>4}c[v>>2]=u&32768|w;s=s+1|0}while((s|0)!=(r|0))}c[q>>2]=c[e>>2];t=q+4|0;c[t>>2]=c[e+4>>2];s=d+1292|0;if((r|0)>2){v=2;do{A=v+ -2|0;w=c[d+(A<<2)+1032>>2]|0;A=c[d+(A<<2)+780>>2]|0;y=c[h+(w<<2)+836>>2]|0;w=e+(w<<2)|0;u=e+(A<<2)|0;x=c[w>>2]&32767;z=(c[u>>2]&32767)-x|0;y=($((z|0)>-1?z:0-z|0,(c[h+(v<<2)+836>>2]|0)-y|0)|0)/((c[h+(A<<2)+836>>2]|0)-y|0)|0;y=((z|0)<0?0-y|0:y)+x|0;z=e+(v<<2)|0;A=c[z>>2]|0;if((A&32768|0)!=0|(y|0)==(A|0)){c[z>>2]=y|32768;c[q+(v<<2)>>2]=0}else{z=(c[s>>2]|0)-y|0;z=(z|0)<(y|0)?z:y;y=A-y|0;do{if((y|0)<0){if((y|0)<(0-z|0)){y=z+~y|0;break}else{y=~(y<<1);break}}else{if((y|0)<(z|0)){y=y<<1;break}else{y=z+y|0;break}}}while(0);c[q+(v<<2)>>2]=y;c[w>>2]=x;c[u>>2]=c[u>>2]&32767}v=v+1|0}while((v|0)!=(r|0))}ab(a,1,1);w=d+1308|0;c[w>>2]=(c[w>>2]|0)+1;w=(c[s>>2]|0)+ -1|0;v=(w|0)==0;if(!v){r=w;u=0;do{u=u+1|0;r=r>>>1}while((r|0)!=0);r=d+1304|0;c[r>>2]=(c[r>>2]|0)+(u<<1);u=c[q>>2]|0;if(v){v=0}else{v=0;do{v=v+1|0;w=w>>>1}while((w|0)!=0)}}else{u=c[q>>2]|0;r=d+1304|0;v=0}ab(a,u,v);t=c[t>>2]|0;s=(c[s>>2]|0)+ -1|0;if((s|0)==0){u=0}else{u=0;do{u=u+1|0;s=s>>>1}while((s|0)!=0)}ab(a,t,u);if((c[h>>2]|0)>0){u=d+1300|0;w=0;v=2;while(1){t=c[h+(w<<2)+4>>2]|0;s=c[h+(t<<2)+128>>2]|0;x=c[h+(t<<2)+192>>2]|0;y=1<>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;c[n+12>>2]=0;c[n+16>>2]=0;c[n+20>>2]=0;c[n+24>>2]=0;c[n+28>>2]=0;if((x|0)!=0){B=(y|0)>0;if(B){z=0;do{A=c[h+(t<<5)+(z<<2)+320>>2]|0;if((A|0)<0){c[l+(z<<2)>>2]=1}else{c[l+(z<<2)>>2]=c[(c[o+(A<<2)>>2]|0)+4>>2]}z=z+1|0}while((z|0)!=(y|0))}a:do{if((s|0)>0){if(B){z=0;B=0;A=0}else{y=0;B=0;z=0;while(1){B=c[n+(z<<2)>>2]<>2]|0;C=0;while(1){E=C+1|0;if((D|0)<(c[l+(C<<2)>>2]|0)){D=41;break}if((E|0)<(y|0)){C=E}else{D=43;break}}if((D|0)==41){c[n+(A<<2)>>2]=C}else if((D|0)==43){C=c[n+(A<<2)>>2]|0}B=C<>2]|0)*56|0)|0,B,a)|0;c[u>>2]=(c[u>>2]|0)+E}if((s|0)>0){x=0;do{y=c[h+(t<<5)+(c[n+(x<<2)>>2]<<2)+320>>2]|0;if((y|0)>-1?(p=c[q+(x+v<<2)>>2]|0,(p|0)<(c[m+(y*56|0)+4>>2]|0)):0){E=Kc(m+(y*56|0)|0,p,a)|0;c[r>>2]=(c[r>>2]|0)+E}x=x+1|0}while((x|0)!=(s|0))}w=w+1|0;if((w|0)>=(c[h>>2]|0)){break}else{v=s+v|0}}}l=h+832|0;n=$(c[l>>2]|0,c[e>>2]|0)|0;k=(c[k+(c[b+28>>2]<<2)>>2]|0)/2|0;if((c[j>>2]|0)>1){m=~k;p=0;a=1;u=0;o=n;while(1){q=c[d+(a<<2)+260>>2]|0;n=c[e+(q<<2)>>2]|0;if((n&32767|0)==(n|0)){n=$(c[l>>2]|0,n)|0;p=c[h+(q<<2)+836>>2]|0;w=n-o|0;q=p-u|0;s=(w|0)/(q|0)|0;r=w>>31|1;t=$(s,q)|0;t=((w|0)>-1?w:0-w|0)-((t|0)>-1?t:0-t|0)|0;w=(k|0)>(p|0)?p:k;if((w|0)>(u|0)){c[f+(u<<2)>>2]=o}v=u+1|0;if((v|0)<(w|0)){u=~p;u=~((u|0)>(m|0)?u:m);w=0;while(1){w=w+t|0;x=(w|0)<(q|0);o=o+s+(x?0:r)|0;c[f+(v<<2)>>2]=o;v=v+1|0;if((v|0)==(u|0)){q=p;u=p;break}else{w=w-(x?0:q)|0}}}else{q=p;u=p}}else{q=p;n=o}a=a+1|0;if((a|0)>=(c[j>>2]|0)){break}else{p=q;o=n}}}else{q=0}b=b+36|0;if((q|0)>=((c[b>>2]|0)/2|0|0)){E=1;i=g;return E|0}do{c[f+(q<<2)>>2]=n;q=q+1|0}while((q|0)<((c[b>>2]|0)/2|0|0));f=1;i=g;return f|0}function cc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;d=a+836|0;f=c[a+840>>2]|0;ab(b,c[a>>2]|0,5);if((c[a>>2]|0)>0){j=a+4|0;h=0;g=-1;do{o=j+(h<<2)|0;ab(b,c[o>>2]|0,4);o=c[o>>2]|0;g=(g|0)<(o|0)?o:g;h=h+1|0}while((h|0)<(c[a>>2]|0));if((g|0)>-1){j=a+128|0;k=a+192|0;h=a+256|0;n=a+320|0;l=0;while(1){ab(b,(c[j+(l<<2)>>2]|0)+ -1|0,3);m=k+(l<<2)|0;ab(b,c[m>>2]|0,2);if((c[m>>2]|0)==0){o=0}else{ab(b,c[h+(l<<2)>>2]|0,8);o=c[m>>2]|0}if((1<0){o=0;do{ab(b,(c[n+(l<<5)+(o<<2)>>2]|0)+1|0,8);o=o+1|0}while((o|0)<(1<>2]|0))}if((l|0)==(g|0)){break}else{l=l+1|0}}}}ab(b,(c[a+832>>2]|0)+ -1|0,2);f=(f|0)==0?0:f+ -1|0;if((f|0)==0){ab(b,0,4);f=0}else{g=f;h=0;do{h=h+1|0;g=g>>>1}while((g|0)!=0);ab(b,h,4);g=f;f=0;do{f=f+1|0;g=g>>>1}while((g|0)!=0)}m=c[a>>2]|0;if((m|0)<=0){i=e;return}g=a+4|0;h=a+128|0;k=0;j=0;l=0;do{k=(c[h+(c[g+(j<<2)>>2]<<2)>>2]|0)+k|0;if((l|0)<(k|0)){do{ab(b,c[d+(l+2<<2)>>2]|0,f);l=l+1|0}while((l|0)!=(k|0));m=c[a>>2]|0;l=k}j=j+1|0}while((j|0)<(m|0));i=e;return}function dc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=i;i=i+272|0;e=d;m=c[a+28>>2]|0;a=nd(1,1120)|0;r=fb(b,5)|0;c[a>>2]=r;a:do{if((r|0)>0){j=a+4|0;k=0;h=-1;do{l=fb(b,4)|0;c[j+(k<<2)>>2]=l;if((l|0)<0){break a}h=(h|0)<(l|0)?l:h;k=k+1|0}while((k|0)<(c[a>>2]|0));if((h|0)>-1){j=a+128|0;l=a+192|0;k=a+256|0;p=m+24|0;m=a+320|0;n=0;while(1){c[j+(n<<2)>>2]=(fb(b,3)|0)+1;q=fb(b,2)|0;o=l+(n<<2)|0;c[o>>2]=q;if((q|0)<0){break a}if((q|0)==0){q=c[k+(n<<2)>>2]|0}else{q=fb(b,8)|0;c[k+(n<<2)>>2]=q}if((q|0)<0){g=36;break a}if((q|0)>=(c[p>>2]|0)){g=36;break a}if((1<>2]|0)>0){q=0;do{r=fb(b,8)|0;c[m+(n<<5)+(q<<2)>>2]=r+ -1;if((r|0)<0){break a}q=q+1|0;if((r|0)>(c[p>>2]|0)){g=36;break a}}while((q|0)<(1<>2]|0))}if((n|0)<(h|0)){n=n+1|0}else{g=18;break}}}else{g=18}}else{g=18}}while(0);b:do{if((g|0)==18?(c[a+832>>2]=(fb(b,2)|0)+1,f=fb(b,4)|0,(f|0)>=0):0){o=c[a>>2]|0;if((o|0)>0){k=a+4|0;l=a+128|0;h=a+836|0;j=1<>2]<<2)>>2]|0)+m|0;if((m|0)>63){break b}if((p|0)<(m|0)){do{r=fb(b,f)|0;c[h+(p+2<<2)>>2]=r;p=p+1|0;if(!((r|0)>-1&(r|0)<(j|0))){break b}}while((p|0)<(m|0));o=c[a>>2]|0}n=n+1|0}while((n|0)<(o|0));b=m+2|0;c[h>>2]=0;c[a+840>>2]=j;if((b|0)>0){f=e}else{jd(e,b,4,113);r=a;i=d;return r|0}}else{h=a+836|0;c[h>>2]=0;c[a+840>>2]=1<>2]=h+(g<<2);g=g+1|0}while((g|0)!=(b|0));jd(f,b,4,113);if((b|0)<=1){r=a;i=d;return r|0}g=c[c[e>>2]>>2]|0;f=1;do{r=g;g=c[c[e+(f<<2)>>2]>>2]|0;f=f+1|0;if((r|0)==(g|0)){g=36;break b}}while((f|0)<(b|0));i=d;return a|0}}while(0);if((g|0)==36?(a|0)==0:0){r=0;i=d;return r|0}md(a);r=0;i=d;return r|0}function ec(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;a=i;i=i+272|0;h=a;f=nd(1,1312)|0;c[f+1296>>2]=b;e=b+836|0;d=f+1288|0;c[d>>2]=c[b+840>>2];j=c[b>>2]|0;if((j|0)>0){n=b+4|0;l=b+128|0;m=0;g=0;do{g=(c[l+(c[n+(m<<2)>>2]<<2)>>2]|0)+g|0;m=m+1|0}while((m|0)<(j|0));j=g+2|0;c[f+1284>>2]=j;if((j|0)>0){k=7}else{jd(h,j,4,113)}}else{c[f+1284>>2]=2;j=2;g=0;k=7}if((k|0)==7){k=0;do{c[h+(k<<2)>>2]=e+(k<<2);k=k+1|0}while((k|0)!=(j|0));jd(h,j,4,113);m=e;l=f+260|0;k=0;do{c[l+(k<<2)>>2]=(c[h+(k<<2)>>2]|0)-m>>2;k=k+1|0}while((k|0)!=(j|0));k=f+260|0;l=f+520|0;h=0;do{c[l+(c[k+(h<<2)>>2]<<2)>>2]=h;h=h+1|0}while((h|0)!=(j|0));k=f+260|0;h=0;do{c[f+(h<<2)>>2]=c[e+(c[k+(h<<2)>>2]<<2)>>2];h=h+1|0}while((h|0)!=(j|0))}b=c[b+832>>2]|0;if((b|0)==2){c[f+1292>>2]=128}else if((b|0)==1){c[f+1292>>2]=256}else if((b|0)==4){c[f+1292>>2]=64}else if((b|0)==3){c[f+1292>>2]=86}if((g|0)<=0){i=a;return f|0}k=f+1032|0;j=f+780|0;b=0;h=2;while(1){t=b+2|0;l=c[e+(t<<2)>>2]|0;if((t|0)>0){t=1;q=c[d>>2]|0;o=0;m=0;r=0;while(1){n=c[e+(o<<2)>>2]|0;p=(n|0)>(r|0)&(n|0)<(l|0);m=p?o:m;s=(n|0)<(q|0)&(n|0)>(l|0);t=s?o:t;o=o+1|0;if((o|0)==(h|0)){break}else{q=s?n:q;r=p?n:r}}}else{t=1;m=0}c[k+(b<<2)>>2]=m;c[j+(b<<2)>>2]=t;b=b+1|0;if((b|0)==(g|0)){break}else{h=h+1|0}}i=a;return f|0}function fc(a){a=a|0;var b=0;b=i;if((a|0)!=0){md(a)}i=b;return}function gc(a){a=a|0;var b=0;b=i;if((a|0)!=0){md(a)}i=b;return}function hc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=i;e=c[b+1296>>2]|0;h=c[(c[(c[(c[a+64>>2]|0)+4>>2]|0)+28>>2]|0)+2848>>2]|0;j=a+4|0;if((fb(j,1)|0)!=1){s=0;i=d;return s|0}f=b+1284|0;a=ub(a,c[f>>2]<<2)|0;g=b+1292|0;k=(c[g>>2]|0)+ -1|0;if((k|0)==0){l=0}else{l=0;do{l=l+1|0;k=k>>>1}while((k|0)!=0)}c[a>>2]=fb(j,l)|0;k=(c[g>>2]|0)+ -1|0;if((k|0)==0){l=0}else{l=0;do{l=l+1|0;k=k>>>1}while((k|0)!=0)}c[a+4>>2]=fb(j,l)|0;a:do{if((c[e>>2]|0)>0){n=0;o=2;b:while(1){l=c[e+(n<<2)+4>>2]|0;k=c[e+(l<<2)+128>>2]|0;m=c[e+(l<<2)+192>>2]|0;p=1<>2]|0)*56|0)|0,j)|0;if((r|0)==-1){a=0;h=29;break}}else{r=0}if((k|0)>0){p=p+ -1|0;s=0;do{q=c[e+(l<<5)+((r&p)<<2)+320>>2]|0;r=r>>m;if((q|0)>-1){q=Lc(h+(q*56|0)|0,j)|0;c[a+(s+o<<2)>>2]=q;if((q|0)==-1){a=0;h=29;break b}}else{c[a+(s+o<<2)>>2]=0}s=s+1|0}while((s|0)<(k|0))}n=n+1|0;if((n|0)>=(c[e>>2]|0)){break a}else{o=k+o|0}}if((h|0)==29){i=d;return a|0}}}while(0);if((c[f>>2]|0)<=2){s=a;i=d;return s|0}h=b+1032|0;l=b+780|0;k=2;do{m=k+ -2|0;j=h+(m<<2)|0;n=c[j>>2]|0;p=c[e+(n<<2)+836>>2]|0;m=l+(m<<2)|0;o=c[m>>2]|0;n=c[a+(n<<2)>>2]&32767;b=(c[a+(o<<2)>>2]&32767)-n|0;p=($((b|0)>-1?b:0-b|0,(c[e+(k<<2)+836>>2]|0)-p|0)|0)/((c[e+(o<<2)+836>>2]|0)-p|0)|0;n=((b|0)<0?0-p|0:p)+n|0;p=(c[g>>2]|0)-n|0;b=a+(k<<2)|0;o=c[b>>2]|0;if((o|0)==0){c[b>>2]=n|32768}else{do{if((o|0)<(((p|0)<(n|0)?p:n)<<1|0)){if((o&1|0)==0){o=o>>1;break}else{o=0-(o+1>>1)|0;break}}else{if((p|0)>(n|0)){o=o-n|0;break}else{o=~(o-p);break}}}while(0);c[b>>2]=o+n&32767;s=a+(c[j>>2]<<2)|0;c[s>>2]=c[s>>2]&32767;s=a+(c[m>>2]<<2)|0;c[s>>2]=c[s>>2]&32767}k=k+1|0}while((k|0)<(c[f>>2]|0));i=d;return a|0}function ic(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0;f=i;h=c[b+1296>>2]|0;a=(c[(c[(c[(c[a+64>>2]|0)+4>>2]|0)+28>>2]|0)+(c[a+28>>2]<<2)>>2]|0)/2|0;if((d|0)==0){ud(e|0,0,a<<2|0)|0;x=0;i=f;return x|0}j=c[h+832>>2]|0;k=$(j,c[d>>2]|0)|0;if((k|0)<0){n=0}else{n=(k|0)>255?255:k}k=c[b+1284>>2]|0;if((k|0)>1){l=b+260|0;m=~a;o=0;b=1;u=0;while(1){q=c[l+(b<<2)>>2]|0;p=c[d+(q<<2)>>2]|0;if((p&32767|0)==(p|0)){o=c[h+(q<<2)+836>>2]|0;p=$(j,p)|0;if((p|0)<0){p=0}else{p=(p|0)>255?255:p}w=p-n|0;q=o-u|0;t=(w|0)/(q|0)|0;s=w>>31|1;r=$(t,q)|0;r=((w|0)>-1?w:0-w|0)-((r|0)>-1?r:0-r|0)|0;w=(a|0)>(o|0)?o:a;if((w|0)>(u|0)){x=e+(u<<2)|0;g[x>>2]=+g[57240+(n<<2)>>2]*+g[x>>2]}v=u+1|0;if((v|0)<(w|0)){u=~o;u=~((u|0)>(m|0)?u:m);w=0;while(1){w=w+r|0;x=(w|0)<(q|0);n=n+t+(x?0:s)|0;z=e+(v<<2)|0;g[z>>2]=+g[57240+(n<<2)>>2]*+g[z>>2];v=v+1|0;if((v|0)==(u|0)){q=o;u=o;n=p;break}else{w=w-(x?0:q)|0}}}else{q=o;u=o;n=p}}else{q=o}b=b+1|0;if((b|0)>=(k|0)){break}else{o=q}}}else{q=0}if((q|0)>=(a|0)){z=1;i=f;return z|0}y=+g[57240+(n<<2)>>2];do{z=e+(q<<2)|0;g[z>>2]=y*+g[z>>2];q=q+1|0}while((q|0)!=(a|0));e=1;i=f;return e|0}function jc(a,b){a=a|0;b=b|0;return(c[c[a>>2]>>2]|0)-(c[c[b>>2]>>2]|0)|0}function kc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;h=c[a+28>>2]|0;a=ld(96)|0;g=fb(b,8)|0;c[a>>2]=g;j=fb(b,16)|0;c[a+4>>2]=j;k=fb(b,16)|0;c[a+8>>2]=k;c[a+12>>2]=fb(b,6)|0;c[a+16>>2]=fb(b,8)|0;f=fb(b,4)|0;e=a+20|0;c[e>>2]=f+1;a:do{if(!((g|0)<1|(j|0)<1)?!((k|0)<1|(f|0)<0):0){if(!((f|0)>-1)){k=a;i=d;return k|0}f=a+24|0;g=h+24|0;j=h+1824|0;h=0;do{k=fb(b,8)|0;c[f+(h<<2)>>2]=k;if((k|0)<0){break a}if((k|0)>=(c[g>>2]|0)){break a}k=c[j+(k<<2)>>2]|0;if((c[k+12>>2]|0)==0){break a}h=h+1|0;if((c[k>>2]|0)<1){break a}}while((h|0)<(c[e>>2]|0));i=d;return a|0}}while(0);if((a|0)==0){k=0;i=d;return k|0}md(a);k=0;i=d;return k|0}function lc(a,b){a=a|0;b=b|0;var d=0;d=i;a=nd(1,32)|0;c[a+4>>2]=c[b>>2];c[a>>2]=c[b+8>>2];c[a+20>>2]=b;c[a+8>>2]=nd(2,4)|0;i=d;return a|0}function mc(a){a=a|0;var b=0;b=i;if((a|0)!=0){md(a)}i=b;return}function nc(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;if((a|0)==0){i=b;return}d=a+8|0;e=c[d>>2]|0;if((e|0)!=0){f=c[e>>2]|0;if((f|0)!=0){md(f);e=c[d>>2]|0}f=c[e+4>>2]|0;if((f|0)!=0){md(f);e=c[d>>2]|0}md(e)}md(a);i=b;return}function oc(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0,h=0,j=0.0,k=0,l=0,m=0;d=i;f=c[b+20>>2]|0;h=a+4|0;l=f+12|0;k=fb(h,c[l>>2]|0)|0;if((k|0)<=0){l=0;i=d;return l|0}e=+(k|0)/+((1<>2])+ -1|0)*+(c[f+16>>2]|0);l=f+20|0;k=fb(h,Rc(c[l>>2]|0)|0)|0;if((k|0)==-1){l=0;i=d;return l|0}if((k|0)>=(c[l>>2]|0)){l=0;i=d;return l|0}f=(c[(c[(c[(c[a+64>>2]|0)+4>>2]|0)+28>>2]|0)+2848>>2]|0)+((c[f+(k<<2)+24>>2]|0)*56|0)|0;b=b+4|0;a=ub(a,((c[f>>2]|0)+(c[b>>2]|0)<<2)+4|0)|0;if((Pc(f,a,h,c[b>>2]|0)|0)==-1){l=0;i=d;return l|0}h=c[b>>2]|0;if((h|0)>0){k=0;j=0.0;while(1){a:do{if((k|0)<(h|0)){b=c[f>>2]|0;l=k;k=0;while(1){if((k|0)>=(b|0)){break a}m=a+(l<<2)|0;g[m>>2]=j+ +g[m>>2];l=l+1|0;if((l|0)<(h|0)){k=k+1|0}else{break}}}else{l=k}}while(0);if((l|0)<(h|0)){k=l;j=+g[a+(l+ -1<<2)>>2]}else{break}}}g[a+(h<<2)>>2]=e;m=a;i=d;return m|0}function pc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0.0,m=0.0,n=0,o=0,p=0.0,q=0,r=0;f=i;j=c[b+20>>2]|0;k=c[a+28>>2]|0;h=b+8|0;o=(c[h>>2]|0)+(k<<2)|0;if((c[o>>2]|0)==0){q=c[(c[(c[(c[a+64>>2]|0)+4>>2]|0)+28>>2]|0)+(k<<2)>>2]|0;a=(q|0)/2|0;n=c[b>>2]|0;p=+(c[j+4>>2]|0);m=p*.5;c[o>>2]=ld((a<<2)+4|0)|0;if((q|0)>1){l=m/+(a|0);m=+(n|0)/(p*4999999873689376.0e-20+(+W(+(m*m*1.8499999754340024e-8))*2.240000009536743+ +W(+(p*.0003699999942909926))*13.100000381469727));o=c[(c[h>>2]|0)+(k<<2)>>2]|0;q=0;while(1){p=l*+(q|0);r=~~+N(+(m*(p*9999999747378752.0e-20+(+W(+(p*.0007399999885819852))*13.100000381469727+ +W(+(p*p*1.8499999754340024e-8))*2.240000009536743))));c[o+(q<<2)>>2]=(r|0)<(n|0)?r:n+ -1|0;q=q+1|0;if((q|0)>=(a|0)){break}n=c[b>>2]|0}n=(a|0)>1?a:1}else{o=c[(c[h>>2]|0)+(k<<2)>>2]|0;n=0}c[o+(n<<2)>>2]=-1;c[b+(k<<2)+12>>2]=a}if((d|0)==0){ud(e|0,0,c[b+12+(k<<2)>>2]<<2|0)|0;r=0;i=f;return r|0}else{r=c[b+4>>2]|0;Gb(e,c[(c[h>>2]|0)+(k<<2)>>2]|0,c[b+12+(k<<2)>>2]|0,c[b>>2]|0,d,r,+g[d+(r<<2)>>2],+(c[j+16>>2]|0));r=1;i=f;return r|0}return 0}function qc(a){a=a|0;var b=0;b=i;if((a|0)!=0){md(a)}i=b;return}function rc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;if((a|0)==0){i=b;return}d=a+4|0;g=c[d>>2]|0;e=a+20|0;h=c[e>>2]|0;if((g|0)>0){f=0;do{j=c[h+(f<<2)>>2]|0;if((j|0)!=0){md(j);g=c[d>>2]|0;h=c[e>>2]|0}f=f+1|0}while((f|0)<(g|0))}md(h);e=a+24|0;d=a+28|0;g=c[d>>2]|0;if((c[e>>2]|0)>0){f=0;do{md(c[g+(f<<2)>>2]|0);f=f+1|0;g=c[d>>2]|0}while((f|0)<(c[e>>2]|0))}md(g);md(a);i=b;return}function sc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;e=i;ab(b,c[a>>2]|0,24);ab(b,c[a+4>>2]|0,24);ab(b,(c[a+8>>2]|0)+ -1|0,24);f=a+12|0;ab(b,(c[f>>2]|0)+ -1|0,6);ab(b,c[a+20>>2]|0,8);if((c[f>>2]|0)<=0){i=e;return}h=a+24|0;d=0;j=0;do{k=h+(j<<2)|0;l=c[k>>2]|0;if((l|0)!=0){n=l;m=0;while(1){n=n>>>1;if((n|0)==0){break}else{m=m+1|0}}if((m|0)>2){ab(b,l,3);ab(b,1,1);ab(b,c[k>>2]>>3,5)}else{g=9}}else{l=0;g=9}if((g|0)==9){g=0;ab(b,l,4)}k=c[k>>2]|0;if((k|0)==0){l=0}else{l=0;do{l=(k&1)+l|0;k=k>>>1}while((k|0)!=0)}d=l+d|0;j=j+1|0}while((j|0)<(c[f>>2]|0));if((d|0)<=0){i=e;return}a=a+280|0;f=0;do{ab(b,c[a+(f<<2)>>2]|0,8);f=f+1|0}while((f|0)!=(d|0));i=e;return}function tc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;e=i;d=nd(1,2840)|0;g=c[a+28>>2]|0;c[d>>2]=fb(b,24)|0;c[d+4>>2]=fb(b,24)|0;c[d+8>>2]=(fb(b,24)|0)+1;j=fb(b,6)|0;a=d+12|0;c[a>>2]=j+1;n=fb(b,8)|0;h=d+20|0;c[h>>2]=n;a:do{if((n|0)>=0){if((j|0)>-1){k=d+24|0;j=0;l=0;do{m=fb(b,3)|0;n=fb(b,1)|0;if((n|0)<0){f=27;break a}if((n|0)!=0){n=fb(b,5)|0;if((n|0)<0){f=27;break a}m=n<<3|m}c[k+(l<<2)>>2]=m;if((m|0)==0){n=0}else{n=0;do{n=(m&1)+n|0;m=m>>>1}while((m|0)!=0)}j=n+j|0;l=l+1|0}while((l|0)<(c[a>>2]|0));k=(j|0)>0;if(k){l=d+280|0;m=0;do{n=fb(b,8)|0;if((n|0)<0){f=27;break a}c[l+(m<<2)>>2]=n;m=m+1|0}while((m|0)<(j|0))}else{k=0}}else{k=0;j=0}h=c[h>>2]|0;b=c[g+24>>2]|0;if((h|0)<(b|0)){if(k){k=d+280|0;m=g+1824|0;g=0;do{l=c[k+(g<<2)>>2]|0;if((l|0)>=(b|0)){f=27;break a}g=g+1|0;if((c[(c[m+(l<<2)>>2]|0)+12>>2]|0)==0){f=27;break a}}while((g|0)<(j|0))}else{m=g+1824|0}h=c[m+(h<<2)>>2]|0;g=c[h+4>>2]|0;h=c[h>>2]|0;if((h|0)>=1){f=c[a>>2]|0;a=1;do{a=$(f,a)|0;h=h+ -1|0;if((a|0)>(g|0)){f=27;break a}}while((h|0)>0);c[d+16>>2]=a;n=d;i=e;return n|0}}}else{f=27}}while(0);if((f|0)==27?(d|0)==0:0){n=0;i=e;return n|0}md(d);n=0;i=e;return n|0}function uc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=i;e=nd(1,44)|0;j=c[(c[a+4>>2]|0)+28>>2]|0;c[e>>2]=b;a=c[b+12>>2]|0;c[e+4>>2]=a;j=j+2848|0;f=c[j>>2]|0;c[e+12>>2]=f;f=f+((c[b+20>>2]|0)*56|0)|0;c[e+16>>2]=f;f=c[f>>2]|0;g=nd(a,4)|0;c[e+20>>2]=g;if((a|0)>0){h=b+24|0;b=b+280|0;p=0;k=0;n=0;do{l=c[h+(k<<2)>>2]|0;if((l|0)!=0){o=l;q=0;while(1){m=q+1|0;o=o>>>1;if((o|0)==0){break}else{q=m}}if((m|0)!=0){n=(m|0)>(n|0)?m:n;o=g+(k<<2)|0;c[o>>2]=nd(m,4)|0;if((q|0)>-1){q=0;do{if((l&1<>2]|0)+(q<<2)>>2]=(c[j>>2]|0)+((c[b+(p<<2)>>2]|0)*56|0);p=p+1|0}q=q+1|0}while((q|0)<(m|0))}}}k=k+1|0}while((k|0)<(a|0))}else{n=0}j=e+24|0;c[j>>2]=1;b=(f|0)>0;if(b){g=1;h=0;do{g=$(g,a)|0;h=h+1|0}while((h|0)!=(f|0));c[j>>2]=g}else{g=1}c[e+8>>2]=n;h=ld(g<<2)|0;c[e+28>>2]=h;if((g|0)<=0){i=d;return e|0}j=f<<2;if(b){l=0}else{a=0;do{c[h+(a<<2)>>2]=ld(j)|0;a=a+1|0}while((a|0)<(g|0));i=d;return e|0}do{b=ld(j)|0;c[h+(l<<2)>>2]=b;m=g;n=0;k=l;do{m=(m|0)/(a|0)|0;q=(k|0)/(m|0)|0;k=k-($(q,m)|0)|0;c[b+(n<<2)>>2]=q;n=n+1|0}while((n|0)!=(f|0));l=l+1|0}while((l|0)<(g|0));i=d;return e|0}function vc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0;g=i;if((f|0)>0){h=0;j=0}else{i=g;return 0}do{if((c[e+(h<<2)>>2]|0)!=0){c[d+(j<<2)>>2]=c[d+(h<<2)>>2];j=j+1|0}h=h+1|0}while((h|0)!=(f|0));if((j|0)==0){i=g;return 0}wc(a,b,d,j,104);i=g;return 0}function wc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;g=i;k=c[b>>2]|0;j=c[k+8>>2]|0;h=b+16|0;l=c[c[h>>2]>>2]|0;n=c[a+36>>2]>>1;D=c[k+4>>2]|0;n=((D|0)<(n|0)?D:n)-(c[k>>2]|0)|0;if((n|0)<=0){i=g;return}o=(n|0)/(j|0)|0;n=i;i=i+((1*(e<<2)|0)+15&-16)|0;p=(e|0)>0;if(p){r=((l+ -1+o|0)/(l|0)|0)<<2;q=0;do{c[n+(q<<2)>>2]=ub(a,r)|0;q=q+1|0}while((q|0)!=(e|0))}r=b+8|0;v=c[r>>2]|0;if((v|0)<=0){i=g;return}q=(o|0)>0;t=a+4|0;u=k+16|0;a=b+28|0;s=(l|0)>0;b=b+20|0;w=v;v=0;a:while(1){if(q){x=1<>2]|0,t)|0;if((z|0)==-1){d=26;break a}if((z|0)>=(c[u>>2]|0)){d=26;break a}C=c[(c[a>>2]|0)+(z<<2)>>2]|0;c[(c[n+(y<<2)>>2]|0)+(w<<2)>>2]=C;y=y+1|0;if((C|0)==0){d=26;break a}}while((y|0)<(e|0))}b:do{if(s&(D|0)<(o|0)){if(p){y=0}else{y=0;while(1){y=y+1|0;D=D+1|0;if(!((y|0)<(l|0)&(D|0)<(o|0))){break b}}}do{A=$(D,j)|0;z=0;do{B=(c[k>>2]|0)+A|0;C=c[(c[(c[n+(z<<2)>>2]|0)+(w<<2)>>2]|0)+(y<<2)>>2]|0;if(((c[k+(C<<2)+24>>2]&x|0)!=0?(m=c[(c[(c[b>>2]|0)+(C<<2)>>2]|0)+(v<<2)>>2]|0,(m|0)!=0):0)?(La[f&127](m,(c[d+(z<<2)>>2]|0)+(B<<2)|0,t,j)|0)==-1:0){d=26;break a}z=z+1|0}while((z|0)<(e|0));y=y+1|0;D=D+1|0}while((y|0)<(l|0)&(D|0)<(o|0))}}while(0);if((D|0)<(o|0)){w=w+1|0}else{break}}w=c[r>>2]|0}v=v+1|0;if((v|0)>=(w|0)){d=26;break}}if((d|0)==26){i=g;return}}function xc(a,b,d,e,f,g,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0;b=i;if((g|0)>0){j=0;k=0}else{i=b;return 0}do{if((c[f+(j<<2)>>2]|0)!=0){c[e+(k<<2)>>2]=c[e+(j<<2)>>2];k=k+1|0}j=j+1|0}while((j|0)!=(g|0));if((k|0)==0){i=b;return 0}yc(a,d,e,k,h);i=b;return 0}function yc(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0;u=i;i=i+1088|0;x=u+1056|0;j=u+1024|0;k=u+512|0;n=u;m=c[d>>2]|0;l=c[m+8>>2]|0;r=c[m+12>>2]|0;p=d+16|0;q=c[c[p>>2]>>2]|0;o=((c[m+4>>2]|0)-(c[m>>2]|0)|0)/(l|0)|0;ud(k|0,0,512)|0;ud(n|0,0,512)|0;s=d+8|0;D=c[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;Y=(S|0)>0;do{if((ba|0)==1){if(!Y){fa=0;break}ia=ca+ -1|0;ha=0;fa=0;ga=S;do{ga=ga+ -1|0;ea=c[N+(_+ga<<2)>>2]|0;ja=ea-aa|0;if((ja|0)<(da|0)){ja=(da-ja<<1)+ -1|0}else{ja=ja-da<<1}fa=$(fa,ca)|0;if((ja|0)<0){ja=0}else{ja=(ja|0)<(ca|0)?ja:ia}fa=ja+fa|0;c[x+(ga<<2)>>2]=ea;ha=ha+1|0}while((ha|0)!=(S|0))}else{if(!Y){fa=0;break}ia=(ba>>1)-aa|0;ja=ca+ -1|0;ea=0;fa=0;ha=S;do{ha=ha+ -1|0;ga=(ia+(c[N+(_+ha<<2)>>2]|0)|0)/(ba|0)|0;if((ga|0)<(da|0)){ka=(da-ga<<1)+ -1|0}else{ka=ga-da<<1}fa=$(fa,ca)|0;if((ka|0)<0){ka=0}else{ka=(ka|0)<(ca|0)?ka:ja}fa=ka+fa|0;c[x+(ha<<2)>>2]=($(ga,ba)|0)+aa;ea=ea+1|0}while((ea|0)!=(S|0))}}while(0);da=c[(c[V>>2]|0)+8>>2]|0;do{if((a[da+fa>>0]|0)<1){c[j+0>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;c[j+16>>2]=0;c[j+20>>2]=0;c[j+24>>2]=0;c[j+28>>2]=0;ba=($(ca+ -1|0,ba)|0)+aa|0;aa=c[Q>>2]|0;if((aa|0)>0){ea=-1;ca=0}else{break}do{do{if((a[da+ca>>0]|0)>0){if(Y){ga=0;ha=0;do{ka=(c[j+(ga<<2)>>2]|0)-(c[N+(_+ga<<2)>>2]|0)|0;ha=($(ka,ka)|0)+ha|0;ga=ga+1|0}while((ga|0)!=(S|0))}else{ha=0}if(!((ea|0)==-1|(ha|0)<(ea|0))){break}c[x+0>>2]=c[j+0>>2];c[x+4>>2]=c[j+4>>2];c[x+8>>2]=c[j+8>>2];c[x+12>>2]=c[j+12>>2];c[x+16>>2]=c[j+16>>2];c[x+20>>2]=c[j+20>>2];c[x+24>>2]=c[j+24>>2];c[x+28>>2]=c[j+28>>2];ea=ha;fa=ca}}while(0);ha=c[j>>2]|0;if((ha|0)<(ba|0)){ga=j}else{ga=j;ia=0;do{ia=ia+1|0;c[ga>>2]=0;ga=j+(ia<<2)|0;ha=c[ga>>2]|0}while((ha|0)>=(ba|0))}if((ha|0)>-1){ha=(c[R>>2]|0)+ha|0;c[ga>>2]=ha}c[ga>>2]=0-ha;ca=ca+1|0}while((ca|0)!=(aa|0))}}while(0);if((fa|0)>-1&Y){Y=0;while(1){c[Z>>2]=(c[Z>>2]|0)-(c[x+(Y<<2)>>2]|0);Y=Y+1|0;if((Y|0)==(S|0)){break}else{Z=Z+4|0}}}X=(Kc(t,fa,b)|0)+X|0;W=W+1|0;if((W|0)==(P|0)){break}S=c[t>>2]|0}Q=c[M>>2]|0}else{X=0}c[B>>2]=(c[B>>2]|0)+X;ka=k+(c[Q+(J<<2)>>2]<<2)|0;c[ka>>2]=(c[ka>>2]|0)+X}K=K+1|0}while((K|0)!=(f|0))}if((G|0)==(H|0)){break}J=J+1|0;G=G+1|0}F=F-I|0}}while((F|0)<(o|0));D=c[s>>2]|0}C=C+1|0}while((C|0)<(D|0));i=u;return}function zc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0;g=i;if((f|0)>0){j=0;h=0}else{v=0;i=g;return v|0}do{if((c[e+(j<<2)>>2]|0)!=0){c[d+(h<<2)>>2]=c[d+(j<<2)>>2];h=h+1|0}j=j+1|0}while((j|0)!=(f|0));if((h|0)==0){v=0;i=g;return v|0}l=c[b>>2]|0;f=c[l+8>>2]|0;n=c[l+12>>2]|0;e=((c[l+4>>2]|0)-(c[l>>2]|0)|0)/(f|0)|0;m=ub(a,h<<2)|0;k=100.0/+(f|0);j=(h|0)>0;if(j){o=e<<2;p=0;do{v=ub(a,o)|0;c[m+(p<<2)>>2]=v;ud(v|0,0,o|0)|0;p=p+1|0}while((p|0)!=(h|0))}if((e|0)>0){a=(f|0)>0;o=n+ -1|0;p=(o|0)>0;n=0;do{q=$(n,f)|0;q=(c[l>>2]|0)+q|0;if(j){r=0;do{if(a){t=c[d+(r<<2)>>2]|0;v=0;u=0;s=0;do{x=c[t+(q+u<<2)>>2]|0;x=(x|0)>-1?x:0-x|0;s=(x|0)>(s|0)?x:s;v=x+v|0;u=u+1|0}while((u|0)!=(f|0));w=+(v|0)}else{w=0.0;s=0}t=~~(k*w);a:do{if(p){u=0;do{if((s|0)<=(c[l+(u<<2)+2328>>2]|0)?(x=c[l+(u<<2)+2584>>2]|0,(x|0)<0|(t|0)<(x|0)):0){break a}u=u+1|0}while((u|0)<(o|0))}else{u=0}}while(0);c[(c[m+(r<<2)>>2]|0)+(n<<2)>>2]=u;r=r+1|0}while((r|0)!=(h|0))}n=n+1|0}while((n|0)!=(e|0))}x=b+40|0;c[x>>2]=(c[x>>2]|0)+1;x=m;i=g;return x|0}function Ac(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0;g=i;if((f|0)>0){h=0;j=0}else{i=g;return 0}do{if((c[e+(h<<2)>>2]|0)!=0){c[d+(j<<2)>>2]=c[d+(h<<2)>>2];j=j+1|0}h=h+1|0}while((h|0)!=(f|0));if((j|0)==0){i=g;return 0}wc(a,b,d,j,105);i=g;return 0}function Bc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;g=i;if((f|0)>0){h=0;j=0}else{v=0;i=g;return v|0}do{j=((c[e+(h<<2)>>2]|0)!=0&1)+j|0;h=h+1|0}while((h|0)!=(f|0));if((j|0)==0){v=0;i=g;return v|0}j=c[b>>2]|0;e=c[j+8>>2]|0;l=c[j+12>>2]|0;k=((c[j+4>>2]|0)-(c[j>>2]|0)|0)/(e|0)|0;h=ub(a,4)|0;v=k<<2;u=ub(a,v)|0;c[h>>2]=u;ud(u|0,0,v|0)|0;if((k|0)>0){a=(e|0)>0;n=l+ -1|0;o=(n|0)>0;l=c[h>>2]|0;p=(f|0)>1;m=0;t=(c[j>>2]|0)/(f|0)|0;do{if(a){r=c[d>>2]|0;u=0;s=0;q=0;do{v=c[r+(t<<2)>>2]|0;v=(v|0)>-1?v:0-v|0;q=(v|0)>(q|0)?v:q;if(p){v=1;do{w=c[(c[d+(v<<2)>>2]|0)+(t<<2)>>2]|0;w=(w|0)>-1?w:0-w|0;u=(w|0)>(u|0)?w:u;v=v+1|0}while((v|0)!=(f|0))}t=t+1|0;s=s+f|0}while((s|0)<(e|0))}else{u=0;q=0}a:do{if(o){r=0;do{if((q|0)<=(c[j+(r<<2)+2328>>2]|0)?(u|0)<=(c[j+(r<<2)+2584>>2]|0):0){break a}r=r+1|0}while((r|0)<(n|0))}else{r=0}}while(0);c[l+(m<<2)>>2]=r;m=m+1|0}while((m|0)!=(k|0))}w=b+40|0;c[w>>2]=(c[w>>2]|0)+1;w=h;i=g;return w|0}function Cc(a,b,d,e,f,g,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;k=i;i=i+16|0;l=k;m=c[b+36>>2]|0;j=(m|0)/2|0;b=ub(b,$(g<<2,j)|0)|0;c[l>>2]=b;if((g|0)<=0){i=k;return 0}n=(m|0)>1;o=0;p=0;do{q=c[e+(o<<2)>>2]|0;p=((c[f+(o<<2)>>2]|0)!=0&1)+p|0;if(n){m=0;r=o;while(1){c[b+(r<<2)>>2]=c[q+(m<<2)>>2];m=m+1|0;if((m|0)>=(j|0)){break}else{r=r+g|0}}}o=o+1|0}while((o|0)!=(g|0));if((p|0)==0){i=k;return 0}yc(a,d,l,1,h);i=k;return 0}function Dc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;g=i;m=c[b>>2]|0;j=c[m+8>>2]|0;k=b+16|0;l=c[c[k>>2]>>2]|0;n=($(c[a+36>>2]|0,f)|0)>>1;A=c[m+4>>2]|0;n=((A|0)<(n|0)?A:n)-(c[m>>2]|0)|0;if((n|0)<=0){i=g;return 0}o=(n|0)/(j|0)|0;n=ub(a,((l+ -1+o|0)/(l|0)|0)<<2)|0;a:do{if((f|0)>0){q=0;while(1){p=q+1|0;if((c[e+(q<<2)>>2]|0)!=0){p=q;break a}if((p|0)<(f|0)){q=p}else{break}}}else{p=0}}while(0);if((p|0)==(f|0)){i=g;return 0}p=b+8|0;t=c[p>>2]|0;if((t|0)<=0){i=g;return 0}e=(o|0)>0;q=a+4|0;r=m+16|0;a=b+28|0;s=(l|0)>0;b=b+20|0;u=t;t=0;b:while(1){if(e){v=(t|0)==0;w=1<>2]|0,q)|0;if((x|0)==-1){h=23;break b}if((x|0)>=(c[r>>2]|0)){h=23;break b}A=c[(c[a>>2]|0)+(x<<2)>>2]|0;c[n+(u<<2)>>2]=A;if((A|0)==0){h=23;break b}}if(s&(z|0)<(o|0)){x=n+(u<<2)|0;y=0;do{A=c[(c[x>>2]|0)+(y<<2)>>2]|0;if(((c[m+(A<<2)+24>>2]&w|0)!=0?(h=c[(c[(c[b>>2]|0)+(A<<2)>>2]|0)+(t<<2)>>2]|0,(h|0)!=0):0)?(A=$(z,j)|0,(Qc(h,d,(c[m>>2]|0)+A|0,f,q,j)|0)==-1):0){h=23;break b}y=y+1|0;z=z+1|0}while((y|0)<(l|0)&(z|0)<(o|0))}if((z|0)<(o|0)){u=u+1|0}else{break}}u=c[p>>2]|0}t=t+1|0;if((t|0)>=(u|0)){h=23;break}}if((h|0)==23){i=g;return 0}return 0}function Ec(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=i;if((c[b>>2]|0)>1){ab(d,1,1);ab(d,(c[b>>2]|0)+ -1|0,4)}else{ab(d,0,1)}h=b+1156|0;if((c[h>>2]|0)>0){ab(d,1,1);ab(d,(c[h>>2]|0)+ -1|0,8);if((c[h>>2]|0)>0){k=b+1160|0;j=a+4|0;m=b+2184|0;l=0;do{n=c[k+(l<<2)>>2]|0;o=c[j>>2]|0;o=(o|0)==0?0:o+ -1|0;if((o|0)==0){p=0}else{p=0;do{p=p+1|0;o=o>>>1}while((o|0)!=0)}ab(d,n,p);n=c[m+(l<<2)>>2]|0;o=c[j>>2]|0;o=(o|0)==0?0:o+ -1|0;if((o|0)==0){p=0}else{p=0;do{p=p+1|0;o=o>>>1}while((o|0)!=0)}ab(d,n,p);l=l+1|0}while((l|0)<(c[h>>2]|0))}}else{ab(d,0,1)}ab(d,0,2);h=c[b>>2]|0;if((h|0)>1){a=a+4|0;if((c[a>>2]|0)>0){f=b+4|0;g=0;do{ab(d,c[f+(g<<2)>>2]|0,4);g=g+1|0}while((g|0)<(c[a>>2]|0));f=c[b>>2]|0;g=17}}else{f=h;g=17}if((g|0)==17?(f|0)<=0:0){i=e;return}f=b+1028|0;g=b+1092|0;a=0;do{ab(d,0,8);ab(d,c[f+(a<<2)>>2]|0,8);ab(d,c[g+(a<<2)>>2]|0,8);a=a+1|0}while((a|0)<(c[b>>2]|0));i=e;return}function Fc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=i;e=nd(1,3208)|0;f=c[a+28>>2]|0;ud(e|0,0,3208)|0;j=fb(b,1)|0;a:do{if((j|0)>=0){if((j|0)!=0){q=fb(b,4)|0;c[e>>2]=q+1;if((q|0)<0){break}}else{c[e>>2]=1}j=fb(b,1)|0;if((j|0)>=0){if((j|0)!=0){q=fb(b,8)|0;k=e+1156|0;c[k>>2]=q+1;if((q|0)<0){g=27;break}l=a+4|0;n=e+1160|0;m=e+2184|0;p=c[l>>2]|0;j=0;do{o=(p|0)==0?0:p+ -1|0;if((o|0)==0){p=0}else{p=0;do{p=p+1|0;o=o>>>1}while((o|0)!=0)}o=fb(b,p)|0;c[n+(j<<2)>>2]=o;p=c[l>>2]|0;p=(p|0)==0?0:p+ -1|0;if((p|0)==0){q=0}else{q=0;do{q=q+1|0;p=p>>>1}while((p|0)!=0)}q=fb(b,q)|0;c[m+(j<<2)>>2]=q;if((q|o|0)<0|(o|0)==(q|0)){g=27;break a}p=c[l>>2]|0;j=j+1|0;if(!((o|0)<(p|0)&(q|0)<(p|0))){g=27;break a}}while((j|0)<(c[k>>2]|0))}if((fb(b,2)|0)==0){j=c[e>>2]|0;if((j|0)>1){a=a+4|0;if((c[a>>2]|0)>0){j=e+4|0;k=0;while(1){q=fb(b,4)|0;c[j+(k<<2)>>2]=q;h=c[e>>2]|0;k=k+1|0;if((q|0)>=(h|0)|(q|0)<0){break a}if((k|0)>=(c[a>>2]|0)){g=20;break}}}}else{h=j;g=20}if((g|0)==20?(h|0)<=0:0){q=e;i=d;return q|0}h=e+1028|0;a=f+16|0;g=e+1092|0;f=f+20|0;j=0;do{fb(b,8)|0;q=fb(b,8)|0;c[h+(j<<2)>>2]=q;if((q|0)<0?1:(q|0)>=(c[a>>2]|0)){g=27;break a}q=fb(b,8)|0;c[g+(j<<2)>>2]=q;j=j+1|0;if((q|0)<0?1:(q|0)>=(c[f>>2]|0)){g=27;break a}}while((j|0)<(c[e>>2]|0));i=d;return e|0}else{g=27}}else{g=27}}else{g=27}}while(0);if((g|0)==27?(e|0)==0:0){q=0;i=d;return q|0}md(e);q=0;i=d;return q|0}function Gc(a){a=a|0;var b=0;b=i;if((a|0)!=0){md(a)}i=b;return}function Hc(a){a=a|0;var b=0,d=0,e=0,f=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.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.0,J=0,K=0,L=0.0,M=0,N=0.0,O=0,P=0,Q=0.0;b=i;p=c[a+64>>2]|0;f=c[p+4>>2]|0;r=c[f+28>>2]|0;p=c[p+104>>2]|0;s=c[a+104>>2]|0;x=c[a+36>>2]|0;f=f+4|0;d=c[f>>2]<<2;o=i;i=i+((1*d|0)+15&-16)|0;d=ub(a,d)|0;l=ub(a,c[f>>2]<<2)|0;h=ub(a,c[f>>2]<<2)|0;t=s+4|0;w=+g[t>>2];u=i;i=i+((1*(c[f>>2]<<2)|0)+15&-16)|0;m=a+28|0;e=c[m>>2]|0;j=c[r+544+(e<<2)>>2]|0;n=(c[p+56>>2]|0)+((((e|0)!=0?2:0)+(c[s+8>>2]|0)|0)*52|0)|0;v=a+40|0;c[v>>2]=e;if((c[f>>2]|0)>0){y=(x|0)/2|0;E=y<<2;I=+(((g[k>>2]=4.0/+(x|0),c[k>>2]|0)&2147483647)>>>0)*7.177114298428933e-7+-764.6162109375+.345;q=p+4|0;A=a+24|0;z=a+32|0;F=p+12|0;B=p+20|0;C=x+ -1|0;D=(C|0)>1;G=0;do{J=c[(c[a>>2]|0)+(G<<2)>>2]|0;c[l+(G<<2)>>2]=ub(a,E)|0;H=d+(G<<2)|0;c[H>>2]=ub(a,E)|0;Fb(J,q,r,c[A>>2]|0,c[m>>2]|0,c[z>>2]|0);mb(c[c[F+(c[m>>2]<<2)>>2]>>2]|0,J,c[H>>2]|0);nb(B+((c[m>>2]|0)*12|0)|0,J);L=I+(+(((g[k>>2]=+g[J>>2],c[k>>2]|0)&2147483647)>>>0)*7.177114298428933e-7+-764.6162109375)+.345;g[J>>2]=L;H=u+(G<<2)|0;g[H>>2]=L;if(D){N=L;K=1;while(1){Q=+g[J+(K<<2)>>2];P=K+1|0;L=+g[J+(P<<2)>>2];L=I+(+(((g[k>>2]=Q*Q+L*L,c[k>>2]|0)&2147483647)>>>0)*3.5885571492144663e-7+-382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,t,P,K,G)|0;G=G+1|0}while((G|0)<(c[j>>2]|0))}P=($c(a)|0)!=0;if((p|0)<((P?14:7)|0)){p=p+1|0}else{a=0;break}}i=b;return a|0}function Ic(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0;d=i;j=c[a+64>>2]|0;e=c[j+4>>2]|0;k=c[e+28>>2]|0;j=c[j+104>>2]|0;f=a+28|0;l=c[k+(c[f>>2]<<2)>>2]|0;c[a+36>>2]=l;e=e+4|0;u=c[e>>2]<<2;n=i;i=i+((1*u|0)+15&-16)|0;m=i;i=i+((1*u|0)+15&-16)|0;o=i;i=i+((1*u|0)+15&-16)|0;h=i;i=i+((1*u|0)+15&-16)|0;u=c[e>>2]|0;if((u|0)>0){q=b+4|0;r=b+1028|0;p=k+800|0;v=j+48|0;s=l<<1&2147483646;t=0;do{u=c[r+(c[q+(t<<2)>>2]<<2)>>2]|0;u=Ra[c[(c[58416+(c[p+(u<<2)>>2]<<2)>>2]|0)+20>>2]&127](a,c[(c[v>>2]|0)+(u<<2)>>2]|0)|0;c[h+(t<<2)>>2]=u;c[o+(t<<2)>>2]=(u|0)!=0&1;ud(c[(c[a>>2]|0)+(t<<2)>>2]|0,0,s|0)|0;t=t+1|0;u=c[e>>2]|0}while((t|0)<(u|0))}p=b+1156|0;q=c[p>>2]|0;if((q|0)>0){w=b+1160|0;v=b+2184|0;t=0;do{r=o+(c[w+(t<<2)>>2]<<2)|0;s=c[v+(t<<2)>>2]|0;if(!((c[r>>2]|0)==0?(c[o+(s<<2)>>2]|0)==0:0)){c[r>>2]=1;c[o+(s<<2)>>2]=1}t=t+1|0}while((t|0)<(q|0))}if((c[b>>2]|0)>0){t=b+1092|0;s=k+1312|0;r=j+52|0;q=b+4|0;x=u;u=0;while(1){if((x|0)>0){w=0;v=0;do{if((c[q+(v<<2)>>2]|0)==(u|0)){c[m+(w<<2)>>2]=(c[o+(v<<2)>>2]|0)!=0&1;c[n+(w<<2)>>2]=c[(c[a>>2]|0)+(v<<2)>>2];x=c[e>>2]|0;w=w+1|0}v=v+1|0}while((v|0)<(x|0))}else{w=0}x=c[t+(u<<2)>>2]|0;Sa[c[(c[58424+(c[s+(x<<2)>>2]<<2)>>2]|0)+28>>2]&127](a,c[(c[r>>2]|0)+(x<<2)>>2]|0,n,m,w)|0;u=u+1|0;if((u|0)>=(c[b>>2]|0)){break}x=c[e>>2]|0}q=c[p>>2]|0}if((q|0)>0){o=b+1160|0;n=c[a>>2]|0;p=b+2184|0;m=(l|0)/2|0;l=(l|0)>1;do{q=q+ -1|0;v=c[n+(c[o+(q<<2)>>2]<<2)>>2]|0;u=c[n+(c[p+(q<<2)>>2]<<2)>>2]|0;if(l){t=0;do{r=v+(t<<2)|0;z=+g[r>>2];s=u+(t<<2)|0;y=+g[s>>2];w=y>0.0;do{if(z>0.0){if(w){g[r>>2]=z;g[s>>2]=z-y;break}else{g[s>>2]=z;g[r>>2]=z+y;break}}else{if(w){g[r>>2]=z;g[s>>2]=z+y;break}else{g[s>>2]=z;g[r>>2]=z-y;break}}}while(0);t=t+1|0}while((t|0)<(m|0))}}while((q|0)>0)}if((c[e>>2]|0)<=0){i=d;return 0}l=b+4|0;b=b+1028|0;k=k+800|0;m=j+48|0;n=0;do{o=c[b+(c[l+(n<<2)>>2]<<2)>>2]|0;La[c[(c[58416+(c[k+(o<<2)>>2]<<2)>>2]|0)+24>>2]&127](a,c[(c[m>>2]|0)+(o<<2)>>2]|0,c[h+(n<<2)>>2]|0,c[(c[a>>2]|0)+(n<<2)>>2]|0)|0;n=n+1|0;o=c[e>>2]|0}while((n|0)<(o|0));if((o|0)<=0){i=d;return 0}h=j+12|0;j=0;do{x=c[(c[a>>2]|0)+(j<<2)>>2]|0;jb(c[c[h+(c[f>>2]<<2)>>2]>>2]|0,x,x);j=j+1|0}while((j|0)<(c[e>>2]|0));i=d;return 0}function Jc(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;e=nd(1,40)|0;c[e+36>>2]=1;a:do{if(((fb(b,24)|0)==5653314?(c[e>>2]=fb(b,16)|0,n=fb(b,24)|0,f=e+4|0,c[f>>2]=n,!((n|0)==-1)):0)?(n=Rc(c[e>>2]|0)|0,((Rc(c[f>>2]|0)|0)+n|0)<=24):0){g=fb(b,1)|0;b:do{if((g|0)==1){j=(fb(b,5)|0)+1|0;if((j|0)==0){break a}k=c[f>>2]|0;g=e+8|0;c[g>>2]=ld(k)|0;if((k|0)>0){h=0;while(1){k=fb(b,Rc(k-h|0)|0)|0;if((k|0)==-1|(j|0)>32){break a}l=c[f>>2]|0;if((k|0)>(l-h|0)){break a}if((k|0)>0){if((k+ -1>>j+ -1|0)>1){break a}n=j&255;m=h;l=0;while(1){a[(c[g>>2]|0)+m>>0]=n;l=l+1|0;if((l|0)==(k|0)){break}else{m=m+1|0}}l=c[f>>2]|0;h=k+h|0}if((h|0)<(l|0)){k=l;j=j+1|0}else{break}}}}else if((g|0)==0){j=fb(b,1)|0;j=(j|0)!=0;m=($(j?1:5,c[f>>2]|0)|0)+7>>3;n=c[b+16>>2]|0;if((m|0)>(n-(gb(b)|0)|0)){break a}h=c[f>>2]|0;g=e+8|0;c[g>>2]=ld(h)|0;h=(h|0)>0;if(!j){if(h){j=0}else{break}while(1){h=fb(b,5)|0;if((h|0)==-1){break a}a[(c[g>>2]|0)+j>>0]=h+1;j=j+1|0;if((j|0)>=(c[f>>2]|0)){break b}}}if(h){h=0;do{if((fb(b,1)|0)==0){a[(c[g>>2]|0)+h>>0]=0}else{j=fb(b,5)|0;if((j|0)==-1){break a}a[(c[g>>2]|0)+h>>0]=j+1}h=h+1|0}while((h|0)<(c[f>>2]|0))}}else{break a}}while(0);g=fb(b,4)|0;h=e+12|0;c[h>>2]=g;if((g|0)==0){n=e;i=d;return n|0}else if(!((g|0)==2|(g|0)==1)){break}c[e+16>>2]=fb(b,32)|0;c[e+20>>2]=fb(b,32)|0;g=e+24|0;c[g>>2]=(fb(b,4)|0)+1;n=fb(b,1)|0;c[e+28>>2]=n;if(!((n|0)==-1)){h=c[h>>2]|0;if((h|0)==1){if((c[e>>2]|0)==0){f=0}else{f=Tc(e)|0}}else if((h|0)==2){f=$(c[e>>2]|0,c[f>>2]|0)|0}else{f=0}m=($(c[g>>2]|0,f)|0)+7>>3;n=c[b+16>>2]|0;if((m|0)<=(n-(gb(b)|0)|0)){j=ld(f<<2)|0;h=e+32|0;c[h>>2]=j;if((f|0)>0){k=0;do{n=fb(b,c[g>>2]|0)|0;j=c[h>>2]|0;c[j+(k<<2)>>2]=n;k=k+1|0}while((k|0)!=(f|0))}if((f|0)==0){n=e;i=d;return n|0}if(!((c[j+(f+ -1<<2)>>2]|0)==-1)){n=e;i=d;return n|0}}}}}while(0);Vc(e);n=0;i=d;return n|0}function Kc(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;if((d|0)<0){h=0;i=f;return h|0}h=b+12|0;g=c[h>>2]|0;if((c[g+4>>2]|0)<=(d|0)){h=0;i=f;return h|0}ab(e,c[(c[b+20>>2]|0)+(d<<2)>>2]|0,a[(c[g+8>>2]|0)+d>>0]|0);h=a[(c[(c[h>>2]|0)+8>>2]|0)+d>>0]|0;i=f;return h|0}function Lc(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;if((c[a+8>>2]|0)>0?(e=Mc(a,b)|0,(e|0)>-1):0){a=c[(c[a+24>>2]|0)+(e<<2)>>2]|0}else{a=-1}i=d;return a|0}function Mc(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;e=i;h=c[b+40>>2]|0;f=db(d,c[b+36>>2]|0)|0;do{if((f|0)>-1){g=c[(c[b+32>>2]|0)+(f<<2)>>2]|0;if((g|0)<0){f=(c[b+8>>2]|0)-(g&32767)|0;g=g>>>15&32767;break}l=g+ -1|0;eb(d,a[(c[b+28>>2]|0)+l>>0]|0);i=e;return l|0}else{f=c[b+8>>2]|0;g=0}}while(0);k=db(d,h)|0;j=(k|0)<0;if(j&(h|0)>1){do{h=h+ -1|0;k=db(d,h)|0;j=(k|0)<0}while(j&(h|0)>1)}if(j){l=-1;i=e;return l|0}k=k>>>16|k<<16;k=k>>>8&16711935|k<<8&-16711936;k=k>>>4&252645135|k<<4&-252645136;k=k>>>2&858993459|k<<2&-858993460;k=k>>>1&1431655765|k<<1&-1431655766;l=f-g|0;if((l|0)>1){j=c[b+20>>2]|0;do{m=l>>1;n=(c[j+(m+g<<2)>>2]|0)>>>0>k>>>0;g=(n?0:m)+g|0;f=f-(n?m:0)|0;l=f-g|0}while((l|0)>1)}b=a[(c[b+28>>2]|0)+g>>0]|0;if((b|0)>(h|0)){eb(d,h);n=-1;i=e;return n|0}else{eb(d,b);n=g;i=e;return n|0}return 0}function Nc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;if((c[a+8>>2]|0)<=0){n=0;i=f;return n|0}k=c[a>>2]|0;e=(e|0)/(k|0)|0;h=i;i=i+((1*(e<<2)|0)+15&-16)|0;j=(e|0)>0;a:do{if(j){l=a+16|0;m=0;while(1){n=Mc(a,d)|0;if((n|0)==-1){b=-1;break}k=c[a>>2]|0;c[h+(m<<2)>>2]=(c[l>>2]|0)+(($(k,n)|0)<<2);m=m+1|0;if((m|0)>=(e|0)){break a}}i=f;return b|0}}while(0);if((k|0)<1|j^1){n=0;i=f;return n|0}else{d=0;a=0}while(1){j=0;do{n=b+(j+a<<2)|0;g[n>>2]=+g[(c[h+(j<<2)>>2]|0)+(d<<2)>>2]+ +g[n>>2];j=j+1|0}while((j|0)!=(e|0));d=d+1|0;if((d|0)>=(k|0)){b=0;break}else{a=a+e|0}}i=f;return b|0}function Oc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;v=i;if((c[a+8>>2]|0)<=0){D=0;i=v;return D|0}if((c[a>>2]|0)>8){if((e|0)<=0){D=0;i=v;return D|0}w=a+16|0;x=0;while(1){A=Mc(a,d)|0;if((A|0)==-1){x=-1;w=23;break}y=c[w>>2]|0;z=c[a>>2]|0;A=$(z,A)|0;if((z|0)>0){D=(z|0)>1?z:1;C=x;B=0;while(1){E=b+(C<<2)|0;g[E>>2]=+g[y+(B+A<<2)>>2]+ +g[E>>2];B=B+1|0;if((B|0)>=(z|0)){break}else{C=C+1|0}}x=x+D|0}if((x|0)>=(e|0)){x=0;w=23;break}}if((w|0)==23){i=v;return x|0}}x=a+16|0;y=0;a:while(1){if((y|0)>=(e|0)){x=0;w=23;break}b:while(1){A=Mc(a,d)|0;if((A|0)==-1){x=-1;w=23;break a}z=c[x>>2]|0;E=c[a>>2]|0;A=$(E,A)|0;switch(E|0){case 5:{s=y;t=0;w=15;break b};case 8:{w=12;break b};case 6:{o=y;p=0;w=14;break b};case 2:{h=y;j=0;w=18;break b};case 3:{k=y;l=0;w=17;break b};case 1:{u=y;f=0;break b};case 7:{q=y;r=0;w=13;break b};case 4:{m=y;n=0;w=16;break b};default:{}}}if((w|0)==12){q=b+(y<<2)|0;g[q>>2]=+g[z+(A<<2)>>2]+ +g[q>>2];q=y+1|0;r=1;w=13}if((w|0)==13){o=b+(q<<2)|0;g[o>>2]=+g[z+(r+A<<2)>>2]+ +g[o>>2];o=q+1|0;p=r+1|0;w=14}if((w|0)==14){s=b+(o<<2)|0;g[s>>2]=+g[z+(p+A<<2)>>2]+ +g[s>>2];s=o+1|0;t=p+1|0;w=15}if((w|0)==15){m=b+(s<<2)|0;g[m>>2]=+g[z+(t+A<<2)>>2]+ +g[m>>2];m=s+1|0;n=t+1|0;w=16}if((w|0)==16){k=b+(m<<2)|0;g[k>>2]=+g[z+(n+A<<2)>>2]+ +g[k>>2];k=m+1|0;l=n+1|0;w=17}if((w|0)==17){h=b+(k<<2)|0;g[h>>2]=+g[z+(l+A<<2)>>2]+ +g[h>>2];h=k+1|0;j=l+1|0;w=18}if((w|0)==18){w=0;u=b+(h<<2)|0;g[u>>2]=+g[z+(j+A<<2)>>2]+ +g[u>>2];u=h+1|0;f=j+1|0}y=b+(u<<2)|0;g[y>>2]=+g[z+(f+A<<2)>>2]+ +g[y>>2];y=u+1|0}if((w|0)==23){i=v;return x|0}return 0} - - - -function Pc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;h=(e|0)>0;a:do{if((c[a+8>>2]|0)>0){if(h){h=a+16|0;m=0;while(1){l=Mc(a,d)|0;if((l|0)==-1){e=-1;break a}j=c[h>>2]|0;k=c[a>>2]|0;l=$(k,l)|0;b:do{if((m|0)<(e|0)){o=0;while(1){if((o|0)>=(k|0)){break b}n=m+1|0;g[b+(m<<2)>>2]=+g[j+(o+l<<2)>>2];if((n|0)<(e|0)){m=n;o=o+1|0}else{m=n;break}}}}while(0);if((m|0)>=(e|0)){e=0;break}}}else{e=0}}else{if(h){ud(b|0,0,e<<2|0)|0;e=0}else{e=0}}}while(0);i=f;return e|0}function Qc(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 j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;j=i;if((c[a+8>>2]|0)<=0){p=0;i=j;return p|0}o=(d|0)/(e|0)|0;d=(h+d|0)/(e|0)|0;if((o|0)>=(d|0)){p=0;i=j;return p|0}h=a+16|0;n=0;while(1){m=Mc(a,f)|0;if((m|0)==-1){b=-1;a=8;break}l=c[h>>2]|0;k=c[a>>2]|0;m=$(k,m)|0;if((k|0)>0){p=0;do{q=n+1|0;n=(c[b+(n<<2)>>2]|0)+(o<<2)|0;g[n>>2]=+g[l+(p+m<<2)>>2]+ +g[n>>2];n=(q|0)==(e|0);o=(n&1)+o|0;n=n?0:q;p=p+1|0}while((p|0)<(k|0))}if((o|0)>=(d|0)){b=0;a=8;break}}if((a|0)==8){i=j;return b|0}return 0}function Rc(a){a=a|0;var b=0,c=0;b=i;if((a|0)==0){c=0}else{c=0;do{c=c+1|0;a=a>>>1}while((a|0)!=0)}i=b;return c|0}function Sc(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=i;i=i+144|0;j=f;k=(e|0)!=0;g=ld((k?e:d)<<2)|0;ud(j|0,0,132)|0;h=(d|0)>0;a:do{if(h){p=j+4|0;m=(e|0)==0&1;n=0;o=0;b:while(1){s=a[b+o>>0]|0;q=s<<24>>24;c:do{if(s<<24>>24>0){r=c[j+(q<<2)>>2]|0;if(s<<24>>24<32?(r>>>q|0)!=0:0){break b}c[g+(n<<2)>>2]=r;s=r;t=q;while(1){u=j+(t<<2)|0;if((s&1|0)!=0){l=9;break}c[u>>2]=s+1;t=t+ -1|0;if((t|0)<=0){break}s=c[j+(t<<2)>>2]|0}do{if((l|0)==9){l=0;if((t|0)==1){c[p>>2]=(c[p>>2]|0)+1;break}else{c[u>>2]=c[j+(t+ -1<<2)>>2]<<1;break}}}while(0);s=q+1|0;if((s|0)<33){while(1){t=j+(s<<2)|0;u=r;r=c[t>>2]|0;if((r>>>1|0)!=(u|0)){q=1;break c}c[t>>2]=c[j+(q<<2)>>2]<<1;q=s+1|0;if((q|0)>=33){q=1;break}else{u=s;s=q;q=u}}}else{q=1}}else{q=m}}while(0);o=o+1|0;if((o|0)>=(d|0)){break a}else{n=n+q|0}}md(g);u=0;i=f;return u|0}}while(0);d:do{if((e|0)!=1){l=1;while(1){if((c[j+(l<<2)>>2]&-1>>>(32-l|0)|0)!=0){break}l=l+1|0;if((l|0)>=33){break d}}md(g);u=0;i=f;return u|0}}while(0);if(!h){u=g;i=f;return u|0}if(k){j=0;h=0}else{h=0;j=0;while(1){l=a[b+j>>0]|0;if(l<<24>>24>0){k=c[g+(h<<2)>>2]|0;l=l<<24>>24;m=0;n=0;do{n=k>>>m&1|n<<1;m=m+1|0}while((m|0)<(l|0))}else{n=0}c[g+(h<<2)>>2]=n;j=j+1|0;if((j|0)==(d|0)){break}else{h=h+1|0}}i=f;return g|0}do{k=a[b+h>>0]|0;if(k<<24>>24>0){l=c[g+(j<<2)>>2]|0;m=k<<24>>24;n=0;o=0;do{o=l>>>n&1|o<<1;n=n+1|0}while((n|0)<(m|0))}else{o=0}if(!(k<<24>>24==0)){c[g+(j<<2)>>2]=o;j=j+1|0}h=h+1|0}while((h|0)!=(d|0));i=f;return g|0}function Tc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;d=c[a+4>>2]|0;a=c[a>>2]|0;e=~~+N(+(+Q(+(+(d|0)),+(1.0/+(a|0)))));if((a|0)<=0){while(1){}}while(1){f=e+1|0;j=1;h=1;g=0;do{j=$(j,e)|0;h=$(h,f)|0;g=g+1|0}while((g|0)<(a|0));if((j|0)<=(d|0)&(h|0)>(d|0)){break}if((j|0)>(d|0)){e=e+ -1|0;continue}else{e=e+1|0;continue}}i=b;return e|0}function Uc(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0,t=0,u=0,v=0,w=0.0,x=0,y=0,z=0.0;f=i;j=b+12|0;if(!(((c[j>>2]|0)+ -1|0)>>>0<2)){y=0;i=f;return y|0}h=c[b+16>>2]|0;q=+(h&2097151|0);if((h|0)<0){q=-q}r=+id(q,(h>>>21&1023)+ -788|0);h=c[b+20>>2]|0;q=+(h&2097151|0);if((h|0)<0){q=-q}q=+id(q,(h>>>21&1023)+ -788|0);h=c[b>>2]|0;d=nd($(h,d)|0,4)|0;j=c[j>>2]|0;if((j|0)==1){j=c[b+4>>2]|0;if((h|0)<=0){while(1){}}k=~~+N(+(+Q(+(+(j|0)),+(1.0/+(h|0)))));while(1){l=k+1|0;n=1;m=1;o=0;do{n=$(n,k)|0;m=$(m,l)|0;o=o+1|0}while((o|0)!=(h|0));if((n|0)<=(j|0)&(m|0)>(j|0)){break}k=(n|0)>(j|0)?k+ -1|0:l}if((j|0)<=0){y=d;i=f;return y|0}n=(e|0)!=0;m=b+8|0;l=n^1;o=b+32|0;s=b+28|0;t=0;b=0;do{if(n){if((a[(c[m>>2]|0)+b>>0]|0)!=0|l){v=c[o>>2]|0;u=(c[s>>2]|0)==0;p=e+(t<<2)|0;y=1;x=0;w=0.0;while(1){z=w+(r+q*+O(+(+(c[v+((((b|0)/(y|0)|0|0)%(k|0)|0)<<2)>>2]|0))));g[d+(($(c[p>>2]|0,h)|0)+x<<2)>>2]=z;y=$(y,k)|0;x=x+1|0;if((x|0)>=(h|0)){p=25;break}else{w=u?w:z}}}}else{p=c[o>>2]|0;if((c[s>>2]|0)==0){u=1;v=0;do{g[d+(($(h,t)|0)+v<<2)>>2]=r+q*+O(+(+(c[p+((((b|0)/(u|0)|0|0)%(k|0)|0)<<2)>>2]|0)));u=$(u,k)|0;v=v+1|0}while((v|0)<(h|0));p=25}else{v=1;u=0;w=0.0;do{w=w+(r+q*+O(+(+(c[p+((((b|0)/(v|0)|0|0)%(k|0)|0)<<2)>>2]|0))));g[d+(($(h,t)|0)+u<<2)>>2]=w;v=$(v,k)|0;u=u+1|0}while((u|0)<(h|0));p=25}}if((p|0)==25){p=0;t=t+1|0}b=b+1|0}while((b|0)<(j|0));i=f;return d|0}else if((j|0)==2){j=c[b+4>>2]|0;if((j|0)<=0){y=d;i=f;return y|0}l=(e|0)!=0;m=b+8|0;n=l^1;k=b+32|0;o=b+28|0;s=0;b=0;do{if(!(l?!((a[(c[m>>2]|0)+b>>0]|0)!=0|n):0)){if((h|0)>0){u=c[k>>2]|0;p=(c[o>>2]|0)==0;v=e+(s<<2)|0;t=0;z=0.0;while(1){w=z+(r+q*+O(+(+(c[u+(($(h,b)|0)+t<<2)>>2]|0))));if(l){g[d+(($(c[v>>2]|0,h)|0)+t<<2)>>2]=w}else{g[d+(($(h,s)|0)+t<<2)>>2]=w}t=t+1|0;if((t|0)>=(h|0)){break}else{z=p?z:w}}}s=s+1|0}b=b+1|0}while((b|0)<(j|0));i=f;return d|0}else{y=d;i=f;return y|0}return 0}function Vc(a){a=a|0;var b=0,d=0;b=i;if((c[a+36>>2]|0)==0){i=b;return}d=c[a+32>>2]|0;if((d|0)!=0){md(d)}d=c[a+8>>2]|0;if((d|0)!=0){md(d)}md(a);i=b;return}function Wc(a){a=a|0;var b=0,d=0;b=i;d=c[a+16>>2]|0;if((d|0)!=0){md(d)}d=c[a+20>>2]|0;if((d|0)!=0){md(d)}d=c[a+24>>2]|0;if((d|0)!=0){md(d)}d=c[a+28>>2]|0;if((d|0)!=0){md(d)}d=c[a+32>>2]|0;if((d|0)!=0){md(d)}d=a+0|0;a=d+56|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(a|0));i=b;return}function Xc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0.0;d=i;f=a+0|0;e=f+56|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(e|0));c[a+12>>2]=b;g=b+4|0;c[a+4>>2]=c[g>>2];c[a+8>>2]=c[g>>2];c[a>>2]=c[b>>2];c[a+20>>2]=Sc(c[b+8>>2]|0,c[g>>2]|0,0)|0;g=c[g>>2]|0;h=c[b>>2]|0;if((h|0)<=0){while(1){}}j=~~+N(+(+Q(+(+(g|0)),+(1.0/+(h|0)))));while(1){f=j+1|0;e=1;k=1;l=0;do{e=$(e,j)|0;k=$(k,f)|0;l=l+1|0}while((l|0)!=(h|0));if((e|0)<=(g|0)&(k|0)>(g|0)){break}j=(e|0)>(g|0)?j+ -1|0:f}c[a+44>>2]=j;e=c[b+16>>2]|0;m=+(e&2097151|0);if((e|0)<0){m=-m}c[a+48>>2]=~~+za(+(+id(m,(e>>>21&1023)+ -788|0)));l=c[b+20>>2]|0;m=+(l&2097151|0);b=l>>>21&1023;if((l|0)>=0){k=b+ -788|0;m=+id(m,k);m=+za(+m);k=~~m;l=a+52|0;c[l>>2]=k;i=d;return 0}m=-m;k=b+ -788|0;m=+id(m,k);m=+za(+m);k=~~m;l=a+52|0;c[l>>2]=k;i=d;return 0}function Yc(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;f=b+0|0;h=f+56|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(h|0));h=d+4|0;f=c[h>>2]|0;if((f|0)>0){j=c[d+8>>2]|0;k=0;m=0;do{m=((a[j+k>>0]|0)>0&1)+m|0;k=k+1|0}while((k|0)<(f|0))}else{m=0}c[b+4>>2]=f;j=b+8|0;c[j>>2]=m;c[b>>2]=c[d>>2];if((m|0)<=0){s=0;i=e;return s|0}k=d+8|0;o=Sc(c[k>>2]|0,c[h>>2]|0,m)|0;n=m<<2;p=i;i=i+((1*n|0)+15&-16)|0;if((o|0)==0){Wc(b);s=-1;i=e;return s|0}else{f=0}do{s=o+(f<<2)|0;r=c[s>>2]|0;r=r>>>16|r<<16;r=r>>>8&16711935|r<<8&-16711936;r=r>>>4&252645135|r<<4&-252645136;r=r>>>2&858993459|r<<2&-858993460;c[s>>2]=r>>>1&1431655765|r<<1&-1431655766;c[p+(f<<2)>>2]=s;f=f+1|0}while((f|0)!=(m|0));jd(p,m,4,114);l=i;i=i+((1*n|0)+15&-16)|0;q=ld(n)|0;f=b+20|0;c[f>>2]=q;s=o;r=0;do{c[l+((c[p+(r<<2)>>2]|0)-s>>2<<2)>>2]=r;r=r+1|0}while((r|0)!=(m|0));p=0;do{c[q+(c[l+(p<<2)>>2]<<2)>>2]=c[o+(p<<2)>>2];p=p+1|0}while((p|0)!=(m|0));md(o);c[b+16>>2]=Uc(d,m,l)|0;m=ld(n)|0;c[b+24>>2]=m;n=c[h>>2]|0;d=(n|0)>0;if(d){p=c[k>>2]|0;q=0;o=0;do{if((a[p+q>>0]|0)>0){c[m+(c[l+(o<<2)>>2]<<2)>>2]=q;o=o+1|0}q=q+1|0}while((q|0)<(n|0));m=b+28|0;c[m>>2]=ld(o)|0;if(d){o=0;d=0;do{p=a[(c[k>>2]|0)+o>>0]|0;if(p<<24>>24>0){a[(c[m>>2]|0)+(c[l+(d<<2)>>2]|0)>>0]=p;n=c[h>>2]|0;d=d+1|0}o=o+1|0}while((o|0)<(n|0))}else{d=0}}else{m=b+28|0;c[m>>2]=ld(0)|0;d=0}j=c[j>>2]|0;if((j|0)==0){j=-4}else{h=0;while(1){j=j>>>1;if((j|0)==0){break}else{h=h+1|0}}j=h+ -3|0}h=b+36|0;o=(j|0)<5?5:j;o=(o|0)>8?8:o;c[h>>2]=o;j=1<>2]=k;b=b+40|0;c[b>>2]=0;a:do{if((d|0)>0){l=c[m>>2]|0;p=0;m=0;while(1){n=l+m|0;q=a[n>>0]|0;r=q<<24>>24;if((p|0)<(r|0)){c[b>>2]=r;q=a[n>>0]|0}q=q<<24>>24;if((q|0)<=(o|0)?(g=c[(c[f>>2]|0)+(m<<2)>>2]|0,g=g>>>16|g<<16,g=g>>>8&16711935|g<<8&-16711936,g=g>>>4&252645135|g<<4&-252645136,g=g>>>2&858993459|g<<2&-858993460,g=g>>>1&1431655765|g<<1&-1431655766,(1<0):0){p=m+1|0;r=0;do{c[k+((g|r<>2]=p;r=r+1|0;o=c[h>>2]|0;q=a[n>>0]|0}while((r|0)<(1<>2]|0}}}while(0);g=-2<<31-o;if((j|0)>0){l=0;b=0;m=0}else{s=0;i=e;return s|0}while(1){o=b<<32-o;n=o>>>16|o<<16;n=n>>>8&16711935|n<<8&-16711936;n=n>>>4&252645135|n<<4&-252645136;n=n>>>2&858993459|n<<2&-858993460;n=k+((n>>>1&1431655765|n<<1&-1431655766)<<2)|0;if((c[n>>2]|0)==0){while(1){p=m+1|0;if((p|0)>=(d|0)){break}if((c[(c[f>>2]|0)+(p<<2)>>2]|0)>>>0>o>>>0){break}else{m=p}}b:do{if((l|0)<(d|0)){p=c[f>>2]|0;while(1){q=l+1|0;if(o>>>0<(c[p+(l<<2)>>2]&g)>>>0){break b}if((q|0)<(d|0)){l=q}else{l=q;break}}}}while(0);s=d-l|0;c[n>>2]=(m>>>0>32767?-1073774592:m<<15|-2147483648)|(s>>>0>32767?32767:s)}b=b+1|0;if((b|0)==(j|0)){f=0;break}o=c[h>>2]|0}i=e;return f|0}function Zc(a,b){a=a|0;b=b|0;var d=0;d=c[c[a>>2]>>2]|0;a=c[c[b>>2]>>2]|0;return(d>>>0>a>>>0&1)-(d>>>0>>0&1)|0}function _c(a){a=a|0;var b=0,d=0;b=i;d=a+0|0;a=d+48|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(a|0));i=b;return}function $c(a){a=a|0;return(c[(c[(c[a+64>>2]|0)+104>>2]|0)+80>>2]|0)!=0|0}function ad(a,b){a=a|0;b=b|0;var d=0,e=0;e=i;d=nd(1,320)|0;Xb(d);Vb(d+32|0);c[d+280>>2]=1;c[d+308>>2]=a;c[d+312>>2]=b;i=e;return d|0}function bd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;f=a+272|0;c[f>>2]=b;c[a+276>>2]=d;d=Zb(a,a+32|0,f)|0;a=a+280|0;if((c[a>>2]|0)==0){i=e;return d|0}c[a>>2]=0;i=e;return d|0}function cd(a){a=a|0;return c[a+4>>2]|0}function dd(a){a=a|0;return c[a+8>>2]|0}function ed(a){a=a|0;return c[a+40>>2]|0}function fd(a,b){a=a|0;b=b|0;var d=0;d=i;if((c[a+40>>2]|0)<=(b|0)){b=0;i=d;return b|0}b=c[(c[a+32>>2]|0)+(b<<2)>>2]|0;i=d;return b|0}function gd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;f=i;i=i+16|0;k=f;l=a+272|0;c[l>>2]=b;c[a+276>>2]=d;b=a+304|0;if((c[b>>2]|0)<3){q=Zb(a,a+32|0,l)|0;t=(c[b>>2]|0)+1|0;c[b>>2]=t;if((q|0)==0&(t|0)==3){e=a+312|0;c[e>>2]=(c[e>>2]|0)/(c[a+4>>2]|0)|0;e=a+48|0;q=zb(e,a)|0;if((q|0)==0){q=tb(e,a+160|0)|0}}}else{b=a+160|0;q=Hb(b,l)|0;l=a+48|0;if((q|0)==0){q=Ab(l,b)|0}p=Bb(l,k)|0;if((p|0)>0){d=a+4|0;b=a+312|0;m=a+308|0;do{n=c[d>>2]|0;q=c[b>>2]|0;o=(p|0)<(q|0)?p:q;if((n|0)>0?(j=c[m>>2]|0,h=c[k>>2]|0,(o|0)>0):0){t=~p;r=~q;r=~((t|0)>(r|0)?t:r);q=0;do{t=c[h+(q<<2)>>2]|0;s=j+(q<<2)|0;p=0;while(1){g[s>>2]=+g[t+(p<<2)>>2];p=p+1|0;if((p|0)==(r|0)){break}else{s=s+(n<<2)|0}}q=q+1|0}while((q|0)!=(n|0))}q=Cb(l,o)|0;p=$(o,n)|0;Ma[e&127](p);p=Bb(l,k)|0}while((p|0)>0)}}a=a+280|0;if((c[a>>2]|0)==0){i=f;return q|0}c[a>>2]=0;i=f;return q|0}function hd(a){a=a|0;var b=0;b=i;yb(a+48|0);wb(a+160|0)|0;Yb(a);Wb(a+32|0);md(a);i=b;return}function id(a,b){a=+a;b=b|0;var c=0;c=i;a=+rd(a,b);i=c;return+a}function jd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;f=i;i=i+944|0;n=f+680|0;j=f+424|0;m=f+192|0;g=f;b=$(d,b)|0;if((b|0)==0){i=f;return}p=b-d|0;c[g+4>>2]=d;c[g>>2]=d;r=d;q=d;o=2;while(1){r=r+d+q|0;c[g+(o<<2)>>2]=r;if(r>>>0>>0){D=q;q=r;o=o+1|0;r=D}else{break}}b=0-d|0;o=a+p|0;if((p|0)>0){s=(d|0)==0;q=d>>>0>256?256:d;p=(q|0)==(d|0);r=o;t=1;u=0;v=1;do{do{if((t&3|0)!=3){w=v+ -1|0;a:do{if((c[g+(w<<2)>>2]|0)>>>0<(r-a|0)>>>0){c[m>>2]=a;if((v|0)>1){y=v;D=a;C=a;B=1;while(1){A=D+b|0;z=y+ -2|0;D=D+(0-((c[g+(z<<2)>>2]|0)+d))|0;if((Ra[e&127](C,D)|0)>-1?(Ra[e&127](C,A)|0)>-1:0){x=B;break}x=B+1|0;B=m+(B<<2)|0;if((Ra[e&127](D,A)|0)>-1){c[B>>2]=D;A=D;y=y+ -1|0}else{c[B>>2]=A;y=z}if((y|0)<=1){break}D=A;C=c[m>>2]|0;B=x}if((x|0)>=2?(k=m+(x<<2)|0,c[k>>2]=n,!s):0){if((x|0)>0){y=d;A=n}else{x=c[m>>2]|0;yd(n|0,x|0,q|0)|0;if(p){break}else{z=d;y=q}while(1){z=z-y|0;y=z>>>0>256?256:z;yd(n|0,x|0,y|0)|0;if((z|0)==(y|0)){break a}}}while(1){z=y>>>0>256?256:y;B=c[m>>2]|0;yd(A|0,B|0,z|0)|0;A=0;do{D=A;A=A+1|0;C=B;B=c[m+(A<<2)>>2]|0;yd(C|0,B|0,z|0)|0;c[m+(D<<2)>>2]=C+z}while((A|0)!=(x|0));if((y|0)==(z|0)){break a}y=y-z|0;A=c[k>>2]|0}}}}else{kd(a,d,e,t,u,v,0,g)}}while(0);if((v|0)==1){w=t<<1;u=t>>>31|u<<1;v=0;break}else{D=w>>>0>31;C=D?0:t;v=D?v+ -33|0:w;w=C<>>(32-v|0)|(D?t:u)<>2]=a;b:do{if((v|0)>1){y=v;A=a;B=a;C=1;while(1){z=A+b|0;x=y+ -2|0;A=A+(0-((c[g+(x<<2)>>2]|0)+d))|0;if((Ra[e&127](B,A)|0)>-1?(Ra[e&127](B,z)|0)>-1:0){w=C;break}w=C+1|0;B=m+(C<<2)|0;if((Ra[e&127](A,z)|0)>-1){c[B>>2]=A;z=A;x=y+ -1|0}else{c[B>>2]=z}if((x|0)<=1){break}y=x;A=z;B=c[m>>2]|0;C=w}if((w|0)>=2?(l=m+(w<<2)|0,c[l>>2]=j,!s):0){if((w|0)>0){x=d;z=j}else{w=c[m>>2]|0;yd(j|0,w|0,q|0)|0;if(p){break}else{x=d;y=q}while(1){x=x-y|0;y=x>>>0>256?256:x;yd(j|0,w|0,y|0)|0;if((x|0)==(y|0)){break b}}}while(1){y=x>>>0>256?256:x;A=c[m>>2]|0;yd(z|0,A|0,y|0)|0;z=0;do{D=z;z=z+1|0;C=A;A=c[m+(z<<2)>>2]|0;yd(C|0,A|0,y|0)|0;c[m+(D<<2)>>2]=C+y}while((z|0)!=(w|0));if((x|0)==(y|0)){break b}x=x-y|0;z=c[l>>2]|0}}}}while(0);w=t>>>2|u<<30;u=u>>>2;v=v+2|0}}while(0);t=w|1;a=a+d|0}while(a>>>0>>0)}else{u=0;t=1;v=1}kd(a,d,e,t,u,v,0,g);while(1){if((v|0)==1){if((t|0)==1){if((u|0)==0){break}else{h=52}}}else{h=52}if((h|0)==52?(h=0,(v|0)>=2):0){B=t>>>30;D=v+ -2|0;A=(t<<1&2147483646|B<<31)^3;C=(B|u<<2)>>>1;kd(a+(0-((c[g+(D<<2)>>2]|0)+d))|0,d,e,A,C,v+ -1|0,1,g);B=C<<1|B&1;A=A<<1|1;C=a+b|0;kd(C,d,e,A,B,D,1,g);t=A;u=B;a=C;v=D;continue}j=t+ -1|0;if((j|0)!=0){if((j&1|0)==0){k=0;do{k=k+1|0;j=j>>>1}while((j&1|0)==0);if((k|0)==0){h=57}}else{h=57}if((h|0)==57){h=0;if((u|0)!=0){if((u&1|0)==0){j=u;k=0;do{k=k+1|0;j=j>>>1}while((j&1|0)==0)}else{k=0}}else{k=32}k=(k|0)==0?0:k+32|0}if(k>>>0>31){h=62}else{j=k}}else{k=32;h=62}if((h|0)==62){h=0;j=k+ -32|0;t=u;u=0}t=u<<32-j|t>>>j;u=u>>>j;a=a+b|0;v=k+v|0}i=f;return}function kd(a,b,d,e,f,g,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;k=i;i=i+720|0;l=k+456|0;m=k+228|0;p=k;c[p>>2]=a;o=0-b|0;a:do{if((e|0)==1&(f|0)==0){s=1;r=18}else{t=a;v=a;u=1;while(1){a=t+(0-(c[j+(g<<2)>>2]|0))|0;if((Ra[d&127](a,v)|0)<1){a=t;s=u;r=18;break a}if((h|0)==0&(g|0)>1){s=c[j+(g+ -2<<2)>>2]|0;if((Ra[d&127](t+o|0,a)|0)>-1){a=t;s=u;break a}if((Ra[d&127](t+(0-(s+b))|0,a)|0)>-1){a=t;s=u;break a}}s=u+1|0;c[p+(u<<2)>>2]=a;h=e+ -1|0;if((h|0)!=0){if((h&1|0)==0){t=0;do{t=t+1|0;h=h>>>1}while((h&1|0)==0);if((t|0)==0){r=10}}else{r=10}if((r|0)==10){r=0;if((f|0)!=0){if((f&1|0)==0){h=f;t=0;do{t=t+1|0;h=h>>>1}while((h&1|0)==0)}else{t=0}}else{t=32}t=(t|0)==0?0:t+32|0}if(t>>>0>31){r=15}else{h=t}}else{t=32;r=15}if((r|0)==15){r=0;h=t+ -32|0;e=f;f=0}e=f<<32-h|e>>>h;f=f>>>h;g=t+g|0;if((e|0)==1&(f|0)==0){break a}t=a;h=0;v=c[p>>2]|0;u=s}}}while(0);if((r|0)==18){if((h|0)!=0){i=k;return}}b:do{if((s|0)>=2?(q=p+(s<<2)|0,c[q>>2]=l,(b|0)!=0):0){if((s|0)>0){r=b;e=l}else{q=b>>>0>256?256:b;p=c[p>>2]|0;yd(l|0,p|0,q|0)|0;if((q|0)==(b|0)){break}else{r=b}while(1){r=r-q|0;q=r>>>0>256?256:r;yd(l|0,p|0,q|0)|0;if((r|0)==(q|0)){break b}}}while(1){f=r>>>0>256?256:r;h=c[p>>2]|0;yd(e|0,h|0,f|0)|0;e=0;do{v=e;e=e+1|0;u=h;h=c[p+(e<<2)>>2]|0;yd(u|0,h|0,f|0)|0;c[p+(v<<2)>>2]=u+f}while((e|0)!=(s|0));if((r|0)==(f|0)){break b}r=r-f|0;e=c[q>>2]|0}}}while(0);c[m>>2]=a;c:do{if((g|0)>1){f=a;s=1;while(1){r=f+o|0;q=g+ -2|0;f=f+(0-((c[j+(q<<2)>>2]|0)+b))|0;if((Ra[d&127](a,f)|0)>-1?(Ra[d&127](a,r)|0)>-1:0){p=s;break}p=s+1|0;s=m+(s<<2)|0;if((Ra[d&127](f,r)|0)>-1){c[s>>2]=f;r=f;g=g+ -1|0}else{c[s>>2]=r;g=q}if((g|0)<=1){break}f=r;a=c[m>>2]|0;s=p}if((p|0)>=2?(n=m+(p<<2)|0,c[n>>2]=l,(b|0)!=0):0){if((p|0)>0){d=l}else{n=b>>>0>256?256:b;m=c[m>>2]|0;yd(l|0,m|0,n|0)|0;if((n|0)==(b|0)){break}while(1){b=b-n|0;n=b>>>0>256?256:b;yd(l|0,m|0,n|0)|0;if((b|0)==(n|0)){break c}}}while(1){j=b>>>0>256?256:b;o=c[m>>2]|0;yd(d|0,o|0,j|0)|0;d=0;do{v=d;d=d+1|0;u=o;o=c[m+(d<<2)>>2]|0;yd(u|0,o|0,j|0)|0;c[m+(v<<2)>>2]=u+j}while((d|0)!=(p|0));if((b|0)==(j|0)){break c}b=b-j|0;d=c[n>>2]|0}}}}while(0);i=k;return}function ld(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;b=i;do{if(a>>>0<245){if(a>>>0<11){a=16}else{a=a+11&-8}v=a>>>3;p=c[14612]|0;w=p>>>v;if((w&3|0)!=0){h=(w&1^1)+v|0;g=h<<1;e=58488+(g<<2)|0;g=58488+(g+2<<2)|0;j=c[g>>2]|0;d=j+8|0;f=c[d>>2]|0;do{if((e|0)!=(f|0)){if(f>>>0<(c[58464>>2]|0)>>>0){Ea()}k=f+12|0;if((c[k>>2]|0)==(j|0)){c[k>>2]=e;c[g>>2]=f;break}else{Ea()}}else{c[14612]=p&~(1<>2]=H|3;H=j+(H|4)|0;c[H>>2]=c[H>>2]|1;H=d;i=b;return H|0}if(a>>>0>(c[58456>>2]|0)>>>0){if((w|0)!=0){h=2<>>12&16;h=h>>>d;f=h>>>5&8;h=h>>>f;g=h>>>2&4;h=h>>>g;e=h>>>1&2;h=h>>>e;j=h>>>1&1;j=(f|d|g|e|j)+(h>>>j)|0;h=j<<1;e=58488+(h<<2)|0;h=58488+(h+2<<2)|0;g=c[h>>2]|0;d=g+8|0;f=c[d>>2]|0;do{if((e|0)!=(f|0)){if(f>>>0<(c[58464>>2]|0)>>>0){Ea()}k=f+12|0;if((c[k>>2]|0)==(g|0)){c[k>>2]=e;c[h>>2]=f;break}else{Ea()}}else{c[14612]=p&~(1<>2]=a|3;e=g+a|0;c[g+(a|4)>>2]=f|1;c[g+h>>2]=f;h=c[58456>>2]|0;if((h|0)!=0){g=c[58468>>2]|0;k=h>>>3;j=k<<1;h=58488+(j<<2)|0;l=c[14612]|0;k=1<>2]|0;if(k>>>0<(c[58464>>2]|0)>>>0){Ea()}else{D=j;C=k}}else{c[14612]=l|k;D=58488+(j+2<<2)|0;C=h}c[D>>2]=g;c[C+12>>2]=g;c[g+8>>2]=C;c[g+12>>2]=h}c[58456>>2]=f;c[58468>>2]=e;H=d;i=b;return H|0}p=c[58452>>2]|0;if((p|0)!=0){e=(p&0-p)+ -1|0;G=e>>>12&16;e=e>>>G;F=e>>>5&8;e=e>>>F;H=e>>>2&4;e=e>>>H;f=e>>>1&2;e=e>>>f;d=e>>>1&1;d=c[58752+((F|G|H|f|d)+(e>>>d)<<2)>>2]|0;e=(c[d+4>>2]&-8)-a|0;f=d;while(1){g=c[f+16>>2]|0;if((g|0)==0){g=c[f+20>>2]|0;if((g|0)==0){break}}f=(c[g+4>>2]&-8)-a|0;H=f>>>0>>0;e=H?f:e;f=g;d=H?g:d}h=c[58464>>2]|0;if(d>>>0>>0){Ea()}f=d+a|0;if(!(d>>>0>>0)){Ea()}g=c[d+24>>2]|0;k=c[d+12>>2]|0;do{if((k|0)==(d|0)){k=d+20|0;j=c[k>>2]|0;if((j|0)==0){k=d+16|0;j=c[k>>2]|0;if((j|0)==0){B=0;break}}while(1){l=j+20|0;m=c[l>>2]|0;if((m|0)!=0){j=m;k=l;continue}m=j+16|0;l=c[m>>2]|0;if((l|0)==0){break}else{j=l;k=m}}if(k>>>0>>0){Ea()}else{c[k>>2]=0;B=j;break}}else{j=c[d+8>>2]|0;if(j>>>0>>0){Ea()}h=j+12|0;if((c[h>>2]|0)!=(d|0)){Ea()}l=k+8|0;if((c[l>>2]|0)==(d|0)){c[h>>2]=k;c[l>>2]=j;B=k;break}else{Ea()}}}while(0);do{if((g|0)!=0){h=c[d+28>>2]|0;j=58752+(h<<2)|0;if((d|0)==(c[j>>2]|0)){c[j>>2]=B;if((B|0)==0){c[58452>>2]=c[58452>>2]&~(1<>>0<(c[58464>>2]|0)>>>0){Ea()}h=g+16|0;if((c[h>>2]|0)==(d|0)){c[h>>2]=B}else{c[g+20>>2]=B}if((B|0)==0){break}}if(B>>>0<(c[58464>>2]|0)>>>0){Ea()}c[B+24>>2]=g;g=c[d+16>>2]|0;do{if((g|0)!=0){if(g>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[B+16>>2]=g;c[g+24>>2]=B;break}}}while(0);g=c[d+20>>2]|0;if((g|0)!=0){if(g>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[B+20>>2]=g;c[g+24>>2]=B;break}}}}while(0);if(e>>>0<16){H=e+a|0;c[d+4>>2]=H|3;H=d+(H+4)|0;c[H>>2]=c[H>>2]|1}else{c[d+4>>2]=a|3;c[d+(a|4)>>2]=e|1;c[d+(e+a)>>2]=e;h=c[58456>>2]|0;if((h|0)!=0){g=c[58468>>2]|0;l=h>>>3;j=l<<1;h=58488+(j<<2)|0;k=c[14612]|0;l=1<>2]|0;if(k>>>0<(c[58464>>2]|0)>>>0){Ea()}else{A=j;z=k}}else{c[14612]=k|l;A=58488+(j+2<<2)|0;z=h}c[A>>2]=g;c[z+12>>2]=g;c[g+8>>2]=z;c[g+12>>2]=h}c[58456>>2]=e;c[58468>>2]=f}H=d+8|0;i=b;return H|0}}}else{if(!(a>>>0>4294967231)){z=a+11|0;a=z&-8;B=c[58452>>2]|0;if((B|0)!=0){A=0-a|0;z=z>>>8;if((z|0)!=0){if(a>>>0>16777215){C=31}else{G=(z+1048320|0)>>>16&8;H=z<>>16&4;H=H<>>16&2;C=14-(F|G|C)+(H<>>15)|0;C=a>>>(C+7|0)&1|C<<1}}else{C=0}D=c[58752+(C<<2)>>2]|0;a:do{if((D|0)==0){F=0;z=0}else{if((C|0)==31){z=0}else{z=25-(C>>>1)|0}F=0;E=a<>2]&-8;G=H-a|0;if(G>>>0>>0){if((H|0)==(a|0)){A=G;F=D;z=D;break a}else{A=G;z=D}}H=c[D+20>>2]|0;D=c[D+(E>>>31<<2)+16>>2]|0;F=(H|0)==0|(H|0)==(D|0)?F:H;if((D|0)==0){break}else{E=E<<1}}}}while(0);if((F|0)==0&(z|0)==0){H=2<>>12&16;H=H>>>D;C=H>>>5&8;H=H>>>C;E=H>>>2&4;H=H>>>E;G=H>>>1&2;H=H>>>G;F=H>>>1&1;F=c[58752+((C|D|E|G|F)+(H>>>F)<<2)>>2]|0}if((F|0)!=0){while(1){H=(c[F+4>>2]&-8)-a|0;B=H>>>0>>0;A=B?H:A;z=B?F:z;B=c[F+16>>2]|0;if((B|0)!=0){F=B;continue}F=c[F+20>>2]|0;if((F|0)==0){break}}}if((z|0)!=0?A>>>0<((c[58456>>2]|0)-a|0)>>>0:0){f=c[58464>>2]|0;if(z>>>0>>0){Ea()}d=z+a|0;if(!(z>>>0>>0)){Ea()}e=c[z+24>>2]|0;h=c[z+12>>2]|0;do{if((h|0)==(z|0)){h=z+20|0;g=c[h>>2]|0;if((g|0)==0){h=z+16|0;g=c[h>>2]|0;if((g|0)==0){x=0;break}}while(1){j=g+20|0;k=c[j>>2]|0;if((k|0)!=0){g=k;h=j;continue}j=g+16|0;k=c[j>>2]|0;if((k|0)==0){break}else{g=k;h=j}}if(h>>>0>>0){Ea()}else{c[h>>2]=0;x=g;break}}else{g=c[z+8>>2]|0;if(g>>>0>>0){Ea()}f=g+12|0;if((c[f>>2]|0)!=(z|0)){Ea()}j=h+8|0;if((c[j>>2]|0)==(z|0)){c[f>>2]=h;c[j>>2]=g;x=h;break}else{Ea()}}}while(0);do{if((e|0)!=0){g=c[z+28>>2]|0;f=58752+(g<<2)|0;if((z|0)==(c[f>>2]|0)){c[f>>2]=x;if((x|0)==0){c[58452>>2]=c[58452>>2]&~(1<>>0<(c[58464>>2]|0)>>>0){Ea()}f=e+16|0;if((c[f>>2]|0)==(z|0)){c[f>>2]=x}else{c[e+20>>2]=x}if((x|0)==0){break}}if(x>>>0<(c[58464>>2]|0)>>>0){Ea()}c[x+24>>2]=e;e=c[z+16>>2]|0;do{if((e|0)!=0){if(e>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[x+16>>2]=e;c[e+24>>2]=x;break}}}while(0);e=c[z+20>>2]|0;if((e|0)!=0){if(e>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[x+20>>2]=e;c[e+24>>2]=x;break}}}}while(0);b:do{if(!(A>>>0<16)){c[z+4>>2]=a|3;c[z+(a|4)>>2]=A|1;c[z+(A+a)>>2]=A;f=A>>>3;if(A>>>0<256){h=f<<1;e=58488+(h<<2)|0;g=c[14612]|0;f=1<>2]|0;if(!(g>>>0<(c[58464>>2]|0)>>>0)){w=f;v=g;break}Ea()}}while(0);c[w>>2]=d;c[v+12>>2]=d;c[z+(a+8)>>2]=v;c[z+(a+12)>>2]=e;break}e=A>>>8;if((e|0)!=0){if(A>>>0>16777215){e=31}else{G=(e+1048320|0)>>>16&8;H=e<>>16&4;H=H<>>16&2;e=14-(F|G|e)+(H<>>15)|0;e=A>>>(e+7|0)&1|e<<1}}else{e=0}f=58752+(e<<2)|0;c[z+(a+28)>>2]=e;c[z+(a+20)>>2]=0;c[z+(a+16)>>2]=0;h=c[58452>>2]|0;g=1<>2]=h|g;c[f>>2]=d;c[z+(a+24)>>2]=f;c[z+(a+12)>>2]=d;c[z+(a+8)>>2]=d;break}f=c[f>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}c:do{if((c[f+4>>2]&-8|0)!=(A|0)){e=A<>>31<<2)+16|0;h=c[g>>2]|0;if((h|0)==0){break}if((c[h+4>>2]&-8|0)==(A|0)){p=h;break c}else{e=e<<1;f=h}}if(g>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[g>>2]=d;c[z+(a+24)>>2]=f;c[z+(a+12)>>2]=d;c[z+(a+8)>>2]=d;break b}}else{p=f}}while(0);f=p+8|0;e=c[f>>2]|0;g=c[58464>>2]|0;if(p>>>0>>0){Ea()}if(e>>>0>>0){Ea()}else{c[e+12>>2]=d;c[f>>2]=d;c[z+(a+8)>>2]=e;c[z+(a+12)>>2]=p;c[z+(a+24)>>2]=0;break}}else{H=A+a|0;c[z+4>>2]=H|3;H=z+(H+4)|0;c[H>>2]=c[H>>2]|1}}while(0);H=z+8|0;i=b;return H|0}}}else{a=-1}}}while(0);p=c[58456>>2]|0;if(!(a>>>0>p>>>0)){e=p-a|0;d=c[58468>>2]|0;if(e>>>0>15){c[58468>>2]=d+a;c[58456>>2]=e;c[d+(a+4)>>2]=e|1;c[d+p>>2]=e;c[d+4>>2]=a|3}else{c[58456>>2]=0;c[58468>>2]=0;c[d+4>>2]=p|3;H=d+(p+4)|0;c[H>>2]=c[H>>2]|1}H=d+8|0;i=b;return H|0}p=c[58460>>2]|0;if(a>>>0

>>0){G=p-a|0;c[58460>>2]=G;H=c[58472>>2]|0;c[58472>>2]=H+a;c[H+(a+4)>>2]=G|1;c[H+4>>2]=a|3;H=H+8|0;i=b;return H|0}do{if((c[14730]|0)==0){p=Da(30)|0;if((p+ -1&p|0)==0){c[58928>>2]=p;c[58924>>2]=p;c[58932>>2]=-1;c[58936>>2]=-1;c[58940>>2]=0;c[58892>>2]=0;c[14730]=(Fa(0)|0)&-16^1431655768;break}else{Ea()}}}while(0);w=a+48|0;p=c[58928>>2]|0;x=a+47|0;z=p+x|0;p=0-p|0;v=z&p;if(!(v>>>0>a>>>0)){H=0;i=b;return H|0}A=c[58888>>2]|0;if((A|0)!=0?(G=c[58880>>2]|0,H=G+v|0,H>>>0<=G>>>0|H>>>0>A>>>0):0){H=0;i=b;return H|0}d:do{if((c[58892>>2]&4|0)==0){B=c[58472>>2]|0;e:do{if((B|0)!=0){A=58896|0;while(1){C=c[A>>2]|0;if(!(C>>>0>B>>>0)?(y=A+4|0,(C+(c[y>>2]|0)|0)>>>0>B>>>0):0){break}A=c[A+8>>2]|0;if((A|0)==0){o=182;break e}}if((A|0)!=0){B=z-(c[58460>>2]|0)&p;if(B>>>0<2147483647){p=va(B|0)|0;A=(p|0)==((c[A>>2]|0)+(c[y>>2]|0)|0);y=p;z=B;p=A?p:-1;A=A?B:0;o=191}else{A=0}}else{o=182}}else{o=182}}while(0);do{if((o|0)==182){p=va(0)|0;if((p|0)!=(-1|0)){z=p;A=c[58924>>2]|0;y=A+ -1|0;if((y&z|0)==0){A=v}else{A=v-z+(y+z&0-A)|0}y=c[58880>>2]|0;z=y+A|0;if(A>>>0>a>>>0&A>>>0<2147483647){H=c[58888>>2]|0;if((H|0)!=0?z>>>0<=y>>>0|z>>>0>H>>>0:0){A=0;break}y=va(A|0)|0;o=(y|0)==(p|0);z=A;p=o?p:-1;A=o?A:0;o=191}else{A=0}}else{A=0}}}while(0);f:do{if((o|0)==191){o=0-z|0;if((p|0)!=(-1|0)){q=A;o=202;break d}do{if((y|0)!=(-1|0)&z>>>0<2147483647&z>>>0>>0?(u=c[58928>>2]|0,u=x-z+u&0-u,u>>>0<2147483647):0){if((va(u|0)|0)==(-1|0)){va(o|0)|0;break f}else{z=u+z|0;break}}}while(0);if((y|0)!=(-1|0)){p=y;q=z;o=202;break d}}}while(0);c[58892>>2]=c[58892>>2]|4;o=199}else{A=0;o=199}}while(0);if((((o|0)==199?v>>>0<2147483647:0)?(t=va(v|0)|0,s=va(0)|0,(s|0)!=(-1|0)&(t|0)!=(-1|0)&t>>>0>>0):0)?(r=s-t|0,q=r>>>0>(a+40|0)>>>0,q):0){p=t;q=q?r:A;o=202}if((o|0)==202){r=(c[58880>>2]|0)+q|0;c[58880>>2]=r;if(r>>>0>(c[58884>>2]|0)>>>0){c[58884>>2]=r}r=c[58472>>2]|0;g:do{if((r|0)!=0){v=58896|0;while(1){t=c[v>>2]|0;u=v+4|0;s=c[u>>2]|0;if((p|0)==(t+s|0)){o=214;break}w=c[v+8>>2]|0;if((w|0)==0){break}else{v=w}}if(((o|0)==214?(c[v+12>>2]&8|0)==0:0)?r>>>0>=t>>>0&r>>>0

>>0:0){c[u>>2]=s+q;d=(c[58460>>2]|0)+q|0;e=r+8|0;if((e&7|0)==0){e=0}else{e=0-e&7}H=d-e|0;c[58472>>2]=r+e;c[58460>>2]=H;c[r+(e+4)>>2]=H|1;c[r+(d+4)>>2]=40;c[58476>>2]=c[58936>>2];break}if(p>>>0<(c[58464>>2]|0)>>>0){c[58464>>2]=p}t=p+q|0;s=58896|0;while(1){if((c[s>>2]|0)==(t|0)){o=224;break}u=c[s+8>>2]|0;if((u|0)==0){break}else{s=u}}if((o|0)==224?(c[s+12>>2]&8|0)==0:0){c[s>>2]=p;h=s+4|0;c[h>>2]=(c[h>>2]|0)+q;h=p+8|0;if((h&7|0)==0){h=0}else{h=0-h&7}j=p+(q+8)|0;if((j&7|0)==0){n=0}else{n=0-j&7}o=p+(n+q)|0;j=h+a|0;k=p+j|0;m=o-(p+h)-a|0;c[p+(h+4)>>2]=a|3;h:do{if((o|0)!=(c[58472>>2]|0)){if((o|0)==(c[58468>>2]|0)){H=(c[58456>>2]|0)+m|0;c[58456>>2]=H;c[58468>>2]=k;c[p+(j+4)>>2]=H|1;c[p+(H+j)>>2]=H;break}r=q+4|0;t=c[p+(r+n)>>2]|0;if((t&3|0)==1){a=t&-8;s=t>>>3;i:do{if(!(t>>>0<256)){l=c[p+((n|24)+q)>>2]|0;u=c[p+(q+12+n)>>2]|0;do{if((u|0)==(o|0)){u=n|16;t=p+(r+u)|0;s=c[t>>2]|0;if((s|0)==0){t=p+(u+q)|0;s=c[t>>2]|0;if((s|0)==0){g=0;break}}while(1){u=s+20|0;v=c[u>>2]|0;if((v|0)!=0){s=v;t=u;continue}u=s+16|0;v=c[u>>2]|0;if((v|0)==0){break}else{s=v;t=u}}if(t>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[t>>2]=0;g=s;break}}else{t=c[p+((n|8)+q)>>2]|0;if(t>>>0<(c[58464>>2]|0)>>>0){Ea()}v=t+12|0;if((c[v>>2]|0)!=(o|0)){Ea()}s=u+8|0;if((c[s>>2]|0)==(o|0)){c[v>>2]=u;c[s>>2]=t;g=u;break}else{Ea()}}}while(0);if((l|0)==0){break}t=c[p+(q+28+n)>>2]|0;s=58752+(t<<2)|0;do{if((o|0)!=(c[s>>2]|0)){if(l>>>0<(c[58464>>2]|0)>>>0){Ea()}s=l+16|0;if((c[s>>2]|0)==(o|0)){c[s>>2]=g}else{c[l+20>>2]=g}if((g|0)==0){break i}}else{c[s>>2]=g;if((g|0)!=0){break}c[58452>>2]=c[58452>>2]&~(1<>>0<(c[58464>>2]|0)>>>0){Ea()}c[g+24>>2]=l;l=n|16;o=c[p+(l+q)>>2]|0;do{if((o|0)!=0){if(o>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[g+16>>2]=o;c[o+24>>2]=g;break}}}while(0);l=c[p+(r+l)>>2]|0;if((l|0)==0){break}if(l>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[g+20>>2]=l;c[l+24>>2]=g;break}}else{r=c[p+((n|8)+q)>>2]|0;g=c[p+(q+12+n)>>2]|0;t=58488+(s<<1<<2)|0;do{if((r|0)!=(t|0)){if(r>>>0<(c[58464>>2]|0)>>>0){Ea()}if((c[r+12>>2]|0)==(o|0)){break}Ea()}}while(0);if((g|0)==(r|0)){c[14612]=c[14612]&~(1<>>0<(c[58464>>2]|0)>>>0){Ea()}s=g+8|0;if((c[s>>2]|0)==(o|0)){l=s;break}Ea()}}while(0);c[r+12>>2]=g;c[l>>2]=r}}while(0);o=p+((a|n)+q)|0;m=a+m|0}g=o+4|0;c[g>>2]=c[g>>2]&-2;c[p+(j+4)>>2]=m|1;c[p+(m+j)>>2]=m;g=m>>>3;if(m>>>0<256){m=g<<1;d=58488+(m<<2)|0;l=c[14612]|0;g=1<>2]|0;if(!(g>>>0<(c[58464>>2]|0)>>>0)){f=l;e=g;break}Ea()}}while(0);c[f>>2]=k;c[e+12>>2]=k;c[p+(j+8)>>2]=e;c[p+(j+12)>>2]=d;break}e=m>>>8;do{if((e|0)==0){e=0}else{if(m>>>0>16777215){e=31;break}G=(e+1048320|0)>>>16&8;H=e<>>16&4;H=H<>>16&2;e=14-(F|G|e)+(H<>>15)|0;e=m>>>(e+7|0)&1|e<<1}}while(0);l=58752+(e<<2)|0;c[p+(j+28)>>2]=e;c[p+(j+20)>>2]=0;c[p+(j+16)>>2]=0;f=c[58452>>2]|0;g=1<>2]=f|g;c[l>>2]=k;c[p+(j+24)>>2]=l;c[p+(j+12)>>2]=k;c[p+(j+8)>>2]=k;break}l=c[l>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}j:do{if((c[l+4>>2]&-8|0)!=(m|0)){e=m<>>31<<2)+16|0;f=c[g>>2]|0;if((f|0)==0){break}if((c[f+4>>2]&-8|0)==(m|0)){d=f;break j}else{e=e<<1;l=f}}if(g>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[g>>2]=k;c[p+(j+24)>>2]=l;c[p+(j+12)>>2]=k;c[p+(j+8)>>2]=k;break h}}else{d=l}}while(0);f=d+8|0;e=c[f>>2]|0;g=c[58464>>2]|0;if(d>>>0>>0){Ea()}if(e>>>0>>0){Ea()}else{c[e+12>>2]=k;c[f>>2]=k;c[p+(j+8)>>2]=e;c[p+(j+12)>>2]=d;c[p+(j+24)>>2]=0;break}}else{H=(c[58460>>2]|0)+m|0;c[58460>>2]=H;c[58472>>2]=k;c[p+(j+4)>>2]=H|1}}while(0);H=p+(h|8)|0;i=b;return H|0}e=58896|0;while(1){d=c[e>>2]|0;if(!(d>>>0>r>>>0)?(n=c[e+4>>2]|0,m=d+n|0,m>>>0>r>>>0):0){break}e=c[e+8>>2]|0}e=d+(n+ -39)|0;if((e&7|0)==0){e=0}else{e=0-e&7}d=d+(n+ -47+e)|0;d=d>>>0<(r+16|0)>>>0?r:d;e=d+8|0;f=p+8|0;if((f&7|0)==0){f=0}else{f=0-f&7}H=q+ -40-f|0;c[58472>>2]=p+f;c[58460>>2]=H;c[p+(f+4)>>2]=H|1;c[p+(q+ -36)>>2]=40;c[58476>>2]=c[58936>>2];c[d+4>>2]=27;c[e+0>>2]=c[58896>>2];c[e+4>>2]=c[58900>>2];c[e+8>>2]=c[58904>>2];c[e+12>>2]=c[58908>>2];c[58896>>2]=p;c[58900>>2]=q;c[58908>>2]=0;c[58904>>2]=e;e=d+28|0;c[e>>2]=7;if((d+32|0)>>>0>>0){do{H=e;e=e+4|0;c[e>>2]=7}while((H+8|0)>>>0>>0)}if((d|0)!=(r|0)){d=d-r|0;e=r+(d+4)|0;c[e>>2]=c[e>>2]&-2;c[r+4>>2]=d|1;c[r+d>>2]=d;e=d>>>3;if(d>>>0<256){g=e<<1;d=58488+(g<<2)|0;f=c[14612]|0;e=1<>2]|0;if(!(e>>>0<(c[58464>>2]|0)>>>0)){k=f;j=e;break}Ea()}}while(0);c[k>>2]=r;c[j+12>>2]=r;c[r+8>>2]=j;c[r+12>>2]=d;break}e=d>>>8;if((e|0)!=0){if(d>>>0>16777215){e=31}else{G=(e+1048320|0)>>>16&8;H=e<>>16&4;H=H<>>16&2;e=14-(F|G|e)+(H<>>15)|0;e=d>>>(e+7|0)&1|e<<1}}else{e=0}j=58752+(e<<2)|0;c[r+28>>2]=e;c[r+20>>2]=0;c[r+16>>2]=0;f=c[58452>>2]|0;g=1<>2]=f|g;c[j>>2]=r;c[r+24>>2]=j;c[r+12>>2]=r;c[r+8>>2]=r;break}f=c[j>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}k:do{if((c[f+4>>2]&-8|0)!=(d|0)){e=d<>>31<<2)+16|0;g=c[j>>2]|0;if((g|0)==0){break}if((c[g+4>>2]&-8|0)==(d|0)){h=g;break k}else{e=e<<1;f=g}}if(j>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[j>>2]=r;c[r+24>>2]=f;c[r+12>>2]=r;c[r+8>>2]=r;break g}}else{h=f}}while(0);f=h+8|0;e=c[f>>2]|0;d=c[58464>>2]|0;if(h>>>0>>0){Ea()}if(e>>>0>>0){Ea()}else{c[e+12>>2]=r;c[f>>2]=r;c[r+8>>2]=e;c[r+12>>2]=h;c[r+24>>2]=0;break}}}else{H=c[58464>>2]|0;if((H|0)==0|p>>>0>>0){c[58464>>2]=p}c[58896>>2]=p;c[58900>>2]=q;c[58908>>2]=0;c[58484>>2]=c[14730];c[58480>>2]=-1;d=0;do{H=d<<1;G=58488+(H<<2)|0;c[58488+(H+3<<2)>>2]=G;c[58488+(H+2<<2)>>2]=G;d=d+1|0}while((d|0)!=32);d=p+8|0;if((d&7|0)==0){d=0}else{d=0-d&7}H=q+ -40-d|0;c[58472>>2]=p+d;c[58460>>2]=H;c[p+(d+4)>>2]=H|1;c[p+(q+ -36)>>2]=40;c[58476>>2]=c[58936>>2]}}while(0);d=c[58460>>2]|0;if(d>>>0>a>>>0){G=d-a|0;c[58460>>2]=G;H=c[58472>>2]|0;c[58472>>2]=H+a;c[H+(a+4)>>2]=G|1;c[H+4>>2]=a|3;H=H+8|0;i=b;return H|0}}c[(Ca()|0)>>2]=12;H=0;i=b;return H|0}function md(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;b=i;if((a|0)==0){i=b;return}q=a+ -8|0;r=c[58464>>2]|0;if(q>>>0>>0){Ea()}o=c[a+ -4>>2]|0;n=o&3;if((n|0)==1){Ea()}j=o&-8;h=a+(j+ -8)|0;do{if((o&1|0)==0){u=c[q>>2]|0;if((n|0)==0){i=b;return}q=-8-u|0;o=a+q|0;n=u+j|0;if(o>>>0>>0){Ea()}if((o|0)==(c[58468>>2]|0)){d=a+(j+ -4)|0;if((c[d>>2]&3|0)!=3){d=o;m=n;break}c[58456>>2]=n;c[d>>2]=c[d>>2]&-2;c[a+(q+4)>>2]=n|1;c[h>>2]=n;i=b;return}t=u>>>3;if(u>>>0<256){d=c[a+(q+8)>>2]|0;m=c[a+(q+12)>>2]|0;p=58488+(t<<1<<2)|0;if((d|0)!=(p|0)){if(d>>>0>>0){Ea()}if((c[d+12>>2]|0)!=(o|0)){Ea()}}if((m|0)==(d|0)){c[14612]=c[14612]&~(1<>>0>>0){Ea()}p=m+8|0;if((c[p>>2]|0)==(o|0)){s=p}else{Ea()}}else{s=m+8|0}c[d+12>>2]=m;c[s>>2]=d;d=o;m=n;break}s=c[a+(q+24)>>2]|0;t=c[a+(q+12)>>2]|0;do{if((t|0)==(o|0)){u=a+(q+20)|0;t=c[u>>2]|0;if((t|0)==0){u=a+(q+16)|0;t=c[u>>2]|0;if((t|0)==0){p=0;break}}while(1){w=t+20|0;v=c[w>>2]|0;if((v|0)!=0){t=v;u=w;continue}v=t+16|0;w=c[v>>2]|0;if((w|0)==0){break}else{t=w;u=v}}if(u>>>0>>0){Ea()}else{c[u>>2]=0;p=t;break}}else{u=c[a+(q+8)>>2]|0;if(u>>>0>>0){Ea()}r=u+12|0;if((c[r>>2]|0)!=(o|0)){Ea()}v=t+8|0;if((c[v>>2]|0)==(o|0)){c[r>>2]=t;c[v>>2]=u;p=t;break}else{Ea()}}}while(0);if((s|0)!=0){t=c[a+(q+28)>>2]|0;r=58752+(t<<2)|0;if((o|0)==(c[r>>2]|0)){c[r>>2]=p;if((p|0)==0){c[58452>>2]=c[58452>>2]&~(1<>>0<(c[58464>>2]|0)>>>0){Ea()}r=s+16|0;if((c[r>>2]|0)==(o|0)){c[r>>2]=p}else{c[s+20>>2]=p}if((p|0)==0){d=o;m=n;break}}if(p>>>0<(c[58464>>2]|0)>>>0){Ea()}c[p+24>>2]=s;r=c[a+(q+16)>>2]|0;do{if((r|0)!=0){if(r>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[p+16>>2]=r;c[r+24>>2]=p;break}}}while(0);q=c[a+(q+20)>>2]|0;if((q|0)!=0){if(q>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[p+20>>2]=q;c[q+24>>2]=p;d=o;m=n;break}}else{d=o;m=n}}else{d=o;m=n}}else{d=q;m=j}}while(0);if(!(d>>>0>>0)){Ea()}n=a+(j+ -4)|0;o=c[n>>2]|0;if((o&1|0)==0){Ea()}if((o&2|0)==0){if((h|0)==(c[58472>>2]|0)){w=(c[58460>>2]|0)+m|0;c[58460>>2]=w;c[58472>>2]=d;c[d+4>>2]=w|1;if((d|0)!=(c[58468>>2]|0)){i=b;return}c[58468>>2]=0;c[58456>>2]=0;i=b;return}if((h|0)==(c[58468>>2]|0)){w=(c[58456>>2]|0)+m|0;c[58456>>2]=w;c[58468>>2]=d;c[d+4>>2]=w|1;c[d+w>>2]=w;i=b;return}m=(o&-8)+m|0;n=o>>>3;do{if(!(o>>>0<256)){l=c[a+(j+16)>>2]|0;q=c[a+(j|4)>>2]|0;do{if((q|0)==(h|0)){o=a+(j+12)|0;n=c[o>>2]|0;if((n|0)==0){o=a+(j+8)|0;n=c[o>>2]|0;if((n|0)==0){k=0;break}}while(1){p=n+20|0;q=c[p>>2]|0;if((q|0)!=0){n=q;o=p;continue}p=n+16|0;q=c[p>>2]|0;if((q|0)==0){break}else{n=q;o=p}}if(o>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[o>>2]=0;k=n;break}}else{o=c[a+j>>2]|0;if(o>>>0<(c[58464>>2]|0)>>>0){Ea()}p=o+12|0;if((c[p>>2]|0)!=(h|0)){Ea()}n=q+8|0;if((c[n>>2]|0)==(h|0)){c[p>>2]=q;c[n>>2]=o;k=q;break}else{Ea()}}}while(0);if((l|0)!=0){n=c[a+(j+20)>>2]|0;o=58752+(n<<2)|0;if((h|0)==(c[o>>2]|0)){c[o>>2]=k;if((k|0)==0){c[58452>>2]=c[58452>>2]&~(1<>>0<(c[58464>>2]|0)>>>0){Ea()}n=l+16|0;if((c[n>>2]|0)==(h|0)){c[n>>2]=k}else{c[l+20>>2]=k}if((k|0)==0){break}}if(k>>>0<(c[58464>>2]|0)>>>0){Ea()}c[k+24>>2]=l;h=c[a+(j+8)>>2]|0;do{if((h|0)!=0){if(h>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[k+16>>2]=h;c[h+24>>2]=k;break}}}while(0);h=c[a+(j+12)>>2]|0;if((h|0)!=0){if(h>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[k+20>>2]=h;c[h+24>>2]=k;break}}}}else{k=c[a+j>>2]|0;a=c[a+(j|4)>>2]|0;j=58488+(n<<1<<2)|0;if((k|0)!=(j|0)){if(k>>>0<(c[58464>>2]|0)>>>0){Ea()}if((c[k+12>>2]|0)!=(h|0)){Ea()}}if((a|0)==(k|0)){c[14612]=c[14612]&~(1<>>0<(c[58464>>2]|0)>>>0){Ea()}j=a+8|0;if((c[j>>2]|0)==(h|0)){l=j}else{Ea()}}else{l=a+8|0}c[k+12>>2]=a;c[l>>2]=k}}while(0);c[d+4>>2]=m|1;c[d+m>>2]=m;if((d|0)==(c[58468>>2]|0)){c[58456>>2]=m;i=b;return}}else{c[n>>2]=o&-2;c[d+4>>2]=m|1;c[d+m>>2]=m}h=m>>>3;if(m>>>0<256){a=h<<1;e=58488+(a<<2)|0;j=c[14612]|0;h=1<>2]|0;if(a>>>0<(c[58464>>2]|0)>>>0){Ea()}else{f=h;g=a}}else{c[14612]=j|h;f=58488+(a+2<<2)|0;g=e}c[f>>2]=d;c[g+12>>2]=d;c[d+8>>2]=g;c[d+12>>2]=e;i=b;return}f=m>>>8;if((f|0)!=0){if(m>>>0>16777215){f=31}else{v=(f+1048320|0)>>>16&8;w=f<>>16&4;w=w<>>16&2;f=14-(u|v|f)+(w<>>15)|0;f=m>>>(f+7|0)&1|f<<1}}else{f=0}g=58752+(f<<2)|0;c[d+28>>2]=f;c[d+20>>2]=0;c[d+16>>2]=0;a=c[58452>>2]|0;h=1<>2]|0;if((f|0)==31){f=0}else{f=25-(f>>>1)|0}b:do{if((c[g+4>>2]&-8|0)!=(m|0)){f=m<>>31<<2)+16|0;g=c[h>>2]|0;if((g|0)==0){break}if((c[g+4>>2]&-8|0)==(m|0)){e=g;break b}else{f=f<<1;a=g}}if(h>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[h>>2]=d;c[d+24>>2]=a;c[d+12>>2]=d;c[d+8>>2]=d;break a}}else{e=g}}while(0);g=e+8|0;f=c[g>>2]|0;h=c[58464>>2]|0;if(e>>>0>>0){Ea()}if(f>>>0>>0){Ea()}else{c[f+12>>2]=d;c[g>>2]=d;c[d+8>>2]=f;c[d+12>>2]=e;c[d+24>>2]=0;break}}else{c[58452>>2]=a|h;c[g>>2]=d;c[d+24>>2]=g;c[d+12>>2]=d;c[d+8>>2]=d}}while(0);w=(c[58480>>2]|0)+ -1|0;c[58480>>2]=w;if((w|0)==0){d=58904|0}else{i=b;return}while(1){d=c[d>>2]|0;if((d|0)==0){break}else{d=d+8|0}}c[58480>>2]=-1;i=b;return}function nd(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;if((a|0)!=0){e=$(b,a)|0;if((b|a)>>>0>65535){e=((e>>>0)/(a>>>0)|0|0)==(b|0)?e:-1}}else{e=0}a=ld(e)|0;if((a|0)==0){i=d;return a|0}if((c[a+ -4>>2]&3|0)==0){i=d;return a|0}ud(a|0,0,e|0)|0;i=d;return a|0}function od(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;do{if((a|0)!=0){if(b>>>0>4294967231){c[(Ca()|0)>>2]=12;e=0;break}if(b>>>0<11){e=16}else{e=b+11&-8}e=pd(a+ -8|0,e)|0;if((e|0)!=0){e=e+8|0;break}e=ld(b)|0;if((e|0)==0){e=0}else{f=c[a+ -4>>2]|0;f=(f&-8)-((f&3|0)==0?8:4)|0;yd(e|0,a|0,(f>>>0>>0?f:b)|0)|0;md(a)}}else{e=ld(b)|0}}while(0);i=d;return e|0}function pd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=i;e=a+4|0;g=c[e>>2]|0;j=g&-8;f=a+j|0;l=c[58464>>2]|0;if(a>>>0>>0){Ea()}n=g&3;if(!((n|0)!=1&a>>>0>>0)){Ea()}h=a+(j|4)|0;o=c[h>>2]|0;if((o&1|0)==0){Ea()}if((n|0)==0){if(b>>>0<256){q=0;i=d;return q|0}if(!(j>>>0<(b+4|0)>>>0)?!((j-b|0)>>>0>c[58928>>2]<<1>>>0):0){q=a;i=d;return q|0}q=0;i=d;return q|0}if(!(j>>>0>>0)){f=j-b|0;if(!(f>>>0>15)){q=a;i=d;return q|0}c[e>>2]=g&1|b|2;c[a+(b+4)>>2]=f|3;c[h>>2]=c[h>>2]|1;qd(a+b|0,f);q=a;i=d;return q|0}if((f|0)==(c[58472>>2]|0)){f=(c[58460>>2]|0)+j|0;if(!(f>>>0>b>>>0)){q=0;i=d;return q|0}q=f-b|0;c[e>>2]=g&1|b|2;c[a+(b+4)>>2]=q|1;c[58472>>2]=a+b;c[58460>>2]=q;q=a;i=d;return q|0}if((f|0)==(c[58468>>2]|0)){h=(c[58456>>2]|0)+j|0;if(h>>>0>>0){q=0;i=d;return q|0}f=h-b|0;if(f>>>0>15){c[e>>2]=g&1|b|2;c[a+(b+4)>>2]=f|1;c[a+h>>2]=f;q=a+(h+4)|0;c[q>>2]=c[q>>2]&-2;b=a+b|0}else{c[e>>2]=g&1|h|2;b=a+(h+4)|0;c[b>>2]=c[b>>2]|1;b=0;f=0}c[58456>>2]=f;c[58468>>2]=b;q=a;i=d;return q|0}if((o&2|0)!=0){q=0;i=d;return q|0}h=(o&-8)+j|0;if(h>>>0>>0){q=0;i=d;return q|0}g=h-b|0;n=o>>>3;do{if(!(o>>>0<256)){m=c[a+(j+24)>>2]|0;o=c[a+(j+12)>>2]|0;do{if((o|0)==(f|0)){o=a+(j+20)|0;n=c[o>>2]|0;if((n|0)==0){o=a+(j+16)|0;n=c[o>>2]|0;if((n|0)==0){k=0;break}}while(1){q=n+20|0;p=c[q>>2]|0;if((p|0)!=0){n=p;o=q;continue}q=n+16|0;p=c[q>>2]|0;if((p|0)==0){break}else{n=p;o=q}}if(o>>>0>>0){Ea()}else{c[o>>2]=0;k=n;break}}else{n=c[a+(j+8)>>2]|0;if(n>>>0>>0){Ea()}p=n+12|0;if((c[p>>2]|0)!=(f|0)){Ea()}l=o+8|0;if((c[l>>2]|0)==(f|0)){c[p>>2]=o;c[l>>2]=n;k=o;break}else{Ea()}}}while(0);if((m|0)!=0){l=c[a+(j+28)>>2]|0;n=58752+(l<<2)|0;if((f|0)==(c[n>>2]|0)){c[n>>2]=k;if((k|0)==0){c[58452>>2]=c[58452>>2]&~(1<>>0<(c[58464>>2]|0)>>>0){Ea()}l=m+16|0;if((c[l>>2]|0)==(f|0)){c[l>>2]=k}else{c[m+20>>2]=k}if((k|0)==0){break}}if(k>>>0<(c[58464>>2]|0)>>>0){Ea()}c[k+24>>2]=m;f=c[a+(j+16)>>2]|0;do{if((f|0)!=0){if(f>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[k+16>>2]=f;c[f+24>>2]=k;break}}}while(0);f=c[a+(j+20)>>2]|0;if((f|0)!=0){if(f>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[k+20>>2]=f;c[f+24>>2]=k;break}}}}else{k=c[a+(j+8)>>2]|0;j=c[a+(j+12)>>2]|0;o=58488+(n<<1<<2)|0;if((k|0)!=(o|0)){if(k>>>0>>0){Ea()}if((c[k+12>>2]|0)!=(f|0)){Ea()}}if((j|0)==(k|0)){c[14612]=c[14612]&~(1<>>0>>0){Ea()}l=j+8|0;if((c[l>>2]|0)==(f|0)){m=l}else{Ea()}}else{m=j+8|0}c[k+12>>2]=j;c[m>>2]=k}}while(0);if(g>>>0<16){c[e>>2]=h|c[e>>2]&1|2;q=a+(h|4)|0;c[q>>2]=c[q>>2]|1;q=a;i=d;return q|0}else{c[e>>2]=c[e>>2]&1|b|2;c[a+(b+4)>>2]=g|3;q=a+(h|4)|0;c[q>>2]=c[q>>2]|1;qd(a+b|0,g);q=a;i=d;return q|0}return 0}function qd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=i;h=a+b|0;l=c[a+4>>2]|0;do{if((l&1|0)==0){p=c[a>>2]|0;if((l&3|0)==0){i=d;return}l=a+(0-p)|0;m=p+b|0;q=c[58464>>2]|0;if(l>>>0>>0){Ea()}if((l|0)==(c[58468>>2]|0)){e=a+(b+4)|0;if((c[e>>2]&3|0)!=3){e=l;n=m;break}c[58456>>2]=m;c[e>>2]=c[e>>2]&-2;c[a+(4-p)>>2]=m|1;c[h>>2]=m;i=d;return}s=p>>>3;if(p>>>0<256){e=c[a+(8-p)>>2]|0;n=c[a+(12-p)>>2]|0;o=58488+(s<<1<<2)|0;if((e|0)!=(o|0)){if(e>>>0>>0){Ea()}if((c[e+12>>2]|0)!=(l|0)){Ea()}}if((n|0)==(e|0)){c[14612]=c[14612]&~(1<>>0>>0){Ea()}o=n+8|0;if((c[o>>2]|0)==(l|0)){r=o}else{Ea()}}else{r=n+8|0}c[e+12>>2]=n;c[r>>2]=e;e=l;n=m;break}r=c[a+(24-p)>>2]|0;t=c[a+(12-p)>>2]|0;do{if((t|0)==(l|0)){u=16-p|0;t=a+(u+4)|0;s=c[t>>2]|0;if((s|0)==0){t=a+u|0;s=c[t>>2]|0;if((s|0)==0){o=0;break}}while(1){u=s+20|0;v=c[u>>2]|0;if((v|0)!=0){s=v;t=u;continue}v=s+16|0;u=c[v>>2]|0;if((u|0)==0){break}else{s=u;t=v}}if(t>>>0>>0){Ea()}else{c[t>>2]=0;o=s;break}}else{s=c[a+(8-p)>>2]|0;if(s>>>0>>0){Ea()}u=s+12|0;if((c[u>>2]|0)!=(l|0)){Ea()}q=t+8|0;if((c[q>>2]|0)==(l|0)){c[u>>2]=t;c[q>>2]=s;o=t;break}else{Ea()}}}while(0);if((r|0)!=0){q=c[a+(28-p)>>2]|0;s=58752+(q<<2)|0;if((l|0)==(c[s>>2]|0)){c[s>>2]=o;if((o|0)==0){c[58452>>2]=c[58452>>2]&~(1<>>0<(c[58464>>2]|0)>>>0){Ea()}q=r+16|0;if((c[q>>2]|0)==(l|0)){c[q>>2]=o}else{c[r+20>>2]=o}if((o|0)==0){e=l;n=m;break}}if(o>>>0<(c[58464>>2]|0)>>>0){Ea()}c[o+24>>2]=r;p=16-p|0;q=c[a+p>>2]|0;do{if((q|0)!=0){if(q>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[o+16>>2]=q;c[q+24>>2]=o;break}}}while(0);p=c[a+(p+4)>>2]|0;if((p|0)!=0){if(p>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[o+20>>2]=p;c[p+24>>2]=o;e=l;n=m;break}}else{e=l;n=m}}else{e=l;n=m}}else{e=a;n=b}}while(0);l=c[58464>>2]|0;if(h>>>0>>0){Ea()}m=a+(b+4)|0;o=c[m>>2]|0;if((o&2|0)==0){if((h|0)==(c[58472>>2]|0)){v=(c[58460>>2]|0)+n|0;c[58460>>2]=v;c[58472>>2]=e;c[e+4>>2]=v|1;if((e|0)!=(c[58468>>2]|0)){i=d;return}c[58468>>2]=0;c[58456>>2]=0;i=d;return}if((h|0)==(c[58468>>2]|0)){v=(c[58456>>2]|0)+n|0;c[58456>>2]=v;c[58468>>2]=e;c[e+4>>2]=v|1;c[e+v>>2]=v;i=d;return}n=(o&-8)+n|0;m=o>>>3;do{if(!(o>>>0<256)){k=c[a+(b+24)>>2]|0;m=c[a+(b+12)>>2]|0;do{if((m|0)==(h|0)){o=a+(b+20)|0;m=c[o>>2]|0;if((m|0)==0){o=a+(b+16)|0;m=c[o>>2]|0;if((m|0)==0){j=0;break}}while(1){q=m+20|0;p=c[q>>2]|0;if((p|0)!=0){m=p;o=q;continue}p=m+16|0;q=c[p>>2]|0;if((q|0)==0){break}else{m=q;o=p}}if(o>>>0>>0){Ea()}else{c[o>>2]=0;j=m;break}}else{o=c[a+(b+8)>>2]|0;if(o>>>0>>0){Ea()}l=o+12|0;if((c[l>>2]|0)!=(h|0)){Ea()}p=m+8|0;if((c[p>>2]|0)==(h|0)){c[l>>2]=m;c[p>>2]=o;j=m;break}else{Ea()}}}while(0);if((k|0)!=0){l=c[a+(b+28)>>2]|0;m=58752+(l<<2)|0;if((h|0)==(c[m>>2]|0)){c[m>>2]=j;if((j|0)==0){c[58452>>2]=c[58452>>2]&~(1<>>0<(c[58464>>2]|0)>>>0){Ea()}l=k+16|0;if((c[l>>2]|0)==(h|0)){c[l>>2]=j}else{c[k+20>>2]=j}if((j|0)==0){break}}if(j>>>0<(c[58464>>2]|0)>>>0){Ea()}c[j+24>>2]=k;h=c[a+(b+16)>>2]|0;do{if((h|0)!=0){if(h>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[j+16>>2]=h;c[h+24>>2]=j;break}}}while(0);h=c[a+(b+20)>>2]|0;if((h|0)!=0){if(h>>>0<(c[58464>>2]|0)>>>0){Ea()}else{c[j+20>>2]=h;c[h+24>>2]=j;break}}}}else{j=c[a+(b+8)>>2]|0;a=c[a+(b+12)>>2]|0;b=58488+(m<<1<<2)|0;if((j|0)!=(b|0)){if(j>>>0>>0){Ea()}if((c[j+12>>2]|0)!=(h|0)){Ea()}}if((a|0)==(j|0)){c[14612]=c[14612]&~(1<>>0>>0){Ea()}b=a+8|0;if((c[b>>2]|0)==(h|0)){k=b}else{Ea()}}else{k=a+8|0}c[j+12>>2]=a;c[k>>2]=j}}while(0);c[e+4>>2]=n|1;c[e+n>>2]=n;if((e|0)==(c[58468>>2]|0)){c[58456>>2]=n;i=d;return}}else{c[m>>2]=o&-2;c[e+4>>2]=n|1;c[e+n>>2]=n}a=n>>>3;if(n>>>0<256){b=a<<1;h=58488+(b<<2)|0;j=c[14612]|0;a=1<>2]|0;if(a>>>0<(c[58464>>2]|0)>>>0){Ea()}else{g=b;f=a}}else{c[14612]=j|a;g=58488+(b+2<<2)|0;f=h}c[g>>2]=e;c[f+12>>2]=e;c[e+8>>2]=f;c[e+12>>2]=h;i=d;return}f=n>>>8;if((f|0)!=0){if(n>>>0>16777215){f=31}else{u=(f+1048320|0)>>>16&8;v=f<>>16&4;v=v<>>16&2;f=14-(t|u|f)+(v<>>15)|0;f=n>>>(f+7|0)&1|f<<1}}else{f=0}a=58752+(f<<2)|0;c[e+28>>2]=f;c[e+20>>2]=0;c[e+16>>2]=0;h=c[58452>>2]|0;g=1<>2]=h|g;c[a>>2]=e;c[e+24>>2]=a;c[e+12>>2]=e;c[e+8>>2]=e;i=d;return}g=c[a>>2]|0;if((f|0)==31){f=0}else{f=25-(f>>>1)|0}a:do{if((c[g+4>>2]&-8|0)!=(n|0)){f=n<>>31<<2)+16|0;g=c[h>>2]|0;if((g|0)==0){break}if((c[g+4>>2]&-8|0)==(n|0)){break a}else{f=f<<1;a=g}}if(h>>>0<(c[58464>>2]|0)>>>0){Ea()}c[h>>2]=e;c[e+24>>2]=a;c[e+12>>2]=e;c[e+8>>2]=e;i=d;return}}while(0);f=g+8|0;a=c[f>>2]|0;h=c[58464>>2]|0;if(g>>>0>>0){Ea()}if(a>>>0>>0){Ea()}c[a+12>>2]=e;c[f>>2]=e;c[e+8>>2]=a;c[e+12>>2]=g;c[e+24>>2]=0;i=d;return}function rd(a,b){a=+a;b=b|0;var d=0,e=0;d=i;if((b|0)>1023){a=a*8.98846567431158e+307;e=b+ -1023|0;if((e|0)>1023){b=b+ -2046|0;b=(b|0)>1023?1023:b;a=a*8.98846567431158e+307}else{b=e}}else{if((b|0)<-1022){a=a*2.2250738585072014e-308;e=b+1022|0;if((e|0)<-1022){b=b+2044|0;b=(b|0)<-1022?-1022:b;a=a*2.2250738585072014e-308}else{b=e}}}b=vd(b+1023|0,0,52)|0;e=D;c[k>>2]=b;c[k+4>>2]=e;a=a*+h[k>>3];i=d;return+a}function sd(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=i;a:do{if((d|0)==0){d=0}else{while(1){f=a[b>>0]|0;g=a[c>>0]|0;if(!(f<<24>>24==g<<24>>24)){break}d=d+ -1|0;if((d|0)==0){d=0;break a}else{b=b+1|0;c=c+1|0}}d=(f&255)-(g&255)|0}}while(0);i=e;return d|0}function td(){}function ud(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;i=b&3;h=d|d<<8|d<<16|d<<24;g=f&~3;if(i){i=b+4-i|0;while((b|0)<(i|0)){a[b>>0]=d;b=b+1|0}}while((b|0)<(g|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return b-e|0}function vd(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){D=b<>>32-c;return a<>>0>a>>>0|0)>>>0;return(D=b,a-c>>>0|0)|0}function xd(b){b=b|0;var c=0;c=b;while(a[c>>0]|0){c=c+1|0}return c-b|0}function yd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((e|0)>=4096)return xa(b|0,d|0,e|0)|0;f=b|0;if((b&3)==(d&3)){while(b&3){if((e|0)==0)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function zd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return(D=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function Ad(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){D=b>>>c;return a>>>c|(b&(1<>>c-32|0}function Bd(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){D=b>>c;return a>>>c|(b&(1<>c-32|0}function Cd(b){b=b|0;var c=0;c=a[n+(b>>>24)>>0]|0;if((c|0)<8)return c|0;c=a[n+(b>>16&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[n+(b>>8&255)>>0]|0;if((c|0)<8)return c+16|0;return(a[n+(b&255)>>0]|0)+24|0}function Dd(b){b=b|0;var c=0;c=a[m+(b&255)>>0]|0;if((c|0)<8)return c|0;c=a[m+(b>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[m+(b>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return(a[m+(b>>>24)>>0]|0)+24|0}function Ed(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;d=b&65535;c=$(d,f)|0;e=a>>>16;d=(c>>>16)+($(d,e)|0)|0;b=b>>>16;a=$(b,f)|0;return(D=(d>>>16)+($(b,e)|0)+(((d&65535)+a|0)>>>16)|0,d+a<<16|c&65535|0)|0}function Fd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=b>>31|((b|0)<0?-1:0)<<1;i=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;f=d>>31|((d|0)<0?-1:0)<<1;e=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;h=wd(j^a,i^b,j,i)|0;g=D;b=f^j;a=e^i;a=wd((Kd(h,g,wd(f^c,e^d,f,e)|0,D,0)|0)^b,D^a,b,a)|0;return a|0}function Gd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+8|0;j=f|0;h=b>>31|((b|0)<0?-1:0)<<1;g=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;l=e>>31|((e|0)<0?-1:0)<<1;k=((e|0)<0?-1:0)>>31|((e|0)<0?-1:0)<<1;b=wd(h^a,g^b,h,g)|0;a=D;Kd(b,a,wd(l^d,k^e,l,k)|0,D,j)|0;a=wd(c[j>>2]^h,c[j+4>>2]^g,h,g)|0;b=D;i=f;return(D=b,a)|0}function Hd(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;a=Ed(e,f)|0;c=D;return(D=($(b,f)|0)+($(d,e)|0)+c|c&0,a|0|0)|0}function Id(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=Kd(a,b,c,d,0)|0;return a|0}function Jd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;g=i;i=i+8|0;f=g|0;Kd(a,b,d,e,f)|0;i=g;return(D=c[f+4>>2]|0,c[f>>2]|0)|0}function Kd(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;h=a;j=b;i=j;l=d;g=e;k=g;if((i|0)==0){g=(f|0)!=0;if((k|0)==0){if(g){c[f>>2]=(h>>>0)%(l>>>0);c[f+4>>2]=0}k=0;m=(h>>>0)/(l>>>0)>>>0;return(D=k,m)|0}else{if(!g){l=0;m=0;return(D=l,m)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;l=0;m=0;return(D=l,m)|0}}m=(k|0)==0;do{if((l|0)!=0){if(!m){k=(Cd(k|0)|0)-(Cd(i|0)|0)|0;if(k>>>0<=31){m=k+1|0;l=31-k|0;a=k-31>>31;j=m;b=h>>>(m>>>0)&a|i<>>(m>>>0)&a;k=0;l=h<>2]=a|0;c[f+4>>2]=j|b&0;l=0;m=0;return(D=l,m)|0}k=l-1|0;if((k&l|0)!=0){l=(Cd(l|0)|0)+33-(Cd(i|0)|0)|0;p=64-l|0;m=32-l|0;n=m>>31;o=l-32|0;a=o>>31;j=l;b=m-1>>31&i>>>(o>>>0)|(i<>>(l>>>0))&a;a=a&i>>>(l>>>0);k=h<>>(o>>>0))&n|h<>31;break}if((f|0)!=0){c[f>>2]=k&h;c[f+4>>2]=0}if((l|0)==1){o=j|b&0;p=a|0|0;return(D=o,p)|0}else{p=Dd(l|0)|0;o=i>>>(p>>>0)|0;p=i<<32-p|h>>>(p>>>0)|0;return(D=o,p)|0}}else{if(m){if((f|0)!=0){c[f>>2]=(i>>>0)%(l>>>0);c[f+4>>2]=0}o=0;p=(i>>>0)/(l>>>0)>>>0;return(D=o,p)|0}if((h|0)==0){if((f|0)!=0){c[f>>2]=0;c[f+4>>2]=(i>>>0)%(k>>>0)}o=0;p=(i>>>0)/(k>>>0)>>>0;return(D=o,p)|0}l=k-1|0;if((l&k|0)==0){if((f|0)!=0){c[f>>2]=a|0;c[f+4>>2]=l&i|b&0}o=0;p=i>>>((Dd(k|0)|0)>>>0);return(D=o,p)|0}k=(Cd(k|0)|0)-(Cd(i|0)|0)|0;if(k>>>0<=30){a=k+1|0;l=31-k|0;j=a;b=i<>>(a>>>0);a=i>>>(a>>>0);k=0;l=h<>2]=a|0;c[f+4>>2]=j|b&0;o=0;p=0;return(D=o,p)|0}}while(0);if((j|0)==0){g=l;e=0;i=0}else{h=d|0|0;g=g|e&0;e=zd(h,g,-1,-1)|0;d=D;i=0;do{m=l;l=k>>>31|l<<1;k=i|k<<1;m=b<<1|m>>>31|0;n=b>>>31|a<<1|0;wd(e,d,m,n)|0;p=D;o=p>>31|((p|0)<0?-1:0)<<1;i=o&1;b=wd(m,n,o&h,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&g)|0;a=D;j=j-1|0}while((j|0)!=0);g=l;e=0}h=0;if((f|0)!=0){c[f>>2]=b;c[f+4>>2]=a}o=(k|0)>>>31|(g|h)<<1|(h<<1|k>>>31)&0|e;p=(k<<1|0>>>31)&-2|i;return(D=o,p)|0}function Ld(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return La[a&127](b|0,c|0,d|0,e|0)|0}function Md(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(0,a|0,b|0,c|0,d|0)|0}function Nd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(1,a|0,b|0,c|0,d|0)|0}function Od(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(2,a|0,b|0,c|0,d|0)|0}function Pd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(3,a|0,b|0,c|0,d|0)|0}function Qd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(4,a|0,b|0,c|0,d|0)|0}function Rd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(5,a|0,b|0,c|0,d|0)|0}function Sd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(6,a|0,b|0,c|0,d|0)|0}function Td(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(7,a|0,b|0,c|0,d|0)|0}function Ud(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(8,a|0,b|0,c|0,d|0)|0}function Vd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(9,a|0,b|0,c|0,d|0)|0}function Wd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(10,a|0,b|0,c|0,d|0)|0}function Xd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(11,a|0,b|0,c|0,d|0)|0}function Yd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(12,a|0,b|0,c|0,d|0)|0}function Zd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(13,a|0,b|0,c|0,d|0)|0}function _d(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(14,a|0,b|0,c|0,d|0)|0}function $d(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(15,a|0,b|0,c|0,d|0)|0}function ae(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(16,a|0,b|0,c|0,d|0)|0}function be(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(17,a|0,b|0,c|0,d|0)|0}function ce(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(18,a|0,b|0,c|0,d|0)|0}function de(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(19,a|0,b|0,c|0,d|0)|0}function ee(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(20,a|0,b|0,c|0,d|0)|0}function fe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(21,a|0,b|0,c|0,d|0)|0}function ge(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(22,a|0,b|0,c|0,d|0)|0}function he(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(23,a|0,b|0,c|0,d|0)|0}function ie(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(24,a|0,b|0,c|0,d|0)|0}function je(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(25,a|0,b|0,c|0,d|0)|0}function ke(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(26,a|0,b|0,c|0,d|0)|0}function le(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(27,a|0,b|0,c|0,d|0)|0}function me(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(28,a|0,b|0,c|0,d|0)|0}function ne(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(29,a|0,b|0,c|0,d|0)|0}function oe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(30,a|0,b|0,c|0,d|0)|0}function pe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(31,a|0,b|0,c|0,d|0)|0}function qe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(32,a|0,b|0,c|0,d|0)|0}function re(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(33,a|0,b|0,c|0,d|0)|0}function se(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(34,a|0,b|0,c|0,d|0)|0}function te(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(35,a|0,b|0,c|0,d|0)|0}function ue(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(36,a|0,b|0,c|0,d|0)|0}function ve(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(37,a|0,b|0,c|0,d|0)|0}function we(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(38,a|0,b|0,c|0,d|0)|0}function xe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(39,a|0,b|0,c|0,d|0)|0}function ye(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(40,a|0,b|0,c|0,d|0)|0}function ze(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(41,a|0,b|0,c|0,d|0)|0}function Ae(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(42,a|0,b|0,c|0,d|0)|0}function Be(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(43,a|0,b|0,c|0,d|0)|0}function Ce(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(44,a|0,b|0,c|0,d|0)|0}function De(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(45,a|0,b|0,c|0,d|0)|0}function Ee(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(46,a|0,b|0,c|0,d|0)|0}function Fe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(47,a|0,b|0,c|0,d|0)|0}function Ge(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(48,a|0,b|0,c|0,d|0)|0}function He(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fa(49,a|0,b|0,c|0,d|0)|0}function Ie(a,b){a=a|0;b=b|0;Ma[a&127](b|0)}function Je(a){a=a|0;fa(0,a|0)}function Ke(a){a=a|0;fa(1,a|0)}function Le(a){a=a|0;fa(2,a|0)}function Me(a){a=a|0;fa(3,a|0)}function Ne(a){a=a|0;fa(4,a|0)}function Oe(a){a=a|0;fa(5,a|0)}function Pe(a){a=a|0;fa(6,a|0)}function Qe(a){a=a|0;fa(7,a|0)}function Re(a){a=a|0;fa(8,a|0)}function Se(a){a=a|0;fa(9,a|0)}function Te(a){a=a|0;fa(10,a|0)}function Ue(a){a=a|0;fa(11,a|0)}function Ve(a){a=a|0;fa(12,a|0)}function We(a){a=a|0;fa(13,a|0)}function Xe(a){a=a|0;fa(14,a|0)}function Ye(a){a=a|0;fa(15,a|0)}function Ze(a){a=a|0;fa(16,a|0)}function _e(a){a=a|0;fa(17,a|0)}function $e(a){a=a|0;fa(18,a|0)}function af(a){a=a|0;fa(19,a|0)}function bf(a){a=a|0;fa(20,a|0)}function cf(a){a=a|0;fa(21,a|0)}function df(a){a=a|0;fa(22,a|0)}function ef(a){a=a|0;fa(23,a|0)}function ff(a){a=a|0;fa(24,a|0)}function gf(a){a=a|0;fa(25,a|0)}function hf(a){a=a|0;fa(26,a|0)}function jf(a){a=a|0;fa(27,a|0)}function kf(a){a=a|0;fa(28,a|0)}function lf(a){a=a|0;fa(29,a|0)}function mf(a){a=a|0;fa(30,a|0)}function nf(a){a=a|0;fa(31,a|0)}function of(a){a=a|0;fa(32,a|0)}function pf(a){a=a|0;fa(33,a|0)}function qf(a){a=a|0;fa(34,a|0)}function rf(a){a=a|0;fa(35,a|0)}function sf(a){a=a|0;fa(36,a|0)}function tf(a){a=a|0;fa(37,a|0)}function uf(a){a=a|0;fa(38,a|0)}function vf(a){a=a|0;fa(39,a|0)}function wf(a){a=a|0;fa(40,a|0)}function xf(a){a=a|0;fa(41,a|0)}function yf(a){a=a|0;fa(42,a|0)}function zf(a){a=a|0;fa(43,a|0)}function Af(a){a=a|0;fa(44,a|0)}function Bf(a){a=a|0;fa(45,a|0)}function Cf(a){a=a|0;fa(46,a|0)}function Df(a){a=a|0;fa(47,a|0)}function Ef(a){a=a|0;fa(48,a|0)}function Ff(a){a=a|0;fa(49,a|0)}function Gf(a,b,c){a=a|0;b=b|0;c=c|0;Na[a&127](b|0,c|0)}function Hf(a,b){a=a|0;b=b|0;fa(0,a|0,b|0)}function If(a,b){a=a|0;b=b|0;fa(1,a|0,b|0)}function Jf(a,b){a=a|0;b=b|0;fa(2,a|0,b|0)}function Kf(a,b){a=a|0;b=b|0;fa(3,a|0,b|0)}function Lf(a,b){a=a|0;b=b|0;fa(4,a|0,b|0)}function Mf(a,b){a=a|0;b=b|0;fa(5,a|0,b|0)}function Nf(a,b){a=a|0;b=b|0;fa(6,a|0,b|0)}function Of(a,b){a=a|0;b=b|0;fa(7,a|0,b|0)}function Pf(a,b){a=a|0;b=b|0;fa(8,a|0,b|0)}function Qf(a,b){a=a|0;b=b|0;fa(9,a|0,b|0)}function Rf(a,b){a=a|0;b=b|0;fa(10,a|0,b|0)}function Sf(a,b){a=a|0;b=b|0;fa(11,a|0,b|0)}function Tf(a,b){a=a|0;b=b|0;fa(12,a|0,b|0)}function Uf(a,b){a=a|0;b=b|0;fa(13,a|0,b|0)}function Vf(a,b){a=a|0;b=b|0;fa(14,a|0,b|0)}function Wf(a,b){a=a|0;b=b|0;fa(15,a|0,b|0)}function Xf(a,b){a=a|0;b=b|0;fa(16,a|0,b|0)}function Yf(a,b){a=a|0;b=b|0;fa(17,a|0,b|0)}function Zf(a,b){a=a|0;b=b|0;fa(18,a|0,b|0)}function _f(a,b){a=a|0;b=b|0;fa(19,a|0,b|0)}function $f(a,b){a=a|0;b=b|0;fa(20,a|0,b|0)}function ag(a,b){a=a|0;b=b|0;fa(21,a|0,b|0)}function bg(a,b){a=a|0;b=b|0;fa(22,a|0,b|0)}function cg(a,b){a=a|0;b=b|0;fa(23,a|0,b|0)}function dg(a,b){a=a|0;b=b|0;fa(24,a|0,b|0)}function eg(a,b){a=a|0;b=b|0;fa(25,a|0,b|0)}function fg(a,b){a=a|0;b=b|0;fa(26,a|0,b|0)}function gg(a,b){a=a|0;b=b|0;fa(27,a|0,b|0)}function hg(a,b){a=a|0;b=b|0;fa(28,a|0,b|0)}function ig(a,b){a=a|0;b=b|0;fa(29,a|0,b|0)}function jg(a,b){a=a|0;b=b|0;fa(30,a|0,b|0)}function kg(a,b){a=a|0;b=b|0;fa(31,a|0,b|0)}function lg(a,b){a=a|0;b=b|0;fa(32,a|0,b|0)}function mg(a,b){a=a|0;b=b|0;fa(33,a|0,b|0)}function ng(a,b){a=a|0;b=b|0;fa(34,a|0,b|0)}function og(a,b){a=a|0;b=b|0;fa(35,a|0,b|0)}function pg(a,b){a=a|0;b=b|0;fa(36,a|0,b|0)}function qg(a,b){a=a|0;b=b|0;fa(37,a|0,b|0)}function rg(a,b){a=a|0;b=b|0;fa(38,a|0,b|0)}function sg(a,b){a=a|0;b=b|0;fa(39,a|0,b|0)}function tg(a,b){a=a|0;b=b|0;fa(40,a|0,b|0)}function ug(a,b){a=a|0;b=b|0;fa(41,a|0,b|0)}function vg(a,b){a=a|0;b=b|0;fa(42,a|0,b|0)}function wg(a,b){a=a|0;b=b|0;fa(43,a|0,b|0)}function xg(a,b){a=a|0;b=b|0;fa(44,a|0,b|0)}function yg(a,b){a=a|0;b=b|0;fa(45,a|0,b|0)}function zg(a,b){a=a|0;b=b|0;fa(46,a|0,b|0)}function Ag(a,b){a=a|0;b=b|0;fa(47,a|0,b|0)}function Bg(a,b){a=a|0;b=b|0;fa(48,a|0,b|0)}function Cg(a,b){a=a|0;b=b|0;fa(49,a|0,b|0)}function Dg(a,b){a=a|0;b=b|0;return Oa[a&127](b|0)|0}function Eg(a){a=a|0;return fa(0,a|0)|0}function Fg(a){a=a|0;return fa(1,a|0)|0}function Gg(a){a=a|0;return fa(2,a|0)|0}function Hg(a){a=a|0;return fa(3,a|0)|0}function Ig(a){a=a|0;return fa(4,a|0)|0}function Jg(a){a=a|0;return fa(5,a|0)|0}function Kg(a){a=a|0;return fa(6,a|0)|0}function Lg(a){a=a|0;return fa(7,a|0)|0}function Mg(a){a=a|0;return fa(8,a|0)|0}function Ng(a){a=a|0;return fa(9,a|0)|0}function Og(a){a=a|0;return fa(10,a|0)|0}function Pg(a){a=a|0;return fa(11,a|0)|0}function Qg(a){a=a|0;return fa(12,a|0)|0}function Rg(a){a=a|0;return fa(13,a|0)|0}function Sg(a){a=a|0;return fa(14,a|0)|0}function Tg(a){a=a|0;return fa(15,a|0)|0}function Ug(a){a=a|0;return fa(16,a|0)|0}function Vg(a){a=a|0;return fa(17,a|0)|0}function Wg(a){a=a|0;return fa(18,a|0)|0}function Xg(a){a=a|0;return fa(19,a|0)|0}function Yg(a){a=a|0;return fa(20,a|0)|0}function Zg(a){a=a|0;return fa(21,a|0)|0}function _g(a){a=a|0;return fa(22,a|0)|0}function $g(a){a=a|0;return fa(23,a|0)|0}function ah(a){a=a|0;return fa(24,a|0)|0}function bh(a){a=a|0;return fa(25,a|0)|0}function ch(a){a=a|0;return fa(26,a|0)|0}function dh(a){a=a|0;return fa(27,a|0)|0}function eh(a){a=a|0;return fa(28,a|0)|0}function fh(a){a=a|0;return fa(29,a|0)|0}function gh(a){a=a|0;return fa(30,a|0)|0}function hh(a){a=a|0;return fa(31,a|0)|0}function ih(a){a=a|0;return fa(32,a|0)|0}function jh(a){a=a|0;return fa(33,a|0)|0}function kh(a){a=a|0;return fa(34,a|0)|0}function lh(a){a=a|0;return fa(35,a|0)|0}function mh(a){a=a|0;return fa(36,a|0)|0}function nh(a){a=a|0;return fa(37,a|0)|0}function oh(a){a=a|0;return fa(38,a|0)|0}function ph(a){a=a|0;return fa(39,a|0)|0}function qh(a){a=a|0;return fa(40,a|0)|0}function rh(a){a=a|0;return fa(41,a|0)|0}function sh(a){a=a|0;return fa(42,a|0)|0}function th(a){a=a|0;return fa(43,a|0)|0}function uh(a){a=a|0;return fa(44,a|0)|0}function vh(a){a=a|0;return fa(45,a|0)|0}function wh(a){a=a|0;return fa(46,a|0)|0}function xh(a){a=a|0;return fa(47,a|0)|0}function yh(a){a=a|0;return fa(48,a|0)|0}function zh(a){a=a|0;return fa(49,a|0)|0}function Ah(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Pa[a&127](b|0,c|0,d|0)}function Bh(a,b,c){a=a|0;b=b|0;c=c|0;fa(0,a|0,b|0,c|0)}function Ch(a,b,c){a=a|0;b=b|0;c=c|0;fa(1,a|0,b|0,c|0)}function Dh(a,b,c){a=a|0;b=b|0;c=c|0;fa(2,a|0,b|0,c|0)}function Eh(a,b,c){a=a|0;b=b|0;c=c|0;fa(3,a|0,b|0,c|0)}function Fh(a,b,c){a=a|0;b=b|0;c=c|0;fa(4,a|0,b|0,c|0)}function Gh(a,b,c){a=a|0;b=b|0;c=c|0;fa(5,a|0,b|0,c|0)}function Hh(a,b,c){a=a|0;b=b|0;c=c|0;fa(6,a|0,b|0,c|0)}function Ih(a,b,c){a=a|0;b=b|0;c=c|0;fa(7,a|0,b|0,c|0)}function Jh(a,b,c){a=a|0;b=b|0;c=c|0;fa(8,a|0,b|0,c|0)}function Kh(a,b,c){a=a|0;b=b|0;c=c|0;fa(9,a|0,b|0,c|0)}function Lh(a,b,c){a=a|0;b=b|0;c=c|0;fa(10,a|0,b|0,c|0)}function Mh(a,b,c){a=a|0;b=b|0;c=c|0;fa(11,a|0,b|0,c|0)}function Nh(a,b,c){a=a|0;b=b|0;c=c|0;fa(12,a|0,b|0,c|0)}function Oh(a,b,c){a=a|0;b=b|0;c=c|0;fa(13,a|0,b|0,c|0)}function Ph(a,b,c){a=a|0;b=b|0;c=c|0;fa(14,a|0,b|0,c|0)}function Qh(a,b,c){a=a|0;b=b|0;c=c|0;fa(15,a|0,b|0,c|0)}function Rh(a,b,c){a=a|0;b=b|0;c=c|0;fa(16,a|0,b|0,c|0)}function Sh(a,b,c){a=a|0;b=b|0;c=c|0;fa(17,a|0,b|0,c|0)}function Th(a,b,c){a=a|0;b=b|0;c=c|0;fa(18,a|0,b|0,c|0)}function Uh(a,b,c){a=a|0;b=b|0;c=c|0;fa(19,a|0,b|0,c|0)}function Vh(a,b,c){a=a|0;b=b|0;c=c|0;fa(20,a|0,b|0,c|0)}function Wh(a,b,c){a=a|0;b=b|0;c=c|0;fa(21,a|0,b|0,c|0)}function Xh(a,b,c){a=a|0;b=b|0;c=c|0;fa(22,a|0,b|0,c|0)}function Yh(a,b,c){a=a|0;b=b|0;c=c|0;fa(23,a|0,b|0,c|0)}function Zh(a,b,c){a=a|0;b=b|0;c=c|0;fa(24,a|0,b|0,c|0)}function _h(a,b,c){a=a|0;b=b|0;c=c|0;fa(25,a|0,b|0,c|0)}function $h(a,b,c){a=a|0;b=b|0;c=c|0;fa(26,a|0,b|0,c|0)}function ai(a,b,c){a=a|0;b=b|0;c=c|0;fa(27,a|0,b|0,c|0)}function bi(a,b,c){a=a|0;b=b|0;c=c|0;fa(28,a|0,b|0,c|0)}function ci(a,b,c){a=a|0;b=b|0;c=c|0;fa(29,a|0,b|0,c|0)}function di(a,b,c){a=a|0;b=b|0;c=c|0;fa(30,a|0,b|0,c|0)}function ei(a,b,c){a=a|0;b=b|0;c=c|0;fa(31,a|0,b|0,c|0)}function fi(a,b,c){a=a|0;b=b|0;c=c|0;fa(32,a|0,b|0,c|0)}function gi(a,b,c){a=a|0;b=b|0;c=c|0;fa(33,a|0,b|0,c|0)}function hi(a,b,c){a=a|0;b=b|0;c=c|0;fa(34,a|0,b|0,c|0)}function ii(a,b,c){a=a|0;b=b|0;c=c|0;fa(35,a|0,b|0,c|0)}function ji(a,b,c){a=a|0;b=b|0;c=c|0;fa(36,a|0,b|0,c|0)}function ki(a,b,c){a=a|0;b=b|0;c=c|0;fa(37,a|0,b|0,c|0)}function li(a,b,c){a=a|0;b=b|0;c=c|0;fa(38,a|0,b|0,c|0)}function mi(a,b,c){a=a|0;b=b|0;c=c|0;fa(39,a|0,b|0,c|0)}function ni(a,b,c){a=a|0;b=b|0;c=c|0;fa(40,a|0,b|0,c|0)}function oi(a,b,c){a=a|0;b=b|0;c=c|0;fa(41,a|0,b|0,c|0)}function pi(a,b,c){a=a|0;b=b|0;c=c|0;fa(42,a|0,b|0,c|0)}function qi(a,b,c){a=a|0;b=b|0;c=c|0;fa(43,a|0,b|0,c|0)}function ri(a,b,c){a=a|0;b=b|0;c=c|0;fa(44,a|0,b|0,c|0)}function si(a,b,c){a=a|0;b=b|0;c=c|0;fa(45,a|0,b|0,c|0)}function ti(a,b,c){a=a|0;b=b|0;c=c|0;fa(46,a|0,b|0,c|0)}function ui(a,b,c){a=a|0;b=b|0;c=c|0;fa(47,a|0,b|0,c|0)}function vi(a,b,c){a=a|0;b=b|0;c=c|0;fa(48,a|0,b|0,c|0)}function wi(a,b,c){a=a|0;b=b|0;c=c|0;fa(49,a|0,b|0,c|0)}function xi(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;return Qa[a&127](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)|0}function yi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(0,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function zi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(1,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Ai(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(2,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Bi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(3,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Ci(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(4,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Di(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(5,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Ei(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(6,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Fi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(7,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Gi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(8,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Hi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(9,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Ii(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(10,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Ji(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(11,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Ki(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(12,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Li(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(13,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Mi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(14,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Ni(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(15,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Oi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(16,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Pi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(17,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Qi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(18,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Ri(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(19,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Si(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(20,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Ti(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(21,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Ui(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(22,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Vi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(23,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Wi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(24,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Xi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(25,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Yi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(26,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Zi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(27,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function _i(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(28,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function $i(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(29,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function aj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(30,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function bj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(31,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function cj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(32,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function dj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(33,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|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;return fa(34,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function fj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(35,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function gj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(36,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function hj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(37,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function ij(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(38,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function jj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(39,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function kj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(40,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function lj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(41,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function mj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(42,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function nj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(43,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function oj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(44,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function pj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(45,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function qj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(46,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function rj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(47,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function sj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(48,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function tj(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return fa(49,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function uj(a,b,c){a=a|0;b=b|0;c=c|0;return Ra[a&127](b|0,c|0)|0}function vj(a,b){a=a|0;b=b|0;return fa(0,a|0,b|0)|0}function wj(a,b){a=a|0;b=b|0;return fa(1,a|0,b|0)|0}function xj(a,b){a=a|0;b=b|0;return fa(2,a|0,b|0)|0}function yj(a,b){a=a|0;b=b|0;return fa(3,a|0,b|0)|0}function zj(a,b){a=a|0;b=b|0;return fa(4,a|0,b|0)|0}function Aj(a,b){a=a|0;b=b|0;return fa(5,a|0,b|0)|0}function Bj(a,b){a=a|0;b=b|0;return fa(6,a|0,b|0)|0}function Cj(a,b){a=a|0;b=b|0;return fa(7,a|0,b|0)|0}function Dj(a,b){a=a|0;b=b|0;return fa(8,a|0,b|0)|0}function Ej(a,b){a=a|0;b=b|0;return fa(9,a|0,b|0)|0}function Fj(a,b){a=a|0;b=b|0;return fa(10,a|0,b|0)|0}function Gj(a,b){a=a|0;b=b|0;return fa(11,a|0,b|0)|0}function Hj(a,b){a=a|0;b=b|0;return fa(12,a|0,b|0)|0}function Ij(a,b){a=a|0;b=b|0;return fa(13,a|0,b|0)|0}function Jj(a,b){a=a|0;b=b|0;return fa(14,a|0,b|0)|0}function Kj(a,b){a=a|0;b=b|0;return fa(15,a|0,b|0)|0}function Lj(a,b){a=a|0;b=b|0;return fa(16,a|0,b|0)|0}function Mj(a,b){a=a|0;b=b|0;return fa(17,a|0,b|0)|0}function Nj(a,b){a=a|0;b=b|0;return fa(18,a|0,b|0)|0}function Oj(a,b){a=a|0;b=b|0;return fa(19,a|0,b|0)|0}function Pj(a,b){a=a|0;b=b|0;return fa(20,a|0,b|0)|0}function Qj(a,b){a=a|0;b=b|0;return fa(21,a|0,b|0)|0}function Rj(a,b){a=a|0;b=b|0;return fa(22,a|0,b|0)|0}function Sj(a,b){a=a|0;b=b|0;return fa(23,a|0,b|0)|0}function Tj(a,b){a=a|0;b=b|0;return fa(24,a|0,b|0)|0}function Uj(a,b){a=a|0;b=b|0;return fa(25,a|0,b|0)|0}function Vj(a,b){a=a|0;b=b|0;return fa(26,a|0,b|0)|0}function Wj(a,b){a=a|0;b=b|0;return fa(27,a|0,b|0)|0}function Xj(a,b){a=a|0;b=b|0;return fa(28,a|0,b|0)|0}function Yj(a,b){a=a|0;b=b|0;return fa(29,a|0,b|0)|0}function Zj(a,b){a=a|0;b=b|0;return fa(30,a|0,b|0)|0}function _j(a,b){a=a|0;b=b|0;return fa(31,a|0,b|0)|0}function $j(a,b){a=a|0;b=b|0;return fa(32,a|0,b|0)|0}function ak(a,b){a=a|0;b=b|0;return fa(33,a|0,b|0)|0}function bk(a,b){a=a|0;b=b|0;return fa(34,a|0,b|0)|0}function ck(a,b){a=a|0;b=b|0;return fa(35,a|0,b|0)|0}function dk(a,b){a=a|0;b=b|0;return fa(36,a|0,b|0)|0}function ek(a,b){a=a|0;b=b|0;return fa(37,a|0,b|0)|0}function fk(a,b){a=a|0;b=b|0;return fa(38,a|0,b|0)|0}function gk(a,b){a=a|0;b=b|0;return fa(39,a|0,b|0)|0}function hk(a,b){a=a|0;b=b|0;return fa(40,a|0,b|0)|0}function ik(a,b){a=a|0;b=b|0;return fa(41,a|0,b|0)|0}function jk(a,b){a=a|0;b=b|0;return fa(42,a|0,b|0)|0}function kk(a,b){a=a|0;b=b|0;return fa(43,a|0,b|0)|0}function lk(a,b){a=a|0;b=b|0;return fa(44,a|0,b|0)|0}function mk(a,b){a=a|0;b=b|0;return fa(45,a|0,b|0)|0}function nk(a,b){a=a|0;b=b|0;return fa(46,a|0,b|0)|0}function ok(a,b){a=a|0;b=b|0;return fa(47,a|0,b|0)|0}function pk(a,b){a=a|0;b=b|0;return fa(48,a|0,b|0)|0}function qk(a,b){a=a|0;b=b|0;return fa(49,a|0,b|0)|0}function rk(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Sa[a&127](b|0,c|0,d|0,e|0,f|0)|0}function sk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(0,a|0,b|0,c|0,d|0,e|0)|0}function tk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(1,a|0,b|0,c|0,d|0,e|0)|0}function uk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(2,a|0,b|0,c|0,d|0,e|0)|0}function vk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(3,a|0,b|0,c|0,d|0,e|0)|0}function wk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(4,a|0,b|0,c|0,d|0,e|0)|0}function xk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(5,a|0,b|0,c|0,d|0,e|0)|0}function yk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(6,a|0,b|0,c|0,d|0,e|0)|0}function zk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(7,a|0,b|0,c|0,d|0,e|0)|0}function Ak(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(8,a|0,b|0,c|0,d|0,e|0)|0}function Bk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(9,a|0,b|0,c|0,d|0,e|0)|0}function Ck(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(10,a|0,b|0,c|0,d|0,e|0)|0}function Dk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(11,a|0,b|0,c|0,d|0,e|0)|0}function Ek(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(12,a|0,b|0,c|0,d|0,e|0)|0}function Fk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(13,a|0,b|0,c|0,d|0,e|0)|0}function Gk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(14,a|0,b|0,c|0,d|0,e|0)|0}function Hk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(15,a|0,b|0,c|0,d|0,e|0)|0}function Ik(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(16,a|0,b|0,c|0,d|0,e|0)|0}function Jk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(17,a|0,b|0,c|0,d|0,e|0)|0}function Kk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(18,a|0,b|0,c|0,d|0,e|0)|0}function Lk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(19,a|0,b|0,c|0,d|0,e|0)|0}function Mk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(20,a|0,b|0,c|0,d|0,e|0)|0}function Nk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(21,a|0,b|0,c|0,d|0,e|0)|0}function Ok(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(22,a|0,b|0,c|0,d|0,e|0)|0}function Pk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(23,a|0,b|0,c|0,d|0,e|0)|0}function Qk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(24,a|0,b|0,c|0,d|0,e|0)|0}function Rk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(25,a|0,b|0,c|0,d|0,e|0)|0}function Sk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(26,a|0,b|0,c|0,d|0,e|0)|0}function Tk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(27,a|0,b|0,c|0,d|0,e|0)|0}function Uk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(28,a|0,b|0,c|0,d|0,e|0)|0}function Vk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(29,a|0,b|0,c|0,d|0,e|0)|0}function Wk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(30,a|0,b|0,c|0,d|0,e|0)|0}function Xk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(31,a|0,b|0,c|0,d|0,e|0)|0}function Yk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(32,a|0,b|0,c|0,d|0,e|0)|0}function Zk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(33,a|0,b|0,c|0,d|0,e|0)|0}function _k(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(34,a|0,b|0,c|0,d|0,e|0)|0}function $k(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(35,a|0,b|0,c|0,d|0,e|0)|0}function al(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(36,a|0,b|0,c|0,d|0,e|0)|0}function bl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(37,a|0,b|0,c|0,d|0,e|0)|0}function cl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(38,a|0,b|0,c|0,d|0,e|0)|0}function dl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(39,a|0,b|0,c|0,d|0,e|0)|0}function el(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(40,a|0,b|0,c|0,d|0,e|0)|0}function fl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(41,a|0,b|0,c|0,d|0,e|0)|0}function gl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(42,a|0,b|0,c|0,d|0,e|0)|0}function hl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(43,a|0,b|0,c|0,d|0,e|0)|0}function il(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(44,a|0,b|0,c|0,d|0,e|0)|0}function jl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(45,a|0,b|0,c|0,d|0,e|0)|0}function kl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(46,a|0,b|0,c|0,d|0,e|0)|0}function ll(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(47,a|0,b|0,c|0,d|0,e|0)|0}function ml(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(48,a|0,b|0,c|0,d|0,e|0)|0}function nl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return fa(49,a|0,b|0,c|0,d|0,e|0)|0}function ol(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;aa(0);return 0}function pl(a){a=a|0;aa(1)}function ql(a,b){a=a|0;b=b|0;aa(2)}function rl(a){a=a|0;aa(3);return 0}function sl(a,b,c){a=a|0;b=b|0;c=c|0;aa(4)}function tl(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;aa(5);return 0}function ul(a,b){a=a|0;b=b|0;aa(6);return 0}function vl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;aa(7);return 0} - - - - -// EMSCRIPTEN_END_FUN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,vl,Wk,vl,Xk,vl,Yk,vl,Zk,vl,_k,vl,$k,vl,al,vl,bl,vl,cl,vl,dl,vl,el,vl,fl,vl,gl,vl,hl,vl,il,vl,jl,vl,kl,vl,ll,vl,ml,vl,nl,vl,vc,zc,Ac,Bc,Dc,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl];return{_i64Add:zd,_malloc:ld,_i64Subtract:wd,_free:md,_memcpy:yd,_realloc:od,_VorbisGetChannels:cd,_VorbisDestroy:hd,_VorbisHeaderDecode:bd,_strlen:xd,_memset:ud,_VorbisGetComment:fd,_VorbisDecode:gd,_VorbisInit:ad,_calloc:nd,_VorbisGetNumComments:ed,_VorbisGetSampleRate:dd,_bitshift64Shl:vd,runPostSets:td,stackAlloc:Ta,stackSave:Ua,stackRestore:Va,setThrew:Wa,setTempRet0:Za,getTempRet0:_a,dynCall_iiiii:Ld,dynCall_vi:Ie,dynCall_vii:Gf,dynCall_ii:Dg,dynCall_viii:Ah,dynCall_iiiiiiiii:xi,dynCall_iii:uj,dynCall_iiiiii:rk} -// EMSCRIPTEN_END_ASM - -})({"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array},{"abort":abort,"assert":assert,"asmPrintInt":asmPrintInt,"asmPrintFloat":asmPrintFloat,"min":Math_min,"jsCall":jsCall,"invoke_iiiii":invoke_iiiii,"invoke_vi":invoke_vi,"invoke_vii":invoke_vii,"invoke_ii":invoke_ii,"invoke_viii":invoke_viii,"invoke_iiiiiiiii":invoke_iiiiiiiii,"invoke_iii":invoke_iii,"invoke_iiiiii":invoke_iiiiii,"_sin":_sin,"_exp":_exp,"_llvm_pow_f64":_llvm_pow_f64,"_floor":_floor,"_fflush":_fflush,"___setErrNo":___setErrNo,"_fabsf":_fabsf,"_sbrk":_sbrk,"_cos":_cos,"_emscripten_memcpy_big":_emscripten_memcpy_big,"__exit":__exit,"_rintf":_rintf,"_atan":_atan,"_log":_log,"___errno_location":___errno_location,"_sysconf":_sysconf,"_abort":_abort,"_time":_time,"_ceil":_ceil,"_rint":_rint,"_sqrt":_sqrt,"_exit":_exit,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"cttz_i8":cttz_i8,"ctlz_i8":ctlz_i8,"NaN":NaN,"Infinity":Infinity},buffer);var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _malloc=Module["_malloc"]=asm["_malloc"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _free=Module["_free"]=asm["_free"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _realloc=Module["_realloc"]=asm["_realloc"];var _VorbisGetChannels=Module["_VorbisGetChannels"]=asm["_VorbisGetChannels"];var _VorbisDestroy=Module["_VorbisDestroy"]=asm["_VorbisDestroy"];var _VorbisHeaderDecode=Module["_VorbisHeaderDecode"]=asm["_VorbisHeaderDecode"];var _strlen=Module["_strlen"]=asm["_strlen"];var _memset=Module["_memset"]=asm["_memset"];var _VorbisGetComment=Module["_VorbisGetComment"]=asm["_VorbisGetComment"];var _VorbisDecode=Module["_VorbisDecode"]=asm["_VorbisDecode"];var _VorbisInit=Module["_VorbisInit"]=asm["_VorbisInit"];var _calloc=Module["_calloc"]=asm["_calloc"];var _VorbisGetNumComments=Module["_VorbisGetNumComments"]=asm["_VorbisGetNumComments"];var _VorbisGetSampleRate=Module["_VorbisGetSampleRate"]=asm["_VorbisGetSampleRate"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var dynCall_iiiii=Module["dynCall_iiiii"]=asm["dynCall_iiiii"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=asm["dynCall_iiiiiiiii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiiiii=Module["dynCall_iiiiii"]=asm["dynCall_iiiiii"];Runtime.stackAlloc=asm["stackAlloc"];Runtime.stackSave=asm["stackSave"];Runtime.stackRestore=asm["stackRestore"];Runtime.setTempRet0=asm["setTempRet0"];Runtime.getTempRet0=asm["getTempRet0"];var i64Math=(function(){var goog={math:{}};goog.math.Long=(function(low,high){this.low_=low|0;this.high_=high|0});goog.math.Long.IntCache_={};goog.math.Long.fromInt=(function(value){if(-128<=value&&value<128){var cachedObj=goog.math.Long.IntCache_[value];if(cachedObj){return cachedObj}}var obj=new goog.math.Long(value|0,value<0?-1:0);if(-128<=value&&value<128){goog.math.Long.IntCache_[value]=obj}return obj});goog.math.Long.fromNumber=(function(value){if(isNaN(value)||!isFinite(value)){return goog.math.Long.ZERO}else if(value<=-goog.math.Long.TWO_PWR_63_DBL_){return goog.math.Long.MIN_VALUE}else if(value+1>=goog.math.Long.TWO_PWR_63_DBL_){return goog.math.Long.MAX_VALUE}else if(value<0){return goog.math.Long.fromNumber(-value).negate()}else{return new goog.math.Long(value%goog.math.Long.TWO_PWR_32_DBL_|0,value/goog.math.Long.TWO_PWR_32_DBL_|0)}});goog.math.Long.fromBits=(function(lowBits,highBits){return new goog.math.Long(lowBits,highBits)});goog.math.Long.fromString=(function(str,opt_radix){if(str.length==0){throw Error("number format error: empty string")}var radix=opt_radix||10;if(radix<2||36=0){throw Error('number format error: interior "-" character: '+str)}var radixToPower=goog.math.Long.fromNumber(Math.pow(radix,8));var result=goog.math.Long.ZERO;for(var i=0;i=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_});goog.math.Long.prototype.getNumBitsAbs=(function(){if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){return 64}else{return this.negate().getNumBitsAbs()}}else{var val=this.high_!=0?this.high_:this.low_;for(var bit=31;bit>0;bit--){if((val&1<0});goog.math.Long.prototype.greaterThanOrEqual=(function(other){return this.compare(other)>=0});goog.math.Long.prototype.compare=(function(other){if(this.equals(other)){return 0}var thisNeg=this.isNegative();var otherNeg=other.isNegative();if(thisNeg&&!otherNeg){return-1}if(!thisNeg&&otherNeg){return 1}if(this.subtract(other).isNegative()){return-1}else{return 1}});goog.math.Long.prototype.negate=(function(){if(this.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.MIN_VALUE}else{return this.not().add(goog.math.Long.ONE)}});goog.math.Long.prototype.add=(function(other){var a48=this.high_>>>16;var a32=this.high_&65535;var a16=this.low_>>>16;var a00=this.low_&65535;var b48=other.high_>>>16;var b32=other.high_&65535;var b16=other.low_>>>16;var b00=other.low_&65535;var c48=0,c32=0,c16=0,c00=0;c00+=a00+b00;c16+=c00>>>16;c00&=65535;c16+=a16+b16;c32+=c16>>>16;c16&=65535;c32+=a32+b32;c48+=c32>>>16;c32&=65535;c48+=a48+b48;c48&=65535;return goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)});goog.math.Long.prototype.subtract=(function(other){return this.add(other.negate())});goog.math.Long.prototype.multiply=(function(other){if(this.isZero()){return goog.math.Long.ZERO}else if(other.isZero()){return goog.math.Long.ZERO}if(this.equals(goog.math.Long.MIN_VALUE)){return other.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO}else if(other.equals(goog.math.Long.MIN_VALUE)){return this.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO}if(this.isNegative()){if(other.isNegative()){return this.negate().multiply(other.negate())}else{return this.negate().multiply(other).negate()}}else if(other.isNegative()){return this.multiply(other.negate()).negate()}if(this.lessThan(goog.math.Long.TWO_PWR_24_)&&other.lessThan(goog.math.Long.TWO_PWR_24_)){return goog.math.Long.fromNumber(this.toNumber()*other.toNumber())}var a48=this.high_>>>16;var a32=this.high_&65535;var a16=this.low_>>>16;var a00=this.low_&65535;var b48=other.high_>>>16;var b32=other.high_&65535;var b16=other.low_>>>16;var b00=other.low_&65535;var c48=0,c32=0,c16=0,c00=0;c00+=a00*b00;c16+=c00>>>16;c00&=65535;c16+=a16*b00;c32+=c16>>>16;c16&=65535;c16+=a00*b16;c32+=c16>>>16;c16&=65535;c32+=a32*b00;c48+=c32>>>16;c32&=65535;c32+=a16*b16;c48+=c32>>>16;c32&=65535;c32+=a00*b32;c48+=c32>>>16;c32&=65535;c48+=a48*b00+a32*b16+a16*b32+a00*b48;c48&=65535;return goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)});goog.math.Long.prototype.div=(function(other){if(other.isZero()){throw Error("division by zero")}else if(this.isZero()){return goog.math.Long.ZERO}if(this.equals(goog.math.Long.MIN_VALUE)){if(other.equals(goog.math.Long.ONE)||other.equals(goog.math.Long.NEG_ONE)){return goog.math.Long.MIN_VALUE}else if(other.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.ONE}else{var halfThis=this.shiftRight(1);var approx=halfThis.div(other).shiftLeft(1);if(approx.equals(goog.math.Long.ZERO)){return other.isNegative()?goog.math.Long.ONE:goog.math.Long.NEG_ONE}else{var rem=this.subtract(other.multiply(approx));var result=approx.add(rem.div(other));return result}}}else if(other.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.ZERO}if(this.isNegative()){if(other.isNegative()){return this.negate().div(other.negate())}else{return this.negate().div(other).negate()}}else if(other.isNegative()){return this.div(other.negate()).negate()}var res=goog.math.Long.ZERO;var rem=this;while(rem.greaterThanOrEqual(other)){var approx=Math.max(1,Math.floor(rem.toNumber()/other.toNumber()));var log2=Math.ceil(Math.log(approx)/Math.LN2);var delta=log2<=48?1:Math.pow(2,log2-48);var approxRes=goog.math.Long.fromNumber(approx);var approxRem=approxRes.multiply(other);while(approxRem.isNegative()||approxRem.greaterThan(rem)){approx-=delta;approxRes=goog.math.Long.fromNumber(approx);approxRem=approxRes.multiply(other)}if(approxRes.isZero()){approxRes=goog.math.Long.ONE}res=res.add(approxRes);rem=rem.subtract(approxRem)}return res});goog.math.Long.prototype.modulo=(function(other){return this.subtract(this.div(other).multiply(other))});goog.math.Long.prototype.not=(function(){return goog.math.Long.fromBits(~this.low_,~this.high_)});goog.math.Long.prototype.and=(function(other){return goog.math.Long.fromBits(this.low_&other.low_,this.high_&other.high_)});goog.math.Long.prototype.or=(function(other){return goog.math.Long.fromBits(this.low_|other.low_,this.high_|other.high_)});goog.math.Long.prototype.xor=(function(other){return goog.math.Long.fromBits(this.low_^other.low_,this.high_^other.high_)});goog.math.Long.prototype.shiftLeft=(function(numBits){numBits&=63;if(numBits==0){return this}else{var low=this.low_;if(numBits<32){var high=this.high_;return goog.math.Long.fromBits(low<>>32-numBits)}else{return goog.math.Long.fromBits(0,low<>>numBits|high<<32-numBits,high>>numBits)}else{return goog.math.Long.fromBits(high>>numBits-32,high>=0?0:-1)}}});goog.math.Long.prototype.shiftRightUnsigned=(function(numBits){numBits&=63;if(numBits==0){return this}else{var high=this.high_;if(numBits<32){var low=this.low_;return goog.math.Long.fromBits(low>>>numBits|high<<32-numBits,high>>>numBits)}else if(numBits==32){return goog.math.Long.fromBits(high,0)}else{return goog.math.Long.fromBits(high>>>numBits-32,0)}}});var navigator={appName:"Modern Browser"};var dbits;var canary=0xdeadbeefcafe;var j_lm=(canary&16777215)==15715070;function BigInteger(a,b,c){if(a!=null)if("number"==typeof a)this.fromNumber(a,b,c);else if(b==null&&"string"!=typeof a)this.fromString(a,256);else this.fromString(a,b)}function nbi(){return new BigInteger(null)}function am1(i,x,w,j,c,n){while(--n>=0){var v=x*this[i++]+w[j]+c;c=Math.floor(v/67108864);w[j++]=v&67108863}return c}function am2(i,x,w,j,c,n){var xl=x&32767,xh=x>>15;while(--n>=0){var l=this[i]&32767;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&32767)<<15)+w[j]+(c&1073741823);c=(l>>>30)+(m>>>15)+xh*h+(c>>>30);w[j++]=l&1073741823}return c}function am3(i,x,w,j,c,n){var xl=x&16383,xh=x>>14;while(--n>=0){var l=this[i]&16383;var h=this[i++]>>14;var m=xh*l+h*xl;l=xl*l+((m&16383)<<14)+w[j]+c;c=(l>>28)+(m>>14)+xh*h;w[j++]=l&268435455}return c}if(j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}else if(j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<=0;--i)r[i]=this[i];r.t=this.t;r.s=this.s}function bnpFromInt(x){this.t=1;this.s=x<0?-1:0;if(x>0)this[0]=x;else if(x<-1)this[0]=x+DV;else this.t=0}function nbv(i){var r=nbi();r.fromInt(i);return r}function bnpFromString(s,b){var k;if(b==16)k=4;else if(b==8)k=3;else if(b==256)k=8;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else{this.fromRadix(s,b);return}this.t=0;this.s=0;var i=s.length,mi=false,sh=0;while(--i>=0){var x=k==8?s[i]&255:intAt(s,i);if(x<0){if(s.charAt(i)=="-")mi=true;continue}mi=false;if(sh==0)this[this.t++]=x;else if(sh+k>this.DB){this[this.t-1]|=(x&(1<>this.DB-sh}else this[this.t-1]|=x<=this.DB)sh-=this.DB}if(k==8&&(s[0]&128)!=0){this.s=-1;if(sh>0)this[this.t-1]|=(1<0&&this[this.t-1]==c)--this.t}function bnToString(b){if(this.s<0)return"-"+this.negate().toString(b);var k;if(b==16)k=4;else if(b==8)k=3;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else return this.toRadix(b);var km=(1<0){if(p>p)>0){m=true;r=int2char(d)}while(i>=0){if(p>(p+=this.DB-k)}else{d=this[i]>>(p-=k)&km;if(p<=0){p+=this.DB;--i}}if(d>0)m=true;if(m)r+=int2char(d)}}return m?r:"0"}function bnNegate(){var r=nbi();BigInteger.ZERO.subTo(this,r);return r}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var r=this.s-a.s;if(r!=0)return r;var i=this.t;r=i-a.t;if(r!=0)return this.s<0?-r:r;while(--i>=0)if((r=this[i]-a[i])!=0)return r;return 0}function nbits(x){var r=1,t;if((t=x>>>16)!=0){x=t;r+=16}if((t=x>>8)!=0){x=t;r+=8}if((t=x>>4)!=0){x=t;r+=4}if((t=x>>2)!=0){x=t;r+=2}if((t=x>>1)!=0){x=t;r+=1}return r}function bnBitLength(){if(this.t<=0)return 0;return this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(n,r){var i;for(i=this.t-1;i>=0;--i)r[i+n]=this[i];for(i=n-1;i>=0;--i)r[i]=0;r.t=this.t+n;r.s=this.s}function bnpDRShiftTo(n,r){for(var i=n;i=0;--i){r[i+ds+1]=this[i]>>cbs|c;c=(this[i]&bm)<=0;--i)r[i]=0;r[ds]=c;r.t=this.t+ds+1;r.s=this.s;r.clamp()}function bnpRShiftTo(n,r){r.s=this.s;var ds=Math.floor(n/this.DB);if(ds>=this.t){r.t=0;return}var bs=n%this.DB;var cbs=this.DB-bs;var bm=(1<>bs;for(var i=ds+1;i>bs}if(bs>0)r[this.t-ds-1]|=(this.s&bm)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c-=a.s}r.s=c<0?-1:0;if(c<-1)r[i++]=this.DV+c;else if(c>0)r[i++]=c;r.t=i;r.clamp()}function bnpMultiplyTo(a,r){var x=this.abs(),y=a.abs();var i=x.t;r.t=i+y.t;while(--i>=0)r[i]=0;for(i=0;i=0)r[i]=0;for(i=0;i=x.DV){r[i+x.t]-=x.DV;r[i+x.t+1]=1}}if(r.t>0)r[r.t-1]+=x.am(i,x[i],r,2*i,0,1);r.s=0;r.clamp()}function bnpDivRemTo(m,q,r){var pm=m.abs();if(pm.t<=0)return;var pt=this.abs();if(pt.t0){pm.lShiftTo(nsh,y);pt.lShiftTo(nsh,r)}else{pm.copyTo(y);pt.copyTo(r)}var ys=y.t;var y0=y[ys-1];if(y0==0)return;var yt=y0*(1<1?y[ys-2]>>this.F2:0);var d1=this.FV/yt,d2=(1<=0){r[r.t++]=1;r.subTo(t,r)}BigInteger.ONE.dlShiftTo(ys,t);t.subTo(y,y);while(y.t=0){var qd=r[--i]==y0?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);if((r[i]+=y.am(0,qd,r,j,0,ys))0)r.rShiftTo(nsh,r);if(ts<0)BigInteger.ZERO.subTo(r,r)}function bnMod(a){var r=nbi();this.abs().divRemTo(a,null,r);if(this.s<0&&r.compareTo(BigInteger.ZERO)>0)a.subTo(r,r);return r}function Classic(m){this.m=m}function cConvert(x){if(x.s<0||x.compareTo(this.m)>=0)return x.mod(this.m);else return x}function cRevert(x){return x}function cReduce(x){x.divRemTo(this.m,null,x)}function cMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}function cSqrTo(x,r){x.squareTo(r);this.reduce(r)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1)return 0;var x=this[0];if((x&1)==0)return 0;var y=x&3;y=y*(2-(x&15)*y)&15;y=y*(2-(x&255)*y)&255;y=y*(2-((x&65535)*y&65535))&65535;y=y*(2-x*y%this.DV)%this.DV;return y>0?this.DV-y:-y}function Montgomery(m){this.m=m;this.mp=m.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<0)this.m.subTo(r,r);return r}function montRevert(x){var r=nbi();x.copyTo(r);this.reduce(r);return r}function montReduce(x){while(x.t<=this.mt2)x[x.t++]=0;for(var i=0;i>15)*this.mpl&this.um)<<15)&x.DM;j=i+this.m.t;x[j]+=this.m.am(0,u0,x,i,0,this.m.t);while(x[j]>=x.DV){x[j]-=x.DV;x[++j]++}}x.clamp();x.drShiftTo(this.m.t,x);if(x.compareTo(this.m)>=0)x.subTo(this.m,x)}function montSqrTo(x,r){x.squareTo(r);this.reduce(r)}function montMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(e,z){if(e>4294967295||e<1)return BigInteger.ONE;var r=nbi(),r2=nbi(),g=z.convert(this),i=nbits(e)-1;g.copyTo(r);while(--i>=0){z.sqrTo(r,r2);if((e&1<0)z.mulTo(r2,g,r);else{var t=r;r=r2;r2=t}}return z.revert(r)}function bnModPowInt(e,m){var z;if(e<256||m.isEven())z=new Classic(m);else z=new Montgomery(m);return this.exp(e,z)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnpFromRadix(s,b){this.fromInt(0);if(b==null)b=10;var cs=this.chunkSize(b);var d=Math.pow(b,cs),mi=false,j=0,w=0;for(var i=0;i=cs){this.dMultiply(d);this.dAddOffset(w,0);j=0;w=0}}if(j>0){this.dMultiply(Math.pow(b,j));this.dAddOffset(w,0)}if(mi)BigInteger.ZERO.subTo(this,this)}function bnpChunkSize(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}function bnSigNum(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function bnpDMultiply(n){this[this.t]=this.am(0,n-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(n,w){if(n==0)return;while(this.t<=w)this[this.t++]=0;this[w]+=n;while(this[w]>=this.DV){this[w]-=this.DV;if(++w>=this.t)this[this.t++]=0;++this[w]}}function bnpToRadix(b){if(b==null)b=10;if(this.signum()==0||b<2||b>36)return"0";var cs=this.chunkSize(b);var a=Math.pow(b,cs);var d=nbv(a),y=nbi(),z=nbi(),r="";this.divRemTo(d,y,z);while(y.signum()>0){r=(a+z.intValue()).toString(b).substr(1)+r;y.divRemTo(d,y,z)}return z.intValue().toString(b)+r}function bnIntValue(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c+=a.s}r.s=c<0?-1:0;if(c>0)r[i++]=c;else if(c<-1)r[i++]=this.DV+c;r.t=i;r.clamp()}BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.addTo=bnpAddTo;var Wrapper={abs:(function(l,h){var x=new goog.math.Long(l,h);var ret;if(x.isNegative()){ret=x.negate()}else{ret=x}HEAP32[tempDoublePtr>>2]=ret.low_;HEAP32[tempDoublePtr+4>>2]=ret.high_}),ensureTemps:(function(){if(Wrapper.ensuredTemps)return;Wrapper.ensuredTemps=true;Wrapper.two32=new BigInteger;Wrapper.two32.fromString("4294967296",10);Wrapper.two64=new BigInteger;Wrapper.two64.fromString("18446744073709551616",10);Wrapper.temp1=new BigInteger;Wrapper.temp2=new BigInteger}),lh2bignum:(function(l,h){var a=new BigInteger;a.fromString(h.toString(),10);var b=new BigInteger;a.multiplyTo(Wrapper.two32,b);var c=new BigInteger;c.fromString(l.toString(),10);var d=new BigInteger;c.addTo(b,d);return d}),stringify:(function(l,h,unsigned){var ret=(new goog.math.Long(l,h)).toString();if(unsigned&&ret[0]=="-"){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(ret,10);ret=new BigInteger;Wrapper.two64.addTo(bignum,ret);ret=ret.toString(10)}return ret}),fromString:(function(str,base,min,max,unsigned){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(str,base);var bigmin=new BigInteger;bigmin.fromString(min,10);var bigmax=new BigInteger;bigmax.fromString(max,10);if(unsigned&&bignum.compareTo(BigInteger.ZERO)<0){var temp=new BigInteger;bignum.addTo(Wrapper.two64,temp);bignum=temp}var error=false;if(bignum.compareTo(bigmin)<0){bignum=bigmin;error=true}else if(bignum.compareTo(bigmax)>0){bignum=bigmax;error=true}var ret=goog.math.Long.fromString(bignum.toString());HEAP32[tempDoublePtr>>2]=ret.low_;HEAP32[tempDoublePtr+4>>2]=ret.high_;if(error)throw"range error"})};return Wrapper})();if(memoryInitializer){if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,STATIC_BASE)}else{addRunDependency("memory initializer");Browser.asyncLoad(memoryInitializer,(function(data){HEAPU8.set(data,STATIC_BASE);removeRunDependency("memory initializer")}),(function(data){throw"could not load memory initializer "+memoryInitializer}))}}function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"]&&shouldRunNow)run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called");args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0)}}var argv=[allocate(intArrayFromString(Module["thisProgram"]||"/bin/this.program"),"i8",ALLOC_NORMAL)];pad();for(var i=0;i0){Module.printErr("run() called, but dependencies remain, so not running");return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;ensureInitRuntime();preMain();if(ENVIRONMENT_IS_WEB&&preloadStartTime!==null){Module.printErr("pre-main prep time: "+(Date.now()-preloadStartTime)+" ms")}if(Module["_main"]&&shouldRunNow){Module["callMain"](args)}postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);if(!ABORT)doRun()}),1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status){ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();throw new ExitStatus(status)}Module["exit"]=Module.exit=exit;function abort(text){if(text){Module.print(text);Module.printErr(text)}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw"abort() at "+stackTrace()+extra}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run() - - - - -module.exports = Module - -},{}],2:[function(require,module,exports){ -exports.VorbisDecoder = require('./src/decoder'); -exports.OggDemuxer = require('./src/demuxer'); - -},{"./src/decoder":3,"./src/demuxer":4}],3:[function(require,module,exports){ -var AV = (typeof window !== "undefined" ? window.AV : typeof global !== "undefined" ? global.AV : null); -var Vorbis = require('../build/libvorbis.js'); - -var VorbisDecoder = AV.Decoder.extend(function() { - AV.Decoder.register('vorbis', this); - AV.Decoder.register('vrbs', this); - - this.prototype.init = function() { - this.buflen = 4096; - this.buf = Vorbis._malloc(this.buflen); - this.headers = 1; - - this.outlen = 4096; - this.outbuf = Vorbis._malloc(this.outlen << 2); - this.decodedBuffer = null; - - this.vorbis = Vorbis._VorbisInit(this.outbuf, this.outlen); - - var self = this; - var offset = self.outbuf >> 2; - - this.callback = Vorbis.Runtime.addFunction(function(len) { - var samples = Vorbis.HEAPF32.subarray(offset, offset + len); - self.decodedBuffer = new Float32Array(samples); - }); - }; - - this.prototype.readChunk = function() { - if (!this.stream.available(1)) - throw new AV.UnderflowError(); - - var list = this.stream.list; - var packet = list.first; - list.advance(); - - if (this.buflen < packet.length) { - this.buf = Vorbis._realloc(this.buf, packet.length); - this.buflen = packet.length; - } - - Vorbis.HEAPU8.set(packet.data, this.buf); - var status = 0; - if ((status = Vorbis._VorbisDecode(this.vorbis, this.buf, packet.length, this.callback)) !== 0) - throw new Error("Vorbis decoding error: " + status); - - return this.decodedBuffer; - }; - - this.prototype.destroy = function() { - Vorbis._free(this.buf); - Vorbis._free(this.outbuf); - Vorbis._VorbisDestroy(this.vorbis); - Vorbis.Runtime.removeFunction(this.callback); - - this.buf = null; - this.outbuf = null; - this.vorbis = null; - }; -}); - -module.exports = VorbisDecoder; - -},{"../build/libvorbis.js":1}],4:[function(require,module,exports){ -var AV = (typeof window !== "undefined" ? window.AV : typeof global !== "undefined" ? global.AV : null); -var OggDemuxer = (typeof window !== "undefined" ? window.AV.OggDemuxer : typeof global !== "undefined" ? global.AV.OggDemuxer : null); -var Vorbis = require('../build/libvorbis.js'); - -var VorbisGetComment = Vorbis.cwrap('VorbisGetComment', 'string', ['number', 'number']); - -// vorbis demuxer plugin for Ogg -OggDemuxer.plugins.push({ - magic: "\001vorbis", - - init: function() { - this.vorbis = Vorbis._VorbisInit(); - this.buflen = 4096; - this.buf = Vorbis._malloc(this.buflen); - this.headers = 3; - this.headerBuffers = []; - }, - - readHeaders: function(packet) { - if (this.buflen < packet.length) { - this.buf = Vorbis._realloc(this.buf, packet.length); - this.buflen = packet.length; - } - - Vorbis.HEAPU8.set(packet, this.buf); - if (Vorbis._VorbisHeaderDecode(this.vorbis, this.buf, packet.length) !== 0) - throw new Error("Invalid vorbis header"); - - this.headerBuffers.push(packet); - - if (--this.headers === 0) { - this.emit('format', { - formatID: 'vorbis', - sampleRate: Vorbis._VorbisGetSampleRate(this.vorbis), - channelsPerFrame: Vorbis._VorbisGetChannels(this.vorbis), - floatingPoint: true - }); - - var comments = Vorbis._VorbisGetNumComments(this.vorbis); - this.metadata = {}; - for (var i = 0; i < comments; i++) { - var comment = VorbisGetComment(this.vorbis, i), - idx = comment.indexOf('='); - - this.metadata[comment.slice(0, idx).toLowerCase()] = comment.slice(idx + 1); - } - - this.emit('metadata', this.metadata); - - Vorbis._VorbisDestroy(this.vorbis); - Vorbis._free(this.buf); - this.vorbis = null; - - for (var i = 0; i < 3; i++) - this.emit('data', new AV.Buffer(this.headerBuffers[i])); - } - - return this.headers === 0; - }, - - readPacket: function(packet) { - this.emit('data', new AV.Buffer(packet)); - } -}); - -module.exports = OggDemuxer; - -},{"../build/libvorbis.js":1}]},{},[2]) \ No newline at end of file diff --git a/src/core/static/js/libs/jplayer/jquery.jplayer.min.js b/src/core/static/js/libs/jplayer/jquery.jplayer.min.js deleted file mode 100644 index 99f64d7..0000000 --- a/src/core/static/js/libs/jplayer/jquery.jplayer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! jPlayer 2.9.2 for jQuery ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):b("object"==typeof exports?require("jquery"):a.jQuery?a.jQuery:a.Zepto)}(this,function(a,b){a.fn.jPlayer=function(c){var d="jPlayer",e="string"==typeof c,f=Array.prototype.slice.call(arguments,1),g=this;return c=!e&&f.length?a.extend.apply(null,[!0,c].concat(f)):c,e&&"_"===c.charAt(0)?g:(this.each(e?function(){var e=a(this).data(d),h=e&&a.isFunction(e[c])?e[c].apply(e,f):e;return h!==e&&h!==b?(g=h,!1):void 0}:function(){var b=a(this).data(d);b?b.option(c||{}):a(this).data(d,new a.jPlayer(c,this))}),g)},a.jPlayer=function(b,c){if(arguments.length){this.element=a(c),this.options=a.extend(!0,{},this.options,b);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()}),this._init()}},"function"!=typeof a.fn.stop&&(a.fn.stop=function(){}),a.jPlayer.emulateMethods="load play pause",a.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate",a.jPlayer.emulateOptions="muted volume",a.jPlayer.reservedEvent="ready flashreset resize repeat error warning",a.jPlayer.event={},a.each(["ready","setmedia","flashreset","resize","repeat","click","error","warning","loadstart","progress","suspend","abort","emptied","stalled","play","pause","loadedmetadata","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange"],function(){a.jPlayer.event[this]="jPlayer_"+this}),a.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","canplay","canplaythrough"],a.jPlayer.pause=function(){a.jPlayer.prototype.destroyRemoved(),a.each(a.jPlayer.prototype.instances,function(a,b){b.data("jPlayer").status.srcSet&&b.jPlayer("pause")})},a.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var c=function(){this.init()};c.prototype={init:function(){this.options={timeFormat:a.jPlayer.timeFormat}},time:function(a){a=a&&"number"==typeof a?a:0;var b=new Date(1e3*a),c=b.getUTCHours(),d=this.options.timeFormat.showHour?b.getUTCMinutes():b.getUTCMinutes()+60*c,e=this.options.timeFormat.showMin?b.getUTCSeconds():b.getUTCSeconds()+60*d,f=this.options.timeFormat.padHour&&10>c?"0"+c:c,g=this.options.timeFormat.padMin&&10>d?"0"+d:d,h=this.options.timeFormat.padSec&&10>e?"0"+e:e,i="";return i+=this.options.timeFormat.showHour?f+this.options.timeFormat.sepHour:"",i+=this.options.timeFormat.showMin?g+this.options.timeFormat.sepMin:"",i+=this.options.timeFormat.showSec?h+this.options.timeFormat.sepSec:""}};var d=new c;a.jPlayer.convertTime=function(a){return d.time(a)},a.jPlayer.uaBrowser=function(a){var b=a.toLowerCase(),c=/(webkit)[ \/]([\w.]+)/,d=/(opera)(?:.*version)?[ \/]([\w.]+)/,e=/(msie) ([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))?/,g=c.exec(b)||d.exec(b)||e.exec(b)||b.indexOf("compatible")<0&&f.exec(b)||[];return{browser:g[1]||"",version:g[2]||"0"}},a.jPlayer.uaPlatform=function(a){var b=a.toLowerCase(),c=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/,d=/(ipad|playbook)/,e=/(android)/,f=/(mobile)/,g=c.exec(b)||[],h=d.exec(b)||!f.exec(b)&&e.exec(b)||[];return g[1]&&(g[1]=g[1].replace(/\s/g,"_")),{platform:g[1]||"",tablet:h[1]||""}},a.jPlayer.browser={},a.jPlayer.platform={};var e=a.jPlayer.uaBrowser(navigator.userAgent);e.browser&&(a.jPlayer.browser[e.browser]=!0,a.jPlayer.browser.version=e.version);var f=a.jPlayer.uaPlatform(navigator.userAgent);f.platform&&(a.jPlayer.platform[f.platform]=!0,a.jPlayer.platform.mobile=!f.tablet,a.jPlayer.platform.tablet=!!f.tablet),a.jPlayer.getDocMode=function(){var b;return a.jPlayer.browser.msie&&(document.documentMode?b=document.documentMode:(b=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(b=7))),b},a.jPlayer.browser.documentMode=a.jPlayer.getDocMode(),a.jPlayer.nativeFeatures={init:function(){var a,b,c,d=document,e=d.createElement("video"),f={w3c:["fullscreenEnabled","fullscreenElement","requestFullscreen","exitFullscreen","fullscreenchange","fullscreenerror"],moz:["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror"],webkit:["","webkitCurrentFullScreenElement","webkitRequestFullScreen","webkitCancelFullScreen","webkitfullscreenchange",""],webkitVideo:["webkitSupportsFullscreen","webkitDisplayingFullscreen","webkitEnterFullscreen","webkitExitFullscreen","",""],ms:["","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError"]},g=["w3c","moz","webkit","webkitVideo","ms"];for(this.fullscreen=a={support:{w3c:!!d[f.w3c[0]],moz:!!d[f.moz[0]],webkit:"function"==typeof d[f.webkit[3]],webkitVideo:"function"==typeof e[f.webkitVideo[2]],ms:"function"==typeof e[f.ms[2]]},used:{}},b=0,c=g.length;c>b;b++){var h=g[b];if(a.support[h]){a.spec=h,a.used[h]=!0;break}}if(a.spec){var i=f[a.spec];a.api={fullscreenEnabled:!0,fullscreenElement:function(a){return a=a?a:d,a[i[1]]},requestFullscreen:function(a){return a[i[2]]()},exitFullscreen:function(a){return a=a?a:d,a[i[3]]()}},a.event={fullscreenchange:i[4],fullscreenerror:i[5]}}else a.api={fullscreenEnabled:!1,fullscreenElement:function(){return null},requestFullscreen:function(){},exitFullscreen:function(){}},a.event={}}},a.jPlayer.nativeFeatures.init(),a.jPlayer.focus=null,a.jPlayer.keyIgnoreElementNames="A INPUT TEXTAREA SELECT BUTTON";var g=function(b){var c,d=a.jPlayer.focus;d&&(a.each(a.jPlayer.keyIgnoreElementNames.split(/\s+/g),function(a,d){return b.target.nodeName.toUpperCase()===d.toUpperCase()?(c=!0,!1):void 0}),c||a.each(d.options.keyBindings,function(c,e){return e&&a.isFunction(e.fn)&&("number"==typeof e.key&&b.which===e.key||"string"==typeof e.key&&b.key===e.key)?(b.preventDefault(),e.fn(d),!1):void 0}))};a.jPlayer.keys=function(b){var c="keydown.jPlayer";a(document.documentElement).unbind(c),b&&a(document.documentElement).bind(c,g)},a.jPlayer.keys(!0),a.jPlayer.prototype={count:0,version:{script:"2.9.2",needFlash:"2.9.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",auroraFormats:"wav",preload:"metadata",volume:.8,muted:!1,remainingDuration:!1,toggleDuration:!1,captureDuration:!0,playbackRate:1,defaultPlaybackRate:1,minPlaybackRate:.5,maxPlaybackRate:4,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",playbackRateBar:".jp-playback-rate-bar",playbackRateBarValue:".jp-playback-rate-bar-value",currentTime:".jp-current-time",duration:".jp-duration",title:".jp-title",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},stateClass:{playing:"jp-state-playing",seeking:"jp-state-seeking",muted:"jp-state-muted",looped:"jp-state-looped",fullScreen:"jp-state-full-screen",noVolume:"jp-state-no-volume"},useStateClassSkin:!1,autoBlur:!0,smoothPlayBar:!1,fullScreen:!1,fullWindow:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1e3},loop:!1,repeat:function(b){b.jPlayer.options.loop?a(this).unbind(".jPlayerRepeat").bind(a.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){a(this).jPlayer("play")}):a(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullWindow:{msie:/msie [0-6]\./,ipad:/ipad.*?os [0-4]\./,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3]\.(?!.*?mobile)/,android_phone:/(?=.*android)(?!.*chrome)(?=.*mobile)/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/,playbook:/playbook/},timeFormat:{},keyEnabled:!1,audioFullScreen:!1,keyBindings:{play:{key:80,fn:function(a){a.status.paused?a.play():a.pause()}},fullScreen:{key:70,fn:function(a){(a.status.video||a.options.audioFullScreen)&&a._setOption("fullScreen",!a.options.fullScreen)}},muted:{key:77,fn:function(a){a._muted(!a.options.muted)}},volumeUp:{key:190,fn:function(a){a.volume(a.options.volume+.1)}},volumeDown:{key:188,fn:function(a){a.volume(a.options.volume-.1)}},loop:{key:76,fn:function(a){a._loop(!a.options.loop)}}},verticalVolume:!1,verticalPlaybackRate:!1,globalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,consoleAlerts:!0,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,remaining:0,videoWidth:0,videoHeight:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,aurora:!0,flash:!0},format:{mp3:{codec:"audio/mpeg",flashCanPlay:!0,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},m3u8a:{codec:'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',flashCanPlay:!1,media:"audio"},m3ua:{codec:"audio/mpegurl",flashCanPlay:!1,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis, opus"',flashCanPlay:!1,media:"audio"},flac:{codec:"audio/x-flac",flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},m3u8v:{codec:'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!1,media:"video"},m3uv:{codec:"audio/mpegurl",flashCanPlay:!1,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var c=this;if(this.element.empty(),this.status=a.extend({},this.status),this.internal=a.extend({},this.internal),this.options.timeFormat=a.extend({},a.jPlayer.timeFormat,this.options.timeFormat),this.internal.cmdsIgnored=a.jPlayer.platform.ipad||a.jPlayer.platform.iphone||a.jPlayer.platform.ipod,this.internal.domNode=this.element.get(0),this.options.keyEnabled&&!a.jPlayer.focus&&(a.jPlayer.focus=this),this.androidFix={setMedia:!1,play:!1,pause:!1,time:0/0},a.jPlayer.platform.android&&(this.options.preload="auto"!==this.options.preload?"metadata":"auto"),this.formats=[],this.solutions=[],this.require={},this.htmlElement={},this.html={},this.html.audio={},this.html.video={},this.aurora={},this.aurora.formats=[],this.aurora.properties=[],this.flash={},this.css={},this.css.cs={},this.css.jq={},this.ancestorJq=[],this.options.volume=this._limitValue(this.options.volume,0,1),a.each(this.options.supplied.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=!1;a.each(c.formats,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.formats.push(e)}}),a.each(this.options.solution.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.solution[e]){var f=!1;a.each(c.solutions,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.solutions.push(e)}}),a.each(this.options.auroraFormats.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=!1;a.each(c.aurora.formats,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.aurora.formats.push(e)}}),this.internal.instance="jp_"+this.count,this.instances[this.internal.instance]=this.element,this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count),this.internal.self=a.extend({},{id:this.element.attr("id"),jq:this.element}),this.internal.audio=a.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:b}),this.internal.video=a.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:b}),this.internal.flash=a.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:b,swf:this.options.swfPath+(".swf"!==this.options.swfPath.toLowerCase().slice(-4)?(this.options.swfPath&&"/"!==this.options.swfPath.slice(-1)?"/":"")+"jquery.jplayer.swf":"")}),this.internal.poster=a.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:b}),a.each(a.jPlayer.event,function(a,d){c.options[a]!==b&&(c.element.bind(d+".jPlayer",c.options[a]),c.options[a]=b)}),this.require.audio=!1,this.require.video=!1,a.each(this.formats,function(a,b){c.require[c.format[b].media]=!0}),this.options=this.require.video?a.extend(!0,{},this.optionsVideo,this.options):a.extend(!0,{},this.optionsAudio,this.options),this._setSize(),this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls),this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow),this.status.noVolume=this._uaBlocklist(this.options.noVolume),a.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled&&this._fullscreenAddEventListeners(),this._restrictNativeVideoControls(),this.htmlElement.poster=document.createElement("img"),this.htmlElement.poster.id=this.internal.poster.id,this.htmlElement.poster.onload=function(){(!c.status.video||c.status.waitForPlay)&&c.internal.poster.jq.show()},this.element.append(this.htmlElement.poster),this.internal.poster.jq=a("#"+this.internal.poster.id),this.internal.poster.jq.css({width:this.status.width,height:this.status.height}),this.internal.poster.jq.hide(),this.internal.poster.jq.bind("click.jPlayer",function(){c._trigger(a.jPlayer.event.click)}),this.html.audio.available=!1,this.require.audio&&(this.htmlElement.audio=document.createElement("audio"),this.htmlElement.audio.id=this.internal.audio.id,this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)),this.html.video.available=!1,this.require.video&&(this.htmlElement.video=document.createElement("video"),this.htmlElement.video.id=this.internal.video.id,this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)),this.flash.available=this._checkForFlash(10.1),this.html.canPlay={},this.aurora.canPlay={},this.flash.canPlay={},a.each(this.formats,function(b,d){c.html.canPlay[d]=c.html[c.format[d].media].available&&""!==c.htmlElement[c.format[d].media].canPlayType(c.format[d].codec),c.aurora.canPlay[d]=a.inArray(d,c.aurora.formats)>-1,c.flash.canPlay[d]=c.format[d].flashCanPlay&&c.flash.available}),this.html.desired=!1,this.aurora.desired=!1,this.flash.desired=!1,a.each(this.solutions,function(b,d){if(0===b)c[d].desired=!0;else{var e=!1,f=!1;a.each(c.formats,function(a,b){c[c.solutions[0]].canPlay[b]&&("video"===c.format[b].media?f=!0:e=!0)}),c[d].desired=c.require.audio&&!e||c.require.video&&!f}}),this.html.support={},this.aurora.support={},this.flash.support={},a.each(this.formats,function(a,b){c.html.support[b]=c.html.canPlay[b]&&c.html.desired,c.aurora.support[b]=c.aurora.canPlay[b]&&c.aurora.desired,c.flash.support[b]=c.flash.canPlay[b]&&c.flash.desired}),this.html.used=!1,this.aurora.used=!1,this.flash.used=!1,a.each(this.solutions,function(b,d){a.each(c.formats,function(a,b){return c[d].support[b]?(c[d].used=!0,!1):void 0})}),this._resetActive(),this._resetGate(),this._cssSelectorAncestor(this.options.cssSelectorAncestor),this.html.used||this.aurora.used||this.flash.used?this.css.jq.noSolution.length&&this.css.jq.noSolution.hide():(this._error({type:a.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SOLUTION,hint:a.jPlayer.errorHint.NO_SOLUTION}),this.css.jq.noSolution.length&&this.css.jq.noSolution.show()),this.flash.used){var d,e="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+"&muted="+this.options.muted;if(a.jPlayer.browser.msie&&(Number(a.jPlayer.browser.version)<9||a.jPlayer.browser.documentMode<9)){var f='',g=['','','','',''];d=document.createElement(f);for(var h=0;h0&&(d.internal.cmdsIgnored=!1),d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.progress))},!1),b.addEventListener("loadeddata",function(){c.gate&&(d.androidFix.setMedia=!1,d.androidFix.play&&(d.androidFix.play=!1,d.play(d.androidFix.time)),d.androidFix.pause&&(d.androidFix.pause=!1,d.pause(d.androidFix.time)),d._trigger(a.jPlayer.event.loadeddata))},!1),b.addEventListener("timeupdate",function(){c.gate&&(d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.timeupdate))},!1),b.addEventListener("durationchange",function(){c.gate&&(d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.durationchange))},!1),b.addEventListener("play",function(){c.gate&&(d._updateButtons(!0),d._html_checkWaitForPlay(),d._trigger(a.jPlayer.event.play))},!1),b.addEventListener("playing",function(){c.gate&&(d._updateButtons(!0),d._seeked(),d._trigger(a.jPlayer.event.playing))},!1),b.addEventListener("pause",function(){c.gate&&(d._updateButtons(!1),d._trigger(a.jPlayer.event.pause))},!1),b.addEventListener("waiting",function(){c.gate&&(d._seeking(),d._trigger(a.jPlayer.event.waiting))},!1),b.addEventListener("seeking",function(){c.gate&&(d._seeking(),d._trigger(a.jPlayer.event.seeking))},!1),b.addEventListener("seeked",function(){c.gate&&(d._seeked(),d._trigger(a.jPlayer.event.seeked))},!1),b.addEventListener("volumechange",function(){c.gate&&(d.options.volume=b.volume,d.options.muted=b.muted,d._updateMute(),d._updateVolume(),d._trigger(a.jPlayer.event.volumechange))},!1),b.addEventListener("ratechange",function(){c.gate&&(d.options.defaultPlaybackRate=b.defaultPlaybackRate,d.options.playbackRate=b.playbackRate,d._updatePlaybackRate(),d._trigger(a.jPlayer.event.ratechange))},!1),b.addEventListener("suspend",function(){c.gate&&(d._seeked(),d._trigger(a.jPlayer.event.suspend))},!1),b.addEventListener("ended",function(){c.gate&&(a.jPlayer.browser.webkit||(d.htmlElement.media.currentTime=0),d.htmlElement.media.pause(),d._updateButtons(!1),d._getHtmlStatus(b,!0),d._updateInterface(),d._trigger(a.jPlayer.event.ended))},!1),b.addEventListener("error",function(){c.gate&&(d._updateButtons(!1),d._seeked(),d.status.srcSet&&(clearTimeout(d.internal.htmlDlyCmdId),d.status.waitForLoad=!0,d.status.waitForPlay=!0,d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"}),d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show(),d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show(),d._error({type:a.jPlayer.error.URL,context:d.status.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL})))},!1),a.each(a.jPlayer.htmlEvent,function(e,f){b.addEventListener(this,function(){c.gate&&d._trigger(a.jPlayer.event[f])},!1)})},_addAuroraEventListeners:function(b,c){var d=this;b.volume=100*this.options.volume,b.on("progress",function(){c.gate&&(d.internal.cmdsIgnored&&this.readyState>0&&(d.internal.cmdsIgnored=!1),d._getAuroraStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.progress),b.duration>0&&d._trigger(a.jPlayer.event.timeupdate))},!1),b.on("ready",function(){c.gate&&d._trigger(a.jPlayer.event.loadeddata)},!1),b.on("duration",function(){c.gate&&(d._getAuroraStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.durationchange))},!1),b.on("end",function(){c.gate&&(d._updateButtons(!1),d._getAuroraStatus(b,!0),d._updateInterface(),d._trigger(a.jPlayer.event.ended))},!1),b.on("error",function(){c.gate&&(d._updateButtons(!1),d._seeked(),d.status.srcSet&&(d.status.waitForLoad=!0,d.status.waitForPlay=!0,d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"}),d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show(),d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show(),d._error({type:a.jPlayer.error.URL,context:d.status.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL})))},!1)},_getHtmlStatus:function(a,b){var c=0,d=0,e=0,f=0;isFinite(a.duration)&&(this.status.duration=a.duration),c=a.currentTime,d=this.status.duration>0?100*c/this.status.duration:0,"object"==typeof a.seekable&&a.seekable.length>0?(e=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100,f=this.status.duration>0?100*a.currentTime/a.seekable.end(a.seekable.length-1):0):(e=100,f=d),b&&(c=0,f=0,d=0),this.status.seekPercent=e,this.status.currentPercentRelative=f,this.status.currentPercentAbsolute=d,this.status.currentTime=c,this.status.remaining=this.status.duration-this.status.currentTime,this.status.videoWidth=a.videoWidth,this.status.videoHeight=a.videoHeight,this.status.readyState=a.readyState,this.status.networkState=a.networkState,this.status.playbackRate=a.playbackRate,this.status.ended=a.ended},_getAuroraStatus:function(a,b){var c=0,d=0,e=0,f=0;this.status.duration=a.duration/1e3,c=a.currentTime/1e3,d=this.status.duration>0?100*c/this.status.duration:0,a.buffered>0?(e=this.status.duration>0?a.buffered*this.status.duration/this.status.duration:100,f=this.status.duration>0?c/(a.buffered*this.status.duration):0):(e=100,f=d),b&&(c=0,f=0,d=0),this.status.seekPercent=e,this.status.currentPercentRelative=f,this.status.currentPercentAbsolute=d,this.status.currentTime=c,this.status.remaining=this.status.duration-this.status.currentTime,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_resetStatus:function(){this.status=a.extend({},this.status,a.jPlayer.prototype.status)},_trigger:function(b,c,d){var e=a.Event(b);e.jPlayer={},e.jPlayer.version=a.extend({},this.version),e.jPlayer.options=a.extend(!0,{},this.options),e.jPlayer.status=a.extend(!0,{},this.status),e.jPlayer.html=a.extend(!0,{},this.html),e.jPlayer.aurora=a.extend(!0,{},this.aurora),e.jPlayer.flash=a.extend(!0,{},this.flash),c&&(e.jPlayer.error=a.extend({},c)),d&&(e.jPlayer.warning=a.extend({},d)),this.element.trigger(e)},jPlayerFlashEvent:function(b,c){if(b===a.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media),this.volumeWorker(this.options.volume),d>0&&(e?this.pause(d):this.play(d))}this._trigger(a.jPlayer.event.flashreset)}}else this.internal.ready=!0,this.internal.flash.jq.css({width:"0px",height:"0px"}),this.version.flash=c.version,this.version.needFlash!==this.version.flash&&this._error({type:a.jPlayer.error.VERSION,context:this.version.flash,message:a.jPlayer.errorMsg.VERSION+this.version.flash,hint:a.jPlayer.errorHint.VERSION}),this._trigger(a.jPlayer.event.repeat),this._trigger(b);if(this.flash.gate)switch(b){case a.jPlayer.event.progress:this._getFlashStatus(c),this._updateInterface(),this._trigger(b);break;case a.jPlayer.event.timeupdate:this._getFlashStatus(c),this._updateInterface(),this._trigger(b);break;case a.jPlayer.event.play:this._seeked(),this._updateButtons(!0),this._trigger(b);break;case a.jPlayer.event.pause:this._updateButtons(!1),this._trigger(b);break;case a.jPlayer.event.ended:this._updateButtons(!1),this._trigger(b);break;case a.jPlayer.event.click:this._trigger(b);break;case a.jPlayer.event.error:this.status.waitForLoad=!0,this.status.waitForPlay=!0,this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"}),this._validString(this.status.media.poster)&&this.internal.poster.jq.show(),this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show(),this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media),this._updateButtons(!1),this._error({type:a.jPlayer.error.URL,context:c.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL});break;case a.jPlayer.event.seeking:this._seeking(),this._trigger(b);break;case a.jPlayer.event.seeked:this._seeked(),this._trigger(b);break;case a.jPlayer.event.ready:break;default:this._trigger(b)}return!1},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent,this.status.currentPercentRelative=a.currentPercentRelative,this.status.currentPercentAbsolute=a.currentPercentAbsolute,this.status.currentTime=a.currentTime,this.status.duration=a.duration,this.status.remaining=a.duration-a.currentTime,this.status.videoWidth=a.videoWidth,this.status.videoHeight=a.videoHeight,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_updateButtons:function(a){a===b?a=!this.status.paused:this.status.paused=!a,a?this.addStateClass("playing"):this.removeStateClass("playing"),!this.status.noFullWindow&&this.options.fullWindow?this.addStateClass("fullScreen"):this.removeStateClass("fullScreen"),this.options.loop?this.addStateClass("looped"):this.removeStateClass("looped"),this.css.jq.play.length&&this.css.jq.pause.length&&(a?(this.css.jq.play.hide(),this.css.jq.pause.show()):(this.css.jq.play.show(),this.css.jq.pause.hide())),this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length&&(this.status.noFullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.hide()):this.options.fullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.show()):(this.css.jq.fullScreen.show(),this.css.jq.restoreScreen.hide())),this.css.jq.repeat.length&&this.css.jq.repeatOff.length&&(this.options.loop?(this.css.jq.repeat.hide(),this.css.jq.repeatOff.show()):(this.css.jq.repeat.show(),this.css.jq.repeatOff.hide()))},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%"),this.css.jq.playBar.length&&(this.options.smoothPlayBar?this.css.jq.playBar.stop().animate({width:this.status.currentPercentAbsolute+"%"},250,"linear"):this.css.jq.playBar.width(this.status.currentPercentRelative+"%"));var a="";this.css.jq.currentTime.length&&(a=this._convertTime(this.status.currentTime),a!==this.css.jq.currentTime.text()&&this.css.jq.currentTime.text(this._convertTime(this.status.currentTime)));var b="",c=this.status.duration,d=this.status.remaining;this.css.jq.duration.length&&("string"==typeof this.status.media.duration?b=this.status.media.duration:("number"==typeof this.status.media.duration&&(c=this.status.media.duration,d=c-this.status.currentTime),b=this.options.remainingDuration?(d>0?"-":"")+this._convertTime(d):this._convertTime(c)),b!==this.css.jq.duration.text()&&this.css.jq.duration.text(b))},_convertTime:c.prototype.time,_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg"),this.addStateClass("seeking")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg"),this.removeStateClass("seeking")},_resetGate:function(){this.html.audio.gate=!1,this.html.video.gate=!1,this.aurora.gate=!1,this.flash.gate=!1},_resetActive:function(){this.html.active=!1,this.aurora.active=!1,this.flash.active=!1},_escapeHtml:function(a){return a.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""")},_qualifyURL:function(a){var b=document.createElement("div"); -return b.innerHTML='x',b.firstChild.href},_absoluteMediaUrls:function(b){var c=this;return a.each(b,function(a,d){d&&c.format[a]&&"data:"!==d.substr(0,5)&&(b[a]=c._qualifyURL(d))}),b},addStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.addClass(this.options.stateClass[a])},removeStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.removeClass(this.options.stateClass[a])},setMedia:function(b){var c=this,d=!1,e=this.status.media.poster!==b.poster;this._resetMedia(),this._resetGate(),this._resetActive(),this.androidFix.setMedia=!1,this.androidFix.play=!1,this.androidFix.pause=!1,b=this._absoluteMediaUrls(b),a.each(this.formats,function(e,f){var g="video"===c.format[f].media;return a.each(c.solutions,function(e,h){if(c[h].support[f]&&c._validString(b[f])){var i="html"===h,j="aurora"===h;return g?(i?(c.html.video.gate=!0,c._html_setVideo(b),c.html.active=!0):(c.flash.gate=!0,c._flash_setVideo(b),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show(),c.status.video=!0):(i?(c.html.audio.gate=!0,c._html_setAudio(b),c.html.active=!0,a.jPlayer.platform.android&&(c.androidFix.setMedia=!0)):j?(c.aurora.gate=!0,c._aurora_setAudio(b),c.aurora.active=!0):(c.flash.gate=!0,c._flash_setAudio(b),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide(),c.status.video=!1),d=!0,!1}}),d?!1:void 0}),d?(this.status.nativeVideoControls&&this.html.video.gate||this._validString(b.poster)&&(e?this.htmlElement.poster.src=b.poster:this.internal.poster.jq.show()),"string"==typeof b.title&&(this.css.jq.title.length&&this.css.jq.title.html(b.title),this.htmlElement.audio&&this.htmlElement.audio.setAttribute("title",b.title),this.htmlElement.video&&this.htmlElement.video.setAttribute("title",b.title)),this.status.srcSet=!0,this.status.media=a.extend({},b),this._updateButtons(!1),this._updateInterface(),this._trigger(a.jPlayer.event.setmedia)):this._error({type:a.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SUPPORT,hint:a.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus(),this._updateButtons(!1),this._updateInterface(),this._seeked(),this.internal.poster.jq.hide(),clearTimeout(this.internal.htmlDlyCmdId),this.html.active?this._html_resetMedia():this.aurora.active?this._aurora_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia(),this.html.active?this._html_clearMedia():this.aurora.active?this._aurora_clearMedia():this.flash.active&&this._flash_clearMedia(),this._resetGate(),this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.aurora.active?this._aurora_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},focus:function(){this.options.keyEnabled&&(a.jPlayer.focus=this)},play:function(a){var b="object"==typeof a;b&&this.options.useStateClassSkin&&!this.status.paused?this.pause(a):(a="number"==typeof a?a:0/0,this.status.srcSet?(this.focus(),this.html.active?this._html_play(a):this.aurora.active?this._aurora_play(a):this.flash.active&&this._flash_play(a)):this._urlNotSetError("play"))},videoPlay:function(){this.play()},pause:function(a){a="number"==typeof a?a:0/0,this.status.srcSet?this.html.active?this._html_pause(a):this.aurora.active?this._aurora_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},tellOthers:function(b,c){var d=this,e="function"==typeof c,f=Array.prototype.slice.call(arguments);"string"==typeof b&&(e&&f.splice(1,1),a.jPlayer.prototype.destroyRemoved(),a.each(this.instances,function(){d.element!==this&&(!e||c.call(this.data("jPlayer"),d))&&this.jPlayer.apply(this,f)}))},pauseOthers:function(a){this.tellOthers("pause",function(){return this.status.srcSet},a)},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.aurora.active?this._aurora_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100),this.status.srcSet?this.html.active?this._html_playHead(a):this.aurora.active?this._aurora_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.mutedWorker(a),this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume},a)},mutedWorker:function(b){this.options.muted=b,this.html.used&&this._html_setProperty("muted",b),this.aurora.used&&this._aurora_mute(b),this.flash.used&&this._flash_mute(b),this.html.video.gate||this.html.audio.gate||(this._updateMute(b),this._updateVolume(this.options.volume),this._trigger(a.jPlayer.event.volumechange))},mute:function(a){var c="object"==typeof a;c&&this.options.useStateClassSkin&&this.options.muted?this._muted(!1):(a=a===b?!0:!!a,this._muted(a))},unmute:function(a){a=a===b?!0:!!a,this._muted(!a)},_updateMute:function(a){a===b&&(a=this.options.muted),a?this.addStateClass("muted"):this.removeStateClass("muted"),this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume?(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):a?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(a){this.volumeWorker(a),this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},a)},volumeWorker:function(b){b=this._limitValue(b,0,1),this.options.volume=b,this.html.used&&this._html_setProperty("volume",b),this.aurora.used&&this._aurora_volume(b),this.flash.used&&this._flash_volume(b),this.html.video.gate||this.html.audio.gate||(this._updateVolume(b),this._trigger(a.jPlayer.event.volumechange))},volumeBar:function(b){if(this.css.jq.volumeBar.length){var c=a(b.currentTarget),d=c.offset(),e=b.pageX-d.left,f=c.width(),g=c.height()-b.pageY+d.top,h=c.height();this.volume(this.options.verticalVolume?g/h:e/f)}this.options.muted&&this._muted(!1)},_updateVolume:function(a){a===b&&(a=this.options.volume),a=this.options.muted?0:a,this.status.noVolume?(this.addStateClass("noVolume"),this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide(),this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()):(this.removeStateClass("noVolume"),this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](100*a+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1),this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(b){var c=this;this.options.cssSelectorAncestor=b,this._removeUiClass(),this.ancestorJq=b?a(b):[],b&&1!==this.ancestorJq.length&&this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT}),this._addUiClass(),a.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)}),this._updateInterface(),this._updateButtons(),this._updateAutohide(),this._updateVolume(),this._updateMute()},_cssSelector:function(b,c){var d=this;if("string"==typeof c)if(a.jPlayer.prototype.options.cssSelector[b]){if(this.css.jq[b]&&this.css.jq[b].length&&this.css.jq[b].unbind(".jPlayer"),this.options.cssSelector[b]=c,this.css.cs[b]=this.options.cssSelectorAncestor+" "+c,this.css.jq[b]=c?a(this.css.cs[b]):[],this.css.jq[b].length&&this[b]){var e=function(c){c.preventDefault(),d[b](c),d.options.autoBlur?a(this).blur():a(this).focus()};this.css.jq[b].bind("click.jPlayer",e)}c&&1!==this.css.jq[b].length&&this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[b],message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[b].length+" found for "+b+" method.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:a.jPlayer.warning.CSS_SELECTOR_METHOD,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:a.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:a.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:a.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:a.jPlayer.warningHint.CSS_SELECTOR_STRING})},duration:function(a){this.options.toggleDuration&&(this.options.captureDuration&&a.stopPropagation(),this._setOption("remainingDuration",!this.options.remainingDuration))},seekBar:function(b){if(this.css.jq.seekBar.length){var c=a(b.currentTarget),d=c.offset(),e=b.pageX-d.left,f=c.width(),g=100*e/f;this.playHead(g)}},playbackRate:function(a){this._setOption("playbackRate",a)},playbackRateBar:function(b){if(this.css.jq.playbackRateBar.length){var c,d,e=a(b.currentTarget),f=e.offset(),g=b.pageX-f.left,h=e.width(),i=e.height()-b.pageY+f.top,j=e.height();c=this.options.verticalPlaybackRate?i/j:g/h,d=c*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+this.options.minPlaybackRate,this.playbackRate(d)}},_updatePlaybackRate:function(){var a=this.options.playbackRate,b=(a-this.options.minPlaybackRate)/(this.options.maxPlaybackRate-this.options.minPlaybackRate);this.status.playbackRateEnabled?(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.show(),this.css.jq.playbackRateBarValue.length&&(this.css.jq.playbackRateBarValue.show(),this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate?"height":"width"](100*b+"%"))):(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.hide(),this.css.jq.playbackRateBarValue.length&&this.css.jq.playbackRateBarValue.hide())},repeat:function(a){var b="object"==typeof a;this._loop(b&&this.options.useStateClassSkin&&this.options.loop?!1:!0)},repeatOff:function(){this._loop(!1)},_loop:function(b){this.options.loop!==b&&(this.options.loop=b,this._updateButtons(),this._trigger(a.jPlayer.event.repeat))},option:function(c,d){var e=c;if(0===arguments.length)return a.extend(!0,{},this.options);if("string"==typeof c){var f=c.split(".");if(d===b){for(var g=a.extend(!0,{},this.options),h=0;h0||Math.floor(d)>0):e=!0,a.internal.mouse={x:b.pageX,y:b.pageY},e&&a.css.jq.gui.fadeIn(a.options.autohide.fadeIn,function(){clearTimeout(a.internal.autohideId),a.internal.autohideId=setTimeout(function(){a.css.jq.gui.fadeOut(a.options.autohide.fadeOut)},a.options.autohide.hold)})};this.css.jq.gui.length&&(this.css.jq.gui.stop(!0,!0),clearTimeout(this.internal.autohideId),delete this.internal.mouse,this.element.unbind(c),this.css.jq.gui.unbind(c),this.status.nativeVideoControls?this.css.jq.gui.hide():this.options.fullWindow&&this.options.autohide.full||!this.options.fullWindow&&this.options.autohide.restored?(this.element.bind(d,e),this.css.jq.gui.bind(d,e),this.css.jq.gui.hide()):this.css.jq.gui.show())},fullScreen:function(a){var b="object"==typeof a;b&&this.options.useStateClassSkin&&this.options.fullScreen?this._setOption("fullScreen",!1):this._setOption("fullScreen",!0)},restoreScreen:function(){this._setOption("fullScreen",!1)},_fullscreenAddEventListeners:function(){var b=this,c=a.jPlayer.nativeFeatures.fullscreen;c.api.fullscreenEnabled&&c.event.fullscreenchange&&("function"!=typeof this.internal.fullscreenchangeHandler&&(this.internal.fullscreenchangeHandler=function(){b._fullscreenchange()}),document.addEventListener(c.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1))},_fullscreenRemoveEventListeners:function(){var b=a.jPlayer.nativeFeatures.fullscreen;this.internal.fullscreenchangeHandler&&document.removeEventListener(b.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1)},_fullscreenchange:function(){this.options.fullScreen&&!a.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()&&this._setOption("fullScreen",!1)},_requestFullscreen:function(){var b=this.ancestorJq.length?this.ancestorJq[0]:this.element[0],c=a.jPlayer.nativeFeatures.fullscreen;c.used.webkitVideo&&(b=this.htmlElement.video),c.api.fullscreenEnabled&&c.api.requestFullscreen(b)},_exitFullscreen:function(){var b,c=a.jPlayer.nativeFeatures.fullscreen;c.used.webkitVideo&&(b=this.htmlElement.video),c.api.fullscreenEnabled&&c.api.exitFullscreen(b)},_html_initMedia:function(b){var c=a(this.htmlElement.media).empty();a.each(b.track||[],function(a,b){var d=document.createElement("track");d.setAttribute("kind",b.kind?b.kind:""),d.setAttribute("src",b.src?b.src:""),d.setAttribute("srclang",b.srclang?b.srclang:""),d.setAttribute("label",b.label?b.label:""),b.def&&d.setAttribute("default",b.def),c.append(d)}),this.htmlElement.media.src=this.status.src,"none"!==this.options.preload&&this._html_load(),this._trigger(a.jPlayer.event.timeupdate)},_html_setFormat:function(b){var c=this;a.each(this.formats,function(a,d){return c.html.support[d]&&b[d]?(c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1):void 0})},_html_setAudio:function(a){this._html_setFormat(a),this.htmlElement.media=this.htmlElement.audio,this._html_initMedia(a)},_html_setVideo:function(a){this._html_setFormat(a),this.status.nativeVideoControls&&(this.htmlElement.video.poster=this._validString(a.poster)?a.poster:""),this.htmlElement.media=this.htmlElement.video,this._html_initMedia(a)},_html_resetMedia:function(){this.htmlElement.media&&(this.htmlElement.media.id!==this.internal.video.id||this.status.nativeVideoControls||this.internal.video.jq.css({width:"0px",height:"0px"}),this.htmlElement.media.pause())},_html_clearMedia:function(){this.htmlElement.media&&(this.htmlElement.media.src="about:blank",this.htmlElement.media.load())},_html_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.htmlElement.media.load()),clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this,c=this.htmlElement.media;if(this.androidFix.pause=!1,this._html_load(),this.androidFix.setMedia)this.androidFix.play=!0,this.androidFix.time=a;else if(isNaN(a))c.play();else{this.internal.cmdsIgnored&&c.play();try{if(c.seekable&&!("object"==typeof c.seekable&&c.seekable.length>0))throw 1;c.currentTime=a,c.play()}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},250))}}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this,c=this.htmlElement.media;if(this.androidFix.play=!1,a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId),c.pause(),this.androidFix.setMedia)this.androidFix.pause=!0,this.androidFix.time=a;else if(!isNaN(a))try{if(c.seekable&&!("object"==typeof c.seekable&&c.seekable.length>0))throw 1;c.currentTime=a}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},250))}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this,c=this.htmlElement.media;this._html_load();try{if("object"==typeof c.seekable&&c.seekable.length>0)c.currentTime=a*c.seekable.end(c.seekable.length-1)/100;else{if(!(c.duration>0)||isNaN(c.duration))throw"e";c.currentTime=a*c.duration/100}}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},250))}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height})))},_html_setProperty:function(a,b){this.html.audio.available&&(this.htmlElement.audio[a]=b),this.html.video.available&&(this.htmlElement.video[a]=b)},_aurora_setAudio:function(b){var c=this;a.each(this.formats,function(a,d){return c.aurora.support[d]&&b[d]?(c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1):void 0}),this.aurora.player=new AV.Player.fromURL(this.status.src),this._addAuroraEventListeners(this.aurora.player,this.aurora),"auto"===this.options.preload&&(this._aurora_load(),this.status.waitForLoad=!1)},_aurora_resetMedia:function(){this.aurora.player&&this.aurora.player.stop()},_aurora_clearMedia:function(){},_aurora_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.aurora.player.preload())},_aurora_play:function(b){this.status.waitForLoad||isNaN(b)||this.aurora.player.seek(b),this.aurora.player.playing||this.aurora.player.play(),this.status.waitForLoad=!1,this._aurora_checkWaitForPlay(),this._updateButtons(!0),this._trigger(a.jPlayer.event.play)},_aurora_pause:function(b){isNaN(b)||this.aurora.player.seek(1e3*b),this.aurora.player.pause(),b>0&&this._aurora_checkWaitForPlay(),this._updateButtons(!1),this._trigger(a.jPlayer.event.pause)},_aurora_playHead:function(a){this.aurora.player.duration>0&&this.aurora.player.seek(a*this.aurora.player.duration/100),this.status.waitForLoad||this._aurora_checkWaitForPlay()},_aurora_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1)},_aurora_volume:function(a){this.aurora.player.volume=100*a},_aurora_mute:function(a){a?(this.aurora.properties.lastvolume=this.aurora.player.volume,this.aurora.player.volume=0):this.aurora.player.volume=this.aurora.properties.lastvolume,this.aurora.properties.muted=a},_flash_setAudio:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4a":case"fla":c._getMovie().fl_setAudio_m4a(b[d]);break;case"mp3":c._getMovie().fl_setAudio_mp3(b[d]);break;case"rtmpa":c._getMovie().fl_setAudio_rtmp(b[d])}return c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_setVideo:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4v":case"flv":c._getMovie().fl_setVideo_m4v(b[d]);break;case"rtmpv":c._getMovie().fl_setVideo_rtmp(b[d])}return c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"}),this._flash_pause(0/0)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=!1},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=!1,this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}a>0&&(this.status.waitForLoad=!1,this._flash_checkWaitForPlay())},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.flash.jq.css({width:this.status.width,height:this.status.height})))},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_getFlashPluginVersion:function(){var a,b=0;if(window.ActiveXObject)try{if(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){var c=a.GetVariable("$version");c&&(c=c.split(" ")[1].split(","),b=parseInt(c[0],10)+"."+parseInt(c[1],10))}}catch(d){}else navigator.plugins&&navigator.mimeTypes.length>0&&(a=navigator.plugins["Shockwave Flash"],a&&(b=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")));return 1*b},_checkForFlash:function(a){var b=!1;return this._getFlashPluginVersion()>=a&&(b=!0),b},_validString:function(a){return a&&"string"==typeof a},_limitValue:function(a,b,c){return b>a?b:a>c?c:a},_urlNotSetError:function(b){this._error({type:a.jPlayer.error.URL_NOT_SET,context:b,message:a.jPlayer.errorMsg.URL_NOT_SET,hint:a.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(b){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH",this._error({type:a.jPlayer.error[c],context:this.internal.flash.swf,message:a.jPlayer.errorMsg[c]+b.message,hint:a.jPlayer.errorHint[c]}),this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(b){this._trigger(a.jPlayer.event.error,b),this.options.errorAlerts&&this._alert("Error!"+(b.message?"\n"+b.message:"")+(b.hint?"\n"+b.hint:"")+"\nContext: "+b.context)},_warning:function(c){this._trigger(a.jPlayer.event.warning,b,c),this.options.warningAlerts&&this._alert("Warning!"+(c.message?"\n"+c.message:"")+(c.hint?"\n"+c.hint:"")+"\nContext: "+c.context)},_alert:function(a){var b="jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a;this.options.consoleAlerts?window.console&&window.console.log&&window.console.log(b):alert(b)},_emulateHtmlBridge:function(){var b=this;a.each(a.jPlayer.emulateMethods.split(/\s+/g),function(a,c){b.internal.domNode[c]=function(a){b[c](a)}}),a.each(a.jPlayer.event,function(c,d){var e=!0;a.each(a.jPlayer.reservedEvent.split(/\s+/g),function(a,b){return b===c?(e=!1,!1):void 0}),e&&b.element.bind(d+".jPlayer.jPlayerHtml",function(){b._emulateHtmlUpdate();var a=document.createEvent("Event");a.initEvent(c,!1,!0),b.internal.domNode.dispatchEvent(a)})})},_emulateHtmlUpdate:function(){var b=this;a.each(a.jPlayer.emulateStatus.split(/\s+/g),function(a,c){b.internal.domNode[c]=b.status[c]}),a.each(a.jPlayer.emulateOptions.split(/\s+/g),function(a,c){b.internal.domNode[c]=b.options[c]})},_destroyHtmlBridge:function(){var b=this;this.element.unbind(".jPlayerHtml");var c=a.jPlayer.emulateMethods+" "+a.jPlayer.emulateStatus+" "+a.jPlayer.emulateOptions;a.each(c.split(/\s+/g),function(a,c){delete b.internal.domNode[c]})}},a.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"},a.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+a.jPlayer.prototype.version.script+" needs Jplayer.swf version "+a.jPlayer.prototype.version.needFlash+" but found "},a.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."},a.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"},a.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."},a.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}}); \ No newline at end of file diff --git a/src/core/static/js/libs/jplayer/jquery.jplayer.swf b/src/core/static/js/libs/jplayer/jquery.jplayer.swf deleted file mode 100644 index 340f7f9..0000000 Binary files a/src/core/static/js/libs/jplayer/jquery.jplayer.swf and /dev/null differ diff --git a/src/core/static/js/webfm/ui-logic.js b/src/core/static/js/webfm/ui-logic.js index aa5873e..a498b37 100644 --- a/src/core/static/js/webfm/ui-logic.js +++ b/src/core/static/js/webfm/ui-logic.js @@ -53,7 +53,7 @@ const closeFile = async () => { const trailerPlayer = document.getElementById("trailerPlayer") let title = document.getElementById("selectedFile"); - document.getElementById("video_container").style.display = "node"; + document.getElementById("video-container").style.display = "node"; document.getElementById("image-viewer").style.display = "none"; document.getElementById("text-viewer").style.display = "none"; document.getElementById("pdf-viewer").style.display = "none"; @@ -74,7 +74,7 @@ const showFile = async (title, hash, extension, type, target=null) => { document.getElementById("image-viewer").style.display = "none"; document.getElementById("text-viewer").style.display = "none"; document.getElementById("pdf-viewer").style.display = "none"; - document.getElementById("video_container").style.display = "none"; + document.getElementById("video-container").style.display = "none"; document.getElementById("trailerPlayer").style.display = "none"; @@ -103,7 +103,7 @@ const launchTrailer = (link) => { } const setupVideo = async (hash, extension, isStream, action="remux") => { - document.getElementById("video_container").style.display = ""; + document.getElementById("video-container").style.display = ""; video_path = `api/file-manager-action/files/${hash}`; clearSelectedActiveMedia(); diff --git a/src/core/static/js/webfm/video-events.js b/src/core/static/js/webfm/video-events.js index 7626843..49ef97c 100644 --- a/src/core/static/js/webfm/video-events.js +++ b/src/core/static/js/webfm/video-events.js @@ -1,108 +1,91 @@ -let player = null; -let playListMode = false; -let videoPlaylist = []; +let fullScreenState = 0; let clicktapwait = 200; let shouldPlay = null; +let controlsTimeout = null; +let playListMode = false; +let videoPlaylist = []; + +const getTimeFormatted = (duration = null) => { + if (duration == null) { return "00:00"; } + + const hours = (duration / 3600).toFixed(2).split(".")[0]; + const minutes = (duration / 60).toFixed(2).split(".")[0]; + const time = (duration / 60).toFixed(2) + const seconds = Math.floor( (time - Math.floor(time) ) * 60); + + return hours + ":" + minutes + ":" + seconds; +} -let jplayerOptions = { - solution: "html,aurora,flash", - supplied: "m4v, ogv", - cssSelectorAncestor: "#video-container", - swfPath: "static/js/libs/jplayer/jquery.jplayer.swf", - useStateClassSkin: true, - loop: true, - autoBlur: false, - smoothPlayBar: true, - remainingDuration: true, - toggleDuration: true, - ended: function() { - if (!playListMode) { - $(this).jPlayer("play"); +const togglePlay = (video) => { + shouldPlay = setTimeout(function () { + shouldPlay = null; + if (video.paused) { + video.style.cursor = 'none'; + video.play(); } else { - nextMedia(); + video.style.cursor = ''; + video.pause(); } - }, - keyEnabled: true, - keyBindings: { - play: { - key: 32, // p - fn: function(f) { - if(f.status.paused) { - f.play(); - } else { - f.pause(); - } - } - }, - play2: { - key: 80, // p - fn: function(f) { - if(f.status.paused) { - f.play(); - } else { - f.pause(); - } - } - }, - fullScreen: { - key: 70, // f - fn: function(f) { - if(f.status.video || f.options.audioFullScreen) { - f._setOption("fullScreen", !f.options.fullScreen); - } - } - }, - muted: { - key: 77, // m - fn: function(f) { - f._muted(!f.options.muted); - } - }, - volumeUp: { - key: 38, // UP Arrow - fn: function(f) { - f.volume(f.options.volume + 0.1); - } - }, - volumeDown: { - key: 40, // DOWN Arrow - fn: function(f) { - f.volume(f.options.volume - 0.1); - } - }, - loop: { - key: 76, // l - fn: function(f) { - f._loop(!f.options.loop); - } - }, - seekForward: { - key: 39, // Right arrow - fn: function(f) { - f.playHead((f.status.currentPercentRelative + 5)); - } - }, - seekBackward: { - key: 37, // Left arrow - fn: function(f) { - f.playHead((f.status.currentPercentRelative - 5)); - } - }, + }, 300); +} + + +const setFullscreenSettings = (parentElm, video) => { + parentElm.requestFullscreen(); + video.classList.remove("viewer"); + video.style.cursor = 'none'; + video.style.height = 'inherit'; + video.style.width = 'inherit'; + + if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ + video.style.transform = 'rotate(90deg)'; + } +} + +const unsetFullscreenSettings = (video) => { + video.classList.add("viewer"); + video.style.transform = ''; + video.style.cursor = ''; + video.style.height = ''; + video.style.width = ''; +} + +const toggleFullscreen = (video) => { + let containerElm = document.getElementById("video-container"); + let parentElm = video.parentElement; + + if (video.requestFullscreen || video.webkitRequestFullscreen || video.msRequestFullscreen) { + setFullscreenSettings(parentElm, video); } + if (fullScreenState == 2) { + if (document.exitFullscreen) { + document.exitFullscreen(); + unsetFullscreenSettings(video); + } else if (document.webkitExitFullscreen) { /* Safari */ + document.webkitExitFullscreen(); + unsetFullscreenSettings(video); + } else if (document.msExitFullscreen) { /* IE11 */ + document.msExitFullscreen(); + unsetFullscreenSettings(video); + } + + fullScreenState = 0; + } + + fullScreenState += 1; } -if(/Android/i.test(navigator.userAgent)) { - console.log("Using patched player for Android."); - player = $("#video").jPlayerAndroidFix(jplayerOptions); -} else { - console.log("Using regular player."); - player = $("#video").jPlayer(jplayerOptions); - +const toggleVolumeControl = () => { + const volume = document.getElementById("volume-slider"); + volume.style.display = (volume.style.display === "none") ? "" : "none"; } +const togglePlaylistMode = (elm) => { + playListMode = elm.checked; +} const previousMedia = () => { const current_title = document.getElementById('selectedFile').innerText; @@ -128,70 +111,150 @@ const nextMedia = () => { } } -const togglePlaylistMode = (elm) => { - playListMode = elm.checked; - document.getElementsByClassName("jp-repeat")[0].click(); -} - const loadMediaToPlayer = (title = "", video_path = "") => { - const modal = new bootstrap.Modal(document.getElementById('file-view-modal'), { keyboard: false }); - - if(/Android/i.test(navigator.userAgent)) { - player.setMedia(video_path).play() - } else { - player.jPlayer("setMedia", { - webmv: video_path, - m4v: video_path, - wav: video_path, - ogv: video_path, - rtmp: video_path, - m3u8: video_path, - webma: video_path, - mp3: video_path, - m4a: video_path, - oga: video_path, - fla: video_path, - flv: video_path, - title: title, - poster: "static/imgs/icons/loading.gif" - }).jPlayer("play"); - } - + const modal = new bootstrap.Modal(document.getElementById('file-view-modal'), { keyboard: false }); + const player = document.getElementById("video"); + player.src = video_path; modal.show(); } -const doPlayOrFullscreen = (node) => { - if (node.nodeName === "VIDEO") { - if(!shouldPlay) { - shouldPlay = setTimeout( function() { - shouldPlay = null; - document.getElementsByClassName("jp-play")[0].click(); - }, clicktapwait); - } else { - clearTimeout(shouldPlay); // Stop single tap callback - shouldPlay = null; - document.getElementsByClassName("jp-full-screen")[0].click(); + + + +$("#video").on("loadedmetadata", function(eve){ + const video = eve.target; + let videoDuration = document.getElementById("videoDuration"); + videoDuration.innerText = getTimeFormatted(video.duration); +}); + + +$("#video").on("keydown", function(eve) { + event.preventDefault(); + const key = eve.keyCode; + const video = eve.target; + + if (key === 37) { // Left key for back tracking 5 sec + video.currentTime -= 5; + } else if (key === 39) { // Right key for fast forward 5 sec + video.currentTime += 5; + } else if (key === 38) { // Up key for volume up + if (video.volume <= 1.0) { + video.volume += 0.05; + } + } else if (key === 40) { // Down key for volume down + if (video.volume >= 0.0) { + video.volume -= 0.05; } } -} - - - -player.on("click", function(eve){ - const node = eve.target; - doPlayOrFullscreen(node); }); -player.on("touched", function(eve){ - const node = eve.target; - doPlayOrFullscreen(node); + +$("#video").on("keyup", function(eve) { + const key = eve.keyCode; + const video = eve.target; + + if (key === 32 || key === 80) { // Spacebar for pausing + togglePlay(video); + } else if (key === 70) { // f key for toggling full screen + toggleFullscreen(video); + } else if (key === 76) { // l key for toggling loop + if (myVideo.loop) { + myVideo.loop = false; + } else { + myVideo.loop = true; + } + } else if (key === 77) { // m key for toggling sound + if (video.muted) { + video.muted = false; + } else { + video.muted = true; + } + } }); + +$("#video").on("click", function(eve){ + const video = eve.target; + + if(!shouldPlay) { + shouldPlay = setTimeout( function() { + shouldPlay = null; + togglePlay(video); + }, clicktapwait); + } else { + clearTimeout(shouldPlay); // Stop single tap callback + shouldPlay = null; + toggleFullscreen(video); + } + eve.preventDefault(); +}); + +$("#video").on("touchend", function(eve){ + const video = eve.target; + + if(!shouldPlay) { + shouldPlay = setTimeout( function() { + shouldPlay = null; + togglePlay(video); + }, clicktapwait); + } else { + clearTimeout(shouldPlay); // Stop single tap callback + shouldPlay = null; + toggleFullscreen(video); + } + eve.preventDefault(); +}); + +$( "#video").bind( "timeupdate", async function(eve) { + let videoDuration = document.getElementById("videoCurrentTime"); + const video = eve.target; + const seekto = document.getElementById("seek-slider"); + const vt = video.currentTime * (100 / video.duration); + + seekto.value = vt; + videoDuration.innerText = getTimeFormatted(video.currentTime); +}); + +$( "#video").bind( "stalled", async function(eve) { + console.log("Stalled load..."); +}); + +$( "#seek-slider").bind( "change", async function(eve) { + const slider = eve.target; + let video = document.getElementById("video"); + let seekto = video.duration * (slider.value / 100); + video.currentTime = seekto; +}); + +$( "#volume-slider").bind( "change", async function(eve) { + const slider = eve.target; + let video = document.getElementById("video"); + let volumeto = slider.value; + video.volume = volumeto; +}); + + +$( "#video").bind( "ended", async function(eve) { + if (!playListMode) { + const video = eve.target; + const seekto = document.getElementById("seek-slider"); + const vt = video.currentTime * (100 / video.duration); + + seekto.value = 0; + videoDuration.innerText = getTimeFormatted(video.currentTime); + video.play(); + } else { + nextMedia(); + } +}); + + $( "#previousVideoInPlaylist").bind( "click", async function(eve) { previousMedia(); }); + $( "#nextVideoInPlaylist").bind( "click", async function(eve) { nextMedia(); }); diff --git a/src/core/templates/layout.html b/src/core/templates/layout.html index 4a04a3b..7d86ea5 100644 --- a/src/core/templates/layout.html +++ b/src/core/templates/layout.html @@ -23,10 +23,6 @@ - - - - @@ -109,18 +105,6 @@ - - - - - - - - - - - - {% block body_scripts_additional %} {% endblock body_scripts_additional%} diff --git a/src/core/templates/modals/file-modal.html b/src/core/templates/modals/file-modal.html index 45c055a..0c000da 100644 --- a/src/core/templates/modals/file-modal.html +++ b/src/core/templates/modals/file-modal.html @@ -16,50 +16,13 @@

- +