music-assistant-server

1021.2 KBJS
libflac.js
1021.2 KB34,569 lines • javascript
1
2
3// The Module object: Our interface to the outside world. We import
4// and export values on it. There are various ways Module can be used:
5// 1. Not defined. We create it here
6// 2. A function parameter, function(Module) { ..generated code.. }
7// 3. pre-run appended it, var Module = {}; ..generated code..
8// 4. External script tag defines var Module.
9// We need to check if Module already exists (e.g. case 3 above).
10// Substitution will be replaced with actual code on later stage of the build,
11// this way Closure Compiler will not mangle it (e.g. case 4. above).
12// Note that if you want to run closure, and also to use Module
13// after the generated code, you will need to define   var Module = {};
14// before the code. Then that object will be used in the code, and you
15// can continue to use Module afterwards as well.
16var Module = typeof Module !== 'undefined' ? Module : {};
17
18
19
20// --pre-jses are emitted after the Module integration code, so that they can
21// refer to Module (if they choose; they can also define Module)
22// libflac.js - port of libflac to JavaScript using emscripten
23
24
25(function (root, factory) {
26
27	if (typeof define === 'function' && define.amd) {
28		// AMD. Register as an anonymous module.
29		define(['module', 'require'], factory.bind(null, root));
30	} else if (typeof module === 'object' && module.exports) {
31		// Node. Does not work with strict CommonJS, but
32		// only CommonJS-like environments that support module.exports,
33		// like Node.
34
35		// use process.env (if available) for reading Flac environment settings:
36		var env = typeof process !== 'undefined' && process && process.env? process.env : root;
37		factory(env, module, module.require);
38	} else {
39		// Browser globals
40		root.Flac = factory(root);
41	}
42
43}(typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : this, function (global, expLib, require) {
44'use strict';
45
46var Module = Module || {};
47var _flac_ready = false;
48//in case resources are loaded asynchronously (e.g. *.mem file for minified version): setup "ready" handling
49Module["onRuntimeInitialized"] = function(){
50	_flac_ready = true;
51	if(!_exported){
52		//if _exported is not yet set (may happen, in case initialization was strictly synchronously),
53		// do "pause" until sync initialization has run through
54		setTimeout(function(){do_fire_event('ready', [{type: 'ready', target: _exported}], true);}, 0);
55	} else {
56		do_fire_event('ready', [{type: 'ready', target: _exported}], true);
57	}
58};
59
60if(global && global.FLAC_SCRIPT_LOCATION){
61
62	Module["locateFile"] = function(fileName){
63		var path = global.FLAC_SCRIPT_LOCATION || '';
64		if(path[fileName]){
65			return path[fileName];
66		}
67		path += path && !/\/$/.test(path)? '/' : '';
68		return path + fileName;
69	};
70
71	//NOTE will be overwritten if emscripten has env specific implementation for this
72	var readBinary = function(filePath){
73
74		//for Node: use default implementation (copied from generated code):
75		if(ENVIRONMENT_IS_NODE){
76			var ret = read_(filePath, true);
77			if (!ret.buffer) {
78				ret = new Uint8Array(ret);
79			}
80			assert(ret.buffer);
81			return ret;
82		}
83
84		//otherwise: try "fallback" to AJAX
85		return new Promise(function(resolve, reject){
86			var xhr = new XMLHttpRequest();
87			xhr.responseType = "arraybuffer";
88			xhr.addEventListener("load", function(evt){
89				resolve(xhr.response);
90			});
91			xhr.addEventListener("error", function(err){
92				reject(err);
93			});
94			xhr.open("GET", filePath);
95			xhr.send();
96		});
97	};
98}
99
100//fallback for fetch && support file://-protocol: try read as binary if fetch fails
101if(global && typeof global.fetch === 'function'){
102	var _fetch = global.fetch;
103	global.fetch = function(url){
104		return _fetch.apply(null, arguments).catch(function(err){
105			try{
106				var result = readBinary(url);
107				if(result && result.catch){
108					result.catch(function(_err){throw err});
109				}
110				return result;
111			} catch(_err){
112				throw err;
113			}
114		});
115	};
116}
117
118
119
120// Sometimes an existing Module object exists with properties
121// meant to overwrite the default module functionality. Here
122// we collect those properties and reapply _after_ we configure
123// the current environment's defaults to avoid having to be so
124// defensive during initialization.
125var moduleOverrides = {};
126var key;
127for (key in Module) {
128  if (Module.hasOwnProperty(key)) {
129    moduleOverrides[key] = Module[key];
130  }
131}
132
133var arguments_ = [];
134var thisProgram = './this.program';
135var quit_ = function(status, toThrow) {
136  throw toThrow;
137};
138
139// Determine the runtime environment we are in. You can customize this by
140// setting the ENVIRONMENT setting at compile time (see settings.js).
141
142var ENVIRONMENT_IS_WEB = false;
143var ENVIRONMENT_IS_WORKER = false;
144var ENVIRONMENT_IS_NODE = false;
145var ENVIRONMENT_IS_SHELL = false;
146ENVIRONMENT_IS_WEB = typeof window === 'object';
147ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
148// N.b. Electron.js environment is simultaneously a NODE-environment, but
149// also a web environment.
150ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string';
151ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
152
153
154
155
156// `/` should be present at the end if `scriptDirectory` is not empty
157var scriptDirectory = '';
158function locateFile(path) {
159  if (Module['locateFile']) {
160    return Module['locateFile'](path, scriptDirectory);
161  }
162  return scriptDirectory + path;
163}
164
165// Hooks that are implemented differently in different runtime environments.
166var read_,
167    readAsync,
168    readBinary,
169    setWindowTitle;
170
171var nodeFS;
172var nodePath;
173
174if (ENVIRONMENT_IS_NODE) {
175  if (ENVIRONMENT_IS_WORKER) {
176    scriptDirectory = require('path').dirname(scriptDirectory) + '/';
177  } else {
178    scriptDirectory = __dirname + '/';
179  }
180
181
182
183
184  read_ = function shell_read(filename, binary) {
185    var ret = tryParseAsDataURI(filename);
186    if (ret) {
187      return binary ? ret : ret.toString();
188    }
189    if (!nodeFS) nodeFS = require('fs');
190    if (!nodePath) nodePath = require('path');
191    filename = nodePath['normalize'](filename);
192    return nodeFS['readFileSync'](filename, binary ? null : 'utf8');
193  };
194
195  readBinary = function readBinary(filename) {
196    var ret = read_(filename, true);
197    if (!ret.buffer) {
198      ret = new Uint8Array(ret);
199    }
200    assert(ret.buffer);
201    return ret;
202  };
203
204
205
206
207  if (process['argv'].length > 1) {
208    thisProgram = process['argv'][1].replace(/\\/g, '/');
209  }
210
211  arguments_ = process['argv'].slice(2);
212
213  if (typeof module !== 'undefined') {
214    module['exports'] = Module;
215  }
216
217
218
219  quit_ = function(status) {
220    process['exit'](status);
221  };
222
223  Module['inspect'] = function () { return '[Emscripten Module object]'; };
224
225
226
227} else
228if (ENVIRONMENT_IS_SHELL) {
229
230
231  if (typeof read != 'undefined') {
232    read_ = function shell_read(f) {
233      var data = tryParseAsDataURI(f);
234      if (data) {
235        return intArrayToString(data);
236      }
237      return read(f);
238    };
239  }
240
241  readBinary = function readBinary(f) {
242    var data;
243    data = tryParseAsDataURI(f);
244    if (data) {
245      return data;
246    }
247    if (typeof readbuffer === 'function') {
248      return new Uint8Array(readbuffer(f));
249    }
250    data = read(f, 'binary');
251    assert(typeof data === 'object');
252    return data;
253  };
254
255  if (typeof scriptArgs != 'undefined') {
256    arguments_ = scriptArgs;
257  } else if (typeof arguments != 'undefined') {
258    arguments_ = arguments;
259  }
260
261  if (typeof quit === 'function') {
262    quit_ = function(status) {
263      quit(status);
264    };
265  }
266
267  if (typeof print !== 'undefined') {
268    // Prefer to use print/printErr where they exist, as they usually work better.
269    if (typeof console === 'undefined') console = /** @type{!Console} */({});
270    console.log = /** @type{!function(this:Console, ...*): undefined} */ (print);
271    console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr !== 'undefined' ? printErr : print);
272  }
273
274
275} else
276
277// Note that this includes Node.js workers when relevant (pthreads is enabled).
278// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and
279// ENVIRONMENT_IS_NODE.
280if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
281  if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled
282    scriptDirectory = self.location.href;
283  } else if (document.currentScript) { // web
284    scriptDirectory = document.currentScript.src;
285  }
286  // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them.
287  // otherwise, slice off the final part of the url to find the script directory.
288  // if scriptDirectory does not contain a slash, lastIndexOf will return -1,
289  // and scriptDirectory will correctly be replaced with an empty string.
290  if (scriptDirectory.indexOf('blob:') !== 0) {
291    scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf('/')+1);
292  } else {
293    scriptDirectory = '';
294  }
295
296
297  // Differentiate the Web Worker from the Node Worker case, as reading must
298  // be done differently.
299  {
300
301
302
303
304  read_ = function shell_read(url) {
305    try {
306      var xhr = new XMLHttpRequest();
307      xhr.open('GET', url, false);
308      xhr.send(null);
309      return xhr.responseText;
310    } catch (err) {
311      var data = tryParseAsDataURI(url);
312      if (data) {
313        return intArrayToString(data);
314      }
315      throw err;
316    }
317  };
318
319  if (ENVIRONMENT_IS_WORKER) {
320    readBinary = function readBinary(url) {
321      try {
322        var xhr = new XMLHttpRequest();
323        xhr.open('GET', url, false);
324        xhr.responseType = 'arraybuffer';
325        xhr.send(null);
326        return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response));
327      } catch (err) {
328        var data = tryParseAsDataURI(url);
329        if (data) {
330          return data;
331        }
332        throw err;
333      }
334    };
335  }
336
337  readAsync = function readAsync(url, onload, onerror) {
338    var xhr = new XMLHttpRequest();
339    xhr.open('GET', url, true);
340    xhr.responseType = 'arraybuffer';
341    xhr.onload = function xhr_onload() {
342      if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0
343        onload(xhr.response);
344        return;
345      }
346      var data = tryParseAsDataURI(url);
347      if (data) {
348        onload(data.buffer);
349        return;
350      }
351      onerror();
352    };
353    xhr.onerror = onerror;
354    xhr.send(null);
355  };
356
357
358
359
360  }
361
362  setWindowTitle = function(title) { document.title = title };
363} else
364{
365}
366
367
368// Set up the out() and err() hooks, which are how we can print to stdout or
369// stderr, respectively.
370var out = Module['print'] || console.log.bind(console);
371var err = Module['printErr'] || console.warn.bind(console);
372
373// Merge back in the overrides
374for (key in moduleOverrides) {
375  if (moduleOverrides.hasOwnProperty(key)) {
376    Module[key] = moduleOverrides[key];
377  }
378}
379// Free the object hierarchy contained in the overrides, this lets the GC
380// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array.
381moduleOverrides = null;
382
383// Emit code to handle expected values on the Module object. This applies Module.x
384// to the proper local x. This has two benefits: first, we only emit it if it is
385// expected to arrive, and second, by using a local everywhere else that can be
386// minified.
387if (Module['arguments']) arguments_ = Module['arguments'];
388if (Module['thisProgram']) thisProgram = Module['thisProgram'];
389if (Module['quit']) quit_ = Module['quit'];
390
391// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message
392
393
394
395
396
397// {{PREAMBLE_ADDITIONS}}
398
399var STACK_ALIGN = 16;
400
401function dynamicAlloc(size) {
402  var ret = HEAP32[DYNAMICTOP_PTR>>2];
403  var end = (ret + size + 15) & -16;
404  HEAP32[DYNAMICTOP_PTR>>2] = end;
405  return ret;
406}
407
408function alignMemory(size, factor) {
409  if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default
410  return Math.ceil(size / factor) * factor;
411}
412
413function getNativeTypeSize(type) {
414  switch (type) {
415    case 'i1': case 'i8': return 1;
416    case 'i16': return 2;
417    case 'i32': return 4;
418    case 'i64': return 8;
419    case 'float': return 4;
420    case 'double': return 8;
421    default: {
422      if (type[type.length-1] === '*') {
423        return 4; // A pointer
424      } else if (type[0] === 'i') {
425        var bits = Number(type.substr(1));
426        assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type);
427        return bits / 8;
428      } else {
429        return 0;
430      }
431    }
432  }
433}
434
435function warnOnce(text) {
436  if (!warnOnce.shown) warnOnce.shown = {};
437  if (!warnOnce.shown[text]) {
438    warnOnce.shown[text] = 1;
439    err(text);
440  }
441}
442
443
444
445
446
447
448
449
450// Wraps a JS function as a wasm function with a given signature.
451function convertJsFunctionToWasm(func, sig) {
452  return func;
453}
454
455var freeTableIndexes = [];
456
457// Weak map of functions in the table to their indexes, created on first use.
458var functionsInTableMap;
459
460// Add a wasm function to the table.
461function addFunctionWasm(func, sig) {
462  var table = wasmTable;
463
464  // Check if the function is already in the table, to ensure each function
465  // gets a unique index. First, create the map if this is the first use.
466  if (!functionsInTableMap) {
467    functionsInTableMap = new WeakMap();
468    for (var i = 0; i < table.length; i++) {
469      var item = table.get(i);
470      // Ignore null values.
471      if (item) {
472        functionsInTableMap.set(item, i);
473      }
474    }
475  }
476  if (functionsInTableMap.has(func)) {
477    return functionsInTableMap.get(func);
478  }
479
480  // It's not in the table, add it now.
481
482
483  var ret;
484  // Reuse a free index if there is one, otherwise grow.
485  if (freeTableIndexes.length) {
486    ret = freeTableIndexes.pop();
487  } else {
488    ret = table.length;
489    // Grow the table
490    try {
491      table.grow(1);
492    } catch (err) {
493      if (!(err instanceof RangeError)) {
494        throw err;
495      }
496      throw 'Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.';
497    }
498  }
499
500  // Set the new value.
501  try {
502    // Attempting to call this with JS function will cause of table.set() to fail
503    table.set(ret, func);
504  } catch (err) {
505    if (!(err instanceof TypeError)) {
506      throw err;
507    }
508    var wrapped = convertJsFunctionToWasm(func, sig);
509    table.set(ret, wrapped);
510  }
511
512  functionsInTableMap.set(func, ret);
513
514  return ret;
515}
516
517function removeFunctionWasm(index) {
518  functionsInTableMap.delete(wasmTable.get(index));
519  freeTableIndexes.push(index);
520}
521
522// 'sig' parameter is required for the llvm backend but only when func is not
523// already a WebAssembly function.
524function addFunction(func, sig) {
525
526  return addFunctionWasm(func, sig);
527}
528
529function removeFunction(index) {
530  removeFunctionWasm(index);
531}
532
533
534
535var funcWrappers = {};
536
537function getFuncWrapper(func, sig) {
538  if (!func) return; // on null pointer, return undefined
539  assert(sig);
540  if (!funcWrappers[sig]) {
541    funcWrappers[sig] = {};
542  }
543  var sigCache = funcWrappers[sig];
544  if (!sigCache[func]) {
545    // optimize away arguments usage in common cases
546    if (sig.length === 1) {
547      sigCache[func] = function dynCall_wrapper() {
548        return dynCall(sig, func);
549      };
550    } else if (sig.length === 2) {
551      sigCache[func] = function dynCall_wrapper(arg) {
552        return dynCall(sig, func, [arg]);
553      };
554    } else {
555      // general case
556      sigCache[func] = function dynCall_wrapper() {
557        return dynCall(sig, func, Array.prototype.slice.call(arguments));
558      };
559    }
560  }
561  return sigCache[func];
562}
563
564
565
566
567
568
569
570function makeBigInt(low, high, unsigned) {
571  return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0));
572}
573
574/** @param {Array=} args */
575function dynCall(sig, ptr, args) {
576  if (args && args.length) {
577    return Module['dynCall_' + sig].apply(null, [ptr].concat(args));
578  } else {
579    return Module['dynCall_' + sig].call(null, ptr);
580  }
581}
582
583var tempRet0 = 0;
584
585var setTempRet0 = function(value) {
586  tempRet0 = value;
587};
588
589var getTempRet0 = function() {
590  return tempRet0;
591};
592
593
594// The address globals begin at. Very low in memory, for code size and optimization opportunities.
595// Above 0 is static memory, starting with globals.
596// Then the stack.
597// Then 'dynamic' memory for sbrk.
598var GLOBAL_BASE = 1024;
599
600
601
602
603
604// === Preamble library stuff ===
605
606// Documentation for the public APIs defined in this file must be updated in:
607//    site/source/docs/api_reference/preamble.js.rst
608// A prebuilt local version of the documentation is available at:
609//    site/build/text/docs/api_reference/preamble.js.txt
610// You can also build docs locally as HTML or other formats in site/
611// An online HTML version (which may be of a different version of Emscripten)
612//    is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
613
614
615var wasmBinary;if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];
616var noExitRuntime;if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];
617
618
619
620
621// wasm2js.js - enough of a polyfill for the WebAssembly object so that we can load
622// wasm2js code that way.
623
624// Emit "var WebAssembly" if definitely using wasm2js. Otherwise, in MAYBE_WASM2JS
625// mode, we can't use a "var" since it would prevent normal wasm from working.
626/** @suppress{const} */
627var
628WebAssembly = {
629  // Note that we do not use closure quoting (this['buffer'], etc.) on these
630  // functions, as they are just meant for internal use. In other words, this is
631  // not a fully general polyfill.
632  Memory: function(opts) {
633    this.buffer = new ArrayBuffer(opts['initial'] * 65536);
634    this.grow = function(amount) {
635      var ret = __growWasmMemory(amount);
636      return ret;
637    };
638  },
639
640  // Table is not a normal constructor and instead returns the array object.
641  // That lets us use the length property automatically, which is simpler and
642  // smaller (but instanceof will not report that an instance of Table is an
643  // instance of this function).
644  Table: /** @constructor */ function(opts) {
645    var ret = new Array(opts['initial']);
646    ret.grow = function(by) {
647      if (ret.length >= 22 + 5) {
648        abort('Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH.')
649      }
650      ret.push(null);
651    };
652    ret.set = function(i, func) {
653      ret[i] = func;
654    };
655    ret.get = function(i) {
656      return ret[i];
657    };
658    return ret;
659  },
660
661  Module: function(binary) {
662    // TODO: use the binary and info somehow - right now the wasm2js output is embedded in
663    // the main JS
664  },
665
666  Instance: function(module, info) {
667    // TODO: use the module and info somehow - right now the wasm2js output is embedded in
668    // the main JS
669    // This will be replaced by the actual wasm2js code.
670    this.exports = (
671function instantiate(asmLibraryArg, wasmMemory, wasmTable) {
672
673
674  var scratchBuffer = new ArrayBuffer(8);
675  var i32ScratchView = new Int32Array(scratchBuffer);
676  var f32ScratchView = new Float32Array(scratchBuffer);
677  var f64ScratchView = new Float64Array(scratchBuffer);
678
679  function wasm2js_scratch_load_i32(index) {
680    return i32ScratchView[index];
681  }
682
683  function wasm2js_scratch_store_i32(index, value) {
684    i32ScratchView[index] = value;
685  }
686
687  function wasm2js_scratch_load_f64() {
688    return f64ScratchView[0];
689  }
690
691  function wasm2js_scratch_store_f64(value) {
692    f64ScratchView[0] = value;
693  }
694
695  function wasm2js_scratch_store_f32(value) {
696    f32ScratchView[0] = value;
697  }
698
699function asmFunc(global, env, buffer) {
700 var memory = env.memory;
701 var FUNCTION_TABLE = wasmTable;
702 var HEAP8 = new global.Int8Array(buffer);
703 var HEAP16 = new global.Int16Array(buffer);
704 var HEAP32 = new global.Int32Array(buffer);
705 var HEAPU8 = new global.Uint8Array(buffer);
706 var HEAPU16 = new global.Uint16Array(buffer);
707 var HEAPU32 = new global.Uint32Array(buffer);
708 var HEAPF32 = new global.Float32Array(buffer);
709 var HEAPF64 = new global.Float64Array(buffer);
710 var Math_imul = global.Math.imul;
711 var Math_fround = global.Math.fround;
712 var Math_abs = global.Math.abs;
713 var Math_clz32 = global.Math.clz32;
714 var Math_min = global.Math.min;
715 var Math_max = global.Math.max;
716 var Math_floor = global.Math.floor;
717 var Math_ceil = global.Math.ceil;
718 var Math_sqrt = global.Math.sqrt;
719 var abort = env.abort;
720 var nan = global.NaN;
721 var infinity = global.Infinity;
722 var emscripten_resize_heap = env.emscripten_resize_heap;
723 var emscripten_memcpy_big = env.emscripten_memcpy_big;
724 var __wasi_fd_close = env.fd_close;
725 var __wasi_fd_read = env.fd_read;
726 var round = env.round;
727 var __wasi_fd_write = env.fd_write;
728 var setTempRet0 = env.setTempRet0;
729 var legalimport$__wasi_fd_seek = env.fd_seek;
730 var global$0 = 5257216;
731 var global$1 = 14168;
732 var __wasm_intrinsics_temp_i64 = 0;
733 var __wasm_intrinsics_temp_i64$hi = 0;
734 var i64toi32_i32$HIGH_BITS = 0;
735 // EMSCRIPTEN_START_FUNCS
736;
737 function __wasm_call_ctors() {
738
739 }
740
741 function __errno_location() {
742  return 11584;
743 }
744
745 function sbrk($0) {
746  var $1 = 0, $2 = 0;
747  $1 = HEAP32[3544];
748  $2 = $0 + 3 & -4;
749  $0 = $1 + $2 | 0;
750  label$1 : {
751   if ($0 >>> 0 <= $1 >>> 0 ? ($2 | 0) >= 1 : 0) {
752    break label$1
753   }
754   if ($0 >>> 0 > __wasm_memory_size() << 16 >>> 0) {
755    if (!emscripten_resize_heap($0 | 0)) {
756     break label$1
757    }
758   }
759   HEAP32[3544] = $0;
760   return $1;
761  }
762  HEAP32[2896] = 48;
763  return -1;
764 }
765
766 function memset($0, $1) {
767  var $2 = 0, $3 = 0;
768  label$1 : {
769   if (!$1) {
770    break label$1
771   }
772   $2 = $0 + $1 | 0;
773   HEAP8[$2 + -1 | 0] = 0;
774   HEAP8[$0 | 0] = 0;
775   if ($1 >>> 0 < 3) {
776    break label$1
777   }
778   HEAP8[$2 + -2 | 0] = 0;
779   HEAP8[$0 + 1 | 0] = 0;
780   HEAP8[$2 + -3 | 0] = 0;
781   HEAP8[$0 + 2 | 0] = 0;
782   if ($1 >>> 0 < 7) {
783    break label$1
784   }
785   HEAP8[$2 + -4 | 0] = 0;
786   HEAP8[$0 + 3 | 0] = 0;
787   if ($1 >>> 0 < 9) {
788    break label$1
789   }
790   $3 = 0 - $0 & 3;
791   $2 = $3 + $0 | 0;
792   HEAP32[$2 >> 2] = 0;
793   $3 = $1 - $3 & -4;
794   $1 = $3 + $2 | 0;
795   HEAP32[$1 + -4 >> 2] = 0;
796   if ($3 >>> 0 < 9) {
797    break label$1
798   }
799   HEAP32[$2 + 8 >> 2] = 0;
800   HEAP32[$2 + 4 >> 2] = 0;
801   HEAP32[$1 + -8 >> 2] = 0;
802   HEAP32[$1 + -12 >> 2] = 0;
803   if ($3 >>> 0 < 25) {
804    break label$1
805   }
806   HEAP32[$2 + 24 >> 2] = 0;
807   HEAP32[$2 + 20 >> 2] = 0;
808   HEAP32[$2 + 16 >> 2] = 0;
809   HEAP32[$2 + 12 >> 2] = 0;
810   HEAP32[$1 + -16 >> 2] = 0;
811   HEAP32[$1 + -20 >> 2] = 0;
812   HEAP32[$1 + -24 >> 2] = 0;
813   HEAP32[$1 + -28 >> 2] = 0;
814   $1 = $3;
815   $3 = $2 & 4 | 24;
816   $1 = $1 - $3 | 0;
817   if ($1 >>> 0 < 32) {
818    break label$1
819   }
820   $2 = $2 + $3 | 0;
821   while (1) {
822    HEAP32[$2 + 24 >> 2] = 0;
823    HEAP32[$2 + 28 >> 2] = 0;
824    HEAP32[$2 + 16 >> 2] = 0;
825    HEAP32[$2 + 20 >> 2] = 0;
826    HEAP32[$2 + 8 >> 2] = 0;
827    HEAP32[$2 + 12 >> 2] = 0;
828    HEAP32[$2 >> 2] = 0;
829    HEAP32[$2 + 4 >> 2] = 0;
830    $2 = $2 + 32 | 0;
831    $1 = $1 + -32 | 0;
832    if ($1 >>> 0 > 31) {
833     continue
834    }
835    break;
836   };
837  }
838  return $0;
839 }
840
841 function memcpy($0, $1, $2) {
842  var $3 = 0, $4 = 0, $5 = 0;
843  if ($2 >>> 0 >= 512) {
844   emscripten_memcpy_big($0 | 0, $1 | 0, $2 | 0) | 0;
845   return $0;
846  }
847  $4 = $0 + $2 | 0;
848  label$2 : {
849   if (!(($0 ^ $1) & 3)) {
850    label$4 : {
851     if (($2 | 0) < 1) {
852      $2 = $0;
853      break label$4;
854     }
855     if (!($0 & 3)) {
856      $2 = $0;
857      break label$4;
858     }
859     $2 = $0;
860     while (1) {
861      HEAP8[$2 | 0] = HEAPU8[$1 | 0];
862      $1 = $1 + 1 | 0;
863      $2 = $2 + 1 | 0;
864      if ($2 >>> 0 >= $4 >>> 0) {
865       break label$4
866      }
867      if ($2 & 3) {
868       continue
869      }
870      break;
871     };
872    }
873    $3 = $4 & -4;
874    label$8 : {
875     if ($3 >>> 0 < 64) {
876      break label$8
877     }
878     $5 = $3 + -64 | 0;
879     if ($2 >>> 0 > $5 >>> 0) {
880      break label$8
881     }
882     while (1) {
883      HEAP32[$2 >> 2] = HEAP32[$1 >> 2];
884      HEAP32[$2 + 4 >> 2] = HEAP32[$1 + 4 >> 2];
885      HEAP32[$2 + 8 >> 2] = HEAP32[$1 + 8 >> 2];
886      HEAP32[$2 + 12 >> 2] = HEAP32[$1 + 12 >> 2];
887      HEAP32[$2 + 16 >> 2] = HEAP32[$1 + 16 >> 2];
888      HEAP32[$2 + 20 >> 2] = HEAP32[$1 + 20 >> 2];
889      HEAP32[$2 + 24 >> 2] = HEAP32[$1 + 24 >> 2];
890      HEAP32[$2 + 28 >> 2] = HEAP32[$1 + 28 >> 2];
891      HEAP32[$2 + 32 >> 2] = HEAP32[$1 + 32 >> 2];
892      HEAP32[$2 + 36 >> 2] = HEAP32[$1 + 36 >> 2];
893      HEAP32[$2 + 40 >> 2] = HEAP32[$1 + 40 >> 2];
894      HEAP32[$2 + 44 >> 2] = HEAP32[$1 + 44 >> 2];
895      HEAP32[$2 + 48 >> 2] = HEAP32[$1 + 48 >> 2];
896      HEAP32[$2 + 52 >> 2] = HEAP32[$1 + 52 >> 2];
897      HEAP32[$2 + 56 >> 2] = HEAP32[$1 + 56 >> 2];
898      HEAP32[$2 + 60 >> 2] = HEAP32[$1 + 60 >> 2];
899      $1 = $1 - -64 | 0;
900      $2 = $2 - -64 | 0;
901      if ($2 >>> 0 <= $5 >>> 0) {
902       continue
903      }
904      break;
905     };
906    }
907    if ($2 >>> 0 >= $3 >>> 0) {
908     break label$2
909    }
910    while (1) {
911     HEAP32[$2 >> 2] = HEAP32[$1 >> 2];
912     $1 = $1 + 4 | 0;
913     $2 = $2 + 4 | 0;
914     if ($2 >>> 0 < $3 >>> 0) {
915      continue
916     }
917     break;
918    };
919    break label$2;
920   }
921   if ($4 >>> 0 < 4) {
922    $2 = $0;
923    break label$2;
924   }
925   $3 = $4 + -4 | 0;
926   if ($3 >>> 0 < $0 >>> 0) {
927    $2 = $0;
928    break label$2;
929   }
930   $2 = $0;
931   while (1) {
932    HEAP8[$2 | 0] = HEAPU8[$1 | 0];
933    HEAP8[$2 + 1 | 0] = HEAPU8[$1 + 1 | 0];
934    HEAP8[$2 + 2 | 0] = HEAPU8[$1 + 2 | 0];
935    HEAP8[$2 + 3 | 0] = HEAPU8[$1 + 3 | 0];
936    $1 = $1 + 4 | 0;
937    $2 = $2 + 4 | 0;
938    if ($2 >>> 0 <= $3 >>> 0) {
939     continue
940    }
941    break;
942   };
943  }
944  if ($2 >>> 0 < $4 >>> 0) {
945   while (1) {
946    HEAP8[$2 | 0] = HEAPU8[$1 | 0];
947    $1 = $1 + 1 | 0;
948    $2 = $2 + 1 | 0;
949    if (($4 | 0) != ($2 | 0)) {
950     continue
951    }
952    break;
953   }
954  }
955  return $0;
956 }
957
958 function dlmalloc($0) {
959  $0 = $0 | 0;
960  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
961  $11 = global$0 - 16 | 0;
962  global$0 = $11;
963  label$1 : {
964   label$2 : {
965    label$3 : {
966     label$4 : {
967      label$5 : {
968       label$6 : {
969        label$7 : {
970         label$8 : {
971          label$9 : {
972           label$10 : {
973            label$11 : {
974             if ($0 >>> 0 <= 244) {
975              $6 = HEAP32[2897];
976              $5 = $0 >>> 0 < 11 ? 16 : $0 + 11 & -8;
977              $0 = $5 >>> 3 | 0;
978              $1 = $6 >>> $0 | 0;
979              if ($1 & 3) {
980               $2 = $0 + (($1 ^ -1) & 1) | 0;
981               $5 = $2 << 3;
982               $1 = HEAP32[$5 + 11636 >> 2];
983               $0 = $1 + 8 | 0;
984               $3 = HEAP32[$1 + 8 >> 2];
985               $5 = $5 + 11628 | 0;
986               label$14 : {
987                if (($3 | 0) == ($5 | 0)) {
988                 (wasm2js_i32$0 = 11588, wasm2js_i32$1 = __wasm_rotl_i32(-2, $2) & $6), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
989                 break label$14;
990                }
991                HEAP32[$3 + 12 >> 2] = $5;
992                HEAP32[$5 + 8 >> 2] = $3;
993               }
994               $2 = $2 << 3;
995               HEAP32[$1 + 4 >> 2] = $2 | 3;
996               $1 = $1 + $2 | 0;
997               HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1;
998               break label$1;
999              }
1000              $7 = HEAP32[2899];
1001              if ($5 >>> 0 <= $7 >>> 0) {
1002               break label$11
1003              }
1004              if ($1) {
1005               $2 = 2 << $0;
1006               $0 = (0 - $2 | $2) & $1 << $0;
1007               $0 = (0 - $0 & $0) + -1 | 0;
1008               $1 = $0 >>> 12 & 16;
1009               $2 = $1;
1010               $0 = $0 >>> $1 | 0;
1011               $1 = $0 >>> 5 & 8;
1012               $2 = $2 | $1;
1013               $0 = $0 >>> $1 | 0;
1014               $1 = $0 >>> 2 & 4;
1015               $2 = $2 | $1;
1016               $0 = $0 >>> $1 | 0;
1017               $1 = $0 >>> 1 & 2;
1018               $2 = $2 | $1;
1019               $0 = $0 >>> $1 | 0;
1020               $1 = $0 >>> 1 & 1;
1021               $2 = ($2 | $1) + ($0 >>> $1 | 0) | 0;
1022               $3 = $2 << 3;
1023               $1 = HEAP32[$3 + 11636 >> 2];
1024               $0 = HEAP32[$1 + 8 >> 2];
1025               $3 = $3 + 11628 | 0;
1026               label$17 : {
1027                if (($0 | 0) == ($3 | 0)) {
1028                 $6 = __wasm_rotl_i32(-2, $2) & $6;
1029                 HEAP32[2897] = $6;
1030                 break label$17;
1031                }
1032                HEAP32[$0 + 12 >> 2] = $3;
1033                HEAP32[$3 + 8 >> 2] = $0;
1034               }
1035               $0 = $1 + 8 | 0;
1036               HEAP32[$1 + 4 >> 2] = $5 | 3;
1037               $4 = $1 + $5 | 0;
1038               $2 = $2 << 3;
1039               $3 = $2 - $5 | 0;
1040               HEAP32[$4 + 4 >> 2] = $3 | 1;
1041               HEAP32[$1 + $2 >> 2] = $3;
1042               if ($7) {
1043                $5 = $7 >>> 3 | 0;
1044                $1 = ($5 << 3) + 11628 | 0;
1045                $2 = HEAP32[2902];
1046                $5 = 1 << $5;
1047                label$20 : {
1048                 if (!($5 & $6)) {
1049                  HEAP32[2897] = $5 | $6;
1050                  $5 = $1;
1051                  break label$20;
1052                 }
1053                 $5 = HEAP32[$1 + 8 >> 2];
1054                }
1055                HEAP32[$1 + 8 >> 2] = $2;
1056                HEAP32[$5 + 12 >> 2] = $2;
1057                HEAP32[$2 + 12 >> 2] = $1;
1058                HEAP32[$2 + 8 >> 2] = $5;
1059               }
1060               HEAP32[2902] = $4;
1061               HEAP32[2899] = $3;
1062               break label$1;
1063              }
1064              $10 = HEAP32[2898];
1065              if (!$10) {
1066               break label$11
1067              }
1068              $0 = ($10 & 0 - $10) + -1 | 0;
1069              $1 = $0 >>> 12 & 16;
1070              $2 = $1;
1071              $0 = $0 >>> $1 | 0;
1072              $1 = $0 >>> 5 & 8;
1073              $2 = $2 | $1;
1074              $0 = $0 >>> $1 | 0;
1075              $1 = $0 >>> 2 & 4;
1076              $2 = $2 | $1;
1077              $0 = $0 >>> $1 | 0;
1078              $1 = $0 >>> 1 & 2;
1079              $2 = $2 | $1;
1080              $0 = $0 >>> $1 | 0;
1081              $1 = $0 >>> 1 & 1;
1082              $1 = HEAP32[(($2 | $1) + ($0 >>> $1 | 0) << 2) + 11892 >> 2];
1083              $3 = (HEAP32[$1 + 4 >> 2] & -8) - $5 | 0;
1084              $2 = $1;
1085              while (1) {
1086               label$23 : {
1087                $0 = HEAP32[$2 + 16 >> 2];
1088                if (!$0) {
1089                 $0 = HEAP32[$2 + 20 >> 2];
1090                 if (!$0) {
1091                  break label$23
1092                 }
1093                }
1094                $4 = (HEAP32[$0 + 4 >> 2] & -8) - $5 | 0;
1095                $2 = $4 >>> 0 < $3 >>> 0;
1096                $3 = $2 ? $4 : $3;
1097                $1 = $2 ? $0 : $1;
1098                $2 = $0;
1099                continue;
1100               }
1101               break;
1102              };
1103              $9 = HEAP32[$1 + 24 >> 2];
1104              $4 = HEAP32[$1 + 12 >> 2];
1105              if (($4 | 0) != ($1 | 0)) {
1106               $0 = HEAP32[$1 + 8 >> 2];
1107               HEAP32[$0 + 12 >> 2] = $4;
1108               HEAP32[$4 + 8 >> 2] = $0;
1109               break label$2;
1110              }
1111              $2 = $1 + 20 | 0;
1112              $0 = HEAP32[$2 >> 2];
1113              if (!$0) {
1114               $0 = HEAP32[$1 + 16 >> 2];
1115               if (!$0) {
1116                break label$10
1117               }
1118               $2 = $1 + 16 | 0;
1119              }
1120              while (1) {
1121               $8 = $2;
1122               $4 = $0;
1123               $2 = $0 + 20 | 0;
1124               $0 = HEAP32[$2 >> 2];
1125               if ($0) {
1126                continue
1127               }
1128               $2 = $4 + 16 | 0;
1129               $0 = HEAP32[$4 + 16 >> 2];
1130               if ($0) {
1131                continue
1132               }
1133               break;
1134              };
1135              HEAP32[$8 >> 2] = 0;
1136              break label$2;
1137             }
1138             $5 = -1;
1139             if ($0 >>> 0 > 4294967231) {
1140              break label$11
1141             }
1142             $0 = $0 + 11 | 0;
1143             $5 = $0 & -8;
1144             $8 = HEAP32[2898];
1145             if (!$8) {
1146              break label$11
1147             }
1148             $2 = 0 - $5 | 0;
1149             $0 = $0 >>> 8 | 0;
1150             $7 = 0;
1151             label$29 : {
1152              if (!$0) {
1153               break label$29
1154              }
1155              $7 = 31;
1156              if ($5 >>> 0 > 16777215) {
1157               break label$29
1158              }
1159              $3 = $0 + 1048320 >>> 16 & 8;
1160              $1 = $0 << $3;
1161              $0 = $1 + 520192 >>> 16 & 4;
1162              $6 = $1 << $0;
1163              $1 = $6 + 245760 >>> 16 & 2;
1164              $0 = ($6 << $1 >>> 15 | 0) - ($1 | ($0 | $3)) | 0;
1165              $7 = ($0 << 1 | $5 >>> $0 + 21 & 1) + 28 | 0;
1166             }
1167             $3 = HEAP32[($7 << 2) + 11892 >> 2];
1168             label$30 : {
1169              label$31 : {
1170               label$32 : {
1171                if (!$3) {
1172                 $0 = 0;
1173                 break label$32;
1174                }
1175                $1 = $5 << (($7 | 0) == 31 ? 0 : 25 - ($7 >>> 1 | 0) | 0);
1176                $0 = 0;
1177                while (1) {
1178                 label$35 : {
1179                  $6 = (HEAP32[$3 + 4 >> 2] & -8) - $5 | 0;
1180                  if ($6 >>> 0 >= $2 >>> 0) {
1181                   break label$35
1182                  }
1183                  $4 = $3;
1184                  $2 = $6;
1185                  if ($2) {
1186                   break label$35
1187                  }
1188                  $2 = 0;
1189                  $0 = $3;
1190                  break label$31;
1191                 }
1192                 $6 = HEAP32[$3 + 20 >> 2];
1193                 $3 = HEAP32[(($1 >>> 29 & 4) + $3 | 0) + 16 >> 2];
1194                 $0 = $6 ? (($6 | 0) == ($3 | 0) ? $0 : $6) : $0;
1195                 $1 = $1 << (($3 | 0) != 0);
1196                 if ($3) {
1197                  continue
1198                 }
1199                 break;
1200                };
1201               }
1202               if (!($0 | $4)) {
1203                $0 = 2 << $7;
1204                $0 = (0 - $0 | $0) & $8;
1205                if (!$0) {
1206                 break label$11
1207                }
1208                $0 = ($0 & 0 - $0) + -1 | 0;
1209                $1 = $0 >>> 12 & 16;
1210                $3 = $1;
1211                $0 = $0 >>> $1 | 0;
1212                $1 = $0 >>> 5 & 8;
1213                $3 = $3 | $1;
1214                $0 = $0 >>> $1 | 0;
1215                $1 = $0 >>> 2 & 4;
1216                $3 = $3 | $1;
1217                $0 = $0 >>> $1 | 0;
1218                $1 = $0 >>> 1 & 2;
1219                $3 = $3 | $1;
1220                $0 = $0 >>> $1 | 0;
1221                $1 = $0 >>> 1 & 1;
1222                $0 = HEAP32[(($3 | $1) + ($0 >>> $1 | 0) << 2) + 11892 >> 2];
1223               }
1224               if (!$0) {
1225                break label$30
1226               }
1227              }
1228              while (1) {
1229               $3 = (HEAP32[$0 + 4 >> 2] & -8) - $5 | 0;
1230               $1 = $3 >>> 0 < $2 >>> 0;
1231               $2 = $1 ? $3 : $2;
1232               $4 = $1 ? $0 : $4;
1233               $1 = HEAP32[$0 + 16 >> 2];
1234               if ($1) {
1235                $0 = $1
1236               } else {
1237                $0 = HEAP32[$0 + 20 >> 2]
1238               }
1239               if ($0) {
1240                continue
1241               }
1242               break;
1243              };
1244             }
1245             if (!$4 | $2 >>> 0 >= HEAP32[2899] - $5 >>> 0) {
1246              break label$11
1247             }
1248             $7 = HEAP32[$4 + 24 >> 2];
1249             $1 = HEAP32[$4 + 12 >> 2];
1250             if (($4 | 0) != ($1 | 0)) {
1251              $0 = HEAP32[$4 + 8 >> 2];
1252              HEAP32[$0 + 12 >> 2] = $1;
1253              HEAP32[$1 + 8 >> 2] = $0;
1254              break label$3;
1255             }
1256             $3 = $4 + 20 | 0;
1257             $0 = HEAP32[$3 >> 2];
1258             if (!$0) {
1259              $0 = HEAP32[$4 + 16 >> 2];
1260              if (!$0) {
1261               break label$9
1262              }
1263              $3 = $4 + 16 | 0;
1264             }
1265             while (1) {
1266              $6 = $3;
1267              $1 = $0;
1268              $3 = $0 + 20 | 0;
1269              $0 = HEAP32[$3 >> 2];
1270              if ($0) {
1271               continue
1272              }
1273              $3 = $1 + 16 | 0;
1274              $0 = HEAP32[$1 + 16 >> 2];
1275              if ($0) {
1276               continue
1277              }
1278              break;
1279             };
1280             HEAP32[$6 >> 2] = 0;
1281             break label$3;
1282            }
1283            $1 = HEAP32[2899];
1284            if ($1 >>> 0 >= $5 >>> 0) {
1285             $0 = HEAP32[2902];
1286             $2 = $1 - $5 | 0;
1287             label$45 : {
1288              if ($2 >>> 0 >= 16) {
1289               HEAP32[2899] = $2;
1290               $3 = $0 + $5 | 0;
1291               HEAP32[2902] = $3;
1292               HEAP32[$3 + 4 >> 2] = $2 | 1;
1293               HEAP32[$0 + $1 >> 2] = $2;
1294               HEAP32[$0 + 4 >> 2] = $5 | 3;
1295               break label$45;
1296              }
1297              HEAP32[2902] = 0;
1298              HEAP32[2899] = 0;
1299              HEAP32[$0 + 4 >> 2] = $1 | 3;
1300              $1 = $0 + $1 | 0;
1301              HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1;
1302             }
1303             $0 = $0 + 8 | 0;
1304             break label$1;
1305            }
1306            $1 = HEAP32[2900];
1307            if ($1 >>> 0 > $5 >>> 0) {
1308             $1 = $1 - $5 | 0;
1309             HEAP32[2900] = $1;
1310             $0 = HEAP32[2903];
1311             $2 = $0 + $5 | 0;
1312             HEAP32[2903] = $2;
1313             HEAP32[$2 + 4 >> 2] = $1 | 1;
1314             HEAP32[$0 + 4 >> 2] = $5 | 3;
1315             $0 = $0 + 8 | 0;
1316             break label$1;
1317            }
1318            $0 = 0;
1319            $4 = $5 + 47 | 0;
1320            $3 = $4;
1321            if (HEAP32[3015]) {
1322             $2 = HEAP32[3017]
1323            } else {
1324             HEAP32[3018] = -1;
1325             HEAP32[3019] = -1;
1326             HEAP32[3016] = 4096;
1327             HEAP32[3017] = 4096;
1328             HEAP32[3015] = $11 + 12 & -16 ^ 1431655768;
1329             HEAP32[3020] = 0;
1330             HEAP32[3008] = 0;
1331             $2 = 4096;
1332            }
1333            $6 = $3 + $2 | 0;
1334            $8 = 0 - $2 | 0;
1335            $2 = $6 & $8;
1336            if ($2 >>> 0 <= $5 >>> 0) {
1337             break label$1
1338            }
1339            $3 = HEAP32[3007];
1340            if ($3) {
1341             $7 = HEAP32[3005];
1342             $9 = $7 + $2 | 0;
1343             if ($9 >>> 0 <= $7 >>> 0 | $9 >>> 0 > $3 >>> 0) {
1344              break label$1
1345             }
1346            }
1347            if (HEAPU8[12032] & 4) {
1348             break label$6
1349            }
1350            label$51 : {
1351             label$52 : {
1352              $3 = HEAP32[2903];
1353              if ($3) {
1354               $0 = 12036;
1355               while (1) {
1356                $7 = HEAP32[$0 >> 2];
1357                if ($7 + HEAP32[$0 + 4 >> 2] >>> 0 > $3 >>> 0 ? $7 >>> 0 <= $3 >>> 0 : 0) {
1358                 break label$52
1359                }
1360                $0 = HEAP32[$0 + 8 >> 2];
1361                if ($0) {
1362                 continue
1363                }
1364                break;
1365               };
1366              }
1367              $1 = sbrk(0);
1368              if (($1 | 0) == -1) {
1369               break label$7
1370              }
1371              $6 = $2;
1372              $0 = HEAP32[3016];
1373              $3 = $0 + -1 | 0;
1374              if ($3 & $1) {
1375               $6 = ($2 - $1 | 0) + ($1 + $3 & 0 - $0) | 0
1376              }
1377              if ($6 >>> 0 <= $5 >>> 0 | $6 >>> 0 > 2147483646) {
1378               break label$7
1379              }
1380              $0 = HEAP32[3007];
1381              if ($0) {
1382               $3 = HEAP32[3005];
1383               $8 = $3 + $6 | 0;
1384               if ($8 >>> 0 <= $3 >>> 0 | $8 >>> 0 > $0 >>> 0) {
1385                break label$7
1386               }
1387              }
1388              $0 = sbrk($6);
1389              if (($1 | 0) != ($0 | 0)) {
1390               break label$51
1391              }
1392              break label$5;
1393             }
1394             $6 = $8 & $6 - $1;
1395             if ($6 >>> 0 > 2147483646) {
1396              break label$7
1397             }
1398             $1 = sbrk($6);
1399             if (($1 | 0) == (HEAP32[$0 >> 2] + HEAP32[$0 + 4 >> 2] | 0)) {
1400              break label$8
1401             }
1402             $0 = $1;
1403            }
1404            if (!(($0 | 0) == -1 | $5 + 48 >>> 0 <= $6 >>> 0)) {
1405             $1 = HEAP32[3017];
1406             $1 = $1 + ($4 - $6 | 0) & 0 - $1;
1407             if ($1 >>> 0 > 2147483646) {
1408              $1 = $0;
1409              break label$5;
1410             }
1411             if ((sbrk($1) | 0) != -1) {
1412              $6 = $1 + $6 | 0;
1413              $1 = $0;
1414              break label$5;
1415             }
1416             sbrk(0 - $6 | 0);
1417             break label$7;
1418            }
1419            $1 = $0;
1420            if (($0 | 0) != -1) {
1421             break label$5
1422            }
1423            break label$7;
1424           }
1425           $4 = 0;
1426           break label$2;
1427          }
1428          $1 = 0;
1429          break label$3;
1430         }
1431         if (($1 | 0) != -1) {
1432          break label$5
1433         }
1434        }
1435        HEAP32[3008] = HEAP32[3008] | 4;
1436       }
1437       if ($2 >>> 0 > 2147483646) {
1438        break label$4
1439       }
1440       $1 = sbrk($2);
1441       $0 = sbrk(0);
1442       if ($1 >>> 0 >= $0 >>> 0 | ($1 | 0) == -1 | ($0 | 0) == -1) {
1443        break label$4
1444       }
1445       $6 = $0 - $1 | 0;
1446       if ($6 >>> 0 <= $5 + 40 >>> 0) {
1447        break label$4
1448       }
1449      }
1450      $0 = HEAP32[3005] + $6 | 0;
1451      HEAP32[3005] = $0;
1452      if ($0 >>> 0 > HEAPU32[3006]) {
1453       HEAP32[3006] = $0
1454      }
1455      label$62 : {
1456       label$63 : {
1457        label$64 : {
1458         $3 = HEAP32[2903];
1459         if ($3) {
1460          $0 = 12036;
1461          while (1) {
1462           $2 = HEAP32[$0 >> 2];
1463           $4 = HEAP32[$0 + 4 >> 2];
1464           if (($2 + $4 | 0) == ($1 | 0)) {
1465            break label$64
1466           }
1467           $0 = HEAP32[$0 + 8 >> 2];
1468           if ($0) {
1469            continue
1470           }
1471           break;
1472          };
1473          break label$63;
1474         }
1475         $0 = HEAP32[2901];
1476         if (!($1 >>> 0 >= $0 >>> 0 ? $0 : 0)) {
1477          HEAP32[2901] = $1
1478         }
1479         $0 = 0;
1480         HEAP32[3010] = $6;
1481         HEAP32[3009] = $1;
1482         HEAP32[2905] = -1;
1483         HEAP32[2906] = HEAP32[3015];
1484         HEAP32[3012] = 0;
1485         while (1) {
1486          $2 = $0 << 3;
1487          $3 = $2 + 11628 | 0;
1488          HEAP32[$2 + 11636 >> 2] = $3;
1489          HEAP32[$2 + 11640 >> 2] = $3;
1490          $0 = $0 + 1 | 0;
1491          if (($0 | 0) != 32) {
1492           continue
1493          }
1494          break;
1495         };
1496         $0 = $6 + -40 | 0;
1497         $2 = $1 + 8 & 7 ? -8 - $1 & 7 : 0;
1498         $3 = $0 - $2 | 0;
1499         HEAP32[2900] = $3;
1500         $2 = $1 + $2 | 0;
1501         HEAP32[2903] = $2;
1502         HEAP32[$2 + 4 >> 2] = $3 | 1;
1503         HEAP32[($0 + $1 | 0) + 4 >> 2] = 40;
1504         HEAP32[2904] = HEAP32[3019];
1505         break label$62;
1506        }
1507        if (HEAPU8[$0 + 12 | 0] & 8 | $1 >>> 0 <= $3 >>> 0 | $2 >>> 0 > $3 >>> 0) {
1508         break label$63
1509        }
1510        HEAP32[$0 + 4 >> 2] = $4 + $6;
1511        $0 = $3 + 8 & 7 ? -8 - $3 & 7 : 0;
1512        $1 = $0 + $3 | 0;
1513        HEAP32[2903] = $1;
1514        $2 = HEAP32[2900] + $6 | 0;
1515        $0 = $2 - $0 | 0;
1516        HEAP32[2900] = $0;
1517        HEAP32[$1 + 4 >> 2] = $0 | 1;
1518        HEAP32[($2 + $3 | 0) + 4 >> 2] = 40;
1519        HEAP32[2904] = HEAP32[3019];
1520        break label$62;
1521       }
1522       $0 = HEAP32[2901];
1523       if ($1 >>> 0 < $0 >>> 0) {
1524        HEAP32[2901] = $1;
1525        $0 = 0;
1526       }
1527       $2 = $1 + $6 | 0;
1528       $0 = 12036;
1529       label$70 : {
1530        label$71 : {
1531         label$72 : {
1532          label$73 : {
1533           label$74 : {
1534            label$75 : {
1535             while (1) {
1536              if (($2 | 0) != HEAP32[$0 >> 2]) {
1537               $0 = HEAP32[$0 + 8 >> 2];
1538               if ($0) {
1539                continue
1540               }
1541               break label$75;
1542              }
1543              break;
1544             };
1545             if (!(HEAPU8[$0 + 12 | 0] & 8)) {
1546              break label$74
1547             }
1548            }
1549            $0 = 12036;
1550            while (1) {
1551             $2 = HEAP32[$0 >> 2];
1552             if ($2 >>> 0 <= $3 >>> 0) {
1553              $4 = $2 + HEAP32[$0 + 4 >> 2] | 0;
1554              if ($4 >>> 0 > $3 >>> 0) {
1555               break label$73
1556              }
1557             }
1558             $0 = HEAP32[$0 + 8 >> 2];
1559             continue;
1560            };
1561           }
1562           HEAP32[$0 >> 2] = $1;
1563           HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + $6;
1564           $7 = ($1 + 8 & 7 ? -8 - $1 & 7 : 0) + $1 | 0;
1565           HEAP32[$7 + 4 >> 2] = $5 | 3;
1566           $1 = $2 + ($2 + 8 & 7 ? -8 - $2 & 7 : 0) | 0;
1567           $0 = ($1 - $7 | 0) - $5 | 0;
1568           $4 = $5 + $7 | 0;
1569           if (($1 | 0) == ($3 | 0)) {
1570            HEAP32[2903] = $4;
1571            $0 = HEAP32[2900] + $0 | 0;
1572            HEAP32[2900] = $0;
1573            HEAP32[$4 + 4 >> 2] = $0 | 1;
1574            break label$71;
1575           }
1576           if (HEAP32[2902] == ($1 | 0)) {
1577            HEAP32[2902] = $4;
1578            $0 = HEAP32[2899] + $0 | 0;
1579            HEAP32[2899] = $0;
1580            HEAP32[$4 + 4 >> 2] = $0 | 1;
1581            HEAP32[$0 + $4 >> 2] = $0;
1582            break label$71;
1583           }
1584           $2 = HEAP32[$1 + 4 >> 2];
1585           if (($2 & 3) == 1) {
1586            $9 = $2 & -8;
1587            label$83 : {
1588             if ($2 >>> 0 <= 255) {
1589              $3 = HEAP32[$1 + 8 >> 2];
1590              $5 = $2 >>> 3 | 0;
1591              $2 = HEAP32[$1 + 12 >> 2];
1592              if (($2 | 0) == ($3 | 0)) {
1593               (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $5)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
1594               break label$83;
1595              }
1596              HEAP32[$3 + 12 >> 2] = $2;
1597              HEAP32[$2 + 8 >> 2] = $3;
1598              break label$83;
1599             }
1600             $8 = HEAP32[$1 + 24 >> 2];
1601             $6 = HEAP32[$1 + 12 >> 2];
1602             label$86 : {
1603              if (($6 | 0) != ($1 | 0)) {
1604               $2 = HEAP32[$1 + 8 >> 2];
1605               HEAP32[$2 + 12 >> 2] = $6;
1606               HEAP32[$6 + 8 >> 2] = $2;
1607               break label$86;
1608              }
1609              label$89 : {
1610               $3 = $1 + 20 | 0;
1611               $5 = HEAP32[$3 >> 2];
1612               if ($5) {
1613                break label$89
1614               }
1615               $3 = $1 + 16 | 0;
1616               $5 = HEAP32[$3 >> 2];
1617               if ($5) {
1618                break label$89
1619               }
1620               $6 = 0;
1621               break label$86;
1622              }
1623              while (1) {
1624               $2 = $3;
1625               $6 = $5;
1626               $3 = $5 + 20 | 0;
1627               $5 = HEAP32[$3 >> 2];
1628               if ($5) {
1629                continue
1630               }
1631               $3 = $6 + 16 | 0;
1632               $5 = HEAP32[$6 + 16 >> 2];
1633               if ($5) {
1634                continue
1635               }
1636               break;
1637              };
1638              HEAP32[$2 >> 2] = 0;
1639             }
1640             if (!$8) {
1641              break label$83
1642             }
1643             $2 = HEAP32[$1 + 28 >> 2];
1644             $3 = ($2 << 2) + 11892 | 0;
1645             label$91 : {
1646              if (HEAP32[$3 >> 2] == ($1 | 0)) {
1647               HEAP32[$3 >> 2] = $6;
1648               if ($6) {
1649                break label$91
1650               }
1651               (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
1652               break label$83;
1653              }
1654              HEAP32[$8 + (HEAP32[$8 + 16 >> 2] == ($1 | 0) ? 16 : 20) >> 2] = $6;
1655              if (!$6) {
1656               break label$83
1657              }
1658             }
1659             HEAP32[$6 + 24 >> 2] = $8;
1660             $2 = HEAP32[$1 + 16 >> 2];
1661             if ($2) {
1662              HEAP32[$6 + 16 >> 2] = $2;
1663              HEAP32[$2 + 24 >> 2] = $6;
1664             }
1665             $2 = HEAP32[$1 + 20 >> 2];
1666             if (!$2) {
1667              break label$83
1668             }
1669             HEAP32[$6 + 20 >> 2] = $2;
1670             HEAP32[$2 + 24 >> 2] = $6;
1671            }
1672            $1 = $1 + $9 | 0;
1673            $0 = $0 + $9 | 0;
1674           }
1675           HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] & -2;
1676           HEAP32[$4 + 4 >> 2] = $0 | 1;
1677           HEAP32[$0 + $4 >> 2] = $0;
1678           if ($0 >>> 0 <= 255) {
1679            $1 = $0 >>> 3 | 0;
1680            $0 = ($1 << 3) + 11628 | 0;
1681            $2 = HEAP32[2897];
1682            $1 = 1 << $1;
1683            label$95 : {
1684             if (!($2 & $1)) {
1685              HEAP32[2897] = $1 | $2;
1686              $1 = $0;
1687              break label$95;
1688             }
1689             $1 = HEAP32[$0 + 8 >> 2];
1690            }
1691            HEAP32[$0 + 8 >> 2] = $4;
1692            HEAP32[$1 + 12 >> 2] = $4;
1693            HEAP32[$4 + 12 >> 2] = $0;
1694            HEAP32[$4 + 8 >> 2] = $1;
1695            break label$71;
1696           }
1697           $6 = $4;
1698           $1 = $0 >>> 8 | 0;
1699           $2 = 0;
1700           label$97 : {
1701            if (!$1) {
1702             break label$97
1703            }
1704            $2 = 31;
1705            if ($0 >>> 0 > 16777215) {
1706             break label$97
1707            }
1708            $3 = $1 + 1048320 >>> 16 & 8;
1709            $2 = $1 << $3;
1710            $1 = $2 + 520192 >>> 16 & 4;
1711            $5 = $2 << $1;
1712            $2 = $5 + 245760 >>> 16 & 2;
1713            $1 = ($5 << $2 >>> 15 | 0) - ($2 | ($1 | $3)) | 0;
1714            $2 = ($1 << 1 | $0 >>> $1 + 21 & 1) + 28 | 0;
1715           }
1716           $1 = $2;
1717           HEAP32[$6 + 28 >> 2] = $1;
1718           HEAP32[$4 + 16 >> 2] = 0;
1719           HEAP32[$4 + 20 >> 2] = 0;
1720           $2 = ($1 << 2) + 11892 | 0;
1721           $3 = HEAP32[2898];
1722           $5 = 1 << $1;
1723           label$98 : {
1724            if (!($3 & $5)) {
1725             HEAP32[2898] = $3 | $5;
1726             HEAP32[$2 >> 2] = $4;
1727             break label$98;
1728            }
1729            $3 = $0 << (($1 | 0) == 31 ? 0 : 25 - ($1 >>> 1 | 0) | 0);
1730            $1 = HEAP32[$2 >> 2];
1731            while (1) {
1732             $2 = $1;
1733             if ((HEAP32[$1 + 4 >> 2] & -8) == ($0 | 0)) {
1734              break label$72
1735             }
1736             $1 = $3 >>> 29 | 0;
1737             $3 = $3 << 1;
1738             $5 = ($2 + ($1 & 4) | 0) + 16 | 0;
1739             $1 = HEAP32[$5 >> 2];
1740             if ($1) {
1741              continue
1742             }
1743             break;
1744            };
1745            HEAP32[$5 >> 2] = $4;
1746           }
1747           HEAP32[$4 + 24 >> 2] = $2;
1748           HEAP32[$4 + 12 >> 2] = $4;
1749           HEAP32[$4 + 8 >> 2] = $4;
1750           break label$71;
1751          }
1752          $0 = $6 + -40 | 0;
1753          $2 = $1 + 8 & 7 ? -8 - $1 & 7 : 0;
1754          $8 = $0 - $2 | 0;
1755          HEAP32[2900] = $8;
1756          $2 = $1 + $2 | 0;
1757          HEAP32[2903] = $2;
1758          HEAP32[$2 + 4 >> 2] = $8 | 1;
1759          HEAP32[($0 + $1 | 0) + 4 >> 2] = 40;
1760          HEAP32[2904] = HEAP32[3019];
1761          $0 = ($4 + ($4 + -39 & 7 ? 39 - $4 & 7 : 0) | 0) + -47 | 0;
1762          $2 = $0 >>> 0 < $3 + 16 >>> 0 ? $3 : $0;
1763          HEAP32[$2 + 4 >> 2] = 27;
1764          $0 = HEAP32[3012];
1765          HEAP32[$2 + 16 >> 2] = HEAP32[3011];
1766          HEAP32[$2 + 20 >> 2] = $0;
1767          $0 = HEAP32[3010];
1768          HEAP32[$2 + 8 >> 2] = HEAP32[3009];
1769          HEAP32[$2 + 12 >> 2] = $0;
1770          HEAP32[3011] = $2 + 8;
1771          HEAP32[3010] = $6;
1772          HEAP32[3009] = $1;
1773          HEAP32[3012] = 0;
1774          $0 = $2 + 24 | 0;
1775          while (1) {
1776           HEAP32[$0 + 4 >> 2] = 7;
1777           $1 = $0 + 8 | 0;
1778           $0 = $0 + 4 | 0;
1779           if ($4 >>> 0 > $1 >>> 0) {
1780            continue
1781           }
1782           break;
1783          };
1784          if (($2 | 0) == ($3 | 0)) {
1785           break label$62
1786          }
1787          HEAP32[$2 + 4 >> 2] = HEAP32[$2 + 4 >> 2] & -2;
1788          $6 = $2 - $3 | 0;
1789          HEAP32[$3 + 4 >> 2] = $6 | 1;
1790          HEAP32[$2 >> 2] = $6;
1791          if ($6 >>> 0 <= 255) {
1792           $1 = $6 >>> 3 | 0;
1793           $0 = ($1 << 3) + 11628 | 0;
1794           $2 = HEAP32[2897];
1795           $1 = 1 << $1;
1796           label$103 : {
1797            if (!($2 & $1)) {
1798             HEAP32[2897] = $1 | $2;
1799             $1 = $0;
1800             break label$103;
1801            }
1802            $1 = HEAP32[$0 + 8 >> 2];
1803           }
1804           HEAP32[$0 + 8 >> 2] = $3;
1805           HEAP32[$1 + 12 >> 2] = $3;
1806           HEAP32[$3 + 12 >> 2] = $0;
1807           HEAP32[$3 + 8 >> 2] = $1;
1808           break label$62;
1809          }
1810          HEAP32[$3 + 16 >> 2] = 0;
1811          HEAP32[$3 + 20 >> 2] = 0;
1812          $7 = $3;
1813          $0 = $6 >>> 8 | 0;
1814          $1 = 0;
1815          label$105 : {
1816           if (!$0) {
1817            break label$105
1818           }
1819           $1 = 31;
1820           if ($6 >>> 0 > 16777215) {
1821            break label$105
1822           }
1823           $2 = $0 + 1048320 >>> 16 & 8;
1824           $1 = $0 << $2;
1825           $0 = $1 + 520192 >>> 16 & 4;
1826           $4 = $1 << $0;
1827           $1 = $4 + 245760 >>> 16 & 2;
1828           $0 = ($4 << $1 >>> 15 | 0) - ($1 | ($0 | $2)) | 0;
1829           $1 = ($0 << 1 | $6 >>> $0 + 21 & 1) + 28 | 0;
1830          }
1831          $0 = $1;
1832          HEAP32[$7 + 28 >> 2] = $0;
1833          $1 = ($0 << 2) + 11892 | 0;
1834          $2 = HEAP32[2898];
1835          $4 = 1 << $0;
1836          label$106 : {
1837           if (!($2 & $4)) {
1838            HEAP32[2898] = $2 | $4;
1839            HEAP32[$1 >> 2] = $3;
1840            HEAP32[$3 + 24 >> 2] = $1;
1841            break label$106;
1842           }
1843           $0 = $6 << (($0 | 0) == 31 ? 0 : 25 - ($0 >>> 1 | 0) | 0);
1844           $1 = HEAP32[$1 >> 2];
1845           while (1) {
1846            $2 = $1;
1847            if (($6 | 0) == (HEAP32[$1 + 4 >> 2] & -8)) {
1848             break label$70
1849            }
1850            $1 = $0 >>> 29 | 0;
1851            $0 = $0 << 1;
1852            $4 = ($2 + ($1 & 4) | 0) + 16 | 0;
1853            $1 = HEAP32[$4 >> 2];
1854            if ($1) {
1855             continue
1856            }
1857            break;
1858           };
1859           HEAP32[$4 >> 2] = $3;
1860           HEAP32[$3 + 24 >> 2] = $2;
1861          }
1862          HEAP32[$3 + 12 >> 2] = $3;
1863          HEAP32[$3 + 8 >> 2] = $3;
1864          break label$62;
1865         }
1866         $0 = HEAP32[$2 + 8 >> 2];
1867         HEAP32[$0 + 12 >> 2] = $4;
1868         HEAP32[$2 + 8 >> 2] = $4;
1869         HEAP32[$4 + 24 >> 2] = 0;
1870         HEAP32[$4 + 12 >> 2] = $2;
1871         HEAP32[$4 + 8 >> 2] = $0;
1872        }
1873        $0 = $7 + 8 | 0;
1874        break label$1;
1875       }
1876       $0 = HEAP32[$2 + 8 >> 2];
1877       HEAP32[$0 + 12 >> 2] = $3;
1878       HEAP32[$2 + 8 >> 2] = $3;
1879       HEAP32[$3 + 24 >> 2] = 0;
1880       HEAP32[$3 + 12 >> 2] = $2;
1881       HEAP32[$3 + 8 >> 2] = $0;
1882      }
1883      $0 = HEAP32[2900];
1884      if ($0 >>> 0 <= $5 >>> 0) {
1885       break label$4
1886      }
1887      $1 = $0 - $5 | 0;
1888      HEAP32[2900] = $1;
1889      $0 = HEAP32[2903];
1890      $2 = $0 + $5 | 0;
1891      HEAP32[2903] = $2;
1892      HEAP32[$2 + 4 >> 2] = $1 | 1;
1893      HEAP32[$0 + 4 >> 2] = $5 | 3;
1894      $0 = $0 + 8 | 0;
1895      break label$1;
1896     }
1897     HEAP32[2896] = 48;
1898     $0 = 0;
1899     break label$1;
1900    }
1901    label$109 : {
1902     if (!$7) {
1903      break label$109
1904     }
1905     $0 = HEAP32[$4 + 28 >> 2];
1906     $3 = ($0 << 2) + 11892 | 0;
1907     label$110 : {
1908      if (HEAP32[$3 >> 2] == ($4 | 0)) {
1909       HEAP32[$3 >> 2] = $1;
1910       if ($1) {
1911        break label$110
1912       }
1913       $8 = __wasm_rotl_i32(-2, $0) & $8;
1914       HEAP32[2898] = $8;
1915       break label$109;
1916      }
1917      HEAP32[$7 + (HEAP32[$7 + 16 >> 2] == ($4 | 0) ? 16 : 20) >> 2] = $1;
1918      if (!$1) {
1919       break label$109
1920      }
1921     }
1922     HEAP32[$1 + 24 >> 2] = $7;
1923     $0 = HEAP32[$4 + 16 >> 2];
1924     if ($0) {
1925      HEAP32[$1 + 16 >> 2] = $0;
1926      HEAP32[$0 + 24 >> 2] = $1;
1927     }
1928     $0 = HEAP32[$4 + 20 >> 2];
1929     if (!$0) {
1930      break label$109
1931     }
1932     HEAP32[$1 + 20 >> 2] = $0;
1933     HEAP32[$0 + 24 >> 2] = $1;
1934    }
1935    label$113 : {
1936     if ($2 >>> 0 <= 15) {
1937      $0 = $2 + $5 | 0;
1938      HEAP32[$4 + 4 >> 2] = $0 | 3;
1939      $0 = $0 + $4 | 0;
1940      HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] | 1;
1941      break label$113;
1942     }
1943     HEAP32[$4 + 4 >> 2] = $5 | 3;
1944     $1 = $4 + $5 | 0;
1945     HEAP32[$1 + 4 >> 2] = $2 | 1;
1946     HEAP32[$1 + $2 >> 2] = $2;
1947     if ($2 >>> 0 <= 255) {
1948      $2 = $2 >>> 3 | 0;
1949      $0 = ($2 << 3) + 11628 | 0;
1950      $3 = HEAP32[2897];
1951      $2 = 1 << $2;
1952      label$116 : {
1953       if (!($3 & $2)) {
1954        HEAP32[2897] = $2 | $3;
1955        $2 = $0;
1956        break label$116;
1957       }
1958       $2 = HEAP32[$0 + 8 >> 2];
1959      }
1960      HEAP32[$0 + 8 >> 2] = $1;
1961      HEAP32[$2 + 12 >> 2] = $1;
1962      HEAP32[$1 + 12 >> 2] = $0;
1963      HEAP32[$1 + 8 >> 2] = $2;
1964      break label$113;
1965     }
1966     $7 = $1;
1967     $0 = $2 >>> 8 | 0;
1968     $3 = 0;
1969     label$118 : {
1970      if (!$0) {
1971       break label$118
1972      }
1973      $3 = 31;
1974      if ($2 >>> 0 > 16777215) {
1975       break label$118
1976      }
1977      $5 = $0 + 1048320 >>> 16 & 8;
1978      $3 = $0 << $5;
1979      $0 = $3 + 520192 >>> 16 & 4;
1980      $6 = $3 << $0;
1981      $3 = $6 + 245760 >>> 16 & 2;
1982      $0 = ($6 << $3 >>> 15 | 0) - ($3 | ($0 | $5)) | 0;
1983      $3 = ($0 << 1 | $2 >>> $0 + 21 & 1) + 28 | 0;
1984     }
1985     $0 = $3;
1986     HEAP32[$7 + 28 >> 2] = $0;
1987     HEAP32[$1 + 16 >> 2] = 0;
1988     HEAP32[$1 + 20 >> 2] = 0;
1989     $3 = ($0 << 2) + 11892 | 0;
1990     label$119 : {
1991      $5 = 1 << $0;
1992      label$120 : {
1993       if (!($5 & $8)) {
1994        HEAP32[2898] = $5 | $8;
1995        HEAP32[$3 >> 2] = $1;
1996        break label$120;
1997       }
1998       $0 = $2 << (($0 | 0) == 31 ? 0 : 25 - ($0 >>> 1 | 0) | 0);
1999       $5 = HEAP32[$3 >> 2];
2000       while (1) {
2001        $3 = $5;
2002        if ((HEAP32[$3 + 4 >> 2] & -8) == ($2 | 0)) {
2003         break label$119
2004        }
2005        $5 = $0 >>> 29 | 0;
2006        $0 = $0 << 1;
2007        $6 = ($3 + ($5 & 4) | 0) + 16 | 0;
2008        $5 = HEAP32[$6 >> 2];
2009        if ($5) {
2010         continue
2011        }
2012        break;
2013       };
2014       HEAP32[$6 >> 2] = $1;
2015      }
2016      HEAP32[$1 + 24 >> 2] = $3;
2017      HEAP32[$1 + 12 >> 2] = $1;
2018      HEAP32[$1 + 8 >> 2] = $1;
2019      break label$113;
2020     }
2021     $0 = HEAP32[$3 + 8 >> 2];
2022     HEAP32[$0 + 12 >> 2] = $1;
2023     HEAP32[$3 + 8 >> 2] = $1;
2024     HEAP32[$1 + 24 >> 2] = 0;
2025     HEAP32[$1 + 12 >> 2] = $3;
2026     HEAP32[$1 + 8 >> 2] = $0;
2027    }
2028    $0 = $4 + 8 | 0;
2029    break label$1;
2030   }
2031   label$123 : {
2032    if (!$9) {
2033     break label$123
2034    }
2035    $0 = HEAP32[$1 + 28 >> 2];
2036    $2 = ($0 << 2) + 11892 | 0;
2037    label$124 : {
2038     if (HEAP32[$2 >> 2] == ($1 | 0)) {
2039      HEAP32[$2 >> 2] = $4;
2040      if ($4) {
2041       break label$124
2042      }
2043      (wasm2js_i32$0 = 11592, wasm2js_i32$1 = __wasm_rotl_i32(-2, $0) & $10), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2044      break label$123;
2045     }
2046     HEAP32[(HEAP32[$9 + 16 >> 2] == ($1 | 0) ? 16 : 20) + $9 >> 2] = $4;
2047     if (!$4) {
2048      break label$123
2049     }
2050    }
2051    HEAP32[$4 + 24 >> 2] = $9;
2052    $0 = HEAP32[$1 + 16 >> 2];
2053    if ($0) {
2054     HEAP32[$4 + 16 >> 2] = $0;
2055     HEAP32[$0 + 24 >> 2] = $4;
2056    }
2057    $0 = HEAP32[$1 + 20 >> 2];
2058    if (!$0) {
2059     break label$123
2060    }
2061    HEAP32[$4 + 20 >> 2] = $0;
2062    HEAP32[$0 + 24 >> 2] = $4;
2063   }
2064   label$127 : {
2065    if ($3 >>> 0 <= 15) {
2066     $0 = $3 + $5 | 0;
2067     HEAP32[$1 + 4 >> 2] = $0 | 3;
2068     $0 = $0 + $1 | 0;
2069     HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] | 1;
2070     break label$127;
2071    }
2072    HEAP32[$1 + 4 >> 2] = $5 | 3;
2073    $5 = $1 + $5 | 0;
2074    HEAP32[$5 + 4 >> 2] = $3 | 1;
2075    HEAP32[$3 + $5 >> 2] = $3;
2076    if ($7) {
2077     $4 = $7 >>> 3 | 0;
2078     $0 = ($4 << 3) + 11628 | 0;
2079     $2 = HEAP32[2902];
2080     $4 = 1 << $4;
2081     label$130 : {
2082      if (!($4 & $6)) {
2083       HEAP32[2897] = $4 | $6;
2084       $6 = $0;
2085       break label$130;
2086      }
2087      $6 = HEAP32[$0 + 8 >> 2];
2088     }
2089     HEAP32[$0 + 8 >> 2] = $2;
2090     HEAP32[$6 + 12 >> 2] = $2;
2091     HEAP32[$2 + 12 >> 2] = $0;
2092     HEAP32[$2 + 8 >> 2] = $6;
2093    }
2094    HEAP32[2902] = $5;
2095    HEAP32[2899] = $3;
2096   }
2097   $0 = $1 + 8 | 0;
2098  }
2099  global$0 = $11 + 16 | 0;
2100  return $0 | 0;
2101 }
2102
2103 function dlfree($0) {
2104  $0 = $0 | 0;
2105  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
2106  label$1 : {
2107   if (!$0) {
2108    break label$1
2109   }
2110   $3 = $0 + -8 | 0;
2111   $2 = HEAP32[$0 + -4 >> 2];
2112   $0 = $2 & -8;
2113   $5 = $3 + $0 | 0;
2114   label$2 : {
2115    if ($2 & 1) {
2116     break label$2
2117    }
2118    if (!($2 & 3)) {
2119     break label$1
2120    }
2121    $2 = HEAP32[$3 >> 2];
2122    $3 = $3 - $2 | 0;
2123    if ($3 >>> 0 < HEAPU32[2901]) {
2124     break label$1
2125    }
2126    $0 = $0 + $2 | 0;
2127    if (HEAP32[2902] != ($3 | 0)) {
2128     if ($2 >>> 0 <= 255) {
2129      $4 = HEAP32[$3 + 8 >> 2];
2130      $2 = $2 >>> 3 | 0;
2131      $1 = HEAP32[$3 + 12 >> 2];
2132      if (($1 | 0) == ($4 | 0)) {
2133       (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2134       break label$2;
2135      }
2136      HEAP32[$4 + 12 >> 2] = $1;
2137      HEAP32[$1 + 8 >> 2] = $4;
2138      break label$2;
2139     }
2140     $7 = HEAP32[$3 + 24 >> 2];
2141     $2 = HEAP32[$3 + 12 >> 2];
2142     label$6 : {
2143      if (($2 | 0) != ($3 | 0)) {
2144       $1 = HEAP32[$3 + 8 >> 2];
2145       HEAP32[$1 + 12 >> 2] = $2;
2146       HEAP32[$2 + 8 >> 2] = $1;
2147       break label$6;
2148      }
2149      label$9 : {
2150       $4 = $3 + 20 | 0;
2151       $1 = HEAP32[$4 >> 2];
2152       if ($1) {
2153        break label$9
2154       }
2155       $4 = $3 + 16 | 0;
2156       $1 = HEAP32[$4 >> 2];
2157       if ($1) {
2158        break label$9
2159       }
2160       $2 = 0;
2161       break label$6;
2162      }
2163      while (1) {
2164       $6 = $4;
2165       $2 = $1;
2166       $4 = $2 + 20 | 0;
2167       $1 = HEAP32[$4 >> 2];
2168       if ($1) {
2169        continue
2170       }
2171       $4 = $2 + 16 | 0;
2172       $1 = HEAP32[$2 + 16 >> 2];
2173       if ($1) {
2174        continue
2175       }
2176       break;
2177      };
2178      HEAP32[$6 >> 2] = 0;
2179     }
2180     if (!$7) {
2181      break label$2
2182     }
2183     $4 = HEAP32[$3 + 28 >> 2];
2184     $1 = ($4 << 2) + 11892 | 0;
2185     label$11 : {
2186      if (HEAP32[$1 >> 2] == ($3 | 0)) {
2187       HEAP32[$1 >> 2] = $2;
2188       if ($2) {
2189        break label$11
2190       }
2191       (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2192       break label$2;
2193      }
2194      HEAP32[$7 + (HEAP32[$7 + 16 >> 2] == ($3 | 0) ? 16 : 20) >> 2] = $2;
2195      if (!$2) {
2196       break label$2
2197      }
2198     }
2199     HEAP32[$2 + 24 >> 2] = $7;
2200     $1 = HEAP32[$3 + 16 >> 2];
2201     if ($1) {
2202      HEAP32[$2 + 16 >> 2] = $1;
2203      HEAP32[$1 + 24 >> 2] = $2;
2204     }
2205     $1 = HEAP32[$3 + 20 >> 2];
2206     if (!$1) {
2207      break label$2
2208     }
2209     HEAP32[$2 + 20 >> 2] = $1;
2210     HEAP32[$1 + 24 >> 2] = $2;
2211     break label$2;
2212    }
2213    $2 = HEAP32[$5 + 4 >> 2];
2214    if (($2 & 3) != 3) {
2215     break label$2
2216    }
2217    HEAP32[2899] = $0;
2218    HEAP32[$5 + 4 >> 2] = $2 & -2;
2219    HEAP32[$3 + 4 >> 2] = $0 | 1;
2220    HEAP32[$0 + $3 >> 2] = $0;
2221    return;
2222   }
2223   if ($5 >>> 0 <= $3 >>> 0) {
2224    break label$1
2225   }
2226   $2 = HEAP32[$5 + 4 >> 2];
2227   if (!($2 & 1)) {
2228    break label$1
2229   }
2230   label$14 : {
2231    if (!($2 & 2)) {
2232     if (($5 | 0) == HEAP32[2903]) {
2233      HEAP32[2903] = $3;
2234      $0 = HEAP32[2900] + $0 | 0;
2235      HEAP32[2900] = $0;
2236      HEAP32[$3 + 4 >> 2] = $0 | 1;
2237      if (HEAP32[2902] != ($3 | 0)) {
2238       break label$1
2239      }
2240      HEAP32[2899] = 0;
2241      HEAP32[2902] = 0;
2242      return;
2243     }
2244     if (($5 | 0) == HEAP32[2902]) {
2245      HEAP32[2902] = $3;
2246      $0 = HEAP32[2899] + $0 | 0;
2247      HEAP32[2899] = $0;
2248      HEAP32[$3 + 4 >> 2] = $0 | 1;
2249      HEAP32[$0 + $3 >> 2] = $0;
2250      return;
2251     }
2252     $0 = ($2 & -8) + $0 | 0;
2253     label$18 : {
2254      if ($2 >>> 0 <= 255) {
2255       $1 = HEAP32[$5 + 8 >> 2];
2256       $2 = $2 >>> 3 | 0;
2257       $4 = HEAP32[$5 + 12 >> 2];
2258       if (($1 | 0) == ($4 | 0)) {
2259        (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2260        break label$18;
2261       }
2262       HEAP32[$1 + 12 >> 2] = $4;
2263       HEAP32[$4 + 8 >> 2] = $1;
2264       break label$18;
2265      }
2266      $7 = HEAP32[$5 + 24 >> 2];
2267      $2 = HEAP32[$5 + 12 >> 2];
2268      label$23 : {
2269       if (($5 | 0) != ($2 | 0)) {
2270        $1 = HEAP32[$5 + 8 >> 2];
2271        HEAP32[$1 + 12 >> 2] = $2;
2272        HEAP32[$2 + 8 >> 2] = $1;
2273        break label$23;
2274       }
2275       label$26 : {
2276        $4 = $5 + 20 | 0;
2277        $1 = HEAP32[$4 >> 2];
2278        if ($1) {
2279         break label$26
2280        }
2281        $4 = $5 + 16 | 0;
2282        $1 = HEAP32[$4 >> 2];
2283        if ($1) {
2284         break label$26
2285        }
2286        $2 = 0;
2287        break label$23;
2288       }
2289       while (1) {
2290        $6 = $4;
2291        $2 = $1;
2292        $4 = $2 + 20 | 0;
2293        $1 = HEAP32[$4 >> 2];
2294        if ($1) {
2295         continue
2296        }
2297        $4 = $2 + 16 | 0;
2298        $1 = HEAP32[$2 + 16 >> 2];
2299        if ($1) {
2300         continue
2301        }
2302        break;
2303       };
2304       HEAP32[$6 >> 2] = 0;
2305      }
2306      if (!$7) {
2307       break label$18
2308      }
2309      $4 = HEAP32[$5 + 28 >> 2];
2310      $1 = ($4 << 2) + 11892 | 0;
2311      label$28 : {
2312       if (($5 | 0) == HEAP32[$1 >> 2]) {
2313        HEAP32[$1 >> 2] = $2;
2314        if ($2) {
2315         break label$28
2316        }
2317        (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2318        break label$18;
2319       }
2320       HEAP32[$7 + (($5 | 0) == HEAP32[$7 + 16 >> 2] ? 16 : 20) >> 2] = $2;
2321       if (!$2) {
2322        break label$18
2323       }
2324      }
2325      HEAP32[$2 + 24 >> 2] = $7;
2326      $1 = HEAP32[$5 + 16 >> 2];
2327      if ($1) {
2328       HEAP32[$2 + 16 >> 2] = $1;
2329       HEAP32[$1 + 24 >> 2] = $2;
2330      }
2331      $1 = HEAP32[$5 + 20 >> 2];
2332      if (!$1) {
2333       break label$18
2334      }
2335      HEAP32[$2 + 20 >> 2] = $1;
2336      HEAP32[$1 + 24 >> 2] = $2;
2337     }
2338     HEAP32[$3 + 4 >> 2] = $0 | 1;
2339     HEAP32[$0 + $3 >> 2] = $0;
2340     if (HEAP32[2902] != ($3 | 0)) {
2341      break label$14
2342     }
2343     HEAP32[2899] = $0;
2344     return;
2345    }
2346    HEAP32[$5 + 4 >> 2] = $2 & -2;
2347    HEAP32[$3 + 4 >> 2] = $0 | 1;
2348    HEAP32[$0 + $3 >> 2] = $0;
2349   }
2350   if ($0 >>> 0 <= 255) {
2351    $0 = $0 >>> 3 | 0;
2352    $2 = ($0 << 3) + 11628 | 0;
2353    $1 = HEAP32[2897];
2354    $0 = 1 << $0;
2355    label$32 : {
2356     if (!($1 & $0)) {
2357      HEAP32[2897] = $0 | $1;
2358      $0 = $2;
2359      break label$32;
2360     }
2361     $0 = HEAP32[$2 + 8 >> 2];
2362    }
2363    HEAP32[$2 + 8 >> 2] = $3;
2364    HEAP32[$0 + 12 >> 2] = $3;
2365    HEAP32[$3 + 12 >> 2] = $2;
2366    HEAP32[$3 + 8 >> 2] = $0;
2367    return;
2368   }
2369   HEAP32[$3 + 16 >> 2] = 0;
2370   HEAP32[$3 + 20 >> 2] = 0;
2371   $5 = $3;
2372   $4 = $0 >>> 8 | 0;
2373   $1 = 0;
2374   label$34 : {
2375    if (!$4) {
2376     break label$34
2377    }
2378    $1 = 31;
2379    if ($0 >>> 0 > 16777215) {
2380     break label$34
2381    }
2382    $2 = $4;
2383    $4 = $4 + 1048320 >>> 16 & 8;
2384    $1 = $2 << $4;
2385    $7 = $1 + 520192 >>> 16 & 4;
2386    $1 = $1 << $7;
2387    $6 = $1 + 245760 >>> 16 & 2;
2388    $1 = ($1 << $6 >>> 15 | 0) - ($6 | ($4 | $7)) | 0;
2389    $1 = ($1 << 1 | $0 >>> $1 + 21 & 1) + 28 | 0;
2390   }
2391   HEAP32[$5 + 28 >> 2] = $1;
2392   $6 = ($1 << 2) + 11892 | 0;
2393   label$35 : {
2394    label$36 : {
2395     $4 = HEAP32[2898];
2396     $2 = 1 << $1;
2397     label$37 : {
2398      if (!($4 & $2)) {
2399       HEAP32[2898] = $2 | $4;
2400       HEAP32[$6 >> 2] = $3;
2401       HEAP32[$3 + 24 >> 2] = $6;
2402       break label$37;
2403      }
2404      $4 = $0 << (($1 | 0) == 31 ? 0 : 25 - ($1 >>> 1 | 0) | 0);
2405      $2 = HEAP32[$6 >> 2];
2406      while (1) {
2407       $1 = $2;
2408       if ((HEAP32[$2 + 4 >> 2] & -8) == ($0 | 0)) {
2409        break label$36
2410       }
2411       $2 = $4 >>> 29 | 0;
2412       $4 = $4 << 1;
2413       $6 = ($1 + ($2 & 4) | 0) + 16 | 0;
2414       $2 = HEAP32[$6 >> 2];
2415       if ($2) {
2416        continue
2417       }
2418       break;
2419      };
2420      HEAP32[$6 >> 2] = $3;
2421      HEAP32[$3 + 24 >> 2] = $1;
2422     }
2423     HEAP32[$3 + 12 >> 2] = $3;
2424     HEAP32[$3 + 8 >> 2] = $3;
2425     break label$35;
2426    }
2427    $0 = HEAP32[$1 + 8 >> 2];
2428    HEAP32[$0 + 12 >> 2] = $3;
2429    HEAP32[$1 + 8 >> 2] = $3;
2430    HEAP32[$3 + 24 >> 2] = 0;
2431    HEAP32[$3 + 12 >> 2] = $1;
2432    HEAP32[$3 + 8 >> 2] = $0;
2433   }
2434   $0 = HEAP32[2905] + -1 | 0;
2435   HEAP32[2905] = $0;
2436   if ($0) {
2437    break label$1
2438   }
2439   $3 = 12044;
2440   while (1) {
2441    $0 = HEAP32[$3 >> 2];
2442    $3 = $0 + 8 | 0;
2443    if ($0) {
2444     continue
2445    }
2446    break;
2447   };
2448   HEAP32[2905] = -1;
2449  }
2450 }
2451
2452 function dlcalloc($0, $1) {
2453  var $2 = 0, $3 = 0, $4 = 0;
2454  $2 = 0;
2455  label$2 : {
2456   if (!$0) {
2457    break label$2
2458   }
2459   $3 = __wasm_i64_mul($0, 0, $1, 0);
2460   $4 = i64toi32_i32$HIGH_BITS;
2461   $2 = $3;
2462   if (($0 | $1) >>> 0 < 65536) {
2463    break label$2
2464   }
2465   $2 = $4 ? -1 : $3;
2466  }
2467  $1 = $2;
2468  $0 = dlmalloc($1);
2469  if (!(!$0 | !(HEAPU8[$0 + -4 | 0] & 3))) {
2470   memset($0, $1)
2471  }
2472  return $0;
2473 }
2474
2475 function dlrealloc($0, $1) {
2476  var $2 = 0, $3 = 0;
2477  if (!$0) {
2478   return dlmalloc($1)
2479  }
2480  if ($1 >>> 0 >= 4294967232) {
2481   HEAP32[2896] = 48;
2482   return 0;
2483  }
2484  $2 = try_realloc_chunk($0 + -8 | 0, $1 >>> 0 < 11 ? 16 : $1 + 11 & -8);
2485  if ($2) {
2486   return $2 + 8 | 0
2487  }
2488  $2 = dlmalloc($1);
2489  if (!$2) {
2490   return 0
2491  }
2492  $3 = HEAP32[$0 + -4 >> 2];
2493  $3 = ($3 & 3 ? -4 : -8) + ($3 & -8) | 0;
2494  memcpy($2, $0, $3 >>> 0 < $1 >>> 0 ? $3 : $1);
2495  dlfree($0);
2496  return $2;
2497 }
2498
2499 function try_realloc_chunk($0, $1) {
2500  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
2501  $7 = HEAP32[$0 + 4 >> 2];
2502  $2 = $7 & 3;
2503  $3 = $7 & -8;
2504  $5 = $3 + $0 | 0;
2505  label$2 : {
2506   if (!$2) {
2507    $2 = 0;
2508    if ($1 >>> 0 < 256) {
2509     break label$2
2510    }
2511    if ($3 >>> 0 >= $1 + 4 >>> 0) {
2512     $2 = $0;
2513     if ($3 - $1 >>> 0 <= HEAP32[3017] << 1 >>> 0) {
2514      break label$2
2515     }
2516    }
2517    return 0;
2518   }
2519   label$5 : {
2520    if ($3 >>> 0 >= $1 >>> 0) {
2521     $2 = $3 - $1 | 0;
2522     if ($2 >>> 0 < 16) {
2523      break label$5
2524     }
2525     HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2;
2526     $1 = $0 + $1 | 0;
2527     HEAP32[$1 + 4 >> 2] = $2 | 3;
2528     HEAP32[$5 + 4 >> 2] = HEAP32[$5 + 4 >> 2] | 1;
2529     dispose_chunk($1, $2);
2530     break label$5;
2531    }
2532    $2 = 0;
2533    if (($5 | 0) == HEAP32[2903]) {
2534     $4 = $3 + HEAP32[2900] | 0;
2535     if ($4 >>> 0 <= $1 >>> 0) {
2536      break label$2
2537     }
2538     HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2;
2539     $2 = $0 + $1 | 0;
2540     $1 = $4 - $1 | 0;
2541     HEAP32[$2 + 4 >> 2] = $1 | 1;
2542     HEAP32[2900] = $1;
2543     HEAP32[2903] = $2;
2544     break label$5;
2545    }
2546    if (($5 | 0) == HEAP32[2902]) {
2547     $4 = $3 + HEAP32[2899] | 0;
2548     if ($4 >>> 0 < $1 >>> 0) {
2549      break label$2
2550     }
2551     $2 = $4 - $1 | 0;
2552     label$9 : {
2553      if ($2 >>> 0 >= 16) {
2554       HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2;
2555       $1 = $0 + $1 | 0;
2556       HEAP32[$1 + 4 >> 2] = $2 | 1;
2557       $4 = $0 + $4 | 0;
2558       HEAP32[$4 >> 2] = $2;
2559       HEAP32[$4 + 4 >> 2] = HEAP32[$4 + 4 >> 2] & -2;
2560       break label$9;
2561      }
2562      HEAP32[$0 + 4 >> 2] = $4 | $7 & 1 | 2;
2563      $1 = $0 + $4 | 0;
2564      HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1;
2565      $2 = 0;
2566      $1 = 0;
2567     }
2568     HEAP32[2902] = $1;
2569     HEAP32[2899] = $2;
2570     break label$5;
2571    }
2572    $6 = HEAP32[$5 + 4 >> 2];
2573    if ($6 & 2) {
2574     break label$2
2575    }
2576    $8 = $3 + ($6 & -8) | 0;
2577    if ($8 >>> 0 < $1 >>> 0) {
2578     break label$2
2579    }
2580    $10 = $8 - $1 | 0;
2581    label$11 : {
2582     if ($6 >>> 0 <= 255) {
2583      $2 = $6 >>> 3 | 0;
2584      $6 = HEAP32[$5 + 8 >> 2];
2585      $4 = HEAP32[$5 + 12 >> 2];
2586      if (($6 | 0) == ($4 | 0)) {
2587       (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2588       break label$11;
2589      }
2590      HEAP32[$6 + 12 >> 2] = $4;
2591      HEAP32[$4 + 8 >> 2] = $6;
2592      break label$11;
2593     }
2594     $9 = HEAP32[$5 + 24 >> 2];
2595     $3 = HEAP32[$5 + 12 >> 2];
2596     label$14 : {
2597      if (($5 | 0) != ($3 | 0)) {
2598       $2 = HEAP32[$5 + 8 >> 2];
2599       HEAP32[$2 + 12 >> 2] = $3;
2600       HEAP32[$3 + 8 >> 2] = $2;
2601       break label$14;
2602      }
2603      label$17 : {
2604       $2 = $5 + 20 | 0;
2605       $6 = HEAP32[$2 >> 2];
2606       if ($6) {
2607        break label$17
2608       }
2609       $2 = $5 + 16 | 0;
2610       $6 = HEAP32[$2 >> 2];
2611       if ($6) {
2612        break label$17
2613       }
2614       $3 = 0;
2615       break label$14;
2616      }
2617      while (1) {
2618       $4 = $2;
2619       $3 = $6;
2620       $2 = $3 + 20 | 0;
2621       $6 = HEAP32[$2 >> 2];
2622       if ($6) {
2623        continue
2624       }
2625       $2 = $3 + 16 | 0;
2626       $6 = HEAP32[$3 + 16 >> 2];
2627       if ($6) {
2628        continue
2629       }
2630       break;
2631      };
2632      HEAP32[$4 >> 2] = 0;
2633     }
2634     if (!$9) {
2635      break label$11
2636     }
2637     $4 = HEAP32[$5 + 28 >> 2];
2638     $2 = ($4 << 2) + 11892 | 0;
2639     label$19 : {
2640      if (($5 | 0) == HEAP32[$2 >> 2]) {
2641       HEAP32[$2 >> 2] = $3;
2642       if ($3) {
2643        break label$19
2644       }
2645       (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2646       break label$11;
2647      }
2648      HEAP32[(($5 | 0) == HEAP32[$9 + 16 >> 2] ? 16 : 20) + $9 >> 2] = $3;
2649      if (!$3) {
2650       break label$11
2651      }
2652     }
2653     HEAP32[$3 + 24 >> 2] = $9;
2654     $2 = HEAP32[$5 + 16 >> 2];
2655     if ($2) {
2656      HEAP32[$3 + 16 >> 2] = $2;
2657      HEAP32[$2 + 24 >> 2] = $3;
2658     }
2659     $2 = HEAP32[$5 + 20 >> 2];
2660     if (!$2) {
2661      break label$11
2662     }
2663     HEAP32[$3 + 20 >> 2] = $2;
2664     HEAP32[$2 + 24 >> 2] = $3;
2665    }
2666    if ($10 >>> 0 <= 15) {
2667     HEAP32[$0 + 4 >> 2] = $7 & 1 | $8 | 2;
2668     $1 = $0 + $8 | 0;
2669     HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1;
2670     break label$5;
2671    }
2672    HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2;
2673    $2 = $0 + $1 | 0;
2674    HEAP32[$2 + 4 >> 2] = $10 | 3;
2675    $1 = $0 + $8 | 0;
2676    HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1;
2677    dispose_chunk($2, $10);
2678   }
2679   $2 = $0;
2680  }
2681  return $2;
2682 }
2683
2684 function dispose_chunk($0, $1) {
2685  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
2686  $5 = $0 + $1 | 0;
2687  label$1 : {
2688   label$2 : {
2689    $2 = HEAP32[$0 + 4 >> 2];
2690    if ($2 & 1) {
2691     break label$2
2692    }
2693    if (!($2 & 3)) {
2694     break label$1
2695    }
2696    $2 = HEAP32[$0 >> 2];
2697    $1 = $2 + $1 | 0;
2698    $0 = $0 - $2 | 0;
2699    if (($0 | 0) != HEAP32[2902]) {
2700     if ($2 >>> 0 <= 255) {
2701      $4 = $2 >>> 3 | 0;
2702      $2 = HEAP32[$0 + 8 >> 2];
2703      $3 = HEAP32[$0 + 12 >> 2];
2704      if (($3 | 0) == ($2 | 0)) {
2705       (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2706       break label$2;
2707      }
2708      HEAP32[$2 + 12 >> 2] = $3;
2709      HEAP32[$3 + 8 >> 2] = $2;
2710      break label$2;
2711     }
2712     $7 = HEAP32[$0 + 24 >> 2];
2713     $2 = HEAP32[$0 + 12 >> 2];
2714     label$6 : {
2715      if (($2 | 0) != ($0 | 0)) {
2716       $3 = HEAP32[$0 + 8 >> 2];
2717       HEAP32[$3 + 12 >> 2] = $2;
2718       HEAP32[$2 + 8 >> 2] = $3;
2719       break label$6;
2720      }
2721      label$9 : {
2722       $3 = $0 + 20 | 0;
2723       $4 = HEAP32[$3 >> 2];
2724       if ($4) {
2725        break label$9
2726       }
2727       $3 = $0 + 16 | 0;
2728       $4 = HEAP32[$3 >> 2];
2729       if ($4) {
2730        break label$9
2731       }
2732       $2 = 0;
2733       break label$6;
2734      }
2735      while (1) {
2736       $6 = $3;
2737       $2 = $4;
2738       $3 = $2 + 20 | 0;
2739       $4 = HEAP32[$3 >> 2];
2740       if ($4) {
2741        continue
2742       }
2743       $3 = $2 + 16 | 0;
2744       $4 = HEAP32[$2 + 16 >> 2];
2745       if ($4) {
2746        continue
2747       }
2748       break;
2749      };
2750      HEAP32[$6 >> 2] = 0;
2751     }
2752     if (!$7) {
2753      break label$2
2754     }
2755     $3 = HEAP32[$0 + 28 >> 2];
2756     $4 = ($3 << 2) + 11892 | 0;
2757     label$11 : {
2758      if (HEAP32[$4 >> 2] == ($0 | 0)) {
2759       HEAP32[$4 >> 2] = $2;
2760       if ($2) {
2761        break label$11
2762       }
2763       (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $3)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2764       break label$2;
2765      }
2766      HEAP32[$7 + (HEAP32[$7 + 16 >> 2] == ($0 | 0) ? 16 : 20) >> 2] = $2;
2767      if (!$2) {
2768       break label$2
2769      }
2770     }
2771     HEAP32[$2 + 24 >> 2] = $7;
2772     $3 = HEAP32[$0 + 16 >> 2];
2773     if ($3) {
2774      HEAP32[$2 + 16 >> 2] = $3;
2775      HEAP32[$3 + 24 >> 2] = $2;
2776     }
2777     $3 = HEAP32[$0 + 20 >> 2];
2778     if (!$3) {
2779      break label$2
2780     }
2781     HEAP32[$2 + 20 >> 2] = $3;
2782     HEAP32[$3 + 24 >> 2] = $2;
2783     break label$2;
2784    }
2785    $2 = HEAP32[$5 + 4 >> 2];
2786    if (($2 & 3) != 3) {
2787     break label$2
2788    }
2789    HEAP32[2899] = $1;
2790    HEAP32[$5 + 4 >> 2] = $2 & -2;
2791    HEAP32[$0 + 4 >> 2] = $1 | 1;
2792    HEAP32[$5 >> 2] = $1;
2793    return;
2794   }
2795   $2 = HEAP32[$5 + 4 >> 2];
2796   label$14 : {
2797    if (!($2 & 2)) {
2798     if (($5 | 0) == HEAP32[2903]) {
2799      HEAP32[2903] = $0;
2800      $1 = HEAP32[2900] + $1 | 0;
2801      HEAP32[2900] = $1;
2802      HEAP32[$0 + 4 >> 2] = $1 | 1;
2803      if (HEAP32[2902] != ($0 | 0)) {
2804       break label$1
2805      }
2806      HEAP32[2899] = 0;
2807      HEAP32[2902] = 0;
2808      return;
2809     }
2810     if (($5 | 0) == HEAP32[2902]) {
2811      HEAP32[2902] = $0;
2812      $1 = HEAP32[2899] + $1 | 0;
2813      HEAP32[2899] = $1;
2814      HEAP32[$0 + 4 >> 2] = $1 | 1;
2815      HEAP32[$0 + $1 >> 2] = $1;
2816      return;
2817     }
2818     $1 = ($2 & -8) + $1 | 0;
2819     label$18 : {
2820      if ($2 >>> 0 <= 255) {
2821       $4 = $2 >>> 3 | 0;
2822       $2 = HEAP32[$5 + 8 >> 2];
2823       $3 = HEAP32[$5 + 12 >> 2];
2824       if (($2 | 0) == ($3 | 0)) {
2825        (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2826        break label$18;
2827       }
2828       HEAP32[$2 + 12 >> 2] = $3;
2829       HEAP32[$3 + 8 >> 2] = $2;
2830       break label$18;
2831      }
2832      $7 = HEAP32[$5 + 24 >> 2];
2833      $2 = HEAP32[$5 + 12 >> 2];
2834      label$21 : {
2835       if (($5 | 0) != ($2 | 0)) {
2836        $3 = HEAP32[$5 + 8 >> 2];
2837        HEAP32[$3 + 12 >> 2] = $2;
2838        HEAP32[$2 + 8 >> 2] = $3;
2839        break label$21;
2840       }
2841       label$24 : {
2842        $3 = $5 + 20 | 0;
2843        $4 = HEAP32[$3 >> 2];
2844        if ($4) {
2845         break label$24
2846        }
2847        $3 = $5 + 16 | 0;
2848        $4 = HEAP32[$3 >> 2];
2849        if ($4) {
2850         break label$24
2851        }
2852        $2 = 0;
2853        break label$21;
2854       }
2855       while (1) {
2856        $6 = $3;
2857        $2 = $4;
2858        $3 = $2 + 20 | 0;
2859        $4 = HEAP32[$3 >> 2];
2860        if ($4) {
2861         continue
2862        }
2863        $3 = $2 + 16 | 0;
2864        $4 = HEAP32[$2 + 16 >> 2];
2865        if ($4) {
2866         continue
2867        }
2868        break;
2869       };
2870       HEAP32[$6 >> 2] = 0;
2871      }
2872      if (!$7) {
2873       break label$18
2874      }
2875      $3 = HEAP32[$5 + 28 >> 2];
2876      $4 = ($3 << 2) + 11892 | 0;
2877      label$26 : {
2878       if (($5 | 0) == HEAP32[$4 >> 2]) {
2879        HEAP32[$4 >> 2] = $2;
2880        if ($2) {
2881         break label$26
2882        }
2883        (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $3)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
2884        break label$18;
2885       }
2886       HEAP32[$7 + (($5 | 0) == HEAP32[$7 + 16 >> 2] ? 16 : 20) >> 2] = $2;
2887       if (!$2) {
2888        break label$18
2889       }
2890      }
2891      HEAP32[$2 + 24 >> 2] = $7;
2892      $3 = HEAP32[$5 + 16 >> 2];
2893      if ($3) {
2894       HEAP32[$2 + 16 >> 2] = $3;
2895       HEAP32[$3 + 24 >> 2] = $2;
2896      }
2897      $3 = HEAP32[$5 + 20 >> 2];
2898      if (!$3) {
2899       break label$18
2900      }
2901      HEAP32[$2 + 20 >> 2] = $3;
2902      HEAP32[$3 + 24 >> 2] = $2;
2903     }
2904     HEAP32[$0 + 4 >> 2] = $1 | 1;
2905     HEAP32[$0 + $1 >> 2] = $1;
2906     if (HEAP32[2902] != ($0 | 0)) {
2907      break label$14
2908     }
2909     HEAP32[2899] = $1;
2910     return;
2911    }
2912    HEAP32[$5 + 4 >> 2] = $2 & -2;
2913    HEAP32[$0 + 4 >> 2] = $1 | 1;
2914    HEAP32[$0 + $1 >> 2] = $1;
2915   }
2916   if ($1 >>> 0 <= 255) {
2917    $2 = $1 >>> 3 | 0;
2918    $1 = ($2 << 3) + 11628 | 0;
2919    $3 = HEAP32[2897];
2920    $2 = 1 << $2;
2921    label$30 : {
2922     if (!($3 & $2)) {
2923      HEAP32[2897] = $2 | $3;
2924      $2 = $1;
2925      break label$30;
2926     }
2927     $2 = HEAP32[$1 + 8 >> 2];
2928    }
2929    HEAP32[$1 + 8 >> 2] = $0;
2930    HEAP32[$2 + 12 >> 2] = $0;
2931    HEAP32[$0 + 12 >> 2] = $1;
2932    HEAP32[$0 + 8 >> 2] = $2;
2933    return;
2934   }
2935   HEAP32[$0 + 16 >> 2] = 0;
2936   HEAP32[$0 + 20 >> 2] = 0;
2937   $3 = $0;
2938   $4 = $1 >>> 8 | 0;
2939   $2 = 0;
2940   label$32 : {
2941    if (!$4) {
2942     break label$32
2943    }
2944    $2 = 31;
2945    if ($1 >>> 0 > 16777215) {
2946     break label$32
2947    }
2948    $6 = $4 + 1048320 >>> 16 & 8;
2949    $4 = $4 << $6;
2950    $2 = $4 + 520192 >>> 16 & 4;
2951    $5 = $4 << $2;
2952    $4 = $5 + 245760 >>> 16 & 2;
2953    $2 = ($5 << $4 >>> 15 | 0) - ($4 | ($2 | $6)) | 0;
2954    $2 = ($2 << 1 | $1 >>> $2 + 21 & 1) + 28 | 0;
2955   }
2956   HEAP32[$3 + 28 >> 2] = $2;
2957   $4 = ($2 << 2) + 11892 | 0;
2958   label$33 : {
2959    $3 = HEAP32[2898];
2960    $6 = 1 << $2;
2961    label$34 : {
2962     if (!($3 & $6)) {
2963      HEAP32[2898] = $3 | $6;
2964      HEAP32[$4 >> 2] = $0;
2965      break label$34;
2966     }
2967     $3 = $1 << (($2 | 0) == 31 ? 0 : 25 - ($2 >>> 1 | 0) | 0);
2968     $2 = HEAP32[$4 >> 2];
2969     while (1) {
2970      $4 = $2;
2971      if ((HEAP32[$2 + 4 >> 2] & -8) == ($1 | 0)) {
2972       break label$33
2973      }
2974      $2 = $3 >>> 29 | 0;
2975      $3 = $3 << 1;
2976      $6 = ($4 + ($2 & 4) | 0) + 16 | 0;
2977      $2 = HEAP32[$6 >> 2];
2978      if ($2) {
2979       continue
2980      }
2981      break;
2982     };
2983     HEAP32[$6 >> 2] = $0;
2984    }
2985    HEAP32[$0 + 24 >> 2] = $4;
2986    HEAP32[$0 + 12 >> 2] = $0;
2987    HEAP32[$0 + 8 >> 2] = $0;
2988    return;
2989   }
2990   $1 = HEAP32[$4 + 8 >> 2];
2991   HEAP32[$1 + 12 >> 2] = $0;
2992   HEAP32[$4 + 8 >> 2] = $0;
2993   HEAP32[$0 + 24 >> 2] = 0;
2994   HEAP32[$0 + 12 >> 2] = $4;
2995   HEAP32[$0 + 8 >> 2] = $1;
2996  }
2997 }
2998
2999 function memchr($0, $1) {
3000  var $2 = 0;
3001  $2 = ($1 | 0) != 0;
3002  label$1 : {
3003   label$2 : {
3004    label$3 : {
3005     if (!$1 | !($0 & 3)) {
3006      break label$3
3007     }
3008     while (1) {
3009      if (HEAPU8[$0 | 0] == 79) {
3010       break label$2
3011      }
3012      $0 = $0 + 1 | 0;
3013      $1 = $1 + -1 | 0;
3014      $2 = ($1 | 0) != 0;
3015      if (!$1) {
3016       break label$3
3017      }
3018      if ($0 & 3) {
3019       continue
3020      }
3021      break;
3022     };
3023    }
3024    if (!$2) {
3025     break label$1
3026    }
3027   }
3028   label$5 : {
3029    if (HEAPU8[$0 | 0] == 79 | $1 >>> 0 < 4) {
3030     break label$5
3031    }
3032    while (1) {
3033     $2 = HEAP32[$0 >> 2] ^ 1330597711;
3034     if (($2 ^ -1) & $2 + -16843009 & -2139062144) {
3035      break label$5
3036     }
3037     $0 = $0 + 4 | 0;
3038     $1 = $1 + -4 | 0;
3039     if ($1 >>> 0 > 3) {
3040      continue
3041     }
3042     break;
3043    };
3044   }
3045   if (!$1) {
3046    break label$1
3047   }
3048   while (1) {
3049    if (HEAPU8[$0 | 0] == 79) {
3050     return $0
3051    }
3052    $0 = $0 + 1 | 0;
3053    $1 = $1 + -1 | 0;
3054    if ($1) {
3055     continue
3056    }
3057    break;
3058   };
3059  }
3060  return 0;
3061 }
3062
3063 function frexp($0, $1) {
3064  var $2 = 0, $3 = 0, $4 = 0;
3065  wasm2js_scratch_store_f64(+$0);
3066  $2 = wasm2js_scratch_load_i32(1) | 0;
3067  $3 = wasm2js_scratch_load_i32(0) | 0;
3068  $4 = $2;
3069  $2 = $2 >>> 20 & 2047;
3070  if (($2 | 0) != 2047) {
3071   if (!$2) {
3072    $2 = $1;
3073    if ($0 == 0.0) {
3074     $1 = 0
3075    } else {
3076     $0 = frexp($0 * 18446744073709551615.0, $1);
3077     $1 = HEAP32[$1 >> 2] + -64 | 0;
3078    }
3079    HEAP32[$2 >> 2] = $1;
3080    return $0;
3081   }
3082   HEAP32[$1 >> 2] = $2 + -1022;
3083   wasm2js_scratch_store_i32(0, $3 | 0);
3084   wasm2js_scratch_store_i32(1, $4 & -2146435073 | 1071644672);
3085   $0 = +wasm2js_scratch_load_f64();
3086  }
3087  return $0;
3088 }
3089
3090 function __ashlti3($0, $1, $2, $3, $4, $5) {
3091  var $6 = 0, $7 = 0, $8 = 0, $9 = 0;
3092  label$1 : {
3093   if ($5 & 64) {
3094    $3 = $1;
3095    $4 = $5 + -64 | 0;
3096    $1 = $4 & 31;
3097    if (32 <= ($4 & 63) >>> 0) {
3098     $4 = $3 << $1;
3099     $3 = 0;
3100    } else {
3101     $4 = (1 << $1) - 1 & $3 >>> 32 - $1 | $2 << $1;
3102     $3 = $3 << $1;
3103    }
3104    $1 = 0;
3105    $2 = 0;
3106    break label$1;
3107   }
3108   if (!$5) {
3109    break label$1
3110   }
3111   $6 = $3;
3112   $8 = $5;
3113   $3 = $5 & 31;
3114   if (32 <= ($5 & 63) >>> 0) {
3115    $7 = $6 << $3;
3116    $9 = 0;
3117   } else {
3118    $7 = (1 << $3) - 1 & $6 >>> 32 - $3 | $4 << $3;
3119    $9 = $6 << $3;
3120   }
3121   $3 = $2;
3122   $6 = $1;
3123   $5 = 64 - $5 | 0;
3124   $4 = $5 & 31;
3125   if (32 <= ($5 & 63) >>> 0) {
3126    $5 = 0;
3127    $3 = $3 >>> $4 | 0;
3128   } else {
3129    $5 = $3 >>> $4 | 0;
3130    $3 = ((1 << $4) - 1 & $3) << 32 - $4 | $6 >>> $4;
3131   }
3132   $3 = $9 | $3;
3133   $4 = $5 | $7;
3134   $5 = $1;
3135   $1 = $8 & 31;
3136   if (32 <= ($8 & 63) >>> 0) {
3137    $7 = $5 << $1;
3138    $1 = 0;
3139   } else {
3140    $7 = (1 << $1) - 1 & $5 >>> 32 - $1 | $2 << $1;
3141    $1 = $5 << $1;
3142   }
3143   $2 = $7;
3144  }
3145  HEAP32[$0 >> 2] = $1;
3146  HEAP32[$0 + 4 >> 2] = $2;
3147  HEAP32[$0 + 8 >> 2] = $3;
3148  HEAP32[$0 + 12 >> 2] = $4;
3149 }
3150
3151 function __lshrti3($0, $1, $2, $3, $4, $5) {
3152  var $6 = 0, $7 = 0, $8 = 0, $9 = 0;
3153  label$1 : {
3154   if ($5 & 64) {
3155    $2 = $5 + -64 | 0;
3156    $1 = $2 & 31;
3157    if (32 <= ($2 & 63) >>> 0) {
3158     $2 = 0;
3159     $1 = $4 >>> $1 | 0;
3160    } else {
3161     $2 = $4 >>> $1 | 0;
3162     $1 = ((1 << $1) - 1 & $4) << 32 - $1 | $3 >>> $1;
3163    }
3164    $3 = 0;
3165    $4 = 0;
3166    break label$1;
3167   }
3168   if (!$5) {
3169    break label$1
3170   }
3171   $7 = $4;
3172   $8 = $3;
3173   $9 = 64 - $5 | 0;
3174   $6 = $9 & 31;
3175   if (32 <= ($9 & 63) >>> 0) {
3176    $7 = $8 << $6;
3177    $9 = 0;
3178   } else {
3179    $7 = (1 << $6) - 1 & $8 >>> 32 - $6 | $7 << $6;
3180    $9 = $8 << $6;
3181   }
3182   $8 = $1;
3183   $6 = $5;
3184   $1 = $6 & 31;
3185   if (32 <= ($6 & 63) >>> 0) {
3186    $6 = 0;
3187    $1 = $2 >>> $1 | 0;
3188   } else {
3189    $6 = $2 >>> $1 | 0;
3190    $1 = ((1 << $1) - 1 & $2) << 32 - $1 | $8 >>> $1;
3191   }
3192   $1 = $9 | $1;
3193   $2 = $6 | $7;
3194   $6 = $3;
3195   $3 = $5 & 31;
3196   if (32 <= ($5 & 63) >>> 0) {
3197    $7 = 0;
3198    $3 = $4 >>> $3 | 0;
3199   } else {
3200    $7 = $4 >>> $3 | 0;
3201    $3 = ((1 << $3) - 1 & $4) << 32 - $3 | $6 >>> $3;
3202   }
3203   $4 = $7;
3204  }
3205  HEAP32[$0 >> 2] = $1;
3206  HEAP32[$0 + 4 >> 2] = $2;
3207  HEAP32[$0 + 8 >> 2] = $3;
3208  HEAP32[$0 + 12 >> 2] = $4;
3209 }
3210
3211 function __trunctfdf2($0, $1, $2, $3) {
3212  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0;
3213  $6 = global$0 - 32 | 0;
3214  global$0 = $6;
3215  $4 = $3 & 2147483647;
3216  $8 = $4;
3217  $4 = $4 + -1006698496 | 0;
3218  $7 = $2;
3219  $5 = $2;
3220  if ($2 >>> 0 < 0) {
3221   $4 = $4 + 1 | 0
3222  }
3223  $9 = $5;
3224  $5 = $4;
3225  $4 = $8 + -1140785152 | 0;
3226  $10 = $7;
3227  if ($7 >>> 0 < 0) {
3228   $4 = $4 + 1 | 0
3229  }
3230  label$1 : {
3231   if (($4 | 0) == ($5 | 0) & $9 >>> 0 < $10 >>> 0 | $5 >>> 0 < $4 >>> 0) {
3232    $4 = $3 << 4 | $2 >>> 28;
3233    $2 = $2 << 4 | $1 >>> 28;
3234    $1 = $1 & 268435455;
3235    $7 = $1;
3236    if (($1 | 0) == 134217728 & $0 >>> 0 >= 1 | $1 >>> 0 > 134217728) {
3237     $4 = $4 + 1073741824 | 0;
3238     $0 = $2 + 1 | 0;
3239     if ($0 >>> 0 < 1) {
3240      $4 = $4 + 1 | 0
3241     }
3242     $5 = $0;
3243     break label$1;
3244    }
3245    $5 = $2;
3246    $4 = $4 - (($2 >>> 0 < 0) + -1073741824 | 0) | 0;
3247    if ($0 | $7 ^ 134217728) {
3248     break label$1
3249    }
3250    $0 = $5 + ($5 & 1) | 0;
3251    if ($0 >>> 0 < $5 >>> 0) {
3252     $4 = $4 + 1 | 0
3253    }
3254    $5 = $0;
3255    break label$1;
3256   }
3257   if (!(!$7 & ($8 | 0) == 2147418112 ? !($0 | $1) : ($8 | 0) == 2147418112 & $7 >>> 0 < 0 | $8 >>> 0 < 2147418112)) {
3258    $4 = $3 << 4 | $2 >>> 28;
3259    $5 = $2 << 4 | $1 >>> 28;
3260    $4 = $4 & 524287 | 2146959360;
3261    break label$1;
3262   }
3263   $5 = 0;
3264   $4 = 2146435072;
3265   if ($8 >>> 0 > 1140785151) {
3266    break label$1
3267   }
3268   $4 = 0;
3269   $7 = $8 >>> 16 | 0;
3270   if ($7 >>> 0 < 15249) {
3271    break label$1
3272   }
3273   $4 = $3 & 65535 | 65536;
3274   __ashlti3($6 + 16 | 0, $0, $1, $2, $4, $7 + -15233 | 0);
3275   __lshrti3($6, $0, $1, $2, $4, 15361 - $7 | 0);
3276   $2 = HEAP32[$6 + 4 >> 2];
3277   $0 = HEAP32[$6 + 8 >> 2];
3278   $4 = HEAP32[$6 + 12 >> 2] << 4 | $0 >>> 28;
3279   $5 = $0 << 4 | $2 >>> 28;
3280   $0 = $2 & 268435455;
3281   $2 = $0;
3282   $1 = HEAP32[$6 >> 2] | ((HEAP32[$6 + 16 >> 2] | HEAP32[$6 + 24 >> 2]) != 0 | (HEAP32[$6 + 20 >> 2] | HEAP32[$6 + 28 >> 2]) != 0);
3283   if (($0 | 0) == 134217728 & $1 >>> 0 >= 1 | $0 >>> 0 > 134217728) {
3284    $0 = $5 + 1 | 0;
3285    if ($0 >>> 0 < 1) {
3286     $4 = $4 + 1 | 0
3287    }
3288    $5 = $0;
3289    break label$1;
3290   }
3291   if ($1 | $2 ^ 134217728) {
3292    break label$1
3293   }
3294   $0 = $5 + ($5 & 1) | 0;
3295   if ($0 >>> 0 < $5 >>> 0) {
3296    $4 = $4 + 1 | 0
3297   }
3298   $5 = $0;
3299  }
3300  global$0 = $6 + 32 | 0;
3301  wasm2js_scratch_store_i32(0, $5 | 0);
3302  wasm2js_scratch_store_i32(1, $3 & -2147483648 | $4);
3303  return +wasm2js_scratch_load_f64();
3304 }
3305
3306 function FLAC__crc8($0, $1) {
3307  var $2 = 0;
3308  if ($1) {
3309   while (1) {
3310    $2 = HEAPU8[(HEAPU8[$0 | 0] ^ $2) + 1024 | 0];
3311    $0 = $0 + 1 | 0;
3312    $1 = $1 + -1 | 0;
3313    if ($1) {
3314     continue
3315    }
3316    break;
3317   }
3318  }
3319  return $2;
3320 }
3321
3322 function FLAC__crc16($0, $1) {
3323  var $2 = 0, $3 = 0;
3324  if ($1 >>> 0 > 7) {
3325   while (1) {
3326    $3 = $2;
3327    $2 = HEAPU8[$0 | 0] | HEAPU8[$0 + 1 | 0] << 8;
3328    $2 = $3 ^ ($2 << 8 & 16711680 | $2 << 24) >>> 16;
3329    $2 = HEAPU16[(HEAPU8[$0 + 7 | 0] << 1) + 1280 >> 1] ^ (HEAPU16[((HEAPU8[$0 + 6 | 0] << 1) + 1280 | 0) + 512 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 5 | 0] << 1) + 2304 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 4 | 0] << 1) + 2816 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 3 | 0] << 1) + 3328 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 2 | 0] << 1) + 3840 >> 1] ^ (HEAPU16[(($2 & 255) << 1) + 4352 >> 1] ^ HEAPU16[($2 >>> 7 & 510) + 4864 >> 1]))))));
3330    $0 = $0 + 8 | 0;
3331    $1 = $1 + -8 | 0;
3332    if ($1 >>> 0 > 7) {
3333     continue
3334    }
3335    break;
3336   }
3337  }
3338  if ($1) {
3339   while (1) {
3340    $2 = HEAPU16[((HEAPU8[$0 | 0] ^ ($2 & 65280) >>> 8) << 1) + 1280 >> 1] ^ $2 << 8;
3341    $0 = $0 + 1 | 0;
3342    $1 = $1 + -1 | 0;
3343    if ($1) {
3344     continue
3345    }
3346    break;
3347   }
3348  }
3349  return $2 & 65535;
3350 }
3351
3352 function FLAC__crc16_update_words32($0, $1, $2) {
3353  var $3 = 0;
3354  if ($1 >>> 0 >= 2) {
3355   while (1) {
3356    $3 = $2;
3357    $2 = HEAP32[$0 >> 2];
3358    $3 = $3 ^ $2 >>> 16;
3359    $3 = HEAPU16[(($3 & 255) << 1) + 4352 >> 1] ^ HEAPU16[($3 >>> 7 & 510) + 4864 >> 1] ^ HEAPU16[($2 >>> 7 & 510) + 3840 >> 1] ^ HEAPU16[(($2 & 255) << 1) + 3328 >> 1];
3360    $2 = HEAP32[$0 + 4 >> 2];
3361    $2 = $3 ^ HEAPU16[($2 >>> 23 & 510) + 2816 >> 1] ^ HEAPU16[($2 >>> 15 & 510) + 2304 >> 1] ^ HEAPU16[(($2 >>> 7 & 510) + 1280 | 0) + 512 >> 1] ^ HEAPU16[(($2 & 255) << 1) + 1280 >> 1];
3362    $0 = $0 + 8 | 0;
3363    $1 = $1 + -2 | 0;
3364    if ($1 >>> 0 > 1) {
3365     continue
3366    }
3367    break;
3368   }
3369  }
3370  if ($1) {
3371   $0 = HEAP32[$0 >> 2];
3372   $1 = $0 >>> 16 ^ $2;
3373   $2 = HEAPU16[(($1 & 255) << 1) + 2304 >> 1] ^ HEAPU16[($1 >>> 7 & 510) + 2816 >> 1] ^ HEAPU16[(($0 >>> 7 & 510) + 1280 | 0) + 512 >> 1] ^ HEAPU16[(($0 & 255) << 1) + 1280 >> 1];
3374  }
3375  return $2 & 65535;
3376 }
3377
3378 function memmove($0, $1, $2) {
3379  var $3 = 0;
3380  label$1 : {
3381   if (($0 | 0) == ($1 | 0)) {
3382    break label$1
3383   }
3384   if (($1 - $0 | 0) - $2 >>> 0 <= 0 - ($2 << 1) >>> 0) {
3385    memcpy($0, $1, $2);
3386    return;
3387   }
3388   $3 = ($0 ^ $1) & 3;
3389   label$3 : {
3390    label$4 : {
3391     if ($0 >>> 0 < $1 >>> 0) {
3392      if ($3) {
3393       break label$3
3394      }
3395      if (!($0 & 3)) {
3396       break label$4
3397      }
3398      while (1) {
3399       if (!$2) {
3400        break label$1
3401       }
3402       HEAP8[$0 | 0] = HEAPU8[$1 | 0];
3403       $1 = $1 + 1 | 0;
3404       $2 = $2 + -1 | 0;
3405       $0 = $0 + 1 | 0;
3406       if ($0 & 3) {
3407        continue
3408       }
3409       break;
3410      };
3411      break label$4;
3412     }
3413     label$9 : {
3414      if ($3) {
3415       break label$9
3416      }
3417      if ($0 + $2 & 3) {
3418       while (1) {
3419        if (!$2) {
3420         break label$1
3421        }
3422        $2 = $2 + -1 | 0;
3423        $3 = $2 + $0 | 0;
3424        HEAP8[$3 | 0] = HEAPU8[$1 + $2 | 0];
3425        if ($3 & 3) {
3426         continue
3427        }
3428        break;
3429       }
3430      }
3431      if ($2 >>> 0 <= 3) {
3432       break label$9
3433      }
3434      while (1) {
3435       $2 = $2 + -4 | 0;
3436       HEAP32[$2 + $0 >> 2] = HEAP32[$1 + $2 >> 2];
3437       if ($2 >>> 0 > 3) {
3438        continue
3439       }
3440       break;
3441      };
3442     }
3443     if (!$2) {
3444      break label$1
3445     }
3446     while (1) {
3447      $2 = $2 + -1 | 0;
3448      HEAP8[$2 + $0 | 0] = HEAPU8[$1 + $2 | 0];
3449      if ($2) {
3450       continue
3451      }
3452      break;
3453     };
3454     break label$1;
3455    }
3456    if ($2 >>> 0 <= 3) {
3457     break label$3
3458    }
3459    while (1) {
3460     HEAP32[$0 >> 2] = HEAP32[$1 >> 2];
3461     $1 = $1 + 4 | 0;
3462     $0 = $0 + 4 | 0;
3463     $2 = $2 + -4 | 0;
3464     if ($2 >>> 0 > 3) {
3465      continue
3466     }
3467     break;
3468    };
3469   }
3470   if (!$2) {
3471    break label$1
3472   }
3473   while (1) {
3474    HEAP8[$0 | 0] = HEAPU8[$1 | 0];
3475    $0 = $0 + 1 | 0;
3476    $1 = $1 + 1 | 0;
3477    $2 = $2 + -1 | 0;
3478    if ($2) {
3479     continue
3480    }
3481    break;
3482   };
3483  }
3484 }
3485
3486 function FLAC__bitreader_delete($0) {
3487  var $1 = 0;
3488  $1 = HEAP32[$0 >> 2];
3489  if ($1) {
3490   dlfree($1)
3491  }
3492  dlfree($0);
3493 }
3494
3495 function FLAC__bitreader_free($0) {
3496  var $1 = 0;
3497  $1 = HEAP32[$0 >> 2];
3498  if ($1) {
3499   dlfree($1)
3500  }
3501  HEAP32[$0 + 36 >> 2] = 0;
3502  HEAP32[$0 + 40 >> 2] = 0;
3503  HEAP32[$0 >> 2] = 0;
3504  HEAP32[$0 + 4 >> 2] = 0;
3505  HEAP32[$0 + 8 >> 2] = 0;
3506  HEAP32[$0 + 12 >> 2] = 0;
3507  HEAP32[$0 + 16 >> 2] = 0;
3508  HEAP32[$0 + 20 >> 2] = 0;
3509 }
3510
3511 function FLAC__bitreader_init($0, $1) {
3512  var $2 = 0;
3513  HEAP32[$0 + 8 >> 2] = 0;
3514  HEAP32[$0 + 12 >> 2] = 0;
3515  HEAP32[$0 + 4 >> 2] = 2048;
3516  HEAP32[$0 + 16 >> 2] = 0;
3517  HEAP32[$0 + 20 >> 2] = 0;
3518  $2 = dlmalloc(8192);
3519  HEAP32[$0 >> 2] = $2;
3520  if (!$2) {
3521   return 0
3522  }
3523  HEAP32[$0 + 40 >> 2] = $1;
3524  HEAP32[$0 + 36 >> 2] = 7;
3525  return 1;
3526 }
3527
3528 function FLAC__bitreader_get_read_crc16($0) {
3529  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
3530  $5 = HEAP32[$0 + 16 >> 2];
3531  $2 = HEAP32[$0 + 28 >> 2];
3532  label$1 : {
3533   if ($5 >>> 0 <= $2 >>> 0) {
3534    $4 = $2;
3535    break label$1;
3536   }
3537   $1 = HEAP32[$0 + 32 >> 2];
3538   if (!$1) {
3539    $4 = $2;
3540    break label$1;
3541   }
3542   $4 = $2 + 1 | 0;
3543   HEAP32[$0 + 28 >> 2] = $4;
3544   $3 = HEAP32[$0 + 24 >> 2];
3545   if ($1 >>> 0 <= 31) {
3546    $2 = HEAP32[HEAP32[$0 >> 2] + ($2 << 2) >> 2];
3547    while (1) {
3548     $3 = HEAPU16[(($2 >>> 24 - $1 & 255 ^ $3 >>> 8) << 1) + 1280 >> 1] ^ $3 << 8 & 65280;
3549     $7 = $1 >>> 0 < 24;
3550     $6 = $1 + 8 | 0;
3551     $1 = $6;
3552     if ($7) {
3553      continue
3554     }
3555     break;
3556    };
3557    HEAP32[$0 + 32 >> 2] = $6;
3558   }
3559   HEAP32[$0 + 32 >> 2] = 0;
3560   HEAP32[$0 + 24 >> 2] = $3;
3561  }
3562  $1 = FLAC__crc16_update_words32(HEAP32[$0 >> 2] + ($4 << 2) | 0, $5 - $4 | 0, HEAPU16[$0 + 24 >> 1]);
3563  HEAP32[$0 + 28 >> 2] = 0;
3564  HEAP32[$0 + 24 >> 2] = $1;
3565  $2 = HEAP32[$0 + 20 >> 2];
3566  label$6 : {
3567   if (!$2) {
3568    break label$6
3569   }
3570   $3 = HEAP32[$0 + 32 >> 2];
3571   if ($3 >>> 0 >= $2 >>> 0) {
3572    break label$6
3573   }
3574   $4 = HEAP32[HEAP32[$0 >> 2] + (HEAP32[$0 + 16 >> 2] << 2) >> 2];
3575   while (1) {
3576    $1 = HEAPU16[(($4 >>> 24 - $3 & 255 ^ $1 >>> 8) << 1) + 1280 >> 1] ^ $1 << 8 & 65280;
3577    $3 = $3 + 8 | 0;
3578    if ($3 >>> 0 < $2 >>> 0) {
3579     continue
3580    }
3581    break;
3582   };
3583   HEAP32[$0 + 32 >> 2] = $3;
3584   HEAP32[$0 + 24 >> 2] = $1;
3585  }
3586  return $1;
3587 }
3588
3589 function FLAC__bitreader_is_consumed_byte_aligned($0) {
3590  return !(HEAPU8[$0 + 20 | 0] & 7);
3591 }
3592
3593 function FLAC__bitreader_bits_left_for_byte_alignment($0) {
3594  return 8 - (HEAP32[$0 + 20 >> 2] & 7) | 0;
3595 }
3596
3597 function FLAC__bitreader_read_raw_uint32($0, $1, $2) {
3598  var $3 = 0, $4 = 0, $5 = 0;
3599  label$1 : {
3600   if ($2) {
3601    label$4 : {
3602     while (1) {
3603      $5 = HEAP32[$0 + 8 >> 2];
3604      $4 = HEAP32[$0 + 16 >> 2];
3605      $3 = HEAP32[$0 + 20 >> 2];
3606      if ((($5 - $4 << 5) + (HEAP32[$0 + 12 >> 2] << 3) | 0) - $3 >>> 0 >= $2 >>> 0) {
3607       break label$4
3608      }
3609      if (bitreader_read_from_client_($0)) {
3610       continue
3611      }
3612      break;
3613     };
3614     return 0;
3615    }
3616    if ($5 >>> 0 > $4 >>> 0) {
3617     if ($3) {
3618      $5 = HEAP32[$0 >> 2];
3619      $4 = HEAP32[$5 + ($4 << 2) >> 2] & -1 >>> $3;
3620      $3 = 32 - $3 | 0;
3621      if ($3 >>> 0 > $2 >>> 0) {
3622       HEAP32[$1 >> 2] = $4 >>> $3 - $2;
3623       HEAP32[$0 + 20 >> 2] = HEAP32[$0 + 20 >> 2] + $2;
3624       break label$1;
3625      }
3626      HEAP32[$1 >> 2] = $4;
3627      HEAP32[$0 + 20 >> 2] = 0;
3628      HEAP32[$0 + 16 >> 2] = HEAP32[$0 + 16 >> 2] + 1;
3629      $2 = $2 - $3 | 0;
3630      if (!$2) {
3631       break label$1
3632      }
3633      $3 = HEAP32[$1 >> 2] << $2;
3634      HEAP32[$1 >> 2] = $3;
3635      HEAP32[$1 >> 2] = $3 | HEAP32[(HEAP32[$0 + 16 >> 2] << 2) + $5 >> 2] >>> 32 - $2;
3636      HEAP32[$0 + 20 >> 2] = $2;
3637      return 1;
3638     }
3639     $3 = HEAP32[HEAP32[$0 >> 2] + ($4 << 2) >> 2];
3640     if ($2 >>> 0 <= 31) {
3641      HEAP32[$1 >> 2] = $3 >>> 32 - $2;
3642      HEAP32[$0 + 20 >> 2] = $2;
3643      break label$1;
3644     }
3645     HEAP32[$1 >> 2] = $3;
3646     HEAP32[$0 + 16 >> 2] = HEAP32[$0 + 16 >> 2] + 1;
3647     return 1;
3648    }
3649    $4 = HEAP32[HEAP32[$0 >> 2] + ($4 << 2) >> 2];
3650    if ($3) {
3651     HEAP32[$1 >> 2] = ($4 & -1 >>> $3) >>> 32 - ($2 + $3 | 0);
3652     HEAP32[$0 + 20 >> 2] = HEAP32[$0 + 20 >> 2] + $2;
3653     break label$1;
3654    }
3655    HEAP32[$1 >> 2] = $4 >>> 32 - $2;
3656    HEAP32[$0 + 20 >> 2] = HEAP32[$0 + 20 >> 2] + $2;
3657    break label$1;
3658   }
3659   HEAP32[$1 >> 2] = 0;
3660  }
3661  return 1;
3662 }
3663
3664 function bitreader_read_from_client_($0) {
3665  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
3666  $6 = global$0 - 16 | 0;
3667  global$0 = $6;
3668  $5 = HEAP32[$0 + 16 >> 2];
3669  label$1 : {
3670   if (!$5) {
3671    $2 = HEAP32[$0 + 8 >> 2];
3672    break label$1;
3673   }
3674   $1 = HEAP32[$0 + 28 >> 2];
3675   label$3 : {
3676    if ($5 >>> 0 <= $1 >>> 0) {
3677     $3 = $1;
3678     break label$3;
3679    }
3680    $2 = HEAP32[$0 + 32 >> 2];
3681    if (!$2) {
3682     $3 = $1;
3683     break label$3;
3684    }
3685    $3 = $1 + 1 | 0;
3686    HEAP32[$0 + 28 >> 2] = $3;
3687    $4 = HEAP32[$0 + 24 >> 2];
3688    if ($2 >>> 0 <= 31) {
3689     $1 = HEAP32[HEAP32[$0 >> 2] + ($1 << 2) >> 2];
3690     while (1) {
3691      $4 = HEAPU16[(($1 >>> 24 - $2 & 255 ^ $4 >>> 8) << 1) + 1280 >> 1] ^ $4 << 8 & 65280;
3692      $7 = $2 >>> 0 < 24;
3693      $8 = $2 + 8 | 0;
3694      $2 = $8;
3695      if ($7) {
3696       continue
3697      }
3698      break;
3699     };
3700     HEAP32[$0 + 32 >> 2] = $8;
3701    }
3702    HEAP32[$0 + 32 >> 2] = 0;
3703    HEAP32[$0 + 24 >> 2] = $4;
3704   }
3705   $1 = FLAC__crc16_update_words32(HEAP32[$0 >> 2] + ($3 << 2) | 0, $5 - $3 | 0, HEAPU16[$0 + 24 >> 1]);
3706   HEAP32[$0 + 28 >> 2] = 0;
3707   HEAP32[$0 + 24 >> 2] = $1;
3708   $3 = HEAP32[$0 >> 2];
3709   $1 = HEAP32[$0 + 16 >> 2];
3710   memmove($3, $3 + ($1 << 2) | 0, (HEAP32[$0 + 8 >> 2] - $1 | 0) + (HEAP32[$0 + 12 >> 2] != 0) << 2);
3711   HEAP32[$0 + 16 >> 2] = 0;
3712   $2 = HEAP32[$0 + 8 >> 2] - $1 | 0;
3713   HEAP32[$0 + 8 >> 2] = $2;
3714  }
3715  $1 = HEAP32[$0 + 12 >> 2];
3716  $3 = (HEAP32[$0 + 4 >> 2] - $2 << 2) - $1 | 0;
3717  HEAP32[$6 + 12 >> 2] = $3;
3718  $4 = 0;
3719  label$8 : {
3720   if (!$3) {
3721    break label$8
3722   }
3723   $3 = HEAP32[$0 >> 2] + ($2 << 2) | 0;
3724   $2 = $3 + $1 | 0;
3725   if ($1) {
3726    $1 = HEAP32[$3 >> 2];
3727    HEAP32[$3 >> 2] = $1 << 24 | $1 << 8 & 16711680 | ($1 >>> 8 & 65280 | $1 >>> 24);
3728   }
3729   if (!FUNCTION_TABLE[HEAP32[$0 + 36 >> 2]]($2, $6 + 12 | 0, HEAP32[$0 + 40 >> 2])) {
3730    break label$8
3731   }
3732   $5 = HEAP32[$6 + 12 >> 2];
3733   $2 = HEAP32[$0 + 12 >> 2];
3734   $4 = HEAP32[$0 + 8 >> 2];
3735   $1 = $4 << 2;
3736   $3 = ($5 + ($2 + $1 | 0) | 0) + 3 >>> 2 | 0;
3737   $8 = $0;
3738   if ($4 >>> 0 < $3 >>> 0) {
3739    $2 = HEAP32[$0 >> 2];
3740    while (1) {
3741     $7 = $2 + ($4 << 2) | 0;
3742     $1 = HEAP32[$7 >> 2];
3743     HEAP32[$7 >> 2] = $1 << 8 & 16711680 | $1 << 24 | ($1 >>> 8 & 65280 | $1 >>> 24);
3744     $4 = $4 + 1 | 0;
3745     if (($3 | 0) != ($4 | 0)) {
3746      continue
3747     }
3748     break;
3749    };
3750    $2 = HEAP32[$0 + 12 >> 2];
3751    $1 = HEAP32[$0 + 8 >> 2] << 2;
3752   }
3753   $1 = $1 + ($2 + $5 | 0) | 0;
3754   HEAP32[$8 + 12 >> 2] = $1 & 3;
3755   HEAP32[$0 + 8 >> 2] = $1 >>> 2;
3756   $4 = 1;
3757  }
3758  global$0 = $6 + 16 | 0;
3759  return $4;
3760 }
3761
3762 function FLAC__bitreader_read_raw_int32($0, $1, $2) {
3763  var $3 = 0, $4 = 0;
3764  $3 = global$0 - 16 | 0;
3765  global$0 = $3;
3766  $4 = 0;
3767  label$1 : {
3768   if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, $2)) {
3769    break label$1
3770   }
3771   $0 = 1 << $2 + -1;
3772   HEAP32[$1 >> 2] = ($0 ^ HEAP32[$3 + 12 >> 2]) - $0;
3773   $4 = 1;
3774  }
3775  $0 = $4;
3776  global$0 = $3 + 16 | 0;
3777  return $0;
3778 }
3779
3780 function FLAC__bitreader_read_raw_uint64($0, $1, $2) {
3781  var $3 = 0, $4 = 0, $5 = 0, $6 = 0;
3782  $3 = global$0 - 16 | 0;
3783  global$0 = $3;
3784  $4 = $1;
3785  $5 = $1;
3786  label$1 : {
3787   label$2 : {
3788    if ($2 >>> 0 >= 33) {
3789     if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, $2 + -32 | 0)) {
3790      break label$1
3791     }
3792     if (!FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, 32)) {
3793      break label$1
3794     }
3795     $0 = HEAP32[$3 + 12 >> 2];
3796     $2 = 0;
3797     HEAP32[$1 >> 2] = $2;
3798     HEAP32[$1 + 4 >> 2] = $0;
3799     $1 = HEAP32[$3 + 8 >> 2] | $2;
3800     break label$2;
3801    }
3802    if (!FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, $2)) {
3803     break label$1
3804    }
3805    $0 = 0;
3806    $1 = HEAP32[$3 + 8 >> 2];
3807   }
3808   HEAP32[$5 >> 2] = $1;
3809   HEAP32[$4 + 4 >> 2] = $0;
3810   $6 = 1;
3811  }
3812  global$0 = $3 + 16 | 0;
3813  return $6;
3814 }
3815
3816 function FLAC__bitreader_read_uint32_little_endian($0, $1) {
3817  var $2 = 0, $3 = 0, $4 = 0;
3818  $2 = global$0 - 16 | 0;
3819  global$0 = $2;
3820  HEAP32[$2 + 8 >> 2] = 0;
3821  label$1 : {
3822   if (!FLAC__bitreader_read_raw_uint32($0, $2 + 8 | 0, 8)) {
3823    break label$1
3824   }
3825   if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) {
3826    break label$1
3827   }
3828   $3 = HEAP32[$2 + 8 >> 2] | HEAP32[$2 + 12 >> 2] << 8;
3829   HEAP32[$2 + 8 >> 2] = $3;
3830   if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) {
3831    break label$1
3832   }
3833   $3 = $3 | HEAP32[$2 + 12 >> 2] << 16;
3834   HEAP32[$2 + 8 >> 2] = $3;
3835   if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) {
3836    break label$1
3837   }
3838   $0 = $3 | HEAP32[$2 + 12 >> 2] << 24;
3839   HEAP32[$2 + 8 >> 2] = $0;
3840   HEAP32[$1 >> 2] = $0;
3841   $4 = 1;
3842  }
3843  global$0 = $2 + 16 | 0;
3844  return $4;
3845 }
3846
3847 function FLAC__bitreader_skip_bits_no_crc($0, $1) {
3848  var $2 = 0, $3 = 0, $4 = 0, $5 = 0;
3849  $3 = global$0 - 16 | 0;
3850  global$0 = $3;
3851  $4 = 1;
3852  label$1 : {
3853   if (!$1) {
3854    break label$1
3855   }
3856   $2 = HEAP32[$0 + 20 >> 2] & 7;
3857   label$2 : {
3858    if ($2) {
3859     $2 = 8 - $2 | 0;
3860     $2 = $2 >>> 0 < $1 >>> 0 ? $2 : $1;
3861     if (!FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, $2)) {
3862      break label$2
3863     }
3864     $1 = $1 - $2 | 0;
3865    }
3866    $2 = $1 >>> 3 | 0;
3867    if ($2) {
3868     while (1) {
3869      label$7 : {
3870       if (!HEAP32[$0 + 20 >> 2]) {
3871        if ($2 >>> 0 > 3) {
3872         while (1) {
3873          $5 = HEAP32[$0 + 16 >> 2];
3874          label$11 : {
3875           if ($5 >>> 0 < HEAPU32[$0 + 8 >> 2]) {
3876            HEAP32[$0 + 16 >> 2] = $5 + 1;
3877            $2 = $2 + -4 | 0;
3878            break label$11;
3879           }
3880           if (!bitreader_read_from_client_($0)) {
3881            break label$2
3882           }
3883          }
3884          if ($2 >>> 0 > 3) {
3885           continue
3886          }
3887          break;
3888         };
3889         if (!$2) {
3890          break label$7
3891         }
3892        }
3893        while (1) {
3894         if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, 8)) {
3895          break label$2
3896         }
3897         $2 = $2 + -1 | 0;
3898         if ($2) {
3899          continue
3900         }
3901         break;
3902        };
3903        break label$7;
3904       }
3905       if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, 8)) {
3906        break label$2
3907       }
3908       $2 = $2 + -1 | 0;
3909       if ($2) {
3910        continue
3911       }
3912      }
3913      break;
3914     };
3915     $1 = $1 & 7;
3916    }
3917    if (!$1) {
3918     break label$1
3919    }
3920    if (FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, $1)) {
3921     break label$1
3922    }
3923   }
3924   $4 = 0;
3925  }
3926  global$0 = $3 + 16 | 0;
3927  return $4;
3928 }
3929
3930 function FLAC__bitreader_skip_byte_block_aligned_no_crc($0, $1) {
3931  var $2 = 0, $3 = 0, $4 = 0;
3932  $2 = global$0 - 16 | 0;
3933  global$0 = $2;
3934  $3 = 1;
3935  label$1 : {
3936   if (!$1) {
3937    break label$1
3938   }
3939   while (1) {
3940    label$3 : {
3941     if (!HEAP32[$0 + 20 >> 2]) {
3942      label$5 : {
3943       if ($1 >>> 0 < 4) {
3944        break label$5
3945       }
3946       while (1) {
3947        $4 = HEAP32[$0 + 16 >> 2];
3948        label$7 : {
3949         if ($4 >>> 0 < HEAPU32[$0 + 8 >> 2]) {
3950          HEAP32[$0 + 16 >> 2] = $4 + 1;
3951          $1 = $1 + -4 | 0;
3952          break label$7;
3953         }
3954         if (!bitreader_read_from_client_($0)) {
3955          break label$3
3956         }
3957        }
3958        if ($1 >>> 0 > 3) {
3959         continue
3960        }
3961        break;
3962       };
3963       if ($1) {
3964        break label$5
3965       }
3966       break label$1;
3967      }
3968      while (1) {
3969       if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) {
3970        break label$3
3971       }
3972       $1 = $1 + -1 | 0;
3973       if ($1) {
3974        continue
3975       }
3976       break;
3977      };
3978      break label$1;
3979     }
3980     if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) {
3981      break label$3
3982     }
3983     $1 = $1 + -1 | 0;
3984     if ($1) {
3985      continue
3986     }
3987     break label$1;
3988    }
3989    break;
3990   };
3991   $3 = 0;
3992  }
3993  global$0 = $2 + 16 | 0;
3994  return $3;
3995 }
3996
3997 function FLAC__bitreader_read_byte_block_aligned_no_crc($0, $1, $2) {
3998  var $3 = 0, $4 = 0;
3999  $4 = global$0 - 16 | 0;
4000  global$0 = $4;
4001  label$1 : {
4002   if (!$2) {
4003    $3 = 1;
4004    break label$1;
4005   }
4006   while (1) {
4007    if (!HEAP32[$0 + 20 >> 2]) {
4008     label$5 : {
4009      if ($2 >>> 0 < 4) {
4010       break label$5
4011      }
4012      while (1) {
4013       label$7 : {
4014        $3 = HEAP32[$0 + 16 >> 2];
4015        if ($3 >>> 0 < HEAPU32[$0 + 8 >> 2]) {
4016         HEAP32[$0 + 16 >> 2] = $3 + 1;
4017         $3 = HEAP32[HEAP32[$0 >> 2] + ($3 << 2) >> 2];
4018         $3 = $3 << 24 | $3 << 8 & 16711680 | ($3 >>> 8 & 65280 | $3 >>> 24);
4019         HEAP8[$1 | 0] = $3;
4020         HEAP8[$1 + 1 | 0] = $3 >>> 8;
4021         HEAP8[$1 + 2 | 0] = $3 >>> 16;
4022         HEAP8[$1 + 3 | 0] = $3 >>> 24;
4023         $2 = $2 + -4 | 0;
4024         $1 = $1 + 4 | 0;
4025         break label$7;
4026        }
4027        if (bitreader_read_from_client_($0)) {
4028         break label$7
4029        }
4030        $3 = 0;
4031        break label$1;
4032       }
4033       if ($2 >>> 0 > 3) {
4034        continue
4035       }
4036       break;
4037      };
4038      if ($2) {
4039       break label$5
4040      }
4041      $3 = 1;
4042      break label$1;
4043     }
4044     while (1) {
4045      if (!FLAC__bitreader_read_raw_uint32($0, $4 + 12 | 0, 8)) {
4046       $3 = 0;
4047       break label$1;
4048      }
4049      HEAP8[$1 | 0] = HEAP32[$4 + 12 >> 2];
4050      $3 = 1;
4051      $1 = $1 + 1 | 0;
4052      $2 = $2 + -1 | 0;
4053      if ($2) {
4054       continue
4055      }
4056      break;
4057     };
4058     break label$1;
4059    }
4060    if (!FLAC__bitreader_read_raw_uint32($0, $4 + 12 | 0, 8)) {
4061     $3 = 0;
4062     break label$1;
4063    }
4064    HEAP8[$1 | 0] = HEAP32[$4 + 12 >> 2];
4065    $3 = 1;
4066    $1 = $1 + 1 | 0;
4067    $2 = $2 + -1 | 0;
4068    if ($2) {
4069     continue
4070    }
4071    break;
4072   };
4073  }
4074  global$0 = $4 + 16 | 0;
4075  return $3;
4076 }
4077
4078 function FLAC__bitreader_read_unary_unsigned($0, $1) {
4079  var $2 = 0, $3 = 0, $4 = 0;
4080  HEAP32[$1 >> 2] = 0;
4081  label$1 : {
4082   while (1) {
4083    $3 = HEAP32[$0 + 16 >> 2];
4084    label$3 : {
4085     if ($3 >>> 0 >= HEAPU32[$0 + 8 >> 2]) {
4086      $2 = HEAP32[$0 + 20 >> 2];
4087      break label$3;
4088     }
4089     $2 = HEAP32[$0 + 20 >> 2];
4090     $4 = HEAP32[$0 >> 2];
4091     while (1) {
4092      $3 = HEAP32[$4 + ($3 << 2) >> 2] << $2;
4093      if ($3) {
4094       $2 = $1;
4095       $4 = HEAP32[$1 >> 2];
4096       $1 = Math_clz32($3);
4097       HEAP32[$2 >> 2] = $4 + $1;
4098       $2 = ($1 + HEAP32[$0 + 20 >> 2] | 0) + 1 | 0;
4099       HEAP32[$0 + 20 >> 2] = $2;
4100       $1 = 1;
4101       if ($2 >>> 0 < 32) {
4102        break label$1
4103       }
4104       HEAP32[$0 + 20 >> 2] = 0;
4105       HEAP32[$0 + 16 >> 2] = HEAP32[$0 + 16 >> 2] + 1;
4106       return 1;
4107      }
4108      HEAP32[$1 >> 2] = (HEAP32[$1 >> 2] - $2 | 0) + 32;
4109      $2 = 0;
4110      HEAP32[$0 + 20 >> 2] = 0;
4111      $3 = HEAP32[$0 + 16 >> 2] + 1 | 0;
4112      HEAP32[$0 + 16 >> 2] = $3;
4113      if ($3 >>> 0 < HEAPU32[$0 + 8 >> 2]) {
4114       continue
4115      }
4116      break;
4117     };
4118    }
4119    $4 = HEAP32[$0 + 12 >> 2] << 3;
4120    if ($4 >>> 0 > $2 >>> 0) {
4121     $3 = (HEAP32[HEAP32[$0 >> 2] + ($3 << 2) >> 2] & -1 << 32 - $4) << $2;
4122     if ($3) {
4123      $2 = $1;
4124      $4 = HEAP32[$1 >> 2];
4125      $1 = Math_clz32($3);
4126      HEAP32[$2 >> 2] = $4 + $1;
4127      HEAP32[$0 + 20 >> 2] = ($1 + HEAP32[$0 + 20 >> 2] | 0) + 1;
4128      return 1;
4129     }
4130     HEAP32[$1 >> 2] = HEAP32[$1 >> 2] + ($4 - $2 | 0);
4131     HEAP32[$0 + 20 >> 2] = $4;
4132    }
4133    if (bitreader_read_from_client_($0)) {
4134     continue
4135    }
4136    break;
4137   };
4138   $1 = 0;
4139  }
4140  return $1;
4141 }
4142
4143 function FLAC__bitreader_read_rice_signed_block($0, $1, $2, $3) {
4144  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0;
4145  $6 = global$0 - 16 | 0;
4146  global$0 = $6;
4147  $12 = ($2 << 2) + $1 | 0;
4148  label$1 : {
4149   if (!$3) {
4150    $14 = 1;
4151    if (($2 | 0) < 1) {
4152     break label$1
4153    }
4154    while (1) {
4155     if (!FLAC__bitreader_read_unary_unsigned($0, $6 + 8 | 0)) {
4156      $14 = 0;
4157      break label$1;
4158     }
4159     $2 = HEAP32[$6 + 8 >> 2];
4160     HEAP32[$1 >> 2] = $2 >>> 1 ^ 0 - ($2 & 1);
4161     $1 = $1 + 4 | 0;
4162     if ($1 >>> 0 < $12 >>> 0) {
4163      continue
4164     }
4165     break;
4166    };
4167    break label$1;
4168   }
4169   label$5 : {
4170    label$6 : {
4171     $4 = HEAP32[$0 + 16 >> 2];
4172     $10 = HEAP32[$0 + 8 >> 2];
4173     if ($4 >>> 0 >= $10 >>> 0) {
4174      break label$6
4175     }
4176     $11 = HEAP32[$0 >> 2];
4177     $13 = HEAP32[$0 + 20 >> 2];
4178     $9 = HEAP32[$11 + ($4 << 2) >> 2] << $13;
4179     $2 = 0;
4180     break label$5;
4181    }
4182    $2 = 1;
4183   }
4184   while (1) {
4185    label$9 : {
4186     label$10 : {
4187      label$11 : {
4188       label$12 : {
4189        if (!$2) {
4190         $5 = 32 - $13 | 0;
4191         label$14 : {
4192          if ($1 >>> 0 < $12 >>> 0) {
4193           $15 = 32 - $3 | 0;
4194           while (1) {
4195            $2 = $4;
4196            $7 = $5;
4197            label$17 : {
4198             if ($9) {
4199              $7 = Math_clz32($9);
4200              $8 = $7;
4201              break label$17;
4202             }
4203             while (1) {
4204              $2 = $2 + 1 | 0;
4205              if ($2 >>> 0 >= $10 >>> 0) {
4206               break label$14
4207              }
4208              $9 = HEAP32[($2 << 2) + $11 >> 2];
4209              $8 = Math_clz32($9);
4210              $7 = $8 + $7 | 0;
4211              if (!$9) {
4212               continue
4213              }
4214              break;
4215             };
4216            }
4217            $4 = $9 << $8 << 1;
4218            $8 = $4 >>> $15 | 0;
4219            HEAP32[$6 + 8 >> 2] = $7;
4220            $5 = ($7 ^ -1) + $5 & 31;
4221            label$20 : {
4222             if ($5 >>> 0 >= $3 >>> 0) {
4223              $9 = $4 << $3;
4224              $5 = $5 - $3 | 0;
4225              $4 = $2;
4226              break label$20;
4227             }
4228             $4 = $2 + 1 | 0;
4229             if ($4 >>> 0 >= $10 >>> 0) {
4230              break label$12
4231             }
4232             $2 = HEAP32[($4 << 2) + $11 >> 2];
4233             $5 = $5 + $15 | 0;
4234             $9 = $2 << 32 - $5;
4235             $8 = $2 >>> $5 | $8;
4236            }
4237            HEAP32[$6 + 12 >> 2] = $8;
4238            $2 = $7 << $3 | $8;
4239            HEAP32[$1 >> 2] = $2 >>> 1 ^ 0 - ($2 & 1);
4240            $1 = $1 + 4 | 0;
4241            if ($1 >>> 0 < $12 >>> 0) {
4242             continue
4243            }
4244            break;
4245           };
4246          }
4247          $1 = $4 >>> 0 < $10 >>> 0;
4248          HEAP32[$0 + 16 >> 2] = ($1 & !$5) + $4;
4249          HEAP32[$0 + 20 >> 2] = 32 - ($5 ? $5 : $1 << 5);
4250          $14 = 1;
4251          break label$1;
4252         }
4253         HEAP32[$0 + 20 >> 2] = 0;
4254         $2 = $4 + 1 | 0;
4255         HEAP32[$0 + 16 >> 2] = $10 >>> 0 > $2 >>> 0 ? $10 : $2;
4256         break label$10;
4257        }
4258        if (!FLAC__bitreader_read_unary_unsigned($0, $6 + 8 | 0)) {
4259         break label$1
4260        }
4261        $7 = HEAP32[$6 + 8 >> 2] + $7 | 0;
4262        HEAP32[$6 + 8 >> 2] = $7;
4263        $8 = 0;
4264        $5 = 0;
4265        break label$11;
4266       }
4267       HEAP32[$0 + 16 >> 2] = $4;
4268       HEAP32[$0 + 20 >> 2] = 0;
4269      }
4270      if (!FLAC__bitreader_read_raw_uint32($0, $6 + 12 | 0, $3 - $5 | 0)) {
4271       break label$1
4272      }
4273      $2 = $7 << $3;
4274      $4 = HEAP32[$6 + 12 >> 2] | $8;
4275      HEAP32[$6 + 12 >> 2] = $4;
4276      $7 = 0;
4277      $2 = $2 | $4;
4278      HEAP32[$1 >> 2] = $2 >>> 1 ^ 0 - ($2 & 1);
4279      $11 = HEAP32[$0 >> 2];
4280      $4 = HEAP32[$0 + 16 >> 2];
4281      $13 = HEAP32[$0 + 20 >> 2];
4282      $9 = HEAP32[$11 + ($4 << 2) >> 2] << $13;
4283      $10 = HEAP32[$0 + 8 >> 2];
4284      $1 = $1 + 4 | 0;
4285      if ($4 >>> 0 < $10 >>> 0 | $1 >>> 0 >= $12 >>> 0) {
4286       break label$9
4287      }
4288     }
4289     $2 = 1;
4290     continue;
4291    }
4292    $2 = 0;
4293    continue;
4294   };
4295  }
4296  global$0 = $6 + 16 | 0;
4297  return $14;
4298 }
4299
4300 function FLAC__bitreader_read_utf8_uint32($0, $1, $2, $3) {
4301  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
4302  $7 = global$0 - 16 | 0;
4303  global$0 = $7;
4304  label$1 : {
4305   if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {
4306    break label$1
4307   }
4308   $4 = HEAP32[$7 + 12 >> 2];
4309   if ($2) {
4310    $5 = HEAP32[$3 >> 2];
4311    HEAP32[$3 >> 2] = $5 + 1;
4312    HEAP8[$2 + $5 | 0] = $4;
4313   }
4314   label$3 : {
4315    label$4 : {
4316     label$5 : {
4317      label$6 : {
4318       if (!($4 & 128)) {
4319        break label$6
4320       }
4321       label$7 : {
4322        if (!(!($4 & 192) | $4 & 32)) {
4323         $6 = 31;
4324         $5 = 1;
4325         break label$7;
4326        }
4327        if (!(!($4 & 224) | $4 & 16)) {
4328         $6 = 15;
4329         $5 = 2;
4330         break label$7;
4331        }
4332        if (!(!($4 & 240) | $4 & 8)) {
4333         $6 = 7;
4334         $5 = 3;
4335         break label$7;
4336        }
4337        if ($4 & 248) {
4338         $6 = 3;
4339         $5 = 4;
4340         if (!($4 & 4)) {
4341          break label$7
4342         }
4343        }
4344        if (!($4 & 252) | $4 & 2) {
4345         break label$5
4346        }
4347        $6 = 1;
4348        $5 = 5;
4349       }
4350       $4 = $4 & $6;
4351       if (!$2) {
4352        while (1) {
4353         if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {
4354          break label$1
4355         }
4356         $2 = HEAP32[$7 + 12 >> 2];
4357         if (($2 & 192) != 128) {
4358          break label$4
4359         }
4360         $4 = $2 & 63 | $4 << 6;
4361         $5 = $5 + -1 | 0;
4362         if ($5) {
4363          continue
4364         }
4365         break label$6;
4366        }
4367       }
4368       while (1) {
4369        if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {
4370         break label$1
4371        }
4372        $6 = HEAP32[$7 + 12 >> 2];
4373        $8 = HEAP32[$3 >> 2];
4374        HEAP32[$3 >> 2] = $8 + 1;
4375        HEAP8[$2 + $8 | 0] = $6;
4376        if (($6 & 192) != 128) {
4377         break label$4
4378        }
4379        $4 = $6 & 63 | $4 << 6;
4380        $5 = $5 + -1 | 0;
4381        if ($5) {
4382         continue
4383        }
4384        break;
4385       };
4386      }
4387      HEAP32[$1 >> 2] = $4;
4388      break label$3;
4389     }
4390     HEAP32[$1 >> 2] = -1;
4391     break label$3;
4392    }
4393    HEAP32[$1 >> 2] = -1;
4394   }
4395   $9 = 1;
4396  }
4397  global$0 = $7 + 16 | 0;
4398  return $9;
4399 }
4400
4401 function FLAC__bitreader_read_utf8_uint64($0, $1, $2, $3) {
4402  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
4403  $7 = global$0 - 16 | 0;
4404  global$0 = $7;
4405  label$1 : {
4406   if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {
4407    break label$1
4408   }
4409   $4 = HEAP32[$7 + 12 >> 2];
4410   if ($2) {
4411    $6 = HEAP32[$3 >> 2];
4412    HEAP32[$3 >> 2] = $6 + 1;
4413    HEAP8[$2 + $6 | 0] = $4;
4414   }
4415   label$4 : {
4416    label$5 : {
4417     label$6 : {
4418      label$7 : {
4419       if ($4 & 128) {
4420        if (!(!($4 & 192) | $4 & 32)) {
4421         $4 = $4 & 31;
4422         $5 = 1;
4423         break label$7;
4424        }
4425        if (!(!($4 & 224) | $4 & 16)) {
4426         $4 = $4 & 15;
4427         $5 = 2;
4428         break label$7;
4429        }
4430        if (!(!($4 & 240) | $4 & 8)) {
4431         $4 = $4 & 7;
4432         $5 = 3;
4433         break label$7;
4434        }
4435        if (!(!($4 & 248) | $4 & 4)) {
4436         $4 = $4 & 3;
4437         $5 = 4;
4438         break label$7;
4439        }
4440        if (!(!($4 & 252) | $4 & 2)) {
4441         $4 = $4 & 1;
4442         $5 = 5;
4443         break label$7;
4444        }
4445        $5 = 1;
4446        if (!(!($4 & 254) | $4 & 1)) {
4447         $5 = 6;
4448         $4 = 0;
4449         break label$7;
4450        }
4451        HEAP32[$1 >> 2] = -1;
4452        HEAP32[$1 + 4 >> 2] = -1;
4453        break label$1;
4454       }
4455       $6 = 0;
4456       break label$6;
4457      }
4458      $6 = 0;
4459      if (!$2) {
4460       while (1) {
4461        if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {
4462         $5 = 0;
4463         break label$1;
4464        }
4465        $2 = HEAP32[$7 + 12 >> 2];
4466        if (($2 & 192) != 128) {
4467         break label$5
4468        }
4469        $2 = $2 & 63;
4470        $6 = $6 << 6 | $4 >>> 26;
4471        $4 = $2 | $4 << 6;
4472        $5 = $5 + -1 | 0;
4473        if ($5) {
4474         continue
4475        }
4476        break label$6;
4477       }
4478      }
4479      while (1) {
4480       if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {
4481        $5 = 0;
4482        break label$1;
4483       }
4484       $8 = HEAP32[$7 + 12 >> 2];
4485       $9 = HEAP32[$3 >> 2];
4486       HEAP32[$3 >> 2] = $9 + 1;
4487       HEAP8[$2 + $9 | 0] = $8;
4488       if (($8 & 192) != 128) {
4489        break label$5
4490       }
4491       $6 = $6 << 6 | $4 >>> 26;
4492       $4 = $8 & 63 | $4 << 6;
4493       $5 = $5 + -1 | 0;
4494       if ($5) {
4495        continue
4496       }
4497       break;
4498      };
4499     }
4500     HEAP32[$1 >> 2] = $4;
4501     HEAP32[$1 + 4 >> 2] = $6;
4502     break label$4;
4503    }
4504    HEAP32[$1 >> 2] = -1;
4505    HEAP32[$1 + 4 >> 2] = -1;
4506   }
4507   $5 = 1;
4508  }
4509  global$0 = $7 + 16 | 0;
4510  return $5;
4511 }
4512
4513 function qsort($0, $1) {
4514  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
4515  $2 = global$0 - 208 | 0;
4516  global$0 = $2;
4517  HEAP32[$2 + 8 >> 2] = 1;
4518  HEAP32[$2 + 12 >> 2] = 0;
4519  label$1 : {
4520   $5 = Math_imul($1, 24);
4521   if (!$5) {
4522    break label$1
4523   }
4524   HEAP32[$2 + 16 >> 2] = 24;
4525   HEAP32[$2 + 20 >> 2] = 24;
4526   $1 = 24;
4527   $4 = $1;
4528   $3 = 2;
4529   while (1) {
4530    $6 = $4 + 24 | 0;
4531    $4 = $1;
4532    $1 = $1 + $6 | 0;
4533    HEAP32[($2 + 16 | 0) + ($3 << 2) >> 2] = $1;
4534    $3 = $3 + 1 | 0;
4535    if ($1 >>> 0 < $5 >>> 0) {
4536     continue
4537    }
4538    break;
4539   };
4540   $4 = ($0 + $5 | 0) + -24 | 0;
4541   label$3 : {
4542    if ($4 >>> 0 <= $0 >>> 0) {
4543     $3 = 1;
4544     $1 = 1;
4545     break label$3;
4546    }
4547    $3 = 1;
4548    $1 = 1;
4549    while (1) {
4550     label$6 : {
4551      if (($3 & 3) == 3) {
4552       sift($0, $1, $2 + 16 | 0);
4553       shr($2 + 8 | 0, 2);
4554       $1 = $1 + 2 | 0;
4555       break label$6;
4556      }
4557      $3 = $1 + -1 | 0;
4558      label$8 : {
4559       if (HEAPU32[($2 + 16 | 0) + ($3 << 2) >> 2] >= $4 - $0 >>> 0) {
4560        trinkle($0, $2 + 8 | 0, $1, 0, $2 + 16 | 0);
4561        break label$8;
4562       }
4563       sift($0, $1, $2 + 16 | 0);
4564      }
4565      if (($1 | 0) == 1) {
4566       shl($2 + 8 | 0, 1);
4567       $1 = 0;
4568       break label$6;
4569      }
4570      shl($2 + 8 | 0, $3);
4571      $1 = 1;
4572     }
4573     $3 = HEAP32[$2 + 8 >> 2] | 1;
4574     HEAP32[$2 + 8 >> 2] = $3;
4575     $0 = $0 + 24 | 0;
4576     if ($0 >>> 0 < $4 >>> 0) {
4577      continue
4578     }
4579     break;
4580    };
4581   }
4582   trinkle($0, $2 + 8 | 0, $1, 0, $2 + 16 | 0);
4583   while (1) {
4584    label$12 : {
4585     label$13 : {
4586      label$14 : {
4587       if (!(($1 | 0) != 1 | ($3 | 0) != 1)) {
4588        if (HEAP32[$2 + 12 >> 2]) {
4589         break label$14
4590        }
4591        break label$1;
4592       }
4593       if (($1 | 0) > 1) {
4594        break label$13
4595       }
4596      }
4597      $4 = pntz($2 + 8 | 0);
4598      shr($2 + 8 | 0, $4);
4599      $3 = HEAP32[$2 + 8 >> 2];
4600      $1 = $1 + $4 | 0;
4601      break label$12;
4602     }
4603     shl($2 + 8 | 0, 2);
4604     HEAP32[$2 + 8 >> 2] = HEAP32[$2 + 8 >> 2] ^ 7;
4605     shr($2 + 8 | 0, 1);
4606     $5 = $0 + -24 | 0;
4607     $4 = $1 + -2 | 0;
4608     trinkle($5 - HEAP32[($2 + 16 | 0) + ($4 << 2) >> 2] | 0, $2 + 8 | 0, $1 + -1 | 0, 1, $2 + 16 | 0);
4609     shl($2 + 8 | 0, 1);
4610     $3 = HEAP32[$2 + 8 >> 2] | 1;
4611     HEAP32[$2 + 8 >> 2] = $3;
4612     trinkle($5, $2 + 8 | 0, $4, 1, $2 + 16 | 0);
4613     $1 = $4;
4614    }
4615    $0 = $0 + -24 | 0;
4616    continue;
4617   };
4618  }
4619  global$0 = $2 + 208 | 0;
4620 }
4621
4622 function sift($0, $1, $2) {
4623  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
4624  $3 = global$0 - 240 | 0;
4625  global$0 = $3;
4626  HEAP32[$3 >> 2] = $0;
4627  $6 = 1;
4628  label$1 : {
4629   if (($1 | 0) < 2) {
4630    break label$1
4631   }
4632   $4 = $0;
4633   while (1) {
4634    $5 = $4 + -24 | 0;
4635    $7 = $1 + -2 | 0;
4636    $4 = $5 - HEAP32[($7 << 2) + $2 >> 2] | 0;
4637    if ((FUNCTION_TABLE[1]($0, $4) | 0) >= 0) {
4638     if ((FUNCTION_TABLE[1]($0, $5) | 0) > -1) {
4639      break label$1
4640     }
4641    }
4642    $0 = ($6 << 2) + $3 | 0;
4643    label$4 : {
4644     if ((FUNCTION_TABLE[1]($4, $5) | 0) >= 0) {
4645      HEAP32[$0 >> 2] = $4;
4646      $7 = $1 + -1 | 0;
4647      break label$4;
4648     }
4649     HEAP32[$0 >> 2] = $5;
4650     $4 = $5;
4651    }
4652    $6 = $6 + 1 | 0;
4653    if (($7 | 0) < 2) {
4654     break label$1
4655    }
4656    $0 = HEAP32[$3 >> 2];
4657    $1 = $7;
4658    continue;
4659   };
4660  }
4661  cycle($3, $6);
4662  global$0 = $3 + 240 | 0;
4663 }
4664
4665 function shr($0, $1) {
4666  var $2 = 0, $3 = 0, $4 = 0;
4667  $4 = $0;
4668  label$1 : {
4669   if ($1 >>> 0 <= 31) {
4670    $2 = HEAP32[$0 >> 2];
4671    $3 = HEAP32[$0 + 4 >> 2];
4672    break label$1;
4673   }
4674   $2 = HEAP32[$0 + 4 >> 2];
4675   HEAP32[$0 + 4 >> 2] = 0;
4676   HEAP32[$0 >> 2] = $2;
4677   $1 = $1 + -32 | 0;
4678   $3 = 0;
4679  }
4680  HEAP32[$4 + 4 >> 2] = $3 >>> $1;
4681  HEAP32[$0 >> 2] = $3 << 32 - $1 | $2 >>> $1;
4682 }
4683
4684 function trinkle($0, $1, $2, $3, $4) {
4685  var $5 = 0, $6 = 0, $7 = 0, $8 = 0;
4686  $5 = global$0 - 240 | 0;
4687  global$0 = $5;
4688  $6 = HEAP32[$1 >> 2];
4689  HEAP32[$5 + 232 >> 2] = $6;
4690  $1 = HEAP32[$1 + 4 >> 2];
4691  HEAP32[$5 >> 2] = $0;
4692  HEAP32[$5 + 236 >> 2] = $1;
4693  $7 = 1;
4694  label$1 : {
4695   label$2 : {
4696    label$3 : {
4697     label$4 : {
4698      if ($1 ? 0 : ($6 | 0) == 1) {
4699       break label$4
4700      }
4701      $6 = $0 - HEAP32[($2 << 2) + $4 >> 2] | 0;
4702      if ((FUNCTION_TABLE[1]($6, $0) | 0) < 1) {
4703       break label$4
4704      }
4705      $8 = !$3;
4706      while (1) {
4707       label$6 : {
4708        $1 = $6;
4709        if (!(!$8 | ($2 | 0) < 2)) {
4710         $3 = HEAP32[(($2 << 2) + $4 | 0) + -8 >> 2];
4711         $6 = $0 + -24 | 0;
4712         if ((FUNCTION_TABLE[1]($6, $1) | 0) > -1) {
4713          break label$6
4714         }
4715         if ((FUNCTION_TABLE[1]($6 - $3 | 0, $1) | 0) > -1) {
4716          break label$6
4717         }
4718        }
4719        HEAP32[($7 << 2) + $5 >> 2] = $1;
4720        $0 = pntz($5 + 232 | 0);
4721        shr($5 + 232 | 0, $0);
4722        $7 = $7 + 1 | 0;
4723        $2 = $0 + $2 | 0;
4724        if (HEAP32[$5 + 236 >> 2] ? 0 : HEAP32[$5 + 232 >> 2] == 1) {
4725         break label$2
4726        }
4727        $3 = 0;
4728        $8 = 1;
4729        $0 = $1;
4730        $6 = $1 - HEAP32[($2 << 2) + $4 >> 2] | 0;
4731        if ((FUNCTION_TABLE[1]($6, HEAP32[$5 >> 2]) | 0) > 0) {
4732         continue
4733        }
4734        break label$3;
4735       }
4736       break;
4737      };
4738      $1 = $0;
4739      break label$2;
4740     }
4741     $1 = $0;
4742    }
4743    if ($3) {
4744     break label$1
4745    }
4746   }
4747   cycle($5, $7);
4748   sift($1, $2, $4);
4749  }
4750  global$0 = $5 + 240 | 0;
4751 }
4752
4753 function shl($0, $1) {
4754  var $2 = 0, $3 = 0, $4 = 0;
4755  $4 = $0;
4756  label$1 : {
4757   if ($1 >>> 0 <= 31) {
4758    $2 = HEAP32[$0 + 4 >> 2];
4759    $3 = HEAP32[$0 >> 2];
4760    break label$1;
4761   }
4762   $2 = HEAP32[$0 >> 2];
4763   HEAP32[$0 + 4 >> 2] = $2;
4764   HEAP32[$0 >> 2] = 0;
4765   $1 = $1 + -32 | 0;
4766   $3 = 0;
4767  }
4768  HEAP32[$4 >> 2] = $3 << $1;
4769  HEAP32[$0 + 4 >> 2] = $2 << $1 | $3 >>> 32 - $1;
4770 }
4771
4772 function pntz($0) {
4773  var $1 = 0;
4774  $1 = __wasm_ctz_i32(HEAP32[$0 >> 2] + -1 | 0);
4775  if (!$1) {
4776   $0 = __wasm_ctz_i32(HEAP32[$0 + 4 >> 2]);
4777   return $0 ? $0 + 32 | 0 : 0;
4778  }
4779  return $1;
4780 }
4781
4782 function cycle($0, $1) {
4783  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
4784  $3 = 24;
4785  $4 = global$0 - 256 | 0;
4786  global$0 = $4;
4787  label$1 : {
4788   if (($1 | 0) < 2) {
4789    break label$1
4790   }
4791   $7 = ($1 << 2) + $0 | 0;
4792   HEAP32[$7 >> 2] = $4;
4793   $2 = $4;
4794   while (1) {
4795    $5 = $3 >>> 0 < 256 ? $3 : 256;
4796    memcpy($2, HEAP32[$0 >> 2], $5);
4797    $2 = 0;
4798    while (1) {
4799     $6 = ($2 << 2) + $0 | 0;
4800     $2 = $2 + 1 | 0;
4801     memcpy(HEAP32[$6 >> 2], HEAP32[($2 << 2) + $0 >> 2], $5);
4802     HEAP32[$6 >> 2] = HEAP32[$6 >> 2] + $5;
4803     if (($1 | 0) != ($2 | 0)) {
4804      continue
4805     }
4806     break;
4807    };
4808    $3 = $3 - $5 | 0;
4809    if (!$3) {
4810     break label$1
4811    }
4812    $2 = HEAP32[$7 >> 2];
4813    continue;
4814   };
4815  }
4816  global$0 = $4 + 256 | 0;
4817 }
4818
4819 function FLAC__format_sample_rate_is_subset($0) {
4820  if ($0 + -1 >>> 0 <= 655349) {
4821   return !(($0 >>> 0) % 10) | (!(($0 >>> 0) % 1e3) | $0 >>> 0 < 65536)
4822  }
4823  return 0;
4824 }
4825
4826 function FLAC__format_seektable_is_legal($0) {
4827  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
4828  $3 = HEAP32[$0 >> 2];
4829  if (!$3) {
4830   return 1
4831  }
4832  $6 = HEAP32[$0 + 4 >> 2];
4833  $0 = 0;
4834  $4 = 1;
4835  while (1) {
4836   $7 = $2;
4837   $5 = $1;
4838   $1 = Math_imul($0, 24) + $6 | 0;
4839   $2 = HEAP32[$1 >> 2];
4840   $1 = HEAP32[$1 + 4 >> 2];
4841   if (!(($2 | 0) == -1 & ($1 | 0) == -1 | $4 | (($1 | 0) == ($5 | 0) & $2 >>> 0 > $7 >>> 0 | $1 >>> 0 > $5 >>> 0))) {
4842    return 0
4843   }
4844   $4 = 0;
4845   $0 = $0 + 1 | 0;
4846   if ($0 >>> 0 < $3 >>> 0) {
4847    continue
4848   }
4849   break;
4850  };
4851  return 1;
4852 }
4853
4854 function FLAC__format_seektable_sort($0) {
4855  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
4856  label$1 : {
4857   $2 = HEAP32[$0 >> 2];
4858   if (!$2) {
4859    break label$1
4860   }
4861   qsort(HEAP32[$0 + 4 >> 2], $2);
4862   if (!HEAP32[$0 >> 2]) {
4863    break label$1
4864   }
4865   $2 = 1;
4866   $1 = HEAP32[$0 >> 2];
4867   if ($1 >>> 0 > 1) {
4868    $6 = 1;
4869    while (1) {
4870     $4 = HEAP32[$0 + 4 >> 2];
4871     $3 = $4 + Math_imul($6, 24) | 0;
4872     $5 = HEAP32[$3 >> 2];
4873     $7 = HEAP32[$3 + 4 >> 2];
4874     $8 = $7;
4875     label$4 : {
4876      if (($5 | 0) != -1 | ($7 | 0) != -1) {
4877       $7 = $5;
4878       $5 = ($4 + Math_imul($2, 24) | 0) + -24 | 0;
4879       if (($7 | 0) == HEAP32[$5 >> 2] & HEAP32[$5 + 4 >> 2] == ($8 | 0)) {
4880        break label$4
4881       }
4882      }
4883      $5 = HEAP32[$3 + 4 >> 2];
4884      $1 = $4 + Math_imul($2, 24) | 0;
4885      HEAP32[$1 >> 2] = HEAP32[$3 >> 2];
4886      HEAP32[$1 + 4 >> 2] = $5;
4887      $4 = HEAP32[$3 + 20 >> 2];
4888      HEAP32[$1 + 16 >> 2] = HEAP32[$3 + 16 >> 2];
4889      HEAP32[$1 + 20 >> 2] = $4;
4890      $4 = HEAP32[$3 + 12 >> 2];
4891      HEAP32[$1 + 8 >> 2] = HEAP32[$3 + 8 >> 2];
4892      HEAP32[$1 + 12 >> 2] = $4;
4893      $2 = $2 + 1 | 0;
4894      $1 = HEAP32[$0 >> 2];
4895     }
4896     $6 = $6 + 1 | 0;
4897     if ($6 >>> 0 < $1 >>> 0) {
4898      continue
4899     }
4900     break;
4901    };
4902   }
4903   if ($2 >>> 0 >= $1 >>> 0) {
4904    break label$1
4905   }
4906   $3 = HEAP32[$0 + 4 >> 2];
4907   while (1) {
4908    $0 = $3 + Math_imul($2, 24) | 0;
4909    HEAP32[$0 + 16 >> 2] = 0;
4910    HEAP32[$0 + 8 >> 2] = 0;
4911    HEAP32[$0 + 12 >> 2] = 0;
4912    HEAP32[$0 >> 2] = -1;
4913    HEAP32[$0 + 4 >> 2] = -1;
4914    $2 = $2 + 1 | 0;
4915    if (($1 | 0) != ($2 | 0)) {
4916     continue
4917    }
4918    break;
4919   };
4920  }
4921 }
4922
4923 function seekpoint_compare_($0, $1) {
4924  $0 = $0 | 0;
4925  $1 = $1 | 0;
4926  var $2 = 0, $3 = 0;
4927  $2 = HEAP32[$0 + 4 >> 2];
4928  $3 = HEAP32[$1 + 4 >> 2];
4929  $0 = HEAP32[$0 >> 2];
4930  $1 = HEAP32[$1 >> 2];
4931  return (($0 | 0) == ($1 | 0) & ($2 | 0) == ($3 | 0) ? 0 : ($2 | 0) == ($3 | 0) & $0 >>> 0 < $1 >>> 0 | $2 >>> 0 < $3 >>> 0 ? -1 : 1) | 0;
4932 }
4933
4934 function utf8len_($0) {
4935  var $1 = 0, $2 = 0, $3 = 0, $4 = 0;
4936  $2 = 1;
4937  label$1 : {
4938   $1 = HEAPU8[$0 | 0];
4939   label$2 : {
4940    if (!($1 & 128)) {
4941     break label$2
4942    }
4943    if (!(($1 & 224) != 192 | (HEAPU8[$0 + 1 | 0] & 192) != 128)) {
4944     return (($1 & 254) != 192) << 1
4945    }
4946    label$4 : {
4947     if (($1 & 240) != 224) {
4948      break label$4
4949     }
4950     $3 = HEAPU8[$0 + 1 | 0];
4951     if (($3 & 192) != 128) {
4952      break label$4
4953     }
4954     $4 = HEAPU8[$0 + 2 | 0];
4955     if (($4 & 192) != 128) {
4956      break label$4
4957     }
4958     $2 = 0;
4959     if (($3 & 224) == 128 ? ($1 | 0) == 224 : 0) {
4960      break label$2
4961     }
4962     label$5 : {
4963      label$6 : {
4964       switch ($1 + -237 | 0) {
4965       case 0:
4966        if (($3 & 224) != 160) {
4967         break label$5
4968        }
4969        break label$2;
4970       case 2:
4971        break label$6;
4972       default:
4973        break label$5;
4974       };
4975      }
4976      if (($3 | 0) != 191) {
4977       break label$5
4978      }
4979      if (($4 & 254) == 190) {
4980       break label$2
4981      }
4982     }
4983     return 3;
4984    }
4985    label$8 : {
4986     if (($1 & 248) != 240) {
4987      break label$8
4988     }
4989     $2 = HEAPU8[$0 + 1 | 0];
4990     if (($2 & 192) != 128 | (HEAPU8[$0 + 2 | 0] & 192) != 128) {
4991      break label$8
4992     }
4993     if ((HEAPU8[$0 + 3 | 0] & 192) == 128) {
4994      break label$1
4995     }
4996    }
4997    label$9 : {
4998     if (($1 & 252) != 248) {
4999      break label$9
5000     }
5001     $2 = HEAPU8[$0 + 1 | 0];
5002     if (($2 & 192) != 128 | (HEAPU8[$0 + 2 | 0] & 192) != 128 | ((HEAPU8[$0 + 3 | 0] & 192) != 128 | (HEAPU8[$0 + 4 | 0] & 192) != 128)) {
5003      break label$9
5004     }
5005     return ($1 | 0) == 248 ? (($2 & 248) == 128 ? 0 : 5) : 5;
5006    }
5007    $2 = 0;
5008    if (($1 & 254) != 252) {
5009     break label$2
5010    }
5011    $3 = HEAPU8[$0 + 1 | 0];
5012    if (($3 & 192) != 128 | (HEAPU8[$0 + 2 | 0] & 192) != 128 | ((HEAPU8[$0 + 3 | 0] & 192) != 128 | (HEAPU8[$0 + 4 | 0] & 192) != 128)) {
5013     break label$2
5014    }
5015    if ((HEAPU8[$0 + 5 | 0] & 192) != 128) {
5016     break label$2
5017    }
5018    $2 = ($1 | 0) == 252 ? (($3 & 252) == 128 ? 0 : 6) : 6;
5019   }
5020   return $2;
5021  }
5022  return ($1 | 0) == 240 ? (($2 & 240) != 128) << 2 : 4;
5023 }
5024
5025 function FLAC__format_cuesheet_is_legal($0, $1) {
5026  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
5027  label$1 : {
5028   label$2 : {
5029    label$3 : {
5030     label$4 : {
5031      label$5 : {
5032       label$6 : {
5033        label$7 : {
5034         if ($1) {
5035          $1 = HEAP32[$0 + 140 >> 2];
5036          $3 = $1;
5037          $2 = HEAP32[$0 + 136 >> 2];
5038          if (!$1 & $2 >>> 0 <= 88199 | $1 >>> 0 < 0) {
5039           $0 = 0;
5040           break label$1;
5041          }
5042          if (__wasm_i64_urem($2, $3) | i64toi32_i32$HIGH_BITS) {
5043           $0 = 0;
5044           break label$1;
5045          }
5046          $3 = HEAP32[$0 + 148 >> 2];
5047          if (!$3) {
5048           break label$2
5049          }
5050          if (HEAPU8[(HEAP32[$0 + 152 >> 2] + ($3 << 5) | 0) + -24 | 0] == 170) {
5051           break label$7
5052          }
5053          $0 = 0;
5054          break label$1;
5055         }
5056         $2 = HEAP32[$0 + 148 >> 2];
5057         if (!$2) {
5058          break label$2
5059         }
5060         $4 = $2 + -1 | 0;
5061         $6 = HEAP32[$0 + 152 >> 2];
5062         $1 = 0;
5063         while (1) {
5064          $0 = $6 + ($1 << 5) | 0;
5065          if (!HEAPU8[$0 + 8 | 0]) {
5066           break label$3
5067          }
5068          $3 = HEAPU8[$0 + 23 | 0];
5069          label$12 : {
5070           label$13 : {
5071            if ($1 >>> 0 < $4 >>> 0) {
5072             if (!$3) {
5073              break label$4
5074             }
5075             if (HEAPU8[HEAP32[$0 + 24 >> 2] + 8 | 0] > 1) {
5076              break label$5
5077             }
5078             break label$13;
5079            }
5080            if (!$3) {
5081             break label$12
5082            }
5083           }
5084           $7 = $0 + 24 | 0;
5085           $0 = 0;
5086           while (1) {
5087            if ($0) {
5088             $5 = HEAP32[$7 >> 2] + ($0 << 4) | 0;
5089             if ((HEAPU8[$5 + -8 | 0] + 1 | 0) != HEAPU8[$5 + 8 | 0]) {
5090              break label$6
5091             }
5092            }
5093            $0 = $0 + 1 | 0;
5094            if ($0 >>> 0 < $3 >>> 0) {
5095             continue
5096            }
5097            break;
5098           };
5099          }
5100          $0 = 1;
5101          $1 = $1 + 1 | 0;
5102          if (($2 | 0) != ($1 | 0)) {
5103           continue
5104          }
5105          break;
5106         };
5107         break label$1;
5108        }
5109        $6 = $3 + -1 | 0;
5110        $7 = HEAP32[$0 + 152 >> 2];
5111        $1 = 0;
5112        while (1) {
5113         $0 = $7 + ($1 << 5) | 0;
5114         $2 = HEAPU8[$0 + 8 | 0];
5115         if (!$2) {
5116          break label$3
5117         }
5118         if (!(($2 | 0) == 170 | $2 >>> 0 < 100)) {
5119          $0 = 0;
5120          break label$1;
5121         }
5122         if (__wasm_i64_urem(HEAP32[$0 >> 2], HEAP32[$0 + 4 >> 2]) | i64toi32_i32$HIGH_BITS) {
5123          $0 = 0;
5124          break label$1;
5125         }
5126         $2 = HEAPU8[$0 + 23 | 0];
5127         label$21 : {
5128          label$22 : {
5129           if ($1 >>> 0 < $6 >>> 0) {
5130            if (!$2) {
5131             break label$4
5132            }
5133            if (HEAPU8[HEAP32[$0 + 24 >> 2] + 8 | 0] < 2) {
5134             break label$22
5135            }
5136            break label$5;
5137           }
5138           if (!$2) {
5139            break label$21
5140           }
5141          }
5142          $5 = HEAP32[$0 + 24 >> 2];
5143          $0 = 0;
5144          while (1) {
5145           $4 = $5 + ($0 << 4) | 0;
5146           if (__wasm_i64_urem(HEAP32[$4 >> 2], HEAP32[$4 + 4 >> 2]) | i64toi32_i32$HIGH_BITS) {
5147            $0 = 0;
5148            break label$1;
5149           }
5150           if (HEAPU8[$4 + 8 | 0] != (HEAPU8[$4 + -8 | 0] + 1 | 0) ? $0 : 0) {
5151            break label$6
5152           }
5153           $0 = $0 + 1 | 0;
5154           if ($0 >>> 0 < $2 >>> 0) {
5155            continue
5156           }
5157           break;
5158          };
5159         }
5160         $0 = 1;
5161         $1 = $1 + 1 | 0;
5162         if (($3 | 0) != ($1 | 0)) {
5163          continue
5164         }
5165         break;
5166        };
5167        break label$1;
5168       }
5169       $0 = 0;
5170       break label$1;
5171      }
5172      $0 = 0;
5173      break label$1;
5174     }
5175     $0 = 0;
5176     break label$1;
5177    }
5178    $0 = 0;
5179    break label$1;
5180   }
5181   $0 = 0;
5182  }
5183  return $0;
5184 }
5185
5186 function FLAC__format_picture_is_legal($0) {
5187  var $1 = 0, $2 = 0;
5188  label$1 : {
5189   label$2 : {
5190    $2 = HEAP32[$0 + 4 >> 2];
5191    $1 = HEAPU8[$2 | 0];
5192    if (!$1) {
5193     break label$2
5194    }
5195    while (1) {
5196     if (($1 + -32 & 255) >>> 0 < 95) {
5197      $2 = $2 + 1 | 0;
5198      $1 = HEAPU8[$2 | 0];
5199      if ($1) {
5200       continue
5201      }
5202      break label$2;
5203     }
5204     break;
5205    };
5206    $2 = 0;
5207    break label$1;
5208   }
5209   $2 = 1;
5210   $1 = HEAP32[$0 + 8 >> 2];
5211   if (!HEAPU8[$1 | 0]) {
5212    break label$1
5213   }
5214   while (1) {
5215    $0 = utf8len_($1);
5216    if (!$0) {
5217     $2 = 0;
5218     break label$1;
5219    }
5220    $1 = $0 + $1 | 0;
5221    if (HEAPU8[$1 | 0]) {
5222     continue
5223    }
5224    break;
5225   };
5226  }
5227  return $2;
5228 }
5229
5230 function FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_and_predictor_order($0, $1, $2) {
5231  var $3 = 0;
5232  while (1) {
5233   $3 = $0;
5234   if ($3) {
5235    $0 = $3 + -1 | 0;
5236    if ($1 >>> $3 >>> 0 <= $2 >>> 0) {
5237     continue
5238    }
5239   }
5240   break;
5241  };
5242  return $3;
5243 }
5244
5245 function FLAC__format_get_max_rice_partition_order_from_blocksize($0) {
5246  var $1 = 0, $2 = 0;
5247  label$1 : {
5248   if (!($0 & 1)) {
5249    while (1) {
5250     $1 = $1 + 1 | 0;
5251     $2 = $0 & 2;
5252     $0 = $0 >>> 1 | 0;
5253     if (!$2) {
5254      continue
5255     }
5256     break;
5257    };
5258    $0 = 15;
5259    if ($1 >>> 0 > 14) {
5260     break label$1
5261    }
5262   }
5263   $0 = $1;
5264  }
5265  return $0;
5266 }
5267
5268 function FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0) {
5269  HEAP32[$0 + 8 >> 2] = 0;
5270  HEAP32[$0 >> 2] = 0;
5271  HEAP32[$0 + 4 >> 2] = 0;
5272 }
5273
5274 function FLAC__format_entropy_coding_method_partitioned_rice_contents_clear($0) {
5275  var $1 = 0;
5276  $1 = HEAP32[$0 >> 2];
5277  if ($1) {
5278   dlfree($1)
5279  }
5280  $1 = HEAP32[$0 + 4 >> 2];
5281  if ($1) {
5282   dlfree($1)
5283  }
5284  HEAP32[$0 + 8 >> 2] = 0;
5285  HEAP32[$0 >> 2] = 0;
5286  HEAP32[$0 + 4 >> 2] = 0;
5287 }
5288
5289 function FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($0, $1) {
5290  var $2 = 0, $3 = 0, $4 = 0, $5 = 0;
5291  $3 = 1;
5292  label$1 : {
5293   if (HEAPU32[$0 + 8 >> 2] >= $1 >>> 0) {
5294    break label$1
5295   }
5296   $3 = HEAP32[$0 >> 2];
5297   $4 = 4 << $1;
5298   $2 = dlrealloc($3, $4);
5299   if (!($2 | $1 >>> 0 > 29)) {
5300    dlfree($3)
5301   }
5302   HEAP32[$0 >> 2] = $2;
5303   $3 = 0;
5304   if (!$2) {
5305    break label$1
5306   }
5307   $5 = HEAP32[$0 + 4 >> 2];
5308   $2 = dlrealloc($5, $4);
5309   if (!($2 | $1 >>> 0 > 29)) {
5310    dlfree($5)
5311   }
5312   HEAP32[$0 + 4 >> 2] = $2;
5313   if (!$2) {
5314    break label$1
5315   }
5316   memset($2, $4);
5317   HEAP32[$0 + 8 >> 2] = $1;
5318   $3 = 1;
5319  }
5320  return $3;
5321 }
5322
5323 function ogg_page_serialno($0) {
5324  $0 = HEAP32[$0 >> 2];
5325  return HEAPU8[$0 + 14 | 0] | HEAPU8[$0 + 15 | 0] << 8 | (HEAPU8[$0 + 16 | 0] << 16 | HEAPU8[$0 + 17 | 0] << 24);
5326 }
5327
5328 function ogg_stream_init($0, $1) {
5329  var $2 = 0, $3 = 0, $4 = 0;
5330  if ($0) {
5331   memset($0 + 8 | 0, 352);
5332   HEAP32[$0 + 24 >> 2] = 1024;
5333   HEAP32[$0 + 4 >> 2] = 16384;
5334   $3 = dlmalloc(16384);
5335   HEAP32[$0 >> 2] = $3;
5336   $2 = dlmalloc(4096);
5337   HEAP32[$0 + 16 >> 2] = $2;
5338   $4 = dlmalloc(8192);
5339   HEAP32[$0 + 20 >> 2] = $4;
5340   label$2 : {
5341    if ($3) {
5342     if ($2 ? $4 : 0) {
5343      break label$2
5344     }
5345     dlfree($3);
5346     $2 = HEAP32[$0 + 16 >> 2];
5347    }
5348    if ($2) {
5349     dlfree($2)
5350    }
5351    $1 = HEAP32[$0 + 20 >> 2];
5352    if ($1) {
5353     dlfree($1)
5354    }
5355    memset($0, 360);
5356    return -1;
5357   }
5358   HEAP32[$0 + 336 >> 2] = $1;
5359   $0 = 0;
5360  } else {
5361   $0 = -1
5362  }
5363  return $0;
5364 }
5365
5366 function ogg_stream_clear($0) {
5367  var $1 = 0;
5368  if ($0) {
5369   $1 = HEAP32[$0 >> 2];
5370   if ($1) {
5371    dlfree($1)
5372   }
5373   $1 = HEAP32[$0 + 16 >> 2];
5374   if ($1) {
5375    dlfree($1)
5376   }
5377   $1 = HEAP32[$0 + 20 >> 2];
5378   if ($1) {
5379    dlfree($1)
5380   }
5381   memset($0, 360);
5382  }
5383 }
5384
5385 function ogg_page_checksum_set($0) {
5386  var $1 = 0, $2 = 0, $3 = 0, $4 = 0;
5387  if ($0) {
5388   HEAP8[HEAP32[$0 >> 2] + 22 | 0] = 0;
5389   HEAP8[HEAP32[$0 >> 2] + 23 | 0] = 0;
5390   HEAP8[HEAP32[$0 >> 2] + 24 | 0] = 0;
5391   HEAP8[HEAP32[$0 >> 2] + 25 | 0] = 0;
5392   $3 = HEAP32[$0 + 4 >> 2];
5393   if (($3 | 0) >= 1) {
5394    $4 = HEAP32[$0 >> 2];
5395    while (1) {
5396     $1 = HEAP32[((HEAPU8[$2 + $4 | 0] ^ $1 >>> 24) << 2) + 6512 >> 2] ^ $1 << 8;
5397     $2 = $2 + 1 | 0;
5398     if (($3 | 0) != ($2 | 0)) {
5399      continue
5400     }
5401     break;
5402    };
5403   }
5404   $3 = HEAP32[$0 + 12 >> 2];
5405   if (($3 | 0) >= 1) {
5406    $4 = HEAP32[$0 + 8 >> 2];
5407    $2 = 0;
5408    while (1) {
5409     $1 = HEAP32[((HEAPU8[$2 + $4 | 0] ^ $1 >>> 24) << 2) + 6512 >> 2] ^ $1 << 8;
5410     $2 = $2 + 1 | 0;
5411     if (($3 | 0) != ($2 | 0)) {
5412      continue
5413     }
5414     break;
5415    };
5416   }
5417   HEAP8[HEAP32[$0 >> 2] + 22 | 0] = $1;
5418   HEAP8[HEAP32[$0 >> 2] + 23 | 0] = $1 >>> 8;
5419   HEAP8[HEAP32[$0 >> 2] + 24 | 0] = $1 >>> 16;
5420   HEAP8[HEAP32[$0 >> 2] + 25 | 0] = $1 >>> 24;
5421  }
5422 }
5423
5424 function ogg_stream_iovecin($0, $1, $2, $3, $4) {
5425  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0;
5426  $6 = -1;
5427  folding_inner0 : {
5428   label$1 : {
5429    if (!$0) {
5430     break label$1
5431    }
5432    $8 = HEAP32[$0 >> 2];
5433    if (!$8) {
5434     break label$1
5435    }
5436    if (!$1) {
5437     return 0
5438    }
5439    while (1) {
5440     $7 = HEAP32[(($5 << 3) + $1 | 0) + 4 >> 2];
5441     if (($7 | 0) < 0 | ($9 | 0) > (2147483647 - $7 | 0)) {
5442      break label$1
5443     }
5444     $9 = $7 + $9 | 0;
5445     $5 = $5 + 1 | 0;
5446     if (($5 | 0) != 1) {
5447      continue
5448     }
5449     break;
5450    };
5451    $5 = HEAP32[$0 + 12 >> 2];
5452    if ($5) {
5453     $7 = HEAP32[$0 + 8 >> 2] - $5 | 0;
5454     HEAP32[$0 + 8 >> 2] = $7;
5455     if ($7) {
5456      memmove($8, $5 + $8 | 0, $7)
5457     }
5458     HEAP32[$0 + 12 >> 2] = 0;
5459    }
5460    $5 = HEAP32[$0 + 4 >> 2];
5461    if (($5 - $9 | 0) <= HEAP32[$0 + 8 >> 2]) {
5462     if (($5 | 0) > (2147483647 - $9 | 0)) {
5463      break folding_inner0
5464     }
5465     $5 = $5 + $9 | 0;
5466     $5 = ($5 | 0) < 2147482623 ? $5 + 1024 | 0 : $5;
5467     $8 = dlrealloc(HEAP32[$0 >> 2], $5);
5468     if (!$8) {
5469      break folding_inner0
5470     }
5471     HEAP32[$0 >> 2] = $8;
5472     HEAP32[$0 + 4 >> 2] = $5;
5473    }
5474    $8 = ($9 | 0) / 255 | 0;
5475    $11 = $8 + 1 | 0;
5476    if (_os_lacing_expand($0, $11)) {
5477     break label$1
5478    }
5479    $6 = HEAP32[$0 + 8 >> 2];
5480    $5 = 0;
5481    while (1) {
5482     $7 = HEAP32[$0 >> 2] + $6 | 0;
5483     $6 = ($5 << 3) + $1 | 0;
5484     memcpy($7, HEAP32[$6 >> 2], HEAP32[$6 + 4 >> 2]);
5485     $6 = HEAP32[$0 + 8 >> 2] + HEAP32[$6 + 4 >> 2] | 0;
5486     HEAP32[$0 + 8 >> 2] = $6;
5487     $5 = $5 + 1 | 0;
5488     if (($5 | 0) != 1) {
5489      continue
5490     }
5491     break;
5492    };
5493    $7 = HEAP32[$0 + 16 >> 2];
5494    $12 = $7;
5495    $1 = HEAP32[$0 + 28 >> 2];
5496    $13 = $1;
5497    label$19 : {
5498     if (($9 | 0) <= 254) {
5499      $6 = HEAP32[$0 + 20 >> 2];
5500      $5 = 0;
5501      break label$19;
5502     }
5503     $6 = HEAP32[$0 + 20 >> 2];
5504     $5 = 0;
5505     while (1) {
5506      $10 = $1 + $5 | 0;
5507      HEAP32[$7 + ($10 << 2) >> 2] = 255;
5508      $14 = HEAP32[$0 + 356 >> 2];
5509      $10 = ($10 << 3) + $6 | 0;
5510      HEAP32[$10 >> 2] = HEAP32[$0 + 352 >> 2];
5511      HEAP32[$10 + 4 >> 2] = $14;
5512      $5 = $5 + 1 | 0;
5513      if (($8 | 0) != ($5 | 0)) {
5514       continue
5515      }
5516      break;
5517     };
5518     $5 = $8;
5519    }
5520    $5 = $13 + $5 | 0;
5521    HEAP32[$12 + ($5 << 2) >> 2] = $9 - Math_imul($8, 255);
5522    $5 = ($5 << 3) + $6 | 0;
5523    HEAP32[$5 >> 2] = $3;
5524    HEAP32[$5 + 4 >> 2] = $4;
5525    HEAP32[$0 + 352 >> 2] = $3;
5526    HEAP32[$0 + 356 >> 2] = $4;
5527    $3 = $7 + ($1 << 2) | 0;
5528    HEAP32[$3 >> 2] = HEAP32[$3 >> 2] | 256;
5529    HEAP32[$0 + 28 >> 2] = $1 + $11;
5530    $1 = HEAP32[$0 + 348 >> 2];
5531    $3 = HEAP32[$0 + 344 >> 2] + 1 | 0;
5532    if ($3 >>> 0 < 1) {
5533     $1 = $1 + 1 | 0
5534    }
5535    HEAP32[$0 + 344 >> 2] = $3;
5536    HEAP32[$0 + 348 >> 2] = $1;
5537    $6 = 0;
5538    if (!$2) {
5539     break label$1
5540    }
5541    HEAP32[$0 + 328 >> 2] = 1;
5542   }
5543   return $6;
5544  }
5545  $1 = HEAP32[$0 >> 2];
5546  if ($1) {
5547   dlfree($1)
5548  }
5549  $1 = HEAP32[$0 + 16 >> 2];
5550  if ($1) {
5551   dlfree($1)
5552  }
5553  $1 = HEAP32[$0 + 20 >> 2];
5554  if ($1) {
5555   dlfree($1)
5556  }
5557  memset($0, 360);
5558  return -1;
5559 }
5560
5561 function _os_lacing_expand($0, $1) {
5562  var $2 = 0;
5563  folding_inner0 : {
5564   $2 = HEAP32[$0 + 24 >> 2];
5565   if (($2 - $1 | 0) <= HEAP32[$0 + 28 >> 2]) {
5566    if (($2 | 0) > (2147483647 - $1 | 0)) {
5567     break folding_inner0
5568    }
5569    $1 = $1 + $2 | 0;
5570    $1 = ($1 | 0) < 2147483615 ? $1 + 32 | 0 : $1;
5571    $2 = dlrealloc(HEAP32[$0 + 16 >> 2], $1 << 2);
5572    if (!$2) {
5573     break folding_inner0
5574    }
5575    HEAP32[$0 + 16 >> 2] = $2;
5576    $2 = dlrealloc(HEAP32[$0 + 20 >> 2], $1 << 3);
5577    if (!$2) {
5578     break folding_inner0
5579    }
5580    HEAP32[$0 + 24 >> 2] = $1;
5581    HEAP32[$0 + 20 >> 2] = $2;
5582   }
5583   return 0;
5584  }
5585  $1 = HEAP32[$0 >> 2];
5586  if ($1) {
5587   dlfree($1)
5588  }
5589  $1 = HEAP32[$0 + 16 >> 2];
5590  if ($1) {
5591   dlfree($1)
5592  }
5593  $1 = HEAP32[$0 + 20 >> 2];
5594  if ($1) {
5595   dlfree($1)
5596  }
5597  memset($0, 360);
5598  return -1;
5599 }
5600
5601 function ogg_stream_packetin($0, $1) {
5602  var $2 = 0;
5603  $2 = global$0 - 16 | 0;
5604  global$0 = $2;
5605  HEAP32[$2 + 8 >> 2] = HEAP32[$1 >> 2];
5606  HEAP32[$2 + 12 >> 2] = HEAP32[$1 + 4 >> 2];
5607  $0 = ogg_stream_iovecin($0, $2 + 8 | 0, HEAP32[$1 + 12 >> 2], HEAP32[$1 + 16 >> 2], HEAP32[$1 + 20 >> 2]);
5608  global$0 = $2 + 16 | 0;
5609  return $0;
5610 }
5611
5612 function ogg_stream_flush_i($0, $1, $2) {
5613  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0;
5614  label$1 : {
5615   if (!$0) {
5616    break label$1
5617   }
5618   $8 = HEAP32[$0 + 28 >> 2];
5619   $4 = ($8 | 0) < 255 ? $8 : 255;
5620   if (!$4) {
5621    break label$1
5622   }
5623   $10 = HEAP32[$0 >> 2];
5624   if (!$10) {
5625    break label$1
5626   }
5627   label$2 : {
5628    label$3 : {
5629     label$4 : {
5630      $11 = HEAP32[$0 + 332 >> 2];
5631      if ($11) {
5632       if (($8 | 0) >= 1) {
5633        break label$4
5634       }
5635       $7 = -1;
5636       $5 = -1;
5637       break label$3;
5638      }
5639      $3 = ($4 | 0) > 0 ? $4 : 0;
5640      while (1) {
5641       if (($3 | 0) == ($6 | 0)) {
5642        break label$3
5643       }
5644       $9 = $6 << 2;
5645       $4 = $6 + 1 | 0;
5646       $6 = $4;
5647       if (HEAPU8[$9 + HEAP32[$0 + 16 >> 2] | 0] == 255) {
5648        continue
5649       }
5650       break;
5651      };
5652      $3 = $4;
5653      break label$3;
5654     }
5655     $4 = ($4 | 0) > 1 ? $4 : 1;
5656     $7 = -1;
5657     $5 = -1;
5658     label$7 : {
5659      while (1) {
5660       if (!(($6 | 0) <= 4096 | ($9 | 0) <= 3)) {
5661        $2 = 1;
5662        break label$7;
5663       }
5664       $9 = 0;
5665       $12 = HEAPU8[HEAP32[$0 + 16 >> 2] + ($3 << 2) | 0];
5666       if (($12 | 0) != 255) {
5667        $13 = $13 + 1 | 0;
5668        $9 = $13;
5669        $5 = HEAP32[$0 + 20 >> 2] + ($3 << 3) | 0;
5670        $7 = HEAP32[$5 >> 2];
5671        $5 = HEAP32[$5 + 4 >> 2];
5672       }
5673       $6 = $6 + $12 | 0;
5674       $3 = $3 + 1 | 0;
5675       if (($4 | 0) != ($3 | 0)) {
5676        continue
5677       }
5678       break;
5679      };
5680      $3 = $4;
5681     }
5682     $4 = 255;
5683     if (($3 | 0) == 255) {
5684      break label$2
5685     }
5686    }
5687    $4 = $3;
5688    if (!$2) {
5689     break label$1
5690    }
5691   }
5692   HEAP32[$0 + 40 >> 2] = 1399285583;
5693   HEAP16[$0 + 44 >> 1] = 0;
5694   $2 = HEAP32[$0 + 16 >> 2];
5695   $3 = (HEAPU8[$2 + 1 | 0] ^ -1) & 1;
5696   $3 = $11 ? $3 : $3 | 2;
5697   HEAP8[$0 + 45 | 0] = $3;
5698   if (!(!HEAP32[$0 + 328 >> 2] | ($4 | 0) != ($8 | 0))) {
5699    HEAP8[$0 + 45 | 0] = $3 | 4
5700   }
5701   HEAP32[$0 + 332 >> 2] = 1;
5702   HEAP8[$0 + 53 | 0] = $5 >>> 24;
5703   HEAP8[$0 + 52 | 0] = $5 >>> 16;
5704   HEAP8[$0 + 51 | 0] = $5 >>> 8;
5705   HEAP8[$0 + 50 | 0] = $5;
5706   HEAP8[$0 + 49 | 0] = ($5 & 16777215) << 8 | $7 >>> 24;
5707   HEAP8[$0 + 48 | 0] = ($5 & 65535) << 16 | $7 >>> 16;
5708   HEAP8[$0 + 47 | 0] = ($5 & 255) << 24 | $7 >>> 8;
5709   HEAP8[$0 + 46 | 0] = $7;
5710   $3 = HEAP32[$0 + 336 >> 2];
5711   HEAP8[$0 + 54 | 0] = $3;
5712   HEAP8[$0 + 55 | 0] = $3 >>> 8;
5713   HEAP8[$0 + 56 | 0] = $3 >>> 16;
5714   HEAP8[$0 + 57 | 0] = $3 >>> 24;
5715   $3 = HEAP32[$0 + 340 >> 2];
5716   if (($3 | 0) == -1) {
5717    HEAP32[$0 + 340 >> 2] = 0;
5718    $3 = 0;
5719   }
5720   HEAP8[$0 + 66 | 0] = $4;
5721   $6 = 0;
5722   HEAP16[$0 + 62 >> 1] = 0;
5723   HEAP16[$0 + 64 >> 1] = 0;
5724   HEAP8[$0 + 61 | 0] = $3 >>> 24;
5725   HEAP8[$0 + 60 | 0] = $3 >>> 16;
5726   HEAP8[$0 + 59 | 0] = $3 >>> 8;
5727   HEAP8[$0 + 58 | 0] = $3;
5728   $14 = 1;
5729   HEAP32[$0 + 340 >> 2] = $3 + 1;
5730   if (($4 | 0) >= 1) {
5731    $3 = 0;
5732    while (1) {
5733     $5 = HEAP32[$2 + ($3 << 2) >> 2];
5734     HEAP8[($0 + $3 | 0) + 67 | 0] = $5;
5735     $6 = ($5 & 255) + $6 | 0;
5736     $3 = $3 + 1 | 0;
5737     if (($4 | 0) != ($3 | 0)) {
5738      continue
5739     }
5740     break;
5741    };
5742   }
5743   HEAP32[$1 >> 2] = $0 + 40;
5744   $3 = $4 + 27 | 0;
5745   HEAP32[$0 + 324 >> 2] = $3;
5746   HEAP32[$1 + 4 >> 2] = $3;
5747   $3 = HEAP32[$0 + 12 >> 2];
5748   HEAP32[$1 + 12 >> 2] = $6;
5749   HEAP32[$1 + 8 >> 2] = $3 + $10;
5750   $3 = $8 - $4 | 0;
5751   HEAP32[$0 + 28 >> 2] = $3;
5752   memmove($2, $2 + ($4 << 2) | 0, $3 << 2);
5753   $2 = HEAP32[$0 + 20 >> 2];
5754   memmove($2, $2 + ($4 << 3) | 0, HEAP32[$0 + 28 >> 2] << 3);
5755   HEAP32[$0 + 12 >> 2] = HEAP32[$0 + 12 >> 2] + $6;
5756   if (!$1) {
5757    break label$1
5758   }
5759   $0 = 0;
5760   HEAP8[HEAP32[$1 >> 2] + 22 | 0] = 0;
5761   HEAP8[HEAP32[$1 >> 2] + 23 | 0] = 0;
5762   HEAP8[HEAP32[$1 >> 2] + 24 | 0] = 0;
5763   HEAP8[HEAP32[$1 >> 2] + 25 | 0] = 0;
5764   $2 = HEAP32[$1 + 4 >> 2];
5765   if (($2 | 0) >= 1) {
5766    $4 = HEAP32[$1 >> 2];
5767    $3 = 0;
5768    while (1) {
5769     $0 = HEAP32[((HEAPU8[$3 + $4 | 0] ^ $0 >>> 24) << 2) + 6512 >> 2] ^ $0 << 8;
5770     $3 = $3 + 1 | 0;
5771     if (($2 | 0) != ($3 | 0)) {
5772      continue
5773     }
5774     break;
5775    };
5776   }
5777   $2 = HEAP32[$1 + 12 >> 2];
5778   if (($2 | 0) >= 1) {
5779    $4 = HEAP32[$1 + 8 >> 2];
5780    $3 = 0;
5781    while (1) {
5782     $0 = HEAP32[((HEAPU8[$3 + $4 | 0] ^ $0 >>> 24) << 2) + 6512 >> 2] ^ $0 << 8;
5783     $3 = $3 + 1 | 0;
5784     if (($2 | 0) != ($3 | 0)) {
5785      continue
5786     }
5787     break;
5788    };
5789   }
5790   HEAP8[HEAP32[$1 >> 2] + 22 | 0] = $0;
5791   HEAP8[HEAP32[$1 >> 2] + 23 | 0] = $0 >>> 8;
5792   HEAP8[HEAP32[$1 >> 2] + 24 | 0] = $0 >>> 16;
5793   HEAP8[HEAP32[$1 >> 2] + 25 | 0] = $0 >>> 24;
5794  }
5795  return $14;
5796 }
5797
5798 function ogg_stream_pageout($0, $1) {
5799  var $2 = 0, $3 = 0, $4 = 0;
5800  if (!(!$0 | !HEAP32[$0 >> 2])) {
5801   $2 = HEAP32[$0 + 28 >> 2];
5802   $4 = $0;
5803   label$2 : {
5804    label$3 : {
5805     if (HEAP32[$0 + 328 >> 2]) {
5806      if ($2) {
5807       break label$3
5808      }
5809      $3 = 0;
5810      break label$2;
5811     }
5812     $3 = 0;
5813     if (HEAP32[$0 + 332 >> 2] | !$2) {
5814      break label$2
5815     }
5816    }
5817    $3 = 1;
5818   }
5819   $2 = ogg_stream_flush_i($4, $1, $3);
5820  }
5821  return $2;
5822 }
5823
5824 function ogg_sync_init($0) {
5825  if ($0) {
5826   HEAP32[$0 >> 2] = 0;
5827   HEAP32[$0 + 4 >> 2] = 0;
5828   HEAP32[$0 + 24 >> 2] = 0;
5829   HEAP32[$0 + 16 >> 2] = 0;
5830   HEAP32[$0 + 20 >> 2] = 0;
5831   HEAP32[$0 + 8 >> 2] = 0;
5832   HEAP32[$0 + 12 >> 2] = 0;
5833  }
5834  return 0;
5835 }
5836
5837 function ogg_sync_clear($0) {
5838  var $1 = 0;
5839  if ($0) {
5840   $1 = HEAP32[$0 >> 2];
5841   if ($1) {
5842    dlfree($1)
5843   }
5844   HEAP32[$0 >> 2] = 0;
5845   HEAP32[$0 + 4 >> 2] = 0;
5846   HEAP32[$0 + 24 >> 2] = 0;
5847   HEAP32[$0 + 16 >> 2] = 0;
5848   HEAP32[$0 + 20 >> 2] = 0;
5849   HEAP32[$0 + 8 >> 2] = 0;
5850   HEAP32[$0 + 12 >> 2] = 0;
5851  }
5852 }
5853
5854 function ogg_sync_buffer($0, $1) {
5855  var $2 = 0, $3 = 0, $4 = 0;
5856  $2 = HEAP32[$0 + 4 >> 2];
5857  if (($2 | 0) >= 0) {
5858   $4 = HEAP32[$0 + 12 >> 2];
5859   if ($4) {
5860    $3 = HEAP32[$0 + 8 >> 2] - $4 | 0;
5861    HEAP32[$0 + 8 >> 2] = $3;
5862    if (($3 | 0) >= 1) {
5863     $2 = HEAP32[$0 >> 2];
5864     memmove($2, $2 + $4 | 0, $3);
5865     $2 = HEAP32[$0 + 4 >> 2];
5866    }
5867    HEAP32[$0 + 12 >> 2] = 0;
5868   }
5869   $3 = $2;
5870   $2 = HEAP32[$0 + 8 >> 2];
5871   label$4 : {
5872    if (($3 - $2 | 0) >= ($1 | 0)) {
5873     $1 = HEAP32[$0 >> 2];
5874     break label$4;
5875    }
5876    $2 = ($1 + $2 | 0) + 4096 | 0;
5877    $1 = HEAP32[$0 >> 2];
5878    label$6 : {
5879     if ($1) {
5880      $1 = dlrealloc($1, $2);
5881      break label$6;
5882     }
5883     $1 = dlmalloc($2);
5884    }
5885    if (!$1) {
5886     $1 = HEAP32[$0 >> 2];
5887     if ($1) {
5888      dlfree($1)
5889     }
5890     HEAP32[$0 >> 2] = 0;
5891     HEAP32[$0 + 4 >> 2] = 0;
5892     HEAP32[$0 + 24 >> 2] = 0;
5893     HEAP32[$0 + 16 >> 2] = 0;
5894     HEAP32[$0 + 20 >> 2] = 0;
5895     HEAP32[$0 + 8 >> 2] = 0;
5896     HEAP32[$0 + 12 >> 2] = 0;
5897     return 0;
5898    }
5899    HEAP32[$0 + 4 >> 2] = $2;
5900    HEAP32[$0 >> 2] = $1;
5901    $2 = HEAP32[$0 + 8 >> 2];
5902   }
5903   $0 = $1 + $2 | 0;
5904  } else {
5905   $0 = 0
5906  }
5907  return $0;
5908 }
5909
5910 function ogg_sync_wrote($0, $1) {
5911  var $2 = 0, $3 = 0;
5912  $2 = -1;
5913  $3 = HEAP32[$0 + 4 >> 2];
5914  label$1 : {
5915   if (($3 | 0) < 0) {
5916    break label$1
5917   }
5918   $1 = HEAP32[$0 + 8 >> 2] + $1 | 0;
5919   if (($1 | 0) > ($3 | 0)) {
5920    break label$1
5921   }
5922   HEAP32[$0 + 8 >> 2] = $1;
5923   $2 = 0;
5924  }
5925  return $2;
5926 }
5927
5928 function ogg_sync_pageseek($0, $1) {
5929  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0;
5930  $9 = global$0 - 16 | 0;
5931  global$0 = $9;
5932  label$1 : {
5933   if (HEAP32[$0 + 4 >> 2] < 0) {
5934    break label$1
5935   }
5936   $4 = HEAP32[$0 + 12 >> 2];
5937   $10 = HEAP32[$0 + 8 >> 2] - $4 | 0;
5938   $2 = $4 + HEAP32[$0 >> 2] | 0;
5939   label$2 : {
5940    label$3 : {
5941     label$4 : {
5942      $5 = HEAP32[$0 + 20 >> 2];
5943      label$5 : {
5944       if (!$5) {
5945        if (($10 | 0) < 27) {
5946         break label$1
5947        }
5948        if ((HEAPU8[$2 | 0] | HEAPU8[$2 + 1 | 0] << 8 | (HEAPU8[$2 + 2 | 0] << 16 | HEAPU8[$2 + 3 | 0] << 24)) != 1399285583) {
5949         break label$5
5950        }
5951        $4 = HEAPU8[$2 + 26 | 0];
5952        $5 = $4 + 27 | 0;
5953        if (($10 | 0) < ($5 | 0)) {
5954         break label$1
5955        }
5956        if ($4) {
5957         $4 = HEAP32[$0 + 24 >> 2];
5958         while (1) {
5959          $4 = HEAPU8[($2 + $6 | 0) + 27 | 0] + $4 | 0;
5960          HEAP32[$0 + 24 >> 2] = $4;
5961          $6 = $6 + 1 | 0;
5962          if ($6 >>> 0 < HEAPU8[$2 + 26 | 0]) {
5963           continue
5964          }
5965          break;
5966         };
5967        }
5968        HEAP32[$0 + 20 >> 2] = $5;
5969       }
5970       if ((HEAP32[$0 + 24 >> 2] + $5 | 0) > ($10 | 0)) {
5971        break label$1
5972       }
5973       $7 = HEAPU8[$2 + 22 | 0] | HEAPU8[$2 + 23 | 0] << 8 | (HEAPU8[$2 + 24 | 0] << 16 | HEAPU8[$2 + 25 | 0] << 24);
5974       HEAP32[$9 + 12 >> 2] = $7;
5975       $6 = 0;
5976       HEAP8[$2 + 22 | 0] = 0;
5977       HEAP8[$2 + 23 | 0] = 0;
5978       HEAP8[$2 + 24 | 0] = 0;
5979       HEAP8[$2 + 25 | 0] = 0;
5980       $11 = HEAP32[$0 + 24 >> 2];
5981       $8 = HEAP32[$0 + 20 >> 2];
5982       HEAP8[$2 + 22 | 0] = 0;
5983       HEAP8[$2 + 23 | 0] = 0;
5984       HEAP8[$2 + 24 | 0] = 0;
5985       HEAP8[$2 + 25 | 0] = 0;
5986       if (($8 | 0) > 0) {
5987        $5 = 0;
5988        while (1) {
5989         $3 = HEAP32[((HEAPU8[$2 + $5 | 0] ^ $3 >>> 24) << 2) + 6512 >> 2] ^ $3 << 8;
5990         $5 = $5 + 1 | 0;
5991         if (($8 | 0) != ($5 | 0)) {
5992          continue
5993         }
5994         break;
5995        };
5996       }
5997       $4 = $2 + 22 | 0;
5998       if (($11 | 0) > 0) {
5999        $8 = $2 + $8 | 0;
6000        while (1) {
6001         $3 = HEAP32[((HEAPU8[$6 + $8 | 0] ^ $3 >>> 24) << 2) + 6512 >> 2] ^ $3 << 8;
6002         $6 = $6 + 1 | 0;
6003         if (($11 | 0) != ($6 | 0)) {
6004          continue
6005         }
6006         break;
6007        };
6008       }
6009       HEAP8[$2 + 22 | 0] = $3;
6010       HEAP8[$2 + 23 | 0] = $3 >>> 8;
6011       HEAP8[$2 + 24 | 0] = $3 >>> 16;
6012       HEAP8[$2 + 25 | 0] = $3 >>> 24;
6013       if (HEAP32[$9 + 12 >> 2] == (HEAPU8[$4 | 0] | HEAPU8[$4 + 1 | 0] << 8 | (HEAPU8[$4 + 2 | 0] << 16 | HEAPU8[$4 + 3 | 0] << 24))) {
6014        break label$4
6015       }
6016       HEAP8[$4 | 0] = $7;
6017       HEAP8[$4 + 1 | 0] = $7 >>> 8;
6018       HEAP8[$4 + 2 | 0] = $7 >>> 16;
6019       HEAP8[$4 + 3 | 0] = $7 >>> 24;
6020      }
6021      HEAP32[$0 + 20 >> 2] = 0;
6022      HEAP32[$0 + 24 >> 2] = 0;
6023      $3 = memchr($2 + 1 | 0, $10 + -1 | 0);
6024      if (!$3) {
6025       break label$3
6026      }
6027      $6 = HEAP32[$0 >> 2];
6028      break label$2;
6029     }
6030     $7 = HEAP32[$0 + 12 >> 2];
6031     label$13 : {
6032      if (!$1) {
6033       $5 = HEAP32[$0 + 24 >> 2];
6034       $3 = HEAP32[$0 + 20 >> 2];
6035       break label$13;
6036      }
6037      $4 = $7 + HEAP32[$0 >> 2] | 0;
6038      HEAP32[$1 >> 2] = $4;
6039      $3 = HEAP32[$0 + 20 >> 2];
6040      HEAP32[$1 + 4 >> 2] = $3;
6041      HEAP32[$1 + 8 >> 2] = $3 + $4;
6042      $5 = HEAP32[$0 + 24 >> 2];
6043      HEAP32[$1 + 12 >> 2] = $5;
6044     }
6045     HEAP32[$0 + 24 >> 2] = 0;
6046     HEAP32[$0 + 16 >> 2] = 0;
6047     HEAP32[$0 + 20 >> 2] = 0;
6048     $3 = $3 + $5 | 0;
6049     HEAP32[$0 + 12 >> 2] = $7 + $3;
6050     break label$1;
6051    }
6052    $6 = HEAP32[$0 >> 2];
6053    $3 = $6 + HEAP32[$0 + 8 >> 2] | 0;
6054   }
6055   HEAP32[$0 + 12 >> 2] = $3 - $6;
6056   $3 = $2 - $3 | 0;
6057  }
6058  global$0 = $9 + 16 | 0;
6059  return $3;
6060 }
6061
6062 function ogg_sync_pageout($0, $1) {
6063  var $2 = 0;
6064  if (HEAP32[$0 + 4 >> 2] >= 0) {
6065   while (1) {
6066    $2 = ogg_sync_pageseek($0, $1);
6067    if (($2 | 0) > 0) {
6068     return 1
6069    }
6070    if (!$2) {
6071     return 0
6072    }
6073    if (HEAP32[$0 + 16 >> 2]) {
6074     continue
6075    }
6076    break;
6077   };
6078   HEAP32[$0 + 16 >> 2] = 1;
6079   $0 = -1;
6080  } else {
6081   $0 = 0
6082  }
6083  return $0;
6084 }
6085
6086 function ogg_stream_pagein($0, $1) {
6087  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0;
6088  $4 = -1;
6089  folding_inner0 : {
6090   label$1 : {
6091    if (!$0) {
6092     break label$1
6093    }
6094    $6 = HEAP32[$0 >> 2];
6095    if (!$6) {
6096     break label$1
6097    }
6098    $3 = HEAP32[$1 >> 2];
6099    $10 = HEAPU8[$3 + 5 | 0];
6100    $5 = HEAP32[$1 + 12 >> 2];
6101    $11 = HEAP32[$1 + 8 >> 2];
6102    $8 = HEAPU8[$3 + 26 | 0];
6103    $13 = HEAPU8[$3 + 18 | 0] | HEAPU8[$3 + 19 | 0] << 8 | (HEAPU8[$3 + 20 | 0] << 16 | HEAPU8[$3 + 21 | 0] << 24);
6104    $9 = HEAPU8[$3 + 14 | 0] | HEAPU8[$3 + 15 | 0] << 8 | (HEAPU8[$3 + 16 | 0] << 16 | HEAPU8[$3 + 17 | 0] << 24);
6105    $14 = HEAPU8[$3 + 6 | 0] | HEAPU8[$3 + 7 | 0] << 8 | (HEAPU8[$3 + 8 | 0] << 16 | HEAPU8[$3 + 9 | 0] << 24);
6106    $15 = HEAPU8[$3 + 10 | 0] | HEAPU8[$3 + 11 | 0] << 8 | (HEAPU8[$3 + 12 | 0] << 16 | HEAPU8[$3 + 13 | 0] << 24);
6107    $12 = HEAPU8[$3 + 4 | 0];
6108    $2 = HEAP32[$0 + 36 >> 2];
6109    $1 = HEAP32[$0 + 12 >> 2];
6110    if ($1) {
6111     $7 = HEAP32[$0 + 8 >> 2] - $1 | 0;
6112     HEAP32[$0 + 8 >> 2] = $7;
6113     if ($7) {
6114      memmove($6, $1 + $6 | 0, $7)
6115     }
6116     HEAP32[$0 + 12 >> 2] = 0;
6117    }
6118    if ($2) {
6119     $1 = $0;
6120     $6 = HEAP32[$0 + 28 >> 2] - $2 | 0;
6121     if ($6) {
6122      $7 = HEAP32[$0 + 16 >> 2];
6123      memmove($7, $7 + ($2 << 2) | 0, $6 << 2);
6124      $6 = HEAP32[$0 + 20 >> 2];
6125      memmove($6, $6 + ($2 << 3) | 0, HEAP32[$0 + 28 >> 2] - $2 << 3);
6126      $7 = HEAP32[$0 + 28 >> 2] - $2 | 0;
6127     } else {
6128      $7 = 0
6129     }
6130     HEAP32[$1 + 28 >> 2] = $7;
6131     HEAP32[$0 + 36 >> 2] = 0;
6132     HEAP32[$0 + 32 >> 2] = HEAP32[$0 + 32 >> 2] - $2;
6133    }
6134    if (($9 | 0) != HEAP32[$0 + 336 >> 2] | $12) {
6135     break label$1
6136    }
6137    if (_os_lacing_expand($0, $8 + 1 | 0)) {
6138     break label$1
6139    }
6140    $7 = $10 & 1;
6141    $6 = HEAP32[$0 + 340 >> 2];
6142    label$7 : {
6143     if (($6 | 0) == ($13 | 0)) {
6144      break label$7
6145     }
6146     $2 = HEAP32[$0 + 32 >> 2];
6147     $9 = HEAP32[$0 + 28 >> 2];
6148     if (($2 | 0) < ($9 | 0)) {
6149      $4 = HEAP32[$0 + 8 >> 2];
6150      $12 = HEAP32[$0 + 16 >> 2];
6151      $1 = $2;
6152      while (1) {
6153       $4 = $4 - HEAPU8[$12 + ($1 << 2) | 0] | 0;
6154       $1 = $1 + 1 | 0;
6155       if (($1 | 0) < ($9 | 0)) {
6156        continue
6157       }
6158       break;
6159      };
6160      HEAP32[$0 + 8 >> 2] = $4;
6161     }
6162     HEAP32[$0 + 28 >> 2] = $2;
6163     if (($6 | 0) == -1) {
6164      break label$7
6165     }
6166     $1 = $2 + 1 | 0;
6167     HEAP32[$0 + 28 >> 2] = $1;
6168     HEAP32[HEAP32[$0 + 16 >> 2] + ($2 << 2) >> 2] = 1024;
6169     HEAP32[$0 + 32 >> 2] = $1;
6170    }
6171    $6 = $10 & 2;
6172    $4 = 0;
6173    label$10 : {
6174     if (!$7) {
6175      break label$10
6176     }
6177     $1 = HEAP32[$0 + 28 >> 2];
6178     if (HEAP32[(HEAP32[$0 + 16 >> 2] + ($1 << 2) | 0) + -4 >> 2] != 1024 ? ($1 | 0) >= 1 : 0) {
6179      break label$10
6180     }
6181     $6 = 0;
6182     if (!$8) {
6183      break label$10
6184     }
6185     $1 = 0;
6186     while (1) {
6187      $4 = $1 + 1 | 0;
6188      $1 = HEAPU8[($1 + $3 | 0) + 27 | 0];
6189      $5 = $5 - $1 | 0;
6190      $11 = $1 + $11 | 0;
6191      if (($1 | 0) != 255) {
6192       break label$10
6193      }
6194      $1 = $4;
6195      if (($8 | 0) != ($1 | 0)) {
6196       continue
6197      }
6198      break;
6199     };
6200     $4 = $8;
6201    }
6202    if ($5) {
6203     $2 = HEAP32[$0 + 4 >> 2];
6204     $1 = HEAP32[$0 + 8 >> 2];
6205     label$15 : {
6206      if (($2 - $5 | 0) > ($1 | 0)) {
6207       $2 = HEAP32[$0 >> 2];
6208       break label$15;
6209      }
6210      if (($2 | 0) > (2147483647 - $5 | 0)) {
6211       break folding_inner0
6212      }
6213      $1 = $2 + $5 | 0;
6214      $1 = ($1 | 0) < 2147482623 ? $1 + 1024 | 0 : $1;
6215      $2 = dlrealloc(HEAP32[$0 >> 2], $1);
6216      if (!$2) {
6217       break folding_inner0
6218      }
6219      HEAP32[$0 >> 2] = $2;
6220      HEAP32[$0 + 4 >> 2] = $1;
6221      $1 = HEAP32[$0 + 8 >> 2];
6222     }
6223     memcpy($1 + $2 | 0, $11, $5);
6224     HEAP32[$0 + 8 >> 2] = HEAP32[$0 + 8 >> 2] + $5;
6225    }
6226    $11 = $10 & 4;
6227    label$25 : {
6228     if (($4 | 0) >= ($8 | 0)) {
6229      break label$25
6230     }
6231     $10 = HEAP32[$0 + 20 >> 2];
6232     $7 = HEAP32[$0 + 16 >> 2];
6233     $2 = HEAP32[$0 + 28 >> 2];
6234     $1 = $7 + ($2 << 2) | 0;
6235     $5 = HEAPU8[($3 + $4 | 0) + 27 | 0];
6236     HEAP32[$1 >> 2] = $5;
6237     $9 = $10 + ($2 << 3) | 0;
6238     HEAP32[$9 >> 2] = -1;
6239     HEAP32[$9 + 4 >> 2] = -1;
6240     if ($6) {
6241      HEAP32[$1 >> 2] = $5 | 256
6242     }
6243     $1 = $2 + 1 | 0;
6244     HEAP32[$0 + 28 >> 2] = $1;
6245     $4 = $4 + 1 | 0;
6246     label$27 : {
6247      if (($5 | 0) == 255) {
6248       $2 = -1;
6249       break label$27;
6250      }
6251      HEAP32[$0 + 32 >> 2] = $1;
6252     }
6253     if (($4 | 0) != ($8 | 0)) {
6254      while (1) {
6255       $6 = HEAPU8[($3 + $4 | 0) + 27 | 0];
6256       HEAP32[$7 + ($1 << 2) >> 2] = $6;
6257       $5 = $10 + ($1 << 3) | 0;
6258       HEAP32[$5 >> 2] = -1;
6259       HEAP32[$5 + 4 >> 2] = -1;
6260       $5 = $1 + 1 | 0;
6261       HEAP32[$0 + 28 >> 2] = $5;
6262       $4 = $4 + 1 | 0;
6263       if (($6 | 0) != 255) {
6264        HEAP32[$0 + 32 >> 2] = $5;
6265        $2 = $1;
6266       }
6267       $1 = $5;
6268       if (($4 | 0) != ($8 | 0)) {
6269        continue
6270       }
6271       break;
6272      }
6273     }
6274     if (($2 | 0) == -1) {
6275      break label$25
6276     }
6277     $1 = HEAP32[$0 + 20 >> 2] + ($2 << 3) | 0;
6278     HEAP32[$1 >> 2] = $14;
6279     HEAP32[$1 + 4 >> 2] = $15;
6280    }
6281    label$32 : {
6282     if (!$11) {
6283      break label$32
6284     }
6285     HEAP32[$0 + 328 >> 2] = 1;
6286     $1 = HEAP32[$0 + 28 >> 2];
6287     if (($1 | 0) < 1) {
6288      break label$32
6289     }
6290     $1 = (HEAP32[$0 + 16 >> 2] + ($1 << 2) | 0) + -4 | 0;
6291     HEAP32[$1 >> 2] = HEAP32[$1 >> 2] | 512;
6292    }
6293    HEAP32[$0 + 340 >> 2] = $13 + 1;
6294    $4 = 0;
6295   }
6296   return $4;
6297  }
6298  $1 = HEAP32[$0 >> 2];
6299  if ($1) {
6300   dlfree($1)
6301  }
6302  $1 = HEAP32[$0 + 16 >> 2];
6303  if ($1) {
6304   dlfree($1)
6305  }
6306  $1 = HEAP32[$0 + 20 >> 2];
6307  if ($1) {
6308   dlfree($1)
6309  }
6310  memset($0, 360);
6311  return -1;
6312 }
6313
6314 function ogg_sync_reset($0) {
6315  if (HEAP32[$0 + 4 >> 2] < 0) {
6316   return
6317  }
6318  HEAP32[$0 + 8 >> 2] = 0;
6319  HEAP32[$0 + 12 >> 2] = 0;
6320  HEAP32[$0 + 24 >> 2] = 0;
6321  HEAP32[$0 + 16 >> 2] = 0;
6322  HEAP32[$0 + 20 >> 2] = 0;
6323 }
6324
6325 function ogg_stream_reset($0) {
6326  if (!$0 | !HEAP32[$0 >> 2]) {
6327   $0 = -1
6328  } else {
6329   HEAP32[$0 + 344 >> 2] = 0;
6330   HEAP32[$0 + 348 >> 2] = 0;
6331   HEAP32[$0 + 340 >> 2] = -1;
6332   HEAP32[$0 + 332 >> 2] = 0;
6333   HEAP32[$0 + 324 >> 2] = 0;
6334   HEAP32[$0 + 328 >> 2] = 0;
6335   HEAP32[$0 + 36 >> 2] = 0;
6336   HEAP32[$0 + 28 >> 2] = 0;
6337   HEAP32[$0 + 32 >> 2] = 0;
6338   HEAP32[$0 + 8 >> 2] = 0;
6339   HEAP32[$0 + 12 >> 2] = 0;
6340   HEAP32[$0 + 352 >> 2] = 0;
6341   HEAP32[$0 + 356 >> 2] = 0;
6342   $0 = 0;
6343  }
6344 }
6345
6346 function ogg_stream_packetout($0, $1) {
6347  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
6348  label$1 : {
6349   if (!$0) {
6350    break label$1
6351   }
6352   $8 = HEAP32[$0 >> 2];
6353   if (!$8) {
6354    break label$1
6355   }
6356   $5 = HEAP32[$0 + 36 >> 2];
6357   if (HEAP32[$0 + 32 >> 2] <= ($5 | 0)) {
6358    break label$1
6359   }
6360   $3 = HEAP32[$0 + 16 >> 2];
6361   $6 = HEAP32[$3 + ($5 << 2) >> 2];
6362   if ($6 & 1024) {
6363    HEAP32[$0 + 36 >> 2] = $5 + 1;
6364    $1 = $0;
6365    $3 = $0;
6366    $2 = HEAP32[$0 + 348 >> 2];
6367    $0 = HEAP32[$0 + 344 >> 2] + 1 | 0;
6368    if ($0 >>> 0 < 1) {
6369     $2 = $2 + 1 | 0
6370    }
6371    HEAP32[$3 + 344 >> 2] = $0;
6372    HEAP32[$1 + 348 >> 2] = $2;
6373    return -1;
6374   }
6375   $4 = $6 & 512;
6376   $7 = 255;
6377   $2 = $6 & 255;
6378   label$3 : {
6379    if (($2 | 0) != 255) {
6380     $7 = $2;
6381     break label$3;
6382    }
6383    while (1) {
6384     $5 = $5 + 1 | 0;
6385     $2 = HEAP32[($5 << 2) + $3 >> 2];
6386     $4 = $2 & 512 ? 512 : $4;
6387     $2 = $2 & 255;
6388     $7 = $2 + $7 | 0;
6389     if (($2 | 0) == 255) {
6390      continue
6391     }
6392     break;
6393    };
6394   }
6395   label$6 : {
6396    if (!$1) {
6397     $4 = HEAP32[$0 + 344 >> 2];
6398     $2 = HEAP32[$0 + 348 >> 2];
6399     $6 = HEAP32[$0 + 12 >> 2];
6400     break label$6;
6401    }
6402    HEAP32[$1 + 8 >> 2] = $6 & 256;
6403    HEAP32[$1 + 12 >> 2] = $4;
6404    $6 = HEAP32[$0 + 12 >> 2];
6405    HEAP32[$1 >> 2] = $8 + $6;
6406    $3 = HEAP32[$0 + 348 >> 2];
6407    $2 = $3;
6408    $4 = HEAP32[$0 + 344 >> 2];
6409    HEAP32[$1 + 24 >> 2] = $4;
6410    HEAP32[$1 + 28 >> 2] = $2;
6411    $3 = HEAP32[$0 + 20 >> 2] + ($5 << 3) | 0;
6412    $8 = HEAP32[$3 + 4 >> 2];
6413    $3 = HEAP32[$3 >> 2];
6414    HEAP32[$1 + 4 >> 2] = $7;
6415    HEAP32[$1 + 16 >> 2] = $3;
6416    HEAP32[$1 + 20 >> 2] = $8;
6417   }
6418   $3 = $4 + 1 | 0;
6419   if ($3 >>> 0 < 1) {
6420    $2 = $2 + 1 | 0
6421   }
6422   HEAP32[$0 + 344 >> 2] = $3;
6423   HEAP32[$0 + 348 >> 2] = $2;
6424   $4 = 1;
6425   HEAP32[$0 + 36 >> 2] = $5 + 1;
6426   HEAP32[$0 + 12 >> 2] = $6 + $7;
6427  }
6428  return $4;
6429 }
6430
6431 function FLAC__ogg_decoder_aspect_init($0) {
6432  var $1 = 0;
6433  label$1 : {
6434   if (ogg_stream_init($0 + 8 | 0, HEAP32[$0 + 4 >> 2])) {
6435    break label$1
6436   }
6437   if (ogg_sync_init($0 + 368 | 0)) {
6438    break label$1
6439   }
6440   HEAP32[$0 + 396 >> 2] = -1;
6441   HEAP32[$0 + 400 >> 2] = -1;
6442   HEAP32[$0 + 408 >> 2] = 0;
6443   HEAP32[$0 + 412 >> 2] = 0;
6444   HEAP32[$0 + 404 >> 2] = HEAP32[$0 >> 2];
6445   $1 = 1;
6446  }
6447  return $1;
6448 }
6449
6450 function FLAC__ogg_decoder_aspect_set_defaults($0) {
6451  HEAP32[$0 >> 2] = 1;
6452 }
6453
6454 function FLAC__ogg_decoder_aspect_reset($0) {
6455  ogg_stream_reset($0 + 8 | 0);
6456  ogg_sync_reset($0 + 368 | 0);
6457  HEAP32[$0 + 408 >> 2] = 0;
6458  HEAP32[$0 + 412 >> 2] = 0;
6459  if (HEAP32[$0 >> 2]) {
6460   HEAP32[$0 + 404 >> 2] = 1
6461  }
6462 }
6463
6464 function FLAC__ogg_decoder_aspect_read_callback_wrapper($0, $1, $2, $3, $4) {
6465  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0;
6466  $8 = global$0 - 16 | 0;
6467  global$0 = $8;
6468  $9 = HEAP32[$2 >> 2];
6469  HEAP32[$2 >> 2] = 0;
6470  label$1 : {
6471   label$2 : {
6472    label$3 : {
6473     if (!$9) {
6474      break label$3
6475     }
6476     $10 = $0 + 416 | 0;
6477     $11 = $0 + 368 | 0;
6478     $13 = $0 + 440 | 0;
6479     $14 = $0 + 8 | 0;
6480     $15 = HEAP32[2721];
6481     $16 = HEAPU8[7536];
6482     while (1) {
6483      if (HEAP32[$0 + 408 >> 2]) {
6484       break label$3
6485      }
6486      label$5 : {
6487       label$6 : {
6488        if (HEAP32[$0 + 412 >> 2]) {
6489         if (HEAP32[$0 + 432 >> 2]) {
6490          $7 = HEAP32[$0 + 440 >> 2];
6491          $6 = HEAP32[$0 + 444 >> 2];
6492          $5 = $9 - $5 | 0;
6493          if ($6 >>> 0 > $5 >>> 0) {
6494           break label$6
6495          }
6496          $1 = memcpy($1, $7, $6);
6497          HEAP32[$2 >> 2] = $6 + HEAP32[$2 >> 2];
6498          HEAP32[$0 + 432 >> 2] = 0;
6499          $1 = $1 + $6 | 0;
6500          break label$5;
6501         }
6502         $5 = ogg_stream_packetout($14, $13);
6503         if (($5 | 0) >= 1) {
6504          HEAP32[$0 + 432 >> 2] = 1;
6505          $12 = HEAP32[$0 + 444 >> 2];
6506          if (($12 | 0) < 1) {
6507           break label$5
6508          }
6509          $6 = HEAP32[$13 >> 2];
6510          if (HEAPU8[$6 | 0] != ($16 | 0)) {
6511           break label$5
6512          }
6513          $7 = 3;
6514          if (($12 | 0) < 9) {
6515           break label$1
6516          }
6517          $5 = $15;
6518          if ((HEAPU8[$6 + 1 | 0] | HEAPU8[$6 + 2 | 0] << 8 | (HEAPU8[$6 + 3 | 0] << 16 | HEAPU8[$6 + 4 | 0] << 24)) != (HEAPU8[$5 | 0] | HEAPU8[$5 + 1 | 0] << 8 | (HEAPU8[$5 + 2 | 0] << 16 | HEAPU8[$5 + 3 | 0] << 24))) {
6519           break label$1
6520          }
6521          $5 = HEAPU8[$6 + 5 | 0];
6522          HEAP32[$0 + 396 >> 2] = $5;
6523          HEAP32[$0 + 400 >> 2] = HEAPU8[$6 + 6 | 0];
6524          if (($5 | 0) != 1) {
6525           $7 = 4;
6526           break label$1;
6527          }
6528          HEAP32[$0 + 444 >> 2] = $12 + -9;
6529          HEAP32[$0 + 440 >> 2] = $6 + 9;
6530          break label$5;
6531         }
6532         if ($5) {
6533          $7 = 2;
6534          break label$1;
6535         }
6536         HEAP32[$0 + 412 >> 2] = 0;
6537         break label$5;
6538        }
6539        $5 = ogg_sync_pageout($11, $10);
6540        if (($5 | 0) >= 1) {
6541         if (HEAP32[$0 + 404 >> 2]) {
6542          $5 = ogg_page_serialno($10);
6543          HEAP32[$0 + 404 >> 2] = 0;
6544          HEAP32[$0 + 344 >> 2] = $5;
6545          HEAP32[$0 + 4 >> 2] = $5;
6546         }
6547         if (ogg_stream_pagein($14, $10)) {
6548          break label$5
6549         }
6550         HEAP32[$0 + 432 >> 2] = 0;
6551         HEAP32[$0 + 412 >> 2] = 1;
6552         break label$5;
6553        }
6554        if ($5) {
6555         $7 = 2;
6556         break label$1;
6557        }
6558        $5 = $9 - HEAP32[$2 >> 2] | 0;
6559        $5 = $5 >>> 0 > 8192 ? $5 : 8192;
6560        $6 = ogg_sync_buffer($11, $5);
6561        if (!$6) {
6562         $7 = 7;
6563         break label$1;
6564        }
6565        HEAP32[$8 + 12 >> 2] = $5;
6566        label$16 : {
6567         switch ((FUNCTION_TABLE[8]($3, $6, $8 + 12 | 0, $4) | 0) + -1 | 0) {
6568         case 0:
6569          HEAP32[$0 + 408 >> 2] = 1;
6570          break;
6571         case 4:
6572          break label$2;
6573         default:
6574          break label$16;
6575         };
6576        }
6577        if ((ogg_sync_wrote($11, HEAP32[$8 + 12 >> 2]) | 0) >= 0) {
6578         break label$5
6579        }
6580        $7 = 6;
6581        break label$1;
6582       }
6583       $1 = memcpy($1, $7, $5);
6584       HEAP32[$2 >> 2] = $5 + HEAP32[$2 >> 2];
6585       HEAP32[$0 + 440 >> 2] = $5 + HEAP32[$0 + 440 >> 2];
6586       HEAP32[$0 + 444 >> 2] = HEAP32[$0 + 444 >> 2] - $5;
6587       $1 = $1 + $5 | 0;
6588      }
6589      $5 = HEAP32[$2 >> 2];
6590      if ($9 >>> 0 > $5 >>> 0) {
6591       continue
6592      }
6593      break;
6594     };
6595    }
6596    global$0 = $8 + 16 | 0;
6597    return !$5 & HEAP32[$0 + 408 >> 2] != 0;
6598   }
6599   $7 = 5;
6600  }
6601  global$0 = $8 + 16 | 0;
6602  return $7;
6603 }
6604
6605 function FLAC__MD5Init($0) {
6606  HEAP32[$0 + 80 >> 2] = 0;
6607  HEAP32[$0 + 84 >> 2] = 0;
6608  HEAP32[$0 + 64 >> 2] = 1732584193;
6609  HEAP32[$0 + 68 >> 2] = -271733879;
6610  HEAP32[$0 + 72 >> 2] = -1732584194;
6611  HEAP32[$0 + 76 >> 2] = 271733878;
6612  HEAP32[$0 + 88 >> 2] = 0;
6613  HEAP32[$0 + 92 >> 2] = 0;
6614 }
6615
6616 function FLAC__MD5Final($0, $1) {
6617  var $2 = 0, $3 = 0, $4 = 0;
6618  $3 = HEAP32[$1 + 80 >> 2] & 63;
6619  $2 = $3 + $1 | 0;
6620  HEAP8[$2 | 0] = 128;
6621  $2 = $2 + 1 | 0;
6622  $4 = 56;
6623  label$1 : {
6624   if ($3 >>> 0 < 56) {
6625    $4 = 55 - $3 | 0;
6626    break label$1;
6627   }
6628   memset($2, $3 ^ 63);
6629   FLAC__MD5Transform($1 - -64 | 0, $1);
6630   $2 = $1;
6631  }
6632  memset($2, $4);
6633  $2 = HEAP32[$1 + 80 >> 2];
6634  HEAP32[$1 + 56 >> 2] = $2 << 3;
6635  HEAP32[$1 + 60 >> 2] = HEAP32[$1 + 84 >> 2] << 3 | $2 >>> 29;
6636  FLAC__MD5Transform($1 - -64 | 0, $1);
6637  $2 = HEAPU8[$1 + 76 | 0] | HEAPU8[$1 + 77 | 0] << 8 | (HEAPU8[$1 + 78 | 0] << 16 | HEAPU8[$1 + 79 | 0] << 24);
6638  $3 = HEAPU8[$1 + 72 | 0] | HEAPU8[$1 + 73 | 0] << 8 | (HEAPU8[$1 + 74 | 0] << 16 | HEAPU8[$1 + 75 | 0] << 24);
6639  HEAP8[$0 + 8 | 0] = $3;
6640  HEAP8[$0 + 9 | 0] = $3 >>> 8;
6641  HEAP8[$0 + 10 | 0] = $3 >>> 16;
6642  HEAP8[$0 + 11 | 0] = $3 >>> 24;
6643  HEAP8[$0 + 12 | 0] = $2;
6644  HEAP8[$0 + 13 | 0] = $2 >>> 8;
6645  HEAP8[$0 + 14 | 0] = $2 >>> 16;
6646  HEAP8[$0 + 15 | 0] = $2 >>> 24;
6647  $2 = HEAPU8[$1 + 68 | 0] | HEAPU8[$1 + 69 | 0] << 8 | (HEAPU8[$1 + 70 | 0] << 16 | HEAPU8[$1 + 71 | 0] << 24);
6648  $3 = HEAPU8[$1 + 64 | 0] | HEAPU8[$1 + 65 | 0] << 8 | (HEAPU8[$1 + 66 | 0] << 16 | HEAPU8[$1 + 67 | 0] << 24);
6649  HEAP8[$0 | 0] = $3;
6650  HEAP8[$0 + 1 | 0] = $3 >>> 8;
6651  HEAP8[$0 + 2 | 0] = $3 >>> 16;
6652  HEAP8[$0 + 3 | 0] = $3 >>> 24;
6653  HEAP8[$0 + 4 | 0] = $2;
6654  HEAP8[$0 + 5 | 0] = $2 >>> 8;
6655  HEAP8[$0 + 6 | 0] = $2 >>> 16;
6656  HEAP8[$0 + 7 | 0] = $2 >>> 24;
6657  $0 = HEAP32[$1 + 88 >> 2];
6658  if ($0) {
6659   dlfree($0);
6660   HEAP32[$1 + 88 >> 2] = 0;
6661   HEAP32[$1 + 92 >> 2] = 0;
6662  }
6663  memset($1, 96);
6664 }
6665
6666 function FLAC__MD5Transform($0, $1) {
6667  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
6668  $11 = HEAP32[$1 + 16 >> 2];
6669  $8 = HEAP32[$1 + 32 >> 2];
6670  $12 = HEAP32[$1 + 48 >> 2];
6671  $13 = HEAP32[$1 + 36 >> 2];
6672  $14 = HEAP32[$1 + 52 >> 2];
6673  $15 = HEAP32[$1 + 4 >> 2];
6674  $6 = HEAP32[$1 + 20 >> 2];
6675  $7 = HEAP32[$0 + 4 >> 2];
6676  $9 = HEAP32[$1 >> 2];
6677  $25 = HEAP32[$0 >> 2];
6678  $16 = HEAP32[$0 + 12 >> 2];
6679  $10 = HEAP32[$0 + 8 >> 2];
6680  $3 = $7 + __wasm_rotl_i32((($9 + $25 | 0) + ($16 ^ ($16 ^ $10) & $7) | 0) + -680876936 | 0, 7) | 0;
6681  $17 = HEAP32[$1 + 12 >> 2];
6682  $18 = HEAP32[$1 + 8 >> 2];
6683  $4 = __wasm_rotl_i32((($15 + $16 | 0) + ($3 & ($7 ^ $10) ^ $10) | 0) + -389564586 | 0, 12) + $3 | 0;
6684  $2 = __wasm_rotl_i32((($18 + $10 | 0) + ($4 & ($3 ^ $7) ^ $7) | 0) + 606105819 | 0, 17) + $4 | 0;
6685  $5 = __wasm_rotl_i32((($7 + $17 | 0) + ($3 ^ $2 & ($3 ^ $4)) | 0) + -1044525330 | 0, 22) + $2 | 0;
6686  $3 = __wasm_rotl_i32((($3 + $11 | 0) + ($4 ^ $5 & ($2 ^ $4)) | 0) + -176418897 | 0, 7) + $5 | 0;
6687  $19 = HEAP32[$1 + 28 >> 2];
6688  $20 = HEAP32[$1 + 24 >> 2];
6689  $4 = __wasm_rotl_i32((($4 + $6 | 0) + ($2 ^ $3 & ($2 ^ $5)) | 0) + 1200080426 | 0, 12) + $3 | 0;
6690  $2 = __wasm_rotl_i32((($2 + $20 | 0) + ($5 ^ $4 & ($3 ^ $5)) | 0) + -1473231341 | 0, 17) + $4 | 0;
6691  $5 = __wasm_rotl_i32((($5 + $19 | 0) + ($3 ^ $2 & ($3 ^ $4)) | 0) + -45705983 | 0, 22) + $2 | 0;
6692  $3 = __wasm_rotl_i32((($3 + $8 | 0) + ($4 ^ $5 & ($2 ^ $4)) | 0) + 1770035416 | 0, 7) + $5 | 0;
6693  $21 = HEAP32[$1 + 44 >> 2];
6694  $22 = HEAP32[$1 + 40 >> 2];
6695  $4 = __wasm_rotl_i32((($4 + $13 | 0) + ($2 ^ $3 & ($2 ^ $5)) | 0) + -1958414417 | 0, 12) + $3 | 0;
6696  $2 = __wasm_rotl_i32((($2 + $22 | 0) + ($5 ^ $4 & ($3 ^ $5)) | 0) + -42063 | 0, 17) + $4 | 0;
6697  $5 = __wasm_rotl_i32((($5 + $21 | 0) + ($3 ^ $2 & ($3 ^ $4)) | 0) + -1990404162 | 0, 22) + $2 | 0;
6698  $3 = __wasm_rotl_i32((($3 + $12 | 0) + ($4 ^ $5 & ($2 ^ $4)) | 0) + 1804603682 | 0, 7) + $5 | 0;
6699  $23 = HEAP32[$1 + 56 >> 2];
6700  $24 = HEAP32[$1 + 60 >> 2];
6701  $4 = __wasm_rotl_i32((($4 + $14 | 0) + ($2 ^ $3 & ($2 ^ $5)) | 0) + -40341101 | 0, 12) + $3 | 0;
6702  $1 = $4 + __wasm_rotl_i32((($2 + $23 | 0) + ($5 ^ ($3 ^ $5) & $4) | 0) + -1502002290 | 0, 17) | 0;
6703  $26 = $1 + $21 | 0;
6704  $2 = $3 + $15 | 0;
6705  $3 = __wasm_rotl_i32((($5 + $24 | 0) + ($3 ^ $1 & ($3 ^ $4)) | 0) + 1236535329 | 0, 22) + $1 | 0;
6706  $2 = __wasm_rotl_i32(($2 + ($1 ^ ($3 ^ $1) & $4) | 0) + -165796510 | 0, 5) + $3 | 0;
6707  $1 = __wasm_rotl_i32((($4 + $20 | 0) + ($3 ^ $1 & ($3 ^ $2)) | 0) + -1069501632 | 0, 9) + $2 | 0;
6708  $4 = __wasm_rotl_i32(($26 + (($2 ^ $1) & $3 ^ $2) | 0) + 643717713 | 0, 14) + $1 | 0;
6709  $3 = __wasm_rotl_i32((($3 + $9 | 0) + ($1 ^ $2 & ($1 ^ $4)) | 0) + -373897302 | 0, 20) + $4 | 0;
6710  $2 = __wasm_rotl_i32((($2 + $6 | 0) + ($4 ^ $1 & ($3 ^ $4)) | 0) + -701558691 | 0, 5) + $3 | 0;
6711  $1 = __wasm_rotl_i32((($1 + $22 | 0) + ($3 ^ $4 & ($3 ^ $2)) | 0) + 38016083 | 0, 9) + $2 | 0;
6712  $4 = __wasm_rotl_i32((($24 + $4 | 0) + (($2 ^ $1) & $3 ^ $2) | 0) + -660478335 | 0, 14) + $1 | 0;
6713  $3 = __wasm_rotl_i32((($3 + $11 | 0) + ($1 ^ $2 & ($1 ^ $4)) | 0) + -405537848 | 0, 20) + $4 | 0;
6714  $2 = __wasm_rotl_i32((($2 + $13 | 0) + ($4 ^ $1 & ($3 ^ $4)) | 0) + 568446438 | 0, 5) + $3 | 0;
6715  $1 = __wasm_rotl_i32((($1 + $23 | 0) + ($3 ^ $4 & ($3 ^ $2)) | 0) + -1019803690 | 0, 9) + $2 | 0;
6716  $4 = __wasm_rotl_i32((($4 + $17 | 0) + (($2 ^ $1) & $3 ^ $2) | 0) + -187363961 | 0, 14) + $1 | 0;
6717  $3 = __wasm_rotl_i32((($3 + $8 | 0) + ($1 ^ $2 & ($1 ^ $4)) | 0) + 1163531501 | 0, 20) + $4 | 0;
6718  $2 = __wasm_rotl_i32((($2 + $14 | 0) + ($4 ^ $1 & ($3 ^ $4)) | 0) + -1444681467 | 0, 5) + $3 | 0;
6719  $1 = __wasm_rotl_i32((($1 + $18 | 0) + ($3 ^ $4 & ($3 ^ $2)) | 0) + -51403784 | 0, 9) + $2 | 0;
6720  $4 = __wasm_rotl_i32((($4 + $19 | 0) + (($2 ^ $1) & $3 ^ $2) | 0) + 1735328473 | 0, 14) + $1 | 0;
6721  $5 = $1 ^ $4;
6722  $3 = __wasm_rotl_i32((($3 + $12 | 0) + ($1 ^ $5 & $2) | 0) + -1926607734 | 0, 20) + $4 | 0;
6723  $2 = __wasm_rotl_i32((($2 + $6 | 0) + ($3 ^ $5) | 0) + -378558 | 0, 4) + $3 | 0;
6724  $1 = __wasm_rotl_i32((($1 + $8 | 0) + ($3 ^ $4 ^ $2) | 0) + -2022574463 | 0, 11) + $2 | 0;
6725  $4 = __wasm_rotl_i32((($4 + $21 | 0) + ($1 ^ ($3 ^ $2)) | 0) + 1839030562 | 0, 16) + $1 | 0;
6726  $3 = __wasm_rotl_i32((($3 + $23 | 0) + ($4 ^ ($1 ^ $2)) | 0) + -35309556 | 0, 23) + $4 | 0;
6727  $2 = __wasm_rotl_i32((($2 + $15 | 0) + ($3 ^ ($1 ^ $4)) | 0) + -1530992060 | 0, 4) + $3 | 0;
6728  $1 = __wasm_rotl_i32((($1 + $11 | 0) + ($2 ^ ($3 ^ $4)) | 0) + 1272893353 | 0, 11) + $2 | 0;
6729  $4 = __wasm_rotl_i32((($4 + $19 | 0) + ($1 ^ ($3 ^ $2)) | 0) + -155497632 | 0, 16) + $1 | 0;
6730  $3 = __wasm_rotl_i32((($3 + $22 | 0) + ($4 ^ ($1 ^ $2)) | 0) + -1094730640 | 0, 23) + $4 | 0;
6731  $2 = __wasm_rotl_i32((($2 + $14 | 0) + ($3 ^ ($1 ^ $4)) | 0) + 681279174 | 0, 4) + $3 | 0;
6732  $1 = __wasm_rotl_i32((($1 + $9 | 0) + ($2 ^ ($3 ^ $4)) | 0) + -358537222 | 0, 11) + $2 | 0;
6733  $4 = __wasm_rotl_i32((($4 + $17 | 0) + ($1 ^ ($3 ^ $2)) | 0) + -722521979 | 0, 16) + $1 | 0;
6734  $3 = __wasm_rotl_i32((($3 + $20 | 0) + ($4 ^ ($1 ^ $2)) | 0) + 76029189 | 0, 23) + $4 | 0;
6735  $2 = __wasm_rotl_i32((($2 + $13 | 0) + ($3 ^ ($1 ^ $4)) | 0) + -640364487 | 0, 4) + $3 | 0;
6736  $1 = __wasm_rotl_i32((($1 + $12 | 0) + ($2 ^ ($3 ^ $4)) | 0) + -421815835 | 0, 11) + $2 | 0;
6737  $5 = $2 + $9 | 0;
6738  $9 = $1 ^ $2;
6739  $2 = __wasm_rotl_i32((($4 + $24 | 0) + ($1 ^ ($3 ^ $2)) | 0) + 530742520 | 0, 16) + $1 | 0;
6740  $4 = __wasm_rotl_i32((($3 + $18 | 0) + ($9 ^ $2) | 0) + -995338651 | 0, 23) + $2 | 0;
6741  $3 = __wasm_rotl_i32(($5 + (($4 | $1 ^ -1) ^ $2) | 0) + -198630844 | 0, 6) + $4 | 0;
6742  $5 = $4 + $6 | 0;
6743  $6 = $2 + $23 | 0;
6744  $2 = __wasm_rotl_i32((($1 + $19 | 0) + ($4 ^ ($3 | $2 ^ -1)) | 0) + 1126891415 | 0, 10) + $3 | 0;
6745  $4 = __wasm_rotl_i32(($6 + ($3 ^ ($2 | $4 ^ -1)) | 0) + -1416354905 | 0, 15) + $2 | 0;
6746  $1 = __wasm_rotl_i32(($5 + (($4 | $3 ^ -1) ^ $2) | 0) + -57434055 | 0, 21) + $4 | 0;
6747  $5 = $4 + $22 | 0;
6748  $6 = $2 + $17 | 0;
6749  $2 = __wasm_rotl_i32((($3 + $12 | 0) + ($4 ^ ($1 | $2 ^ -1)) | 0) + 1700485571 | 0, 6) + $1 | 0;
6750  $4 = __wasm_rotl_i32(($6 + ($1 ^ ($2 | $4 ^ -1)) | 0) + -1894986606 | 0, 10) + $2 | 0;
6751  $3 = __wasm_rotl_i32(($5 + (($4 | $1 ^ -1) ^ $2) | 0) + -1051523 | 0, 15) + $4 | 0;
6752  $5 = $4 + $24 | 0;
6753  $8 = $2 + $8 | 0;
6754  $2 = __wasm_rotl_i32((($1 + $15 | 0) + ($4 ^ ($3 | $2 ^ -1)) | 0) + -2054922799 | 0, 21) + $3 | 0;
6755  $4 = __wasm_rotl_i32(($8 + ($3 ^ ($2 | $4 ^ -1)) | 0) + 1873313359 | 0, 6) + $2 | 0;
6756  $1 = __wasm_rotl_i32(($5 + (($4 | $3 ^ -1) ^ $2) | 0) + -30611744 | 0, 10) + $4 | 0;
6757  $3 = __wasm_rotl_i32((($3 + $20 | 0) + ($4 ^ ($1 | $2 ^ -1)) | 0) + -1560198380 | 0, 15) + $1 | 0;
6758  $2 = __wasm_rotl_i32((($2 + $14 | 0) + ($1 ^ ($3 | $4 ^ -1)) | 0) + 1309151649 | 0, 21) + $3 | 0;
6759  $4 = __wasm_rotl_i32((($4 + $11 | 0) + (($2 | $1 ^ -1) ^ $3) | 0) + -145523070 | 0, 6) + $2 | 0;
6760  HEAP32[$0 >> 2] = $4 + $25;
6761  $1 = __wasm_rotl_i32((($1 + $21 | 0) + ($2 ^ ($4 | $3 ^ -1)) | 0) + -1120210379 | 0, 10) + $4 | 0;
6762  HEAP32[$0 + 12 >> 2] = $1 + $16;
6763  $3 = __wasm_rotl_i32((($3 + $18 | 0) + ($4 ^ ($1 | $2 ^ -1)) | 0) + 718787259 | 0, 15) + $1 | 0;
6764  HEAP32[$0 + 8 >> 2] = $3 + $10;
6765  (wasm2js_i32$0 = $0, wasm2js_i32$1 = __wasm_rotl_i32((($2 + $13 | 0) + ($1 ^ ($3 | $4 ^ -1)) | 0) + -343485551 | 0, 21) + ($3 + $7 | 0) | 0), HEAP32[wasm2js_i32$0 + 4 >> 2] = wasm2js_i32$1;
6766 }
6767
6768 function FLAC__MD5Accumulate($0, $1, $2, $3, $4) {
6769  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0;
6770  __wasm_i64_mul($4, 0, $2, 0);
6771  label$1 : {
6772   if (i64toi32_i32$HIGH_BITS) {
6773    break label$1
6774   }
6775   $7 = Math_imul($2, $4);
6776   __wasm_i64_mul($3, 0, $7, 0);
6777   if (i64toi32_i32$HIGH_BITS) {
6778    break label$1
6779   }
6780   $6 = HEAP32[$0 + 88 >> 2];
6781   $11 = Math_imul($3, $7);
6782   label$2 : {
6783    if (HEAPU32[$0 + 92 >> 2] >= $11 >>> 0) {
6784     $5 = $6;
6785     break label$2;
6786    }
6787    $5 = dlrealloc($6, $11);
6788    label$4 : {
6789     if (!$5) {
6790      dlfree($6);
6791      $5 = dlmalloc($11);
6792      HEAP32[$0 + 88 >> 2] = $5;
6793      if ($5) {
6794       break label$4
6795      }
6796      HEAP32[$0 + 92 >> 2] = 0;
6797      return 0;
6798     }
6799     HEAP32[$0 + 88 >> 2] = $5;
6800    }
6801    HEAP32[$0 + 92 >> 2] = $11;
6802   }
6803   label$6 : {
6804    label$7 : {
6805     label$8 : {
6806      label$9 : {
6807       label$10 : {
6808        label$11 : {
6809         label$12 : {
6810          label$13 : {
6811           label$14 : {
6812            label$15 : {
6813             label$16 : {
6814              label$17 : {
6815               $6 = Math_imul($4, 100) + $2 | 0;
6816               if (($6 | 0) <= 300) {
6817                label$19 : {
6818                 switch ($6 + -101 | 0) {
6819                 case 3:
6820                  break label$10;
6821                 case 5:
6822                  break label$11;
6823                 case 7:
6824                  break label$12;
6825                 case 2:
6826                 case 4:
6827                 case 6:
6828                  break label$7;
6829                 case 0:
6830                  break label$8;
6831                 case 1:
6832                  break label$9;
6833                 default:
6834                  break label$19;
6835                 };
6836                }
6837                switch ($6 + -201 | 0) {
6838                case 0:
6839                 break label$13;
6840                case 1:
6841                 break label$14;
6842                case 3:
6843                 break label$15;
6844                case 5:
6845                 break label$16;
6846                case 7:
6847                 break label$17;
6848                default:
6849                 break label$7;
6850                };
6851               }
6852               label$20 : {
6853                label$21 : {
6854                 label$22 : {
6855                  switch ($6 + -401 | 0) {
6856                  default:
6857                   switch ($6 + -301 | 0) {
6858                   case 0:
6859                    break label$20;
6860                   case 1:
6861                    break label$21;
6862                   default:
6863                    break label$7;
6864                   };
6865                  case 7:
6866                   if (!$3) {
6867                    break label$6
6868                   }
6869                   $13 = HEAP32[$1 + 28 >> 2];
6870                   $8 = HEAP32[$1 + 24 >> 2];
6871                   $12 = HEAP32[$1 + 20 >> 2];
6872                   $7 = HEAP32[$1 + 16 >> 2];
6873                   $10 = HEAP32[$1 + 12 >> 2];
6874                   $6 = HEAP32[$1 + 8 >> 2];
6875                   $4 = HEAP32[$1 + 4 >> 2];
6876                   $1 = HEAP32[$1 >> 2];
6877                   $2 = 0;
6878                   while (1) {
6879                    $9 = $2 << 2;
6880                    HEAP32[$5 >> 2] = HEAP32[$9 + $1 >> 2];
6881                    HEAP32[$5 + 4 >> 2] = HEAP32[$4 + $9 >> 2];
6882                    HEAP32[$5 + 8 >> 2] = HEAP32[$6 + $9 >> 2];
6883                    HEAP32[$5 + 12 >> 2] = HEAP32[$10 + $9 >> 2];
6884                    HEAP32[$5 + 16 >> 2] = HEAP32[$7 + $9 >> 2];
6885                    HEAP32[$5 + 20 >> 2] = HEAP32[$9 + $12 >> 2];
6886                    HEAP32[$5 + 24 >> 2] = HEAP32[$8 + $9 >> 2];
6887                    HEAP32[$5 + 28 >> 2] = HEAP32[$9 + $13 >> 2];
6888                    $5 = $5 + 32 | 0;
6889                    $2 = $2 + 1 | 0;
6890                    if (($3 | 0) != ($2 | 0)) {
6891                     continue
6892                    }
6893                    break;
6894                   };
6895                   break label$6;
6896                  case 5:
6897                   if (!$3) {
6898                    break label$6
6899                   }
6900                   $12 = HEAP32[$1 + 20 >> 2];
6901                   $7 = HEAP32[$1 + 16 >> 2];
6902                   $10 = HEAP32[$1 + 12 >> 2];
6903                   $6 = HEAP32[$1 + 8 >> 2];
6904                   $4 = HEAP32[$1 + 4 >> 2];
6905                   $1 = HEAP32[$1 >> 2];
6906                   $2 = 0;
6907                   while (1) {
6908                    $8 = $2 << 2;
6909                    HEAP32[$5 >> 2] = HEAP32[$8 + $1 >> 2];
6910                    HEAP32[$5 + 4 >> 2] = HEAP32[$4 + $8 >> 2];
6911                    HEAP32[$5 + 8 >> 2] = HEAP32[$6 + $8 >> 2];
6912                    HEAP32[$5 + 12 >> 2] = HEAP32[$8 + $10 >> 2];
6913                    HEAP32[$5 + 16 >> 2] = HEAP32[$7 + $8 >> 2];
6914                    HEAP32[$5 + 20 >> 2] = HEAP32[$8 + $12 >> 2];
6915                    $5 = $5 + 24 | 0;
6916                    $2 = $2 + 1 | 0;
6917                    if (($3 | 0) != ($2 | 0)) {
6918                     continue
6919                    }
6920                    break;
6921                   };
6922                   break label$6;
6923                  case 3:
6924                   if (!$3) {
6925                    break label$6
6926                   }
6927                   $10 = HEAP32[$1 + 12 >> 2];
6928                   $6 = HEAP32[$1 + 8 >> 2];
6929                   $4 = HEAP32[$1 + 4 >> 2];
6930                   $1 = HEAP32[$1 >> 2];
6931                   $2 = 0;
6932                   while (1) {
6933                    $7 = $2 << 2;
6934                    HEAP32[$5 >> 2] = HEAP32[$7 + $1 >> 2];
6935                    HEAP32[$5 + 4 >> 2] = HEAP32[$4 + $7 >> 2];
6936                    HEAP32[$5 + 8 >> 2] = HEAP32[$6 + $7 >> 2];
6937                    HEAP32[$5 + 12 >> 2] = HEAP32[$7 + $10 >> 2];
6938                    $5 = $5 + 16 | 0;
6939                    $2 = $2 + 1 | 0;
6940                    if (($3 | 0) != ($2 | 0)) {
6941                     continue
6942                    }
6943                    break;
6944                   };
6945                   break label$6;
6946                  case 1:
6947                   if (!$3) {
6948                    break label$6
6949                   }
6950                   $6 = HEAP32[$1 + 4 >> 2];
6951                   $4 = HEAP32[$1 >> 2];
6952                   $1 = 0;
6953                   while (1) {
6954                    $2 = $1 << 2;
6955                    HEAP32[$5 >> 2] = HEAP32[$2 + $4 >> 2];
6956                    HEAP32[$5 + 4 >> 2] = HEAP32[$2 + $6 >> 2];
6957                    $5 = $5 + 8 | 0;
6958                    $1 = $1 + 1 | 0;
6959                    if (($3 | 0) != ($1 | 0)) {
6960                     continue
6961                    }
6962                    break;
6963                   };
6964                   break label$6;
6965                  case 0:
6966                   break label$22;
6967                  case 2:
6968                  case 4:
6969                  case 6:
6970                   break label$7;
6971                  };
6972                 }
6973                 if (!$3) {
6974                  break label$6
6975                 }
6976                 $2 = HEAP32[$1 >> 2];
6977                 $1 = 0;
6978                 while (1) {
6979                  HEAP32[$5 >> 2] = HEAP32[$2 + ($1 << 2) >> 2];
6980                  $5 = $5 + 4 | 0;
6981                  $1 = $1 + 1 | 0;
6982                  if (($3 | 0) != ($1 | 0)) {
6983                   continue
6984                  }
6985                  break;
6986                 };
6987                 break label$6;
6988                }
6989                if (!$3) {
6990                 break label$6
6991                }
6992                $2 = 0;
6993                while (1) {
6994                 $4 = $2 << 2;
6995                 $6 = HEAP32[$4 + HEAP32[$1 >> 2] >> 2];
6996                 HEAP8[$5 | 0] = $6;
6997                 HEAP8[$5 + 2 | 0] = $6 >>> 16;
6998                 HEAP8[$5 + 1 | 0] = $6 >>> 8;
6999                 $4 = HEAP32[$4 + HEAP32[$1 + 4 >> 2] >> 2];
7000                 HEAP8[$5 + 3 | 0] = $4;
7001                 HEAP8[$5 + 5 | 0] = $4 >>> 16;
7002                 HEAP8[$5 + 4 | 0] = $4 >>> 8;
7003                 $5 = $5 + 6 | 0;
7004                 $2 = $2 + 1 | 0;
7005                 if (($3 | 0) != ($2 | 0)) {
7006                  continue
7007                 }
7008                 break;
7009                };
7010                break label$6;
7011               }
7012               if (!$3) {
7013                break label$6
7014               }
7015               $2 = 0;
7016               while (1) {
7017                $4 = HEAP32[HEAP32[$1 >> 2] + ($2 << 2) >> 2];
7018                HEAP8[$5 | 0] = $4;
7019                HEAP8[$5 + 2 | 0] = $4 >>> 16;
7020                HEAP8[$5 + 1 | 0] = $4 >>> 8;
7021                $5 = $5 + 3 | 0;
7022                $2 = $2 + 1 | 0;
7023                if (($3 | 0) != ($2 | 0)) {
7024                 continue
7025                }
7026                break;
7027               };
7028               break label$6;
7029              }
7030              if (!$3) {
7031               break label$6
7032              }
7033              $13 = HEAP32[$1 + 28 >> 2];
7034              $8 = HEAP32[$1 + 24 >> 2];
7035              $12 = HEAP32[$1 + 20 >> 2];
7036              $7 = HEAP32[$1 + 16 >> 2];
7037              $10 = HEAP32[$1 + 12 >> 2];
7038              $6 = HEAP32[$1 + 8 >> 2];
7039              $4 = HEAP32[$1 + 4 >> 2];
7040              $1 = HEAP32[$1 >> 2];
7041              $2 = 0;
7042              while (1) {
7043               $9 = $2 << 2;
7044               HEAP16[$5 >> 1] = HEAP32[$9 + $1 >> 2];
7045               HEAP16[$5 + 2 >> 1] = HEAP32[$4 + $9 >> 2];
7046               HEAP16[$5 + 4 >> 1] = HEAP32[$6 + $9 >> 2];
7047               HEAP16[$5 + 6 >> 1] = HEAP32[$10 + $9 >> 2];
7048               HEAP16[$5 + 8 >> 1] = HEAP32[$7 + $9 >> 2];
7049               HEAP16[$5 + 10 >> 1] = HEAP32[$9 + $12 >> 2];
7050               HEAP16[$5 + 12 >> 1] = HEAP32[$8 + $9 >> 2];
7051               HEAP16[$5 + 14 >> 1] = HEAP32[$9 + $13 >> 2];
7052               $5 = $5 + 16 | 0;
7053               $2 = $2 + 1 | 0;
7054               if (($3 | 0) != ($2 | 0)) {
7055                continue
7056               }
7057               break;
7058              };
7059              break label$6;
7060             }
7061             if (!$3) {
7062              break label$6
7063             }
7064             $12 = HEAP32[$1 + 20 >> 2];
7065             $7 = HEAP32[$1 + 16 >> 2];
7066             $10 = HEAP32[$1 + 12 >> 2];
7067             $6 = HEAP32[$1 + 8 >> 2];
7068             $4 = HEAP32[$1 + 4 >> 2];
7069             $1 = HEAP32[$1 >> 2];
7070             $2 = 0;
7071             while (1) {
7072              $8 = $2 << 2;
7073              HEAP16[$5 >> 1] = HEAP32[$8 + $1 >> 2];
7074              HEAP16[$5 + 2 >> 1] = HEAP32[$4 + $8 >> 2];
7075              HEAP16[$5 + 4 >> 1] = HEAP32[$6 + $8 >> 2];
7076              HEAP16[$5 + 6 >> 1] = HEAP32[$8 + $10 >> 2];
7077              HEAP16[$5 + 8 >> 1] = HEAP32[$7 + $8 >> 2];
7078              HEAP16[$5 + 10 >> 1] = HEAP32[$8 + $12 >> 2];
7079              $5 = $5 + 12 | 0;
7080              $2 = $2 + 1 | 0;
7081              if (($3 | 0) != ($2 | 0)) {
7082               continue
7083              }
7084              break;
7085             };
7086             break label$6;
7087            }
7088            if (!$3) {
7089             break label$6
7090            }
7091            $10 = HEAP32[$1 + 12 >> 2];
7092            $6 = HEAP32[$1 + 8 >> 2];
7093            $4 = HEAP32[$1 + 4 >> 2];
7094            $1 = HEAP32[$1 >> 2];
7095            $2 = 0;
7096            while (1) {
7097             $7 = $2 << 2;
7098             HEAP16[$5 >> 1] = HEAP32[$7 + $1 >> 2];
7099             HEAP16[$5 + 2 >> 1] = HEAP32[$4 + $7 >> 2];
7100             HEAP16[$5 + 4 >> 1] = HEAP32[$6 + $7 >> 2];
7101             HEAP16[$5 + 6 >> 1] = HEAP32[$7 + $10 >> 2];
7102             $5 = $5 + 8 | 0;
7103             $2 = $2 + 1 | 0;
7104             if (($3 | 0) != ($2 | 0)) {
7105              continue
7106             }
7107             break;
7108            };
7109            break label$6;
7110           }
7111           if (!$3) {
7112            break label$6
7113           }
7114           $6 = HEAP32[$1 + 4 >> 2];
7115           $4 = HEAP32[$1 >> 2];
7116           $1 = 0;
7117           while (1) {
7118            $2 = $1 << 2;
7119            HEAP16[$5 >> 1] = HEAP32[$2 + $4 >> 2];
7120            HEAP16[$5 + 2 >> 1] = HEAP32[$2 + $6 >> 2];
7121            $5 = $5 + 4 | 0;
7122            $1 = $1 + 1 | 0;
7123            if (($3 | 0) != ($1 | 0)) {
7124             continue
7125            }
7126            break;
7127           };
7128           break label$6;
7129          }
7130          if (!$3) {
7131           break label$6
7132          }
7133          $2 = HEAP32[$1 >> 2];
7134          $1 = 0;
7135          while (1) {
7136           HEAP16[$5 >> 1] = HEAP32[$2 + ($1 << 2) >> 2];
7137           $5 = $5 + 2 | 0;
7138           $1 = $1 + 1 | 0;
7139           if (($3 | 0) != ($1 | 0)) {
7140            continue
7141           }
7142           break;
7143          };
7144          break label$6;
7145         }
7146         if (!$3) {
7147          break label$6
7148         }
7149         $4 = 0;
7150         while (1) {
7151          $2 = $4 << 2;
7152          HEAP8[$5 | 0] = HEAP32[$2 + HEAP32[$1 >> 2] >> 2];
7153          HEAP8[$5 + 1 | 0] = HEAP32[$2 + HEAP32[$1 + 4 >> 2] >> 2];
7154          HEAP8[$5 + 2 | 0] = HEAP32[$2 + HEAP32[$1 + 8 >> 2] >> 2];
7155          HEAP8[$5 + 3 | 0] = HEAP32[$2 + HEAP32[$1 + 12 >> 2] >> 2];
7156          HEAP8[$5 + 4 | 0] = HEAP32[$2 + HEAP32[$1 + 16 >> 2] >> 2];
7157          HEAP8[$5 + 5 | 0] = HEAP32[$2 + HEAP32[$1 + 20 >> 2] >> 2];
7158          HEAP8[$5 + 6 | 0] = HEAP32[$2 + HEAP32[$1 + 24 >> 2] >> 2];
7159          HEAP8[$5 + 7 | 0] = HEAP32[$2 + HEAP32[$1 + 28 >> 2] >> 2];
7160          $5 = $5 + 8 | 0;
7161          $4 = $4 + 1 | 0;
7162          if (($4 | 0) != ($3 | 0)) {
7163           continue
7164          }
7165          break;
7166         };
7167         break label$6;
7168        }
7169        if (!$3) {
7170         break label$6
7171        }
7172        $4 = 0;
7173        while (1) {
7174         $2 = $4 << 2;
7175         HEAP8[$5 | 0] = HEAP32[$2 + HEAP32[$1 >> 2] >> 2];
7176         HEAP8[$5 + 1 | 0] = HEAP32[$2 + HEAP32[$1 + 4 >> 2] >> 2];
7177         HEAP8[$5 + 2 | 0] = HEAP32[$2 + HEAP32[$1 + 8 >> 2] >> 2];
7178         HEAP8[$5 + 3 | 0] = HEAP32[$2 + HEAP32[$1 + 12 >> 2] >> 2];
7179         HEAP8[$5 + 4 | 0] = HEAP32[$2 + HEAP32[$1 + 16 >> 2] >> 2];
7180         HEAP8[$5 + 5 | 0] = HEAP32[$2 + HEAP32[$1 + 20 >> 2] >> 2];
7181         $5 = $5 + 6 | 0;
7182         $4 = $4 + 1 | 0;
7183         if (($4 | 0) != ($3 | 0)) {
7184          continue
7185         }
7186         break;
7187        };
7188        break label$6;
7189       }
7190       if (!$3) {
7191        break label$6
7192       }
7193       $4 = 0;
7194       while (1) {
7195        $2 = $4 << 2;
7196        HEAP8[$5 | 0] = HEAP32[$2 + HEAP32[$1 >> 2] >> 2];
7197        HEAP8[$5 + 1 | 0] = HEAP32[$2 + HEAP32[$1 + 4 >> 2] >> 2];
7198        HEAP8[$5 + 2 | 0] = HEAP32[$2 + HEAP32[$1 + 8 >> 2] >> 2];
7199        HEAP8[$5 + 3 | 0] = HEAP32[$2 + HEAP32[$1 + 12 >> 2] >> 2];
7200        $5 = $5 + 4 | 0;
7201        $4 = $4 + 1 | 0;
7202        if (($4 | 0) != ($3 | 0)) {
7203         continue
7204        }
7205        break;
7206       };
7207       break label$6;
7208      }
7209      if (!$3) {
7210       break label$6
7211      }
7212      $2 = 0;
7213      while (1) {
7214       $4 = $2 << 2;
7215       HEAP8[$5 | 0] = HEAP32[$4 + HEAP32[$1 >> 2] >> 2];
7216       HEAP8[$5 + 1 | 0] = HEAP32[$4 + HEAP32[$1 + 4 >> 2] >> 2];
7217       $5 = $5 + 2 | 0;
7218       $2 = $2 + 1 | 0;
7219       if (($3 | 0) != ($2 | 0)) {
7220        continue
7221       }
7222       break;
7223      };
7224      break label$6;
7225     }
7226     if (!$3) {
7227      break label$6
7228     }
7229     $2 = 0;
7230     while (1) {
7231      HEAP8[$5 | 0] = HEAP32[HEAP32[$1 >> 2] + ($2 << 2) >> 2];
7232      $5 = $5 + 1 | 0;
7233      $2 = $2 + 1 | 0;
7234      if (($3 | 0) != ($2 | 0)) {
7235       continue
7236      }
7237      break;
7238     };
7239     break label$6;
7240    }
7241    label$45 : {
7242     switch ($4 + -1 | 0) {
7243     case 3:
7244      if (!$2 | !$3) {
7245       break label$6
7246      }
7247      $6 = 0;
7248      while (1) {
7249       $4 = 0;
7250       while (1) {
7251        HEAP32[$5 >> 2] = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($6 << 2) >> 2];
7252        $5 = $5 + 4 | 0;
7253        $4 = $4 + 1 | 0;
7254        if (($4 | 0) != ($2 | 0)) {
7255         continue
7256        }
7257        break;
7258       };
7259       $6 = $6 + 1 | 0;
7260       if (($6 | 0) != ($3 | 0)) {
7261        continue
7262       }
7263       break;
7264      };
7265      break label$6;
7266     case 2:
7267      if (!$2 | !$3) {
7268       break label$6
7269      }
7270      while (1) {
7271       $4 = 0;
7272       while (1) {
7273        $6 = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($10 << 2) >> 2];
7274        HEAP8[$5 | 0] = $6;
7275        HEAP8[$5 + 2 | 0] = $6 >>> 16;
7276        HEAP8[$5 + 1 | 0] = $6 >>> 8;
7277        $5 = $5 + 3 | 0;
7278        $4 = $4 + 1 | 0;
7279        if (($4 | 0) != ($2 | 0)) {
7280         continue
7281        }
7282        break;
7283       };
7284       $10 = $10 + 1 | 0;
7285       if (($10 | 0) != ($3 | 0)) {
7286        continue
7287       }
7288       break;
7289      };
7290      break label$6;
7291     case 1:
7292      if (!$2 | !$3) {
7293       break label$6
7294      }
7295      $6 = 0;
7296      while (1) {
7297       $4 = 0;
7298       while (1) {
7299        HEAP16[$5 >> 1] = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($6 << 2) >> 2];
7300        $5 = $5 + 2 | 0;
7301        $4 = $4 + 1 | 0;
7302        if (($4 | 0) != ($2 | 0)) {
7303         continue
7304        }
7305        break;
7306       };
7307       $6 = $6 + 1 | 0;
7308       if (($6 | 0) != ($3 | 0)) {
7309        continue
7310       }
7311       break;
7312      };
7313      break label$6;
7314     case 0:
7315      break label$45;
7316     default:
7317      break label$6;
7318     };
7319    }
7320    if (!$2 | !$3) {
7321     break label$6
7322    }
7323    $6 = 0;
7324    while (1) {
7325     $4 = 0;
7326     while (1) {
7327      HEAP8[$5 | 0] = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($6 << 2) >> 2];
7328      $5 = $5 + 1 | 0;
7329      $4 = $4 + 1 | 0;
7330      if (($4 | 0) != ($2 | 0)) {
7331       continue
7332      }
7333      break;
7334     };
7335     $6 = $6 + 1 | 0;
7336     if (($6 | 0) != ($3 | 0)) {
7337      continue
7338     }
7339     break;
7340    };
7341   }
7342   $2 = HEAP32[$0 + 80 >> 2];
7343   $1 = $2 + $11 | 0;
7344   HEAP32[$0 + 80 >> 2] = $1;
7345   $3 = HEAP32[$0 + 88 >> 2];
7346   if ($1 >>> 0 < $2 >>> 0) {
7347    $1 = $0 + 84 | 0;
7348    HEAP32[$1 >> 2] = HEAP32[$1 >> 2] + 1;
7349   }
7350   $4 = 64 - ($2 & 63) | 0;
7351   $1 = ($0 - $4 | 0) - -64 | 0;
7352   label$58 : {
7353    if ($11 >>> 0 < $4 >>> 0) {
7354     memcpy($1, $3, $11);
7355     break label$58;
7356    }
7357    memcpy($1, $3, $4);
7358    $2 = $0 - -64 | 0;
7359    FLAC__MD5Transform($2, $0);
7360    $5 = $3 + $4 | 0;
7361    $1 = $11 - $4 | 0;
7362    if ($1 >>> 0 >= 64) {
7363     while (1) {
7364      $4 = HEAPU8[$5 + 4 | 0] | HEAPU8[$5 + 5 | 0] << 8 | (HEAPU8[$5 + 6 | 0] << 16 | HEAPU8[$5 + 7 | 0] << 24);
7365      $3 = HEAPU8[$5 | 0] | HEAPU8[$5 + 1 | 0] << 8 | (HEAPU8[$5 + 2 | 0] << 16 | HEAPU8[$5 + 3 | 0] << 24);
7366      HEAP8[$0 | 0] = $3;
7367      HEAP8[$0 + 1 | 0] = $3 >>> 8;
7368      HEAP8[$0 + 2 | 0] = $3 >>> 16;
7369      HEAP8[$0 + 3 | 0] = $3 >>> 24;
7370      HEAP8[$0 + 4 | 0] = $4;
7371      HEAP8[$0 + 5 | 0] = $4 >>> 8;
7372      HEAP8[$0 + 6 | 0] = $4 >>> 16;
7373      HEAP8[$0 + 7 | 0] = $4 >>> 24;
7374      $4 = HEAPU8[$5 + 60 | 0] | HEAPU8[$5 + 61 | 0] << 8 | (HEAPU8[$5 + 62 | 0] << 16 | HEAPU8[$5 + 63 | 0] << 24);
7375      $3 = HEAPU8[$5 + 56 | 0] | HEAPU8[$5 + 57 | 0] << 8 | (HEAPU8[$5 + 58 | 0] << 16 | HEAPU8[$5 + 59 | 0] << 24);
7376      HEAP8[$0 + 56 | 0] = $3;
7377      HEAP8[$0 + 57 | 0] = $3 >>> 8;
7378      HEAP8[$0 + 58 | 0] = $3 >>> 16;
7379      HEAP8[$0 + 59 | 0] = $3 >>> 24;
7380      HEAP8[$0 + 60 | 0] = $4;
7381      HEAP8[$0 + 61 | 0] = $4 >>> 8;
7382      HEAP8[$0 + 62 | 0] = $4 >>> 16;
7383      HEAP8[$0 + 63 | 0] = $4 >>> 24;
7384      $4 = HEAPU8[$5 + 52 | 0] | HEAPU8[$5 + 53 | 0] << 8 | (HEAPU8[$5 + 54 | 0] << 16 | HEAPU8[$5 + 55 | 0] << 24);
7385      $3 = HEAPU8[$5 + 48 | 0] | HEAPU8[$5 + 49 | 0] << 8 | (HEAPU8[$5 + 50 | 0] << 16 | HEAPU8[$5 + 51 | 0] << 24);
7386      HEAP8[$0 + 48 | 0] = $3;
7387      HEAP8[$0 + 49 | 0] = $3 >>> 8;
7388      HEAP8[$0 + 50 | 0] = $3 >>> 16;
7389      HEAP8[$0 + 51 | 0] = $3 >>> 24;
7390      HEAP8[$0 + 52 | 0] = $4;
7391      HEAP8[$0 + 53 | 0] = $4 >>> 8;
7392      HEAP8[$0 + 54 | 0] = $4 >>> 16;
7393      HEAP8[$0 + 55 | 0] = $4 >>> 24;
7394      $4 = HEAPU8[$5 + 44 | 0] | HEAPU8[$5 + 45 | 0] << 8 | (HEAPU8[$5 + 46 | 0] << 16 | HEAPU8[$5 + 47 | 0] << 24);
7395      $3 = HEAPU8[$5 + 40 | 0] | HEAPU8[$5 + 41 | 0] << 8 | (HEAPU8[$5 + 42 | 0] << 16 | HEAPU8[$5 + 43 | 0] << 24);
7396      HEAP8[$0 + 40 | 0] = $3;
7397      HEAP8[$0 + 41 | 0] = $3 >>> 8;
7398      HEAP8[$0 + 42 | 0] = $3 >>> 16;
7399      HEAP8[$0 + 43 | 0] = $3 >>> 24;
7400      HEAP8[$0 + 44 | 0] = $4;
7401      HEAP8[$0 + 45 | 0] = $4 >>> 8;
7402      HEAP8[$0 + 46 | 0] = $4 >>> 16;
7403      HEAP8[$0 + 47 | 0] = $4 >>> 24;
7404      $4 = HEAPU8[$5 + 36 | 0] | HEAPU8[$5 + 37 | 0] << 8 | (HEAPU8[$5 + 38 | 0] << 16 | HEAPU8[$5 + 39 | 0] << 24);
7405      $3 = HEAPU8[$5 + 32 | 0] | HEAPU8[$5 + 33 | 0] << 8 | (HEAPU8[$5 + 34 | 0] << 16 | HEAPU8[$5 + 35 | 0] << 24);
7406      HEAP8[$0 + 32 | 0] = $3;
7407      HEAP8[$0 + 33 | 0] = $3 >>> 8;
7408      HEAP8[$0 + 34 | 0] = $3 >>> 16;
7409      HEAP8[$0 + 35 | 0] = $3 >>> 24;
7410      HEAP8[$0 + 36 | 0] = $4;
7411      HEAP8[$0 + 37 | 0] = $4 >>> 8;
7412      HEAP8[$0 + 38 | 0] = $4 >>> 16;
7413      HEAP8[$0 + 39 | 0] = $4 >>> 24;
7414      $4 = HEAPU8[$5 + 28 | 0] | HEAPU8[$5 + 29 | 0] << 8 | (HEAPU8[$5 + 30 | 0] << 16 | HEAPU8[$5 + 31 | 0] << 24);
7415      $3 = HEAPU8[$5 + 24 | 0] | HEAPU8[$5 + 25 | 0] << 8 | (HEAPU8[$5 + 26 | 0] << 16 | HEAPU8[$5 + 27 | 0] << 24);
7416      HEAP8[$0 + 24 | 0] = $3;
7417      HEAP8[$0 + 25 | 0] = $3 >>> 8;
7418      HEAP8[$0 + 26 | 0] = $3 >>> 16;
7419      HEAP8[$0 + 27 | 0] = $3 >>> 24;
7420      HEAP8[$0 + 28 | 0] = $4;
7421      HEAP8[$0 + 29 | 0] = $4 >>> 8;
7422      HEAP8[$0 + 30 | 0] = $4 >>> 16;
7423      HEAP8[$0 + 31 | 0] = $4 >>> 24;
7424      $4 = HEAPU8[$5 + 20 | 0] | HEAPU8[$5 + 21 | 0] << 8 | (HEAPU8[$5 + 22 | 0] << 16 | HEAPU8[$5 + 23 | 0] << 24);
7425      $3 = HEAPU8[$5 + 16 | 0] | HEAPU8[$5 + 17 | 0] << 8 | (HEAPU8[$5 + 18 | 0] << 16 | HEAPU8[$5 + 19 | 0] << 24);
7426      HEAP8[$0 + 16 | 0] = $3;
7427      HEAP8[$0 + 17 | 0] = $3 >>> 8;
7428      HEAP8[$0 + 18 | 0] = $3 >>> 16;
7429      HEAP8[$0 + 19 | 0] = $3 >>> 24;
7430      HEAP8[$0 + 20 | 0] = $4;
7431      HEAP8[$0 + 21 | 0] = $4 >>> 8;
7432      HEAP8[$0 + 22 | 0] = $4 >>> 16;
7433      HEAP8[$0 + 23 | 0] = $4 >>> 24;
7434      $4 = HEAPU8[$5 + 12 | 0] | HEAPU8[$5 + 13 | 0] << 8 | (HEAPU8[$5 + 14 | 0] << 16 | HEAPU8[$5 + 15 | 0] << 24);
7435      $3 = HEAPU8[$5 + 8 | 0] | HEAPU8[$5 + 9 | 0] << 8 | (HEAPU8[$5 + 10 | 0] << 16 | HEAPU8[$5 + 11 | 0] << 24);
7436      HEAP8[$0 + 8 | 0] = $3;
7437      HEAP8[$0 + 9 | 0] = $3 >>> 8;
7438      HEAP8[$0 + 10 | 0] = $3 >>> 16;
7439      HEAP8[$0 + 11 | 0] = $3 >>> 24;
7440      HEAP8[$0 + 12 | 0] = $4;
7441      HEAP8[$0 + 13 | 0] = $4 >>> 8;
7442      HEAP8[$0 + 14 | 0] = $4 >>> 16;
7443      HEAP8[$0 + 15 | 0] = $4 >>> 24;
7444      FLAC__MD5Transform($2, $0);
7445      $5 = $5 - -64 | 0;
7446      $1 = $1 + -64 | 0;
7447      if ($1 >>> 0 > 63) {
7448       continue
7449      }
7450      break;
7451     }
7452    }
7453    memcpy($0, $5, $1);
7454   }
7455   $5 = 1;
7456  }
7457  return $5;
7458 }
7459
7460 function __stdio_close($0) {
7461  $0 = $0 | 0;
7462  return __wasi_fd_close(HEAP32[$0 + 60 >> 2]) | 0;
7463 }
7464
7465 function __wasi_syscall_ret($0) {
7466  if (!$0) {
7467   return 0
7468  }
7469  HEAP32[2896] = $0;
7470  return -1;
7471 }
7472
7473 function __stdio_read($0, $1, $2) {
7474  $0 = $0 | 0;
7475  $1 = $1 | 0;
7476  $2 = $2 | 0;
7477  var $3 = 0, $4 = 0, $5 = 0, $6 = 0;
7478  $3 = global$0 - 32 | 0;
7479  global$0 = $3;
7480  HEAP32[$3 + 16 >> 2] = $1;
7481  $4 = HEAP32[$0 + 48 >> 2];
7482  HEAP32[$3 + 20 >> 2] = $2 - (($4 | 0) != 0);
7483  $5 = HEAP32[$0 + 44 >> 2];
7484  HEAP32[$3 + 28 >> 2] = $4;
7485  HEAP32[$3 + 24 >> 2] = $5;
7486  label$1 : {
7487   label$2 : {
7488    label$3 : {
7489     if (__wasi_syscall_ret(__wasi_fd_read(HEAP32[$0 + 60 >> 2], $3 + 16 | 0, 2, $3 + 12 | 0) | 0)) {
7490      HEAP32[$3 + 12 >> 2] = -1;
7491      $2 = -1;
7492      break label$3;
7493     }
7494     $4 = HEAP32[$3 + 12 >> 2];
7495     if (($4 | 0) > 0) {
7496      break label$2
7497     }
7498     $2 = $4;
7499    }
7500    HEAP32[$0 >> 2] = HEAP32[$0 >> 2] | $2 & 48 ^ 16;
7501    break label$1;
7502   }
7503   $6 = HEAP32[$3 + 20 >> 2];
7504   if ($4 >>> 0 <= $6 >>> 0) {
7505    $2 = $4;
7506    break label$1;
7507   }
7508   $5 = HEAP32[$0 + 44 >> 2];
7509   HEAP32[$0 + 4 >> 2] = $5;
7510   HEAP32[$0 + 8 >> 2] = $5 + ($4 - $6 | 0);
7511   if (!HEAP32[$0 + 48 >> 2]) {
7512    break label$1
7513   }
7514   HEAP32[$0 + 4 >> 2] = $5 + 1;
7515   HEAP8[($1 + $2 | 0) + -1 | 0] = HEAPU8[$5 | 0];
7516  }
7517  global$0 = $3 + 32 | 0;
7518  return $2 | 0;
7519 }
7520
7521 function __stdio_seek($0, $1, $2, $3) {
7522  $0 = $0 | 0;
7523  $1 = $1 | 0;
7524  $2 = $2 | 0;
7525  $3 = $3 | 0;
7526  var $4 = 0;
7527  $4 = global$0 - 16 | 0;
7528  global$0 = $4;
7529  label$1 : {
7530   if (!__wasi_syscall_ret(legalimport$__wasi_fd_seek(HEAP32[$0 + 60 >> 2], $1 | 0, $2 | 0, $3 & 255, $4 + 8 | 0) | 0)) {
7531    $1 = HEAP32[$4 + 12 >> 2];
7532    $0 = HEAP32[$4 + 8 >> 2];
7533    break label$1;
7534   }
7535   HEAP32[$4 + 8 >> 2] = -1;
7536   HEAP32[$4 + 12 >> 2] = -1;
7537   $1 = -1;
7538   $0 = -1;
7539  }
7540  global$0 = $4 + 16 | 0;
7541  i64toi32_i32$HIGH_BITS = $1;
7542  return $0 | 0;
7543 }
7544
7545 function fflush($0) {
7546  var $1 = 0;
7547  if ($0) {
7548   if (HEAP32[$0 + 76 >> 2] <= -1) {
7549    return __fflush_unlocked($0)
7550   }
7551   return __fflush_unlocked($0);
7552  }
7553  if (HEAP32[2794]) {
7554   $1 = fflush(HEAP32[2794])
7555  }
7556  $0 = HEAP32[3023];
7557  if ($0) {
7558   while (1) {
7559    if (HEAPU32[$0 + 20 >> 2] > HEAPU32[$0 + 28 >> 2]) {
7560     $1 = __fflush_unlocked($0) | $1
7561    }
7562    $0 = HEAP32[$0 + 56 >> 2];
7563    if ($0) {
7564     continue
7565    }
7566    break;
7567   }
7568  }
7569  return $1;
7570 }
7571
7572 function __fflush_unlocked($0) {
7573  var $1 = 0, $2 = 0;
7574  label$1 : {
7575   if (HEAPU32[$0 + 20 >> 2] <= HEAPU32[$0 + 28 >> 2]) {
7576    break label$1
7577   }
7578   FUNCTION_TABLE[HEAP32[$0 + 36 >> 2]]($0, 0, 0) | 0;
7579   if (HEAP32[$0 + 20 >> 2]) {
7580    break label$1
7581   }
7582   return -1;
7583  }
7584  $1 = HEAP32[$0 + 4 >> 2];
7585  $2 = HEAP32[$0 + 8 >> 2];
7586  if ($1 >>> 0 < $2 >>> 0) {
7587   $1 = $1 - $2 | 0;
7588   FUNCTION_TABLE[HEAP32[$0 + 40 >> 2]]($0, $1, $1 >> 31, 1) | 0;
7589  }
7590  HEAP32[$0 + 28 >> 2] = 0;
7591  HEAP32[$0 + 16 >> 2] = 0;
7592  HEAP32[$0 + 20 >> 2] = 0;
7593  HEAP32[$0 + 4 >> 2] = 0;
7594  HEAP32[$0 + 8 >> 2] = 0;
7595  return 0;
7596 }
7597
7598 function fclose($0) {
7599  var $1 = 0, $2 = 0, $3 = 0, $4 = 0;
7600  $4 = HEAP32[$0 + 76 >> 2] >= 0 ? 1 : 0;
7601  $3 = HEAP32[$0 >> 2] & 1;
7602  if (!$3) {
7603   $1 = HEAP32[$0 + 52 >> 2];
7604   if ($1) {
7605    HEAP32[$1 + 56 >> 2] = HEAP32[$0 + 56 >> 2]
7606   }
7607   $2 = HEAP32[$0 + 56 >> 2];
7608   if ($2) {
7609    HEAP32[$2 + 52 >> 2] = $1
7610   }
7611   if (HEAP32[3023] == ($0 | 0)) {
7612    HEAP32[3023] = $2
7613   }
7614  }
7615  fflush($0);
7616  FUNCTION_TABLE[HEAP32[$0 + 12 >> 2]]($0) | 0;
7617  $1 = HEAP32[$0 + 96 >> 2];
7618  if ($1) {
7619   dlfree($1)
7620  }
7621  label$7 : {
7622   if (!$3) {
7623    dlfree($0);
7624    break label$7;
7625   }
7626   if (!$4) {
7627    break label$7
7628   }
7629  }
7630 }
7631
7632 function memcmp($0, $1, $2) {
7633  var $3 = 0, $4 = 0, $5 = 0;
7634  label$1 : {
7635   if (!$2) {
7636    break label$1
7637   }
7638   while (1) {
7639    $3 = HEAPU8[$0 | 0];
7640    $4 = HEAPU8[$1 | 0];
7641    if (($3 | 0) == ($4 | 0)) {
7642     $1 = $1 + 1 | 0;
7643     $0 = $0 + 1 | 0;
7644     $2 = $2 + -1 | 0;
7645     if ($2) {
7646      continue
7647     }
7648     break label$1;
7649    }
7650    break;
7651   };
7652   $5 = $3 - $4 | 0;
7653  }
7654  return $5;
7655 }
7656
7657 function FLAC__cpu_info($0) {
7658  HEAP32[$0 + 8 >> 2] = 0;
7659  HEAP32[$0 + 12 >> 2] = 0;
7660  HEAP32[$0 >> 2] = 0;
7661  HEAP32[$0 + 4 >> 2] = 3;
7662  HEAP32[$0 + 56 >> 2] = 0;
7663  HEAP32[$0 + 60 >> 2] = 0;
7664  HEAP32[$0 + 48 >> 2] = 0;
7665  HEAP32[$0 + 52 >> 2] = 0;
7666  HEAP32[$0 + 40 >> 2] = 0;
7667  HEAP32[$0 + 44 >> 2] = 0;
7668  HEAP32[$0 + 32 >> 2] = 0;
7669  HEAP32[$0 + 36 >> 2] = 0;
7670  HEAP32[$0 + 24 >> 2] = 0;
7671  HEAP32[$0 + 28 >> 2] = 0;
7672  HEAP32[$0 + 16 >> 2] = 0;
7673  HEAP32[$0 + 20 >> 2] = 0;
7674 }
7675
7676 function lround($0) {
7677  $0 = +round(+$0);
7678  if (Math_abs($0) < 2147483648.0) {
7679   return ~~$0
7680  }
7681  return -2147483648;
7682 }
7683
7684 function log($0) {
7685  var $1 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $10 = 0.0;
7686  label$1 : {
7687   label$2 : {
7688    label$3 : {
7689     label$4 : {
7690      wasm2js_scratch_store_f64(+$0);
7691      $1 = wasm2js_scratch_load_i32(1) | 0;
7692      $3 = wasm2js_scratch_load_i32(0) | 0;
7693      if (($1 | 0) > 0 ? 1 : ($1 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) {
7694       $5 = $1;
7695       if ($1 >>> 0 > 1048575) {
7696        break label$4
7697       }
7698      }
7699      if (!($1 & 2147483647 | $3)) {
7700       return -1.0 / ($0 * $0)
7701      }
7702      if (($1 | 0) > -1 ? 1 : 0) {
7703       break label$3
7704      }
7705      return ($0 - $0) / 0.0;
7706     }
7707     if ($5 >>> 0 > 2146435071) {
7708      break label$1
7709     }
7710     $1 = 1072693248;
7711     $6 = -1023;
7712     if (($5 | 0) != 1072693248) {
7713      $1 = $5;
7714      break label$2;
7715     }
7716     if ($3) {
7717      break label$2
7718     }
7719     return 0.0;
7720    }
7721    wasm2js_scratch_store_f64(+($0 * 18014398509481984.0));
7722    $1 = wasm2js_scratch_load_i32(1) | 0;
7723    $3 = wasm2js_scratch_load_i32(0) | 0;
7724    $6 = -1077;
7725   }
7726   $1 = $1 + 614242 | 0;
7727   $4 = +(($1 >>> 20 | 0) + $6 | 0);
7728   wasm2js_scratch_store_i32(0, $3 | 0);
7729   wasm2js_scratch_store_i32(1, ($1 & 1048575) + 1072079006 | 0);
7730   $0 = +wasm2js_scratch_load_f64() + -1.0;
7731   $2 = $0 / ($0 + 2.0);
7732   $7 = $4 * .6931471803691238;
7733   $8 = $0;
7734   $9 = $4 * 1.9082149292705877e-10;
7735   $10 = $2;
7736   $4 = $0 * ($0 * .5);
7737   $2 = $2 * $2;
7738   $0 = $2 * $2;
7739   $0 = $7 + ($8 + ($9 + $10 * ($4 + ($0 * ($0 * ($0 * .15313837699209373 + .22222198432149784) + .3999999999940942) + $2 * ($0 * ($0 * ($0 * .14798198605116586 + .1818357216161805) + .2857142874366239) + .6666666666666735))) - $4));
7740  }
7741  return $0;
7742 }
7743
7744 function FLAC__lpc_window_data($0, $1, $2, $3) {
7745  var $4 = 0, $5 = 0;
7746  if ($3) {
7747   while (1) {
7748    $5 = $4 << 2;
7749    HEAPF32[$5 + $2 >> 2] = HEAPF32[$1 + $5 >> 2] * Math_fround(HEAP32[$0 + $5 >> 2]);
7750    $4 = $4 + 1 | 0;
7751    if (($4 | 0) != ($3 | 0)) {
7752     continue
7753    }
7754    break;
7755   }
7756  }
7757 }
7758
7759 function FLAC__lpc_compute_autocorrelation($0, $1, $2, $3) {
7760  $0 = $0 | 0;
7761  $1 = $1 | 0;
7762  $2 = $2 | 0;
7763  $3 = $3 | 0;
7764  var $4 = 0, $5 = 0, $6 = 0, $7 = Math_fround(0), $8 = 0, $9 = 0;
7765  $6 = $1 - $2 | 0;
7766  label$1 : {
7767   if (!$2) {
7768    while (1) {
7769     $4 = $4 + 1 | 0;
7770     if ($4 >>> 0 <= $6 >>> 0) {
7771      continue
7772     }
7773     break;
7774    };
7775    break label$1;
7776   }
7777   $9 = memset($3, $2 << 2);
7778   while (1) {
7779    $7 = HEAPF32[($4 << 2) + $0 >> 2];
7780    $5 = 0;
7781    while (1) {
7782     $8 = ($5 << 2) + $9 | 0;
7783     HEAPF32[$8 >> 2] = HEAPF32[$8 >> 2] + Math_fround($7 * HEAPF32[($4 + $5 << 2) + $0 >> 2]);
7784     $5 = $5 + 1 | 0;
7785     if (($5 | 0) != ($2 | 0)) {
7786      continue
7787     }
7788     break;
7789    };
7790    $4 = $4 + 1 | 0;
7791    if ($4 >>> 0 <= $6 >>> 0) {
7792     continue
7793    }
7794    break;
7795   };
7796  }
7797  if ($4 >>> 0 < $1 >>> 0) {
7798   while (1) {
7799    $2 = $1 - $4 | 0;
7800    if ($2) {
7801     $7 = HEAPF32[($4 << 2) + $0 >> 2];
7802     $5 = 0;
7803     while (1) {
7804      $6 = ($5 << 2) + $3 | 0;
7805      HEAPF32[$6 >> 2] = HEAPF32[$6 >> 2] + Math_fround($7 * HEAPF32[($4 + $5 << 2) + $0 >> 2]);
7806      $5 = $5 + 1 | 0;
7807      if ($5 >>> 0 < $2 >>> 0) {
7808       continue
7809      }
7810      break;
7811     };
7812    }
7813    $4 = $4 + 1 | 0;
7814    if (($4 | 0) != ($1 | 0)) {
7815     continue
7816    }
7817    break;
7818   }
7819  }
7820 }
7821
7822 function FLAC__lpc_compute_lp_coefficients($0, $1, $2, $3) {
7823  var $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0;
7824  $7 = global$0 - 256 | 0;
7825  global$0 = $7;
7826  $13 = HEAP32[$1 >> 2];
7827  $10 = +HEAPF32[$0 >> 2];
7828  label$1 : {
7829   while (1) {
7830    if (($5 | 0) == ($13 | 0)) {
7831     break label$1
7832    }
7833    $11 = $5 + 1 | 0;
7834    $6 = +Math_fround(-HEAPF32[($11 << 2) + $0 >> 2]);
7835    label$3 : {
7836     if ($5) {
7837      $12 = $5 >>> 1 | 0;
7838      $4 = 0;
7839      while (1) {
7840       $6 = $6 - HEAPF64[($4 << 3) + $7 >> 3] * +HEAPF32[($5 - $4 << 2) + $0 >> 2];
7841       $4 = $4 + 1 | 0;
7842       if (($5 | 0) != ($4 | 0)) {
7843        continue
7844       }
7845       break;
7846      };
7847      $6 = $6 / $10;
7848      HEAPF64[($5 << 3) + $7 >> 3] = $6;
7849      $4 = 0;
7850      if ($12) {
7851       while (1) {
7852        $8 = ($4 << 3) + $7 | 0;
7853        $9 = HEAPF64[$8 >> 3];
7854        $14 = $8;
7855        $8 = (($4 ^ -1) + $5 << 3) + $7 | 0;
7856        HEAPF64[$14 >> 3] = $9 + $6 * HEAPF64[$8 >> 3];
7857        HEAPF64[$8 >> 3] = $6 * $9 + HEAPF64[$8 >> 3];
7858        $4 = $4 + 1 | 0;
7859        if (($12 | 0) != ($4 | 0)) {
7860         continue
7861        }
7862        break;
7863       }
7864      }
7865      if (!($5 & 1)) {
7866       break label$3
7867      }
7868      $8 = ($12 << 3) + $7 | 0;
7869      $9 = HEAPF64[$8 >> 3];
7870      HEAPF64[$8 >> 3] = $9 + $6 * $9;
7871      break label$3;
7872     }
7873     $6 = $6 / $10;
7874     HEAPF64[($5 << 3) + $7 >> 3] = $6;
7875    }
7876    $9 = 1.0 - $6 * $6;
7877    $4 = 0;
7878    while (1) {
7879     HEAPF32[(($5 << 7) + $2 | 0) + ($4 << 2) >> 2] = -Math_fround(HEAPF64[($4 << 3) + $7 >> 3]);
7880     $4 = $4 + 1 | 0;
7881     if ($4 >>> 0 <= $5 >>> 0) {
7882      continue
7883     }
7884     break;
7885    };
7886    $10 = $10 * $9;
7887    HEAPF64[($5 << 3) + $3 >> 3] = $10;
7888    $5 = $11;
7889    if ($10 != 0.0) {
7890     continue
7891    }
7892    break;
7893   };
7894   HEAP32[$1 >> 2] = $11;
7895  }
7896  global$0 = $7 + 256 | 0;
7897 }
7898
7899 function FLAC__lpc_quantize_coefficients($0, $1, $2, $3, $4) {
7900  var $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = Math_fround(0);
7901  $8 = global$0 - 16 | 0;
7902  global$0 = $8;
7903  label$1 : {
7904   if (!$1) {
7905    $7 = 2;
7906    break label$1;
7907   }
7908   $5 = $2 + -1 | 0;
7909   $2 = 0;
7910   while (1) {
7911    $11 = +Math_fround(Math_abs(HEAPF32[($2 << 2) + $0 >> 2]));
7912    $6 = $6 < $11 ? $11 : $6;
7913    $2 = $2 + 1 | 0;
7914    if (($2 | 0) != ($1 | 0)) {
7915     continue
7916    }
7917    break;
7918   };
7919   $7 = 2;
7920   if ($6 <= 0.0) {
7921    break label$1
7922   }
7923   $9 = 1 << $5;
7924   $12 = $9 + -1 | 0;
7925   $10 = 0 - $9 | 0;
7926   frexp($6, $8 + 12 | 0);
7927   $2 = HEAP32[$8 + 12 >> 2];
7928   HEAP32[$8 + 12 >> 2] = $2 + -1;
7929   $5 = $5 - $2 | 0;
7930   HEAP32[$4 >> 2] = $5;
7931   label$4 : {
7932    $7 = -1 << HEAP32[1413] + -1;
7933    $2 = $7 ^ -1;
7934    if (($5 | 0) > ($2 | 0)) {
7935     HEAP32[$4 >> 2] = $2;
7936     $5 = $2;
7937     break label$4;
7938    }
7939    if (($5 | 0) >= ($7 | 0)) {
7940     break label$4
7941    }
7942    $7 = 1;
7943    break label$1;
7944   }
7945   $7 = 0;
7946   if (($5 | 0) >= 0) {
7947    if (!$1) {
7948     break label$1
7949    }
7950    $6 = 0.0;
7951    $2 = 0;
7952    while (1) {
7953     $13 = $2 << 2;
7954     $6 = $6 + +Math_fround(HEAPF32[$13 + $0 >> 2] * Math_fround(1 << $5));
7955     $5 = lround($6);
7956     $5 = ($5 | 0) < ($9 | 0) ? (($5 | 0) < ($10 | 0) ? $10 : $5) : $12;
7957     HEAP32[$3 + $13 >> 2] = $5;
7958     $2 = $2 + 1 | 0;
7959     if (($2 | 0) == ($1 | 0)) {
7960      break label$1
7961     }
7962     $6 = $6 - +($5 | 0);
7963     $5 = HEAP32[$4 >> 2];
7964     continue;
7965    };
7966   }
7967   if ($1) {
7968    $2 = 0;
7969    $14 = Math_fround(1 << 0 - $5);
7970    $6 = 0.0;
7971    while (1) {
7972     $7 = $2 << 2;
7973     $6 = $6 + +Math_fround(HEAPF32[$7 + $0 >> 2] / $14);
7974     $5 = lround($6);
7975     $5 = ($5 | 0) < ($9 | 0) ? (($5 | 0) < ($10 | 0) ? $10 : $5) : $12;
7976     HEAP32[$3 + $7 >> 2] = $5;
7977     $6 = $6 - +($5 | 0);
7978     $2 = $2 + 1 | 0;
7979     if (($2 | 0) != ($1 | 0)) {
7980      continue
7981     }
7982     break;
7983    };
7984   }
7985   $7 = 0;
7986   HEAP32[$4 >> 2] = 0;
7987  }
7988  global$0 = $8 + 16 | 0;
7989  return $7;
7990 }
7991
7992 function FLAC__lpc_compute_residual_from_qlp_coefficients($0, $1, $2, $3, $4, $5) {
7993  $0 = $0 | 0;
7994  $1 = $1 | 0;
7995  $2 = $2 | 0;
7996  $3 = $3 | 0;
7997  $4 = $4 | 0;
7998  $5 = $5 | 0;
7999  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0;
8000  label$1 : {
8001   if ($3 >>> 0 >= 13) {
8002    if (($1 | 0) < 1) {
8003     break label$1
8004    }
8005    $25 = $3 + -13 | 0;
8006    while (1) {
8007     $17 = 0;
8008     $20 = 0;
8009     $19 = 0;
8010     $22 = 0;
8011     $21 = 0;
8012     $24 = 0;
8013     $23 = 0;
8014     $26 = 0;
8015     $18 = 0;
8016     $16 = 0;
8017     $15 = 0;
8018     $14 = 0;
8019     $13 = 0;
8020     $12 = 0;
8021     $11 = 0;
8022     $10 = 0;
8023     $9 = 0;
8024     $8 = 0;
8025     $7 = 0;
8026     $3 = 0;
8027     label$4 : {
8028      switch ($25 | 0) {
8029      case 19:
8030       $17 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -128 >> 2], HEAP32[$2 + 124 >> 2]);
8031      case 18:
8032       $20 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -124 >> 2], HEAP32[$2 + 120 >> 2]) + $17 | 0;
8033      case 17:
8034       $19 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -120 >> 2], HEAP32[$2 + 116 >> 2]) + $20 | 0;
8035      case 16:
8036       $22 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -116 >> 2], HEAP32[$2 + 112 >> 2]) + $19 | 0;
8037      case 15:
8038       $21 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -112 >> 2], HEAP32[$2 + 108 >> 2]) + $22 | 0;
8039      case 14:
8040       $24 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -108 >> 2], HEAP32[$2 + 104 >> 2]) + $21 | 0;
8041      case 13:
8042       $23 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -104 >> 2], HEAP32[$2 + 100 >> 2]) + $24 | 0;
8043      case 12:
8044       $26 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -100 >> 2], HEAP32[$2 + 96 >> 2]) + $23 | 0;
8045      case 11:
8046       $18 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -96 >> 2], HEAP32[$2 + 92 >> 2]) + $26 | 0;
8047      case 10:
8048       $16 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -92 >> 2], HEAP32[$2 + 88 >> 2]) + $18 | 0;
8049      case 9:
8050       $15 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -88 >> 2], HEAP32[$2 + 84 >> 2]) + $16 | 0;
8051      case 8:
8052       $14 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -84 >> 2], HEAP32[$2 + 80 >> 2]) + $15 | 0;
8053      case 7:
8054       $13 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -80 >> 2], HEAP32[$2 + 76 >> 2]) + $14 | 0;
8055      case 6:
8056       $12 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -76 >> 2], HEAP32[$2 + 72 >> 2]) + $13 | 0;
8057      case 5:
8058       $11 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -72 >> 2], HEAP32[$2 + 68 >> 2]) + $12 | 0;
8059      case 4:
8060       $10 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -68 >> 2], HEAP32[$2 + 64 >> 2]) + $11 | 0;
8061      case 3:
8062       $9 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -64 >> 2], HEAP32[$2 + 60 >> 2]) + $10 | 0;
8063      case 2:
8064       $8 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -60 >> 2], HEAP32[$2 + 56 >> 2]) + $9 | 0;
8065      case 1:
8066       $7 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -56 >> 2], HEAP32[$2 + 52 >> 2]) + $8 | 0;
8067      case 0:
8068       $3 = ($6 << 2) + $0 | 0;
8069       $3 = ((((((((((((Math_imul(HEAP32[$3 + -52 >> 2], HEAP32[$2 + 48 >> 2]) + $7 | 0) + Math_imul(HEAP32[$3 + -48 >> 2], HEAP32[$2 + 44 >> 2]) | 0) + Math_imul(HEAP32[$3 + -44 >> 2], HEAP32[$2 + 40 >> 2]) | 0) + Math_imul(HEAP32[$3 + -40 >> 2], HEAP32[$2 + 36 >> 2]) | 0) + Math_imul(HEAP32[$3 + -36 >> 2], HEAP32[$2 + 32 >> 2]) | 0) + Math_imul(HEAP32[$3 + -32 >> 2], HEAP32[$2 + 28 >> 2]) | 0) + Math_imul(HEAP32[$3 + -28 >> 2], HEAP32[$2 + 24 >> 2]) | 0) + Math_imul(HEAP32[$3 + -24 >> 2], HEAP32[$2 + 20 >> 2]) | 0) + Math_imul(HEAP32[$3 + -20 >> 2], HEAP32[$2 + 16 >> 2]) | 0) + Math_imul(HEAP32[$3 + -16 >> 2], HEAP32[$2 + 12 >> 2]) | 0) + Math_imul(HEAP32[$3 + -12 >> 2], HEAP32[$2 + 8 >> 2]) | 0) + Math_imul(HEAP32[$3 + -8 >> 2], HEAP32[$2 + 4 >> 2]) | 0) + Math_imul(HEAP32[$3 + -4 >> 2], HEAP32[$2 >> 2]) | 0;
8070       break;
8071      default:
8072       break label$4;
8073      };
8074     }
8075     $7 = $6 << 2;
8076     HEAP32[$7 + $5 >> 2] = HEAP32[$0 + $7 >> 2] - ($3 >> $4);
8077     $6 = $6 + 1 | 0;
8078     if (($6 | 0) != ($1 | 0)) {
8079      continue
8080     }
8081     break;
8082    };
8083    break label$1;
8084   }
8085   if ($3 >>> 0 >= 9) {
8086    if ($3 >>> 0 >= 11) {
8087     if (($3 | 0) != 12) {
8088      if (($1 | 0) < 1) {
8089       break label$1
8090      }
8091      $15 = HEAP32[$0 + -4 >> 2];
8092      $6 = HEAP32[$0 + -8 >> 2];
8093      $3 = HEAP32[$0 + -12 >> 2];
8094      $7 = HEAP32[$0 + -16 >> 2];
8095      $8 = HEAP32[$0 + -20 >> 2];
8096      $9 = HEAP32[$0 + -24 >> 2];
8097      $10 = HEAP32[$0 + -28 >> 2];
8098      $11 = HEAP32[$0 + -32 >> 2];
8099      $12 = HEAP32[$0 + -36 >> 2];
8100      $13 = HEAP32[$0 + -40 >> 2];
8101      $16 = HEAP32[$0 + -44 >> 2];
8102      $18 = HEAP32[$2 >> 2];
8103      $17 = HEAP32[$2 + 4 >> 2];
8104      $20 = HEAP32[$2 + 8 >> 2];
8105      $19 = HEAP32[$2 + 12 >> 2];
8106      $22 = HEAP32[$2 + 16 >> 2];
8107      $21 = HEAP32[$2 + 20 >> 2];
8108      $24 = HEAP32[$2 + 24 >> 2];
8109      $23 = HEAP32[$2 + 28 >> 2];
8110      $26 = HEAP32[$2 + 32 >> 2];
8111      $25 = HEAP32[$2 + 36 >> 2];
8112      $28 = HEAP32[$2 + 40 >> 2];
8113      $2 = 0;
8114      while (1) {
8115       $14 = $13;
8116       $13 = $12;
8117       $12 = $11;
8118       $11 = $10;
8119       $10 = $9;
8120       $9 = $8;
8121       $8 = $7;
8122       $7 = $3;
8123       $3 = $6;
8124       $6 = $15;
8125       $27 = $2 << 2;
8126       $15 = HEAP32[$27 + $0 >> 2];
8127       HEAP32[$5 + $27 >> 2] = $15 - ((((((((((Math_imul($14, $25) + Math_imul($16, $28) | 0) + Math_imul($13, $26) | 0) + Math_imul($12, $23) | 0) + Math_imul($11, $24) | 0) + Math_imul($10, $21) | 0) + Math_imul($9, $22) | 0) + Math_imul($8, $19) | 0) + Math_imul($7, $20) | 0) + Math_imul($3, $17) | 0) + Math_imul($6, $18) >> $4);
8128       $16 = $14;
8129       $2 = $2 + 1 | 0;
8130       if (($2 | 0) != ($1 | 0)) {
8131        continue
8132       }
8133       break;
8134      };
8135      break label$1;
8136     }
8137     if (($1 | 0) < 1) {
8138      break label$1
8139     }
8140     $16 = HEAP32[$0 + -4 >> 2];
8141     $6 = HEAP32[$0 + -8 >> 2];
8142     $3 = HEAP32[$0 + -12 >> 2];
8143     $7 = HEAP32[$0 + -16 >> 2];
8144     $8 = HEAP32[$0 + -20 >> 2];
8145     $9 = HEAP32[$0 + -24 >> 2];
8146     $10 = HEAP32[$0 + -28 >> 2];
8147     $11 = HEAP32[$0 + -32 >> 2];
8148     $12 = HEAP32[$0 + -36 >> 2];
8149     $13 = HEAP32[$0 + -40 >> 2];
8150     $14 = HEAP32[$0 + -44 >> 2];
8151     $18 = HEAP32[$0 + -48 >> 2];
8152     $17 = HEAP32[$2 >> 2];
8153     $20 = HEAP32[$2 + 4 >> 2];
8154     $19 = HEAP32[$2 + 8 >> 2];
8155     $22 = HEAP32[$2 + 12 >> 2];
8156     $21 = HEAP32[$2 + 16 >> 2];
8157     $24 = HEAP32[$2 + 20 >> 2];
8158     $23 = HEAP32[$2 + 24 >> 2];
8159     $26 = HEAP32[$2 + 28 >> 2];
8160     $25 = HEAP32[$2 + 32 >> 2];
8161     $28 = HEAP32[$2 + 36 >> 2];
8162     $27 = HEAP32[$2 + 40 >> 2];
8163     $30 = HEAP32[$2 + 44 >> 2];
8164     $2 = 0;
8165     while (1) {
8166      $15 = $14;
8167      $14 = $13;
8168      $13 = $12;
8169      $12 = $11;
8170      $11 = $10;
8171      $10 = $9;
8172      $9 = $8;
8173      $8 = $7;
8174      $7 = $3;
8175      $3 = $6;
8176      $6 = $16;
8177      $29 = $2 << 2;
8178      $16 = HEAP32[$29 + $0 >> 2];
8179      HEAP32[$5 + $29 >> 2] = $16 - (((((((((((Math_imul($15, $27) + Math_imul($18, $30) | 0) + Math_imul($14, $28) | 0) + Math_imul($13, $25) | 0) + Math_imul($12, $26) | 0) + Math_imul($11, $23) | 0) + Math_imul($10, $24) | 0) + Math_imul($9, $21) | 0) + Math_imul($8, $22) | 0) + Math_imul($7, $19) | 0) + Math_imul($3, $20) | 0) + Math_imul($6, $17) >> $4);
8180      $18 = $15;
8181      $2 = $2 + 1 | 0;
8182      if (($2 | 0) != ($1 | 0)) {
8183       continue
8184      }
8185      break;
8186     };
8187     break label$1;
8188    }
8189    if (($3 | 0) != 10) {
8190     if (($1 | 0) < 1) {
8191      break label$1
8192     }
8193     $13 = HEAP32[$0 + -4 >> 2];
8194     $6 = HEAP32[$0 + -8 >> 2];
8195     $3 = HEAP32[$0 + -12 >> 2];
8196     $7 = HEAP32[$0 + -16 >> 2];
8197     $8 = HEAP32[$0 + -20 >> 2];
8198     $9 = HEAP32[$0 + -24 >> 2];
8199     $10 = HEAP32[$0 + -28 >> 2];
8200     $11 = HEAP32[$0 + -32 >> 2];
8201     $14 = HEAP32[$0 + -36 >> 2];
8202     $16 = HEAP32[$2 >> 2];
8203     $15 = HEAP32[$2 + 4 >> 2];
8204     $18 = HEAP32[$2 + 8 >> 2];
8205     $17 = HEAP32[$2 + 12 >> 2];
8206     $20 = HEAP32[$2 + 16 >> 2];
8207     $19 = HEAP32[$2 + 20 >> 2];
8208     $22 = HEAP32[$2 + 24 >> 2];
8209     $21 = HEAP32[$2 + 28 >> 2];
8210     $24 = HEAP32[$2 + 32 >> 2];
8211     $2 = 0;
8212     while (1) {
8213      $12 = $11;
8214      $11 = $10;
8215      $10 = $9;
8216      $9 = $8;
8217      $8 = $7;
8218      $7 = $3;
8219      $3 = $6;
8220      $6 = $13;
8221      $23 = $2 << 2;
8222      $13 = HEAP32[$23 + $0 >> 2];
8223      HEAP32[$5 + $23 >> 2] = $13 - ((((((((Math_imul($12, $21) + Math_imul($14, $24) | 0) + Math_imul($11, $22) | 0) + Math_imul($10, $19) | 0) + Math_imul($9, $20) | 0) + Math_imul($8, $17) | 0) + Math_imul($7, $18) | 0) + Math_imul($3, $15) | 0) + Math_imul($6, $16) >> $4);
8224      $14 = $12;
8225      $2 = $2 + 1 | 0;
8226      if (($2 | 0) != ($1 | 0)) {
8227       continue
8228      }
8229      break;
8230     };
8231     break label$1;
8232    }
8233    if (($1 | 0) < 1) {
8234     break label$1
8235    }
8236    $14 = HEAP32[$0 + -4 >> 2];
8237    $6 = HEAP32[$0 + -8 >> 2];
8238    $3 = HEAP32[$0 + -12 >> 2];
8239    $7 = HEAP32[$0 + -16 >> 2];
8240    $8 = HEAP32[$0 + -20 >> 2];
8241    $9 = HEAP32[$0 + -24 >> 2];
8242    $10 = HEAP32[$0 + -28 >> 2];
8243    $11 = HEAP32[$0 + -32 >> 2];
8244    $12 = HEAP32[$0 + -36 >> 2];
8245    $15 = HEAP32[$0 + -40 >> 2];
8246    $16 = HEAP32[$2 >> 2];
8247    $18 = HEAP32[$2 + 4 >> 2];
8248    $17 = HEAP32[$2 + 8 >> 2];
8249    $20 = HEAP32[$2 + 12 >> 2];
8250    $19 = HEAP32[$2 + 16 >> 2];
8251    $22 = HEAP32[$2 + 20 >> 2];
8252    $21 = HEAP32[$2 + 24 >> 2];
8253    $24 = HEAP32[$2 + 28 >> 2];
8254    $23 = HEAP32[$2 + 32 >> 2];
8255    $26 = HEAP32[$2 + 36 >> 2];
8256    $2 = 0;
8257    while (1) {
8258     $13 = $12;
8259     $12 = $11;
8260     $11 = $10;
8261     $10 = $9;
8262     $9 = $8;
8263     $8 = $7;
8264     $7 = $3;
8265     $3 = $6;
8266     $6 = $14;
8267     $25 = $2 << 2;
8268     $14 = HEAP32[$25 + $0 >> 2];
8269     HEAP32[$5 + $25 >> 2] = $14 - (((((((((Math_imul($13, $23) + Math_imul($15, $26) | 0) + Math_imul($12, $24) | 0) + Math_imul($11, $21) | 0) + Math_imul($10, $22) | 0) + Math_imul($9, $19) | 0) + Math_imul($8, $20) | 0) + Math_imul($7, $17) | 0) + Math_imul($3, $18) | 0) + Math_imul($6, $16) >> $4);
8270     $15 = $13;
8271     $2 = $2 + 1 | 0;
8272     if (($2 | 0) != ($1 | 0)) {
8273      continue
8274     }
8275     break;
8276    };
8277    break label$1;
8278   }
8279   if ($3 >>> 0 >= 5) {
8280    if ($3 >>> 0 >= 7) {
8281     if (($3 | 0) != 8) {
8282      if (($1 | 0) < 1) {
8283       break label$1
8284      }
8285      $11 = HEAP32[$0 + -4 >> 2];
8286      $6 = HEAP32[$0 + -8 >> 2];
8287      $3 = HEAP32[$0 + -12 >> 2];
8288      $7 = HEAP32[$0 + -16 >> 2];
8289      $8 = HEAP32[$0 + -20 >> 2];
8290      $9 = HEAP32[$0 + -24 >> 2];
8291      $12 = HEAP32[$0 + -28 >> 2];
8292      $13 = HEAP32[$2 >> 2];
8293      $14 = HEAP32[$2 + 4 >> 2];
8294      $16 = HEAP32[$2 + 8 >> 2];
8295      $15 = HEAP32[$2 + 12 >> 2];
8296      $18 = HEAP32[$2 + 16 >> 2];
8297      $17 = HEAP32[$2 + 20 >> 2];
8298      $20 = HEAP32[$2 + 24 >> 2];
8299      $2 = 0;
8300      while (1) {
8301       $10 = $9;
8302       $9 = $8;
8303       $8 = $7;
8304       $7 = $3;
8305       $3 = $6;
8306       $6 = $11;
8307       $19 = $2 << 2;
8308       $11 = HEAP32[$19 + $0 >> 2];
8309       HEAP32[$5 + $19 >> 2] = $11 - ((((((Math_imul($10, $17) + Math_imul($12, $20) | 0) + Math_imul($9, $18) | 0) + Math_imul($8, $15) | 0) + Math_imul($7, $16) | 0) + Math_imul($3, $14) | 0) + Math_imul($6, $13) >> $4);
8310       $12 = $10;
8311       $2 = $2 + 1 | 0;
8312       if (($2 | 0) != ($1 | 0)) {
8313        continue
8314       }
8315       break;
8316      };
8317      break label$1;
8318     }
8319     if (($1 | 0) < 1) {
8320      break label$1
8321     }
8322     $12 = HEAP32[$0 + -4 >> 2];
8323     $6 = HEAP32[$0 + -8 >> 2];
8324     $3 = HEAP32[$0 + -12 >> 2];
8325     $7 = HEAP32[$0 + -16 >> 2];
8326     $8 = HEAP32[$0 + -20 >> 2];
8327     $9 = HEAP32[$0 + -24 >> 2];
8328     $10 = HEAP32[$0 + -28 >> 2];
8329     $13 = HEAP32[$0 + -32 >> 2];
8330     $14 = HEAP32[$2 >> 2];
8331     $16 = HEAP32[$2 + 4 >> 2];
8332     $15 = HEAP32[$2 + 8 >> 2];
8333     $18 = HEAP32[$2 + 12 >> 2];
8334     $17 = HEAP32[$2 + 16 >> 2];
8335     $20 = HEAP32[$2 + 20 >> 2];
8336     $19 = HEAP32[$2 + 24 >> 2];
8337     $22 = HEAP32[$2 + 28 >> 2];
8338     $2 = 0;
8339     while (1) {
8340      $11 = $10;
8341      $10 = $9;
8342      $9 = $8;
8343      $8 = $7;
8344      $7 = $3;
8345      $3 = $6;
8346      $6 = $12;
8347      $21 = $2 << 2;
8348      $12 = HEAP32[$21 + $0 >> 2];
8349      HEAP32[$5 + $21 >> 2] = $12 - (((((((Math_imul($11, $19) + Math_imul($13, $22) | 0) + Math_imul($10, $20) | 0) + Math_imul($9, $17) | 0) + Math_imul($8, $18) | 0) + Math_imul($7, $15) | 0) + Math_imul($3, $16) | 0) + Math_imul($6, $14) >> $4);
8350      $13 = $11;
8351      $2 = $2 + 1 | 0;
8352      if (($2 | 0) != ($1 | 0)) {
8353       continue
8354      }
8355      break;
8356     };
8357     break label$1;
8358    }
8359    if (($3 | 0) != 6) {
8360     if (($1 | 0) < 1) {
8361      break label$1
8362     }
8363     $9 = HEAP32[$0 + -4 >> 2];
8364     $6 = HEAP32[$0 + -8 >> 2];
8365     $3 = HEAP32[$0 + -12 >> 2];
8366     $7 = HEAP32[$0 + -16 >> 2];
8367     $10 = HEAP32[$0 + -20 >> 2];
8368     $11 = HEAP32[$2 >> 2];
8369     $12 = HEAP32[$2 + 4 >> 2];
8370     $13 = HEAP32[$2 + 8 >> 2];
8371     $14 = HEAP32[$2 + 12 >> 2];
8372     $16 = HEAP32[$2 + 16 >> 2];
8373     $2 = 0;
8374     while (1) {
8375      $8 = $7;
8376      $7 = $3;
8377      $3 = $6;
8378      $6 = $9;
8379      $15 = $2 << 2;
8380      $9 = HEAP32[$15 + $0 >> 2];
8381      HEAP32[$5 + $15 >> 2] = $9 - ((((Math_imul($8, $14) + Math_imul($10, $16) | 0) + Math_imul($7, $13) | 0) + Math_imul($3, $12) | 0) + Math_imul($6, $11) >> $4);
8382      $10 = $8;
8383      $2 = $2 + 1 | 0;
8384      if (($2 | 0) != ($1 | 0)) {
8385       continue
8386      }
8387      break;
8388     };
8389     break label$1;
8390    }
8391    if (($1 | 0) < 1) {
8392     break label$1
8393    }
8394    $10 = HEAP32[$0 + -4 >> 2];
8395    $6 = HEAP32[$0 + -8 >> 2];
8396    $3 = HEAP32[$0 + -12 >> 2];
8397    $7 = HEAP32[$0 + -16 >> 2];
8398    $8 = HEAP32[$0 + -20 >> 2];
8399    $11 = HEAP32[$0 + -24 >> 2];
8400    $12 = HEAP32[$2 >> 2];
8401    $13 = HEAP32[$2 + 4 >> 2];
8402    $14 = HEAP32[$2 + 8 >> 2];
8403    $16 = HEAP32[$2 + 12 >> 2];
8404    $15 = HEAP32[$2 + 16 >> 2];
8405    $18 = HEAP32[$2 + 20 >> 2];
8406    $2 = 0;
8407    while (1) {
8408     $9 = $8;
8409     $8 = $7;
8410     $7 = $3;
8411     $3 = $6;
8412     $6 = $10;
8413     $17 = $2 << 2;
8414     $10 = HEAP32[$17 + $0 >> 2];
8415     HEAP32[$5 + $17 >> 2] = $10 - (((((Math_imul($9, $15) + Math_imul($11, $18) | 0) + Math_imul($8, $16) | 0) + Math_imul($7, $14) | 0) + Math_imul($3, $13) | 0) + Math_imul($6, $12) >> $4);
8416     $11 = $9;
8417     $2 = $2 + 1 | 0;
8418     if (($2 | 0) != ($1 | 0)) {
8419      continue
8420     }
8421     break;
8422    };
8423    break label$1;
8424   }
8425   if ($3 >>> 0 >= 3) {
8426    if (($3 | 0) != 4) {
8427     if (($1 | 0) < 1) {
8428      break label$1
8429     }
8430     $7 = HEAP32[$0 + -4 >> 2];
8431     $6 = HEAP32[$0 + -8 >> 2];
8432     $8 = HEAP32[$0 + -12 >> 2];
8433     $9 = HEAP32[$2 >> 2];
8434     $10 = HEAP32[$2 + 4 >> 2];
8435     $11 = HEAP32[$2 + 8 >> 2];
8436     $2 = 0;
8437     while (1) {
8438      $3 = $6;
8439      $6 = $7;
8440      $12 = $2 << 2;
8441      $7 = HEAP32[$12 + $0 >> 2];
8442      HEAP32[$5 + $12 >> 2] = $7 - ((Math_imul($3, $10) + Math_imul($8, $11) | 0) + Math_imul($6, $9) >> $4);
8443      $8 = $3;
8444      $2 = $2 + 1 | 0;
8445      if (($2 | 0) != ($1 | 0)) {
8446       continue
8447      }
8448      break;
8449     };
8450     break label$1;
8451    }
8452    if (($1 | 0) < 1) {
8453     break label$1
8454    }
8455    $8 = HEAP32[$0 + -4 >> 2];
8456    $6 = HEAP32[$0 + -8 >> 2];
8457    $3 = HEAP32[$0 + -12 >> 2];
8458    $9 = HEAP32[$0 + -16 >> 2];
8459    $10 = HEAP32[$2 >> 2];
8460    $11 = HEAP32[$2 + 4 >> 2];
8461    $12 = HEAP32[$2 + 8 >> 2];
8462    $13 = HEAP32[$2 + 12 >> 2];
8463    $2 = 0;
8464    while (1) {
8465     $7 = $3;
8466     $3 = $6;
8467     $6 = $8;
8468     $14 = $2 << 2;
8469     $8 = HEAP32[$14 + $0 >> 2];
8470     HEAP32[$5 + $14 >> 2] = $8 - (((Math_imul($7, $12) + Math_imul($9, $13) | 0) + Math_imul($3, $11) | 0) + Math_imul($6, $10) >> $4);
8471     $9 = $7;
8472     $2 = $2 + 1 | 0;
8473     if (($2 | 0) != ($1 | 0)) {
8474      continue
8475     }
8476     break;
8477    };
8478    break label$1;
8479   }
8480   if (($3 | 0) != 2) {
8481    if (($1 | 0) < 1) {
8482     break label$1
8483    }
8484    $6 = HEAP32[$0 + -4 >> 2];
8485    $3 = HEAP32[$2 >> 2];
8486    $2 = 0;
8487    while (1) {
8488     $7 = Math_imul($3, $6);
8489     $8 = $2 << 2;
8490     $6 = HEAP32[$8 + $0 >> 2];
8491     HEAP32[$5 + $8 >> 2] = $6 - ($7 >> $4);
8492     $2 = $2 + 1 | 0;
8493     if (($2 | 0) != ($1 | 0)) {
8494      continue
8495     }
8496     break;
8497    };
8498    break label$1;
8499   }
8500   if (($1 | 0) < 1) {
8501    break label$1
8502   }
8503   $3 = HEAP32[$0 + -4 >> 2];
8504   $7 = HEAP32[$0 + -8 >> 2];
8505   $8 = HEAP32[$2 >> 2];
8506   $9 = HEAP32[$2 + 4 >> 2];
8507   $2 = 0;
8508   while (1) {
8509    $6 = $3;
8510    $10 = $2 << 2;
8511    $3 = HEAP32[$10 + $0 >> 2];
8512    HEAP32[$5 + $10 >> 2] = $3 - (Math_imul($6, $8) + Math_imul($7, $9) >> $4);
8513    $7 = $6;
8514    $2 = $2 + 1 | 0;
8515    if (($2 | 0) != ($1 | 0)) {
8516     continue
8517    }
8518    break;
8519   };
8520  }
8521 }
8522
8523 function FLAC__lpc_compute_residual_from_qlp_coefficients_wide($0, $1, $2, $3, $4, $5) {
8524  $0 = $0 | 0;
8525  $1 = $1 | 0;
8526  $2 = $2 | 0;
8527  $3 = $3 | 0;
8528  $4 = $4 | 0;
8529  $5 = $5 | 0;
8530  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0;
8531  label$1 : {
8532   if ($3 >>> 0 >= 13) {
8533    if (($1 | 0) < 1) {
8534     break label$1
8535    }
8536    $18 = $4;
8537    $12 = $3 + -13 | 0;
8538    while (1) {
8539     $4 = 0;
8540     $3 = 0;
8541     label$4 : {
8542      switch ($12 | 0) {
8543      case 19:
8544       $3 = HEAP32[(($15 << 2) + $0 | 0) + -128 >> 2];
8545       $4 = $3;
8546       $7 = $3 >> 31;
8547       $3 = HEAP32[$2 + 124 >> 2];
8548       $4 = __wasm_i64_mul($4, $7, $3, $3 >> 31);
8549       $3 = i64toi32_i32$HIGH_BITS;
8550      case 18:
8551       $7 = HEAP32[(($15 << 2) + $0 | 0) + -124 >> 2];
8552       $6 = $7;
8553       $8 = $7 >> 31;
8554       $7 = HEAP32[$2 + 120 >> 2];
8555       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8556       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8557       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8558       $4 = $7;
8559       $3 = $6;
8560      case 17:
8561       $7 = HEAP32[(($15 << 2) + $0 | 0) + -120 >> 2];
8562       $6 = $7;
8563       $8 = $7 >> 31;
8564       $7 = HEAP32[$2 + 116 >> 2];
8565       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8566       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8567       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8568       $4 = $7;
8569       $3 = $6;
8570      case 16:
8571       $7 = HEAP32[(($15 << 2) + $0 | 0) + -116 >> 2];
8572       $6 = $7;
8573       $8 = $7 >> 31;
8574       $7 = HEAP32[$2 + 112 >> 2];
8575       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8576       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8577       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8578       $4 = $7;
8579       $3 = $6;
8580      case 15:
8581       $7 = HEAP32[(($15 << 2) + $0 | 0) + -112 >> 2];
8582       $6 = $7;
8583       $8 = $7 >> 31;
8584       $7 = HEAP32[$2 + 108 >> 2];
8585       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8586       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8587       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8588       $4 = $7;
8589       $3 = $6;
8590      case 14:
8591       $7 = HEAP32[(($15 << 2) + $0 | 0) + -108 >> 2];
8592       $6 = $7;
8593       $8 = $7 >> 31;
8594       $7 = HEAP32[$2 + 104 >> 2];
8595       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8596       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8597       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8598       $4 = $7;
8599       $3 = $6;
8600      case 13:
8601       $7 = HEAP32[(($15 << 2) + $0 | 0) + -104 >> 2];
8602       $6 = $7;
8603       $8 = $7 >> 31;
8604       $7 = HEAP32[$2 + 100 >> 2];
8605       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8606       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8607       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8608       $4 = $7;
8609       $3 = $6;
8610      case 12:
8611       $7 = HEAP32[(($15 << 2) + $0 | 0) + -100 >> 2];
8612       $6 = $7;
8613       $8 = $7 >> 31;
8614       $7 = HEAP32[$2 + 96 >> 2];
8615       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8616       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8617       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8618       $4 = $7;
8619       $3 = $6;
8620      case 11:
8621       $7 = HEAP32[(($15 << 2) + $0 | 0) + -96 >> 2];
8622       $6 = $7;
8623       $8 = $7 >> 31;
8624       $7 = HEAP32[$2 + 92 >> 2];
8625       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8626       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8627       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8628       $4 = $7;
8629       $3 = $6;
8630      case 10:
8631       $7 = HEAP32[(($15 << 2) + $0 | 0) + -92 >> 2];
8632       $6 = $7;
8633       $8 = $7 >> 31;
8634       $7 = HEAP32[$2 + 88 >> 2];
8635       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8636       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8637       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8638       $4 = $7;
8639       $3 = $6;
8640      case 9:
8641       $7 = HEAP32[(($15 << 2) + $0 | 0) + -88 >> 2];
8642       $6 = $7;
8643       $8 = $7 >> 31;
8644       $7 = HEAP32[$2 + 84 >> 2];
8645       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8646       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8647       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8648       $4 = $7;
8649       $3 = $6;
8650      case 8:
8651       $7 = HEAP32[(($15 << 2) + $0 | 0) + -84 >> 2];
8652       $6 = $7;
8653       $8 = $7 >> 31;
8654       $7 = HEAP32[$2 + 80 >> 2];
8655       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8656       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8657       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8658       $4 = $7;
8659       $3 = $6;
8660      case 7:
8661       $7 = HEAP32[(($15 << 2) + $0 | 0) + -80 >> 2];
8662       $6 = $7;
8663       $8 = $7 >> 31;
8664       $7 = HEAP32[$2 + 76 >> 2];
8665       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8666       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8667       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8668       $4 = $7;
8669       $3 = $6;
8670      case 6:
8671       $7 = HEAP32[(($15 << 2) + $0 | 0) + -76 >> 2];
8672       $6 = $7;
8673       $8 = $7 >> 31;
8674       $7 = HEAP32[$2 + 72 >> 2];
8675       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8676       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8677       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8678       $4 = $7;
8679       $3 = $6;
8680      case 5:
8681       $7 = HEAP32[(($15 << 2) + $0 | 0) + -72 >> 2];
8682       $6 = $7;
8683       $8 = $7 >> 31;
8684       $7 = HEAP32[$2 + 68 >> 2];
8685       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8686       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8687       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8688       $4 = $7;
8689       $3 = $6;
8690      case 4:
8691       $7 = HEAP32[(($15 << 2) + $0 | 0) + -68 >> 2];
8692       $6 = $7;
8693       $8 = $7 >> 31;
8694       $7 = HEAP32[$2 + 64 >> 2];
8695       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8696       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8697       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8698       $4 = $7;
8699       $3 = $6;
8700      case 3:
8701       $7 = HEAP32[(($15 << 2) + $0 | 0) + -64 >> 2];
8702       $6 = $7;
8703       $8 = $7 >> 31;
8704       $7 = HEAP32[$2 + 60 >> 2];
8705       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8706       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8707       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8708       $4 = $7;
8709       $3 = $6;
8710      case 2:
8711       $7 = HEAP32[(($15 << 2) + $0 | 0) + -60 >> 2];
8712       $6 = $7;
8713       $8 = $7 >> 31;
8714       $7 = HEAP32[$2 + 56 >> 2];
8715       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8716       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8717       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8718       $4 = $7;
8719       $3 = $6;
8720      case 1:
8721       $7 = HEAP32[(($15 << 2) + $0 | 0) + -56 >> 2];
8722       $6 = $7;
8723       $8 = $7 >> 31;
8724       $7 = HEAP32[$2 + 52 >> 2];
8725       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
8726       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8727       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8728       $4 = $7;
8729       $3 = $6;
8730      case 0:
8731       $8 = ($15 << 2) + $0 | 0;
8732       $7 = HEAP32[$8 + -52 >> 2];
8733       $6 = $7;
8734       $9 = $7 >> 31;
8735       $7 = HEAP32[$2 + 48 >> 2];
8736       $7 = __wasm_i64_mul($6, $9, $7, $7 >> 31) + $4 | 0;
8737       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
8738       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
8739       $3 = HEAP32[$8 + -48 >> 2];
8740       $4 = $3;
8741       $9 = $3 >> 31;
8742       $3 = HEAP32[$2 + 44 >> 2];
8743       $3 = __wasm_i64_mul($4, $9, $3, $3 >> 31);
8744       $4 = $3 + $7 | 0;
8745       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8746       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8747       $3 = HEAP32[$8 + -44 >> 2];
8748       $7 = $3;
8749       $9 = $3 >> 31;
8750       $3 = HEAP32[$2 + 40 >> 2];
8751       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);
8752       $4 = $3 + $4 | 0;
8753       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8754       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8755       $3 = HEAP32[$8 + -40 >> 2];
8756       $7 = $3;
8757       $9 = $3 >> 31;
8758       $3 = HEAP32[$2 + 36 >> 2];
8759       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);
8760       $4 = $3 + $4 | 0;
8761       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8762       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8763       $3 = HEAP32[$8 + -36 >> 2];
8764       $7 = $3;
8765       $9 = $3 >> 31;
8766       $3 = HEAP32[$2 + 32 >> 2];
8767       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);
8768       $4 = $3 + $4 | 0;
8769       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8770       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8771       $3 = HEAP32[$8 + -32 >> 2];
8772       $7 = $3;
8773       $9 = $3 >> 31;
8774       $3 = HEAP32[$2 + 28 >> 2];
8775       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);
8776       $4 = $3 + $4 | 0;
8777       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8778       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8779       $3 = HEAP32[$8 + -28 >> 2];
8780       $7 = $3;
8781       $9 = $3 >> 31;
8782       $3 = HEAP32[$2 + 24 >> 2];
8783       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);
8784       $4 = $3 + $4 | 0;
8785       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8786       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8787       $3 = HEAP32[$8 + -24 >> 2];
8788       $7 = $3;
8789       $9 = $3 >> 31;
8790       $3 = HEAP32[$2 + 20 >> 2];
8791       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);
8792       $4 = $3 + $4 | 0;
8793       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8794       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8795       $3 = HEAP32[$8 + -20 >> 2];
8796       $7 = $3;
8797       $9 = $3 >> 31;
8798       $3 = HEAP32[$2 + 16 >> 2];
8799       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);
8800       $4 = $3 + $4 | 0;
8801       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8802       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8803       $3 = HEAP32[$8 + -16 >> 2];
8804       $7 = $3;
8805       $9 = $3 >> 31;
8806       $3 = HEAP32[$2 + 12 >> 2];
8807       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);
8808       $4 = $3 + $4 | 0;
8809       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8810       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8811       $3 = HEAP32[$8 + -12 >> 2];
8812       $7 = $3;
8813       $9 = $3 >> 31;
8814       $3 = HEAP32[$2 + 8 >> 2];
8815       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);
8816       $4 = $3 + $4 | 0;
8817       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8818       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8819       $3 = HEAP32[$8 + -8 >> 2];
8820       $7 = $3;
8821       $9 = $3 >> 31;
8822       $3 = HEAP32[$2 + 4 >> 2];
8823       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);
8824       $4 = $3 + $4 | 0;
8825       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8826       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8827       $3 = HEAP32[$8 + -4 >> 2];
8828       $7 = $3;
8829       $8 = $3 >> 31;
8830       $3 = HEAP32[$2 >> 2];
8831       $3 = __wasm_i64_mul($7, $8, $3, $3 >> 31);
8832       $4 = $3 + $4 | 0;
8833       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8834       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;
8835       $3 = $6;
8836       break;
8837      default:
8838       break label$4;
8839      };
8840     }
8841     $7 = $15 << 2;
8842     $6 = $7 + $5 | 0;
8843     $9 = HEAP32[$0 + $7 >> 2];
8844     $7 = $3;
8845     $3 = $18;
8846     $8 = $3 & 31;
8847     HEAP32[$6 >> 2] = $9 - (32 <= ($3 & 63) >>> 0 ? $7 >> $8 : ((1 << $8) - 1 & $7) << 32 - $8 | $4 >>> $8);
8848     $15 = $15 + 1 | 0;
8849     if (($15 | 0) != ($1 | 0)) {
8850      continue
8851     }
8852     break;
8853    };
8854    break label$1;
8855   }
8856   if ($3 >>> 0 >= 9) {
8857    if ($3 >>> 0 >= 11) {
8858     if (($3 | 0) != 12) {
8859      if (($1 | 0) < 1) {
8860       break label$1
8861      }
8862      $10 = HEAP32[$0 + -4 >> 2];
8863      $15 = HEAP32[$0 + -8 >> 2];
8864      $3 = HEAP32[$0 + -12 >> 2];
8865      $18 = HEAP32[$0 + -16 >> 2];
8866      $7 = HEAP32[$0 + -20 >> 2];
8867      $12 = HEAP32[$0 + -24 >> 2];
8868      $8 = HEAP32[$0 + -28 >> 2];
8869      $9 = HEAP32[$0 + -32 >> 2];
8870      $11 = HEAP32[$0 + -36 >> 2];
8871      $17 = HEAP32[$0 + -40 >> 2];
8872      $13 = HEAP32[$0 + -44 >> 2];
8873      $6 = HEAP32[$2 >> 2];
8874      $40 = $6;
8875      $41 = $6 >> 31;
8876      $6 = HEAP32[$2 + 4 >> 2];
8877      $42 = $6;
8878      $37 = $6 >> 31;
8879      $6 = HEAP32[$2 + 8 >> 2];
8880      $38 = $6;
8881      $39 = $6 >> 31;
8882      $6 = HEAP32[$2 + 12 >> 2];
8883      $34 = $6;
8884      $35 = $6 >> 31;
8885      $6 = HEAP32[$2 + 16 >> 2];
8886      $36 = $6;
8887      $31 = $6 >> 31;
8888      $6 = HEAP32[$2 + 20 >> 2];
8889      $32 = $6;
8890      $33 = $6 >> 31;
8891      $6 = HEAP32[$2 + 24 >> 2];
8892      $29 = $6;
8893      $30 = $6 >> 31;
8894      $6 = HEAP32[$2 + 28 >> 2];
8895      $26 = $6;
8896      $27 = $6 >> 31;
8897      $6 = HEAP32[$2 + 32 >> 2];
8898      $28 = $6;
8899      $23 = $6 >> 31;
8900      $6 = HEAP32[$2 + 36 >> 2];
8901      $24 = $6;
8902      $25 = $6 >> 31;
8903      $2 = HEAP32[$2 + 40 >> 2];
8904      $21 = $2;
8905      $22 = $2 >> 31;
8906      $2 = 0;
8907      while (1) {
8908       $16 = $17;
8909       $17 = $11;
8910       $11 = $9;
8911       $9 = $8;
8912       $8 = $12;
8913       $12 = $7;
8914       $7 = $18;
8915       $18 = $3;
8916       $3 = $15;
8917       $15 = $10;
8918       $6 = $2 << 2;
8919       $20 = $6 + $5 | 0;
8920       $10 = HEAP32[$0 + $6 >> 2];
8921       $14 = __wasm_i64_mul($16, $16 >> 31, $24, $25);
8922       $6 = i64toi32_i32$HIGH_BITS;
8923       $13 = __wasm_i64_mul($13, $13 >> 31, $21, $22);
8924       $14 = $13 + $14 | 0;
8925       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8926       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
8927       $13 = __wasm_i64_mul($17, $17 >> 31, $28, $23);
8928       $14 = $13 + $14 | 0;
8929       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8930       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
8931       $13 = __wasm_i64_mul($11, $11 >> 31, $26, $27);
8932       $14 = $13 + $14 | 0;
8933       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8934       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
8935       $13 = __wasm_i64_mul($9, $9 >> 31, $29, $30);
8936       $14 = $13 + $14 | 0;
8937       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8938       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
8939       $13 = __wasm_i64_mul($8, $8 >> 31, $32, $33);
8940       $14 = $13 + $14 | 0;
8941       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8942       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
8943       $13 = __wasm_i64_mul($12, $12 >> 31, $36, $31);
8944       $14 = $13 + $14 | 0;
8945       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8946       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
8947       $13 = __wasm_i64_mul($7, $7 >> 31, $34, $35);
8948       $14 = $13 + $14 | 0;
8949       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8950       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
8951       $13 = __wasm_i64_mul($18, $18 >> 31, $38, $39);
8952       $14 = $13 + $14 | 0;
8953       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8954       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
8955       $13 = __wasm_i64_mul($3, $3 >> 31, $42, $37);
8956       $14 = $13 + $14 | 0;
8957       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8958       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
8959       $13 = __wasm_i64_mul($15, $15 >> 31, $40, $41);
8960       $14 = $13 + $14 | 0;
8961       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
8962       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
8963       $13 = $6;
8964       $6 = $4;
8965       $19 = $6 & 31;
8966       HEAP32[$20 >> 2] = $10 - (32 <= ($6 & 63) >>> 0 ? $13 >> $19 : ((1 << $19) - 1 & $13) << 32 - $19 | $14 >>> $19);
8967       $13 = $16;
8968       $2 = $2 + 1 | 0;
8969       if (($2 | 0) != ($1 | 0)) {
8970        continue
8971       }
8972       break;
8973      };
8974      break label$1;
8975     }
8976     if (($1 | 0) < 1) {
8977      break label$1
8978     }
8979     $13 = HEAP32[$0 + -4 >> 2];
8980     $15 = HEAP32[$0 + -8 >> 2];
8981     $3 = HEAP32[$0 + -12 >> 2];
8982     $18 = HEAP32[$0 + -16 >> 2];
8983     $7 = HEAP32[$0 + -20 >> 2];
8984     $12 = HEAP32[$0 + -24 >> 2];
8985     $8 = HEAP32[$0 + -28 >> 2];
8986     $9 = HEAP32[$0 + -32 >> 2];
8987     $11 = HEAP32[$0 + -36 >> 2];
8988     $17 = HEAP32[$0 + -40 >> 2];
8989     $16 = HEAP32[$0 + -44 >> 2];
8990     $6 = HEAP32[$0 + -48 >> 2];
8991     $10 = HEAP32[$2 >> 2];
8992     $43 = $10;
8993     $44 = $10 >> 31;
8994     $10 = HEAP32[$2 + 4 >> 2];
8995     $45 = $10;
8996     $40 = $10 >> 31;
8997     $10 = HEAP32[$2 + 8 >> 2];
8998     $41 = $10;
8999     $42 = $10 >> 31;
9000     $10 = HEAP32[$2 + 12 >> 2];
9001     $37 = $10;
9002     $38 = $10 >> 31;
9003     $10 = HEAP32[$2 + 16 >> 2];
9004     $39 = $10;
9005     $34 = $10 >> 31;
9006     $10 = HEAP32[$2 + 20 >> 2];
9007     $35 = $10;
9008     $36 = $10 >> 31;
9009     $10 = HEAP32[$2 + 24 >> 2];
9010     $31 = $10;
9011     $32 = $10 >> 31;
9012     $10 = HEAP32[$2 + 28 >> 2];
9013     $33 = $10;
9014     $29 = $10 >> 31;
9015     $10 = HEAP32[$2 + 32 >> 2];
9016     $30 = $10;
9017     $26 = $10 >> 31;
9018     $10 = HEAP32[$2 + 36 >> 2];
9019     $27 = $10;
9020     $28 = $10 >> 31;
9021     $10 = HEAP32[$2 + 40 >> 2];
9022     $23 = $10;
9023     $24 = $10 >> 31;
9024     $2 = HEAP32[$2 + 44 >> 2];
9025     $25 = $2;
9026     $21 = $2 >> 31;
9027     $2 = 0;
9028     while (1) {
9029      $10 = $16;
9030      $16 = $17;
9031      $17 = $11;
9032      $11 = $9;
9033      $9 = $8;
9034      $8 = $12;
9035      $12 = $7;
9036      $7 = $18;
9037      $18 = $3;
9038      $3 = $15;
9039      $15 = $13;
9040      $13 = $2 << 2;
9041      $22 = $13 + $5 | 0;
9042      $13 = HEAP32[$0 + $13 >> 2];
9043      $14 = __wasm_i64_mul($10, $10 >> 31, $23, $24);
9044      $19 = i64toi32_i32$HIGH_BITS;
9045      $20 = $14;
9046      $14 = __wasm_i64_mul($6, $6 >> 31, $25, $21);
9047      $20 = $20 + $14 | 0;
9048      $6 = i64toi32_i32$HIGH_BITS + $19 | 0;
9049      $6 = $20 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9050      $14 = __wasm_i64_mul($16, $16 >> 31, $27, $28);
9051      $19 = $14 + $20 | 0;
9052      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9053      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9054      $14 = __wasm_i64_mul($17, $17 >> 31, $30, $26);
9055      $19 = $14 + $19 | 0;
9056      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9057      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9058      $14 = __wasm_i64_mul($11, $11 >> 31, $33, $29);
9059      $19 = $14 + $19 | 0;
9060      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9061      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9062      $14 = __wasm_i64_mul($9, $9 >> 31, $31, $32);
9063      $19 = $14 + $19 | 0;
9064      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9065      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9066      $14 = __wasm_i64_mul($8, $8 >> 31, $35, $36);
9067      $19 = $14 + $19 | 0;
9068      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9069      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9070      $14 = __wasm_i64_mul($12, $12 >> 31, $39, $34);
9071      $19 = $14 + $19 | 0;
9072      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9073      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9074      $14 = __wasm_i64_mul($7, $7 >> 31, $37, $38);
9075      $19 = $14 + $19 | 0;
9076      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9077      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9078      $14 = __wasm_i64_mul($18, $18 >> 31, $41, $42);
9079      $19 = $14 + $19 | 0;
9080      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9081      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9082      $14 = __wasm_i64_mul($3, $3 >> 31, $45, $40);
9083      $19 = $14 + $19 | 0;
9084      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9085      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9086      $14 = __wasm_i64_mul($15, $15 >> 31, $43, $44);
9087      $19 = $14 + $19 | 0;
9088      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9089      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
9090      $14 = $6;
9091      $6 = $4;
9092      $20 = $6 & 31;
9093      HEAP32[$22 >> 2] = $13 - (32 <= ($6 & 63) >>> 0 ? $14 >> $20 : ((1 << $20) - 1 & $14) << 32 - $20 | $19 >>> $20);
9094      $6 = $10;
9095      $2 = $2 + 1 | 0;
9096      if (($2 | 0) != ($1 | 0)) {
9097       continue
9098      }
9099      break;
9100     };
9101     break label$1;
9102    }
9103    if (($3 | 0) != 10) {
9104     if (($1 | 0) < 1) {
9105      break label$1
9106     }
9107     $17 = HEAP32[$0 + -4 >> 2];
9108     $15 = HEAP32[$0 + -8 >> 2];
9109     $3 = HEAP32[$0 + -12 >> 2];
9110     $18 = HEAP32[$0 + -16 >> 2];
9111     $7 = HEAP32[$0 + -20 >> 2];
9112     $12 = HEAP32[$0 + -24 >> 2];
9113     $8 = HEAP32[$0 + -28 >> 2];
9114     $9 = HEAP32[$0 + -32 >> 2];
9115     $16 = HEAP32[$0 + -36 >> 2];
9116     $11 = HEAP32[$2 >> 2];
9117     $34 = $11;
9118     $35 = $11 >> 31;
9119     $11 = HEAP32[$2 + 4 >> 2];
9120     $36 = $11;
9121     $31 = $11 >> 31;
9122     $11 = HEAP32[$2 + 8 >> 2];
9123     $32 = $11;
9124     $33 = $11 >> 31;
9125     $11 = HEAP32[$2 + 12 >> 2];
9126     $29 = $11;
9127     $30 = $11 >> 31;
9128     $11 = HEAP32[$2 + 16 >> 2];
9129     $26 = $11;
9130     $27 = $11 >> 31;
9131     $11 = HEAP32[$2 + 20 >> 2];
9132     $28 = $11;
9133     $23 = $11 >> 31;
9134     $11 = HEAP32[$2 + 24 >> 2];
9135     $24 = $11;
9136     $25 = $11 >> 31;
9137     $11 = HEAP32[$2 + 28 >> 2];
9138     $21 = $11;
9139     $22 = $11 >> 31;
9140     $2 = HEAP32[$2 + 32 >> 2];
9141     $20 = $2;
9142     $19 = $2 >> 31;
9143     $2 = 0;
9144     while (1) {
9145      $11 = $9;
9146      $9 = $8;
9147      $8 = $12;
9148      $12 = $7;
9149      $7 = $18;
9150      $18 = $3;
9151      $3 = $15;
9152      $15 = $17;
9153      $6 = $2 << 2;
9154      $14 = $6 + $5 | 0;
9155      $17 = HEAP32[$0 + $6 >> 2];
9156      $10 = __wasm_i64_mul($11, $11 >> 31, $21, $22);
9157      $6 = i64toi32_i32$HIGH_BITS;
9158      $16 = __wasm_i64_mul($16, $16 >> 31, $20, $19);
9159      $10 = $16 + $10 | 0;
9160      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9161      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
9162      $16 = __wasm_i64_mul($9, $9 >> 31, $24, $25);
9163      $10 = $16 + $10 | 0;
9164      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9165      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
9166      $16 = __wasm_i64_mul($8, $8 >> 31, $28, $23);
9167      $10 = $16 + $10 | 0;
9168      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9169      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
9170      $16 = __wasm_i64_mul($12, $12 >> 31, $26, $27);
9171      $10 = $16 + $10 | 0;
9172      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9173      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
9174      $16 = __wasm_i64_mul($7, $7 >> 31, $29, $30);
9175      $10 = $16 + $10 | 0;
9176      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9177      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
9178      $16 = __wasm_i64_mul($18, $18 >> 31, $32, $33);
9179      $10 = $16 + $10 | 0;
9180      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9181      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
9182      $16 = __wasm_i64_mul($3, $3 >> 31, $36, $31);
9183      $10 = $16 + $10 | 0;
9184      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9185      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
9186      $16 = __wasm_i64_mul($15, $15 >> 31, $34, $35);
9187      $10 = $16 + $10 | 0;
9188      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9189      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
9190      $16 = $6;
9191      $6 = $4;
9192      $13 = $6 & 31;
9193      HEAP32[$14 >> 2] = $17 - (32 <= ($6 & 63) >>> 0 ? $16 >> $13 : ((1 << $13) - 1 & $16) << 32 - $13 | $10 >>> $13);
9194      $16 = $11;
9195      $2 = $2 + 1 | 0;
9196      if (($2 | 0) != ($1 | 0)) {
9197       continue
9198      }
9199      break;
9200     };
9201     break label$1;
9202    }
9203    if (($1 | 0) < 1) {
9204     break label$1
9205    }
9206    $16 = HEAP32[$0 + -4 >> 2];
9207    $15 = HEAP32[$0 + -8 >> 2];
9208    $3 = HEAP32[$0 + -12 >> 2];
9209    $18 = HEAP32[$0 + -16 >> 2];
9210    $7 = HEAP32[$0 + -20 >> 2];
9211    $12 = HEAP32[$0 + -24 >> 2];
9212    $8 = HEAP32[$0 + -28 >> 2];
9213    $9 = HEAP32[$0 + -32 >> 2];
9214    $11 = HEAP32[$0 + -36 >> 2];
9215    $10 = HEAP32[$0 + -40 >> 2];
9216    $6 = HEAP32[$2 >> 2];
9217    $37 = $6;
9218    $38 = $6 >> 31;
9219    $6 = HEAP32[$2 + 4 >> 2];
9220    $39 = $6;
9221    $34 = $6 >> 31;
9222    $6 = HEAP32[$2 + 8 >> 2];
9223    $35 = $6;
9224    $36 = $6 >> 31;
9225    $6 = HEAP32[$2 + 12 >> 2];
9226    $31 = $6;
9227    $32 = $6 >> 31;
9228    $6 = HEAP32[$2 + 16 >> 2];
9229    $33 = $6;
9230    $29 = $6 >> 31;
9231    $6 = HEAP32[$2 + 20 >> 2];
9232    $30 = $6;
9233    $26 = $6 >> 31;
9234    $6 = HEAP32[$2 + 24 >> 2];
9235    $27 = $6;
9236    $28 = $6 >> 31;
9237    $6 = HEAP32[$2 + 28 >> 2];
9238    $23 = $6;
9239    $24 = $6 >> 31;
9240    $6 = HEAP32[$2 + 32 >> 2];
9241    $25 = $6;
9242    $21 = $6 >> 31;
9243    $2 = HEAP32[$2 + 36 >> 2];
9244    $22 = $2;
9245    $20 = $2 >> 31;
9246    $2 = 0;
9247    while (1) {
9248     $17 = $11;
9249     $11 = $9;
9250     $9 = $8;
9251     $8 = $12;
9252     $12 = $7;
9253     $7 = $18;
9254     $18 = $3;
9255     $3 = $15;
9256     $15 = $16;
9257     $6 = $2 << 2;
9258     $19 = $6 + $5 | 0;
9259     $16 = HEAP32[$0 + $6 >> 2];
9260     $13 = __wasm_i64_mul($17, $17 >> 31, $25, $21);
9261     $6 = i64toi32_i32$HIGH_BITS;
9262     $10 = __wasm_i64_mul($10, $10 >> 31, $22, $20);
9263     $13 = $10 + $13 | 0;
9264     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9265     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
9266     $10 = __wasm_i64_mul($11, $11 >> 31, $23, $24);
9267     $13 = $10 + $13 | 0;
9268     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9269     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
9270     $10 = __wasm_i64_mul($9, $9 >> 31, $27, $28);
9271     $13 = $10 + $13 | 0;
9272     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9273     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
9274     $10 = __wasm_i64_mul($8, $8 >> 31, $30, $26);
9275     $13 = $10 + $13 | 0;
9276     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9277     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
9278     $10 = __wasm_i64_mul($12, $12 >> 31, $33, $29);
9279     $13 = $10 + $13 | 0;
9280     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9281     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
9282     $10 = __wasm_i64_mul($7, $7 >> 31, $31, $32);
9283     $13 = $10 + $13 | 0;
9284     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9285     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
9286     $10 = __wasm_i64_mul($18, $18 >> 31, $35, $36);
9287     $13 = $10 + $13 | 0;
9288     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9289     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
9290     $10 = __wasm_i64_mul($3, $3 >> 31, $39, $34);
9291     $13 = $10 + $13 | 0;
9292     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9293     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
9294     $10 = __wasm_i64_mul($15, $15 >> 31, $37, $38);
9295     $13 = $10 + $13 | 0;
9296     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9297     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
9298     $10 = $6;
9299     $6 = $4;
9300     $14 = $6 & 31;
9301     HEAP32[$19 >> 2] = $16 - (32 <= ($6 & 63) >>> 0 ? $10 >> $14 : ((1 << $14) - 1 & $10) << 32 - $14 | $13 >>> $14);
9302     $10 = $17;
9303     $2 = $2 + 1 | 0;
9304     if (($2 | 0) != ($1 | 0)) {
9305      continue
9306     }
9307     break;
9308    };
9309    break label$1;
9310   }
9311   if ($3 >>> 0 >= 5) {
9312    if ($3 >>> 0 >= 7) {
9313     if (($3 | 0) != 8) {
9314      if (($1 | 0) < 1) {
9315       break label$1
9316      }
9317      $9 = HEAP32[$0 + -4 >> 2];
9318      $15 = HEAP32[$0 + -8 >> 2];
9319      $3 = HEAP32[$0 + -12 >> 2];
9320      $18 = HEAP32[$0 + -16 >> 2];
9321      $7 = HEAP32[$0 + -20 >> 2];
9322      $12 = HEAP32[$0 + -24 >> 2];
9323      $11 = HEAP32[$0 + -28 >> 2];
9324      $8 = HEAP32[$2 >> 2];
9325      $29 = $8;
9326      $30 = $8 >> 31;
9327      $8 = HEAP32[$2 + 4 >> 2];
9328      $26 = $8;
9329      $27 = $8 >> 31;
9330      $8 = HEAP32[$2 + 8 >> 2];
9331      $28 = $8;
9332      $23 = $8 >> 31;
9333      $8 = HEAP32[$2 + 12 >> 2];
9334      $24 = $8;
9335      $25 = $8 >> 31;
9336      $8 = HEAP32[$2 + 16 >> 2];
9337      $21 = $8;
9338      $22 = $8 >> 31;
9339      $8 = HEAP32[$2 + 20 >> 2];
9340      $20 = $8;
9341      $19 = $8 >> 31;
9342      $2 = HEAP32[$2 + 24 >> 2];
9343      $14 = $2;
9344      $13 = $2 >> 31;
9345      $2 = 0;
9346      while (1) {
9347       $8 = $12;
9348       $12 = $7;
9349       $7 = $18;
9350       $18 = $3;
9351       $3 = $15;
9352       $15 = $9;
9353       $9 = $2 << 2;
9354       $10 = $9 + $5 | 0;
9355       $9 = HEAP32[$0 + $9 >> 2];
9356       $17 = __wasm_i64_mul($8, $8 >> 31, $20, $19);
9357       $6 = i64toi32_i32$HIGH_BITS;
9358       $11 = __wasm_i64_mul($11, $11 >> 31, $14, $13);
9359       $17 = $11 + $17 | 0;
9360       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9361       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
9362       $11 = __wasm_i64_mul($12, $12 >> 31, $21, $22);
9363       $17 = $11 + $17 | 0;
9364       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9365       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
9366       $11 = __wasm_i64_mul($7, $7 >> 31, $24, $25);
9367       $17 = $11 + $17 | 0;
9368       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9369       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
9370       $11 = __wasm_i64_mul($18, $18 >> 31, $28, $23);
9371       $17 = $11 + $17 | 0;
9372       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9373       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
9374       $11 = __wasm_i64_mul($3, $3 >> 31, $26, $27);
9375       $17 = $11 + $17 | 0;
9376       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9377       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
9378       $11 = __wasm_i64_mul($15, $15 >> 31, $29, $30);
9379       $17 = $11 + $17 | 0;
9380       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9381       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
9382       $16 = $4 & 31;
9383       HEAP32[$10 >> 2] = $9 - (32 <= ($4 & 63) >>> 0 ? $6 >> $16 : ((1 << $16) - 1 & $6) << 32 - $16 | $17 >>> $16);
9384       $11 = $8;
9385       $2 = $2 + 1 | 0;
9386       if (($2 | 0) != ($1 | 0)) {
9387        continue
9388       }
9389       break;
9390      };
9391      break label$1;
9392     }
9393     if (($1 | 0) < 1) {
9394      break label$1
9395     }
9396     $11 = HEAP32[$0 + -4 >> 2];
9397     $15 = HEAP32[$0 + -8 >> 2];
9398     $3 = HEAP32[$0 + -12 >> 2];
9399     $18 = HEAP32[$0 + -16 >> 2];
9400     $7 = HEAP32[$0 + -20 >> 2];
9401     $12 = HEAP32[$0 + -24 >> 2];
9402     $8 = HEAP32[$0 + -28 >> 2];
9403     $17 = HEAP32[$0 + -32 >> 2];
9404     $9 = HEAP32[$2 >> 2];
9405     $31 = $9;
9406     $32 = $9 >> 31;
9407     $9 = HEAP32[$2 + 4 >> 2];
9408     $33 = $9;
9409     $29 = $9 >> 31;
9410     $9 = HEAP32[$2 + 8 >> 2];
9411     $30 = $9;
9412     $26 = $9 >> 31;
9413     $9 = HEAP32[$2 + 12 >> 2];
9414     $27 = $9;
9415     $28 = $9 >> 31;
9416     $9 = HEAP32[$2 + 16 >> 2];
9417     $23 = $9;
9418     $24 = $9 >> 31;
9419     $9 = HEAP32[$2 + 20 >> 2];
9420     $25 = $9;
9421     $21 = $9 >> 31;
9422     $9 = HEAP32[$2 + 24 >> 2];
9423     $22 = $9;
9424     $20 = $9 >> 31;
9425     $2 = HEAP32[$2 + 28 >> 2];
9426     $19 = $2;
9427     $14 = $2 >> 31;
9428     $2 = 0;
9429     while (1) {
9430      $9 = $8;
9431      $8 = $12;
9432      $12 = $7;
9433      $7 = $18;
9434      $18 = $3;
9435      $3 = $15;
9436      $15 = $11;
9437      $11 = $2 << 2;
9438      $13 = $11 + $5 | 0;
9439      $11 = HEAP32[$0 + $11 >> 2];
9440      $16 = __wasm_i64_mul($9, $9 >> 31, $22, $20);
9441      $6 = i64toi32_i32$HIGH_BITS;
9442      $17 = __wasm_i64_mul($17, $17 >> 31, $19, $14);
9443      $16 = $17 + $16 | 0;
9444      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9445      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
9446      $17 = __wasm_i64_mul($8, $8 >> 31, $25, $21);
9447      $16 = $17 + $16 | 0;
9448      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9449      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
9450      $17 = __wasm_i64_mul($12, $12 >> 31, $23, $24);
9451      $16 = $17 + $16 | 0;
9452      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9453      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
9454      $17 = __wasm_i64_mul($7, $7 >> 31, $27, $28);
9455      $16 = $17 + $16 | 0;
9456      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9457      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
9458      $17 = __wasm_i64_mul($18, $18 >> 31, $30, $26);
9459      $16 = $17 + $16 | 0;
9460      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9461      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
9462      $17 = __wasm_i64_mul($3, $3 >> 31, $33, $29);
9463      $16 = $17 + $16 | 0;
9464      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9465      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
9466      $17 = __wasm_i64_mul($15, $15 >> 31, $31, $32);
9467      $16 = $17 + $16 | 0;
9468      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9469      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
9470      $17 = $6;
9471      $6 = $4;
9472      $10 = $6 & 31;
9473      HEAP32[$13 >> 2] = $11 - (32 <= ($6 & 63) >>> 0 ? $17 >> $10 : ((1 << $10) - 1 & $17) << 32 - $10 | $16 >>> $10);
9474      $17 = $9;
9475      $2 = $2 + 1 | 0;
9476      if (($2 | 0) != ($1 | 0)) {
9477       continue
9478      }
9479      break;
9480     };
9481     break label$1;
9482    }
9483    if (($3 | 0) != 6) {
9484     if (($1 | 0) < 1) {
9485      break label$1
9486     }
9487     $12 = HEAP32[$0 + -4 >> 2];
9488     $15 = HEAP32[$0 + -8 >> 2];
9489     $3 = HEAP32[$0 + -12 >> 2];
9490     $18 = HEAP32[$0 + -16 >> 2];
9491     $8 = HEAP32[$0 + -20 >> 2];
9492     $7 = HEAP32[$2 >> 2];
9493     $23 = $7;
9494     $24 = $7 >> 31;
9495     $7 = HEAP32[$2 + 4 >> 2];
9496     $25 = $7;
9497     $21 = $7 >> 31;
9498     $7 = HEAP32[$2 + 8 >> 2];
9499     $22 = $7;
9500     $20 = $7 >> 31;
9501     $7 = HEAP32[$2 + 12 >> 2];
9502     $19 = $7;
9503     $14 = $7 >> 31;
9504     $2 = HEAP32[$2 + 16 >> 2];
9505     $13 = $2;
9506     $10 = $2 >> 31;
9507     $2 = 0;
9508     while (1) {
9509      $7 = $18;
9510      $18 = $3;
9511      $3 = $15;
9512      $15 = $12;
9513      $12 = $2 << 2;
9514      $16 = $12 + $5 | 0;
9515      $12 = HEAP32[$0 + $12 >> 2];
9516      $11 = __wasm_i64_mul($7, $7 >> 31, $19, $14);
9517      $9 = i64toi32_i32$HIGH_BITS;
9518      $8 = __wasm_i64_mul($8, $8 >> 31, $13, $10);
9519      $11 = $8 + $11 | 0;
9520      $6 = i64toi32_i32$HIGH_BITS + $9 | 0;
9521      $6 = $11 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;
9522      $8 = __wasm_i64_mul($18, $18 >> 31, $22, $20);
9523      $9 = $8 + $11 | 0;
9524      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9525      $6 = $9 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;
9526      $8 = __wasm_i64_mul($3, $3 >> 31, $25, $21);
9527      $9 = $8 + $9 | 0;
9528      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9529      $6 = $9 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;
9530      $8 = __wasm_i64_mul($15, $15 >> 31, $23, $24);
9531      $9 = $8 + $9 | 0;
9532      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9533      $6 = $9 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;
9534      $11 = $4 & 31;
9535      HEAP32[$16 >> 2] = $12 - (32 <= ($4 & 63) >>> 0 ? $6 >> $11 : ((1 << $11) - 1 & $6) << 32 - $11 | $9 >>> $11);
9536      $8 = $7;
9537      $2 = $2 + 1 | 0;
9538      if (($2 | 0) != ($1 | 0)) {
9539       continue
9540      }
9541      break;
9542     };
9543     break label$1;
9544    }
9545    if (($1 | 0) < 1) {
9546     break label$1
9547    }
9548    $8 = HEAP32[$0 + -4 >> 2];
9549    $15 = HEAP32[$0 + -8 >> 2];
9550    $3 = HEAP32[$0 + -12 >> 2];
9551    $18 = HEAP32[$0 + -16 >> 2];
9552    $7 = HEAP32[$0 + -20 >> 2];
9553    $9 = HEAP32[$0 + -24 >> 2];
9554    $12 = HEAP32[$2 >> 2];
9555    $27 = $12;
9556    $28 = $12 >> 31;
9557    $12 = HEAP32[$2 + 4 >> 2];
9558    $23 = $12;
9559    $24 = $12 >> 31;
9560    $12 = HEAP32[$2 + 8 >> 2];
9561    $25 = $12;
9562    $21 = $12 >> 31;
9563    $12 = HEAP32[$2 + 12 >> 2];
9564    $22 = $12;
9565    $20 = $12 >> 31;
9566    $12 = HEAP32[$2 + 16 >> 2];
9567    $19 = $12;
9568    $14 = $12 >> 31;
9569    $2 = HEAP32[$2 + 20 >> 2];
9570    $13 = $2;
9571    $10 = $2 >> 31;
9572    $2 = 0;
9573    while (1) {
9574     $12 = $7;
9575     $7 = $18;
9576     $18 = $3;
9577     $3 = $15;
9578     $15 = $8;
9579     $8 = $2 << 2;
9580     $16 = $8 + $5 | 0;
9581     $8 = HEAP32[$0 + $8 >> 2];
9582     $6 = __wasm_i64_mul($12, $12 >> 31, $19, $14);
9583     $11 = i64toi32_i32$HIGH_BITS;
9584     $9 = __wasm_i64_mul($9, $9 >> 31, $13, $10);
9585     $26 = $9 + $6 | 0;
9586     $6 = i64toi32_i32$HIGH_BITS + $11 | 0;
9587     $6 = $26 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;
9588     $9 = __wasm_i64_mul($7, $7 >> 31, $22, $20);
9589     $11 = $9 + $26 | 0;
9590     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9591     $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;
9592     $9 = __wasm_i64_mul($18, $18 >> 31, $25, $21);
9593     $11 = $9 + $11 | 0;
9594     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9595     $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;
9596     $9 = __wasm_i64_mul($3, $3 >> 31, $23, $24);
9597     $11 = $9 + $11 | 0;
9598     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9599     $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;
9600     $9 = __wasm_i64_mul($15, $15 >> 31, $27, $28);
9601     $11 = $9 + $11 | 0;
9602     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9603     $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;
9604     $17 = $4 & 31;
9605     HEAP32[$16 >> 2] = $8 - (32 <= ($4 & 63) >>> 0 ? $6 >> $17 : ((1 << $17) - 1 & $6) << 32 - $17 | $11 >>> $17);
9606     $9 = $12;
9607     $2 = $2 + 1 | 0;
9608     if (($2 | 0) != ($1 | 0)) {
9609      continue
9610     }
9611     break;
9612    };
9613    break label$1;
9614   }
9615   if ($3 >>> 0 >= 3) {
9616    if (($3 | 0) != 4) {
9617     if (($1 | 0) < 1) {
9618      break label$1
9619     }
9620     $18 = HEAP32[$0 + -4 >> 2];
9621     $15 = HEAP32[$0 + -8 >> 2];
9622     $7 = HEAP32[$0 + -12 >> 2];
9623     $3 = HEAP32[$2 >> 2];
9624     $19 = $3;
9625     $14 = $3 >> 31;
9626     $3 = HEAP32[$2 + 4 >> 2];
9627     $13 = $3;
9628     $10 = $3 >> 31;
9629     $2 = HEAP32[$2 + 8 >> 2];
9630     $16 = $2;
9631     $17 = $2 >> 31;
9632     $2 = 0;
9633     while (1) {
9634      $3 = $15;
9635      $15 = $18;
9636      $18 = $2 << 2;
9637      $11 = $18 + $5 | 0;
9638      $18 = HEAP32[$0 + $18 >> 2];
9639      $9 = $18;
9640      $8 = __wasm_i64_mul($3, $3 >> 31, $13, $10);
9641      $12 = i64toi32_i32$HIGH_BITS;
9642      $7 = __wasm_i64_mul($7, $7 >> 31, $16, $17);
9643      $8 = $7 + $8 | 0;
9644      $6 = i64toi32_i32$HIGH_BITS + $12 | 0;
9645      $6 = $8 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6;
9646      $7 = __wasm_i64_mul($15, $15 >> 31, $19, $14);
9647      $12 = $7 + $8 | 0;
9648      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9649      $6 = $12 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6;
9650      $7 = $4;
9651      $8 = $7 & 31;
9652      HEAP32[$11 >> 2] = $9 - (32 <= ($7 & 63) >>> 0 ? $6 >> $8 : ((1 << $8) - 1 & $6) << 32 - $8 | $12 >>> $8);
9653      $7 = $3;
9654      $2 = $2 + 1 | 0;
9655      if (($2 | 0) != ($1 | 0)) {
9656       continue
9657      }
9658      break;
9659     };
9660     break label$1;
9661    }
9662    if (($1 | 0) < 1) {
9663     break label$1
9664    }
9665    $7 = HEAP32[$0 + -4 >> 2];
9666    $15 = HEAP32[$0 + -8 >> 2];
9667    $3 = HEAP32[$0 + -12 >> 2];
9668    $12 = HEAP32[$0 + -16 >> 2];
9669    $18 = HEAP32[$2 >> 2];
9670    $21 = $18;
9671    $22 = $18 >> 31;
9672    $18 = HEAP32[$2 + 4 >> 2];
9673    $20 = $18;
9674    $19 = $18 >> 31;
9675    $18 = HEAP32[$2 + 8 >> 2];
9676    $14 = $18;
9677    $13 = $14 >> 31;
9678    $2 = HEAP32[$2 + 12 >> 2];
9679    $10 = $2;
9680    $16 = $2 >> 31;
9681    $2 = 0;
9682    while (1) {
9683     $18 = $3;
9684     $3 = $15;
9685     $15 = $7;
9686     $7 = $2 << 2;
9687     $17 = $7 + $5 | 0;
9688     $7 = HEAP32[$0 + $7 >> 2];
9689     $9 = __wasm_i64_mul($18, $18 >> 31, $14, $13);
9690     $8 = i64toi32_i32$HIGH_BITS;
9691     $12 = __wasm_i64_mul($12, $12 >> 31, $10, $16);
9692     $9 = $12 + $9 | 0;
9693     $6 = i64toi32_i32$HIGH_BITS + $8 | 0;
9694     $6 = $9 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;
9695     $12 = __wasm_i64_mul($3, $3 >> 31, $20, $19);
9696     $8 = $12 + $9 | 0;
9697     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9698     $6 = $8 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;
9699     $12 = __wasm_i64_mul($15, $15 >> 31, $21, $22);
9700     $8 = $12 + $8 | 0;
9701     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
9702     $6 = $8 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;
9703     $9 = $4 & 31;
9704     HEAP32[$17 >> 2] = $7 - (32 <= ($4 & 63) >>> 0 ? $6 >> $9 : ((1 << $9) - 1 & $6) << 32 - $9 | $8 >>> $9);
9705     $12 = $18;
9706     $2 = $2 + 1 | 0;
9707     if (($2 | 0) != ($1 | 0)) {
9708      continue
9709     }
9710     break;
9711    };
9712    break label$1;
9713   }
9714   if (($3 | 0) != 2) {
9715    if (($1 | 0) < 1) {
9716     break label$1
9717    }
9718    $15 = HEAP32[$0 + -4 >> 2];
9719    $2 = HEAP32[$2 >> 2];
9720    $9 = $2;
9721    $8 = $2 >> 31;
9722    $2 = 0;
9723    while (1) {
9724     $3 = $2 << 2;
9725     $6 = $3 + $5 | 0;
9726     $18 = HEAP32[$0 + $3 >> 2];
9727     $15 = __wasm_i64_mul($15, $15 >> 31, $9, $8);
9728     $7 = i64toi32_i32$HIGH_BITS;
9729     $3 = $4;
9730     $12 = $3 & 31;
9731     HEAP32[$6 >> 2] = $18 - (32 <= ($3 & 63) >>> 0 ? $7 >> $12 : ((1 << $12) - 1 & $7) << 32 - $12 | $15 >>> $12);
9732     $15 = $18;
9733     $2 = $2 + 1 | 0;
9734     if (($2 | 0) != ($1 | 0)) {
9735      continue
9736     }
9737     break;
9738    };
9739    break label$1;
9740   }
9741   if (($1 | 0) < 1) {
9742    break label$1
9743   }
9744   $3 = HEAP32[$0 + -4 >> 2];
9745   $18 = HEAP32[$0 + -8 >> 2];
9746   $15 = HEAP32[$2 >> 2];
9747   $10 = $15;
9748   $16 = $10 >> 31;
9749   $2 = HEAP32[$2 + 4 >> 2];
9750   $17 = $2;
9751   $11 = $2 >> 31;
9752   $2 = 0;
9753   while (1) {
9754    $15 = $3;
9755    $3 = $2 << 2;
9756    $9 = $3 + $5 | 0;
9757    $3 = HEAP32[$0 + $3 >> 2];
9758    $12 = __wasm_i64_mul($15, $15 >> 31, $10, $16);
9759    $7 = i64toi32_i32$HIGH_BITS;
9760    $18 = __wasm_i64_mul($18, $18 >> 31, $17, $11);
9761    $12 = $18 + $12 | 0;
9762    $6 = i64toi32_i32$HIGH_BITS + $7 | 0;
9763    $6 = $12 >>> 0 < $18 >>> 0 ? $6 + 1 | 0 : $6;
9764    $7 = $12;
9765    $12 = $4 & 31;
9766    HEAP32[$9 >> 2] = $3 - (32 <= ($4 & 63) >>> 0 ? $6 >> $12 : ((1 << $12) - 1 & $6) << 32 - $12 | $7 >>> $12);
9767    $18 = $15;
9768    $2 = $2 + 1 | 0;
9769    if (($2 | 0) != ($1 | 0)) {
9770     continue
9771    }
9772    break;
9773   };
9774  }
9775 }
9776
9777 function FLAC__lpc_restore_signal($0, $1, $2, $3, $4, $5) {
9778  $0 = $0 | 0;
9779  $1 = $1 | 0;
9780  $2 = $2 | 0;
9781  $3 = $3 | 0;
9782  $4 = $4 | 0;
9783  $5 = $5 | 0;
9784  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0;
9785  label$1 : {
9786   if ($3 >>> 0 >= 13) {
9787    if (($1 | 0) < 1) {
9788     break label$1
9789    }
9790    $17 = $3 + -13 | 0;
9791    while (1) {
9792     $25 = 0;
9793     $26 = 0;
9794     $23 = 0;
9795     $24 = 0;
9796     $21 = 0;
9797     $22 = 0;
9798     $19 = 0;
9799     $20 = 0;
9800     $18 = 0;
9801     $15 = 0;
9802     $12 = 0;
9803     $10 = 0;
9804     $14 = 0;
9805     $9 = 0;
9806     $13 = 0;
9807     $7 = 0;
9808     $16 = 0;
9809     $11 = 0;
9810     $8 = 0;
9811     $3 = 0;
9812     label$4 : {
9813      switch ($17 | 0) {
9814      case 19:
9815       $25 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -128 >> 2], HEAP32[$2 + 124 >> 2]);
9816      case 18:
9817       $26 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -124 >> 2], HEAP32[$2 + 120 >> 2]) + $25 | 0;
9818      case 17:
9819       $23 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -120 >> 2], HEAP32[$2 + 116 >> 2]) + $26 | 0;
9820      case 16:
9821       $24 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -116 >> 2], HEAP32[$2 + 112 >> 2]) + $23 | 0;
9822      case 15:
9823       $21 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -112 >> 2], HEAP32[$2 + 108 >> 2]) + $24 | 0;
9824      case 14:
9825       $22 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -108 >> 2], HEAP32[$2 + 104 >> 2]) + $21 | 0;
9826      case 13:
9827       $19 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -104 >> 2], HEAP32[$2 + 100 >> 2]) + $22 | 0;
9828      case 12:
9829       $20 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -100 >> 2], HEAP32[$2 + 96 >> 2]) + $19 | 0;
9830      case 11:
9831       $18 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -96 >> 2], HEAP32[$2 + 92 >> 2]) + $20 | 0;
9832      case 10:
9833       $15 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -92 >> 2], HEAP32[$2 + 88 >> 2]) + $18 | 0;
9834      case 9:
9835       $12 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -88 >> 2], HEAP32[$2 + 84 >> 2]) + $15 | 0;
9836      case 8:
9837       $10 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -84 >> 2], HEAP32[$2 + 80 >> 2]) + $12 | 0;
9838      case 7:
9839       $14 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -80 >> 2], HEAP32[$2 + 76 >> 2]) + $10 | 0;
9840      case 6:
9841       $9 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -76 >> 2], HEAP32[$2 + 72 >> 2]) + $14 | 0;
9842      case 5:
9843       $13 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -72 >> 2], HEAP32[$2 + 68 >> 2]) + $9 | 0;
9844      case 4:
9845       $7 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -68 >> 2], HEAP32[$2 + 64 >> 2]) + $13 | 0;
9846      case 3:
9847       $16 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -64 >> 2], HEAP32[$2 + 60 >> 2]) + $7 | 0;
9848      case 2:
9849       $11 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -60 >> 2], HEAP32[$2 + 56 >> 2]) + $16 | 0;
9850      case 1:
9851       $8 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -56 >> 2], HEAP32[$2 + 52 >> 2]) + $11 | 0;
9852      case 0:
9853       $3 = ($6 << 2) + $5 | 0;
9854       $3 = ((((((((((((Math_imul(HEAP32[$3 + -52 >> 2], HEAP32[$2 + 48 >> 2]) + $8 | 0) + Math_imul(HEAP32[$3 + -48 >> 2], HEAP32[$2 + 44 >> 2]) | 0) + Math_imul(HEAP32[$3 + -44 >> 2], HEAP32[$2 + 40 >> 2]) | 0) + Math_imul(HEAP32[$3 + -40 >> 2], HEAP32[$2 + 36 >> 2]) | 0) + Math_imul(HEAP32[$3 + -36 >> 2], HEAP32[$2 + 32 >> 2]) | 0) + Math_imul(HEAP32[$3 + -32 >> 2], HEAP32[$2 + 28 >> 2]) | 0) + Math_imul(HEAP32[$3 + -28 >> 2], HEAP32[$2 + 24 >> 2]) | 0) + Math_imul(HEAP32[$3 + -24 >> 2], HEAP32[$2 + 20 >> 2]) | 0) + Math_imul(HEAP32[$3 + -20 >> 2], HEAP32[$2 + 16 >> 2]) | 0) + Math_imul(HEAP32[$3 + -16 >> 2], HEAP32[$2 + 12 >> 2]) | 0) + Math_imul(HEAP32[$3 + -12 >> 2], HEAP32[$2 + 8 >> 2]) | 0) + Math_imul(HEAP32[$3 + -8 >> 2], HEAP32[$2 + 4 >> 2]) | 0) + Math_imul(HEAP32[$3 + -4 >> 2], HEAP32[$2 >> 2]) | 0;
9855       break;
9856      default:
9857       break label$4;
9858      };
9859     }
9860     $8 = $6 << 2;
9861     HEAP32[$8 + $5 >> 2] = HEAP32[$0 + $8 >> 2] + ($3 >> $4);
9862     $6 = $6 + 1 | 0;
9863     if (($6 | 0) != ($1 | 0)) {
9864      continue
9865     }
9866     break;
9867    };
9868    break label$1;
9869   }
9870   if ($3 >>> 0 >= 9) {
9871    if ($3 >>> 0 >= 11) {
9872     if (($3 | 0) != 12) {
9873      if (($1 | 0) < 1) {
9874       break label$1
9875      }
9876      $6 = HEAP32[$5 + -4 >> 2];
9877      $3 = HEAP32[$5 + -8 >> 2];
9878      $8 = HEAP32[$5 + -12 >> 2];
9879      $11 = HEAP32[$5 + -16 >> 2];
9880      $16 = HEAP32[$5 + -20 >> 2];
9881      $7 = HEAP32[$5 + -24 >> 2];
9882      $13 = HEAP32[$5 + -28 >> 2];
9883      $9 = HEAP32[$5 + -32 >> 2];
9884      $14 = HEAP32[$5 + -36 >> 2];
9885      $10 = HEAP32[$5 + -40 >> 2];
9886      $12 = HEAP32[$5 + -44 >> 2];
9887      $27 = HEAP32[$2 >> 2];
9888      $28 = HEAP32[$2 + 4 >> 2];
9889      $25 = HEAP32[$2 + 8 >> 2];
9890      $26 = HEAP32[$2 + 12 >> 2];
9891      $23 = HEAP32[$2 + 16 >> 2];
9892      $24 = HEAP32[$2 + 20 >> 2];
9893      $21 = HEAP32[$2 + 24 >> 2];
9894      $22 = HEAP32[$2 + 28 >> 2];
9895      $19 = HEAP32[$2 + 32 >> 2];
9896      $20 = HEAP32[$2 + 36 >> 2];
9897      $18 = HEAP32[$2 + 40 >> 2];
9898      $2 = 0;
9899      while (1) {
9900       $17 = $10;
9901       $12 = Math_imul($10, $20) + Math_imul($12, $18) | 0;
9902       $10 = $14;
9903       $12 = $12 + Math_imul($19, $10) | 0;
9904       $14 = $9;
9905       $12 = Math_imul($9, $22) + $12 | 0;
9906       $9 = $13;
9907       $12 = $12 + Math_imul($21, $9) | 0;
9908       $13 = $7;
9909       $12 = Math_imul($7, $24) + $12 | 0;
9910       $7 = $16;
9911       $12 = $12 + Math_imul($23, $7) | 0;
9912       $16 = $11;
9913       $12 = Math_imul($11, $26) + $12 | 0;
9914       $11 = $8;
9915       $15 = Math_imul($8, $25) + $12 | 0;
9916       $8 = $3;
9917       $12 = $2 << 2;
9918       $15 = Math_imul($3, $28) + $15 | 0;
9919       $3 = $6;
9920       $6 = HEAP32[$12 + $0 >> 2] + ($15 + Math_imul($27, $3) >> $4) | 0;
9921       HEAP32[$5 + $12 >> 2] = $6;
9922       $12 = $17;
9923       $2 = $2 + 1 | 0;
9924       if (($2 | 0) != ($1 | 0)) {
9925        continue
9926       }
9927       break;
9928      };
9929      break label$1;
9930     }
9931     if (($1 | 0) < 1) {
9932      break label$1
9933     }
9934     $6 = HEAP32[$5 + -4 >> 2];
9935     $3 = HEAP32[$5 + -8 >> 2];
9936     $8 = HEAP32[$5 + -12 >> 2];
9937     $11 = HEAP32[$5 + -16 >> 2];
9938     $16 = HEAP32[$5 + -20 >> 2];
9939     $7 = HEAP32[$5 + -24 >> 2];
9940     $13 = HEAP32[$5 + -28 >> 2];
9941     $9 = HEAP32[$5 + -32 >> 2];
9942     $14 = HEAP32[$5 + -36 >> 2];
9943     $10 = HEAP32[$5 + -40 >> 2];
9944     $12 = HEAP32[$5 + -44 >> 2];
9945     $15 = HEAP32[$5 + -48 >> 2];
9946     $29 = HEAP32[$2 >> 2];
9947     $30 = HEAP32[$2 + 4 >> 2];
9948     $27 = HEAP32[$2 + 8 >> 2];
9949     $28 = HEAP32[$2 + 12 >> 2];
9950     $25 = HEAP32[$2 + 16 >> 2];
9951     $26 = HEAP32[$2 + 20 >> 2];
9952     $23 = HEAP32[$2 + 24 >> 2];
9953     $24 = HEAP32[$2 + 28 >> 2];
9954     $21 = HEAP32[$2 + 32 >> 2];
9955     $22 = HEAP32[$2 + 36 >> 2];
9956     $19 = HEAP32[$2 + 40 >> 2];
9957     $20 = HEAP32[$2 + 44 >> 2];
9958     $2 = 0;
9959     while (1) {
9960      $17 = $12;
9961      $15 = Math_imul($12, $19) + Math_imul($15, $20) | 0;
9962      $12 = $10;
9963      $15 = Math_imul($10, $22) + $15 | 0;
9964      $10 = $14;
9965      $15 = $15 + Math_imul($21, $10) | 0;
9966      $14 = $9;
9967      $15 = Math_imul($9, $24) + $15 | 0;
9968      $9 = $13;
9969      $15 = $15 + Math_imul($23, $9) | 0;
9970      $13 = $7;
9971      $15 = Math_imul($7, $26) + $15 | 0;
9972      $7 = $16;
9973      $15 = $15 + Math_imul($25, $7) | 0;
9974      $16 = $11;
9975      $15 = Math_imul($11, $28) + $15 | 0;
9976      $11 = $8;
9977      $18 = Math_imul($8, $27) + $15 | 0;
9978      $8 = $3;
9979      $15 = $2 << 2;
9980      $18 = Math_imul($3, $30) + $18 | 0;
9981      $3 = $6;
9982      $6 = HEAP32[$15 + $0 >> 2] + ($18 + Math_imul($29, $3) >> $4) | 0;
9983      HEAP32[$5 + $15 >> 2] = $6;
9984      $15 = $17;
9985      $2 = $2 + 1 | 0;
9986      if (($2 | 0) != ($1 | 0)) {
9987       continue
9988      }
9989      break;
9990     };
9991     break label$1;
9992    }
9993    if (($3 | 0) != 10) {
9994     if (($1 | 0) < 1) {
9995      break label$1
9996     }
9997     $6 = HEAP32[$5 + -4 >> 2];
9998     $3 = HEAP32[$5 + -8 >> 2];
9999     $8 = HEAP32[$5 + -12 >> 2];
10000     $11 = HEAP32[$5 + -16 >> 2];
10001     $16 = HEAP32[$5 + -20 >> 2];
10002     $7 = HEAP32[$5 + -24 >> 2];
10003     $13 = HEAP32[$5 + -28 >> 2];
10004     $9 = HEAP32[$5 + -32 >> 2];
10005     $14 = HEAP32[$5 + -36 >> 2];
10006     $23 = HEAP32[$2 >> 2];
10007     $24 = HEAP32[$2 + 4 >> 2];
10008     $21 = HEAP32[$2 + 8 >> 2];
10009     $22 = HEAP32[$2 + 12 >> 2];
10010     $19 = HEAP32[$2 + 16 >> 2];
10011     $20 = HEAP32[$2 + 20 >> 2];
10012     $18 = HEAP32[$2 + 24 >> 2];
10013     $15 = HEAP32[$2 + 28 >> 2];
10014     $17 = HEAP32[$2 + 32 >> 2];
10015     $2 = 0;
10016     while (1) {
10017      $10 = $9;
10018      $14 = Math_imul($9, $15) + Math_imul($14, $17) | 0;
10019      $9 = $13;
10020      $14 = $14 + Math_imul($18, $9) | 0;
10021      $13 = $7;
10022      $14 = Math_imul($7, $20) + $14 | 0;
10023      $7 = $16;
10024      $14 = $14 + Math_imul($19, $7) | 0;
10025      $16 = $11;
10026      $14 = Math_imul($11, $22) + $14 | 0;
10027      $11 = $8;
10028      $12 = Math_imul($8, $21) + $14 | 0;
10029      $8 = $3;
10030      $14 = $2 << 2;
10031      $12 = Math_imul($3, $24) + $12 | 0;
10032      $3 = $6;
10033      $6 = HEAP32[$14 + $0 >> 2] + ($12 + Math_imul($23, $3) >> $4) | 0;
10034      HEAP32[$5 + $14 >> 2] = $6;
10035      $14 = $10;
10036      $2 = $2 + 1 | 0;
10037      if (($2 | 0) != ($1 | 0)) {
10038       continue
10039      }
10040      break;
10041     };
10042     break label$1;
10043    }
10044    if (($1 | 0) < 1) {
10045     break label$1
10046    }
10047    $6 = HEAP32[$5 + -4 >> 2];
10048    $3 = HEAP32[$5 + -8 >> 2];
10049    $8 = HEAP32[$5 + -12 >> 2];
10050    $11 = HEAP32[$5 + -16 >> 2];
10051    $16 = HEAP32[$5 + -20 >> 2];
10052    $7 = HEAP32[$5 + -24 >> 2];
10053    $13 = HEAP32[$5 + -28 >> 2];
10054    $9 = HEAP32[$5 + -32 >> 2];
10055    $14 = HEAP32[$5 + -36 >> 2];
10056    $10 = HEAP32[$5 + -40 >> 2];
10057    $25 = HEAP32[$2 >> 2];
10058    $26 = HEAP32[$2 + 4 >> 2];
10059    $23 = HEAP32[$2 + 8 >> 2];
10060    $24 = HEAP32[$2 + 12 >> 2];
10061    $21 = HEAP32[$2 + 16 >> 2];
10062    $22 = HEAP32[$2 + 20 >> 2];
10063    $19 = HEAP32[$2 + 24 >> 2];
10064    $20 = HEAP32[$2 + 28 >> 2];
10065    $18 = HEAP32[$2 + 32 >> 2];
10066    $15 = HEAP32[$2 + 36 >> 2];
10067    $2 = 0;
10068    while (1) {
10069     $12 = $14;
10070     $10 = Math_imul($18, $12) + Math_imul($10, $15) | 0;
10071     $14 = $9;
10072     $10 = Math_imul($9, $20) + $10 | 0;
10073     $9 = $13;
10074     $10 = $10 + Math_imul($19, $9) | 0;
10075     $13 = $7;
10076     $10 = Math_imul($7, $22) + $10 | 0;
10077     $7 = $16;
10078     $10 = $10 + Math_imul($21, $7) | 0;
10079     $16 = $11;
10080     $10 = Math_imul($11, $24) + $10 | 0;
10081     $11 = $8;
10082     $17 = Math_imul($8, $23) + $10 | 0;
10083     $8 = $3;
10084     $10 = $2 << 2;
10085     $17 = Math_imul($3, $26) + $17 | 0;
10086     $3 = $6;
10087     $6 = HEAP32[$10 + $0 >> 2] + ($17 + Math_imul($25, $3) >> $4) | 0;
10088     HEAP32[$5 + $10 >> 2] = $6;
10089     $10 = $12;
10090     $2 = $2 + 1 | 0;
10091     if (($2 | 0) != ($1 | 0)) {
10092      continue
10093     }
10094     break;
10095    };
10096    break label$1;
10097   }
10098   if ($3 >>> 0 >= 5) {
10099    if ($3 >>> 0 >= 7) {
10100     if (($3 | 0) != 8) {
10101      if (($1 | 0) < 1) {
10102       break label$1
10103      }
10104      $6 = HEAP32[$5 + -4 >> 2];
10105      $3 = HEAP32[$5 + -8 >> 2];
10106      $8 = HEAP32[$5 + -12 >> 2];
10107      $11 = HEAP32[$5 + -16 >> 2];
10108      $16 = HEAP32[$5 + -20 >> 2];
10109      $7 = HEAP32[$5 + -24 >> 2];
10110      $13 = HEAP32[$5 + -28 >> 2];
10111      $19 = HEAP32[$2 >> 2];
10112      $20 = HEAP32[$2 + 4 >> 2];
10113      $18 = HEAP32[$2 + 8 >> 2];
10114      $15 = HEAP32[$2 + 12 >> 2];
10115      $17 = HEAP32[$2 + 16 >> 2];
10116      $12 = HEAP32[$2 + 20 >> 2];
10117      $10 = HEAP32[$2 + 24 >> 2];
10118      $2 = 0;
10119      while (1) {
10120       $9 = $7;
10121       $13 = Math_imul($7, $12) + Math_imul($10, $13) | 0;
10122       $7 = $16;
10123       $13 = $13 + Math_imul($17, $7) | 0;
10124       $16 = $11;
10125       $13 = Math_imul($11, $15) + $13 | 0;
10126       $11 = $8;
10127       $14 = Math_imul($8, $18) + $13 | 0;
10128       $8 = $3;
10129       $13 = $2 << 2;
10130       $14 = Math_imul($3, $20) + $14 | 0;
10131       $3 = $6;
10132       $6 = HEAP32[$13 + $0 >> 2] + ($14 + Math_imul($19, $3) >> $4) | 0;
10133       HEAP32[$5 + $13 >> 2] = $6;
10134       $13 = $9;
10135       $2 = $2 + 1 | 0;
10136       if (($2 | 0) != ($1 | 0)) {
10137        continue
10138       }
10139       break;
10140      };
10141      break label$1;
10142     }
10143     if (($1 | 0) < 1) {
10144      break label$1
10145     }
10146     $6 = HEAP32[$5 + -4 >> 2];
10147     $3 = HEAP32[$5 + -8 >> 2];
10148     $8 = HEAP32[$5 + -12 >> 2];
10149     $11 = HEAP32[$5 + -16 >> 2];
10150     $16 = HEAP32[$5 + -20 >> 2];
10151     $7 = HEAP32[$5 + -24 >> 2];
10152     $13 = HEAP32[$5 + -28 >> 2];
10153     $9 = HEAP32[$5 + -32 >> 2];
10154     $21 = HEAP32[$2 >> 2];
10155     $22 = HEAP32[$2 + 4 >> 2];
10156     $19 = HEAP32[$2 + 8 >> 2];
10157     $20 = HEAP32[$2 + 12 >> 2];
10158     $18 = HEAP32[$2 + 16 >> 2];
10159     $15 = HEAP32[$2 + 20 >> 2];
10160     $17 = HEAP32[$2 + 24 >> 2];
10161     $12 = HEAP32[$2 + 28 >> 2];
10162     $2 = 0;
10163     while (1) {
10164      $14 = $13;
10165      $9 = Math_imul($17, $13) + Math_imul($9, $12) | 0;
10166      $13 = $7;
10167      $9 = Math_imul($7, $15) + $9 | 0;
10168      $7 = $16;
10169      $9 = $9 + Math_imul($18, $7) | 0;
10170      $16 = $11;
10171      $9 = Math_imul($11, $20) + $9 | 0;
10172      $11 = $8;
10173      $10 = Math_imul($8, $19) + $9 | 0;
10174      $8 = $3;
10175      $9 = $2 << 2;
10176      $10 = Math_imul($3, $22) + $10 | 0;
10177      $3 = $6;
10178      $6 = HEAP32[$9 + $0 >> 2] + ($10 + Math_imul($21, $3) >> $4) | 0;
10179      HEAP32[$5 + $9 >> 2] = $6;
10180      $9 = $14;
10181      $2 = $2 + 1 | 0;
10182      if (($2 | 0) != ($1 | 0)) {
10183       continue
10184      }
10185      break;
10186     };
10187     break label$1;
10188    }
10189    if (($3 | 0) != 6) {
10190     if (($1 | 0) < 1) {
10191      break label$1
10192     }
10193     $6 = HEAP32[$5 + -4 >> 2];
10194     $3 = HEAP32[$5 + -8 >> 2];
10195     $8 = HEAP32[$5 + -12 >> 2];
10196     $11 = HEAP32[$5 + -16 >> 2];
10197     $16 = HEAP32[$5 + -20 >> 2];
10198     $17 = HEAP32[$2 >> 2];
10199     $12 = HEAP32[$2 + 4 >> 2];
10200     $10 = HEAP32[$2 + 8 >> 2];
10201     $14 = HEAP32[$2 + 12 >> 2];
10202     $9 = HEAP32[$2 + 16 >> 2];
10203     $2 = 0;
10204     while (1) {
10205      $7 = $11;
10206      $16 = Math_imul($14, $7) + Math_imul($9, $16) | 0;
10207      $11 = $8;
10208      $13 = Math_imul($8, $10) + $16 | 0;
10209      $8 = $3;
10210      $16 = $2 << 2;
10211      $13 = Math_imul($3, $12) + $13 | 0;
10212      $3 = $6;
10213      $6 = HEAP32[$16 + $0 >> 2] + ($13 + Math_imul($17, $3) >> $4) | 0;
10214      HEAP32[$5 + $16 >> 2] = $6;
10215      $16 = $7;
10216      $2 = $2 + 1 | 0;
10217      if (($2 | 0) != ($1 | 0)) {
10218       continue
10219      }
10220      break;
10221     };
10222     break label$1;
10223    }
10224    if (($1 | 0) < 1) {
10225     break label$1
10226    }
10227    $6 = HEAP32[$5 + -4 >> 2];
10228    $3 = HEAP32[$5 + -8 >> 2];
10229    $8 = HEAP32[$5 + -12 >> 2];
10230    $11 = HEAP32[$5 + -16 >> 2];
10231    $16 = HEAP32[$5 + -20 >> 2];
10232    $7 = HEAP32[$5 + -24 >> 2];
10233    $18 = HEAP32[$2 >> 2];
10234    $15 = HEAP32[$2 + 4 >> 2];
10235    $17 = HEAP32[$2 + 8 >> 2];
10236    $12 = HEAP32[$2 + 12 >> 2];
10237    $10 = HEAP32[$2 + 16 >> 2];
10238    $14 = HEAP32[$2 + 20 >> 2];
10239    $2 = 0;
10240    while (1) {
10241     $13 = $16;
10242     $7 = Math_imul($10, $13) + Math_imul($7, $14) | 0;
10243     $16 = $11;
10244     $7 = Math_imul($11, $12) + $7 | 0;
10245     $11 = $8;
10246     $9 = Math_imul($8, $17) + $7 | 0;
10247     $8 = $3;
10248     $7 = $2 << 2;
10249     $9 = Math_imul($3, $15) + $9 | 0;
10250     $3 = $6;
10251     $6 = HEAP32[$7 + $0 >> 2] + ($9 + Math_imul($18, $3) >> $4) | 0;
10252     HEAP32[$5 + $7 >> 2] = $6;
10253     $7 = $13;
10254     $2 = $2 + 1 | 0;
10255     if (($2 | 0) != ($1 | 0)) {
10256      continue
10257     }
10258     break;
10259    };
10260    break label$1;
10261   }
10262   if ($3 >>> 0 >= 3) {
10263    if (($3 | 0) != 4) {
10264     if (($1 | 0) < 1) {
10265      break label$1
10266     }
10267     $6 = HEAP32[$5 + -4 >> 2];
10268     $3 = HEAP32[$5 + -8 >> 2];
10269     $8 = HEAP32[$5 + -12 >> 2];
10270     $9 = HEAP32[$2 >> 2];
10271     $13 = HEAP32[$2 + 4 >> 2];
10272     $7 = HEAP32[$2 + 8 >> 2];
10273     $2 = 0;
10274     while (1) {
10275      $11 = $3;
10276      $16 = $2 << 2;
10277      $8 = Math_imul($3, $13) + Math_imul($8, $7) | 0;
10278      $3 = $6;
10279      $6 = HEAP32[$16 + $0 >> 2] + ($8 + Math_imul($9, $3) >> $4) | 0;
10280      HEAP32[$5 + $16 >> 2] = $6;
10281      $8 = $11;
10282      $2 = $2 + 1 | 0;
10283      if (($2 | 0) != ($1 | 0)) {
10284       continue
10285      }
10286      break;
10287     };
10288     break label$1;
10289    }
10290    if (($1 | 0) < 1) {
10291     break label$1
10292    }
10293    $6 = HEAP32[$5 + -4 >> 2];
10294    $3 = HEAP32[$5 + -8 >> 2];
10295    $8 = HEAP32[$5 + -12 >> 2];
10296    $11 = HEAP32[$5 + -16 >> 2];
10297    $10 = HEAP32[$2 >> 2];
10298    $14 = HEAP32[$2 + 4 >> 2];
10299    $9 = HEAP32[$2 + 8 >> 2];
10300    $13 = HEAP32[$2 + 12 >> 2];
10301    $2 = 0;
10302    while (1) {
10303     $16 = $8;
10304     $7 = Math_imul($8, $9) + Math_imul($11, $13) | 0;
10305     $8 = $3;
10306     $11 = $2 << 2;
10307     $7 = Math_imul($3, $14) + $7 | 0;
10308     $3 = $6;
10309     $6 = HEAP32[$11 + $0 >> 2] + ($7 + Math_imul($10, $3) >> $4) | 0;
10310     HEAP32[$5 + $11 >> 2] = $6;
10311     $11 = $16;
10312     $2 = $2 + 1 | 0;
10313     if (($2 | 0) != ($1 | 0)) {
10314      continue
10315     }
10316     break;
10317    };
10318    break label$1;
10319   }
10320   if (($3 | 0) != 2) {
10321    if (($1 | 0) < 1) {
10322     break label$1
10323    }
10324    $6 = HEAP32[$5 + -4 >> 2];
10325    $8 = HEAP32[$2 >> 2];
10326    $2 = 0;
10327    while (1) {
10328     $3 = $2 << 2;
10329     $6 = HEAP32[$3 + $0 >> 2] + (Math_imul($6, $8) >> $4) | 0;
10330     HEAP32[$3 + $5 >> 2] = $6;
10331     $2 = $2 + 1 | 0;
10332     if (($2 | 0) != ($1 | 0)) {
10333      continue
10334     }
10335     break;
10336    };
10337    break label$1;
10338   }
10339   if (($1 | 0) < 1) {
10340    break label$1
10341   }
10342   $6 = HEAP32[$5 + -4 >> 2];
10343   $3 = HEAP32[$5 + -8 >> 2];
10344   $7 = HEAP32[$2 >> 2];
10345   $16 = HEAP32[$2 + 4 >> 2];
10346   $2 = 0;
10347   while (1) {
10348    $8 = $6;
10349    $11 = $2 << 2;
10350    $6 = HEAP32[$11 + $0 >> 2] + (Math_imul($6, $7) + Math_imul($3, $16) >> $4) | 0;
10351    HEAP32[$5 + $11 >> 2] = $6;
10352    $3 = $8;
10353    $2 = $2 + 1 | 0;
10354    if (($2 | 0) != ($1 | 0)) {
10355     continue
10356    }
10357    break;
10358   };
10359  }
10360 }
10361
10362 function FLAC__lpc_restore_signal_wide($0, $1, $2, $3, $4, $5) {
10363  $0 = $0 | 0;
10364  $1 = $1 | 0;
10365  $2 = $2 | 0;
10366  $3 = $3 | 0;
10367  $4 = $4 | 0;
10368  $5 = $5 | 0;
10369  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;
10370  label$1 : {
10371   if ($3 >>> 0 >= 13) {
10372    if (($1 | 0) < 1) {
10373     break label$1
10374    }
10375    $13 = $4;
10376    $12 = $3 + -13 | 0;
10377    while (1) {
10378     $4 = 0;
10379     $3 = 0;
10380     label$4 : {
10381      switch ($12 | 0) {
10382      case 19:
10383       $3 = HEAP32[(($9 << 2) + $5 | 0) + -128 >> 2];
10384       $4 = $3;
10385       $7 = $3 >> 31;
10386       $3 = HEAP32[$2 + 124 >> 2];
10387       $4 = __wasm_i64_mul($4, $7, $3, $3 >> 31);
10388       $3 = i64toi32_i32$HIGH_BITS;
10389      case 18:
10390       $7 = HEAP32[(($9 << 2) + $5 | 0) + -124 >> 2];
10391       $6 = $7;
10392       $8 = $7 >> 31;
10393       $7 = HEAP32[$2 + 120 >> 2];
10394       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10395       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10396       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10397       $4 = $7;
10398       $3 = $6;
10399      case 17:
10400       $7 = HEAP32[(($9 << 2) + $5 | 0) + -120 >> 2];
10401       $6 = $7;
10402       $8 = $7 >> 31;
10403       $7 = HEAP32[$2 + 116 >> 2];
10404       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10405       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10406       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10407       $4 = $7;
10408       $3 = $6;
10409      case 16:
10410       $7 = HEAP32[(($9 << 2) + $5 | 0) + -116 >> 2];
10411       $6 = $7;
10412       $8 = $7 >> 31;
10413       $7 = HEAP32[$2 + 112 >> 2];
10414       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10415       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10416       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10417       $4 = $7;
10418       $3 = $6;
10419      case 15:
10420       $7 = HEAP32[(($9 << 2) + $5 | 0) + -112 >> 2];
10421       $6 = $7;
10422       $8 = $7 >> 31;
10423       $7 = HEAP32[$2 + 108 >> 2];
10424       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10425       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10426       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10427       $4 = $7;
10428       $3 = $6;
10429      case 14:
10430       $7 = HEAP32[(($9 << 2) + $5 | 0) + -108 >> 2];
10431       $6 = $7;
10432       $8 = $7 >> 31;
10433       $7 = HEAP32[$2 + 104 >> 2];
10434       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10435       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10436       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10437       $4 = $7;
10438       $3 = $6;
10439      case 13:
10440       $7 = HEAP32[(($9 << 2) + $5 | 0) + -104 >> 2];
10441       $6 = $7;
10442       $8 = $7 >> 31;
10443       $7 = HEAP32[$2 + 100 >> 2];
10444       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10445       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10446       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10447       $4 = $7;
10448       $3 = $6;
10449      case 12:
10450       $7 = HEAP32[(($9 << 2) + $5 | 0) + -100 >> 2];
10451       $6 = $7;
10452       $8 = $7 >> 31;
10453       $7 = HEAP32[$2 + 96 >> 2];
10454       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10455       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10456       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10457       $4 = $7;
10458       $3 = $6;
10459      case 11:
10460       $7 = HEAP32[(($9 << 2) + $5 | 0) + -96 >> 2];
10461       $6 = $7;
10462       $8 = $7 >> 31;
10463       $7 = HEAP32[$2 + 92 >> 2];
10464       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10465       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10466       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10467       $4 = $7;
10468       $3 = $6;
10469      case 10:
10470       $7 = HEAP32[(($9 << 2) + $5 | 0) + -92 >> 2];
10471       $6 = $7;
10472       $8 = $7 >> 31;
10473       $7 = HEAP32[$2 + 88 >> 2];
10474       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10475       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10476       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10477       $4 = $7;
10478       $3 = $6;
10479      case 9:
10480       $7 = HEAP32[(($9 << 2) + $5 | 0) + -88 >> 2];
10481       $6 = $7;
10482       $8 = $7 >> 31;
10483       $7 = HEAP32[$2 + 84 >> 2];
10484       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10485       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10486       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10487       $4 = $7;
10488       $3 = $6;
10489      case 8:
10490       $7 = HEAP32[(($9 << 2) + $5 | 0) + -84 >> 2];
10491       $6 = $7;
10492       $8 = $7 >> 31;
10493       $7 = HEAP32[$2 + 80 >> 2];
10494       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10495       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10496       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10497       $4 = $7;
10498       $3 = $6;
10499      case 7:
10500       $7 = HEAP32[(($9 << 2) + $5 | 0) + -80 >> 2];
10501       $6 = $7;
10502       $8 = $7 >> 31;
10503       $7 = HEAP32[$2 + 76 >> 2];
10504       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10505       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10506       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10507       $4 = $7;
10508       $3 = $6;
10509      case 6:
10510       $7 = HEAP32[(($9 << 2) + $5 | 0) + -76 >> 2];
10511       $6 = $7;
10512       $8 = $7 >> 31;
10513       $7 = HEAP32[$2 + 72 >> 2];
10514       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10515       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10516       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10517       $4 = $7;
10518       $3 = $6;
10519      case 5:
10520       $7 = HEAP32[(($9 << 2) + $5 | 0) + -72 >> 2];
10521       $6 = $7;
10522       $8 = $7 >> 31;
10523       $7 = HEAP32[$2 + 68 >> 2];
10524       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10525       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10526       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10527       $4 = $7;
10528       $3 = $6;
10529      case 4:
10530       $7 = HEAP32[(($9 << 2) + $5 | 0) + -68 >> 2];
10531       $6 = $7;
10532       $8 = $7 >> 31;
10533       $7 = HEAP32[$2 + 64 >> 2];
10534       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10535       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10536       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10537       $4 = $7;
10538       $3 = $6;
10539      case 3:
10540       $7 = HEAP32[(($9 << 2) + $5 | 0) + -64 >> 2];
10541       $6 = $7;
10542       $8 = $7 >> 31;
10543       $7 = HEAP32[$2 + 60 >> 2];
10544       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10545       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10546       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10547       $4 = $7;
10548       $3 = $6;
10549      case 2:
10550       $7 = HEAP32[(($9 << 2) + $5 | 0) + -60 >> 2];
10551       $6 = $7;
10552       $8 = $7 >> 31;
10553       $7 = HEAP32[$2 + 56 >> 2];
10554       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10555       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10556       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10557       $4 = $7;
10558       $3 = $6;
10559      case 1:
10560       $7 = HEAP32[(($9 << 2) + $5 | 0) + -56 >> 2];
10561       $6 = $7;
10562       $8 = $7 >> 31;
10563       $7 = HEAP32[$2 + 52 >> 2];
10564       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;
10565       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10566       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10567       $4 = $7;
10568       $3 = $6;
10569      case 0:
10570       $7 = ($9 << 2) + $5 | 0;
10571       $8 = HEAP32[$7 + -52 >> 2];
10572       $6 = $8;
10573       $10 = $8 >> 31;
10574       $8 = HEAP32[$2 + 48 >> 2];
10575       $8 = __wasm_i64_mul($6, $10, $8, $8 >> 31) + $4 | 0;
10576       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;
10577       $6 = $8 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10578       $3 = HEAP32[$7 + -48 >> 2];
10579       $4 = $3;
10580       $10 = $3 >> 31;
10581       $3 = HEAP32[$2 + 44 >> 2];
10582       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10583       $3 = $4 + $8 | 0;
10584       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10585       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10586       $8 = $3;
10587       $3 = HEAP32[$7 + -44 >> 2];
10588       $4 = $3;
10589       $10 = $3 >> 31;
10590       $3 = HEAP32[$2 + 40 >> 2];
10591       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10592       $3 = $8 + $4 | 0;
10593       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10594       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10595       $8 = $3;
10596       $3 = HEAP32[$7 + -40 >> 2];
10597       $4 = $3;
10598       $10 = $3 >> 31;
10599       $3 = HEAP32[$2 + 36 >> 2];
10600       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10601       $3 = $8 + $4 | 0;
10602       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10603       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10604       $8 = $3;
10605       $3 = HEAP32[$7 + -36 >> 2];
10606       $4 = $3;
10607       $10 = $3 >> 31;
10608       $3 = HEAP32[$2 + 32 >> 2];
10609       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10610       $3 = $8 + $4 | 0;
10611       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10612       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10613       $8 = $3;
10614       $3 = HEAP32[$7 + -32 >> 2];
10615       $4 = $3;
10616       $10 = $3 >> 31;
10617       $3 = HEAP32[$2 + 28 >> 2];
10618       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10619       $3 = $8 + $4 | 0;
10620       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10621       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10622       $8 = $3;
10623       $3 = HEAP32[$7 + -28 >> 2];
10624       $4 = $3;
10625       $10 = $3 >> 31;
10626       $3 = HEAP32[$2 + 24 >> 2];
10627       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10628       $3 = $8 + $4 | 0;
10629       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10630       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10631       $8 = $3;
10632       $3 = HEAP32[$7 + -24 >> 2];
10633       $4 = $3;
10634       $10 = $3 >> 31;
10635       $3 = HEAP32[$2 + 20 >> 2];
10636       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10637       $3 = $8 + $4 | 0;
10638       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10639       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10640       $8 = $3;
10641       $3 = HEAP32[$7 + -20 >> 2];
10642       $4 = $3;
10643       $10 = $3 >> 31;
10644       $3 = HEAP32[$2 + 16 >> 2];
10645       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10646       $3 = $8 + $4 | 0;
10647       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10648       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10649       $8 = $3;
10650       $3 = HEAP32[$7 + -16 >> 2];
10651       $4 = $3;
10652       $10 = $3 >> 31;
10653       $3 = HEAP32[$2 + 12 >> 2];
10654       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10655       $3 = $8 + $4 | 0;
10656       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10657       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10658       $8 = $3;
10659       $3 = HEAP32[$7 + -12 >> 2];
10660       $4 = $3;
10661       $10 = $3 >> 31;
10662       $3 = HEAP32[$2 + 8 >> 2];
10663       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10664       $3 = $8 + $4 | 0;
10665       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10666       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10667       $8 = $3;
10668       $3 = HEAP32[$7 + -8 >> 2];
10669       $4 = $3;
10670       $10 = $3 >> 31;
10671       $3 = HEAP32[$2 + 4 >> 2];
10672       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);
10673       $3 = $8 + $4 | 0;
10674       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10675       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10676       $8 = $3;
10677       $3 = HEAP32[$7 + -4 >> 2];
10678       $4 = $3;
10679       $7 = $3 >> 31;
10680       $3 = HEAP32[$2 >> 2];
10681       $4 = __wasm_i64_mul($4, $7, $3, $3 >> 31);
10682       $3 = $8 + $4 | 0;
10683       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10684       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;
10685       $4 = $3;
10686       $3 = $6;
10687       break;
10688      default:
10689       break label$4;
10690      };
10691     }
10692     $7 = $9 << 2;
10693     $10 = $7 + $5 | 0;
10694     $6 = HEAP32[$0 + $7 >> 2];
10695     $8 = $4;
10696     $4 = $13;
10697     $7 = $4 & 31;
10698     HEAP32[$10 >> 2] = $6 + (32 <= ($4 & 63) >>> 0 ? $3 >> $7 : ((1 << $7) - 1 & $3) << 32 - $7 | $8 >>> $7);
10699     $9 = $9 + 1 | 0;
10700     if (($9 | 0) != ($1 | 0)) {
10701      continue
10702     }
10703     break;
10704    };
10705    break label$1;
10706   }
10707   if ($3 >>> 0 >= 9) {
10708    if ($3 >>> 0 >= 11) {
10709     if (($3 | 0) != 12) {
10710      if (($1 | 0) < 1) {
10711       break label$1
10712      }
10713      $9 = HEAP32[$5 + -4 >> 2];
10714      $3 = HEAP32[$5 + -8 >> 2];
10715      $13 = HEAP32[$5 + -12 >> 2];
10716      $7 = HEAP32[$5 + -16 >> 2];
10717      $8 = HEAP32[$5 + -20 >> 2];
10718      $12 = HEAP32[$5 + -24 >> 2];
10719      $10 = HEAP32[$5 + -28 >> 2];
10720      $11 = HEAP32[$5 + -32 >> 2];
10721      $14 = HEAP32[$5 + -36 >> 2];
10722      $16 = HEAP32[$5 + -40 >> 2];
10723      $15 = HEAP32[$5 + -44 >> 2];
10724      $6 = HEAP32[$2 >> 2];
10725      $17 = $6;
10726      $25 = $6 >> 31;
10727      $6 = HEAP32[$2 + 4 >> 2];
10728      $26 = $6;
10729      $27 = $6 >> 31;
10730      $6 = HEAP32[$2 + 8 >> 2];
10731      $24 = $6;
10732      $29 = $6 >> 31;
10733      $6 = HEAP32[$2 + 12 >> 2];
10734      $30 = $6;
10735      $22 = $6 >> 31;
10736      $6 = HEAP32[$2 + 16 >> 2];
10737      $31 = $6;
10738      $32 = $6 >> 31;
10739      $6 = HEAP32[$2 + 20 >> 2];
10740      $28 = $6;
10741      $34 = $6 >> 31;
10742      $6 = HEAP32[$2 + 24 >> 2];
10743      $35 = $6;
10744      $21 = $6 >> 31;
10745      $6 = HEAP32[$2 + 28 >> 2];
10746      $36 = $6;
10747      $37 = $6 >> 31;
10748      $6 = HEAP32[$2 + 32 >> 2];
10749      $33 = $6;
10750      $39 = $6 >> 31;
10751      $6 = HEAP32[$2 + 36 >> 2];
10752      $40 = $6;
10753      $20 = $6 >> 31;
10754      $2 = HEAP32[$2 + 40 >> 2];
10755      $41 = $2;
10756      $42 = $2 >> 31;
10757      $2 = 0;
10758      while (1) {
10759       $6 = $2 << 2;
10760       $38 = $6 + $5 | 0;
10761       $43 = HEAP32[$0 + $6 >> 2];
10762       $18 = $16;
10763       $6 = __wasm_i64_mul($16, $16 >> 31, $40, $20);
10764       $44 = i64toi32_i32$HIGH_BITS;
10765       $16 = $14;
10766       $19 = __wasm_i64_mul($15, $15 >> 31, $41, $42);
10767       $15 = $19 + $6 | 0;
10768       $6 = i64toi32_i32$HIGH_BITS + $44 | 0;
10769       $6 = $15 >>> 0 < $19 >>> 0 ? $6 + 1 | 0 : $6;
10770       $19 = $15;
10771       $15 = __wasm_i64_mul($14, $14 >> 31, $33, $39);
10772       $14 = $19 + $15 | 0;
10773       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10774       $6 = $14 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;
10775       $15 = $14;
10776       $14 = $11;
10777       $19 = $15;
10778       $15 = __wasm_i64_mul($11, $11 >> 31, $36, $37);
10779       $11 = $19 + $15 | 0;
10780       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10781       $6 = $11 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;
10782       $15 = $11;
10783       $11 = $10;
10784       $10 = $15;
10785       $15 = __wasm_i64_mul($11, $11 >> 31, $35, $21);
10786       $10 = $10 + $15 | 0;
10787       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10788       $6 = $10 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;
10789       $15 = $10;
10790       $10 = $12;
10791       $19 = $15;
10792       $15 = __wasm_i64_mul($12, $12 >> 31, $28, $34);
10793       $12 = $19 + $15 | 0;
10794       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10795       $6 = $12 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;
10796       $15 = $12;
10797       $12 = $8;
10798       $19 = $15;
10799       $15 = __wasm_i64_mul($8, $8 >> 31, $31, $32);
10800       $8 = $19 + $15 | 0;
10801       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10802       $6 = $8 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;
10803       $15 = $8;
10804       $8 = $7;
10805       $19 = $15;
10806       $15 = __wasm_i64_mul($7, $7 >> 31, $30, $22);
10807       $7 = $19 + $15 | 0;
10808       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10809       $6 = $7 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;
10810       $19 = $7;
10811       $7 = $13;
10812       $15 = __wasm_i64_mul($7, $7 >> 31, $24, $29);
10813       $13 = $19 + $15 | 0;
10814       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10815       $6 = $13 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;
10816       $15 = $13;
10817       $13 = $3;
10818       $23 = $38;
10819       $19 = $15;
10820       $15 = __wasm_i64_mul($3, $3 >> 31, $26, $27);
10821       $3 = $19 + $15 | 0;
10822       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10823       $6 = $3 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;
10824       $19 = $3;
10825       $3 = $9;
10826       $15 = __wasm_i64_mul($3, $3 >> 31, $17, $25);
10827       $9 = $19 + $15 | 0;
10828       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10829       $6 = $9 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;
10830       $38 = $9;
10831       $9 = $4;
10832       $15 = $9 & 31;
10833       $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $15 : ((1 << $15) - 1 & $6) << 32 - $15 | $38 >>> $15) + $43 | 0;
10834       HEAP32[$23 >> 2] = $9;
10835       $15 = $18;
10836       $2 = $2 + 1 | 0;
10837       if (($2 | 0) != ($1 | 0)) {
10838        continue
10839       }
10840       break;
10841      };
10842      break label$1;
10843     }
10844     if (($1 | 0) < 1) {
10845      break label$1
10846     }
10847     $9 = HEAP32[$5 + -4 >> 2];
10848     $3 = HEAP32[$5 + -8 >> 2];
10849     $13 = HEAP32[$5 + -12 >> 2];
10850     $7 = HEAP32[$5 + -16 >> 2];
10851     $8 = HEAP32[$5 + -20 >> 2];
10852     $12 = HEAP32[$5 + -24 >> 2];
10853     $10 = HEAP32[$5 + -28 >> 2];
10854     $11 = HEAP32[$5 + -32 >> 2];
10855     $14 = HEAP32[$5 + -36 >> 2];
10856     $16 = HEAP32[$5 + -40 >> 2];
10857     $15 = HEAP32[$5 + -44 >> 2];
10858     $6 = HEAP32[$5 + -48 >> 2];
10859     $18 = HEAP32[$2 >> 2];
10860     $25 = $18;
10861     $26 = $18 >> 31;
10862     $18 = HEAP32[$2 + 4 >> 2];
10863     $27 = $18;
10864     $24 = $18 >> 31;
10865     $18 = HEAP32[$2 + 8 >> 2];
10866     $29 = $18;
10867     $30 = $18 >> 31;
10868     $18 = HEAP32[$2 + 12 >> 2];
10869     $22 = $18;
10870     $31 = $18 >> 31;
10871     $18 = HEAP32[$2 + 16 >> 2];
10872     $32 = $18;
10873     $28 = $18 >> 31;
10874     $18 = HEAP32[$2 + 20 >> 2];
10875     $34 = $18;
10876     $35 = $18 >> 31;
10877     $18 = HEAP32[$2 + 24 >> 2];
10878     $21 = $18;
10879     $36 = $18 >> 31;
10880     $18 = HEAP32[$2 + 28 >> 2];
10881     $37 = $18;
10882     $33 = $18 >> 31;
10883     $18 = HEAP32[$2 + 32 >> 2];
10884     $39 = $18;
10885     $40 = $18 >> 31;
10886     $18 = HEAP32[$2 + 36 >> 2];
10887     $20 = $18;
10888     $41 = $18 >> 31;
10889     $18 = HEAP32[$2 + 40 >> 2];
10890     $42 = $18;
10891     $38 = $18 >> 31;
10892     $2 = HEAP32[$2 + 44 >> 2];
10893     $43 = $2;
10894     $44 = $2 >> 31;
10895     $2 = 0;
10896     while (1) {
10897      $18 = $2 << 2;
10898      $19 = $18 + $5 | 0;
10899      $46 = HEAP32[$0 + $18 >> 2];
10900      $18 = $15;
10901      $17 = __wasm_i64_mul($15, $15 >> 31, $42, $38);
10902      $23 = i64toi32_i32$HIGH_BITS;
10903      $15 = $16;
10904      $45 = __wasm_i64_mul($6, $6 >> 31, $43, $44);
10905      $17 = $45 + $17 | 0;
10906      $6 = i64toi32_i32$HIGH_BITS + $23 | 0;
10907      $6 = $17 >>> 0 < $45 >>> 0 ? $6 + 1 | 0 : $6;
10908      $23 = $17;
10909      $17 = __wasm_i64_mul($16, $16 >> 31, $20, $41);
10910      $16 = $23 + $17 | 0;
10911      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10912      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
10913      $17 = $16;
10914      $16 = $14;
10915      $23 = $17;
10916      $17 = __wasm_i64_mul($14, $14 >> 31, $39, $40);
10917      $14 = $23 + $17 | 0;
10918      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10919      $6 = $14 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
10920      $17 = $14;
10921      $14 = $11;
10922      $23 = $17;
10923      $17 = __wasm_i64_mul($11, $11 >> 31, $37, $33);
10924      $11 = $23 + $17 | 0;
10925      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10926      $6 = $11 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
10927      $17 = $11;
10928      $11 = $10;
10929      $10 = $17;
10930      $17 = __wasm_i64_mul($11, $11 >> 31, $21, $36);
10931      $10 = $10 + $17 | 0;
10932      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10933      $6 = $10 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
10934      $17 = $10;
10935      $10 = $12;
10936      $23 = $17;
10937      $17 = __wasm_i64_mul($12, $12 >> 31, $34, $35);
10938      $12 = $23 + $17 | 0;
10939      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10940      $6 = $12 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
10941      $17 = $12;
10942      $12 = $8;
10943      $23 = $17;
10944      $17 = __wasm_i64_mul($8, $8 >> 31, $32, $28);
10945      $8 = $23 + $17 | 0;
10946      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10947      $6 = $8 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
10948      $17 = $8;
10949      $8 = $7;
10950      $23 = $17;
10951      $17 = __wasm_i64_mul($7, $7 >> 31, $22, $31);
10952      $7 = $23 + $17 | 0;
10953      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10954      $6 = $7 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
10955      $23 = $7;
10956      $7 = $13;
10957      $17 = __wasm_i64_mul($7, $7 >> 31, $29, $30);
10958      $13 = $23 + $17 | 0;
10959      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10960      $6 = $13 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
10961      $17 = $13;
10962      $13 = $3;
10963      $23 = $19;
10964      $19 = $17;
10965      $17 = __wasm_i64_mul($3, $3 >> 31, $27, $24);
10966      $3 = $19 + $17 | 0;
10967      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10968      $6 = $3 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
10969      $19 = $3;
10970      $3 = $9;
10971      $17 = __wasm_i64_mul($3, $3 >> 31, $25, $26);
10972      $9 = $19 + $17 | 0;
10973      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
10974      $6 = $9 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;
10975      $19 = $9;
10976      $9 = $4;
10977      $17 = $9 & 31;
10978      $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $17 : ((1 << $17) - 1 & $6) << 32 - $17 | $19 >>> $17) + $46 | 0;
10979      HEAP32[$23 >> 2] = $9;
10980      $6 = $18;
10981      $2 = $2 + 1 | 0;
10982      if (($2 | 0) != ($1 | 0)) {
10983       continue
10984      }
10985      break;
10986     };
10987     break label$1;
10988    }
10989    if (($3 | 0) != 10) {
10990     if (($1 | 0) < 1) {
10991      break label$1
10992     }
10993     $9 = HEAP32[$5 + -4 >> 2];
10994     $3 = HEAP32[$5 + -8 >> 2];
10995     $13 = HEAP32[$5 + -12 >> 2];
10996     $7 = HEAP32[$5 + -16 >> 2];
10997     $8 = HEAP32[$5 + -20 >> 2];
10998     $12 = HEAP32[$5 + -24 >> 2];
10999     $10 = HEAP32[$5 + -28 >> 2];
11000     $11 = HEAP32[$5 + -32 >> 2];
11001     $14 = HEAP32[$5 + -36 >> 2];
11002     $6 = HEAP32[$2 >> 2];
11003     $15 = $6;
11004     $18 = $6 >> 31;
11005     $6 = HEAP32[$2 + 4 >> 2];
11006     $17 = $6;
11007     $25 = $6 >> 31;
11008     $6 = HEAP32[$2 + 8 >> 2];
11009     $26 = $6;
11010     $27 = $6 >> 31;
11011     $6 = HEAP32[$2 + 12 >> 2];
11012     $24 = $6;
11013     $29 = $6 >> 31;
11014     $6 = HEAP32[$2 + 16 >> 2];
11015     $30 = $6;
11016     $22 = $6 >> 31;
11017     $6 = HEAP32[$2 + 20 >> 2];
11018     $31 = $6;
11019     $32 = $6 >> 31;
11020     $6 = HEAP32[$2 + 24 >> 2];
11021     $28 = $6;
11022     $34 = $6 >> 31;
11023     $6 = HEAP32[$2 + 28 >> 2];
11024     $35 = $6;
11025     $21 = $6 >> 31;
11026     $2 = HEAP32[$2 + 32 >> 2];
11027     $36 = $2;
11028     $37 = $2 >> 31;
11029     $2 = 0;
11030     while (1) {
11031      $6 = $2 << 2;
11032      $33 = $6 + $5 | 0;
11033      $39 = HEAP32[$0 + $6 >> 2];
11034      $16 = $11;
11035      $6 = __wasm_i64_mul($11, $11 >> 31, $35, $21);
11036      $40 = i64toi32_i32$HIGH_BITS;
11037      $11 = $10;
11038      $20 = __wasm_i64_mul($14, $14 >> 31, $36, $37);
11039      $14 = $20 + $6 | 0;
11040      $6 = i64toi32_i32$HIGH_BITS + $40 | 0;
11041      $6 = $14 >>> 0 < $20 >>> 0 ? $6 + 1 | 0 : $6;
11042      $10 = $14;
11043      $14 = __wasm_i64_mul($11, $11 >> 31, $28, $34);
11044      $10 = $10 + $14 | 0;
11045      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11046      $6 = $10 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
11047      $14 = $10;
11048      $10 = $12;
11049      $20 = $14;
11050      $14 = __wasm_i64_mul($12, $12 >> 31, $31, $32);
11051      $12 = $20 + $14 | 0;
11052      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11053      $6 = $12 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
11054      $14 = $12;
11055      $12 = $8;
11056      $20 = $14;
11057      $14 = __wasm_i64_mul($8, $8 >> 31, $30, $22);
11058      $8 = $20 + $14 | 0;
11059      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11060      $6 = $8 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
11061      $14 = $8;
11062      $8 = $7;
11063      $20 = $14;
11064      $14 = __wasm_i64_mul($7, $7 >> 31, $24, $29);
11065      $7 = $20 + $14 | 0;
11066      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11067      $6 = $7 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
11068      $20 = $7;
11069      $7 = $13;
11070      $14 = __wasm_i64_mul($7, $7 >> 31, $26, $27);
11071      $13 = $20 + $14 | 0;
11072      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11073      $6 = $13 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
11074      $14 = $13;
11075      $13 = $3;
11076      $19 = $33;
11077      $20 = $14;
11078      $14 = __wasm_i64_mul($3, $3 >> 31, $17, $25);
11079      $3 = $20 + $14 | 0;
11080      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11081      $6 = $3 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
11082      $20 = $3;
11083      $3 = $9;
11084      $14 = __wasm_i64_mul($3, $3 >> 31, $15, $18);
11085      $9 = $20 + $14 | 0;
11086      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11087      $6 = $9 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;
11088      $33 = $9;
11089      $9 = $4;
11090      $14 = $9 & 31;
11091      $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $14 : ((1 << $14) - 1 & $6) << 32 - $14 | $33 >>> $14) + $39 | 0;
11092      HEAP32[$19 >> 2] = $9;
11093      $14 = $16;
11094      $2 = $2 + 1 | 0;
11095      if (($2 | 0) != ($1 | 0)) {
11096       continue
11097      }
11098      break;
11099     };
11100     break label$1;
11101    }
11102    if (($1 | 0) < 1) {
11103     break label$1
11104    }
11105    $9 = HEAP32[$5 + -4 >> 2];
11106    $3 = HEAP32[$5 + -8 >> 2];
11107    $13 = HEAP32[$5 + -12 >> 2];
11108    $7 = HEAP32[$5 + -16 >> 2];
11109    $8 = HEAP32[$5 + -20 >> 2];
11110    $12 = HEAP32[$5 + -24 >> 2];
11111    $10 = HEAP32[$5 + -28 >> 2];
11112    $11 = HEAP32[$5 + -32 >> 2];
11113    $14 = HEAP32[$5 + -36 >> 2];
11114    $16 = HEAP32[$5 + -40 >> 2];
11115    $6 = HEAP32[$2 >> 2];
11116    $18 = $6;
11117    $17 = $6 >> 31;
11118    $6 = HEAP32[$2 + 4 >> 2];
11119    $25 = $6;
11120    $26 = $6 >> 31;
11121    $6 = HEAP32[$2 + 8 >> 2];
11122    $27 = $6;
11123    $24 = $6 >> 31;
11124    $6 = HEAP32[$2 + 12 >> 2];
11125    $29 = $6;
11126    $30 = $6 >> 31;
11127    $6 = HEAP32[$2 + 16 >> 2];
11128    $22 = $6;
11129    $31 = $6 >> 31;
11130    $6 = HEAP32[$2 + 20 >> 2];
11131    $32 = $6;
11132    $28 = $6 >> 31;
11133    $6 = HEAP32[$2 + 24 >> 2];
11134    $34 = $6;
11135    $35 = $6 >> 31;
11136    $6 = HEAP32[$2 + 28 >> 2];
11137    $21 = $6;
11138    $36 = $6 >> 31;
11139    $6 = HEAP32[$2 + 32 >> 2];
11140    $37 = $6;
11141    $33 = $6 >> 31;
11142    $2 = HEAP32[$2 + 36 >> 2];
11143    $39 = $2;
11144    $40 = $2 >> 31;
11145    $2 = 0;
11146    while (1) {
11147     $6 = $2 << 2;
11148     $20 = $6 + $5 | 0;
11149     $41 = HEAP32[$0 + $6 >> 2];
11150     $15 = $14;
11151     $6 = __wasm_i64_mul($14, $14 >> 31, $37, $33);
11152     $42 = i64toi32_i32$HIGH_BITS;
11153     $14 = $11;
11154     $38 = __wasm_i64_mul($16, $16 >> 31, $39, $40);
11155     $16 = $38 + $6 | 0;
11156     $6 = i64toi32_i32$HIGH_BITS + $42 | 0;
11157     $6 = $16 >>> 0 < $38 >>> 0 ? $6 + 1 | 0 : $6;
11158     $19 = $16;
11159     $16 = __wasm_i64_mul($11, $11 >> 31, $21, $36);
11160     $11 = $19 + $16 | 0;
11161     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11162     $6 = $11 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
11163     $16 = $11;
11164     $11 = $10;
11165     $10 = $16;
11166     $16 = __wasm_i64_mul($11, $11 >> 31, $34, $35);
11167     $10 = $10 + $16 | 0;
11168     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11169     $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
11170     $16 = $10;
11171     $10 = $12;
11172     $19 = $16;
11173     $16 = __wasm_i64_mul($12, $12 >> 31, $32, $28);
11174     $12 = $19 + $16 | 0;
11175     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11176     $6 = $12 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
11177     $16 = $12;
11178     $12 = $8;
11179     $19 = $16;
11180     $16 = __wasm_i64_mul($8, $8 >> 31, $22, $31);
11181     $8 = $19 + $16 | 0;
11182     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11183     $6 = $8 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
11184     $16 = $8;
11185     $8 = $7;
11186     $19 = $16;
11187     $16 = __wasm_i64_mul($7, $7 >> 31, $29, $30);
11188     $7 = $19 + $16 | 0;
11189     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11190     $6 = $7 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
11191     $19 = $7;
11192     $7 = $13;
11193     $16 = __wasm_i64_mul($7, $7 >> 31, $27, $24);
11194     $13 = $19 + $16 | 0;
11195     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11196     $6 = $13 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
11197     $16 = $13;
11198     $13 = $3;
11199     $19 = $20;
11200     $20 = $16;
11201     $16 = __wasm_i64_mul($3, $3 >> 31, $25, $26);
11202     $3 = $20 + $16 | 0;
11203     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11204     $6 = $3 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
11205     $20 = $3;
11206     $3 = $9;
11207     $16 = __wasm_i64_mul($3, $3 >> 31, $18, $17);
11208     $9 = $20 + $16 | 0;
11209     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11210     $6 = $9 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;
11211     $20 = $9;
11212     $9 = $4;
11213     $16 = $9 & 31;
11214     $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $16 : ((1 << $16) - 1 & $6) << 32 - $16 | $20 >>> $16) + $41 | 0;
11215     HEAP32[$19 >> 2] = $9;
11216     $16 = $15;
11217     $2 = $2 + 1 | 0;
11218     if (($2 | 0) != ($1 | 0)) {
11219      continue
11220     }
11221     break;
11222    };
11223    break label$1;
11224   }
11225   if ($3 >>> 0 >= 5) {
11226    if ($3 >>> 0 >= 7) {
11227     if (($3 | 0) != 8) {
11228      if (($1 | 0) < 1) {
11229       break label$1
11230      }
11231      $9 = HEAP32[$5 + -4 >> 2];
11232      $3 = HEAP32[$5 + -8 >> 2];
11233      $13 = HEAP32[$5 + -12 >> 2];
11234      $7 = HEAP32[$5 + -16 >> 2];
11235      $8 = HEAP32[$5 + -20 >> 2];
11236      $12 = HEAP32[$5 + -24 >> 2];
11237      $10 = HEAP32[$5 + -28 >> 2];
11238      $11 = HEAP32[$2 >> 2];
11239      $14 = $11;
11240      $16 = $11 >> 31;
11241      $11 = HEAP32[$2 + 4 >> 2];
11242      $15 = $11;
11243      $18 = $11 >> 31;
11244      $11 = HEAP32[$2 + 8 >> 2];
11245      $17 = $11;
11246      $25 = $11 >> 31;
11247      $11 = HEAP32[$2 + 12 >> 2];
11248      $26 = $11;
11249      $27 = $11 >> 31;
11250      $11 = HEAP32[$2 + 16 >> 2];
11251      $24 = $11;
11252      $29 = $11 >> 31;
11253      $11 = HEAP32[$2 + 20 >> 2];
11254      $30 = $11;
11255      $22 = $11 >> 31;
11256      $2 = HEAP32[$2 + 24 >> 2];
11257      $31 = $2;
11258      $32 = $2 >> 31;
11259      $2 = 0;
11260      while (1) {
11261       $11 = $2 << 2;
11262       $28 = $11 + $5 | 0;
11263       $34 = HEAP32[$0 + $11 >> 2];
11264       $11 = $12;
11265       $6 = __wasm_i64_mul($11, $11 >> 31, $30, $22);
11266       $35 = i64toi32_i32$HIGH_BITS;
11267       $12 = $8;
11268       $21 = __wasm_i64_mul($10, $10 >> 31, $31, $32);
11269       $10 = $21 + $6 | 0;
11270       $6 = i64toi32_i32$HIGH_BITS + $35 | 0;
11271       $6 = $10 >>> 0 < $21 >>> 0 ? $6 + 1 | 0 : $6;
11272       $21 = $10;
11273       $10 = __wasm_i64_mul($8, $8 >> 31, $24, $29);
11274       $8 = $21 + $10 | 0;
11275       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11276       $6 = $8 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
11277       $10 = $8;
11278       $8 = $7;
11279       $21 = $10;
11280       $10 = __wasm_i64_mul($7, $7 >> 31, $26, $27);
11281       $7 = $21 + $10 | 0;
11282       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11283       $6 = $7 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
11284       $21 = $7;
11285       $7 = $13;
11286       $10 = __wasm_i64_mul($7, $7 >> 31, $17, $25);
11287       $13 = $21 + $10 | 0;
11288       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11289       $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
11290       $10 = $13;
11291       $13 = $3;
11292       $20 = $28;
11293       $21 = $10;
11294       $10 = __wasm_i64_mul($3, $3 >> 31, $15, $18);
11295       $3 = $21 + $10 | 0;
11296       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11297       $6 = $3 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
11298       $21 = $3;
11299       $3 = $9;
11300       $10 = __wasm_i64_mul($3, $3 >> 31, $14, $16);
11301       $9 = $21 + $10 | 0;
11302       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11303       $6 = $9 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;
11304       $28 = $9;
11305       $9 = $4;
11306       $10 = $9 & 31;
11307       $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $10 : ((1 << $10) - 1 & $6) << 32 - $10 | $28 >>> $10) + $34 | 0;
11308       HEAP32[$20 >> 2] = $9;
11309       $10 = $11;
11310       $2 = $2 + 1 | 0;
11311       if (($2 | 0) != ($1 | 0)) {
11312        continue
11313       }
11314       break;
11315      };
11316      break label$1;
11317     }
11318     if (($1 | 0) < 1) {
11319      break label$1
11320     }
11321     $9 = HEAP32[$5 + -4 >> 2];
11322     $3 = HEAP32[$5 + -8 >> 2];
11323     $13 = HEAP32[$5 + -12 >> 2];
11324     $7 = HEAP32[$5 + -16 >> 2];
11325     $8 = HEAP32[$5 + -20 >> 2];
11326     $12 = HEAP32[$5 + -24 >> 2];
11327     $10 = HEAP32[$5 + -28 >> 2];
11328     $11 = HEAP32[$5 + -32 >> 2];
11329     $6 = HEAP32[$2 >> 2];
11330     $16 = $6;
11331     $15 = $6 >> 31;
11332     $6 = HEAP32[$2 + 4 >> 2];
11333     $18 = $6;
11334     $17 = $6 >> 31;
11335     $6 = HEAP32[$2 + 8 >> 2];
11336     $25 = $6;
11337     $26 = $6 >> 31;
11338     $6 = HEAP32[$2 + 12 >> 2];
11339     $27 = $6;
11340     $24 = $6 >> 31;
11341     $6 = HEAP32[$2 + 16 >> 2];
11342     $29 = $6;
11343     $30 = $6 >> 31;
11344     $6 = HEAP32[$2 + 20 >> 2];
11345     $22 = $6;
11346     $31 = $6 >> 31;
11347     $6 = HEAP32[$2 + 24 >> 2];
11348     $32 = $6;
11349     $28 = $6 >> 31;
11350     $2 = HEAP32[$2 + 28 >> 2];
11351     $34 = $2;
11352     $35 = $2 >> 31;
11353     $2 = 0;
11354     while (1) {
11355      $6 = $2 << 2;
11356      $21 = $6 + $5 | 0;
11357      $36 = HEAP32[$0 + $6 >> 2];
11358      $14 = $10;
11359      $6 = __wasm_i64_mul($10, $10 >> 31, $32, $28);
11360      $37 = i64toi32_i32$HIGH_BITS;
11361      $10 = $12;
11362      $33 = __wasm_i64_mul($11, $11 >> 31, $34, $35);
11363      $11 = $33 + $6 | 0;
11364      $6 = i64toi32_i32$HIGH_BITS + $37 | 0;
11365      $6 = $11 >>> 0 < $33 >>> 0 ? $6 + 1 | 0 : $6;
11366      $20 = $11;
11367      $11 = __wasm_i64_mul($12, $12 >> 31, $22, $31);
11368      $12 = $20 + $11 | 0;
11369      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11370      $6 = $12 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
11371      $11 = $12;
11372      $12 = $8;
11373      $20 = $11;
11374      $11 = __wasm_i64_mul($8, $8 >> 31, $29, $30);
11375      $8 = $20 + $11 | 0;
11376      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11377      $6 = $8 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
11378      $11 = $8;
11379      $8 = $7;
11380      $20 = $11;
11381      $11 = __wasm_i64_mul($7, $7 >> 31, $27, $24);
11382      $7 = $20 + $11 | 0;
11383      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11384      $6 = $7 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
11385      $20 = $7;
11386      $7 = $13;
11387      $11 = __wasm_i64_mul($7, $7 >> 31, $25, $26);
11388      $13 = $20 + $11 | 0;
11389      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11390      $6 = $13 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
11391      $11 = $13;
11392      $13 = $3;
11393      $20 = $21;
11394      $21 = $11;
11395      $11 = __wasm_i64_mul($3, $3 >> 31, $18, $17);
11396      $3 = $21 + $11 | 0;
11397      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11398      $6 = $3 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
11399      $21 = $3;
11400      $3 = $9;
11401      $11 = __wasm_i64_mul($3, $3 >> 31, $16, $15);
11402      $9 = $21 + $11 | 0;
11403      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11404      $6 = $9 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;
11405      $21 = $9;
11406      $9 = $4;
11407      $11 = $9 & 31;
11408      $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $11 : ((1 << $11) - 1 & $6) << 32 - $11 | $21 >>> $11) + $36 | 0;
11409      HEAP32[$20 >> 2] = $9;
11410      $11 = $14;
11411      $2 = $2 + 1 | 0;
11412      if (($2 | 0) != ($1 | 0)) {
11413       continue
11414      }
11415      break;
11416     };
11417     break label$1;
11418    }
11419    if (($3 | 0) != 6) {
11420     if (($1 | 0) < 1) {
11421      break label$1
11422     }
11423     $9 = HEAP32[$5 + -4 >> 2];
11424     $3 = HEAP32[$5 + -8 >> 2];
11425     $13 = HEAP32[$5 + -12 >> 2];
11426     $7 = HEAP32[$5 + -16 >> 2];
11427     $8 = HEAP32[$5 + -20 >> 2];
11428     $12 = HEAP32[$2 >> 2];
11429     $10 = $12;
11430     $11 = $12 >> 31;
11431     $12 = HEAP32[$2 + 4 >> 2];
11432     $14 = $12;
11433     $16 = $12 >> 31;
11434     $12 = HEAP32[$2 + 8 >> 2];
11435     $15 = $12;
11436     $18 = $12 >> 31;
11437     $12 = HEAP32[$2 + 12 >> 2];
11438     $17 = $12;
11439     $25 = $12 >> 31;
11440     $2 = HEAP32[$2 + 16 >> 2];
11441     $26 = $2;
11442     $27 = $2 >> 31;
11443     $2 = 0;
11444     while (1) {
11445      $12 = $2 << 2;
11446      $24 = $12 + $5 | 0;
11447      $29 = HEAP32[$0 + $12 >> 2];
11448      $12 = $7;
11449      $6 = __wasm_i64_mul($7, $7 >> 31, $17, $25);
11450      $30 = i64toi32_i32$HIGH_BITS;
11451      $7 = $13;
11452      $22 = __wasm_i64_mul($8, $8 >> 31, $26, $27);
11453      $8 = $22 + $6 | 0;
11454      $6 = i64toi32_i32$HIGH_BITS + $30 | 0;
11455      $6 = $8 >>> 0 < $22 >>> 0 ? $6 + 1 | 0 : $6;
11456      $13 = $8;
11457      $8 = __wasm_i64_mul($7, $7 >> 31, $15, $18);
11458      $13 = $13 + $8 | 0;
11459      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11460      $6 = $13 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;
11461      $8 = $13;
11462      $13 = $3;
11463      $22 = $8;
11464      $8 = __wasm_i64_mul($3, $3 >> 31, $14, $16);
11465      $3 = $22 + $8 | 0;
11466      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11467      $6 = $3 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;
11468      $8 = $3;
11469      $3 = $9;
11470      $9 = __wasm_i64_mul($3, $3 >> 31, $10, $11);
11471      $8 = $8 + $9 | 0;
11472      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11473      $6 = $8 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;
11474      $9 = $4 & 31;
11475      $9 = (32 <= ($4 & 63) >>> 0 ? $6 >> $9 : ((1 << $9) - 1 & $6) << 32 - $9 | $8 >>> $9) + $29 | 0;
11476      HEAP32[$24 >> 2] = $9;
11477      $8 = $12;
11478      $2 = $2 + 1 | 0;
11479      if (($2 | 0) != ($1 | 0)) {
11480       continue
11481      }
11482      break;
11483     };
11484     break label$1;
11485    }
11486    if (($1 | 0) < 1) {
11487     break label$1
11488    }
11489    $9 = HEAP32[$5 + -4 >> 2];
11490    $3 = HEAP32[$5 + -8 >> 2];
11491    $13 = HEAP32[$5 + -12 >> 2];
11492    $7 = HEAP32[$5 + -16 >> 2];
11493    $8 = HEAP32[$5 + -20 >> 2];
11494    $12 = HEAP32[$5 + -24 >> 2];
11495    $10 = HEAP32[$2 >> 2];
11496    $11 = $10;
11497    $14 = $11 >> 31;
11498    $10 = HEAP32[$2 + 4 >> 2];
11499    $16 = $10;
11500    $15 = $10 >> 31;
11501    $10 = HEAP32[$2 + 8 >> 2];
11502    $18 = $10;
11503    $17 = $10 >> 31;
11504    $10 = HEAP32[$2 + 12 >> 2];
11505    $25 = $10;
11506    $26 = $10 >> 31;
11507    $10 = HEAP32[$2 + 16 >> 2];
11508    $27 = $10;
11509    $24 = $10 >> 31;
11510    $2 = HEAP32[$2 + 20 >> 2];
11511    $29 = $2;
11512    $30 = $2 >> 31;
11513    $2 = 0;
11514    while (1) {
11515     $10 = $2 << 2;
11516     $22 = $10 + $5 | 0;
11517     $31 = HEAP32[$0 + $10 >> 2];
11518     $10 = $8;
11519     $6 = __wasm_i64_mul($8, $8 >> 31, $27, $24);
11520     $32 = i64toi32_i32$HIGH_BITS;
11521     $8 = $7;
11522     $28 = __wasm_i64_mul($12, $12 >> 31, $29, $30);
11523     $12 = $28 + $6 | 0;
11524     $6 = i64toi32_i32$HIGH_BITS + $32 | 0;
11525     $6 = $12 >>> 0 < $28 >>> 0 ? $6 + 1 | 0 : $6;
11526     $21 = $12;
11527     $12 = __wasm_i64_mul($7, $7 >> 31, $25, $26);
11528     $7 = $21 + $12 | 0;
11529     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11530     $6 = $7 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;
11531     $21 = $7;
11532     $7 = $13;
11533     $12 = __wasm_i64_mul($7, $7 >> 31, $18, $17);
11534     $13 = $21 + $12 | 0;
11535     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11536     $6 = $13 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;
11537     $12 = $13;
11538     $13 = $3;
11539     $21 = $22;
11540     $22 = $12;
11541     $12 = __wasm_i64_mul($3, $3 >> 31, $16, $15);
11542     $3 = $22 + $12 | 0;
11543     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11544     $6 = $3 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;
11545     $12 = $3;
11546     $3 = $9;
11547     $9 = __wasm_i64_mul($3, $3 >> 31, $11, $14);
11548     $12 = $12 + $9 | 0;
11549     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11550     $6 = $12 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;
11551     $9 = $4 & 31;
11552     $9 = (32 <= ($4 & 63) >>> 0 ? $6 >> $9 : ((1 << $9) - 1 & $6) << 32 - $9 | $12 >>> $9) + $31 | 0;
11553     HEAP32[$21 >> 2] = $9;
11554     $12 = $10;
11555     $2 = $2 + 1 | 0;
11556     if (($2 | 0) != ($1 | 0)) {
11557      continue
11558     }
11559     break;
11560    };
11561    break label$1;
11562   }
11563   if ($3 >>> 0 >= 3) {
11564    if (($3 | 0) != 4) {
11565     if (($1 | 0) < 1) {
11566      break label$1
11567     }
11568     $9 = HEAP32[$5 + -4 >> 2];
11569     $3 = HEAP32[$5 + -8 >> 2];
11570     $13 = HEAP32[$5 + -12 >> 2];
11571     $7 = HEAP32[$2 >> 2];
11572     $12 = $7;
11573     $10 = $7 >> 31;
11574     $7 = HEAP32[$2 + 4 >> 2];
11575     $11 = $7;
11576     $14 = $7 >> 31;
11577     $2 = HEAP32[$2 + 8 >> 2];
11578     $16 = $2;
11579     $15 = $2 >> 31;
11580     $2 = 0;
11581     while (1) {
11582      $7 = $2 << 2;
11583      $8 = $7 + $5 | 0;
11584      $18 = HEAP32[$0 + $7 >> 2];
11585      $7 = $3;
11586      $3 = __wasm_i64_mul($7, $7 >> 31, $11, $14);
11587      $6 = i64toi32_i32$HIGH_BITS;
11588      $17 = $8;
11589      $13 = __wasm_i64_mul($13, $13 >> 31, $16, $15);
11590      $3 = $13 + $3 | 0;
11591      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11592      $6 = $3 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;
11593      $8 = $3;
11594      $3 = $9;
11595      $9 = __wasm_i64_mul($3, $3 >> 31, $12, $10);
11596      $13 = $8 + $9 | 0;
11597      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11598      $6 = $13 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;
11599      $9 = $13;
11600      $8 = $4 & 31;
11601      $9 = (32 <= ($4 & 63) >>> 0 ? $6 >> $8 : ((1 << $8) - 1 & $6) << 32 - $8 | $9 >>> $8) + $18 | 0;
11602      HEAP32[$17 >> 2] = $9;
11603      $13 = $7;
11604      $2 = $2 + 1 | 0;
11605      if (($2 | 0) != ($1 | 0)) {
11606       continue
11607      }
11608      break;
11609     };
11610     break label$1;
11611    }
11612    if (($1 | 0) < 1) {
11613     break label$1
11614    }
11615    $9 = HEAP32[$5 + -4 >> 2];
11616    $3 = HEAP32[$5 + -8 >> 2];
11617    $13 = HEAP32[$5 + -12 >> 2];
11618    $7 = HEAP32[$5 + -16 >> 2];
11619    $8 = HEAP32[$2 >> 2];
11620    $10 = $8;
11621    $11 = $8 >> 31;
11622    $8 = HEAP32[$2 + 4 >> 2];
11623    $14 = $8;
11624    $16 = $8 >> 31;
11625    $8 = HEAP32[$2 + 8 >> 2];
11626    $15 = $8;
11627    $18 = $8 >> 31;
11628    $2 = HEAP32[$2 + 12 >> 2];
11629    $17 = $2;
11630    $25 = $2 >> 31;
11631    $2 = 0;
11632    while (1) {
11633     $8 = $2 << 2;
11634     $12 = $8 + $5 | 0;
11635     $26 = HEAP32[$0 + $8 >> 2];
11636     $8 = $13;
11637     $6 = __wasm_i64_mul($8, $8 >> 31, $15, $18);
11638     $27 = i64toi32_i32$HIGH_BITS;
11639     $13 = $3;
11640     $22 = $12;
11641     $24 = __wasm_i64_mul($7, $7 >> 31, $17, $25);
11642     $7 = $24 + $6 | 0;
11643     $6 = i64toi32_i32$HIGH_BITS + $27 | 0;
11644     $6 = $7 >>> 0 < $24 >>> 0 ? $6 + 1 | 0 : $6;
11645     $12 = $7;
11646     $7 = __wasm_i64_mul($3, $3 >> 31, $14, $16);
11647     $3 = $12 + $7 | 0;
11648     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11649     $6 = $3 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6;
11650     $7 = $3;
11651     $3 = $9;
11652     $9 = __wasm_i64_mul($3, $3 >> 31, $10, $11);
11653     $7 = $7 + $9 | 0;
11654     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11655     $6 = $7 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;
11656     $9 = $7;
11657     $7 = $4;
11658     $12 = $7 & 31;
11659     $9 = (32 <= ($7 & 63) >>> 0 ? $6 >> $12 : ((1 << $12) - 1 & $6) << 32 - $12 | $9 >>> $12) + $26 | 0;
11660     HEAP32[$22 >> 2] = $9;
11661     $7 = $8;
11662     $2 = $2 + 1 | 0;
11663     if (($2 | 0) != ($1 | 0)) {
11664      continue
11665     }
11666     break;
11667    };
11668    break label$1;
11669   }
11670   if (($3 | 0) != 2) {
11671    if (($1 | 0) < 1) {
11672     break label$1
11673    }
11674    $9 = HEAP32[$5 + -4 >> 2];
11675    $2 = HEAP32[$2 >> 2];
11676    $8 = $2;
11677    $12 = $2 >> 31;
11678    $2 = 0;
11679    while (1) {
11680     $3 = $2 << 2;
11681     $10 = $3 + $5 | 0;
11682     $6 = HEAP32[$0 + $3 >> 2];
11683     $9 = __wasm_i64_mul($9, $9 >> 31, $8, $12);
11684     $7 = i64toi32_i32$HIGH_BITS;
11685     $3 = $4;
11686     $13 = $3 & 31;
11687     $9 = $6 + (32 <= ($3 & 63) >>> 0 ? $7 >> $13 : ((1 << $13) - 1 & $7) << 32 - $13 | $9 >>> $13) | 0;
11688     HEAP32[$10 >> 2] = $9;
11689     $2 = $2 + 1 | 0;
11690     if (($2 | 0) != ($1 | 0)) {
11691      continue
11692     }
11693     break;
11694    };
11695    break label$1;
11696   }
11697   if (($1 | 0) < 1) {
11698    break label$1
11699   }
11700   $9 = HEAP32[$5 + -4 >> 2];
11701   $3 = HEAP32[$5 + -8 >> 2];
11702   $13 = HEAP32[$2 >> 2];
11703   $8 = $13;
11704   $12 = $8 >> 31;
11705   $2 = HEAP32[$2 + 4 >> 2];
11706   $10 = $2;
11707   $11 = $2 >> 31;
11708   $2 = 0;
11709   while (1) {
11710    $13 = $2 << 2;
11711    $7 = $13 + $5 | 0;
11712    $14 = HEAP32[$0 + $13 >> 2];
11713    $13 = $9;
11714    $9 = __wasm_i64_mul($9, $9 >> 31, $8, $12);
11715    $6 = i64toi32_i32$HIGH_BITS;
11716    $15 = $7;
11717    $7 = $9;
11718    $9 = __wasm_i64_mul($3, $3 >> 31, $10, $11);
11719    $3 = $7 + $9 | 0;
11720    $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
11721    $6 = $3 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;
11722    $9 = $3;
11723    $3 = $4;
11724    $7 = $3 & 31;
11725    $9 = (32 <= ($3 & 63) >>> 0 ? $6 >> $7 : ((1 << $7) - 1 & $6) << 32 - $7 | $9 >>> $7) + $14 | 0;
11726    HEAP32[$15 >> 2] = $9;
11727    $3 = $13;
11728    $2 = $2 + 1 | 0;
11729    if (($2 | 0) != ($1 | 0)) {
11730     continue
11731    }
11732    break;
11733   };
11734  }
11735 }
11736
11737 function FLAC__lpc_compute_expected_bits_per_residual_sample($0, $1) {
11738  if (!!($0 > 0.0)) {
11739   $0 = log(.5 / +($1 >>> 0) * $0) * .5 / .6931471805599453;
11740   return $0 >= 0.0 ? $0 : 0.0;
11741  }
11742  return $0 < 0.0 ? 1.e+32 : 0.0;
11743 }
11744
11745 function FLAC__lpc_compute_best_order($0, $1, $2, $3) {
11746  var $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, $10 = 0.0;
11747  $5 = 1;
11748  if ($1) {
11749   $10 = .5 / +($2 >>> 0);
11750   $7 = 4294967295.0;
11751   while (1) {
11752    $4 = HEAPF64[($6 << 3) + $0 >> 3];
11753    label$3 : {
11754     if (!!($4 > 0.0)) {
11755      $4 = log($10 * $4) * .5 / .6931471805599453;
11756      $4 = $4 >= 0.0 ? $4 : 0.0;
11757      break label$3;
11758     }
11759     $4 = $4 < 0.0 ? 1.e+32 : 0.0;
11760    }
11761    $4 = $4 * +($2 - $5 >>> 0) + +(Math_imul($3, $5) >>> 0);
11762    $8 = $4 < $7;
11763    $7 = $8 ? $4 : $7;
11764    $9 = $8 ? $6 : $9;
11765    $5 = $5 + 1 | 0;
11766    $6 = $6 + 1 | 0;
11767    if (($6 | 0) != ($1 | 0)) {
11768     continue
11769    }
11770    break;
11771   };
11772   $0 = $9 + 1 | 0;
11773  } else {
11774   $0 = 1
11775  }
11776  return $0;
11777 }
11778
11779 function strlen($0) {
11780  var $1 = 0, $2 = 0, $3 = 0;
11781  label$1 : {
11782   label$2 : {
11783    $1 = $0;
11784    if (!($1 & 3)) {
11785     break label$2
11786    }
11787    if (!HEAPU8[$0 | 0]) {
11788     return 0
11789    }
11790    while (1) {
11791     $1 = $1 + 1 | 0;
11792     if (!($1 & 3)) {
11793      break label$2
11794     }
11795     if (HEAPU8[$1 | 0]) {
11796      continue
11797     }
11798     break;
11799    };
11800    break label$1;
11801   }
11802   while (1) {
11803    $2 = $1;
11804    $1 = $1 + 4 | 0;
11805    $3 = HEAP32[$2 >> 2];
11806    if (!(($3 ^ -1) & $3 + -16843009 & -2139062144)) {
11807     continue
11808    }
11809    break;
11810   };
11811   if (!($3 & 255)) {
11812    return $2 - $0 | 0
11813   }
11814   while (1) {
11815    $3 = HEAPU8[$2 + 1 | 0];
11816    $1 = $2 + 1 | 0;
11817    $2 = $1;
11818    if ($3) {
11819     continue
11820    }
11821    break;
11822   };
11823  }
11824  return $1 - $0 | 0;
11825 }
11826
11827 function __strchrnul($0, $1) {
11828  var $2 = 0, $3 = 0;
11829  label$1 : {
11830   $3 = $1 & 255;
11831   if ($3) {
11832    if ($0 & 3) {
11833     while (1) {
11834      $2 = HEAPU8[$0 | 0];
11835      if (!$2 | ($2 | 0) == ($1 & 255)) {
11836       break label$1
11837      }
11838      $0 = $0 + 1 | 0;
11839      if ($0 & 3) {
11840       continue
11841      }
11842      break;
11843     }
11844    }
11845    $2 = HEAP32[$0 >> 2];
11846    label$5 : {
11847     if (($2 ^ -1) & $2 + -16843009 & -2139062144) {
11848      break label$5
11849     }
11850     $3 = Math_imul($3, 16843009);
11851     while (1) {
11852      $2 = $2 ^ $3;
11853      if (($2 ^ -1) & $2 + -16843009 & -2139062144) {
11854       break label$5
11855      }
11856      $2 = HEAP32[$0 + 4 >> 2];
11857      $0 = $0 + 4 | 0;
11858      if (!($2 + -16843009 & ($2 ^ -1) & -2139062144)) {
11859       continue
11860      }
11861      break;
11862     };
11863    }
11864    while (1) {
11865     $2 = $0;
11866     $3 = HEAPU8[$2 | 0];
11867     if ($3) {
11868      $0 = $2 + 1 | 0;
11869      if (($3 | 0) != ($1 & 255)) {
11870       continue
11871      }
11872     }
11873     break;
11874    };
11875    return $2;
11876   }
11877   return strlen($0) + $0 | 0;
11878  }
11879  return $0;
11880 }
11881
11882 function strchr($0, $1) {
11883  $0 = __strchrnul($0, $1);
11884  return HEAPU8[$0 | 0] == ($1 & 255) ? $0 : 0;
11885 }
11886
11887 function __stdio_write($0, $1, $2) {
11888  $0 = $0 | 0;
11889  $1 = $1 | 0;
11890  $2 = $2 | 0;
11891  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
11892  $3 = global$0 - 32 | 0;
11893  global$0 = $3;
11894  $4 = HEAP32[$0 + 28 >> 2];
11895  HEAP32[$3 + 16 >> 2] = $4;
11896  $5 = HEAP32[$0 + 20 >> 2];
11897  HEAP32[$3 + 28 >> 2] = $2;
11898  HEAP32[$3 + 24 >> 2] = $1;
11899  $1 = $5 - $4 | 0;
11900  HEAP32[$3 + 20 >> 2] = $1;
11901  $4 = $1 + $2 | 0;
11902  $9 = 2;
11903  $1 = $3 + 16 | 0;
11904  label$1 : {
11905   label$2 : {
11906    label$3 : {
11907     if (!__wasi_syscall_ret(__wasi_fd_write(HEAP32[$0 + 60 >> 2], $3 + 16 | 0, 2, $3 + 12 | 0) | 0)) {
11908      while (1) {
11909       $5 = HEAP32[$3 + 12 >> 2];
11910       if (($5 | 0) == ($4 | 0)) {
11911        break label$3
11912       }
11913       if (($5 | 0) <= -1) {
11914        break label$2
11915       }
11916       $6 = HEAP32[$1 + 4 >> 2];
11917       $7 = $5 >>> 0 > $6 >>> 0;
11918       $8 = ($7 << 3) + $1 | 0;
11919       $6 = $5 - ($7 ? $6 : 0) | 0;
11920       HEAP32[$8 >> 2] = $6 + HEAP32[$8 >> 2];
11921       $8 = ($7 ? 12 : 4) + $1 | 0;
11922       HEAP32[$8 >> 2] = HEAP32[$8 >> 2] - $6;
11923       $4 = $4 - $5 | 0;
11924       $1 = $7 ? $1 + 8 | 0 : $1;
11925       $9 = $9 - $7 | 0;
11926       if (!__wasi_syscall_ret(__wasi_fd_write(HEAP32[$0 + 60 >> 2], $1 | 0, $9 | 0, $3 + 12 | 0) | 0)) {
11927        continue
11928       }
11929       break;
11930      }
11931     }
11932     HEAP32[$3 + 12 >> 2] = -1;
11933     if (($4 | 0) != -1) {
11934      break label$2
11935     }
11936    }
11937    $1 = HEAP32[$0 + 44 >> 2];
11938    HEAP32[$0 + 28 >> 2] = $1;
11939    HEAP32[$0 + 20 >> 2] = $1;
11940    HEAP32[$0 + 16 >> 2] = $1 + HEAP32[$0 + 48 >> 2];
11941    $0 = $2;
11942    break label$1;
11943   }
11944   HEAP32[$0 + 28 >> 2] = 0;
11945   HEAP32[$0 + 16 >> 2] = 0;
11946   HEAP32[$0 + 20 >> 2] = 0;
11947   HEAP32[$0 >> 2] = HEAP32[$0 >> 2] | 32;
11948   $0 = 0;
11949   if (($9 | 0) == 2) {
11950    break label$1
11951   }
11952   $0 = $2 - HEAP32[$1 + 4 >> 2] | 0;
11953  }
11954  global$0 = $3 + 32 | 0;
11955  return $0 | 0;
11956 }
11957
11958 function FLAC__memory_alloc_aligned_int32_array($0, $1, $2) {
11959  var $3 = 0;
11960  label$1 : {
11961   if ($0 >>> 0 > 1073741823) {
11962    break label$1
11963   }
11964   $0 = dlmalloc($0 ? $0 << 2 : 1);
11965   if (!$0) {
11966    break label$1
11967   }
11968   $3 = HEAP32[$1 >> 2];
11969   if ($3) {
11970    dlfree($3)
11971   }
11972   HEAP32[$1 >> 2] = $0;
11973   HEAP32[$2 >> 2] = $0;
11974   $3 = 1;
11975  }
11976  return $3;
11977 }
11978
11979 function FLAC__memory_alloc_aligned_uint64_array($0, $1, $2) {
11980  var $3 = 0;
11981  label$1 : {
11982   if ($0 >>> 0 > 536870911) {
11983    break label$1
11984   }
11985   $0 = dlmalloc($0 ? $0 << 3 : 1);
11986   if (!$0) {
11987    break label$1
11988   }
11989   $3 = HEAP32[$1 >> 2];
11990   if ($3) {
11991    dlfree($3)
11992   }
11993   HEAP32[$1 >> 2] = $0;
11994   HEAP32[$2 >> 2] = $0;
11995   $3 = 1;
11996  }
11997  return $3;
11998 }
11999
12000 function safe_malloc_mul_2op_p($0, $1) {
12001  if (!($1 ? $0 : 0)) {
12002   return dlmalloc(1)
12003  }
12004  __wasm_i64_mul($1, 0, $0, 0);
12005  if (i64toi32_i32$HIGH_BITS) {
12006   $0 = 0
12007  } else {
12008   $0 = dlmalloc(Math_imul($0, $1))
12009  }
12010  return $0;
12011 }
12012
12013 function FLAC__fixed_compute_best_predictor($0, $1, $2) {
12014  $0 = $0 | 0;
12015  $1 = $1 | 0;
12016  $2 = $2 | 0;
12017  var $3 = 0, $4 = Math_fround(0), $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
12018  if ($1) {
12019   $3 = HEAP32[$0 + -4 >> 2];
12020   $8 = HEAP32[$0 + -8 >> 2];
12021   $12 = $3 - $8 | 0;
12022   $5 = HEAP32[$0 + -12 >> 2];
12023   $9 = $12 + ($5 - $8 | 0) | 0;
12024   $17 = $9 + ((($5 << 1) - $8 | 0) - HEAP32[$0 + -16 >> 2] | 0) | 0;
12025   while (1) {
12026    $8 = HEAP32[($15 << 2) + $0 >> 2];
12027    $5 = $8 >> 31;
12028    $14 = ($5 ^ $5 + $8) + $14 | 0;
12029    $5 = $8 - $3 | 0;
12030    $11 = $5 >> 31;
12031    $13 = ($11 ^ $5 + $11) + $13 | 0;
12032    $11 = $5 - $12 | 0;
12033    $3 = $11 >> 31;
12034    $10 = ($3 ^ $3 + $11) + $10 | 0;
12035    $9 = $11 - $9 | 0;
12036    $3 = $9 >> 31;
12037    $6 = ($3 ^ $3 + $9) + $6 | 0;
12038    $12 = $9 - $17 | 0;
12039    $3 = $12 >> 31;
12040    $7 = ($3 ^ $3 + $12) + $7 | 0;
12041    $3 = $8;
12042    $12 = $5;
12043    $17 = $9;
12044    $9 = $11;
12045    $15 = $15 + 1 | 0;
12046    if (($15 | 0) != ($1 | 0)) {
12047     continue
12048    }
12049    break;
12050   };
12051  }
12052  $0 = $13 >>> 0 < $10 >>> 0 ? $13 : $10;
12053  $0 = $0 >>> 0 < $6 >>> 0 ? $0 : $6;
12054  label$3 : {
12055   if ($14 >>> 0 < ($0 >>> 0 < $7 >>> 0 ? $0 : $7) >>> 0) {
12056    break label$3
12057   }
12058   $16 = 1;
12059   $0 = $10 >>> 0 < $6 >>> 0 ? $10 : $6;
12060   if ($13 >>> 0 < ($0 >>> 0 < $7 >>> 0 ? $0 : $7) >>> 0) {
12061    break label$3
12062   }
12063   $0 = $6 >>> 0 < $7 >>> 0;
12064   $16 = $10 >>> 0 < ($0 ? $6 : $7) >>> 0 ? 2 : $0 ? 3 : 4;
12065  }
12066  $0 = $2;
12067  if ($14) {
12068   $4 = Math_fround(log(+($14 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)
12069  } else {
12070   $4 = Math_fround(0.0)
12071  }
12072  HEAPF32[$0 >> 2] = $4;
12073  $0 = $2;
12074  if ($13) {
12075   $4 = Math_fround(log(+($13 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)
12076  } else {
12077   $4 = Math_fround(0.0)
12078  }
12079  HEAPF32[$0 + 4 >> 2] = $4;
12080  $0 = $2;
12081  if ($10) {
12082   $4 = Math_fround(log(+($10 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)
12083  } else {
12084   $4 = Math_fround(0.0)
12085  }
12086  HEAPF32[$0 + 8 >> 2] = $4;
12087  $0 = $2;
12088  if ($6) {
12089   $4 = Math_fround(log(+($6 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)
12090  } else {
12091   $4 = Math_fround(0.0)
12092  }
12093  HEAPF32[$0 + 12 >> 2] = $4;
12094  if (!$7) {
12095   HEAPF32[$2 + 16 >> 2] = 0;
12096   return $16 | 0;
12097  }
12098  (wasm2js_i32$0 = $2, wasm2js_f32$0 = Math_fround(log(+($7 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)), HEAPF32[wasm2js_i32$0 + 16 >> 2] = wasm2js_f32$0;
12099  return $16 | 0;
12100 }
12101
12102 function FLAC__fixed_compute_best_predictor_wide($0, $1, $2) {
12103  $0 = $0 | 0;
12104  $1 = $1 | 0;
12105  $2 = $2 | 0;
12106  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = Math_fround(0), $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
12107  label$1 : {
12108   if (!$1) {
12109    break label$1
12110   }
12111   $5 = HEAP32[$0 + -4 >> 2];
12112   $8 = HEAP32[$0 + -8 >> 2];
12113   $6 = $5 - $8 | 0;
12114   $9 = HEAP32[$0 + -12 >> 2];
12115   $14 = $6 + ($9 - $8 | 0) | 0;
12116   $21 = $14 + ((($9 << 1) - $8 | 0) - HEAP32[$0 + -16 >> 2] | 0) | 0;
12117   $9 = 0;
12118   $8 = 0;
12119   while (1) {
12120    $3 = HEAP32[($20 << 2) + $0 >> 2];
12121    $4 = $3 >> 31;
12122    $4 = $4 ^ $3 + $4;
12123    $7 = $4 + $19 | 0;
12124    if ($7 >>> 0 < $4 >>> 0) {
12125     $18 = $18 + 1 | 0
12126    }
12127    $19 = $7;
12128    $4 = $3 - $5 | 0;
12129    $7 = $4 >> 31;
12130    $7 = $7 ^ $4 + $7;
12131    $5 = $7 + $17 | 0;
12132    if ($5 >>> 0 < $7 >>> 0) {
12133     $15 = $15 + 1 | 0
12134    }
12135    $17 = $5;
12136    $7 = $4 - $6 | 0;
12137    $5 = $7 >> 31;
12138    $5 = $5 ^ $5 + $7;
12139    $6 = $5 + $16 | 0;
12140    if ($6 >>> 0 < $5 >>> 0) {
12141     $10 = $10 + 1 | 0
12142    }
12143    $16 = $6;
12144    $14 = $7 - $14 | 0;
12145    $5 = $14 >> 31;
12146    $5 = $5 ^ $5 + $14;
12147    $6 = $5 + $12 | 0;
12148    if ($6 >>> 0 < $5 >>> 0) {
12149     $8 = $8 + 1 | 0
12150    }
12151    $12 = $6;
12152    $6 = $14 - $21 | 0;
12153    $5 = $6 >> 31;
12154    $5 = $5 ^ $5 + $6;
12155    $6 = $5 + $13 | 0;
12156    if ($6 >>> 0 < $5 >>> 0) {
12157     $9 = $9 + 1 | 0
12158    }
12159    $13 = $6;
12160    $5 = $3;
12161    $6 = $4;
12162    $21 = $14;
12163    $14 = $7;
12164    $20 = $20 + 1 | 0;
12165    if (($20 | 0) != ($1 | 0)) {
12166     continue
12167    }
12168    break;
12169   };
12170  }
12171  $3 = ($10 | 0) == ($15 | 0) & $17 >>> 0 < $16 >>> 0 | $15 >>> 0 < $10 >>> 0;
12172  $4 = $3 ? $17 : $16;
12173  $0 = $4;
12174  $3 = $3 ? $15 : $10;
12175  $4 = ($8 | 0) == ($3 | 0) & $4 >>> 0 < $12 >>> 0 | $3 >>> 0 < $8 >>> 0;
12176  $7 = $4 ? $0 : $12;
12177  $3 = $4 ? $3 : $8;
12178  $4 = ($9 | 0) == ($3 | 0) & $7 >>> 0 < $13 >>> 0 | $3 >>> 0 < $9 >>> 0;
12179  $7 = $4 ? $7 : $13;
12180  $3 = $4 ? $3 : $9;
12181  $0 = 0;
12182  label$4 : {
12183   if (($3 | 0) == ($18 | 0) & $19 >>> 0 < $7 >>> 0 | $18 >>> 0 < $3 >>> 0) {
12184    break label$4
12185   }
12186   $3 = ($8 | 0) == ($10 | 0) & $16 >>> 0 < $12 >>> 0 | $10 >>> 0 < $8 >>> 0;
12187   $4 = $3 ? $16 : $12;
12188   $0 = $4;
12189   $3 = $3 ? $10 : $8;
12190   $4 = ($9 | 0) == ($3 | 0) & $4 >>> 0 < $13 >>> 0 | $3 >>> 0 < $9 >>> 0;
12191   $7 = $4 ? $0 : $13;
12192   $3 = $4 ? $3 : $9;
12193   $0 = 1;
12194   if (($3 | 0) == ($15 | 0) & $17 >>> 0 < $7 >>> 0 | $15 >>> 0 < $3 >>> 0) {
12195    break label$4
12196   }
12197   $0 = ($8 | 0) == ($9 | 0) & $12 >>> 0 < $13 >>> 0 | $8 >>> 0 < $9 >>> 0;
12198   $3 = $0;
12199   $4 = $3 ? $12 : $13;
12200   $0 = $3 ? $8 : $9;
12201   $0 = ($0 | 0) == ($10 | 0) & $16 >>> 0 < $4 >>> 0 | $10 >>> 0 < $0 >>> 0 ? 2 : $3 ? 3 : 4;
12202  }
12203  $6 = $2;
12204  if ($18 | $19) {
12205   $11 = Math_fround(log((+($19 >>> 0) + 4294967296.0 * +($18 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)
12206  } else {
12207   $11 = Math_fround(0.0)
12208  }
12209  HEAPF32[$6 >> 2] = $11;
12210  $6 = $2;
12211  if ($15 | $17) {
12212   $11 = Math_fround(log((+($17 >>> 0) + 4294967296.0 * +($15 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)
12213  } else {
12214   $11 = Math_fround(0.0)
12215  }
12216  HEAPF32[$6 + 4 >> 2] = $11;
12217  $6 = $2;
12218  if ($10 | $16) {
12219   $11 = Math_fround(log((+($16 >>> 0) + 4294967296.0 * +($10 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)
12220  } else {
12221   $11 = Math_fround(0.0)
12222  }
12223  HEAPF32[$6 + 8 >> 2] = $11;
12224  $6 = $2;
12225  if ($8 | $12) {
12226   $11 = Math_fround(log((+($12 >>> 0) + 4294967296.0 * +($8 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)
12227  } else {
12228   $11 = Math_fround(0.0)
12229  }
12230  HEAPF32[$6 + 12 >> 2] = $11;
12231  if (!($9 | $13)) {
12232   HEAPF32[$2 + 16 >> 2] = 0;
12233   return $0 | 0;
12234  }
12235  (wasm2js_i32$0 = $2, wasm2js_f32$0 = Math_fround(log((+($13 >>> 0) + 4294967296.0 * +($9 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)), HEAPF32[wasm2js_i32$0 + 16 >> 2] = wasm2js_f32$0;
12236  return $0 | 0;
12237 }
12238
12239 function FLAC__fixed_compute_residual($0, $1, $2, $3) {
12240  var $4 = 0, $5 = 0;
12241  label$1 : {
12242   label$2 : {
12243    label$3 : {
12244     switch ($2 | 0) {
12245     case 4:
12246      $2 = 0;
12247      if (($1 | 0) <= 0) {
12248       break label$2
12249      }
12250      while (1) {
12251       $5 = $2 << 2;
12252       $4 = $5 + $0 | 0;
12253       HEAP32[$3 + $5 >> 2] = (HEAP32[$4 + -16 >> 2] + (HEAP32[$4 >> 2] + Math_imul(HEAP32[$4 + -8 >> 2], 6) | 0) | 0) - (HEAP32[$4 + -12 >> 2] + HEAP32[$4 + -4 >> 2] << 2);
12254       $2 = $2 + 1 | 0;
12255       if (($2 | 0) != ($1 | 0)) {
12256        continue
12257       }
12258       break;
12259      };
12260      break label$2;
12261     case 3:
12262      $2 = 0;
12263      if (($1 | 0) <= 0) {
12264       break label$2
12265      }
12266      while (1) {
12267       $5 = $2 << 2;
12268       $4 = $5 + $0 | 0;
12269       HEAP32[$3 + $5 >> 2] = (HEAP32[$4 >> 2] - HEAP32[$4 + -12 >> 2] | 0) + Math_imul(HEAP32[$4 + -8 >> 2] - HEAP32[$4 + -4 >> 2] | 0, 3);
12270       $2 = $2 + 1 | 0;
12271       if (($2 | 0) != ($1 | 0)) {
12272        continue
12273       }
12274       break;
12275      };
12276      break label$2;
12277     case 2:
12278      $2 = 0;
12279      if (($1 | 0) <= 0) {
12280       break label$2
12281      }
12282      while (1) {
12283       $5 = $2 << 2;
12284       $4 = $5 + $0 | 0;
12285       HEAP32[$3 + $5 >> 2] = HEAP32[$4 + -8 >> 2] + (HEAP32[$4 >> 2] - (HEAP32[$4 + -4 >> 2] << 1) | 0);
12286       $2 = $2 + 1 | 0;
12287       if (($2 | 0) != ($1 | 0)) {
12288        continue
12289       }
12290       break;
12291      };
12292      break label$2;
12293     case 0:
12294      break label$1;
12295     case 1:
12296      break label$3;
12297     default:
12298      break label$2;
12299     };
12300    }
12301    $2 = 0;
12302    if (($1 | 0) <= 0) {
12303     break label$2
12304    }
12305    while (1) {
12306     $5 = $2 << 2;
12307     $4 = $5 + $0 | 0;
12308     HEAP32[$3 + $5 >> 2] = HEAP32[$4 >> 2] - HEAP32[$4 + -4 >> 2];
12309     $2 = $2 + 1 | 0;
12310     if (($2 | 0) != ($1 | 0)) {
12311      continue
12312     }
12313     break;
12314    };
12315   }
12316   return;
12317  }
12318  memcpy($3, $0, $1 << 2);
12319 }
12320
12321 function FLAC__fixed_restore_signal($0, $1, $2, $3) {
12322  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
12323  label$1 : {
12324   label$2 : {
12325    label$3 : {
12326     switch ($2 | 0) {
12327     case 4:
12328      if (($1 | 0) < 1) {
12329       break label$2
12330      }
12331      $5 = HEAP32[$3 + -12 >> 2];
12332      $6 = HEAP32[$3 + -4 >> 2];
12333      $2 = 0;
12334      while (1) {
12335       $8 = $2 << 2;
12336       $7 = $8 + $3 | 0;
12337       $4 = HEAP32[$7 + -8 >> 2];
12338       $6 = ((HEAP32[$0 + $8 >> 2] + Math_imul($4, -6) | 0) - HEAP32[$7 + -16 >> 2] | 0) + ($5 + $6 << 2) | 0;
12339       HEAP32[$7 >> 2] = $6;
12340       $5 = $4;
12341       $2 = $2 + 1 | 0;
12342       if (($2 | 0) != ($1 | 0)) {
12343        continue
12344       }
12345       break;
12346      };
12347      break label$2;
12348     case 3:
12349      if (($1 | 0) < 1) {
12350       break label$2
12351      }
12352      $4 = HEAP32[$3 + -12 >> 2];
12353      $5 = HEAP32[$3 + -4 >> 2];
12354      $2 = 0;
12355      while (1) {
12356       $6 = $2 << 2;
12357       $7 = $6 + $3 | 0;
12358       $8 = HEAP32[$0 + $6 >> 2] + $4 | 0;
12359       $4 = HEAP32[$7 + -8 >> 2];
12360       $5 = $8 + Math_imul($5 - $4 | 0, 3) | 0;
12361       HEAP32[$7 >> 2] = $5;
12362       $2 = $2 + 1 | 0;
12363       if (($2 | 0) != ($1 | 0)) {
12364        continue
12365       }
12366       break;
12367      };
12368      break label$2;
12369     case 2:
12370      if (($1 | 0) < 1) {
12371       break label$2
12372      }
12373      $4 = HEAP32[$3 + -4 >> 2];
12374      $2 = 0;
12375      while (1) {
12376       $5 = $2 << 2;
12377       $6 = $5 + $3 | 0;
12378       $4 = (HEAP32[$0 + $5 >> 2] + ($4 << 1) | 0) - HEAP32[$6 + -8 >> 2] | 0;
12379       HEAP32[$6 >> 2] = $4;
12380       $2 = $2 + 1 | 0;
12381       if (($2 | 0) != ($1 | 0)) {
12382        continue
12383       }
12384       break;
12385      };
12386      break label$2;
12387     case 0:
12388      break label$1;
12389     case 1:
12390      break label$3;
12391     default:
12392      break label$2;
12393     };
12394    }
12395    if (($1 | 0) < 1) {
12396     break label$2
12397    }
12398    $4 = HEAP32[$3 + -4 >> 2];
12399    $2 = 0;
12400    while (1) {
12401     $5 = $2 << 2;
12402     $4 = HEAP32[$5 + $0 >> 2] + $4 | 0;
12403     HEAP32[$3 + $5 >> 2] = $4;
12404     $2 = $2 + 1 | 0;
12405     if (($2 | 0) != ($1 | 0)) {
12406      continue
12407     }
12408     break;
12409    };
12410   }
12411   return;
12412  }
12413  memcpy($3, $0, $1 << 2);
12414 }
12415
12416 function __toread($0) {
12417  var $1 = 0, $2 = 0;
12418  $1 = HEAPU8[$0 + 74 | 0];
12419  HEAP8[$0 + 74 | 0] = $1 + -1 | $1;
12420  if (HEAPU32[$0 + 20 >> 2] > HEAPU32[$0 + 28 >> 2]) {
12421   FUNCTION_TABLE[HEAP32[$0 + 36 >> 2]]($0, 0, 0) | 0
12422  }
12423  HEAP32[$0 + 28 >> 2] = 0;
12424  HEAP32[$0 + 16 >> 2] = 0;
12425  HEAP32[$0 + 20 >> 2] = 0;
12426  $1 = HEAP32[$0 >> 2];
12427  if ($1 & 4) {
12428   HEAP32[$0 >> 2] = $1 | 32;
12429   return -1;
12430  }
12431  $2 = HEAP32[$0 + 44 >> 2] + HEAP32[$0 + 48 >> 2] | 0;
12432  HEAP32[$0 + 8 >> 2] = $2;
12433  HEAP32[$0 + 4 >> 2] = $2;
12434  return $1 << 27 >> 31;
12435 }
12436
12437 function FLAC__stream_decoder_new() {
12438  var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0;
12439  $3 = dlcalloc(1, 8);
12440  if ($3) {
12441   $2 = dlcalloc(1, 504);
12442   HEAP32[$3 >> 2] = $2;
12443   if ($2) {
12444    $0 = dlcalloc(1, 6160);
12445    HEAP32[$3 + 4 >> 2] = $0;
12446    if ($0) {
12447     $1 = dlcalloc(1, 44);
12448     HEAP32[$0 + 56 >> 2] = $1;
12449     if ($1) {
12450      HEAP32[$0 + 1128 >> 2] = 16;
12451      $4 = dlmalloc(HEAP32[1364] << 1 & -16);
12452      HEAP32[$0 + 1120 >> 2] = $4;
12453      if ($4) {
12454       HEAP32[$0 + 252 >> 2] = 0;
12455       HEAP32[$0 + 220 >> 2] = 0;
12456       HEAP32[$0 + 224 >> 2] = 0;
12457       $1 = $0 + 3616 | 0;
12458       HEAP32[$1 >> 2] = 0;
12459       HEAP32[$1 + 4 >> 2] = 0;
12460       $1 = $0 + 3608 | 0;
12461       HEAP32[$1 >> 2] = 0;
12462       HEAP32[$1 + 4 >> 2] = 0;
12463       $1 = $0 + 3600 | 0;
12464       HEAP32[$1 >> 2] = 0;
12465       HEAP32[$1 + 4 >> 2] = 0;
12466       $1 = $0 + 3592 | 0;
12467       HEAP32[$1 >> 2] = 0;
12468       HEAP32[$1 + 4 >> 2] = 0;
12469       HEAP32[$0 + 60 >> 2] = 0;
12470       HEAP32[$0 + 64 >> 2] = 0;
12471       HEAP32[$0 + 68 >> 2] = 0;
12472       HEAP32[$0 + 72 >> 2] = 0;
12473       HEAP32[$0 + 76 >> 2] = 0;
12474       HEAP32[$0 + 80 >> 2] = 0;
12475       HEAP32[$0 + 84 >> 2] = 0;
12476       HEAP32[$0 + 88 >> 2] = 0;
12477       HEAP32[$0 + 92 >> 2] = 0;
12478       HEAP32[$0 + 96 >> 2] = 0;
12479       HEAP32[$0 + 100 >> 2] = 0;
12480       HEAP32[$0 + 104 >> 2] = 0;
12481       HEAP32[$0 + 108 >> 2] = 0;
12482       HEAP32[$0 + 112 >> 2] = 0;
12483       HEAP32[$0 + 116 >> 2] = 0;
12484       HEAP32[$0 + 120 >> 2] = 0;
12485       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 124 | 0);
12486       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 136 | 0);
12487       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 148 | 0);
12488       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 160 | 0);
12489       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 172 | 0);
12490       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 184 | 0);
12491       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 196 | 0);
12492       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 208 | 0);
12493       HEAP32[$0 + 48 >> 2] = 0;
12494       HEAP32[$0 + 52 >> 2] = 0;
12495       memset($0 + 608 | 0, 512);
12496       HEAP32[$0 + 1124 >> 2] = 0;
12497       HEAP32[$0 + 608 >> 2] = 1;
12498       HEAP32[$0 + 32 >> 2] = 0;
12499       HEAP32[$0 + 24 >> 2] = 0;
12500       HEAP32[$0 + 28 >> 2] = 0;
12501       HEAP32[$0 + 16 >> 2] = 0;
12502       HEAP32[$0 + 20 >> 2] = 0;
12503       HEAP32[$0 + 8 >> 2] = 0;
12504       HEAP32[$0 + 12 >> 2] = 0;
12505       HEAP32[$0 >> 2] = 0;
12506       HEAP32[$0 + 4 >> 2] = 0;
12507       HEAP32[$2 + 28 >> 2] = 0;
12508       FLAC__ogg_decoder_aspect_set_defaults($2 + 32 | 0);
12509       HEAP32[$2 >> 2] = 9;
12510       return $3 | 0;
12511      }
12512      FLAC__bitreader_delete($1);
12513     }
12514     dlfree($0);
12515    }
12516    dlfree($2);
12517   }
12518   dlfree($3);
12519  }
12520  return 0;
12521 }
12522
12523 function FLAC__stream_decoder_delete($0) {
12524  $0 = $0 | 0;
12525  var $1 = 0, $2 = 0;
12526  if ($0) {
12527   FLAC__stream_decoder_finish($0);
12528   $1 = HEAP32[$0 + 4 >> 2];
12529   $2 = HEAP32[$1 + 1120 >> 2];
12530   if ($2) {
12531    dlfree($2);
12532    $1 = HEAP32[$0 + 4 >> 2];
12533   }
12534   FLAC__bitreader_delete(HEAP32[$1 + 56 >> 2]);
12535   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 124 | 0);
12536   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 136 | 0);
12537   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 148 | 0);
12538   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 160 | 0);
12539   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 172 | 0);
12540   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 184 | 0);
12541   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 196 | 0);
12542   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 208 | 0);
12543   dlfree(HEAP32[$0 + 4 >> 2]);
12544   dlfree(HEAP32[$0 >> 2]);
12545   dlfree($0);
12546  }
12547 }
12548
12549 function FLAC__stream_decoder_finish($0) {
12550  $0 = $0 | 0;
12551  var $1 = 0, $2 = 0, $3 = 0;
12552  $3 = 1;
12553  if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9) {
12554   $1 = HEAP32[$0 + 4 >> 2];
12555   FLAC__MD5Final($1 + 3732 | 0, $1 + 3636 | 0);
12556   dlfree(HEAP32[HEAP32[$0 + 4 >> 2] + 452 >> 2]);
12557   HEAP32[HEAP32[$0 + 4 >> 2] + 452 >> 2] = 0;
12558   $1 = HEAP32[$0 + 4 >> 2];
12559   HEAP32[$1 + 252 >> 2] = 0;
12560   FLAC__bitreader_free(HEAP32[$1 + 56 >> 2]);
12561   $3 = $0 + 4 | 0;
12562   $1 = HEAP32[$0 + 4 >> 2];
12563   $2 = HEAP32[$1 + 60 >> 2];
12564   if ($2) {
12565    dlfree($2 + -16 | 0);
12566    HEAP32[HEAP32[$3 >> 2] + 60 >> 2] = 0;
12567    $1 = HEAP32[$3 >> 2];
12568   }
12569   $2 = HEAP32[$1 + 3592 >> 2];
12570   if ($2) {
12571    dlfree($2);
12572    HEAP32[HEAP32[$3 >> 2] + 92 >> 2] = 0;
12573    HEAP32[HEAP32[$3 >> 2] + 3592 >> 2] = 0;
12574    $1 = HEAP32[$3 >> 2];
12575   }
12576   $2 = HEAP32[$1 - -64 >> 2];
12577   if ($2) {
12578    dlfree($2 + -16 | 0);
12579    HEAP32[HEAP32[$3 >> 2] - -64 >> 2] = 0;
12580    $1 = HEAP32[$3 >> 2];
12581   }
12582   $2 = HEAP32[$1 + 3596 >> 2];
12583   if ($2) {
12584    dlfree($2);
12585    HEAP32[HEAP32[$3 >> 2] + 96 >> 2] = 0;
12586    HEAP32[HEAP32[$3 >> 2] + 3596 >> 2] = 0;
12587    $1 = HEAP32[$3 >> 2];
12588   }
12589   $2 = HEAP32[$1 + 68 >> 2];
12590   if ($2) {
12591    dlfree($2 + -16 | 0);
12592    HEAP32[HEAP32[$3 >> 2] + 68 >> 2] = 0;
12593    $1 = HEAP32[$3 >> 2];
12594   }
12595   $2 = HEAP32[$1 + 3600 >> 2];
12596   if ($2) {
12597    dlfree($2);
12598    HEAP32[HEAP32[$3 >> 2] + 100 >> 2] = 0;
12599    HEAP32[HEAP32[$3 >> 2] + 3600 >> 2] = 0;
12600    $1 = HEAP32[$3 >> 2];
12601   }
12602   $2 = HEAP32[$1 + 72 >> 2];
12603   if ($2) {
12604    dlfree($2 + -16 | 0);
12605    HEAP32[HEAP32[$3 >> 2] + 72 >> 2] = 0;
12606    $1 = HEAP32[$3 >> 2];
12607   }
12608   $2 = HEAP32[$1 + 3604 >> 2];
12609   if ($2) {
12610    dlfree($2);
12611    HEAP32[HEAP32[$3 >> 2] + 104 >> 2] = 0;
12612    HEAP32[HEAP32[$3 >> 2] + 3604 >> 2] = 0;
12613    $1 = HEAP32[$3 >> 2];
12614   }
12615   $2 = HEAP32[$1 + 76 >> 2];
12616   if ($2) {
12617    dlfree($2 + -16 | 0);
12618    HEAP32[HEAP32[$3 >> 2] + 76 >> 2] = 0;
12619    $1 = HEAP32[$3 >> 2];
12620   }
12621   $2 = HEAP32[$1 + 3608 >> 2];
12622   if ($2) {
12623    dlfree($2);
12624    HEAP32[HEAP32[$3 >> 2] + 108 >> 2] = 0;
12625    HEAP32[HEAP32[$3 >> 2] + 3608 >> 2] = 0;
12626    $1 = HEAP32[$3 >> 2];
12627   }
12628   $2 = HEAP32[$1 + 80 >> 2];
12629   if ($2) {
12630    dlfree($2 + -16 | 0);
12631    HEAP32[HEAP32[$3 >> 2] + 80 >> 2] = 0;
12632    $1 = HEAP32[$3 >> 2];
12633   }
12634   $2 = HEAP32[$1 + 3612 >> 2];
12635   if ($2) {
12636    dlfree($2);
12637    HEAP32[HEAP32[$3 >> 2] + 112 >> 2] = 0;
12638    HEAP32[HEAP32[$3 >> 2] + 3612 >> 2] = 0;
12639    $1 = HEAP32[$3 >> 2];
12640   }
12641   $2 = HEAP32[$1 + 84 >> 2];
12642   if ($2) {
12643    dlfree($2 + -16 | 0);
12644    HEAP32[HEAP32[$3 >> 2] + 84 >> 2] = 0;
12645    $1 = HEAP32[$3 >> 2];
12646   }
12647   $2 = HEAP32[$1 + 3616 >> 2];
12648   if ($2) {
12649    dlfree($2);
12650    HEAP32[HEAP32[$3 >> 2] + 116 >> 2] = 0;
12651    HEAP32[HEAP32[$3 >> 2] + 3616 >> 2] = 0;
12652    $1 = HEAP32[$3 >> 2];
12653   }
12654   $2 = HEAP32[$1 + 88 >> 2];
12655   if ($2) {
12656    dlfree($2 + -16 | 0);
12657    HEAP32[HEAP32[$3 >> 2] + 88 >> 2] = 0;
12658    $1 = HEAP32[$3 >> 2];
12659   }
12660   $2 = HEAP32[$1 + 3620 >> 2];
12661   if ($2) {
12662    dlfree($2);
12663    HEAP32[HEAP32[$3 >> 2] + 120 >> 2] = 0;
12664    HEAP32[HEAP32[$3 >> 2] + 3620 >> 2] = 0;
12665    $1 = HEAP32[$3 >> 2];
12666   }
12667   HEAP32[$1 + 220 >> 2] = 0;
12668   HEAP32[$1 + 224 >> 2] = 0;
12669   if (HEAP32[$1 >> 2]) {
12670    $1 = HEAP32[$0 >> 2] + 32 | 0;
12671    ogg_sync_clear($1 + 368 | 0);
12672    ogg_stream_clear($1 + 8 | 0);
12673    $1 = HEAP32[$0 + 4 >> 2];
12674   }
12675   $2 = HEAP32[$1 + 52 >> 2];
12676   if ($2) {
12677    if (($2 | 0) != HEAP32[1887]) {
12678     fclose($2);
12679     $1 = HEAP32[$3 >> 2];
12680    }
12681    HEAP32[$1 + 52 >> 2] = 0;
12682   }
12683   $3 = 1;
12684   if (HEAP32[$1 + 3624 >> 2]) {
12685    $3 = !memcmp($1 + 312 | 0, $1 + 3732 | 0, 16)
12686   }
12687   HEAP32[$1 + 48 >> 2] = 0;
12688   HEAP32[$1 + 3632 >> 2] = 0;
12689   memset($1 + 608 | 0, 512);
12690   HEAP32[$1 + 32 >> 2] = 0;
12691   HEAP32[$1 + 24 >> 2] = 0;
12692   HEAP32[$1 + 28 >> 2] = 0;
12693   HEAP32[$1 + 16 >> 2] = 0;
12694   HEAP32[$1 + 20 >> 2] = 0;
12695   HEAP32[$1 + 8 >> 2] = 0;
12696   HEAP32[$1 + 12 >> 2] = 0;
12697   HEAP32[$1 >> 2] = 0;
12698   HEAP32[$1 + 4 >> 2] = 0;
12699   $1 = HEAP32[$0 + 4 >> 2];
12700   HEAP32[$1 + 1124 >> 2] = 0;
12701   HEAP32[$1 + 608 >> 2] = 1;
12702   $1 = HEAP32[$0 >> 2];
12703   HEAP32[$1 + 28 >> 2] = 0;
12704   FLAC__ogg_decoder_aspect_set_defaults($1 + 32 | 0);
12705   HEAP32[HEAP32[$0 >> 2] >> 2] = 9;
12706  }
12707  return $3 | 0;
12708 }
12709
12710 function FLAC__stream_decoder_init_stream($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
12711  $0 = $0 | 0;
12712  $1 = $1 | 0;
12713  $2 = $2 | 0;
12714  $3 = $3 | 0;
12715  $4 = $4 | 0;
12716  $5 = $5 | 0;
12717  $6 = $6 | 0;
12718  $7 = $7 | 0;
12719  $8 = $8 | 0;
12720  $9 = $9 | 0;
12721  return init_stream_internal_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, 0) | 0;
12722 }
12723
12724 function init_stream_internal_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {
12725  var $11 = 0, $12 = 0;
12726  $11 = 5;
12727  label$1 : {
12728   $12 = HEAP32[$0 >> 2];
12729   label$2 : {
12730    if (HEAP32[$12 >> 2] != 9) {
12731     break label$2
12732    }
12733    $11 = 2;
12734    if (!$8 | (!$1 | !$6)) {
12735     break label$2
12736    }
12737    if ($2) {
12738     if (!$5 | (!$3 | !$4)) {
12739      break label$2
12740     }
12741    }
12742    $11 = HEAP32[$0 + 4 >> 2];
12743    HEAP32[$11 >> 2] = $10;
12744    if ($10) {
12745     if (!FLAC__ogg_decoder_aspect_init($12 + 32 | 0)) {
12746      break label$1
12747     }
12748     $11 = HEAP32[$0 + 4 >> 2];
12749    }
12750    FLAC__cpu_info($11 + 3524 | 0);
12751    $10 = HEAP32[$0 + 4 >> 2];
12752    HEAP32[$10 + 44 >> 2] = 5;
12753    HEAP32[$10 + 40 >> 2] = 6;
12754    HEAP32[$10 + 36 >> 2] = 5;
12755    if (!FLAC__bitreader_init(HEAP32[$10 + 56 >> 2], $0)) {
12756     HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
12757     return 3;
12758    }
12759    $10 = HEAP32[$0 + 4 >> 2];
12760    HEAP32[$10 + 48 >> 2] = $9;
12761    HEAP32[$10 + 32 >> 2] = $8;
12762    HEAP32[$10 + 28 >> 2] = $7;
12763    HEAP32[$10 + 24 >> 2] = $6;
12764    HEAP32[$10 + 20 >> 2] = $5;
12765    HEAP32[$10 + 16 >> 2] = $4;
12766    HEAP32[$10 + 12 >> 2] = $3;
12767    HEAP32[$10 + 8 >> 2] = $2;
12768    HEAP32[$10 + 4 >> 2] = $1;
12769    HEAP32[$10 + 3520 >> 2] = 0;
12770    HEAP32[$10 + 248 >> 2] = 0;
12771    HEAP32[$10 + 240 >> 2] = 0;
12772    HEAP32[$10 + 244 >> 2] = 0;
12773    HEAP32[$10 + 228 >> 2] = 0;
12774    HEAP32[$10 + 232 >> 2] = 0;
12775    HEAP32[$10 + 3624 >> 2] = HEAP32[HEAP32[$0 >> 2] + 28 >> 2];
12776    HEAP32[$10 + 3628 >> 2] = 1;
12777    HEAP32[$10 + 3632 >> 2] = 0;
12778    $11 = FLAC__stream_decoder_reset($0) ? 0 : 3;
12779   }
12780   return $11;
12781  }
12782  HEAP32[HEAP32[$0 >> 2] + 4 >> 2] = 4;
12783  return 4;
12784 }
12785
12786 function read_callback_($0, $1, $2) {
12787  $0 = $0 | 0;
12788  $1 = $1 | 0;
12789  $2 = $2 | 0;
12790  var $3 = 0, $4 = 0;
12791  label$1 : {
12792   $3 = HEAP32[$2 + 4 >> 2];
12793   if (HEAP32[$3 >> 2]) {
12794    break label$1
12795   }
12796   $4 = HEAP32[$3 + 20 >> 2];
12797   if (!$4) {
12798    break label$1
12799   }
12800   if (!FUNCTION_TABLE[$4]($2, HEAP32[$3 + 48 >> 2])) {
12801    break label$1
12802   }
12803   HEAP32[$1 >> 2] = 0;
12804   HEAP32[HEAP32[$2 >> 2] >> 2] = 4;
12805   return 0;
12806  }
12807  label$2 : {
12808   label$3 : {
12809    if (HEAP32[$1 >> 2]) {
12810     $3 = HEAP32[$2 + 4 >> 2];
12811     if (!(!HEAP32[$3 + 3632 >> 2] | HEAPU32[$3 + 6152 >> 2] < 21)) {
12812      HEAP32[HEAP32[$2 >> 2] >> 2] = 7;
12813      break label$3;
12814     }
12815     label$6 : {
12816      label$7 : {
12817       label$8 : {
12818        label$9 : {
12819         if (HEAP32[$3 >> 2]) {
12820          $4 = 0;
12821          switch (FLAC__ogg_decoder_aspect_read_callback_wrapper(HEAP32[$2 >> 2] + 32 | 0, $0, $1, $2, HEAP32[$3 + 48 >> 2]) | 0) {
12822          case 0:
12823          case 2:
12824           break label$7;
12825          case 1:
12826           break label$8;
12827          default:
12828           break label$9;
12829          };
12830         }
12831         $4 = FUNCTION_TABLE[HEAP32[$3 + 4 >> 2]]($2, $0, $1, HEAP32[$3 + 48 >> 2]) | 0;
12832         if (($4 | 0) != 2) {
12833          break label$7
12834         }
12835        }
12836        HEAP32[HEAP32[$2 >> 2] >> 2] = 7;
12837        break label$3;
12838       }
12839       $0 = 1;
12840       if (!HEAP32[$1 >> 2]) {
12841        break label$6
12842       }
12843       break label$2;
12844      }
12845      $0 = 1;
12846      if (HEAP32[$1 >> 2]) {
12847       break label$2
12848      }
12849      if (($4 | 0) == 1) {
12850       break label$6
12851      }
12852      $1 = HEAP32[$2 + 4 >> 2];
12853      if (HEAP32[$1 >> 2]) {
12854       break label$2
12855      }
12856      $3 = HEAP32[$1 + 20 >> 2];
12857      if (!$3) {
12858       break label$2
12859      }
12860      if (!FUNCTION_TABLE[$3]($2, HEAP32[$1 + 48 >> 2])) {
12861       break label$2
12862      }
12863     }
12864     HEAP32[HEAP32[$2 >> 2] >> 2] = 4;
12865     break label$3;
12866    }
12867    HEAP32[HEAP32[$2 >> 2] >> 2] = 7;
12868   }
12869   $0 = 0;
12870  }
12871  return $0 | 0;
12872 }
12873
12874 function FLAC__stream_decoder_reset($0) {
12875  $0 = $0 | 0;
12876  var $1 = 0, $2 = 0, $3 = 0;
12877  $1 = HEAP32[$0 + 4 >> 2];
12878  label$1 : {
12879   if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9 ? !HEAP32[$1 + 3628 >> 2] : 0) {
12880    break label$1
12881   }
12882   HEAP32[$1 + 3624 >> 2] = 0;
12883   HEAP32[$1 + 240 >> 2] = 0;
12884   HEAP32[$1 + 244 >> 2] = 0;
12885   if (HEAP32[$1 >> 2]) {
12886    $1 = HEAP32[$0 >> 2] + 32 | 0;
12887    ogg_stream_reset($1 + 8 | 0);
12888    ogg_sync_reset($1 + 368 | 0);
12889    HEAP32[$1 + 408 >> 2] = 0;
12890    HEAP32[$1 + 412 >> 2] = 0;
12891    $1 = HEAP32[$0 + 4 >> 2];
12892   }
12893   $1 = HEAP32[$1 + 56 >> 2];
12894   HEAP32[$1 + 8 >> 2] = 0;
12895   HEAP32[$1 + 12 >> 2] = 0;
12896   HEAP32[$1 + 16 >> 2] = 0;
12897   HEAP32[$1 + 20 >> 2] = 0;
12898   $1 = 1;
12899   $2 = HEAP32[$0 >> 2];
12900   if (!$1) {
12901    HEAP32[$2 >> 2] = 8;
12902    return 0;
12903   }
12904   HEAP32[$2 >> 2] = 2;
12905   $1 = HEAP32[$0 + 4 >> 2];
12906   if (HEAP32[$1 >> 2]) {
12907    FLAC__ogg_decoder_aspect_reset($2 + 32 | 0);
12908    $1 = HEAP32[$0 + 4 >> 2];
12909   }
12910   label$6 : {
12911    if (!HEAP32[$1 + 3628 >> 2]) {
12912     $2 = 0;
12913     if (HEAP32[$1 + 52 >> 2] == HEAP32[1887]) {
12914      break label$1
12915     }
12916     $3 = HEAP32[$1 + 8 >> 2];
12917     if (!$3) {
12918      break label$6
12919     }
12920     if ((FUNCTION_TABLE[$3]($0, 0, 0, HEAP32[$1 + 48 >> 2]) | 0) == 1) {
12921      break label$1
12922     }
12923     $1 = HEAP32[$0 + 4 >> 2];
12924     break label$6;
12925    }
12926    HEAP32[$1 + 3628 >> 2] = 0;
12927   }
12928   HEAP32[HEAP32[$0 >> 2] >> 2] = 0;
12929   HEAP32[$1 + 248 >> 2] = 0;
12930   dlfree(HEAP32[$1 + 452 >> 2]);
12931   HEAP32[HEAP32[$0 + 4 >> 2] + 452 >> 2] = 0;
12932   $1 = HEAP32[$0 + 4 >> 2];
12933   HEAP32[$1 + 252 >> 2] = 0;
12934   HEAP32[$1 + 3624 >> 2] = HEAP32[HEAP32[$0 >> 2] + 28 >> 2];
12935   HEAP32[$1 + 228 >> 2] = 0;
12936   HEAP32[$1 + 232 >> 2] = 0;
12937   FLAC__MD5Init($1 + 3636 | 0);
12938   $0 = HEAP32[$0 + 4 >> 2];
12939   HEAP32[$0 + 6152 >> 2] = 0;
12940   HEAP32[$0 + 6136 >> 2] = 0;
12941   HEAP32[$0 + 6140 >> 2] = 0;
12942   $2 = 1;
12943  }
12944  return $2 | 0;
12945 }
12946
12947 function FLAC__stream_decoder_init_ogg_stream($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
12948  $0 = $0 | 0;
12949  $1 = $1 | 0;
12950  $2 = $2 | 0;
12951  $3 = $3 | 0;
12952  $4 = $4 | 0;
12953  $5 = $5 | 0;
12954  $6 = $6 | 0;
12955  $7 = $7 | 0;
12956  $8 = $8 | 0;
12957  $9 = $9 | 0;
12958  return init_stream_internal_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, 1) | 0;
12959 }
12960
12961 function FLAC__stream_decoder_set_ogg_serial_number($0, $1) {
12962  $0 = $0 | 0;
12963  $1 = $1 | 0;
12964  $0 = HEAP32[$0 >> 2];
12965  if (HEAP32[$0 >> 2] == 9) {
12966   $0 = $0 + 32 | 0;
12967   HEAP32[$0 + 4 >> 2] = $1;
12968   HEAP32[$0 >> 2] = 0;
12969   $0 = 1;
12970  } else {
12971   $0 = 0
12972  }
12973  return $0 | 0;
12974 }
12975
12976 function FLAC__stream_decoder_set_md5_checking($0, $1) {
12977  $0 = $0 | 0;
12978  $1 = $1 | 0;
12979  $0 = HEAP32[$0 >> 2];
12980  if (HEAP32[$0 >> 2] == 9) {
12981   HEAP32[$0 + 28 >> 2] = $1;
12982   $0 = 1;
12983  } else {
12984   $0 = 0
12985  }
12986  return $0 | 0;
12987 }
12988
12989 function FLAC__stream_decoder_set_metadata_respond($0, $1) {
12990  $0 = $0 | 0;
12991  $1 = $1 | 0;
12992  var $2 = 0;
12993  label$1 : {
12994   if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9 | $1 >>> 0 > 126) {
12995    break label$1
12996   }
12997   $2 = 1;
12998   $0 = HEAP32[$0 + 4 >> 2];
12999   HEAP32[($0 + ($1 << 2) | 0) + 608 >> 2] = 1;
13000   if (($1 | 0) != 2) {
13001    break label$1
13002   }
13003   HEAP32[$0 + 1124 >> 2] = 0;
13004  }
13005  return $2 | 0;
13006 }
13007
13008 function FLAC__stream_decoder_set_metadata_respond_application($0, $1) {
13009  $0 = $0 | 0;
13010  $1 = $1 | 0;
13011  var $2 = 0, $3 = 0, $4 = 0;
13012  $2 = 0;
13013  label$1 : {
13014   if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9) {
13015    break label$1
13016   }
13017   $3 = HEAP32[$0 + 4 >> 2];
13018   $2 = 1;
13019   if (HEAP32[$3 + 616 >> 2]) {
13020    break label$1
13021   }
13022   $2 = HEAP32[$3 + 1120 >> 2];
13023   label$2 : {
13024    $4 = HEAP32[$3 + 1124 >> 2];
13025    label$3 : {
13026     if (($4 | 0) != HEAP32[$3 + 1128 >> 2]) {
13027      $3 = $2;
13028      break label$3;
13029     }
13030     label$5 : {
13031      if (!$4) {
13032       $3 = dlrealloc($2, 0);
13033       break label$5;
13034      }
13035      if ($4 + $4 >>> 0 >= $4 >>> 0) {
13036       $3 = dlrealloc($2, $4 << 1);
13037       if ($3) {
13038        break label$5
13039       }
13040       dlfree($2);
13041       $3 = HEAP32[$0 + 4 >> 2];
13042      }
13043      HEAP32[$3 + 1120 >> 2] = 0;
13044      break label$2;
13045     }
13046     $2 = HEAP32[$0 + 4 >> 2];
13047     HEAP32[$2 + 1120 >> 2] = $3;
13048     if (!$3) {
13049      break label$2
13050     }
13051     HEAP32[$2 + 1128 >> 2] = HEAP32[$2 + 1128 >> 2] << 1;
13052     $4 = HEAP32[$2 + 1124 >> 2];
13053    }
13054    $2 = $3;
13055    $3 = HEAP32[1364] >>> 3 | 0;
13056    memcpy($2 + Math_imul($3, $4) | 0, $1, $3);
13057    $0 = HEAP32[$0 + 4 >> 2];
13058    HEAP32[$0 + 1124 >> 2] = HEAP32[$0 + 1124 >> 2] + 1;
13059    return 1;
13060   }
13061   HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13062   $2 = 0;
13063  }
13064  return $2 | 0;
13065 }
13066
13067 function FLAC__stream_decoder_set_metadata_respond_all($0) {
13068  $0 = $0 | 0;
13069  var $1 = 0;
13070  if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9) {
13071   $1 = HEAP32[$0 + 4 >> 2];
13072   $0 = 0;
13073   while (1) {
13074    HEAP32[($1 + ($0 << 2) | 0) + 608 >> 2] = 1;
13075    $0 = $0 + 1 | 0;
13076    if (($0 | 0) != 128) {
13077     continue
13078    }
13079    break;
13080   };
13081   HEAP32[$1 + 1124 >> 2] = 0;
13082   $0 = 1;
13083  } else {
13084   $0 = 0
13085  }
13086  return $0 | 0;
13087 }
13088
13089 function FLAC__stream_decoder_set_metadata_ignore($0, $1) {
13090  $0 = $0 | 0;
13091  $1 = $1 | 0;
13092  var $2 = 0;
13093  label$1 : {
13094   if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9 | $1 >>> 0 > 126) {
13095    break label$1
13096   }
13097   $0 = HEAP32[$0 + 4 >> 2];
13098   HEAP32[($0 + ($1 << 2) | 0) + 608 >> 2] = 0;
13099   $2 = 1;
13100   if (($1 | 0) != 2) {
13101    break label$1
13102   }
13103   HEAP32[$0 + 1124 >> 2] = 0;
13104  }
13105  return $2 | 0;
13106 }
13107
13108 function FLAC__stream_decoder_set_metadata_ignore_application($0, $1) {
13109  $0 = $0 | 0;
13110  $1 = $1 | 0;
13111  var $2 = 0, $3 = 0, $4 = 0;
13112  if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9) {
13113   $2 = HEAP32[$0 + 4 >> 2];
13114   if (!HEAP32[$2 + 616 >> 2]) {
13115    return 1
13116   }
13117   $3 = HEAP32[$2 + 1120 >> 2];
13118   label$3 : {
13119    $4 = HEAP32[$2 + 1124 >> 2];
13120    label$4 : {
13121     if (($4 | 0) != HEAP32[$2 + 1128 >> 2]) {
13122      $2 = $3;
13123      break label$4;
13124     }
13125     label$6 : {
13126      if (!$4) {
13127       $2 = dlrealloc($3, 0);
13128       break label$6;
13129      }
13130      if ($4 + $4 >>> 0 >= $4 >>> 0) {
13131       $2 = dlrealloc($3, $4 << 1);
13132       if ($2) {
13133        break label$6
13134       }
13135       dlfree($3);
13136       $2 = HEAP32[$0 + 4 >> 2];
13137      }
13138      HEAP32[$2 + 1120 >> 2] = 0;
13139      break label$3;
13140     }
13141     $3 = HEAP32[$0 + 4 >> 2];
13142     HEAP32[$3 + 1120 >> 2] = $2;
13143     if (!$2) {
13144      break label$3
13145     }
13146     HEAP32[$3 + 1128 >> 2] = HEAP32[$3 + 1128 >> 2] << 1;
13147     $4 = HEAP32[$3 + 1124 >> 2];
13148    }
13149    $3 = $2;
13150    $2 = HEAP32[1364] >>> 3 | 0;
13151    memcpy($3 + Math_imul($2, $4) | 0, $1, $2);
13152    $0 = HEAP32[$0 + 4 >> 2];
13153    HEAP32[$0 + 1124 >> 2] = HEAP32[$0 + 1124 >> 2] + 1;
13154    return 1;
13155   }
13156   HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13157  }
13158  return 0;
13159 }
13160
13161 function FLAC__stream_decoder_set_metadata_ignore_all($0) {
13162  $0 = $0 | 0;
13163  if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9) {
13164   memset(HEAP32[$0 + 4 >> 2] + 608 | 0, 512);
13165   HEAP32[HEAP32[$0 + 4 >> 2] + 1124 >> 2] = 0;
13166   $0 = 1;
13167  } else {
13168   $0 = 0
13169  }
13170  return $0 | 0;
13171 }
13172
13173 function FLAC__stream_decoder_get_state($0) {
13174  $0 = $0 | 0;
13175  return HEAP32[HEAP32[$0 >> 2] >> 2];
13176 }
13177
13178 function FLAC__stream_decoder_get_md5_checking($0) {
13179  $0 = $0 | 0;
13180  return HEAP32[HEAP32[$0 >> 2] + 28 >> 2];
13181 }
13182
13183 function FLAC__stream_decoder_process_single($0) {
13184  $0 = $0 | 0;
13185  var $1 = 0, $2 = 0, $3 = 0;
13186  $1 = global$0 - 16 | 0;
13187  global$0 = $1;
13188  $2 = 1;
13189  label$1 : {
13190   while (1) {
13191    label$3 : {
13192     label$4 : {
13193      switch (HEAP32[HEAP32[$0 >> 2] >> 2]) {
13194      case 0:
13195       if (find_metadata_($0)) {
13196        continue
13197       }
13198       $2 = 0;
13199       break label$3;
13200      case 1:
13201       $3 = (read_metadata_($0) | 0) != 0;
13202       break label$1;
13203      case 2:
13204       if (frame_sync_($0)) {
13205        continue
13206       }
13207       break label$3;
13208      case 4:
13209      case 7:
13210       break label$3;
13211      case 3:
13212       break label$4;
13213      default:
13214       break label$1;
13215      };
13216     }
13217     if (!read_frame_($0, $1 + 12 | 0)) {
13218      $2 = 0;
13219      break label$3;
13220     }
13221     if (!HEAP32[$1 + 12 >> 2]) {
13222      continue
13223     }
13224    }
13225    break;
13226   };
13227   $3 = $2;
13228  }
13229  global$0 = $1 + 16 | 0;
13230  return $3 | 0;
13231 }
13232
13233 function find_metadata_($0) {
13234  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
13235  $2 = global$0 - 16 | 0;
13236  global$0 = $2;
13237  $5 = 1;
13238  label$1 : {
13239   while (1) {
13240    $1 = 0;
13241    label$3 : {
13242     while (1) {
13243      $6 = HEAP32[$0 + 4 >> 2];
13244      label$5 : {
13245       if (HEAP32[$6 + 3520 >> 2]) {
13246        $4 = HEAPU8[$6 + 3590 | 0];
13247        HEAP32[$2 + 8 >> 2] = $4;
13248        HEAP32[$6 + 3520 >> 2] = 0;
13249        break label$5;
13250       }
13251       if (!FLAC__bitreader_read_raw_uint32(HEAP32[$6 + 56 >> 2], $2 + 8 | 0, 8)) {
13252        $3 = 0;
13253        break label$1;
13254       }
13255       $4 = HEAP32[$2 + 8 >> 2];
13256      }
13257      if (HEAPU8[$3 + 5409 | 0] == ($4 | 0)) {
13258       $3 = $3 + 1 | 0;
13259       $1 = 1;
13260       break label$3;
13261      }
13262      $3 = 0;
13263      if (($1 | 0) == 3) {
13264       break label$1
13265      }
13266      if (HEAPU8[$1 + 7552 | 0] == ($4 | 0)) {
13267       $1 = $1 + 1 | 0;
13268       if (($1 | 0) != 3) {
13269        continue
13270       }
13271       label$10 : {
13272        label$11 : {
13273         if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 24)) {
13274          break label$11
13275         }
13276         if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) {
13277          break label$11
13278         }
13279         $4 = HEAP32[$2 + 12 >> 2];
13280         if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) {
13281          break label$11
13282         }
13283         $6 = HEAP32[$2 + 12 >> 2];
13284         if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) {
13285          break label$11
13286         }
13287         $7 = HEAP32[$2 + 12 >> 2];
13288         if (FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) {
13289          break label$10
13290         }
13291        }
13292        break label$1;
13293       }
13294       if (FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], HEAP32[$2 + 12 >> 2] & 127 | ($7 << 7 & 16256 | ($6 & 127 | $4 << 7 & 16256) << 14))) {
13295        continue
13296       }
13297       break label$1;
13298      }
13299      break;
13300     };
13301     label$12 : {
13302      if (($4 | 0) != 255) {
13303       break label$12
13304      }
13305      HEAP8[HEAP32[$0 + 4 >> 2] + 3588 | 0] = 255;
13306      if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 8 | 0, 8)) {
13307       break label$1
13308      }
13309      $1 = HEAP32[$2 + 8 >> 2];
13310      if (($1 | 0) == 255) {
13311       $1 = HEAP32[$0 + 4 >> 2];
13312       HEAP32[$1 + 3520 >> 2] = 1;
13313       HEAP8[$1 + 3590 | 0] = 255;
13314       break label$12;
13315      }
13316      if (($1 & -2) != 248) {
13317       break label$12
13318      }
13319      HEAP8[HEAP32[$0 + 4 >> 2] + 3589 | 0] = $1;
13320      HEAP32[HEAP32[$0 >> 2] >> 2] = 3;
13321      $3 = 1;
13322      break label$1;
13323     }
13324     $1 = 0;
13325     if (!$5) {
13326      break label$3
13327     }
13328     $5 = HEAP32[$0 + 4 >> 2];
13329     $1 = 0;
13330     if (HEAP32[$5 + 3632 >> 2]) {
13331      break label$3
13332     }
13333     FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 0, HEAP32[$5 + 48 >> 2]);
13334     $1 = 0;
13335    }
13336    $5 = $1;
13337    if ($3 >>> 0 < 4) {
13338     continue
13339    }
13340    break;
13341   };
13342   $3 = 1;
13343   HEAP32[HEAP32[$0 >> 2] >> 2] = 1;
13344  }
13345  global$0 = $2 + 16 | 0;
13346  return $3;
13347 }
13348
13349 function read_metadata_($0) {
13350  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0;
13351  $7 = global$0 - 192 | 0;
13352  global$0 = $7;
13353  label$1 : {
13354   label$2 : {
13355    if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $7 + 184 | 0, HEAP32[1391])) {
13356     break label$2
13357    }
13358    $15 = HEAP32[$7 + 184 >> 2];
13359    $4 = $0 + 4 | 0;
13360    if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 180 | 0, HEAP32[1392])) {
13361     break label$1
13362    }
13363    if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 176 | 0, HEAP32[1393])) {
13364     break label$1
13365    }
13366    $6 = ($15 | 0) != 0;
13367    label$3 : {
13368     label$4 : {
13369      label$5 : {
13370       label$6 : {
13371        label$7 : {
13372         $2 = HEAP32[$7 + 180 >> 2];
13373         switch ($2 | 0) {
13374         case 3:
13375          break label$6;
13376         case 0:
13377          break label$7;
13378         default:
13379          break label$5;
13380         };
13381        }
13382        $3 = HEAP32[$7 + 176 >> 2];
13383        $2 = 0;
13384        $1 = HEAP32[$4 >> 2];
13385        HEAP32[$1 + 256 >> 2] = 0;
13386        HEAP32[$1 + 264 >> 2] = $3;
13387        HEAP32[$1 + 260 >> 2] = $6;
13388        $5 = HEAP32[$1 + 56 >> 2];
13389        $1 = HEAP32[1356];
13390        if (!FLAC__bitreader_read_raw_uint32($5, $7, $1)) {
13391         break label$1
13392        }
13393        HEAP32[HEAP32[$4 >> 2] + 272 >> 2] = HEAP32[$7 >> 2];
13394        $5 = HEAP32[1357];
13395        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $5)) {
13396         break label$1
13397        }
13398        HEAP32[HEAP32[$4 >> 2] + 276 >> 2] = HEAP32[$7 >> 2];
13399        $6 = HEAP32[1358];
13400        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $6)) {
13401         break label$1
13402        }
13403        HEAP32[HEAP32[$4 >> 2] + 280 >> 2] = HEAP32[$7 >> 2];
13404        $8 = HEAP32[1359];
13405        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $8)) {
13406         break label$1
13407        }
13408        HEAP32[HEAP32[$4 >> 2] + 284 >> 2] = HEAP32[$7 >> 2];
13409        $9 = HEAP32[1360];
13410        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $9)) {
13411         break label$1
13412        }
13413        HEAP32[HEAP32[$4 >> 2] + 288 >> 2] = HEAP32[$7 >> 2];
13414        $10 = HEAP32[1361];
13415        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $10)) {
13416         break label$1
13417        }
13418        HEAP32[HEAP32[$4 >> 2] + 292 >> 2] = HEAP32[$7 >> 2] + 1;
13419        $11 = HEAP32[1362];
13420        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $11)) {
13421         break label$1
13422        }
13423        HEAP32[HEAP32[$4 >> 2] + 296 >> 2] = HEAP32[$7 >> 2] + 1;
13424        $12 = HEAP32[$4 >> 2];
13425        $13 = HEAP32[$12 + 56 >> 2];
13426        $14 = $12 + 304 | 0;
13427        $12 = HEAP32[1363];
13428        if (!FLAC__bitreader_read_raw_uint64($13, $14, $12)) {
13429         break label$1
13430        }
13431        $13 = HEAP32[$4 >> 2];
13432        if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$13 + 56 >> 2], $13 + 312 | 0, 16)) {
13433         break label$1
13434        }
13435        if (!FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3 - (($12 + ($11 + ($10 + ($9 + ($8 + ($6 + ($1 + $5 | 0) | 0) | 0) | 0) | 0) | 0) | 0) + 128 >>> 3 | 0) | 0)) {
13436         break label$2
13437        }
13438        $1 = HEAP32[$4 >> 2];
13439        HEAP32[$1 + 248 >> 2] = 1;
13440        if (!memcmp($1 + 312 | 0, 7555, 16)) {
13441         HEAP32[$1 + 3624 >> 2] = 0
13442        }
13443        if (HEAP32[$1 + 3632 >> 2] | !HEAP32[$1 + 608 >> 2]) {
13444         break label$4
13445        }
13446        $2 = HEAP32[$1 + 28 >> 2];
13447        if (!$2) {
13448         break label$4
13449        }
13450        FUNCTION_TABLE[$2]($0, $1 + 256 | 0, HEAP32[$1 + 48 >> 2]);
13451        break label$4;
13452       }
13453       $1 = HEAP32[$4 >> 2];
13454       HEAP32[$1 + 252 >> 2] = 0;
13455       $5 = HEAP32[$7 + 176 >> 2];
13456       HEAP32[$1 + 448 >> 2] = ($5 >>> 0) / 18;
13457       HEAP32[$1 + 440 >> 2] = $5;
13458       HEAP32[$1 + 436 >> 2] = $6;
13459       HEAP32[$1 + 432 >> 2] = 3;
13460       $1 = HEAP32[$4 >> 2];
13461       $2 = HEAP32[$1 + 452 >> 2];
13462       $3 = HEAP32[$1 + 448 >> 2];
13463       label$9 : {
13464        if ($3) {
13465         __wasm_i64_mul($3, 0, 24, 0);
13466         if (!i64toi32_i32$HIGH_BITS) {
13467          $1 = dlrealloc($2, Math_imul($3, 24));
13468          if ($1) {
13469           HEAP32[HEAP32[$4 >> 2] + 452 >> 2] = $1;
13470           break label$9;
13471          }
13472          dlfree($2);
13473          $1 = HEAP32[$4 >> 2];
13474         }
13475         HEAP32[$1 + 452 >> 2] = 0;
13476         break label$3;
13477        }
13478        $1 = dlrealloc($2, 0);
13479        HEAP32[HEAP32[$4 >> 2] + 452 >> 2] = $1;
13480        if (!$1) {
13481         break label$3
13482        }
13483       }
13484       $2 = HEAP32[$4 >> 2];
13485       $1 = 0;
13486       label$14 : {
13487        if (!HEAP32[$2 + 448 >> 2]) {
13488         break label$14
13489        }
13490        $6 = HEAP32[1367];
13491        $8 = HEAP32[1366];
13492        $9 = HEAP32[1365];
13493        $3 = 0;
13494        while (1) {
13495         if (!FLAC__bitreader_read_raw_uint64(HEAP32[$2 + 56 >> 2], $7, $9)) {
13496          break label$2
13497         }
13498         $2 = HEAP32[$7 + 4 >> 2];
13499         $1 = Math_imul($3, 24);
13500         $10 = HEAP32[$4 >> 2];
13501         $11 = $1 + HEAP32[$10 + 452 >> 2] | 0;
13502         HEAP32[$11 >> 2] = HEAP32[$7 >> 2];
13503         HEAP32[$11 + 4 >> 2] = $2;
13504         if (!FLAC__bitreader_read_raw_uint64(HEAP32[$10 + 56 >> 2], $7, $8)) {
13505          break label$2
13506         }
13507         $2 = HEAP32[$7 + 4 >> 2];
13508         $10 = HEAP32[$4 >> 2];
13509         $11 = $1 + HEAP32[$10 + 452 >> 2] | 0;
13510         HEAP32[$11 + 8 >> 2] = HEAP32[$7 >> 2];
13511         HEAP32[$11 + 12 >> 2] = $2;
13512         if (!FLAC__bitreader_read_raw_uint32(HEAP32[$10 + 56 >> 2], $7 + 188 | 0, $6)) {
13513          break label$2
13514         }
13515         $2 = HEAP32[$4 >> 2];
13516         HEAP32[($1 + HEAP32[$2 + 452 >> 2] | 0) + 16 >> 2] = HEAP32[$7 + 188 >> 2];
13517         $3 = $3 + 1 | 0;
13518         $1 = HEAP32[$2 + 448 >> 2];
13519         if ($3 >>> 0 < $1 >>> 0) {
13520          continue
13521         }
13522         break;
13523        };
13524        $1 = Math_imul($1, -18);
13525       }
13526       $1 = $1 + $5 | 0;
13527       if ($1) {
13528        if (!FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[$2 + 56 >> 2], $1)) {
13529         break label$2
13530        }
13531        $2 = HEAP32[$4 >> 2];
13532       }
13533       HEAP32[$2 + 252 >> 2] = 1;
13534       if (HEAP32[$2 + 3632 >> 2] | !HEAP32[$2 + 620 >> 2]) {
13535        break label$4
13536       }
13537       $1 = HEAP32[$2 + 28 >> 2];
13538       if (!$1) {
13539        break label$4
13540       }
13541       FUNCTION_TABLE[$1]($0, $2 + 432 | 0, HEAP32[$2 + 48 >> 2]);
13542       break label$4;
13543      }
13544      $3 = HEAP32[$4 >> 2];
13545      $8 = HEAP32[($3 + ($2 << 2) | 0) + 608 >> 2];
13546      $5 = HEAP32[$7 + 176 >> 2];
13547      $1 = memset($7, 176);
13548      HEAP32[$1 + 8 >> 2] = $5;
13549      HEAP32[$1 >> 2] = $2;
13550      HEAP32[$1 + 4 >> 2] = $6;
13551      $9 = !$8;
13552      label$17 : {
13553       if (($2 | 0) != 2) {
13554        break label$17
13555       }
13556       $10 = $1 + 16 | 0;
13557       $6 = HEAP32[1364] >>> 3 | 0;
13558       if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $10, $6)) {
13559        break label$2
13560       }
13561       if ($5 >>> 0 < $6 >>> 0) {
13562        HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13563        $2 = 0;
13564        break label$1;
13565       }
13566       $5 = $5 - $6 | 0;
13567       $3 = HEAP32[$4 >> 2];
13568       $11 = HEAP32[$3 + 1124 >> 2];
13569       if (!$11) {
13570        break label$17
13571       }
13572       $12 = HEAP32[$3 + 1120 >> 2];
13573       $2 = 0;
13574       while (1) {
13575        if (memcmp($12 + Math_imul($2, $6) | 0, $10, $6)) {
13576         $2 = $2 + 1 | 0;
13577         if (($11 | 0) != ($2 | 0)) {
13578          continue
13579         }
13580         break label$17;
13581        }
13582        break;
13583       };
13584       $9 = ($8 | 0) != 0;
13585      }
13586      if ($9) {
13587       if (!FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $5)) {
13588        break label$2
13589       }
13590       break label$4;
13591      }
13592      label$22 : {
13593       label$23 : {
13594        label$24 : {
13595         label$25 : {
13596          label$26 : {
13597           label$27 : {
13598            label$28 : {
13599             switch (HEAP32[$1 + 180 >> 2]) {
13600             case 1:
13601              if (FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $5)) {
13602               break label$26
13603              }
13604              $6 = 0;
13605              break label$22;
13606             case 2:
13607              if (!$5) {
13608               break label$27
13609              }
13610              $2 = dlmalloc($5);
13611              HEAP32[$1 + 20 >> 2] = $2;
13612              if (!$2) {
13613               HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13614               $6 = 0;
13615               break label$22;
13616              }
13617              if (FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $2, $5)) {
13618               break label$26
13619              }
13620              $6 = 0;
13621              break label$22;
13622             case 4:
13623              label$35 : {
13624               if ($5 >>> 0 < 8) {
13625                break label$35
13626               }
13627               $6 = 0;
13628               if (!FLAC__bitreader_read_uint32_little_endian(HEAP32[$3 + 56 >> 2], $1 + 16 | 0)) {
13629                break label$22
13630               }
13631               $5 = $5 + -8 | 0;
13632               $2 = HEAP32[$1 + 16 >> 2];
13633               label$36 : {
13634                if ($2) {
13635                 if ($5 >>> 0 < $2 >>> 0) {
13636                  HEAP32[$1 + 16 >> 2] = 0;
13637                  HEAP32[$1 + 20 >> 2] = 0;
13638                  break label$35;
13639                 }
13640                 label$39 : {
13641                  label$40 : {
13642                   if (($2 | 0) == -1) {
13643                    HEAP32[$1 + 20 >> 2] = 0;
13644                    break label$40;
13645                   }
13646                   $3 = dlmalloc($2 + 1 | 0);
13647                   HEAP32[$1 + 20 >> 2] = $3;
13648                   if ($3) {
13649                    break label$39
13650                   }
13651                  }
13652                  HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13653                  break label$22;
13654                 }
13655                 if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) {
13656                  break label$22
13657                 }
13658                 $5 = $5 - $2 | 0;
13659                 HEAP8[HEAP32[$1 + 20 >> 2] + HEAP32[$1 + 16 >> 2] | 0] = 0;
13660                 break label$36;
13661                }
13662                HEAP32[$1 + 20 >> 2] = 0;
13663               }
13664               if (!FLAC__bitreader_read_uint32_little_endian(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 24 | 0)) {
13665                break label$22
13666               }
13667               $2 = HEAP32[$1 + 24 >> 2];
13668               if ($2 >>> 0 >= 100001) {
13669                HEAP32[$1 + 24 >> 2] = 0;
13670                break label$22;
13671               }
13672               if (!$2) {
13673                break label$35
13674               }
13675               $3 = safe_malloc_mul_2op_p($2, 8);
13676               HEAP32[$1 + 28 >> 2] = $3;
13677               if (!$3) {
13678                break label$24
13679               }
13680               if (!HEAP32[$1 + 24 >> 2]) {
13681                break label$35
13682               }
13683               HEAP32[$3 >> 2] = 0;
13684               HEAP32[$3 + 4 >> 2] = 0;
13685               $2 = 0;
13686               label$43 : {
13687                if ($5 >>> 0 < 4) {
13688                 break label$43
13689                }
13690                while (1) {
13691                 if (!FLAC__bitreader_read_uint32_little_endian(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3)) {
13692                  break label$23
13693                 }
13694                 $5 = $5 + -4 | 0;
13695                 $8 = HEAP32[$1 + 28 >> 2];
13696                 $9 = $2 << 3;
13697                 $3 = $8 + $9 | 0;
13698                 $6 = HEAP32[$3 >> 2];
13699                 label$45 : {
13700                  if ($6) {
13701                   if ($5 >>> 0 < $6 >>> 0) {
13702                    break label$43
13703                   }
13704                   label$47 : {
13705                    label$48 : {
13706                     if (($6 | 0) == -1) {
13707                      HEAP32[($8 + ($2 << 3) | 0) + 4 >> 2] = 0;
13708                      break label$48;
13709                     }
13710                     $8 = dlmalloc($6 + 1 | 0);
13711                     HEAP32[$3 + 4 >> 2] = $8;
13712                     if ($8) {
13713                      break label$47
13714                     }
13715                    }
13716                    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13717                    break label$23;
13718                   }
13719                   $5 = $5 - $6 | 0;
13720                   memset($8, HEAP32[$3 >> 2]);
13721                   $6 = FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], HEAP32[$3 + 4 >> 2], HEAP32[$3 >> 2]);
13722                   $8 = $9 + HEAP32[$1 + 28 >> 2] | 0;
13723                   $3 = HEAP32[$8 + 4 >> 2];
13724                   if (!$6) {
13725                    dlfree($3);
13726                    HEAP32[(HEAP32[$1 + 28 >> 2] + ($2 << 3) | 0) + 4 >> 2] = 0;
13727                    break label$43;
13728                   }
13729                   HEAP8[$3 + HEAP32[$8 >> 2] | 0] = 0;
13730                   break label$45;
13731                  }
13732                  HEAP32[$3 + 4 >> 2] = 0;
13733                 }
13734                 $2 = $2 + 1 | 0;
13735                 if ($2 >>> 0 >= HEAPU32[$1 + 24 >> 2]) {
13736                  break label$35
13737                 }
13738                 $3 = HEAP32[$1 + 28 >> 2] + ($2 << 3) | 0;
13739                 HEAP32[$3 >> 2] = 0;
13740                 HEAP32[$3 + 4 >> 2] = 0;
13741                 if ($5 >>> 0 >= 4) {
13742                  continue
13743                 }
13744                 break;
13745                };
13746               }
13747               HEAP32[$1 + 24 >> 2] = $2;
13748              }
13749              if (!$5) {
13750               break label$26
13751              }
13752              if (!HEAP32[$1 + 24 >> 2]) {
13753               $2 = $1 + 28 | 0;
13754               dlfree(HEAP32[$2 >> 2]);
13755               HEAP32[$2 >> 2] = 0;
13756              }
13757              if (FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $5)) {
13758               break label$26
13759              }
13760              $6 = 0;
13761              break label$22;
13762             case 5:
13763              $6 = 0;
13764              $2 = memset($1 + 16 | 0, 160);
13765              if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $2, HEAP32[1378] >>> 3 | 0)) {
13766               break label$22
13767              }
13768              if (!FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 152 | 0, HEAP32[1379])) {
13769               break label$22
13770              }
13771              if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1380])) {
13772               break label$22
13773              }
13774              HEAP32[$1 + 160 >> 2] = HEAP32[$1 + 188 >> 2] != 0;
13775              if (!FLAC__bitreader_skip_bits_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], HEAP32[1381])) {
13776               break label$22
13777              }
13778              if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1382])) {
13779               break label$22
13780              }
13781              $2 = HEAP32[$1 + 188 >> 2];
13782              HEAP32[$1 + 164 >> 2] = $2;
13783              if (!$2) {
13784               break label$26
13785              }
13786              $2 = dlcalloc($2, 32);
13787              HEAP32[$1 + 168 >> 2] = $2;
13788              if (!$2) {
13789               break label$25
13790              }
13791              $9 = HEAP32[1371];
13792              if (!FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $2, $9)) {
13793               break label$22
13794              }
13795              $10 = HEAP32[1373] >>> 3 | 0;
13796              $11 = HEAP32[1370];
13797              $12 = HEAP32[1369];
13798              $8 = HEAP32[1368];
13799              $13 = HEAP32[1377];
13800              $16 = HEAP32[1376];
13801              $17 = HEAP32[1375];
13802              $18 = HEAP32[1374];
13803              $19 = HEAP32[1372];
13804              $5 = 0;
13805              while (1) {
13806               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $19)) {
13807                break label$22
13808               }
13809               $2 = ($5 << 5) + $2 | 0;
13810               HEAP8[$2 + 8 | 0] = HEAP32[$1 + 188 >> 2];
13811               if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $2 + 9 | 0, $10)) {
13812                break label$22
13813               }
13814               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $18)) {
13815                break label$22
13816               }
13817               HEAP8[$2 + 22 | 0] = HEAPU8[$2 + 22 | 0] & 254 | HEAP8[$1 + 188 | 0] & 1;
13818               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $17)) {
13819                break label$22
13820               }
13821               $3 = $2 + 22 | 0;
13822               HEAP8[$3 | 0] = HEAPU8[$1 + 188 | 0] << 1 & 2 | HEAPU8[$3 | 0] & 253;
13823               if (!FLAC__bitreader_skip_bits_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $16)) {
13824                break label$22
13825               }
13826               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $13)) {
13827                break label$22
13828               }
13829               $3 = HEAP32[$1 + 188 >> 2];
13830               HEAP8[$2 + 23 | 0] = $3;
13831               label$53 : {
13832                $3 = $3 & 255;
13833                if (!$3) {
13834                 break label$53
13835                }
13836                $3 = dlcalloc($3, 16);
13837                HEAP32[$2 + 24 >> 2] = $3;
13838                label$54 : {
13839                 if ($3) {
13840                  $14 = $2 + 23 | 0;
13841                  if (!HEAPU8[$14 | 0]) {
13842                   break label$53
13843                  }
13844                  if (!FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $8)) {
13845                   break label$22
13846                  }
13847                  $20 = $2 + 24 | 0;
13848                  $2 = 0;
13849                  break label$54;
13850                 }
13851                 HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13852                 break label$22;
13853                }
13854                while (1) {
13855                 if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $12)) {
13856                  break label$22
13857                 }
13858                 HEAP8[(($2 << 4) + $3 | 0) + 8 | 0] = HEAP32[$1 + 188 >> 2];
13859                 if (!FLAC__bitreader_skip_bits_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $11)) {
13860                  break label$22
13861                 }
13862                 $2 = $2 + 1 | 0;
13863                 if ($2 >>> 0 >= HEAPU8[$14 | 0]) {
13864                  break label$53
13865                 }
13866                 $3 = HEAP32[$20 >> 2];
13867                 if (FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3 + ($2 << 4) | 0, $8)) {
13868                  continue
13869                 }
13870                 break;
13871                };
13872                break label$22;
13873               }
13874               $5 = $5 + 1 | 0;
13875               if ($5 >>> 0 >= HEAPU32[$1 + 164 >> 2]) {
13876                break label$26
13877               }
13878               $2 = HEAP32[$1 + 168 >> 2];
13879               if (FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $2 + ($5 << 5) | 0, $9)) {
13880                continue
13881               }
13882               break;
13883              };
13884              break label$22;
13885             case 6:
13886              label$57 : {
13887               if (!FLAC__bitreader_read_raw_uint32(HEAP32[$3 + 56 >> 2], $1 + 188 | 0, HEAP32[1383])) {
13888                break label$57
13889               }
13890               HEAP32[$1 + 16 >> 2] = HEAP32[$1 + 188 >> 2];
13891               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1384])) {
13892                break label$57
13893               }
13894               label$58 : {
13895                $2 = HEAP32[$1 + 188 >> 2];
13896                label$59 : {
13897                 if (($2 | 0) == -1) {
13898                  HEAP32[$1 + 20 >> 2] = 0;
13899                  break label$59;
13900                 }
13901                 $3 = dlmalloc($2 + 1 | 0);
13902                 HEAP32[$1 + 20 >> 2] = $3;
13903                 if ($3) {
13904                  break label$58
13905                 }
13906                }
13907                HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13908                $6 = 0;
13909                break label$22;
13910               }
13911               if ($2) {
13912                if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) {
13913                 break label$57
13914                }
13915                $3 = HEAP32[$1 + 20 >> 2];
13916                $2 = HEAP32[$1 + 188 >> 2];
13917               } else {
13918                $2 = 0
13919               }
13920               HEAP8[$2 + $3 | 0] = 0;
13921               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1385])) {
13922                break label$57
13923               }
13924               label$63 : {
13925                $2 = HEAP32[$1 + 188 >> 2];
13926                label$64 : {
13927                 if (($2 | 0) == -1) {
13928                  HEAP32[$1 + 24 >> 2] = 0;
13929                  break label$64;
13930                 }
13931                 $3 = dlmalloc($2 + 1 | 0);
13932                 HEAP32[$1 + 24 >> 2] = $3;
13933                 if ($3) {
13934                  break label$63
13935                 }
13936                }
13937                HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13938                $6 = 0;
13939                break label$22;
13940               }
13941               if ($2) {
13942                if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) {
13943                 break label$57
13944                }
13945                $3 = HEAP32[$1 + 24 >> 2];
13946                $2 = HEAP32[$1 + 188 >> 2];
13947               } else {
13948                $2 = 0
13949               }
13950               HEAP8[$2 + $3 | 0] = 0;
13951               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 28 | 0, HEAP32[1386])) {
13952                break label$57
13953               }
13954               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 32 | 0, HEAP32[1387])) {
13955                break label$57
13956               }
13957               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 36 | 0, HEAP32[1388])) {
13958                break label$57
13959               }
13960               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 40 | 0, HEAP32[1389])) {
13961                break label$57
13962               }
13963               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 44 | 0, HEAP32[1390])) {
13964                break label$57
13965               }
13966               $2 = HEAP32[$1 + 44 >> 2];
13967               $3 = dlmalloc($2 ? $2 : 1);
13968               HEAP32[$1 + 48 >> 2] = $3;
13969               if (!$3) {
13970                HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13971                $6 = 0;
13972                break label$22;
13973               }
13974               if (!$2) {
13975                break label$26
13976               }
13977               if (FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) {
13978                break label$26
13979               }
13980              }
13981              $6 = 0;
13982              break label$22;
13983             case 0:
13984             case 3:
13985              break label$26;
13986             default:
13987              break label$28;
13988             };
13989            }
13990            label$69 : {
13991             if ($5) {
13992              $2 = dlmalloc($5);
13993              HEAP32[$1 + 16 >> 2] = $2;
13994              if ($2) {
13995               break label$69
13996              }
13997              HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
13998              $6 = 0;
13999              break label$22;
14000             }
14001             HEAP32[$1 + 16 >> 2] = 0;
14002             break label$26;
14003            }
14004            if (FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $2, $5)) {
14005             break label$26
14006            }
14007            $6 = 0;
14008            break label$22;
14009           }
14010           HEAP32[$1 + 20 >> 2] = 0;
14011          }
14012          $6 = 1;
14013          $2 = HEAP32[$4 >> 2];
14014          if (HEAP32[$2 + 3632 >> 2]) {
14015           break label$22
14016          }
14017          $3 = HEAP32[$2 + 28 >> 2];
14018          if (!$3) {
14019           break label$22
14020          }
14021          FUNCTION_TABLE[$3]($0, $1, HEAP32[$2 + 48 >> 2]);
14022          break label$22;
14023         }
14024         HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
14025         break label$22;
14026        }
14027        HEAP32[$1 + 24 >> 2] = 0;
14028        HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
14029        break label$22;
14030       }
14031       HEAP32[$1 + 24 >> 2] = $2;
14032       $6 = 0;
14033      }
14034      label$71 : {
14035       label$72 : {
14036        switch (HEAP32[$1 + 180 >> 2] + -1 | 0) {
14037        case 1:
14038         $1 = HEAP32[$1 + 20 >> 2];
14039         if (!$1) {
14040          break label$71
14041         }
14042         dlfree($1);
14043         break label$71;
14044        case 3:
14045         $2 = HEAP32[$1 + 20 >> 2];
14046         if ($2) {
14047          dlfree($2)
14048         }
14049         $3 = HEAP32[$1 + 24 >> 2];
14050         if ($3) {
14051          $2 = 0;
14052          while (1) {
14053           $5 = HEAP32[(HEAP32[$1 + 28 >> 2] + ($2 << 3) | 0) + 4 >> 2];
14054           if ($5) {
14055            dlfree($5);
14056            $3 = HEAP32[$1 + 24 >> 2];
14057           }
14058           $2 = $2 + 1 | 0;
14059           if ($2 >>> 0 < $3 >>> 0) {
14060            continue
14061           }
14062           break;
14063          };
14064         }
14065         $1 = HEAP32[$1 + 28 >> 2];
14066         if (!$1) {
14067          break label$71
14068         }
14069         dlfree($1);
14070         break label$71;
14071        case 4:
14072         $3 = HEAP32[$1 + 164 >> 2];
14073         if ($3) {
14074          $2 = 0;
14075          while (1) {
14076           $5 = HEAP32[(HEAP32[$1 + 168 >> 2] + ($2 << 5) | 0) + 24 >> 2];
14077           if ($5) {
14078            dlfree($5);
14079            $3 = HEAP32[$1 + 164 >> 2];
14080           }
14081           $2 = $2 + 1 | 0;
14082           if ($2 >>> 0 < $3 >>> 0) {
14083            continue
14084           }
14085           break;
14086          };
14087         }
14088         $1 = HEAP32[$1 + 168 >> 2];
14089         if (!$1) {
14090          break label$71
14091         }
14092         dlfree($1);
14093         break label$71;
14094        case 5:
14095         $2 = HEAP32[$1 + 20 >> 2];
14096         if ($2) {
14097          dlfree($2)
14098         }
14099         $2 = HEAP32[$1 + 24 >> 2];
14100         if ($2) {
14101          dlfree($2)
14102         }
14103         $1 = HEAP32[$1 + 48 >> 2];
14104         if (!$1) {
14105          break label$71
14106         }
14107         dlfree($1);
14108         break label$71;
14109        case 0:
14110         break label$71;
14111        default:
14112         break label$72;
14113        };
14114       }
14115       $1 = HEAP32[$1 + 16 >> 2];
14116       if (!$1) {
14117        break label$71
14118       }
14119       dlfree($1);
14120      }
14121      if (!$6) {
14122       break label$2
14123      }
14124     }
14125     $2 = 1;
14126     if (!$15) {
14127      break label$1
14128     }
14129     label$86 : {
14130      label$87 : {
14131       $3 = HEAP32[$4 >> 2];
14132       if (HEAP32[$3 >> 2]) {
14133        break label$87
14134       }
14135       $5 = HEAP32[$3 + 12 >> 2];
14136       if (!$5) {
14137        break label$87
14138       }
14139       $1 = $3 + 6136 | 0;
14140       if (FUNCTION_TABLE[$5]($0, $1, HEAP32[$3 + 48 >> 2])) {
14141        break label$87
14142       }
14143       if (!FLAC__bitreader_is_consumed_byte_aligned(HEAP32[HEAP32[$4 >> 2] + 56 >> 2])) {
14144        break label$87
14145       }
14146       $3 = HEAP32[$1 >> 2];
14147       $4 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];
14148       $4 = ((HEAP32[$4 + 8 >> 2] - HEAP32[$4 + 16 >> 2] << 5) + (HEAP32[$4 + 12 >> 2] << 3) | 0) - HEAP32[$4 + 20 >> 2] >>> 3 | 0;
14149       $5 = HEAP32[$1 + 4 >> 2] - ($3 >>> 0 < $4 >>> 0) | 0;
14150       HEAP32[$1 >> 2] = $3 - $4;
14151       HEAP32[$1 + 4 >> 2] = $5;
14152       break label$86;
14153      }
14154      $1 = HEAP32[$4 >> 2];
14155      HEAP32[$1 + 6136 >> 2] = 0;
14156      HEAP32[$1 + 6140 >> 2] = 0;
14157     }
14158     HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
14159     break label$1;
14160    }
14161    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
14162   }
14163   $2 = 0;
14164  }
14165  global$0 = $7 + 192 | 0;
14166  return $2;
14167 }
14168
14169 function frame_sync_($0) {
14170  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0;
14171  $4 = global$0 - 16 | 0;
14172  global$0 = $4;
14173  label$1 : {
14174   label$2 : {
14175    label$3 : {
14176     $2 = HEAP32[$0 + 4 >> 2];
14177     if (!HEAP32[$2 + 248 >> 2]) {
14178      break label$3
14179     }
14180     $3 = HEAP32[$2 + 308 >> 2];
14181     $1 = $3;
14182     $5 = HEAP32[$2 + 304 >> 2];
14183     if (!($1 | $5)) {
14184      break label$3
14185     }
14186     $3 = HEAP32[$2 + 244 >> 2];
14187     if (($1 | 0) == ($3 | 0) & HEAPU32[$2 + 240 >> 2] < $5 >>> 0 | $3 >>> 0 < $1 >>> 0) {
14188      break label$3
14189     }
14190     HEAP32[HEAP32[$0 >> 2] >> 2] = 4;
14191     break label$2;
14192    }
14193    label$4 : {
14194     if (FLAC__bitreader_is_consumed_byte_aligned(HEAP32[$2 + 56 >> 2])) {
14195      break label$4
14196     }
14197     $2 = HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2];
14198     if (FLAC__bitreader_read_raw_uint32($2, $4 + 12 | 0, FLAC__bitreader_bits_left_for_byte_alignment($2))) {
14199      break label$4
14200     }
14201     $1 = 0;
14202     break label$1;
14203    }
14204    $2 = 0;
14205    while (1) {
14206     $3 = HEAP32[$0 + 4 >> 2];
14207     label$6 : {
14208      if (HEAP32[$3 + 3520 >> 2]) {
14209       $1 = HEAPU8[$3 + 3590 | 0];
14210       HEAP32[$4 + 12 >> 2] = $1;
14211       HEAP32[$3 + 3520 >> 2] = 0;
14212       break label$6;
14213      }
14214      $1 = 0;
14215      if (!FLAC__bitreader_read_raw_uint32(HEAP32[$3 + 56 >> 2], $4 + 12 | 0, 8)) {
14216       break label$1
14217      }
14218      $1 = HEAP32[$4 + 12 >> 2];
14219     }
14220     label$8 : {
14221      if (($1 | 0) != 255) {
14222       break label$8
14223      }
14224      HEAP8[HEAP32[$0 + 4 >> 2] + 3588 | 0] = 255;
14225      $1 = 0;
14226      if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $4 + 12 | 0, 8)) {
14227       break label$1
14228      }
14229      $1 = HEAP32[$4 + 12 >> 2];
14230      if (($1 | 0) == 255) {
14231       $1 = HEAP32[$0 + 4 >> 2];
14232       HEAP32[$1 + 3520 >> 2] = 1;
14233       HEAP8[$1 + 3590 | 0] = 255;
14234       break label$8;
14235      }
14236      if (($1 & -2) != 248) {
14237       break label$8
14238      }
14239      HEAP8[HEAP32[$0 + 4 >> 2] + 3589 | 0] = $1;
14240      HEAP32[HEAP32[$0 >> 2] >> 2] = 3;
14241      break label$2;
14242     }
14243     $1 = $2;
14244     $2 = 1;
14245     if ($1) {
14246      continue
14247     }
14248     $1 = HEAP32[$0 + 4 >> 2];
14249     if (HEAP32[$1 + 3632 >> 2]) {
14250      continue
14251     }
14252     FUNCTION_TABLE[HEAP32[$1 + 32 >> 2]]($0, 0, HEAP32[$1 + 48 >> 2]);
14253     continue;
14254    };
14255   }
14256   $1 = 1;
14257  }
14258  global$0 = $4 + 16 | 0;
14259  return $1;
14260 }
14261
14262 function read_frame_($0, $1) {
14263  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
14264  $7 = global$0 + -64 | 0;
14265  global$0 = $7;
14266  HEAP32[$1 >> 2] = 0;
14267  $2 = HEAP32[$0 + 4 >> 2];
14268  $4 = HEAPU16[(HEAPU8[$2 + 3588 | 0] << 1) + 1280 >> 1];
14269  $5 = HEAP32[$2 + 56 >> 2];
14270  HEAP32[$5 + 24 >> 2] = HEAPU16[((HEAPU8[$2 + 3589 | 0] ^ $4 >>> 8) << 1) + 1280 >> 1] ^ $4 << 8 & 65280;
14271  $2 = HEAP32[$5 + 20 >> 2];
14272  HEAP32[$5 + 28 >> 2] = HEAP32[$5 + 16 >> 2];
14273  HEAP32[$5 + 32 >> 2] = $2;
14274  $5 = HEAP32[$0 + 4 >> 2];
14275  HEAP8[$7 + 32 | 0] = HEAPU8[$5 + 3588 | 0];
14276  $2 = HEAPU8[$5 + 3589 | 0];
14277  HEAP32[$7 + 12 >> 2] = 2;
14278  HEAP8[$7 + 33 | 0] = $2;
14279  label$1 : {
14280   if (!FLAC__bitreader_read_raw_uint32(HEAP32[$5 + 56 >> 2], $7 + 28 | 0, 8)) {
14281    break label$1
14282   }
14283   $4 = $0 + 4 | 0;
14284   label$2 : {
14285    label$3 : {
14286     label$4 : {
14287      label$5 : {
14288       $5 = HEAP32[$7 + 28 >> 2];
14289       if (($5 | 0) == 255) {
14290        break label$5
14291       }
14292       HEAP8[$7 + 34 | 0] = $5;
14293       HEAP32[$7 + 12 >> 2] = 3;
14294       if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 28 | 0, 8)) {
14295        break label$3
14296       }
14297       $5 = HEAP32[$7 + 28 >> 2];
14298       if (($5 | 0) == 255) {
14299        break label$5
14300       }
14301       $8 = $2 >>> 1 & 1;
14302       $2 = HEAP32[$7 + 12 >> 2];
14303       HEAP8[$2 + ($7 + 32 | 0) | 0] = $5;
14304       $5 = 1;
14305       HEAP32[$7 + 12 >> 2] = $2 + 1;
14306       $2 = HEAPU8[$7 + 34 | 0];
14307       $3 = $2 >>> 4 | 0;
14308       HEAP32[$7 + 28 >> 2] = $3;
14309       label$6 : {
14310        label$7 : {
14311         label$8 : {
14312          label$9 : {
14313           switch ($3 - 1 | 0) {
14314           case 7:
14315           case 8:
14316           case 9:
14317           case 10:
14318           case 11:
14319           case 12:
14320           case 13:
14321           case 14:
14322            HEAP32[HEAP32[$4 >> 2] + 1136 >> 2] = 256 << $3 + -8;
14323            break label$8;
14324           case 1:
14325           case 2:
14326           case 3:
14327           case 4:
14328            HEAP32[HEAP32[$4 >> 2] + 1136 >> 2] = 576 << $3 + -2;
14329            break label$8;
14330           case 5:
14331           case 6:
14332            break label$7;
14333           case 0:
14334            break label$9;
14335           default:
14336            break label$6;
14337           };
14338          }
14339          HEAP32[HEAP32[$4 >> 2] + 1136 >> 2] = 192;
14340         }
14341         $3 = 0;
14342        }
14343        $5 = $8;
14344       }
14345       $6 = $2 & 15;
14346       HEAP32[$7 + 28 >> 2] = $6;
14347       label$12 : {
14348        label$13 : {
14349         label$14 : {
14350          switch ($6 - 1 | 0) {
14351          default:
14352           $6 = 0;
14353           $8 = HEAP32[$4 >> 2];
14354           if (HEAP32[$8 + 248 >> 2]) {
14355            break label$13
14356           }
14357           $5 = 1;
14358           break label$12;
14359          case 0:
14360           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 88200;
14361           $6 = 0;
14362           break label$12;
14363          case 1:
14364           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 176400;
14365           $6 = 0;
14366           break label$12;
14367          case 2:
14368           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 192e3;
14369           $6 = 0;
14370           break label$12;
14371          case 3:
14372           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 8e3;
14373           $6 = 0;
14374           break label$12;
14375          case 4:
14376           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 16e3;
14377           $6 = 0;
14378           break label$12;
14379          case 5:
14380           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 22050;
14381           $6 = 0;
14382           break label$12;
14383          case 6:
14384           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 24e3;
14385           $6 = 0;
14386           break label$12;
14387          case 7:
14388           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 32e3;
14389           $6 = 0;
14390           break label$12;
14391          case 8:
14392           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 44100;
14393           $6 = 0;
14394           break label$12;
14395          case 9:
14396           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 48e3;
14397           $6 = 0;
14398           break label$12;
14399          case 10:
14400           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 96e3;
14401           $6 = 0;
14402           break label$12;
14403          case 11:
14404          case 12:
14405          case 13:
14406           break label$12;
14407          case 14:
14408           break label$14;
14409          };
14410         }
14411         $5 = HEAP32[$4 >> 2];
14412         if (!HEAP32[$5 + 3632 >> 2]) {
14413          FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2])
14414         }
14415         $2 = HEAP32[$0 >> 2];
14416         HEAP32[$2 >> 2] = 2;
14417         break label$4;
14418        }
14419        HEAP32[$8 + 1140 >> 2] = HEAP32[$8 + 288 >> 2];
14420       }
14421       $10 = HEAPU8[$7 + 35 | 0];
14422       $9 = $10 >>> 4 | 0;
14423       HEAP32[$7 + 28 >> 2] = $9;
14424       label$28 : {
14425        label$29 : {
14426         if ($9 & 8) {
14427          $2 = HEAP32[$4 >> 2];
14428          HEAP32[$2 + 1144 >> 2] = 2;
14429          $8 = 1;
14430          label$31 : {
14431           switch ($9 & 7) {
14432           case 1:
14433            $8 = 2;
14434            break label$29;
14435           case 0:
14436            break label$29;
14437           case 2:
14438            break label$31;
14439           default:
14440            break label$28;
14441           };
14442          }
14443          $8 = 3;
14444          break label$29;
14445         }
14446         $2 = HEAP32[$4 >> 2];
14447         HEAP32[$2 + 1144 >> 2] = $9 + 1;
14448         $8 = 0;
14449        }
14450        HEAP32[$2 + 1148 >> 2] = $8;
14451        $8 = $5;
14452       }
14453       $9 = $10 >>> 1 & 7;
14454       HEAP32[$7 + 28 >> 2] = $9;
14455       $5 = 1;
14456       label$33 : {
14457        label$34 : {
14458         label$35 : {
14459          switch ($9 - 1 | 0) {
14460          default:
14461           if (!HEAP32[$2 + 248 >> 2]) {
14462            break label$33
14463           }
14464           HEAP32[$2 + 1152 >> 2] = HEAP32[$2 + 296 >> 2];
14465           break label$34;
14466          case 0:
14467           HEAP32[$2 + 1152 >> 2] = 8;
14468           break label$34;
14469          case 1:
14470           HEAP32[$2 + 1152 >> 2] = 12;
14471           break label$34;
14472          case 3:
14473           HEAP32[$2 + 1152 >> 2] = 16;
14474           break label$34;
14475          case 4:
14476           HEAP32[$2 + 1152 >> 2] = 20;
14477           break label$34;
14478          case 2:
14479          case 6:
14480           break label$33;
14481          case 5:
14482           break label$35;
14483          };
14484         }
14485         HEAP32[$2 + 1152 >> 2] = 24;
14486        }
14487        $5 = $8;
14488       }
14489       label$41 : {
14490        if (!(!HEAP32[$2 + 248 >> 2] | HEAP32[$2 + 272 >> 2] == HEAP32[$2 + 276 >> 2] ? !(HEAP8[$7 + 33 | 0] & 1) : 0)) {
14491         if (!FLAC__bitreader_read_utf8_uint64(HEAP32[$2 + 56 >> 2], $7 + 16 | 0, $7 + 32 | 0, $7 + 12 | 0)) {
14492          break label$3
14493         }
14494         $8 = HEAP32[$7 + 20 >> 2];
14495         $2 = $8;
14496         $9 = HEAP32[$7 + 16 >> 2];
14497         if (($9 | 0) == -1 & ($2 | 0) == -1) {
14498          $8 = HEAPU8[(HEAP32[$7 + 12 >> 2] + $7 | 0) + 31 | 0];
14499          $5 = HEAP32[$4 >> 2];
14500          HEAP32[$5 + 3520 >> 2] = 1;
14501          HEAP8[$5 + 3590 | 0] = $8;
14502          if (!HEAP32[$5 + 3632 >> 2]) {
14503           FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2])
14504          }
14505          $2 = HEAP32[$0 >> 2];
14506          HEAP32[$2 >> 2] = 2;
14507          break label$4;
14508         }
14509         $8 = HEAP32[$4 >> 2];
14510         $11 = $8 + 1160 | 0;
14511         HEAP32[$11 >> 2] = $9;
14512         HEAP32[$11 + 4 >> 2] = $2;
14513         HEAP32[$8 + 1156 >> 2] = 1;
14514         break label$41;
14515        }
14516        if (!FLAC__bitreader_read_utf8_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, $7 + 32 | 0, $7 + 12 | 0)) {
14517         break label$3
14518        }
14519        $8 = HEAP32[$7 + 28 >> 2];
14520        if (($8 | 0) == -1) {
14521         $8 = HEAPU8[(HEAP32[$7 + 12 >> 2] + $7 | 0) + 31 | 0];
14522         $5 = HEAP32[$4 >> 2];
14523         HEAP32[$5 + 3520 >> 2] = 1;
14524         HEAP8[$5 + 3590 | 0] = $8;
14525         if (!HEAP32[$5 + 3632 >> 2]) {
14526          FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2])
14527         }
14528         $2 = HEAP32[$0 >> 2];
14529         HEAP32[$2 >> 2] = 2;
14530         break label$4;
14531        }
14532        $2 = HEAP32[$4 >> 2];
14533        HEAP32[$2 + 1160 >> 2] = $8;
14534        HEAP32[$2 + 1156 >> 2] = 0;
14535       }
14536       $2 = HEAP32[$4 >> 2];
14537       if ($3) {
14538        if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) {
14539         break label$3
14540        }
14541        $2 = HEAP32[$7 + 12 >> 2];
14542        $8 = HEAP32[$7 + 28 >> 2];
14543        HEAP8[$2 + ($7 + 32 | 0) | 0] = $8;
14544        HEAP32[$7 + 12 >> 2] = $2 + 1;
14545        if (($3 | 0) == 7) {
14546         if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 8 | 0, 8)) {
14547          break label$3
14548         }
14549         $8 = HEAP32[$7 + 12 >> 2];
14550         $2 = HEAP32[$7 + 8 >> 2];
14551         HEAP8[$8 + ($7 + 32 | 0) | 0] = $2;
14552         HEAP32[$7 + 12 >> 2] = $8 + 1;
14553         $8 = $2 | HEAP32[$7 + 28 >> 2] << 8;
14554         HEAP32[$7 + 28 >> 2] = $8;
14555        }
14556        $2 = HEAP32[$4 >> 2];
14557        HEAP32[$2 + 1136 >> 2] = $8 + 1;
14558       }
14559       if ($6) {
14560        if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) {
14561         break label$3
14562        }
14563        $8 = HEAP32[$7 + 12 >> 2];
14564        $2 = HEAP32[$7 + 28 >> 2];
14565        HEAP8[$8 + ($7 + 32 | 0) | 0] = $2;
14566        HEAP32[$7 + 12 >> 2] = $8 + 1;
14567        label$51 : {
14568         if (($6 | 0) != 12) {
14569          if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 8 | 0, 8)) {
14570           break label$3
14571          }
14572          $8 = HEAP32[$7 + 12 >> 2];
14573          $2 = HEAP32[$7 + 8 >> 2];
14574          HEAP8[$8 + ($7 + 32 | 0) | 0] = $2;
14575          HEAP32[$7 + 12 >> 2] = $8 + 1;
14576          $3 = $2 | HEAP32[$7 + 28 >> 2] << 8;
14577          HEAP32[$7 + 28 >> 2] = $3;
14578          if (($6 | 0) == 13) {
14579           break label$51
14580          }
14581          $3 = Math_imul($3, 10);
14582          break label$51;
14583         }
14584         $3 = Math_imul($2, 1e3);
14585        }
14586        $2 = HEAP32[$4 >> 2];
14587        HEAP32[$2 + 1140 >> 2] = $3;
14588       }
14589       if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) {
14590        break label$3
14591       }
14592       $8 = HEAPU8[$7 + 28 | 0];
14593       $3 = FLAC__crc8($7 + 32 | 0, HEAP32[$7 + 12 >> 2]);
14594       $2 = HEAP32[$4 >> 2];
14595       if (($3 | 0) != ($8 | 0)) {
14596        if (!HEAP32[$2 + 3632 >> 2]) {
14597         FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 1, HEAP32[$2 + 48 >> 2])
14598        }
14599        $2 = HEAP32[$0 >> 2];
14600        HEAP32[$2 >> 2] = 2;
14601        break label$4;
14602       }
14603       HEAP32[$2 + 232 >> 2] = 0;
14604       label$55 : {
14605        label$56 : {
14606         if (HEAP32[$2 + 1156 >> 2]) {
14607          break label$56
14608         }
14609         $3 = $2 + 1160 | 0;
14610         $8 = HEAP32[$3 >> 2];
14611         HEAP32[$7 + 28 >> 2] = $8;
14612         HEAP32[$2 + 1156 >> 2] = 1;
14613         $6 = HEAP32[$2 + 228 >> 2];
14614         if ($6) {
14615          (wasm2js_i32$0 = $3, wasm2js_i32$1 = __wasm_i64_mul($6, 0, $8, 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
14616          HEAP32[$3 + 4 >> 2] = i64toi32_i32$HIGH_BITS;
14617          break label$56;
14618         }
14619         if (HEAP32[$2 + 248 >> 2]) {
14620          $3 = HEAP32[$2 + 272 >> 2];
14621          if (($3 | 0) != HEAP32[$2 + 276 >> 2]) {
14622           break label$55
14623          }
14624          $2 = $2 + 1160 | 0;
14625          (wasm2js_i32$0 = $2, wasm2js_i32$1 = __wasm_i64_mul($3, 0, $8, 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
14626          HEAP32[$2 + 4 >> 2] = i64toi32_i32$HIGH_BITS;
14627          $8 = HEAP32[$4 >> 2];
14628          HEAP32[$8 + 232 >> 2] = HEAP32[$8 + 276 >> 2];
14629          break label$56;
14630         }
14631         if (!$8) {
14632          $8 = $2 + 1160 | 0;
14633          HEAP32[$8 >> 2] = 0;
14634          HEAP32[$8 + 4 >> 2] = 0;
14635          $8 = HEAP32[$4 >> 2];
14636          HEAP32[$8 + 232 >> 2] = HEAP32[$8 + 1136 >> 2];
14637          break label$56;
14638         }
14639         $3 = $2 + 1160 | 0;
14640         (wasm2js_i32$0 = $3, wasm2js_i32$1 = __wasm_i64_mul(HEAP32[$2 + 1136 >> 2], 0, $8, 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
14641         HEAP32[$3 + 4 >> 2] = i64toi32_i32$HIGH_BITS;
14642        }
14643        if (!($5 | $10 & 1)) {
14644         $2 = HEAP32[$0 >> 2];
14645         break label$4;
14646        }
14647        $2 = HEAP32[$4 >> 2];
14648       }
14649       label$61 : {
14650        if (!HEAP32[$2 + 3632 >> 2]) {
14651         FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]);
14652         break label$61;
14653        }
14654        HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1;
14655       }
14656       $2 = HEAP32[$0 >> 2];
14657       HEAP32[$2 >> 2] = 2;
14658       break label$4;
14659      }
14660      $5 = HEAP32[$4 >> 2];
14661      HEAP32[$5 + 3520 >> 2] = 1;
14662      HEAP8[$5 + 3590 | 0] = 255;
14663      if (!HEAP32[$5 + 3632 >> 2]) {
14664       FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2])
14665      }
14666      $2 = HEAP32[$0 >> 2];
14667      HEAP32[$2 >> 2] = 2;
14668     }
14669     $8 = 1;
14670     if (HEAP32[$2 >> 2] == 2) {
14671      break label$1
14672     }
14673     $2 = HEAP32[$4 >> 2];
14674     $5 = HEAP32[$2 + 1144 >> 2];
14675     $6 = HEAP32[$2 + 1136 >> 2];
14676     if (!(HEAPU32[$2 + 224 >> 2] >= $5 >>> 0 ? HEAPU32[$2 + 220 >> 2] >= $6 >>> 0 : 0)) {
14677      $3 = HEAP32[$2 + 60 >> 2];
14678      if ($3) {
14679       dlfree($3 + -16 | 0);
14680       HEAP32[HEAP32[$4 >> 2] + 60 >> 2] = 0;
14681       $2 = HEAP32[$4 >> 2];
14682      }
14683      $3 = HEAP32[$2 + 3592 >> 2];
14684      if ($3) {
14685       dlfree($3);
14686       HEAP32[HEAP32[$4 >> 2] + 92 >> 2] = 0;
14687       HEAP32[HEAP32[$4 >> 2] + 3592 >> 2] = 0;
14688       $2 = HEAP32[$4 >> 2];
14689      }
14690      $3 = HEAP32[$2 - -64 >> 2];
14691      if ($3) {
14692       dlfree($3 + -16 | 0);
14693       HEAP32[HEAP32[$4 >> 2] - -64 >> 2] = 0;
14694       $2 = HEAP32[$4 >> 2];
14695      }
14696      $3 = HEAP32[$2 + 3596 >> 2];
14697      if ($3) {
14698       dlfree($3);
14699       HEAP32[HEAP32[$4 >> 2] + 96 >> 2] = 0;
14700       HEAP32[HEAP32[$4 >> 2] + 3596 >> 2] = 0;
14701       $2 = HEAP32[$4 >> 2];
14702      }
14703      $3 = HEAP32[$2 + 68 >> 2];
14704      if ($3) {
14705       dlfree($3 + -16 | 0);
14706       HEAP32[HEAP32[$4 >> 2] + 68 >> 2] = 0;
14707       $2 = HEAP32[$4 >> 2];
14708      }
14709      $3 = HEAP32[$2 + 3600 >> 2];
14710      if ($3) {
14711       dlfree($3);
14712       HEAP32[HEAP32[$4 >> 2] + 100 >> 2] = 0;
14713       HEAP32[HEAP32[$4 >> 2] + 3600 >> 2] = 0;
14714       $2 = HEAP32[$4 >> 2];
14715      }
14716      $3 = HEAP32[$2 + 72 >> 2];
14717      if ($3) {
14718       dlfree($3 + -16 | 0);
14719       HEAP32[HEAP32[$4 >> 2] + 72 >> 2] = 0;
14720       $2 = HEAP32[$4 >> 2];
14721      }
14722      $3 = HEAP32[$2 + 3604 >> 2];
14723      if ($3) {
14724       dlfree($3);
14725       HEAP32[HEAP32[$4 >> 2] + 104 >> 2] = 0;
14726       HEAP32[HEAP32[$4 >> 2] + 3604 >> 2] = 0;
14727       $2 = HEAP32[$4 >> 2];
14728      }
14729      $3 = HEAP32[$2 + 76 >> 2];
14730      if ($3) {
14731       dlfree($3 + -16 | 0);
14732       HEAP32[HEAP32[$4 >> 2] + 76 >> 2] = 0;
14733       $2 = HEAP32[$4 >> 2];
14734      }
14735      $3 = HEAP32[$2 + 3608 >> 2];
14736      if ($3) {
14737       dlfree($3);
14738       HEAP32[HEAP32[$4 >> 2] + 108 >> 2] = 0;
14739       HEAP32[HEAP32[$4 >> 2] + 3608 >> 2] = 0;
14740       $2 = HEAP32[$4 >> 2];
14741      }
14742      $3 = HEAP32[$2 + 80 >> 2];
14743      if ($3) {
14744       dlfree($3 + -16 | 0);
14745       HEAP32[HEAP32[$4 >> 2] + 80 >> 2] = 0;
14746       $2 = HEAP32[$4 >> 2];
14747      }
14748      $3 = HEAP32[$2 + 3612 >> 2];
14749      if ($3) {
14750       dlfree($3);
14751       HEAP32[HEAP32[$4 >> 2] + 112 >> 2] = 0;
14752       HEAP32[HEAP32[$4 >> 2] + 3612 >> 2] = 0;
14753       $2 = HEAP32[$4 >> 2];
14754      }
14755      $3 = HEAP32[$2 + 84 >> 2];
14756      if ($3) {
14757       dlfree($3 + -16 | 0);
14758       HEAP32[HEAP32[$4 >> 2] + 84 >> 2] = 0;
14759       $2 = HEAP32[$4 >> 2];
14760      }
14761      $3 = HEAP32[$2 + 3616 >> 2];
14762      if ($3) {
14763       dlfree($3);
14764       HEAP32[HEAP32[$4 >> 2] + 116 >> 2] = 0;
14765       HEAP32[HEAP32[$4 >> 2] + 3616 >> 2] = 0;
14766       $2 = HEAP32[$4 >> 2];
14767      }
14768      $3 = HEAP32[$2 + 88 >> 2];
14769      if ($3) {
14770       dlfree($3 + -16 | 0);
14771       HEAP32[HEAP32[$4 >> 2] + 88 >> 2] = 0;
14772       $2 = HEAP32[$4 >> 2];
14773      }
14774      $2 = HEAP32[$2 + 3620 >> 2];
14775      if ($2) {
14776       dlfree($2);
14777       HEAP32[HEAP32[$4 >> 2] + 120 >> 2] = 0;
14778       HEAP32[HEAP32[$4 >> 2] + 3620 >> 2] = 0;
14779      }
14780      label$97 : {
14781       if (!$5) {
14782        break label$97
14783       }
14784       if ($6 >>> 0 > 4294967291) {
14785        break label$2
14786       }
14787       $2 = $6 + 4 | 0;
14788       if (($2 & 1073741823) != ($2 | 0)) {
14789        break label$2
14790       }
14791       $9 = $2 << 2;
14792       $3 = 0;
14793       while (1) {
14794        $2 = dlmalloc($9);
14795        if (!$2) {
14796         break label$2
14797        }
14798        HEAP32[$2 >> 2] = 0;
14799        HEAP32[$2 + 4 >> 2] = 0;
14800        HEAP32[$2 + 8 >> 2] = 0;
14801        HEAP32[$2 + 12 >> 2] = 0;
14802        $10 = $3 << 2;
14803        HEAP32[($10 + HEAP32[$4 >> 2] | 0) + 60 >> 2] = $2 + 16;
14804        $2 = $10 + HEAP32[$4 >> 2] | 0;
14805        if (FLAC__memory_alloc_aligned_int32_array($6, $2 + 3592 | 0, $2 + 92 | 0)) {
14806         $3 = $3 + 1 | 0;
14807         if (($5 | 0) == ($3 | 0)) {
14808          break label$97
14809         }
14810         continue;
14811        }
14812        break;
14813       };
14814       HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
14815       break label$3;
14816      }
14817      $2 = HEAP32[$4 >> 2];
14818      HEAP32[$2 + 224 >> 2] = $5;
14819      HEAP32[$2 + 220 >> 2] = $6;
14820      $5 = HEAP32[$2 + 1144 >> 2];
14821     }
14822     label$100 : {
14823      if ($5) {
14824       $17 = HEAP32[1412];
14825       $20 = -1 << $17 ^ -1;
14826       $18 = HEAP32[1406];
14827       $19 = HEAP32[1405];
14828       $21 = HEAP32[1413];
14829       $5 = 0;
14830       while (1) {
14831        $3 = HEAP32[$2 + 1152 >> 2];
14832        label$103 : {
14833         label$104 : {
14834          switch (HEAP32[$2 + 1148 >> 2] + -1 | 0) {
14835          case 0:
14836           $3 = (($5 | 0) == 1) + $3 | 0;
14837           break label$103;
14838          case 1:
14839           $3 = !$5 + $3 | 0;
14840           break label$103;
14841          case 2:
14842           break label$104;
14843          default:
14844           break label$103;
14845          };
14846         }
14847         $3 = (($5 | 0) == 1) + $3 | 0;
14848        }
14849        if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) {
14850         break label$3
14851        }
14852        $2 = HEAP32[$7 + 28 >> 2];
14853        HEAP32[$7 + 28 >> 2] = $2 & 254;
14854        $13 = $2 & 1;
14855        label$107 : {
14856         if ($13) {
14857          if (!FLAC__bitreader_read_unary_unsigned(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 32 | 0)) {
14858           break label$3
14859          }
14860          $2 = HEAP32[$4 >> 2];
14861          $6 = HEAP32[$7 + 32 >> 2] + 1 | 0;
14862          HEAP32[($2 + Math_imul($5, 292) | 0) + 1464 >> 2] = $6;
14863          if ($3 >>> 0 <= $6 >>> 0) {
14864           break label$3
14865          }
14866          $3 = $3 - $6 | 0;
14867          break label$107;
14868         }
14869         $2 = HEAP32[$4 >> 2];
14870         HEAP32[($2 + Math_imul($5, 292) | 0) + 1464 >> 2] = 0;
14871        }
14872        $6 = HEAP32[$7 + 28 >> 2];
14873        label$109 : {
14874         if ($6 & 128) {
14875          if (!HEAP32[$2 + 3632 >> 2]) {
14876           FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2])
14877          }
14878          HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
14879          break label$109;
14880         }
14881         label$112 : {
14882          label$113 : {
14883           label$114 : {
14884            switch ($6 | 0) {
14885            case 0:
14886             $6 = HEAP32[(($5 << 2) + $2 | 0) + 60 >> 2];
14887             $9 = Math_imul($5, 292) + $2 | 0;
14888             HEAP32[$9 + 1176 >> 2] = 0;
14889             if (!FLAC__bitreader_read_raw_int32(HEAP32[$2 + 56 >> 2], $7 + 32 | 0, $3)) {
14890              break label$3
14891             }
14892             HEAP32[$9 + 1180 >> 2] = HEAP32[$7 + 32 >> 2];
14893             $2 = 0;
14894             $3 = HEAP32[$4 >> 2];
14895             if (!HEAP32[$3 + 1136 >> 2]) {
14896              break label$113
14897             }
14898             while (1) {
14899              HEAP32[$6 + ($2 << 2) >> 2] = HEAP32[$7 + 32 >> 2];
14900              $2 = $2 + 1 | 0;
14901              if ($2 >>> 0 < HEAPU32[$3 + 1136 >> 2]) {
14902               continue
14903              }
14904              break;
14905             };
14906             break label$113;
14907            case 2:
14908             $6 = ($2 + 1136 | 0) + Math_imul($5, 292) | 0;
14909             $9 = $6 + 44 | 0;
14910             $10 = $5 << 2;
14911             $11 = HEAP32[($10 + $2 | 0) + 92 >> 2];
14912             HEAP32[$9 >> 2] = $11;
14913             HEAP32[$6 + 40 >> 2] = 1;
14914             $6 = 0;
14915             if (HEAP32[$2 + 1136 >> 2]) {
14916              while (1) {
14917               if (!FLAC__bitreader_read_raw_int32(HEAP32[$2 + 56 >> 2], $7 + 32 | 0, $3)) {
14918                break label$3
14919               }
14920               HEAP32[$11 + ($6 << 2) >> 2] = HEAP32[$7 + 32 >> 2];
14921               $6 = $6 + 1 | 0;
14922               $2 = HEAP32[$4 >> 2];
14923               $12 = HEAP32[$2 + 1136 >> 2];
14924               if ($6 >>> 0 < $12 >>> 0) {
14925                continue
14926               }
14927               break;
14928              };
14929              $6 = $12 << 2;
14930             }
14931             memcpy(HEAP32[($2 + $10 | 0) + 60 >> 2], HEAP32[$9 >> 2], $6);
14932             break label$113;
14933            default:
14934             break label$114;
14935            };
14936           }
14937           if ($6 >>> 0 <= 15) {
14938            label$121 : {
14939             if (!HEAP32[$2 + 3632 >> 2]) {
14940              FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]);
14941              break label$121;
14942             }
14943             HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1;
14944            }
14945            HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
14946            break label$109;
14947           }
14948           if ($6 >>> 0 <= 24) {
14949            $9 = Math_imul($5, 292) + $2 | 0;
14950            HEAP32[$9 + 1176 >> 2] = 2;
14951            $11 = $5 << 2;
14952            $12 = HEAP32[($11 + $2 | 0) + 92 >> 2];
14953            $10 = $6 >>> 1 & 7;
14954            HEAP32[$9 + 1192 >> 2] = $10;
14955            HEAP32[$9 + 1212 >> 2] = $12;
14956            $6 = HEAP32[$2 + 56 >> 2];
14957            if ($10) {
14958             $12 = $9 + 1196 | 0;
14959             $2 = 0;
14960             while (1) {
14961              if (!FLAC__bitreader_read_raw_int32($6, $7 + 32 | 0, $3)) {
14962               break label$3
14963              }
14964              HEAP32[$12 + ($2 << 2) >> 2] = HEAP32[$7 + 32 >> 2];
14965              $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];
14966              $2 = $2 + 1 | 0;
14967              if (($10 | 0) != ($2 | 0)) {
14968               continue
14969              }
14970              break;
14971             };
14972            }
14973            if (!FLAC__bitreader_read_raw_uint32($6, $7 + 16 | 0, $19)) {
14974             break label$3
14975            }
14976            $6 = $9 + 1180 | 0;
14977            $3 = HEAP32[$7 + 16 >> 2];
14978            HEAP32[$6 >> 2] = $3;
14979            $2 = HEAP32[$4 >> 2];
14980            label$126 : {
14981             label$127 : {
14982              if ($3 >>> 0 <= 1) {
14983               if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 16 | 0, $18)) {
14984                break label$3
14985               }
14986               $2 = HEAP32[$4 >> 2];
14987               $3 = HEAP32[$7 + 16 >> 2];
14988               if (HEAP32[$2 + 1136 >> 2] >>> $3 >>> 0 >= $10 >>> 0) {
14989                break label$127
14990               }
14991               if (!HEAP32[$2 + 3632 >> 2]) {
14992                FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2])
14993               }
14994               HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
14995               break label$126;
14996              }
14997              label$130 : {
14998               if (!HEAP32[$2 + 3632 >> 2]) {
14999                FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]);
15000                break label$130;
15001               }
15002               HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1;
15003              }
15004              HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
15005              break label$126;
15006             }
15007             HEAP32[$9 + 1184 >> 2] = $3;
15008             $2 = Math_imul($5, 12);
15009             HEAP32[$9 + 1188 >> 2] = ($2 + HEAP32[$4 >> 2] | 0) + 124;
15010             $6 = HEAP32[$6 >> 2];
15011             if ($6 >>> 0 < 2) {
15012              $14 = $3;
15013              $3 = HEAP32[$0 + 4 >> 2];
15014              if (!read_residual_partitioned_rice_($0, $10, $14, ($2 + $3 | 0) + 124 | 0, HEAP32[($3 + $11 | 0) + 92 >> 2], ($6 | 0) == 1)) {
15015               break label$3
15016              }
15017             }
15018             $2 = $10 << 2;
15019             memcpy(HEAP32[($11 + HEAP32[$4 >> 2] | 0) + 60 >> 2], $9 + 1196 | 0, $2);
15020             $3 = HEAP32[$4 >> 2];
15021             $6 = $3 + $11 | 0;
15022             FLAC__fixed_restore_signal(HEAP32[$6 + 92 >> 2], HEAP32[$3 + 1136 >> 2] - $10 | 0, $10, $2 + HEAP32[$6 + 60 >> 2] | 0);
15023            }
15024            if (HEAP32[HEAP32[$0 >> 2] >> 2] == 2) {
15025             break label$109
15026            }
15027            if ($13) {
15028             break label$112
15029            }
15030            break label$109;
15031           }
15032           if ($6 >>> 0 <= 63) {
15033            label$134 : {
15034             if (!HEAP32[$2 + 3632 >> 2]) {
15035              FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]);
15036              break label$134;
15037             }
15038             HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1;
15039            }
15040            HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
15041            break label$109;
15042           }
15043           $9 = Math_imul($5, 292) + $2 | 0;
15044           HEAP32[$9 + 1176 >> 2] = 3;
15045           $11 = $5 << 2;
15046           $15 = HEAP32[($11 + $2 | 0) + 92 >> 2];
15047           $12 = $6 >>> 1 & 31;
15048           $10 = $12 + 1 | 0;
15049           HEAP32[$9 + 1192 >> 2] = $10;
15050           HEAP32[$9 + 1460 >> 2] = $15;
15051           $6 = HEAP32[$2 + 56 >> 2];
15052           $2 = 0;
15053           while (1) {
15054            if (!FLAC__bitreader_read_raw_int32($6, $7 + 32 | 0, $3)) {
15055             break label$3
15056            }
15057            HEAP32[($9 + ($2 << 2) | 0) + 1332 >> 2] = HEAP32[$7 + 32 >> 2];
15058            $15 = ($2 | 0) != ($12 | 0);
15059            $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];
15060            $2 = $2 + 1 | 0;
15061            if ($15) {
15062             continue
15063            }
15064            break;
15065           };
15066           if (!FLAC__bitreader_read_raw_uint32($6, $7 + 16 | 0, $17)) {
15067            break label$3
15068           }
15069           $2 = HEAP32[$7 + 16 >> 2];
15070           label$137 : {
15071            if (($2 | 0) == ($20 | 0)) {
15072             $2 = HEAP32[$4 >> 2];
15073             if (!HEAP32[$2 + 3632 >> 2]) {
15074              FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2])
15075             }
15076             HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
15077             break label$137;
15078            }
15079            $16 = $9 + 1196 | 0;
15080            HEAP32[$16 >> 2] = $2 + 1;
15081            if (!FLAC__bitreader_read_raw_int32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 32 | 0, $21)) {
15082             break label$3
15083            }
15084            $2 = HEAP32[$7 + 32 >> 2];
15085            if (($2 | 0) <= -1) {
15086             $2 = HEAP32[$4 >> 2];
15087             if (!HEAP32[$2 + 3632 >> 2]) {
15088              FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2])
15089             }
15090             HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
15091             break label$137;
15092            }
15093            $15 = $9 + 1200 | 0;
15094            HEAP32[$15 >> 2] = $2;
15095            $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];
15096            $2 = 0;
15097            while (1) {
15098             if (!FLAC__bitreader_read_raw_int32($6, $7 + 32 | 0, HEAP32[$16 >> 2])) {
15099              break label$3
15100             }
15101             HEAP32[($9 + ($2 << 2) | 0) + 1204 >> 2] = HEAP32[$7 + 32 >> 2];
15102             $14 = ($2 | 0) != ($12 | 0);
15103             $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];
15104             $2 = $2 + 1 | 0;
15105             if ($14) {
15106              continue
15107             }
15108             break;
15109            };
15110            if (!FLAC__bitreader_read_raw_uint32($6, $7 + 16 | 0, $19)) {
15111             break label$3
15112            }
15113            $14 = $9 + 1180 | 0;
15114            $6 = HEAP32[$7 + 16 >> 2];
15115            HEAP32[$14 >> 2] = $6;
15116            $2 = HEAP32[$4 >> 2];
15117            label$143 : {
15118             if ($6 >>> 0 <= 1) {
15119              if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 16 | 0, $18)) {
15120               break label$3
15121              }
15122              $2 = HEAP32[$4 >> 2];
15123              $6 = HEAP32[$7 + 16 >> 2];
15124              if (HEAP32[$2 + 1136 >> 2] >>> $6 >>> 0 > $12 >>> 0) {
15125               break label$143
15126              }
15127              if (!HEAP32[$2 + 3632 >> 2]) {
15128               FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2])
15129              }
15130              HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
15131              break label$137;
15132             }
15133             label$146 : {
15134              if (!HEAP32[$2 + 3632 >> 2]) {
15135               FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]);
15136               break label$146;
15137              }
15138              HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1;
15139             }
15140             HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
15141             break label$137;
15142            }
15143            HEAP32[$9 + 1184 >> 2] = $6;
15144            $2 = Math_imul($5, 12);
15145            HEAP32[$9 + 1188 >> 2] = ($2 + HEAP32[$4 >> 2] | 0) + 124;
15146            $12 = HEAP32[$14 >> 2];
15147            if ($12 >>> 0 < 2) {
15148             $14 = $6;
15149             $6 = HEAP32[$0 + 4 >> 2];
15150             if (!read_residual_partitioned_rice_($0, $10, $14, ($2 + $6 | 0) + 124 | 0, HEAP32[($6 + $11 | 0) + 92 >> 2], ($12 | 0) == 1)) {
15151              break label$3
15152             }
15153            }
15154            $6 = $10 << 2;
15155            memcpy(HEAP32[(HEAP32[$4 >> 2] + $11 | 0) + 60 >> 2], $9 + 1332 | 0, $6);
15156            label$149 : {
15157             $12 = HEAP32[$16 >> 2];
15158             if ($12 + ((Math_clz32($10) ^ 31) + $3 | 0) >>> 0 <= 32) {
15159              $2 = HEAP32[$4 >> 2];
15160              if ($3 >>> 0 > 16 | $12 >>> 0 > 16) {
15161               break label$149
15162              }
15163              $3 = $2 + $11 | 0;
15164              FUNCTION_TABLE[HEAP32[$2 + 44 >> 2]](HEAP32[$3 + 92 >> 2], HEAP32[$2 + 1136 >> 2] - $10 | 0, $9 + 1204 | 0, $10, HEAP32[$15 >> 2], $6 + HEAP32[$3 + 60 >> 2] | 0);
15165              break label$137;
15166             }
15167             $2 = HEAP32[$4 >> 2];
15168             $3 = $2 + $11 | 0;
15169             FUNCTION_TABLE[HEAP32[$2 + 40 >> 2]](HEAP32[$3 + 92 >> 2], HEAP32[$2 + 1136 >> 2] - $10 | 0, $9 + 1204 | 0, $10, HEAP32[$15 >> 2], $6 + HEAP32[$3 + 60 >> 2] | 0);
15170             break label$137;
15171            }
15172            $3 = $2 + $11 | 0;
15173            FUNCTION_TABLE[HEAP32[$2 + 36 >> 2]](HEAP32[$3 + 92 >> 2], HEAP32[$2 + 1136 >> 2] - $10 | 0, $9 + 1204 | 0, $10, HEAP32[$15 >> 2], $6 + HEAP32[$3 + 60 >> 2] | 0);
15174           }
15175           if (!$13 | HEAP32[HEAP32[$0 >> 2] >> 2] == 2) {
15176            break label$109
15177           }
15178           break label$112;
15179          }
15180          if (!$13) {
15181           break label$109
15182          }
15183         }
15184         $3 = HEAP32[$4 >> 2];
15185         $2 = HEAP32[($3 + Math_imul($5, 292) | 0) + 1464 >> 2];
15186         HEAP32[$7 + 28 >> 2] = $2;
15187         if (!HEAP32[$3 + 1136 >> 2]) {
15188          break label$109
15189         }
15190         $6 = HEAP32[($3 + ($5 << 2) | 0) + 60 >> 2];
15191         HEAP32[$6 >> 2] = HEAP32[$6 >> 2] << $2;
15192         $2 = 1;
15193         if (HEAPU32[$3 + 1136 >> 2] < 2) {
15194          break label$109
15195         }
15196         while (1) {
15197          $9 = $6 + ($2 << 2) | 0;
15198          HEAP32[$9 >> 2] = HEAP32[$9 >> 2] << HEAP32[$7 + 28 >> 2];
15199          $2 = $2 + 1 | 0;
15200          if ($2 >>> 0 < HEAPU32[$3 + 1136 >> 2]) {
15201           continue
15202          }
15203          break;
15204         };
15205        }
15206        if (HEAP32[HEAP32[$0 >> 2] >> 2] == 2) {
15207         break label$100
15208        }
15209        $5 = $5 + 1 | 0;
15210        $2 = HEAP32[$4 >> 2];
15211        if ($5 >>> 0 < HEAPU32[$2 + 1144 >> 2]) {
15212         continue
15213        }
15214        break;
15215       };
15216      }
15217      label$152 : {
15218       if (FLAC__bitreader_is_consumed_byte_aligned(HEAP32[$2 + 56 >> 2])) {
15219        break label$152
15220       }
15221       HEAP32[$7 + 32 >> 2] = 0;
15222       $5 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];
15223       if (!FLAC__bitreader_read_raw_uint32($5, $7 + 32 | 0, FLAC__bitreader_bits_left_for_byte_alignment($5))) {
15224        break label$3
15225       }
15226       if (!HEAP32[$7 + 32 >> 2]) {
15227        break label$152
15228       }
15229       $5 = HEAP32[$4 >> 2];
15230       if (!HEAP32[$5 + 3632 >> 2]) {
15231        FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 0, HEAP32[$5 + 48 >> 2])
15232       }
15233       HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
15234      }
15235      if (HEAP32[HEAP32[$0 >> 2] >> 2] == 2) {
15236       break label$1
15237      }
15238      $5 = FLAC__bitreader_get_read_crc16(HEAP32[HEAP32[$4 >> 2] + 56 >> 2]);
15239      $8 = 0;
15240      if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 16 | 0, HEAP32[1404])) {
15241       break label$1
15242      }
15243      label$154 : {
15244       if (($5 | 0) == HEAP32[$7 + 16 >> 2]) {
15245        label$156 : {
15246         label$157 : {
15247          label$158 : {
15248           $5 = HEAP32[$4 >> 2];
15249           switch (HEAP32[$5 + 1148 >> 2] + -1 | 0) {
15250           case 2:
15251            break label$156;
15252           case 0:
15253            break label$157;
15254           case 1:
15255            break label$158;
15256           default:
15257            break label$154;
15258           };
15259          }
15260          if (!HEAP32[$5 + 1136 >> 2]) {
15261           break label$154
15262          }
15263          $2 = HEAP32[$5 - -64 >> 2];
15264          $6 = HEAP32[$5 + 60 >> 2];
15265          $3 = 0;
15266          while (1) {
15267           $9 = $3 << 2;
15268           $10 = $9 + $6 | 0;
15269           HEAP32[$10 >> 2] = HEAP32[$10 >> 2] + HEAP32[$2 + $9 >> 2];
15270           $3 = $3 + 1 | 0;
15271           if ($3 >>> 0 < HEAPU32[$5 + 1136 >> 2]) {
15272            continue
15273           }
15274           break;
15275          };
15276          break label$154;
15277         }
15278         if (!HEAP32[$5 + 1136 >> 2]) {
15279          break label$154
15280         }
15281         $2 = HEAP32[$5 - -64 >> 2];
15282         $6 = HEAP32[$5 + 60 >> 2];
15283         $3 = 0;
15284         while (1) {
15285          $9 = $3 << 2;
15286          $10 = $9 + $2 | 0;
15287          HEAP32[$10 >> 2] = HEAP32[$6 + $9 >> 2] - HEAP32[$10 >> 2];
15288          $3 = $3 + 1 | 0;
15289          if ($3 >>> 0 < HEAPU32[$5 + 1136 >> 2]) {
15290           continue
15291          }
15292          break;
15293         };
15294         break label$154;
15295        }
15296        if (!HEAP32[$5 + 1136 >> 2]) {
15297         break label$154
15298        }
15299        $10 = HEAP32[$5 - -64 >> 2];
15300        $11 = HEAP32[$5 + 60 >> 2];
15301        $3 = 0;
15302        while (1) {
15303         $6 = $3 << 2;
15304         $2 = $6 + $11 | 0;
15305         $13 = $6 + $10 | 0;
15306         $6 = HEAP32[$13 >> 2];
15307         $9 = $6 & 1 | HEAP32[$2 >> 2] << 1;
15308         HEAP32[$2 >> 2] = $6 + $9 >> 1;
15309         HEAP32[$13 >> 2] = $9 - $6 >> 1;
15310         $3 = $3 + 1 | 0;
15311         if ($3 >>> 0 < HEAPU32[$5 + 1136 >> 2]) {
15312          continue
15313         }
15314         break;
15315        };
15316        break label$154;
15317       }
15318       $5 = HEAP32[$4 >> 2];
15319       if (!HEAP32[$5 + 3632 >> 2]) {
15320        FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 2, HEAP32[$5 + 48 >> 2])
15321       }
15322       $2 = HEAP32[$4 >> 2];
15323       if (!HEAP32[$2 + 1144 >> 2]) {
15324        break label$154
15325       }
15326       $3 = 0;
15327       while (1) {
15328        memset(HEAP32[(($3 << 2) + $2 | 0) + 60 >> 2], HEAP32[$2 + 1136 >> 2] << 2);
15329        $3 = $3 + 1 | 0;
15330        $2 = HEAP32[$4 >> 2];
15331        if ($3 >>> 0 < HEAPU32[$2 + 1144 >> 2]) {
15332         continue
15333        }
15334        break;
15335       };
15336      }
15337      HEAP32[$1 >> 2] = 1;
15338      $2 = HEAP32[$4 >> 2];
15339      $1 = HEAP32[$2 + 232 >> 2];
15340      if ($1) {
15341       HEAP32[$2 + 228 >> 2] = $1
15342      }
15343      $1 = HEAP32[$0 >> 2];
15344      $6 = HEAP32[$2 + 1144 >> 2];
15345      HEAP32[$1 + 8 >> 2] = $6;
15346      HEAP32[$1 + 12 >> 2] = HEAP32[$2 + 1148 >> 2];
15347      $13 = HEAP32[$2 + 1152 >> 2];
15348      HEAP32[$1 + 16 >> 2] = $13;
15349      HEAP32[$1 + 20 >> 2] = HEAP32[$2 + 1140 >> 2];
15350      $5 = HEAP32[$2 + 1136 >> 2];
15351      HEAP32[$1 + 24 >> 2] = $5;
15352      $1 = $2 + 1160 | 0;
15353      $9 = HEAP32[$1 >> 2];
15354      $3 = HEAP32[$1 + 4 >> 2];
15355      $1 = $3;
15356      $12 = $5 + $9 | 0;
15357      if ($12 >>> 0 < $5 >>> 0) {
15358       $1 = $1 + 1 | 0
15359      }
15360      HEAP32[$2 + 240 >> 2] = $12;
15361      HEAP32[$2 + 244 >> 2] = $1;
15362      $10 = $2 + 60 | 0;
15363      $11 = $2 + 1136 | 0;
15364      label$165 : {
15365       label$166 : {
15366        label$167 : {
15367         if (HEAP32[$2 + 3632 >> 2]) {
15368          HEAP32[$2 + 6156 >> 2] = 1;
15369          $13 = HEAP32[$2 + 6144 >> 2];
15370          $5 = HEAP32[$2 + 6148 >> 2];
15371          memcpy($2 + 3752 | 0, $11, 2384);
15372          if (($3 | 0) == ($5 | 0) & $13 >>> 0 < $9 >>> 0 | $5 >>> 0 < $3 >>> 0 | (($1 | 0) == ($5 | 0) & $13 >>> 0 >= $12 >>> 0 | $5 >>> 0 > $1 >>> 0)) {
15373           break label$165
15374          }
15375          $3 = 0;
15376          $1 = HEAP32[$4 >> 2];
15377          HEAP32[$1 + 3632 >> 2] = 0;
15378          $5 = $13 - $9 | 0;
15379          $4 = $5;
15380          if ($4) {
15381           if ($6) {
15382            while (1) {
15383             $9 = $3 << 2;
15384             HEAP32[$9 + ($7 + 32 | 0) >> 2] = HEAP32[($2 + $9 | 0) + 60 >> 2] + ($4 << 2);
15385             $3 = $3 + 1 | 0;
15386             if (($6 | 0) != ($3 | 0)) {
15387              continue
15388             }
15389             break;
15390            }
15391           }
15392           HEAP32[$1 + 3752 >> 2] = HEAP32[$1 + 3752 >> 2] - $4;
15393           $2 = $1 + 3776 | 0;
15394           $4 = $2;
15395           $3 = $2;
15396           $1 = HEAP32[$2 + 4 >> 2];
15397           $2 = $5 + HEAP32[$2 >> 2] | 0;
15398           if ($2 >>> 0 < $5 >>> 0) {
15399            $1 = $1 + 1 | 0
15400           }
15401           HEAP32[$3 >> 2] = $2;
15402           HEAP32[$4 + 4 >> 2] = $1;
15403           $1 = HEAP32[$0 + 4 >> 2];
15404           $1 = FUNCTION_TABLE[HEAP32[$1 + 24 >> 2]]($0, $1 + 3752 | 0, $7 + 32 | 0, HEAP32[$1 + 48 >> 2]) | 0;
15405           break label$167;
15406          }
15407          $1 = FUNCTION_TABLE[HEAP32[$1 + 24 >> 2]]($0, $11, $10, HEAP32[$1 + 48 >> 2]) | 0;
15408          break label$167;
15409         }
15410         label$172 : {
15411          if (!HEAP32[$2 + 248 >> 2]) {
15412           HEAP32[$2 + 3624 >> 2] = 0;
15413           break label$172;
15414          }
15415          if (!HEAP32[$2 + 3624 >> 2]) {
15416           break label$172
15417          }
15418          if (!FLAC__MD5Accumulate($2 + 3636 | 0, $10, $6, $5, $13 + 7 >>> 3 | 0)) {
15419           break label$166
15420          }
15421          $2 = HEAP32[$4 >> 2];
15422         }
15423         $1 = FUNCTION_TABLE[HEAP32[$2 + 24 >> 2]]($0, $11, $10, HEAP32[$2 + 48 >> 2]) | 0;
15424        }
15425        if (!$1) {
15426         break label$165
15427        }
15428       }
15429       HEAP32[HEAP32[$0 >> 2] >> 2] = 7;
15430       break label$1;
15431      }
15432      HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
15433     }
15434     $8 = 1;
15435     break label$1;
15436    }
15437    $8 = 0;
15438    break label$1;
15439   }
15440   HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
15441   $8 = 0;
15442  }
15443  global$0 = $7 - -64 | 0;
15444  return $8;
15445 }
15446
15447 function read_residual_partitioned_rice_($0, $1, $2, $3, $4, $5) {
15448  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0;
15449  $6 = global$0 - 16 | 0;
15450  global$0 = $6;
15451  $7 = HEAP32[HEAP32[$0 + 4 >> 2] + 1136 >> 2];
15452  $11 = HEAP32[($5 ? 5644 : 5640) >> 2];
15453  $12 = HEAP32[($5 ? 5632 : 5628) >> 2];
15454  label$1 : {
15455   label$2 : {
15456    if (FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($3, $2 >>> 0 > 6 ? $2 : 6)) {
15457     $8 = $2 ? $7 >>> $2 | 0 : $7 - $1 | 0;
15458     $13 = HEAP32[1409];
15459     if (!$2) {
15460      break label$2
15461     }
15462     $5 = 0;
15463     while (1) {
15464      if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $12)) {
15465       $7 = 0;
15466       break label$1;
15467      }
15468      $9 = $10 << 2;
15469      HEAP32[$9 + HEAP32[$3 >> 2] >> 2] = HEAP32[$6 + 12 >> 2];
15470      label$6 : {
15471       if (HEAPU32[$6 + 12 >> 2] < $11 >>> 0) {
15472        $7 = 0;
15473        HEAP32[$9 + HEAP32[$3 + 4 >> 2] >> 2] = 0;
15474        $9 = $8 - ($10 ? 0 : $1) | 0;
15475        if (!FLAC__bitreader_read_rice_signed_block(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], ($5 << 2) + $4 | 0, $9, HEAP32[$6 + 12 >> 2])) {
15476         break label$1
15477        }
15478        $5 = $5 + $9 | 0;
15479        break label$6;
15480       }
15481       if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $13)) {
15482        $7 = 0;
15483        break label$1;
15484       }
15485       HEAP32[$9 + HEAP32[$3 + 4 >> 2] >> 2] = HEAP32[$6 + 12 >> 2];
15486       $7 = $10 ? 0 : $1;
15487       if ($7 >>> 0 >= $8 >>> 0) {
15488        break label$6
15489       }
15490       while (1) {
15491        if (!FLAC__bitreader_read_raw_int32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 8 | 0, HEAP32[$6 + 12 >> 2])) {
15492         $7 = 0;
15493         break label$1;
15494        }
15495        HEAP32[($5 << 2) + $4 >> 2] = HEAP32[$6 + 8 >> 2];
15496        $5 = $5 + 1 | 0;
15497        $7 = $7 + 1 | 0;
15498        if (($8 | 0) != ($7 | 0)) {
15499         continue
15500        }
15501        break;
15502       };
15503      }
15504      $7 = 1;
15505      $10 = $10 + 1 | 0;
15506      if (!($10 >>> $2)) {
15507       continue
15508      }
15509      break;
15510     };
15511     break label$1;
15512    }
15513    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
15514    $7 = 0;
15515    break label$1;
15516   }
15517   $7 = 0;
15518   if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $12)) {
15519    break label$1
15520   }
15521   HEAP32[HEAP32[$3 >> 2] >> 2] = HEAP32[$6 + 12 >> 2];
15522   label$11 : {
15523    if (HEAPU32[$6 + 12 >> 2] >= $11 >>> 0) {
15524     if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $13)) {
15525      break label$1
15526     }
15527     HEAP32[HEAP32[$3 + 4 >> 2] >> 2] = HEAP32[$6 + 12 >> 2];
15528     if (!$8) {
15529      break label$11
15530     }
15531     $5 = 0;
15532     while (1) {
15533      if (!FLAC__bitreader_read_raw_int32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 8 | 0, HEAP32[$6 + 12 >> 2])) {
15534       $7 = 0;
15535       break label$1;
15536      }
15537      HEAP32[($5 << 2) + $4 >> 2] = HEAP32[$6 + 8 >> 2];
15538      $5 = $5 + 1 | 0;
15539      $7 = $7 + 1 | 0;
15540      if (($8 | 0) != ($7 | 0)) {
15541       continue
15542      }
15543      break;
15544     };
15545     break label$11;
15546    }
15547    HEAP32[HEAP32[$3 + 4 >> 2] >> 2] = 0;
15548    if (!FLAC__bitreader_read_rice_signed_block(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $4, $8, HEAP32[$6 + 12 >> 2])) {
15549     break label$1
15550    }
15551   }
15552   $7 = 1;
15553  }
15554  global$0 = $6 + 16 | 0;
15555  return $7;
15556 }
15557
15558 function FLAC__stream_decoder_process_until_end_of_metadata($0) {
15559  $0 = $0 | 0;
15560  var $1 = 0, $2 = 0;
15561  label$1 : {
15562   label$2 : {
15563    while (1) {
15564     label$4 : {
15565      $1 = 1;
15566      label$5 : {
15567       switch (HEAP32[HEAP32[$0 >> 2] >> 2]) {
15568       case 0:
15569        if (find_metadata_($0)) {
15570         continue
15571        }
15572        break label$4;
15573       case 2:
15574       case 3:
15575       case 4:
15576       case 7:
15577        break label$2;
15578       case 1:
15579        break label$5;
15580       default:
15581        break label$1;
15582       };
15583      }
15584      if (read_metadata_($0)) {
15585       continue
15586      }
15587     }
15588     break;
15589    };
15590    $1 = 0;
15591   }
15592   $2 = $1;
15593  }
15594  return $2 | 0;
15595 }
15596
15597 function FLAC__stream_decoder_process_until_end_of_stream($0) {
15598  $0 = $0 | 0;
15599  var $1 = 0, $2 = 0, $3 = 0;
15600  $1 = global$0 - 16 | 0;
15601  global$0 = $1;
15602  $2 = 1;
15603  label$1 : {
15604   label$2 : {
15605    while (1) {
15606     label$4 : {
15607      label$5 : {
15608       switch (HEAP32[HEAP32[$0 >> 2] >> 2]) {
15609       case 0:
15610        if (find_metadata_($0)) {
15611         continue
15612        }
15613        break label$4;
15614       case 1:
15615        if (read_metadata_($0)) {
15616         continue
15617        }
15618        break label$4;
15619       case 2:
15620        if (frame_sync_($0)) {
15621         continue
15622        }
15623        break label$2;
15624       case 4:
15625       case 7:
15626        break label$2;
15627       case 3:
15628        break label$5;
15629       default:
15630        break label$1;
15631       };
15632      }
15633      if (read_frame_($0, $1 + 12 | 0)) {
15634       continue
15635      }
15636     }
15637     break;
15638    };
15639    $2 = 0;
15640   }
15641   $3 = $2;
15642  }
15643  global$0 = $1 + 16 | 0;
15644  return $3 | 0;
15645 }
15646
15647 function read_callback_proxy_($0, $1, $2, $3) {
15648  $0 = $0 | 0;
15649  $1 = $1 | 0;
15650  $2 = $2 | 0;
15651  $3 = $3 | 0;
15652  $0 = FUNCTION_TABLE[HEAP32[HEAP32[$0 + 4 >> 2] + 4 >> 2]]($0, $1, $2, $3) | 0;
15653  if ($0 >>> 0 <= 2) {
15654   return HEAP32[($0 << 2) + 7572 >> 2]
15655  }
15656  return 5;
15657 }
15658
15659 function FLAC__bitwriter_free($0) {
15660  var $1 = 0;
15661  $1 = HEAP32[$0 >> 2];
15662  if ($1) {
15663   dlfree($1)
15664  }
15665  HEAP32[$0 + 16 >> 2] = 0;
15666  HEAP32[$0 >> 2] = 0;
15667  HEAP32[$0 + 8 >> 2] = 0;
15668  HEAP32[$0 + 12 >> 2] = 0;
15669 }
15670
15671 function FLAC__bitwriter_init($0) {
15672  var $1 = 0;
15673  HEAP32[$0 + 16 >> 2] = 0;
15674  HEAP32[$0 + 8 >> 2] = 8192;
15675  HEAP32[$0 + 12 >> 2] = 0;
15676  $1 = $0;
15677  $0 = dlmalloc(32768);
15678  HEAP32[$1 >> 2] = $0;
15679  return ($0 | 0) != 0;
15680 }
15681
15682 function FLAC__bitwriter_clear($0) {
15683  HEAP32[$0 + 12 >> 2] = 0;
15684  HEAP32[$0 + 16 >> 2] = 0;
15685 }
15686
15687 function FLAC__bitwriter_get_write_crc16($0, $1) {
15688  var $2 = 0, $3 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
15689  $2 = global$0 - 16 | 0;
15690  global$0 = $2;
15691  $3 = 0;
15692  label$1 : {
15693   if (!FLAC__bitwriter_get_buffer($0, $2 + 12 | 0, $2 + 8 | 0)) {
15694    break label$1
15695   }
15696   (wasm2js_i32$0 = $1, wasm2js_i32$1 = FLAC__crc16(HEAP32[$2 + 12 >> 2], HEAP32[$2 + 8 >> 2])), HEAP16[wasm2js_i32$0 >> 1] = wasm2js_i32$1;
15697   $3 = 1;
15698  }
15699  global$0 = $2 + 16 | 0;
15700  return $3;
15701 }
15702
15703 function FLAC__bitwriter_get_buffer($0, $1, $2) {
15704  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
15705  $5 = HEAP32[$0 + 16 >> 2];
15706  label$1 : {
15707   if ($5 & 7) {
15708    break label$1
15709   }
15710   label$2 : {
15711    if (!$5) {
15712     $4 = HEAP32[$0 >> 2];
15713     $3 = 0;
15714     break label$2;
15715    }
15716    $6 = HEAP32[$0 + 12 >> 2];
15717    label$4 : {
15718     if (($6 | 0) != HEAP32[$0 + 8 >> 2]) {
15719      break label$4
15720     }
15721     $4 = $5 + 63 >>> 5 | 0;
15722     $3 = $4 + $6 | 0;
15723     if ($3 >>> 0 <= $6 >>> 0) {
15724      break label$4
15725     }
15726     $6 = 0;
15727     $5 = HEAP32[$0 >> 2];
15728     $7 = $3;
15729     $3 = $4 & 1023;
15730     $3 = $7 + ($3 ? 1024 - $3 | 0 : 0) | 0;
15731     label$5 : {
15732      if ($3) {
15733       if (($3 | 0) != ($3 & 1073741823)) {
15734        break label$1
15735       }
15736       $4 = dlrealloc($5, $3 << 2);
15737       if ($4) {
15738        break label$5
15739       }
15740       dlfree($5);
15741       return 0;
15742      }
15743      $4 = dlrealloc($5, 0);
15744      if (!$4) {
15745       break label$1
15746      }
15747     }
15748     HEAP32[$0 + 8 >> 2] = $3;
15749     HEAP32[$0 >> 2] = $4;
15750     $6 = HEAP32[$0 + 12 >> 2];
15751     $5 = HEAP32[$0 + 16 >> 2];
15752    }
15753    $4 = HEAP32[$0 >> 2];
15754    $3 = HEAP32[$0 + 4 >> 2] << 32 - $5;
15755    HEAP32[$4 + ($6 << 2) >> 2] = $3 << 24 | $3 << 8 & 16711680 | ($3 >>> 8 & 65280 | $3 >>> 24);
15756    $3 = HEAP32[$0 + 16 >> 2] >>> 3 | 0;
15757   }
15758   HEAP32[$1 >> 2] = $4;
15759   HEAP32[$2 >> 2] = $3 + (HEAP32[$0 + 12 >> 2] << 2);
15760   $6 = 1;
15761  }
15762  return $6;
15763 }
15764
15765 function FLAC__bitwriter_get_write_crc8($0, $1) {
15766  var $2 = 0, $3 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
15767  $2 = global$0 - 16 | 0;
15768  global$0 = $2;
15769  $3 = 0;
15770  label$1 : {
15771   if (!FLAC__bitwriter_get_buffer($0, $2 + 12 | 0, $2 + 8 | 0)) {
15772    break label$1
15773   }
15774   (wasm2js_i32$0 = $1, wasm2js_i32$1 = FLAC__crc8(HEAP32[$2 + 12 >> 2], HEAP32[$2 + 8 >> 2])), HEAP8[wasm2js_i32$0 | 0] = wasm2js_i32$1;
15775   $3 = 1;
15776  }
15777  global$0 = $2 + 16 | 0;
15778  return $3;
15779 }
15780
15781 function FLAC__bitwriter_write_zeroes($0, $1) {
15782  var $2 = 0, $3 = 0, $4 = 0, $5 = 0;
15783  label$1 : {
15784   label$2 : {
15785    if (!$1) {
15786     break label$2
15787    }
15788    $2 = HEAP32[$0 + 8 >> 2];
15789    $3 = HEAP32[$0 + 12 >> 2];
15790    label$3 : {
15791     if ($2 >>> 0 > $3 + $1 >>> 0) {
15792      break label$3
15793     }
15794     $4 = $3 + ((HEAP32[$0 + 16 >> 2] + $1 | 0) + 31 >>> 5 | 0) | 0;
15795     if ($4 >>> 0 <= $2 >>> 0) {
15796      break label$3
15797     }
15798     $3 = 0;
15799     $5 = HEAP32[$0 >> 2];
15800     $2 = $4 - $2 & 1023;
15801     $2 = $4 + ($2 ? 1024 - $2 | 0 : 0) | 0;
15802     label$4 : {
15803      if ($2) {
15804       if (($2 | 0) != ($2 & 1073741823)) {
15805        break label$1
15806       }
15807       $4 = dlrealloc($5, $2 << 2);
15808       if ($4) {
15809        break label$4
15810       }
15811       dlfree($5);
15812       return 0;
15813      }
15814      $4 = dlrealloc($5, 0);
15815      if (!$4) {
15816       break label$1
15817      }
15818     }
15819     HEAP32[$0 + 8 >> 2] = $2;
15820     HEAP32[$0 >> 2] = $4;
15821    }
15822    $2 = HEAP32[$0 + 16 >> 2];
15823    if ($2) {
15824     $4 = $2;
15825     $2 = 32 - $2 | 0;
15826     $3 = $2 >>> 0 < $1 >>> 0 ? $2 : $1;
15827     $5 = $4 + $3 | 0;
15828     HEAP32[$0 + 16 >> 2] = $5;
15829     $2 = HEAP32[$0 + 4 >> 2] << $3;
15830     HEAP32[$0 + 4 >> 2] = $2;
15831     if (($5 | 0) != 32) {
15832      break label$2
15833     }
15834     $5 = HEAP32[$0 + 12 >> 2];
15835     HEAP32[$0 + 12 >> 2] = $5 + 1;
15836     HEAP32[HEAP32[$0 >> 2] + ($5 << 2) >> 2] = $2 << 8 & 16711680 | $2 << 24 | ($2 >>> 8 & 65280 | $2 >>> 24);
15837     HEAP32[$0 + 16 >> 2] = 0;
15838     $1 = $1 - $3 | 0;
15839    }
15840    if ($1 >>> 0 >= 32) {
15841     $2 = HEAP32[$0 >> 2];
15842     while (1) {
15843      $3 = HEAP32[$0 + 12 >> 2];
15844      HEAP32[$0 + 12 >> 2] = $3 + 1;
15845      HEAP32[$2 + ($3 << 2) >> 2] = 0;
15846      $1 = $1 + -32 | 0;
15847      if ($1 >>> 0 > 31) {
15848       continue
15849      }
15850      break;
15851     };
15852    }
15853    if (!$1) {
15854     break label$2
15855    }
15856    HEAP32[$0 + 16 >> 2] = $1;
15857    HEAP32[$0 + 4 >> 2] = 0;
15858   }
15859   $3 = 1;
15860  }
15861  return $3;
15862 }
15863
15864 function FLAC__bitwriter_write_raw_uint32($0, $1, $2) {
15865  var $3 = 0;
15866  label$1 : {
15867   if ($2 >>> 0 <= 31) {
15868    $3 = 0;
15869    if ($1 >>> $2) {
15870     break label$1
15871    }
15872   }
15873   $3 = FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, $2);
15874  }
15875  return $3;
15876 }
15877
15878 function FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, $2) {
15879  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
15880  label$1 : {
15881   if (!$0 | $2 >>> 0 > 32) {
15882    break label$1
15883   }
15884   $4 = HEAP32[$0 >> 2];
15885   if (!$4) {
15886    break label$1
15887   }
15888   $6 = 1;
15889   if (!$2) {
15890    break label$1
15891   }
15892   $7 = HEAP32[$0 + 8 >> 2];
15893   $3 = HEAP32[$0 + 12 >> 2];
15894   label$2 : {
15895    if ($7 >>> 0 > $3 + $2 >>> 0) {
15896     $3 = $4;
15897     break label$2;
15898    }
15899    $5 = $3 + ((HEAP32[$0 + 16 >> 2] + $2 | 0) + 31 >>> 5 | 0) | 0;
15900    if ($5 >>> 0 <= $7 >>> 0) {
15901     $3 = $4;
15902     break label$2;
15903    }
15904    $6 = 0;
15905    $3 = $5 - $7 & 1023;
15906    $5 = $5 + ($3 ? 1024 - $3 | 0 : 0) | 0;
15907    label$5 : {
15908     if ($5) {
15909      if (($5 | 0) != ($5 & 1073741823)) {
15910       break label$1
15911      }
15912      $3 = dlrealloc($4, $5 << 2);
15913      if ($3) {
15914       break label$5
15915      }
15916      dlfree($4);
15917      return 0;
15918     }
15919     $3 = dlrealloc($4, 0);
15920     if (!$3) {
15921      break label$1
15922     }
15923    }
15924    HEAP32[$0 + 8 >> 2] = $5;
15925    HEAP32[$0 >> 2] = $3;
15926   }
15927   $4 = HEAP32[$0 + 16 >> 2];
15928   $5 = 32 - $4 | 0;
15929   if ($5 >>> 0 > $2 >>> 0) {
15930    HEAP32[$0 + 16 >> 2] = $2 + $4;
15931    HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] << $2 | $1;
15932    return 1;
15933   }
15934   if ($4) {
15935    $4 = $2 - $5 | 0;
15936    HEAP32[$0 + 16 >> 2] = $4;
15937    $2 = HEAP32[$0 + 12 >> 2];
15938    HEAP32[$0 + 12 >> 2] = $2 + 1;
15939    $3 = ($2 << 2) + $3 | 0;
15940    $2 = HEAP32[$0 + 4 >> 2] << $5 | $1 >>> $4;
15941    HEAP32[$3 >> 2] = $2 << 24 | $2 << 8 & 16711680 | ($2 >>> 8 & 65280 | $2 >>> 24);
15942    HEAP32[$0 + 4 >> 2] = $1;
15943    return 1;
15944   }
15945   $6 = 1;
15946   $2 = $0;
15947   $0 = HEAP32[$0 + 12 >> 2];
15948   HEAP32[$2 + 12 >> 2] = $0 + 1;
15949   HEAP32[($0 << 2) + $3 >> 2] = $1 << 8 & 16711680 | $1 << 24 | ($1 >>> 8 & 65280 | $1 >>> 24);
15950  }
15951  return $6;
15952 }
15953
15954 function FLAC__bitwriter_write_raw_int32($0, $1, $2) {
15955  return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 >>> 0 < 32 ? -1 << $2 ^ -1 : -1) & $1, $2);
15956 }
15957
15958 function FLAC__bitwriter_write_raw_uint64($0, $1, $2, $3) {
15959  var $4 = 0;
15960  label$1 : {
15961   if ($3 >>> 0 >= 33) {
15962    $3 = $3 + -32 | 0;
15963    if ($2 >>> $3 | 0 ? $3 >>> 0 <= 31 : 0) {
15964     break label$1
15965    }
15966    if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $2, $3)) {
15967     break label$1
15968    }
15969    return (FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, 32) | 0) != 0;
15970   }
15971   if (($3 | 0) != 32) {
15972    if ($1 >>> $3) {
15973     break label$1
15974    }
15975   }
15976   $4 = FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, $3);
15977  }
15978  return $4;
15979 }
15980
15981 function FLAC__bitwriter_write_raw_uint32_little_endian($0, $1) {
15982  var $2 = 0;
15983  label$1 : {
15984   if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 255, 8)) {
15985    break label$1
15986   }
15987   if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 8 & 255, 8)) {
15988    break label$1
15989   }
15990   if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 16 & 255, 8)) {
15991    break label$1
15992   }
15993   $2 = (FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 | 0, 8) | 0) != 0;
15994  }
15995  return $2;
15996 }
15997
15998 function FLAC__bitwriter_write_byte_block($0, $1, $2) {
15999  var $3 = 0, $4 = 0, $5 = 0, $6 = 0;
16000  $3 = HEAP32[$0 + 8 >> 2];
16001  $4 = HEAP32[$0 + 12 >> 2];
16002  label$1 : {
16003   label$2 : {
16004    if ($3 >>> 0 > ($4 + ($2 >>> 2 | 0) | 0) + 1 >>> 0) {
16005     break label$2
16006    }
16007    $5 = $4 + ((HEAP32[$0 + 16 >> 2] + ($2 << 3) | 0) + 31 >>> 5 | 0) | 0;
16008    if ($5 >>> 0 <= $3 >>> 0) {
16009     break label$2
16010    }
16011    $4 = 0;
16012    $6 = HEAP32[$0 >> 2];
16013    $3 = $5 - $3 & 1023;
16014    $3 = $5 + ($3 ? 1024 - $3 | 0 : 0) | 0;
16015    label$3 : {
16016     if ($3) {
16017      if (($3 | 0) != ($3 & 1073741823)) {
16018       break label$1
16019      }
16020      $5 = dlrealloc($6, $3 << 2);
16021      if ($5) {
16022       break label$3
16023      }
16024      dlfree($6);
16025      return 0;
16026     }
16027     $5 = dlrealloc($6, 0);
16028     if (!$5) {
16029      break label$1
16030     }
16031    }
16032    HEAP32[$0 + 8 >> 2] = $3;
16033    HEAP32[$0 >> 2] = $5;
16034   }
16035   $4 = 1;
16036   if (!$2) {
16037    break label$1
16038   }
16039   $4 = 0;
16040   label$5 : {
16041    while (1) {
16042     if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, HEAPU8[$1 + $4 | 0], 8)) {
16043      break label$5
16044     }
16045     $4 = $4 + 1 | 0;
16046     if (($4 | 0) != ($2 | 0)) {
16047      continue
16048     }
16049     break;
16050    };
16051    return 1;
16052   }
16053   $4 = 0;
16054  }
16055  return $4;
16056 }
16057
16058 function FLAC__bitwriter_write_unary_unsigned($0, $1) {
16059  if ($1 >>> 0 <= 31) {
16060   return FLAC__bitwriter_write_raw_uint32_nocheck($0, 1, $1 + 1 | 0)
16061  }
16062  if (!FLAC__bitwriter_write_zeroes($0, $1)) {
16063   return 0
16064  }
16065  return (FLAC__bitwriter_write_raw_uint32_nocheck($0, 1, 1) | 0) != 0;
16066 }
16067
16068 function FLAC__bitwriter_write_rice_signed_block($0, $1, $2, $3) {
16069  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0;
16070  $4 = 1;
16071  label$1 : {
16072   if (!$2) {
16073    break label$1
16074   }
16075   $10 = $3 + 1 | 0;
16076   $11 = -1 << $3;
16077   $12 = -1 >>> 31 - $3 | 0;
16078   while (1) {
16079    $6 = HEAP32[$1 >> 2];
16080    $9 = $6 << 1 ^ $6 >> 31;
16081    $6 = $9 >>> $3 | 0;
16082    $4 = $10 + $6 | 0;
16083    label$3 : {
16084     label$4 : {
16085      $5 = HEAP32[$0 + 16 >> 2];
16086      if (!$5) {
16087       break label$4
16088      }
16089      $7 = $4 + $5 | 0;
16090      if ($7 >>> 0 > 31) {
16091       break label$4
16092      }
16093      HEAP32[$0 + 16 >> 2] = $7;
16094      HEAP32[$0 + 4 >> 2] = ($9 | $11) & $12 | HEAP32[$0 + 4 >> 2] << $4;
16095      break label$3;
16096     }
16097     $8 = HEAP32[$0 + 8 >> 2];
16098     $7 = HEAP32[$0 + 12 >> 2];
16099     label$5 : {
16100      if ($8 >>> 0 > ($7 + ($5 + $6 | 0) | 0) + 1 >>> 0) {
16101       break label$5
16102      }
16103      $4 = $7 + (($4 + $5 | 0) + 31 >>> 5 | 0) | 0;
16104      if ($4 >>> 0 <= $8 >>> 0) {
16105       break label$5
16106      }
16107      $7 = HEAP32[$0 >> 2];
16108      $5 = $4 - $8 & 1023;
16109      $5 = $4 + ($5 ? 1024 - $5 | 0 : 0) | 0;
16110      label$6 : {
16111       if ($5) {
16112        $4 = 0;
16113        if (($5 | 0) != ($5 & 1073741823)) {
16114         break label$1
16115        }
16116        $8 = dlrealloc($7, $5 << 2);
16117        if ($8) {
16118         break label$6
16119        }
16120        dlfree($7);
16121        return 0;
16122       }
16123       $8 = dlrealloc($7, 0);
16124       $4 = 0;
16125       if (!$8) {
16126        break label$1
16127       }
16128      }
16129      HEAP32[$0 + 8 >> 2] = $5;
16130      HEAP32[$0 >> 2] = $8;
16131     }
16132     label$8 : {
16133      if (!$6) {
16134       break label$8
16135      }
16136      $4 = HEAP32[$0 + 16 >> 2];
16137      if ($4) {
16138       $5 = HEAP32[$0 + 4 >> 2];
16139       $7 = 32 - $4 | 0;
16140       if ($6 >>> 0 < $7 >>> 0) {
16141        HEAP32[$0 + 16 >> 2] = $4 + $6;
16142        HEAP32[$0 + 4 >> 2] = $5 << $6;
16143        break label$8;
16144       }
16145       $4 = $5 << $7;
16146       HEAP32[$0 + 4 >> 2] = $4;
16147       $5 = HEAP32[$0 + 12 >> 2];
16148       HEAP32[$0 + 12 >> 2] = $5 + 1;
16149       HEAP32[HEAP32[$0 >> 2] + ($5 << 2) >> 2] = $4 << 8 & 16711680 | $4 << 24 | ($4 >>> 8 & 65280 | $4 >>> 24);
16150       HEAP32[$0 + 16 >> 2] = 0;
16151       $6 = $6 - $7 | 0;
16152      }
16153      if ($6 >>> 0 >= 32) {
16154       $4 = HEAP32[$0 >> 2];
16155       while (1) {
16156        $5 = HEAP32[$0 + 12 >> 2];
16157        HEAP32[$0 + 12 >> 2] = $5 + 1;
16158        HEAP32[$4 + ($5 << 2) >> 2] = 0;
16159        $6 = $6 + -32 | 0;
16160        if ($6 >>> 0 > 31) {
16161         continue
16162        }
16163        break;
16164       };
16165      }
16166      if (!$6) {
16167       break label$8
16168      }
16169      HEAP32[$0 + 16 >> 2] = $6;
16170      HEAP32[$0 + 4 >> 2] = 0;
16171     }
16172     $6 = ($9 | $11) & $12;
16173     $4 = HEAP32[$0 + 4 >> 2];
16174     $7 = HEAP32[$0 + 16 >> 2];
16175     $5 = 32 - $7 | 0;
16176     if ($10 >>> 0 < $5 >>> 0) {
16177      HEAP32[$0 + 16 >> 2] = $7 + $10;
16178      HEAP32[$0 + 4 >> 2] = $6 | $4 << $10;
16179      break label$3;
16180     }
16181     $7 = $10 - $5 | 0;
16182     HEAP32[$0 + 16 >> 2] = $7;
16183     $9 = HEAP32[$0 + 12 >> 2];
16184     HEAP32[$0 + 12 >> 2] = $9 + 1;
16185     $4 = $4 << $5 | $6 >>> $7;
16186     HEAP32[HEAP32[$0 >> 2] + ($9 << 2) >> 2] = $4 << 24 | $4 << 8 & 16711680 | ($4 >>> 8 & 65280 | $4 >>> 24);
16187     HEAP32[$0 + 4 >> 2] = $6;
16188    }
16189    $1 = $1 + 4 | 0;
16190    $2 = $2 + -1 | 0;
16191    if ($2) {
16192     continue
16193    }
16194    break;
16195   };
16196   $4 = 1;
16197  }
16198  return $4;
16199 }
16200
16201 function FLAC__bitwriter_write_utf8_uint32($0, $1) {
16202  if (($1 | 0) >= 0) {
16203   if ($1 >>> 0 <= 127) {
16204    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, 8)
16205   }
16206   if ($1 >>> 0 <= 2047) {
16207    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 | 192, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1
16208   }
16209   if ($1 >>> 0 <= 65535) {
16210    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 | 224, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1
16211   }
16212   if ($1 >>> 0 <= 2097151) {
16213    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 | 240, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1
16214   }
16215   if ($1 >>> 0 <= 67108863) {
16216    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 | 248, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1
16217   }
16218   $0 = FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 30 | 252, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1;
16219  } else {
16220   $0 = 0
16221  }
16222  return $0;
16223 }
16224
16225 function FLAC__bitwriter_write_utf8_uint64($0, $1, $2) {
16226  if (($2 | 0) == 15 | $2 >>> 0 < 15) {
16227   if (!$2 & $1 >>> 0 <= 127 | $2 >>> 0 < 0) {
16228    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, 8)
16229   }
16230   if (!$2 & $1 >>> 0 <= 2047 | $2 >>> 0 < 0) {
16231    return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 63) << 26 | $1 >>> 6 | 192, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1
16232   }
16233   if (!$2 & $1 >>> 0 <= 65535 | $2 >>> 0 < 0) {
16234    return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 4095) << 20 | $1 >>> 12 | 224, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1
16235   }
16236   if (!$2 & $1 >>> 0 <= 2097151 | $2 >>> 0 < 0) {
16237    return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 262143) << 14 | $1 >>> 18 | 240, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1
16238   }
16239   if (!$2 & $1 >>> 0 <= 67108863 | $2 >>> 0 < 0) {
16240    return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 16777215) << 8 | $1 >>> 24 | 248, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1
16241   }
16242   if (!$2 & $1 >>> 0 <= 2147483647 | $2 >>> 0 < 0) {
16243    return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 1073741823) << 2 | $1 >>> 30 | 252, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1
16244   }
16245   $0 = FLAC__bitwriter_write_raw_uint32_nocheck($0, 254, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 1073741823) << 2 | $1 >>> 30 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1;
16246  } else {
16247   $0 = 0
16248  }
16249  return $0;
16250 }
16251
16252 function FLAC__ogg_encoder_aspect_init($0) {
16253  if (ogg_stream_init($0 + 8 | 0, HEAP32[$0 >> 2])) {
16254   $0 = 0
16255  } else {
16256   HEAP32[$0 + 392 >> 2] = 0;
16257   HEAP32[$0 + 396 >> 2] = 0;
16258   HEAP32[$0 + 384 >> 2] = 0;
16259   HEAP32[$0 + 388 >> 2] = 1;
16260   $0 = 1;
16261  }
16262  return $0;
16263 }
16264
16265 function FLAC__ogg_encoder_aspect_set_defaults($0) {
16266  HEAP32[$0 >> 2] = 0;
16267  HEAP32[$0 + 4 >> 2] = 0;
16268 }
16269
16270 function FLAC__ogg_encoder_aspect_write_callback_wrapper($0, $1, $2, $3, $4, $5, $6, $7, $8) {
16271  var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0;
16272  $9 = global$0 - 96 | 0;
16273  global$0 = $9;
16274  label$1 : {
16275   label$2 : {
16276    if (HEAP32[$0 + 384 >> 2]) {
16277     HEAP32[$9 + 72 >> 2] = 0;
16278     HEAP32[$9 + 76 >> 2] = 0;
16279     $12 = $9 + 80 | 0;
16280     $11 = $12;
16281     HEAP32[$11 >> 2] = 0;
16282     HEAP32[$11 + 4 >> 2] = 0;
16283     HEAP32[$9 + 88 >> 2] = 0;
16284     HEAP32[$9 + 92 >> 2] = 0;
16285     HEAP32[$9 + 64 >> 2] = 0;
16286     HEAP32[$9 + 68 >> 2] = 0;
16287     $10 = HEAP32[$0 + 396 >> 2];
16288     $11 = $3;
16289     $13 = HEAP32[$0 + 392 >> 2];
16290     $14 = $11 + $13 | 0;
16291     if ($14 >>> 0 < $13 >>> 0) {
16292      $10 = $10 + 1 | 0
16293     }
16294     HEAP32[$12 >> 2] = $14;
16295     HEAP32[$12 + 4 >> 2] = $10;
16296     label$4 : {
16297      label$5 : {
16298       if (HEAP32[$0 + 388 >> 2]) {
16299        if (($2 | 0) != 38) {
16300         break label$4
16301        }
16302        HEAP8[$9 | 0] = HEAPU8[7536];
16303        $2 = HEAP32[2721];
16304        $2 = HEAPU8[$2 | 0] | HEAPU8[$2 + 1 | 0] << 8 | (HEAPU8[$2 + 2 | 0] << 16 | HEAPU8[$2 + 3 | 0] << 24);
16305        HEAP8[$9 + 5 | 0] = 1;
16306        HEAP8[$9 + 6 | 0] = 0;
16307        HEAP8[$9 + 1 | 0] = $2;
16308        HEAP8[$9 + 2 | 0] = $2 >>> 8;
16309        HEAP8[$9 + 3 | 0] = $2 >>> 16;
16310        HEAP8[$9 + 4 | 0] = $2 >>> 24;
16311        $10 = HEAP32[$0 + 4 >> 2];
16312        $2 = HEAPU8[5409] | HEAPU8[5410] << 8 | (HEAPU8[5411] << 16 | HEAPU8[5412] << 24);
16313        HEAP8[$9 + 9 | 0] = $2;
16314        HEAP8[$9 + 10 | 0] = $2 >>> 8;
16315        HEAP8[$9 + 11 | 0] = $2 >>> 16;
16316        HEAP8[$9 + 12 | 0] = $2 >>> 24;
16317        HEAP8[$9 + 8 | 0] = $10;
16318        HEAP8[$9 + 7 | 0] = $10 >>> 8;
16319        $2 = HEAPU8[$1 + 34 | 0] | HEAPU8[$1 + 35 | 0] << 8 | (HEAPU8[$1 + 36 | 0] << 16 | HEAPU8[$1 + 37 | 0] << 24);
16320        $10 = HEAPU8[$1 + 30 | 0] | HEAPU8[$1 + 31 | 0] << 8 | (HEAPU8[$1 + 32 | 0] << 16 | HEAPU8[$1 + 33 | 0] << 24);
16321        HEAP8[$9 + 43 | 0] = $10;
16322        HEAP8[$9 + 44 | 0] = $10 >>> 8;
16323        HEAP8[$9 + 45 | 0] = $10 >>> 16;
16324        HEAP8[$9 + 46 | 0] = $10 >>> 24;
16325        HEAP8[$9 + 47 | 0] = $2;
16326        HEAP8[$9 + 48 | 0] = $2 >>> 8;
16327        HEAP8[$9 + 49 | 0] = $2 >>> 16;
16328        HEAP8[$9 + 50 | 0] = $2 >>> 24;
16329        $2 = HEAPU8[$1 + 28 | 0] | HEAPU8[$1 + 29 | 0] << 8 | (HEAPU8[$1 + 30 | 0] << 16 | HEAPU8[$1 + 31 | 0] << 24);
16330        $10 = HEAPU8[$1 + 24 | 0] | HEAPU8[$1 + 25 | 0] << 8 | (HEAPU8[$1 + 26 | 0] << 16 | HEAPU8[$1 + 27 | 0] << 24);
16331        HEAP8[$9 + 37 | 0] = $10;
16332        HEAP8[$9 + 38 | 0] = $10 >>> 8;
16333        HEAP8[$9 + 39 | 0] = $10 >>> 16;
16334        HEAP8[$9 + 40 | 0] = $10 >>> 24;
16335        HEAP8[$9 + 41 | 0] = $2;
16336        HEAP8[$9 + 42 | 0] = $2 >>> 8;
16337        HEAP8[$9 + 43 | 0] = $2 >>> 16;
16338        HEAP8[$9 + 44 | 0] = $2 >>> 24;
16339        $2 = HEAPU8[$1 + 20 | 0] | HEAPU8[$1 + 21 | 0] << 8 | (HEAPU8[$1 + 22 | 0] << 16 | HEAPU8[$1 + 23 | 0] << 24);
16340        $10 = HEAPU8[$1 + 16 | 0] | HEAPU8[$1 + 17 | 0] << 8 | (HEAPU8[$1 + 18 | 0] << 16 | HEAPU8[$1 + 19 | 0] << 24);
16341        HEAP8[$9 + 29 | 0] = $10;
16342        HEAP8[$9 + 30 | 0] = $10 >>> 8;
16343        HEAP8[$9 + 31 | 0] = $10 >>> 16;
16344        HEAP8[$9 + 32 | 0] = $10 >>> 24;
16345        HEAP8[$9 + 33 | 0] = $2;
16346        HEAP8[$9 + 34 | 0] = $2 >>> 8;
16347        HEAP8[$9 + 35 | 0] = $2 >>> 16;
16348        HEAP8[$9 + 36 | 0] = $2 >>> 24;
16349        $2 = HEAPU8[$1 + 12 | 0] | HEAPU8[$1 + 13 | 0] << 8 | (HEAPU8[$1 + 14 | 0] << 16 | HEAPU8[$1 + 15 | 0] << 24);
16350        $10 = HEAPU8[$1 + 8 | 0] | HEAPU8[$1 + 9 | 0] << 8 | (HEAPU8[$1 + 10 | 0] << 16 | HEAPU8[$1 + 11 | 0] << 24);
16351        HEAP8[$9 + 21 | 0] = $10;
16352        HEAP8[$9 + 22 | 0] = $10 >>> 8;
16353        HEAP8[$9 + 23 | 0] = $10 >>> 16;
16354        HEAP8[$9 + 24 | 0] = $10 >>> 24;
16355        HEAP8[$9 + 25 | 0] = $2;
16356        HEAP8[$9 + 26 | 0] = $2 >>> 8;
16357        HEAP8[$9 + 27 | 0] = $2 >>> 16;
16358        HEAP8[$9 + 28 | 0] = $2 >>> 24;
16359        $2 = HEAPU8[$1 + 4 | 0] | HEAPU8[$1 + 5 | 0] << 8 | (HEAPU8[$1 + 6 | 0] << 16 | HEAPU8[$1 + 7 | 0] << 24);
16360        $1 = HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24);
16361        HEAP8[$9 + 13 | 0] = $1;
16362        HEAP8[$9 + 14 | 0] = $1 >>> 8;
16363        HEAP8[$9 + 15 | 0] = $1 >>> 16;
16364        HEAP8[$9 + 16 | 0] = $1 >>> 24;
16365        HEAP8[$9 + 17 | 0] = $2;
16366        HEAP8[$9 + 18 | 0] = $2 >>> 8;
16367        HEAP8[$9 + 19 | 0] = $2 >>> 16;
16368        HEAP8[$9 + 20 | 0] = $2 >>> 24;
16369        HEAP32[$9 + 68 >> 2] = 51;
16370        HEAP32[$9 + 72 >> 2] = 1;
16371        HEAP32[$9 + 64 >> 2] = $9;
16372        HEAP32[$0 + 388 >> 2] = 0;
16373        break label$5;
16374       }
16375       HEAP32[$9 + 68 >> 2] = $2;
16376       HEAP32[$9 + 64 >> 2] = $1;
16377      }
16378      if ($5) {
16379       HEAP32[$9 + 76 >> 2] = 1
16380      }
16381      $1 = $0 + 8 | 0;
16382      if (ogg_stream_packetin($1, $9 - -64 | 0)) {
16383       break label$4
16384      }
16385      $2 = $0 + 368 | 0;
16386      if (!$3) {
16387       while (1) {
16388        if (!ogg_stream_flush_i($1, $2, 1)) {
16389         break label$2
16390        }
16391        if (FUNCTION_TABLE[$6]($7, HEAP32[$0 + 368 >> 2], HEAP32[$0 + 372 >> 2], 0, $4, $8)) {
16392         break label$4
16393        }
16394        if (!FUNCTION_TABLE[$6]($7, HEAP32[$0 + 376 >> 2], HEAP32[$0 + 380 >> 2], 0, $4, $8)) {
16395         continue
16396        }
16397        break label$4;
16398       }
16399      }
16400      while (1) {
16401       if (!ogg_stream_pageout($1, $2)) {
16402        break label$2
16403       }
16404       if (FUNCTION_TABLE[$6]($7, HEAP32[$0 + 368 >> 2], HEAP32[$0 + 372 >> 2], 0, $4, $8)) {
16405        break label$4
16406       }
16407       if (!FUNCTION_TABLE[$6]($7, HEAP32[$0 + 376 >> 2], HEAP32[$0 + 380 >> 2], 0, $4, $8)) {
16408        continue
16409       }
16410       break;
16411      };
16412     }
16413     $6 = 1;
16414     break label$1;
16415    }
16416    $6 = 1;
16417    if ($3 | $4 | ($2 | 0) != 4 | (HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24)) != (HEAPU8[5409] | HEAPU8[5410] << 8 | (HEAPU8[5411] << 16 | HEAPU8[5412] << 24))) {
16418     break label$1
16419    }
16420    HEAP32[$0 + 384 >> 2] = 1;
16421    $11 = $3;
16422   }
16423   $1 = $0;
16424   $3 = $1;
16425   $2 = HEAP32[$1 + 396 >> 2];
16426   $0 = $11 + HEAP32[$1 + 392 >> 2] | 0;
16427   if ($0 >>> 0 < $11 >>> 0) {
16428    $2 = $2 + 1 | 0
16429   }
16430   HEAP32[$3 + 392 >> 2] = $0;
16431   HEAP32[$1 + 396 >> 2] = $2;
16432   $6 = 0;
16433  }
16434  global$0 = $9 + 96 | 0;
16435  return $6;
16436 }
16437
16438 function simple_ogg_page__init($0) {
16439  HEAP32[$0 >> 2] = 0;
16440  HEAP32[$0 + 4 >> 2] = 0;
16441  HEAP32[$0 + 8 >> 2] = 0;
16442  HEAP32[$0 + 12 >> 2] = 0;
16443 }
16444
16445 function simple_ogg_page__clear($0) {
16446  var $1 = 0;
16447  $1 = HEAP32[$0 >> 2];
16448  if ($1) {
16449   dlfree($1)
16450  }
16451  $1 = HEAP32[$0 + 8 >> 2];
16452  if ($1) {
16453   dlfree($1)
16454  }
16455  HEAP32[$0 >> 2] = 0;
16456  HEAP32[$0 + 4 >> 2] = 0;
16457  HEAP32[$0 + 8 >> 2] = 0;
16458  HEAP32[$0 + 12 >> 2] = 0;
16459 }
16460
16461 function simple_ogg_page__get_at($0, $1, $2, $3, $4, $5, $6) {
16462  var $7 = 0, $8 = 0, $9 = 0;
16463  $7 = global$0 - 16 | 0;
16464  global$0 = $7;
16465  label$1 : {
16466   if (!$4) {
16467    break label$1
16468   }
16469   label$2 : {
16470    switch (FUNCTION_TABLE[$4]($0, $1, $2, $6) | 0) {
16471    case 1:
16472     HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
16473     break label$1;
16474    case 0:
16475     break label$2;
16476    default:
16477     break label$1;
16478    };
16479   }
16480   $4 = dlmalloc(282);
16481   HEAP32[$3 >> 2] = $4;
16482   if (!$4) {
16483    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
16484    break label$1;
16485   }
16486   $8 = 27;
16487   while (1) {
16488    HEAP32[$7 + 12 >> 2] = $8;
16489    $1 = 5;
16490    label$6 : {
16491     label$7 : {
16492      switch (FUNCTION_TABLE[$5]($0, $4, $7 + 12 | 0, $6) | 0) {
16493      case 1:
16494       $1 = HEAP32[$7 + 12 >> 2];
16495       if ($1) {
16496        break label$6
16497       }
16498       $1 = 2;
16499      default:
16500       HEAP32[HEAP32[$0 >> 2] >> 2] = $1;
16501       break label$1;
16502      case 3:
16503       break label$1;
16504      case 0:
16505       break label$7;
16506      };
16507     }
16508     $1 = HEAP32[$7 + 12 >> 2];
16509    }
16510    $4 = $1 + $4 | 0;
16511    $8 = $8 - $1 | 0;
16512    if ($8) {
16513     continue
16514    }
16515    break;
16516   };
16517   $1 = HEAP32[$3 >> 2];
16518   HEAP32[$3 + 4 >> 2] = HEAPU8[$1 + 26 | 0] + 27;
16519   label$10 : {
16520    if (!(HEAP8[$1 + 5 | 0] & 1 | (HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24)) != 1399285583 | ((HEAPU8[$1 + 6 | 0] | HEAPU8[$1 + 7 | 0] << 8 | (HEAPU8[$1 + 8 | 0] << 16 | HEAPU8[$1 + 9 | 0] << 24)) != 0 | (HEAPU8[$1 + 10 | 0] | HEAPU8[$1 + 11 | 0] << 8 | (HEAPU8[$1 + 12 | 0] << 16 | HEAPU8[$1 + 13 | 0] << 24)) != 0))) {
16521     $8 = HEAPU8[$1 + 26 | 0];
16522     if ($8) {
16523      break label$10
16524     }
16525    }
16526    HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
16527    break label$1;
16528   }
16529   $4 = $1 + 27 | 0;
16530   while (1) {
16531    HEAP32[$7 + 12 >> 2] = $8;
16532    $1 = 5;
16533    label$13 : {
16534     label$14 : {
16535      switch (FUNCTION_TABLE[$5]($0, $4, $7 + 12 | 0, $6) | 0) {
16536      case 1:
16537       $1 = HEAP32[$7 + 12 >> 2];
16538       if ($1) {
16539        break label$13
16540       }
16541       $1 = 2;
16542      default:
16543       HEAP32[HEAP32[$0 >> 2] >> 2] = $1;
16544       break label$1;
16545      case 3:
16546       break label$1;
16547      case 0:
16548       break label$14;
16549      };
16550     }
16551     $1 = HEAP32[$7 + 12 >> 2];
16552    }
16553    $4 = $1 + $4 | 0;
16554    $8 = $8 - $1 | 0;
16555    if ($8) {
16556     continue
16557    }
16558    break;
16559   };
16560   $4 = 0;
16561   $1 = HEAP32[$3 >> 2];
16562   $2 = HEAPU8[$1 + 26 | 0];
16563   label$17 : {
16564    if (($2 | 0) != 1) {
16565     $2 = $2 + -1 | 0;
16566     while (1) {
16567      if (HEAPU8[($1 + $4 | 0) + 27 | 0] != 255) {
16568       HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
16569       break label$17;
16570      }
16571      $4 = $4 + 1 | 0;
16572      if ($4 >>> 0 < $2 >>> 0) {
16573       continue
16574      }
16575      break;
16576     };
16577    }
16578    $4 = HEAPU8[($1 + $4 | 0) + 27 | 0] + Math_imul($4, 255) | 0;
16579    HEAP32[$3 + 12 >> 2] = $4;
16580    $8 = dlmalloc($4 ? $4 : 1);
16581    HEAP32[$3 + 8 >> 2] = $8;
16582    if (!$8) {
16583     HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
16584     break label$17;
16585    }
16586    $2 = $7;
16587    if ($4) {
16588     while (1) {
16589      HEAP32[$7 + 12 >> 2] = $4;
16590      $1 = 5;
16591      label$24 : {
16592       label$25 : {
16593        switch (FUNCTION_TABLE[$5]($0, $8, $7 + 12 | 0, $6) | 0) {
16594        case 1:
16595         $1 = HEAP32[$7 + 12 >> 2];
16596         if ($1) {
16597          break label$24
16598         }
16599         $1 = 2;
16600        default:
16601         HEAP32[HEAP32[$0 >> 2] >> 2] = $1;
16602         break label$17;
16603        case 3:
16604         break label$17;
16605        case 0:
16606         break label$25;
16607        };
16608       }
16609       $1 = HEAP32[$7 + 12 >> 2];
16610      }
16611      $8 = $1 + $8 | 0;
16612      $4 = $4 - $1 | 0;
16613      if ($4) {
16614       continue
16615      }
16616      break;
16617     };
16618     $1 = HEAP32[$3 >> 2];
16619    }
16620    HEAP32[$2 + 12 >> 2] = HEAPU8[$1 + 22 | 0] | HEAPU8[$1 + 23 | 0] << 8 | (HEAPU8[$1 + 24 | 0] << 16 | HEAPU8[$1 + 25 | 0] << 24);
16621    ogg_page_checksum_set($3);
16622    $1 = HEAP32[$3 >> 2];
16623    if (HEAP32[$7 + 12 >> 2] == (HEAPU8[$1 + 22 | 0] | HEAPU8[$1 + 23 | 0] << 8 | (HEAPU8[$1 + 24 | 0] << 16 | HEAPU8[$1 + 25 | 0] << 24))) {
16624     $9 = 1;
16625     break label$1;
16626    }
16627    HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
16628   }
16629  }
16630  global$0 = $7 + 16 | 0;
16631  return $9;
16632 }
16633
16634 function simple_ogg_page__set_at($0, $1, $2, $3, $4, $5, $6) {
16635  folding_inner0 : {
16636   label$1 : {
16637    if (!$4) {
16638     break label$1
16639    }
16640    label$2 : {
16641     switch (FUNCTION_TABLE[$4]($0, $1, $2, $6) | 0) {
16642     case 1:
16643      break folding_inner0;
16644     case 0:
16645      break label$2;
16646     default:
16647      break label$1;
16648     };
16649    }
16650    ogg_page_checksum_set($3);
16651    if (FUNCTION_TABLE[$5]($0, HEAP32[$3 >> 2], HEAP32[$3 + 4 >> 2], 0, 0, $6)) {
16652     break folding_inner0
16653    }
16654    if (!FUNCTION_TABLE[$5]($0, HEAP32[$3 + 8 >> 2], HEAP32[$3 + 12 >> 2], 0, 0, $6)) {
16655     return 1
16656    }
16657    HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
16658   }
16659   return 0;
16660  }
16661  HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
16662  return 0;
16663 }
16664
16665 function __emscripten_stdout_close($0) {
16666  $0 = $0 | 0;
16667  return 0;
16668 }
16669
16670 function __emscripten_stdout_seek($0, $1, $2, $3) {
16671  $0 = $0 | 0;
16672  $1 = $1 | 0;
16673  $2 = $2 | 0;
16674  $3 = $3 | 0;
16675  i64toi32_i32$HIGH_BITS = 0;
16676  return 0;
16677 }
16678
16679 function strcmp($0, $1) {
16680  var $2 = 0, $3 = 0;
16681  $2 = HEAPU8[$0 | 0];
16682  $3 = HEAPU8[$1 | 0];
16683  label$1 : {
16684   if (!$2 | ($2 | 0) != ($3 | 0)) {
16685    break label$1
16686   }
16687   while (1) {
16688    $3 = HEAPU8[$1 + 1 | 0];
16689    $2 = HEAPU8[$0 + 1 | 0];
16690    if (!$2) {
16691     break label$1
16692    }
16693    $1 = $1 + 1 | 0;
16694    $0 = $0 + 1 | 0;
16695    if (($2 | 0) == ($3 | 0)) {
16696     continue
16697    }
16698    break;
16699   };
16700  }
16701  return $2 - $3 | 0;
16702 }
16703
16704 function __cos($0, $1) {
16705  var $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0;
16706  $2 = $0 * $0;
16707  $3 = $2 * .5;
16708  $4 = 1.0 - $3;
16709  $5 = 1.0 - $4 - $3;
16710  $3 = $2 * $2;
16711  return $4 + ($5 + ($2 * ($2 * ($2 * ($2 * 2.480158728947673e-05 + -.001388888888887411) + .0416666666666666) + $3 * $3 * ($2 * ($2 * -1.1359647557788195e-11 + 2.087572321298175e-09) + -2.7557314351390663e-07)) - $0 * $1));
16712 }
16713
16714 function scalbn($0, $1) {
16715  label$1 : {
16716   if (($1 | 0) >= 1024) {
16717    $0 = $0 * 8988465674311579538646525.0e283;
16718    if (($1 | 0) < 2047) {
16719     $1 = $1 + -1023 | 0;
16720     break label$1;
16721    }
16722    $0 = $0 * 8988465674311579538646525.0e283;
16723    $1 = (($1 | 0) < 3069 ? $1 : 3069) + -2046 | 0;
16724    break label$1;
16725   }
16726   if (($1 | 0) > -1023) {
16727    break label$1
16728   }
16729   $0 = $0 * 2.2250738585072014e-308;
16730   if (($1 | 0) > -2045) {
16731    $1 = $1 + 1022 | 0;
16732    break label$1;
16733   }
16734   $0 = $0 * 2.2250738585072014e-308;
16735   $1 = (($1 | 0) > -3066 ? $1 : -3066) + 2044 | 0;
16736  }
16737  wasm2js_scratch_store_i32(0, 0);
16738  wasm2js_scratch_store_i32(1, $1 + 1023 << 20);
16739  return $0 * +wasm2js_scratch_load_f64();
16740 }
16741
16742 function __rem_pio2_large($0, $1, $2, $3) {
16743  var $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0;
16744  $7 = global$0 - 560 | 0;
16745  global$0 = $7;
16746  $5 = ($2 + -3 | 0) / 24 | 0;
16747  $16 = ($5 | 0) > 0 ? $5 : 0;
16748  $10 = $2 + Math_imul($16, -24) | 0;
16749  $12 = HEAP32[1901];
16750  $9 = $3 + -1 | 0;
16751  if (($12 + $9 | 0) >= 0) {
16752   $5 = $3 + $12 | 0;
16753   $2 = $16 - $9 | 0;
16754   while (1) {
16755    HEAPF64[($7 + 320 | 0) + ($6 << 3) >> 3] = ($2 | 0) < 0 ? 0.0 : +HEAP32[($2 << 2) + 7616 >> 2];
16756    $2 = $2 + 1 | 0;
16757    $6 = $6 + 1 | 0;
16758    if (($5 | 0) != ($6 | 0)) {
16759     continue
16760    }
16761    break;
16762   };
16763  }
16764  $13 = $10 + -24 | 0;
16765  $5 = 0;
16766  $6 = ($12 | 0) > 0 ? $12 : 0;
16767  $11 = ($3 | 0) < 1;
16768  while (1) {
16769   label$6 : {
16770    if ($11) {
16771     $4 = 0.0;
16772     break label$6;
16773    }
16774    $8 = $5 + $9 | 0;
16775    $2 = 0;
16776    $4 = 0.0;
16777    while (1) {
16778     $4 = $4 + HEAPF64[($2 << 3) + $0 >> 3] * HEAPF64[($7 + 320 | 0) + ($8 - $2 << 3) >> 3];
16779     $2 = $2 + 1 | 0;
16780     if (($3 | 0) != ($2 | 0)) {
16781      continue
16782     }
16783     break;
16784    };
16785   }
16786   HEAPF64[($5 << 3) + $7 >> 3] = $4;
16787   $2 = ($5 | 0) == ($6 | 0);
16788   $5 = $5 + 1 | 0;
16789   if (!$2) {
16790    continue
16791   }
16792   break;
16793  };
16794  $20 = 47 - $10 | 0;
16795  $17 = 48 - $10 | 0;
16796  $21 = $10 + -25 | 0;
16797  $5 = $12;
16798  label$9 : {
16799   while (1) {
16800    $4 = HEAPF64[($5 << 3) + $7 >> 3];
16801    $2 = 0;
16802    $6 = $5;
16803    $9 = ($5 | 0) < 1;
16804    if (!$9) {
16805     while (1) {
16806      $11 = ($7 + 480 | 0) + ($2 << 2) | 0;
16807      $14 = $4;
16808      $4 = $4 * 5.9604644775390625e-08;
16809      label$14 : {
16810       if (Math_abs($4) < 2147483648.0) {
16811        $8 = ~~$4;
16812        break label$14;
16813       }
16814       $8 = -2147483648;
16815      }
16816      $4 = +($8 | 0);
16817      $14 = $14 + $4 * -16777216.0;
16818      label$13 : {
16819       if (Math_abs($14) < 2147483648.0) {
16820        $8 = ~~$14;
16821        break label$13;
16822       }
16823       $8 = -2147483648;
16824      }
16825      HEAP32[$11 >> 2] = $8;
16826      $6 = $6 + -1 | 0;
16827      $4 = HEAPF64[($6 << 3) + $7 >> 3] + $4;
16828      $2 = $2 + 1 | 0;
16829      if (($5 | 0) != ($2 | 0)) {
16830       continue
16831      }
16832      break;
16833     }
16834    }
16835    $4 = scalbn($4, $13);
16836    $4 = $4 + Math_floor($4 * .125) * -8.0;
16837    label$17 : {
16838     if (Math_abs($4) < 2147483648.0) {
16839      $11 = ~~$4;
16840      break label$17;
16841     }
16842     $11 = -2147483648;
16843    }
16844    $4 = $4 - +($11 | 0);
16845    label$19 : {
16846     label$20 : {
16847      label$21 : {
16848       $18 = ($13 | 0) < 1;
16849       label$22 : {
16850        if (!$18) {
16851         $6 = (($5 << 2) + $7 | 0) + 476 | 0;
16852         $8 = HEAP32[$6 >> 2];
16853         $2 = $8 >> $17;
16854         $15 = $6;
16855         $6 = $8 - ($2 << $17) | 0;
16856         HEAP32[$15 >> 2] = $6;
16857         $11 = $2 + $11 | 0;
16858         $8 = $6 >> $20;
16859         break label$22;
16860        }
16861        if ($13) {
16862         break label$21
16863        }
16864        $8 = HEAP32[(($5 << 2) + $7 | 0) + 476 >> 2] >> 23;
16865       }
16866       if (($8 | 0) < 1) {
16867        break label$19
16868       }
16869       break label$20;
16870      }
16871      $8 = 2;
16872      if (!!($4 >= .5)) {
16873       break label$20
16874      }
16875      $8 = 0;
16876      break label$19;
16877     }
16878     $2 = 0;
16879     $6 = 0;
16880     if (!$9) {
16881      while (1) {
16882       $15 = ($7 + 480 | 0) + ($2 << 2) | 0;
16883       $19 = HEAP32[$15 >> 2];
16884       $9 = 16777215;
16885       label$26 : {
16886        label$27 : {
16887         if ($6) {
16888          break label$27
16889         }
16890         $9 = 16777216;
16891         if ($19) {
16892          break label$27
16893         }
16894         $6 = 0;
16895         break label$26;
16896        }
16897        HEAP32[$15 >> 2] = $9 - $19;
16898        $6 = 1;
16899       }
16900       $2 = $2 + 1 | 0;
16901       if (($5 | 0) != ($2 | 0)) {
16902        continue
16903       }
16904       break;
16905      }
16906     }
16907     label$28 : {
16908      if ($18) {
16909       break label$28
16910      }
16911      label$29 : {
16912       switch ($21 | 0) {
16913       case 0:
16914        $2 = (($5 << 2) + $7 | 0) + 476 | 0;
16915        HEAP32[$2 >> 2] = HEAP32[$2 >> 2] & 8388607;
16916        break label$28;
16917       case 1:
16918        break label$29;
16919       default:
16920        break label$28;
16921       };
16922      }
16923      $2 = (($5 << 2) + $7 | 0) + 476 | 0;
16924      HEAP32[$2 >> 2] = HEAP32[$2 >> 2] & 4194303;
16925     }
16926     $11 = $11 + 1 | 0;
16927     if (($8 | 0) != 2) {
16928      break label$19
16929     }
16930     $4 = 1.0 - $4;
16931     $8 = 2;
16932     if (!$6) {
16933      break label$19
16934     }
16935     $4 = $4 - scalbn(1.0, $13);
16936    }
16937    if ($4 == 0.0) {
16938     $6 = 0;
16939     label$32 : {
16940      $2 = $5;
16941      if (($2 | 0) <= ($12 | 0)) {
16942       break label$32
16943      }
16944      while (1) {
16945       $2 = $2 + -1 | 0;
16946       $6 = HEAP32[($7 + 480 | 0) + ($2 << 2) >> 2] | $6;
16947       if (($2 | 0) > ($12 | 0)) {
16948        continue
16949       }
16950       break;
16951      };
16952      if (!$6) {
16953       break label$32
16954      }
16955      $10 = $13;
16956      while (1) {
16957       $10 = $10 + -24 | 0;
16958       $5 = $5 + -1 | 0;
16959       if (!HEAP32[($7 + 480 | 0) + ($5 << 2) >> 2]) {
16960        continue
16961       }
16962       break;
16963      };
16964      break label$9;
16965     }
16966     $2 = 1;
16967     while (1) {
16968      $6 = $2;
16969      $2 = $2 + 1 | 0;
16970      if (!HEAP32[($7 + 480 | 0) + ($12 - $6 << 2) >> 2]) {
16971       continue
16972      }
16973      break;
16974     };
16975     $6 = $5 + $6 | 0;
16976     while (1) {
16977      $9 = $3 + $5 | 0;
16978      $5 = $5 + 1 | 0;
16979      HEAPF64[($7 + 320 | 0) + ($9 << 3) >> 3] = HEAP32[($16 + $5 << 2) + 7616 >> 2];
16980      $2 = 0;
16981      $4 = 0.0;
16982      if (($3 | 0) >= 1) {
16983       while (1) {
16984        $4 = $4 + HEAPF64[($2 << 3) + $0 >> 3] * HEAPF64[($7 + 320 | 0) + ($9 - $2 << 3) >> 3];
16985        $2 = $2 + 1 | 0;
16986        if (($3 | 0) != ($2 | 0)) {
16987         continue
16988        }
16989        break;
16990       }
16991      }
16992      HEAPF64[($5 << 3) + $7 >> 3] = $4;
16993      if (($5 | 0) < ($6 | 0)) {
16994       continue
16995      }
16996      break;
16997     };
16998     $5 = $6;
16999     continue;
17000    }
17001    break;
17002   };
17003   $4 = scalbn($4, 0 - $13 | 0);
17004   label$39 : {
17005    if (!!($4 >= 16777216.0)) {
17006     $3 = ($7 + 480 | 0) + ($5 << 2) | 0;
17007     $14 = $4;
17008     $4 = $4 * 5.9604644775390625e-08;
17009     label$42 : {
17010      if (Math_abs($4) < 2147483648.0) {
17011       $2 = ~~$4;
17012       break label$42;
17013      }
17014      $2 = -2147483648;
17015     }
17016     $4 = $14 + +($2 | 0) * -16777216.0;
17017     label$41 : {
17018      if (Math_abs($4) < 2147483648.0) {
17019       $0 = ~~$4;
17020       break label$41;
17021      }
17022      $0 = -2147483648;
17023     }
17024     HEAP32[$3 >> 2] = $0;
17025     $5 = $5 + 1 | 0;
17026     break label$39;
17027    }
17028    $2 = Math_abs($4) < 2147483648.0 ? ~~$4 : -2147483648;
17029    $10 = $13;
17030   }
17031   HEAP32[($7 + 480 | 0) + ($5 << 2) >> 2] = $2;
17032  }
17033  $4 = scalbn(1.0, $10);
17034  label$47 : {
17035   if (($5 | 0) <= -1) {
17036    break label$47
17037   }
17038   $2 = $5;
17039   while (1) {
17040    HEAPF64[($2 << 3) + $7 >> 3] = $4 * +HEAP32[($7 + 480 | 0) + ($2 << 2) >> 2];
17041    $4 = $4 * 5.9604644775390625e-08;
17042    $0 = ($2 | 0) > 0;
17043    $2 = $2 + -1 | 0;
17044    if ($0) {
17045     continue
17046    }
17047    break;
17048   };
17049   $9 = 0;
17050   if (($5 | 0) < 0) {
17051    break label$47
17052   }
17053   $0 = ($12 | 0) > 0 ? $12 : 0;
17054   $6 = $5;
17055   while (1) {
17056    $3 = $0 >>> 0 < $9 >>> 0 ? $0 : $9;
17057    $10 = $5 - $6 | 0;
17058    $2 = 0;
17059    $4 = 0.0;
17060    while (1) {
17061     $4 = $4 + HEAPF64[($2 << 3) + 10384 >> 3] * HEAPF64[($2 + $6 << 3) + $7 >> 3];
17062     $13 = ($2 | 0) != ($3 | 0);
17063     $2 = $2 + 1 | 0;
17064     if ($13) {
17065      continue
17066     }
17067     break;
17068    };
17069    HEAPF64[($7 + 160 | 0) + ($10 << 3) >> 3] = $4;
17070    $6 = $6 + -1 | 0;
17071    $2 = ($5 | 0) != ($9 | 0);
17072    $9 = $9 + 1 | 0;
17073    if ($2) {
17074     continue
17075    }
17076    break;
17077   };
17078  }
17079  $4 = 0.0;
17080  if (($5 | 0) >= 0) {
17081   $2 = $5;
17082   while (1) {
17083    $4 = $4 + HEAPF64[($7 + 160 | 0) + ($2 << 3) >> 3];
17084    $0 = ($2 | 0) > 0;
17085    $2 = $2 + -1 | 0;
17086    if ($0) {
17087     continue
17088    }
17089    break;
17090   };
17091  }
17092  HEAPF64[$1 >> 3] = $8 ? -$4 : $4;
17093  $4 = HEAPF64[$7 + 160 >> 3] - $4;
17094  $2 = 1;
17095  if (($5 | 0) >= 1) {
17096   while (1) {
17097    $4 = $4 + HEAPF64[($7 + 160 | 0) + ($2 << 3) >> 3];
17098    $0 = ($2 | 0) != ($5 | 0);
17099    $2 = $2 + 1 | 0;
17100    if ($0) {
17101     continue
17102    }
17103    break;
17104   }
17105  }
17106  HEAPF64[$1 + 8 >> 3] = $8 ? -$4 : $4;
17107  global$0 = $7 + 560 | 0;
17108  return $11 & 7;
17109 }
17110
17111 function __rem_pio2($0, $1) {
17112  var $2 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, $10 = 0;
17113  $6 = global$0 - 48 | 0;
17114  global$0 = $6;
17115  wasm2js_scratch_store_f64(+$0);
17116  $5 = wasm2js_scratch_load_i32(1) | 0;
17117  $3 = wasm2js_scratch_load_i32(0) | 0;
17118  label$1 : {
17119   label$2 : {
17120    $4 = $5;
17121    $5 = $4;
17122    $7 = $4 & 2147483647;
17123    label$3 : {
17124     if ($7 >>> 0 <= 1074752122) {
17125      if (($5 & 1048575) == 598523) {
17126       break label$3
17127      }
17128      if ($7 >>> 0 <= 1073928572) {
17129       if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) {
17130        $0 = $0 + -1.5707963267341256;
17131        $2 = $0 + -6.077100506506192e-11;
17132        HEAPF64[$1 >> 3] = $2;
17133        HEAPF64[$1 + 8 >> 3] = $0 - $2 + -6.077100506506192e-11;
17134        $3 = 1;
17135        break label$1;
17136       }
17137       $0 = $0 + 1.5707963267341256;
17138       $2 = $0 + 6.077100506506192e-11;
17139       HEAPF64[$1 >> 3] = $2;
17140       HEAPF64[$1 + 8 >> 3] = $0 - $2 + 6.077100506506192e-11;
17141       $3 = -1;
17142       break label$1;
17143      }
17144      if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) {
17145       $0 = $0 + -3.1415926534682512;
17146       $2 = $0 + -1.2154201013012384e-10;
17147       HEAPF64[$1 >> 3] = $2;
17148       HEAPF64[$1 + 8 >> 3] = $0 - $2 + -1.2154201013012384e-10;
17149       $3 = 2;
17150       break label$1;
17151      }
17152      $0 = $0 + 3.1415926534682512;
17153      $2 = $0 + 1.2154201013012384e-10;
17154      HEAPF64[$1 >> 3] = $2;
17155      HEAPF64[$1 + 8 >> 3] = $0 - $2 + 1.2154201013012384e-10;
17156      $3 = -2;
17157      break label$1;
17158     }
17159     if ($7 >>> 0 <= 1075594811) {
17160      if ($7 >>> 0 <= 1075183036) {
17161       if (($7 | 0) == 1074977148) {
17162        break label$3
17163       }
17164       if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) {
17165        $0 = $0 + -4.712388980202377;
17166        $2 = $0 + -1.8231301519518578e-10;
17167        HEAPF64[$1 >> 3] = $2;
17168        HEAPF64[$1 + 8 >> 3] = $0 - $2 + -1.8231301519518578e-10;
17169        $3 = 3;
17170        break label$1;
17171       }
17172       $0 = $0 + 4.712388980202377;
17173       $2 = $0 + 1.8231301519518578e-10;
17174       HEAPF64[$1 >> 3] = $2;
17175       HEAPF64[$1 + 8 >> 3] = $0 - $2 + 1.8231301519518578e-10;
17176       $3 = -3;
17177       break label$1;
17178      }
17179      if (($7 | 0) == 1075388923) {
17180       break label$3
17181      }
17182      if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) {
17183       $0 = $0 + -6.2831853069365025;
17184       $2 = $0 + -2.430840202602477e-10;
17185       HEAPF64[$1 >> 3] = $2;
17186       HEAPF64[$1 + 8 >> 3] = $0 - $2 + -2.430840202602477e-10;
17187       $3 = 4;
17188       break label$1;
17189      }
17190      $0 = $0 + 6.2831853069365025;
17191      $2 = $0 + 2.430840202602477e-10;
17192      HEAPF64[$1 >> 3] = $2;
17193      HEAPF64[$1 + 8 >> 3] = $0 - $2 + 2.430840202602477e-10;
17194      $3 = -4;
17195      break label$1;
17196     }
17197     if ($7 >>> 0 > 1094263290) {
17198      break label$2
17199     }
17200    }
17201    $9 = $0 * .6366197723675814 + 6755399441055744.0 + -6755399441055744.0;
17202    $2 = $0 + $9 * -1.5707963267341256;
17203    $8 = $9 * 6.077100506506192e-11;
17204    $0 = $2 - $8;
17205    HEAPF64[$1 >> 3] = $0;
17206    wasm2js_scratch_store_f64(+$0);
17207    $3 = wasm2js_scratch_load_i32(1) | 0;
17208    wasm2js_scratch_load_i32(0) | 0;
17209    $4 = $7 >>> 20 | 0;
17210    $5 = ($4 - ($3 >>> 20 & 2047) | 0) < 17;
17211    if (Math_abs($9) < 2147483648.0) {
17212     $3 = ~~$9
17213    } else {
17214     $3 = -2147483648
17215    }
17216    label$14 : {
17217     if ($5) {
17218      break label$14
17219     }
17220     $8 = $2;
17221     $0 = $9 * 6.077100506303966e-11;
17222     $2 = $2 - $0;
17223     $8 = $9 * 2.0222662487959506e-21 - ($8 - $2 - $0);
17224     $0 = $2 - $8;
17225     HEAPF64[$1 >> 3] = $0;
17226     $5 = $4;
17227     wasm2js_scratch_store_f64(+$0);
17228     $4 = wasm2js_scratch_load_i32(1) | 0;
17229     wasm2js_scratch_load_i32(0) | 0;
17230     if (($5 - ($4 >>> 20 & 2047) | 0) < 50) {
17231      break label$14
17232     }
17233     $8 = $2;
17234     $0 = $9 * 2.0222662487111665e-21;
17235     $2 = $2 - $0;
17236     $8 = $9 * 8.4784276603689e-32 - ($8 - $2 - $0);
17237     $0 = $2 - $8;
17238     HEAPF64[$1 >> 3] = $0;
17239    }
17240    HEAPF64[$1 + 8 >> 3] = $2 - $0 - $8;
17241    break label$1;
17242   }
17243   if ($7 >>> 0 >= 2146435072) {
17244    $0 = $0 - $0;
17245    HEAPF64[$1 >> 3] = $0;
17246    HEAPF64[$1 + 8 >> 3] = $0;
17247    $3 = 0;
17248    break label$1;
17249   }
17250   wasm2js_scratch_store_i32(0, $3 | 0);
17251   wasm2js_scratch_store_i32(1, $4 & 1048575 | 1096810496);
17252   $0 = +wasm2js_scratch_load_f64();
17253   $3 = 0;
17254   $5 = 1;
17255   while (1) {
17256    $10 = ($6 + 16 | 0) + ($3 << 3) | 0;
17257    if (Math_abs($0) < 2147483648.0) {
17258     $3 = ~~$0
17259    } else {
17260     $3 = -2147483648
17261    }
17262    $2 = +($3 | 0);
17263    HEAPF64[$10 >> 3] = $2;
17264    $0 = ($0 - $2) * 16777216.0;
17265    $3 = 1;
17266    $10 = $5 & 1;
17267    $5 = 0;
17268    if ($10) {
17269     continue
17270    }
17271    break;
17272   };
17273   HEAPF64[$6 + 32 >> 3] = $0;
17274   label$20 : {
17275    if ($0 != 0.0) {
17276     $3 = 2;
17277     break label$20;
17278    }
17279    $5 = 1;
17280    while (1) {
17281     $3 = $5;
17282     $5 = $3 + -1 | 0;
17283     if (HEAPF64[($6 + 16 | 0) + ($3 << 3) >> 3] == 0.0) {
17284      continue
17285     }
17286     break;
17287    };
17288   }
17289   $3 = __rem_pio2_large($6 + 16 | 0, $6, ($7 >>> 20 | 0) + -1046 | 0, $3 + 1 | 0);
17290   $0 = HEAPF64[$6 >> 3];
17291   if (($4 | 0) < -1 ? 1 : ($4 | 0) <= -1 ? 1 : 0) {
17292    HEAPF64[$1 >> 3] = -$0;
17293    HEAPF64[$1 + 8 >> 3] = -HEAPF64[$6 + 8 >> 3];
17294    $3 = 0 - $3 | 0;
17295    break label$1;
17296   }
17297   HEAPF64[$1 >> 3] = $0;
17298   $4 = HEAP32[$6 + 12 >> 2];
17299   HEAP32[$1 + 8 >> 2] = HEAP32[$6 + 8 >> 2];
17300   HEAP32[$1 + 12 >> 2] = $4;
17301  }
17302  global$0 = $6 + 48 | 0;
17303  return $3;
17304 }
17305
17306 function __sin($0, $1) {
17307  var $2 = 0.0, $3 = 0.0;
17308  $2 = $0 * $0;
17309  $3 = $0;
17310  $0 = $2 * $0;
17311  return $3 - ($2 * ($1 * .5 - $0 * ($2 * ($2 * $2) * ($2 * 1.58969099521155e-10 + -2.5050760253406863e-08) + ($2 * ($2 * 2.7557313707070068e-06 + -1.984126982985795e-04) + .00833333333332249))) - $1 + $0 * .16666666666666632);
17312 }
17313
17314 function cos($0) {
17315  var $1 = 0, $2 = 0.0, $3 = 0;
17316  $1 = global$0 - 16 | 0;
17317  global$0 = $1;
17318  wasm2js_scratch_store_f64(+$0);
17319  $3 = wasm2js_scratch_load_i32(1) | 0;
17320  wasm2js_scratch_load_i32(0) | 0;
17321  $3 = $3 & 2147483647;
17322  label$1 : {
17323   if ($3 >>> 0 <= 1072243195) {
17324    $2 = 1.0;
17325    if ($3 >>> 0 < 1044816030) {
17326     break label$1
17327    }
17328    $2 = __cos($0, 0.0);
17329    break label$1;
17330   }
17331   $2 = $0 - $0;
17332   if ($3 >>> 0 >= 2146435072) {
17333    break label$1
17334   }
17335   label$3 : {
17336    switch (__rem_pio2($0, $1) & 3) {
17337    case 0:
17338     $2 = __cos(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]);
17339     break label$1;
17340    case 1:
17341     $2 = -__sin(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]);
17342     break label$1;
17343    case 2:
17344     $2 = -__cos(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]);
17345     break label$1;
17346    default:
17347     break label$3;
17348    };
17349   }
17350   $2 = __sin(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]);
17351  }
17352  $0 = $2;
17353  global$0 = $1 + 16 | 0;
17354  return $0;
17355 }
17356
17357 function exp($0) {
17358  var $1 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0;
17359  wasm2js_scratch_store_f64(+$0);
17360  $3 = wasm2js_scratch_load_i32(1) | 0;
17361  $7 = wasm2js_scratch_load_i32(0) | 0;
17362  $5 = $3 >>> 31 | 0;
17363  label$1 : {
17364   label$2 : {
17365    label$3 : {
17366     label$4 : {
17367      $6 = $0;
17368      label$5 : {
17369       label$6 : {
17370        $1 = $3;
17371        $3 = $1 & 2147483647;
17372        label$7 : {
17373         if ($3 >>> 0 >= 1082532651) {
17374          $1 = $1 & 2147483647;
17375          if (($1 | 0) == 2146435072 & $7 >>> 0 > 0 | $1 >>> 0 > 2146435072) {
17376           return $0
17377          }
17378          if (!!($0 > 709.782712893384)) {
17379           return $0 * 8988465674311579538646525.0e283
17380          }
17381          if (!($0 < -708.3964185322641)) {
17382           break label$7
17383          }
17384          if (!($0 < -745.1332191019411)) {
17385           break label$7
17386          }
17387          break label$2;
17388         }
17389         if ($3 >>> 0 < 1071001155) {
17390          break label$4
17391         }
17392         if ($3 >>> 0 < 1072734898) {
17393          break label$6
17394         }
17395        }
17396        $0 = $0 * 1.4426950408889634 + HEAPF64[($5 << 3) + 10448 >> 3];
17397        if (Math_abs($0) < 2147483648.0) {
17398         $1 = ~~$0;
17399         break label$5;
17400        }
17401        $1 = -2147483648;
17402        break label$5;
17403       }
17404       $1 = ($5 ^ 1) - $5 | 0;
17405      }
17406      $2 = +($1 | 0);
17407      $0 = $6 + $2 * -.6931471803691238;
17408      $4 = $2 * 1.9082149292705877e-10;
17409      $2 = $0 - $4;
17410      break label$3;
17411     }
17412     if ($3 >>> 0 <= 1043333120) {
17413      break label$1
17414     }
17415     $1 = 0;
17416     $2 = $0;
17417    }
17418    $6 = $0;
17419    $0 = $2 * $2;
17420    $0 = $2 - $0 * ($0 * ($0 * ($0 * ($0 * 4.1381367970572385e-08 + -1.6533902205465252e-06) + 6.613756321437934e-05) + -2.7777777777015593e-03) + .16666666666666602);
17421    $4 = $6 + ($2 * $0 / (2.0 - $0) - $4) + 1.0;
17422    if (!$1) {
17423     break label$2
17424    }
17425    $4 = scalbn($4, $1);
17426   }
17427   return $4;
17428  }
17429  return $0 + 1.0;
17430 }
17431
17432 function FLAC__window_bartlett($0, $1) {
17433  var $2 = 0, $3 = Math_fround(0), $4 = 0, $5 = Math_fround(0), $6 = 0, $7 = 0, $8 = 0;
17434  $7 = $1 + -1 | 0;
17435  label$1 : {
17436   if ($1 & 1) {
17437    $4 = ($7 | 0) / 2 | 0;
17438    if (($1 | 0) >= 0) {
17439     $8 = ($4 | 0) > 0 ? $4 : 0;
17440     $6 = $8 + 1 | 0;
17441     $5 = Math_fround($7 | 0);
17442     while (1) {
17443      $3 = Math_fround($2 | 0);
17444      HEAPF32[($2 << 2) + $0 >> 2] = Math_fround($3 + $3) / $5;
17445      $4 = ($2 | 0) == ($8 | 0);
17446      $2 = $2 + 1 | 0;
17447      if (!$4) {
17448       continue
17449      }
17450      break;
17451     };
17452    }
17453    if (($6 | 0) >= ($1 | 0)) {
17454     break label$1
17455    }
17456    $5 = Math_fround($7 | 0);
17457    while (1) {
17458     $3 = Math_fround($6 | 0);
17459     HEAPF32[($6 << 2) + $0 >> 2] = Math_fround(2.0) - Math_fround(Math_fround($3 + $3) / $5);
17460     $6 = $6 + 1 | 0;
17461     if (($6 | 0) != ($1 | 0)) {
17462      continue
17463     }
17464     break;
17465    };
17466    break label$1;
17467   }
17468   $4 = ($1 | 0) / 2 | 0;
17469   if (($1 | 0) >= 2) {
17470    $5 = Math_fround($7 | 0);
17471    while (1) {
17472     $3 = Math_fround($2 | 0);
17473     HEAPF32[($2 << 2) + $0 >> 2] = Math_fround($3 + $3) / $5;
17474     $2 = $2 + 1 | 0;
17475     if (($4 | 0) != ($2 | 0)) {
17476      continue
17477     }
17478     break;
17479    };
17480    $2 = $4;
17481   }
17482   if (($2 | 0) >= ($1 | 0)) {
17483    break label$1
17484   }
17485   $5 = Math_fround($7 | 0);
17486   while (1) {
17487    $3 = Math_fround($2 | 0);
17488    HEAPF32[($2 << 2) + $0 >> 2] = Math_fround(2.0) - Math_fround(Math_fround($3 + $3) / $5);
17489    $2 = $2 + 1 | 0;
17490    if (($2 | 0) != ($1 | 0)) {
17491     continue
17492    }
17493    break;
17494   };
17495  }
17496 }
17497
17498 function FLAC__window_bartlett_hann($0, $1) {
17499  var $2 = 0, $3 = Math_fround(0), $4 = Math_fround(0), wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17500  if (($1 | 0) >= 1) {
17501   $4 = Math_fround($1 + -1 | 0);
17502   while (1) {
17503    $3 = Math_fround(Math_fround($2 | 0) / $4);
17504    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(+Math_fround(Math_abs(Math_fround($3 + Math_fround(-.5)))) * -.47999998927116394 + .6200000047683716 + cos(+$3 * 6.283185307179586) * -.3799999952316284)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17505    $2 = $2 + 1 | 0;
17506    if (($2 | 0) != ($1 | 0)) {
17507     continue
17508    }
17509    break;
17510   };
17511  }
17512 }
17513
17514 function FLAC__window_blackman($0, $1) {
17515  var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17516  if (($1 | 0) >= 1) {
17517   $3 = +($1 + -1 | 0);
17518   while (1) {
17519    $4 = +($2 | 0);
17520    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .07999999821186066 + (cos($4 * 6.283185307179586 / $3) * -.5 + .41999998688697815))), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17521    $2 = $2 + 1 | 0;
17522    if (($2 | 0) != ($1 | 0)) {
17523     continue
17524    }
17525    break;
17526   };
17527  }
17528 }
17529
17530 function FLAC__window_blackman_harris_4term_92db_sidelobe($0, $1) {
17531  var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17532  if (($1 | 0) >= 1) {
17533   $3 = +($1 + -1 | 0);
17534   while (1) {
17535    $4 = +($2 | 0);
17536    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .14127999544143677 + (cos($4 * 6.283185307179586 / $3) * -.488290011882782 + .35874998569488525) + cos($4 * 18.84955592153876 / $3) * -.011680000461637974)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17537    $2 = $2 + 1 | 0;
17538    if (($2 | 0) != ($1 | 0)) {
17539     continue
17540    }
17541    break;
17542   };
17543  }
17544 }
17545
17546 function FLAC__window_connes($0, $1) {
17547  var $2 = 0.0, $3 = 0, $4 = 0.0;
17548  if (($1 | 0) >= 1) {
17549   $4 = +($1 + -1 | 0) * .5;
17550   while (1) {
17551    $2 = (+($3 | 0) - $4) / $4;
17552    $2 = 1.0 - $2 * $2;
17553    HEAPF32[($3 << 2) + $0 >> 2] = $2 * $2;
17554    $3 = $3 + 1 | 0;
17555    if (($3 | 0) != ($1 | 0)) {
17556     continue
17557    }
17558    break;
17559   };
17560  }
17561 }
17562
17563 function FLAC__window_flattop($0, $1) {
17564  var $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17565  if (($1 | 0) >= 1) {
17566   $2 = +($1 + -1 | 0);
17567   while (1) {
17568    $4 = +($3 | 0);
17569    $5 = cos($4 * 12.566370614359172 / $2);
17570    $6 = cos($4 * 6.283185307179586 / $2);
17571    $7 = cos($4 * 18.84955592153876 / $2);
17572    (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 25.132741228718345 / $2) * 6.9473679177463055e-03 + ($5 * .27726316452026367 + ($6 * -.4166315793991089 + .21557894349098206) + $7 * -.08357894420623779))), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17573    $3 = $3 + 1 | 0;
17574    if (($3 | 0) != ($1 | 0)) {
17575     continue
17576    }
17577    break;
17578   };
17579  }
17580 }
17581
17582 function FLAC__window_gauss($0, $1, $2) {
17583  var $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17584  if (($1 | 0) >= 1) {
17585   $4 = +($1 + -1 | 0) * .5;
17586   $6 = $4 * +$2;
17587   while (1) {
17588    $5 = (+($3 | 0) - $4) / $6;
17589    (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(exp($5 * ($5 * -.5)))), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17590    $3 = $3 + 1 | 0;
17591    if (($3 | 0) != ($1 | 0)) {
17592     continue
17593    }
17594    break;
17595   };
17596  }
17597 }
17598
17599 function FLAC__window_hamming($0, $1) {
17600  var $2 = 0, $3 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17601  if (($1 | 0) >= 1) {
17602   $3 = +($1 + -1 | 0);
17603   while (1) {
17604    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos(+($2 | 0) * 6.283185307179586 / $3) * -.46000000834465027 + .5400000214576721)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17605    $2 = $2 + 1 | 0;
17606    if (($2 | 0) != ($1 | 0)) {
17607     continue
17608    }
17609    break;
17610   };
17611  }
17612 }
17613
17614 function FLAC__window_hann($0, $1) {
17615  var $2 = 0, $3 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17616  if (($1 | 0) >= 1) {
17617   $3 = +($1 + -1 | 0);
17618   while (1) {
17619    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($2 | 0) * 6.283185307179586 / $3) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17620    $2 = $2 + 1 | 0;
17621    if (($2 | 0) != ($1 | 0)) {
17622     continue
17623    }
17624    break;
17625   };
17626  }
17627 }
17628
17629 function FLAC__window_kaiser_bessel($0, $1) {
17630  var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17631  if (($1 | 0) >= 1) {
17632   $3 = +($1 + -1 | 0);
17633   while (1) {
17634    $4 = +($2 | 0);
17635    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .09799999743700027 + (cos($4 * 6.283185307179586 / $3) * -.49799999594688416 + .4020000100135803) + cos($4 * 18.84955592153876 / $3) * -1.0000000474974513e-03)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17636    $2 = $2 + 1 | 0;
17637    if (($2 | 0) != ($1 | 0)) {
17638     continue
17639    }
17640    break;
17641   };
17642  }
17643 }
17644
17645 function FLAC__window_nuttall($0, $1) {
17646  var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17647  if (($1 | 0) >= 1) {
17648   $3 = +($1 + -1 | 0);
17649   while (1) {
17650    $4 = +($2 | 0);
17651    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .13659949600696564 + (cos($4 * 6.283185307179586 / $3) * -.48917749524116516 + .36358189582824707) + cos($4 * 18.84955592153876 / $3) * -.010641099885106087)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17652    $2 = $2 + 1 | 0;
17653    if (($2 | 0) != ($1 | 0)) {
17654     continue
17655    }
17656    break;
17657   };
17658  }
17659 }
17660
17661 function FLAC__window_rectangle($0, $1) {
17662  var $2 = 0;
17663  if (($1 | 0) >= 1) {
17664   while (1) {
17665    HEAP32[($2 << 2) + $0 >> 2] = 1065353216;
17666    $2 = $2 + 1 | 0;
17667    if (($2 | 0) != ($1 | 0)) {
17668     continue
17669    }
17670    break;
17671   }
17672  }
17673 }
17674
17675 function FLAC__window_triangle($0, $1) {
17676  var $2 = 0, $3 = 0, $4 = Math_fround(0), $5 = 0, $6 = Math_fround(0), $7 = 0;
17677  $3 = 1;
17678  label$1 : {
17679   if ($1 & 1) {
17680    $2 = ($1 + 1 | 0) / 2 | 0;
17681    if (($1 | 0) >= 1) {
17682     $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0));
17683     $5 = ($2 | 0) > 1 ? $2 : 1;
17684     $3 = $5 + 1 | 0;
17685     $2 = 1;
17686     while (1) {
17687      $6 = Math_fround($2 | 0);
17688      HEAPF32[(($2 << 2) + $0 | 0) + -4 >> 2] = Math_fround($6 + $6) / $4;
17689      $7 = ($2 | 0) == ($5 | 0);
17690      $2 = $2 + 1 | 0;
17691      if (!$7) {
17692       continue
17693      }
17694      break;
17695     };
17696    }
17697    if (($3 | 0) > ($1 | 0)) {
17698     break label$1
17699    }
17700    $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0));
17701    while (1) {
17702     HEAPF32[(($3 << 2) + $0 | 0) + -4 >> 2] = Math_fround(($1 - $3 << 1) + 2 | 0) / $4;
17703     $2 = ($1 | 0) == ($3 | 0);
17704     $3 = $3 + 1 | 0;
17705     if (!$2) {
17706      continue
17707     }
17708     break;
17709    };
17710    break label$1;
17711   }
17712   $2 = 1;
17713   if (($1 | 0) >= 2) {
17714    $5 = $1 >>> 1 | 0;
17715    $2 = $5 + 1 | 0;
17716    $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0));
17717    while (1) {
17718     $6 = Math_fround($3 | 0);
17719     HEAPF32[(($3 << 2) + $0 | 0) + -4 >> 2] = Math_fround($6 + $6) / $4;
17720     $7 = ($3 | 0) == ($5 | 0);
17721     $3 = $3 + 1 | 0;
17722     if (!$7) {
17723      continue
17724     }
17725     break;
17726    };
17727   }
17728   if (($2 | 0) > ($1 | 0)) {
17729    break label$1
17730   }
17731   $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0));
17732   while (1) {
17733    HEAPF32[(($2 << 2) + $0 | 0) + -4 >> 2] = Math_fround(($1 - $2 << 1) + 2 | 0) / $4;
17734    $3 = ($1 | 0) != ($2 | 0);
17735    $2 = $2 + 1 | 0;
17736    if ($3) {
17737     continue
17738    }
17739    break;
17740   };
17741  }
17742 }
17743
17744 function FLAC__window_tukey($0, $1, $2) {
17745  var $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17746  label$1 : {
17747   if (!!($2 <= Math_fround(0.0))) {
17748    if (($1 | 0) < 1) {
17749     break label$1
17750    }
17751    while (1) {
17752     HEAP32[($3 << 2) + $0 >> 2] = 1065353216;
17753     $3 = $3 + 1 | 0;
17754     if (($3 | 0) != ($1 | 0)) {
17755      continue
17756     }
17757     break;
17758    };
17759    break label$1;
17760   }
17761   if (!!($2 >= Math_fround(1.0))) {
17762    if (($1 | 0) < 1) {
17763     break label$1
17764    }
17765    $5 = +($1 + -1 | 0);
17766    while (1) {
17767     (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($3 | 0) * 6.283185307179586 / $5) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17768     $3 = $3 + 1 | 0;
17769     if (($3 | 0) != ($1 | 0)) {
17770      continue
17771     }
17772     break;
17773    };
17774    break label$1;
17775   }
17776   $2 = Math_fround(Math_fround($2 * Math_fround(.5)) * Math_fround($1 | 0));
17777   label$6 : {
17778    if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) {
17779     $4 = ~~$2;
17780     break label$6;
17781    }
17782    $4 = -2147483648;
17783   }
17784   if (($1 | 0) >= 1) {
17785    while (1) {
17786     HEAP32[($3 << 2) + $0 >> 2] = 1065353216;
17787     $3 = $3 + 1 | 0;
17788     if (($3 | 0) != ($1 | 0)) {
17789      continue
17790     }
17791     break;
17792    }
17793   }
17794   if (($4 | 0) < 2) {
17795    break label$1
17796   }
17797   $1 = $1 - $4 | 0;
17798   $6 = $4 + -1 | 0;
17799   $5 = +($6 | 0);
17800   $3 = 0;
17801   while (1) {
17802    (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($3 | 0) * 3.141592653589793 / $5) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17803    (wasm2js_i32$0 = ($1 + $3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($3 + $6 | 0) * 3.141592653589793 / $5) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17804    $3 = $3 + 1 | 0;
17805    if (($4 | 0) != ($3 | 0)) {
17806     continue
17807    }
17808    break;
17809   };
17810  }
17811 }
17812
17813 function FLAC__window_partial_tukey($0, $1, $2, $3, $4) {
17814  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = Math_fround(0), $12 = 0.0, $13 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17815  while (1) {
17816   $11 = $2;
17817   $2 = Math_fround(.05000000074505806);
17818   if ($11 <= Math_fround(0.0)) {
17819    continue
17820   }
17821   $2 = Math_fround(.949999988079071);
17822   if ($11 >= Math_fround(1.0)) {
17823    continue
17824   }
17825   break;
17826  };
17827  $2 = Math_fround($1 | 0);
17828  $3 = Math_fround($2 * $3);
17829  label$2 : {
17830   if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) {
17831    $6 = ~~$3;
17832    break label$2;
17833   }
17834   $6 = -2147483648;
17835  }
17836  $3 = Math_fround($11 * Math_fround(.5));
17837  $2 = Math_fround($2 * $4);
17838  label$5 : {
17839   if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) {
17840    $10 = ~~$2;
17841    break label$5;
17842   }
17843   $10 = -2147483648;
17844  }
17845  $2 = Math_fround($3 * Math_fround($10 - $6 | 0));
17846  label$4 : {
17847   if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) {
17848    $7 = ~~$2;
17849    break label$4;
17850   }
17851   $7 = -2147483648;
17852  }
17853  if (!(($6 | 0) < 1 | ($1 | 0) < 1)) {
17854   $5 = $6 + -1 | 0;
17855   $8 = $1 + -1 | 0;
17856   $8 = $5 >>> 0 < $8 >>> 0 ? $5 : $8;
17857   memset($0, ($8 << 2) + 4 | 0);
17858   $5 = $8 + 1 | 0;
17859   while (1) {
17860    $13 = ($9 | 0) == ($8 | 0);
17861    $9 = $9 + 1 | 0;
17862    if (!$13) {
17863     continue
17864    }
17865    break;
17866   };
17867  }
17868  $6 = $6 + $7 | 0;
17869  label$10 : {
17870   if (($5 | 0) >= ($6 | 0) | ($5 | 0) >= ($1 | 0)) {
17871    break label$10
17872   }
17873   $12 = +($7 | 0);
17874   $9 = 1;
17875   while (1) {
17876    (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($9 | 0) * 3.141592653589793 / $12) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17877    $5 = $5 + 1 | 0;
17878    if (($5 | 0) >= ($6 | 0)) {
17879     break label$10
17880    }
17881    $9 = $9 + 1 | 0;
17882    if (($5 | 0) < ($1 | 0)) {
17883     continue
17884    }
17885    break;
17886   };
17887  }
17888  $6 = $10 - $7 | 0;
17889  label$12 : {
17890   if (($5 | 0) >= ($6 | 0) | ($5 | 0) >= ($1 | 0)) {
17891    break label$12
17892   }
17893   while (1) {
17894    HEAP32[($5 << 2) + $0 >> 2] = 1065353216;
17895    $5 = $5 + 1 | 0;
17896    if (($5 | 0) >= ($6 | 0)) {
17897     break label$12
17898    }
17899    if (($5 | 0) < ($1 | 0)) {
17900     continue
17901    }
17902    break;
17903   };
17904  }
17905  label$14 : {
17906   if (($5 | 0) >= ($10 | 0) | ($5 | 0) >= ($1 | 0)) {
17907    break label$14
17908   }
17909   $12 = +($7 | 0);
17910   while (1) {
17911    (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($7 | 0) * 3.141592653589793 / $12) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17912    $5 = $5 + 1 | 0;
17913    if (($5 | 0) >= ($10 | 0)) {
17914     break label$14
17915    }
17916    $7 = $7 + -1 | 0;
17917    if (($5 | 0) < ($1 | 0)) {
17918     continue
17919    }
17920    break;
17921   };
17922  }
17923  if (($5 | 0) < ($1 | 0)) {
17924   memset(($5 << 2) + $0 | 0, $1 - $5 << 2)
17925  }
17926 }
17927
17928 function FLAC__window_punchout_tukey($0, $1, $2, $3, $4) {
17929  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0.0, $12 = Math_fround(0), $13 = 0, $14 = Math_fround(0), wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);
17930  while (1) {
17931   $12 = $2;
17932   $2 = Math_fround(.05000000074505806);
17933   if ($12 <= Math_fround(0.0)) {
17934    continue
17935   }
17936   $2 = Math_fround(.949999988079071);
17937   if ($12 >= Math_fround(1.0)) {
17938    continue
17939   }
17940   break;
17941  };
17942  $2 = Math_fround($12 * Math_fround(.5));
17943  $14 = $2;
17944  $12 = Math_fround($1 | 0);
17945  $3 = Math_fround($12 * $3);
17946  label$3 : {
17947   if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) {
17948    $10 = ~~$3;
17949    break label$3;
17950   }
17951   $10 = -2147483648;
17952  }
17953  $3 = Math_fround($14 * Math_fround($10 | 0));
17954  label$2 : {
17955   if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) {
17956    $6 = ~~$3;
17957    break label$2;
17958   }
17959   $6 = -2147483648;
17960  }
17961  $8 = ($6 | 0) < 1;
17962  $7 = $1;
17963  $3 = Math_fround($12 * $4);
17964  label$7 : {
17965   if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) {
17966    $9 = ~~$3;
17967    break label$7;
17968   }
17969   $9 = -2147483648;
17970  }
17971  $2 = Math_fround($2 * Math_fround($7 - $9 | 0));
17972  label$6 : {
17973   if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) {
17974    $7 = ~~$2;
17975    break label$6;
17976   }
17977   $7 = -2147483648;
17978  }
17979  if (!(($1 | 0) < 1 | $8)) {
17980   $5 = $6 + -1 >>> 0 < $1 + -1 >>> 0 ? $6 : $1;
17981   $11 = +($6 | 0);
17982   $8 = 0;
17983   $13 = 1;
17984   while (1) {
17985    (wasm2js_i32$0 = ($8 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($13 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
17986    $13 = $13 + 1 | 0;
17987    $8 = $8 + 1 | 0;
17988    if (($8 | 0) != ($5 | 0)) {
17989     continue
17990    }
17991    break;
17992   };
17993  }
17994  $8 = $10 - $6 | 0;
17995  label$12 : {
17996   if (($5 | 0) >= ($8 | 0) | ($5 | 0) >= ($1 | 0)) {
17997    break label$12
17998   }
17999   while (1) {
18000    HEAP32[($5 << 2) + $0 >> 2] = 1065353216;
18001    $5 = $5 + 1 | 0;
18002    if (($5 | 0) >= ($8 | 0)) {
18003     break label$12
18004    }
18005    if (($5 | 0) < ($1 | 0)) {
18006     continue
18007    }
18008    break;
18009   };
18010  }
18011  label$14 : {
18012   if (($5 | 0) >= ($10 | 0) | ($5 | 0) >= ($1 | 0)) {
18013    break label$14
18014   }
18015   $11 = +($6 | 0);
18016   while (1) {
18017    (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($6 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
18018    $5 = $5 + 1 | 0;
18019    if (($5 | 0) >= ($10 | 0)) {
18020     break label$14
18021    }
18022    $6 = $6 + -1 | 0;
18023    if (($5 | 0) < ($1 | 0)) {
18024     continue
18025    }
18026    break;
18027   };
18028  }
18029  label$16 : {
18030   if (($5 | 0) >= ($9 | 0) | ($5 | 0) >= ($1 | 0)) {
18031    break label$16
18032   }
18033   $6 = $5 ^ -1;
18034   $10 = $6 + $9 | 0;
18035   $6 = $1 + $6 | 0;
18036   memset(($5 << 2) + $0 | 0, (($10 >>> 0 < $6 >>> 0 ? $10 : $6) << 2) + 4 | 0);
18037   while (1) {
18038    $5 = $5 + 1 | 0;
18039    if (($5 | 0) >= ($9 | 0)) {
18040     break label$16
18041    }
18042    if (($5 | 0) < ($1 | 0)) {
18043     continue
18044    }
18045    break;
18046   };
18047  }
18048  $9 = $7 + $9 | 0;
18049  label$18 : {
18050   if (($5 | 0) >= ($9 | 0) | ($5 | 0) >= ($1 | 0)) {
18051    break label$18
18052   }
18053   $11 = +($7 | 0);
18054   $6 = 1;
18055   while (1) {
18056    (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($6 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
18057    $5 = $5 + 1 | 0;
18058    if (($5 | 0) >= ($9 | 0)) {
18059     break label$18
18060    }
18061    $6 = $6 + 1 | 0;
18062    if (($5 | 0) < ($1 | 0)) {
18063     continue
18064    }
18065    break;
18066   };
18067  }
18068  $6 = $1 - $7 | 0;
18069  label$20 : {
18070   if (($5 | 0) >= ($6 | 0) | ($5 | 0) >= ($1 | 0)) {
18071    break label$20
18072   }
18073   while (1) {
18074    HEAP32[($5 << 2) + $0 >> 2] = 1065353216;
18075    $5 = $5 + 1 | 0;
18076    if (($5 | 0) >= ($6 | 0)) {
18077     break label$20
18078    }
18079    if (($5 | 0) < ($1 | 0)) {
18080     continue
18081    }
18082    break;
18083   };
18084  }
18085  if (($5 | 0) < ($1 | 0)) {
18086   $11 = +($7 | 0);
18087   while (1) {
18088    (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($7 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;
18089    $7 = $7 + -1 | 0;
18090    $5 = $5 + 1 | 0;
18091    if (($5 | 0) != ($1 | 0)) {
18092     continue
18093    }
18094    break;
18095   };
18096  }
18097 }
18098
18099 function FLAC__window_welch($0, $1) {
18100  var $2 = 0, $3 = 0.0, $4 = 0.0;
18101  if (($1 | 0) >= 1) {
18102   $3 = +($1 + -1 | 0) * .5;
18103   while (1) {
18104    $4 = (+($2 | 0) - $3) / $3;
18105    HEAPF32[($2 << 2) + $0 >> 2] = 1.0 - $4 * $4;
18106    $2 = $2 + 1 | 0;
18107    if (($2 | 0) != ($1 | 0)) {
18108     continue
18109    }
18110    break;
18111   };
18112  }
18113 }
18114
18115 function FLAC__add_metadata_block($0, $1) {
18116  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0;
18117  $3 = strlen(HEAP32[2720]);
18118  label$1 : {
18119   if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 4 >> 2], HEAP32[1391])) {
18120    break label$1
18121   }
18122   if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 >> 2], HEAP32[1392])) {
18123    break label$1
18124   }
18125   $2 = HEAP32[$0 + 8 >> 2];
18126   $2 = HEAP32[$0 >> 2] == 4 ? ($2 + $3 | 0) - HEAP32[$0 + 16 >> 2] | 0 : $2;
18127   $4 = HEAP32[1393];
18128   if ($2 >>> $4) {
18129    break label$1
18130   }
18131   if (!FLAC__bitwriter_write_raw_uint32($1, $2, $4)) {
18132    break label$1
18133   }
18134   label$3 : {
18135    label$4 : {
18136     label$5 : {
18137      label$6 : {
18138       label$7 : {
18139        label$8 : {
18140         label$9 : {
18141          switch (HEAP32[$0 >> 2]) {
18142          case 3:
18143           if (!HEAP32[$0 + 16 >> 2]) {
18144            break label$3
18145           }
18146           $4 = HEAP32[1367];
18147           $6 = HEAP32[1366];
18148           $7 = HEAP32[1365];
18149           $2 = 0;
18150           break label$8;
18151          case 0:
18152           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 16 >> 2], HEAP32[1356])) {
18153            break label$1
18154           }
18155           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 20 >> 2], HEAP32[1357])) {
18156            break label$1
18157           }
18158           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 24 >> 2], HEAP32[1358])) {
18159            break label$1
18160           }
18161           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 28 >> 2], HEAP32[1359])) {
18162            break label$1
18163           }
18164           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 32 >> 2], HEAP32[1360])) {
18165            break label$1
18166           }
18167           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 36 >> 2] + -1 | 0, HEAP32[1361])) {
18168            break label$1
18169           }
18170           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 40 >> 2] + -1 | 0, HEAP32[1362])) {
18171            break label$1
18172           }
18173           if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$0 + 48 >> 2], HEAP32[$0 + 52 >> 2], HEAP32[1363])) {
18174            break label$1
18175           }
18176           if (FLAC__bitwriter_write_byte_block($1, $0 + 56 | 0, 16)) {
18177            break label$3
18178           }
18179           break label$1;
18180          case 1:
18181           if (FLAC__bitwriter_write_zeroes($1, HEAP32[$0 + 8 >> 2] << 3)) {
18182            break label$3
18183           }
18184           break label$1;
18185          case 6:
18186           break label$5;
18187          case 5:
18188           break label$6;
18189          case 4:
18190           break label$7;
18191          case 2:
18192           break label$9;
18193          default:
18194           break label$4;
18195          };
18196         }
18197         $2 = HEAP32[1364] >>> 3 | 0;
18198         if (!FLAC__bitwriter_write_byte_block($1, $0 + 16 | 0, $2)) {
18199          break label$1
18200         }
18201         if (FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 20 >> 2], HEAP32[$0 + 8 >> 2] - $2 | 0)) {
18202          break label$3
18203         }
18204         break label$1;
18205        }
18206        while (1) {
18207         $3 = Math_imul($2, 24);
18208         $5 = $3 + HEAP32[$0 + 20 >> 2] | 0;
18209         if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$5 >> 2], HEAP32[$5 + 4 >> 2], $7)) {
18210          break label$1
18211         }
18212         $5 = $3 + HEAP32[$0 + 20 >> 2] | 0;
18213         if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$5 + 8 >> 2], HEAP32[$5 + 12 >> 2], $6)) {
18214          break label$1
18215         }
18216         if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[($3 + HEAP32[$0 + 20 >> 2] | 0) + 16 >> 2], $4)) {
18217          break label$1
18218         }
18219         $2 = $2 + 1 | 0;
18220         if ($2 >>> 0 < HEAPU32[$0 + 16 >> 2]) {
18221          continue
18222         }
18223         break;
18224        };
18225        break label$3;
18226       }
18227       if (!FLAC__bitwriter_write_raw_uint32_little_endian($1, $3)) {
18228        break label$1
18229       }
18230       if (!FLAC__bitwriter_write_byte_block($1, HEAP32[2720], $3)) {
18231        break label$1
18232       }
18233       if (!FLAC__bitwriter_write_raw_uint32_little_endian($1, HEAP32[$0 + 24 >> 2])) {
18234        break label$1
18235       }
18236       if (!HEAP32[$0 + 24 >> 2]) {
18237        break label$3
18238       }
18239       $2 = 0;
18240       while (1) {
18241        $3 = $2 << 3;
18242        if (!FLAC__bitwriter_write_raw_uint32_little_endian($1, HEAP32[$3 + HEAP32[$0 + 28 >> 2] >> 2])) {
18243         break label$1
18244        }
18245        $3 = $3 + HEAP32[$0 + 28 >> 2] | 0;
18246        if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$3 + 4 >> 2], HEAP32[$3 >> 2])) {
18247         break label$1
18248        }
18249        $2 = $2 + 1 | 0;
18250        if ($2 >>> 0 < HEAPU32[$0 + 24 >> 2]) {
18251         continue
18252        }
18253        break;
18254       };
18255       break label$3;
18256      }
18257      if (!FLAC__bitwriter_write_byte_block($1, $0 + 16 | 0, HEAP32[1378] >>> 3 | 0)) {
18258       break label$1
18259      }
18260      if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$0 + 152 >> 2], HEAP32[$0 + 156 >> 2], HEAP32[1379])) {
18261       break label$1
18262      }
18263      if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 160 >> 2] != 0, HEAP32[1380])) {
18264       break label$1
18265      }
18266      if (!FLAC__bitwriter_write_zeroes($1, HEAP32[1381])) {
18267       break label$1
18268      }
18269      if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 164 >> 2], HEAP32[1382])) {
18270       break label$1
18271      }
18272      if (!HEAP32[$0 + 164 >> 2]) {
18273       break label$3
18274      }
18275      $6 = HEAP32[1373] >>> 3 | 0;
18276      $7 = HEAP32[1370];
18277      $5 = HEAP32[1369];
18278      $9 = HEAP32[1368];
18279      $10 = HEAP32[1377];
18280      $11 = HEAP32[1376];
18281      $12 = HEAP32[1375];
18282      $13 = HEAP32[1374];
18283      $14 = HEAP32[1372];
18284      $15 = HEAP32[1371];
18285      $3 = 0;
18286      while (1) {
18287       $2 = HEAP32[$0 + 168 >> 2] + ($3 << 5) | 0;
18288       if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$2 >> 2], HEAP32[$2 + 4 >> 2], $15)) {
18289        break label$1
18290       }
18291       if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$2 + 8 | 0], $14)) {
18292        break label$1
18293       }
18294       if (!FLAC__bitwriter_write_byte_block($1, $2 + 9 | 0, $6)) {
18295        break label$1
18296       }
18297       if (!FLAC__bitwriter_write_raw_uint32($1, HEAP8[$2 + 22 | 0] & 1, $13)) {
18298        break label$1
18299       }
18300       if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$2 + 22 | 0] >>> 1 & 1, $12)) {
18301        break label$1
18302       }
18303       if (!FLAC__bitwriter_write_zeroes($1, $11)) {
18304        break label$1
18305       }
18306       if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$2 + 23 | 0], $10)) {
18307        break label$1
18308       }
18309       label$16 : {
18310        $8 = $2 + 23 | 0;
18311        if (!HEAPU8[$8 | 0]) {
18312         break label$16
18313        }
18314        $16 = $2 + 24 | 0;
18315        $2 = 0;
18316        while (1) {
18317         $4 = HEAP32[$16 >> 2] + ($2 << 4) | 0;
18318         if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$4 >> 2], HEAP32[$4 + 4 >> 2], $9)) {
18319          return 0
18320         }
18321         if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$4 + 8 | 0], $5)) {
18322          return 0
18323         }
18324         if (FLAC__bitwriter_write_zeroes($1, $7)) {
18325          $2 = $2 + 1 | 0;
18326          if ($2 >>> 0 >= HEAPU8[$8 | 0]) {
18327           break label$16
18328          }
18329          continue;
18330         }
18331         break;
18332        };
18333        return 0;
18334       }
18335       $3 = $3 + 1 | 0;
18336       if ($3 >>> 0 < HEAPU32[$0 + 164 >> 2]) {
18337        continue
18338       }
18339       break;
18340      };
18341      break label$3;
18342     }
18343     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 16 >> 2], HEAP32[1383])) {
18344      break label$1
18345     }
18346     $2 = strlen(HEAP32[$0 + 20 >> 2]);
18347     if (!FLAC__bitwriter_write_raw_uint32($1, $2, HEAP32[1384])) {
18348      break label$1
18349     }
18350     if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 20 >> 2], $2)) {
18351      break label$1
18352     }
18353     $2 = strlen(HEAP32[$0 + 24 >> 2]);
18354     if (!FLAC__bitwriter_write_raw_uint32($1, $2, HEAP32[1385])) {
18355      break label$1
18356     }
18357     if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 24 >> 2], $2)) {
18358      break label$1
18359     }
18360     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 28 >> 2], HEAP32[1386])) {
18361      break label$1
18362     }
18363     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 32 >> 2], HEAP32[1387])) {
18364      break label$1
18365     }
18366     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 36 >> 2], HEAP32[1388])) {
18367      break label$1
18368     }
18369     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 40 >> 2], HEAP32[1389])) {
18370      break label$1
18371     }
18372     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 44 >> 2], HEAP32[1390])) {
18373      break label$1
18374     }
18375     if (FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 48 >> 2], HEAP32[$0 + 44 >> 2])) {
18376      break label$3
18377     }
18378     break label$1;
18379    }
18380    if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 16 >> 2], HEAP32[$0 + 8 >> 2])) {
18381     break label$1
18382    }
18383   }
18384   $17 = 1;
18385  }
18386  return $17;
18387 }
18388
18389 function FLAC__frame_add_header($0, $1) {
18390  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
18391  $5 = global$0 - 16 | 0;
18392  global$0 = $5;
18393  label$1 : {
18394   if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[1394], HEAP32[1395])) {
18395    break label$1
18396   }
18397   if (!FLAC__bitwriter_write_raw_uint32($1, 0, HEAP32[1396])) {
18398    break label$1
18399   }
18400   if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 20 >> 2] != 0, HEAP32[1397])) {
18401    break label$1
18402   }
18403   $8 = 16;
18404   $9 = 1;
18405   $3 = $1;
18406   label$3 : {
18407    label$4 : {
18408     label$5 : {
18409      label$6 : {
18410       label$7 : {
18411        label$8 : {
18412         label$9 : {
18413          label$10 : {
18414           label$11 : {
18415            $2 = HEAP32[$0 >> 2];
18416            if (($2 | 0) <= 2047) {
18417             if (($2 | 0) <= 575) {
18418              $4 = 1;
18419              if (($2 | 0) == 192) {
18420               break label$3
18421              }
18422              if (($2 | 0) == 256) {
18423               break label$8
18424              }
18425              if (($2 | 0) != 512) {
18426               break label$4
18427              }
18428              $4 = 9;
18429              break label$3;
18430             }
18431             if (($2 | 0) == 576) {
18432              break label$11
18433             }
18434             if (($2 | 0) == 1024) {
18435              break label$7
18436             }
18437             if (($2 | 0) != 1152) {
18438              break label$4
18439             }
18440             $4 = 3;
18441             break label$3;
18442            }
18443            if (($2 | 0) <= 4607) {
18444             if (($2 | 0) == 2048) {
18445              break label$6
18446             }
18447             if (($2 | 0) == 2304) {
18448              break label$10
18449             }
18450             if (($2 | 0) != 4096) {
18451              break label$4
18452             }
18453             $4 = 12;
18454             break label$3;
18455            }
18456            if (($2 | 0) <= 16383) {
18457             if (($2 | 0) == 4608) {
18458              break label$9
18459             }
18460             if (($2 | 0) != 8192) {
18461              break label$4
18462             }
18463             $4 = 13;
18464             break label$3;
18465            }
18466            if (($2 | 0) == 16384) {
18467             break label$5
18468            }
18469            if (($2 | 0) != 32768) {
18470             break label$4
18471            }
18472            $4 = 15;
18473            break label$3;
18474           }
18475           $4 = 2;
18476           break label$3;
18477          }
18478          $4 = 4;
18479          break label$3;
18480         }
18481         $4 = 5;
18482         break label$3;
18483        }
18484        $4 = 8;
18485        break label$3;
18486       }
18487       $4 = 10;
18488       break label$3;
18489      }
18490      $4 = 11;
18491      break label$3;
18492     }
18493     $4 = 14;
18494     break label$3;
18495    }
18496    $2 = $2 >>> 0 < 257;
18497    $8 = $2 ? 8 : 16;
18498    $9 = 0;
18499    $4 = $2 ? 6 : 7;
18500   }
18501   if (!FLAC__bitwriter_write_raw_uint32($3, $4, HEAP32[1398])) {
18502    break label$1
18503   }
18504   label$16 : {
18505    label$17 : {
18506     label$18 : {
18507      label$19 : {
18508       label$20 : {
18509        label$21 : {
18510         label$22 : {
18511          label$23 : {
18512           $2 = HEAP32[$0 + 4 >> 2];
18513           if (($2 | 0) <= 44099) {
18514            if (($2 | 0) <= 22049) {
18515             if (($2 | 0) == 8e3) {
18516              break label$23
18517             }
18518             if (($2 | 0) != 16e3) {
18519              break label$17
18520             }
18521             $3 = 5;
18522             break label$16;
18523            }
18524            if (($2 | 0) == 22050) {
18525             break label$22
18526            }
18527            if (($2 | 0) == 24e3) {
18528             break label$21
18529            }
18530            if (($2 | 0) != 32e3) {
18531             break label$17
18532            }
18533            $3 = 8;
18534            break label$16;
18535           }
18536           if (($2 | 0) <= 95999) {
18537            if (($2 | 0) == 44100) {
18538             break label$20
18539            }
18540            if (($2 | 0) == 48e3) {
18541             break label$19
18542            }
18543            $3 = 1;
18544            if (($2 | 0) == 88200) {
18545             break label$16
18546            }
18547            break label$17;
18548           }
18549           if (($2 | 0) == 96e3) {
18550            break label$18
18551           }
18552           if (($2 | 0) != 192e3) {
18553            if (($2 | 0) != 176400) {
18554             break label$17
18555            }
18556            $3 = 2;
18557            break label$16;
18558           }
18559           $3 = 3;
18560           break label$16;
18561          }
18562          $3 = 4;
18563          break label$16;
18564         }
18565         $3 = 6;
18566         break label$16;
18567        }
18568        $3 = 7;
18569        break label$16;
18570       }
18571       $3 = 9;
18572       break label$16;
18573      }
18574      $3 = 10;
18575      break label$16;
18576     }
18577     $3 = 11;
18578     break label$16;
18579    }
18580    $6 = ($2 >>> 0) % 1e3 | 0;
18581    if ($2 >>> 0 <= 255e3) {
18582     $3 = 12;
18583     $7 = 12;
18584     if (!$6) {
18585      break label$16
18586     }
18587    }
18588    if (!(($2 >>> 0) % 10)) {
18589     $3 = 14;
18590     $7 = 14;
18591     break label$16;
18592    }
18593    $3 = $2 >>> 0 < 65536 ? 13 : 0;
18594    $7 = $3;
18595   }
18596   $6 = 0;
18597   if (!FLAC__bitwriter_write_raw_uint32($1, $3, HEAP32[1399])) {
18598    break label$1
18599   }
18600   label$30 : {
18601    label$31 : {
18602     switch (HEAP32[$0 + 12 >> 2]) {
18603     case 0:
18604      $3 = HEAP32[$0 + 8 >> 2] + -1 | 0;
18605      break label$30;
18606     case 1:
18607      $3 = 8;
18608      break label$30;
18609     case 2:
18610      $3 = 9;
18611      break label$30;
18612     case 3:
18613      break label$31;
18614     default:
18615      break label$30;
18616     };
18617    }
18618    $3 = 10;
18619   }
18620   if (!FLAC__bitwriter_write_raw_uint32($1, $3, HEAP32[1400])) {
18621    break label$1
18622   }
18623   $3 = $1;
18624   $2 = __wasm_rotl_i32(HEAP32[$0 + 16 >> 2] + -8 | 0, 30);
18625   if ($2 >>> 0 <= 4) {
18626    $2 = HEAP32[($2 << 2) + 10464 >> 2]
18627   } else {
18628    $2 = 0
18629   }
18630   if (!FLAC__bitwriter_write_raw_uint32($3, $2, HEAP32[1401])) {
18631    break label$1
18632   }
18633   if (!FLAC__bitwriter_write_raw_uint32($1, 0, HEAP32[1402])) {
18634    break label$1
18635   }
18636   label$37 : {
18637    if (!HEAP32[$0 + 20 >> 2]) {
18638     if (FLAC__bitwriter_write_utf8_uint32($1, HEAP32[$0 + 24 >> 2])) {
18639      break label$37
18640     }
18641     break label$1;
18642    }
18643    if (!FLAC__bitwriter_write_utf8_uint64($1, HEAP32[$0 + 24 >> 2], HEAP32[$0 + 28 >> 2])) {
18644     break label$1
18645    }
18646   }
18647   if (!$9) {
18648    if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 >> 2] + -1 | 0, $8)) {
18649     break label$1
18650    }
18651   }
18652   label$40 : {
18653    label$41 : {
18654     switch ($7 + -12 | 0) {
18655     case 0:
18656      if (FLAC__bitwriter_write_raw_uint32($1, HEAPU32[$0 + 4 >> 2] / 1e3 | 0, 8)) {
18657       break label$40
18658      }
18659      break label$1;
18660     case 1:
18661      if (FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 4 >> 2], 16)) {
18662       break label$40
18663      }
18664      break label$1;
18665     case 2:
18666      break label$41;
18667     default:
18668      break label$40;
18669     };
18670    }
18671    if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU32[$0 + 4 >> 2] / 10 | 0, 16)) {
18672     break label$1
18673    }
18674   }
18675   if (!FLAC__bitwriter_get_write_crc8($1, $5 + 15 | 0)) {
18676    break label$1
18677   }
18678   $6 = (FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$5 + 15 | 0], HEAP32[1403]) | 0) != 0;
18679  }
18680  global$0 = $5 + 16 | 0;
18681  return $6;
18682 }
18683
18684 function FLAC__subframe_add_constant($0, $1, $2, $3) {
18685  var $4 = 0;
18686  label$1 : {
18687   if (!FLAC__bitwriter_write_raw_uint32($3, HEAP32[1417] | ($2 | 0) != 0, HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) {
18688    break label$1
18689   }
18690   if ($2) {
18691    if (!FLAC__bitwriter_write_unary_unsigned($3, $2 + -1 | 0)) {
18692     break label$1
18693    }
18694   }
18695   $4 = (FLAC__bitwriter_write_raw_int32($3, HEAP32[$0 >> 2], $1) | 0) != 0;
18696  }
18697  return $4;
18698 }
18699
18700 function FLAC__subframe_add_fixed($0, $1, $2, $3, $4) {
18701  var $5 = 0;
18702  label$1 : {
18703   if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[1419] | ($3 | 0) != 0 | HEAP32[$0 + 12 >> 2] << 1, HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) {
18704    break label$1
18705   }
18706   if ($3) {
18707    if (!FLAC__bitwriter_write_unary_unsigned($4, $3 + -1 | 0)) {
18708     break label$1
18709    }
18710   }
18711   label$3 : {
18712    if (!HEAP32[$0 + 12 >> 2]) {
18713     break label$3
18714    }
18715    $3 = 0;
18716    while (1) {
18717     if (FLAC__bitwriter_write_raw_int32($4, HEAP32[(($3 << 2) + $0 | 0) + 16 >> 2], $2)) {
18718      $3 = $3 + 1 | 0;
18719      if ($3 >>> 0 < HEAPU32[$0 + 12 >> 2]) {
18720       continue
18721      }
18722      break label$3;
18723     }
18724     break;
18725    };
18726    return 0;
18727   }
18728   if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 >> 2], HEAP32[1405])) {
18729    break label$1
18730   }
18731   label$6 : {
18732    if (HEAPU32[$0 >> 2] > 1) {
18733     break label$6
18734    }
18735    if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 + 4 >> 2], HEAP32[1406])) {
18736     break label$1
18737    }
18738    $2 = HEAP32[$0 >> 2];
18739    if ($2 >>> 0 > 1) {
18740     break label$6
18741    }
18742    $3 = $1;
18743    $1 = HEAP32[$0 + 8 >> 2];
18744    if (!add_residual_partitioned_rice_($4, HEAP32[$0 + 32 >> 2], $3, HEAP32[$0 + 12 >> 2], HEAP32[$1 >> 2], HEAP32[$1 + 4 >> 2], HEAP32[$0 + 4 >> 2], ($2 | 0) == 1)) {
18745     break label$1
18746    }
18747   }
18748   $5 = 1;
18749  }
18750  return $5;
18751 }
18752
18753 function add_residual_partitioned_rice_($0, $1, $2, $3, $4, $5, $6, $7) {
18754  var $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0;
18755  $12 = HEAP32[($7 ? 5644 : 5640) >> 2];
18756  $9 = HEAP32[($7 ? 5632 : 5628) >> 2];
18757  label$1 : {
18758   label$2 : {
18759    if (!$6) {
18760     if (!HEAP32[$5 >> 2]) {
18761      if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$4 >> 2], $9)) {
18762       break label$2
18763      }
18764      if (!FLAC__bitwriter_write_rice_signed_block($0, $1, $2, HEAP32[$4 >> 2])) {
18765       break label$2
18766      }
18767      break label$1;
18768     }
18769     if (!FLAC__bitwriter_write_raw_uint32($0, $12, $9)) {
18770      break label$2
18771     }
18772     if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$5 >> 2], HEAP32[1409])) {
18773      break label$2
18774     }
18775     if (!$2) {
18776      break label$1
18777     }
18778     $7 = 0;
18779     while (1) {
18780      if (FLAC__bitwriter_write_raw_int32($0, HEAP32[($7 << 2) + $1 >> 2], HEAP32[$5 >> 2])) {
18781       $7 = $7 + 1 | 0;
18782       if (($7 | 0) != ($2 | 0)) {
18783        continue
18784       }
18785       break label$1;
18786      }
18787      break;
18788     };
18789     return 0;
18790    }
18791    $15 = $2 + $3 >>> $6 | 0;
18792    $16 = HEAP32[1409];
18793    $2 = 0;
18794    while (1) {
18795     $7 = $2;
18796     $13 = $15 - ($10 ? 0 : $3) | 0;
18797     $2 = $7 + $13 | 0;
18798     $14 = $10 << 2;
18799     $8 = $14 + $5 | 0;
18800     label$8 : {
18801      if (!HEAP32[$8 >> 2]) {
18802       $11 = 0;
18803       $8 = $4 + $14 | 0;
18804       if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$8 >> 2], $9)) {
18805        break label$2
18806       }
18807       if (FLAC__bitwriter_write_rice_signed_block($0, ($7 << 2) + $1 | 0, $13, HEAP32[$8 >> 2])) {
18808        break label$8
18809       }
18810       break label$2;
18811      }
18812      $11 = 0;
18813      if (!FLAC__bitwriter_write_raw_uint32($0, $12, $9)) {
18814       break label$2
18815      }
18816      if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$8 >> 2], $16)) {
18817       break label$2
18818      }
18819      if ($7 >>> 0 >= $2 >>> 0) {
18820       break label$8
18821      }
18822      while (1) {
18823       if (!FLAC__bitwriter_write_raw_int32($0, HEAP32[($7 << 2) + $1 >> 2], HEAP32[$8 >> 2])) {
18824        break label$2
18825       }
18826       $7 = $7 + 1 | 0;
18827       if (($7 | 0) != ($2 | 0)) {
18828        continue
18829       }
18830       break;
18831      };
18832     }
18833     $11 = 1;
18834     $10 = $10 + 1 | 0;
18835     if (!($10 >>> $6)) {
18836      continue
18837     }
18838     break;
18839    };
18840   }
18841   return $11;
18842  }
18843  return 1;
18844 }
18845
18846 function FLAC__subframe_add_lpc($0, $1, $2, $3, $4) {
18847  var $5 = 0;
18848  label$1 : {
18849   if (!FLAC__bitwriter_write_raw_uint32($4, (HEAP32[$0 + 12 >> 2] << 1) + -2 | (HEAP32[1420] | ($3 | 0) != 0), HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) {
18850    break label$1
18851   }
18852   if ($3) {
18853    if (!FLAC__bitwriter_write_unary_unsigned($4, $3 + -1 | 0)) {
18854     break label$1
18855    }
18856   }
18857   label$3 : {
18858    if (!HEAP32[$0 + 12 >> 2]) {
18859     break label$3
18860    }
18861    $3 = 0;
18862    while (1) {
18863     if (FLAC__bitwriter_write_raw_int32($4, HEAP32[(($3 << 2) + $0 | 0) + 152 >> 2], $2)) {
18864      $3 = $3 + 1 | 0;
18865      if ($3 >>> 0 < HEAPU32[$0 + 12 >> 2]) {
18866       continue
18867      }
18868      break label$3;
18869     }
18870     break;
18871    };
18872    return 0;
18873   }
18874   if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 + 16 >> 2] + -1 | 0, HEAP32[1412])) {
18875    break label$1
18876   }
18877   if (!FLAC__bitwriter_write_raw_int32($4, HEAP32[$0 + 20 >> 2], HEAP32[1413])) {
18878    break label$1
18879   }
18880   label$6 : {
18881    if (!HEAP32[$0 + 12 >> 2]) {
18882     break label$6
18883    }
18884    $3 = 0;
18885    while (1) {
18886     if (FLAC__bitwriter_write_raw_int32($4, HEAP32[(($3 << 2) + $0 | 0) + 24 >> 2], HEAP32[$0 + 16 >> 2])) {
18887      $3 = $3 + 1 | 0;
18888      if ($3 >>> 0 < HEAPU32[$0 + 12 >> 2]) {
18889       continue
18890      }
18891      break label$6;
18892     }
18893     break;
18894    };
18895    return 0;
18896   }
18897   if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 >> 2], HEAP32[1405])) {
18898    break label$1
18899   }
18900   label$9 : {
18901    if (HEAPU32[$0 >> 2] > 1) {
18902     break label$9
18903    }
18904    if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 + 4 >> 2], HEAP32[1406])) {
18905     break label$1
18906    }
18907    $2 = HEAP32[$0 >> 2];
18908    if ($2 >>> 0 > 1) {
18909     break label$9
18910    }
18911    $3 = $1;
18912    $1 = HEAP32[$0 + 8 >> 2];
18913    if (!add_residual_partitioned_rice_($4, HEAP32[$0 + 280 >> 2], $3, HEAP32[$0 + 12 >> 2], HEAP32[$1 >> 2], HEAP32[$1 + 4 >> 2], HEAP32[$0 + 4 >> 2], ($2 | 0) == 1)) {
18914     break label$1
18915    }
18916   }
18917   $5 = 1;
18918  }
18919  return $5;
18920 }
18921
18922 function FLAC__subframe_add_verbatim($0, $1, $2, $3, $4) {
18923  $0 = HEAP32[$0 >> 2];
18924  label$1 : {
18925   if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[1418] | ($3 | 0) != 0, HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) {
18926    break label$1
18927   }
18928   if ($3) {
18929    if (!FLAC__bitwriter_write_unary_unsigned($4, $3 + -1 | 0)) {
18930     break label$1
18931    }
18932   }
18933   if (!$1) {
18934    return 1
18935   }
18936   $3 = 0;
18937   label$4 : {
18938    while (1) {
18939     if (!FLAC__bitwriter_write_raw_int32($4, HEAP32[$0 + ($3 << 2) >> 2], $2)) {
18940      break label$4
18941     }
18942     $3 = $3 + 1 | 0;
18943     if (($3 | 0) != ($1 | 0)) {
18944      continue
18945     }
18946     break;
18947    };
18948    return 1;
18949   }
18950  }
18951  return 0;
18952 }
18953
18954 function strncmp($0, $1, $2) {
18955  var $3 = 0, $4 = 0, $5 = 0;
18956  if (!$2) {
18957   return 0
18958  }
18959  $3 = HEAPU8[$0 | 0];
18960  label$2 : {
18961   if (!$3) {
18962    break label$2
18963   }
18964   while (1) {
18965    label$4 : {
18966     $4 = HEAPU8[$1 | 0];
18967     if (($4 | 0) != ($3 | 0)) {
18968      break label$4
18969     }
18970     $2 = $2 + -1 | 0;
18971     if (!$2 | !$4) {
18972      break label$4
18973     }
18974     $1 = $1 + 1 | 0;
18975     $3 = HEAPU8[$0 + 1 | 0];
18976     $0 = $0 + 1 | 0;
18977     if ($3) {
18978      continue
18979     }
18980     break label$2;
18981    }
18982    break;
18983   };
18984   $5 = $3;
18985  }
18986  return ($5 & 255) - HEAPU8[$1 | 0] | 0;
18987 }
18988
18989 function __uflow($0) {
18990  var $1 = 0, $2 = 0;
18991  $1 = global$0 - 16 | 0;
18992  global$0 = $1;
18993  $2 = -1;
18994  label$1 : {
18995   if (__toread($0)) {
18996    break label$1
18997   }
18998   if ((FUNCTION_TABLE[HEAP32[$0 + 32 >> 2]]($0, $1 + 15 | 0, 1) | 0) != 1) {
18999    break label$1
19000   }
19001   $2 = HEAPU8[$1 + 15 | 0];
19002  }
19003  global$0 = $1 + 16 | 0;
19004  return $2;
19005 }
19006
19007 function __shlim($0) {
19008  var $1 = 0, $2 = 0, $3 = 0, $4 = 0;
19009  HEAP32[$0 + 112 >> 2] = 0;
19010  HEAP32[$0 + 116 >> 2] = 0;
19011  $3 = HEAP32[$0 + 8 >> 2];
19012  $4 = HEAP32[$0 + 4 >> 2];
19013  $1 = $3 - $4 | 0;
19014  $2 = $1 >> 31;
19015  HEAP32[$0 + 120 >> 2] = $1;
19016  HEAP32[$0 + 124 >> 2] = $2;
19017  if (!((($2 | 0) < 0 ? 1 : ($2 | 0) <= 0 ? ($1 >>> 0 > 0 ? 0 : 1) : 0) | 1)) {
19018   HEAP32[$0 + 104 >> 2] = $4;
19019   return;
19020  }
19021  HEAP32[$0 + 104 >> 2] = $3;
19022 }
19023
19024 function __shgetc($0) {
19025  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
19026  $2 = HEAP32[$0 + 116 >> 2];
19027  $3 = $2;
19028  label$1 : {
19029   $5 = HEAP32[$0 + 112 >> 2];
19030   label$2 : {
19031    if ($2 | $5) {
19032     $2 = HEAP32[$0 + 124 >> 2];
19033     if (($2 | 0) > ($3 | 0) ? 1 : ($2 | 0) >= ($3 | 0) ? (HEAPU32[$0 + 120 >> 2] < $5 >>> 0 ? 0 : 1) : 0) {
19034      break label$2
19035     }
19036    }
19037    $5 = __uflow($0);
19038    if (($5 | 0) > -1) {
19039     break label$1
19040    }
19041   }
19042   HEAP32[$0 + 104 >> 2] = 0;
19043   return -1;
19044  }
19045  $2 = HEAP32[$0 + 8 >> 2];
19046  $3 = HEAP32[$0 + 116 >> 2];
19047  $4 = $3;
19048  label$4 : {
19049   label$5 : {
19050    $1 = HEAP32[$0 + 112 >> 2];
19051    if (!($3 | $1)) {
19052     break label$5
19053    }
19054    $3 = (HEAP32[$0 + 124 >> 2] ^ -1) + $4 | 0;
19055    $4 = HEAP32[$0 + 120 >> 2] ^ -1;
19056    $1 = $4 + $1 | 0;
19057    if ($1 >>> 0 < $4 >>> 0) {
19058     $3 = $3 + 1 | 0
19059    }
19060    $4 = $1;
19061    $1 = HEAP32[$0 + 4 >> 2];
19062    $6 = $2 - $1 | 0;
19063    $7 = $4 >>> 0 < $6 >>> 0 ? 0 : 1;
19064    $6 = $6 >> 31;
19065    if (($3 | 0) > ($6 | 0) ? 1 : ($3 | 0) >= ($6 | 0) ? $7 : 0) {
19066     break label$5
19067    }
19068    HEAP32[$0 + 104 >> 2] = $4 + $1;
19069    break label$4;
19070   }
19071   HEAP32[$0 + 104 >> 2] = $2;
19072  }
19073  label$6 : {
19074   if (!$2) {
19075    $2 = HEAP32[$0 + 4 >> 2];
19076    break label$6;
19077   }
19078   $3 = $0;
19079   $1 = $2;
19080   $2 = HEAP32[$0 + 4 >> 2];
19081   $1 = ($1 - $2 | 0) + 1 | 0;
19082   $4 = $1 + HEAP32[$0 + 120 >> 2] | 0;
19083   $0 = HEAP32[$0 + 124 >> 2] + ($1 >> 31) | 0;
19084   HEAP32[$3 + 120 >> 2] = $4;
19085   HEAP32[$3 + 124 >> 2] = $4 >>> 0 < $1 >>> 0 ? $0 + 1 | 0 : $0;
19086  }
19087  $0 = $2 + -1 | 0;
19088  if (HEAPU8[$0 | 0] != ($5 | 0)) {
19089   HEAP8[$0 | 0] = $5
19090  }
19091  return $5;
19092 }
19093
19094 function __extendsftf2($0, $1) {
19095  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
19096  $4 = global$0 - 16 | 0;
19097  global$0 = $4;
19098  $5 = (wasm2js_scratch_store_f32($1), wasm2js_scratch_load_i32(0));
19099  $2 = $5 & 2147483647;
19100  label$1 : {
19101   if ($2 + -8388608 >>> 0 <= 2130706431) {
19102    $3 = $2;
19103    $2 = $2 >>> 7 | 0;
19104    $3 = $3 << 25;
19105    $2 = $2 + 1065353216 | 0;
19106    $6 = $3;
19107    $2 = $3 >>> 0 < 0 ? $2 + 1 | 0 : $2;
19108    break label$1;
19109   }
19110   if ($2 >>> 0 >= 2139095040) {
19111    $2 = $5;
19112    $3 = $2 >>> 7 | 0;
19113    $6 = $2 << 25;
19114    $2 = $3 | 2147418112;
19115    break label$1;
19116   }
19117   if (!$2) {
19118    $2 = 0;
19119    break label$1;
19120   }
19121   $3 = $2;
19122   $2 = Math_clz32($2);
19123   __ashlti3($4, $3, 0, 0, 0, $2 + 81 | 0);
19124   $7 = HEAP32[$4 >> 2];
19125   $8 = HEAP32[$4 + 4 >> 2];
19126   $6 = HEAP32[$4 + 8 >> 2];
19127   $2 = HEAP32[$4 + 12 >> 2] ^ 65536 | 16265 - $2 << 16;
19128  }
19129  HEAP32[$0 >> 2] = $7;
19130  HEAP32[$0 + 4 >> 2] = $8;
19131  HEAP32[$0 + 8 >> 2] = $6;
19132  HEAP32[$0 + 12 >> 2] = $5 & -2147483648 | $2;
19133  global$0 = $4 + 16 | 0;
19134 }
19135
19136 function __floatsitf($0, $1) {
19137  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
19138  $3 = global$0 - 16 | 0;
19139  global$0 = $3;
19140  $6 = $0;
19141  $7 = $0;
19142  label$1 : {
19143   if (!$1) {
19144    $1 = 0;
19145    $5 = 0;
19146    break label$1;
19147   }
19148   $2 = $1 >> 31;
19149   $4 = $2 + $1 ^ $2;
19150   $2 = Math_clz32($4);
19151   __ashlti3($3, $4, 0, 0, 0, $2 + 81 | 0);
19152   $2 = (HEAP32[$3 + 12 >> 2] ^ 65536) + (16414 - $2 << 16) | 0;
19153   $4 = 0 + HEAP32[$3 + 8 >> 2] | 0;
19154   if ($4 >>> 0 < $5 >>> 0) {
19155    $2 = $2 + 1 | 0
19156   }
19157   $1 = $1 & -2147483648 | $2;
19158   $2 = HEAP32[$3 + 4 >> 2];
19159   $5 = HEAP32[$3 >> 2];
19160  }
19161  HEAP32[$7 >> 2] = $5;
19162  HEAP32[$6 + 4 >> 2] = $2;
19163  HEAP32[$0 + 8 >> 2] = $4;
19164  HEAP32[$0 + 12 >> 2] = $1;
19165  global$0 = $3 + 16 | 0;
19166 }
19167
19168 function __multf3($0, $1, $2, $3, $4, $5, $6, $7, $8) {
19169  var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0;
19170  $13 = global$0 - 96 | 0;
19171  global$0 = $13;
19172  $15 = $2;
19173  $10 = $6;
19174  $19 = ($10 & 131071) << 15 | $5 >>> 17;
19175  $9 = $8 & 65535;
19176  $21 = $9;
19177  $17 = $7;
19178  $10 = $7;
19179  $24 = $10 << 15 | $6 >>> 17;
19180  $14 = ($4 ^ $8) & -2147483648;
19181  $10 = $4 & 65535;
19182  $12 = $10;
19183  $16 = $3;
19184  $27 = $10;
19185  $10 = $9;
19186  $25 = ($10 & 131071) << 15 | $7 >>> 17;
19187  $37 = $8 >>> 16 & 32767;
19188  $38 = $4 >>> 16 & 32767;
19189  label$1 : {
19190   label$2 : {
19191    if ($38 + -1 >>> 0 <= 32765) {
19192     $20 = 0;
19193     if ($37 + -1 >>> 0 < 32766) {
19194      break label$2
19195     }
19196    }
19197    $11 = $4 & 2147483647;
19198    $9 = $11;
19199    $10 = $3;
19200    if (!(!$3 & ($9 | 0) == 2147418112 ? !($1 | $2) : ($9 | 0) == 2147418112 & $3 >>> 0 < 0 | $9 >>> 0 < 2147418112)) {
19201     $22 = $3;
19202     $14 = $4 | 32768;
19203     break label$1;
19204    }
19205    $11 = $8 & 2147483647;
19206    $4 = $11;
19207    $3 = $7;
19208    if (!(!$3 & ($4 | 0) == 2147418112 ? !($5 | $6) : ($4 | 0) == 2147418112 & $3 >>> 0 < 0 | $4 >>> 0 < 2147418112)) {
19209     $22 = $7;
19210     $14 = $8 | 32768;
19211     $1 = $5;
19212     $2 = $6;
19213     break label$1;
19214    }
19215    if (!($1 | $10 | ($9 ^ 2147418112 | $2))) {
19216     if (!($3 | $5 | ($4 | $6))) {
19217      $14 = 2147450880;
19218      $1 = 0;
19219      $2 = 0;
19220      break label$1;
19221     }
19222     $14 = $14 | 2147418112;
19223     $1 = 0;
19224     $2 = 0;
19225     break label$1;
19226    }
19227    if (!($3 | $5 | ($4 ^ 2147418112 | $6))) {
19228     $3 = $1 | $10;
19229     $4 = $2 | $9;
19230     $1 = 0;
19231     $2 = 0;
19232     if (!($3 | $4)) {
19233      $14 = 2147450880;
19234      break label$1;
19235     }
19236     $14 = $14 | 2147418112;
19237     break label$1;
19238    }
19239    if (!($1 | $10 | ($2 | $9))) {
19240     $1 = 0;
19241     $2 = 0;
19242     break label$1;
19243    }
19244    if (!($3 | $5 | ($4 | $6))) {
19245     $1 = 0;
19246     $2 = 0;
19247     break label$1;
19248    }
19249    $3 = 0;
19250    if (($9 | 0) == 65535 | $9 >>> 0 < 65535) {
19251     $9 = $1;
19252     $8 = $2;
19253     $3 = !($12 | $16);
19254     $7 = $3 << 6;
19255     $10 = Math_clz32($3 ? $1 : $16) + 32 | 0;
19256     $1 = Math_clz32($3 ? $2 : $12);
19257     $1 = $7 + (($1 | 0) == 32 ? $10 : $1) | 0;
19258     __ashlti3($13 + 80 | 0, $9, $8, $16, $12, $1 + -15 | 0);
19259     $16 = HEAP32[$13 + 88 >> 2];
19260     $15 = HEAP32[$13 + 84 >> 2];
19261     $27 = HEAP32[$13 + 92 >> 2];
19262     $3 = 16 - $1 | 0;
19263     $1 = HEAP32[$13 + 80 >> 2];
19264    }
19265    $20 = $3;
19266    if ($4 >>> 0 > 65535) {
19267     break label$2
19268    }
19269    $2 = !($17 | $21);
19270    $4 = $2 << 6;
19271    $7 = Math_clz32($2 ? $5 : $17) + 32 | 0;
19272    $2 = Math_clz32($2 ? $6 : $21);
19273    $2 = $4 + (($2 | 0) == 32 ? $7 : $2) | 0;
19274    $8 = $2;
19275    __ashlti3($13 - -64 | 0, $5, $6, $17, $21, $2 + -15 | 0);
19276    $5 = HEAP32[$13 + 76 >> 2];
19277    $2 = $5;
19278    $7 = HEAP32[$13 + 72 >> 2];
19279    $4 = $7;
19280    $4 = $4 << 15;
19281    $10 = HEAP32[$13 + 68 >> 2];
19282    $24 = $10 >>> 17 | $4;
19283    $4 = $10;
19284    $5 = HEAP32[$13 + 64 >> 2];
19285    $19 = ($4 & 131071) << 15 | $5 >>> 17;
19286    $25 = ($2 & 131071) << 15 | $7 >>> 17;
19287    $20 = ($3 - $8 | 0) + 16 | 0;
19288   }
19289   $3 = $19;
19290   $17 = 0;
19291   $8 = __wasm_i64_mul($3, 0, $1, $17);
19292   $2 = i64toi32_i32$HIGH_BITS;
19293   $26 = $2;
19294   $23 = $5 << 15 & -32768;
19295   $5 = __wasm_i64_mul($23, 0, $15, 0);
19296   $4 = $5 + $8 | 0;
19297   $11 = i64toi32_i32$HIGH_BITS + $2 | 0;
19298   $11 = $4 >>> 0 < $5 >>> 0 ? $11 + 1 | 0 : $11;
19299   $2 = $4;
19300   $5 = 0;
19301   $6 = __wasm_i64_mul($23, $28, $1, $17);
19302   $4 = $5 + $6 | 0;
19303   $9 = i64toi32_i32$HIGH_BITS + $2 | 0;
19304   $9 = $4 >>> 0 < $6 >>> 0 ? $9 + 1 | 0 : $9;
19305   $19 = $4;
19306   $6 = $9;
19307   $32 = ($2 | 0) == ($9 | 0) & $4 >>> 0 < $5 >>> 0 | $9 >>> 0 < $2 >>> 0;
19308   $41 = __wasm_i64_mul($3, $39, $15, $40);
19309   $33 = i64toi32_i32$HIGH_BITS;
19310   $29 = $16;
19311   $5 = __wasm_i64_mul($23, $28, $16, 0);
19312   $4 = $5 + $41 | 0;
19313   $12 = i64toi32_i32$HIGH_BITS + $33 | 0;
19314   $12 = $4 >>> 0 < $5 >>> 0 ? $12 + 1 | 0 : $12;
19315   $42 = $4;
19316   $7 = __wasm_i64_mul($24, 0, $1, $17);
19317   $4 = $4 + $7 | 0;
19318   $5 = i64toi32_i32$HIGH_BITS + $12 | 0;
19319   $34 = $4;
19320   $5 = $4 >>> 0 < $7 >>> 0 ? $5 + 1 | 0 : $5;
19321   $21 = $5;
19322   $7 = $5;
19323   $5 = ($11 | 0) == ($26 | 0) & $2 >>> 0 < $8 >>> 0 | $11 >>> 0 < $26 >>> 0;
19324   $4 = $11;
19325   $2 = $4 + $34 | 0;
19326   $9 = $5 + $7 | 0;
19327   $26 = $2;
19328   $9 = $2 >>> 0 < $4 >>> 0 ? $9 + 1 | 0 : $9;
19329   $4 = $9;
19330   $7 = $2;
19331   $44 = __wasm_i64_mul($3, $39, $16, $43);
19332   $35 = i64toi32_i32$HIGH_BITS;
19333   $2 = $23;
19334   $30 = $27 | 65536;
19335   $23 = $18;
19336   $5 = __wasm_i64_mul($2, $28, $30, $18);
19337   $2 = $5 + $44 | 0;
19338   $9 = i64toi32_i32$HIGH_BITS + $35 | 0;
19339   $9 = $2 >>> 0 < $5 >>> 0 ? $9 + 1 | 0 : $9;
19340   $45 = $2;
19341   $10 = __wasm_i64_mul($15, $40, $24, $46);
19342   $2 = $2 + $10 | 0;
19343   $18 = $9;
19344   $5 = $9 + i64toi32_i32$HIGH_BITS | 0;
19345   $5 = $2 >>> 0 < $10 >>> 0 ? $5 + 1 | 0 : $5;
19346   $36 = $2;
19347   $31 = $25 & 2147483647 | -2147483648;
19348   $2 = __wasm_i64_mul($31, 0, $1, $17);
19349   $1 = $36 + $2 | 0;
19350   $17 = $5;
19351   $10 = $5 + i64toi32_i32$HIGH_BITS | 0;
19352   $28 = $1;
19353   $2 = $1 >>> 0 < $2 >>> 0 ? $10 + 1 | 0 : $10;
19354   $9 = $4 + $1 | 0;
19355   $5 = 0;
19356   $1 = $5 + $7 | 0;
19357   if ($1 >>> 0 < $5 >>> 0) {
19358    $9 = $9 + 1 | 0
19359   }
19360   $27 = $1;
19361   $25 = $9;
19362   $5 = $9;
19363   $7 = $1 + $32 | 0;
19364   if ($7 >>> 0 < $1 >>> 0) {
19365    $5 = $5 + 1 | 0
19366   }
19367   $8 = $5;
19368   $16 = ($20 + ($37 + $38 | 0) | 0) + -16383 | 0;
19369   $5 = __wasm_i64_mul($29, $43, $24, $46);
19370   $1 = i64toi32_i32$HIGH_BITS;
19371   $11 = 0;
19372   $10 = __wasm_i64_mul($3, $39, $30, $23);
19373   $3 = $10 + $5 | 0;
19374   $9 = i64toi32_i32$HIGH_BITS + $1 | 0;
19375   $9 = $3 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9;
19376   $20 = $3;
19377   $10 = $3;
19378   $3 = $9;
19379   $9 = ($1 | 0) == ($3 | 0) & $10 >>> 0 < $5 >>> 0 | $3 >>> 0 < $1 >>> 0;
19380   $5 = __wasm_i64_mul($31, $47, $15, $40);
19381   $1 = $5 + $10 | 0;
19382   $10 = i64toi32_i32$HIGH_BITS + $3 | 0;
19383   $10 = $1 >>> 0 < $5 >>> 0 ? $10 + 1 | 0 : $10;
19384   $15 = $1;
19385   $5 = $1;
19386   $1 = $10;
19387   $3 = ($3 | 0) == ($1 | 0) & $5 >>> 0 < $20 >>> 0 | $1 >>> 0 < $3 >>> 0;
19388   $5 = $9 + $3 | 0;
19389   if ($5 >>> 0 < $3 >>> 0) {
19390    $11 = 1
19391   }
19392   $10 = $5;
19393   $3 = $1;
19394   $5 = $11;
19395   $32 = $10;
19396   $9 = 0;
19397   $10 = ($12 | 0) == ($21 | 0) & $34 >>> 0 < $42 >>> 0 | $21 >>> 0 < $12 >>> 0;
19398   $12 = $10 + (($12 | 0) == ($33 | 0) & $42 >>> 0 < $41 >>> 0 | $12 >>> 0 < $33 >>> 0) | 0;
19399   if ($12 >>> 0 < $10 >>> 0) {
19400    $9 = 1
19401   }
19402   $11 = $12;
19403   $12 = $12 + $15 | 0;
19404   $10 = $3 + $9 | 0;
19405   $20 = $12;
19406   $9 = $12;
19407   $10 = $9 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10;
19408   $3 = $10;
19409   $1 = ($1 | 0) == ($3 | 0) & $9 >>> 0 < $15 >>> 0 | $3 >>> 0 < $1 >>> 0;
19410   $10 = $32 + $1 | 0;
19411   if ($10 >>> 0 < $1 >>> 0) {
19412    $5 = $5 + 1 | 0
19413   }
19414   $1 = $10;
19415   $10 = __wasm_i64_mul($31, $47, $30, $23);
19416   $1 = $1 + $10 | 0;
19417   $9 = i64toi32_i32$HIGH_BITS + $5 | 0;
19418   $9 = $1 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9;
19419   $11 = $1;
19420   $12 = __wasm_i64_mul($31, $47, $29, $43);
19421   $5 = i64toi32_i32$HIGH_BITS;
19422   $15 = __wasm_i64_mul($24, $46, $30, $23);
19423   $1 = $15 + $12 | 0;
19424   $10 = i64toi32_i32$HIGH_BITS + $5 | 0;
19425   $10 = $1 >>> 0 < $15 >>> 0 ? $10 + 1 | 0 : $10;
19426   $15 = $1;
19427   $1 = $10;
19428   $10 = ($5 | 0) == ($1 | 0) & $15 >>> 0 < $12 >>> 0 | $1 >>> 0 < $5 >>> 0;
19429   $5 = $1 + $11 | 0;
19430   $11 = $9 + $10 | 0;
19431   $10 = $5 >>> 0 < $1 >>> 0 ? $11 + 1 | 0 : $11;
19432   $29 = $5;
19433   $9 = $3 + $15 | 0;
19434   $11 = 0;
19435   $1 = $11 + $20 | 0;
19436   if ($1 >>> 0 < $11 >>> 0) {
19437    $9 = $9 + 1 | 0
19438   }
19439   $12 = $1;
19440   $5 = $1;
19441   $1 = $9;
19442   $3 = ($3 | 0) == ($1 | 0) & $5 >>> 0 < $20 >>> 0 | $1 >>> 0 < $3 >>> 0;
19443   $5 = $29 + $3 | 0;
19444   if ($5 >>> 0 < $3 >>> 0) {
19445    $10 = $10 + 1 | 0
19446   }
19447   $15 = $5;
19448   $11 = $1;
19449   $9 = 0;
19450   $5 = ($18 | 0) == ($17 | 0) & $36 >>> 0 < $45 >>> 0 | $17 >>> 0 < $18 >>> 0;
19451   $18 = $5 + (($18 | 0) == ($35 | 0) & $45 >>> 0 < $44 >>> 0 | $18 >>> 0 < $35 >>> 0) | 0;
19452   if ($18 >>> 0 < $5 >>> 0) {
19453    $9 = 1
19454   }
19455   $5 = $18 + (($2 | 0) == ($17 | 0) & $28 >>> 0 < $36 >>> 0 | $2 >>> 0 < $17 >>> 0) | 0;
19456   $3 = $2;
19457   $2 = $3 + $12 | 0;
19458   $11 = $5 + $11 | 0;
19459   $11 = $2 >>> 0 < $3 >>> 0 ? $11 + 1 | 0 : $11;
19460   $18 = $2;
19461   $3 = $2;
19462   $2 = $11;
19463   $1 = ($1 | 0) == ($2 | 0) & $3 >>> 0 < $12 >>> 0 | $2 >>> 0 < $1 >>> 0;
19464   $3 = $1 + $15 | 0;
19465   if ($3 >>> 0 < $1 >>> 0) {
19466    $10 = $10 + 1 | 0
19467   }
19468   $1 = $2;
19469   $9 = $10;
19470   $10 = $3;
19471   $5 = 0;
19472   $3 = ($4 | 0) == ($25 | 0) & $27 >>> 0 < $26 >>> 0 | $25 >>> 0 < $4 >>> 0;
19473   $4 = $3 + (($4 | 0) == ($21 | 0) & $26 >>> 0 < $34 >>> 0 | $4 >>> 0 < $21 >>> 0) | 0;
19474   if ($4 >>> 0 < $3 >>> 0) {
19475    $5 = 1
19476   }
19477   $3 = $4 + $18 | 0;
19478   $11 = $1 + $5 | 0;
19479   $11 = $3 >>> 0 < $4 >>> 0 ? $11 + 1 | 0 : $11;
19480   $1 = $3;
19481   $4 = $11;
19482   $1 = ($2 | 0) == ($4 | 0) & $1 >>> 0 < $18 >>> 0 | $4 >>> 0 < $2 >>> 0;
19483   $2 = $10 + $1 | 0;
19484   if ($2 >>> 0 < $1 >>> 0) {
19485    $9 = $9 + 1 | 0
19486   }
19487   $1 = $2;
19488   $2 = $9;
19489   label$13 : {
19490    if ($2 & 65536) {
19491     $16 = $16 + 1 | 0;
19492     break label$13;
19493    }
19494    $12 = $6 >>> 31 | 0;
19495    $9 = $2 << 1 | $1 >>> 31;
19496    $1 = $1 << 1 | $4 >>> 31;
19497    $2 = $9;
19498    $9 = $4 << 1 | $3 >>> 31;
19499    $3 = $3 << 1 | $8 >>> 31;
19500    $4 = $9;
19501    $10 = $19;
19502    $9 = $6 << 1 | $10 >>> 31;
19503    $19 = $10 << 1;
19504    $6 = $9;
19505    $10 = $8 << 1 | $7 >>> 31;
19506    $7 = $7 << 1 | $12;
19507    $8 = $10;
19508   }
19509   if (($16 | 0) >= 32767) {
19510    $14 = $14 | 2147418112;
19511    $1 = 0;
19512    $2 = 0;
19513    break label$1;
19514   }
19515   label$16 : {
19516    if (($16 | 0) <= 0) {
19517     $5 = 1 - $16 | 0;
19518     if ($5 >>> 0 <= 127) {
19519      $10 = $16 + 127 | 0;
19520      __ashlti3($13 + 48 | 0, $19, $6, $7, $8, $10);
19521      __ashlti3($13 + 32 | 0, $3, $4, $1, $2, $10);
19522      __lshrti3($13 + 16 | 0, $19, $6, $7, $8, $5);
19523      __lshrti3($13, $3, $4, $1, $2, $5);
19524      $19 = (HEAP32[$13 + 48 >> 2] | HEAP32[$13 + 56 >> 2]) != 0 | (HEAP32[$13 + 52 >> 2] | HEAP32[$13 + 60 >> 2]) != 0 | (HEAP32[$13 + 32 >> 2] | HEAP32[$13 + 16 >> 2]);
19525      $6 = HEAP32[$13 + 36 >> 2] | HEAP32[$13 + 20 >> 2];
19526      $7 = HEAP32[$13 + 40 >> 2] | HEAP32[$13 + 24 >> 2];
19527      $8 = HEAP32[$13 + 44 >> 2] | HEAP32[$13 + 28 >> 2];
19528      $3 = HEAP32[$13 >> 2];
19529      $4 = HEAP32[$13 + 4 >> 2];
19530      $2 = HEAP32[$13 + 12 >> 2];
19531      $1 = HEAP32[$13 + 8 >> 2];
19532      break label$16;
19533     }
19534     $1 = 0;
19535     $2 = 0;
19536     break label$1;
19537    }
19538    $2 = $2 & 65535 | $16 << 16;
19539   }
19540   $22 = $1 | $22;
19541   $14 = $2 | $14;
19542   if (!(!$7 & ($8 | 0) == -2147483648 ? !($6 | $19) : ($8 | 0) > -1 ? 1 : 0)) {
19543    $11 = $14;
19544    $12 = $4;
19545    $1 = $3 + 1 | 0;
19546    if ($1 >>> 0 < 1) {
19547     $12 = $12 + 1 | 0
19548    }
19549    $2 = $12;
19550    $3 = ($4 | 0) == ($2 | 0) & $1 >>> 0 < $3 >>> 0 | $2 >>> 0 < $4 >>> 0;
19551    $4 = $3 + $22 | 0;
19552    if ($4 >>> 0 < $3 >>> 0) {
19553     $11 = $11 + 1 | 0
19554    }
19555    $22 = $4;
19556    $14 = $11;
19557    break label$1;
19558   }
19559   if ($7 | $19 | ($8 ^ -2147483648 | $6)) {
19560    $1 = $3;
19561    $2 = $4;
19562    break label$1;
19563   }
19564   $12 = $14;
19565   $9 = $4;
19566   $1 = $3 & 1;
19567   $2 = $1 + $3 | 0;
19568   if ($2 >>> 0 < $1 >>> 0) {
19569    $9 = $9 + 1 | 0
19570   }
19571   $1 = $2;
19572   $2 = $9;
19573   $3 = ($4 | 0) == ($2 | 0) & $1 >>> 0 < $3 >>> 0 | $2 >>> 0 < $4 >>> 0;
19574   $4 = $3 + $22 | 0;
19575   if ($4 >>> 0 < $3 >>> 0) {
19576    $12 = $12 + 1 | 0
19577   }
19578   $22 = $4;
19579   $14 = $12;
19580  }
19581  HEAP32[$0 >> 2] = $1;
19582  HEAP32[$0 + 4 >> 2] = $2;
19583  HEAP32[$0 + 8 >> 2] = $22;
19584  HEAP32[$0 + 12 >> 2] = $14;
19585  global$0 = $13 + 96 | 0;
19586 }
19587
19588 function __addtf3($0, $1, $2, $3, $4, $5, $6, $7, $8) {
19589  var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0;
19590  $11 = global$0 - 112 | 0;
19591  global$0 = $11;
19592  $12 = $7;
19593  $14 = $8 & 2147483647;
19594  $10 = $2 + -1 | 0;
19595  $9 = $1 + -1 | 0;
19596  if (($9 | 0) != -1) {
19597   $10 = $10 + 1 | 0
19598  }
19599  $13 = $9;
19600  $17 = ($9 | 0) == -1 & ($10 | 0) == -1;
19601  $15 = $4 & 2147483647;
19602  $9 = $15;
19603  $16 = $3;
19604  $10 = ($2 | 0) == ($10 | 0) & $13 >>> 0 < $1 >>> 0 | $10 >>> 0 < $2 >>> 0;
19605  $13 = $3 + $10 | 0;
19606  if ($13 >>> 0 < $10 >>> 0) {
19607   $9 = $9 + 1 | 0
19608  }
19609  $13 = $13 + -1 | 0;
19610  $10 = $9 + -1 | 0;
19611  $9 = $13;
19612  label$1 : {
19613   label$2 : {
19614    $10 = ($9 | 0) != -1 ? $10 + 1 | 0 : $10;
19615    if (!(($9 | 0) == -1 & ($10 | 0) == 2147418111 ? $17 : $10 >>> 0 > 2147418111)) {
19616     $10 = $6 + -1 | 0;
19617     $9 = $5 + -1 | 0;
19618     if (($9 | 0) != -1) {
19619      $10 = $10 + 1 | 0
19620     }
19621     $13 = $9;
19622     $17 = ($9 | 0) != -1 | ($10 | 0) != -1;
19623     $9 = $14;
19624     $10 = ($6 | 0) == ($10 | 0) & $13 >>> 0 < $5 >>> 0 | $10 >>> 0 < $6 >>> 0;
19625     $13 = $10 + $12 | 0;
19626     if ($13 >>> 0 < $10 >>> 0) {
19627      $9 = $9 + 1 | 0
19628     }
19629     $10 = $13 + -1 | 0;
19630     $9 = $9 + -1 | 0;
19631     $9 = ($10 | 0) != -1 ? $9 + 1 | 0 : $9;
19632     if (($10 | 0) == -1 & ($9 | 0) == 2147418111 ? $17 : ($9 | 0) == 2147418111 & ($10 | 0) != -1 | $9 >>> 0 < 2147418111) {
19633      break label$2
19634     }
19635    }
19636    if (!(!$16 & ($15 | 0) == 2147418112 ? !($1 | $2) : ($15 | 0) == 2147418112 & $16 >>> 0 < 0 | $15 >>> 0 < 2147418112)) {
19637     $7 = $3;
19638     $8 = $4 | 32768;
19639     $5 = $1;
19640     $6 = $2;
19641     break label$1;
19642    }
19643    if (!(!$12 & ($14 | 0) == 2147418112 ? !($5 | $6) : ($14 | 0) == 2147418112 & $12 >>> 0 < 0 | $14 >>> 0 < 2147418112)) {
19644     $8 = $8 | 32768;
19645     break label$1;
19646    }
19647    if (!($1 | $16 | ($15 ^ 2147418112 | $2))) {
19648     $9 = $3;
19649     $3 = !($1 ^ $5 | $3 ^ $7 | ($2 ^ $6 | $4 ^ $8 ^ -2147483648));
19650     $7 = $3 ? 0 : $9;
19651     $8 = $3 ? 2147450880 : $4;
19652     $5 = $3 ? 0 : $1;
19653     $6 = $3 ? 0 : $2;
19654     break label$1;
19655    }
19656    if (!($5 | $12 | ($14 ^ 2147418112 | $6))) {
19657     break label$1
19658    }
19659    if (!($1 | $16 | ($2 | $15))) {
19660     if ($5 | $12 | ($6 | $14)) {
19661      break label$1
19662     }
19663     $5 = $1 & $5;
19664     $6 = $2 & $6;
19665     $7 = $3 & $7;
19666     $8 = $4 & $8;
19667     break label$1;
19668    }
19669    if ($5 | $12 | ($6 | $14)) {
19670     break label$2
19671    }
19672    $5 = $1;
19673    $6 = $2;
19674    $7 = $3;
19675    $8 = $4;
19676    break label$1;
19677   }
19678   $10 = ($12 | 0) == ($16 | 0) & ($14 | 0) == ($15 | 0) ? ($2 | 0) == ($6 | 0) & $5 >>> 0 > $1 >>> 0 | $6 >>> 0 > $2 >>> 0 : ($14 | 0) == ($15 | 0) & $12 >>> 0 > $16 >>> 0 | $14 >>> 0 > $15 >>> 0;
19679   $9 = $10;
19680   $15 = $9 ? $5 : $1;
19681   $14 = $9 ? $6 : $2;
19682   $12 = $9 ? $8 : $4;
19683   $16 = $12;
19684   $13 = $9 ? $7 : $3;
19685   $9 = $12 & 65535;
19686   $4 = $10 ? $4 : $8;
19687   $18 = $4;
19688   $3 = $10 ? $3 : $7;
19689   $17 = $4 >>> 16 & 32767;
19690   $12 = $12 >>> 16 & 32767;
19691   if (!$12) {
19692    $4 = !($9 | $13);
19693    $7 = $4 << 6;
19694    $8 = Math_clz32($4 ? $15 : $13) + 32 | 0;
19695    $4 = Math_clz32($4 ? $14 : $9);
19696    $4 = $7 + (($4 | 0) == 32 ? $8 : $4) | 0;
19697    __ashlti3($11 + 96 | 0, $15, $14, $13, $9, $4 + -15 | 0);
19698    $13 = HEAP32[$11 + 104 >> 2];
19699    $15 = HEAP32[$11 + 96 >> 2];
19700    $14 = HEAP32[$11 + 100 >> 2];
19701    $12 = 16 - $4 | 0;
19702    $9 = HEAP32[$11 + 108 >> 2];
19703   }
19704   $5 = $10 ? $1 : $5;
19705   $6 = $10 ? $2 : $6;
19706   $1 = $3;
19707   $2 = $18 & 65535;
19708   if ($17) {
19709    $1 = $2
19710   } else {
19711    $7 = $1;
19712    $3 = !($1 | $2);
19713    $4 = $3 << 6;
19714    $8 = Math_clz32($3 ? $5 : $1) + 32 | 0;
19715    $1 = Math_clz32($3 ? $6 : $2);
19716    $1 = $4 + (($1 | 0) == 32 ? $8 : $1) | 0;
19717    __ashlti3($11 + 80 | 0, $5, $6, $7, $2, $1 + -15 | 0);
19718    $17 = 16 - $1 | 0;
19719    $5 = HEAP32[$11 + 80 >> 2];
19720    $6 = HEAP32[$11 + 84 >> 2];
19721    $3 = HEAP32[$11 + 88 >> 2];
19722    $1 = HEAP32[$11 + 92 >> 2];
19723   }
19724   $2 = $3;
19725   $10 = $1 << 3 | $2 >>> 29;
19726   $7 = $2 << 3 | $6 >>> 29;
19727   $8 = $10 | 524288;
19728   $1 = $13;
19729   $3 = $9 << 3 | $1 >>> 29;
19730   $4 = $1 << 3 | $14 >>> 29;
19731   $13 = $3;
19732   $10 = $16 ^ $18;
19733   $1 = $5;
19734   $9 = $6 << 3 | $1 >>> 29;
19735   $1 = $1 << 3;
19736   $2 = $9;
19737   $5 = $12 - $17 | 0;
19738   $3 = $1;
19739   label$11 : {
19740    if (!$5) {
19741     break label$11
19742    }
19743    if ($5 >>> 0 > 127) {
19744     $7 = 0;
19745     $8 = 0;
19746     $9 = 0;
19747     $3 = 1;
19748     break label$11;
19749    }
19750    __ashlti3($11 - -64 | 0, $1, $2, $7, $8, 128 - $5 | 0);
19751    __lshrti3($11 + 48 | 0, $1, $2, $7, $8, $5);
19752    $7 = HEAP32[$11 + 56 >> 2];
19753    $8 = HEAP32[$11 + 60 >> 2];
19754    $9 = HEAP32[$11 + 52 >> 2];
19755    $3 = HEAP32[$11 + 48 >> 2] | ((HEAP32[$11 + 64 >> 2] | HEAP32[$11 + 72 >> 2]) != 0 | (HEAP32[$11 + 68 >> 2] | HEAP32[$11 + 76 >> 2]) != 0);
19756   }
19757   $6 = $9;
19758   $13 = $13 | 524288;
19759   $1 = $15;
19760   $9 = $14 << 3 | $1 >>> 29;
19761   $2 = $1 << 3;
19762   label$13 : {
19763    if (($10 | 0) < -1 ? 1 : ($10 | 0) <= -1 ? 1 : 0) {
19764     $14 = $3;
19765     $1 = $2 - $3 | 0;
19766     $15 = $4 - $7 | 0;
19767     $3 = ($6 | 0) == ($9 | 0) & $2 >>> 0 < $3 >>> 0 | $9 >>> 0 < $6 >>> 0;
19768     $5 = $15 - $3 | 0;
19769     $2 = $9 - (($2 >>> 0 < $14 >>> 0) + $6 | 0) | 0;
19770     $6 = ($13 - (($4 >>> 0 < $7 >>> 0) + $8 | 0) | 0) - ($15 >>> 0 < $3 >>> 0) | 0;
19771     if (!($1 | $5 | ($2 | $6))) {
19772      $5 = 0;
19773      $6 = 0;
19774      $7 = 0;
19775      $8 = 0;
19776      break label$1;
19777     }
19778     if ($6 >>> 0 > 524287) {
19779      break label$13
19780     }
19781     $7 = $1;
19782     $3 = !($5 | $6);
19783     $4 = $3 << 6;
19784     $8 = Math_clz32($3 ? $1 : $5) + 32 | 0;
19785     $1 = Math_clz32($3 ? $2 : $6);
19786     $1 = $4 + (($1 | 0) == 32 ? $8 : $1) | 0;
19787     $1 = $1 + -12 | 0;
19788     __ashlti3($11 + 32 | 0, $7, $2, $5, $6, $1);
19789     $12 = $12 - $1 | 0;
19790     $5 = HEAP32[$11 + 40 >> 2];
19791     $6 = HEAP32[$11 + 44 >> 2];
19792     $1 = HEAP32[$11 + 32 >> 2];
19793     $2 = HEAP32[$11 + 36 >> 2];
19794     break label$13;
19795    }
19796    $10 = $6 + $9 | 0;
19797    $1 = $3;
19798    $2 = $1 + $2 | 0;
19799    if ($2 >>> 0 < $1 >>> 0) {
19800     $10 = $10 + 1 | 0
19801    }
19802    $1 = $2;
19803    $2 = $10;
19804    $6 = ($6 | 0) == ($2 | 0) & $1 >>> 0 < $3 >>> 0 | $2 >>> 0 < $6 >>> 0;
19805    $10 = $8 + $13 | 0;
19806    $3 = $4 + $7 | 0;
19807    if ($3 >>> 0 < $4 >>> 0) {
19808     $10 = $10 + 1 | 0
19809    }
19810    $5 = $3;
19811    $4 = $6 + $3 | 0;
19812    $3 = $10;
19813    $3 = $4 >>> 0 < $5 >>> 0 ? $3 + 1 | 0 : $3;
19814    $5 = $4;
19815    $6 = $3;
19816    if (!($3 & 1048576)) {
19817     break label$13
19818    }
19819    $1 = $1 & 1 | (($2 & 1) << 31 | $1 >>> 1);
19820    $2 = $5 << 31 | $2 >>> 1;
19821    $12 = $12 + 1 | 0;
19822    $5 = ($6 & 1) << 31 | $5 >>> 1;
19823    $6 = $6 >>> 1 | 0;
19824   }
19825   $7 = 0;
19826   $9 = $16 & -2147483648;
19827   if (($12 | 0) >= 32767) {
19828    $8 = $9 | 2147418112;
19829    $5 = 0;
19830    $6 = 0;
19831    break label$1;
19832   }
19833   $4 = 0;
19834   label$17 : {
19835    if (($12 | 0) > 0) {
19836     $4 = $12;
19837     break label$17;
19838    }
19839    __ashlti3($11 + 16 | 0, $1, $2, $5, $6, $12 + 127 | 0);
19840    __lshrti3($11, $1, $2, $5, $6, 1 - $12 | 0);
19841    $1 = HEAP32[$11 >> 2] | ((HEAP32[$11 + 16 >> 2] | HEAP32[$11 + 24 >> 2]) != 0 | (HEAP32[$11 + 20 >> 2] | HEAP32[$11 + 28 >> 2]) != 0);
19842    $2 = HEAP32[$11 + 4 >> 2];
19843    $5 = HEAP32[$11 + 8 >> 2];
19844    $6 = HEAP32[$11 + 12 >> 2];
19845   }
19846   $7 = $7 | (($6 & 7) << 29 | $5 >>> 3);
19847   $4 = $9 | $6 >>> 3 & 65535 | $4 << 16;
19848   $9 = $5 << 29;
19849   $3 = 0;
19850   $5 = $9;
19851   $6 = ($2 & 7) << 29 | $1 >>> 3 | $3;
19852   $9 = $4;
19853   $3 = $2 >>> 3 | $5;
19854   $10 = $3;
19855   $4 = $1 & 7;
19856   $1 = $4 >>> 0 > 4;
19857   $2 = $1 + $6 | 0;
19858   if ($2 >>> 0 < $1 >>> 0) {
19859    $10 = $10 + 1 | 0
19860   }
19861   $1 = $2;
19862   $2 = $10;
19863   $3 = ($3 | 0) == ($2 | 0) & $1 >>> 0 < $6 >>> 0 | $2 >>> 0 < $3 >>> 0;
19864   $5 = $3 + $7 | 0;
19865   if ($5 >>> 0 < $3 >>> 0) {
19866    $9 = $9 + 1 | 0
19867   }
19868   $4 = ($4 | 0) == 4;
19869   $3 = $4 ? $1 & 1 : 0;
19870   $8 = $9;
19871   $7 = $5;
19872   $4 = 0;
19873   $9 = $2 + $4 | 0;
19874   $2 = $1 + $3 | 0;
19875   if ($2 >>> 0 < $1 >>> 0) {
19876    $9 = $9 + 1 | 0
19877   }
19878   $5 = $2;
19879   $1 = $2;
19880   $6 = $9;
19881   $1 = ($4 | 0) == ($9 | 0) & $1 >>> 0 < $3 >>> 0 | $9 >>> 0 < $4 >>> 0;
19882   $2 = $7 + $1 | 0;
19883   if ($2 >>> 0 < $1 >>> 0) {
19884    $8 = $8 + 1 | 0
19885   }
19886   $7 = $2;
19887  }
19888  HEAP32[$0 >> 2] = $5;
19889  HEAP32[$0 + 4 >> 2] = $6;
19890  HEAP32[$0 + 8 >> 2] = $7;
19891  HEAP32[$0 + 12 >> 2] = $8;
19892  global$0 = $11 + 112 | 0;
19893 }
19894
19895 function __extenddftf2($0, $1) {
19896  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
19897  $5 = global$0 - 16 | 0;
19898  global$0 = $5;
19899  wasm2js_scratch_store_f64(+$1);
19900  $8 = wasm2js_scratch_load_i32(1) | 0;
19901  $6 = wasm2js_scratch_load_i32(0) | 0;
19902  $7 = $8 & 2147483647;
19903  $2 = $7;
19904  $4 = $2 + -1048576 | 0;
19905  $3 = $6;
19906  if ($3 >>> 0 < 0) {
19907   $4 = $4 + 1 | 0
19908  }
19909  label$1 : {
19910   if (($4 | 0) == 2145386495 | $4 >>> 0 < 2145386495) {
19911    $7 = $3 << 28;
19912    $4 = ($2 & 15) << 28 | $3 >>> 4;
19913    $2 = ($2 >>> 4 | 0) + 1006632960 | 0;
19914    $3 = $4;
19915    $2 = $3 >>> 0 < 0 ? $2 + 1 | 0 : $2;
19916    break label$1;
19917   }
19918   if (($2 | 0) == 2146435072 & $3 >>> 0 >= 0 | $2 >>> 0 > 2146435072) {
19919    $7 = $6 << 28;
19920    $4 = $6;
19921    $2 = $8;
19922    $6 = $2 >>> 4 | 0;
19923    $3 = ($2 & 15) << 28 | $4 >>> 4;
19924    $2 = $6 | 2147418112;
19925    break label$1;
19926   }
19927   if (!($2 | $3)) {
19928    $7 = 0;
19929    $3 = 0;
19930    $2 = 0;
19931    break label$1;
19932   }
19933   $4 = $2;
19934   $2 = ($2 | 0) == 1 & $3 >>> 0 < 0 | $2 >>> 0 < 1 ? Math_clz32($6) + 32 | 0 : Math_clz32($2);
19935   __ashlti3($5, $3, $4, 0, 0, $2 + 49 | 0);
19936   $9 = HEAP32[$5 >> 2];
19937   $7 = HEAP32[$5 + 4 >> 2];
19938   $3 = HEAP32[$5 + 8 >> 2];
19939   $2 = HEAP32[$5 + 12 >> 2] ^ 65536 | 15372 - $2 << 16;
19940  }
19941  HEAP32[$0 >> 2] = $9;
19942  HEAP32[$0 + 4 >> 2] = $7;
19943  HEAP32[$0 + 8 >> 2] = $3;
19944  HEAP32[$0 + 12 >> 2] = $8 & -2147483648 | $2;
19945  global$0 = $5 + 16 | 0;
19946 }
19947
19948 function __letf2($0, $1, $2, $3, $4, $5, $6, $7) {
19949  var $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0;
19950  $9 = 1;
19951  $8 = $3 & 2147483647;
19952  $12 = $8;
19953  $10 = $2;
19954  label$1 : {
19955   if (!$2 & ($8 | 0) == 2147418112 ? $0 | $1 : ($8 | 0) == 2147418112 & $2 >>> 0 > 0 | $8 >>> 0 > 2147418112) {
19956    break label$1
19957   }
19958   $11 = $7 & 2147483647;
19959   $13 = $11;
19960   $8 = $6;
19961   if (!$6 & ($11 | 0) == 2147418112 ? $4 | $5 : ($11 | 0) == 2147418112 & $6 >>> 0 > 0 | $11 >>> 0 > 2147418112) {
19962    break label$1
19963   }
19964   if (!($0 | $4 | ($8 | $10) | ($1 | $5 | ($12 | $13)))) {
19965    return 0
19966   }
19967   $10 = $3 & $7;
19968   if (($10 | 0) > 0 ? 1 : ($10 | 0) >= 0 ? (($2 & $6) >>> 0 < 0 ? 0 : 1) : 0) {
19969    $9 = -1;
19970    if (($2 | 0) == ($6 | 0) & ($3 | 0) == ($7 | 0) ? ($1 | 0) == ($5 | 0) & $0 >>> 0 < $4 >>> 0 | $1 >>> 0 < $5 >>> 0 : ($3 | 0) < ($7 | 0) ? 1 : ($3 | 0) <= ($7 | 0) ? ($2 >>> 0 >= $6 >>> 0 ? 0 : 1) : 0) {
19971     break label$1
19972    }
19973    return ($0 ^ $4 | $2 ^ $6) != 0 | ($1 ^ $5 | $3 ^ $7) != 0;
19974   }
19975   $9 = -1;
19976   if (($2 | 0) == ($6 | 0) & ($3 | 0) == ($7 | 0) ? ($1 | 0) == ($5 | 0) & $0 >>> 0 > $4 >>> 0 | $1 >>> 0 > $5 >>> 0 : ($3 | 0) > ($7 | 0) ? 1 : ($3 | 0) >= ($7 | 0) ? ($2 >>> 0 <= $6 >>> 0 ? 0 : 1) : 0) {
19977    break label$1
19978   }
19979   $9 = ($0 ^ $4 | $2 ^ $6) != 0 | ($1 ^ $5 | $3 ^ $7) != 0;
19980  }
19981  return $9;
19982 }
19983
19984 function __getf2($0, $1, $2, $3, $4) {
19985  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
19986  $7 = -1;
19987  $5 = $3 & 2147483647;
19988  $8 = $5;
19989  $6 = $2;
19990  label$1 : {
19991   if (!$2 & ($5 | 0) == 2147418112 ? $0 | $1 : ($5 | 0) == 2147418112 & $2 >>> 0 > 0 | $5 >>> 0 > 2147418112) {
19992    break label$1
19993   }
19994   $5 = $4 & 2147483647;
19995   $9 = $5;
19996   if (($5 | 0) == 2147418112 ? 0 : $5 >>> 0 > 2147418112) {
19997    break label$1
19998   }
19999   if (!($0 | $6 | ($1 | ($8 | $9)))) {
20000    return 0
20001   }
20002   $6 = $3 & $4;
20003   if (($6 | 0) > 0 ? 1 : ($6 | 0) >= 0 ? 1 : 0) {
20004    if (!$2 & ($3 | 0) == ($4 | 0) ? !$1 & $0 >>> 0 < 0 | $1 >>> 0 < 0 : ($3 | 0) < ($4 | 0) ? 1 : ($3 | 0) <= ($4 | 0) ? ($2 >>> 0 >= 0 ? 0 : 1) : 0) {
20005     break label$1
20006    }
20007    return ($0 | $2) != 0 | ($1 | $3 ^ $4) != 0;
20008   }
20009   if (!$2 & ($3 | 0) == ($4 | 0) ? !$1 & $0 >>> 0 > 0 | $1 >>> 0 > 0 : ($3 | 0) > ($4 | 0) ? 1 : ($3 | 0) >= ($4 | 0) ? ($2 >>> 0 <= 0 ? 0 : 1) : 0) {
20010    break label$1
20011   }
20012   $7 = ($0 | $2) != 0 | ($1 | $3 ^ $4) != 0;
20013  }
20014  return $7;
20015 }
20016
20017 function copysignl($0, $1, $2, $3, $4, $5, $6, $7, $8) {
20018  HEAP32[$0 >> 2] = $1;
20019  HEAP32[$0 + 4 >> 2] = $2;
20020  HEAP32[$0 + 8 >> 2] = $3;
20021  HEAP32[$0 + 12 >> 2] = $4 & 65535 | ($8 >>> 16 & 32768 | $4 >>> 16 & 32767) << 16;
20022 }
20023
20024 function __floatunsitf($0, $1) {
20025  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
20026  $2 = global$0 - 16 | 0;
20027  global$0 = $2;
20028  $6 = $0;
20029  $7 = $0;
20030  label$1 : {
20031   if (!$1) {
20032    $1 = 0;
20033    $3 = 0;
20034    break label$1;
20035   }
20036   $3 = $1;
20037   $1 = Math_clz32($1) ^ 31;
20038   __ashlti3($2, $3, 0, 0, 0, 112 - $1 | 0);
20039   $1 = (HEAP32[$2 + 12 >> 2] ^ 65536) + ($1 + 16383 << 16) | 0;
20040   $4 = 0 + HEAP32[$2 + 8 >> 2] | 0;
20041   if ($4 >>> 0 < $5 >>> 0) {
20042    $1 = $1 + 1 | 0
20043   }
20044   $5 = HEAP32[$2 + 4 >> 2];
20045   $3 = HEAP32[$2 >> 2];
20046  }
20047  HEAP32[$7 >> 2] = $3;
20048  HEAP32[$6 + 4 >> 2] = $5;
20049  HEAP32[$0 + 8 >> 2] = $4;
20050  HEAP32[$0 + 12 >> 2] = $1;
20051  global$0 = $2 + 16 | 0;
20052 }
20053
20054 function __subtf3($0, $1, $2, $3, $4, $5, $6, $7, $8) {
20055  var $9 = 0;
20056  $9 = global$0 - 16 | 0;
20057  global$0 = $9;
20058  __addtf3($9, $1, $2, $3, $4, $5, $6, $7, $8 ^ -2147483648);
20059  $1 = HEAP32[$9 + 4 >> 2];
20060  HEAP32[$0 >> 2] = HEAP32[$9 >> 2];
20061  HEAP32[$0 + 4 >> 2] = $1;
20062  $1 = HEAP32[$9 + 12 >> 2];
20063  HEAP32[$0 + 8 >> 2] = HEAP32[$9 + 8 >> 2];
20064  HEAP32[$0 + 12 >> 2] = $1;
20065  global$0 = $9 + 16 | 0;
20066 }
20067
20068 function scalbnl($0, $1, $2, $3, $4, $5) {
20069  var $6 = 0;
20070  $6 = global$0 - 80 | 0;
20071  global$0 = $6;
20072  label$1 : {
20073   if (($5 | 0) >= 16384) {
20074    __multf3($6 + 32 | 0, $1, $2, $3, $4, 0, 0, 0, 2147352576);
20075    $3 = HEAP32[$6 + 40 >> 2];
20076    $4 = HEAP32[$6 + 44 >> 2];
20077    $1 = HEAP32[$6 + 32 >> 2];
20078    $2 = HEAP32[$6 + 36 >> 2];
20079    if (($5 | 0) < 32767) {
20080     $5 = $5 + -16383 | 0;
20081     break label$1;
20082    }
20083    __multf3($6 + 16 | 0, $1, $2, $3, $4, 0, 0, 0, 2147352576);
20084    $5 = (($5 | 0) < 49149 ? $5 : 49149) + -32766 | 0;
20085    $3 = HEAP32[$6 + 24 >> 2];
20086    $4 = HEAP32[$6 + 28 >> 2];
20087    $1 = HEAP32[$6 + 16 >> 2];
20088    $2 = HEAP32[$6 + 20 >> 2];
20089    break label$1;
20090   }
20091   if (($5 | 0) > -16383) {
20092    break label$1
20093   }
20094   __multf3($6 - -64 | 0, $1, $2, $3, $4, 0, 0, 0, 65536);
20095   $3 = HEAP32[$6 + 72 >> 2];
20096   $4 = HEAP32[$6 + 76 >> 2];
20097   $1 = HEAP32[$6 + 64 >> 2];
20098   $2 = HEAP32[$6 + 68 >> 2];
20099   if (($5 | 0) > -32765) {
20100    $5 = $5 + 16382 | 0;
20101    break label$1;
20102   }
20103   __multf3($6 + 48 | 0, $1, $2, $3, $4, 0, 0, 0, 65536);
20104   $5 = (($5 | 0) > -49146 ? $5 : -49146) + 32764 | 0;
20105   $3 = HEAP32[$6 + 56 >> 2];
20106   $4 = HEAP32[$6 + 60 >> 2];
20107   $1 = HEAP32[$6 + 48 >> 2];
20108   $2 = HEAP32[$6 + 52 >> 2];
20109  }
20110  __multf3($6, $1, $2, $3, $4, 0, 0, 0, $5 + 16383 << 16);
20111  $1 = HEAP32[$6 + 12 >> 2];
20112  HEAP32[$0 + 8 >> 2] = HEAP32[$6 + 8 >> 2];
20113  HEAP32[$0 + 12 >> 2] = $1;
20114  $1 = HEAP32[$6 + 4 >> 2];
20115  HEAP32[$0 >> 2] = HEAP32[$6 >> 2];
20116  HEAP32[$0 + 4 >> 2] = $1;
20117  global$0 = $6 + 80 | 0;
20118 }
20119
20120 function __multi3($0, $1, $2, $3, $4) {
20121  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0;
20122  $5 = __wasm_i64_mul($1, $2, 0, 0);
20123  $6 = i64toi32_i32$HIGH_BITS;
20124  $7 = __wasm_i64_mul(0, 0, $3, $4);
20125  $5 = $5 + $7 | 0;
20126  $6 = i64toi32_i32$HIGH_BITS + $6 | 0;
20127  $9 = __wasm_i64_mul($4, 0, $2, 0);
20128  $8 = $5 + $9 | 0;
20129  $5 = i64toi32_i32$HIGH_BITS + ($5 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6) | 0;
20130  $6 = __wasm_i64_mul($3, 0, $1, 0);
20131  $10 = i64toi32_i32$HIGH_BITS;
20132  $7 = __wasm_i64_mul($2, 0, $3, 0);
20133  $3 = $10 + $7 | 0;
20134  $2 = $8 >>> 0 < $9 >>> 0 ? $5 + 1 | 0 : $5;
20135  $5 = i64toi32_i32$HIGH_BITS;
20136  $5 = $3 >>> 0 < $7 >>> 0 ? $5 + 1 | 0 : $5;
20137  $8 = $5 + $8 | 0;
20138  if ($8 >>> 0 < $5 >>> 0) {
20139   $2 = $2 + 1 | 0
20140  }
20141  $1 = __wasm_i64_mul($1, 0, $4, 0) + $3 | 0;
20142  $4 = i64toi32_i32$HIGH_BITS;
20143  $3 = $1 >>> 0 < $3 >>> 0 ? $4 + 1 | 0 : $4;
20144  $4 = $8 + $3 | 0;
20145  if ($4 >>> 0 < $3 >>> 0) {
20146   $2 = $2 + 1 | 0
20147  }
20148  HEAP32[$0 + 8 >> 2] = $4;
20149  HEAP32[$0 + 12 >> 2] = $2;
20150  HEAP32[$0 >> 2] = $6;
20151  HEAP32[$0 + 4 >> 2] = $1;
20152 }
20153
20154 function __divtf3($0, $1, $2, $3, $4, $5, $6, $7, $8) {
20155  var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0;
20156  $13 = global$0 - 192 | 0;
20157  global$0 = $13;
20158  $29 = $7;
20159  $32 = $8 & 65535;
20160  $16 = $3;
20161  $14 = $4 & 65535;
20162  $28 = ($4 ^ $8) & -2147483648;
20163  $17 = $8 >>> 16 & 32767;
20164  label$1 : {
20165   $19 = $4 >>> 16 & 32767;
20166   label$2 : {
20167    label$3 : {
20168     if ($19 + -1 >>> 0 <= 32765) {
20169      if ($17 + -1 >>> 0 < 32766) {
20170       break label$3
20171      }
20172     }
20173     $10 = $4 & 2147483647;
20174     $11 = $10;
20175     $9 = $3;
20176     if (!(!$9 & ($10 | 0) == 2147418112 ? !($1 | $2) : ($10 | 0) == 2147418112 & $9 >>> 0 < 0 | $10 >>> 0 < 2147418112)) {
20177      $33 = $3;
20178      $28 = $4 | 32768;
20179      break label$2;
20180     }
20181     $10 = $8 & 2147483647;
20182     $4 = $10;
20183     $3 = $7;
20184     if (!(!$3 & ($10 | 0) == 2147418112 ? !($5 | $6) : ($10 | 0) == 2147418112 & $3 >>> 0 < 0 | $10 >>> 0 < 2147418112)) {
20185      $33 = $7;
20186      $28 = $8 | 32768;
20187      $1 = $5;
20188      $2 = $6;
20189      break label$2;
20190     }
20191     if (!($1 | $9 | ($11 ^ 2147418112 | $2))) {
20192      if (!($3 | $5 | ($4 ^ 2147418112 | $6))) {
20193       $1 = 0;
20194       $2 = 0;
20195       $28 = 2147450880;
20196       break label$2;
20197      }
20198      $28 = $28 | 2147418112;
20199      $1 = 0;
20200      $2 = 0;
20201      break label$2;
20202     }
20203     if (!($3 | $5 | ($4 ^ 2147418112 | $6))) {
20204      $1 = 0;
20205      $2 = 0;
20206      break label$2;
20207     }
20208     if (!($1 | $9 | ($2 | $11))) {
20209      break label$1
20210     }
20211     if (!($3 | $5 | ($4 | $6))) {
20212      $28 = $28 | 2147418112;
20213      $1 = 0;
20214      $2 = 0;
20215      break label$2;
20216     }
20217     $10 = 0;
20218     if (($11 | 0) == 65535 | $11 >>> 0 < 65535) {
20219      $8 = $1;
20220      $3 = !($14 | $16);
20221      $7 = $3 << 6;
20222      $9 = Math_clz32($3 ? $1 : $16) + 32 | 0;
20223      $1 = Math_clz32($3 ? $2 : $14);
20224      $1 = $7 + (($1 | 0) == 32 ? $9 : $1) | 0;
20225      __ashlti3($13 + 176 | 0, $8, $2, $16, $14, $1 + -15 | 0);
20226      $10 = 16 - $1 | 0;
20227      $16 = HEAP32[$13 + 184 >> 2];
20228      $14 = HEAP32[$13 + 188 >> 2];
20229      $2 = HEAP32[$13 + 180 >> 2];
20230      $1 = HEAP32[$13 + 176 >> 2];
20231     }
20232     if ($4 >>> 0 > 65535) {
20233      break label$3
20234     }
20235     $3 = !($29 | $32);
20236     $4 = $3 << 6;
20237     $7 = Math_clz32($3 ? $5 : $29) + 32 | 0;
20238     $3 = Math_clz32($3 ? $6 : $32);
20239     $3 = $4 + (($3 | 0) == 32 ? $7 : $3) | 0;
20240     __ashlti3($13 + 160 | 0, $5, $6, $29, $32, $3 + -15 | 0);
20241     $10 = ($3 + $10 | 0) + -16 | 0;
20242     $29 = HEAP32[$13 + 168 >> 2];
20243     $32 = HEAP32[$13 + 172 >> 2];
20244     $5 = HEAP32[$13 + 160 >> 2];
20245     $6 = HEAP32[$13 + 164 >> 2];
20246    }
20247    $4 = $32 | 65536;
20248    $31 = $4;
20249    $38 = $29;
20250    $3 = $29;
20251    $12 = $4 << 15 | $3 >>> 17;
20252    $3 = $3 << 15 | $6 >>> 17;
20253    $7 = -102865788 - $3 | 0;
20254    $4 = $12;
20255    $9 = $4;
20256    $8 = 1963258675 - ($9 + (4192101508 < $3 >>> 0) | 0) | 0;
20257    __multi3($13 + 144 | 0, $3, $9, $7, $8);
20258    $9 = HEAP32[$13 + 152 >> 2];
20259    __multi3($13 + 128 | 0, 0 - $9 | 0, 0 - (HEAP32[$13 + 156 >> 2] + (0 < $9 >>> 0) | 0) | 0, $7, $8);
20260    $7 = HEAP32[$13 + 136 >> 2];
20261    $8 = $7 << 1 | HEAP32[$13 + 132 >> 2] >>> 31;
20262    $7 = HEAP32[$13 + 140 >> 2] << 1 | $7 >>> 31;
20263    __multi3($13 + 112 | 0, $8, $7, $3, $4);
20264    $9 = $7;
20265    $7 = HEAP32[$13 + 120 >> 2];
20266    __multi3($13 + 96 | 0, $8, $9, 0 - $7 | 0, 0 - (HEAP32[$13 + 124 >> 2] + (0 < $7 >>> 0) | 0) | 0);
20267    $7 = HEAP32[$13 + 104 >> 2];
20268    $11 = HEAP32[$13 + 108 >> 2] << 1 | $7 >>> 31;
20269    $8 = $7 << 1 | HEAP32[$13 + 100 >> 2] >>> 31;
20270    __multi3($13 + 80 | 0, $8, $11, $3, $4);
20271    $7 = HEAP32[$13 + 88 >> 2];
20272    __multi3($13 - -64 | 0, $8, $11, 0 - $7 | 0, 0 - (HEAP32[$13 + 92 >> 2] + (0 < $7 >>> 0) | 0) | 0);
20273    $7 = HEAP32[$13 + 72 >> 2];
20274    $8 = $7 << 1 | HEAP32[$13 + 68 >> 2] >>> 31;
20275    $7 = HEAP32[$13 + 76 >> 2] << 1 | $7 >>> 31;
20276    __multi3($13 + 48 | 0, $8, $7, $3, $4);
20277    $9 = $7;
20278    $7 = HEAP32[$13 + 56 >> 2];
20279    __multi3($13 + 32 | 0, $8, $9, 0 - $7 | 0, 0 - (HEAP32[$13 + 60 >> 2] + (0 < $7 >>> 0) | 0) | 0);
20280    $7 = HEAP32[$13 + 40 >> 2];
20281    $11 = HEAP32[$13 + 44 >> 2] << 1 | $7 >>> 31;
20282    $8 = $7 << 1 | HEAP32[$13 + 36 >> 2] >>> 31;
20283    __multi3($13 + 16 | 0, $8, $11, $3, $4);
20284    $7 = HEAP32[$13 + 24 >> 2];
20285    __multi3($13, $8, $11, 0 - $7 | 0, 0 - (HEAP32[$13 + 28 >> 2] + (0 < $7 >>> 0) | 0) | 0);
20286    $34 = ($19 - $17 | 0) + $10 | 0;
20287    $7 = HEAP32[$13 + 8 >> 2];
20288    $9 = HEAP32[$13 + 12 >> 2] << 1 | $7 >>> 31;
20289    $8 = $7 << 1;
20290    $10 = $9 + -1 | 0;
20291    $8 = (HEAP32[$13 + 4 >> 2] >>> 31 | $8) + -1 | 0;
20292    if (($8 | 0) != -1) {
20293     $10 = $10 + 1 | 0
20294    }
20295    $7 = $8;
20296    $9 = 0;
20297    $21 = $9;
20298    $20 = $4;
20299    $11 = 0;
20300    $12 = __wasm_i64_mul($7, $9, $4, $11);
20301    $4 = i64toi32_i32$HIGH_BITS;
20302    $19 = $4;
20303    $22 = $10;
20304    $17 = 0;
20305    $9 = $3;
20306    $7 = __wasm_i64_mul($10, $17, $9, 0);
20307    $3 = $7 + $12 | 0;
20308    $10 = i64toi32_i32$HIGH_BITS + $4 | 0;
20309    $10 = $3 >>> 0 < $7 >>> 0 ? $10 + 1 | 0 : $10;
20310    $7 = $3;
20311    $3 = $10;
20312    $15 = __wasm_i64_mul($8, $21, $9, $15);
20313    $4 = 0 + $15 | 0;
20314    $10 = $7;
20315    $9 = $10 + i64toi32_i32$HIGH_BITS | 0;
20316    $9 = $4 >>> 0 < $15 >>> 0 ? $9 + 1 | 0 : $9;
20317    $15 = $4;
20318    $4 = $9;
20319    $9 = ($10 | 0) == ($9 | 0) & $15 >>> 0 < $23 >>> 0 | $9 >>> 0 < $10 >>> 0;
20320    $10 = ($3 | 0) == ($19 | 0) & $10 >>> 0 < $12 >>> 0 | $3 >>> 0 < $19 >>> 0;
20321    $7 = $3;
20322    $3 = __wasm_i64_mul($22, $17, $20, $11) + $3 | 0;
20323    $11 = $10 + i64toi32_i32$HIGH_BITS | 0;
20324    $11 = $3 >>> 0 < $7 >>> 0 ? $11 + 1 | 0 : $11;
20325    $7 = $3;
20326    $3 = $9 + $3 | 0;
20327    $9 = $11;
20328    $26 = $3;
20329    $7 = $3 >>> 0 < $7 >>> 0 ? $9 + 1 | 0 : $9;
20330    $3 = $6;
20331    $24 = ($3 & 131071) << 15 | $5 >>> 17;
20332    $20 = __wasm_i64_mul($8, $21, $24, 0);
20333    $3 = i64toi32_i32$HIGH_BITS;
20334    $23 = $3;
20335    $10 = $5;
20336    $18 = $10 << 15 & -32768;
20337    $11 = __wasm_i64_mul($22, $17, $18, 0);
20338    $9 = $11 + $20 | 0;
20339    $10 = i64toi32_i32$HIGH_BITS + $3 | 0;
20340    $10 = $9 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10;
20341    $3 = $10;
20342    $25 = __wasm_i64_mul($8, $21, $18, $25);
20343    $18 = 0 + $25 | 0;
20344    $10 = $9 + i64toi32_i32$HIGH_BITS | 0;
20345    $10 = $18 >>> 0 < $25 >>> 0 ? $10 + 1 | 0 : $10;
20346    $10 = ($9 | 0) == ($10 | 0) & $18 >>> 0 < $30 >>> 0 | $10 >>> 0 < $9 >>> 0;
20347    $9 = ($3 | 0) == ($23 | 0) & $9 >>> 0 < $20 >>> 0 | $3 >>> 0 < $23 >>> 0;
20348    $12 = $3;
20349    $3 = __wasm_i64_mul($22, $17, $24, $27) + $3 | 0;
20350    $11 = $9 + i64toi32_i32$HIGH_BITS | 0;
20351    $11 = $3 >>> 0 < $12 >>> 0 ? $11 + 1 | 0 : $11;
20352    $9 = $3;
20353    $3 = $10 + $9 | 0;
20354    $12 = $3 >>> 0 < $9 >>> 0 ? $11 + 1 | 0 : $11;
20355    $10 = $3;
20356    $3 = $15 + $3 | 0;
20357    $9 = $12 + $4 | 0;
20358    $9 = $3 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9;
20359    $19 = $3;
20360    $10 = $7;
20361    $20 = $9;
20362    $3 = ($4 | 0) == ($9 | 0) & $3 >>> 0 < $15 >>> 0 | $9 >>> 0 < $4 >>> 0;
20363    $4 = $3 + $26 | 0;
20364    if ($4 >>> 0 < $3 >>> 0) {
20365     $10 = $10 + 1 | 0
20366    }
20367    $9 = $10;
20368    $3 = ($19 | 0) != 0 | ($20 | 0) != 0;
20369    $4 = $4 + $3 | 0;
20370    if ($4 >>> 0 < $3 >>> 0) {
20371     $9 = $9 + 1 | 0
20372    }
20373    $10 = $4;
20374    $4 = 0 - $10 | 0;
20375    $15 = 0;
20376    $7 = __wasm_i64_mul($4, $15, $8, $21);
20377    $3 = i64toi32_i32$HIGH_BITS;
20378    $23 = $3;
20379    $18 = __wasm_i64_mul($22, $17, $4, $15);
20380    $4 = i64toi32_i32$HIGH_BITS;
20381    $26 = $4;
20382    $24 = 0 - ((0 < $10 >>> 0) + $9 | 0) | 0;
20383    $9 = 0;
20384    $15 = __wasm_i64_mul($8, $21, $24, $9);
20385    $12 = $15 + $18 | 0;
20386    $10 = i64toi32_i32$HIGH_BITS + $4 | 0;
20387    $10 = $12 >>> 0 < $15 >>> 0 ? $10 + 1 | 0 : $10;
20388    $4 = $12;
20389    $15 = 0 + $7 | 0;
20390    $11 = $3 + $4 | 0;
20391    $11 = $15 >>> 0 < $27 >>> 0 ? $11 + 1 | 0 : $11;
20392    $12 = $15;
20393    $3 = $11;
20394    $11 = ($23 | 0) == ($3 | 0) & $12 >>> 0 < $7 >>> 0 | $3 >>> 0 < $23 >>> 0;
20395    $12 = ($10 | 0) == ($26 | 0) & $4 >>> 0 < $18 >>> 0 | $10 >>> 0 < $26 >>> 0;
20396    $4 = __wasm_i64_mul($22, $17, $24, $9) + $10 | 0;
20397    $9 = $12 + i64toi32_i32$HIGH_BITS | 0;
20398    $9 = $4 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9;
20399    $7 = $4;
20400    $4 = $11 + $4 | 0;
20401    if ($4 >>> 0 < $7 >>> 0) {
20402     $9 = $9 + 1 | 0
20403    }
20404    $24 = $4;
20405    $7 = $9;
20406    $4 = 0 - $19 | 0;
20407    $27 = 0 - ((0 < $19 >>> 0) + $20 | 0) | 0;
20408    $19 = 0;
20409    $26 = __wasm_i64_mul($27, $19, $8, $21);
20410    $18 = i64toi32_i32$HIGH_BITS;
20411    $20 = $4;
20412    $25 = 0;
20413    $9 = __wasm_i64_mul($4, $25, $22, $17);
20414    $4 = $9 + $26 | 0;
20415    $10 = i64toi32_i32$HIGH_BITS + $18 | 0;
20416    $11 = $4;
20417    $4 = $4 >>> 0 < $9 >>> 0 ? $10 + 1 | 0 : $10;
20418    $20 = __wasm_i64_mul($8, $21, $20, $25);
20419    $8 = 0 + $20 | 0;
20420    $9 = $11;
20421    $10 = $9 + i64toi32_i32$HIGH_BITS | 0;
20422    $10 = $8 >>> 0 < $20 >>> 0 ? $10 + 1 | 0 : $10;
20423    $10 = ($9 | 0) == ($10 | 0) & $8 >>> 0 < $30 >>> 0 | $10 >>> 0 < $9 >>> 0;
20424    $9 = ($4 | 0) == ($18 | 0) & $9 >>> 0 < $26 >>> 0 | $4 >>> 0 < $18 >>> 0;
20425    $8 = $4;
20426    $4 = __wasm_i64_mul($27, $19, $22, $17) + $4 | 0;
20427    $12 = $9 + i64toi32_i32$HIGH_BITS | 0;
20428    $12 = $4 >>> 0 < $8 >>> 0 ? $12 + 1 | 0 : $12;
20429    $8 = $4;
20430    $4 = $10 + $4 | 0;
20431    $9 = $12;
20432    $9 = $4 >>> 0 < $8 >>> 0 ? $9 + 1 | 0 : $9;
20433    $8 = $4;
20434    $4 = $15 + $4 | 0;
20435    $9 = $9 + $3 | 0;
20436    $9 = $4 >>> 0 < $8 >>> 0 ? $9 + 1 | 0 : $9;
20437    $8 = $4;
20438    $10 = $7;
20439    $4 = $9;
20440    $3 = ($3 | 0) == ($9 | 0) & $8 >>> 0 < $15 >>> 0 | $9 >>> 0 < $3 >>> 0;
20441    $7 = $3 + $24 | 0;
20442    if ($7 >>> 0 < $3 >>> 0) {
20443     $10 = $10 + 1 | 0
20444    }
20445    $3 = $7;
20446    $9 = $10;
20447    $12 = $3;
20448    $11 = $4 + -1 | 0;
20449    $3 = $8 + -2 | 0;
20450    if ($3 >>> 0 < 4294967294) {
20451     $11 = $11 + 1 | 0
20452    }
20453    $7 = $3;
20454    $10 = $3;
20455    $3 = $11;
20456    $4 = ($4 | 0) == ($3 | 0) & $10 >>> 0 < $8 >>> 0 | $3 >>> 0 < $4 >>> 0;
20457    $8 = $12 + $4 | 0;
20458    if ($8 >>> 0 < $4 >>> 0) {
20459     $9 = $9 + 1 | 0
20460    }
20461    $4 = $8 + -1 | 0;
20462    $10 = $9 + -1 | 0;
20463    $10 = ($4 | 0) != -1 ? $10 + 1 | 0 : $10;
20464    $8 = 0;
20465    $22 = $8;
20466    $17 = $4;
20467    $9 = $16;
20468    $18 = $9 << 2 | $2 >>> 30;
20469    $24 = 0;
20470    $12 = __wasm_i64_mul($4, $8, $18, $24);
20471    $8 = i64toi32_i32$HIGH_BITS;
20472    $15 = $8;
20473    $11 = $8;
20474    $8 = $2;
20475    $27 = ($8 & 1073741823) << 2 | $1 >>> 30;
20476    $25 = $10;
20477    $8 = 0;
20478    $9 = __wasm_i64_mul($27, 0, $10, $8);
20479    $4 = $9 + $12 | 0;
20480    $11 = i64toi32_i32$HIGH_BITS + $11 | 0;
20481    $11 = $4 >>> 0 < $9 >>> 0 ? $11 + 1 | 0 : $11;
20482    $9 = $4;
20483    $20 = $11;
20484    $23 = ($15 | 0) == ($11 | 0) & $9 >>> 0 < $12 >>> 0 | $11 >>> 0 < $15 >>> 0;
20485    $12 = $11;
20486    $11 = 0;
20487    $15 = $11;
20488    $10 = 0;
20489    $26 = $3;
20490    $30 = (($14 & 1073741823) << 2 | $16 >>> 30) & -262145 | 262144;
20491    $4 = __wasm_i64_mul($3, $11, $30, 0);
20492    $3 = $4 + $9 | 0;
20493    $12 = i64toi32_i32$HIGH_BITS + $12 | 0;
20494    $12 = $3 >>> 0 < $4 >>> 0 ? $12 + 1 | 0 : $12;
20495    $16 = $3;
20496    $4 = $12;
20497    $3 = ($20 | 0) == ($4 | 0) & $3 >>> 0 < $9 >>> 0 | $4 >>> 0 < $20 >>> 0;
20498    $9 = $3 + $23 | 0;
20499    if ($9 >>> 0 < $3 >>> 0) {
20500     $10 = 1
20501    }
20502    $11 = __wasm_i64_mul($25, $8, $30, $35);
20503    $3 = $11 + $9 | 0;
20504    $9 = i64toi32_i32$HIGH_BITS + $10 | 0;
20505    $10 = $3 >>> 0 < $11 >>> 0 ? $9 + 1 | 0 : $9;
20506    $11 = __wasm_i64_mul($17, $22, $30, $35);
20507    $9 = i64toi32_i32$HIGH_BITS;
20508    $2 = $3;
20509    $14 = __wasm_i64_mul($18, $24, $25, $8);
20510    $3 = $14 + $11 | 0;
20511    $12 = i64toi32_i32$HIGH_BITS + $9 | 0;
20512    $12 = $3 >>> 0 < $14 >>> 0 ? $12 + 1 | 0 : $12;
20513    $14 = $3;
20514    $3 = $12;
20515    $12 = ($9 | 0) == ($3 | 0) & $14 >>> 0 < $11 >>> 0 | $3 >>> 0 < $9 >>> 0;
20516    $11 = $2 + $3 | 0;
20517    $10 = $10 + $12 | 0;
20518    $9 = $11;
20519    $12 = $9 >>> 0 < $3 >>> 0 ? $10 + 1 | 0 : $10;
20520    $2 = $9;
20521    $11 = $4 + $14 | 0;
20522    $10 = 0;
20523    $3 = $10 + $16 | 0;
20524    if ($3 >>> 0 < $10 >>> 0) {
20525     $11 = $11 + 1 | 0
20526    }
20527    $14 = $3;
20528    $9 = $3;
20529    $3 = $11;
20530    $4 = ($4 | 0) == ($3 | 0) & $9 >>> 0 < $16 >>> 0 | $3 >>> 0 < $4 >>> 0;
20531    $9 = $2 + $4 | 0;
20532    if ($9 >>> 0 < $4 >>> 0) {
20533     $12 = $12 + 1 | 0
20534    }
20535    $39 = $9;
20536    $4 = $14;
20537    $10 = $3;
20538    $16 = __wasm_i64_mul($27, $19, $26, $15);
20539    $11 = i64toi32_i32$HIGH_BITS;
20540    $20 = $7;
20541    $23 = __wasm_i64_mul($7, 0, $18, $24);
20542    $7 = $23 + $16 | 0;
20543    $9 = i64toi32_i32$HIGH_BITS + $11 | 0;
20544    $9 = $7 >>> 0 < $23 >>> 0 ? $9 + 1 | 0 : $9;
20545    $21 = $7;
20546    $7 = $9;
20547    $16 = ($11 | 0) == ($9 | 0) & $21 >>> 0 < $16 >>> 0 | $9 >>> 0 < $11 >>> 0;
20548    $11 = $9;
20549    $40 = $4;
20550    $9 = 0;
20551    $41 = $16;
20552    $36 = $1 << 2 & -4;
20553    $2 = 0;
20554    $16 = __wasm_i64_mul($17, $22, $36, $2);
20555    $4 = $16 + $21 | 0;
20556    $11 = i64toi32_i32$HIGH_BITS + $11 | 0;
20557    $11 = $4 >>> 0 < $16 >>> 0 ? $11 + 1 | 0 : $11;
20558    $23 = $4;
20559    $16 = $4;
20560    $4 = $11;
20561    $7 = ($7 | 0) == ($4 | 0) & $16 >>> 0 < $21 >>> 0 | $4 >>> 0 < $7 >>> 0;
20562    $11 = $41 + $7 | 0;
20563    if ($11 >>> 0 < $7 >>> 0) {
20564     $9 = 1
20565    }
20566    $7 = $40 + $11 | 0;
20567    $10 = $9 + $10 | 0;
20568    $10 = $7 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10;
20569    $16 = $7;
20570    $11 = $12;
20571    $7 = $10;
20572    $3 = ($3 | 0) == ($10 | 0) & $16 >>> 0 < $14 >>> 0 | $10 >>> 0 < $3 >>> 0;
20573    $9 = $3 + $39 | 0;
20574    if ($9 >>> 0 < $3 >>> 0) {
20575     $11 = $11 + 1 | 0
20576    }
20577    $40 = $9;
20578    $14 = $16;
20579    $21 = $7;
20580    $39 = __wasm_i64_mul($25, $8, $36, $2);
20581    $25 = i64toi32_i32$HIGH_BITS;
20582    $8 = __wasm_i64_mul($30, $35, $20, $37);
20583    $3 = $8 + $39 | 0;
20584    $12 = i64toi32_i32$HIGH_BITS + $25 | 0;
20585    $12 = $3 >>> 0 < $8 >>> 0 ? $12 + 1 | 0 : $12;
20586    $30 = $3;
20587    $9 = __wasm_i64_mul($18, $24, $26, $15);
20588    $3 = $3 + $9 | 0;
20589    $8 = $12;
20590    $10 = $8 + i64toi32_i32$HIGH_BITS | 0;
20591    $10 = $3 >>> 0 < $9 >>> 0 ? $10 + 1 | 0 : $10;
20592    $18 = $3;
20593    $12 = __wasm_i64_mul($17, $22, $27, $19);
20594    $3 = $3 + $12 | 0;
20595    $9 = i64toi32_i32$HIGH_BITS + $10 | 0;
20596    $17 = $3;
20597    $9 = $3 >>> 0 < $12 >>> 0 ? $9 + 1 | 0 : $9;
20598    $22 = 0;
20599    $12 = $11;
20600    $3 = $9;
20601    $9 = ($9 | 0) == ($10 | 0) & $17 >>> 0 < $18 >>> 0 | $9 >>> 0 < $10 >>> 0;
20602    $11 = ($8 | 0) == ($25 | 0) & $30 >>> 0 < $39 >>> 0 | $8 >>> 0 < $25 >>> 0;
20603    $8 = ($8 | 0) == ($10 | 0) & $18 >>> 0 < $30 >>> 0 | $10 >>> 0 < $8 >>> 0;
20604    $10 = $11 + $8 | 0;
20605    $10 >>> 0 < $8 >>> 0;
20606    $8 = $9 + $10 | 0;
20607    $10 = $8;
20608    $9 = $3 | 0;
20609    $8 = $9 + $14 | 0;
20610    $10 = ($10 | $22) + $21 | 0;
20611    $10 = $8 >>> 0 < $9 >>> 0 ? $10 + 1 | 0 : $10;
20612    $21 = $8;
20613    $14 = $10;
20614    $7 = ($7 | 0) == ($10 | 0) & $8 >>> 0 < $16 >>> 0 | $10 >>> 0 < $7 >>> 0;
20615    $8 = $7 + $40 | 0;
20616    if ($8 >>> 0 < $7 >>> 0) {
20617     $12 = $12 + 1 | 0
20618    }
20619    $24 = $8;
20620    $8 = $12;
20621    $12 = $21;
20622    $16 = $14;
20623    $22 = $23;
20624    $26 = __wasm_i64_mul($26, $15, $36, $2);
20625    $15 = i64toi32_i32$HIGH_BITS;
20626    $9 = __wasm_i64_mul($27, $19, $20, $37);
20627    $7 = $9 + $26 | 0;
20628    $11 = i64toi32_i32$HIGH_BITS + $15 | 0;
20629    $11 = $7 >>> 0 < $9 >>> 0 ? $11 + 1 | 0 : $11;
20630    $10 = $11;
20631    $19 = $10;
20632    $11 = 0;
20633    $9 = ($10 | 0) == ($15 | 0) & $7 >>> 0 < $26 >>> 0 | $10 >>> 0 < $15 >>> 0;
20634    $7 = $10 + $22 | 0;
20635    $10 = ($9 | $11) + $4 | 0;
20636    $10 = $7 >>> 0 < $19 >>> 0 ? $10 + 1 | 0 : $10;
20637    $19 = $7;
20638    $9 = $7;
20639    $7 = $10;
20640    $9 = ($4 | 0) == ($10 | 0) & $9 >>> 0 < $22 >>> 0 | $10 >>> 0 < $4 >>> 0;
20641    $23 = $12;
20642    $4 = $9;
20643    $9 = $10 + $17 | 0;
20644    $12 = 0;
20645    $3 = $12 + $19 | 0;
20646    if ($3 >>> 0 < $12 >>> 0) {
20647     $9 = $9 + 1 | 0
20648    }
20649    $3 = ($7 | 0) == ($9 | 0) & $3 >>> 0 < $19 >>> 0 | $9 >>> 0 < $7 >>> 0;
20650    $4 = $4 + $3 | 0;
20651    if ($4 >>> 0 < $3 >>> 0) {
20652     $11 = 1
20653    }
20654    $3 = $23 + $4 | 0;
20655    $12 = $11 + $16 | 0;
20656    $7 = $3;
20657    $9 = $8;
20658    $12 = $3 >>> 0 < $4 >>> 0 ? $12 + 1 | 0 : $12;
20659    $8 = $12;
20660    $3 = ($14 | 0) == ($8 | 0) & $3 >>> 0 < $21 >>> 0 | $8 >>> 0 < $14 >>> 0;
20661    $4 = $3 + $24 | 0;
20662    if ($4 >>> 0 < $3 >>> 0) {
20663     $9 = $9 + 1 | 0
20664    }
20665    $3 = $4;
20666    $4 = $9;
20667    label$12 : {
20668     if (($9 | 0) == 131071 | $9 >>> 0 < 131071) {
20669      $22 = 0;
20670      $14 = $5;
20671      $18 = 0;
20672      $10 = __wasm_i64_mul($7, $22, $14, $18);
20673      $11 = i64toi32_i32$HIGH_BITS;
20674      $9 = $1 << 17;
20675      $1 = 0;
20676      $2 = ($10 | 0) != 0 | ($11 | 0) != 0;
20677      $16 = $1 - $2 | 0;
20678      $30 = $9 - ($1 >>> 0 < $2 >>> 0) | 0;
20679      $19 = 0 - $10 | 0;
20680      $15 = 0 - ((0 < $10 >>> 0) + $11 | 0) | 0;
20681      $2 = 0;
20682      $24 = __wasm_i64_mul($8, $2, $14, $18);
20683      $1 = i64toi32_i32$HIGH_BITS;
20684      $27 = $1;
20685      $17 = 0;
20686      $10 = __wasm_i64_mul($7, $22, $6, $17);
20687      $9 = $10 + $24 | 0;
20688      $11 = i64toi32_i32$HIGH_BITS + $1 | 0;
20689      $11 = $9 >>> 0 < $10 >>> 0 ? $11 + 1 | 0 : $11;
20690      $1 = $9;
20691      $10 = $9;
20692      $20 = 0;
20693      $9 = $20;
20694      $23 = $10;
20695      $9 = ($10 | 0) == ($15 | 0) & $19 >>> 0 < $9 >>> 0 | $15 >>> 0 < $10 >>> 0;
20696      $21 = $16 - $9 | 0;
20697      $30 = $30 - ($16 >>> 0 < $9 >>> 0) | 0;
20698      $9 = __wasm_i64_mul($3, 0, $14, $18);
20699      $10 = i64toi32_i32$HIGH_BITS;
20700      $14 = __wasm_i64_mul($7, $22, $29, 0);
20701      $9 = $14 + $9 | 0;
20702      $12 = i64toi32_i32$HIGH_BITS + $10 | 0;
20703      $12 = $9 >>> 0 < $14 >>> 0 ? $12 + 1 | 0 : $12;
20704      $14 = __wasm_i64_mul($8, $2, $6, $17);
20705      $9 = $14 + $9 | 0;
20706      $10 = i64toi32_i32$HIGH_BITS + $12 | 0;
20707      $10 = $9 >>> 0 < $14 >>> 0 ? $10 + 1 | 0 : $10;
20708      $12 = $10;
20709      $10 = ($11 | 0) == ($27 | 0) & $1 >>> 0 < $24 >>> 0 | $11 >>> 0 < $27 >>> 0;
20710      $1 = $11 + $9 | 0;
20711      $10 = $10 + $12 | 0;
20712      $10 = $1 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10;
20713      $11 = $1;
20714      $1 = $10;
20715      $9 = __wasm_i64_mul($7, $8, $31, 0);
20716      $14 = i64toi32_i32$HIGH_BITS;
20717      $16 = $11;
20718      $11 = __wasm_i64_mul($5, $6, $4, 0);
20719      $10 = $11 + $9 | 0;
20720      $9 = i64toi32_i32$HIGH_BITS + $14 | 0;
20721      $9 = $10 >>> 0 < $11 >>> 0 ? $9 + 1 | 0 : $9;
20722      $12 = __wasm_i64_mul($3, $4, $6, $17);
20723      $11 = $12 + $10 | 0;
20724      $9 = __wasm_i64_mul($8, $2, $29, $32);
20725      $2 = $9 + $11 | 0;
20726      $9 = $2;
20727      $10 = 0;
20728      $2 = $16 + $10 | 0;
20729      $9 = $1 + $9 | 0;
20730      $1 = $2;
20731      $16 = $21 - $1 | 0;
20732      $2 = $30 - (($21 >>> 0 < $1 >>> 0) + ($1 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9) | 0) | 0;
20733      $34 = $34 + -1 | 0;
20734      $29 = $19 - $20 | 0;
20735      $1 = $15 - (($19 >>> 0 < $20 >>> 0) + $23 | 0) | 0;
20736      break label$12;
20737     }
20738     $17 = $8 >>> 1 | 0;
20739     $11 = 0;
20740     $12 = $1 << 16;
20741     $10 = $3 << 31;
20742     $7 = ($8 & 1) << 31 | $7 >>> 1;
20743     $8 = $8 >>> 1 | $10;
20744     $27 = 0;
20745     $25 = 0;
20746     $1 = __wasm_i64_mul($7, $27, $5, $25);
20747     $9 = i64toi32_i32$HIGH_BITS;
20748     $10 = $9;
20749     $9 = ($1 | 0) != 0 | ($9 | 0) != 0;
20750     $14 = $2 - $9 | 0;
20751     $37 = $12 - ($2 >>> 0 < $9 >>> 0) | 0;
20752     $21 = 0 - $1 | 0;
20753     $22 = 0 - ((0 < $1 >>> 0) + $10 | 0) | 0;
20754     $12 = $22;
20755     $15 = 0;
20756     $20 = __wasm_i64_mul($7, $27, $6, $15);
20757     $1 = i64toi32_i32$HIGH_BITS;
20758     $35 = $1;
20759     $23 = $17 | $3 << 31;
20760     $36 = $4 << 31 | $3 >>> 1 | $11;
20761     $10 = $23;
20762     $17 = __wasm_i64_mul($10, 0, $5, $25);
20763     $2 = $17 + $20 | 0;
20764     $9 = i64toi32_i32$HIGH_BITS + $1 | 0;
20765     $9 = $2 >>> 0 < $17 >>> 0 ? $9 + 1 | 0 : $9;
20766     $1 = $9;
20767     $9 = $2;
20768     $26 = $9;
20769     $18 = 0;
20770     $9 = ($9 | 0) == ($12 | 0) & $21 >>> 0 < $18 >>> 0 | $12 >>> 0 < $9 >>> 0;
20771     $24 = $14 - $9 | 0;
20772     $37 = $37 - ($14 >>> 0 < $9 >>> 0) | 0;
20773     $10 = __wasm_i64_mul($6, $15, $10, $11);
20774     $11 = i64toi32_i32$HIGH_BITS;
20775     $9 = $4;
20776     $12 = $9 >>> 1 | 0;
20777     $17 = ($9 & 1) << 31 | $3 >>> 1;
20778     $14 = $12;
20779     $12 = __wasm_i64_mul($17, 0, $5, $25);
20780     $9 = $12 + $10 | 0;
20781     $10 = i64toi32_i32$HIGH_BITS + $11 | 0;
20782     $10 = $9 >>> 0 < $12 >>> 0 ? $10 + 1 | 0 : $10;
20783     $12 = __wasm_i64_mul($7, $27, $29, 0);
20784     $11 = $12 + $9 | 0;
20785     $9 = i64toi32_i32$HIGH_BITS + $10 | 0;
20786     $10 = $11;
20787     $11 = $10 >>> 0 < $12 >>> 0 ? $9 + 1 | 0 : $9;
20788     $9 = ($1 | 0) == ($35 | 0) & $2 >>> 0 < $20 >>> 0 | $1 >>> 0 < $35 >>> 0;
20789     $2 = $1;
20790     $1 = $1 + $10 | 0;
20791     $11 = $9 + $11 | 0;
20792     $9 = $1;
20793     $1 = $9 >>> 0 < $2 >>> 0 ? $11 + 1 | 0 : $11;
20794     $2 = __wasm_i64_mul($7, $8, $31, 0);
20795     $10 = i64toi32_i32$HIGH_BITS;
20796     $11 = $9;
20797     $3 = __wasm_i64_mul($5, $6, $4 >>> 1 | 0, 0);
20798     $2 = $3 + $2 | 0;
20799     $9 = i64toi32_i32$HIGH_BITS + $10 | 0;
20800     $9 = $2 >>> 0 < $3 >>> 0 ? $9 + 1 | 0 : $9;
20801     $3 = __wasm_i64_mul($6, $15, $17, $14);
20802     $2 = $3 + $2 | 0;
20803     $9 = i64toi32_i32$HIGH_BITS + $9 | 0;
20804     $3 = __wasm_i64_mul($23, $36, $29, $32);
20805     $2 = $3 + $2 | 0;
20806     $9 = $2;
20807     $3 = 0;
20808     $2 = $11 + $3 | 0;
20809     $10 = $1 + $9 | 0;
20810     $1 = $2;
20811     $16 = $24 - $1 | 0;
20812     $2 = $37 - (($24 >>> 0 < $1 >>> 0) + ($1 >>> 0 < $3 >>> 0 ? $10 + 1 | 0 : $10) | 0) | 0;
20813     $3 = $17;
20814     $4 = $14;
20815     $29 = $21 - $18 | 0;
20816     $1 = $22 - (($21 >>> 0 < $18 >>> 0) + $26 | 0) | 0;
20817    }
20818    if (($34 | 0) >= 16384) {
20819     $28 = $28 | 2147418112;
20820     $1 = 0;
20821     $2 = 0;
20822     break label$2;
20823    }
20824    $11 = $34 + 16383 | 0;
20825    if (($34 | 0) <= -16383) {
20826     label$16 : {
20827      if ($11) {
20828       break label$16
20829      }
20830      $11 = $8;
20831      $14 = $29;
20832      $12 = $1 << 1 | $14 >>> 31;
20833      $9 = $14 << 1;
20834      $6 = ($6 | 0) == ($12 | 0) & $9 >>> 0 > $5 >>> 0 | $12 >>> 0 > $6 >>> 0;
20835      $9 = $4 & 65535;
20836      $5 = $16;
20837      $12 = $2 << 1 | $5 >>> 31;
20838      $2 = $5 << 1 | $1 >>> 31;
20839      $4 = $2;
20840      $1 = $12;
20841      $1 = ($4 | 0) == ($38 | 0) & ($1 | 0) == ($31 | 0) ? $6 : ($31 | 0) == ($1 | 0) & $4 >>> 0 > $38 >>> 0 | $1 >>> 0 > $31 >>> 0;
20842      $2 = $1 + $7 | 0;
20843      if ($2 >>> 0 < $1 >>> 0) {
20844       $11 = $11 + 1 | 0
20845      }
20846      $1 = $2;
20847      $4 = $1;
20848      $2 = $11;
20849      $4 = $3 + (($8 | 0) == ($11 | 0) & $4 >>> 0 < $7 >>> 0 | $11 >>> 0 < $8 >>> 0) | 0;
20850      if ($4 >>> 0 < $3 >>> 0) {
20851       $9 = $9 + 1 | 0
20852      }
20853      $3 = $9;
20854      if (!($9 & 65536)) {
20855       break label$16
20856      }
20857      $33 = $4 | $33;
20858      $28 = $3 | $28;
20859      break label$2;
20860     }
20861     $1 = 0;
20862     $2 = 0;
20863     break label$2;
20864    }
20865    $10 = $8;
20866    $4 = $4 & 65535;
20867    $14 = $29;
20868    $9 = $1 << 1 | $14 >>> 31;
20869    $14 = $14 << 1;
20870    $6 = ($6 | 0) == ($9 | 0) & $14 >>> 0 >= $5 >>> 0 | $9 >>> 0 > $6 >>> 0;
20871    $5 = $16;
20872    $9 = $2 << 1 | $5 >>> 31;
20873    $2 = $5 << 1 | $1 >>> 31;
20874    $1 = ($2 | 0) == ($38 | 0) & ($9 | 0) == ($31 | 0) ? $6 : ($31 | 0) == ($9 | 0) & $2 >>> 0 >= $38 >>> 0 | $9 >>> 0 > $31 >>> 0;
20875    $2 = $1 + $7 | 0;
20876    if ($2 >>> 0 < $1 >>> 0) {
20877     $10 = $10 + 1 | 0
20878    }
20879    $1 = $2;
20880    $2 = $10;
20881    $5 = $3;
20882    $3 = (($8 | 0) == ($10 | 0) & $1 >>> 0 < $7 >>> 0 | $10 >>> 0 < $8 >>> 0) + $3 | 0;
20883    $10 = $11 << 16 | $4;
20884    $33 = $3 | $33;
20885    $28 = $28 | ($3 >>> 0 < $5 >>> 0 ? $10 + 1 | 0 : $10);
20886   }
20887   HEAP32[$0 >> 2] = $1;
20888   HEAP32[$0 + 4 >> 2] = $2;
20889   HEAP32[$0 + 8 >> 2] = $33;
20890   HEAP32[$0 + 12 >> 2] = $28;
20891   global$0 = $13 + 192 | 0;
20892   return;
20893  }
20894  HEAP32[$0 >> 2] = 0;
20895  HEAP32[$0 + 4 >> 2] = 0;
20896  $1 = !($3 | $5 | ($4 | $6));
20897  HEAP32[$0 + 8 >> 2] = $1 ? 0 : $33;
20898  HEAP32[$0 + 12 >> 2] = $1 ? 2147450880 : $28;
20899  global$0 = $13 + 192 | 0;
20900 }
20901
20902 function __fpclassifyl($0, $1, $2, $3) {
20903  var $4 = 0, $5 = 0;
20904  $5 = $3 & 65535;
20905  $3 = $3 >>> 16 & 32767;
20906  label$1 : {
20907   if (($3 | 0) != 32767) {
20908    $4 = 4;
20909    if ($3) {
20910     break label$1
20911    }
20912    return $0 | $2 | ($1 | $5) ? 3 : 2;
20913   }
20914   $4 = !($0 | $2 | ($1 | $5));
20915  }
20916  return $4;
20917 }
20918
20919 function fmodl($0, $1, $2, $3, $4, $5, $6, $7, $8) {
20920  var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0;
20921  $9 = global$0 - 128 | 0;
20922  global$0 = $9;
20923  label$1 : {
20924   label$2 : {
20925    label$3 : {
20926     if (!__letf2($5, $6, $7, $8, 0, 0, 0, 0)) {
20927      break label$3
20928     }
20929     $10 = __fpclassifyl($5, $6, $7, $8);
20930     $19 = $4 >>> 16 | 0;
20931     $14 = $19 & 32767;
20932     if (($14 | 0) == 32767) {
20933      break label$3
20934     }
20935     if ($10) {
20936      break label$2
20937     }
20938    }
20939    __multf3($9 + 16 | 0, $1, $2, $3, $4, $5, $6, $7, $8);
20940    $4 = HEAP32[$9 + 16 >> 2];
20941    $3 = HEAP32[$9 + 20 >> 2];
20942    $2 = HEAP32[$9 + 24 >> 2];
20943    $1 = HEAP32[$9 + 28 >> 2];
20944    __divtf3($9, $4, $3, $2, $1, $4, $3, $2, $1);
20945    $3 = HEAP32[$9 + 8 >> 2];
20946    $4 = HEAP32[$9 + 12 >> 2];
20947    $7 = HEAP32[$9 >> 2];
20948    $8 = HEAP32[$9 + 4 >> 2];
20949    break label$1;
20950   }
20951   $11 = $4 & 65535 | $14 << 16;
20952   $12 = $11;
20953   $13 = $3;
20954   $15 = $7;
20955   $18 = $8 >>> 16 & 32767;
20956   $10 = $8 & 65535 | $18 << 16;
20957   if ((__letf2($1, $2, $13, $12, $5, $6, $7, $10) | 0) <= 0) {
20958    if (__letf2($1, $2, $13, $12, $5, $6, $15, $10)) {
20959     $7 = $1;
20960     $8 = $2;
20961     break label$1;
20962    }
20963    __multf3($9 + 112 | 0, $1, $2, $3, $4, 0, 0, 0, 0);
20964    $3 = HEAP32[$9 + 120 >> 2];
20965    $4 = HEAP32[$9 + 124 >> 2];
20966    $7 = HEAP32[$9 + 112 >> 2];
20967    $8 = HEAP32[$9 + 116 >> 2];
20968    break label$1;
20969   }
20970   if ($14) {
20971    $8 = $2;
20972    $7 = $1;
20973   } else {
20974    __multf3($9 + 96 | 0, $1, $2, $13, $12, 0, 0, 0, 1081540608);
20975    $7 = HEAP32[$9 + 108 >> 2];
20976    $12 = $7;
20977    $13 = HEAP32[$9 + 104 >> 2];
20978    $14 = ($7 >>> 16 | 0) + -120 | 0;
20979    $8 = HEAP32[$9 + 100 >> 2];
20980    $7 = HEAP32[$9 + 96 >> 2];
20981   }
20982   if (!$18) {
20983    __multf3($9 + 80 | 0, $5, $6, $15, $10, 0, 0, 0, 1081540608);
20984    $5 = HEAP32[$9 + 92 >> 2];
20985    $10 = $5;
20986    $15 = HEAP32[$9 + 88 >> 2];
20987    $18 = ($10 >>> 16 | 0) + -120 | 0;
20988    $6 = HEAP32[$9 + 84 >> 2];
20989    $5 = HEAP32[$9 + 80 >> 2];
20990   }
20991   $21 = $15;
20992   $11 = $15;
20993   $15 = $13 - $11 | 0;
20994   $12 = $12 & 65535 | 65536;
20995   $20 = $10 & 65535 | 65536;
20996   $10 = ($6 | 0) == ($8 | 0) & $7 >>> 0 < $5 >>> 0 | $8 >>> 0 < $6 >>> 0;
20997   $11 = ($12 - ($20 + ($13 >>> 0 < $11 >>> 0) | 0) | 0) - ($15 >>> 0 < $10 >>> 0) | 0;
20998   $17 = $15 - $10 | 0;
20999   $16 = ($11 | 0) > -1 ? 1 : 0;
21000   $15 = $7 - $5 | 0;
21001   $10 = $8 - (($7 >>> 0 < $5 >>> 0) + $6 | 0) | 0;
21002   if (($14 | 0) > ($18 | 0)) {
21003    while (1) {
21004     label$11 : {
21005      if ($16 & 1) {
21006       if (!($15 | $17 | ($10 | $11))) {
21007        __multf3($9 + 32 | 0, $1, $2, $3, $4, 0, 0, 0, 0);
21008        $3 = HEAP32[$9 + 40 >> 2];
21009        $4 = HEAP32[$9 + 44 >> 2];
21010        $7 = HEAP32[$9 + 32 >> 2];
21011        $8 = HEAP32[$9 + 36 >> 2];
21012        break label$1;
21013       }
21014       $7 = $17;
21015       $16 = $11 << 1 | $7 >>> 31;
21016       $17 = $7 << 1;
21017       $11 = $16;
21018       $16 = 0;
21019       $7 = $10 >>> 31 | 0;
21020       break label$11;
21021      }
21022      $11 = 0;
21023      $10 = $8;
21024      $17 = $8 >>> 31 | 0;
21025      $15 = $7;
21026      $7 = $13;
21027      $16 = $12 << 1 | $7 >>> 31;
21028      $7 = $7 << 1;
21029     }
21030     $13 = $7 | $17;
21031     $8 = $13;
21032     $7 = $21;
21033     $17 = $8 - $7 | 0;
21034     $12 = $11 | $16;
21035     $11 = $12 - (($8 >>> 0 < $7 >>> 0) + $20 | 0) | 0;
21036     $7 = $15;
21037     $16 = $10 << 1 | $7 >>> 31;
21038     $7 = $7 << 1;
21039     $8 = $16;
21040     $10 = ($6 | 0) == ($8 | 0) & $7 >>> 0 < $5 >>> 0 | $8 >>> 0 < $6 >>> 0;
21041     $11 = $11 - ($17 >>> 0 < $10 >>> 0) | 0;
21042     $17 = $17 - $10 | 0;
21043     $16 = ($11 | 0) > -1 ? 1 : 0;
21044     $15 = $7 - $5 | 0;
21045     $10 = $8 - (($7 >>> 0 < $5 >>> 0) + $6 | 0) | 0;
21046     $14 = $14 + -1 | 0;
21047     if (($14 | 0) > ($18 | 0)) {
21048      continue
21049     }
21050     break;
21051    };
21052    $14 = $18;
21053   }
21054   label$14 : {
21055    if (!$16) {
21056     break label$14
21057    }
21058    $7 = $15;
21059    $13 = $17;
21060    $8 = $10;
21061    $12 = $11;
21062    if ($7 | $13 | ($8 | $12)) {
21063     break label$14
21064    }
21065    __multf3($9 + 48 | 0, $1, $2, $3, $4, 0, 0, 0, 0);
21066    $3 = HEAP32[$9 + 56 >> 2];
21067    $4 = HEAP32[$9 + 60 >> 2];
21068    $7 = HEAP32[$9 + 48 >> 2];
21069    $8 = HEAP32[$9 + 52 >> 2];
21070    break label$1;
21071   }
21072   if (($12 | 0) == 65535 | $12 >>> 0 < 65535) {
21073    while (1) {
21074     $3 = $8 >>> 31 | 0;
21075     $1 = 0;
21076     $14 = $14 + -1 | 0;
21077     $11 = $8 << 1 | $7 >>> 31;
21078     $7 = $7 << 1;
21079     $8 = $11;
21080     $2 = $13;
21081     $16 = $12 << 1 | $2 >>> 31;
21082     $13 = $2 << 1 | $3;
21083     $1 = $1 | $16;
21084     $12 = $1;
21085     if (($1 | 0) == 65536 & $13 >>> 0 < 0 | $1 >>> 0 < 65536) {
21086      continue
21087     }
21088     break;
21089    }
21090   }
21091   $1 = $19 & 32768;
21092   if (($14 | 0) <= 0) {
21093    __multf3($9 - -64 | 0, $7, $8, $13, $12 & 65535 | ($1 | $14 + 120) << 16, 0, 0, 0, 1065811968);
21094    $3 = HEAP32[$9 + 72 >> 2];
21095    $4 = HEAP32[$9 + 76 >> 2];
21096    $7 = HEAP32[$9 + 64 >> 2];
21097    $8 = HEAP32[$9 + 68 >> 2];
21098    break label$1;
21099   }
21100   $3 = $13;
21101   $4 = $12 & 65535 | ($1 | $14) << 16;
21102  }
21103  HEAP32[$0 >> 2] = $7;
21104  HEAP32[$0 + 4 >> 2] = $8;
21105  HEAP32[$0 + 8 >> 2] = $3;
21106  HEAP32[$0 + 12 >> 2] = $4;
21107  global$0 = $9 + 128 | 0;
21108 }
21109
21110 function __floatscan($0, $1) {
21111  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0;
21112  $5 = global$0 - 48 | 0;
21113  global$0 = $5;
21114  $4 = $1 + 4 | 0;
21115  $7 = HEAP32[2644];
21116  $10 = HEAP32[2641];
21117  while (1) {
21118   $2 = HEAP32[$1 + 4 >> 2];
21119   label$4 : {
21120    if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21121     HEAP32[$4 >> 2] = $2 + 1;
21122     $2 = HEAPU8[$2 | 0];
21123     break label$4;
21124    }
21125    $2 = __shgetc($1);
21126   }
21127   if (($2 | 0) == 32 | $2 + -9 >>> 0 < 5) {
21128    continue
21129   }
21130   break;
21131  };
21132  $6 = 1;
21133  label$6 : {
21134   label$7 : {
21135    switch ($2 + -43 | 0) {
21136    case 0:
21137    case 2:
21138     break label$7;
21139    default:
21140     break label$6;
21141    };
21142   }
21143   $6 = ($2 | 0) == 45 ? -1 : 1;
21144   $2 = HEAP32[$1 + 4 >> 2];
21145   if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21146    HEAP32[$4 >> 2] = $2 + 1;
21147    $2 = HEAPU8[$2 | 0];
21148    break label$6;
21149   }
21150   $2 = __shgetc($1);
21151  }
21152  label$1 : {
21153   label$9 : {
21154    label$10 : {
21155     while (1) {
21156      if (HEAP8[$3 + 10484 | 0] == ($2 | 32)) {
21157       label$13 : {
21158        if ($3 >>> 0 > 6) {
21159         break label$13
21160        }
21161        $2 = HEAP32[$1 + 4 >> 2];
21162        if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21163         HEAP32[$4 >> 2] = $2 + 1;
21164         $2 = HEAPU8[$2 | 0];
21165         break label$13;
21166        }
21167        $2 = __shgetc($1);
21168       }
21169       $3 = $3 + 1 | 0;
21170       if (($3 | 0) != 8) {
21171        continue
21172       }
21173       break label$10;
21174      }
21175      break;
21176     };
21177     if (($3 | 0) != 3) {
21178      if (($3 | 0) == 8) {
21179       break label$10
21180      }
21181      if ($3 >>> 0 < 4) {
21182       break label$9
21183      }
21184      if (($3 | 0) == 8) {
21185       break label$10
21186      }
21187     }
21188     $1 = HEAP32[$1 + 104 >> 2];
21189     if ($1) {
21190      HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1
21191     }
21192     if ($3 >>> 0 < 4) {
21193      break label$10
21194     }
21195     while (1) {
21196      if ($1) {
21197       HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1
21198      }
21199      $3 = $3 + -1 | 0;
21200      if ($3 >>> 0 > 3) {
21201       continue
21202      }
21203      break;
21204     };
21205    }
21206    __extendsftf2($5, Math_fround(Math_fround($6 | 0) * Math_fround(infinity)));
21207    $6 = HEAP32[$5 + 8 >> 2];
21208    $2 = HEAP32[$5 + 12 >> 2];
21209    $8 = HEAP32[$5 >> 2];
21210    $9 = HEAP32[$5 + 4 >> 2];
21211    break label$1;
21212   }
21213   label$19 : {
21214    label$20 : {
21215     label$21 : {
21216      if ($3) {
21217       break label$21
21218      }
21219      $3 = 0;
21220      while (1) {
21221       if (HEAP8[$3 + 10493 | 0] != ($2 | 32)) {
21222        break label$21
21223       }
21224       label$23 : {
21225        if ($3 >>> 0 > 1) {
21226         break label$23
21227        }
21228        $2 = HEAP32[$1 + 4 >> 2];
21229        if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21230         HEAP32[$4 >> 2] = $2 + 1;
21231         $2 = HEAPU8[$2 | 0];
21232         break label$23;
21233        }
21234        $2 = __shgetc($1);
21235       }
21236       $3 = $3 + 1 | 0;
21237       if (($3 | 0) != 3) {
21238        continue
21239       }
21240       break;
21241      };
21242      break label$20;
21243     }
21244     label$25 : {
21245      switch ($3 | 0) {
21246      case 0:
21247       label$27 : {
21248        if (($2 | 0) != 48) {
21249         break label$27
21250        }
21251        $3 = HEAP32[$1 + 4 >> 2];
21252        label$28 : {
21253         if ($3 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21254          HEAP32[$4 >> 2] = $3 + 1;
21255          $3 = HEAPU8[$3 | 0];
21256          break label$28;
21257         }
21258         $3 = __shgetc($1);
21259        }
21260        if (($3 & -33) == 88) {
21261         hexfloat($5 + 16 | 0, $1, $10, $7, $6);
21262         $6 = HEAP32[$5 + 24 >> 2];
21263         $2 = HEAP32[$5 + 28 >> 2];
21264         $8 = HEAP32[$5 + 16 >> 2];
21265         $9 = HEAP32[$5 + 20 >> 2];
21266         break label$1;
21267        }
21268        if (!HEAP32[$1 + 104 >> 2]) {
21269         break label$27
21270        }
21271        HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1;
21272       }
21273       decfloat($5 + 32 | 0, $1, $2, $10, $7, $6);
21274       $6 = HEAP32[$5 + 40 >> 2];
21275       $2 = HEAP32[$5 + 44 >> 2];
21276       $8 = HEAP32[$5 + 32 >> 2];
21277       $9 = HEAP32[$5 + 36 >> 2];
21278       break label$1;
21279      case 3:
21280       break label$20;
21281      default:
21282       break label$25;
21283      };
21284     }
21285     if (HEAP32[$1 + 104 >> 2]) {
21286      HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1
21287     }
21288     break label$19;
21289    }
21290    label$32 : {
21291     $3 = HEAP32[$1 + 4 >> 2];
21292     label$33 : {
21293      if ($3 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21294       HEAP32[$4 >> 2] = $3 + 1;
21295       $2 = HEAPU8[$3 | 0];
21296       break label$33;
21297      }
21298      $2 = __shgetc($1);
21299     }
21300     if (($2 | 0) == 40) {
21301      $3 = 1;
21302      break label$32;
21303     }
21304     $6 = 0;
21305     $2 = 2147450880;
21306     if (!HEAP32[$1 + 104 >> 2]) {
21307      break label$1
21308     }
21309     HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1;
21310     break label$1;
21311    }
21312    while (1) {
21313     $2 = HEAP32[$1 + 4 >> 2];
21314     label$37 : {
21315      if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21316       HEAP32[$4 >> 2] = $2 + 1;
21317       $7 = HEAPU8[$2 | 0];
21318       break label$37;
21319      }
21320      $7 = __shgetc($1);
21321     }
21322     if (!($7 + -97 >>> 0 >= 26 ? !($7 + -48 >>> 0 < 10 | $7 + -65 >>> 0 < 26 | ($7 | 0) == 95) : 0)) {
21323      $3 = $3 + 1 | 0;
21324      continue;
21325     }
21326     break;
21327    };
21328    $6 = 0;
21329    $2 = 2147450880;
21330    if (($7 | 0) == 41) {
21331     break label$1
21332    }
21333    $1 = HEAP32[$1 + 104 >> 2];
21334    if ($1) {
21335     HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1
21336    }
21337    if (!$3) {
21338     break label$1
21339    }
21340    while (1) {
21341     $3 = $3 + -1 | 0;
21342     if ($1) {
21343      HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1
21344     }
21345     if ($3) {
21346      continue
21347     }
21348     break;
21349    };
21350    break label$1;
21351   }
21352   HEAP32[2896] = 28;
21353   __shlim($1);
21354   $6 = 0;
21355   $2 = 0;
21356  }
21357  HEAP32[$0 >> 2] = $8;
21358  HEAP32[$0 + 4 >> 2] = $9;
21359  HEAP32[$0 + 8 >> 2] = $6;
21360  HEAP32[$0 + 12 >> 2] = $2;
21361  global$0 = $5 + 48 | 0;
21362 }
21363
21364 function hexfloat($0, $1, $2, $3, $4) {
21365  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
21366  $5 = global$0 - 432 | 0;
21367  global$0 = $5;
21368  $6 = HEAP32[$1 + 4 >> 2];
21369  label$1 : {
21370   if ($6 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21371    HEAP32[$1 + 4 >> 2] = $6 + 1;
21372    $7 = HEAPU8[$6 | 0];
21373    break label$1;
21374   }
21375   $7 = __shgetc($1);
21376  }
21377  label$3 : {
21378   label$4 : {
21379    while (1) {
21380     if (($7 | 0) != 48) {
21381      label$6 : {
21382       if (($7 | 0) != 46) {
21383        break label$3
21384       }
21385       $6 = HEAP32[$1 + 4 >> 2];
21386       if ($6 >>> 0 >= HEAPU32[$1 + 104 >> 2]) {
21387        break label$6
21388       }
21389       HEAP32[$1 + 4 >> 2] = $6 + 1;
21390       $7 = HEAPU8[$6 | 0];
21391       break label$4;
21392      }
21393     } else {
21394      $6 = HEAP32[$1 + 4 >> 2];
21395      if ($6 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21396       HEAP32[$1 + 4 >> 2] = $6 + 1;
21397       $7 = HEAPU8[$6 | 0];
21398      } else {
21399       $7 = __shgetc($1)
21400      }
21401      $21 = 1;
21402      continue;
21403     }
21404     break;
21405    };
21406    $7 = __shgetc($1);
21407   }
21408   $20 = 1;
21409   if (($7 | 0) != 48) {
21410    break label$3
21411   }
21412   while (1) {
21413    $6 = HEAP32[$1 + 4 >> 2];
21414    label$10 : {
21415     if ($6 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21416      HEAP32[$1 + 4 >> 2] = $6 + 1;
21417      $7 = HEAPU8[$6 | 0];
21418      break label$10;
21419     }
21420     $7 = __shgetc($1);
21421    }
21422    $13 = $13 + -1 | 0;
21423    $17 = $17 + -1 | 0;
21424    if (($17 | 0) != -1) {
21425     $13 = $13 + 1 | 0
21426    }
21427    if (($7 | 0) == 48) {
21428     continue
21429    }
21430    break;
21431   };
21432   $21 = 1;
21433  }
21434  $12 = 1073676288;
21435  $6 = 0;
21436  while (1) {
21437   label$13 : {
21438    $22 = $7 | 32;
21439    label$14 : {
21440     label$15 : {
21441      $23 = $7 + -48 | 0;
21442      if ($23 >>> 0 < 10) {
21443       break label$15
21444      }
21445      if ($22 + -97 >>> 0 > 5 ? ($7 | 0) != 46 : 0) {
21446       break label$13
21447      }
21448      if (($7 | 0) != 46) {
21449       break label$15
21450      }
21451      if ($20) {
21452       break label$13
21453      }
21454      $20 = 1;
21455      $17 = $9;
21456      $13 = $6;
21457      break label$14;
21458     }
21459     $7 = ($7 | 0) > 57 ? $22 + -87 | 0 : $23;
21460     label$16 : {
21461      if (($6 | 0) < 0 ? 1 : ($6 | 0) <= 0 ? ($9 >>> 0 > 7 ? 0 : 1) : 0) {
21462       $14 = $7 + ($14 << 4) | 0;
21463       break label$16;
21464      }
21465      if (($6 | 0) < 0 ? 1 : ($6 | 0) <= 0 ? ($9 >>> 0 > 28 ? 0 : 1) : 0) {
21466       __floatsitf($5 + 48 | 0, $7);
21467       __multf3($5 + 32 | 0, $18, $19, $8, $12, 0, 0, 0, 1073414144);
21468       $18 = HEAP32[$5 + 32 >> 2];
21469       $19 = HEAP32[$5 + 36 >> 2];
21470       $8 = HEAP32[$5 + 40 >> 2];
21471       $12 = HEAP32[$5 + 44 >> 2];
21472       __multf3($5 + 16 | 0, $18, $19, $8, $12, HEAP32[$5 + 48 >> 2], HEAP32[$5 + 52 >> 2], HEAP32[$5 + 56 >> 2], HEAP32[$5 + 60 >> 2]);
21473       __addtf3($5, $10, $11, $15, $16, HEAP32[$5 + 16 >> 2], HEAP32[$5 + 20 >> 2], HEAP32[$5 + 24 >> 2], HEAP32[$5 + 28 >> 2]);
21474       $15 = HEAP32[$5 + 8 >> 2];
21475       $16 = HEAP32[$5 + 12 >> 2];
21476       $10 = HEAP32[$5 >> 2];
21477       $11 = HEAP32[$5 + 4 >> 2];
21478       break label$16;
21479      }
21480      if (!$7 | $24) {
21481       break label$16
21482      }
21483      __multf3($5 + 80 | 0, $18, $19, $8, $12, 0, 0, 0, 1073610752);
21484      __addtf3($5 - -64 | 0, $10, $11, $15, $16, HEAP32[$5 + 80 >> 2], HEAP32[$5 + 84 >> 2], HEAP32[$5 + 88 >> 2], HEAP32[$5 + 92 >> 2]);
21485      $15 = HEAP32[$5 + 72 >> 2];
21486      $16 = HEAP32[$5 + 76 >> 2];
21487      $24 = 1;
21488      $10 = HEAP32[$5 + 64 >> 2];
21489      $11 = HEAP32[$5 + 68 >> 2];
21490     }
21491     $9 = $9 + 1 | 0;
21492     if ($9 >>> 0 < 1) {
21493      $6 = $6 + 1 | 0
21494     }
21495     $21 = 1;
21496    }
21497    $7 = HEAP32[$1 + 4 >> 2];
21498    if ($7 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21499     HEAP32[$1 + 4 >> 2] = $7 + 1;
21500     $7 = HEAPU8[$7 | 0];
21501    } else {
21502     $7 = __shgetc($1)
21503    }
21504    continue;
21505   }
21506   break;
21507  };
21508  label$20 : {
21509   label$21 : {
21510    if (!$21) {
21511     if (!HEAP32[$1 + 104 >> 2]) {
21512      break label$21
21513     }
21514     $2 = HEAP32[$1 + 4 >> 2];
21515     HEAP32[$1 + 4 >> 2] = $2 + -1;
21516     HEAP32[$1 + 4 >> 2] = $2 + -2;
21517     if (!$20) {
21518      break label$21
21519     }
21520     HEAP32[$1 + 4 >> 2] = $2 + -3;
21521     break label$21;
21522    }
21523    if (($6 | 0) < 0 ? 1 : ($6 | 0) <= 0 ? ($9 >>> 0 > 7 ? 0 : 1) : 0) {
21524     $8 = $9;
21525     $12 = $6;
21526     while (1) {
21527      $14 = $14 << 4;
21528      $8 = $8 + 1 | 0;
21529      if ($8 >>> 0 < 1) {
21530       $12 = $12 + 1 | 0
21531      }
21532      if (($8 | 0) != 8 | $12) {
21533       continue
21534      }
21535      break;
21536     };
21537    }
21538    label$27 : {
21539     if (($7 & -33) == 80) {
21540      $8 = scanexp($1);
21541      $7 = i64toi32_i32$HIGH_BITS;
21542      $12 = $7;
21543      if ($8 | ($7 | 0) != -2147483648) {
21544       break label$27
21545      }
21546      $8 = 0;
21547      $12 = 0;
21548      if (!HEAP32[$1 + 104 >> 2]) {
21549       break label$27
21550      }
21551      HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1;
21552      break label$27;
21553     }
21554     $8 = 0;
21555     $12 = 0;
21556     if (!HEAP32[$1 + 104 >> 2]) {
21557      break label$27
21558     }
21559     HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1;
21560    }
21561    if (!$14) {
21562     __extenddftf2($5 + 112 | 0, +($4 | 0) * 0.0);
21563     $10 = HEAP32[$5 + 112 >> 2];
21564     $11 = HEAP32[$5 + 116 >> 2];
21565     $2 = HEAP32[$5 + 120 >> 2];
21566     $1 = HEAP32[$5 + 124 >> 2];
21567     break label$20;
21568    }
21569    $1 = $20 ? $17 : $9;
21570    $6 = ($20 ? $13 : $6) << 2 | $1 >>> 30;
21571    $1 = $8 + ($1 << 2) | 0;
21572    $13 = $1 + -32 | 0;
21573    $9 = $13;
21574    $6 = $6 + $12 | 0;
21575    $1 = ($1 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6) + -1 | 0;
21576    $6 = $9 >>> 0 < 4294967264 ? $1 + 1 | 0 : $1;
21577    if (($6 | 0) > 0 ? 1 : ($6 | 0) >= 0 ? ($9 >>> 0 <= 0 - $3 >>> 0 ? 0 : 1) : 0) {
21578     HEAP32[2896] = 68;
21579     __floatsitf($5 + 160 | 0, $4);
21580     __multf3($5 + 144 | 0, HEAP32[$5 + 160 >> 2], HEAP32[$5 + 164 >> 2], HEAP32[$5 + 168 >> 2], HEAP32[$5 + 172 >> 2], -1, -1, -1, 2147418111);
21581     __multf3($5 + 128 | 0, HEAP32[$5 + 144 >> 2], HEAP32[$5 + 148 >> 2], HEAP32[$5 + 152 >> 2], HEAP32[$5 + 156 >> 2], -1, -1, -1, 2147418111);
21582     $10 = HEAP32[$5 + 128 >> 2];
21583     $11 = HEAP32[$5 + 132 >> 2];
21584     $2 = HEAP32[$5 + 136 >> 2];
21585     $1 = HEAP32[$5 + 140 >> 2];
21586     break label$20;
21587    }
21588    $1 = $3 + -226 | 0;
21589    $7 = $9 >>> 0 < $1 >>> 0 ? 0 : 1;
21590    $1 = $1 >> 31;
21591    if (($6 | 0) > ($1 | 0) ? 1 : ($6 | 0) >= ($1 | 0) ? $7 : 0) {
21592     if (($14 | 0) > -1) {
21593      while (1) {
21594       __addtf3($5 + 416 | 0, $10, $11, $15, $16, 0, 0, 0, -1073807360);
21595       $1 = __getf2($10, $11, $15, $16, 1073610752);
21596       $8 = ($1 | 0) < 0;
21597       __addtf3($5 + 400 | 0, $10, $11, $15, $16, $8 ? $10 : HEAP32[$5 + 416 >> 2], $8 ? $11 : HEAP32[$5 + 420 >> 2], $8 ? $15 : HEAP32[$5 + 424 >> 2], $8 ? $16 : HEAP32[$5 + 428 >> 2]);
21598       $6 = $6 + -1 | 0;
21599       $9 = $9 + -1 | 0;
21600       if (($9 | 0) != -1) {
21601        $6 = $6 + 1 | 0
21602       }
21603       $15 = HEAP32[$5 + 408 >> 2];
21604       $16 = HEAP32[$5 + 412 >> 2];
21605       $10 = HEAP32[$5 + 400 >> 2];
21606       $11 = HEAP32[$5 + 404 >> 2];
21607       $14 = $14 << 1 | ($1 | 0) > -1;
21608       if (($14 | 0) > -1) {
21609        continue
21610       }
21611       break;
21612      }
21613     }
21614     $1 = ($9 - $3 | 0) + 32 | 0;
21615     $8 = $1;
21616     $7 = $2;
21617     $12 = $1 >>> 0 >= $2 >>> 0 ? 0 : 1;
21618     $2 = $6 - (($3 >> 31) + ($9 >>> 0 < $3 >>> 0) | 0) | 0;
21619     $1 = $1 >>> 0 < 32 ? $2 + 1 | 0 : $2;
21620     $1 = (($1 | 0) < 0 ? 1 : ($1 | 0) <= 0 ? $12 : 0) ? (($8 | 0) > 0 ? $8 : 0) : $7;
21621     label$35 : {
21622      if (($1 | 0) >= 113) {
21623       __floatsitf($5 + 384 | 0, $4);
21624       $17 = HEAP32[$5 + 392 >> 2];
21625       $13 = HEAP32[$5 + 396 >> 2];
21626       $18 = HEAP32[$5 + 384 >> 2];
21627       $19 = HEAP32[$5 + 388 >> 2];
21628       $6 = 0;
21629       $4 = 0;
21630       $3 = 0;
21631       $2 = 0;
21632       break label$35;
21633      }
21634      __extenddftf2($5 + 352 | 0, scalbn(1.0, 144 - $1 | 0));
21635      __floatsitf($5 + 336 | 0, $4);
21636      $18 = HEAP32[$5 + 336 >> 2];
21637      $19 = HEAP32[$5 + 340 >> 2];
21638      $17 = HEAP32[$5 + 344 >> 2];
21639      $13 = HEAP32[$5 + 348 >> 2];
21640      copysignl($5 + 368 | 0, HEAP32[$5 + 352 >> 2], HEAP32[$5 + 356 >> 2], HEAP32[$5 + 360 >> 2], HEAP32[$5 + 364 >> 2], $18, $19, $17, $13);
21641      $6 = HEAP32[$5 + 376 >> 2];
21642      $4 = HEAP32[$5 + 380 >> 2];
21643      $3 = HEAP32[$5 + 372 >> 2];
21644      $2 = HEAP32[$5 + 368 >> 2];
21645     }
21646     $1 = !($14 & 1) & ((__letf2($10, $11, $15, $16, 0, 0, 0, 0) | 0) != 0 & ($1 | 0) < 32);
21647     __floatunsitf($5 + 320 | 0, $1 + $14 | 0);
21648     __multf3($5 + 304 | 0, $18, $19, $17, $13, HEAP32[$5 + 320 >> 2], HEAP32[$5 + 324 >> 2], HEAP32[$5 + 328 >> 2], HEAP32[$5 + 332 >> 2]);
21649     __addtf3($5 + 272 | 0, HEAP32[$5 + 304 >> 2], HEAP32[$5 + 308 >> 2], HEAP32[$5 + 312 >> 2], HEAP32[$5 + 316 >> 2], $2, $3, $6, $4);
21650     __multf3($5 + 288 | 0, $1 ? 0 : $10, $1 ? 0 : $11, $1 ? 0 : $15, $1 ? 0 : $16, $18, $19, $17, $13);
21651     __addtf3($5 + 256 | 0, HEAP32[$5 + 288 >> 2], HEAP32[$5 + 292 >> 2], HEAP32[$5 + 296 >> 2], HEAP32[$5 + 300 >> 2], HEAP32[$5 + 272 >> 2], HEAP32[$5 + 276 >> 2], HEAP32[$5 + 280 >> 2], HEAP32[$5 + 284 >> 2]);
21652     __subtf3($5 + 240 | 0, HEAP32[$5 + 256 >> 2], HEAP32[$5 + 260 >> 2], HEAP32[$5 + 264 >> 2], HEAP32[$5 + 268 >> 2], $2, $3, $6, $4);
21653     $1 = HEAP32[$5 + 240 >> 2];
21654     $2 = HEAP32[$5 + 244 >> 2];
21655     $3 = HEAP32[$5 + 248 >> 2];
21656     $4 = HEAP32[$5 + 252 >> 2];
21657     if (!__letf2($1, $2, $3, $4, 0, 0, 0, 0)) {
21658      HEAP32[2896] = 68
21659     }
21660     scalbnl($5 + 224 | 0, $1, $2, $3, $4, $9);
21661     $10 = HEAP32[$5 + 224 >> 2];
21662     $11 = HEAP32[$5 + 228 >> 2];
21663     $2 = HEAP32[$5 + 232 >> 2];
21664     $1 = HEAP32[$5 + 236 >> 2];
21665     break label$20;
21666    }
21667    HEAP32[2896] = 68;
21668    __floatsitf($5 + 208 | 0, $4);
21669    __multf3($5 + 192 | 0, HEAP32[$5 + 208 >> 2], HEAP32[$5 + 212 >> 2], HEAP32[$5 + 216 >> 2], HEAP32[$5 + 220 >> 2], 0, 0, 0, 65536);
21670    __multf3($5 + 176 | 0, HEAP32[$5 + 192 >> 2], HEAP32[$5 + 196 >> 2], HEAP32[$5 + 200 >> 2], HEAP32[$5 + 204 >> 2], 0, 0, 0, 65536);
21671    $10 = HEAP32[$5 + 176 >> 2];
21672    $11 = HEAP32[$5 + 180 >> 2];
21673    $2 = HEAP32[$5 + 184 >> 2];
21674    $1 = HEAP32[$5 + 188 >> 2];
21675    break label$20;
21676   }
21677   __extenddftf2($5 + 96 | 0, +($4 | 0) * 0.0);
21678   $10 = HEAP32[$5 + 96 >> 2];
21679   $11 = HEAP32[$5 + 100 >> 2];
21680   $2 = HEAP32[$5 + 104 >> 2];
21681   $1 = HEAP32[$5 + 108 >> 2];
21682  }
21683  HEAP32[$0 >> 2] = $10;
21684  HEAP32[$0 + 4 >> 2] = $11;
21685  HEAP32[$0 + 8 >> 2] = $2;
21686  HEAP32[$0 + 12 >> 2] = $1;
21687  global$0 = $5 + 432 | 0;
21688 }
21689
21690 function decfloat($0, $1, $2, $3, $4, $5) {
21691  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0;
21692  $6 = global$0 - 8976 | 0;
21693  global$0 = $6;
21694  $22 = $3 + $4 | 0;
21695  $25 = 0 - $22 | 0;
21696  label$1 : {
21697   label$2 : {
21698    while (1) {
21699     if (($2 | 0) != 48) {
21700      label$4 : {
21701       if (($2 | 0) != 46) {
21702        break label$1
21703       }
21704       $2 = HEAP32[$1 + 4 >> 2];
21705       if ($2 >>> 0 >= HEAPU32[$1 + 104 >> 2]) {
21706        break label$4
21707       }
21708       HEAP32[$1 + 4 >> 2] = $2 + 1;
21709       $2 = HEAPU8[$2 | 0];
21710       break label$2;
21711      }
21712     } else {
21713      $2 = HEAP32[$1 + 4 >> 2];
21714      if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21715       $9 = 1;
21716       HEAP32[$1 + 4 >> 2] = $2 + 1;
21717       $2 = HEAPU8[$2 | 0];
21718      } else {
21719       $9 = 1;
21720       $2 = __shgetc($1);
21721      }
21722      continue;
21723     }
21724     break;
21725    };
21726    $2 = __shgetc($1);
21727   }
21728   $14 = 1;
21729   if (($2 | 0) != 48) {
21730    break label$1
21731   }
21732   while (1) {
21733    $2 = HEAP32[$1 + 4 >> 2];
21734    label$8 : {
21735     if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21736      HEAP32[$1 + 4 >> 2] = $2 + 1;
21737      $2 = HEAPU8[$2 | 0];
21738      break label$8;
21739     }
21740     $2 = __shgetc($1);
21741    }
21742    $7 = $7 + -1 | 0;
21743    $8 = $8 + -1 | 0;
21744    if (($8 | 0) != -1) {
21745     $7 = $7 + 1 | 0
21746    }
21747    if (($2 | 0) == 48) {
21748     continue
21749    }
21750    break;
21751   };
21752   $9 = 1;
21753  }
21754  HEAP32[$6 + 784 >> 2] = 0;
21755  label$10 : {
21756   label$11 : {
21757    $12 = ($2 | 0) == 46;
21758    $13 = $2 + -48 | 0;
21759    label$13 : {
21760     label$14 : {
21761      label$15 : {
21762       if ($12 | $13 >>> 0 <= 9) {
21763        while (1) {
21764         label$19 : {
21765          if ($12 & 1) {
21766           if (!$14) {
21767            $8 = $10;
21768            $7 = $11;
21769            $14 = 1;
21770            break label$19;
21771           }
21772           $9 = !$9;
21773           break label$15;
21774          }
21775          $10 = $10 + 1 | 0;
21776          if ($10 >>> 0 < 1) {
21777           $11 = $11 + 1 | 0
21778          }
21779          if (($15 | 0) <= 2044) {
21780           $20 = ($2 | 0) == 48 ? $20 : $10;
21781           $9 = ($6 + 784 | 0) + ($15 << 2) | 0;
21782           HEAP32[$9 >> 2] = $17 ? (Math_imul(HEAP32[$9 >> 2], 10) + $2 | 0) + -48 | 0 : $13;
21783           $9 = 1;
21784           $13 = $17 + 1 | 0;
21785           $2 = ($13 | 0) == 9;
21786           $17 = $2 ? 0 : $13;
21787           $15 = $2 + $15 | 0;
21788           break label$19;
21789          }
21790          if (($2 | 0) == 48) {
21791           break label$19
21792          }
21793          HEAP32[$6 + 8960 >> 2] = HEAP32[$6 + 8960 >> 2] | 1;
21794          $20 = 18396;
21795         }
21796         $2 = HEAP32[$1 + 4 >> 2];
21797         label$25 : {
21798          if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {
21799           HEAP32[$1 + 4 >> 2] = $2 + 1;
21800           $2 = HEAPU8[$2 | 0];
21801           break label$25;
21802          }
21803          $2 = __shgetc($1);
21804         }
21805         $12 = ($2 | 0) == 46;
21806         $13 = $2 + -48 | 0;
21807         if ($12 | $13 >>> 0 < 10) {
21808          continue
21809         }
21810         break;
21811        }
21812       }
21813       $8 = $14 ? $8 : $10;
21814       $7 = $14 ? $7 : $11;
21815       if (!(!$9 | ($2 & -33) != 69)) {
21816        $12 = scanexp($1);
21817        $2 = i64toi32_i32$HIGH_BITS;
21818        $16 = $2;
21819        label$28 : {
21820         if ($12 | ($2 | 0) != -2147483648) {
21821          break label$28
21822         }
21823         $12 = 0;
21824         $16 = 0;
21825         if (!HEAP32[$1 + 104 >> 2]) {
21826          break label$28
21827         }
21828         HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1;
21829        }
21830        if (!$9) {
21831         break label$13
21832        }
21833        $7 = $7 + $16 | 0;
21834        $8 = $8 + $12 | 0;
21835        if ($8 >>> 0 < $12 >>> 0) {
21836         $7 = $7 + 1 | 0
21837        }
21838        break label$11;
21839       }
21840       $9 = !$9;
21841       if (($2 | 0) < 0) {
21842        break label$14
21843       }
21844      }
21845      if (!HEAP32[$1 + 104 >> 2]) {
21846       break label$14
21847      }
21848      HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1;
21849     }
21850     if (!$9) {
21851      break label$11
21852     }
21853    }
21854    HEAP32[2896] = 28;
21855    $10 = 0;
21856    $11 = 0;
21857    __shlim($1);
21858    $2 = 0;
21859    $1 = 0;
21860    break label$10;
21861   }
21862   $1 = HEAP32[$6 + 784 >> 2];
21863   if (!$1) {
21864    __extenddftf2($6, +($5 | 0) * 0.0);
21865    $10 = HEAP32[$6 >> 2];
21866    $11 = HEAP32[$6 + 4 >> 2];
21867    $2 = HEAP32[$6 + 8 >> 2];
21868    $1 = HEAP32[$6 + 12 >> 2];
21869    break label$10;
21870   }
21871   if (!(($8 | 0) != ($10 | 0) | ($7 | 0) != ($11 | 0) | (($11 | 0) > 0 ? 1 : ($11 | 0) >= 0 ? ($10 >>> 0 <= 9 ? 0 : 1) : 0) | ($1 >>> $3 | 0 ? ($3 | 0) <= 30 : 0))) {
21872    __floatsitf($6 + 48 | 0, $5);
21873    __floatunsitf($6 + 32 | 0, $1);
21874    __multf3($6 + 16 | 0, HEAP32[$6 + 48 >> 2], HEAP32[$6 + 52 >> 2], HEAP32[$6 + 56 >> 2], HEAP32[$6 + 60 >> 2], HEAP32[$6 + 32 >> 2], HEAP32[$6 + 36 >> 2], HEAP32[$6 + 40 >> 2], HEAP32[$6 + 44 >> 2]);
21875    $10 = HEAP32[$6 + 16 >> 2];
21876    $11 = HEAP32[$6 + 20 >> 2];
21877    $2 = HEAP32[$6 + 24 >> 2];
21878    $1 = HEAP32[$6 + 28 >> 2];
21879    break label$10;
21880   }
21881   if (($7 | 0) > 0 ? 1 : ($7 | 0) >= 0 ? ($8 >>> 0 <= ($4 | 0) / -2 >>> 0 ? 0 : 1) : 0) {
21882    HEAP32[2896] = 68;
21883    __floatsitf($6 + 96 | 0, $5);
21884    __multf3($6 + 80 | 0, HEAP32[$6 + 96 >> 2], HEAP32[$6 + 100 >> 2], HEAP32[$6 + 104 >> 2], HEAP32[$6 + 108 >> 2], -1, -1, -1, 2147418111);
21885    __multf3($6 - -64 | 0, HEAP32[$6 + 80 >> 2], HEAP32[$6 + 84 >> 2], HEAP32[$6 + 88 >> 2], HEAP32[$6 + 92 >> 2], -1, -1, -1, 2147418111);
21886    $10 = HEAP32[$6 + 64 >> 2];
21887    $11 = HEAP32[$6 + 68 >> 2];
21888    $2 = HEAP32[$6 + 72 >> 2];
21889    $1 = HEAP32[$6 + 76 >> 2];
21890    break label$10;
21891   }
21892   $1 = $4 + -226 | 0;
21893   $2 = $8 >>> 0 >= $1 >>> 0 ? 0 : 1;
21894   $1 = $1 >> 31;
21895   if (($7 | 0) < ($1 | 0) ? 1 : ($7 | 0) <= ($1 | 0) ? $2 : 0) {
21896    HEAP32[2896] = 68;
21897    __floatsitf($6 + 144 | 0, $5);
21898    __multf3($6 + 128 | 0, HEAP32[$6 + 144 >> 2], HEAP32[$6 + 148 >> 2], HEAP32[$6 + 152 >> 2], HEAP32[$6 + 156 >> 2], 0, 0, 0, 65536);
21899    __multf3($6 + 112 | 0, HEAP32[$6 + 128 >> 2], HEAP32[$6 + 132 >> 2], HEAP32[$6 + 136 >> 2], HEAP32[$6 + 140 >> 2], 0, 0, 0, 65536);
21900    $10 = HEAP32[$6 + 112 >> 2];
21901    $11 = HEAP32[$6 + 116 >> 2];
21902    $2 = HEAP32[$6 + 120 >> 2];
21903    $1 = HEAP32[$6 + 124 >> 2];
21904    break label$10;
21905   }
21906   if ($17) {
21907    if (($17 | 0) <= 8) {
21908     $2 = ($6 + 784 | 0) + ($15 << 2) | 0;
21909     $1 = HEAP32[$2 >> 2];
21910     while (1) {
21911      $1 = Math_imul($1, 10);
21912      $17 = $17 + 1 | 0;
21913      if (($17 | 0) != 9) {
21914       continue
21915      }
21916      break;
21917     };
21918     HEAP32[$2 >> 2] = $1;
21919    }
21920    $15 = $15 + 1 | 0;
21921   }
21922   label$36 : {
21923    $14 = $8;
21924    if (($20 | 0) > ($8 | 0) | ($20 | 0) >= 9 | ($8 | 0) > 17) {
21925     break label$36
21926    }
21927    if (($14 | 0) == 9) {
21928     __floatsitf($6 + 192 | 0, $5);
21929     __floatunsitf($6 + 176 | 0, HEAP32[$6 + 784 >> 2]);
21930     __multf3($6 + 160 | 0, HEAP32[$6 + 192 >> 2], HEAP32[$6 + 196 >> 2], HEAP32[$6 + 200 >> 2], HEAP32[$6 + 204 >> 2], HEAP32[$6 + 176 >> 2], HEAP32[$6 + 180 >> 2], HEAP32[$6 + 184 >> 2], HEAP32[$6 + 188 >> 2]);
21931     $10 = HEAP32[$6 + 160 >> 2];
21932     $11 = HEAP32[$6 + 164 >> 2];
21933     $2 = HEAP32[$6 + 168 >> 2];
21934     $1 = HEAP32[$6 + 172 >> 2];
21935     break label$10;
21936    }
21937    if (($14 | 0) <= 8) {
21938     __floatsitf($6 + 272 | 0, $5);
21939     __floatunsitf($6 + 256 | 0, HEAP32[$6 + 784 >> 2]);
21940     __multf3($6 + 240 | 0, HEAP32[$6 + 272 >> 2], HEAP32[$6 + 276 >> 2], HEAP32[$6 + 280 >> 2], HEAP32[$6 + 284 >> 2], HEAP32[$6 + 256 >> 2], HEAP32[$6 + 260 >> 2], HEAP32[$6 + 264 >> 2], HEAP32[$6 + 268 >> 2]);
21941     __floatsitf($6 + 224 | 0, HEAP32[(0 - $14 << 2) + 10560 >> 2]);
21942     __divtf3($6 + 208 | 0, HEAP32[$6 + 240 >> 2], HEAP32[$6 + 244 >> 2], HEAP32[$6 + 248 >> 2], HEAP32[$6 + 252 >> 2], HEAP32[$6 + 224 >> 2], HEAP32[$6 + 228 >> 2], HEAP32[$6 + 232 >> 2], HEAP32[$6 + 236 >> 2]);
21943     $10 = HEAP32[$6 + 208 >> 2];
21944     $11 = HEAP32[$6 + 212 >> 2];
21945     $2 = HEAP32[$6 + 216 >> 2];
21946     $1 = HEAP32[$6 + 220 >> 2];
21947     break label$10;
21948    }
21949    $1 = (Math_imul($14, -3) + $3 | 0) + 27 | 0;
21950    $2 = HEAP32[$6 + 784 >> 2];
21951    if ($2 >>> $1 | 0 ? ($1 | 0) <= 30 : 0) {
21952     break label$36
21953    }
21954    __floatsitf($6 + 352 | 0, $5);
21955    __floatunsitf($6 + 336 | 0, $2);
21956    __multf3($6 + 320 | 0, HEAP32[$6 + 352 >> 2], HEAP32[$6 + 356 >> 2], HEAP32[$6 + 360 >> 2], HEAP32[$6 + 364 >> 2], HEAP32[$6 + 336 >> 2], HEAP32[$6 + 340 >> 2], HEAP32[$6 + 344 >> 2], HEAP32[$6 + 348 >> 2]);
21957    __floatsitf($6 + 304 | 0, HEAP32[($14 << 2) + 10488 >> 2]);
21958    __multf3($6 + 288 | 0, HEAP32[$6 + 320 >> 2], HEAP32[$6 + 324 >> 2], HEAP32[$6 + 328 >> 2], HEAP32[$6 + 332 >> 2], HEAP32[$6 + 304 >> 2], HEAP32[$6 + 308 >> 2], HEAP32[$6 + 312 >> 2], HEAP32[$6 + 316 >> 2]);
21959    $10 = HEAP32[$6 + 288 >> 2];
21960    $11 = HEAP32[$6 + 292 >> 2];
21961    $2 = HEAP32[$6 + 296 >> 2];
21962    $1 = HEAP32[$6 + 300 >> 2];
21963    break label$10;
21964   }
21965   while (1) {
21966    $2 = $15;
21967    $15 = $2 + -1 | 0;
21968    if (!HEAP32[($6 + 784 | 0) + ($15 << 2) >> 2]) {
21969     continue
21970    }
21971    break;
21972   };
21973   $17 = 0;
21974   $1 = ($14 | 0) % 9 | 0;
21975   label$40 : {
21976    if (!$1) {
21977     $9 = 0;
21978     break label$40;
21979    }
21980    $13 = ($14 | 0) > -1 ? $1 : $1 + 9 | 0;
21981    label$42 : {
21982     if (!$2) {
21983      $9 = 0;
21984      $2 = 0;
21985      break label$42;
21986     }
21987     $8 = HEAP32[(0 - $13 << 2) + 10560 >> 2];
21988     $10 = 1e9 / ($8 | 0) | 0;
21989     $12 = 0;
21990     $1 = 0;
21991     $9 = 0;
21992     while (1) {
21993      $11 = ($6 + 784 | 0) + ($1 << 2) | 0;
21994      $15 = HEAP32[$11 >> 2];
21995      $16 = ($15 >>> 0) / ($8 >>> 0) | 0;
21996      $7 = $12 + $16 | 0;
21997      HEAP32[$11 >> 2] = $7;
21998      $7 = !$7 & ($1 | 0) == ($9 | 0);
21999      $9 = $7 ? $9 + 1 & 2047 : $9;
22000      $14 = $7 ? $14 + -9 | 0 : $14;
22001      $12 = Math_imul($10, $15 - Math_imul($8, $16) | 0);
22002      $1 = $1 + 1 | 0;
22003      if (($2 | 0) != ($1 | 0)) {
22004       continue
22005      }
22006      break;
22007     };
22008     if (!$12) {
22009      break label$42
22010     }
22011     HEAP32[($6 + 784 | 0) + ($2 << 2) >> 2] = $12;
22012     $2 = $2 + 1 | 0;
22013    }
22014    $14 = ($14 - $13 | 0) + 9 | 0;
22015   }
22016   while (1) {
22017    $11 = ($6 + 784 | 0) + ($9 << 2) | 0;
22018    label$46 : {
22019     while (1) {
22020      if (($14 | 0) != 36 | HEAPU32[$11 >> 2] >= 10384593 ? ($14 | 0) >= 36 : 0) {
22021       break label$46
22022      }
22023      $15 = $2 + 2047 | 0;
22024      $12 = 0;
22025      $13 = $2;
22026      while (1) {
22027       $2 = $13;
22028       $10 = $15 & 2047;
22029       $13 = ($6 + 784 | 0) + ($10 << 2) | 0;
22030       $1 = HEAP32[$13 >> 2];
22031       $7 = $1 >>> 3 | 0;
22032       $1 = $1 << 29;
22033       $8 = $1 + $12 | 0;
22034       if ($8 >>> 0 < $1 >>> 0) {
22035        $7 = $7 + 1 | 0
22036       }
22037       $1 = 0;
22038       if (!(!$7 & $8 >>> 0 < 1000000001 | $7 >>> 0 < 0)) {
22039        $1 = __wasm_i64_udiv($8, $7, 1e9);
22040        $8 = $8 - __wasm_i64_mul($1, i64toi32_i32$HIGH_BITS, 1e9, 0) | 0;
22041       }
22042       $12 = $1;
22043       HEAP32[$13 >> 2] = $8;
22044       $13 = ($10 | 0) != ($2 + -1 & 2047) ? $2 : ($9 | 0) == ($10 | 0) ? $2 : $8 ? $2 : $10;
22045       $15 = $10 + -1 | 0;
22046       if (($9 | 0) != ($10 | 0)) {
22047        continue
22048       }
22049       break;
22050      };
22051      $17 = $17 + -29 | 0;
22052      if (!$12) {
22053       continue
22054      }
22055      break;
22056     };
22057     $9 = $9 + -1 & 2047;
22058     if (($13 | 0) == ($9 | 0)) {
22059      $1 = ($6 + 784 | 0) + (($13 + 2046 & 2047) << 2) | 0;
22060      $2 = $13 + -1 & 2047;
22061      HEAP32[$1 >> 2] = HEAP32[$1 >> 2] | HEAP32[($6 + 784 | 0) + ($2 << 2) >> 2];
22062     }
22063     $14 = $14 + 9 | 0;
22064     HEAP32[($6 + 784 | 0) + ($9 << 2) >> 2] = $12;
22065     continue;
22066    }
22067    break;
22068   };
22069   label$52 : {
22070    label$53 : while (1) {
22071     $8 = $2 + 1 & 2047;
22072     $10 = ($6 + 784 | 0) + (($2 + -1 & 2047) << 2) | 0;
22073     while (1) {
22074      $7 = ($14 | 0) > 45 ? 9 : 1;
22075      label$55 : {
22076       while (1) {
22077        $13 = $9;
22078        $1 = 0;
22079        label$57 : {
22080         while (1) {
22081          label$59 : {
22082           $9 = $1 + $13 & 2047;
22083           if (($9 | 0) == ($2 | 0)) {
22084            break label$59
22085           }
22086           $9 = HEAP32[($6 + 784 | 0) + ($9 << 2) >> 2];
22087           $11 = HEAP32[($1 << 2) + 10512 >> 2];
22088           if ($9 >>> 0 < $11 >>> 0) {
22089            break label$59
22090           }
22091           if ($9 >>> 0 > $11 >>> 0) {
22092            break label$57
22093           }
22094           $1 = $1 + 1 | 0;
22095           if (($1 | 0) != 4) {
22096            continue
22097           }
22098          }
22099          break;
22100         };
22101         if (($14 | 0) != 36) {
22102          break label$57
22103         }
22104         $8 = 0;
22105         $7 = 0;
22106         $1 = 0;
22107         $10 = 0;
22108         $11 = 0;
22109         while (1) {
22110          $9 = $1 + $13 & 2047;
22111          if (($9 | 0) == ($2 | 0)) {
22112           $2 = $2 + 1 & 2047;
22113           HEAP32[(($2 << 2) + $6 | 0) + 780 >> 2] = 0;
22114          }
22115          __multf3($6 + 768 | 0, $8, $7, $10, $11, 0, 0, 1342177280, 1075633366);
22116          __floatunsitf($6 + 752 | 0, HEAP32[($6 + 784 | 0) + ($9 << 2) >> 2]);
22117          __addtf3($6 + 736 | 0, HEAP32[$6 + 768 >> 2], HEAP32[$6 + 772 >> 2], HEAP32[$6 + 776 >> 2], HEAP32[$6 + 780 >> 2], HEAP32[$6 + 752 >> 2], HEAP32[$6 + 756 >> 2], HEAP32[$6 + 760 >> 2], HEAP32[$6 + 764 >> 2]);
22118          $10 = HEAP32[$6 + 744 >> 2];
22119          $11 = HEAP32[$6 + 748 >> 2];
22120          $8 = HEAP32[$6 + 736 >> 2];
22121          $7 = HEAP32[$6 + 740 >> 2];
22122          $1 = $1 + 1 | 0;
22123          if (($1 | 0) != 4) {
22124           continue
22125          }
22126          break;
22127         };
22128         __floatsitf($6 + 720 | 0, $5);
22129         __multf3($6 + 704 | 0, $8, $7, $10, $11, HEAP32[$6 + 720 >> 2], HEAP32[$6 + 724 >> 2], HEAP32[$6 + 728 >> 2], HEAP32[$6 + 732 >> 2]);
22130         $10 = HEAP32[$6 + 712 >> 2];
22131         $11 = HEAP32[$6 + 716 >> 2];
22132         $8 = 0;
22133         $7 = 0;
22134         $12 = HEAP32[$6 + 704 >> 2];
22135         $16 = HEAP32[$6 + 708 >> 2];
22136         $23 = $17 + 113 | 0;
22137         $4 = $23 - $4 | 0;
22138         $20 = ($4 | 0) < ($3 | 0);
22139         $1 = $20 ? (($4 | 0) > 0 ? $4 : 0) : $3;
22140         if (($1 | 0) <= 112) {
22141          break label$55
22142         }
22143         $14 = 0;
22144         $15 = 0;
22145         $9 = 0;
22146         $3 = 0;
22147         break label$52;
22148        }
22149        $17 = $7 + $17 | 0;
22150        $9 = $2;
22151        if (($2 | 0) == ($13 | 0)) {
22152         continue
22153        }
22154        break;
22155       };
22156       $11 = 1e9 >>> $7 | 0;
22157       $12 = -1 << $7 ^ -1;
22158       $1 = 0;
22159       $9 = $13;
22160       while (1) {
22161        $15 = ($6 + 784 | 0) + ($13 << 2) | 0;
22162        $16 = HEAP32[$15 >> 2];
22163        $1 = $1 + ($16 >>> $7 | 0) | 0;
22164        HEAP32[$15 >> 2] = $1;
22165        $1 = !$1 & ($9 | 0) == ($13 | 0);
22166        $9 = $1 ? $9 + 1 & 2047 : $9;
22167        $14 = $1 ? $14 + -9 | 0 : $14;
22168        $1 = Math_imul($11, $12 & $16);
22169        $13 = $13 + 1 & 2047;
22170        if (($13 | 0) != ($2 | 0)) {
22171         continue
22172        }
22173        break;
22174       };
22175       if (!$1) {
22176        continue
22177       }
22178       if (($8 | 0) != ($9 | 0)) {
22179        HEAP32[($6 + 784 | 0) + ($2 << 2) >> 2] = $1;
22180        $2 = $8;
22181        continue label$53;
22182       }
22183       HEAP32[$10 >> 2] = HEAP32[$10 >> 2] | 1;
22184       $9 = $8;
22185       continue;
22186      }
22187      break;
22188     };
22189     break;
22190    };
22191    __extenddftf2($6 + 656 | 0, scalbn(1.0, 225 - $1 | 0));
22192    copysignl($6 + 688 | 0, HEAP32[$6 + 656 >> 2], HEAP32[$6 + 660 >> 2], HEAP32[$6 + 664 >> 2], HEAP32[$6 + 668 >> 2], $12, $16, $10, $11);
22193    $9 = HEAP32[$6 + 696 >> 2];
22194    $3 = HEAP32[$6 + 700 >> 2];
22195    $14 = HEAP32[$6 + 688 >> 2];
22196    $15 = HEAP32[$6 + 692 >> 2];
22197    __extenddftf2($6 + 640 | 0, scalbn(1.0, 113 - $1 | 0));
22198    fmodl($6 + 672 | 0, $12, $16, $10, $11, HEAP32[$6 + 640 >> 2], HEAP32[$6 + 644 >> 2], HEAP32[$6 + 648 >> 2], HEAP32[$6 + 652 >> 2]);
22199    $8 = HEAP32[$6 + 672 >> 2];
22200    $7 = HEAP32[$6 + 676 >> 2];
22201    $18 = HEAP32[$6 + 680 >> 2];
22202    $19 = HEAP32[$6 + 684 >> 2];
22203    __subtf3($6 + 624 | 0, $12, $16, $10, $11, $8, $7, $18, $19);
22204    __addtf3($6 + 608 | 0, $14, $15, $9, $3, HEAP32[$6 + 624 >> 2], HEAP32[$6 + 628 >> 2], HEAP32[$6 + 632 >> 2], HEAP32[$6 + 636 >> 2]);
22205    $10 = HEAP32[$6 + 616 >> 2];
22206    $11 = HEAP32[$6 + 620 >> 2];
22207    $12 = HEAP32[$6 + 608 >> 2];
22208    $16 = HEAP32[$6 + 612 >> 2];
22209   }
22210   $21 = $13 + 4 & 2047;
22211   label$64 : {
22212    if (($21 | 0) == ($2 | 0)) {
22213     break label$64
22214    }
22215    $21 = HEAP32[($6 + 784 | 0) + ($21 << 2) >> 2];
22216    label$65 : {
22217     if ($21 >>> 0 <= 499999999) {
22218      if (($13 + 5 & 2047) == ($2 | 0) ? !$21 : 0) {
22219       break label$65
22220      }
22221      __extenddftf2($6 + 496 | 0, +($5 | 0) * .25);
22222      __addtf3($6 + 480 | 0, $8, $7, $18, $19, HEAP32[$6 + 496 >> 2], HEAP32[$6 + 500 >> 2], HEAP32[$6 + 504 >> 2], HEAP32[$6 + 508 >> 2]);
22223      $18 = HEAP32[$6 + 488 >> 2];
22224      $19 = HEAP32[$6 + 492 >> 2];
22225      $8 = HEAP32[$6 + 480 >> 2];
22226      $7 = HEAP32[$6 + 484 >> 2];
22227      break label$65;
22228     }
22229     if (($21 | 0) != 5e8) {
22230      __extenddftf2($6 + 592 | 0, +($5 | 0) * .75);
22231      __addtf3($6 + 576 | 0, $8, $7, $18, $19, HEAP32[$6 + 592 >> 2], HEAP32[$6 + 596 >> 2], HEAP32[$6 + 600 >> 2], HEAP32[$6 + 604 >> 2]);
22232      $18 = HEAP32[$6 + 584 >> 2];
22233      $19 = HEAP32[$6 + 588 >> 2];
22234      $8 = HEAP32[$6 + 576 >> 2];
22235      $7 = HEAP32[$6 + 580 >> 2];
22236      break label$65;
22237     }
22238     $24 = +($5 | 0);
22239     if (($13 + 5 & 2047) == ($2 | 0)) {
22240      __extenddftf2($6 + 528 | 0, $24 * .5);
22241      __addtf3($6 + 512 | 0, $8, $7, $18, $19, HEAP32[$6 + 528 >> 2], HEAP32[$6 + 532 >> 2], HEAP32[$6 + 536 >> 2], HEAP32[$6 + 540 >> 2]);
22242      $18 = HEAP32[$6 + 520 >> 2];
22243      $19 = HEAP32[$6 + 524 >> 2];
22244      $8 = HEAP32[$6 + 512 >> 2];
22245      $7 = HEAP32[$6 + 516 >> 2];
22246      break label$65;
22247     }
22248     __extenddftf2($6 + 560 | 0, $24 * .75);
22249     __addtf3($6 + 544 | 0, $8, $7, $18, $19, HEAP32[$6 + 560 >> 2], HEAP32[$6 + 564 >> 2], HEAP32[$6 + 568 >> 2], HEAP32[$6 + 572 >> 2]);
22250     $18 = HEAP32[$6 + 552 >> 2];
22251     $19 = HEAP32[$6 + 556 >> 2];
22252     $8 = HEAP32[$6 + 544 >> 2];
22253     $7 = HEAP32[$6 + 548 >> 2];
22254    }
22255    if (($1 | 0) > 111) {
22256     break label$64
22257    }
22258    fmodl($6 + 464 | 0, $8, $7, $18, $19, 0, 0, 0, 1073676288);
22259    if (__letf2(HEAP32[$6 + 464 >> 2], HEAP32[$6 + 468 >> 2], HEAP32[$6 + 472 >> 2], HEAP32[$6 + 476 >> 2], 0, 0, 0, 0)) {
22260     break label$64
22261    }
22262    __addtf3($6 + 448 | 0, $8, $7, $18, $19, 0, 0, 0, 1073676288);
22263    $18 = HEAP32[$6 + 456 >> 2];
22264    $19 = HEAP32[$6 + 460 >> 2];
22265    $8 = HEAP32[$6 + 448 >> 2];
22266    $7 = HEAP32[$6 + 452 >> 2];
22267   }
22268   __addtf3($6 + 432 | 0, $12, $16, $10, $11, $8, $7, $18, $19);
22269   __subtf3($6 + 416 | 0, HEAP32[$6 + 432 >> 2], HEAP32[$6 + 436 >> 2], HEAP32[$6 + 440 >> 2], HEAP32[$6 + 444 >> 2], $14, $15, $9, $3);
22270   $10 = HEAP32[$6 + 424 >> 2];
22271   $11 = HEAP32[$6 + 428 >> 2];
22272   $12 = HEAP32[$6 + 416 >> 2];
22273   $16 = HEAP32[$6 + 420 >> 2];
22274   label$69 : {
22275    if (($23 & 2147483647) <= (-2 - $22 | 0)) {
22276     break label$69
22277    }
22278    $2 = $6 + 400 | 0;
22279    HEAP32[$2 + 8 >> 2] = $10;
22280    HEAP32[$2 + 12 >> 2] = $11 & 2147483647;
22281    HEAP32[$2 >> 2] = $12;
22282    HEAP32[$2 + 4 >> 2] = $16;
22283    __multf3($6 + 384 | 0, $12, $16, $10, $11, 0, 0, 0, 1073610752);
22284    $3 = __getf2(HEAP32[$6 + 400 >> 2], HEAP32[$6 + 404 >> 2], HEAP32[$6 + 408 >> 2], HEAP32[$6 + 412 >> 2], 1081081856);
22285    $2 = ($3 | 0) < 0;
22286    $10 = $2 ? $10 : HEAP32[$6 + 392 >> 2];
22287    $11 = $2 ? $11 : HEAP32[$6 + 396 >> 2];
22288    $12 = $2 ? $12 : HEAP32[$6 + 384 >> 2];
22289    $16 = $2 ? $16 : HEAP32[$6 + 388 >> 2];
22290    $17 = (($3 | 0) > -1) + $17 | 0;
22291    if (wasm2js_i32$0 = !($20 & ($2 | ($1 | 0) != ($4 | 0)) & (__letf2($8, $7, $18, $19, 0, 0, 0, 0) | 0) != 0), wasm2js_i32$1 = 0, wasm2js_i32$2 = ($17 + 110 | 0) <= ($25 | 0), wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) {
22292     break label$69
22293    }
22294    HEAP32[2896] = 68;
22295   }
22296   scalbnl($6 + 368 | 0, $12, $16, $10, $11, $17);
22297   $10 = HEAP32[$6 + 368 >> 2];
22298   $11 = HEAP32[$6 + 372 >> 2];
22299   $2 = HEAP32[$6 + 376 >> 2];
22300   $1 = HEAP32[$6 + 380 >> 2];
22301  }
22302  HEAP32[$0 >> 2] = $10;
22303  HEAP32[$0 + 4 >> 2] = $11;
22304  HEAP32[$0 + 8 >> 2] = $2;
22305  HEAP32[$0 + 12 >> 2] = $1;
22306  global$0 = $6 + 8976 | 0;
22307 }
22308
22309 function scanexp($0) {
22310  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0;
22311  label$1 : {
22312   label$2 : {
22313    label$3 : {
22314     $3 = HEAP32[$0 + 4 >> 2];
22315     label$4 : {
22316      if ($3 >>> 0 < HEAPU32[$0 + 104 >> 2]) {
22317       HEAP32[$0 + 4 >> 2] = $3 + 1;
22318       $2 = HEAPU8[$3 | 0];
22319       break label$4;
22320      }
22321      $2 = __shgetc($0);
22322     }
22323     switch ($2 + -43 | 0) {
22324     case 0:
22325     case 2:
22326      break label$2;
22327     default:
22328      break label$3;
22329     };
22330    }
22331    $1 = $2 + -48 | 0;
22332    break label$1;
22333   }
22334   $5 = ($2 | 0) == 45;
22335   $3 = HEAP32[$0 + 4 >> 2];
22336   label$6 : {
22337    if ($3 >>> 0 < HEAPU32[$0 + 104 >> 2]) {
22338     HEAP32[$0 + 4 >> 2] = $3 + 1;
22339     $2 = HEAPU8[$3 | 0];
22340     break label$6;
22341    }
22342    $2 = __shgetc($0);
22343   }
22344   $1 = $2 + -48 | 0;
22345   if (!($1 >>> 0 < 10 | !HEAP32[$0 + 104 >> 2])) {
22346    HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + -1
22347   }
22348  }
22349  label$9 : {
22350   if ($1 >>> 0 < 10) {
22351    $1 = 0;
22352    while (1) {
22353     $1 = Math_imul($1, 10) + $2 | 0;
22354     $3 = HEAP32[$0 + 4 >> 2];
22355     label$12 : {
22356      if ($3 >>> 0 < HEAPU32[$0 + 104 >> 2]) {
22357       HEAP32[$0 + 4 >> 2] = $3 + 1;
22358       $2 = HEAPU8[$3 | 0];
22359       break label$12;
22360      }
22361      $2 = __shgetc($0);
22362     }
22363     $4 = $2 + -48 | 0;
22364     $1 = $1 + -48 | 0;
22365     if (($1 | 0) < 214748364 ? $4 >>> 0 <= 9 : 0) {
22366      continue
22367     }
22368     break;
22369    };
22370    $3 = $1;
22371    $1 = $1 >> 31;
22372    label$14 : {
22373     if ($4 >>> 0 >= 10) {
22374      break label$14
22375     }
22376     while (1) {
22377      $1 = __wasm_i64_mul($3, $1, 10, 0);
22378      $3 = $1 + $2 | 0;
22379      $2 = i64toi32_i32$HIGH_BITS;
22380      $4 = $3 >>> 0 < $1 >>> 0 ? $2 + 1 | 0 : $2;
22381      $1 = HEAP32[$0 + 4 >> 2];
22382      label$16 : {
22383       if ($1 >>> 0 < HEAPU32[$0 + 104 >> 2]) {
22384        HEAP32[$0 + 4 >> 2] = $1 + 1;
22385        $2 = HEAPU8[$1 | 0];
22386        break label$16;
22387       }
22388       $2 = __shgetc($0);
22389      }
22390      $1 = $4 + -1 | 0;
22391      $3 = $3 + -48 | 0;
22392      if ($3 >>> 0 < 4294967248) {
22393       $1 = $1 + 1 | 0
22394      }
22395      $4 = $2 + -48 | 0;
22396      if ($4 >>> 0 > 9) {
22397       break label$14
22398      }
22399      if (($1 | 0) < 21474836 ? 1 : ($1 | 0) <= 21474836 ? ($3 >>> 0 >= 2061584302 ? 0 : 1) : 0) {
22400       continue
22401      }
22402      break;
22403     };
22404    }
22405    if ($4 >>> 0 < 10) {
22406     while (1) {
22407      $2 = HEAP32[$0 + 4 >> 2];
22408      label$20 : {
22409       if ($2 >>> 0 < HEAPU32[$0 + 104 >> 2]) {
22410        HEAP32[$0 + 4 >> 2] = $2 + 1;
22411        $2 = HEAPU8[$2 | 0];
22412        break label$20;
22413       }
22414       $2 = __shgetc($0);
22415      }
22416      if ($2 + -48 >>> 0 < 10) {
22417       continue
22418      }
22419      break;
22420     }
22421    }
22422    if (HEAP32[$0 + 104 >> 2]) {
22423     HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + -1
22424    }
22425    $0 = $3;
22426    $3 = $5 ? 0 - $0 | 0 : $0;
22427    $1 = $5 ? 0 - ($1 + (0 < $0 >>> 0) | 0) | 0 : $1;
22428    break label$9;
22429   }
22430   $3 = 0;
22431   $1 = -2147483648;
22432   if (!HEAP32[$0 + 104 >> 2]) {
22433    break label$9
22434   }
22435   HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + -1;
22436   i64toi32_i32$HIGH_BITS = -2147483648;
22437   return 0;
22438  }
22439  i64toi32_i32$HIGH_BITS = $1;
22440  return $3;
22441 }
22442
22443 function strtox($0, $1) {
22444  var $2 = 0, $3 = 0, $4 = 0;
22445  $2 = global$0 - 160 | 0;
22446  global$0 = $2;
22447  memset($2 + 16 | 0, 144);
22448  HEAP32[$2 + 92 >> 2] = -1;
22449  HEAP32[$2 + 60 >> 2] = $1;
22450  HEAP32[$2 + 24 >> 2] = -1;
22451  HEAP32[$2 + 20 >> 2] = $1;
22452  __shlim($2 + 16 | 0);
22453  __floatscan($2, $2 + 16 | 0);
22454  $1 = HEAP32[$2 + 8 >> 2];
22455  $3 = HEAP32[$2 + 12 >> 2];
22456  $4 = HEAP32[$2 + 4 >> 2];
22457  HEAP32[$0 >> 2] = HEAP32[$2 >> 2];
22458  HEAP32[$0 + 4 >> 2] = $4;
22459  HEAP32[$0 + 8 >> 2] = $1;
22460  HEAP32[$0 + 12 >> 2] = $3;
22461  global$0 = $2 + 160 | 0;
22462 }
22463
22464 function strtod($0) {
22465  var $1 = 0, $2 = 0.0;
22466  $1 = global$0 - 16 | 0;
22467  global$0 = $1;
22468  strtox($1, $0);
22469  $2 = __trunctfdf2(HEAP32[$1 >> 2], HEAP32[$1 + 4 >> 2], HEAP32[$1 + 8 >> 2], HEAP32[$1 + 12 >> 2]);
22470  global$0 = $1 + 16 | 0;
22471  return $2;
22472 }
22473
22474 function FLAC__stream_encoder_new() {
22475  var $0 = 0, $1 = 0, $2 = 0, $3 = 0;
22476  $1 = dlcalloc(1, 8);
22477  if (!$1) {
22478   return 0
22479  }
22480  $0 = dlcalloc(1, 1032);
22481  HEAP32[$1 >> 2] = $0;
22482  label$2 : {
22483   if (!$0) {
22484    break label$2
22485   }
22486   $3 = dlcalloc(1, 11856);
22487   HEAP32[$1 + 4 >> 2] = $3;
22488   if (!$3) {
22489    dlfree($0);
22490    break label$2;
22491   }
22492   $0 = dlcalloc(1, 20);
22493   $3 = HEAP32[$1 + 4 >> 2];
22494   HEAP32[$3 + 6856 >> 2] = $0;
22495   if (!$0) {
22496    dlfree($3);
22497    dlfree(HEAP32[$1 >> 2]);
22498    break label$2;
22499   }
22500   HEAP32[$3 + 7296 >> 2] = 0;
22501   $0 = HEAP32[$1 >> 2];
22502   HEAP32[$0 + 44 >> 2] = 13;
22503   HEAP32[$0 + 48 >> 2] = 1056964608;
22504   HEAP32[$0 + 36 >> 2] = 0;
22505   HEAP32[$0 + 40 >> 2] = 1;
22506   HEAP32[$0 + 28 >> 2] = 16;
22507   HEAP32[$0 + 32 >> 2] = 44100;
22508   HEAP32[$0 + 20 >> 2] = 0;
22509   HEAP32[$0 + 24 >> 2] = 2;
22510   HEAP32[$0 + 12 >> 2] = 1;
22511   HEAP32[$0 + 16 >> 2] = 0;
22512   HEAP32[$0 + 4 >> 2] = 0;
22513   HEAP32[$0 + 8 >> 2] = 1;
22514   $0 = HEAP32[$1 >> 2];
22515   HEAP32[$0 + 592 >> 2] = 0;
22516   HEAP32[$0 + 596 >> 2] = 0;
22517   HEAP32[$0 + 556 >> 2] = 0;
22518   HEAP32[$0 + 560 >> 2] = 0;
22519   HEAP32[$0 + 564 >> 2] = 0;
22520   HEAP32[$0 + 568 >> 2] = 0;
22521   HEAP32[$0 + 572 >> 2] = 0;
22522   HEAP32[$0 + 576 >> 2] = 0;
22523   HEAP32[$0 + 580 >> 2] = 0;
22524   HEAP32[$0 + 584 >> 2] = 0;
22525   HEAP32[$0 + 600 >> 2] = 0;
22526   HEAP32[$0 + 604 >> 2] = 0;
22527   $3 = HEAP32[$1 + 4 >> 2];
22528   $2 = $3;
22529   HEAP32[$2 + 7248 >> 2] = 0;
22530   HEAP32[$2 + 7252 >> 2] = 0;
22531   HEAP32[$2 + 7048 >> 2] = 0;
22532   $2 = $2 + 7256 | 0;
22533   HEAP32[$2 >> 2] = 0;
22534   HEAP32[$2 + 4 >> 2] = 0;
22535   $2 = $3 + 7264 | 0;
22536   HEAP32[$2 >> 2] = 0;
22537   HEAP32[$2 + 4 >> 2] = 0;
22538   $2 = $3 + 7272 | 0;
22539   HEAP32[$2 >> 2] = 0;
22540   HEAP32[$2 + 4 >> 2] = 0;
22541   $2 = $3 + 7280 | 0;
22542   HEAP32[$2 >> 2] = 0;
22543   HEAP32[$2 + 4 >> 2] = 0;
22544   HEAP32[$3 + 7288 >> 2] = 0;
22545   FLAC__ogg_encoder_aspect_set_defaults($0 + 632 | 0);
22546   $0 = HEAP32[$1 >> 2];
22547   label$5 : {
22548    if (HEAP32[$0 >> 2] != 1) {
22549     break label$5
22550    }
22551    HEAP32[$0 + 16 >> 2] = 1;
22552    HEAP32[$0 + 20 >> 2] = 0;
22553    FLAC__stream_encoder_set_apodization($1, 10777);
22554    $0 = HEAP32[$1 >> 2];
22555    if (HEAP32[$0 >> 2] != 1) {
22556     break label$5
22557    }
22558    HEAP32[$0 + 576 >> 2] = 0;
22559    HEAP32[$0 + 580 >> 2] = 5;
22560    HEAP32[$0 + 564 >> 2] = 0;
22561    HEAP32[$0 + 568 >> 2] = 0;
22562    HEAP32[$0 + 556 >> 2] = 8;
22563    HEAP32[$0 + 560 >> 2] = 0;
22564   }
22565   $0 = HEAP32[$1 + 4 >> 2];
22566   HEAP32[$0 + 11848 >> 2] = 0;
22567   HEAP32[$0 + 6176 >> 2] = $0 + 336;
22568   $0 = HEAP32[$1 + 4 >> 2];
22569   HEAP32[$0 + 6180 >> 2] = $0 + 628;
22570   $0 = HEAP32[$1 + 4 >> 2];
22571   HEAP32[$0 + 6184 >> 2] = $0 + 920;
22572   $0 = HEAP32[$1 + 4 >> 2];
22573   HEAP32[$0 + 6188 >> 2] = $0 + 1212;
22574   $0 = HEAP32[$1 + 4 >> 2];
22575   HEAP32[$0 + 6192 >> 2] = $0 + 1504;
22576   $0 = HEAP32[$1 + 4 >> 2];
22577   HEAP32[$0 + 6196 >> 2] = $0 + 1796;
22578   $0 = HEAP32[$1 + 4 >> 2];
22579   HEAP32[$0 + 6200 >> 2] = $0 + 2088;
22580   $0 = HEAP32[$1 + 4 >> 2];
22581   HEAP32[$0 + 6204 >> 2] = $0 + 2380;
22582   $0 = HEAP32[$1 + 4 >> 2];
22583   HEAP32[$0 + 6208 >> 2] = $0 + 2672;
22584   $0 = HEAP32[$1 + 4 >> 2];
22585   HEAP32[$0 + 6212 >> 2] = $0 + 2964;
22586   $0 = HEAP32[$1 + 4 >> 2];
22587   HEAP32[$0 + 6216 >> 2] = $0 + 3256;
22588   $0 = HEAP32[$1 + 4 >> 2];
22589   HEAP32[$0 + 6220 >> 2] = $0 + 3548;
22590   $0 = HEAP32[$1 + 4 >> 2];
22591   HEAP32[$0 + 6224 >> 2] = $0 + 3840;
22592   $0 = HEAP32[$1 + 4 >> 2];
22593   HEAP32[$0 + 6228 >> 2] = $0 + 4132;
22594   $0 = HEAP32[$1 + 4 >> 2];
22595   HEAP32[$0 + 6232 >> 2] = $0 + 4424;
22596   $0 = HEAP32[$1 + 4 >> 2];
22597   HEAP32[$0 + 6236 >> 2] = $0 + 4716;
22598   $0 = HEAP32[$1 + 4 >> 2];
22599   HEAP32[$0 + 6240 >> 2] = $0 + 5008;
22600   $0 = HEAP32[$1 + 4 >> 2];
22601   HEAP32[$0 + 6244 >> 2] = $0 + 5300;
22602   $0 = HEAP32[$1 + 4 >> 2];
22603   HEAP32[$0 + 6248 >> 2] = $0 + 5592;
22604   $0 = HEAP32[$1 + 4 >> 2];
22605   HEAP32[$0 + 6252 >> 2] = $0 + 5884;
22606   $0 = HEAP32[$1 + 4 >> 2];
22607   HEAP32[$0 + 6640 >> 2] = $0 + 6256;
22608   $0 = HEAP32[$1 + 4 >> 2];
22609   HEAP32[$0 + 6644 >> 2] = $0 + 6268;
22610   $0 = HEAP32[$1 + 4 >> 2];
22611   HEAP32[$0 + 6648 >> 2] = $0 + 6280;
22612   $0 = HEAP32[$1 + 4 >> 2];
22613   HEAP32[$0 + 6652 >> 2] = $0 + 6292;
22614   $0 = HEAP32[$1 + 4 >> 2];
22615   HEAP32[$0 + 6656 >> 2] = $0 + 6304;
22616   $0 = HEAP32[$1 + 4 >> 2];
22617   HEAP32[$0 + 6660 >> 2] = $0 + 6316;
22618   $0 = HEAP32[$1 + 4 >> 2];
22619   HEAP32[$0 + 6664 >> 2] = $0 + 6328;
22620   $0 = HEAP32[$1 + 4 >> 2];
22621   HEAP32[$0 + 6668 >> 2] = $0 + 6340;
22622   $0 = HEAP32[$1 + 4 >> 2];
22623   HEAP32[$0 + 6672 >> 2] = $0 + 6352;
22624   $0 = HEAP32[$1 + 4 >> 2];
22625   HEAP32[$0 + 6676 >> 2] = $0 + 6364;
22626   $0 = HEAP32[$1 + 4 >> 2];
22627   HEAP32[$0 + 6680 >> 2] = $0 + 6376;
22628   $0 = HEAP32[$1 + 4 >> 2];
22629   HEAP32[$0 + 6684 >> 2] = $0 + 6388;
22630   $0 = HEAP32[$1 + 4 >> 2];
22631   HEAP32[$0 + 6688 >> 2] = $0 + 6400;
22632   $0 = HEAP32[$1 + 4 >> 2];
22633   HEAP32[$0 + 6692 >> 2] = $0 + 6412;
22634   $0 = HEAP32[$1 + 4 >> 2];
22635   HEAP32[$0 + 6696 >> 2] = $0 + 6424;
22636   $0 = HEAP32[$1 + 4 >> 2];
22637   HEAP32[$0 + 6700 >> 2] = $0 + 6436;
22638   $0 = HEAP32[$1 + 4 >> 2];
22639   HEAP32[$0 + 6704 >> 2] = $0 + 6448;
22640   $0 = HEAP32[$1 + 4 >> 2];
22641   HEAP32[$0 + 6708 >> 2] = $0 + 6460;
22642   $0 = HEAP32[$1 + 4 >> 2];
22643   HEAP32[$0 + 6712 >> 2] = $0 + 6472;
22644   $0 = HEAP32[$1 + 4 >> 2];
22645   HEAP32[$0 + 6716 >> 2] = $0 + 6484;
22646   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6256 | 0);
22647   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6268 | 0);
22648   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6280 | 0);
22649   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6292 | 0);
22650   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6304 | 0);
22651   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6316 | 0);
22652   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6328 | 0);
22653   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6340 | 0);
22654   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6352 | 0);
22655   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6364 | 0);
22656   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6376 | 0);
22657   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6388 | 0);
22658   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6400 | 0);
22659   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6412 | 0);
22660   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6424 | 0);
22661   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6436 | 0);
22662   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6448 | 0);
22663   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6460 | 0);
22664   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6472 | 0);
22665   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6484 | 0);
22666   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 11724 | 0);
22667   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 11736 | 0);
22668   HEAP32[HEAP32[$1 >> 2] >> 2] = 1;
22669   return $1 | 0;
22670  }
22671  dlfree($1);
22672  return 0;
22673 }
22674
22675 function FLAC__stream_encoder_set_apodization($0, $1) {
22676  var $2 = 0, $3 = 0, $4 = 0, $5 = Math_fround(0), $6 = Math_fround(0), $7 = 0, $8 = 0.0, $9 = Math_fround(0), $10 = 0, $11 = 0;
22677  $2 = HEAP32[$0 >> 2];
22678  label$1 : {
22679   if (HEAP32[$2 >> 2] != 1) {
22680    break label$1
22681   }
22682   HEAP32[$2 + 40 >> 2] = 0;
22683   while (1) {
22684    label$3 : {
22685     label$4 : {
22686      label$5 : {
22687       label$6 : {
22688        label$7 : {
22689         label$8 : {
22690          label$9 : {
22691           label$10 : {
22692            label$11 : {
22693             label$12 : {
22694              label$13 : {
22695               label$14 : {
22696                label$15 : {
22697                 label$16 : {
22698                  $10 = strchr($1, 59);
22699                  label$17 : {
22700                   if ($10) {
22701                    $4 = $10 - $1 | 0;
22702                    break label$17;
22703                   }
22704                   $4 = strlen($1);
22705                  }
22706                  $11 = ($4 | 0) != 8;
22707                  if (!$11) {
22708                   if (strncmp(10584, $1, 8)) {
22709                    break label$16
22710                   }
22711                   HEAP32[$2 + 40 >> 2] = $3 + 1;
22712                   HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 0;
22713                   break label$3;
22714                  }
22715                  label$20 : {
22716                   switch ($4 + -6 | 0) {
22717                   case 1:
22718                    break label$13;
22719                   case 0:
22720                    break label$14;
22721                   case 20:
22722                    break label$15;
22723                   case 7:
22724                    break label$20;
22725                   default:
22726                    break label$12;
22727                   };
22728                  }
22729                  $7 = 1;
22730                  if (strncmp(10593, $1, 13)) {
22731                   break label$11
22732                  }
22733                  HEAP32[$2 + 40 >> 2] = $3 + 1;
22734                  HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 1;
22735                  break label$3;
22736                 }
22737                 $7 = 0;
22738                 if (strncmp(10607, $1, 8)) {
22739                  break label$11
22740                 }
22741                 HEAP32[$2 + 40 >> 2] = $3 + 1;
22742                 HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 2;
22743                 break label$3;
22744                }
22745                $7 = 0;
22746                if (strncmp(10616, $1, 26)) {
22747                 break label$11
22748                }
22749                HEAP32[$2 + 40 >> 2] = $3 + 1;
22750                HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 3;
22751                break label$3;
22752               }
22753               if (strncmp(10643, $1, 6)) {
22754                break label$3
22755               }
22756               HEAP32[$2 + 40 >> 2] = $3 + 1;
22757               HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 4;
22758               break label$3;
22759              }
22760              if (strncmp(10650, $1, 7)) {
22761               break label$10
22762              }
22763              HEAP32[$2 + 40 >> 2] = $3 + 1;
22764              HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 5;
22765              break label$3;
22766             }
22767             $7 = 0;
22768             if ($4 >>> 0 < 8) {
22769              break label$9
22770             }
22771            }
22772            if (strncmp(10658, $1, 6)) {
22773             break label$8
22774            }
22775            $6 = Math_fround(strtod($1 + 6 | 0));
22776            if ($6 > Math_fround(0.0) ^ 1 | $6 <= Math_fround(.5) ^ 1) {
22777             break label$3
22778            }
22779            $1 = HEAP32[$0 >> 2];
22780            HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 48 >> 2] = $6;
22781            $1 = HEAP32[$0 >> 2];
22782            $4 = HEAP32[$1 + 40 >> 2];
22783            HEAP32[$1 + 40 >> 2] = $4 + 1;
22784            HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 6;
22785            break label$3;
22786           }
22787           if (strncmp(10665, $1, 7)) {
22788            break label$7
22789           }
22790           HEAP32[$2 + 40 >> 2] = $3 + 1;
22791           HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 7;
22792           break label$3;
22793          }
22794          label$21 : {
22795           switch ($4 + -4 | 0) {
22796           case 0:
22797            break label$21;
22798           case 1:
22799            break label$5;
22800           default:
22801            break label$3;
22802           };
22803          }
22804          if (strncmp(10673, $1, 4)) {
22805           break label$3
22806          }
22807          HEAP32[$2 + 40 >> 2] = $3 + 1;
22808          HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 8;
22809          break label$3;
22810         }
22811         if (!$7) {
22812          break label$6
22813         }
22814         if (strncmp(10678, $1, 13)) {
22815          break label$6
22816         }
22817         HEAP32[$2 + 40 >> 2] = $3 + 1;
22818         HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 9;
22819         break label$3;
22820        }
22821        if (strncmp(10692, $1, 7)) {
22822         break label$3
22823        }
22824        HEAP32[$2 + 40 >> 2] = $3 + 1;
22825        HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 10;
22826        break label$3;
22827       }
22828       label$22 : {
22829        if (($4 | 0) != 9) {
22830         break label$22
22831        }
22832        if (strncmp(10700, $1, 9)) {
22833         break label$22
22834        }
22835        HEAP32[$2 + 40 >> 2] = $3 + 1;
22836        HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 11;
22837        break label$3;
22838       }
22839       if (!$11) {
22840        if (!strncmp(10710, $1, 8)) {
22841         HEAP32[$2 + 40 >> 2] = $3 + 1;
22842         HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 12;
22843         break label$3;
22844        }
22845        if (strncmp(10719, $1, 6)) {
22846         break label$3
22847        }
22848        break label$4;
22849       }
22850       if (!strncmp(10719, $1, 6)) {
22851        break label$4
22852       }
22853       if ($4 >>> 0 < 16) {
22854        break label$3
22855       }
22856       if (!strncmp(10726, $1, 14)) {
22857        $8 = strtod($1 + 14 | 0);
22858        label$26 : {
22859         if (Math_abs($8) < 2147483648.0) {
22860          $4 = ~~$8;
22861          break label$26;
22862         }
22863         $4 = -2147483648;
22864        }
22865        $3 = strchr($1, 47);
22866        $5 = Math_fround(.10000000149011612);
22867        label$28 : {
22868         if (!$3) {
22869          break label$28
22870         }
22871         $2 = $3 + 1 | 0;
22872         $5 = Math_fround(.9900000095367432);
22873         if (!(Math_fround(strtod($2)) < Math_fround(.9900000095367432))) {
22874          break label$28
22875         }
22876         $5 = Math_fround(strtod($2));
22877        }
22878        $1 = strchr($3 ? $3 + 1 | 0 : $1, 47);
22879        $6 = Math_fround(.20000000298023224);
22880        label$30 : {
22881         if (!$1) {
22882          break label$30
22883         }
22884         $6 = Math_fround(strtod($1 + 1 | 0));
22885        }
22886        $1 = HEAP32[$0 >> 2];
22887        $2 = HEAP32[$1 + 40 >> 2];
22888        if (($4 | 0) <= 1) {
22889         HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6;
22890         $1 = HEAP32[$0 >> 2];
22891         $4 = HEAP32[$1 + 40 >> 2];
22892         HEAP32[$1 + 40 >> 2] = $4 + 1;
22893         HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 13;
22894         break label$3;
22895        }
22896        if ($2 + $4 >>> 0 > 31) {
22897         break label$3
22898        }
22899        $9 = Math_fround(Math_fround(Math_fround(1.0) / Math_fround(Math_fround(1.0) - $5)) + Math_fround(-1.0));
22900        $5 = Math_fround($9 + Math_fround($4 | 0));
22901        $3 = 0;
22902        while (1) {
22903         HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6;
22904         $1 = HEAP32[$0 >> 2];
22905         HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 52 >> 2] = Math_fround($3 | 0) / $5;
22906         $1 = HEAP32[$0 >> 2];
22907         $3 = $3 + 1 | 0;
22908         HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 56 >> 2] = Math_fround($9 + Math_fround($3 | 0)) / $5;
22909         $1 = HEAP32[$0 >> 2];
22910         $7 = HEAP32[$1 + 40 >> 2];
22911         $2 = $7 + 1 | 0;
22912         HEAP32[$1 + 40 >> 2] = $2;
22913         HEAP32[(($7 << 4) + $1 | 0) + 44 >> 2] = 14;
22914         if (($3 | 0) != ($4 | 0)) {
22915          continue
22916         }
22917         break;
22918        };
22919        break label$3;
22920       }
22921       if ($4 >>> 0 < 17) {
22922        break label$3
22923       }
22924       if (strncmp(10741, $1, 15)) {
22925        break label$3
22926       }
22927       $8 = strtod($1 + 15 | 0);
22928       label$33 : {
22929        if (Math_abs($8) < 2147483648.0) {
22930         $4 = ~~$8;
22931         break label$33;
22932        }
22933        $4 = -2147483648;
22934       }
22935       $6 = Math_fround(.20000000298023224);
22936       $3 = strchr($1, 47);
22937       $5 = Math_fround(.20000000298023224);
22938       label$35 : {
22939        if (!$3) {
22940         break label$35
22941        }
22942        $2 = $3 + 1 | 0;
22943        $5 = Math_fround(.9900000095367432);
22944        if (!(Math_fround(strtod($2)) < Math_fround(.9900000095367432))) {
22945         break label$35
22946        }
22947        $5 = Math_fround(strtod($2));
22948       }
22949       $1 = strchr($3 ? $3 + 1 | 0 : $1, 47);
22950       if ($1) {
22951        $6 = Math_fround(strtod($1 + 1 | 0))
22952       }
22953       $1 = HEAP32[$0 >> 2];
22954       $2 = HEAP32[$1 + 40 >> 2];
22955       if (($4 | 0) <= 1) {
22956        HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6;
22957        $1 = HEAP32[$0 >> 2];
22958        $4 = HEAP32[$1 + 40 >> 2];
22959        HEAP32[$1 + 40 >> 2] = $4 + 1;
22960        HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 13;
22961        break label$3;
22962       }
22963       if ($2 + $4 >>> 0 > 31) {
22964        break label$3
22965       }
22966       $9 = Math_fround(Math_fround(Math_fround(1.0) / Math_fround(Math_fround(1.0) - $5)) + Math_fround(-1.0));
22967       $5 = Math_fround($9 + Math_fround($4 | 0));
22968       $3 = 0;
22969       while (1) {
22970        HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6;
22971        $1 = HEAP32[$0 >> 2];
22972        HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 52 >> 2] = Math_fround($3 | 0) / $5;
22973        $1 = HEAP32[$0 >> 2];
22974        $3 = $3 + 1 | 0;
22975        HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 56 >> 2] = Math_fround($9 + Math_fround($3 | 0)) / $5;
22976        $1 = HEAP32[$0 >> 2];
22977        $7 = HEAP32[$1 + 40 >> 2];
22978        $2 = $7 + 1 | 0;
22979        HEAP32[$1 + 40 >> 2] = $2;
22980        HEAP32[(($7 << 4) + $1 | 0) + 44 >> 2] = 15;
22981        if (($3 | 0) != ($4 | 0)) {
22982         continue
22983        }
22984        break;
22985       };
22986       break label$3;
22987      }
22988      if (strncmp(10757, $1, 5)) {
22989       break label$3
22990      }
22991      HEAP32[$2 + 40 >> 2] = $3 + 1;
22992      HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 16;
22993      break label$3;
22994     }
22995     $6 = Math_fround(strtod($1 + 6 | 0));
22996     if ($6 >= Math_fround(0.0) ^ 1 | $6 <= Math_fround(1.0) ^ 1) {
22997      break label$3
22998     }
22999     $1 = HEAP32[$0 >> 2];
23000     HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 48 >> 2] = $6;
23001     $1 = HEAP32[$0 >> 2];
23002     $4 = HEAP32[$1 + 40 >> 2];
23003     HEAP32[$1 + 40 >> 2] = $4 + 1;
23004     HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 13;
23005    }
23006    $2 = HEAP32[$0 >> 2];
23007    $3 = HEAP32[$2 + 40 >> 2];
23008    if ($10) {
23009     $1 = $10 + 1 | 0;
23010     if (($3 | 0) != 32) {
23011      continue
23012     }
23013    }
23014    break;
23015   };
23016   $4 = 1;
23017   if ($3) {
23018    break label$1
23019   }
23020   HEAP32[$2 + 40 >> 2] = 1;
23021   HEAP32[$2 + 44 >> 2] = 13;
23022   HEAP32[$2 + 48 >> 2] = 1056964608;
23023  }
23024  return $4;
23025 }
23026
23027 function FLAC__stream_encoder_delete($0) {
23028  $0 = $0 | 0;
23029  var $1 = 0, $2 = 0;
23030  if ($0) {
23031   HEAP32[HEAP32[$0 + 4 >> 2] + 11848 >> 2] = 1;
23032   FLAC__stream_encoder_finish($0);
23033   $1 = HEAP32[$0 + 4 >> 2];
23034   $2 = HEAP32[$1 + 11752 >> 2];
23035   if ($2) {
23036    FLAC__stream_decoder_delete($2);
23037    $1 = HEAP32[$0 + 4 >> 2];
23038   }
23039   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear($1 + 6256 | 0);
23040   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6268 | 0);
23041   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6280 | 0);
23042   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6292 | 0);
23043   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6304 | 0);
23044   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6316 | 0);
23045   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6328 | 0);
23046   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6340 | 0);
23047   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6352 | 0);
23048   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6364 | 0);
23049   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6376 | 0);
23050   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6388 | 0);
23051   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6400 | 0);
23052   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6412 | 0);
23053   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6424 | 0);
23054   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6436 | 0);
23055   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6448 | 0);
23056   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6460 | 0);
23057   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6472 | 0);
23058   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6484 | 0);
23059   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 11724 | 0);
23060   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 11736 | 0);
23061   FLAC__bitreader_delete(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]);
23062   dlfree(HEAP32[$0 + 4 >> 2]);
23063   dlfree(HEAP32[$0 >> 2]);
23064   dlfree($0);
23065  }
23066 }
23067
23068 function FLAC__stream_encoder_finish($0) {
23069  $0 = $0 | 0;
23070  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0;
23071  $7 = global$0 - 32 | 0;
23072  global$0 = $7;
23073  label$1 : {
23074   if (!$0) {
23075    break label$1
23076   }
23077   label$3 : {
23078    label$4 : {
23079     $5 = HEAP32[$0 >> 2];
23080     $1 = HEAP32[$5 >> 2];
23081     switch ($1 | 0) {
23082     case 1:
23083      break label$1;
23084     case 0:
23085      break label$4;
23086     default:
23087      break label$3;
23088     };
23089    }
23090    $2 = HEAP32[$0 + 4 >> 2];
23091    if (HEAP32[$2 + 11848 >> 2]) {
23092     break label$3
23093    }
23094    $2 = HEAP32[$2 + 7052 >> 2];
23095    if (!$2) {
23096     break label$3
23097    }
23098    $3 = HEAP32[$5 + 36 >> 2];
23099    HEAP32[$5 + 36 >> 2] = $2;
23100    $3 = !process_frame_($0, ($2 | 0) != ($3 | 0), 1);
23101    $5 = HEAP32[$0 >> 2];
23102   }
23103   if (HEAP32[$5 + 12 >> 2]) {
23104    $2 = HEAP32[$0 + 4 >> 2];
23105    FLAC__MD5Final($2 + 6928 | 0, $2 + 7060 | 0);
23106   }
23107   $5 = $0 + 4 | 0;
23108   $1 = HEAP32[$0 + 4 >> 2];
23109   label$6 : {
23110    if (HEAP32[$1 + 11848 >> 2]) {
23111     $2 = $3;
23112     break label$6;
23113    }
23114    $4 = HEAP32[$0 >> 2];
23115    label$8 : {
23116     if (HEAP32[$4 >> 2]) {
23117      break label$8
23118     }
23119     $11 = HEAP32[$1 + 7268 >> 2];
23120     if ($11) {
23121      label$10 : {
23122       if (HEAP32[$1 + 7260 >> 2]) {
23123        $13 = HEAP32[$1 + 6900 >> 2];
23124        $12 = HEAP32[$1 + 6896 >> 2];
23125        $2 = $1 + 6920 | 0;
23126        $8 = HEAP32[$2 >> 2];
23127        $9 = HEAP32[$2 + 4 >> 2];
23128        if ((FUNCTION_TABLE[$11]($0, 0, 0, HEAP32[$1 + 7288 >> 2]) | 0) == 2) {
23129         break label$10
23130        }
23131        simple_ogg_page__init($7);
23132        $2 = HEAP32[$0 >> 2];
23133        $4 = HEAP32[$2 + 608 >> 2];
23134        $6 = HEAP32[$2 + 612 >> 2];
23135        $2 = HEAP32[$0 + 4 >> 2];
23136        label$12 : {
23137         if (!simple_ogg_page__get_at($0, $4, $6, $7, HEAP32[$2 + 7268 >> 2], HEAP32[$2 + 7264 >> 2], HEAP32[$2 + 7288 >> 2])) {
23138          break label$12
23139         }
23140         $11 = HEAP32[1357] + HEAP32[1356] | 0;
23141         $14 = HEAP32[1362] + (HEAP32[1361] + (HEAP32[1360] + (HEAP32[1359] + ($11 + HEAP32[1358] | 0) | 0) | 0) | 0) | 0;
23142         $2 = $14 + HEAP32[1363] >>> 3 | 0;
23143         if ($2 + 33 >>> 0 > HEAPU32[$7 + 12 >> 2]) {
23144          HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
23145          simple_ogg_page__clear($7);
23146          break label$10;
23147         }
23148         $4 = $1 + 6936 | 0;
23149         $10 = HEAPU8[$4 + 4 | 0] | HEAPU8[$4 + 5 | 0] << 8 | (HEAPU8[$4 + 6 | 0] << 16 | HEAPU8[$4 + 7 | 0] << 24);
23150         $2 = $2 + HEAP32[$7 + 8 >> 2] | 0;
23151         $4 = HEAPU8[$4 | 0] | HEAPU8[$4 + 1 | 0] << 8 | (HEAPU8[$4 + 2 | 0] << 16 | HEAPU8[$4 + 3 | 0] << 24);
23152         HEAP8[$2 + 25 | 0] = $4;
23153         HEAP8[$2 + 26 | 0] = $4 >>> 8;
23154         HEAP8[$2 + 27 | 0] = $4 >>> 16;
23155         HEAP8[$2 + 28 | 0] = $4 >>> 24;
23156         HEAP8[$2 + 29 | 0] = $10;
23157         HEAP8[$2 + 30 | 0] = $10 >>> 8;
23158         HEAP8[$2 + 31 | 0] = $10 >>> 16;
23159         HEAP8[$2 + 32 | 0] = $10 >>> 24;
23160         $1 = $1 + 6928 | 0;
23161         $4 = HEAPU8[$1 + 4 | 0] | HEAPU8[$1 + 5 | 0] << 8 | (HEAPU8[$1 + 6 | 0] << 16 | HEAPU8[$1 + 7 | 0] << 24);
23162         $1 = HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24);
23163         HEAP8[$2 + 17 | 0] = $1;
23164         HEAP8[$2 + 18 | 0] = $1 >>> 8;
23165         HEAP8[$2 + 19 | 0] = $1 >>> 16;
23166         HEAP8[$2 + 20 | 0] = $1 >>> 24;
23167         HEAP8[$2 + 21 | 0] = $4;
23168         HEAP8[$2 + 22 | 0] = $4 >>> 8;
23169         HEAP8[$2 + 23 | 0] = $4 >>> 16;
23170         HEAP8[$2 + 24 | 0] = $4 >>> 24;
23171         $2 = $14 + -4 >>> 3 | 0;
23172         if ($2 + 22 >>> 0 > HEAPU32[$7 + 12 >> 2]) {
23173          HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
23174          simple_ogg_page__clear($7);
23175          break label$10;
23176         }
23177         $2 = $2 + HEAP32[$7 + 8 >> 2] | 0;
23178         HEAP8[$2 + 21 | 0] = $8;
23179         HEAP8[$2 + 20 | 0] = ($9 & 255) << 24 | $8 >>> 8;
23180         HEAP8[$2 + 19 | 0] = ($9 & 65535) << 16 | $8 >>> 16;
23181         HEAP8[$2 + 18 | 0] = ($9 & 16777215) << 8 | $8 >>> 24;
23182         $2 = $2 + 17 | 0;
23183         HEAP8[$2 | 0] = HEAPU8[$2 | 0] & 240 | $9 & 15;
23184         $2 = $11 >>> 3 | 0;
23185         if ($2 + 23 >>> 0 > HEAPU32[$7 + 12 >> 2]) {
23186          HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
23187          simple_ogg_page__clear($7);
23188          break label$10;
23189         }
23190         $2 = $2 + HEAP32[$7 + 8 >> 2] | 0;
23191         HEAP8[$2 + 22 | 0] = $13;
23192         HEAP8[$2 + 21 | 0] = $13 >>> 8;
23193         HEAP8[$2 + 20 | 0] = $13 >>> 16;
23194         HEAP8[$2 + 19 | 0] = $12;
23195         HEAP8[$2 + 18 | 0] = $12 >>> 8;
23196         HEAP8[$2 + 17 | 0] = $12 >>> 16;
23197         $2 = HEAP32[$0 >> 2];
23198         $4 = HEAP32[$2 + 608 >> 2];
23199         $1 = HEAP32[$2 + 612 >> 2];
23200         $2 = HEAP32[$0 + 4 >> 2];
23201         $2 = simple_ogg_page__set_at($0, $4, $1, $7, HEAP32[$2 + 7268 >> 2], HEAP32[$2 + 7276 >> 2], HEAP32[$2 + 7288 >> 2]);
23202         simple_ogg_page__clear($7);
23203         if (!$2) {
23204          break label$10
23205         }
23206         $2 = HEAP32[HEAP32[$5 >> 2] + 7048 >> 2];
23207         if (!$2 | !HEAP32[$2 >> 2]) {
23208          break label$10
23209         }
23210         $1 = HEAP32[$0 >> 2];
23211         if (!(HEAP32[$1 + 616 >> 2] | HEAP32[$1 + 620 >> 2])) {
23212          break label$10
23213         }
23214         FLAC__format_seektable_sort($2);
23215         simple_ogg_page__init($7);
23216         $2 = HEAP32[$0 >> 2];
23217         $4 = HEAP32[$2 + 616 >> 2];
23218         $1 = HEAP32[$2 + 620 >> 2];
23219         $2 = HEAP32[$0 + 4 >> 2];
23220         if (!simple_ogg_page__get_at($0, $4, $1, $7, HEAP32[$2 + 7268 >> 2], HEAP32[$2 + 7264 >> 2], HEAP32[$2 + 7288 >> 2])) {
23221          break label$12
23222         }
23223         $6 = HEAP32[$5 >> 2];
23224         $2 = HEAP32[$6 + 7048 >> 2];
23225         $1 = HEAP32[$2 >> 2];
23226         if (HEAP32[$7 + 12 >> 2] != (Math_imul($1, 18) + 4 | 0)) {
23227          HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
23228          simple_ogg_page__clear($7);
23229          break label$10;
23230         }
23231         if ($1) {
23232          $1 = HEAP32[$7 + 8 >> 2] + 4 | 0;
23233          $4 = 0;
23234          while (1) {
23235           $8 = HEAP32[$2 + 4 >> 2] + Math_imul($4, 24) | 0;
23236           $9 = HEAP32[$8 >> 2];
23237           $2 = HEAP32[$8 + 4 >> 2];
23238           $10 = HEAP32[$8 + 8 >> 2];
23239           $6 = HEAP32[$8 + 12 >> 2];
23240           $8 = HEAP32[$8 + 16 >> 2];
23241           HEAP8[$1 + 17 | 0] = $8;
23242           HEAP8[$1 + 15 | 0] = $10;
23243           HEAP8[$1 + 7 | 0] = $9;
23244           HEAP8[$1 + 16 | 0] = $8 >>> 8;
23245           HEAP8[$1 + 14 | 0] = ($6 & 255) << 24 | $10 >>> 8;
23246           HEAP8[$1 + 13 | 0] = ($6 & 65535) << 16 | $10 >>> 16;
23247           HEAP8[$1 + 12 | 0] = ($6 & 16777215) << 8 | $10 >>> 24;
23248           HEAP8[$1 + 11 | 0] = $6;
23249           HEAP8[$1 + 10 | 0] = $6 >>> 8;
23250           HEAP8[$1 + 9 | 0] = $6 >>> 16;
23251           HEAP8[$1 + 8 | 0] = $6 >>> 24;
23252           HEAP8[$1 + 6 | 0] = ($2 & 255) << 24 | $9 >>> 8;
23253           HEAP8[$1 + 5 | 0] = ($2 & 65535) << 16 | $9 >>> 16;
23254           HEAP8[$1 + 4 | 0] = ($2 & 16777215) << 8 | $9 >>> 24;
23255           HEAP8[$1 + 3 | 0] = $2;
23256           HEAP8[$1 + 2 | 0] = $2 >>> 8;
23257           HEAP8[$1 + 1 | 0] = $2 >>> 16;
23258           HEAP8[$1 | 0] = $2 >>> 24;
23259           $1 = $1 + 18 | 0;
23260           $4 = $4 + 1 | 0;
23261           $6 = HEAP32[$5 >> 2];
23262           $2 = HEAP32[$6 + 7048 >> 2];
23263           if ($4 >>> 0 < HEAPU32[$2 >> 2]) {
23264            continue
23265           }
23266           break;
23267          };
23268         }
23269         $2 = HEAP32[$0 >> 2];
23270         simple_ogg_page__set_at($0, HEAP32[$2 + 616 >> 2], HEAP32[$2 + 620 >> 2], $7, HEAP32[$6 + 7268 >> 2], HEAP32[$6 + 7276 >> 2], HEAP32[$6 + 7288 >> 2]);
23271        }
23272        simple_ogg_page__clear($7);
23273        break label$10;
23274       }
23275       $13 = HEAP32[$1 + 6912 >> 2];
23276       $8 = HEAP32[$1 + 6900 >> 2];
23277       $9 = HEAP32[$1 + 6896 >> 2];
23278       $6 = $1 + 6920 | 0;
23279       $2 = HEAP32[$6 >> 2];
23280       $6 = HEAP32[$6 + 4 >> 2];
23281       label$19 : {
23282        label$20 : {
23283         $16 = $0;
23284         $10 = HEAP32[$4 + 612 >> 2];
23285         $12 = HEAP32[1357] + HEAP32[1356] | 0;
23286         $14 = HEAP32[1362] + (HEAP32[1361] + (HEAP32[1360] + (HEAP32[1359] + ($12 + HEAP32[1358] | 0) | 0) | 0) | 0) | 0;
23287         $15 = ($14 + HEAP32[1363] >>> 3 | 0) + 4 | 0;
23288         $4 = $15 + HEAP32[$4 + 608 >> 2] | 0;
23289         if ($4 >>> 0 < $15 >>> 0) {
23290          $10 = $10 + 1 | 0
23291         }
23292         switch (FUNCTION_TABLE[$11]($16, $4, $10, HEAP32[$1 + 7288 >> 2]) | 0) {
23293         case 0:
23294          break label$19;
23295         case 1:
23296          break label$20;
23297         default:
23298          break label$10;
23299         };
23300        }
23301        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
23302        break label$10;
23303       }
23304       $4 = $1 + 6928 | 0;
23305       $1 = HEAP32[$0 + 4 >> 2];
23306       if (FUNCTION_TABLE[HEAP32[$1 + 7276 >> 2]]($0, $4, 16, 0, 0, HEAP32[$1 + 7288 >> 2])) {
23307        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
23308        break label$10;
23309       }
23310       HEAP8[$7 + 4 | 0] = $2;
23311       HEAP8[$7 + 3 | 0] = ($6 & 255) << 24 | $2 >>> 8;
23312       HEAP8[$7 + 2 | 0] = ($6 & 65535) << 16 | $2 >>> 16;
23313       HEAP8[$7 + 1 | 0] = ($6 & 16777215) << 8 | $2 >>> 24;
23314       HEAP8[$7 | 0] = ($6 & 15 | $13 << 4) + 240;
23315       label$22 : {
23316        label$23 : {
23317         $2 = ($14 + -4 >>> 3 | 0) + 4 | 0;
23318         $1 = HEAP32[$0 >> 2];
23319         $4 = $2 + HEAP32[$1 + 608 >> 2] | 0;
23320         $1 = HEAP32[$1 + 612 >> 2];
23321         $1 = $4 >>> 0 < $2 >>> 0 ? $1 + 1 | 0 : $1;
23322         $2 = HEAP32[$0 + 4 >> 2];
23323         switch (FUNCTION_TABLE[HEAP32[$2 + 7268 >> 2]]($0, $4, $1, HEAP32[$2 + 7288 >> 2]) | 0) {
23324         case 0:
23325          break label$22;
23326         case 1:
23327          break label$23;
23328         default:
23329          break label$10;
23330         };
23331        }
23332        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
23333        break label$10;
23334       }
23335       $2 = HEAP32[$0 + 4 >> 2];
23336       if (FUNCTION_TABLE[HEAP32[$2 + 7276 >> 2]]($0, $7, 5, 0, 0, HEAP32[$2 + 7288 >> 2])) {
23337        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
23338        break label$10;
23339       }
23340       HEAP8[$7 + 5 | 0] = $8;
23341       HEAP8[$7 + 4 | 0] = $8 >>> 8;
23342       HEAP8[$7 + 3 | 0] = $8 >>> 16;
23343       HEAP8[$7 + 2 | 0] = $9;
23344       HEAP8[$7 + 1 | 0] = $9 >>> 8;
23345       HEAP8[$7 | 0] = $9 >>> 16;
23346       label$25 : {
23347        label$26 : {
23348         $2 = ($12 >>> 3 | 0) + 4 | 0;
23349         $1 = HEAP32[$0 >> 2];
23350         $4 = $2 + HEAP32[$1 + 608 >> 2] | 0;
23351         $1 = HEAP32[$1 + 612 >> 2];
23352         $1 = $4 >>> 0 < $2 >>> 0 ? $1 + 1 | 0 : $1;
23353         $2 = HEAP32[$0 + 4 >> 2];
23354         switch (FUNCTION_TABLE[HEAP32[$2 + 7268 >> 2]]($0, $4, $1, HEAP32[$2 + 7288 >> 2]) | 0) {
23355         case 0:
23356          break label$25;
23357         case 1:
23358          break label$26;
23359         default:
23360          break label$10;
23361         };
23362        }
23363        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
23364        break label$10;
23365       }
23366       $2 = HEAP32[$0 + 4 >> 2];
23367       if (FUNCTION_TABLE[HEAP32[$2 + 7276 >> 2]]($0, $7, 6, 0, 0, HEAP32[$2 + 7288 >> 2])) {
23368        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
23369        break label$10;
23370       }
23371       $2 = HEAP32[HEAP32[$5 >> 2] + 7048 >> 2];
23372       if (!$2 | !HEAP32[$2 >> 2]) {
23373        break label$10
23374       }
23375       $1 = HEAP32[$0 >> 2];
23376       if (!(HEAP32[$1 + 616 >> 2] | HEAP32[$1 + 620 >> 2])) {
23377        break label$10
23378       }
23379       FLAC__format_seektable_sort($2);
23380       label$28 : {
23381        label$29 : {
23382         label$30 : {
23383          $2 = HEAP32[$0 >> 2];
23384          $1 = HEAP32[$2 + 616 >> 2] + 4 | 0;
23385          $2 = HEAP32[$2 + 620 >> 2];
23386          $4 = $1 >>> 0 < 4 ? $2 + 1 | 0 : $2;
23387          $2 = HEAP32[$0 + 4 >> 2];
23388          switch (FUNCTION_TABLE[HEAP32[$2 + 7268 >> 2]]($0, $1, $4, HEAP32[$2 + 7288 >> 2]) | 0) {
23389          case 1:
23390           break label$29;
23391          case 0:
23392           break label$30;
23393          default:
23394           break label$10;
23395          };
23396         }
23397         $4 = HEAP32[$5 >> 2];
23398         $1 = HEAP32[$4 + 7048 >> 2];
23399         if (!HEAP32[$1 >> 2]) {
23400          break label$10
23401         }
23402         $6 = 0;
23403         break label$28;
23404        }
23405        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
23406        break label$10;
23407       }
23408       while (1) {
23409        label$32 : {
23410         $9 = Math_imul($6, 24);
23411         $8 = $9 + HEAP32[$1 + 4 >> 2] | 0;
23412         $2 = HEAP32[$8 + 4 >> 2];
23413         $8 = HEAP32[$8 >> 2];
23414         $10 = $8 << 24 | $8 << 8 & 16711680;
23415         HEAP32[$7 >> 2] = (($2 & 255) << 24 | $8 >>> 8) & -16777216 | (($2 & 16777215) << 8 | $8 >>> 24) & 16711680 | ($2 >>> 8 & 65280 | $2 >>> 24);
23416         HEAP32[$7 + 4 >> 2] = ($2 << 24 | $8 >>> 8) & 65280 | ($2 << 8 | $8 >>> 24) & 255 | $10;
23417         $8 = $9 + HEAP32[$1 + 4 >> 2] | 0;
23418         $2 = HEAP32[$8 + 12 >> 2];
23419         $8 = HEAP32[$8 + 8 >> 2];
23420         $10 = $8 << 24 | $8 << 8 & 16711680;
23421         HEAP32[$7 + 8 >> 2] = (($2 & 255) << 24 | $8 >>> 8) & -16777216 | (($2 & 16777215) << 8 | $8 >>> 24) & 16711680 | ($2 >>> 8 & 65280 | $2 >>> 24);
23422         HEAP32[$7 + 12 >> 2] = ($2 << 24 | $8 >>> 8) & 65280 | ($2 << 8 | $8 >>> 24) & 255 | $10;
23423         $2 = HEAPU16[($9 + HEAP32[$1 + 4 >> 2] | 0) + 16 >> 1];
23424         HEAP16[$7 + 16 >> 1] = ($2 << 24 | $2 << 8 & 16711680) >>> 16;
23425         if (FUNCTION_TABLE[HEAP32[$4 + 7276 >> 2]]($0, $7, 18, 0, 0, HEAP32[$4 + 7288 >> 2])) {
23426          break label$32
23427         }
23428         $6 = $6 + 1 | 0;
23429         $4 = HEAP32[$5 >> 2];
23430         $1 = HEAP32[$4 + 7048 >> 2];
23431         if ($6 >>> 0 < HEAPU32[$1 >> 2]) {
23432          continue
23433         }
23434         break label$10;
23435        }
23436        break;
23437       };
23438       HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
23439      }
23440      $1 = HEAP32[$0 + 4 >> 2];
23441      $4 = HEAP32[$0 >> 2];
23442      $3 = HEAP32[$4 >> 2] ? 1 : $3;
23443     }
23444     $2 = HEAP32[$1 + 7280 >> 2];
23445     if (!$2) {
23446      break label$8
23447     }
23448     FUNCTION_TABLE[$2]($0, $1 + 6872 | 0, HEAP32[$1 + 7288 >> 2]);
23449     $4 = HEAP32[$0 >> 2];
23450    }
23451    if (!HEAP32[$4 + 4 >> 2]) {
23452     $2 = $3;
23453     break label$6;
23454    }
23455    $2 = HEAP32[HEAP32[$5 >> 2] + 11752 >> 2];
23456    if (!$2) {
23457     $2 = $3;
23458     break label$6;
23459    }
23460    if (FLAC__stream_decoder_finish($2)) {
23461     $2 = $3;
23462     break label$6;
23463    }
23464    $2 = 1;
23465    if ($3) {
23466     break label$6
23467    }
23468    HEAP32[HEAP32[$0 >> 2] >> 2] = 4;
23469   }
23470   $1 = HEAP32[$5 >> 2];
23471   $3 = HEAP32[$1 + 7296 >> 2];
23472   if ($3) {
23473    if (($3 | 0) != HEAP32[1896]) {
23474     fclose($3);
23475     $1 = HEAP32[$5 >> 2];
23476    }
23477    HEAP32[$1 + 7296 >> 2] = 0;
23478   }
23479   if (HEAP32[$1 + 7260 >> 2]) {
23480    ogg_stream_clear(HEAP32[$0 >> 2] + 640 | 0)
23481   }
23482   $1 = HEAP32[$0 >> 2];
23483   $3 = HEAP32[$1 + 600 >> 2];
23484   if ($3) {
23485    dlfree($3);
23486    $1 = HEAP32[$0 >> 2];
23487    HEAP32[$1 + 600 >> 2] = 0;
23488    HEAP32[$1 + 604 >> 2] = 0;
23489   }
23490   if (HEAP32[$1 + 24 >> 2]) {
23491    $3 = 0;
23492    while (1) {
23493     $4 = HEAP32[$5 >> 2];
23494     $1 = $3 << 2;
23495     $6 = HEAP32[($4 + $1 | 0) + 7328 >> 2];
23496     if ($6) {
23497      dlfree($6);
23498      HEAP32[($1 + HEAP32[$5 >> 2] | 0) + 7328 >> 2] = 0;
23499      $4 = HEAP32[$5 >> 2];
23500     }
23501     $4 = HEAP32[($4 + $1 | 0) + 7368 >> 2];
23502     if ($4) {
23503      dlfree($4);
23504      HEAP32[($1 + HEAP32[$5 >> 2] | 0) + 7368 >> 2] = 0;
23505     }
23506     $3 = $3 + 1 | 0;
23507     if ($3 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {
23508      continue
23509     }
23510     break;
23511    };
23512   }
23513   $1 = HEAP32[$5 >> 2];
23514   $3 = HEAP32[$1 + 7360 >> 2];
23515   if ($3) {
23516    dlfree($3);
23517    HEAP32[HEAP32[$5 >> 2] + 7360 >> 2] = 0;
23518    $1 = HEAP32[$5 >> 2];
23519   }
23520   $3 = HEAP32[$1 + 7400 >> 2];
23521   if ($3) {
23522    dlfree($3);
23523    HEAP32[HEAP32[$5 >> 2] + 7400 >> 2] = 0;
23524    $1 = HEAP32[$5 >> 2];
23525   }
23526   $3 = HEAP32[$1 + 7364 >> 2];
23527   if ($3) {
23528    dlfree($3);
23529    HEAP32[HEAP32[$5 >> 2] + 7364 >> 2] = 0;
23530    $1 = HEAP32[$5 >> 2];
23531   }
23532   $3 = HEAP32[$1 + 7404 >> 2];
23533   if ($3) {
23534    dlfree($3);
23535    HEAP32[HEAP32[$5 >> 2] + 7404 >> 2] = 0;
23536    $1 = HEAP32[$5 >> 2];
23537   }
23538   $4 = HEAP32[$0 >> 2];
23539   if (HEAP32[$4 + 40 >> 2]) {
23540    $3 = 0;
23541    while (1) {
23542     $6 = $3 << 2;
23543     $8 = HEAP32[($6 + $1 | 0) + 7408 >> 2];
23544     if ($8) {
23545      dlfree($8);
23546      HEAP32[($6 + HEAP32[$0 + 4 >> 2] | 0) + 7408 >> 2] = 0;
23547      $4 = HEAP32[$0 >> 2];
23548      $1 = HEAP32[$0 + 4 >> 2];
23549     }
23550     $3 = $3 + 1 | 0;
23551     if ($3 >>> 0 < HEAPU32[$4 + 40 >> 2]) {
23552      continue
23553     }
23554     break;
23555    };
23556   }
23557   $3 = HEAP32[$1 + 7536 >> 2];
23558   if ($3) {
23559    dlfree($3);
23560    $1 = HEAP32[$0 + 4 >> 2];
23561    HEAP32[$1 + 7536 >> 2] = 0;
23562    $4 = HEAP32[$0 >> 2];
23563   }
23564   if (HEAP32[$4 + 24 >> 2]) {
23565    $4 = 0;
23566    while (1) {
23567     $3 = $4 << 3;
23568     $6 = HEAP32[($3 + $1 | 0) + 7540 >> 2];
23569     if ($6) {
23570      dlfree($6);
23571      HEAP32[($3 + HEAP32[$5 >> 2] | 0) + 7540 >> 2] = 0;
23572      $1 = HEAP32[$5 >> 2];
23573     }
23574     $6 = HEAP32[($1 + $3 | 0) + 7544 >> 2];
23575     if ($6) {
23576      dlfree($6);
23577      HEAP32[($3 + HEAP32[$5 >> 2] | 0) + 7544 >> 2] = 0;
23578      $1 = HEAP32[$5 >> 2];
23579     }
23580     $4 = $4 + 1 | 0;
23581     if ($4 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {
23582      continue
23583     }
23584     break;
23585    };
23586   }
23587   $3 = HEAP32[$1 + 7604 >> 2];
23588   if ($3) {
23589    dlfree($3);
23590    HEAP32[HEAP32[$5 >> 2] + 7604 >> 2] = 0;
23591    $1 = HEAP32[$5 >> 2];
23592   }
23593   $3 = HEAP32[$1 + 7608 >> 2];
23594   if ($3) {
23595    dlfree($3);
23596    HEAP32[HEAP32[$5 >> 2] + 7608 >> 2] = 0;
23597    $1 = HEAP32[$5 >> 2];
23598   }
23599   $3 = HEAP32[$1 + 7612 >> 2];
23600   if ($3) {
23601    dlfree($3);
23602    HEAP32[HEAP32[$5 >> 2] + 7612 >> 2] = 0;
23603    $1 = HEAP32[$5 >> 2];
23604   }
23605   $3 = HEAP32[$1 + 7616 >> 2];
23606   if ($3) {
23607    dlfree($3);
23608    HEAP32[HEAP32[$5 >> 2] + 7616 >> 2] = 0;
23609    $1 = HEAP32[$5 >> 2];
23610   }
23611   $3 = HEAP32[$1 + 7620 >> 2];
23612   if ($3) {
23613    dlfree($3);
23614    $1 = HEAP32[$5 >> 2];
23615    HEAP32[$1 + 7620 >> 2] = 0;
23616   }
23617   $3 = HEAP32[$1 + 7624 >> 2];
23618   if ($3) {
23619    dlfree($3);
23620    $1 = HEAP32[$5 >> 2];
23621    HEAP32[$1 + 7624 >> 2] = 0;
23622   }
23623   $3 = HEAP32[$0 >> 2];
23624   if (!(!HEAP32[$3 + 4 >> 2] | !HEAP32[$3 + 24 >> 2])) {
23625    $5 = 0;
23626    while (1) {
23627     $4 = $5 << 2;
23628     $6 = HEAP32[($4 + $1 | 0) + 11764 >> 2];
23629     if ($6) {
23630      dlfree($6);
23631      HEAP32[($4 + HEAP32[$0 + 4 >> 2] | 0) + 11764 >> 2] = 0;
23632      $1 = HEAP32[$0 + 4 >> 2];
23633      $3 = HEAP32[$0 >> 2];
23634     }
23635     $5 = $5 + 1 | 0;
23636     if ($5 >>> 0 < HEAPU32[$3 + 24 >> 2]) {
23637      continue
23638     }
23639     break;
23640    };
23641   }
23642   FLAC__bitwriter_free(HEAP32[$1 + 6856 >> 2]);
23643   $3 = HEAP32[$0 >> 2];
23644   HEAP32[$3 + 44 >> 2] = 13;
23645   HEAP32[$3 + 48 >> 2] = 1056964608;
23646   HEAP32[$3 + 36 >> 2] = 0;
23647   HEAP32[$3 + 40 >> 2] = 1;
23648   HEAP32[$3 + 28 >> 2] = 16;
23649   HEAP32[$3 + 32 >> 2] = 44100;
23650   HEAP32[$3 + 20 >> 2] = 0;
23651   HEAP32[$3 + 24 >> 2] = 2;
23652   HEAP32[$3 + 12 >> 2] = 1;
23653   HEAP32[$3 + 16 >> 2] = 0;
23654   HEAP32[$3 + 4 >> 2] = 0;
23655   HEAP32[$3 + 8 >> 2] = 1;
23656   $3 = HEAP32[$0 >> 2];
23657   HEAP32[$3 + 592 >> 2] = 0;
23658   HEAP32[$3 + 596 >> 2] = 0;
23659   HEAP32[$3 + 556 >> 2] = 0;
23660   HEAP32[$3 + 560 >> 2] = 0;
23661   HEAP32[$3 + 564 >> 2] = 0;
23662   HEAP32[$3 + 568 >> 2] = 0;
23663   HEAP32[$3 + 572 >> 2] = 0;
23664   HEAP32[$3 + 576 >> 2] = 0;
23665   HEAP32[$3 + 580 >> 2] = 0;
23666   HEAP32[$3 + 584 >> 2] = 0;
23667   HEAP32[$3 + 600 >> 2] = 0;
23668   HEAP32[$3 + 604 >> 2] = 0;
23669   $1 = HEAP32[$0 + 4 >> 2];
23670   HEAP32[$1 + 7248 >> 2] = 0;
23671   HEAP32[$1 + 7252 >> 2] = 0;
23672   HEAP32[$1 + 7048 >> 2] = 0;
23673   $5 = $1 + 7256 | 0;
23674   HEAP32[$5 >> 2] = 0;
23675   HEAP32[$5 + 4 >> 2] = 0;
23676   $5 = $1 + 7264 | 0;
23677   HEAP32[$5 >> 2] = 0;
23678   HEAP32[$5 + 4 >> 2] = 0;
23679   $5 = $1 + 7272 | 0;
23680   HEAP32[$5 >> 2] = 0;
23681   HEAP32[$5 + 4 >> 2] = 0;
23682   $5 = $1 + 7280 | 0;
23683   HEAP32[$5 >> 2] = 0;
23684   HEAP32[$5 + 4 >> 2] = 0;
23685   HEAP32[$1 + 7288 >> 2] = 0;
23686   FLAC__ogg_encoder_aspect_set_defaults($3 + 632 | 0);
23687   $1 = HEAP32[$0 >> 2];
23688   label$74 : {
23689    if (HEAP32[$1 >> 2] != 1) {
23690     break label$74
23691    }
23692    HEAP32[$1 + 16 >> 2] = 1;
23693    HEAP32[$1 + 20 >> 2] = 0;
23694    FLAC__stream_encoder_set_apodization($0, 10777);
23695    $1 = HEAP32[$0 >> 2];
23696    if (HEAP32[$1 >> 2] != 1) {
23697     break label$74
23698    }
23699    HEAP32[$1 + 576 >> 2] = 0;
23700    HEAP32[$1 + 580 >> 2] = 5;
23701    HEAP32[$1 + 564 >> 2] = 0;
23702    HEAP32[$1 + 568 >> 2] = 0;
23703    HEAP32[$1 + 556 >> 2] = 8;
23704    HEAP32[$1 + 560 >> 2] = 0;
23705   }
23706   if (!$2) {
23707    HEAP32[$1 >> 2] = 1
23708   }
23709   $1 = !$2;
23710  }
23711  global$0 = $7 + 32 | 0;
23712  return $1 | 0;
23713 }
23714
23715 function process_frame_($0, $1, $2) {
23716  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0;
23717  $8 = global$0 - 48 | 0;
23718  global$0 = $8;
23719  label$1 : {
23720   label$2 : {
23721    $4 = HEAP32[$0 >> 2];
23722    if (!HEAP32[$4 + 12 >> 2]) {
23723     break label$2
23724    }
23725    $3 = HEAP32[$0 + 4 >> 2];
23726    $3 = FLAC__MD5Accumulate($3 + 7060 | 0, $3 + 4 | 0, HEAP32[$4 + 24 >> 2], HEAP32[$4 + 36 >> 2], HEAP32[$4 + 28 >> 2] + 7 >>> 3 | 0);
23727    $4 = HEAP32[$0 >> 2];
23728    if ($3) {
23729     break label$2
23730    }
23731    HEAP32[$4 >> 2] = 8;
23732    $1 = 0;
23733    break label$1;
23734   }
23735   $3 = HEAP32[$4 + 576 >> 2];
23736   if ($1) {
23737    $12 = 0
23738   } else {
23739    $1 = FLAC__format_get_max_rice_partition_order_from_blocksize(HEAP32[$4 + 36 >> 2]);
23740    $4 = HEAP32[$0 >> 2];
23741    $5 = HEAP32[$4 + 580 >> 2];
23742    $12 = $1 >>> 0 < $5 >>> 0 ? $1 : $5;
23743   }
23744   $7 = HEAP32[$4 + 36 >> 2];
23745   HEAP32[$8 + 8 >> 2] = $7;
23746   HEAP32[$8 + 12 >> 2] = HEAP32[$4 + 32 >> 2];
23747   $1 = HEAP32[$4 + 24 >> 2];
23748   HEAP32[$8 + 20 >> 2] = 0;
23749   HEAP32[$8 + 16 >> 2] = $1;
23750   $1 = HEAP32[$4 + 28 >> 2];
23751   HEAP32[$8 + 28 >> 2] = 0;
23752   HEAP32[$8 + 24 >> 2] = $1;
23753   $5 = HEAP32[$0 + 4 >> 2];
23754   HEAP32[$8 + 32 >> 2] = HEAP32[$5 + 7056 >> 2];
23755   $14 = $3 >>> 0 < $12 >>> 0 ? $3 : $12;
23756   label$5 : {
23757    label$6 : {
23758     label$7 : {
23759      label$8 : {
23760       label$9 : {
23761        label$10 : {
23762         label$11 : {
23763          if (!HEAP32[$4 + 16 >> 2]) {
23764           $10 = 1;
23765           break label$11;
23766          }
23767          if (!HEAP32[$4 + 20 >> 2] | !HEAP32[$5 + 6864 >> 2]) {
23768           break label$11
23769          }
23770          $10 = 1;
23771          $13 = 1;
23772          if (HEAP32[$5 + 6868 >> 2]) {
23773           break label$10
23774          }
23775         }
23776         label$13 : {
23777          if (!HEAP32[$4 + 24 >> 2]) {
23778           $3 = 0;
23779           break label$13;
23780          }
23781          while (1) {
23782           $13 = ($6 << 2) + $5 | 0;
23783           $3 = 0;
23784           $11 = 0;
23785           label$16 : {
23786            if (!$7) {
23787             break label$16
23788            }
23789            $15 = HEAP32[$13 + 4 >> 2];
23790            $1 = 0;
23791            while (1) {
23792             label$18 : {
23793              $3 = HEAP32[$15 + ($1 << 2) >> 2] | $3;
23794              $9 = $3 & 1;
23795              $1 = $1 + 1 | 0;
23796              if ($1 >>> 0 >= $7 >>> 0) {
23797               break label$18
23798              }
23799              if (!$9) {
23800               continue
23801              }
23802             }
23803             break;
23804            };
23805            $1 = 0;
23806            $11 = 0;
23807            if (!$3) {
23808             break label$16
23809            }
23810            $11 = 0;
23811            if ($9) {
23812             break label$16
23813            }
23814            while (1) {
23815             $1 = $1 + 1 | 0;
23816             $9 = $3 & 2;
23817             $3 = $3 >> 1;
23818             if (!$9) {
23819              continue
23820             }
23821             break;
23822            };
23823            $9 = 0;
23824            $11 = 0;
23825            if (!$1) {
23826             break label$16
23827            }
23828            while (1) {
23829             $3 = $15 + ($9 << 2) | 0;
23830             HEAP32[$3 >> 2] = HEAP32[$3 >> 2] >> $1;
23831             $9 = $9 + 1 | 0;
23832             if (($9 | 0) != ($7 | 0)) {
23833              continue
23834             }
23835             break;
23836            };
23837            $11 = $1;
23838           }
23839           $1 = $11;
23840           $7 = Math_imul($6, 584) + $5 | 0;
23841           $3 = HEAP32[$4 + 28 >> 2];
23842           $1 = $1 >>> 0 > $3 >>> 0 ? $3 : $1;
23843           HEAP32[$7 + 624 >> 2] = $1;
23844           HEAP32[$7 + 916 >> 2] = $1;
23845           HEAP32[$13 + 216 >> 2] = $3 - $1;
23846           $6 = $6 + 1 | 0;
23847           $3 = HEAP32[$4 + 24 >> 2];
23848           if ($6 >>> 0 >= $3 >>> 0) {
23849            break label$13
23850           }
23851           $7 = HEAP32[$4 + 36 >> 2];
23852           continue;
23853          };
23854         }
23855         $1 = 1;
23856         if ($10) {
23857          break label$9
23858         }
23859         $7 = HEAP32[$4 + 36 >> 2];
23860         $13 = 0;
23861        }
23862        $9 = HEAP32[$5 + 36 >> 2];
23863        $3 = 0;
23864        $6 = 0;
23865        label$21 : {
23866         if (!$7) {
23867          break label$21
23868         }
23869         $1 = 0;
23870         while (1) {
23871          label$23 : {
23872           $1 = HEAP32[($6 << 2) + $9 >> 2] | $1;
23873           $10 = $1 & 1;
23874           $6 = $6 + 1 | 0;
23875           if ($6 >>> 0 >= $7 >>> 0) {
23876            break label$23
23877           }
23878           if (!$10) {
23879            continue
23880           }
23881          }
23882          break;
23883         };
23884         $6 = 0;
23885         if ($10 | !$1) {
23886          break label$21
23887         }
23888         while (1) {
23889          $6 = $6 + 1 | 0;
23890          $10 = $1 & 2;
23891          $1 = $1 >> 1;
23892          if (!$10) {
23893           continue
23894          }
23895          break;
23896         };
23897         $1 = 0;
23898         if (!$6) {
23899          $6 = 0;
23900          break label$21;
23901         }
23902         while (1) {
23903          $10 = ($1 << 2) + $9 | 0;
23904          HEAP32[$10 >> 2] = HEAP32[$10 >> 2] >> $6;
23905          $1 = $1 + 1 | 0;
23906          if (($7 | 0) != ($1 | 0)) {
23907           continue
23908          }
23909          break;
23910         };
23911        }
23912        $1 = HEAP32[$4 + 28 >> 2];
23913        $6 = $6 >>> 0 > $1 >>> 0 ? $1 : $6;
23914        HEAP32[$5 + 5296 >> 2] = $6;
23915        HEAP32[$5 + 5588 >> 2] = $6;
23916        HEAP32[$5 + 248 >> 2] = $1 - $6;
23917        $6 = HEAP32[$4 + 36 >> 2];
23918        label$27 : {
23919         if (!$6) {
23920          break label$27
23921         }
23922         $7 = HEAP32[$5 + 40 >> 2];
23923         $1 = 0;
23924         while (1) {
23925          label$29 : {
23926           $3 = HEAP32[$7 + ($1 << 2) >> 2] | $3;
23927           $10 = $3 & 1;
23928           $1 = $1 + 1 | 0;
23929           if ($1 >>> 0 >= $6 >>> 0) {
23930            break label$29
23931           }
23932           if (!$10) {
23933            continue
23934           }
23935          }
23936          break;
23937         };
23938         $1 = 0;
23939         if (!$3) {
23940          $3 = 0;
23941          break label$27;
23942         }
23943         if ($10) {
23944          $3 = 0;
23945          break label$27;
23946         }
23947         while (1) {
23948          $1 = $1 + 1 | 0;
23949          $10 = $3 & 2;
23950          $3 = $3 >> 1;
23951          if (!$10) {
23952           continue
23953          }
23954          break;
23955         };
23956         $3 = 0;
23957         if (!$1) {
23958          break label$27
23959         }
23960         while (1) {
23961          $10 = $7 + ($3 << 2) | 0;
23962          HEAP32[$10 >> 2] = HEAP32[$10 >> 2] >> $1;
23963          $3 = $3 + 1 | 0;
23964          if (($6 | 0) != ($3 | 0)) {
23965           continue
23966          }
23967          break;
23968         };
23969         $3 = $1;
23970        }
23971        $1 = HEAP32[$4 + 28 >> 2];
23972        $3 = $3 >>> 0 > $1 >>> 0 ? $1 : $3;
23973        HEAP32[$5 + 5880 >> 2] = $3;
23974        HEAP32[$5 + 6172 >> 2] = $3;
23975        HEAP32[$5 + 252 >> 2] = ($1 - $3 | 0) + 1;
23976        if ($13) {
23977         break label$8
23978        }
23979        $3 = HEAP32[$4 + 24 >> 2];
23980        $1 = 0;
23981       }
23982       $4 = $1;
23983       if ($3) {
23984        $3 = 0;
23985        while (1) {
23986         $1 = ($3 << 2) + $5 | 0;
23987         $5 = ($3 << 3) + $5 | 0;
23988         process_subframe_($0, $14, $12, $8 + 8 | 0, HEAP32[$1 + 216 >> 2], HEAP32[$1 + 4 >> 2], $5 + 6176 | 0, $5 + 6640 | 0, $5 + 256 | 0, $1 + 6768 | 0, $1 + 6808 | 0);
23989         $5 = HEAP32[$0 + 4 >> 2];
23990         $3 = $3 + 1 | 0;
23991         if ($3 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {
23992          continue
23993         }
23994         break;
23995        };
23996       }
23997       if ($4) {
23998        break label$7
23999       }
24000       $9 = HEAP32[$5 + 36 >> 2];
24001      }
24002      process_subframe_($0, $14, $12, $8 + 8 | 0, HEAP32[$5 + 248 >> 2], $9, $5 + 6240 | 0, $5 + 6704 | 0, $5 + 320 | 0, $5 + 6800 | 0, $5 + 6840 | 0);
24003      $1 = HEAP32[$0 + 4 >> 2];
24004      process_subframe_($0, $14, $12, $8 + 8 | 0, HEAP32[$1 + 252 >> 2], HEAP32[$1 + 40 >> 2], $1 + 6248 | 0, $1 + 6712 | 0, $1 + 328 | 0, $1 + 6804 | 0, $1 + 6844 | 0);
24005      $11 = $8;
24006      $1 = HEAP32[$0 + 4 >> 2];
24007      label$36 : {
24008       if (!(!HEAP32[HEAP32[$0 >> 2] + 20 >> 2] | !HEAP32[$1 + 6864 >> 2])) {
24009        $3 = HEAP32[$1 + 6868 >> 2] ? 3 : 0;
24010        break label$36;
24011       }
24012       $3 = HEAP32[$1 + 6844 >> 2];
24013       $5 = HEAP32[$1 + 6808 >> 2];
24014       $4 = $3 + $5 | 0;
24015       $6 = HEAP32[$1 + 6812 >> 2];
24016       $5 = $5 + $6 | 0;
24017       $7 = $4 >>> 0 < $5 >>> 0;
24018       $6 = $3 + $6 | 0;
24019       $5 = $7 ? $4 : $5;
24020       $4 = $6 >>> 0 < $5 >>> 0;
24021       $3 = $3 + HEAP32[$1 + 6840 >> 2] >>> 0 < ($4 ? $6 : $5) >>> 0 ? 3 : $4 ? 2 : $7;
24022      }
24023      HEAP32[$11 + 20 >> 2] = $3;
24024      if (!FLAC__frame_add_header($8 + 8 | 0, HEAP32[$1 + 6856 >> 2])) {
24025       HEAP32[HEAP32[$0 >> 2] >> 2] = 7;
24026       $1 = 0;
24027       break label$1;
24028      }
24029      $5 = $0;
24030      $6 = HEAP32[$8 + 8 >> 2];
24031      label$39 : {
24032       label$40 : {
24033        switch ($3 | 0) {
24034        default:
24035         $3 = HEAP32[$0 + 4 >> 2];
24036         $7 = 0;
24037         $1 = 0;
24038         $4 = 0;
24039         $9 = 0;
24040         break label$39;
24041        case 0:
24042         $3 = HEAP32[$0 + 4 >> 2];
24043         $4 = $3 + 336 | 0;
24044         $1 = $4 + Math_imul(HEAP32[$3 + 6768 >> 2], 292) | 0;
24045         $7 = ($4 + Math_imul(HEAP32[$3 + 6772 >> 2], 292) | 0) + 584 | 0;
24046         $4 = HEAP32[$3 + 216 >> 2];
24047         $9 = HEAP32[$3 + 220 >> 2];
24048         break label$39;
24049        case 1:
24050         $3 = HEAP32[$0 + 4 >> 2];
24051         $1 = ($3 + Math_imul(HEAP32[$3 + 6768 >> 2], 292) | 0) + 336 | 0;
24052         $7 = (Math_imul(HEAP32[$3 + 6804 >> 2], 292) + $3 | 0) + 5592 | 0;
24053         $4 = HEAP32[$3 + 216 >> 2];
24054         $9 = HEAP32[$3 + 252 >> 2];
24055         break label$39;
24056        case 2:
24057         $3 = HEAP32[$0 + 4 >> 2];
24058         $7 = ($3 + Math_imul(HEAP32[$3 + 6772 >> 2], 292) | 0) + 920 | 0;
24059         $1 = (Math_imul(HEAP32[$3 + 6804 >> 2], 292) + $3 | 0) + 5592 | 0;
24060         $4 = HEAP32[$3 + 252 >> 2];
24061         $9 = HEAP32[$3 + 220 >> 2];
24062         break label$39;
24063        case 3:
24064         break label$40;
24065        };
24066       }
24067       $3 = HEAP32[$0 + 4 >> 2];
24068       $4 = $3 + 5008 | 0;
24069       $1 = $4 + Math_imul(HEAP32[$3 + 6800 >> 2], 292) | 0;
24070       $7 = ($4 + Math_imul(HEAP32[$3 + 6804 >> 2], 292) | 0) + 584 | 0;
24071       $4 = HEAP32[$3 + 248 >> 2];
24072       $9 = HEAP32[$3 + 252 >> 2];
24073      }
24074      if (!add_subframe_($5, $6, $4, $1, HEAP32[$3 + 6856 >> 2])) {
24075       break label$6
24076      }
24077      if (!add_subframe_($0, HEAP32[$8 + 8 >> 2], $9, $7, HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2])) {
24078       break label$6
24079      }
24080      $1 = HEAP32[$0 >> 2];
24081      break label$5;
24082     }
24083     $3 = FLAC__frame_add_header($8 + 8 | 0, HEAP32[$5 + 6856 >> 2]);
24084     $1 = HEAP32[$0 >> 2];
24085     if ($3) {
24086      if (!HEAP32[$1 + 24 >> 2]) {
24087       break label$5
24088      }
24089      $3 = 0;
24090      while (1) {
24091       $1 = HEAP32[$0 + 4 >> 2];
24092       $5 = $1 + ($3 << 2) | 0;
24093       if (!add_subframe_($0, HEAP32[$8 + 8 >> 2], HEAP32[$5 + 216 >> 2], (($1 + Math_imul($3, 584) | 0) + Math_imul(HEAP32[$5 + 6768 >> 2], 292) | 0) + 336 | 0, HEAP32[$1 + 6856 >> 2])) {
24094        break label$6
24095       }
24096       $3 = $3 + 1 | 0;
24097       $1 = HEAP32[$0 >> 2];
24098       if ($3 >>> 0 < HEAPU32[$1 + 24 >> 2]) {
24099        continue
24100       }
24101       break;
24102      };
24103      break label$5;
24104     }
24105     HEAP32[$1 >> 2] = 7;
24106    }
24107    $1 = 0;
24108    break label$1;
24109   }
24110   if (HEAP32[$1 + 20 >> 2]) {
24111    $1 = HEAP32[$0 + 4 >> 2];
24112    $3 = HEAP32[$1 + 6864 >> 2] + 1 | 0;
24113    HEAP32[$1 + 6864 >> 2] = $3 >>> 0 < HEAPU32[$1 + 6860 >> 2] ? $3 : 0;
24114   }
24115   $1 = HEAP32[$0 + 4 >> 2];
24116   HEAP32[$1 + 6868 >> 2] = HEAP32[$8 + 20 >> 2];
24117   $1 = HEAP32[$1 + 6856 >> 2];
24118   $3 = HEAP32[$1 + 16 >> 2] & 7;
24119   $11 = 1;
24120   __inlined_func$FLAC__bitwriter_zero_pad_to_byte_boundary : {
24121    if (!$3) {
24122     break __inlined_func$FLAC__bitwriter_zero_pad_to_byte_boundary
24123    }
24124    $11 = FLAC__bitwriter_write_zeroes($1, 8 - $3 | 0);
24125   }
24126   if (!$11) {
24127    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
24128    $1 = 0;
24129    break label$1;
24130   }
24131   label$49 : {
24132    if (FLAC__bitwriter_get_write_crc16(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2], $8 + 8 | 0)) {
24133     if (FLAC__bitwriter_write_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2], HEAPU16[$8 + 8 >> 1], HEAP32[1404])) {
24134      break label$49
24135     }
24136    }
24137    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;
24138    $1 = 0;
24139    break label$1;
24140   }
24141   $1 = 0;
24142   if (!write_bitbuffer_($0, HEAP32[HEAP32[$0 >> 2] + 36 >> 2], $2)) {
24143    break label$1
24144   }
24145   $1 = HEAP32[$0 + 4 >> 2];
24146   HEAP32[$1 + 7052 >> 2] = 0;
24147   HEAP32[$1 + 7056 >> 2] = HEAP32[$1 + 7056 >> 2] + 1;
24148   $2 = $1 + 6920 | 0;
24149   $3 = $2;
24150   $11 = $3;
24151   $1 = HEAP32[$3 + 4 >> 2];
24152   $0 = HEAP32[HEAP32[$0 >> 2] + 36 >> 2];
24153   $2 = $0 + HEAP32[$3 >> 2] | 0;
24154   if ($2 >>> 0 < $0 >>> 0) {
24155    $1 = $1 + 1 | 0
24156   }
24157   HEAP32[$11 >> 2] = $2;
24158   HEAP32[$3 + 4 >> 2] = $1;
24159   $1 = 1;
24160  }
24161  $0 = $1;
24162  global$0 = $8 + 48 | 0;
24163  return $0;
24164 }
24165
24166 function FLAC__stream_encoder_init_stream($0, $1, $2, $3, $4, $5) {
24167  $0 = $0 | 0;
24168  $1 = $1 | 0;
24169  $2 = $2 | 0;
24170  $3 = $3 | 0;
24171  $4 = $4 | 0;
24172  $5 = $5 | 0;
24173  return init_stream_internal__1($0, 0, $1, $2, $3, $4, $5, 0) | 0;
24174 }
24175
24176 function init_stream_internal__1($0, $1, $2, $3, $4, $5, $6, $7) {
24177  var $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0;
24178  $15 = global$0 - 176 | 0;
24179  global$0 = $15;
24180  $9 = 13;
24181  $8 = HEAP32[$0 >> 2];
24182  label$1 : {
24183   if (HEAP32[$8 >> 2] != 1) {
24184    break label$1
24185   }
24186   $9 = 3;
24187   if (!$2 | ($4 ? 0 : $3)) {
24188    break label$1
24189   }
24190   $9 = 4;
24191   $11 = HEAP32[$8 + 24 >> 2];
24192   if ($11 + -1 >>> 0 > 7) {
24193    break label$1
24194   }
24195   label$2 : {
24196    label$3 : {
24197     if (($11 | 0) != 2) {
24198      HEAP32[$8 + 16 >> 2] = 0;
24199      break label$3;
24200     }
24201     if (HEAP32[$8 + 16 >> 2]) {
24202      break label$2
24203     }
24204    }
24205    HEAP32[$8 + 20 >> 2] = 0;
24206   }
24207   $11 = HEAP32[$8 + 28 >> 2];
24208   if ($11 >>> 0 >= 32) {
24209    HEAP32[$8 + 16 >> 2] = 0;
24210    $9 = 5;
24211    break label$1;
24212   }
24213   $9 = 5;
24214   if ($11 + -4 >>> 0 > 20) {
24215    break label$1
24216   }
24217   if (HEAP32[$8 + 32 >> 2] + -1 >>> 0 >= 655350) {
24218    $9 = 6;
24219    break label$1;
24220   }
24221   $8 = HEAP32[$0 >> 2];
24222   $10 = HEAP32[$8 + 36 >> 2];
24223   label$7 : {
24224    if (!$10) {
24225     $10 = HEAP32[$8 + 556 >> 2] ? 4096 : 1152;
24226     HEAP32[$8 + 36 >> 2] = $10;
24227     break label$7;
24228    }
24229    $9 = 7;
24230    if ($10 + -16 >>> 0 > 65519) {
24231     break label$1
24232    }
24233   }
24234   $9 = 8;
24235   $11 = HEAP32[$8 + 556 >> 2];
24236   if ($11 >>> 0 > 32) {
24237    break label$1
24238   }
24239   $9 = 10;
24240   if ($10 >>> 0 < $11 >>> 0) {
24241    break label$1
24242   }
24243   $11 = HEAP32[$8 + 560 >> 2];
24244   label$9 : {
24245    if (!$11) {
24246     $13 = $8;
24247     $11 = HEAP32[$8 + 28 >> 2];
24248     label$11 : {
24249      if ($11 >>> 0 <= 15) {
24250       $11 = $11 >>> 0 > 5 ? ($11 >>> 1 | 0) + 2 | 0 : 5;
24251       break label$11;
24252      }
24253      if (($11 | 0) == 16) {
24254       $11 = 7;
24255       if ($10 >>> 0 < 193) {
24256        break label$11
24257       }
24258       $11 = 8;
24259       if ($10 >>> 0 < 385) {
24260        break label$11
24261       }
24262       $11 = 9;
24263       if ($10 >>> 0 < 577) {
24264        break label$11
24265       }
24266       $11 = 10;
24267       if ($10 >>> 0 < 1153) {
24268        break label$11
24269       }
24270       $11 = 11;
24271       if ($10 >>> 0 < 2305) {
24272        break label$11
24273       }
24274       $11 = $10 >>> 0 < 4609 ? 12 : 13;
24275       break label$11;
24276      }
24277      $11 = 13;
24278      if ($10 >>> 0 < 385) {
24279       break label$11
24280      }
24281      $11 = $10 >>> 0 < 1153 ? 14 : 15;
24282     }
24283     HEAP32[$13 + 560 >> 2] = $11;
24284     break label$9;
24285    }
24286    $9 = 9;
24287    if ($11 + -5 >>> 0 > 10) {
24288     break label$1
24289    }
24290   }
24291   label$14 : {
24292    if (!HEAP32[$8 + 8 >> 2]) {
24293     $10 = HEAP32[$8 + 580 >> 2];
24294     break label$14;
24295    }
24296    $9 = 11;
24297    if (!(($10 >>> 0 < 4609 | HEAPU32[$8 + 32 >> 2] > 48e3) & $10 >>> 0 < 16385)) {
24298     break label$1
24299    }
24300    if (!FLAC__format_sample_rate_is_subset(HEAP32[HEAP32[$0 >> 2] + 32 >> 2])) {
24301     break label$1
24302    }
24303    $8 = HEAP32[$0 >> 2];
24304    if (__wasm_rotl_i32(HEAP32[$8 + 28 >> 2] + -8 | 0, 30) >>> 0 > 4) {
24305     break label$1
24306    }
24307    $10 = HEAP32[$8 + 580 >> 2];
24308    if ($10 >>> 0 > 8) {
24309     break label$1
24310    }
24311    if (HEAPU32[$8 + 32 >> 2] > 48e3) {
24312     break label$14
24313    }
24314    if (HEAPU32[$8 + 36 >> 2] > 4608 | HEAPU32[$8 + 556 >> 2] > 12) {
24315     break label$1
24316    }
24317   }
24318   $11 = 1 << HEAP32[1406];
24319   if ($10 >>> 0 >= $11 >>> 0) {
24320    $10 = $11 + -1 | 0;
24321    HEAP32[$8 + 580 >> 2] = $10;
24322   }
24323   if (HEAPU32[$8 + 576 >> 2] >= $10 >>> 0) {
24324    HEAP32[$8 + 576 >> 2] = $10
24325   }
24326   label$18 : {
24327    if (!$7) {
24328     break label$18
24329    }
24330    $10 = HEAP32[$8 + 600 >> 2];
24331    if (!$10) {
24332     break label$18
24333    }
24334    $13 = HEAP32[$8 + 604 >> 2];
24335    if ($13 >>> 0 < 2) {
24336     break label$18
24337    }
24338    $9 = 1;
24339    while (1) {
24340     $11 = HEAP32[($9 << 2) + $10 >> 2];
24341     if (!(!$11 | HEAP32[$11 >> 2] != 4)) {
24342      while (1) {
24343       $8 = ($9 << 2) + $10 | 0;
24344       $9 = $9 + -1 | 0;
24345       HEAP32[$8 >> 2] = HEAP32[($9 << 2) + $10 >> 2];
24346       $10 = HEAP32[HEAP32[$0 >> 2] + 600 >> 2];
24347       if ($9) {
24348        continue
24349       }
24350       break;
24351      };
24352      HEAP32[$10 >> 2] = $11;
24353      $8 = HEAP32[$0 >> 2];
24354      break label$18;
24355     }
24356     $9 = $9 + 1 | 0;
24357     if (($13 | 0) != ($9 | 0)) {
24358      continue
24359     }
24360     break;
24361    };
24362   }
24363   $13 = HEAP32[$8 + 604 >> 2];
24364   label$22 : {
24365    label$23 : {
24366     $10 = HEAP32[$8 + 600 >> 2];
24367     if ($10) {
24368      $11 = 0;
24369      if (!$13) {
24370       break label$22
24371      }
24372      while (1) {
24373       $8 = HEAP32[($11 << 2) + $10 >> 2];
24374       if (!(!$8 | HEAP32[$8 >> 2] != 3)) {
24375        HEAP32[HEAP32[$0 + 4 >> 2] + 7048 >> 2] = $8 + 16;
24376        break label$23;
24377       }
24378       $11 = $11 + 1 | 0;
24379       if (($13 | 0) != ($11 | 0)) {
24380        continue
24381       }
24382       break;
24383      };
24384      break label$23;
24385     }
24386     $9 = 12;
24387     if ($13) {
24388      break label$1
24389     }
24390     $11 = 0;
24391     break label$22;
24392    }
24393    $8 = 0;
24394    $13 = 0;
24395    $11 = 0;
24396    while (1) {
24397     $9 = 12;
24398     label$28 : {
24399      label$29 : {
24400       label$30 : {
24401        label$31 : {
24402         label$32 : {
24403          $10 = HEAP32[($14 << 2) + $10 >> 2];
24404          switch (HEAP32[$10 >> 2]) {
24405          case 0:
24406           break label$1;
24407          case 6:
24408           break label$29;
24409          case 5:
24410           break label$30;
24411          case 4:
24412           break label$31;
24413          case 3:
24414           break label$32;
24415          default:
24416           break label$28;
24417          };
24418         }
24419         if ($18) {
24420          break label$1
24421         }
24422         $18 = 1;
24423         $11 = $13;
24424         $12 = $8;
24425         if (FLAC__format_seektable_is_legal($10 + 16 | 0)) {
24426          break label$28
24427         }
24428         break label$1;
24429        }
24430        $11 = 1;
24431        $12 = $8;
24432        if (!$13) {
24433         break label$28
24434        }
24435        break label$1;
24436       }
24437       $11 = $13;
24438       $12 = $8;
24439       if (FLAC__format_cuesheet_is_legal($10 + 16 | 0, HEAP32[$10 + 160 >> 2])) {
24440        break label$28
24441       }
24442       break label$1;
24443      }
24444      $17 = $10 + 16 | 0;
24445      if (!FLAC__format_picture_is_legal($17)) {
24446       break label$1
24447      }
24448      $11 = $13;
24449      $12 = $8;
24450      label$33 : {
24451       switch (HEAP32[$17 >> 2] + -1 | 0) {
24452       case 0:
24453        if ($19) {
24454         break label$1
24455        }
24456        $12 = HEAP32[$10 + 20 >> 2];
24457        if (strcmp($12, 10763)) {
24458         if (strcmp($12, 10773)) {
24459          break label$1
24460         }
24461        }
24462        if (HEAP32[$10 + 28 >> 2] != 32) {
24463         break label$1
24464        }
24465        $19 = 1;
24466        $11 = $13;
24467        $12 = $8;
24468        if (HEAP32[$10 + 32 >> 2] == 32) {
24469         break label$28
24470        }
24471        break label$1;
24472       case 1:
24473        break label$33;
24474       default:
24475        break label$28;
24476       };
24477      }
24478      $12 = 1;
24479      if ($8) {
24480       break label$1
24481      }
24482     }
24483     $14 = $14 + 1 | 0;
24484     $8 = HEAP32[$0 >> 2];
24485     if ($14 >>> 0 >= HEAPU32[$8 + 604 >> 2]) {
24486      break label$22
24487     }
24488     $10 = HEAP32[$8 + 600 >> 2];
24489     $8 = $12;
24490     $13 = $11;
24491     continue;
24492    };
24493   }
24494   $10 = 0;
24495   $14 = HEAP32[$0 + 4 >> 2];
24496   HEAP32[$14 >> 2] = 0;
24497   if (HEAP32[$8 + 24 >> 2]) {
24498    while (1) {
24499     $8 = $10 << 2;
24500     HEAP32[($8 + $14 | 0) + 4 >> 2] = 0;
24501     HEAP32[($8 + HEAP32[$0 + 4 >> 2] | 0) + 7328 >> 2] = 0;
24502     HEAP32[($8 + HEAP32[$0 + 4 >> 2] | 0) + 44 >> 2] = 0;
24503     HEAP32[($8 + HEAP32[$0 + 4 >> 2] | 0) + 7368 >> 2] = 0;
24504     $14 = HEAP32[$0 + 4 >> 2];
24505     $10 = $10 + 1 | 0;
24506     if ($10 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {
24507      continue
24508     }
24509     break;
24510    }
24511   }
24512   $8 = 0;
24513   HEAP32[$14 + 36 >> 2] = 0;
24514   HEAP32[HEAP32[$0 + 4 >> 2] + 7360 >> 2] = 0;
24515   HEAP32[HEAP32[$0 + 4 >> 2] + 76 >> 2] = 0;
24516   HEAP32[HEAP32[$0 + 4 >> 2] + 7400 >> 2] = 0;
24517   HEAP32[HEAP32[$0 + 4 >> 2] + 40 >> 2] = 0;
24518   HEAP32[HEAP32[$0 + 4 >> 2] + 7364 >> 2] = 0;
24519   HEAP32[HEAP32[$0 + 4 >> 2] + 80 >> 2] = 0;
24520   HEAP32[HEAP32[$0 + 4 >> 2] + 7404 >> 2] = 0;
24521   $9 = HEAP32[$0 + 4 >> 2];
24522   $10 = HEAP32[$0 >> 2];
24523   if (HEAP32[$10 + 40 >> 2]) {
24524    while (1) {
24525     $12 = $8 << 2;
24526     HEAP32[($12 + $9 | 0) + 84 >> 2] = 0;
24527     HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 7408 >> 2] = 0;
24528     $9 = HEAP32[$0 + 4 >> 2];
24529     $8 = $8 + 1 | 0;
24530     $10 = HEAP32[$0 >> 2];
24531     if ($8 >>> 0 < HEAPU32[$10 + 40 >> 2]) {
24532      continue
24533     }
24534     break;
24535    }
24536   }
24537   $8 = 0;
24538   HEAP32[$9 + 7536 >> 2] = 0;
24539   HEAP32[$9 + 212 >> 2] = 0;
24540   if (HEAP32[$10 + 24 >> 2]) {
24541    while (1) {
24542     $12 = $8 << 3;
24543     HEAP32[($12 + $9 | 0) + 256 >> 2] = 0;
24544     HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 7540 >> 2] = 0;
24545     HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 260 >> 2] = 0;
24546     HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 7544 >> 2] = 0;
24547     $9 = HEAP32[$0 + 4 >> 2];
24548     HEAP32[($9 + ($8 << 2) | 0) + 6768 >> 2] = 0;
24549     $8 = $8 + 1 | 0;
24550     if ($8 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {
24551      continue
24552     }
24553     break;
24554    }
24555   }
24556   HEAP32[$9 + 320 >> 2] = 0;
24557   HEAP32[HEAP32[$0 + 4 >> 2] + 7604 >> 2] = 0;
24558   HEAP32[HEAP32[$0 + 4 >> 2] + 324 >> 2] = 0;
24559   HEAP32[HEAP32[$0 + 4 >> 2] + 7608 >> 2] = 0;
24560   $8 = HEAP32[$0 + 4 >> 2];
24561   HEAP32[$8 + 6800 >> 2] = 0;
24562   HEAP32[$8 + 328 >> 2] = 0;
24563   HEAP32[HEAP32[$0 + 4 >> 2] + 7612 >> 2] = 0;
24564   HEAP32[HEAP32[$0 + 4 >> 2] + 332 >> 2] = 0;
24565   HEAP32[HEAP32[$0 + 4 >> 2] + 7616 >> 2] = 0;
24566   $8 = HEAP32[$0 + 4 >> 2];
24567   HEAP32[$8 + 7620 >> 2] = 0;
24568   HEAP32[$8 + 7624 >> 2] = 0;
24569   HEAP32[$8 + 6848 >> 2] = 0;
24570   HEAP32[$8 + 6852 >> 2] = 0;
24571   HEAP32[$8 + 6804 >> 2] = 0;
24572   $12 = HEAP32[$0 >> 2];
24573   $13 = HEAP32[$12 + 36 >> 2];
24574   $12 = HEAP32[$12 + 32 >> 2];
24575   HEAP32[$8 + 7052 >> 2] = 0;
24576   HEAP32[$8 + 7056 >> 2] = 0;
24577   HEAP32[$8 + 6864 >> 2] = 0;
24578   $9 = $8;
24579   $16 = +($12 >>> 0) * .4 / +($13 >>> 0) + .5;
24580   label$42 : {
24581    if ($16 < 4294967296.0 & $16 >= 0.0) {
24582     $12 = ~~$16 >>> 0;
24583     break label$42;
24584    }
24585    $12 = 0;
24586   }
24587   HEAP32[$9 + 6860 >> 2] = $12 ? $12 : 1;
24588   FLAC__cpu_info($8 + 7156 | 0);
24589   $9 = HEAP32[$0 + 4 >> 2];
24590   HEAP32[$9 + 7244 >> 2] = 12;
24591   HEAP32[$9 + 7240 >> 2] = 13;
24592   HEAP32[$9 + 7236 >> 2] = 12;
24593   HEAP32[$9 + 7228 >> 2] = 14;
24594   HEAP32[$9 + 7224 >> 2] = 15;
24595   HEAP32[$9 + 7220 >> 2] = 16;
24596   HEAP32[$9 + 7232 >> 2] = 17;
24597   $10 = HEAP32[$0 >> 2];
24598   HEAP32[$10 >> 2] = 0;
24599   HEAP32[$9 + 7260 >> 2] = $7;
24600   label$44 : {
24601    label$45 : {
24602     label$46 : {
24603      if ($7) {
24604       if (!FLAC__ogg_encoder_aspect_init($10 + 632 | 0)) {
24605        break label$46
24606       }
24607       $10 = HEAP32[$0 >> 2];
24608       $9 = HEAP32[$0 + 4 >> 2];
24609      }
24610      $8 = $0 + 4 | 0;
24611      HEAP32[$9 + 7276 >> 2] = $2;
24612      HEAP32[$9 + 7264 >> 2] = $1;
24613      HEAP32[$9 + 7288 >> 2] = $6;
24614      HEAP32[$9 + 7280 >> 2] = $5;
24615      HEAP32[$9 + 7272 >> 2] = $4;
24616      HEAP32[$9 + 7268 >> 2] = $3;
24617      $1 = HEAP32[$10 + 36 >> 2];
24618      if (HEAPU32[$9 >> 2] < $1 >>> 0) {
24619       $3 = $1 + 5 | 0;
24620       label$49 : {
24621        label$50 : {
24622         label$51 : {
24623          if (HEAP32[$10 + 24 >> 2]) {
24624           $2 = 0;
24625           while (1) {
24626            $5 = $2 << 2;
24627            $4 = $5 + HEAP32[$8 >> 2] | 0;
24628            $6 = FLAC__memory_alloc_aligned_int32_array($3, $4 + 7328 | 0, $4 + 4 | 0);
24629            $4 = HEAP32[($5 + HEAP32[$8 >> 2] | 0) + 4 >> 2];
24630            HEAP32[$4 >> 2] = 0;
24631            HEAP32[$4 + 4 >> 2] = 0;
24632            HEAP32[$4 + 8 >> 2] = 0;
24633            HEAP32[$4 + 12 >> 2] = 0;
24634            $4 = ($5 + HEAP32[$8 >> 2] | 0) + 4 | 0;
24635            HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + 16;
24636            if (!$6) {
24637             break label$51
24638            }
24639            $2 = $2 + 1 | 0;
24640            if ($2 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {
24641             continue
24642            }
24643            break;
24644           };
24645          }
24646          $2 = HEAP32[$8 >> 2];
24647          $4 = FLAC__memory_alloc_aligned_int32_array($3, $2 + 7360 | 0, $2 + 36 | 0);
24648          $2 = HEAP32[HEAP32[$8 >> 2] + 36 >> 2];
24649          HEAP32[$2 >> 2] = 0;
24650          HEAP32[$2 + 4 >> 2] = 0;
24651          HEAP32[$2 + 8 >> 2] = 0;
24652          HEAP32[$2 + 12 >> 2] = 0;
24653          $2 = HEAP32[$8 >> 2];
24654          HEAP32[$2 + 36 >> 2] = HEAP32[$2 + 36 >> 2] + 16;
24655          if ($4) {
24656           $2 = HEAP32[$8 >> 2];
24657           $3 = FLAC__memory_alloc_aligned_int32_array($3, $2 + 7364 | 0, $2 + 40 | 0);
24658           $2 = HEAP32[HEAP32[$8 >> 2] + 40 >> 2];
24659           HEAP32[$2 >> 2] = 0;
24660           HEAP32[$2 + 4 >> 2] = 0;
24661           HEAP32[$2 + 8 >> 2] = 0;
24662           HEAP32[$2 + 12 >> 2] = 0;
24663           $2 = HEAP32[$8 >> 2] + 40 | 0;
24664           HEAP32[$2 >> 2] = HEAP32[$2 >> 2] + 16;
24665           $2 = ($3 | 0) != 0;
24666          } else {
24667           $2 = ($4 | 0) != 0
24668          }
24669          if (!$2) {
24670           break label$51
24671          }
24672          $3 = HEAP32[$0 >> 2];
24673          if (HEAP32[$3 + 556 >> 2]) {
24674           $2 = HEAP32[$8 >> 2];
24675           if (HEAP32[$3 + 40 >> 2]) {
24676            $9 = 0;
24677            while (1) {
24678             $2 = ($9 << 2) + $2 | 0;
24679             if (!FLAC__memory_alloc_aligned_int32_array($1, $2 + 7408 | 0, $2 + 84 | 0)) {
24680              break label$51
24681             }
24682             $2 = HEAP32[$0 + 4 >> 2];
24683             $9 = $9 + 1 | 0;
24684             if ($9 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 40 >> 2]) {
24685              continue
24686             }
24687             break;
24688            };
24689           }
24690           if (!FLAC__memory_alloc_aligned_int32_array($1, $2 + 7536 | 0, $2 + 212 | 0)) {
24691            break label$51
24692           }
24693          }
24694          $6 = 0;
24695          $10 = 1;
24696          $5 = 0;
24697          while (1) {
24698           if ($5 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {
24699            $9 = 0;
24700            $2 = 1;
24701            $3 = 0;
24702            while (1) {
24703             if ($9 & 1) {
24704              break label$51
24705             }
24706             $3 = (HEAP32[$8 >> 2] + ($5 << 3) | 0) + ($3 << 2) | 0;
24707             $4 = FLAC__memory_alloc_aligned_int32_array($1, $3 + 7540 | 0, $3 + 256 | 0);
24708             $7 = $2 & ($4 | 0) != 0;
24709             $9 = !$4;
24710             $3 = 1;
24711             $2 = 0;
24712             if ($7) {
24713              continue
24714             }
24715             break;
24716            };
24717            $5 = $5 + 1 | 0;
24718            if ($4) {
24719             continue
24720            }
24721            break label$51;
24722           }
24723           break;
24724          };
24725          $7 = 1;
24726          while (1) {
24727           $9 = 0;
24728           $2 = 1;
24729           $3 = 0;
24730           if (!$7) {
24731            break label$51
24732           }
24733           while (1) {
24734            if ($9 & 1) {
24735             break label$51
24736            }
24737            $3 = (HEAP32[$8 >> 2] + ($6 << 3) | 0) + ($3 << 2) | 0;
24738            $4 = FLAC__memory_alloc_aligned_int32_array($1, $3 + 7604 | 0, $3 + 320 | 0);
24739            $5 = $2 & ($4 | 0) != 0;
24740            $9 = !$4;
24741            $3 = 1;
24742            $2 = 0;
24743            if ($5) {
24744             continue
24745            }
24746            break;
24747           };
24748           $7 = ($4 | 0) != 0;
24749           $2 = $10 & $7;
24750           $6 = 1;
24751           $10 = 0;
24752           if ($2) {
24753            continue
24754           }
24755           break;
24756          };
24757          if (!$4) {
24758           break label$51
24759          }
24760          $3 = $1 << 1;
24761          $2 = HEAP32[$0 + 4 >> 2];
24762          $2 = FLAC__memory_alloc_aligned_uint64_array($3, $2 + 7620 | 0, $2 + 6848 | 0);
24763          $9 = HEAP32[$0 >> 2];
24764          $4 = HEAP32[$9 + 572 >> 2];
24765          if (!$4 | !$2) {
24766           break label$50
24767          }
24768          $2 = HEAP32[$8 >> 2];
24769          if (FLAC__memory_alloc_aligned_int32_array($3, $2 + 7624 | 0, $2 + 6852 | 0)) {
24770           break label$49
24771          }
24772         }
24773         $9 = HEAP32[$0 >> 2];
24774         break label$44;
24775        }
24776        if ($4 | !$2) {
24777         break label$44
24778        }
24779       }
24780       $9 = HEAP32[$8 >> 2];
24781       label$64 : {
24782        if (($1 | 0) == HEAP32[$9 >> 2]) {
24783         break label$64
24784        }
24785        $2 = HEAP32[$0 >> 2];
24786        if (!HEAP32[$2 + 556 >> 2] | !HEAP32[$2 + 40 >> 2]) {
24787         break label$64
24788        }
24789        $9 = 0;
24790        while (1) {
24791         label$66 : {
24792          label$67 : {
24793           label$68 : {
24794            label$69 : {
24795             label$70 : {
24796              label$71 : {
24797               label$72 : {
24798                label$73 : {
24799                 label$74 : {
24800                  label$75 : {
24801                   label$76 : {
24802                    label$77 : {
24803                     label$78 : {
24804                      label$79 : {
24805                       label$80 : {
24806                        label$81 : {
24807                         label$82 : {
24808                          label$83 : {
24809                           label$84 : {
24810                            $2 = ($9 << 4) + $2 | 0;
24811                            switch (HEAP32[$2 + 44 >> 2]) {
24812                            case 16:
24813                             break label$68;
24814                            case 15:
24815                             break label$69;
24816                            case 14:
24817                             break label$70;
24818                            case 13:
24819                             break label$71;
24820                            case 12:
24821                             break label$72;
24822                            case 11:
24823                             break label$73;
24824                            case 10:
24825                             break label$74;
24826                            case 9:
24827                             break label$75;
24828                            case 8:
24829                             break label$76;
24830                            case 7:
24831                             break label$77;
24832                            case 6:
24833                             break label$78;
24834                            case 5:
24835                             break label$79;
24836                            case 4:
24837                             break label$80;
24838                            case 3:
24839                             break label$81;
24840                            case 2:
24841                             break label$82;
24842                            case 1:
24843                             break label$83;
24844                            case 0:
24845                             break label$84;
24846                            default:
24847                             break label$67;
24848                            };
24849                           }
24850                           FLAC__window_bartlett(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24851                           break label$66;
24852                          }
24853                          FLAC__window_bartlett_hann(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24854                          break label$66;
24855                         }
24856                         FLAC__window_blackman(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24857                         break label$66;
24858                        }
24859                        FLAC__window_blackman_harris_4term_92db_sidelobe(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24860                        break label$66;
24861                       }
24862                       FLAC__window_connes(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24863                       break label$66;
24864                      }
24865                      FLAC__window_flattop(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24866                      break label$66;
24867                     }
24868                     FLAC__window_gauss(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2]);
24869                     break label$66;
24870                    }
24871                    FLAC__window_hamming(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24872                    break label$66;
24873                   }
24874                   FLAC__window_hann(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24875                   break label$66;
24876                  }
24877                  FLAC__window_kaiser_bessel(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24878                  break label$66;
24879                 }
24880                 FLAC__window_nuttall(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24881                 break label$66;
24882                }
24883                FLAC__window_rectangle(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24884                break label$66;
24885               }
24886               FLAC__window_triangle(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24887               break label$66;
24888              }
24889              FLAC__window_tukey(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2]);
24890              break label$66;
24891             }
24892             FLAC__window_partial_tukey(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2], HEAPF32[$2 + 52 >> 2], HEAPF32[$2 + 56 >> 2]);
24893             break label$66;
24894            }
24895            FLAC__window_punchout_tukey(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2], HEAPF32[$2 + 52 >> 2], HEAPF32[$2 + 56 >> 2]);
24896            break label$66;
24897           }
24898           FLAC__window_welch(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24899           break label$66;
24900          }
24901          FLAC__window_hann(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);
24902         }
24903         $9 = $9 + 1 | 0;
24904         $2 = HEAP32[$0 >> 2];
24905         if ($9 >>> 0 < HEAPU32[$2 + 40 >> 2]) {
24906          continue
24907         }
24908         break;
24909        };
24910        $9 = HEAP32[$8 >> 2];
24911       }
24912       HEAP32[$9 >> 2] = $1;
24913      }
24914      $1 = FLAC__bitwriter_init(HEAP32[$9 + 6856 >> 2]);
24915      $3 = HEAP32[$0 >> 2];
24916      if (!$1) {
24917       HEAP32[$3 >> 2] = 8;
24918       $9 = 1;
24919       break label$1;
24920      }
24921      if (HEAP32[$3 + 4 >> 2]) {
24922       $9 = 1;
24923       $2 = HEAP32[$8 >> 2];
24924       $1 = HEAP32[$3 + 36 >> 2] + 1 | 0;
24925       HEAP32[$2 + 11796 >> 2] = $1;
24926       label$87 : {
24927        if (!HEAP32[$3 + 24 >> 2]) {
24928         break label$87
24929        }
24930        $1 = safe_malloc_mul_2op_p(4, $1);
24931        HEAP32[HEAP32[$0 + 4 >> 2] + 11764 >> 2] = $1;
24932        $3 = HEAP32[$0 >> 2];
24933        if ($1) {
24934         while (1) {
24935          $2 = HEAP32[$8 >> 2];
24936          if ($9 >>> 0 >= HEAPU32[$3 + 24 >> 2]) {
24937           break label$87
24938          }
24939          $1 = safe_malloc_mul_2op_p(4, HEAP32[$2 + 11796 >> 2]);
24940          HEAP32[(HEAP32[$0 + 4 >> 2] + ($9 << 2) | 0) + 11764 >> 2] = $1;
24941          $9 = $9 + 1 | 0;
24942          $3 = HEAP32[$0 >> 2];
24943          if ($1) {
24944           continue
24945          }
24946          break;
24947         }
24948        }
24949        HEAP32[$3 >> 2] = 8;
24950        $9 = 1;
24951        break label$1;
24952       }
24953       HEAP32[$2 + 11800 >> 2] = 0;
24954       label$90 : {
24955        $2 = HEAP32[$2 + 11752 >> 2];
24956        if ($2) {
24957         break label$90
24958        }
24959        $2 = FLAC__stream_decoder_new();
24960        HEAP32[HEAP32[$8 >> 2] + 11752 >> 2] = $2;
24961        if ($2) {
24962         break label$90
24963        }
24964        HEAP32[HEAP32[$0 >> 2] >> 2] = 3;
24965        $9 = 1;
24966        break label$1;
24967       }
24968       $1 = FLAC__stream_decoder_init_stream($2, 18, 0, 0, 0, 0, 19, 20, 21, $0);
24969       $3 = HEAP32[$0 >> 2];
24970       if ($1) {
24971        break label$45
24972       }
24973       $2 = !HEAP32[$3 + 4 >> 2];
24974      } else {
24975       $2 = 1
24976      }
24977      $1 = HEAP32[$8 >> 2];
24978      HEAP32[$1 + 7312 >> 2] = 0;
24979      HEAP32[$1 + 7316 >> 2] = 0;
24980      HEAP32[$1 + 7292 >> 2] = 0;
24981      $4 = $1 + 11816 | 0;
24982      HEAP32[$4 >> 2] = 0;
24983      HEAP32[$4 + 4 >> 2] = 0;
24984      $4 = $1 + 11824 | 0;
24985      HEAP32[$4 >> 2] = 0;
24986      HEAP32[$4 + 4 >> 2] = 0;
24987      $4 = $1 + 11832 | 0;
24988      HEAP32[$4 >> 2] = 0;
24989      HEAP32[$4 + 4 >> 2] = 0;
24990      HEAP32[$1 + 11840 >> 2] = 0;
24991      HEAP32[$3 + 624 >> 2] = 0;
24992      HEAP32[$3 + 628 >> 2] = 0;
24993      HEAP32[$3 + 616 >> 2] = 0;
24994      HEAP32[$3 + 620 >> 2] = 0;
24995      HEAP32[$3 + 608 >> 2] = 0;
24996      HEAP32[$3 + 612 >> 2] = 0;
24997      if (!$2) {
24998       HEAP32[$1 + 11756 >> 2] = 0
24999      }
25000      if (!FLAC__bitwriter_write_raw_uint32(HEAP32[$1 + 6856 >> 2], HEAP32[1354], HEAP32[1355])) {
25001       HEAP32[HEAP32[$0 >> 2] >> 2] = 7;
25002       $9 = 1;
25003       break label$1;
25004      }
25005      $9 = 1;
25006      if (!write_bitbuffer_($0, 0, 0)) {
25007       break label$1
25008      }
25009      $1 = HEAP32[$0 + 4 >> 2];
25010      $2 = HEAP32[$0 >> 2];
25011      if (HEAP32[$2 + 4 >> 2]) {
25012       HEAP32[$1 + 11756 >> 2] = 1
25013      }
25014      HEAP32[$1 + 6872 >> 2] = 0;
25015      HEAP32[$1 + 6876 >> 2] = 0;
25016      HEAP32[$1 + 6880 >> 2] = 34;
25017      HEAP32[$1 + 6888 >> 2] = HEAP32[$2 + 36 >> 2];
25018      HEAP32[HEAP32[$0 + 4 >> 2] + 6892 >> 2] = HEAP32[HEAP32[$0 >> 2] + 36 >> 2];
25019      HEAP32[HEAP32[$0 + 4 >> 2] + 6896 >> 2] = 0;
25020      HEAP32[HEAP32[$0 + 4 >> 2] + 6900 >> 2] = 0;
25021      HEAP32[HEAP32[$0 + 4 >> 2] + 6904 >> 2] = HEAP32[HEAP32[$0 >> 2] + 32 >> 2];
25022      HEAP32[HEAP32[$0 + 4 >> 2] + 6908 >> 2] = HEAP32[HEAP32[$0 >> 2] + 24 >> 2];
25023      HEAP32[HEAP32[$0 + 4 >> 2] + 6912 >> 2] = HEAP32[HEAP32[$0 >> 2] + 28 >> 2];
25024      $1 = HEAP32[$0 >> 2];
25025      $2 = HEAP32[$1 + 596 >> 2];
25026      $3 = HEAP32[$0 + 4 >> 2] + 6920 | 0;
25027      HEAP32[$3 >> 2] = HEAP32[$1 + 592 >> 2];
25028      HEAP32[$3 + 4 >> 2] = $2;
25029      $1 = HEAP32[$0 + 4 >> 2];
25030      $2 = $1 + 6936 | 0;
25031      HEAP32[$2 >> 2] = 0;
25032      HEAP32[$2 + 4 >> 2] = 0;
25033      $1 = $1 + 6928 | 0;
25034      HEAP32[$1 >> 2] = 0;
25035      HEAP32[$1 + 4 >> 2] = 0;
25036      if (HEAP32[HEAP32[$0 >> 2] + 12 >> 2]) {
25037       FLAC__MD5Init(HEAP32[$8 >> 2] + 7060 | 0)
25038      }
25039      $1 = HEAP32[$8 >> 2];
25040      if (!FLAC__add_metadata_block($1 + 6872 | 0, HEAP32[$1 + 6856 >> 2])) {
25041       HEAP32[HEAP32[$0 >> 2] >> 2] = 7;
25042       break label$1;
25043      }
25044      if (!write_bitbuffer_($0, 0, 0)) {
25045       break label$1
25046      }
25047      HEAP32[HEAP32[$8 >> 2] + 6896 >> 2] = -1 << HEAP32[1358] ^ -1;
25048      $1 = HEAP32[$8 >> 2] + 6920 | 0;
25049      HEAP32[$1 >> 2] = 0;
25050      HEAP32[$1 + 4 >> 2] = 0;
25051      if (!$11) {
25052       HEAP32[$15 >> 2] = 4;
25053       $2 = HEAP32[HEAP32[$0 >> 2] + 604 >> 2];
25054       $1 = $15;
25055       HEAP32[$1 + 24 >> 2] = 0;
25056       HEAP32[$1 + 28 >> 2] = 0;
25057       HEAP32[$1 + 16 >> 2] = 0;
25058       HEAP32[$1 + 20 >> 2] = 0;
25059       HEAP32[$1 + 8 >> 2] = 8;
25060       HEAP32[$1 + 4 >> 2] = !$2;
25061       if (!FLAC__add_metadata_block($1, HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2])) {
25062        HEAP32[HEAP32[$0 >> 2] >> 2] = 7;
25063        break label$1;
25064       }
25065       if (!write_bitbuffer_($0, 0, 0)) {
25066        break label$1
25067       }
25068      }
25069      label$98 : {
25070       $3 = HEAP32[$0 >> 2];
25071       $4 = HEAP32[$3 + 604 >> 2];
25072       if (!$4) {
25073        break label$98
25074       }
25075       $2 = 0;
25076       while (1) {
25077        $1 = HEAP32[HEAP32[$3 + 600 >> 2] + ($2 << 2) >> 2];
25078        HEAP32[$1 + 4 >> 2] = ($4 + -1 | 0) == ($2 | 0);
25079        if (!FLAC__add_metadata_block($1, HEAP32[HEAP32[$8 >> 2] + 6856 >> 2])) {
25080         HEAP32[HEAP32[$0 >> 2] >> 2] = 7;
25081         break label$1;
25082        }
25083        if (write_bitbuffer_($0, 0, 0)) {
25084         $2 = $2 + 1 | 0;
25085         $3 = HEAP32[$0 >> 2];
25086         $4 = HEAP32[$3 + 604 >> 2];
25087         if ($2 >>> 0 >= $4 >>> 0) {
25088          break label$98
25089         }
25090         continue;
25091        }
25092        break;
25093       };
25094       break label$1;
25095      }
25096      label$102 : {
25097       $1 = HEAP32[$8 >> 2];
25098       $2 = HEAP32[$1 + 7272 >> 2];
25099       if (!$2) {
25100        break label$102
25101       }
25102       $1 = FUNCTION_TABLE[$2]($0, $3 + 624 | 0, HEAP32[$1 + 7288 >> 2]) | 0;
25103       $3 = HEAP32[$0 >> 2];
25104       if (($1 | 0) != 1) {
25105        break label$102
25106       }
25107       HEAP32[$3 >> 2] = 5;
25108       break label$1;
25109      }
25110      $9 = 0;
25111      if (!HEAP32[$3 + 4 >> 2]) {
25112       break label$1
25113      }
25114      HEAP32[HEAP32[$8 >> 2] + 11756 >> 2] = 2;
25115      break label$1;
25116     }
25117     HEAP32[HEAP32[$0 >> 2] >> 2] = 2;
25118     $9 = 1;
25119     break label$1;
25120    }
25121    HEAP32[$3 >> 2] = 3;
25122    $9 = 1;
25123    break label$1;
25124   }
25125   HEAP32[$9 >> 2] = 8;
25126   $9 = 1;
25127  }
25128  global$0 = $15 + 176 | 0;
25129  return $9;
25130 }
25131
25132 function precompute_partition_info_sums_($0, $1, $2, $3, $4, $5, $6) {
25133  $0 = $0 | 0;
25134  $1 = $1 | 0;
25135  $2 = $2 | 0;
25136  $3 = $3 | 0;
25137  $4 = $4 | 0;
25138  $5 = $5 | 0;
25139  $6 = $6 | 0;
25140  var $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0;
25141  $11 = 1 << $5;
25142  $14 = $11 >>> 0 > 1 ? $11 : 1;
25143  $8 = 0 - $3 | 0;
25144  $12 = $2 + $3 >>> $5 | 0;
25145  $9 = $12 - $3 | 0;
25146  label$1 : {
25147   if ($6 + 4 >>> 0 < (Math_clz32($12) ^ -32) + 33 >>> 0) {
25148    $6 = 0;
25149    while (1) {
25150     $3 = 0;
25151     $8 = $8 + $12 | 0;
25152     if ($7 >>> 0 < $8 >>> 0) {
25153      while (1) {
25154       $2 = HEAP32[($7 << 2) + $0 >> 2];
25155       $10 = $2 >> 31;
25156       $3 = ($10 ^ $2 + $10) + $3 | 0;
25157       $7 = $7 + 1 | 0;
25158       if ($7 >>> 0 < $8 >>> 0) {
25159        continue
25160       }
25161       break;
25162      };
25163      $7 = $9;
25164     }
25165     $2 = ($6 << 3) + $1 | 0;
25166     HEAP32[$2 >> 2] = $3;
25167     HEAP32[$2 + 4 >> 2] = 0;
25168     $9 = $9 + $12 | 0;
25169     $6 = $6 + 1 | 0;
25170     if (($14 | 0) != ($6 | 0)) {
25171      continue
25172     }
25173     break;
25174    };
25175    break label$1;
25176   }
25177   $2 = 0;
25178   while (1) {
25179    $13 = 0;
25180    $3 = 0;
25181    $8 = $8 + $12 | 0;
25182    if ($7 >>> 0 < $8 >>> 0) {
25183     while (1) {
25184      $6 = HEAP32[($7 << 2) + $0 >> 2];
25185      $10 = $6 >> 31;
25186      $10 = $10 ^ $6 + $10;
25187      $6 = $10 + $13 | 0;
25188      if ($6 >>> 0 < $10 >>> 0) {
25189       $3 = $3 + 1 | 0
25190      }
25191      $13 = $6;
25192      $7 = $7 + 1 | 0;
25193      if ($7 >>> 0 < $8 >>> 0) {
25194       continue
25195      }
25196      break;
25197     };
25198     $7 = $9;
25199    }
25200    $6 = ($2 << 3) + $1 | 0;
25201    HEAP32[$6 >> 2] = $13;
25202    HEAP32[$6 + 4 >> 2] = $3;
25203    $9 = $9 + $12 | 0;
25204    $2 = $2 + 1 | 0;
25205    if (($14 | 0) != ($2 | 0)) {
25206     continue
25207    }
25208    break;
25209   };
25210  }
25211  if (($5 | 0) > ($4 | 0)) {
25212   $7 = 0;
25213   $0 = $11;
25214   while (1) {
25215    $5 = $5 + -1 | 0;
25216    $8 = 0;
25217    $0 = $0 >>> 1 | 0;
25218    if ($0) {
25219     while (1) {
25220      $3 = ($7 << 3) + $1 | 0;
25221      $2 = HEAP32[$3 + 8 >> 2];
25222      $9 = HEAP32[$3 + 12 >> 2] + HEAP32[$3 + 4 >> 2] | 0;
25223      $3 = HEAP32[$3 >> 2];
25224      $2 = $3 + $2 | 0;
25225      if ($2 >>> 0 < $3 >>> 0) {
25226       $9 = $9 + 1 | 0
25227      }
25228      $6 = ($11 << 3) + $1 | 0;
25229      HEAP32[$6 >> 2] = $2;
25230      HEAP32[$6 + 4 >> 2] = $9;
25231      $7 = $7 + 2 | 0;
25232      $11 = $11 + 1 | 0;
25233      $8 = $8 + 1 | 0;
25234      if (($8 | 0) != ($0 | 0)) {
25235       continue
25236      }
25237      break;
25238     }
25239    }
25240    if (($5 | 0) > ($4 | 0)) {
25241     continue
25242    }
25243    break;
25244   };
25245  }
25246 }
25247
25248 function verify_read_callback_($0, $1, $2, $3) {
25249  $0 = $0 | 0;
25250  $1 = $1 | 0;
25251  $2 = $2 | 0;
25252  $3 = $3 | 0;
25253  var $4 = 0, $5 = 0;
25254  $5 = HEAP32[$3 + 4 >> 2];
25255  if (HEAP32[$5 + 11760 >> 2]) {
25256   HEAP32[$2 >> 2] = 4;
25257   $0 = HEAPU8[5409] | HEAPU8[5410] << 8 | (HEAPU8[5411] << 16 | HEAPU8[5412] << 24);
25258   HEAP8[$1 | 0] = $0;
25259   HEAP8[$1 + 1 | 0] = $0 >>> 8;
25260   HEAP8[$1 + 2 | 0] = $0 >>> 16;
25261   HEAP8[$1 + 3 | 0] = $0 >>> 24;
25262   HEAP32[HEAP32[$3 + 4 >> 2] + 11760 >> 2] = 0;
25263   return 0;
25264  }
25265  $0 = HEAP32[$5 + 11812 >> 2];
25266  if (!$0) {
25267   return 2
25268  }
25269  $4 = HEAP32[$2 >> 2];
25270  if ($0 >>> 0 < $4 >>> 0) {
25271   HEAP32[$2 >> 2] = $0;
25272   $4 = $0;
25273  }
25274  memcpy($1, HEAP32[$5 + 11804 >> 2], $4);
25275  $0 = HEAP32[$3 + 4 >> 2];
25276  $1 = $0 + 11804 | 0;
25277  $3 = $1;
25278  $4 = HEAP32[$1 >> 2];
25279  $1 = HEAP32[$2 >> 2];
25280  HEAP32[$3 >> 2] = $4 + $1;
25281  $0 = $0 + 11812 | 0;
25282  HEAP32[$0 >> 2] = HEAP32[$0 >> 2] - $1;
25283  return 0;
25284 }
25285
25286 function verify_write_callback_($0, $1, $2, $3) {
25287  $0 = $0 | 0;
25288  $1 = $1 | 0;
25289  $2 = $2 | 0;
25290  $3 = $3 | 0;
25291  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
25292  $7 = HEAP32[$1 >> 2];
25293  $5 = HEAP32[$3 + 4 >> 2];
25294  $0 = HEAP32[$1 + 8 >> 2];
25295  if ($0) {
25296   $4 = $7 << 2;
25297   while (1) {
25298    $8 = $6 << 2;
25299    $9 = HEAP32[$8 + $2 >> 2];
25300    $10 = HEAP32[($5 + $8 | 0) + 11764 >> 2];
25301    if (memcmp($9, $10, $4)) {
25302     $4 = 0;
25303     label$4 : {
25304      if ($7) {
25305       $0 = 0;
25306       while (1) {
25307        $2 = $0 << 2;
25308        $8 = HEAP32[$2 + $9 >> 2];
25309        $2 = HEAP32[$2 + $10 >> 2];
25310        if (($8 | 0) != ($2 | 0)) {
25311         $4 = $0;
25312         break label$4;
25313        }
25314        $0 = $0 + 1 | 0;
25315        if (($7 | 0) != ($0 | 0)) {
25316         continue
25317        }
25318        break;
25319       };
25320      }
25321      $2 = 0;
25322      $8 = 0;
25323     }
25324     $9 = HEAP32[$1 + 28 >> 2];
25325     $0 = $4;
25326     $11 = $0 + HEAP32[$1 + 24 >> 2] | 0;
25327     if ($11 >>> 0 < $0 >>> 0) {
25328      $9 = $9 + 1 | 0
25329     }
25330     $10 = $5 + 11816 | 0;
25331     HEAP32[$10 >> 2] = $11;
25332     HEAP32[$10 + 4 >> 2] = $9;
25333     $0 = HEAP32[$1 + 28 >> 2];
25334     $1 = HEAP32[$1 + 24 >> 2];
25335     HEAP32[$5 + 11840 >> 2] = $8;
25336     HEAP32[$5 + 11836 >> 2] = $2;
25337     HEAP32[$5 + 11832 >> 2] = $4;
25338     HEAP32[$5 + 11828 >> 2] = $6;
25339     (wasm2js_i32$0 = $5 + 11824 | 0, wasm2js_i32$1 = __wasm_i64_udiv($1, $0, $7)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
25340     HEAP32[HEAP32[$3 >> 2] >> 2] = 4;
25341     return 1;
25342    }
25343    $6 = $6 + 1 | 0;
25344    if (($0 | 0) != ($6 | 0)) {
25345     continue
25346    }
25347    break;
25348   };
25349   $2 = $5 + 11800 | 0;
25350   $1 = HEAP32[$2 >> 2] - $7 | 0;
25351   HEAP32[$2 >> 2] = $1;
25352   label$8 : {
25353    if (!$0) {
25354     break label$8
25355    }
25356    $2 = HEAP32[$5 + 11764 >> 2];
25357    $4 = $2;
25358    $2 = $7 << 2;
25359    memmove($4, $4 + $2 | 0, $1 << 2);
25360    $6 = 1;
25361    if (($0 | 0) == 1) {
25362     break label$8
25363    }
25364    while (1) {
25365     $1 = HEAP32[$3 + 4 >> 2];
25366     $4 = HEAP32[($1 + ($6 << 2) | 0) + 11764 >> 2];
25367     memmove($4, $2 + $4 | 0, HEAP32[$1 + 11800 >> 2] << 2);
25368     $6 = $6 + 1 | 0;
25369     if (($0 | 0) != ($6 | 0)) {
25370      continue
25371     }
25372     break;
25373    };
25374   }
25375   return 0;
25376  }
25377  $0 = $5 + 11800 | 0;
25378  HEAP32[$0 >> 2] = HEAP32[$0 >> 2] - $7;
25379  return 0;
25380 }
25381
25382 function verify_metadata_callback_($0, $1, $2) {
25383  $0 = $0 | 0;
25384  $1 = $1 | 0;
25385  $2 = $2 | 0;
25386 }
25387
25388 function verify_error_callback_($0, $1, $2) {
25389  $0 = $0 | 0;
25390  $1 = $1 | 0;
25391  $2 = $2 | 0;
25392  HEAP32[HEAP32[$2 >> 2] >> 2] = 3;
25393 }
25394
25395 function write_bitbuffer_($0, $1, $2) {
25396  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0;
25397  $5 = global$0 - 16 | 0;
25398  global$0 = $5;
25399  $4 = FLAC__bitwriter_get_buffer(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2], $5 + 4 | 0, $5);
25400  $3 = HEAP32[$0 >> 2];
25401  label$1 : {
25402   label$2 : {
25403    if (!$4) {
25404     HEAP32[$3 >> 2] = 8;
25405     break label$2;
25406    }
25407    label$4 : {
25408     if (!HEAP32[$3 + 4 >> 2]) {
25409      break label$4
25410     }
25411     $3 = HEAP32[$0 + 4 >> 2];
25412     HEAP32[$3 + 11804 >> 2] = HEAP32[$5 + 4 >> 2];
25413     HEAP32[$3 + 11812 >> 2] = HEAP32[$5 >> 2];
25414     if (!HEAP32[$3 + 11756 >> 2]) {
25415      HEAP32[$3 + 11760 >> 2] = 1;
25416      break label$4;
25417     }
25418     if (FLAC__stream_decoder_process_single(HEAP32[$3 + 11752 >> 2])) {
25419      break label$4
25420     }
25421     FLAC__bitwriter_clear(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]);
25422     $0 = HEAP32[$0 >> 2];
25423     if (HEAP32[$0 >> 2] == 4) {
25424      break label$1
25425     }
25426     HEAP32[$0 >> 2] = 3;
25427     break label$1;
25428    }
25429    $12 = HEAP32[$5 >> 2];
25430    $14 = HEAP32[$5 + 4 >> 2];
25431    HEAP32[$5 + 8 >> 2] = 0;
25432    HEAP32[$5 + 12 >> 2] = 0;
25433    label$6 : {
25434     label$7 : {
25435      $3 = HEAP32[$0 + 4 >> 2];
25436      $4 = HEAP32[$3 + 7272 >> 2];
25437      if (!$4) {
25438       break label$7
25439      }
25440      if ((FUNCTION_TABLE[$4]($0, $5 + 8 | 0, HEAP32[$3 + 7288 >> 2]) | 0) != 1) {
25441       break label$7
25442      }
25443      break label$6;
25444     }
25445     label$8 : {
25446      if ($1) {
25447       break label$8
25448      }
25449      label$9 : {
25450       switch (HEAPU8[$14 | 0] & 127) {
25451       case 0:
25452        $3 = HEAP32[$5 + 12 >> 2];
25453        $4 = HEAP32[$0 >> 2];
25454        HEAP32[$4 + 608 >> 2] = HEAP32[$5 + 8 >> 2];
25455        HEAP32[$4 + 612 >> 2] = $3;
25456        break label$8;
25457       case 3:
25458        break label$9;
25459       default:
25460        break label$8;
25461       };
25462      }
25463      $3 = HEAP32[$0 >> 2];
25464      if (HEAP32[$3 + 616 >> 2] | HEAP32[$3 + 620 >> 2]) {
25465       break label$8
25466      }
25467      $4 = HEAP32[$5 + 12 >> 2];
25468      HEAP32[$3 + 616 >> 2] = HEAP32[$5 + 8 >> 2];
25469      HEAP32[$3 + 620 >> 2] = $4;
25470     }
25471     $6 = HEAP32[$0 + 4 >> 2];
25472     $7 = HEAP32[$6 + 7048 >> 2];
25473     label$11 : {
25474      if (!$7) {
25475       break label$11
25476      }
25477      $8 = HEAP32[$0 >> 2];
25478      $4 = $8;
25479      $3 = HEAP32[$4 + 628 >> 2];
25480      $15 = HEAP32[$4 + 624 >> 2];
25481      if (!($3 | $15)) {
25482       break label$11
25483      }
25484      $16 = HEAP32[$7 >> 2];
25485      if (!$16) {
25486       break label$11
25487      }
25488      $10 = HEAP32[$6 + 7292 >> 2];
25489      if ($10 >>> 0 >= $16 >>> 0) {
25490       break label$11
25491      }
25492      $13 = HEAP32[$6 + 7316 >> 2];
25493      $4 = $13;
25494      $17 = HEAP32[$6 + 7312 >> 2];
25495      $18 = HEAP32[$8 + 36 >> 2];
25496      $8 = $18;
25497      $9 = $17 + $8 | 0;
25498      if ($9 >>> 0 < $8 >>> 0) {
25499       $4 = $4 + 1 | 0
25500      }
25501      $4 = $4 + -1 | 0;
25502      $11 = $4 + 1 | 0;
25503      $8 = $4;
25504      $4 = $9 + -1 | 0;
25505      $8 = ($4 | 0) != -1 ? $11 : $8;
25506      $19 = HEAP32[$7 + 4 >> 2];
25507      while (1) {
25508       $7 = $19 + Math_imul($10, 24) | 0;
25509       $11 = HEAP32[$7 >> 2];
25510       $9 = HEAP32[$7 + 4 >> 2];
25511       if (($8 | 0) == ($9 | 0) & $11 >>> 0 > $4 >>> 0 | $9 >>> 0 > $8 >>> 0) {
25512        break label$11
25513       }
25514       if (($9 | 0) == ($13 | 0) & $11 >>> 0 >= $17 >>> 0 | $9 >>> 0 > $13 >>> 0) {
25515        HEAP32[$7 >> 2] = $17;
25516        HEAP32[$7 + 4 >> 2] = $13;
25517        $9 = HEAP32[$5 + 8 >> 2];
25518        $11 = HEAP32[$5 + 12 >> 2];
25519        HEAP32[$7 + 16 >> 2] = $18;
25520        HEAP32[$7 + 8 >> 2] = $9 - $15;
25521        HEAP32[$7 + 12 >> 2] = $11 - ($3 + ($9 >>> 0 < $15 >>> 0) | 0);
25522       }
25523       $10 = $10 + 1 | 0;
25524       HEAP32[$6 + 7292 >> 2] = $10;
25525       if (($10 | 0) != ($16 | 0)) {
25526        continue
25527       }
25528       break;
25529      };
25530     }
25531     label$14 : {
25532      if (HEAP32[$6 + 7260 >> 2]) {
25533       $2 = FLAC__ogg_encoder_aspect_write_callback_wrapper(HEAP32[$0 >> 2] + 632 | 0, $14, $12, $1, HEAP32[$6 + 7056 >> 2], $2, HEAP32[$6 + 7276 >> 2], $0, HEAP32[$6 + 7288 >> 2]);
25534       break label$14;
25535      }
25536      $2 = FUNCTION_TABLE[HEAP32[$6 + 7276 >> 2]]($0, $14, $12, $1, HEAP32[$6 + 7056 >> 2], HEAP32[$6 + 7288 >> 2]) | 0;
25537     }
25538     if (!$2) {
25539      $2 = HEAP32[$0 + 4 >> 2];
25540      $3 = $2;
25541      $8 = $3;
25542      $4 = HEAP32[$3 + 7308 >> 2];
25543      $6 = $12 + HEAP32[$3 + 7304 >> 2] | 0;
25544      if ($6 >>> 0 < $12 >>> 0) {
25545       $4 = $4 + 1 | 0
25546      }
25547      HEAP32[$8 + 7304 >> 2] = $6;
25548      HEAP32[$3 + 7308 >> 2] = $4;
25549      $3 = HEAP32[$2 + 7316 >> 2];
25550      $4 = HEAP32[$2 + 7312 >> 2] + $1 | 0;
25551      if ($4 >>> 0 < $1 >>> 0) {
25552       $3 = $3 + 1 | 0
25553      }
25554      HEAP32[$2 + 7312 >> 2] = $4;
25555      HEAP32[$2 + 7316 >> 2] = $3;
25556      $10 = 1;
25557      $4 = $2;
25558      $3 = HEAP32[$2 + 7320 >> 2];
25559      $2 = HEAP32[$2 + 7056 >> 2] + 1 | 0;
25560      HEAP32[$4 + 7320 >> 2] = $3 >>> 0 > $2 >>> 0 ? $3 : $2;
25561      FLAC__bitwriter_clear(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]);
25562      if (!$1) {
25563       break label$1
25564      }
25565      $1 = HEAP32[$0 + 4 >> 2] + 6896 | 0;
25566      $2 = HEAP32[$1 >> 2];
25567      $4 = $1;
25568      $1 = HEAP32[$5 >> 2];
25569      HEAP32[$4 >> 2] = $1 >>> 0 < $2 >>> 0 ? $1 : $2;
25570      $2 = HEAP32[$0 + 4 >> 2] + 6900 | 0;
25571      $0 = HEAP32[$2 >> 2];
25572      HEAP32[$2 >> 2] = $1 >>> 0 > $0 >>> 0 ? $1 : $0;
25573      break label$1;
25574     }
25575    }
25576    HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
25577    FLAC__bitwriter_clear(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]);
25578    HEAP32[HEAP32[$0 >> 2] >> 2] = 5;
25579   }
25580   $10 = 0;
25581  }
25582  global$0 = $5 + 16 | 0;
25583  return $10;
25584 }
25585
25586 function FLAC__stream_encoder_init_ogg_stream($0, $1, $2, $3, $4, $5, $6) {
25587  $0 = $0 | 0;
25588  $1 = $1 | 0;
25589  $2 = $2 | 0;
25590  $3 = $3 | 0;
25591  $4 = $4 | 0;
25592  $5 = $5 | 0;
25593  $6 = $6 | 0;
25594  return init_stream_internal__1($0, $1, $2, $3, $4, $5, $6, 1) | 0;
25595 }
25596
25597 function process_subframe_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {
25598  var $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = Math_fround(0), $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = Math_fround(0), $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0;
25599  $14 = global$0 - 576 | 0;
25600  global$0 = $14;
25601  $25 = HEAP32[(HEAPU32[HEAP32[$0 >> 2] + 28 >> 2] > 16 ? 5644 : 5640) >> 2];
25602  $12 = HEAP32[$3 >> 2];
25603  label$1 : {
25604   label$2 : {
25605    if (HEAP32[HEAP32[$0 + 4 >> 2] + 7256 >> 2]) {
25606     $11 = -1;
25607     if ($12 >>> 0 > 3) {
25608      break label$2
25609     }
25610    }
25611    $16 = HEAP32[$6 >> 2];
25612    HEAP32[$16 + 4 >> 2] = $5;
25613    HEAP32[$16 >> 2] = 1;
25614    $11 = HEAP32[$16 + 288 >> 2] + (HEAP32[1416] + (HEAP32[1415] + (HEAP32[1414] + Math_imul($4, $12) | 0) | 0) | 0) | 0;
25615    $12 = HEAP32[$3 >> 2];
25616    if ($12 >>> 0 < 4) {
25617     break label$1
25618    }
25619   }
25620   $13 = HEAP32[$0 + 4 >> 2];
25621   $16 = $12 + -4 | 0;
25622   label$4 : {
25623    if (((Math_clz32($16 | 1) ^ 31) + $4 | 0) + 4 >>> 0 <= 32) {
25624     $13 = FUNCTION_TABLE[HEAP32[$13 + 7224 >> 2]]($5 + 16 | 0, $16, $14 + 416 | 0) | 0;
25625     break label$4;
25626    }
25627    $13 = FUNCTION_TABLE[HEAP32[$13 + 7228 >> 2]]($5 + 16 | 0, $16, $14 + 416 | 0) | 0;
25628   }
25629   label$6 : {
25630    label$7 : {
25631     label$8 : {
25632      label$9 : {
25633       $15 = HEAP32[$0 + 4 >> 2];
25634       if (HEAP32[$15 + 7248 >> 2] | HEAPF32[$14 + 420 >> 2] != Math_fround(0.0)) {
25635        break label$9
25636       }
25637       $12 = 1;
25638       $17 = HEAP32[$5 >> 2];
25639       $16 = HEAP32[$3 >> 2];
25640       if ($16 >>> 0 <= 1) {
25641        break label$8
25642       }
25643       while (1) {
25644        if (($17 | 0) != HEAP32[($12 << 2) + $5 >> 2]) {
25645         break label$9
25646        }
25647        $12 = $12 + 1 | 0;
25648        if ($12 >>> 0 < $16 >>> 0) {
25649         continue
25650        }
25651        break;
25652       };
25653       break label$8;
25654      }
25655      $12 = HEAP32[$0 >> 2];
25656      if (!HEAP32[$15 + 7252 >> 2]) {
25657       $16 = $11;
25658       break label$7;
25659      }
25660      $16 = -1;
25661      if (($11 | 0) != -1) {
25662       $16 = $11;
25663       break label$6;
25664      }
25665      if (!HEAP32[$12 + 556 >> 2]) {
25666       break label$7
25667      }
25668      $16 = $11;
25669      break label$6;
25670     }
25671     $0 = HEAP32[$6 + 4 >> 2];
25672     HEAP32[$0 + 4 >> 2] = $17;
25673     HEAP32[$0 >> 2] = 0;
25674     $0 = HEAP32[$0 + 288 >> 2] + (HEAP32[1416] + (HEAP32[1415] + (HEAP32[1414] + $4 | 0) | 0) | 0) | 0;
25675     $19 = $0 >>> 0 < $11 >>> 0;
25676     $11 = $19 ? $0 : $11;
25677     break label$1;
25678    }
25679    $11 = HEAP32[$12 + 568 >> 2];
25680    $18 = $11 ? 0 : $13;
25681    $13 = $11 ? 4 : $13;
25682    $11 = HEAP32[$3 >> 2];
25683    $29 = $13 >>> 0 < $11 >>> 0 ? $13 : $11 + -1 | 0;
25684    if ($18 >>> 0 > $29 >>> 0) {
25685     break label$6
25686    }
25687    $32 = $25 + -1 | 0;
25688    $33 = HEAP32[1416];
25689    $30 = HEAP32[1415];
25690    $34 = HEAP32[1414];
25691    $42 = Math_fround($4 >>> 0);
25692    while (1) {
25693     $12 = $18 << 2;
25694     $35 = HEAPF32[$12 + ($14 + 416 | 0) >> 2];
25695     if (!($35 >= $42)) {
25696      $31 = !$19;
25697      $17 = $31 << 2;
25698      $36 = HEAP32[$17 + $7 >> 2];
25699      $21 = HEAP32[$6 + $17 >> 2];
25700      $23 = HEAP32[HEAP32[$0 >> 2] + 572 >> 2];
25701      $11 = HEAP32[$0 + 4 >> 2];
25702      $13 = HEAP32[$11 + 6852 >> 2];
25703      $15 = HEAP32[$11 + 6848 >> 2];
25704      $11 = $5 + $12 | 0;
25705      $12 = HEAP32[$3 >> 2] - $18 | 0;
25706      $17 = HEAP32[$8 + $17 >> 2];
25707      FLAC__fixed_compute_residual($11, $12, $18, $17);
25708      HEAP32[$21 + 36 >> 2] = $17;
25709      HEAP32[$21 + 12 >> 2] = $36;
25710      HEAP32[$21 >> 2] = 2;
25711      HEAP32[$21 + 4 >> 2] = 0;
25712      $37 = $35 > Math_fround(0.0);
25713      $26 = HEAP32[$0 + 4 >> 2];
25714      $22 = $18;
25715      $27 = +$35 + .5;
25716      label$15 : {
25717       if ($27 < 4294967296.0 & $27 >= 0.0) {
25718        $11 = ~~$27 >>> 0;
25719        break label$15;
25720       }
25721       $11 = 0;
25722      }
25723      $11 = $37 ? $11 + 1 | 0 : 1;
25724      $15 = find_best_partition_order_($26, $17, $15, $13, $12, $22, $11 >>> 0 < $25 >>> 0 ? $11 : $32, $25, $1, $2, $4, $23, $21 + 4 | 0);
25725      HEAP32[$21 + 16 >> 2] = $18;
25726      if ($18) {
25727       $13 = $21 + 20 | 0;
25728       $11 = 0;
25729       while (1) {
25730        $12 = $11 << 2;
25731        HEAP32[$12 + $13 >> 2] = HEAP32[$5 + $12 >> 2];
25732        $11 = $11 + 1 | 0;
25733        if (($18 | 0) != ($11 | 0)) {
25734         continue
25735        }
25736        break;
25737       };
25738      }
25739      $11 = HEAP32[$21 + 288 >> 2] + ($33 + ($30 + ($34 + ($15 + Math_imul($4, $18) | 0) | 0) | 0) | 0) | 0;
25740      $12 = $11 >>> 0 < $16 >>> 0;
25741      $19 = $12 ? $31 : $19;
25742      $16 = $12 ? $11 : $16;
25743     }
25744     $18 = $18 + 1 | 0;
25745     if ($18 >>> 0 <= $29 >>> 0) {
25746      continue
25747     }
25748     break;
25749    };
25750    $12 = HEAP32[$0 >> 2];
25751   }
25752   $13 = HEAP32[$12 + 556 >> 2];
25753   if (!$13) {
25754    $11 = $16;
25755    break label$1;
25756   }
25757   $11 = HEAP32[$3 >> 2];
25758   $13 = $13 >>> 0 < $11 >>> 0 ? $13 : $11 + -1 | 0;
25759   HEAP32[$14 + 12 >> 2] = $13;
25760   if (!$13) {
25761    $11 = $16;
25762    break label$1;
25763   }
25764   if (!HEAP32[$12 + 40 >> 2]) {
25765    $11 = $16;
25766    break label$1;
25767   }
25768   $40 = 33 - $4 | 0;
25769   $43 = $25 + -1 | 0;
25770   $44 = HEAP32[1413];
25771   $45 = HEAP32[1412];
25772   $46 = HEAP32[1416];
25773   $21 = HEAP32[1415];
25774   $47 = HEAP32[1414];
25775   $27 = +($4 >>> 0);
25776   $29 = $4 >>> 0 < 18;
25777   $32 = $4 >>> 0 > 16;
25778   $33 = $4 >>> 0 > 17;
25779   while (1) {
25780    $12 = HEAP32[$0 + 4 >> 2];
25781    FLAC__lpc_window_data($5, HEAP32[($12 + ($38 << 2) | 0) + 84 >> 2], HEAP32[$12 + 212 >> 2], $11);
25782    $11 = HEAP32[$0 + 4 >> 2];
25783    FUNCTION_TABLE[HEAP32[$11 + 7232 >> 2]](HEAP32[$11 + 212 >> 2], HEAP32[$3 >> 2], HEAP32[$14 + 12 >> 2] + 1 | 0, $14 + 272 | 0);
25784    label$23 : {
25785     if (HEAPF32[$14 + 272 >> 2] == Math_fround(0.0)) {
25786      break label$23
25787     }
25788     FLAC__lpc_compute_lp_coefficients($14 + 272 | 0, $14 + 12 | 0, HEAP32[$0 + 4 >> 2] + 7628 | 0, $14 + 16 | 0);
25789     $15 = 1;
25790     $12 = HEAP32[$14 + 12 >> 2];
25791     $17 = HEAP32[$0 >> 2];
25792     if (!HEAP32[$17 + 568 >> 2]) {
25793      $11 = $14;
25794      $12 = FLAC__lpc_compute_best_order($11 + 16 | 0, $12, HEAP32[$3 >> 2], (HEAP32[$17 + 564 >> 2] ? 5 : HEAP32[$17 + 560 >> 2]) + $4 | 0);
25795      HEAP32[$11 + 12 >> 2] = $12;
25796      $15 = $12;
25797     }
25798     $11 = HEAP32[$3 >> 2];
25799     if ($12 >>> 0 >= $11 >>> 0) {
25800      $12 = $11 + -1 | 0;
25801      HEAP32[$14 + 12 >> 2] = $12;
25802     }
25803     if ($15 >>> 0 > $12 >>> 0) {
25804      break label$23
25805     }
25806     while (1) {
25807      label$29 : {
25808       $30 = $15 + -1 | 0;
25809       $24 = FLAC__lpc_compute_expected_bits_per_residual_sample(HEAPF64[($14 + 16 | 0) + ($30 << 3) >> 3], $11 - $15 | 0);
25810       if ($24 >= $27) {
25811        break label$29
25812       }
25813       $11 = $24 > 0.0;
25814       $24 = $24 + .5;
25815       label$30 : {
25816        if ($24 < 4294967296.0 & $24 >= 0.0) {
25817         $13 = ~~$24 >>> 0;
25818         break label$30;
25819        }
25820        $13 = 0;
25821       }
25822       $13 = $11 ? $13 + 1 | 0 : 1;
25823       $11 = $13 >>> 0 < $25 >>> 0;
25824       $12 = HEAP32[$0 >> 2];
25825       label$32 : {
25826        if (HEAP32[$12 + 564 >> 2]) {
25827         $22 = 5;
25828         $26 = 15;
25829         if ($33) {
25830          break label$32
25831         }
25832         $17 = (Math_clz32($15) ^ -32) + $40 | 0;
25833         if ($17 >>> 0 > 14) {
25834          break label$32
25835         }
25836         $26 = $17 >>> 0 > 5 ? $17 : 5;
25837         break label$32;
25838        }
25839        $26 = HEAP32[$12 + 560 >> 2];
25840        $22 = $26;
25841       }
25842       $34 = $11 ? $13 : $43;
25843       $39 = ($15 << 2) + $5 | 0;
25844       $11 = Math_clz32($15);
25845       $31 = $11 ^ 31;
25846       $41 = ($11 ^ -32) + $40 | 0;
25847       while (1) {
25848        $23 = HEAP32[$3 >> 2];
25849        $13 = !$19;
25850        $11 = $13 << 2;
25851        $37 = HEAP32[$11 + $7 >> 2];
25852        $20 = HEAP32[$6 + $11 >> 2];
25853        $28 = HEAP32[$8 + $11 >> 2];
25854        $36 = HEAP32[$12 + 572 >> 2];
25855        $12 = HEAP32[$0 + 4 >> 2];
25856        $18 = HEAP32[$12 + 6852 >> 2];
25857        $17 = HEAP32[$12 + 6848 >> 2];
25858        $11 = 0;
25859        $48 = $19;
25860        $19 = ($12 + ($30 << 7) | 0) + 7628 | 0;
25861        $12 = $29 ? ($41 >>> 0 > $22 >>> 0 ? $22 : $41) : $22;
25862        if (!FLAC__lpc_quantize_coefficients($19, $15, $12, $14 + 448 | 0, $14 + 444 | 0)) {
25863         $23 = $23 - $15 | 0;
25864         $19 = $4 + $12 | 0;
25865         label$37 : {
25866          if ($19 + $31 >>> 0 <= 32) {
25867           $11 = HEAP32[$0 + 4 >> 2];
25868           if (!($12 >>> 0 > 16 | $32)) {
25869            FUNCTION_TABLE[HEAP32[$11 + 7244 >> 2]]($39, $23, $14 + 448 | 0, $15, HEAP32[$14 + 444 >> 2], $28);
25870            break label$37;
25871           }
25872           FUNCTION_TABLE[HEAP32[$11 + 7236 >> 2]]($39, $23, $14 + 448 | 0, $15, HEAP32[$14 + 444 >> 2], $28);
25873           break label$37;
25874          }
25875          FUNCTION_TABLE[HEAP32[HEAP32[$0 + 4 >> 2] + 7240 >> 2]]($39, $23, $14 + 448 | 0, $15, HEAP32[$14 + 444 >> 2], $28);
25876         }
25877         HEAP32[$20 >> 2] = 3;
25878         HEAP32[$20 + 4 >> 2] = 0;
25879         HEAP32[$20 + 284 >> 2] = $28;
25880         HEAP32[$20 + 12 >> 2] = $37;
25881         $18 = find_best_partition_order_(HEAP32[$0 + 4 >> 2], $28, $17, $18, $23, $15, $34, $25, $1, $2, $4, $36, $20 + 4 | 0);
25882         HEAP32[$20 + 20 >> 2] = $12;
25883         HEAP32[$20 + 16 >> 2] = $15;
25884         HEAP32[$20 + 24 >> 2] = HEAP32[$14 + 444 >> 2];
25885         memcpy($20 + 28 | 0, $14 + 448 | 0, 128);
25886         $11 = 0;
25887         if ($15) {
25888          while (1) {
25889           $17 = $11 << 2;
25890           HEAP32[($17 + $20 | 0) + 156 >> 2] = HEAP32[$5 + $17 >> 2];
25891           $11 = $11 + 1 | 0;
25892           if (($15 | 0) != ($11 | 0)) {
25893            continue
25894           }
25895           break;
25896          }
25897         }
25898         $11 = ((HEAP32[$20 + 288 >> 2] + (((($18 + Math_imul($15, $19) | 0) + $47 | 0) + $21 | 0) + $46 | 0) | 0) + $45 | 0) + $44 | 0;
25899        }
25900        $12 = ($11 | 0) != 0 & $11 >>> 0 < $16 >>> 0;
25901        $19 = $12 ? $13 : $48;
25902        $16 = $12 ? $11 : $16;
25903        $22 = $22 + 1 | 0;
25904        if ($22 >>> 0 > $26 >>> 0) {
25905         break label$29
25906        }
25907        $12 = HEAP32[$0 >> 2];
25908        continue;
25909       };
25910      }
25911      $15 = $15 + 1 | 0;
25912      if ($15 >>> 0 > HEAPU32[$14 + 12 >> 2]) {
25913       break label$23
25914      }
25915      $11 = HEAP32[$3 >> 2];
25916      continue;
25917     };
25918    }
25919    $38 = $38 + 1 | 0;
25920    if ($38 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 40 >> 2]) {
25921     $11 = HEAP32[$3 >> 2];
25922     continue;
25923    }
25924    break;
25925   };
25926   $11 = $16;
25927  }
25928  if (($11 | 0) == -1) {
25929   $0 = HEAP32[$3 >> 2];
25930   $1 = HEAP32[($19 << 2) + $6 >> 2];
25931   HEAP32[$1 + 4 >> 2] = $5;
25932   HEAP32[$1 >> 2] = 1;
25933   $11 = HEAP32[$1 + 288 >> 2] + (HEAP32[1416] + (HEAP32[1415] + (HEAP32[1414] + Math_imul($0, $4) | 0) | 0) | 0) | 0;
25934  }
25935  HEAP32[$9 >> 2] = $19;
25936  HEAP32[$10 >> 2] = $11;
25937  global$0 = $14 + 576 | 0;
25938 }
25939
25940 function add_subframe_($0, $1, $2, $3, $4) {
25941  var $5 = 0;
25942  $5 = 1;
25943  label$1 : {
25944   label$2 : {
25945    label$3 : {
25946     switch (HEAP32[$3 >> 2]) {
25947     case 0:
25948      if (FLAC__subframe_add_constant($3 + 4 | 0, $2, HEAP32[$3 + 288 >> 2], $4)) {
25949       break label$1
25950      }
25951      break label$2;
25952     case 2:
25953      if (FLAC__subframe_add_fixed($3 + 4 | 0, $1 - HEAP32[$3 + 16 >> 2] | 0, $2, HEAP32[$3 + 288 >> 2], $4)) {
25954       break label$1
25955      }
25956      break label$2;
25957     case 3:
25958      if (FLAC__subframe_add_lpc($3 + 4 | 0, $1 - HEAP32[$3 + 16 >> 2] | 0, $2, HEAP32[$3 + 288 >> 2], $4)) {
25959       break label$1
25960      }
25961      break label$2;
25962     case 1:
25963      break label$3;
25964     default:
25965      break label$1;
25966     };
25967    }
25968    if (FLAC__subframe_add_verbatim($3 + 4 | 0, $1, $2, HEAP32[$3 + 288 >> 2], $4)) {
25969     break label$1
25970    }
25971   }
25972   HEAP32[HEAP32[$0 >> 2] >> 2] = 7;
25973   $5 = 0;
25974  }
25975  return $5;
25976 }
25977
25978 function FLAC__stream_encoder_set_ogg_serial_number($0, $1) {
25979  $0 = $0 | 0;
25980  $1 = $1 | 0;
25981  $0 = HEAP32[$0 >> 2];
25982  if (HEAP32[$0 >> 2] == 1) {
25983   HEAP32[$0 + 632 >> 2] = $1;
25984   $0 = 1;
25985  } else {
25986   $0 = 0
25987  }
25988  return $0 | 0;
25989 }
25990
25991 function FLAC__stream_encoder_set_verify($0, $1) {
25992  $0 = $0 | 0;
25993  $1 = $1 | 0;
25994  $0 = HEAP32[$0 >> 2];
25995  if (HEAP32[$0 >> 2] == 1) {
25996   HEAP32[$0 + 4 >> 2] = $1;
25997   $0 = 1;
25998  } else {
25999   $0 = 0
26000  }
26001  return $0 | 0;
26002 }
26003
26004 function FLAC__stream_encoder_set_channels($0, $1) {
26005  $0 = $0 | 0;
26006  $1 = $1 | 0;
26007  $0 = HEAP32[$0 >> 2];
26008  if (HEAP32[$0 >> 2] == 1) {
26009   HEAP32[$0 + 24 >> 2] = $1;
26010   $0 = 1;
26011  } else {
26012   $0 = 0
26013  }
26014  return $0 | 0;
26015 }
26016
26017 function FLAC__stream_encoder_set_bits_per_sample($0, $1) {
26018  $0 = $0 | 0;
26019  $1 = $1 | 0;
26020  $0 = HEAP32[$0 >> 2];
26021  if (HEAP32[$0 >> 2] == 1) {
26022   HEAP32[$0 + 28 >> 2] = $1;
26023   $0 = 1;
26024  } else {
26025   $0 = 0
26026  }
26027  return $0 | 0;
26028 }
26029
26030 function FLAC__stream_encoder_set_sample_rate($0, $1) {
26031  $0 = $0 | 0;
26032  $1 = $1 | 0;
26033  $0 = HEAP32[$0 >> 2];
26034  if (HEAP32[$0 >> 2] == 1) {
26035   HEAP32[$0 + 32 >> 2] = $1;
26036   $0 = 1;
26037  } else {
26038   $0 = 0
26039  }
26040  return $0 | 0;
26041 }
26042
26043 function FLAC__stream_encoder_set_compression_level($0, $1) {
26044  $0 = $0 | 0;
26045  $1 = $1 | 0;
26046  var $2 = 0, $3 = 0, $4 = 0;
26047  $3 = HEAP32[$0 >> 2];
26048  if (HEAP32[$3 >> 2] == 1) {
26049   $2 = Math_imul($1 >>> 0 < 8 ? $1 : 8, 44);
26050   $1 = $2 + 11184 | 0;
26051   $4 = HEAP32[$1 + 4 >> 2];
26052   HEAP32[$3 + 16 >> 2] = HEAP32[$1 >> 2];
26053   HEAP32[$3 + 20 >> 2] = $4;
26054   $3 = FLAC__stream_encoder_set_apodization($0, HEAP32[$1 + 40 >> 2]);
26055   $1 = 0;
26056   $0 = HEAP32[$0 >> 2];
26057   if (HEAP32[$0 >> 2] == 1) {
26058    $1 = $2 + 11184 | 0;
26059    $2 = HEAP32[$1 + 32 >> 2];
26060    HEAP32[$0 + 576 >> 2] = HEAP32[$1 + 28 >> 2];
26061    HEAP32[$0 + 580 >> 2] = $2;
26062    HEAP32[$0 + 568 >> 2] = HEAP32[$1 + 24 >> 2];
26063    HEAP32[$0 + 564 >> 2] = HEAP32[$1 + 16 >> 2];
26064    $2 = HEAP32[$1 + 12 >> 2];
26065    HEAP32[$0 + 556 >> 2] = HEAP32[$1 + 8 >> 2];
26066    HEAP32[$0 + 560 >> 2] = $2;
26067    $1 = $3 & 1;
26068    $0 = 1;
26069   } else {
26070    $0 = 0
26071   }
26072   $0 = $0 & $1;
26073  } else {
26074   $0 = 0
26075  }
26076  return $0 | 0;
26077 }
26078
26079 function FLAC__stream_encoder_set_blocksize($0, $1) {
26080  $0 = $0 | 0;
26081  $1 = $1 | 0;
26082  $0 = HEAP32[$0 >> 2];
26083  if (HEAP32[$0 >> 2] == 1) {
26084   HEAP32[$0 + 36 >> 2] = $1;
26085   $0 = 1;
26086  } else {
26087   $0 = 0
26088  }
26089  return $0 | 0;
26090 }
26091
26092 function FLAC__stream_encoder_set_total_samples_estimate($0, $1, $2) {
26093  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
26094  $0 = HEAP32[$0 >> 2];
26095  if (HEAP32[$0 >> 2] == 1) {
26096   $6 = $2;
26097   $7 = $0;
26098   $8 = $1;
26099   $4 = HEAP32[1363];
26100   $3 = $4 & 31;
26101   if (32 <= ($4 & 63) >>> 0) {
26102    $4 = -1 << $3;
26103    $3 = 0;
26104   } else {
26105    $4 = (1 << $3) - 1 & -1 >>> 32 - $3 | -1 << $3;
26106    $3 = -1 << $3;
26107   }
26108   $5 = $3 ^ -1;
26109   $3 = $4 ^ -1;
26110   $1 = ($2 | 0) == ($3 | 0) & $5 >>> 0 > $1 >>> 0 | $3 >>> 0 > $2 >>> 0;
26111   HEAP32[$7 + 592 >> 2] = $1 ? $8 : $5;
26112   HEAP32[$0 + 596 >> 2] = $1 ? $6 : $3;
26113   $0 = 1;
26114  } else {
26115   $0 = 0
26116  }
26117  return $0;
26118 }
26119
26120 function FLAC__stream_encoder_set_metadata($0, $1, $2) {
26121  $0 = $0 | 0;
26122  $1 = $1 | 0;
26123  $2 = $2 | 0;
26124  var $3 = 0, $4 = 0;
26125  $3 = HEAP32[$0 >> 2];
26126  if (HEAP32[$3 >> 2] == 1) {
26127   $4 = HEAP32[$3 + 600 >> 2];
26128   if ($4) {
26129    dlfree($4);
26130    $3 = HEAP32[$0 >> 2];
26131    HEAP32[$3 + 600 >> 2] = 0;
26132    HEAP32[$3 + 604 >> 2] = 0;
26133   }
26134   $2 = $1 ? $2 : 0;
26135   if ($2) {
26136    $3 = safe_malloc_mul_2op_p(4, $2);
26137    if (!$3) {
26138     return 0
26139    }
26140    $1 = memcpy($3, $1, $2 << 2);
26141    $3 = HEAP32[$0 >> 2];
26142    HEAP32[$3 + 604 >> 2] = $2;
26143    HEAP32[$3 + 600 >> 2] = $1;
26144   }
26145   $0 = $3 + 632 | 0;
26146   if ($2 >>> HEAP32[1886]) {
26147    $0 = 0
26148   } else {
26149    HEAP32[$0 + 4 >> 2] = $2;
26150    $0 = 1;
26151   }
26152   $0 = ($0 | 0) != 0;
26153  } else {
26154   $0 = 0
26155  }
26156  return $0 | 0;
26157 }
26158
26159 function FLAC__stream_encoder_get_verify_decoder_state($0) {
26160  $0 = $0 | 0;
26161  if (!HEAP32[HEAP32[$0 >> 2] + 4 >> 2]) {
26162   return 9
26163  }
26164  return FLAC__stream_decoder_get_state(HEAP32[HEAP32[$0 + 4 >> 2] + 11752 >> 2]) | 0;
26165 }
26166
26167 function FLAC__stream_encoder_get_verify($0) {
26168  $0 = $0 | 0;
26169  return HEAP32[HEAP32[$0 >> 2] + 4 >> 2];
26170 }
26171
26172 function FLAC__stream_encoder_process($0, $1, $2) {
26173  $0 = $0 | 0;
26174  $1 = $1 | 0;
26175  $2 = $2 | 0;
26176  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0;
26177  $5 = HEAP32[$0 >> 2];
26178  $11 = HEAP32[$5 + 36 >> 2];
26179  $16 = $11 + 1 | 0;
26180  $4 = HEAP32[$0 + 4 >> 2];
26181  $10 = HEAP32[$5 + 24 >> 2];
26182  $13 = $11 << 2;
26183  label$1 : {
26184   while (1) {
26185    $3 = $16 - HEAP32[$4 + 7052 >> 2] | 0;
26186    $6 = $2 - $7 | 0;
26187    $6 = $3 >>> 0 < $6 >>> 0 ? $3 : $6;
26188    if (HEAP32[$5 + 4 >> 2]) {
26189     if ($10) {
26190      $5 = $6 << 2;
26191      $3 = 0;
26192      while (1) {
26193       $8 = $3 << 2;
26194       memcpy(HEAP32[($8 + $4 | 0) + 11764 >> 2] + (HEAP32[$4 + 11800 >> 2] << 2) | 0, HEAP32[$1 + $8 >> 2] + ($7 << 2) | 0, $5);
26195       $3 = $3 + 1 | 0;
26196       if (($10 | 0) != ($3 | 0)) {
26197        continue
26198       }
26199       break;
26200      };
26201     }
26202     $4 = $4 + 11800 | 0;
26203     HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + $6;
26204    }
26205    if ($10) {
26206     $5 = $6 << 2;
26207     $4 = 0;
26208     $3 = 0;
26209     while (1) {
26210      $8 = $3 << 2;
26211      $12 = HEAP32[$8 + $1 >> 2];
26212      if (!$12) {
26213       break label$1
26214      }
26215      $9 = $8;
26216      $8 = HEAP32[$0 + 4 >> 2];
26217      memcpy(HEAP32[($9 + $8 | 0) + 4 >> 2] + (HEAP32[$8 + 7052 >> 2] << 2) | 0, $12 + ($7 << 2) | 0, $5);
26218      $3 = $3 + 1 | 0;
26219      if (($10 | 0) != ($3 | 0)) {
26220       continue
26221      }
26222      break;
26223     };
26224    }
26225    $5 = HEAP32[$0 >> 2];
26226    label$8 : {
26227     if (HEAP32[$5 + 16 >> 2]) {
26228      $4 = HEAP32[$0 + 4 >> 2];
26229      if ($7 >>> 0 >= $2 >>> 0) {
26230       break label$8
26231      }
26232      $3 = HEAP32[$4 + 7052 >> 2];
26233      if ($3 >>> 0 > $11 >>> 0) {
26234       break label$8
26235      }
26236      $8 = HEAP32[$4 + 40 >> 2];
26237      $12 = HEAP32[$4 + 36 >> 2];
26238      $17 = HEAP32[$1 + 4 >> 2];
26239      $18 = HEAP32[$1 >> 2];
26240      while (1) {
26241       $14 = $3 << 2;
26242       $9 = $7 << 2;
26243       $15 = $9 + $18 | 0;
26244       $9 = $9 + $17 | 0;
26245       HEAP32[$14 + $8 >> 2] = HEAP32[$15 >> 2] - HEAP32[$9 >> 2];
26246       HEAP32[$12 + $14 >> 2] = HEAP32[$9 >> 2] + HEAP32[$15 >> 2] >> 1;
26247       $7 = $7 + 1 | 0;
26248       if ($7 >>> 0 >= $2 >>> 0) {
26249        break label$8
26250       }
26251       $3 = $3 + 1 | 0;
26252       if ($3 >>> 0 <= $11 >>> 0) {
26253        continue
26254       }
26255       break;
26256      };
26257      break label$8;
26258     }
26259     $7 = $7 + $6 | 0;
26260     $4 = HEAP32[$0 + 4 >> 2];
26261    }
26262    $3 = HEAP32[$4 + 7052 >> 2] + $6 | 0;
26263    HEAP32[$4 + 7052 >> 2] = $3;
26264    if ($3 >>> 0 > $11 >>> 0) {
26265     $4 = 0;
26266     if (!process_frame_($0, 0, 0)) {
26267      break label$1
26268     }
26269     if ($10) {
26270      $4 = HEAP32[$0 + 4 >> 2];
26271      $3 = 0;
26272      while (1) {
26273       $6 = HEAP32[($4 + ($3 << 2) | 0) + 4 >> 2];
26274       HEAP32[$6 >> 2] = HEAP32[$6 + $13 >> 2];
26275       $3 = $3 + 1 | 0;
26276       if (($10 | 0) != ($3 | 0)) {
26277        continue
26278       }
26279       break;
26280      };
26281     }
26282     $4 = HEAP32[$0 + 4 >> 2];
26283     $5 = HEAP32[$0 >> 2];
26284     if (HEAP32[$5 + 16 >> 2]) {
26285      $3 = HEAP32[$4 + 36 >> 2];
26286      HEAP32[$3 >> 2] = HEAP32[$3 + $13 >> 2];
26287      $3 = HEAP32[$4 + 40 >> 2];
26288      HEAP32[$3 >> 2] = HEAP32[$3 + $13 >> 2];
26289     }
26290     HEAP32[$4 + 7052 >> 2] = 1;
26291    }
26292    if ($7 >>> 0 < $2 >>> 0) {
26293     continue
26294    }
26295    break;
26296   };
26297   $4 = 1;
26298  }
26299  return $4 | 0;
26300 }
26301
26302 function FLAC__stream_encoder_process_interleaved($0, $1, $2) {
26303  $0 = $0 | 0;
26304  $1 = $1 | 0;
26305  $2 = $2 | 0;
26306  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0;
26307  $3 = HEAP32[$0 >> 2];
26308  $9 = HEAP32[$3 + 36 >> 2];
26309  $16 = $9 + 1 | 0;
26310  label$1 : {
26311   label$2 : {
26312    $10 = HEAP32[$3 + 24 >> 2];
26313    if (!(!HEAP32[$3 + 16 >> 2] | ($10 | 0) != 2)) {
26314     while (1) {
26315      $4 = HEAP32[$0 + 4 >> 2];
26316      if (HEAP32[$3 + 4 >> 2]) {
26317       $3 = HEAP32[$4 + 11800 >> 2];
26318       $5 = $16 - HEAP32[$4 + 7052 >> 2] | 0;
26319       $6 = $2 - $7 | 0;
26320       $8 = $5 >>> 0 < $6 >>> 0 ? $5 : $6;
26321       label$6 : {
26322        if (!$8) {
26323         break label$6
26324        }
26325        if (!$10) {
26326         $3 = $3 + $8 | 0;
26327         break label$6;
26328        }
26329        $5 = $7 << 1;
26330        $11 = HEAP32[$4 + 11768 >> 2];
26331        $15 = HEAP32[$4 + 11764 >> 2];
26332        $6 = 0;
26333        while (1) {
26334         $13 = $3 << 2;
26335         $14 = $5 << 2;
26336         HEAP32[$13 + $15 >> 2] = HEAP32[$14 + $1 >> 2];
26337         HEAP32[$11 + $13 >> 2] = HEAP32[($14 | 4) + $1 >> 2];
26338         $3 = $3 + 1 | 0;
26339         $5 = $5 + 2 | 0;
26340         $6 = $6 + 1 | 0;
26341         if (($8 | 0) != ($6 | 0)) {
26342          continue
26343         }
26344         break;
26345        };
26346       }
26347       HEAP32[$4 + 11800 >> 2] = $3;
26348      }
26349      $5 = $7 >>> 0 < $2 >>> 0;
26350      $3 = HEAP32[$4 + 7052 >> 2];
26351      label$9 : {
26352       if ($3 >>> 0 > $9 >>> 0 | $7 >>> 0 >= $2 >>> 0) {
26353        break label$9
26354       }
26355       $11 = HEAP32[$4 + 40 >> 2];
26356       $15 = HEAP32[$4 + 8 >> 2];
26357       $13 = HEAP32[$4 + 36 >> 2];
26358       $14 = HEAP32[$4 + 4 >> 2];
26359       while (1) {
26360        $5 = $3 << 2;
26361        $8 = ($12 << 2) + $1 | 0;
26362        $6 = HEAP32[$8 >> 2];
26363        HEAP32[$5 + $14 >> 2] = $6;
26364        $8 = HEAP32[$8 + 4 >> 2];
26365        HEAP32[$5 + $15 >> 2] = $8;
26366        HEAP32[$5 + $11 >> 2] = $6 - $8;
26367        HEAP32[$5 + $13 >> 2] = $6 + $8 >> 1;
26368        $3 = $3 + 1 | 0;
26369        $12 = $12 + 2 | 0;
26370        $7 = $7 + 1 | 0;
26371        $5 = $7 >>> 0 < $2 >>> 0;
26372        if ($7 >>> 0 >= $2 >>> 0) {
26373         break label$9
26374        }
26375        if ($3 >>> 0 <= $9 >>> 0) {
26376         continue
26377        }
26378        break;
26379       };
26380      }
26381      HEAP32[$4 + 7052 >> 2] = $3;
26382      if ($3 >>> 0 > $9 >>> 0) {
26383       $3 = 0;
26384       if (!process_frame_($0, 0, 0)) {
26385        break label$1
26386       }
26387       $3 = HEAP32[$0 + 4 >> 2];
26388       $6 = HEAP32[$3 + 4 >> 2];
26389       $4 = $6;
26390       $6 = $9 << 2;
26391       HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2];
26392       $4 = HEAP32[$3 + 8 >> 2];
26393       HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2];
26394       $4 = HEAP32[$3 + 36 >> 2];
26395       HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2];
26396       $4 = HEAP32[$3 + 40 >> 2];
26397       HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2];
26398       HEAP32[$3 + 7052 >> 2] = 1;
26399      }
26400      if (!$5) {
26401       break label$2
26402      }
26403      $3 = HEAP32[$0 >> 2];
26404      continue;
26405     }
26406    }
26407    while (1) {
26408     $7 = HEAP32[$0 + 4 >> 2];
26409     if (HEAP32[$3 + 4 >> 2]) {
26410      $6 = HEAP32[$7 + 11800 >> 2];
26411      $3 = $16 - HEAP32[$7 + 7052 >> 2] | 0;
26412      $5 = $2 - $4 | 0;
26413      $8 = $3 >>> 0 < $5 >>> 0 ? $3 : $5;
26414      label$14 : {
26415       if (!$8) {
26416        break label$14
26417       }
26418       if (!$10) {
26419        $6 = $6 + $8 | 0;
26420        break label$14;
26421       }
26422       $5 = Math_imul($4, $10);
26423       $11 = 0;
26424       while (1) {
26425        $3 = 0;
26426        while (1) {
26427         HEAP32[HEAP32[($7 + ($3 << 2) | 0) + 11764 >> 2] + ($6 << 2) >> 2] = HEAP32[($5 << 2) + $1 >> 2];
26428         $5 = $5 + 1 | 0;
26429         $3 = $3 + 1 | 0;
26430         if (($10 | 0) != ($3 | 0)) {
26431          continue
26432         }
26433         break;
26434        };
26435        $6 = $6 + 1 | 0;
26436        $11 = $11 + 1 | 0;
26437        if (($8 | 0) != ($11 | 0)) {
26438         continue
26439        }
26440        break;
26441       };
26442      }
26443      HEAP32[$7 + 11800 >> 2] = $6;
26444     }
26445     $6 = $4 >>> 0 < $2 >>> 0;
26446     $5 = HEAP32[$7 + 7052 >> 2];
26447     label$18 : {
26448      if ($5 >>> 0 > $9 >>> 0 | $4 >>> 0 >= $2 >>> 0) {
26449       break label$18
26450      }
26451      if ($10) {
26452       while (1) {
26453        $3 = 0;
26454        while (1) {
26455         HEAP32[HEAP32[($7 + ($3 << 2) | 0) + 4 >> 2] + ($5 << 2) >> 2] = HEAP32[($12 << 2) + $1 >> 2];
26456         $12 = $12 + 1 | 0;
26457         $3 = $3 + 1 | 0;
26458         if (($10 | 0) != ($3 | 0)) {
26459          continue
26460         }
26461         break;
26462        };
26463        $5 = $5 + 1 | 0;
26464        $4 = $4 + 1 | 0;
26465        $6 = $4 >>> 0 < $2 >>> 0;
26466        if ($4 >>> 0 >= $2 >>> 0) {
26467         break label$18
26468        }
26469        if ($5 >>> 0 <= $9 >>> 0) {
26470         continue
26471        }
26472        break label$18;
26473       }
26474      }
26475      while (1) {
26476       $5 = $5 + 1 | 0;
26477       $4 = $4 + 1 | 0;
26478       $6 = $4 >>> 0 < $2 >>> 0;
26479       if ($4 >>> 0 >= $2 >>> 0) {
26480        break label$18
26481       }
26482       if ($5 >>> 0 <= $9 >>> 0) {
26483        continue
26484       }
26485       break;
26486      };
26487     }
26488     HEAP32[$7 + 7052 >> 2] = $5;
26489     if ($5 >>> 0 > $9 >>> 0) {
26490      $3 = 0;
26491      if (!process_frame_($0, 0, 0)) {
26492       break label$1
26493      }
26494      $5 = HEAP32[$0 + 4 >> 2];
26495      if ($10) {
26496       $3 = 0;
26497       while (1) {
26498        $7 = HEAP32[($5 + ($3 << 2) | 0) + 4 >> 2];
26499        HEAP32[$7 >> 2] = HEAP32[$7 + ($9 << 2) >> 2];
26500        $3 = $3 + 1 | 0;
26501        if (($10 | 0) != ($3 | 0)) {
26502         continue
26503        }
26504        break;
26505       };
26506      }
26507      HEAP32[$5 + 7052 >> 2] = 1;
26508     }
26509     if (!$6) {
26510      break label$2
26511     }
26512     $3 = HEAP32[$0 >> 2];
26513     continue;
26514    };
26515   }
26516   $3 = 1;
26517  }
26518  return $3 | 0;
26519 }
26520
26521 function find_best_partition_order_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) {
26522  var $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0;
26523  $26 = $4 + $5 | 0;
26524  $14 = FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_and_predictor_order($9, $26, $5);
26525  $22 = $14 >>> 0 > $8 >>> 0 ? $8 : $14;
26526  FUNCTION_TABLE[HEAP32[$0 + 7220 >> 2]]($1, $2, $4, $5, $22, $14, $10);
26527  label$1 : {
26528   if (!$11) {
26529    break label$1
26530   }
26531   $10 = 0;
26532   $8 = 0;
26533   if (($14 | 0) >= 0) {
26534    $8 = 1 << $14;
26535    $20 = $8 >>> 0 > 1 ? $8 : 1;
26536    $16 = $26 >>> $14 | 0;
26537    while (1) {
26538     $17 = 0;
26539     $9 = $13;
26540     $18 = 0;
26541     $27 = ($15 << 2) + $3 | 0;
26542     label$4 : {
26543      label$5 : {
26544       $23 = $15 ? 0 : $5;
26545       $19 = $16 - $23 | 0;
26546       if (!$19) {
26547        break label$5
26548       }
26549       while (1) {
26550        $21 = $17;
26551        $17 = HEAP32[($9 << 2) + $1 >> 2];
26552        $17 = $21 | $17 >> 31 ^ $17;
26553        $9 = $9 + 1 | 0;
26554        $18 = $18 + 1 | 0;
26555        if (($19 | 0) != ($18 | 0)) {
26556         continue
26557        }
26558        break;
26559       };
26560       $13 = ($13 + $16 | 0) - $23 | 0;
26561       if (!$17) {
26562        break label$5
26563       }
26564       $9 = (Math_clz32($17) ^ 31) + 2 | 0;
26565       break label$4;
26566      }
26567      $9 = 1;
26568     }
26569     HEAP32[$27 >> 2] = $9;
26570     $15 = $15 + 1 | 0;
26571     if (($20 | 0) != ($15 | 0)) {
26572      continue
26573     }
26574     break;
26575    };
26576   }
26577   if (($14 | 0) <= ($22 | 0)) {
26578    break label$1
26579   }
26580   $1 = $14;
26581   while (1) {
26582    $1 = $1 + -1 | 0;
26583    $9 = 0;
26584    while (1) {
26585     $13 = ($10 << 2) + $3 | 0;
26586     $15 = HEAP32[$13 >> 2];
26587     $13 = HEAP32[$13 + 4 >> 2];
26588     HEAP32[($8 << 2) + $3 >> 2] = $15 >>> 0 > $13 >>> 0 ? $15 : $13;
26589     $8 = $8 + 1 | 0;
26590     $10 = $10 + 2 | 0;
26591     $9 = $9 + 1 | 0;
26592     if (!($9 >>> $1)) {
26593      continue
26594     }
26595     break;
26596    };
26597    if (($1 | 0) > ($22 | 0)) {
26598     continue
26599    }
26600    break;
26601   };
26602  }
26603  label$9 : {
26604   if (($14 | 0) < ($22 | 0)) {
26605    HEAP32[$12 + 4 >> 2] = 0;
26606    $2 = 6;
26607    break label$9;
26608   }
26609   $28 = HEAP32[1407];
26610   $40 = $28 + (Math_imul($6 + 1 | 0, $4) - ($4 >>> 1 | 0) | 0) | 0;
26611   $35 = $7 + -1 | 0;
26612   $36 = HEAP32[1409] + HEAP32[1408] | 0;
26613   $23 = HEAP32[1406] + HEAP32[1405] | 0;
26614   $27 = $6 + -1 | 0;
26615   while (1) {
26616    label$12 : {
26617     $20 = $14;
26618     $37 = !$29;
26619     $1 = Math_imul($37, 12) + $0 | 0;
26620     $8 = $1 + 11724 | 0;
26621     FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($8, $14 >>> 0 > 6 ? $14 : 6);
26622     $38 = ($30 << 2) + $3 | 0;
26623     $25 = ($30 << 3) + $2 | 0;
26624     $39 = HEAP32[$1 + 11728 >> 2];
26625     $31 = HEAP32[$8 >> 2];
26626     label$13 : {
26627      if ($14) {
26628       $32 = $26 >>> $20 | 0;
26629       if ($32 >>> 0 <= $5 >>> 0) {
26630        break label$12
26631       }
26632       $18 = 0;
26633       $33 = 0;
26634       $21 = $23;
26635       if (!$11) {
26636        while (1) {
26637         $17 = $32 - ($18 ? 0 : $5) | 0;
26638         $1 = $25 + ($18 << 3) | 0;
26639         $13 = HEAP32[$1 + 4 >> 2];
26640         $16 = HEAP32[$1 >> 2];
26641         label$17 : {
26642          if (!$13 & $16 >>> 0 >= 268435457 | $13 >>> 0 > 0) {
26643           $1 = $17;
26644           $10 = 0;
26645           $8 = 0;
26646           label$19 : {
26647            if (($13 | 0) == 16777216 & $16 >>> 0 > 0 | $13 >>> 0 > 16777216) {
26648             $14 = $1;
26649             $9 = 0;
26650             break label$19;
26651            }
26652            $14 = $1;
26653            $9 = 0;
26654            $15 = $1 >>> 25 | 0;
26655            $19 = $1 << 7;
26656            if (($13 | 0) == ($15 | 0) & $19 >>> 0 >= $16 >>> 0 | $15 >>> 0 > $13 >>> 0) {
26657             break label$19
26658            }
26659            while (1) {
26660             $8 = $8 + 8 | 0;
26661             $15 = $10 << 15 | $1 >>> 17;
26662             $19 = $1 << 15;
26663             $9 = $10 << 8 | $1 >>> 24;
26664             $14 = $1 << 8;
26665             $1 = $14;
26666             $10 = $9;
26667             if (($13 | 0) == ($15 | 0) & $19 >>> 0 < $16 >>> 0 | $15 >>> 0 < $13 >>> 0) {
26668              continue
26669             }
26670             break;
26671            };
26672           }
26673           if (($9 | 0) == ($13 | 0) & $14 >>> 0 >= $16 >>> 0 | $9 >>> 0 > $13 >>> 0) {
26674            break label$17
26675           }
26676           while (1) {
26677            $8 = $8 + 1 | 0;
26678            $1 = $14;
26679            $15 = $9 << 1 | $1 >>> 31;
26680            $14 = $1 << 1;
26681            $1 = $14;
26682            $9 = $15;
26683            if (($13 | 0) == ($9 | 0) & $1 >>> 0 < $16 >>> 0 | $9 >>> 0 < $13 >>> 0) {
26684             continue
26685            }
26686            break;
26687           };
26688           break label$17;
26689          }
26690          $8 = 0;
26691          $10 = $17;
26692          $1 = $16;
26693          if ($10 << 3 >>> 0 < $1 >>> 0) {
26694           while (1) {
26695            $8 = $8 + 4 | 0;
26696            $9 = $10 << 7;
26697            $10 = $10 << 4;
26698            if ($9 >>> 0 < $1 >>> 0) {
26699             continue
26700            }
26701            break;
26702           }
26703          }
26704          if ($10 >>> 0 >= $1 >>> 0) {
26705           break label$17
26706          }
26707          while (1) {
26708           $8 = $8 + 1 | 0;
26709           $10 = $10 << 1;
26710           if ($10 >>> 0 < $1 >>> 0) {
26711            continue
26712           }
26713           break;
26714          };
26715         }
26716         $8 = $8 >>> 0 < $7 >>> 0 ? $8 : $35;
26717         $10 = $8 + -1 | 0;
26718         $1 = $10 & 31;
26719         $1 = (($28 - ($17 >>> 1 | 0) | 0) + Math_imul($17, $8 + 1 | 0) | 0) + ($8 ? (32 <= ($10 & 63) >>> 0 ? $13 >>> $1 | 0 : ((1 << $1) - 1 & $13) << 32 - $1 | $16 >>> $1) : $16 << 1) | 0;
26720         $33 = ($1 | 0) == -1 ? $33 : $8;
26721         HEAP32[$31 + ($18 << 2) >> 2] = $33;
26722         $21 = $1 + $21 | 0;
26723         $18 = $18 + 1 | 0;
26724         if (!($18 >>> $20)) {
26725          continue
26726         }
26727         break label$13;
26728        }
26729       }
26730       while (1) {
26731        $17 = $32 - ($18 ? 0 : $5) | 0;
26732        $1 = $25 + ($18 << 3) | 0;
26733        $13 = HEAP32[$1 + 4 >> 2];
26734        $16 = HEAP32[$1 >> 2];
26735        label$27 : {
26736         label$28 : {
26737          if (!$13 & $16 >>> 0 >= 268435457 | $13 >>> 0 > 0) {
26738           $1 = $17;
26739           $10 = 0;
26740           $8 = 0;
26741           if (($13 | 0) == 16777216 & $16 >>> 0 > 0 | $13 >>> 0 > 16777216) {
26742            break label$28
26743           }
26744           $14 = $1;
26745           $9 = 0;
26746           $15 = $1 >>> 25 | 0;
26747           $19 = $1 << 7;
26748           if (($13 | 0) == ($15 | 0) & $19 >>> 0 >= $16 >>> 0 | $15 >>> 0 > $13 >>> 0) {
26749            break label$28
26750           }
26751           while (1) {
26752            $8 = $8 + 8 | 0;
26753            $1 = $9;
26754            $10 = $14;
26755            $15 = $1 << 15 | $10 >>> 17;
26756            $19 = $10 << 15;
26757            $9 = $1 << 8;
26758            $1 = $10;
26759            $9 = $9 | $1 >>> 24;
26760            $1 = $1 << 8;
26761            $14 = $1;
26762            $10 = $9;
26763            if (($13 | 0) == ($15 | 0) & $19 >>> 0 < $16 >>> 0 | $15 >>> 0 < $13 >>> 0) {
26764             continue
26765            }
26766            break;
26767           };
26768           break label$28;
26769          }
26770          $8 = 0;
26771          $10 = $17;
26772          $1 = $16;
26773          if ($10 << 3 >>> 0 < $1 >>> 0) {
26774           while (1) {
26775            $8 = $8 + 4 | 0;
26776            $9 = $10 << 7;
26777            $10 = $10 << 4;
26778            if ($9 >>> 0 < $1 >>> 0) {
26779             continue
26780            }
26781            break;
26782           }
26783          }
26784          if ($10 >>> 0 >= $1 >>> 0) {
26785           break label$27
26786          }
26787          while (1) {
26788           $8 = $8 + 1 | 0;
26789           $10 = $10 << 1;
26790           if ($10 >>> 0 < $1 >>> 0) {
26791            continue
26792           }
26793           break;
26794          };
26795          break label$27;
26796         }
26797         if (($10 | 0) == ($13 | 0) & $1 >>> 0 >= $16 >>> 0 | $10 >>> 0 > $13 >>> 0) {
26798          break label$27
26799         }
26800         while (1) {
26801          $8 = $8 + 1 | 0;
26802          $15 = $10 << 1 | $1 >>> 31;
26803          $1 = $1 << 1;
26804          $10 = $15;
26805          if (($13 | 0) == ($10 | 0) & $1 >>> 0 < $16 >>> 0 | $10 >>> 0 < $13 >>> 0) {
26806           continue
26807          }
26808          break;
26809         };
26810        }
26811        $9 = $18 << 2;
26812        $1 = HEAP32[$9 + $38 >> 2];
26813        $19 = $1;
26814        $10 = Math_imul($1, $17) + $36 | 0;
26815        $8 = $8 >>> 0 < $7 >>> 0 ? $8 : $35;
26816        $15 = $8 + -1 | 0;
26817        $1 = $15 & 31;
26818        $14 = (($28 - ($17 >>> 1 | 0) | 0) + Math_imul($17, $8 + 1 | 0) | 0) + ($8 ? (32 <= ($15 & 63) >>> 0 ? $13 >>> $1 | 0 : ((1 << $1) - 1 & $13) << 32 - $1 | $16 >>> $1) : $16 << 1) | 0;
26819        $1 = $10 >>> 0 > $14 >>> 0;
26820        HEAP32[$9 + $39 >> 2] = $1 ? 0 : $19;
26821        HEAP32[$9 + $31 >> 2] = $1 ? $8 : 0;
26822        $21 = ($1 ? $14 : $10) + $21 | 0;
26823        $18 = $18 + 1 | 0;
26824        if (!($18 >>> $20)) {
26825         continue
26826        }
26827        break;
26828       };
26829       break label$13;
26830      }
26831      $9 = HEAP32[$25 + 4 >> 2];
26832      $1 = $27;
26833      $8 = $1 & 31;
26834      $10 = HEAP32[$25 >> 2];
26835      $8 = ($6 ? (32 <= ($1 & 63) >>> 0 ? $9 >>> $8 | 0 : ((1 << $8) - 1 & $9) << 32 - $8 | $10 >>> $8) : $10 << 1) + $40 | 0;
26836      $10 = ($8 | 0) == -1 ? 0 : $6;
26837      if ($11) {
26838       $9 = HEAP32[$38 >> 2];
26839       $14 = Math_imul($9, $4) + $36 | 0;
26840       $1 = $14 >>> 0 > $8 >>> 0;
26841       HEAP32[$39 >> 2] = $1 ? 0 : $9;
26842       $10 = $1 ? $10 : 0;
26843       $8 = $1 ? $8 : $14;
26844      }
26845      HEAP32[$31 >> 2] = $10;
26846      $21 = $8 + $23 | 0;
26847     }
26848     $1 = $34 + -1 >>> 0 < $21 >>> 0;
26849     $24 = $1 ? $24 : $20;
26850     $29 = $1 ? $29 : $37;
26851     $34 = $1 ? $34 : $21;
26852     $14 = $20 + -1 | 0;
26853     $30 = (1 << $20) + $30 | 0;
26854     if (($20 | 0) > ($22 | 0)) {
26855      continue
26856     }
26857    }
26858    break;
26859   };
26860   HEAP32[$12 + 4 >> 2] = $24;
26861   $2 = $24 >>> 0 > 6 ? $24 : 6;
26862  }
26863  $1 = HEAP32[$12 + 8 >> 2];
26864  FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($1, $2);
26865  $2 = Math_imul($29, 12) + $0 | 0;
26866  $0 = 1 << $24;
26867  $3 = $0 << 2;
26868  memcpy(HEAP32[$1 >> 2], HEAP32[$2 + 11724 >> 2], $3);
26869  if ($11) {
26870   memcpy(HEAP32[$1 + 4 >> 2], HEAP32[$2 + 11728 >> 2], $3)
26871  }
26872  $0 = $0 >>> 0 > 1 ? $0 : 1;
26873  $2 = HEAP32[1410];
26874  $1 = HEAP32[$1 >> 2];
26875  $8 = 0;
26876  label$37 : {
26877   while (1) {
26878    if (HEAPU32[$1 + ($8 << 2) >> 2] < $2 >>> 0) {
26879     $8 = $8 + 1 | 0;
26880     if (($0 | 0) != ($8 | 0)) {
26881      continue
26882     }
26883     break label$37;
26884    }
26885    break;
26886   };
26887   HEAP32[$12 >> 2] = 1;
26888  }
26889  return $34;
26890 }
26891
26892 function stackSave() {
26893  return global$0 | 0;
26894 }
26895
26896 function stackRestore($0) {
26897  $0 = $0 | 0;
26898  global$0 = $0;
26899 }
26900
26901 function stackAlloc($0) {
26902  $0 = $0 | 0;
26903  $0 = global$0 - $0 & -16;
26904  global$0 = $0;
26905  return $0 | 0;
26906 }
26907
26908 function __growWasmMemory($0) {
26909  $0 = $0 | 0;
26910  return __wasm_memory_grow($0 | 0) | 0;
26911 }
26912
26913 function dynCall_iii($0, $1, $2) {
26914  $0 = $0 | 0;
26915  $1 = $1 | 0;
26916  $2 = $2 | 0;
26917  return FUNCTION_TABLE[$0]($1, $2) | 0;
26918 }
26919
26920 function dynCall_ii($0, $1) {
26921  $0 = $0 | 0;
26922  $1 = $1 | 0;
26923  return FUNCTION_TABLE[$0]($1) | 0;
26924 }
26925
26926 function dynCall_iiii($0, $1, $2, $3) {
26927  $0 = $0 | 0;
26928  $1 = $1 | 0;
26929  $2 = $2 | 0;
26930  $3 = $3 | 0;
26931  return FUNCTION_TABLE[$0]($1, $2, $3) | 0;
26932 }
26933
26934 function dynCall_viiiiii($0, $1, $2, $3, $4, $5, $6) {
26935  $0 = $0 | 0;
26936  $1 = $1 | 0;
26937  $2 = $2 | 0;
26938  $3 = $3 | 0;
26939  $4 = $4 | 0;
26940  $5 = $5 | 0;
26941  $6 = $6 | 0;
26942  FUNCTION_TABLE[$0]($1, $2, $3, $4, $5, $6);
26943 }
26944
26945 function dynCall_iiiii($0, $1, $2, $3, $4) {
26946  $0 = $0 | 0;
26947  $1 = $1 | 0;
26948  $2 = $2 | 0;
26949  $3 = $3 | 0;
26950  $4 = $4 | 0;
26951  return FUNCTION_TABLE[$0]($1, $2, $3, $4) | 0;
26952 }
26953
26954 function dynCall_viiiiiii($0, $1, $2, $3, $4, $5, $6, $7) {
26955  $0 = $0 | 0;
26956  $1 = $1 | 0;
26957  $2 = $2 | 0;
26958  $3 = $3 | 0;
26959  $4 = $4 | 0;
26960  $5 = $5 | 0;
26961  $6 = $6 | 0;
26962  $7 = $7 | 0;
26963  FUNCTION_TABLE[$0]($1, $2, $3, $4, $5, $6, $7);
26964 }
26965
26966 function dynCall_viiii($0, $1, $2, $3, $4) {
26967  $0 = $0 | 0;
26968  $1 = $1 | 0;
26969  $2 = $2 | 0;
26970  $3 = $3 | 0;
26971  $4 = $4 | 0;
26972  FUNCTION_TABLE[$0]($1, $2, $3, $4);
26973 }
26974
26975 function dynCall_viii($0, $1, $2, $3) {
26976  $0 = $0 | 0;
26977  $1 = $1 | 0;
26978  $2 = $2 | 0;
26979  $3 = $3 | 0;
26980  FUNCTION_TABLE[$0]($1, $2, $3);
26981 }
26982
26983 function legalstub$FLAC__stream_encoder_set_total_samples_estimate($0, $1, $2) {
26984  $0 = $0 | 0;
26985  $1 = $1 | 0;
26986  $2 = $2 | 0;
26987  return FLAC__stream_encoder_set_total_samples_estimate($0, $1, $2) | 0;
26988 }
26989
26990 function legalstub$dynCall_jiji($0, $1, $2, $3, $4) {
26991  $0 = $0 | 0;
26992  $1 = $1 | 0;
26993  $2 = $2 | 0;
26994  $3 = $3 | 0;
26995  $4 = $4 | 0;
26996  $0 = FUNCTION_TABLE[$0]($1, $2, $3, $4) | 0;
26997  setTempRet0(i64toi32_i32$HIGH_BITS | 0);
26998  return $0 | 0;
26999 }
27000
27001 function _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE($0, $1, $2, $3) {
27002  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
27003  $4 = $2 >>> 16 | 0;
27004  $5 = $0 >>> 16 | 0;
27005  $9 = Math_imul($4, $5);
27006  $6 = $2 & 65535;
27007  $7 = $0 & 65535;
27008  $8 = Math_imul($6, $7);
27009  $5 = ($8 >>> 16 | 0) + Math_imul($5, $6) | 0;
27010  $4 = ($5 & 65535) + Math_imul($4, $7) | 0;
27011  $0 = (Math_imul($1, $2) + $9 | 0) + Math_imul($0, $3) + ($5 >>> 16) + ($4 >>> 16) | 0;
27012  $1 = $8 & 65535 | $4 << 16;
27013  i64toi32_i32$HIGH_BITS = $0;
27014  return $1;
27015 }
27016
27017 function _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E($0, $1, $2) {
27018  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0;
27019  label$1 : {
27020   label$2 : {
27021    label$3 : {
27022     label$4 : {
27023      label$5 : {
27024       label$6 : {
27025        label$7 : {
27026         label$9 : {
27027          label$11 : {
27028           $3 = $1;
27029           if ($3) {
27030            $4 = $2;
27031            if (!$4) {
27032             break label$11
27033            }
27034            break label$9;
27035           }
27036           $1 = $0;
27037           $0 = ($0 >>> 0) / ($2 >>> 0) | 0;
27038           __wasm_intrinsics_temp_i64 = $1 - Math_imul($0, $2) | 0;
27039           __wasm_intrinsics_temp_i64$hi = 0;
27040           i64toi32_i32$HIGH_BITS = 0;
27041           return $0;
27042          }
27043          if (!$0) {
27044           break label$7
27045          }
27046          break label$6;
27047         }
27048         $6 = $4 + -1 | 0;
27049         if (!($6 & $4)) {
27050          break label$5
27051         }
27052         $6 = (Math_clz32($4) + 33 | 0) - Math_clz32($3) | 0;
27053         $7 = 0 - $6 | 0;
27054         break label$3;
27055        }
27056        __wasm_intrinsics_temp_i64 = 0;
27057        $0 = ($3 >>> 0) / 0 | 0;
27058        __wasm_intrinsics_temp_i64$hi = $3 - Math_imul($0, 0) | 0;
27059        i64toi32_i32$HIGH_BITS = 0;
27060        return $0;
27061       }
27062       $3 = 32 - Math_clz32($3) | 0;
27063       if ($3 >>> 0 < 31) {
27064        break label$4
27065       }
27066       break label$2;
27067      }
27068      __wasm_intrinsics_temp_i64 = $0 & $6;
27069      __wasm_intrinsics_temp_i64$hi = 0;
27070      if (($4 | 0) == 1) {
27071       break label$1
27072      }
27073      $3 = __wasm_ctz_i32($4);
27074      $2 = $3 & 31;
27075      if (32 <= ($3 & 63) >>> 0) {
27076       $4 = 0;
27077       $0 = $1 >>> $2 | 0;
27078      } else {
27079       $4 = $1 >>> $2 | 0;
27080       $0 = ((1 << $2) - 1 & $1) << 32 - $2 | $0 >>> $2;
27081      }
27082      i64toi32_i32$HIGH_BITS = $4;
27083      return $0;
27084     }
27085     $6 = $3 + 1 | 0;
27086     $7 = 63 - $3 | 0;
27087    }
27088    $3 = $1;
27089    $4 = $6 & 63;
27090    $5 = $4 & 31;
27091    if (32 <= $4 >>> 0) {
27092     $4 = 0;
27093     $5 = $3 >>> $5 | 0;
27094    } else {
27095     $4 = $3 >>> $5 | 0;
27096     $5 = ((1 << $5) - 1 & $3) << 32 - $5 | $0 >>> $5;
27097    }
27098    $7 = $7 & 63;
27099    $3 = $7 & 31;
27100    if (32 <= $7 >>> 0) {
27101     $1 = $0 << $3;
27102     $0 = 0;
27103    } else {
27104     $1 = (1 << $3) - 1 & $0 >>> 32 - $3 | $1 << $3;
27105     $0 = $0 << $3;
27106    }
27107    if ($6) {
27108     $7 = -1;
27109     $3 = $2 + -1 | 0;
27110     if (($3 | 0) != -1) {
27111      $7 = 0
27112     }
27113     while (1) {
27114      $8 = $5 << 1 | $1 >>> 31;
27115      $9 = $8;
27116      $4 = $4 << 1 | $5 >>> 31;
27117      $8 = $7 - ($4 + ($3 >>> 0 < $8 >>> 0) | 0) >> 31;
27118      $10 = $2 & $8;
27119      $5 = $9 - $10 | 0;
27120      $4 = $4 - ($9 >>> 0 < $10 >>> 0) | 0;
27121      $1 = $1 << 1 | $0 >>> 31;
27122      $0 = $11 | $0 << 1;
27123      $8 = $8 & 1;
27124      $11 = $8;
27125      $6 = $6 + -1 | 0;
27126      if ($6) {
27127       continue
27128      }
27129      break;
27130     };
27131    }
27132    __wasm_intrinsics_temp_i64 = $5;
27133    __wasm_intrinsics_temp_i64$hi = $4;
27134    i64toi32_i32$HIGH_BITS = $1 << 1 | $0 >>> 31;
27135    return $8 | $0 << 1;
27136   }
27137   __wasm_intrinsics_temp_i64 = $0;
27138   __wasm_intrinsics_temp_i64$hi = $1;
27139   $0 = 0;
27140   $1 = 0;
27141  }
27142  i64toi32_i32$HIGH_BITS = $1;
27143  return $0;
27144 }
27145
27146 function __wasm_ctz_i32($0) {
27147  if ($0) {
27148   return 31 - Math_clz32($0 + -1 ^ $0) | 0
27149  }
27150  return 32;
27151 }
27152
27153 function __wasm_i64_mul($0, $1, $2, $3) {
27154  $0 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE($0, $1, $2, $3);
27155  return $0;
27156 }
27157
27158 function __wasm_i64_udiv($0, $1, $2) {
27159  return _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E($0, $1, $2);
27160 }
27161
27162 function __wasm_i64_urem($0, $1) {
27163  _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E($0, $1, 588);
27164  i64toi32_i32$HIGH_BITS = __wasm_intrinsics_temp_i64$hi;
27165  return __wasm_intrinsics_temp_i64;
27166 }
27167
27168 function __wasm_rotl_i32($0, $1) {
27169  var $2 = 0, $3 = 0;
27170  $2 = $1 & 31;
27171  $3 = (-1 >>> $2 & $0) << $2;
27172  $2 = $0;
27173  $0 = 0 - $1 & 31;
27174  return $3 | ($2 & -1 << $0) >>> $0;
27175 }
27176
27177 // EMSCRIPTEN_END_FUNCS
27178;
27179 FUNCTION_TABLE[1] = seekpoint_compare_;
27180 FUNCTION_TABLE[2] = __stdio_close;
27181 FUNCTION_TABLE[3] = __stdio_read;
27182 FUNCTION_TABLE[4] = __stdio_seek;
27183 FUNCTION_TABLE[5] = FLAC__lpc_restore_signal;
27184 FUNCTION_TABLE[6] = FLAC__lpc_restore_signal_wide;
27185 FUNCTION_TABLE[7] = read_callback_;
27186 FUNCTION_TABLE[8] = read_callback_proxy_;
27187 FUNCTION_TABLE[9] = __emscripten_stdout_close;
27188 FUNCTION_TABLE[10] = __stdio_write;
27189 FUNCTION_TABLE[11] = __emscripten_stdout_seek;
27190 FUNCTION_TABLE[12] = FLAC__lpc_compute_residual_from_qlp_coefficients;
27191 FUNCTION_TABLE[13] = FLAC__lpc_compute_residual_from_qlp_coefficients_wide;
27192 FUNCTION_TABLE[14] = FLAC__fixed_compute_best_predictor_wide;
27193 FUNCTION_TABLE[15] = FLAC__fixed_compute_best_predictor;
27194 FUNCTION_TABLE[16] = precompute_partition_info_sums_;
27195 FUNCTION_TABLE[17] = FLAC__lpc_compute_autocorrelation;
27196 FUNCTION_TABLE[18] = verify_read_callback_;
27197 FUNCTION_TABLE[19] = verify_write_callback_;
27198 FUNCTION_TABLE[20] = verify_metadata_callback_;
27199 FUNCTION_TABLE[21] = verify_error_callback_;
27200 function __wasm_memory_size() {
27201  return buffer.byteLength / 65536 | 0;
27202 }
27203
27204 function __wasm_memory_grow(pagesToAdd) {
27205  pagesToAdd = pagesToAdd | 0;
27206  var oldPages = __wasm_memory_size() | 0;
27207  var newPages = oldPages + pagesToAdd | 0;
27208  if ((oldPages < newPages) && (newPages < 65536)) {
27209   var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
27210   var newHEAP8 = new global.Int8Array(newBuffer);
27211   newHEAP8.set(HEAP8);
27212   HEAP8 = newHEAP8;
27213   HEAP8 = new global.Int8Array(newBuffer);
27214   HEAP16 = new global.Int16Array(newBuffer);
27215   HEAP32 = new global.Int32Array(newBuffer);
27216   HEAPU8 = new global.Uint8Array(newBuffer);
27217   HEAPU16 = new global.Uint16Array(newBuffer);
27218   HEAPU32 = new global.Uint32Array(newBuffer);
27219   HEAPF32 = new global.Float32Array(newBuffer);
27220   HEAPF64 = new global.Float64Array(newBuffer);
27221   buffer = newBuffer;
27222   memory.buffer = newBuffer;
27223  }
27224  return oldPages;
27225 }
27226
27227 return {
27228  "__wasm_call_ctors": __wasm_call_ctors,
27229  "FLAC__stream_decoder_new": FLAC__stream_decoder_new,
27230  "FLAC__stream_decoder_delete": FLAC__stream_decoder_delete,
27231  "FLAC__stream_decoder_finish": FLAC__stream_decoder_finish,
27232  "FLAC__stream_decoder_init_stream": FLAC__stream_decoder_init_stream,
27233  "FLAC__stream_decoder_reset": FLAC__stream_decoder_reset,
27234  "FLAC__stream_decoder_init_ogg_stream": FLAC__stream_decoder_init_ogg_stream,
27235  "FLAC__stream_decoder_set_ogg_serial_number": FLAC__stream_decoder_set_ogg_serial_number,
27236  "FLAC__stream_decoder_set_md5_checking": FLAC__stream_decoder_set_md5_checking,
27237  "FLAC__stream_decoder_set_metadata_respond": FLAC__stream_decoder_set_metadata_respond,
27238  "FLAC__stream_decoder_set_metadata_respond_application": FLAC__stream_decoder_set_metadata_respond_application,
27239  "FLAC__stream_decoder_set_metadata_respond_all": FLAC__stream_decoder_set_metadata_respond_all,
27240  "FLAC__stream_decoder_set_metadata_ignore": FLAC__stream_decoder_set_metadata_ignore,
27241  "FLAC__stream_decoder_set_metadata_ignore_application": FLAC__stream_decoder_set_metadata_ignore_application,
27242  "FLAC__stream_decoder_set_metadata_ignore_all": FLAC__stream_decoder_set_metadata_ignore_all,
27243  "FLAC__stream_decoder_get_state": FLAC__stream_decoder_get_state,
27244  "FLAC__stream_decoder_get_md5_checking": FLAC__stream_decoder_get_md5_checking,
27245  "FLAC__stream_decoder_process_single": FLAC__stream_decoder_process_single,
27246  "FLAC__stream_decoder_process_until_end_of_metadata": FLAC__stream_decoder_process_until_end_of_metadata,
27247  "FLAC__stream_decoder_process_until_end_of_stream": FLAC__stream_decoder_process_until_end_of_stream,
27248  "FLAC__stream_encoder_new": FLAC__stream_encoder_new,
27249  "FLAC__stream_encoder_delete": FLAC__stream_encoder_delete,
27250  "FLAC__stream_encoder_finish": FLAC__stream_encoder_finish,
27251  "FLAC__stream_encoder_init_stream": FLAC__stream_encoder_init_stream,
27252  "FLAC__stream_encoder_init_ogg_stream": FLAC__stream_encoder_init_ogg_stream,
27253  "FLAC__stream_encoder_set_ogg_serial_number": FLAC__stream_encoder_set_ogg_serial_number,
27254  "FLAC__stream_encoder_set_verify": FLAC__stream_encoder_set_verify,
27255  "FLAC__stream_encoder_set_channels": FLAC__stream_encoder_set_channels,
27256  "FLAC__stream_encoder_set_bits_per_sample": FLAC__stream_encoder_set_bits_per_sample,
27257  "FLAC__stream_encoder_set_sample_rate": FLAC__stream_encoder_set_sample_rate,
27258  "FLAC__stream_encoder_set_compression_level": FLAC__stream_encoder_set_compression_level,
27259  "FLAC__stream_encoder_set_blocksize": FLAC__stream_encoder_set_blocksize,
27260  "FLAC__stream_encoder_set_total_samples_estimate": legalstub$FLAC__stream_encoder_set_total_samples_estimate,
27261  "FLAC__stream_encoder_set_metadata": FLAC__stream_encoder_set_metadata,
27262  "FLAC__stream_encoder_get_state": FLAC__stream_decoder_get_state,
27263  "FLAC__stream_encoder_get_verify_decoder_state": FLAC__stream_encoder_get_verify_decoder_state,
27264  "FLAC__stream_encoder_get_verify": FLAC__stream_encoder_get_verify,
27265  "FLAC__stream_encoder_process": FLAC__stream_encoder_process,
27266  "FLAC__stream_encoder_process_interleaved": FLAC__stream_encoder_process_interleaved,
27267  "__errno_location": __errno_location,
27268  "stackSave": stackSave,
27269  "stackRestore": stackRestore,
27270  "stackAlloc": stackAlloc,
27271  "malloc": dlmalloc,
27272  "free": dlfree,
27273  "__growWasmMemory": __growWasmMemory,
27274  "dynCall_iii": dynCall_iii,
27275  "dynCall_ii": dynCall_ii,
27276  "dynCall_iiii": dynCall_iiii,
27277  "dynCall_jiji": legalstub$dynCall_jiji,
27278  "dynCall_viiiiii": dynCall_viiiiii,
27279  "dynCall_iiiii": dynCall_iiiii,
27280  "dynCall_viiiiiii": dynCall_viiiiiii,
27281  "dynCall_viiii": dynCall_viiii,
27282  "dynCall_viii": dynCall_viii
27283 };
27284}
27285
27286var bufferView = new Uint8Array(wasmMemory.buffer);
27287for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i) {
27288    base64ReverseLookup[48+i] = 52+i; // '0-9'
27289    base64ReverseLookup[65+i] = i; // 'A-Z'
27290    base64ReverseLookup[97+i] = 26+i; // 'a-z'
27291  }
27292  base64ReverseLookup[43] = 62; // '+'
27293  base64ReverseLookup[47] = 63; // '/'
27294  /** @noinline Inlining this function would mean expanding the base64 string 4x times in the source code, which Closure seems to be happy to do. */
27295  function base64DecodeToExistingUint8Array(uint8Array, offset, b64) {
27296    var b1, b2, i = 0, j = offset, bLength = b64.length, end = offset + (bLength*3>>2) - (b64[bLength-2] == '=') - (b64[bLength-1] == '=');
27297    for (; i < bLength; i += 4) {
27298      b1 = base64ReverseLookup[b64.charCodeAt(i+1)];
27299      b2 = base64ReverseLookup[b64.charCodeAt(i+2)];
27300      uint8Array[j++] = base64ReverseLookup[b64.charCodeAt(i)] << 2 | b1 >> 4;
27301      if (j < end) uint8Array[j++] = b1 << 4 | b2 >> 2;
27302      if (j < end) uint8Array[j++] = b2 << 6 | base64ReverseLookup[b64.charCodeAt(i+3)];
27303    }
27304  }
27305  base64DecodeToExistingUint8Array(bufferView, 1025, "Bw4JHBsSFTg/NjEkIyotcHd+eWxrYmVIT0ZBVFNaXeDn7un8+/L12N/W0cTDys2Ql56ZjIuChaivpqG0s7q9x8DJztvc1dL/+PH24+Tt6rewub6rrKWij4iBhpOUnZonICkuOzw1Mh8YERYDBA0KV1BZXktMRUJvaGFmc3R9eomOh4CVkpucsba/uK2qo6T5/vfw5eLr7MHGz8jd2tPUaW5nYHVye3xRVl9YTUpDRBkeFxAFAgsMISYvKD06MzROSUBHUlVcW3ZxeH9qbWRjPjkwNyIlLCsGAQgPGh0UE66poKeytby7lpGYn4qNhIPe2dDXwsXMy+bh6O/6/fTzAAAFgA+ACgAbgB4AFAARgDOANgA8ADmAKAAtgCeAIgBjgGYAbABpgHgAfYB3gHIAUABVgF+AWgBLgE4ARABBgMOAxgDMAMmA2ADdgNeA0gDwAPWA/4D6AOuA7gDkAOGAoAClgK+AqgC7gL4AtACxgJOAlgCcAJmAiACNgIeAggCDgYYBjAGJgZgBnYGXgZIBsAG1gb+BugGrga4BpAGhgeAB5YHvgeoB+4H+AfQB8YHTgdYB3AHZgcgBzYHHgcIBQAFFgU+BSgFbgV4BVAFRgXOBdgF8AXmBaAFtgWeBYgEjgSYBLAEpgTgBPYE3gTIBEAEVgR+BGgELgQ4BBAEBgQODBgMMAwmDGAMdgxeDEgMwAzWDP4M6AyuDLgMkAyGDYANlg2+DagN7g34DdANxg1ODVgNcA1mDSANNg0eDQgPAA8WDz4PKA9uD3gPUA9GD84P2A/wD+YPoA+2D54PiA6ODpgOsA6mDuAO9g7eDsgOQA5WDn4OaA4uDjgOEA4GDgAKFgo+CigKbgp4ClAKRgrOCtgK8ArmCqAKtgqeCogLjguYC7ALpgvgC/YL3gvIC0ALVgt+C2gLLgs4CxALBgkOCRgJMAkmCWAJdgleCUgJwAnWCf4J6AmuCbgJkAmGCIAIlgi+CKgI7gj4CNAIxghOCFgIcAhmCCAINggeCAgIAAAOGA4wACgOYAB4AFAOSA7AANgA8A7oAKAOuA6QAIgPgAGYAbAPqAHgD/gP0AHIAUAPWA9wAWgPIAE4ARAPCA0AAxgDMA0oA2ANeA1QA0gDwA3YDfAD6A2gA7gDkA2IAoAMmAywAqgM4AL4AtAMyAxAAlgCcAxoAiAMOAwQAggaABQYFDAaKBRgGngaUBRIFMAa2BrwFOgaoBS4FJAaiBWAG5gbsBWoG+AV+BXQG8gbQBVYFXAbaBUgGzgbEBUIFwAZGBkwFygZYBd4F1AZSBnAF9gX8BnoF6AZuBmQF4gYgBaYFrAYqBbgGPgY0BbIFkAYWBhwFmgYIBY4FhAYCCYAKBgoMCYoKGAmeCZQKEgowCbYJvAo6CagKLgokCaIKYAnmCewKagn4Cn4KdAnyCdAKVgpcCdoKSAnOCcQKQgrACUYJTArKCVgK3grUCVIJcAr2CvwJegroCW4JZAriCSAKpgqsCSoKuAk+CTQKsgqQCRYJHAqaCQgKjgqECQIPAAyGDIwPCgyYDx4PFAySDLAPNg88DLoPKAyuDKQPIgzgD2YPbAzqD3gM/gz0D3IPUAzWDNwPWgzID04PRAzCDEAPxg/MDEoP2AxeDFQP0g/wDHYMfA/6DGgP7g/kDGIPoAwmDCwPqgw4D74PtAwyDBAPlg+cDBoPiAwODAQPggAAF4ArgDwAU4BEAHgAb4CjgLQAiACfgPAA54DbgMwAQ4FUAWgBf4EQAQeBO4EsAeAB94HLgdwBs4GkAZgBj4GDgpQCqAK/gtACx4L7guwCIAI3gguCHAJzgmQCWAJPgsAD14Prg/wDk4OEA7gDr4Njg3QDSANfgzADJ4MbgwwDA4UUBSgFP4VQBUeFe4VsBaAFt4WLhZwF84XkBdgFz4VABFeEa4R8BBOEBAQ4BC+E44T0BMgE34SwBKeEm4SMBIAHl4erh7wH04fEB/gH74cjhzQHCAcfh3AHZ4dbh0wHw4bUBugG/4aQBoeGu4asBmAGd4ZLhlwGM4YkBhgGD4YDihQKKAo/ilAKR4p7imwKoAq3iouKnArziuQK2ArPikALV4tri3wLE4sECzgLL4vji/QLyAvfi7ALp4ubi4wLgAiXiKuIvAjTiMQI+AjviCOINAgICB+IcAhniFuITAjDidQJ6An/iZAJh4m7iawJYAl3iUuJXAkziSQJGAkPiQAPF48rjzwPU49ED3gPb4+jj7QPiA+fj/AP54/bj8wPQ45UDmgOf44QDgeOO44sDuAO947LjtwOs46kDpgOj46DjZQNqA2/jdANx437jewNIA03jQuNHA1zjWQNWA1PjcAM14zrjPwMk4yEDLgMr4xjjHQMSAxfjDAMJ4wbjAwMAAADlAOoADwD0ABEAHgD7AMgALQAiAMcAPADZANYAMwGQAXUBegGfAWQBgQGOAWsBWAG9AbIBVwGsAUkBRgGjAyADxQPKAy8D1AMxAz4D2wPoAw0DAgPnAxwD+QP2AxMCsAJVAloCvwJEAqECrgJLAngCnQKSAncCjAJpAmYCgwdgB4UHigdvB5QHcQd+B5sHqAdNB0IHpwdcB7kHtgdTBvAGFQYaBv8GBAbhBu4GCwY4Bt0G0gY3BswGKQYmBsMEQASlBKoETwS0BFEEXgS7BIgEbQRiBIcEfASZBJYEcwXQBTUFOgXfBSQFwQXOBSsFGAX9BfIFFwXsBQkFBgXjD+APBQ8KD+8PFA/xD/4PGw8oD80Pwg8nD9wPOQ82D9MOcA6VDpoOfw6EDmEObg6LDrgOXQ5SDrcOTA6pDqYOQwzADCUMKgzPDDQM0QzeDDsMCAztDOIMBwz8DBkMFgzzDVANtQ26DV8NpA1BDU4Nqw2YDX0Ncg2XDWwNiQ2GDWMIgAhlCGoIjwh0CJEIngh7CEgIrQiiCEcIvAhZCFYIswkQCfUJ+gkfCeQJAQkOCesJ2Ak9CTIJ1wksCckJxgkjC6ALRQtKC68LVAuxC74LWwtoC40LggtnC5wLeQt2C5MKMArVCtoKPwrECiEKLgrLCvgKHQoSCvcKDArpCuYKAwAAHuA84CIAOOBmAEQAWuBw4O4AzADS4MgAluC04KoAoOH+AdwBwuHYAYbhpOG6AZABDuEs4TIBKOF2AVQBSuFA494D/APi4/gDpuOE45oDsAMu4wzjEgMI41YDdANq42ACPuIc4gICGOJGAmQCeuJQ4s4C7ALy4ugCtuKU4ooCgOeeB7wHoue4B+bnxOfaB/AHbudM51IHSOcWBzQHKucgBn7mXOZCBljmBgYkBjrmEOaOBqwGsuaoBvbm1ObKBsAEXuR85GIEeOQmBAQEGuQw5K4EjASS5IgE1uT05OoE4OW+BZwFguWYBcbl5OX6BdAFTuVs5XIFaOU2BRQFCuUA7x4PPA8i7zgPZu9E71oPcA/u78zv0g/I75YPtA+q76AO/u7c7sIO2O6GDqQOuu6Q7g4OLA4y7igOdu5U7koOQAze7Pzs4gz47KYMhAya7LDsLgwMDBLsCAxW7HTsagxg7T4NHA0C7RgNRu1k7XoNUA3O7ezt8g3o7bYNlA2K7YAInui86KIIuOjmCMQI2ujw6G4ITAhS6EgIFug06CoIIOl+CVwJQulYCQbpJOk6CRAJjums6bIJqOn2CdQJyunA614LfAti63gLJusE6xoLMAuu64zrkguI69YL9Avq6+AKvuqc6oIKmOrGCuQK+urQ6k4KbApy6mgKNuoU6goKAAAA/gDcACIBuAFGAWQBmgJQAq4CjAJyA+gDFgM0A8oEoAReBHwEggUYBeYFxAU6BvAGDgYsBtIHSAe2B5QHaghgCJ4IvAhCCdgJJgkECfoKMArOCuwKEguIC3YLVAuqDMAMPgwcDOINeA2GDaQNWg6QDm4OTA6yDygP1g/0DwoR4BEeETwRwhBYEKYQhBB6E7ATThNsE5ISCBL2EtQSKhVAFb4VnBViFPgUBhQkFNoXEBfuF8wXMhaoFlYWdBaKGYAZfhlcGaIYOBjGGOQYGhvQGy4bDBvyGmgalhq0GkodIB3eHfwdAhyYHGYcRBy6H3Afjh+sH1IeyB42HhQe6iLgIh4iPCLCI1gjpiOEI3ogsCBOIGwgkiEIIfYh1CEqJkAmviacJmIn+CcGJyQn2iQQJO4kzCQyJaglViV0JYoqgCp+Klwqois4K8Yr5CsaKNAoLigMKPIpaCmWKbQpSi4gLt4u/C4CL5gvZi9EL7oscCyOLKwsUi3ILTYtFC3qMwAz/jPcMyIyuDJGMmQymjFQMa4xjDFyMOgwFjA0MMo3oDdeN3w3gjYYNuY2xDY6NfA1DjUsNdI0SDS2NJQ0ajtgO547vDtCOtg6JjoEOvo5MDnOOew5EjiIOHY4VDiqP8A/Pj8cP+I+eD6GPqQ+Wj2QPW49TD2yPCg81jz0PAoAAATgSOCMANDhFAFYAZzh4OIkAmgCrOLwAzTjeOO8A8DkRAQIBMzkkAVU5Rjl3AWgBmTmKObsBrDndAc4B/zngOiECMgIDOhQCZTp2OkcCWAKpOro6iwKcOu0C/gLPOtADMTsiOxMDBDt1A2YDVztIO7kDqgObO4wD/TvuO98DwDxBBFIEYzx0BAU8FjwnBDgEyTzaPOsE/DyNBJ4ErzywBVE9Qj1zBWQ9FQUGBTc9KD3ZBcoF+z3sBZ09jj2/BaAGYT5yPkMGVD4lBjYGBz4YPukG+gbLPtwGrT6+Po8GkD9xB2IHUz9EBzU/Jj8XBwgH+T/qP9sHzD+9B64Hnz+AMIEIkgijMLQIxTDWMOcI+AgJMBowKwg8ME0IXghvMHAJkTGCMbMJpDHVCcYJ9zHoMRkJCgk7MSwJXTFOMX8JYAqhMrIygwqUMuUK9grHMtgyKQo6CgsyHAptMn4yTwpQM7ELoguTM4QL9TPmM9cLyAs5MyozGwsMM30LbgtfM0AMwTTSNOMM9DSFDJYMpzS4NEkMWgxrNHwMDTQeNC8MMDXRDcIN8zXkDZU1hjW3DagNWTVKNXsNbDUdDQ4NPzUgNuEO8g7DNtQOpTa2NocOmA5pNno2Sw5cNi0OPg4PNhAP8TfiN9MPxDe1D6YPlzeIN3kPag9bN0wPPTcuNx8PAAAAYQDCAKMBhAHlAUYBJwMIA2kDygOrAowC7QJOAi8GWAY5BpoG+wfcB70HHgd/BVAFMQWSBfME1AS1BBYEdwz4DJkMOgxbDXwNHQ2+Dd8P8A+RDzIPUw50DhUOtg7XCqAKwQpiCgMLJAtFC+YLhwmoCckJagkLCCwITQjuCI8JuBnZGXoZGxg8GF0Y/hifGrAa0RpyGhMbNBtVG/Yblx/gH4EfIh9DHmQeBR6mHscc6ByJHCocSx1sHQ0drh3PFUAVIRWCFeMUxBSlFAYUZxZIFikWihbrF8wXrRcOF28TGBN5E9oTuxKcEv0SXhI/EBAQcRDSELMRlBH1EVYRNxM4M1kz+jObMrwy3TJ+Mh8wMDBRMPIwkzG0MdUxdjEXNWA1ATWiNcM05DSFNCY0RzZoNgk2qjbLN+w3jTcuN08/wD+hPwI/Yz5EPiU+hj7nPMg8qTwKPGs9TD0tPY497zmYOfk5Wjk7OBw4fTjeOL86kDrxOlI6MzsUO3U71ju3OoAq4SpCKiMrBCtlK8YrpymIKekpSikrKAwobSjOKK8s2Cy5LBosey1cLT0tni3/L9AvsS8SL3MuVC41LpYu9yZ4JhkmuibbJ/wnnSc+J18lcCURJbIl0yT0JJUkNiRXICAgQSDiIIMhpCHFIWYhByMoI0kj6iOLIqwizSJuIg8nJlZmVyZW5jZSBsaWJGTEFDIDEuMy4zIDIwMTkwODA0AGZMYUMAAABDYUxmIAAAABAAAAAQAAAAGAAAABgAAAAUAAAAAwAAAAUAAAAkAAAAIAAAAEAAAABAAAAAEAAAAEAAAAAIAAAAGAAAAEAAAAAIAAAAYAAAAAEAAAABAAAAbgAAAAgAAAAABAAAQAAAAAEAAAAXCAAACAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAAQAAAAcAAAAYAAAA/j8AAA4AAAABAAAAAQAAAAQAAAAEAAAABAAAAAMAAAABAAAACAAAABAAAAACAAAABAAAAAQAAAAFAAAABQAAAA8AAAAfAAAABAAAAAUAAAABAAAABgAAAAEAAAAAAAAAAgAAABAAAABAAAAAQ0QtREEgY3VlIHNoZWV0IG11c3QgaGF2ZSBhIGxlYWQtaW4gbGVuZ3RoIG9mIGF0IGxlYXN0IDIgc2Vjb25kcwBDRC1EQSBjdWUgc2hlZXQgbGVhZC1pbiBsZW5ndGggbXVzdCBiZSBldmVubHkgZGl2aXNpYmxlIGJ5IDU4OCBzYW1wbGVzAGN1ZSBzaGVldCBtdXN0IGhhdmUgYXQgbGVhc3Qgb25lIHRyYWNrICh0aGUgbGVhZC1vdXQpAENELURBIGN1ZSBzaGVldCBtdXN0IGhhdmUgYSBsZWFkLW91dCB0cmFjayBudW1iZXIgMTcwICgweEFBKQBjdWUgc2hlZXQgbWF5IG5vdCBoYXZlIGEgdHJhY2sgbnVtYmVyIDAAQ0QtREEgY3VlIHNoZWV0IHRyYWNrIG51bWJlciBtdXN0IGJlIDEtOTkgb3IgMTcwAENELURBIGN1ZSBzaGVldCBsZWFkLW91dCBvZmZzZXQgbXVzdCBiZSBldmVubHkgZGl2aXNpYmxlIGJ5IDU4OCBzYW1wbGVzAENELURBIGN1ZSBzaGVldCB0cmFjayBvZmZzZXQgbXVzdCBiZSBldmVubHkgZGl2aXNpYmxlIGJ5IDU4OCBzYW1wbGVzAGN1ZSBzaGVldCB0cmFjayBtdXN0IGhhdmUgYXQgbGVhc3Qgb25lIGluZGV4IHBvaW50AGN1ZSBzaGVldCB0cmFjaydzIGZpcnN0IGluZGV4IG51bWJlciBtdXN0IGJlIDAgb3IgMQBDRC1EQSBjdWUgc2hlZXQgdHJhY2sgaW5kZXggb2Zmc2V0IG11c3QgYmUgZXZlbmx5IGRpdmlzaWJsZSBieSA1ODggc2FtcGxlcwBjdWUgc2hlZXQgdHJhY2sgaW5kZXggbnVtYmVycyBtdXN0IGluY3JlYXNlIGJ5IDEATUlNRSB0eXBlIHN0cmluZyBtdXN0IGNvbnRhaW4gb25seSBwcmludGFibGUgQVNDSUkgY2hhcmFjdGVycyAoMHgyMC0weDdlKQBkZXNjcmlwdGlvbiBzdHJpbmcgbXVzdCBiZSB2YWxpZCBVVEYtOA==");
27306base64DecodeToExistingUint8Array(bufferView, 6516, "tx3BBG47ggnZJkMN3HYEE2trxReyTYYaBVBHHrjtCCYP8Mki1taKL2HLSytkmww104bNMQqgjjy9vU84cNsRTMfG0Ege4JNFqf1SQaytFV8bsNRbwpaXVnWLVlLINhlqfyvYbqYNm2MREFpnFEAdeaNd3H16e59wzWZedOC2I5hXq+Kcjo2hkTmQYJU8wCeLi93mj1L7pYLl5mSGWFsrvu9G6ro2YKm3gX1os4QtL60zMO6p6hatpF0LbKCQbTLUJ3Dz0P5WsN1JS3HZTBs2x/sG98MiILTOlT11yiiAOvKfnfv2Rru4+/Gmef/09j7hQ+v/5ZrNvOgt0H3sd3CGNMBtRzAZSwQ9rlbFOasGgiccG0MjxT0ALnIgwSrPnY4SeIBPFqGmDBsWu80fE+uKAaT2SwV90AgIys3JDAerl3iwtlZ8aZAVcd6N1HXb3ZNrbMBSb7XmEWIC+9Bmv0afXghbXlrRfR1XZmDcU2Mwm03ULVpJDQsZRLoW2ECXxqWsINtkqPn9J6VO4OahS7Chv/ytYLsliyO2kpbisi8rrYqYNmyOQRAvg/YN7ofzXamZREBonZ1mK5Aqe+qU5x204FAAdeSJJjbpPjv37TtrsPOMdnH3VVAy+uJN8/5f8LzG6O19wjHLPs+G1v/Lg4a41TSbedHtvTrcWqD72O7gDGlZ/c1tgNuOYDfGT2Qylgh6hYvJflytinPrsEt3Vg0ET+EQxUs4NoZGjytHQop7AFw9ZsFY5ECCVVNdQ1GeOx0lKSbcIfAAnyxHHV4oQk0ZNvVQ2DIsdps/m2taOybWFQORy9QHSO2XCv/wVg76oBEQTb3QFJSbkxkjhlIdDlYv8blL7vVgba3413Bs/NIgK+JlPermvBup6wsGaO+2uyfXAabm09iApd5vnWTaas0jxN3Q4sAE9qHNs+tgyX6NPr3JkP+5ELa8tKerfbCi+zquFeb7qszAuKd73XmjxmA2m3F995+oW7SSH0Z1lhoWMoitC/OMdC2wgcMwcYWZkIpdLo1LWferCFRAtslQReaOTvL7T0or3QxHnMDNQyF9gnuWYEN/T0YAcvhbwXb9C4ZoShZHbJMwBGEkLcVl6UubEV5WWhWHcBkYMG3YHDU9nwKCIF4GWwYdC+wb3A9RppM35rtSMz+dET6IgNA6jdCXJDrNViDj6xUtVPbUKXkmqcXOO2jBFx0rzKAA6silUK3WEk1s0strL998du7bwcuh43bWYOev8CPqGO3i7h29pfCqoGT0c4Yn+cSb5v0J/biJvuB5jWfGOoDQ2/uE1Yu8mmKWfZ67sD6TDK3/l7EQsK8GDXGr3ysypmg286JtZrS82nt1uANdNrW0QPexf0ZMQUMAAAAQAAAAiCoAAElEMw==");
27307base64DecodeToExistingUint8Array(bufferView, 7576, "AQAAAAUAAAAYKw==");
27308base64DecodeToExistingUint8Array(bufferView, 7600, "AwAAAAQAAAAEAAAABgAAAIP5ogBETm4A/CkVANFXJwDdNPUAYtvAADyZlQBBkEMAY1H+ALveqwC3YcUAOm4kANJNQgBJBuAACeouAByS0QDrHf4AKbEcAOg+pwD1NYIARLsuAJzphAC0JnAAQX5fANaROQBTgzkAnPQ5AItfhAAo+b0A+B87AN7/lwAPmAUAES/vAApaiwBtH20Az342AAnLJwBGT7cAnmY/AC3qXwC6J3UA5evHAD178QD3OQcAklKKAPtr6gAfsV8ACF2NADADVgB7/EYA8KtrACC8zwA29JoA46kdAF5hkQAIG+YAhZllAKAUXwCNQGgAgNj/ACdzTQAGBjEAylYVAMmocwB74mAAa4zAABnERwDNZ8MACejcAFmDKgCLdsQAphyWAESv3QAZV9EApT4FAAUH/wAzfj8AwjLoAJhP3gC7fTIAJj3DAB5r7wCf+F4ANR86AH/yygDxhx0AfJAhAGokfADVbvoAMC13ABU7QwC1FMYAwxmdAK3EwgAsTUEADABdAIZ9RgDjcS0Am8aaADNiAAC00nwAtKeXADdV1QDXPvYAoxAYAE12/ABknSoAcNerAGN8+AB6sFcAFxXnAMBJVgA71tkAp4Q4ACQjywDWincAWlQjAAAfuQDxChsAGc7fAJ8x/wBmHmoAmVdhAKz7RwB+f9gAImW3ADLoiQDmv2AA78TNAGw2CQBdP9QAFt7XAFg73gDem5IA0iIoACiG6ADiWE0AxsoyAAjjFgDgfcsAF8BQAPMdpwAY4FsALhM0AIMSYgCDSAEA9Y5bAK2wfwAe6fIASEpDABBn0wCq3dgArl9CAGphzgAKKKQA05m0AAam8gBcd38Ao8KDAGE8iACKc3gAr4xaAG/XvQAtpmMA9L/LAI2B7wAmwWcAVcpFAMrZNgAoqNIAwmGNABLJdwAEJhQAEkabAMRZxADIxUQATbKRAAAX8wDUQ60AKUnlAP3VEAAAvvwAHpTMAHDO7gATPvUA7PGAALPnwwDH+CgAkwWUAMFxPgAuCbMAC0XzAIgSnACrIHsALrWfAEeSwgB7Mi8ADFVtAHKnkABr5x8AMcuWAHkWSgBBeeIA9N+JAOiUlwDi5oQAmTGXAIjtawBfXzYAu/0OAEiatABnpGwAcXJCAI1dMgCfFbgAvOUJAI0xJQD3dDkAMAUcAA0MAQBLCGgALO5YAEeqkAB05wIAvdYkAPd9pgBuSHIAnxbvAI6UpgC0kfYA0VNRAM8K8gAgmDMA9Ut+ALJjaADdPl8AQF0DAIWJfwBVUikAN2TAAG3YEAAySDIAW0x1AE5x1ABFVG4ACwnBACr1aQAUZtUAJwedAF0EUAC0O9sA6nbFAIf5FwBJa30AHSe6AJZpKQDGzKwArRRUAJDiagCI2YkALHJQAASkvgB3B5QA8zBwAAD8JwDqcagAZsJJAGTgPQCX3YMAoz+XAEOU/QANhowAMUHeAJI5nQDdcIwAF7fnAAjfOwAVNysAXICgAFqAkwAQEZIAD+jYAGyArwDb/0sAOJAPAFkYdgBipRUAYcu7AMeJuQAQQL0A0vIEAEl1JwDrtvYA2yK7AAoUqgCJJi8AZIN2AAk7MwAOlBoAUTqqAB2jwgCv7a4AXCYSAG3CTQAtepwAwFaXAAM/gwAJ8PYAK0CMAG0xmQA5tAcADCAVANjDWwD1ksQAxq1LAE7KpQCnN80A5qk2AKuSlADdQmgAGWPeAHaM7wBoi1IA/Ns3AK6hqwDfFTEAAK6hAAz72gBkTWYA7QW3ACllMABXVr8AR/86AGr5uQB1vvMAKJPfAKuAMABmjPYABMsVAPoiBgDZ5B0APbOkAFcbjwA2zQkATkLpABO+pAAzI7UA8KoaAE9lqADSwaUACz8PAFt4zQAj+XYAe4sEAIkXcgDGplMAb27iAO/rAACbSlgAxNq3AKpmugB2z88A0QIdALHxLQCMmcEAw613AIZI2gD3XaAAxoD0AKzwLwDd7JoAP1y8ANDebQCQxx8AKtu2AKMlOgAAr5oArVOTALZXBAApLbQAS4B+ANoHpwB2qg4Ae1mhABYSKgDcty0A+uX9AInb/gCJvv0A5HZsAAap/AA+gHAAhW4VAP2H/wAoPgcAYWczACoYhgBNveoAs+evAI9tbgCVZzkAMb9bAITXSAAw3xYAxy1DACVhNQDJcM4AMMu4AL9s/QCkAKIABWzkAFrdoAAhb0cAYhLSALlchABwYUkAa1bgAJlSAQBQVTcAHtW3ADPxxAATbl8AXTDkAIUuqQAdssMAoTI2AAi3pADqsdQAFvchAI9p5AAn/3cADAOAAI1ALQBPzaAAIKWZALOi0wAvXQoAtPlCABHaywB9vtAAm9vBAKsXvQDKooEACGpcAC5VFwAnAFUAfxTwAOEHhgAUC2QAlkGNAIe+3gDa/SoAayW2AHuJNAAF8/4Aub+eAGhqTwBKKqgAT8RaAC34vADXWpgA9MeVAA1NjQAgOqYApFdfABQ/sQCAOJUAzCABAHHdhgDJ3rYAv2D1AE1lEQABB2sAjLCsALLA0ABRVUgAHvsOAJVywwCjBjsAwEA1AAbcewDgRcwATin6ANbKyADo80EAfGTeAJtk2ADZvjEApJfDAHdY1ABp48UA8NoTALo6PABGGEYAVXVfANK99QBuksYArC5dAA5E7QAcPkIAYcSHACn96QDn1vMAInzKAG+RNQAI4MUA/9eNAG5q4gCw/cYAkwjBAHxddABrrbIAzW6dAD5yewDGEWoA98+pAClz3wC1yboAtwBRAOKyDQB0uiQA5X1gAHTYigANFSwAgRgMAH5mlAABKRYAn3p2AP39vgBWRe8A2X42AOzZEwCLurkAxJf8ADGoJwDxbsMAlMU2ANioVgC0qLUAz8wOABKJLQBvVzQALFaJAJnO4wDWILkAa16qAD4qnAARX8wA/QtKAOH0+wCOO20A4oYsAOnUhAD8tKkA7+7RAC41yQAvOWEAOCFEABvZyACB/AoA+0pqAC8c2ABTtIQATpmMAFQizAAqVdwAwMbWAAsZlgAacLgAaZVkACZaYAA/Uu4AfxEPAPS1EQD8y/UANLwtADS87gDoXcwA3V5gAGeOmwCSM+8AyRe4AGFYmwDhV7wAUYPGANg+EADdcUgALRzdAK8YoQAhLEYAWfPXANl6mACeVMAAT4b6AFYG/ADlea4AiSI2ADitIgBnk9wAVeiqAIImOADK55sAUQ2kAJkzsQCp1w4AaQVIAGWy8AB/iKcAiEyXAPnRNgAhkrMAe4JKAJjPIQBAn9wA3EdVAOF0OgBn60IA/p3fAF7UXwB7Z6QAuqx6AFX2ogAriCMAQbpVAFluCAAhKoYAOUeDAInj5gDlntQASftAAP9W6QAcD8oAxVmKAJT6KwDTwcUAD8XPANtargBHxYYAhUNiACGGOwAseZQAEGGHACpMewCALBoAQ78SAIgmkAB4PIkAqMTkAOXbewDEOsIAJvTqAPdnigANkr8AZaMrAD2TsQC9fAsApFHcACfdYwBp4d0AmpQZAKgplQBozigACe20AESfIABOmMoAcIJjAH58IwAPuTIAp/WOABRW5wAh8QgAtZ0qAG9+TQClGVEAtfmrAILf1gCW3WEAFjYCAMQ6nwCDoqEAcu1tADmNegCCuKkAazJcAEYnWwAANO0A0gB3APz0VQABWU0A4HGA");
27309base64DecodeToExistingUint8Array(bufferView, 10387, "QPsh+T8AAAAALUR0PgAAAICYRvg8AAAAYFHMeDsAAACAgxvwOQAAAEAgJXo4AAAAgCKC4zYAAAAAHfNpNQAAAAAAAOA/AAAAAAAA4L8BAAAAAgAAAAQAAAAFAAAABgAAAGluZmluaXR5AG5hbg==");
27310base64DecodeToExistingUint8Array(bufferView, 10512, "0XSeAFedvSqAcFIP//8+JwoAAABkAAAA6AMAABAnAACghgEAQEIPAICWmAAA4fUFGAAAADUAAABxAAAAa////877//+Sv///YmFydGxldHQAYmFydGxldHRfaGFubgBibGFja21hbgBibGFja21hbl9oYXJyaXNfNHRlcm1fOTJkYgBjb25uZXMAZmxhdHRvcABnYXVzcygAaGFtbWluZwBoYW5uAGthaXNlcl9iZXNzZWwAbnV0dGFsbAByZWN0YW5nbGUAdHJpYW5nbGUAdHVrZXkoAHBhcnRpYWxfdHVrZXkoAHB1bmNob3V0X3R1a2V5KAB3ZWxjaABpbWFnZS9wbmcALS0+AHR1a2V5KDVlLTEpAHR1a2V5KDVlLTEpO3BhcnRpYWxfdHVrZXkoMikAdHVrZXkoNWUtMSk7cGFydGlhbF90dWtleSgyKTtwdW5jaG91dF90dWtleSgzKQ==");
27311base64DecodeToExistingUint8Array(bufferView, 10881, "FQAAcR0AAAk=");
27312base64DecodeToExistingUint8Array(bufferView, 10900, "Ag==");
27313base64DecodeToExistingUint8Array(bufferView, 10920, "AwAAAAAAAAAEAAAASC8AAAAE");
27314base64DecodeToExistingUint8Array(bufferView, 10964, "/////w==");
27315base64DecodeToExistingUint8Array(bufferView, 11032, "BQ==");
27316base64DecodeToExistingUint8Array(bufferView, 11044, "CQ==");
27317base64DecodeToExistingUint8Array(bufferView, 11068, "CgAAAAsAAABYMwAAAAQ=");
27318base64DecodeToExistingUint8Array(bufferView, 11092, "AQ==");
27319base64DecodeToExistingUint8Array(bufferView, 11107, "Cv////8=");
27320base64DecodeToExistingUint8Array(bufferView, 11176, "GCs=");
27321base64DecodeToExistingUint8Array(bufferView, 11216, "AwAAAAAAAAAZKgAAAQAAAAE=");
27322base64DecodeToExistingUint8Array(bufferView, 11260, "AwAAAAAAAAAZKgAAAQ==");
27323base64DecodeToExistingUint8Array(bufferView, 11304, "AwAAAAAAAAAZKg==");
27324base64DecodeToExistingUint8Array(bufferView, 11324, "Bg==");
27325base64DecodeToExistingUint8Array(bufferView, 11348, "BAAAAAAAAAAZKgAAAQAAAAEAAAAI");
27326base64DecodeToExistingUint8Array(bufferView, 11392, "BAAAAAAAAAAZKgAAAQAAAAAAAAAI");
27327base64DecodeToExistingUint8Array(bufferView, 11436, "BQAAAAAAAAAZKgAAAQAAAAAAAAAI");
27328base64DecodeToExistingUint8Array(bufferView, 11480, "BgAAAAAAAAAlKgAAAQAAAAAAAAAM");
27329base64DecodeToExistingUint8Array(bufferView, 11524, "BgAAAAAAAAAlKgAAAQAAAAAAAAAM");
27330base64DecodeToExistingUint8Array(bufferView, 11568, "BgAAAAAAAABCKg==");
27331return asmFunc({
27332    'Int8Array': Int8Array,
27333    'Int16Array': Int16Array,
27334    'Int32Array': Int32Array,
27335    'Uint8Array': Uint8Array,
27336    'Uint16Array': Uint16Array,
27337    'Uint32Array': Uint32Array,
27338    'Float32Array': Float32Array,
27339    'Float64Array': Float64Array,
27340    'NaN': NaN,
27341    'Infinity': Infinity,
27342    'Math': Math
27343  },
27344  asmLibraryArg,
27345  wasmMemory.buffer
27346)
27347
27348}
27349)(asmLibraryArg, wasmMemory, wasmTable);
27350  },
27351
27352  instantiate: /** @suppress{checkTypes} */ function(binary, info) {
27353    return {
27354      then: function(ok) {
27355        ok({
27356          'instance': new WebAssembly.Instance(new WebAssembly.Module(binary))
27357        });
27358      }
27359    };
27360  },
27361
27362  RuntimeError: Error
27363};
27364
27365// We don't need to actually download a wasm binary, mark it as present but empty.
27366wasmBinary = [];
27367
27368
27369
27370if (typeof WebAssembly !== 'object') {
27371  abort('no native wasm support detected');
27372}
27373
27374
27375
27376
27377// In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking.
27378// In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties)
27379
27380/** @param {number} ptr
27381    @param {number} value
27382    @param {string} type
27383    @param {number|boolean=} noSafe */
27384function setValue(ptr, value, type, noSafe) {
27385  type = type || 'i8';
27386  if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit
27387    switch(type) {
27388      case 'i1': HEAP8[((ptr)>>0)]=value; break;
27389      case 'i8': HEAP8[((ptr)>>0)]=value; break;
27390      case 'i16': HEAP16[((ptr)>>1)]=value; break;
27391      case 'i32': HEAP32[((ptr)>>2)]=value; break;
27392      case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break;
27393      case 'float': HEAPF32[((ptr)>>2)]=value; break;
27394      case 'double': HEAPF64[((ptr)>>3)]=value; break;
27395      default: abort('invalid type for setValue: ' + type);
27396    }
27397}
27398
27399/** @param {number} ptr
27400    @param {string} type
27401    @param {number|boolean=} noSafe */
27402function getValue(ptr, type, noSafe) {
27403  type = type || 'i8';
27404  if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit
27405    switch(type) {
27406      case 'i1': return HEAP8[((ptr)>>0)];
27407      case 'i8': return HEAP8[((ptr)>>0)];
27408      case 'i16': return HEAP16[((ptr)>>1)];
27409      case 'i32': return HEAP32[((ptr)>>2)];
27410      case 'i64': return HEAP32[((ptr)>>2)];
27411      case 'float': return HEAPF32[((ptr)>>2)];
27412      case 'double': return HEAPF64[((ptr)>>3)];
27413      default: abort('invalid type for getValue: ' + type);
27414    }
27415  return null;
27416}
27417
27418
27419
27420
27421
27422
27423// Wasm globals
27424
27425var wasmMemory;
27426
27427// In fastcomp asm.js, we don't need a wasm Table at all.
27428// In the wasm backend, we polyfill the WebAssembly object,
27429// so this creates a (non-native-wasm) table for us.
27430var wasmTable = new WebAssembly.Table({
27431  'initial': 22,
27432  'maximum': 22 + 5,
27433  'element': 'anyfunc'
27434});
27435
27436
27437//========================================
27438// Runtime essentials
27439//========================================
27440
27441// whether we are quitting the application. no code should run after this.
27442// set in exit() and abort()
27443var ABORT = false;
27444
27445// set by exit() and abort().  Passed to 'onExit' handler.
27446// NOTE: This is also used as the process return code code in shell environments
27447// but only when noExitRuntime is false.
27448var EXITSTATUS = 0;
27449
27450/** @type {function(*, string=)} */
27451function assert(condition, text) {
27452  if (!condition) {
27453    abort('Assertion failed: ' + text);
27454  }
27455}
27456
27457// Returns the C function with a specified identifier (for C++, you need to do manual name mangling)
27458function getCFunc(ident) {
27459  var func = Module['_' + ident]; // closure exported function
27460  assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported');
27461  return func;
27462}
27463
27464// C calling interface.
27465/** @param {string|null=} returnType
27466    @param {Array=} argTypes
27467    @param {Arguments|Array=} args
27468    @param {Object=} opts */
27469function ccall(ident, returnType, argTypes, args, opts) {
27470  // For fast lookup of conversion functions
27471  var toC = {
27472    'string': function(str) {
27473      var ret = 0;
27474      if (str !== null && str !== undefined && str !== 0) { // null string
27475        // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0'
27476        var len = (str.length << 2) + 1;
27477        ret = stackAlloc(len);
27478        stringToUTF8(str, ret, len);
27479      }
27480      return ret;
27481    },
27482    'array': function(arr) {
27483      var ret = stackAlloc(arr.length);
27484      writeArrayToMemory(arr, ret);
27485      return ret;
27486    }
27487  };
27488
27489  function convertReturnValue(ret) {
27490    if (returnType === 'string') return UTF8ToString(ret);
27491    if (returnType === 'boolean') return Boolean(ret);
27492    return ret;
27493  }
27494
27495  var func = getCFunc(ident);
27496  var cArgs = [];
27497  var stack = 0;
27498  if (args) {
27499    for (var i = 0; i < args.length; i++) {
27500      var converter = toC[argTypes[i]];
27501      if (converter) {
27502        if (stack === 0) stack = stackSave();
27503        cArgs[i] = converter(args[i]);
27504      } else {
27505        cArgs[i] = args[i];
27506      }
27507    }
27508  }
27509  var ret = func.apply(null, cArgs);
27510
27511  ret = convertReturnValue(ret);
27512  if (stack !== 0) stackRestore(stack);
27513  return ret;
27514}
27515
27516/** @param {string=} returnType
27517    @param {Array=} argTypes
27518    @param {Object=} opts */
27519function cwrap(ident, returnType, argTypes, opts) {
27520  argTypes = argTypes || [];
27521  // When the function takes numbers and returns a number, we can just return
27522  // the original function
27523  var numericArgs = argTypes.every(function(type){ return type === 'number'});
27524  var numericRet = returnType !== 'string';
27525  if (numericRet && numericArgs && !opts) {
27526    return getCFunc(ident);
27527  }
27528  return function() {
27529    return ccall(ident, returnType, argTypes, arguments, opts);
27530  }
27531}
27532
27533var ALLOC_NORMAL = 0; // Tries to use _malloc()
27534var ALLOC_STACK = 1; // Lives for the duration of the current function call
27535var ALLOC_DYNAMIC = 2; // Cannot be freed except through sbrk
27536var ALLOC_NONE = 3; // Do not allocate
27537
27538// allocate(): This is for internal use. You can use it yourself as well, but the interface
27539//             is a little tricky (see docs right below). The reason is that it is optimized
27540//             for multiple syntaxes to save space in generated code. So you should
27541//             normally not use allocate(), and instead allocate memory using _malloc(),
27542//             initialize it with setValue(), and so forth.
27543// @slab: An array of data, or a number. If a number, then the size of the block to allocate,
27544//        in *bytes* (note that this is sometimes confusing: the next parameter does not
27545//        affect this!)
27546// @types: Either an array of types, one for each byte (or 0 if no type at that position),
27547//         or a single type which is used for the entire block. This only matters if there
27548//         is initial data - if @slab is a number, then this does not matter at all and is
27549//         ignored.
27550// @allocator: How to allocate memory, see ALLOC_*
27551/** @type {function((TypedArray|Array<number>|number), string, number, number=)} */
27552function allocate(slab, types, allocator, ptr) {
27553  var zeroinit, size;
27554  if (typeof slab === 'number') {
27555    zeroinit = true;
27556    size = slab;
27557  } else {
27558    zeroinit = false;
27559    size = slab.length;
27560  }
27561
27562  var singleType = typeof types === 'string' ? types : null;
27563
27564  var ret;
27565  if (allocator == ALLOC_NONE) {
27566    ret = ptr;
27567  } else {
27568    ret = [_malloc,
27569    stackAlloc,
27570    dynamicAlloc][allocator](Math.max(size, singleType ? 1 : types.length));
27571  }
27572
27573  if (zeroinit) {
27574    var stop;
27575    ptr = ret;
27576    assert((ret & 3) == 0);
27577    stop = ret + (size & ~3);
27578    for (; ptr < stop; ptr += 4) {
27579      HEAP32[((ptr)>>2)]=0;
27580    }
27581    stop = ret + size;
27582    while (ptr < stop) {
27583      HEAP8[((ptr++)>>0)]=0;
27584    }
27585    return ret;
27586  }
27587
27588  if (singleType === 'i8') {
27589    if (slab.subarray || slab.slice) {
27590      HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret);
27591    } else {
27592      HEAPU8.set(new Uint8Array(slab), ret);
27593    }
27594    return ret;
27595  }
27596
27597  var i = 0, type, typeSize, previousType;
27598  while (i < size) {
27599    var curr = slab[i];
27600
27601    type = singleType || types[i];
27602    if (type === 0) {
27603      i++;
27604      continue;
27605    }
27606
27607    if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later
27608
27609    setValue(ret+i, curr, type);
27610
27611    // no need to look up size unless type changes, so cache it
27612    if (previousType !== type) {
27613      typeSize = getNativeTypeSize(type);
27614      previousType = type;
27615    }
27616    i += typeSize;
27617  }
27618
27619  return ret;
27620}
27621
27622// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready
27623function getMemory(size) {
27624  if (!runtimeInitialized) return dynamicAlloc(size);
27625  return _malloc(size);
27626}
27627
27628
27629
27630
27631// runtime_strings.js: Strings related runtime functions that are part of both MINIMAL_RUNTIME and regular runtime.
27632
27633// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns
27634// a copy of that string as a Javascript String object.
27635
27636var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined;
27637
27638/**
27639 * @param {number} idx
27640 * @param {number=} maxBytesToRead
27641 * @return {string}
27642 */
27643function UTF8ArrayToString(heap, idx, maxBytesToRead) {
27644  var endIdx = idx + maxBytesToRead;
27645  var endPtr = idx;
27646  // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself.
27647  // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage.
27648  // (As a tiny code save trick, compare endPtr against endIdx using a negation, so that undefined means Infinity)
27649  while (heap[endPtr] && !(endPtr >= endIdx)) ++endPtr;
27650
27651  if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) {
27652    return UTF8Decoder.decode(heap.subarray(idx, endPtr));
27653  } else {
27654    var str = '';
27655    // If building with TextDecoder, we have already computed the string length above, so test loop end condition against that
27656    while (idx < endPtr) {
27657      // For UTF8 byte structure, see:
27658      // http://en.wikipedia.org/wiki/UTF-8#Description
27659      // https://www.ietf.org/rfc/rfc2279.txt
27660      // https://tools.ietf.org/html/rfc3629
27661      var u0 = heap[idx++];
27662      if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }
27663      var u1 = heap[idx++] & 63;
27664      if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }
27665      var u2 = heap[idx++] & 63;
27666      if ((u0 & 0xF0) == 0xE0) {
27667        u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
27668      } else {
27669        u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heap[idx++] & 63);
27670      }
27671
27672      if (u0 < 0x10000) {
27673        str += String.fromCharCode(u0);
27674      } else {
27675        var ch = u0 - 0x10000;
27676        str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
27677      }
27678    }
27679  }
27680  return str;
27681}
27682
27683// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns a
27684// copy of that string as a Javascript String object.
27685// maxBytesToRead: an optional length that specifies the maximum number of bytes to read. You can omit
27686//                 this parameter to scan the string until the first \0 byte. If maxBytesToRead is
27687//                 passed, and the string at [ptr, ptr+maxBytesToReadr[ contains a null byte in the
27688//                 middle, then the string will cut short at that byte index (i.e. maxBytesToRead will
27689//                 not produce a string of exact length [ptr, ptr+maxBytesToRead[)
27690//                 N.B. mixing frequent uses of UTF8ToString() with and without maxBytesToRead may
27691//                 throw JS JIT optimizations off, so it is worth to consider consistently using one
27692//                 style or the other.
27693/**
27694 * @param {number} ptr
27695 * @param {number=} maxBytesToRead
27696 * @return {string}
27697 */
27698function UTF8ToString(ptr, maxBytesToRead) {
27699  return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
27700}
27701
27702// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx',
27703// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP.
27704// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write.
27705// Parameters:
27706//   str: the Javascript string to copy.
27707//   heap: the array to copy to. Each index in this array is assumed to be one 8-byte element.
27708//   outIdx: The starting offset in the array to begin the copying.
27709//   maxBytesToWrite: The maximum number of bytes this function can write to the array.
27710//                    This count should include the null terminator,
27711//                    i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else.
27712//                    maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator.
27713// Returns the number of bytes written, EXCLUDING the null terminator.
27714
27715function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
27716  if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes.
27717    return 0;
27718
27719  var startIdx = outIdx;
27720  var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.
27721  for (var i = 0; i < str.length; ++i) {
27722    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.
27723    // See http://unicode.org/faq/utf_bom.html#utf16-3
27724    // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629
27725    var u = str.charCodeAt(i); // possibly a lead surrogate
27726    if (u >= 0xD800 && u <= 0xDFFF) {
27727      var u1 = str.charCodeAt(++i);
27728      u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF);
27729    }
27730    if (u <= 0x7F) {
27731      if (outIdx >= endIdx) break;
27732      heap[outIdx++] = u;
27733    } else if (u <= 0x7FF) {
27734      if (outIdx + 1 >= endIdx) break;
27735      heap[outIdx++] = 0xC0 | (u >> 6);
27736      heap[outIdx++] = 0x80 | (u & 63);
27737    } else if (u <= 0xFFFF) {
27738      if (outIdx + 2 >= endIdx) break;
27739      heap[outIdx++] = 0xE0 | (u >> 12);
27740      heap[outIdx++] = 0x80 | ((u >> 6) & 63);
27741      heap[outIdx++] = 0x80 | (u & 63);
27742    } else {
27743      if (outIdx + 3 >= endIdx) break;
27744      heap[outIdx++] = 0xF0 | (u >> 18);
27745      heap[outIdx++] = 0x80 | ((u >> 12) & 63);
27746      heap[outIdx++] = 0x80 | ((u >> 6) & 63);
27747      heap[outIdx++] = 0x80 | (u & 63);
27748    }
27749  }
27750  // Null-terminate the pointer to the buffer.
27751  heap[outIdx] = 0;
27752  return outIdx - startIdx;
27753}
27754
27755// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
27756// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP.
27757// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write.
27758// Returns the number of bytes written, EXCLUDING the null terminator.
27759
27760function stringToUTF8(str, outPtr, maxBytesToWrite) {
27761  return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite);
27762}
27763
27764// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte.
27765function lengthBytesUTF8(str) {
27766  var len = 0;
27767  for (var i = 0; i < str.length; ++i) {
27768    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.
27769    // See http://unicode.org/faq/utf_bom.html#utf16-3
27770    var u = str.charCodeAt(i); // possibly a lead surrogate
27771    if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF);
27772    if (u <= 0x7F) ++len;
27773    else if (u <= 0x7FF) len += 2;
27774    else if (u <= 0xFFFF) len += 3;
27775    else len += 4;
27776  }
27777  return len;
27778}
27779
27780
27781
27782
27783
27784// runtime_strings_extra.js: Strings related runtime functions that are available only in regular runtime.
27785
27786// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns
27787// a copy of that string as a Javascript String object.
27788
27789function AsciiToString(ptr) {
27790  var str = '';
27791  while (1) {
27792    var ch = HEAPU8[((ptr++)>>0)];
27793    if (!ch) return str;
27794    str += String.fromCharCode(ch);
27795  }
27796}
27797
27798// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
27799// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP.
27800
27801function stringToAscii(str, outPtr) {
27802  return writeAsciiToMemory(str, outPtr, false);
27803}
27804
27805// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns
27806// a copy of that string as a Javascript String object.
27807
27808var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined;
27809
27810function UTF16ToString(ptr, maxBytesToRead) {
27811  var endPtr = ptr;
27812  // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself.
27813  // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage.
27814  var idx = endPtr >> 1;
27815  var maxIdx = idx + maxBytesToRead / 2;
27816  // If maxBytesToRead is not passed explicitly, it will be undefined, and this
27817  // will always evaluate to true. This saves on code size.
27818  while (!(idx >= maxIdx) && HEAPU16[idx]) ++idx;
27819  endPtr = idx << 1;
27820
27821  if (endPtr - ptr > 32 && UTF16Decoder) {
27822    return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr));
27823  } else {
27824    var i = 0;
27825
27826    var str = '';
27827    while (1) {
27828      var codeUnit = HEAP16[(((ptr)+(i*2))>>1)];
27829      if (codeUnit == 0 || i == maxBytesToRead / 2) return str;
27830      ++i;
27831      // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through.
27832      str += String.fromCharCode(codeUnit);
27833    }
27834  }
27835}
27836
27837// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
27838// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP.
27839// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write.
27840// Parameters:
27841//   str: the Javascript string to copy.
27842//   outPtr: Byte address in Emscripten HEAP where to write the string to.
27843//   maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null
27844//                    terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else.
27845//                    maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator.
27846// Returns the number of bytes written, EXCLUDING the null terminator.
27847
27848function stringToUTF16(str, outPtr, maxBytesToWrite) {
27849  // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.
27850  if (maxBytesToWrite === undefined) {
27851    maxBytesToWrite = 0x7FFFFFFF;
27852  }
27853  if (maxBytesToWrite < 2) return 0;
27854  maxBytesToWrite -= 2; // Null terminator.
27855  var startPtr = outPtr;
27856  var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length;
27857  for (var i = 0; i < numCharsToWrite; ++i) {
27858    // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP.
27859    var codeUnit = str.charCodeAt(i); // possibly a lead surrogate
27860    HEAP16[((outPtr)>>1)]=codeUnit;
27861    outPtr += 2;
27862  }
27863  // Null-terminate the pointer to the HEAP.
27864  HEAP16[((outPtr)>>1)]=0;
27865  return outPtr - startPtr;
27866}
27867
27868// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte.
27869
27870function lengthBytesUTF16(str) {
27871  return str.length*2;
27872}
27873
27874function UTF32ToString(ptr, maxBytesToRead) {
27875  var i = 0;
27876
27877  var str = '';
27878  // If maxBytesToRead is not passed explicitly, it will be undefined, and this
27879  // will always evaluate to true. This saves on code size.
27880  while (!(i >= maxBytesToRead / 4)) {
27881    var utf32 = HEAP32[(((ptr)+(i*4))>>2)];
27882    if (utf32 == 0) break;
27883    ++i;
27884    // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing.
27885    // See http://unicode.org/faq/utf_bom.html#utf16-3
27886    if (utf32 >= 0x10000) {
27887      var ch = utf32 - 0x10000;
27888      str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
27889    } else {
27890      str += String.fromCharCode(utf32);
27891    }
27892  }
27893  return str;
27894}
27895
27896// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
27897// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP.
27898// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write.
27899// Parameters:
27900//   str: the Javascript string to copy.
27901//   outPtr: Byte address in Emscripten HEAP where to write the string to.
27902//   maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null
27903//                    terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else.
27904//                    maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator.
27905// Returns the number of bytes written, EXCLUDING the null terminator.
27906
27907function stringToUTF32(str, outPtr, maxBytesToWrite) {
27908  // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.
27909  if (maxBytesToWrite === undefined) {
27910    maxBytesToWrite = 0x7FFFFFFF;
27911  }
27912  if (maxBytesToWrite < 4) return 0;
27913  var startPtr = outPtr;
27914  var endPtr = startPtr + maxBytesToWrite - 4;
27915  for (var i = 0; i < str.length; ++i) {
27916    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.
27917    // See http://unicode.org/faq/utf_bom.html#utf16-3
27918    var codeUnit = str.charCodeAt(i); // possibly a lead surrogate
27919    if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) {
27920      var trailSurrogate = str.charCodeAt(++i);
27921      codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF);
27922    }
27923    HEAP32[((outPtr)>>2)]=codeUnit;
27924    outPtr += 4;
27925    if (outPtr + 4 > endPtr) break;
27926  }
27927  // Null-terminate the pointer to the HEAP.
27928  HEAP32[((outPtr)>>2)]=0;
27929  return outPtr - startPtr;
27930}
27931
27932// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte.
27933
27934function lengthBytesUTF32(str) {
27935  var len = 0;
27936  for (var i = 0; i < str.length; ++i) {
27937    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.
27938    // See http://unicode.org/faq/utf_bom.html#utf16-3
27939    var codeUnit = str.charCodeAt(i);
27940    if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate.
27941    len += 4;
27942  }
27943
27944  return len;
27945}
27946
27947// Allocate heap space for a JS string, and write it there.
27948// It is the responsibility of the caller to free() that memory.
27949function allocateUTF8(str) {
27950  var size = lengthBytesUTF8(str) + 1;
27951  var ret = _malloc(size);
27952  if (ret) stringToUTF8Array(str, HEAP8, ret, size);
27953  return ret;
27954}
27955
27956// Allocate stack space for a JS string, and write it there.
27957function allocateUTF8OnStack(str) {
27958  var size = lengthBytesUTF8(str) + 1;
27959  var ret = stackAlloc(size);
27960  stringToUTF8Array(str, HEAP8, ret, size);
27961  return ret;
27962}
27963
27964// Deprecated: This function should not be called because it is unsafe and does not provide
27965// a maximum length limit of how many bytes it is allowed to write. Prefer calling the
27966// function stringToUTF8Array() instead, which takes in a maximum length that can be used
27967// to be secure from out of bounds writes.
27968/** @deprecated
27969    @param {boolean=} dontAddNull */
27970function writeStringToMemory(string, buffer, dontAddNull) {
27971  warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!');
27972
27973  var /** @type {number} */ lastChar, /** @type {number} */ end;
27974  if (dontAddNull) {
27975    // stringToUTF8Array always appends null. If we don't want to do that, remember the
27976    // character that existed at the location where the null will be placed, and restore
27977    // that after the write (below).
27978    end = buffer + lengthBytesUTF8(string);
27979    lastChar = HEAP8[end];
27980  }
27981  stringToUTF8(string, buffer, Infinity);
27982  if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character.
27983}
27984
27985function writeArrayToMemory(array, buffer) {
27986  HEAP8.set(array, buffer);
27987}
27988
27989/** @param {boolean=} dontAddNull */
27990function writeAsciiToMemory(str, buffer, dontAddNull) {
27991  for (var i = 0; i < str.length; ++i) {
27992    HEAP8[((buffer++)>>0)]=str.charCodeAt(i);
27993  }
27994  // Null-terminate the pointer to the HEAP.
27995  if (!dontAddNull) HEAP8[((buffer)>>0)]=0;
27996}
27997
27998
27999
28000// Memory management
28001
28002var PAGE_SIZE = 16384;
28003var WASM_PAGE_SIZE = 65536;
28004var ASMJS_PAGE_SIZE = 16777216;
28005
28006function alignUp(x, multiple) {
28007  if (x % multiple > 0) {
28008    x += multiple - (x % multiple);
28009  }
28010  return x;
28011}
28012
28013var HEAP,
28014/** @type {ArrayBuffer} */
28015  buffer,
28016/** @type {Int8Array} */
28017  HEAP8,
28018/** @type {Uint8Array} */
28019  HEAPU8,
28020/** @type {Int16Array} */
28021  HEAP16,
28022/** @type {Uint16Array} */
28023  HEAPU16,
28024/** @type {Int32Array} */
28025  HEAP32,
28026/** @type {Uint32Array} */
28027  HEAPU32,
28028/** @type {Float32Array} */
28029  HEAPF32,
28030/** @type {Float64Array} */
28031  HEAPF64;
28032
28033function updateGlobalBufferAndViews(buf) {
28034  buffer = buf;
28035  Module['HEAP8'] = HEAP8 = new Int8Array(buf);
28036  Module['HEAP16'] = HEAP16 = new Int16Array(buf);
28037  Module['HEAP32'] = HEAP32 = new Int32Array(buf);
28038  Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf);
28039  Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf);
28040  Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf);
28041  Module['HEAPF32'] = HEAPF32 = new Float32Array(buf);
28042  Module['HEAPF64'] = HEAPF64 = new Float64Array(buf);
28043}
28044
28045var STATIC_BASE = 1024,
28046    STACK_BASE = 5257216,
28047    STACKTOP = STACK_BASE,
28048    STACK_MAX = 14336,
28049    DYNAMIC_BASE = 5257216,
28050    DYNAMICTOP_PTR = 14176;
28051
28052
28053
28054var TOTAL_STACK = 5242880;
28055
28056var INITIAL_INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216;
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066// In non-standalone/normal mode, we create the memory here.
28067
28068
28069
28070// Create the main memory. (Note: this isn't used in STANDALONE_WASM mode since the wasm
28071// memory is created in the wasm, not in JS.)
28072
28073  if (Module['wasmMemory']) {
28074    wasmMemory = Module['wasmMemory'];
28075  } else
28076  {
28077    wasmMemory = new WebAssembly.Memory({
28078      'initial': INITIAL_INITIAL_MEMORY / WASM_PAGE_SIZE
28079      ,
28080      'maximum': 2147483648 / WASM_PAGE_SIZE
28081    });
28082  }
28083
28084
28085if (wasmMemory) {
28086  buffer = wasmMemory.buffer;
28087}
28088
28089// If the user provides an incorrect length, just use that length instead rather than providing the user to
28090// specifically provide the memory length with Module['INITIAL_MEMORY'].
28091INITIAL_INITIAL_MEMORY = buffer.byteLength;
28092updateGlobalBufferAndViews(buffer);
28093
28094HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE;
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109function callRuntimeCallbacks(callbacks) {
28110  while(callbacks.length > 0) {
28111    var callback = callbacks.shift();
28112    if (typeof callback == 'function') {
28113      callback(Module); // Pass the module as the first argument.
28114      continue;
28115    }
28116    var func = callback.func;
28117    if (typeof func === 'number') {
28118      if (callback.arg === undefined) {
28119        Module['dynCall_v'](func);
28120      } else {
28121        Module['dynCall_vi'](func, callback.arg);
28122      }
28123    } else {
28124      func(callback.arg === undefined ? null : callback.arg);
28125    }
28126  }
28127}
28128
28129var __ATPRERUN__  = []; // functions called before the runtime is initialized
28130var __ATINIT__    = []; // functions called during startup
28131var __ATMAIN__    = []; // functions called when main() is to be run
28132var __ATEXIT__    = []; // functions called during shutdown
28133var __ATPOSTRUN__ = []; // functions called after the main() is called
28134
28135var runtimeInitialized = false;
28136var runtimeExited = false;
28137
28138
28139function preRun() {
28140
28141  if (Module['preRun']) {
28142    if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];
28143    while (Module['preRun'].length) {
28144      addOnPreRun(Module['preRun'].shift());
28145    }
28146  }
28147
28148  callRuntimeCallbacks(__ATPRERUN__);
28149}
28150
28151function initRuntime() {
28152  runtimeInitialized = true;
28153  if (!Module["noFSInit"] && !FS.init.initialized) FS.init();
28154TTY.init();
28155  callRuntimeCallbacks(__ATINIT__);
28156}
28157
28158function preMain() {
28159  FS.ignorePermissions = false;
28160  callRuntimeCallbacks(__ATMAIN__);
28161}
28162
28163function exitRuntime() {
28164  runtimeExited = true;
28165}
28166
28167function postRun() {
28168
28169  if (Module['postRun']) {
28170    if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];
28171    while (Module['postRun'].length) {
28172      addOnPostRun(Module['postRun'].shift());
28173    }
28174  }
28175
28176  callRuntimeCallbacks(__ATPOSTRUN__);
28177}
28178
28179function addOnPreRun(cb) {
28180  __ATPRERUN__.unshift(cb);
28181}
28182
28183function addOnInit(cb) {
28184  __ATINIT__.unshift(cb);
28185}
28186
28187function addOnPreMain(cb) {
28188  __ATMAIN__.unshift(cb);
28189}
28190
28191function addOnExit(cb) {
28192}
28193
28194function addOnPostRun(cb) {
28195  __ATPOSTRUN__.unshift(cb);
28196}
28197
28198/** @param {number|boolean=} ignore */
28199function unSign(value, bits, ignore) {
28200  if (value >= 0) {
28201    return value;
28202  }
28203  return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts
28204                    : Math.pow(2, bits)         + value;
28205}
28206/** @param {number|boolean=} ignore */
28207function reSign(value, bits, ignore) {
28208  if (value <= 0) {
28209    return value;
28210  }
28211  var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32
28212                        : Math.pow(2, bits-1);
28213  if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that
28214                                                       // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors
28215                                                       // TODO: In i64 mode 1, resign the two parts separately and safely
28216    value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts
28217  }
28218  return value;
28219}
28220
28221
28222
28223
28224// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul
28225
28226// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround
28227
28228// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
28229
28230// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc
28231
28232
28233var Math_abs = Math.abs;
28234var Math_cos = Math.cos;
28235var Math_sin = Math.sin;
28236var Math_tan = Math.tan;
28237var Math_acos = Math.acos;
28238var Math_asin = Math.asin;
28239var Math_atan = Math.atan;
28240var Math_atan2 = Math.atan2;
28241var Math_exp = Math.exp;
28242var Math_log = Math.log;
28243var Math_sqrt = Math.sqrt;
28244var Math_ceil = Math.ceil;
28245var Math_floor = Math.floor;
28246var Math_pow = Math.pow;
28247var Math_imul = Math.imul;
28248var Math_fround = Math.fround;
28249var Math_round = Math.round;
28250var Math_min = Math.min;
28251var Math_max = Math.max;
28252var Math_clz32 = Math.clz32;
28253var Math_trunc = Math.trunc;
28254
28255
28256
28257// A counter of dependencies for calling run(). If we need to
28258// do asynchronous work before running, increment this and
28259// decrement it. Incrementing must happen in a place like
28260// Module.preRun (used by emcc to add file preloading).
28261// Note that you can add dependencies in preRun, even though
28262// it happens right before run - run will be postponed until
28263// the dependencies are met.
28264var runDependencies = 0;
28265var runDependencyWatcher = null;
28266var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled
28267
28268function getUniqueRunDependency(id) {
28269  return id;
28270}
28271
28272function addRunDependency(id) {
28273  runDependencies++;
28274
28275  if (Module['monitorRunDependencies']) {
28276    Module['monitorRunDependencies'](runDependencies);
28277  }
28278
28279}
28280
28281function removeRunDependency(id) {
28282  runDependencies--;
28283
28284  if (Module['monitorRunDependencies']) {
28285    Module['monitorRunDependencies'](runDependencies);
28286  }
28287
28288  if (runDependencies == 0) {
28289    if (runDependencyWatcher !== null) {
28290      clearInterval(runDependencyWatcher);
28291      runDependencyWatcher = null;
28292    }
28293    if (dependenciesFulfilled) {
28294      var callback = dependenciesFulfilled;
28295      dependenciesFulfilled = null;
28296      callback(); // can add another dependenciesFulfilled
28297    }
28298  }
28299}
28300
28301Module["preloadedImages"] = {}; // maps url to image data
28302Module["preloadedAudios"] = {}; // maps url to audio data
28303
28304/** @param {string|number=} what */
28305function abort(what) {
28306  if (Module['onAbort']) {
28307    Module['onAbort'](what);
28308  }
28309
28310  what += '';
28311  out(what);
28312  err(what);
28313
28314  ABORT = true;
28315  EXITSTATUS = 1;
28316
28317  what = 'abort(' + what + '). Build with -s ASSERTIONS=1 for more info.';
28318
28319  // Throw a wasm runtime error, because a JS error might be seen as a foreign
28320  // exception, which means we'd run destructors on it. We need the error to
28321  // simply make the program stop.
28322  throw new WebAssembly.RuntimeError(what);
28323}
28324
28325
28326var memoryInitializer = null;
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339function hasPrefix(str, prefix) {
28340  return String.prototype.startsWith ?
28341      str.startsWith(prefix) :
28342      str.indexOf(prefix) === 0;
28343}
28344
28345// Prefix of data URIs emitted by SINGLE_FILE and related options.
28346var dataURIPrefix = 'data:application/octet-stream;base64,';
28347
28348// Indicates whether filename is a base64 data URI.
28349function isDataURI(filename) {
28350  return hasPrefix(filename, dataURIPrefix);
28351}
28352
28353var fileURIPrefix = "file://";
28354
28355// Indicates whether filename is delivered via file protocol (as opposed to http/https)
28356function isFileURI(filename) {
28357  return hasPrefix(filename, fileURIPrefix);
28358}
28359
28360
28361
28362
28363var wasmBinaryFile = 'libflac.wasm';
28364if (!isDataURI(wasmBinaryFile)) {
28365  wasmBinaryFile = locateFile(wasmBinaryFile);
28366}
28367
28368function getBinary() {
28369  try {
28370    if (wasmBinary) {
28371      return new Uint8Array(wasmBinary);
28372    }
28373
28374    var binary = tryParseAsDataURI(wasmBinaryFile);
28375    if (binary) {
28376      return binary;
28377    }
28378    if (readBinary) {
28379      return readBinary(wasmBinaryFile);
28380    } else {
28381      throw "both async and sync fetching of the wasm failed";
28382    }
28383  }
28384  catch (err) {
28385    abort(err);
28386  }
28387}
28388
28389function getBinaryPromise() {
28390  // If we don't have the binary yet, and have the Fetch api, use that;
28391  // in some environments, like Electron's render process, Fetch api may be present, but have a different context than expected, let's only use it on the Web
28392  if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === 'function'
28393      // Let's not use fetch to get objects over file:// as it's most likely Cordova which doesn't support fetch for file://
28394      && !isFileURI(wasmBinaryFile)
28395      ) {
28396    return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) {
28397      if (!response['ok']) {
28398        throw "failed to load wasm binary file at '" + wasmBinaryFile + "'";
28399      }
28400      return response['arrayBuffer']();
28401    }).catch(function () {
28402      return getBinary();
28403    });
28404  }
28405  // Otherwise, getBinary should be able to get it synchronously
28406  return new Promise(function(resolve, reject) {
28407    resolve(getBinary());
28408  });
28409}
28410
28411
28412
28413// Create the wasm instance.
28414// Receives the wasm imports, returns the exports.
28415function createWasm() {
28416  // prepare imports
28417  var info = {
28418    'env': asmLibraryArg,
28419    'wasi_snapshot_preview1': asmLibraryArg
28420  };
28421  // Load the wasm module and create an instance of using native support in the JS engine.
28422  // handle a generated wasm instance, receiving its exports and
28423  // performing other necessary setup
28424  /** @param {WebAssembly.Module=} module*/
28425  function receiveInstance(instance, module) {
28426    var exports = instance.exports;
28427    Module['asm'] = exports;
28428    removeRunDependency('wasm-instantiate');
28429  }
28430  // we can't run yet (except in a pthread, where we have a custom sync instantiator)
28431  addRunDependency('wasm-instantiate');
28432
28433
28434  function receiveInstantiatedSource(output) {
28435    // 'output' is a WebAssemblyInstantiatedSource object which has both the module and instance.
28436    // receiveInstance() will swap in the exports (to Module.asm) so they can be called
28437    // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line.
28438    // When the regression is fixed, can restore the above USE_PTHREADS-enabled path.
28439    receiveInstance(output['instance']);
28440  }
28441
28442
28443  function instantiateArrayBuffer(receiver) {
28444    return getBinaryPromise().then(function(binary) {
28445      return WebAssembly.instantiate(binary, info);
28446    }).then(receiver, function(reason) {
28447      err('failed to asynchronously prepare wasm: ' + reason);
28448
28449
28450      abort(reason);
28451    });
28452  }
28453
28454  // Prefer streaming instantiation if available.
28455  function instantiateAsync() {
28456    if (!wasmBinary &&
28457        typeof WebAssembly.instantiateStreaming === 'function' &&
28458        !isDataURI(wasmBinaryFile) &&
28459        // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously.
28460        !isFileURI(wasmBinaryFile) &&
28461        typeof fetch === 'function') {
28462      fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function (response) {
28463        var result = WebAssembly.instantiateStreaming(response, info);
28464        return result.then(receiveInstantiatedSource, function(reason) {
28465            // We expect the most common failure cause to be a bad MIME type for the binary,
28466            // in which case falling back to ArrayBuffer instantiation should work.
28467            err('wasm streaming compile failed: ' + reason);
28468            err('falling back to ArrayBuffer instantiation');
28469            return instantiateArrayBuffer(receiveInstantiatedSource);
28470          });
28471      });
28472    } else {
28473      return instantiateArrayBuffer(receiveInstantiatedSource);
28474    }
28475  }
28476  // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback
28477  // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel
28478  // to any other async startup actions they are performing.
28479  if (Module['instantiateWasm']) {
28480    try {
28481      var exports = Module['instantiateWasm'](info, receiveInstance);
28482      return exports;
28483    } catch(e) {
28484      err('Module.instantiateWasm callback failed with error: ' + e);
28485      return false;
28486    }
28487  }
28488
28489  instantiateAsync();
28490  return {}; // no exports yet; we'll fill them in later
28491}
28492
28493
28494// Globals used by JS i64 conversions
28495var tempDouble;
28496var tempI64;
28497
28498// === Body ===
28499
28500var ASM_CONSTS = {
28501
28502};
28503
28504
28505
28506
28507// STATICTOP = STATIC_BASE + 13312;
28508/* global initializers */  __ATINIT__.push({ func: function() { ___wasm_call_ctors() } });
28509
28510
28511
28512
28513/* no memory initializer */
28514// {{PRE_LIBRARY}}
28515
28516
28517  function demangle(func) {
28518      return func;
28519    }
28520
28521  function demangleAll(text) {
28522      var regex =
28523        /\b_Z[\w\d_]+/g;
28524      return text.replace(regex,
28525        function(x) {
28526          var y = demangle(x);
28527          return x === y ? x : (y + ' [' + x + ']');
28528        });
28529    }
28530
28531  function jsStackTrace() {
28532      var err = new Error();
28533      if (!err.stack) {
28534        // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown,
28535        // so try that as a special-case.
28536        try {
28537          throw new Error();
28538        } catch(e) {
28539          err = e;
28540        }
28541        if (!err.stack) {
28542          return '(no stack trace available)';
28543        }
28544      }
28545      return err.stack.toString();
28546    }
28547
28548  function stackTrace() {
28549      var js = jsStackTrace();
28550      if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace']();
28551      return demangleAll(js);
28552    }
28553
28554  function _emscripten_get_sbrk_ptr() {
28555      return 14176;
28556    }
28557
28558  function _emscripten_memcpy_big(dest, src, num) {
28559      HEAPU8.copyWithin(dest, src, src + num);
28560    }
28561
28562
28563  function _emscripten_get_heap_size() {
28564      return HEAPU8.length;
28565    }
28566
28567  function emscripten_realloc_buffer(size) {
28568      try {
28569        // round size grow request up to wasm page size (fixed 64KB per spec)
28570        wasmMemory.grow((size - buffer.byteLength + 65535) >>> 16); // .grow() takes a delta compared to the previous size
28571        updateGlobalBufferAndViews(wasmMemory.buffer);
28572        return 1 /*success*/;
28573      } catch(e) {
28574      }
28575    }function _emscripten_resize_heap(requestedSize) {
28576      requestedSize = requestedSize >>> 0;
28577      var oldSize = _emscripten_get_heap_size();
28578      // With pthreads, races can happen (another thread might increase the size in between), so return a failure, and let the caller retry.
28579
28580
28581      var PAGE_MULTIPLE = 65536;
28582
28583      // Memory resize rules:
28584      // 1. When resizing, always produce a resized heap that is at least 16MB (to avoid tiny heap sizes receiving lots of repeated resizes at startup)
28585      // 2. Always increase heap size to at least the requested size, rounded up to next page multiple.
28586      // 3a. If MEMORY_GROWTH_LINEAR_STEP == -1, excessively resize the heap geometrically: increase the heap size according to
28587      //                                         MEMORY_GROWTH_GEOMETRIC_STEP factor (default +20%),
28588      //                                         At most overreserve by MEMORY_GROWTH_GEOMETRIC_CAP bytes (default 96MB).
28589      // 3b. If MEMORY_GROWTH_LINEAR_STEP != -1, excessively resize the heap linearly: increase the heap size by at least MEMORY_GROWTH_LINEAR_STEP bytes.
28590      // 4. Max size for the heap is capped at 2048MB-PAGE_MULTIPLE, or by MAXIMUM_MEMORY, or by ASAN limit, depending on which is smallest
28591      // 5. If we were unable to allocate as much memory, it may be due to over-eager decision to excessively reserve due to (3) above.
28592      //    Hence if an allocation fails, cut down on the amount of excess growth, in an attempt to succeed to perform a smaller allocation.
28593
28594      // A limit was set for how much we can grow. We should not exceed that
28595      // (the wasm binary specifies it, so if we tried, we'd fail anyhow).
28596      var maxHeapSize = 2147483648;
28597      if (requestedSize > maxHeapSize) {
28598        return false;
28599      }
28600
28601      var minHeapSize = 16777216;
28602
28603      // Loop through potential heap size increases. If we attempt a too eager reservation that fails, cut down on the
28604      // attempted size and reserve a smaller bump instead. (max 3 times, chosen somewhat arbitrarily)
28605      for(var cutDown = 1; cutDown <= 4; cutDown *= 2) {
28606        var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); // ensure geometric growth
28607        // but limit overreserving (default to capping at +96MB overgrowth at most)
28608        overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296 );
28609
28610
28611        var newSize = Math.min(maxHeapSize, alignUp(Math.max(minHeapSize, requestedSize, overGrownHeapSize), PAGE_MULTIPLE));
28612
28613        var replacement = emscripten_realloc_buffer(newSize);
28614        if (replacement) {
28615
28616          return true;
28617        }
28618      }
28619      return false;
28620    }
28621
28622
28623
28624  var PATH={splitPath:function(filename) {
28625        var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
28626        return splitPathRe.exec(filename).slice(1);
28627      },normalizeArray:function(parts, allowAboveRoot) {
28628        // if the path tries to go above the root, `up` ends up > 0
28629        var up = 0;
28630        for (var i = parts.length - 1; i >= 0; i--) {
28631          var last = parts[i];
28632          if (last === '.') {
28633            parts.splice(i, 1);
28634          } else if (last === '..') {
28635            parts.splice(i, 1);
28636            up++;
28637          } else if (up) {
28638            parts.splice(i, 1);
28639            up--;
28640          }
28641        }
28642        // if the path is allowed to go above the root, restore leading ..s
28643        if (allowAboveRoot) {
28644          for (; up; up--) {
28645            parts.unshift('..');
28646          }
28647        }
28648        return parts;
28649      },normalize:function(path) {
28650        var isAbsolute = path.charAt(0) === '/',
28651            trailingSlash = path.substr(-1) === '/';
28652        // Normalize the path
28653        path = PATH.normalizeArray(path.split('/').filter(function(p) {
28654          return !!p;
28655        }), !isAbsolute).join('/');
28656        if (!path && !isAbsolute) {
28657          path = '.';
28658        }
28659        if (path && trailingSlash) {
28660          path += '/';
28661        }
28662        return (isAbsolute ? '/' : '') + path;
28663      },dirname:function(path) {
28664        var result = PATH.splitPath(path),
28665            root = result[0],
28666            dir = result[1];
28667        if (!root && !dir) {
28668          // No dirname whatsoever
28669          return '.';
28670        }
28671        if (dir) {
28672          // It has a dirname, strip trailing slash
28673          dir = dir.substr(0, dir.length - 1);
28674        }
28675        return root + dir;
28676      },basename:function(path) {
28677        // EMSCRIPTEN return '/'' for '/', not an empty string
28678        if (path === '/') return '/';
28679        var lastSlash = path.lastIndexOf('/');
28680        if (lastSlash === -1) return path;
28681        return path.substr(lastSlash+1);
28682      },extname:function(path) {
28683        return PATH.splitPath(path)[3];
28684      },join:function() {
28685        var paths = Array.prototype.slice.call(arguments, 0);
28686        return PATH.normalize(paths.join('/'));
28687      },join2:function(l, r) {
28688        return PATH.normalize(l + '/' + r);
28689      }};
28690
28691
28692  function setErrNo(value) {
28693      HEAP32[((___errno_location())>>2)]=value;
28694      return value;
28695    }
28696
28697  var PATH_FS={resolve:function() {
28698        var resolvedPath = '',
28699          resolvedAbsolute = false;
28700        for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
28701          var path = (i >= 0) ? arguments[i] : FS.cwd();
28702          // Skip empty and invalid entries
28703          if (typeof path !== 'string') {
28704            throw new TypeError('Arguments to path.resolve must be strings');
28705          } else if (!path) {
28706            return ''; // an invalid portion invalidates the whole thing
28707          }
28708          resolvedPath = path + '/' + resolvedPath;
28709          resolvedAbsolute = path.charAt(0) === '/';
28710        }
28711        // At this point the path should be resolved to a full absolute path, but
28712        // handle relative paths to be safe (might happen when process.cwd() fails)
28713        resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) {
28714          return !!p;
28715        }), !resolvedAbsolute).join('/');
28716        return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
28717      },relative:function(from, to) {
28718        from = PATH_FS.resolve(from).substr(1);
28719        to = PATH_FS.resolve(to).substr(1);
28720        function trim(arr) {
28721          var start = 0;
28722          for (; start < arr.length; start++) {
28723            if (arr[start] !== '') break;
28724          }
28725          var end = arr.length - 1;
28726          for (; end >= 0; end--) {
28727            if (arr[end] !== '') break;
28728          }
28729          if (start > end) return [];
28730          return arr.slice(start, end - start + 1);
28731        }
28732        var fromParts = trim(from.split('/'));
28733        var toParts = trim(to.split('/'));
28734        var length = Math.min(fromParts.length, toParts.length);
28735        var samePartsLength = length;
28736        for (var i = 0; i < length; i++) {
28737          if (fromParts[i] !== toParts[i]) {
28738            samePartsLength = i;
28739            break;
28740          }
28741        }
28742        var outputParts = [];
28743        for (var i = samePartsLength; i < fromParts.length; i++) {
28744          outputParts.push('..');
28745        }
28746        outputParts = outputParts.concat(toParts.slice(samePartsLength));
28747        return outputParts.join('/');
28748      }};
28749
28750  var TTY={ttys:[],init:function () {
28751        // https://github.com/emscripten-core/emscripten/pull/1555
28752        // if (ENVIRONMENT_IS_NODE) {
28753        //   // currently, FS.init does not distinguish if process.stdin is a file or TTY
28754        //   // device, it always assumes it's a TTY device. because of this, we're forcing
28755        //   // process.stdin to UTF8 encoding to at least make stdin reading compatible
28756        //   // with text files until FS.init can be refactored.
28757        //   process['stdin']['setEncoding']('utf8');
28758        // }
28759      },shutdown:function() {
28760        // https://github.com/emscripten-core/emscripten/pull/1555
28761        // if (ENVIRONMENT_IS_NODE) {
28762        //   // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)?
28763        //   // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation
28764        //   // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists?
28765        //   // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle
28766        //   // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call
28767        //   process['stdin']['pause']();
28768        // }
28769      },register:function(dev, ops) {
28770        TTY.ttys[dev] = { input: [], output: [], ops: ops };
28771        FS.registerDevice(dev, TTY.stream_ops);
28772      },stream_ops:{open:function(stream) {
28773          var tty = TTY.ttys[stream.node.rdev];
28774          if (!tty) {
28775            throw new FS.ErrnoError(43);
28776          }
28777          stream.tty = tty;
28778          stream.seekable = false;
28779        },close:function(stream) {
28780          // flush any pending line data
28781          stream.tty.ops.flush(stream.tty);
28782        },flush:function(stream) {
28783          stream.tty.ops.flush(stream.tty);
28784        },read:function(stream, buffer, offset, length, pos /* ignored */) {
28785          if (!stream.tty || !stream.tty.ops.get_char) {
28786            throw new FS.ErrnoError(60);
28787          }
28788          var bytesRead = 0;
28789          for (var i = 0; i < length; i++) {
28790            var result;
28791            try {
28792              result = stream.tty.ops.get_char(stream.tty);
28793            } catch (e) {
28794              throw new FS.ErrnoError(29);
28795            }
28796            if (result === undefined && bytesRead === 0) {
28797              throw new FS.ErrnoError(6);
28798            }
28799            if (result === null || result === undefined) break;
28800            bytesRead++;
28801            buffer[offset+i] = result;
28802          }
28803          if (bytesRead) {
28804            stream.node.timestamp = Date.now();
28805          }
28806          return bytesRead;
28807        },write:function(stream, buffer, offset, length, pos) {
28808          if (!stream.tty || !stream.tty.ops.put_char) {
28809            throw new FS.ErrnoError(60);
28810          }
28811          try {
28812            for (var i = 0; i < length; i++) {
28813              stream.tty.ops.put_char(stream.tty, buffer[offset+i]);
28814            }
28815          } catch (e) {
28816            throw new FS.ErrnoError(29);
28817          }
28818          if (length) {
28819            stream.node.timestamp = Date.now();
28820          }
28821          return i;
28822        }},default_tty_ops:{get_char:function(tty) {
28823          if (!tty.input.length) {
28824            var result = null;
28825            if (ENVIRONMENT_IS_NODE) {
28826              // we will read data by chunks of BUFSIZE
28827              var BUFSIZE = 256;
28828              var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE);
28829              var bytesRead = 0;
28830
28831              try {
28832                bytesRead = nodeFS.readSync(process.stdin.fd, buf, 0, BUFSIZE, null);
28833              } catch(e) {
28834                // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes,
28835                // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0.
28836                if (e.toString().indexOf('EOF') != -1) bytesRead = 0;
28837                else throw e;
28838              }
28839
28840              if (bytesRead > 0) {
28841                result = buf.slice(0, bytesRead).toString('utf-8');
28842              } else {
28843                result = null;
28844              }
28845            } else
28846            if (typeof window != 'undefined' &&
28847              typeof window.prompt == 'function') {
28848              // Browser.
28849              result = window.prompt('Input: ');  // returns null on cancel
28850              if (result !== null) {
28851                result += '\n';
28852              }
28853            } else if (typeof readline == 'function') {
28854              // Command line.
28855              result = readline();
28856              if (result !== null) {
28857                result += '\n';
28858              }
28859            }
28860            if (!result) {
28861              return null;
28862            }
28863            tty.input = intArrayFromString(result, true);
28864          }
28865          return tty.input.shift();
28866        },put_char:function(tty, val) {
28867          if (val === null || val === 10) {
28868            out(UTF8ArrayToString(tty.output, 0));
28869            tty.output = [];
28870          } else {
28871            if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle.
28872          }
28873        },flush:function(tty) {
28874          if (tty.output && tty.output.length > 0) {
28875            out(UTF8ArrayToString(tty.output, 0));
28876            tty.output = [];
28877          }
28878        }},default_tty1_ops:{put_char:function(tty, val) {
28879          if (val === null || val === 10) {
28880            err(UTF8ArrayToString(tty.output, 0));
28881            tty.output = [];
28882          } else {
28883            if (val != 0) tty.output.push(val);
28884          }
28885        },flush:function(tty) {
28886          if (tty.output && tty.output.length > 0) {
28887            err(UTF8ArrayToString(tty.output, 0));
28888            tty.output = [];
28889          }
28890        }}};
28891
28892  var MEMFS={ops_table:null,mount:function(mount) {
28893        return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0);
28894      },createNode:function(parent, name, mode, dev) {
28895        if (FS.isBlkdev(mode) || FS.isFIFO(mode)) {
28896          // no supported
28897          throw new FS.ErrnoError(63);
28898        }
28899        if (!MEMFS.ops_table) {
28900          MEMFS.ops_table = {
28901            dir: {
28902              node: {
28903                getattr: MEMFS.node_ops.getattr,
28904                setattr: MEMFS.node_ops.setattr,
28905                lookup: MEMFS.node_ops.lookup,
28906                mknod: MEMFS.node_ops.mknod,
28907                rename: MEMFS.node_ops.rename,
28908                unlink: MEMFS.node_ops.unlink,
28909                rmdir: MEMFS.node_ops.rmdir,
28910                readdir: MEMFS.node_ops.readdir,
28911                symlink: MEMFS.node_ops.symlink
28912              },
28913              stream: {
28914                llseek: MEMFS.stream_ops.llseek
28915              }
28916            },
28917            file: {
28918              node: {
28919                getattr: MEMFS.node_ops.getattr,
28920                setattr: MEMFS.node_ops.setattr
28921              },
28922              stream: {
28923                llseek: MEMFS.stream_ops.llseek,
28924                read: MEMFS.stream_ops.read,
28925                write: MEMFS.stream_ops.write,
28926                allocate: MEMFS.stream_ops.allocate,
28927                mmap: MEMFS.stream_ops.mmap,
28928                msync: MEMFS.stream_ops.msync
28929              }
28930            },
28931            link: {
28932              node: {
28933                getattr: MEMFS.node_ops.getattr,
28934                setattr: MEMFS.node_ops.setattr,
28935                readlink: MEMFS.node_ops.readlink
28936              },
28937              stream: {}
28938            },
28939            chrdev: {
28940              node: {
28941                getattr: MEMFS.node_ops.getattr,
28942                setattr: MEMFS.node_ops.setattr
28943              },
28944              stream: FS.chrdev_stream_ops
28945            }
28946          };
28947        }
28948        var node = FS.createNode(parent, name, mode, dev);
28949        if (FS.isDir(node.mode)) {
28950          node.node_ops = MEMFS.ops_table.dir.node;
28951          node.stream_ops = MEMFS.ops_table.dir.stream;
28952          node.contents = {};
28953        } else if (FS.isFile(node.mode)) {
28954          node.node_ops = MEMFS.ops_table.file.node;
28955          node.stream_ops = MEMFS.ops_table.file.stream;
28956          node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity.
28957          // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred
28958          // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size
28959          // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme.
28960          node.contents = null;
28961        } else if (FS.isLink(node.mode)) {
28962          node.node_ops = MEMFS.ops_table.link.node;
28963          node.stream_ops = MEMFS.ops_table.link.stream;
28964        } else if (FS.isChrdev(node.mode)) {
28965          node.node_ops = MEMFS.ops_table.chrdev.node;
28966          node.stream_ops = MEMFS.ops_table.chrdev.stream;
28967        }
28968        node.timestamp = Date.now();
28969        // add the new node to the parent
28970        if (parent) {
28971          parent.contents[name] = node;
28972        }
28973        return node;
28974      },getFileDataAsRegularArray:function(node) {
28975        if (node.contents && node.contents.subarray) {
28976          var arr = [];
28977          for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]);
28978          return arr; // Returns a copy of the original data.
28979        }
28980        return node.contents; // No-op, the file contents are already in a JS array. Return as-is.
28981      },getFileDataAsTypedArray:function(node) {
28982        if (!node.contents) return new Uint8Array(0);
28983        if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes.
28984        return new Uint8Array(node.contents);
28985      },expandFileStorage:function(node, newCapacity) {
28986        var prevCapacity = node.contents ? node.contents.length : 0;
28987        if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough.
28988        // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity.
28989        // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to
28990        // avoid overshooting the allocation cap by a very large margin.
28991        var CAPACITY_DOUBLING_MAX = 1024 * 1024;
28992        newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) >>> 0);
28993        if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding.
28994        var oldContents = node.contents;
28995        node.contents = new Uint8Array(newCapacity); // Allocate new storage.
28996        if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage.
28997        return;
28998      },resizeFileStorage:function(node, newSize) {
28999        if (node.usedBytes == newSize) return;
29000        if (newSize == 0) {
29001          node.contents = null; // Fully decommit when requesting a resize to zero.
29002          node.usedBytes = 0;
29003          return;
29004        }
29005        if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store.
29006          var oldContents = node.contents;
29007          node.contents = new Uint8Array(newSize); // Allocate new storage.
29008          if (oldContents) {
29009            node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage.
29010          }
29011          node.usedBytes = newSize;
29012          return;
29013        }
29014        // Backing with a JS array.
29015        if (!node.contents) node.contents = [];
29016        if (node.contents.length > newSize) node.contents.length = newSize;
29017        else while (node.contents.length < newSize) node.contents.push(0);
29018        node.usedBytes = newSize;
29019      },node_ops:{getattr:function(node) {
29020          var attr = {};
29021          // device numbers reuse inode numbers.
29022          attr.dev = FS.isChrdev(node.mode) ? node.id : 1;
29023          attr.ino = node.id;
29024          attr.mode = node.mode;
29025          attr.nlink = 1;
29026          attr.uid = 0;
29027          attr.gid = 0;
29028          attr.rdev = node.rdev;
29029          if (FS.isDir(node.mode)) {
29030            attr.size = 4096;
29031          } else if (FS.isFile(node.mode)) {
29032            attr.size = node.usedBytes;
29033          } else if (FS.isLink(node.mode)) {
29034            attr.size = node.link.length;
29035          } else {
29036            attr.size = 0;
29037          }
29038          attr.atime = new Date(node.timestamp);
29039          attr.mtime = new Date(node.timestamp);
29040          attr.ctime = new Date(node.timestamp);
29041          // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize),
29042          //       but this is not required by the standard.
29043          attr.blksize = 4096;
29044          attr.blocks = Math.ceil(attr.size / attr.blksize);
29045          return attr;
29046        },setattr:function(node, attr) {
29047          if (attr.mode !== undefined) {
29048            node.mode = attr.mode;
29049          }
29050          if (attr.timestamp !== undefined) {
29051            node.timestamp = attr.timestamp;
29052          }
29053          if (attr.size !== undefined) {
29054            MEMFS.resizeFileStorage(node, attr.size);
29055          }
29056        },lookup:function(parent, name) {
29057          throw FS.genericErrors[44];
29058        },mknod:function(parent, name, mode, dev) {
29059          return MEMFS.createNode(parent, name, mode, dev);
29060        },rename:function(old_node, new_dir, new_name) {
29061          // if we're overwriting a directory at new_name, make sure it's empty.
29062          if (FS.isDir(old_node.mode)) {
29063            var new_node;
29064            try {
29065              new_node = FS.lookupNode(new_dir, new_name);
29066            } catch (e) {
29067            }
29068            if (new_node) {
29069              for (var i in new_node.contents) {
29070                throw new FS.ErrnoError(55);
29071              }
29072            }
29073          }
29074          // do the internal rewiring
29075          delete old_node.parent.contents[old_node.name];
29076          old_node.name = new_name;
29077          new_dir.contents[new_name] = old_node;
29078          old_node.parent = new_dir;
29079        },unlink:function(parent, name) {
29080          delete parent.contents[name];
29081        },rmdir:function(parent, name) {
29082          var node = FS.lookupNode(parent, name);
29083          for (var i in node.contents) {
29084            throw new FS.ErrnoError(55);
29085          }
29086          delete parent.contents[name];
29087        },readdir:function(node) {
29088          var entries = ['.', '..'];
29089          for (var key in node.contents) {
29090            if (!node.contents.hasOwnProperty(key)) {
29091              continue;
29092            }
29093            entries.push(key);
29094          }
29095          return entries;
29096        },symlink:function(parent, newname, oldpath) {
29097          var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0);
29098          node.link = oldpath;
29099          return node;
29100        },readlink:function(node) {
29101          if (!FS.isLink(node.mode)) {
29102            throw new FS.ErrnoError(28);
29103          }
29104          return node.link;
29105        }},stream_ops:{read:function(stream, buffer, offset, length, position) {
29106          var contents = stream.node.contents;
29107          if (position >= stream.node.usedBytes) return 0;
29108          var size = Math.min(stream.node.usedBytes - position, length);
29109          if (size > 8 && contents.subarray) { // non-trivial, and typed array
29110            buffer.set(contents.subarray(position, position + size), offset);
29111          } else {
29112            for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i];
29113          }
29114          return size;
29115        },write:function(stream, buffer, offset, length, position, canOwn) {
29116          // If the buffer is located in main memory (HEAP), and if
29117          // memory can grow, we can't hold on to references of the
29118          // memory buffer, as they may get invalidated. That means we
29119          // need to do copy its contents.
29120          if (buffer.buffer === HEAP8.buffer) {
29121            canOwn = false;
29122          }
29123
29124          if (!length) return 0;
29125          var node = stream.node;
29126          node.timestamp = Date.now();
29127
29128          if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array?
29129            if (canOwn) {
29130              node.contents = buffer.subarray(offset, offset + length);
29131              node.usedBytes = length;
29132              return length;
29133            } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.
29134              node.contents = buffer.slice(offset, offset + length);
29135              node.usedBytes = length;
29136              return length;
29137            } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file?
29138              node.contents.set(buffer.subarray(offset, offset + length), position);
29139              return length;
29140            }
29141          }
29142
29143          // Appending to an existing file and we need to reallocate, or source data did not come as a typed array.
29144          MEMFS.expandFileStorage(node, position+length);
29145          if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available.
29146          else {
29147            for (var i = 0; i < length; i++) {
29148             node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not.
29149            }
29150          }
29151          node.usedBytes = Math.max(node.usedBytes, position + length);
29152          return length;
29153        },llseek:function(stream, offset, whence) {
29154          var position = offset;
29155          if (whence === 1) {
29156            position += stream.position;
29157          } else if (whence === 2) {
29158            if (FS.isFile(stream.node.mode)) {
29159              position += stream.node.usedBytes;
29160            }
29161          }
29162          if (position < 0) {
29163            throw new FS.ErrnoError(28);
29164          }
29165          return position;
29166        },allocate:function(stream, offset, length) {
29167          MEMFS.expandFileStorage(stream.node, offset + length);
29168          stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length);
29169        },mmap:function(stream, address, length, position, prot, flags) {
29170          // We don't currently support location hints for the address of the mapping
29171          assert(address === 0);
29172
29173          if (!FS.isFile(stream.node.mode)) {
29174            throw new FS.ErrnoError(43);
29175          }
29176          var ptr;
29177          var allocated;
29178          var contents = stream.node.contents;
29179          // Only make a new copy when MAP_PRIVATE is specified.
29180          if (!(flags & 2) && contents.buffer === buffer) {
29181            // We can't emulate MAP_SHARED when the file is not backed by the buffer
29182            // we're mapping to (e.g. the HEAP buffer).
29183            allocated = false;
29184            ptr = contents.byteOffset;
29185          } else {
29186            // Try to avoid unnecessary slices.
29187            if (position > 0 || position + length < contents.length) {
29188              if (contents.subarray) {
29189                contents = contents.subarray(position, position + length);
29190              } else {
29191                contents = Array.prototype.slice.call(contents, position, position + length);
29192              }
29193            }
29194            allocated = true;
29195            ptr = _malloc(length);
29196            if (!ptr) {
29197              throw new FS.ErrnoError(48);
29198            }
29199            HEAP8.set(contents, ptr);
29200          }
29201          return { ptr: ptr, allocated: allocated };
29202        },msync:function(stream, buffer, offset, length, mmapFlags) {
29203          if (!FS.isFile(stream.node.mode)) {
29204            throw new FS.ErrnoError(43);
29205          }
29206          if (mmapFlags & 2) {
29207            // MAP_PRIVATE calls need not to be synced back to underlying fs
29208            return 0;
29209          }
29210
29211          var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false);
29212          // should we check if bytesWritten and length are the same?
29213          return 0;
29214        }}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e) {
29215        if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace();
29216        return setErrNo(e.errno);
29217      },lookupPath:function(path, opts) {
29218        path = PATH_FS.resolve(FS.cwd(), path);
29219        opts = opts || {};
29220
29221        if (!path) return { path: '', node: null };
29222
29223        var defaults = {
29224          follow_mount: true,
29225          recurse_count: 0
29226        };
29227        for (var key in defaults) {
29228          if (opts[key] === undefined) {
29229            opts[key] = defaults[key];
29230          }
29231        }
29232
29233        if (opts.recurse_count > 8) {  // max recursive lookup of 8
29234          throw new FS.ErrnoError(32);
29235        }
29236
29237        // split the path
29238        var parts = PATH.normalizeArray(path.split('/').filter(function(p) {
29239          return !!p;
29240        }), false);
29241
29242        // start at the root
29243        var current = FS.root;
29244        var current_path = '/';
29245
29246        for (var i = 0; i < parts.length; i++) {
29247          var islast = (i === parts.length-1);
29248          if (islast && opts.parent) {
29249            // stop resolving
29250            break;
29251          }
29252
29253          current = FS.lookupNode(current, parts[i]);
29254          current_path = PATH.join2(current_path, parts[i]);
29255
29256          // jump to the mount's root node if this is a mountpoint
29257          if (FS.isMountpoint(current)) {
29258            if (!islast || (islast && opts.follow_mount)) {
29259              current = current.mounted.root;
29260            }
29261          }
29262
29263          // by default, lookupPath will not follow a symlink if it is the final path component.
29264          // setting opts.follow = true will override this behavior.
29265          if (!islast || opts.follow) {
29266            var count = 0;
29267            while (FS.isLink(current.mode)) {
29268              var link = FS.readlink(current_path);
29269              current_path = PATH_FS.resolve(PATH.dirname(current_path), link);
29270
29271              var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count });
29272              current = lookup.node;
29273
29274              if (count++ > 40) {  // limit max consecutive symlinks to 40 (SYMLOOP_MAX).
29275                throw new FS.ErrnoError(32);
29276              }
29277            }
29278          }
29279        }
29280
29281        return { path: current_path, node: current };
29282      },getPath:function(node) {
29283        var path;
29284        while (true) {
29285          if (FS.isRoot(node)) {
29286            var mount = node.mount.mountpoint;
29287            if (!path) return mount;
29288            return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path;
29289          }
29290          path = path ? node.name + '/' + path : node.name;
29291          node = node.parent;
29292        }
29293      },hashName:function(parentid, name) {
29294        var hash = 0;
29295
29296
29297        for (var i = 0; i < name.length; i++) {
29298          hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0;
29299        }
29300        return ((parentid + hash) >>> 0) % FS.nameTable.length;
29301      },hashAddNode:function(node) {
29302        var hash = FS.hashName(node.parent.id, node.name);
29303        node.name_next = FS.nameTable[hash];
29304        FS.nameTable[hash] = node;
29305      },hashRemoveNode:function(node) {
29306        var hash = FS.hashName(node.parent.id, node.name);
29307        if (FS.nameTable[hash] === node) {
29308          FS.nameTable[hash] = node.name_next;
29309        } else {
29310          var current = FS.nameTable[hash];
29311          while (current) {
29312            if (current.name_next === node) {
29313              current.name_next = node.name_next;
29314              break;
29315            }
29316            current = current.name_next;
29317          }
29318        }
29319      },lookupNode:function(parent, name) {
29320        var errCode = FS.mayLookup(parent);
29321        if (errCode) {
29322          throw new FS.ErrnoError(errCode, parent);
29323        }
29324        var hash = FS.hashName(parent.id, name);
29325        for (var node = FS.nameTable[hash]; node; node = node.name_next) {
29326          var nodeName = node.name;
29327          if (node.parent.id === parent.id && nodeName === name) {
29328            return node;
29329          }
29330        }
29331        // if we failed to find it in the cache, call into the VFS
29332        return FS.lookup(parent, name);
29333      },createNode:function(parent, name, mode, rdev) {
29334        var node = new FS.FSNode(parent, name, mode, rdev);
29335
29336        FS.hashAddNode(node);
29337
29338        return node;
29339      },destroyNode:function(node) {
29340        FS.hashRemoveNode(node);
29341      },isRoot:function(node) {
29342        return node === node.parent;
29343      },isMountpoint:function(node) {
29344        return !!node.mounted;
29345      },isFile:function(mode) {
29346        return (mode & 61440) === 32768;
29347      },isDir:function(mode) {
29348        return (mode & 61440) === 16384;
29349      },isLink:function(mode) {
29350        return (mode & 61440) === 40960;
29351      },isChrdev:function(mode) {
29352        return (mode & 61440) === 8192;
29353      },isBlkdev:function(mode) {
29354        return (mode & 61440) === 24576;
29355      },isFIFO:function(mode) {
29356        return (mode & 61440) === 4096;
29357      },isSocket:function(mode) {
29358        return (mode & 49152) === 49152;
29359      },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) {
29360        var flags = FS.flagModes[str];
29361        if (typeof flags === 'undefined') {
29362          throw new Error('Unknown file open mode: ' + str);
29363        }
29364        return flags;
29365      },flagsToPermissionString:function(flag) {
29366        var perms = ['r', 'w', 'rw'][flag & 3];
29367        if ((flag & 512)) {
29368          perms += 'w';
29369        }
29370        return perms;
29371      },nodePermissions:function(node, perms) {
29372        if (FS.ignorePermissions) {
29373          return 0;
29374        }
29375        // return 0 if any user, group or owner bits are set.
29376        if (perms.indexOf('r') !== -1 && !(node.mode & 292)) {
29377          return 2;
29378        } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) {
29379          return 2;
29380        } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) {
29381          return 2;
29382        }
29383        return 0;
29384      },mayLookup:function(dir) {
29385        var errCode = FS.nodePermissions(dir, 'x');
29386        if (errCode) return errCode;
29387        if (!dir.node_ops.lookup) return 2;
29388        return 0;
29389      },mayCreate:function(dir, name) {
29390        try {
29391          var node = FS.lookupNode(dir, name);
29392          return 20;
29393        } catch (e) {
29394        }
29395        return FS.nodePermissions(dir, 'wx');
29396      },mayDelete:function(dir, name, isdir) {
29397        var node;
29398        try {
29399          node = FS.lookupNode(dir, name);
29400        } catch (e) {
29401          return e.errno;
29402        }
29403        var errCode = FS.nodePermissions(dir, 'wx');
29404        if (errCode) {
29405          return errCode;
29406        }
29407        if (isdir) {
29408          if (!FS.isDir(node.mode)) {
29409            return 54;
29410          }
29411          if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) {
29412            return 10;
29413          }
29414        } else {
29415          if (FS.isDir(node.mode)) {
29416            return 31;
29417          }
29418        }
29419        return 0;
29420      },mayOpen:function(node, flags) {
29421        if (!node) {
29422          return 44;
29423        }
29424        if (FS.isLink(node.mode)) {
29425          return 32;
29426        } else if (FS.isDir(node.mode)) {
29427          if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write
29428              (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only)
29429            return 31;
29430          }
29431        }
29432        return FS.nodePermissions(node, FS.flagsToPermissionString(flags));
29433      },MAX_OPEN_FDS:4096,nextfd:function(fd_start, fd_end) {
29434        fd_start = fd_start || 0;
29435        fd_end = fd_end || FS.MAX_OPEN_FDS;
29436        for (var fd = fd_start; fd <= fd_end; fd++) {
29437          if (!FS.streams[fd]) {
29438            return fd;
29439          }
29440        }
29441        throw new FS.ErrnoError(33);
29442      },getStream:function(fd) {
29443        return FS.streams[fd];
29444      },createStream:function(stream, fd_start, fd_end) {
29445        if (!FS.FSStream) {
29446          FS.FSStream = /** @constructor */ function(){};
29447          FS.FSStream.prototype = {
29448            object: {
29449              get: function() { return this.node; },
29450              set: function(val) { this.node = val; }
29451            },
29452            isRead: {
29453              get: function() { return (this.flags & 2097155) !== 1; }
29454            },
29455            isWrite: {
29456              get: function() { return (this.flags & 2097155) !== 0; }
29457            },
29458            isAppend: {
29459              get: function() { return (this.flags & 1024); }
29460            }
29461          };
29462        }
29463        // clone it, so we can return an instance of FSStream
29464        var newStream = new FS.FSStream();
29465        for (var p in stream) {
29466          newStream[p] = stream[p];
29467        }
29468        stream = newStream;
29469        var fd = FS.nextfd(fd_start, fd_end);
29470        stream.fd = fd;
29471        FS.streams[fd] = stream;
29472        return stream;
29473      },closeStream:function(fd) {
29474        FS.streams[fd] = null;
29475      },chrdev_stream_ops:{open:function(stream) {
29476          var device = FS.getDevice(stream.node.rdev);
29477          // override node's stream ops with the device's
29478          stream.stream_ops = device.stream_ops;
29479          // forward the open call
29480          if (stream.stream_ops.open) {
29481            stream.stream_ops.open(stream);
29482          }
29483        },llseek:function() {
29484          throw new FS.ErrnoError(70);
29485        }},major:function(dev) {
29486        return ((dev) >> 8);
29487      },minor:function(dev) {
29488        return ((dev) & 0xff);
29489      },makedev:function(ma, mi) {
29490        return ((ma) << 8 | (mi));
29491      },registerDevice:function(dev, ops) {
29492        FS.devices[dev] = { stream_ops: ops };
29493      },getDevice:function(dev) {
29494        return FS.devices[dev];
29495      },getMounts:function(mount) {
29496        var mounts = [];
29497        var check = [mount];
29498
29499        while (check.length) {
29500          var m = check.pop();
29501
29502          mounts.push(m);
29503
29504          check.push.apply(check, m.mounts);
29505        }
29506
29507        return mounts;
29508      },syncfs:function(populate, callback) {
29509        if (typeof(populate) === 'function') {
29510          callback = populate;
29511          populate = false;
29512        }
29513
29514        FS.syncFSRequests++;
29515
29516        if (FS.syncFSRequests > 1) {
29517          err('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work');
29518        }
29519
29520        var mounts = FS.getMounts(FS.root.mount);
29521        var completed = 0;
29522
29523        function doCallback(errCode) {
29524          FS.syncFSRequests--;
29525          return callback(errCode);
29526        }
29527
29528        function done(errCode) {
29529          if (errCode) {
29530            if (!done.errored) {
29531              done.errored = true;
29532              return doCallback(errCode);
29533            }
29534            return;
29535          }
29536          if (++completed >= mounts.length) {
29537            doCallback(null);
29538          }
29539        };
29540
29541        // sync all mounts
29542        mounts.forEach(function (mount) {
29543          if (!mount.type.syncfs) {
29544            return done(null);
29545          }
29546          mount.type.syncfs(mount, populate, done);
29547        });
29548      },mount:function(type, opts, mountpoint) {
29549        var root = mountpoint === '/';
29550        var pseudo = !mountpoint;
29551        var node;
29552
29553        if (root && FS.root) {
29554          throw new FS.ErrnoError(10);
29555        } else if (!root && !pseudo) {
29556          var lookup = FS.lookupPath(mountpoint, { follow_mount: false });
29557
29558          mountpoint = lookup.path;  // use the absolute path
29559          node = lookup.node;
29560
29561          if (FS.isMountpoint(node)) {
29562            throw new FS.ErrnoError(10);
29563          }
29564
29565          if (!FS.isDir(node.mode)) {
29566            throw new FS.ErrnoError(54);
29567          }
29568        }
29569
29570        var mount = {
29571          type: type,
29572          opts: opts,
29573          mountpoint: mountpoint,
29574          mounts: []
29575        };
29576
29577        // create a root node for the fs
29578        var mountRoot = type.mount(mount);
29579        mountRoot.mount = mount;
29580        mount.root = mountRoot;
29581
29582        if (root) {
29583          FS.root = mountRoot;
29584        } else if (node) {
29585          // set as a mountpoint
29586          node.mounted = mount;
29587
29588          // add the new mount to the current mount's children
29589          if (node.mount) {
29590            node.mount.mounts.push(mount);
29591          }
29592        }
29593
29594        return mountRoot;
29595      },unmount:function (mountpoint) {
29596        var lookup = FS.lookupPath(mountpoint, { follow_mount: false });
29597
29598        if (!FS.isMountpoint(lookup.node)) {
29599          throw new FS.ErrnoError(28);
29600        }
29601
29602        // destroy the nodes for this mount, and all its child mounts
29603        var node = lookup.node;
29604        var mount = node.mounted;
29605        var mounts = FS.getMounts(mount);
29606
29607        Object.keys(FS.nameTable).forEach(function (hash) {
29608          var current = FS.nameTable[hash];
29609
29610          while (current) {
29611            var next = current.name_next;
29612
29613            if (mounts.indexOf(current.mount) !== -1) {
29614              FS.destroyNode(current);
29615            }
29616
29617            current = next;
29618          }
29619        });
29620
29621        // no longer a mountpoint
29622        node.mounted = null;
29623
29624        // remove this mount from the child mounts
29625        var idx = node.mount.mounts.indexOf(mount);
29626        node.mount.mounts.splice(idx, 1);
29627      },lookup:function(parent, name) {
29628        return parent.node_ops.lookup(parent, name);
29629      },mknod:function(path, mode, dev) {
29630        var lookup = FS.lookupPath(path, { parent: true });
29631        var parent = lookup.node;
29632        var name = PATH.basename(path);
29633        if (!name || name === '.' || name === '..') {
29634          throw new FS.ErrnoError(28);
29635        }
29636        var errCode = FS.mayCreate(parent, name);
29637        if (errCode) {
29638          throw new FS.ErrnoError(errCode);
29639        }
29640        if (!parent.node_ops.mknod) {
29641          throw new FS.ErrnoError(63);
29642        }
29643        return parent.node_ops.mknod(parent, name, mode, dev);
29644      },create:function(path, mode) {
29645        mode = mode !== undefined ? mode : 438 /* 0666 */;
29646        mode &= 4095;
29647        mode |= 32768;
29648        return FS.mknod(path, mode, 0);
29649      },mkdir:function(path, mode) {
29650        mode = mode !== undefined ? mode : 511 /* 0777 */;
29651        mode &= 511 | 512;
29652        mode |= 16384;
29653        return FS.mknod(path, mode, 0);
29654      },mkdirTree:function(path, mode) {
29655        var dirs = path.split('/');
29656        var d = '';
29657        for (var i = 0; i < dirs.length; ++i) {
29658          if (!dirs[i]) continue;
29659          d += '/' + dirs[i];
29660          try {
29661            FS.mkdir(d, mode);
29662          } catch(e) {
29663            if (e.errno != 20) throw e;
29664          }
29665        }
29666      },mkdev:function(path, mode, dev) {
29667        if (typeof(dev) === 'undefined') {
29668          dev = mode;
29669          mode = 438 /* 0666 */;
29670        }
29671        mode |= 8192;
29672        return FS.mknod(path, mode, dev);
29673      },symlink:function(oldpath, newpath) {
29674        if (!PATH_FS.resolve(oldpath)) {
29675          throw new FS.ErrnoError(44);
29676        }
29677        var lookup = FS.lookupPath(newpath, { parent: true });
29678        var parent = lookup.node;
29679        if (!parent) {
29680          throw new FS.ErrnoError(44);
29681        }
29682        var newname = PATH.basename(newpath);
29683        var errCode = FS.mayCreate(parent, newname);
29684        if (errCode) {
29685          throw new FS.ErrnoError(errCode);
29686        }
29687        if (!parent.node_ops.symlink) {
29688          throw new FS.ErrnoError(63);
29689        }
29690        return parent.node_ops.symlink(parent, newname, oldpath);
29691      },rename:function(old_path, new_path) {
29692        var old_dirname = PATH.dirname(old_path);
29693        var new_dirname = PATH.dirname(new_path);
29694        var old_name = PATH.basename(old_path);
29695        var new_name = PATH.basename(new_path);
29696        // parents must exist
29697        var lookup, old_dir, new_dir;
29698        try {
29699          lookup = FS.lookupPath(old_path, { parent: true });
29700          old_dir = lookup.node;
29701          lookup = FS.lookupPath(new_path, { parent: true });
29702          new_dir = lookup.node;
29703        } catch (e) {
29704          throw new FS.ErrnoError(10);
29705        }
29706        if (!old_dir || !new_dir) throw new FS.ErrnoError(44);
29707        // need to be part of the same mount
29708        if (old_dir.mount !== new_dir.mount) {
29709          throw new FS.ErrnoError(75);
29710        }
29711        // source must exist
29712        var old_node = FS.lookupNode(old_dir, old_name);
29713        // old path should not be an ancestor of the new path
29714        var relative = PATH_FS.relative(old_path, new_dirname);
29715        if (relative.charAt(0) !== '.') {
29716          throw new FS.ErrnoError(28);
29717        }
29718        // new path should not be an ancestor of the old path
29719        relative = PATH_FS.relative(new_path, old_dirname);
29720        if (relative.charAt(0) !== '.') {
29721          throw new FS.ErrnoError(55);
29722        }
29723        // see if the new path already exists
29724        var new_node;
29725        try {
29726          new_node = FS.lookupNode(new_dir, new_name);
29727        } catch (e) {
29728          // not fatal
29729        }
29730        // early out if nothing needs to change
29731        if (old_node === new_node) {
29732          return;
29733        }
29734        // we'll need to delete the old entry
29735        var isdir = FS.isDir(old_node.mode);
29736        var errCode = FS.mayDelete(old_dir, old_name, isdir);
29737        if (errCode) {
29738          throw new FS.ErrnoError(errCode);
29739        }
29740        // need delete permissions if we'll be overwriting.
29741        // need create permissions if new doesn't already exist.
29742        errCode = new_node ?
29743          FS.mayDelete(new_dir, new_name, isdir) :
29744          FS.mayCreate(new_dir, new_name);
29745        if (errCode) {
29746          throw new FS.ErrnoError(errCode);
29747        }
29748        if (!old_dir.node_ops.rename) {
29749          throw new FS.ErrnoError(63);
29750        }
29751        if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) {
29752          throw new FS.ErrnoError(10);
29753        }
29754        // if we are going to change the parent, check write permissions
29755        if (new_dir !== old_dir) {
29756          errCode = FS.nodePermissions(old_dir, 'w');
29757          if (errCode) {
29758            throw new FS.ErrnoError(errCode);
29759          }
29760        }
29761        try {
29762          if (FS.trackingDelegate['willMovePath']) {
29763            FS.trackingDelegate['willMovePath'](old_path, new_path);
29764          }
29765        } catch(e) {
29766          err("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message);
29767        }
29768        // remove the node from the lookup hash
29769        FS.hashRemoveNode(old_node);
29770        // do the underlying fs rename
29771        try {
29772          old_dir.node_ops.rename(old_node, new_dir, new_name);
29773        } catch (e) {
29774          throw e;
29775        } finally {
29776          // add the node back to the hash (in case node_ops.rename
29777          // changed its name)
29778          FS.hashAddNode(old_node);
29779        }
29780        try {
29781          if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path);
29782        } catch(e) {
29783          err("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message);
29784        }
29785      },rmdir:function(path) {
29786        var lookup = FS.lookupPath(path, { parent: true });
29787        var parent = lookup.node;
29788        var name = PATH.basename(path);
29789        var node = FS.lookupNode(parent, name);
29790        var errCode = FS.mayDelete(parent, name, true);
29791        if (errCode) {
29792          throw new FS.ErrnoError(errCode);
29793        }
29794        if (!parent.node_ops.rmdir) {
29795          throw new FS.ErrnoError(63);
29796        }
29797        if (FS.isMountpoint(node)) {
29798          throw new FS.ErrnoError(10);
29799        }
29800        try {
29801          if (FS.trackingDelegate['willDeletePath']) {
29802            FS.trackingDelegate['willDeletePath'](path);
29803          }
29804        } catch(e) {
29805          err("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message);
29806        }
29807        parent.node_ops.rmdir(parent, name);
29808        FS.destroyNode(node);
29809        try {
29810          if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path);
29811        } catch(e) {
29812          err("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message);
29813        }
29814      },readdir:function(path) {
29815        var lookup = FS.lookupPath(path, { follow: true });
29816        var node = lookup.node;
29817        if (!node.node_ops.readdir) {
29818          throw new FS.ErrnoError(54);
29819        }
29820        return node.node_ops.readdir(node);
29821      },unlink:function(path) {
29822        var lookup = FS.lookupPath(path, { parent: true });
29823        var parent = lookup.node;
29824        var name = PATH.basename(path);
29825        var node = FS.lookupNode(parent, name);
29826        var errCode = FS.mayDelete(parent, name, false);
29827        if (errCode) {
29828          // According to POSIX, we should map EISDIR to EPERM, but
29829          // we instead do what Linux does (and we must, as we use
29830          // the musl linux libc).
29831          throw new FS.ErrnoError(errCode);
29832        }
29833        if (!parent.node_ops.unlink) {
29834          throw new FS.ErrnoError(63);
29835        }
29836        if (FS.isMountpoint(node)) {
29837          throw new FS.ErrnoError(10);
29838        }
29839        try {
29840          if (FS.trackingDelegate['willDeletePath']) {
29841            FS.trackingDelegate['willDeletePath'](path);
29842          }
29843        } catch(e) {
29844          err("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message);
29845        }
29846        parent.node_ops.unlink(parent, name);
29847        FS.destroyNode(node);
29848        try {
29849          if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path);
29850        } catch(e) {
29851          err("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message);
29852        }
29853      },readlink:function(path) {
29854        var lookup = FS.lookupPath(path);
29855        var link = lookup.node;
29856        if (!link) {
29857          throw new FS.ErrnoError(44);
29858        }
29859        if (!link.node_ops.readlink) {
29860          throw new FS.ErrnoError(28);
29861        }
29862        return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link));
29863      },stat:function(path, dontFollow) {
29864        var lookup = FS.lookupPath(path, { follow: !dontFollow });
29865        var node = lookup.node;
29866        if (!node) {
29867          throw new FS.ErrnoError(44);
29868        }
29869        if (!node.node_ops.getattr) {
29870          throw new FS.ErrnoError(63);
29871        }
29872        return node.node_ops.getattr(node);
29873      },lstat:function(path) {
29874        return FS.stat(path, true);
29875      },chmod:function(path, mode, dontFollow) {
29876        var node;
29877        if (typeof path === 'string') {
29878          var lookup = FS.lookupPath(path, { follow: !dontFollow });
29879          node = lookup.node;
29880        } else {
29881          node = path;
29882        }
29883        if (!node.node_ops.setattr) {
29884          throw new FS.ErrnoError(63);
29885        }
29886        node.node_ops.setattr(node, {
29887          mode: (mode & 4095) | (node.mode & ~4095),
29888          timestamp: Date.now()
29889        });
29890      },lchmod:function(path, mode) {
29891        FS.chmod(path, mode, true);
29892      },fchmod:function(fd, mode) {
29893        var stream = FS.getStream(fd);
29894        if (!stream) {
29895          throw new FS.ErrnoError(8);
29896        }
29897        FS.chmod(stream.node, mode);
29898      },chown:function(path, uid, gid, dontFollow) {
29899        var node;
29900        if (typeof path === 'string') {
29901          var lookup = FS.lookupPath(path, { follow: !dontFollow });
29902          node = lookup.node;
29903        } else {
29904          node = path;
29905        }
29906        if (!node.node_ops.setattr) {
29907          throw new FS.ErrnoError(63);
29908        }
29909        node.node_ops.setattr(node, {
29910          timestamp: Date.now()
29911          // we ignore the uid / gid for now
29912        });
29913      },lchown:function(path, uid, gid) {
29914        FS.chown(path, uid, gid, true);
29915      },fchown:function(fd, uid, gid) {
29916        var stream = FS.getStream(fd);
29917        if (!stream) {
29918          throw new FS.ErrnoError(8);
29919        }
29920        FS.chown(stream.node, uid, gid);
29921      },truncate:function(path, len) {
29922        if (len < 0) {
29923          throw new FS.ErrnoError(28);
29924        }
29925        var node;
29926        if (typeof path === 'string') {
29927          var lookup = FS.lookupPath(path, { follow: true });
29928          node = lookup.node;
29929        } else {
29930          node = path;
29931        }
29932        if (!node.node_ops.setattr) {
29933          throw new FS.ErrnoError(63);
29934        }
29935        if (FS.isDir(node.mode)) {
29936          throw new FS.ErrnoError(31);
29937        }
29938        if (!FS.isFile(node.mode)) {
29939          throw new FS.ErrnoError(28);
29940        }
29941        var errCode = FS.nodePermissions(node, 'w');
29942        if (errCode) {
29943          throw new FS.ErrnoError(errCode);
29944        }
29945        node.node_ops.setattr(node, {
29946          size: len,
29947          timestamp: Date.now()
29948        });
29949      },ftruncate:function(fd, len) {
29950        var stream = FS.getStream(fd);
29951        if (!stream) {
29952          throw new FS.ErrnoError(8);
29953        }
29954        if ((stream.flags & 2097155) === 0) {
29955          throw new FS.ErrnoError(28);
29956        }
29957        FS.truncate(stream.node, len);
29958      },utime:function(path, atime, mtime) {
29959        var lookup = FS.lookupPath(path, { follow: true });
29960        var node = lookup.node;
29961        node.node_ops.setattr(node, {
29962          timestamp: Math.max(atime, mtime)
29963        });
29964      },open:function(path, flags, mode, fd_start, fd_end) {
29965        if (path === "") {
29966          throw new FS.ErrnoError(44);
29967        }
29968        flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags;
29969        mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode;
29970        if ((flags & 64)) {
29971          mode = (mode & 4095) | 32768;
29972        } else {
29973          mode = 0;
29974        }
29975        var node;
29976        if (typeof path === 'object') {
29977          node = path;
29978        } else {
29979          path = PATH.normalize(path);
29980          try {
29981            var lookup = FS.lookupPath(path, {
29982              follow: !(flags & 131072)
29983            });
29984            node = lookup.node;
29985          } catch (e) {
29986            // ignore
29987          }
29988        }
29989        // perhaps we need to create the node
29990        var created = false;
29991        if ((flags & 64)) {
29992          if (node) {
29993            // if O_CREAT and O_EXCL are set, error out if the node already exists
29994            if ((flags & 128)) {
29995              throw new FS.ErrnoError(20);
29996            }
29997          } else {
29998            // node doesn't exist, try to create it
29999            node = FS.mknod(path, mode, 0);
30000            created = true;
30001          }
30002        }
30003        if (!node) {
30004          throw new FS.ErrnoError(44);
30005        }
30006        // can't truncate a device
30007        if (FS.isChrdev(node.mode)) {
30008          flags &= ~512;
30009        }
30010        // if asked only for a directory, then this must be one
30011        if ((flags & 65536) && !FS.isDir(node.mode)) {
30012          throw new FS.ErrnoError(54);
30013        }
30014        // check permissions, if this is not a file we just created now (it is ok to
30015        // create and write to a file with read-only permissions; it is read-only
30016        // for later use)
30017        if (!created) {
30018          var errCode = FS.mayOpen(node, flags);
30019          if (errCode) {
30020            throw new FS.ErrnoError(errCode);
30021          }
30022        }
30023        // do truncation if necessary
30024        if ((flags & 512)) {
30025          FS.truncate(node, 0);
30026        }
30027        // we've already handled these, don't pass down to the underlying vfs
30028        flags &= ~(128 | 512 | 131072);
30029
30030        // register the stream with the filesystem
30031        var stream = FS.createStream({
30032          node: node,
30033          path: FS.getPath(node),  // we want the absolute path to the node
30034          flags: flags,
30035          seekable: true,
30036          position: 0,
30037          stream_ops: node.stream_ops,
30038          // used by the file family libc calls (fopen, fwrite, ferror, etc.)
30039          ungotten: [],
30040          error: false
30041        }, fd_start, fd_end);
30042        // call the new stream's open function
30043        if (stream.stream_ops.open) {
30044          stream.stream_ops.open(stream);
30045        }
30046        if (Module['logReadFiles'] && !(flags & 1)) {
30047          if (!FS.readFiles) FS.readFiles = {};
30048          if (!(path in FS.readFiles)) {
30049            FS.readFiles[path] = 1;
30050            err("FS.trackingDelegate error on read file: " + path);
30051          }
30052        }
30053        try {
30054          if (FS.trackingDelegate['onOpenFile']) {
30055            var trackingFlags = 0;
30056            if ((flags & 2097155) !== 1) {
30057              trackingFlags |= FS.tracking.openFlags.READ;
30058            }
30059            if ((flags & 2097155) !== 0) {
30060              trackingFlags |= FS.tracking.openFlags.WRITE;
30061            }
30062            FS.trackingDelegate['onOpenFile'](path, trackingFlags);
30063          }
30064        } catch(e) {
30065          err("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message);
30066        }
30067        return stream;
30068      },close:function(stream) {
30069        if (FS.isClosed(stream)) {
30070          throw new FS.ErrnoError(8);
30071        }
30072        if (stream.getdents) stream.getdents = null; // free readdir state
30073        try {
30074          if (stream.stream_ops.close) {
30075            stream.stream_ops.close(stream);
30076          }
30077        } catch (e) {
30078          throw e;
30079        } finally {
30080          FS.closeStream(stream.fd);
30081        }
30082        stream.fd = null;
30083      },isClosed:function(stream) {
30084        return stream.fd === null;
30085      },llseek:function(stream, offset, whence) {
30086        if (FS.isClosed(stream)) {
30087          throw new FS.ErrnoError(8);
30088        }
30089        if (!stream.seekable || !stream.stream_ops.llseek) {
30090          throw new FS.ErrnoError(70);
30091        }
30092        if (whence != 0 && whence != 1 && whence != 2) {
30093          throw new FS.ErrnoError(28);
30094        }
30095        stream.position = stream.stream_ops.llseek(stream, offset, whence);
30096        stream.ungotten = [];
30097        return stream.position;
30098      },read:function(stream, buffer, offset, length, position) {
30099        if (length < 0 || position < 0) {
30100          throw new FS.ErrnoError(28);
30101        }
30102        if (FS.isClosed(stream)) {
30103          throw new FS.ErrnoError(8);
30104        }
30105        if ((stream.flags & 2097155) === 1) {
30106          throw new FS.ErrnoError(8);
30107        }
30108        if (FS.isDir(stream.node.mode)) {
30109          throw new FS.ErrnoError(31);
30110        }
30111        if (!stream.stream_ops.read) {
30112          throw new FS.ErrnoError(28);
30113        }
30114        var seeking = typeof position !== 'undefined';
30115        if (!seeking) {
30116          position = stream.position;
30117        } else if (!stream.seekable) {
30118          throw new FS.ErrnoError(70);
30119        }
30120        var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position);
30121        if (!seeking) stream.position += bytesRead;
30122        return bytesRead;
30123      },write:function(stream, buffer, offset, length, position, canOwn) {
30124        if (length < 0 || position < 0) {
30125          throw new FS.ErrnoError(28);
30126        }
30127        if (FS.isClosed(stream)) {
30128          throw new FS.ErrnoError(8);
30129        }
30130        if ((stream.flags & 2097155) === 0) {
30131          throw new FS.ErrnoError(8);
30132        }
30133        if (FS.isDir(stream.node.mode)) {
30134          throw new FS.ErrnoError(31);
30135        }
30136        if (!stream.stream_ops.write) {
30137          throw new FS.ErrnoError(28);
30138        }
30139        if (stream.seekable && stream.flags & 1024) {
30140          // seek to the end before writing in append mode
30141          FS.llseek(stream, 0, 2);
30142        }
30143        var seeking = typeof position !== 'undefined';
30144        if (!seeking) {
30145          position = stream.position;
30146        } else if (!stream.seekable) {
30147          throw new FS.ErrnoError(70);
30148        }
30149        var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn);
30150        if (!seeking) stream.position += bytesWritten;
30151        try {
30152          if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path);
30153        } catch(e) {
30154          err("FS.trackingDelegate['onWriteToFile']('"+stream.path+"') threw an exception: " + e.message);
30155        }
30156        return bytesWritten;
30157      },allocate:function(stream, offset, length) {
30158        if (FS.isClosed(stream)) {
30159          throw new FS.ErrnoError(8);
30160        }
30161        if (offset < 0 || length <= 0) {
30162          throw new FS.ErrnoError(28);
30163        }
30164        if ((stream.flags & 2097155) === 0) {
30165          throw new FS.ErrnoError(8);
30166        }
30167        if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) {
30168          throw new FS.ErrnoError(43);
30169        }
30170        if (!stream.stream_ops.allocate) {
30171          throw new FS.ErrnoError(138);
30172        }
30173        stream.stream_ops.allocate(stream, offset, length);
30174      },mmap:function(stream, address, length, position, prot, flags) {
30175        // User requests writing to file (prot & PROT_WRITE != 0).
30176        // Checking if we have permissions to write to the file unless
30177        // MAP_PRIVATE flag is set. According to POSIX spec it is possible
30178        // to write to file opened in read-only mode with MAP_PRIVATE flag,
30179        // as all modifications will be visible only in the memory of
30180        // the current process.
30181        if ((prot & 2) !== 0
30182            && (flags & 2) === 0
30183            && (stream.flags & 2097155) !== 2) {
30184          throw new FS.ErrnoError(2);
30185        }
30186        if ((stream.flags & 2097155) === 1) {
30187          throw new FS.ErrnoError(2);
30188        }
30189        if (!stream.stream_ops.mmap) {
30190          throw new FS.ErrnoError(43);
30191        }
30192        return stream.stream_ops.mmap(stream, address, length, position, prot, flags);
30193      },msync:function(stream, buffer, offset, length, mmapFlags) {
30194        if (!stream || !stream.stream_ops.msync) {
30195          return 0;
30196        }
30197        return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags);
30198      },munmap:function(stream) {
30199        return 0;
30200      },ioctl:function(stream, cmd, arg) {
30201        if (!stream.stream_ops.ioctl) {
30202          throw new FS.ErrnoError(59);
30203        }
30204        return stream.stream_ops.ioctl(stream, cmd, arg);
30205      },readFile:function(path, opts) {
30206        opts = opts || {};
30207        opts.flags = opts.flags || 'r';
30208        opts.encoding = opts.encoding || 'binary';
30209        if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {
30210          throw new Error('Invalid encoding type "' + opts.encoding + '"');
30211        }
30212        var ret;
30213        var stream = FS.open(path, opts.flags);
30214        var stat = FS.stat(path);
30215        var length = stat.size;
30216        var buf = new Uint8Array(length);
30217        FS.read(stream, buf, 0, length, 0);
30218        if (opts.encoding === 'utf8') {
30219          ret = UTF8ArrayToString(buf, 0);
30220        } else if (opts.encoding === 'binary') {
30221          ret = buf;
30222        }
30223        FS.close(stream);
30224        return ret;
30225      },writeFile:function(path, data, opts) {
30226        opts = opts || {};
30227        opts.flags = opts.flags || 'w';
30228        var stream = FS.open(path, opts.flags, opts.mode);
30229        if (typeof data === 'string') {
30230          var buf = new Uint8Array(lengthBytesUTF8(data)+1);
30231          var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length);
30232          FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn);
30233        } else if (ArrayBuffer.isView(data)) {
30234          FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn);
30235        } else {
30236          throw new Error('Unsupported data type');
30237        }
30238        FS.close(stream);
30239      },cwd:function() {
30240        return FS.currentPath;
30241      },chdir:function(path) {
30242        var lookup = FS.lookupPath(path, { follow: true });
30243        if (lookup.node === null) {
30244          throw new FS.ErrnoError(44);
30245        }
30246        if (!FS.isDir(lookup.node.mode)) {
30247          throw new FS.ErrnoError(54);
30248        }
30249        var errCode = FS.nodePermissions(lookup.node, 'x');
30250        if (errCode) {
30251          throw new FS.ErrnoError(errCode);
30252        }
30253        FS.currentPath = lookup.path;
30254      },createDefaultDirectories:function() {
30255        FS.mkdir('/tmp');
30256        FS.mkdir('/home');
30257        FS.mkdir('/home/web_user');
30258      },createDefaultDevices:function() {
30259        // create /dev
30260        FS.mkdir('/dev');
30261        // setup /dev/null
30262        FS.registerDevice(FS.makedev(1, 3), {
30263          read: function() { return 0; },
30264          write: function(stream, buffer, offset, length, pos) { return length; }
30265        });
30266        FS.mkdev('/dev/null', FS.makedev(1, 3));
30267        // setup /dev/tty and /dev/tty1
30268        // stderr needs to print output using Module['printErr']
30269        // so we register a second tty just for it.
30270        TTY.register(FS.makedev(5, 0), TTY.default_tty_ops);
30271        TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops);
30272        FS.mkdev('/dev/tty', FS.makedev(5, 0));
30273        FS.mkdev('/dev/tty1', FS.makedev(6, 0));
30274        // setup /dev/[u]random
30275        var random_device;
30276        if (typeof crypto === 'object' && typeof crypto['getRandomValues'] === 'function') {
30277          // for modern web browsers
30278          var randomBuffer = new Uint8Array(1);
30279          random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; };
30280        } else
30281        if (ENVIRONMENT_IS_NODE) {
30282          // for nodejs with or without crypto support included
30283          try {
30284            var crypto_module = require('crypto');
30285            // nodejs has crypto support
30286            random_device = function() { return crypto_module['randomBytes'](1)[0]; };
30287          } catch (e) {
30288            // nodejs doesn't have crypto support
30289          }
30290        } else
30291        {}
30292        if (!random_device) {
30293          // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096
30294          random_device = function() { abort("random_device"); };
30295        }
30296        FS.createDevice('/dev', 'random', random_device);
30297        FS.createDevice('/dev', 'urandom', random_device);
30298        // we're not going to emulate the actual shm device,
30299        // just create the tmp dirs that reside in it commonly
30300        FS.mkdir('/dev/shm');
30301        FS.mkdir('/dev/shm/tmp');
30302      },createSpecialDirectories:function() {
30303        // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname)
30304        FS.mkdir('/proc');
30305        FS.mkdir('/proc/self');
30306        FS.mkdir('/proc/self/fd');
30307        FS.mount({
30308          mount: function() {
30309            var node = FS.createNode('/proc/self', 'fd', 16384 | 511 /* 0777 */, 73);
30310            node.node_ops = {
30311              lookup: function(parent, name) {
30312                var fd = +name;
30313                var stream = FS.getStream(fd);
30314                if (!stream) throw new FS.ErrnoError(8);
30315                var ret = {
30316                  parent: null,
30317                  mount: { mountpoint: 'fake' },
30318                  node_ops: { readlink: function() { return stream.path } }
30319                };
30320                ret.parent = ret; // make it look like a simple root node
30321                return ret;
30322              }
30323            };
30324            return node;
30325          }
30326        }, {}, '/proc/self/fd');
30327      },createStandardStreams:function() {
30328        // TODO deprecate the old functionality of a single
30329        // input / output callback and that utilizes FS.createDevice
30330        // and instead require a unique set of stream ops
30331
30332        // by default, we symlink the standard streams to the
30333        // default tty devices. however, if the standard streams
30334        // have been overwritten we create a unique device for
30335        // them instead.
30336        if (Module['stdin']) {
30337          FS.createDevice('/dev', 'stdin', Module['stdin']);
30338        } else {
30339          FS.symlink('/dev/tty', '/dev/stdin');
30340        }
30341        if (Module['stdout']) {
30342          FS.createDevice('/dev', 'stdout', null, Module['stdout']);
30343        } else {
30344          FS.symlink('/dev/tty', '/dev/stdout');
30345        }
30346        if (Module['stderr']) {
30347          FS.createDevice('/dev', 'stderr', null, Module['stderr']);
30348        } else {
30349          FS.symlink('/dev/tty1', '/dev/stderr');
30350        }
30351
30352        // open default streams for the stdin, stdout and stderr devices
30353        var stdin = FS.open('/dev/stdin', 'r');
30354        var stdout = FS.open('/dev/stdout', 'w');
30355        var stderr = FS.open('/dev/stderr', 'w');
30356      },ensureErrnoError:function() {
30357        if (FS.ErrnoError) return;
30358        FS.ErrnoError = /** @this{Object} */ function ErrnoError(errno, node) {
30359          this.node = node;
30360          this.setErrno = /** @this{Object} */ function(errno) {
30361            this.errno = errno;
30362          };
30363          this.setErrno(errno);
30364          this.message = 'FS error';
30365
30366        };
30367        FS.ErrnoError.prototype = new Error();
30368        FS.ErrnoError.prototype.constructor = FS.ErrnoError;
30369        // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info)
30370        [44].forEach(function(code) {
30371          FS.genericErrors[code] = new FS.ErrnoError(code);
30372          FS.genericErrors[code].stack = '<generic error, no stack>';
30373        });
30374      },staticInit:function() {
30375        FS.ensureErrnoError();
30376
30377        FS.nameTable = new Array(4096);
30378
30379        FS.mount(MEMFS, {}, '/');
30380
30381        FS.createDefaultDirectories();
30382        FS.createDefaultDevices();
30383        FS.createSpecialDirectories();
30384
30385        FS.filesystems = {
30386          'MEMFS': MEMFS,
30387        };
30388      },init:function(input, output, error) {
30389        FS.init.initialized = true;
30390
30391        FS.ensureErrnoError();
30392
30393        // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here
30394        Module['stdin'] = input || Module['stdin'];
30395        Module['stdout'] = output || Module['stdout'];
30396        Module['stderr'] = error || Module['stderr'];
30397
30398        FS.createStandardStreams();
30399      },quit:function() {
30400        FS.init.initialized = false;
30401        // force-flush all streams, so we get musl std streams printed out
30402        var fflush = Module['_fflush'];
30403        if (fflush) fflush(0);
30404        // close all of our streams
30405        for (var i = 0; i < FS.streams.length; i++) {
30406          var stream = FS.streams[i];
30407          if (!stream) {
30408            continue;
30409          }
30410          FS.close(stream);
30411        }
30412      },getMode:function(canRead, canWrite) {
30413        var mode = 0;
30414        if (canRead) mode |= 292 | 73;
30415        if (canWrite) mode |= 146;
30416        return mode;
30417      },joinPath:function(parts, forceRelative) {
30418        var path = PATH.join.apply(null, parts);
30419        if (forceRelative && path[0] == '/') path = path.substr(1);
30420        return path;
30421      },absolutePath:function(relative, base) {
30422        return PATH_FS.resolve(base, relative);
30423      },standardizePath:function(path) {
30424        return PATH.normalize(path);
30425      },findObject:function(path, dontResolveLastLink) {
30426        var ret = FS.analyzePath(path, dontResolveLastLink);
30427        if (ret.exists) {
30428          return ret.object;
30429        } else {
30430          setErrNo(ret.error);
30431          return null;
30432        }
30433      },analyzePath:function(path, dontResolveLastLink) {
30434        // operate from within the context of the symlink's target
30435        try {
30436          var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });
30437          path = lookup.path;
30438        } catch (e) {
30439        }
30440        var ret = {
30441          isRoot: false, exists: false, error: 0, name: null, path: null, object: null,
30442          parentExists: false, parentPath: null, parentObject: null
30443        };
30444        try {
30445          var lookup = FS.lookupPath(path, { parent: true });
30446          ret.parentExists = true;
30447          ret.parentPath = lookup.path;
30448          ret.parentObject = lookup.node;
30449          ret.name = PATH.basename(path);
30450          lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });
30451          ret.exists = true;
30452          ret.path = lookup.path;
30453          ret.object = lookup.node;
30454          ret.name = lookup.node.name;
30455          ret.isRoot = lookup.path === '/';
30456        } catch (e) {
30457          ret.error = e.errno;
30458        };
30459        return ret;
30460      },createFolder:function(parent, name, canRead, canWrite) {
30461        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
30462        var mode = FS.getMode(canRead, canWrite);
30463        return FS.mkdir(path, mode);
30464      },createPath:function(parent, path, canRead, canWrite) {
30465        parent = typeof parent === 'string' ? parent : FS.getPath(parent);
30466        var parts = path.split('/').reverse();
30467        while (parts.length) {
30468          var part = parts.pop();
30469          if (!part) continue;
30470          var current = PATH.join2(parent, part);
30471          try {
30472            FS.mkdir(current);
30473          } catch (e) {
30474            // ignore EEXIST
30475          }
30476          parent = current;
30477        }
30478        return current;
30479      },createFile:function(parent, name, properties, canRead, canWrite) {
30480        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
30481        var mode = FS.getMode(canRead, canWrite);
30482        return FS.create(path, mode);
30483      },createDataFile:function(parent, name, data, canRead, canWrite, canOwn) {
30484        var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent;
30485        var mode = FS.getMode(canRead, canWrite);
30486        var node = FS.create(path, mode);
30487        if (data) {
30488          if (typeof data === 'string') {
30489            var arr = new Array(data.length);
30490            for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);
30491            data = arr;
30492          }
30493          // make sure we can write to the file
30494          FS.chmod(node, mode | 146);
30495          var stream = FS.open(node, 'w');
30496          FS.write(stream, data, 0, data.length, 0, canOwn);
30497          FS.close(stream);
30498          FS.chmod(node, mode);
30499        }
30500        return node;
30501      },createDevice:function(parent, name, input, output) {
30502        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
30503        var mode = FS.getMode(!!input, !!output);
30504        if (!FS.createDevice.major) FS.createDevice.major = 64;
30505        var dev = FS.makedev(FS.createDevice.major++, 0);
30506        // Create a fake device that a set of stream ops to emulate
30507        // the old behavior.
30508        FS.registerDevice(dev, {
30509          open: function(stream) {
30510            stream.seekable = false;
30511          },
30512          close: function(stream) {
30513            // flush any pending line data
30514            if (output && output.buffer && output.buffer.length) {
30515              output(10);
30516            }
30517          },
30518          read: function(stream, buffer, offset, length, pos /* ignored */) {
30519            var bytesRead = 0;
30520            for (var i = 0; i < length; i++) {
30521              var result;
30522              try {
30523                result = input();
30524              } catch (e) {
30525                throw new FS.ErrnoError(29);
30526              }
30527              if (result === undefined && bytesRead === 0) {
30528                throw new FS.ErrnoError(6);
30529              }
30530              if (result === null || result === undefined) break;
30531              bytesRead++;
30532              buffer[offset+i] = result;
30533            }
30534            if (bytesRead) {
30535              stream.node.timestamp = Date.now();
30536            }
30537            return bytesRead;
30538          },
30539          write: function(stream, buffer, offset, length, pos) {
30540            for (var i = 0; i < length; i++) {
30541              try {
30542                output(buffer[offset+i]);
30543              } catch (e) {
30544                throw new FS.ErrnoError(29);
30545              }
30546            }
30547            if (length) {
30548              stream.node.timestamp = Date.now();
30549            }
30550            return i;
30551          }
30552        });
30553        return FS.mkdev(path, mode, dev);
30554      },createLink:function(parent, name, target, canRead, canWrite) {
30555        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
30556        return FS.symlink(target, path);
30557      },forceLoadFile:function(obj) {
30558        if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true;
30559        var success = true;
30560        if (typeof XMLHttpRequest !== 'undefined') {
30561          throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
30562        } else if (read_) {
30563          // Command-line.
30564          try {
30565            // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as
30566            //          read() will try to parse UTF8.
30567            obj.contents = intArrayFromString(read_(obj.url), true);
30568            obj.usedBytes = obj.contents.length;
30569          } catch (e) {
30570            success = false;
30571          }
30572        } else {
30573          throw new Error('Cannot load without read() or XMLHttpRequest.');
30574        }
30575        if (!success) setErrNo(29);
30576        return success;
30577      },createLazyFile:function(parent, name, url, canRead, canWrite) {
30578        // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse.
30579        /** @constructor */
30580        function LazyUint8Array() {
30581          this.lengthKnown = false;
30582          this.chunks = []; // Loaded chunks. Index is the chunk number
30583        }
30584        LazyUint8Array.prototype.get = /** @this{Object} */ function LazyUint8Array_get(idx) {
30585          if (idx > this.length-1 || idx < 0) {
30586            return undefined;
30587          }
30588          var chunkOffset = idx % this.chunkSize;
30589          var chunkNum = (idx / this.chunkSize)|0;
30590          return this.getter(chunkNum)[chunkOffset];
30591        };
30592        LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) {
30593          this.getter = getter;
30594        };
30595        LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() {
30596          // Find length
30597          var xhr = new XMLHttpRequest();
30598          xhr.open('HEAD', url, false);
30599          xhr.send(null);
30600          if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
30601          var datalength = Number(xhr.getResponseHeader("Content-length"));
30602          var header;
30603          var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes";
30604          var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip";
30605
30606          var chunkSize = 1024*1024; // Chunk size in bytes
30607
30608          if (!hasByteServing) chunkSize = datalength;
30609
30610          // Function to get a range from the remote URL.
30611          var doXHR = (function(from, to) {
30612            if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!");
30613            if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!");
30614
30615            // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available.
30616            var xhr = new XMLHttpRequest();
30617            xhr.open('GET', url, false);
30618            if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to);
30619
30620            // Some hints to the browser that we want binary data.
30621            if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer';
30622            if (xhr.overrideMimeType) {
30623              xhr.overrideMimeType('text/plain; charset=x-user-defined');
30624            }
30625
30626            xhr.send(null);
30627            if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
30628            if (xhr.response !== undefined) {
30629              return new Uint8Array(/** @type{Array<number>} */(xhr.response || []));
30630            } else {
30631              return intArrayFromString(xhr.responseText || '', true);
30632            }
30633          });
30634          var lazyArray = this;
30635          lazyArray.setDataGetter(function(chunkNum) {
30636            var start = chunkNum * chunkSize;
30637            var end = (chunkNum+1) * chunkSize - 1; // including this byte
30638            end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block
30639            if (typeof(lazyArray.chunks[chunkNum]) === "undefined") {
30640              lazyArray.chunks[chunkNum] = doXHR(start, end);
30641            }
30642            if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!");
30643            return lazyArray.chunks[chunkNum];
30644          });
30645
30646          if (usesGzip || !datalength) {
30647            // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length
30648            chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file
30649            datalength = this.getter(0).length;
30650            chunkSize = datalength;
30651            out("LazyFiles on gzip forces download of the whole file when length is accessed");
30652          }
30653
30654          this._length = datalength;
30655          this._chunkSize = chunkSize;
30656          this.lengthKnown = true;
30657        };
30658        if (typeof XMLHttpRequest !== 'undefined') {
30659          if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc';
30660          var lazyArray = new LazyUint8Array();
30661          Object.defineProperties(lazyArray, {
30662            length: {
30663              get: /** @this{Object} */ function() {
30664                if(!this.lengthKnown) {
30665                  this.cacheLength();
30666                }
30667                return this._length;
30668              }
30669            },
30670            chunkSize: {
30671              get: /** @this{Object} */ function() {
30672                if(!this.lengthKnown) {
30673                  this.cacheLength();
30674                }
30675                return this._chunkSize;
30676              }
30677            }
30678          });
30679
30680          var properties = { isDevice: false, contents: lazyArray };
30681        } else {
30682          var properties = { isDevice: false, url: url };
30683        }
30684
30685        var node = FS.createFile(parent, name, properties, canRead, canWrite);
30686        // This is a total hack, but I want to get this lazy file code out of the
30687        // core of MEMFS. If we want to keep this lazy file concept I feel it should
30688        // be its own thin LAZYFS proxying calls to MEMFS.
30689        if (properties.contents) {
30690          node.contents = properties.contents;
30691        } else if (properties.url) {
30692          node.contents = null;
30693          node.url = properties.url;
30694        }
30695        // Add a function that defers querying the file size until it is asked the first time.
30696        Object.defineProperties(node, {
30697          usedBytes: {
30698            get: /** @this {FSNode} */ function() { return this.contents.length; }
30699          }
30700        });
30701        // override each stream op with one that tries to force load the lazy file first
30702        var stream_ops = {};
30703        var keys = Object.keys(node.stream_ops);
30704        keys.forEach(function(key) {
30705          var fn = node.stream_ops[key];
30706          stream_ops[key] = function forceLoadLazyFile() {
30707            if (!FS.forceLoadFile(node)) {
30708              throw new FS.ErrnoError(29);
30709            }
30710            return fn.apply(null, arguments);
30711          };
30712        });
30713        // use a custom read function
30714        stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) {
30715          if (!FS.forceLoadFile(node)) {
30716            throw new FS.ErrnoError(29);
30717          }
30718          var contents = stream.node.contents;
30719          if (position >= contents.length)
30720            return 0;
30721          var size = Math.min(contents.length - position, length);
30722          if (contents.slice) { // normal array
30723            for (var i = 0; i < size; i++) {
30724              buffer[offset + i] = contents[position + i];
30725            }
30726          } else {
30727            for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR
30728              buffer[offset + i] = contents.get(position + i);
30729            }
30730          }
30731          return size;
30732        };
30733        node.stream_ops = stream_ops;
30734        return node;
30735      },createPreloadedFile:function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) {
30736        Browser.init(); // XXX perhaps this method should move onto Browser?
30737        // TODO we should allow people to just pass in a complete filename instead
30738        // of parent and name being that we just join them anyways
30739        var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent;
30740        var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname
30741        function processData(byteArray) {
30742          function finish(byteArray) {
30743            if (preFinish) preFinish();
30744            if (!dontCreateFile) {
30745              FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn);
30746            }
30747            if (onload) onload();
30748            removeRunDependency(dep);
30749          }
30750          var handled = false;
30751          Module['preloadPlugins'].forEach(function(plugin) {
30752            if (handled) return;
30753            if (plugin['canHandle'](fullname)) {
30754              plugin['handle'](byteArray, fullname, finish, function() {
30755                if (onerror) onerror();
30756                removeRunDependency(dep);
30757              });
30758              handled = true;
30759            }
30760          });
30761          if (!handled) finish(byteArray);
30762        }
30763        addRunDependency(dep);
30764        if (typeof url == 'string') {
30765          Browser.asyncLoad(url, function(byteArray) {
30766            processData(byteArray);
30767          }, onerror);
30768        } else {
30769          processData(url);
30770        }
30771      },indexedDB:function() {
30772        return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
30773      },DB_NAME:function() {
30774        return 'EM_FS_' + window.location.pathname;
30775      },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(paths, onload, onerror) {
30776        onload = onload || function(){};
30777        onerror = onerror || function(){};
30778        var indexedDB = FS.indexedDB();
30779        try {
30780          var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);
30781        } catch (e) {
30782          return onerror(e);
30783        }
30784        openRequest.onupgradeneeded = function openRequest_onupgradeneeded() {
30785          out('creating db');
30786          var db = openRequest.result;
30787          db.createObjectStore(FS.DB_STORE_NAME);
30788        };
30789        openRequest.onsuccess = function openRequest_onsuccess() {
30790          var db = openRequest.result;
30791          var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite');
30792          var files = transaction.objectStore(FS.DB_STORE_NAME);
30793          var ok = 0, fail = 0, total = paths.length;
30794          function finish() {
30795            if (fail == 0) onload(); else onerror();
30796          }
30797          paths.forEach(function(path) {
30798            var putRequest = files.put(FS.analyzePath(path).object.contents, path);
30799            putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() };
30800            putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() };
30801          });
30802          transaction.onerror = onerror;
30803        };
30804        openRequest.onerror = onerror;
30805      },loadFilesFromDB:function(paths, onload, onerror) {
30806        onload = onload || function(){};
30807        onerror = onerror || function(){};
30808        var indexedDB = FS.indexedDB();
30809        try {
30810          var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);
30811        } catch (e) {
30812          return onerror(e);
30813        }
30814        openRequest.onupgradeneeded = onerror; // no database to load from
30815        openRequest.onsuccess = function openRequest_onsuccess() {
30816          var db = openRequest.result;
30817          try {
30818            var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly');
30819          } catch(e) {
30820            onerror(e);
30821            return;
30822          }
30823          var files = transaction.objectStore(FS.DB_STORE_NAME);
30824          var ok = 0, fail = 0, total = paths.length;
30825          function finish() {
30826            if (fail == 0) onload(); else onerror();
30827          }
30828          paths.forEach(function(path) {
30829            var getRequest = files.get(path);
30830            getRequest.onsuccess = function getRequest_onsuccess() {
30831              if (FS.analyzePath(path).exists) {
30832                FS.unlink(path);
30833              }
30834              FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true);
30835              ok++;
30836              if (ok + fail == total) finish();
30837            };
30838            getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() };
30839          });
30840          transaction.onerror = onerror;
30841        };
30842        openRequest.onerror = onerror;
30843      }};var SYSCALLS={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(dirfd, path) {
30844        if (path[0] !== '/') {
30845          // relative path
30846          var dir;
30847          if (dirfd === -100) {
30848            dir = FS.cwd();
30849          } else {
30850            var dirstream = FS.getStream(dirfd);
30851            if (!dirstream) throw new FS.ErrnoError(8);
30852            dir = dirstream.path;
30853          }
30854          path = PATH.join2(dir, path);
30855        }
30856        return path;
30857      },doStat:function(func, path, buf) {
30858        try {
30859          var stat = func(path);
30860        } catch (e) {
30861          if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
30862            // an error occurred while trying to look up the path; we should just report ENOTDIR
30863            return -54;
30864          }
30865          throw e;
30866        }
30867        HEAP32[((buf)>>2)]=stat.dev;
30868        HEAP32[(((buf)+(4))>>2)]=0;
30869        HEAP32[(((buf)+(8))>>2)]=stat.ino;
30870        HEAP32[(((buf)+(12))>>2)]=stat.mode;
30871        HEAP32[(((buf)+(16))>>2)]=stat.nlink;
30872        HEAP32[(((buf)+(20))>>2)]=stat.uid;
30873        HEAP32[(((buf)+(24))>>2)]=stat.gid;
30874        HEAP32[(((buf)+(28))>>2)]=stat.rdev;
30875        HEAP32[(((buf)+(32))>>2)]=0;
30876        (tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(40))>>2)]=tempI64[0],HEAP32[(((buf)+(44))>>2)]=tempI64[1]);
30877        HEAP32[(((buf)+(48))>>2)]=4096;
30878        HEAP32[(((buf)+(52))>>2)]=stat.blocks;
30879        HEAP32[(((buf)+(56))>>2)]=(stat.atime.getTime() / 1000)|0;
30880        HEAP32[(((buf)+(60))>>2)]=0;
30881        HEAP32[(((buf)+(64))>>2)]=(stat.mtime.getTime() / 1000)|0;
30882        HEAP32[(((buf)+(68))>>2)]=0;
30883        HEAP32[(((buf)+(72))>>2)]=(stat.ctime.getTime() / 1000)|0;
30884        HEAP32[(((buf)+(76))>>2)]=0;
30885        (tempI64 = [stat.ino>>>0,(tempDouble=stat.ino,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(80))>>2)]=tempI64[0],HEAP32[(((buf)+(84))>>2)]=tempI64[1]);
30886        return 0;
30887      },doMsync:function(addr, stream, len, flags, offset) {
30888        var buffer = HEAPU8.slice(addr, addr + len);
30889        FS.msync(stream, buffer, offset, len, flags);
30890      },doMkdir:function(path, mode) {
30891        // remove a trailing slash, if one - /a/b/ has basename of '', but
30892        // we want to create b in the context of this function
30893        path = PATH.normalize(path);
30894        if (path[path.length-1] === '/') path = path.substr(0, path.length-1);
30895        FS.mkdir(path, mode, 0);
30896        return 0;
30897      },doMknod:function(path, mode, dev) {
30898        // we don't want this in the JS API as it uses mknod to create all nodes.
30899        switch (mode & 61440) {
30900          case 32768:
30901          case 8192:
30902          case 24576:
30903          case 4096:
30904          case 49152:
30905            break;
30906          default: return -28;
30907        }
30908        FS.mknod(path, mode, dev);
30909        return 0;
30910      },doReadlink:function(path, buf, bufsize) {
30911        if (bufsize <= 0) return -28;
30912        var ret = FS.readlink(path);
30913
30914        var len = Math.min(bufsize, lengthBytesUTF8(ret));
30915        var endChar = HEAP8[buf+len];
30916        stringToUTF8(ret, buf, bufsize+1);
30917        // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!)
30918        // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write.
30919        HEAP8[buf+len] = endChar;
30920
30921        return len;
30922      },doAccess:function(path, amode) {
30923        if (amode & ~7) {
30924          // need a valid mode
30925          return -28;
30926        }
30927        var node;
30928        var lookup = FS.lookupPath(path, { follow: true });
30929        node = lookup.node;
30930        if (!node) {
30931          return -44;
30932        }
30933        var perms = '';
30934        if (amode & 4) perms += 'r';
30935        if (amode & 2) perms += 'w';
30936        if (amode & 1) perms += 'x';
30937        if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) {
30938          return -2;
30939        }
30940        return 0;
30941      },doDup:function(path, flags, suggestFD) {
30942        var suggest = FS.getStream(suggestFD);
30943        if (suggest) FS.close(suggest);
30944        return FS.open(path, flags, 0, suggestFD, suggestFD).fd;
30945      },doReadv:function(stream, iov, iovcnt, offset) {
30946        var ret = 0;
30947        for (var i = 0; i < iovcnt; i++) {
30948          var ptr = HEAP32[(((iov)+(i*8))>>2)];
30949          var len = HEAP32[(((iov)+(i*8 + 4))>>2)];
30950          var curr = FS.read(stream, HEAP8,ptr, len, offset);
30951          if (curr < 0) return -1;
30952          ret += curr;
30953          if (curr < len) break; // nothing more to read
30954        }
30955        return ret;
30956      },doWritev:function(stream, iov, iovcnt, offset) {
30957        var ret = 0;
30958        for (var i = 0; i < iovcnt; i++) {
30959          var ptr = HEAP32[(((iov)+(i*8))>>2)];
30960          var len = HEAP32[(((iov)+(i*8 + 4))>>2)];
30961          var curr = FS.write(stream, HEAP8,ptr, len, offset);
30962          if (curr < 0) return -1;
30963          ret += curr;
30964        }
30965        return ret;
30966      },varargs:undefined,get:function() {
30967        SYSCALLS.varargs += 4;
30968        var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)];
30969        return ret;
30970      },getStr:function(ptr) {
30971        var ret = UTF8ToString(ptr);
30972        return ret;
30973      },getStreamFromFD:function(fd) {
30974        var stream = FS.getStream(fd);
30975        if (!stream) throw new FS.ErrnoError(8);
30976        return stream;
30977      },get64:function(low, high) {
30978        return low;
30979      }};function _fd_close(fd) {try {
30980
30981      var stream = SYSCALLS.getStreamFromFD(fd);
30982      FS.close(stream);
30983      return 0;
30984    } catch (e) {
30985    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
30986    return e.errno;
30987  }
30988  }
30989
30990  function _fd_read(fd, iov, iovcnt, pnum) {try {
30991
30992      var stream = SYSCALLS.getStreamFromFD(fd);
30993      var num = SYSCALLS.doReadv(stream, iov, iovcnt);
30994      HEAP32[((pnum)>>2)]=num
30995      return 0;
30996    } catch (e) {
30997    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
30998    return e.errno;
30999  }
31000  }
31001
31002  function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {try {
31003
31004
31005      var stream = SYSCALLS.getStreamFromFD(fd);
31006      var HIGH_OFFSET = 0x100000000; // 2^32
31007      // use an unsigned operator on low and shift high by 32-bits
31008      var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0);
31009
31010      var DOUBLE_LIMIT = 0x20000000000000; // 2^53
31011      // we also check for equality since DOUBLE_LIMIT + 1 == DOUBLE_LIMIT
31012      if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) {
31013        return -61;
31014      }
31015
31016      FS.llseek(stream, offset, whence);
31017      (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((newOffset)>>2)]=tempI64[0],HEAP32[(((newOffset)+(4))>>2)]=tempI64[1]);
31018      if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state
31019      return 0;
31020    } catch (e) {
31021    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
31022    return e.errno;
31023  }
31024  }
31025
31026  function _fd_write(fd, iov, iovcnt, pnum) {try {
31027
31028      var stream = SYSCALLS.getStreamFromFD(fd);
31029      var num = SYSCALLS.doWritev(stream, iov, iovcnt);
31030      HEAP32[((pnum)>>2)]=num
31031      return 0;
31032    } catch (e) {
31033    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
31034    return e.errno;
31035  }
31036  }
31037
31038
31039  function _round(d) {
31040      d = +d;
31041      return d >= +0 ? +Math_floor(d + +0.5) : +Math_ceil(d - +0.5);
31042    }
31043
31044  function _setTempRet0($i) {
31045      setTempRet0(($i) | 0);
31046    }
31047var FSNode = /** @constructor */ function(parent, name, mode, rdev) {
31048    if (!parent) {
31049      parent = this;  // root node sets parent to itself
31050    }
31051    this.parent = parent;
31052    this.mount = parent.mount;
31053    this.mounted = null;
31054    this.id = FS.nextInode++;
31055    this.name = name;
31056    this.mode = mode;
31057    this.node_ops = {};
31058    this.stream_ops = {};
31059    this.rdev = rdev;
31060  };
31061  var readMode = 292/*292*/ | 73/*73*/;
31062  var writeMode = 146/*146*/;
31063  Object.defineProperties(FSNode.prototype, {
31064   read: {
31065    get: /** @this{FSNode} */function() {
31066     return (this.mode & readMode) === readMode;
31067    },
31068    set: /** @this{FSNode} */function(val) {
31069     val ? this.mode |= readMode : this.mode &= ~readMode;
31070    }
31071   },
31072   write: {
31073    get: /** @this{FSNode} */function() {
31074     return (this.mode & writeMode) === writeMode;
31075    },
31076    set: /** @this{FSNode} */function(val) {
31077     val ? this.mode |= writeMode : this.mode &= ~writeMode;
31078    }
31079   },
31080   isFolder: {
31081    get: /** @this{FSNode} */function() {
31082     return FS.isDir(this.mode);
31083    }
31084   },
31085   isDevice: {
31086    get: /** @this{FSNode} */function() {
31087     return FS.isChrdev(this.mode);
31088    }
31089   }
31090  });
31091  FS.FSNode = FSNode;
31092  FS.staticInit();;
31093var ASSERTIONS = false;
31094
31095
31096
31097/** @type {function(string, boolean=, number=)} */
31098function intArrayFromString(stringy, dontAddNull, length) {
31099  var len = length > 0 ? length : lengthBytesUTF8(stringy)+1;
31100  var u8array = new Array(len);
31101  var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);
31102  if (dontAddNull) u8array.length = numBytesWritten;
31103  return u8array;
31104}
31105
31106function intArrayToString(array) {
31107  var ret = [];
31108  for (var i = 0; i < array.length; i++) {
31109    var chr = array[i];
31110    if (chr > 0xFF) {
31111      if (ASSERTIONS) {
31112        assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ')  at offset ' + i + ' not in 0x00-0xFF.');
31113      }
31114      chr &= 0xFF;
31115    }
31116    ret.push(String.fromCharCode(chr));
31117  }
31118  return ret.join('');
31119}
31120
31121
31122// Copied from https://github.com/strophe/strophejs/blob/e06d027/src/polyfills.js#L149
31123
31124// This code was written by Tyler Akins and has been placed in the
31125// public domain.  It would be nice if you left this header intact.
31126// Base64 code from Tyler Akins -- http://rumkin.com
31127
31128/**
31129 * Decodes a base64 string.
31130 * @param {string} input The string to decode.
31131 */
31132var decodeBase64 = typeof atob === 'function' ? atob : function (input) {
31133  var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
31134
31135  var output = '';
31136  var chr1, chr2, chr3;
31137  var enc1, enc2, enc3, enc4;
31138  var i = 0;
31139  // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
31140  input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
31141  do {
31142    enc1 = keyStr.indexOf(input.charAt(i++));
31143    enc2 = keyStr.indexOf(input.charAt(i++));
31144    enc3 = keyStr.indexOf(input.charAt(i++));
31145    enc4 = keyStr.indexOf(input.charAt(i++));
31146
31147    chr1 = (enc1 << 2) | (enc2 >> 4);
31148    chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
31149    chr3 = ((enc3 & 3) << 6) | enc4;
31150
31151    output = output + String.fromCharCode(chr1);
31152
31153    if (enc3 !== 64) {
31154      output = output + String.fromCharCode(chr2);
31155    }
31156    if (enc4 !== 64) {
31157      output = output + String.fromCharCode(chr3);
31158    }
31159  } while (i < input.length);
31160  return output;
31161};
31162
31163// Converts a string of base64 into a byte array.
31164// Throws error on invalid input.
31165function intArrayFromBase64(s) {
31166  if (typeof ENVIRONMENT_IS_NODE === 'boolean' && ENVIRONMENT_IS_NODE) {
31167    var buf;
31168    try {
31169      // TODO: Update Node.js externs, Closure does not recognize the following Buffer.from()
31170      /**@suppress{checkTypes}*/
31171      buf = Buffer.from(s, 'base64');
31172    } catch (_) {
31173      buf = new Buffer(s, 'base64');
31174    }
31175    return new Uint8Array(buf['buffer'], buf['byteOffset'], buf['byteLength']);
31176  }
31177
31178  try {
31179    var decoded = decodeBase64(s);
31180    var bytes = new Uint8Array(decoded.length);
31181    for (var i = 0 ; i < decoded.length ; ++i) {
31182      bytes[i] = decoded.charCodeAt(i);
31183    }
31184    return bytes;
31185  } catch (_) {
31186    throw new Error('Converting base64 string to bytes failed.');
31187  }
31188}
31189
31190// If filename is a base64 data URI, parses and returns data (Buffer on node,
31191// Uint8Array otherwise). If filename is not a base64 data URI, returns undefined.
31192function tryParseAsDataURI(filename) {
31193  if (!isDataURI(filename)) {
31194    return;
31195  }
31196
31197  return intArrayFromBase64(filename.slice(dataURIPrefix.length));
31198}
31199
31200
31201// ASM_LIBRARY EXTERN PRIMITIVES: Math_floor,Math_ceil
31202
31203var asmGlobalArg = {};
31204var asmLibraryArg = { "emscripten_get_sbrk_ptr": _emscripten_get_sbrk_ptr, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "fd_close": _fd_close, "fd_read": _fd_read, "fd_seek": _fd_seek, "fd_write": _fd_write, "getTempRet0": getTempRet0, "memory": wasmMemory, "round": _round, "setTempRet0": setTempRet0, "table": wasmTable };
31205var asm = createWasm();
31206/** @type {function(...*):?} */
31207var ___wasm_call_ctors = Module["___wasm_call_ctors"] = function() {
31208  return (___wasm_call_ctors = Module["___wasm_call_ctors"] = Module["asm"]["__wasm_call_ctors"]).apply(null, arguments);
31209};
31210
31211/** @type {function(...*):?} */
31212var _FLAC__stream_decoder_new = Module["_FLAC__stream_decoder_new"] = function() {
31213  return (_FLAC__stream_decoder_new = Module["_FLAC__stream_decoder_new"] = Module["asm"]["FLAC__stream_decoder_new"]).apply(null, arguments);
31214};
31215
31216/** @type {function(...*):?} */
31217var _FLAC__stream_decoder_delete = Module["_FLAC__stream_decoder_delete"] = function() {
31218  return (_FLAC__stream_decoder_delete = Module["_FLAC__stream_decoder_delete"] = Module["asm"]["FLAC__stream_decoder_delete"]).apply(null, arguments);
31219};
31220
31221/** @type {function(...*):?} */
31222var _FLAC__stream_decoder_finish = Module["_FLAC__stream_decoder_finish"] = function() {
31223  return (_FLAC__stream_decoder_finish = Module["_FLAC__stream_decoder_finish"] = Module["asm"]["FLAC__stream_decoder_finish"]).apply(null, arguments);
31224};
31225
31226/** @type {function(...*):?} */
31227var _FLAC__stream_decoder_init_stream = Module["_FLAC__stream_decoder_init_stream"] = function() {
31228  return (_FLAC__stream_decoder_init_stream = Module["_FLAC__stream_decoder_init_stream"] = Module["asm"]["FLAC__stream_decoder_init_stream"]).apply(null, arguments);
31229};
31230
31231/** @type {function(...*):?} */
31232var _FLAC__stream_decoder_reset = Module["_FLAC__stream_decoder_reset"] = function() {
31233  return (_FLAC__stream_decoder_reset = Module["_FLAC__stream_decoder_reset"] = Module["asm"]["FLAC__stream_decoder_reset"]).apply(null, arguments);
31234};
31235
31236/** @type {function(...*):?} */
31237var _FLAC__stream_decoder_init_ogg_stream = Module["_FLAC__stream_decoder_init_ogg_stream"] = function() {
31238  return (_FLAC__stream_decoder_init_ogg_stream = Module["_FLAC__stream_decoder_init_ogg_stream"] = Module["asm"]["FLAC__stream_decoder_init_ogg_stream"]).apply(null, arguments);
31239};
31240
31241/** @type {function(...*):?} */
31242var _FLAC__stream_decoder_set_ogg_serial_number = Module["_FLAC__stream_decoder_set_ogg_serial_number"] = function() {
31243  return (_FLAC__stream_decoder_set_ogg_serial_number = Module["_FLAC__stream_decoder_set_ogg_serial_number"] = Module["asm"]["FLAC__stream_decoder_set_ogg_serial_number"]).apply(null, arguments);
31244};
31245
31246/** @type {function(...*):?} */
31247var _FLAC__stream_decoder_set_md5_checking = Module["_FLAC__stream_decoder_set_md5_checking"] = function() {
31248  return (_FLAC__stream_decoder_set_md5_checking = Module["_FLAC__stream_decoder_set_md5_checking"] = Module["asm"]["FLAC__stream_decoder_set_md5_checking"]).apply(null, arguments);
31249};
31250
31251/** @type {function(...*):?} */
31252var _FLAC__stream_decoder_set_metadata_respond = Module["_FLAC__stream_decoder_set_metadata_respond"] = function() {
31253  return (_FLAC__stream_decoder_set_metadata_respond = Module["_FLAC__stream_decoder_set_metadata_respond"] = Module["asm"]["FLAC__stream_decoder_set_metadata_respond"]).apply(null, arguments);
31254};
31255
31256/** @type {function(...*):?} */
31257var _FLAC__stream_decoder_set_metadata_respond_application = Module["_FLAC__stream_decoder_set_metadata_respond_application"] = function() {
31258  return (_FLAC__stream_decoder_set_metadata_respond_application = Module["_FLAC__stream_decoder_set_metadata_respond_application"] = Module["asm"]["FLAC__stream_decoder_set_metadata_respond_application"]).apply(null, arguments);
31259};
31260
31261/** @type {function(...*):?} */
31262var _FLAC__stream_decoder_set_metadata_respond_all = Module["_FLAC__stream_decoder_set_metadata_respond_all"] = function() {
31263  return (_FLAC__stream_decoder_set_metadata_respond_all = Module["_FLAC__stream_decoder_set_metadata_respond_all"] = Module["asm"]["FLAC__stream_decoder_set_metadata_respond_all"]).apply(null, arguments);
31264};
31265
31266/** @type {function(...*):?} */
31267var _FLAC__stream_decoder_set_metadata_ignore = Module["_FLAC__stream_decoder_set_metadata_ignore"] = function() {
31268  return (_FLAC__stream_decoder_set_metadata_ignore = Module["_FLAC__stream_decoder_set_metadata_ignore"] = Module["asm"]["FLAC__stream_decoder_set_metadata_ignore"]).apply(null, arguments);
31269};
31270
31271/** @type {function(...*):?} */
31272var _FLAC__stream_decoder_set_metadata_ignore_application = Module["_FLAC__stream_decoder_set_metadata_ignore_application"] = function() {
31273  return (_FLAC__stream_decoder_set_metadata_ignore_application = Module["_FLAC__stream_decoder_set_metadata_ignore_application"] = Module["asm"]["FLAC__stream_decoder_set_metadata_ignore_application"]).apply(null, arguments);
31274};
31275
31276/** @type {function(...*):?} */
31277var _FLAC__stream_decoder_set_metadata_ignore_all = Module["_FLAC__stream_decoder_set_metadata_ignore_all"] = function() {
31278  return (_FLAC__stream_decoder_set_metadata_ignore_all = Module["_FLAC__stream_decoder_set_metadata_ignore_all"] = Module["asm"]["FLAC__stream_decoder_set_metadata_ignore_all"]).apply(null, arguments);
31279};
31280
31281/** @type {function(...*):?} */
31282var _FLAC__stream_decoder_get_state = Module["_FLAC__stream_decoder_get_state"] = function() {
31283  return (_FLAC__stream_decoder_get_state = Module["_FLAC__stream_decoder_get_state"] = Module["asm"]["FLAC__stream_decoder_get_state"]).apply(null, arguments);
31284};
31285
31286/** @type {function(...*):?} */
31287var _FLAC__stream_decoder_get_md5_checking = Module["_FLAC__stream_decoder_get_md5_checking"] = function() {
31288  return (_FLAC__stream_decoder_get_md5_checking = Module["_FLAC__stream_decoder_get_md5_checking"] = Module["asm"]["FLAC__stream_decoder_get_md5_checking"]).apply(null, arguments);
31289};
31290
31291/** @type {function(...*):?} */
31292var _FLAC__stream_decoder_process_single = Module["_FLAC__stream_decoder_process_single"] = function() {
31293  return (_FLAC__stream_decoder_process_single = Module["_FLAC__stream_decoder_process_single"] = Module["asm"]["FLAC__stream_decoder_process_single"]).apply(null, arguments);
31294};
31295
31296/** @type {function(...*):?} */
31297var _FLAC__stream_decoder_process_until_end_of_metadata = Module["_FLAC__stream_decoder_process_until_end_of_metadata"] = function() {
31298  return (_FLAC__stream_decoder_process_until_end_of_metadata = Module["_FLAC__stream_decoder_process_until_end_of_metadata"] = Module["asm"]["FLAC__stream_decoder_process_until_end_of_metadata"]).apply(null, arguments);
31299};
31300
31301/** @type {function(...*):?} */
31302var _FLAC__stream_decoder_process_until_end_of_stream = Module["_FLAC__stream_decoder_process_until_end_of_stream"] = function() {
31303  return (_FLAC__stream_decoder_process_until_end_of_stream = Module["_FLAC__stream_decoder_process_until_end_of_stream"] = Module["asm"]["FLAC__stream_decoder_process_until_end_of_stream"]).apply(null, arguments);
31304};
31305
31306/** @type {function(...*):?} */
31307var _FLAC__stream_encoder_new = Module["_FLAC__stream_encoder_new"] = function() {
31308  return (_FLAC__stream_encoder_new = Module["_FLAC__stream_encoder_new"] = Module["asm"]["FLAC__stream_encoder_new"]).apply(null, arguments);
31309};
31310
31311/** @type {function(...*):?} */
31312var _FLAC__stream_encoder_delete = Module["_FLAC__stream_encoder_delete"] = function() {
31313  return (_FLAC__stream_encoder_delete = Module["_FLAC__stream_encoder_delete"] = Module["asm"]["FLAC__stream_encoder_delete"]).apply(null, arguments);
31314};
31315
31316/** @type {function(...*):?} */
31317var _FLAC__stream_encoder_finish = Module["_FLAC__stream_encoder_finish"] = function() {
31318  return (_FLAC__stream_encoder_finish = Module["_FLAC__stream_encoder_finish"] = Module["asm"]["FLAC__stream_encoder_finish"]).apply(null, arguments);
31319};
31320
31321/** @type {function(...*):?} */
31322var _FLAC__stream_encoder_init_stream = Module["_FLAC__stream_encoder_init_stream"] = function() {
31323  return (_FLAC__stream_encoder_init_stream = Module["_FLAC__stream_encoder_init_stream"] = Module["asm"]["FLAC__stream_encoder_init_stream"]).apply(null, arguments);
31324};
31325
31326/** @type {function(...*):?} */
31327var _FLAC__stream_encoder_init_ogg_stream = Module["_FLAC__stream_encoder_init_ogg_stream"] = function() {
31328  return (_FLAC__stream_encoder_init_ogg_stream = Module["_FLAC__stream_encoder_init_ogg_stream"] = Module["asm"]["FLAC__stream_encoder_init_ogg_stream"]).apply(null, arguments);
31329};
31330
31331/** @type {function(...*):?} */
31332var _FLAC__stream_encoder_set_ogg_serial_number = Module["_FLAC__stream_encoder_set_ogg_serial_number"] = function() {
31333  return (_FLAC__stream_encoder_set_ogg_serial_number = Module["_FLAC__stream_encoder_set_ogg_serial_number"] = Module["asm"]["FLAC__stream_encoder_set_ogg_serial_number"]).apply(null, arguments);
31334};
31335
31336/** @type {function(...*):?} */
31337var _FLAC__stream_encoder_set_verify = Module["_FLAC__stream_encoder_set_verify"] = function() {
31338  return (_FLAC__stream_encoder_set_verify = Module["_FLAC__stream_encoder_set_verify"] = Module["asm"]["FLAC__stream_encoder_set_verify"]).apply(null, arguments);
31339};
31340
31341/** @type {function(...*):?} */
31342var _FLAC__stream_encoder_set_channels = Module["_FLAC__stream_encoder_set_channels"] = function() {
31343  return (_FLAC__stream_encoder_set_channels = Module["_FLAC__stream_encoder_set_channels"] = Module["asm"]["FLAC__stream_encoder_set_channels"]).apply(null, arguments);
31344};
31345
31346/** @type {function(...*):?} */
31347var _FLAC__stream_encoder_set_bits_per_sample = Module["_FLAC__stream_encoder_set_bits_per_sample"] = function() {
31348  return (_FLAC__stream_encoder_set_bits_per_sample = Module["_FLAC__stream_encoder_set_bits_per_sample"] = Module["asm"]["FLAC__stream_encoder_set_bits_per_sample"]).apply(null, arguments);
31349};
31350
31351/** @type {function(...*):?} */
31352var _FLAC__stream_encoder_set_sample_rate = Module["_FLAC__stream_encoder_set_sample_rate"] = function() {
31353  return (_FLAC__stream_encoder_set_sample_rate = Module["_FLAC__stream_encoder_set_sample_rate"] = Module["asm"]["FLAC__stream_encoder_set_sample_rate"]).apply(null, arguments);
31354};
31355
31356/** @type {function(...*):?} */
31357var _FLAC__stream_encoder_set_compression_level = Module["_FLAC__stream_encoder_set_compression_level"] = function() {
31358  return (_FLAC__stream_encoder_set_compression_level = Module["_FLAC__stream_encoder_set_compression_level"] = Module["asm"]["FLAC__stream_encoder_set_compression_level"]).apply(null, arguments);
31359};
31360
31361/** @type {function(...*):?} */
31362var _FLAC__stream_encoder_set_blocksize = Module["_FLAC__stream_encoder_set_blocksize"] = function() {
31363  return (_FLAC__stream_encoder_set_blocksize = Module["_FLAC__stream_encoder_set_blocksize"] = Module["asm"]["FLAC__stream_encoder_set_blocksize"]).apply(null, arguments);
31364};
31365
31366/** @type {function(...*):?} */
31367var _FLAC__stream_encoder_set_total_samples_estimate = Module["_FLAC__stream_encoder_set_total_samples_estimate"] = function() {
31368  return (_FLAC__stream_encoder_set_total_samples_estimate = Module["_FLAC__stream_encoder_set_total_samples_estimate"] = Module["asm"]["FLAC__stream_encoder_set_total_samples_estimate"]).apply(null, arguments);
31369};
31370
31371/** @type {function(...*):?} */
31372var _FLAC__stream_encoder_set_metadata = Module["_FLAC__stream_encoder_set_metadata"] = function() {
31373  return (_FLAC__stream_encoder_set_metadata = Module["_FLAC__stream_encoder_set_metadata"] = Module["asm"]["FLAC__stream_encoder_set_metadata"]).apply(null, arguments);
31374};
31375
31376/** @type {function(...*):?} */
31377var _FLAC__stream_encoder_get_state = Module["_FLAC__stream_encoder_get_state"] = function() {
31378  return (_FLAC__stream_encoder_get_state = Module["_FLAC__stream_encoder_get_state"] = Module["asm"]["FLAC__stream_encoder_get_state"]).apply(null, arguments);
31379};
31380
31381/** @type {function(...*):?} */
31382var _FLAC__stream_encoder_get_verify_decoder_state = Module["_FLAC__stream_encoder_get_verify_decoder_state"] = function() {
31383  return (_FLAC__stream_encoder_get_verify_decoder_state = Module["_FLAC__stream_encoder_get_verify_decoder_state"] = Module["asm"]["FLAC__stream_encoder_get_verify_decoder_state"]).apply(null, arguments);
31384};
31385
31386/** @type {function(...*):?} */
31387var _FLAC__stream_encoder_get_verify = Module["_FLAC__stream_encoder_get_verify"] = function() {
31388  return (_FLAC__stream_encoder_get_verify = Module["_FLAC__stream_encoder_get_verify"] = Module["asm"]["FLAC__stream_encoder_get_verify"]).apply(null, arguments);
31389};
31390
31391/** @type {function(...*):?} */
31392var _FLAC__stream_encoder_process = Module["_FLAC__stream_encoder_process"] = function() {
31393  return (_FLAC__stream_encoder_process = Module["_FLAC__stream_encoder_process"] = Module["asm"]["FLAC__stream_encoder_process"]).apply(null, arguments);
31394};
31395
31396/** @type {function(...*):?} */
31397var _FLAC__stream_encoder_process_interleaved = Module["_FLAC__stream_encoder_process_interleaved"] = function() {
31398  return (_FLAC__stream_encoder_process_interleaved = Module["_FLAC__stream_encoder_process_interleaved"] = Module["asm"]["FLAC__stream_encoder_process_interleaved"]).apply(null, arguments);
31399};
31400
31401/** @type {function(...*):?} */
31402var ___errno_location = Module["___errno_location"] = function() {
31403  return (___errno_location = Module["___errno_location"] = Module["asm"]["__errno_location"]).apply(null, arguments);
31404};
31405
31406/** @type {function(...*):?} */
31407var stackSave = Module["stackSave"] = function() {
31408  return (stackSave = Module["stackSave"] = Module["asm"]["stackSave"]).apply(null, arguments);
31409};
31410
31411/** @type {function(...*):?} */
31412var stackRestore = Module["stackRestore"] = function() {
31413  return (stackRestore = Module["stackRestore"] = Module["asm"]["stackRestore"]).apply(null, arguments);
31414};
31415
31416/** @type {function(...*):?} */
31417var stackAlloc = Module["stackAlloc"] = function() {
31418  return (stackAlloc = Module["stackAlloc"] = Module["asm"]["stackAlloc"]).apply(null, arguments);
31419};
31420
31421/** @type {function(...*):?} */
31422var _malloc = Module["_malloc"] = function() {
31423  return (_malloc = Module["_malloc"] = Module["asm"]["malloc"]).apply(null, arguments);
31424};
31425
31426/** @type {function(...*):?} */
31427var _free = Module["_free"] = function() {
31428  return (_free = Module["_free"] = Module["asm"]["free"]).apply(null, arguments);
31429};
31430
31431/** @type {function(...*):?} */
31432var __growWasmMemory = Module["__growWasmMemory"] = function() {
31433  return (__growWasmMemory = Module["__growWasmMemory"] = Module["asm"]["__growWasmMemory"]).apply(null, arguments);
31434};
31435
31436/** @type {function(...*):?} */
31437var dynCall_iii = Module["dynCall_iii"] = function() {
31438  return (dynCall_iii = Module["dynCall_iii"] = Module["asm"]["dynCall_iii"]).apply(null, arguments);
31439};
31440
31441/** @type {function(...*):?} */
31442var dynCall_ii = Module["dynCall_ii"] = function() {
31443  return (dynCall_ii = Module["dynCall_ii"] = Module["asm"]["dynCall_ii"]).apply(null, arguments);
31444};
31445
31446/** @type {function(...*):?} */
31447var dynCall_iiii = Module["dynCall_iiii"] = function() {
31448  return (dynCall_iiii = Module["dynCall_iiii"] = Module["asm"]["dynCall_iiii"]).apply(null, arguments);
31449};
31450
31451/** @type {function(...*):?} */
31452var dynCall_jiji = Module["dynCall_jiji"] = function() {
31453  return (dynCall_jiji = Module["dynCall_jiji"] = Module["asm"]["dynCall_jiji"]).apply(null, arguments);
31454};
31455
31456/** @type {function(...*):?} */
31457var dynCall_viiiiii = Module["dynCall_viiiiii"] = function() {
31458  return (dynCall_viiiiii = Module["dynCall_viiiiii"] = Module["asm"]["dynCall_viiiiii"]).apply(null, arguments);
31459};
31460
31461/** @type {function(...*):?} */
31462var dynCall_iiiii = Module["dynCall_iiiii"] = function() {
31463  return (dynCall_iiiii = Module["dynCall_iiiii"] = Module["asm"]["dynCall_iiiii"]).apply(null, arguments);
31464};
31465
31466/** @type {function(...*):?} */
31467var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = function() {
31468  return (dynCall_viiiiiii = Module["dynCall_viiiiiii"] = Module["asm"]["dynCall_viiiiiii"]).apply(null, arguments);
31469};
31470
31471/** @type {function(...*):?} */
31472var dynCall_viiii = Module["dynCall_viiii"] = function() {
31473  return (dynCall_viiii = Module["dynCall_viiii"] = Module["asm"]["dynCall_viiii"]).apply(null, arguments);
31474};
31475
31476/** @type {function(...*):?} */
31477var dynCall_viii = Module["dynCall_viii"] = function() {
31478  return (dynCall_viii = Module["dynCall_viii"] = Module["asm"]["dynCall_viii"]).apply(null, arguments);
31479};
31480
31481
31482
31483
31484
31485// === Auto-generated postamble setup entry stuff ===
31486
31487
31488
31489
31490Module["ccall"] = ccall;
31491Module["cwrap"] = cwrap;
31492Module["setValue"] = setValue;
31493Module["getValue"] = getValue;
31494
31495
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518
31519
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530
31531
31532
31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549
31550
31551
31552
31553
31554
31555
31556
31557
31558
31559
31560
31561
31562
31563
31564
31565
31566
31567
31568
31569
31570
31571
31572
31573
31574
31575
31576
31577
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623
31624
31625
31626
31627
31628var calledRun;
31629
31630/**
31631 * @constructor
31632 * @this {ExitStatus}
31633 */
31634function ExitStatus(status) {
31635  this.name = "ExitStatus";
31636  this.message = "Program terminated with exit(" + status + ")";
31637  this.status = status;
31638}
31639
31640var calledMain = false;
31641
31642
31643dependenciesFulfilled = function runCaller() {
31644  // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)
31645  if (!calledRun) run();
31646  if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled
31647};
31648
31649
31650
31651
31652
31653/** @type {function(Array=)} */
31654function run(args) {
31655  args = args || arguments_;
31656
31657  if (runDependencies > 0) {
31658    return;
31659  }
31660
31661
31662  preRun();
31663
31664  if (runDependencies > 0) return; // a preRun added a dependency, run will be called later
31665
31666  function doRun() {
31667    // run may have just been called through dependencies being fulfilled just in this very frame,
31668    // or while the async setStatus time below was happening
31669    if (calledRun) return;
31670    calledRun = true;
31671    Module['calledRun'] = true;
31672
31673    if (ABORT) return;
31674
31675    initRuntime();
31676
31677    preMain();
31678
31679    if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();
31680
31681
31682    postRun();
31683  }
31684
31685  if (Module['setStatus']) {
31686    Module['setStatus']('Running...');
31687    setTimeout(function() {
31688      setTimeout(function() {
31689        Module['setStatus']('');
31690      }, 1);
31691      doRun();
31692    }, 1);
31693  } else
31694  {
31695    doRun();
31696  }
31697}
31698Module['run'] = run;
31699
31700
31701/** @param {boolean|number=} implicit */
31702function exit(status, implicit) {
31703
31704  // if this is just main exit-ing implicitly, and the status is 0, then we
31705  // don't need to do anything here and can just leave. if the status is
31706  // non-zero, though, then we need to report it.
31707  // (we may have warned about this earlier, if a situation justifies doing so)
31708  if (implicit && noExitRuntime && status === 0) {
31709    return;
31710  }
31711
31712  if (noExitRuntime) {
31713  } else {
31714
31715    ABORT = true;
31716    EXITSTATUS = status;
31717
31718    exitRuntime();
31719
31720    if (Module['onExit']) Module['onExit'](status);
31721  }
31722
31723  quit_(status, new ExitStatus(status));
31724}
31725
31726if (Module['preInit']) {
31727  if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];
31728  while (Module['preInit'].length > 0) {
31729    Module['preInit'].pop()();
31730  }
31731}
31732
31733
31734  noExitRuntime = true;
31735
31736run();
31737
31738
31739
31740
31741
31742
31743// {{MODULE_ADDITIONS}}
31744
31745
31746
31747//libflac function wrappers
31748
31749/**
31750 * HELPER read/extract stream info meta-data from frame header / meta-data
31751 * @param {POINTER} p_streaminfo
31752 * @returns StreamInfo
31753 */
31754function _readStreamInfo(p_streaminfo){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_STREAMINFO (0)
31755
31756	/*
31757	typedef struct {
31758		unsigned min_blocksize, max_blocksize;
31759		unsigned min_framesize, max_framesize;
31760		unsigned sample_rate;
31761		unsigned channels;
31762		unsigned bits_per_sample;
31763		FLAC__uint64 total_samples;
31764		FLAC__byte md5sum[16];
31765	} FLAC__StreamMetadata_StreamInfo;
31766	 */
31767
31768	var min_blocksize = Module.getValue(p_streaminfo,'i32');//4 bytes
31769	var max_blocksize = Module.getValue(p_streaminfo+4,'i32');//4 bytes
31770
31771	var min_framesize = Module.getValue(p_streaminfo+8,'i32');//4 bytes
31772	var max_framesize = Module.getValue(p_streaminfo+12,'i32');//4 bytes
31773
31774	var sample_rate = Module.getValue(p_streaminfo+16,'i32');//4 bytes
31775	var channels = Module.getValue(p_streaminfo+20,'i32');//4 bytes
31776
31777	var bits_per_sample = Module.getValue(p_streaminfo+24,'i32');//4 bytes
31778
31779	//FIXME should be at p_streaminfo+28, but seems to be at p_streaminfo+32
31780	var total_samples = Module.getValue(p_streaminfo+32,'i64');//8 bytes
31781
31782	var md5sum = _readMd5(p_streaminfo+40);//16 bytes
31783
31784	return {
31785		min_blocksize: min_blocksize,
31786		max_blocksize: max_blocksize,
31787		min_framesize: min_framesize,
31788		max_framesize: max_framesize,
31789		sampleRate: sample_rate,
31790		channels: channels,
31791		bitsPerSample: bits_per_sample,
31792		total_samples: total_samples,
31793		md5sum: md5sum
31794	};
31795}
31796
31797/**
31798 * read MD5 checksum
31799 * @param {POINTER} p_md5
31800 * @returns {String} as HEX string representation
31801 */
31802function _readMd5(p_md5){
31803
31804	var sb = [], v, str;
31805	for(var i=0, len = 16; i < len; ++i){
31806		v = Module.getValue(p_md5+i,'i8');//1 byte
31807		if(v < 0) v = 256 + v;//<- "convert" to uint8, if necessary
31808		str = v.toString(16);
31809		if(str.length < 2) str = '0' + str;//<- add padding, if necessary
31810		sb.push(str);
31811	}
31812	return sb.join('');
31813}
31814
31815/**
31816 * HELPER: read frame data
31817 *
31818 * @param {POINTER} p_frame
31819 * @param {CodingOptions} [enc_opt]
31820 * @returns FrameHeader
31821 */
31822function _readFrameHdr(p_frame, enc_opt){
31823
31824	/*
31825	typedef struct {
31826		unsigned blocksize;
31827		unsigned sample_rate;
31828		unsigned channels;
31829		FLAC__ChannelAssignment channel_assignment;
31830		unsigned bits_per_sample;
31831		FLAC__FrameNumberType number_type;
31832		union {
31833			FLAC__uint32 frame_number;
31834			FLAC__uint64 sample_number;
31835		} number;
31836		FLAC__uint8 crc;
31837	} FLAC__FrameHeader;
31838	 */
31839
31840	var blocksize = Module.getValue(p_frame,'i32');//4 bytes
31841	var sample_rate = Module.getValue(p_frame+4,'i32');//4 bytes
31842	var channels = Module.getValue(p_frame+8,'i32');//4 bytes
31843
31844	// 0: FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT	independent channels
31845	// 1: FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE 	left+side stereo
31846	// 2: FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE 	right+side stereo
31847	// 3: FLAC__CHANNEL_ASSIGNMENT_MID_SIDE 	mid+side stereo
31848	var channel_assignment = Module.getValue(p_frame+12,'i32');//4 bytes
31849
31850	var bits_per_sample = Module.getValue(p_frame+16,'i32');
31851
31852	// 0: FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER 	number contains the frame number
31853	// 1: FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER	number contains the sample number of first sample in frame
31854	var number_type = Module.getValue(p_frame+20,'i32');
31855
31856	// union {} number: The frame number or sample number of first sample in frame; use the number_type value to determine which to use.
31857	var frame_number = Module.getValue(p_frame+24,'i32');
31858	var sample_number = Module.getValue(p_frame+24,'i64');
31859
31860	var number = number_type === 0? frame_number : sample_number;
31861	var numberType = number_type === 0? 'frames' : 'samples';
31862
31863	var crc = Module.getValue(p_frame+36,'i8');
31864
31865	var subframes;
31866	if(enc_opt && enc_opt.analyseSubframes){
31867		var subOffset = {offset: 40};
31868		subframes = [];
31869		for(var i=0; i < channels; ++i){
31870			subframes.push(_readSubFrameHdr(p_frame, subOffset, blocksize, enc_opt));
31871		}
31872		//TODO read footer
31873		// console.log('  footer crc ', Module.getValue(p_frame + subOffset.offset,'i16'));
31874	}
31875
31876	return {
31877		blocksize: blocksize,
31878		sampleRate: sample_rate,
31879		channels: channels,
31880		channelAssignment: channel_assignment,
31881		bitsPerSample: bits_per_sample,
31882		number: number,
31883		numberType: numberType,
31884		crc: crc,
31885		subframes: subframes
31886	};
31887}
31888
31889
31890function _readSubFrameHdr(p_subframe, subOffset, block_size, enc_opt){
31891	/*
31892	FLAC__SubframeType 	type
31893	union {
31894	   FLAC__Subframe_Constant   constant
31895	   FLAC__Subframe_Fixed   fixed
31896	   FLAC__Subframe_LPC   lpc
31897	   FLAC__Subframe_Verbatim   verbatim
31898	} 	data
31899	unsigned 	wasted_bits
31900	*/
31901
31902	var type = Module.getValue(p_subframe + subOffset.offset, 'i32');
31903	subOffset.offset += 4;
31904
31905	var data;
31906	switch(type){
31907		case 0:	//FLAC__SUBFRAME_TYPE_CONSTANT
31908			data = {value: Module.getValue(p_subframe + subOffset.offset, 'i32')};
31909			subOffset.offset += 284;//4;
31910			break;
31911		case 1:	//FLAC__SUBFRAME_TYPE_VERBATIM
31912			data = Module.getValue(p_subframe + subOffset.offset, 'i32');
31913			subOffset.offset += 284;//4;
31914			break;
31915		case 2:	//FLAC__SUBFRAME_TYPE_FIXED
31916			data = _readSubFrameHdrFixedData(p_subframe, subOffset, block_size, false, enc_opt);
31917			break;
31918		case 3:	//FLAC__SUBFRAME_TYPE_LPC
31919			data = _readSubFrameHdrFixedData(p_subframe, subOffset, block_size, true, enc_opt);
31920			break;
31921	}
31922
31923	var offset =  subOffset.offset;
31924	var wasted_bits = Module.getValue(p_subframe + offset, 'i32');
31925	subOffset.offset += 4;
31926
31927	return {
31928		type: type,//['CONSTANT', 'VERBATIM', 'FIXED', 'LPC'][type],
31929		data: data,
31930		wastedBits: wasted_bits
31931	}
31932}
31933
31934function _readSubFrameHdrFixedData(p_subframe_data, subOffset, block_size, is_lpc, enc_opt){
31935
31936	var offset = subOffset.offset;
31937
31938	var data = {order: -1, contents: {parameters: [], rawBits: []}};
31939	//FLAC__Subframe_Fixed:
31940	// FLAC__EntropyCodingMethod 	entropy_coding_method
31941	// unsigned 	order
31942	// FLAC__int32 	warmup [FLAC__MAX_FIXED_ORDER]
31943	// const FLAC__int32 * 	residual
31944
31945	//FLAC__EntropyCodingMethod:
31946	// FLAC__EntropyCodingMethodType 	type
31947	// union {
31948	//    FLAC__EntropyCodingMethod_PartitionedRice   partitioned_rice
31949	// } 	data
31950
31951	//FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE	0		Residual is coded by partitioning into contexts, each with it's own 4-bit Rice parameter.
31952	//FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2 1	Residual is coded by partitioning into contexts, each with it's own 5-bit Rice parameter.
31953	var entropyType = Module.getValue(p_subframe_data, 'i32');
31954	offset += 4;
31955
31956	//FLAC__EntropyCodingMethod_PartitionedRice:
31957	//	unsigned 	order
31958	var entropyOrder = Module.getValue(p_subframe_data + offset, 'i32');
31959	data.order = entropyOrder;
31960	offset += 4;
31961
31962	//FLAC__EntropyCodingMethod_PartitionedRice:
31963	//	FLAC__EntropyCodingMethod_PartitionedRiceContents * 	contents
31964	var partitions = 1 << entropyOrder, params = data.contents.parameters, raws = data.contents.rawBits;
31965	//FLAC__EntropyCodingMethod_PartitionedRiceContents
31966	// unsigned * 	parameters
31967	// unsigned * 	raw_bits
31968	// unsigned 	capacity_by_order
31969	var ppart = Module.getValue(p_subframe_data + offset, 'i32');
31970	var pparams = Module.getValue(ppart, 'i32');
31971	var praw = Module.getValue(ppart + 4, 'i32');
31972	data.contents.capacityByOrder = Module.getValue(ppart + 8, 'i32');
31973	for(var i=0; i < partitions; ++i){
31974		params.push(Module.getValue(pparams + (i*4), 'i32'));
31975		raws.push(Module.getValue(praw + (i*4), 'i32'));
31976	}
31977	offset += 4;
31978
31979	//FLAC__Subframe_Fixed:
31980	//	unsigned 	order
31981	var order = Module.getValue(p_subframe_data + offset, 'i32');
31982	offset += 4;
31983
31984	var warmup = [], res;
31985
31986	if(is_lpc){
31987		//FLAC__Subframe_LPC
31988
31989		// unsigned 	qlp_coeff_precision
31990		var qlp_coeff_precision = Module.getValue(p_subframe_data + offset, 'i32');
31991		offset += 4;
31992		// int 	quantization_level
31993		var quantization_level = Module.getValue(p_subframe_data + offset, 'i32');
31994		offset += 4;
31995
31996		//FLAC__Subframe_LPC :
31997		// FLAC__int32 	qlp_coeff [FLAC__MAX_LPC_ORDER]
31998		var qlp_coeff = [];
31999		for(var i=0; i < order; ++i){
32000			qlp_coeff.push(Module.getValue(p_subframe_data + offset, 'i32'));
32001			offset += 4;
32002		}
32003		data.qlp_coeff = qlp_coeff;
32004		data.qlp_coeff_precision = qlp_coeff_precision;
32005		data.quantization_level = quantization_level;
32006
32007		//FLAC__Subframe_LPC:
32008		// FLAC__int32 	warmup [FLAC__MAX_LPC_ORDER]
32009		offset = subOffset.offset + 152;
32010		offset = _readSubFrameHdrWarmup(p_subframe_data, offset, warmup, order);
32011
32012		//FLAC__Subframe_LPC:
32013		// const FLAC__int32 * 	residual
32014		if(enc_opt && enc_opt.analyseResiduals){
32015			offset = subOffset.offset + 280;
32016			res = _readSubFrameHdrResidual(p_subframe_data + offset, block_size, order);
32017		}
32018
32019	} else {
32020
32021		//FLAC__Subframe_Fixed:
32022		// FLAC__int32 	warmup [FLAC__MAX_FIXED_ORDER]
32023		offset = _readSubFrameHdrWarmup(p_subframe_data, offset, warmup, order);
32024
32025		//FLAC__Subframe_Fixed:
32026		// const FLAC__int32 * 	residual
32027		offset = subOffset.offset + 32;
32028		if(enc_opt && enc_opt.analyseResiduals){
32029			res = _readSubFrameHdrResidual(p_subframe_data + offset, block_size, order);
32030		}
32031	}
32032
32033	subOffset.offset += 284;
32034	return {
32035		partition: {
32036			type: entropyType,
32037			data: data
32038		},
32039		order: order,
32040		warmup: warmup,
32041		residual: res
32042	}
32043}
32044
32045
32046function _readSubFrameHdrWarmup(p_subframe_data, offset, warmup, order){
32047
32048	// FLAC__int32 	warmup [FLAC__MAX_FIXED_ORDER | FLAC__MAX_LPC_ORDER]
32049	for(var i=0; i < order; ++i){
32050		warmup.push(Module.getValue(p_subframe_data + offset, 'i32'));
32051		offset += 4;
32052	}
32053	return offset;
32054}
32055
32056
32057function _readSubFrameHdrResidual(p_subframe_data_res, block_size, order){
32058	// const FLAC__int32 * 	residual
32059	var pres = Module.getValue(p_subframe_data_res, 'i32');
32060	var res = [];//Module.getValue(pres, 'i32');
32061	//TODO read residual all values(?)
32062	// -> "The residual signal, length == (blocksize minus order) samples.
32063	for(var i=0, size = block_size - order; i < size; ++i){
32064		res.push(Module.getValue(pres + (i*4), 'i32'));
32065	}
32066	return res;
32067}
32068
32069function _readConstChar(ptr, length, sb){
32070	sb.splice(0);
32071	var ch;
32072	for(var i=0; i < length; ++i){
32073		ch = Module.getValue(ptr + i,'i8');
32074		if(ch === 0){
32075			break;
32076		}
32077		sb.push(String.fromCodePoint(ch));
32078	}
32079	return sb.join('');
32080}
32081
32082function _readNullTerminatedChar(ptr, sb){
32083	sb.splice(0);
32084	var ch = 1, i = 0;
32085	while(ch > 0){
32086		ch = Module.getValue(ptr + i++, 'i8');
32087		if(ch === 0){
32088			break;
32089		}
32090		sb.push(String.fromCodePoint(ch));
32091	}
32092	return sb.join('');
32093}
32094
32095
32096/**
32097 * HELPER read/extract padding metadata meta-data from meta-data block
32098 * @param {POINTER} p_padding_metadata
32099 * @returns PaddingMetadata
32100 */
32101function _readPaddingMetadata(p_padding_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_PADDING (1)
32102
32103	//FLAC__StreamMetadata_Padding:
32104	//		int 	dummy
32105	return {
32106		dummy: Module.getValue(p_padding_metadata,'i32')
32107	}
32108}
32109
32110/**
32111 * HELPER read/extract application metadata meta-data from meta-data block
32112 * @param {POINTER} p_application_metadata
32113 * @returns ApplicationMetadata
32114 */
32115function _readApplicationMetadata(p_application_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_APPLICATION (2)
32116
32117	//FLAC__StreamMetadata_Application:
32118	// FLAC__byte 	id [4]
32119	// FLAC__byte * 	data
32120	return {
32121		id : Module.getValue(p_application_metadata,'i32'),
32122		data: Module.getValue(p_application_metadata + 4,'i32')//TODO should read (binary) data?
32123	}
32124}
32125
32126
32127/**
32128 * HELPER read/extract seek table metadata meta-data from meta-data block
32129 * @param {POINTER} p_seek_table_metadata
32130 * @returns SeekTableMetadata
32131 */
32132function _readSeekTableMetadata(p_seek_table_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_SEEKTABLE (3)
32133
32134	//FLAC__StreamMetadata_SeekTable:
32135	// 	unsigned 	num_points
32136	// 	FLAC__StreamMetadata_SeekPoint * 	points
32137
32138	var num_points = Module.getValue(p_seek_table_metadata,'i32');
32139
32140	var ptrPoints = Module.getValue(p_seek_table_metadata + 4,'i32');
32141	var points = [];
32142	for(var i=0; i < num_points; ++i){
32143
32144		//FLAC__StreamMetadata_SeekPoint:
32145		// 	FLAC__uint64 	sample_number
32146		// 	FLAC__uint64 	stream_offset
32147		// 	unsigned 	frame_samples
32148
32149		points.push({
32150			sample_number: Module.getValue(ptrPoints + (i * 24),'i64'),
32151			stream_offset: Module.getValue(ptrPoints + (i * 24) + 8,'i64'),
32152			frame_samples: Module.getValue(ptrPoints + (i * 24) + 16,'i32')
32153		});
32154	}
32155
32156	return {
32157		num_points: num_points,
32158		points: points
32159	}
32160}
32161
32162/**
32163 * HELPER read/extract vorbis comment meta-data from meta-data block
32164 * @param {POINTER} p_vorbiscomment
32165 * @returns VorbisComment
32166 */
32167function _readVorbisComment(p_vorbiscomment){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_VORBIS_COMMENT (4)
32168
32169	// FLAC__StreamMetadata_VorbisComment
32170	// FLAC__StreamMetadata_VorbisComment_Entry vendor_string:
32171	// 		FLAC__uint32 	length
32172	// 		FLAC__byte * 	entry
32173	var length = Module.getValue(p_vorbiscomment,'i32');
32174	var entry = Module.getValue(p_vorbiscomment + 4,'i32');
32175
32176	var sb = [];
32177	var strEntry = _readConstChar(entry, length, sb);
32178
32179	// FLAC__uint32 	num_comments
32180	var num_comments = Module.getValue(p_vorbiscomment + 8,'i32');
32181
32182	// FLAC__StreamMetadata_VorbisComment_Entry * 	comments
32183	var comments = [], clen, centry;
32184	var pc = Module.getValue(p_vorbiscomment + 12, 'i32')
32185	for(var i=0; i < num_comments; ++i){
32186
32187		// FLAC__StreamMetadata_VorbisComment_Entry
32188		// 		FLAC__uint32 	length
32189		// 		FLAC__byte * 	entry
32190
32191		clen = Module.getValue(pc + (i*8), 'i32');
32192		if(clen === 0){
32193			continue;
32194		}
32195
32196		centry = Module.getValue(pc + (i*8) + 4, 'i32');
32197		comments.push(_readConstChar(centry, clen, sb));
32198	}
32199
32200	return {
32201		vendor_string: strEntry,
32202		num_comments: num_comments,
32203		comments: comments
32204	}
32205}
32206
32207/**
32208 * HELPER read/extract cue sheet meta-data from meta-data block
32209 * @param {POINTER} p_cue_sheet
32210 * @returns CueSheetMetadata
32211 */
32212function _readCueSheetMetadata(p_cue_sheet){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_CUESHEET (5)
32213
32214	// char 	media_catalog_number [129]
32215	// FLAC__uint64 	lead_in
32216	// FLAC__bool 	is_cd
32217	// unsigned 	num_tracks
32218	// FLAC__StreamMetadata_CueSheet_Track * 	tracks
32219
32220	var sb = [];
32221	var media_catalog_number = _readConstChar(p_cue_sheet, 129, sb);
32222
32223	var lead_in = Module.getValue(p_cue_sheet + 136,'i64');
32224
32225	var is_cd = Module.getValue(p_cue_sheet + 144,'i8');
32226	var num_tracks = Module.getValue(p_cue_sheet + 148,'i32');
32227
32228	var ptrTrack = Module.getValue(p_cue_sheet + 152,'i32');
32229	var tracks = [], trackOffset = ptrTrack;
32230	if(ptrTrack !== 0){
32231
32232		for(var i=0; i < num_tracks; ++i){
32233
32234			var tr = _readCueSheetMetadata_track(trackOffset, sb);
32235			tracks.push(tr);
32236			trackOffset += 32;
32237		}
32238	}
32239
32240	return {
32241		media_catalog_number: media_catalog_number,
32242		lead_in: lead_in,
32243		is_cd: is_cd,
32244		num_tracks: num_tracks,
32245		tracks: tracks
32246	}
32247}
32248
32249/**
32250 * helper read track data for cue-sheet metadata
32251 * @param       {POINTER} p_cue_sheet_track pointer to the track data
32252 * @param       {string[]} sb "string buffer" temporary buffer for reading string (may be reset)
32253 * @return      {CueSheetTrack}
32254 */
32255function _readCueSheetMetadata_track(p_cue_sheet_track, sb){
32256
32257	// FLAC__StreamMetadata_CueSheet_Track:
32258	// 		FLAC__uint64 	offset
32259	// 		FLAC__byte 	number
32260	// 		char 	isrc [13]
32261	//		 unsigned 	type:1
32262	// 		unsigned 	pre_emphasis:1
32263	// 		FLAC__byte 	num_indices
32264	// 		FLAC__StreamMetadata_CueSheet_Index * 	indices
32265
32266	var typePremph = Module.getValue(p_cue_sheet_track + 22,'i8');
32267	var num_indices = Module.getValue(p_cue_sheet_track + 23,'i8');
32268
32269	var indices = [];
32270	var track = {
32271		offset: Module.getValue(p_cue_sheet_track,'i64'),
32272		number: Module.getValue(p_cue_sheet_track + 8,'i8') &255,
32273		isrc: _readConstChar(p_cue_sheet_track + 9, 13, sb),
32274		type: typePremph & 1? 'NON_AUDIO' : 'AUDIO',
32275		pre_emphasis: !!(typePremph & 2),
32276		num_indices: num_indices,
32277		indices: indices
32278	}
32279
32280	var idx;
32281	if(num_indices > 0){
32282		idx = Module.getValue(p_cue_sheet_track + 24,'i32');
32283
32284		//FLAC__StreamMetadata_CueSheet_Index:
32285		// 	FLAC__uint64 	offset
32286		// 	FLAC__byte 	number
32287
32288		for(var i=0; i < num_indices; ++i){
32289			indices.push({
32290				offset: Module.getValue(idx + (i*16),'i64'),
32291				number: Module.getValue(idx + (i*16) + 8,'i8')
32292			});
32293		}
32294	}
32295
32296	return track;
32297}
32298
32299/**
32300 * HELPER read/extract picture meta-data from meta-data block
32301 * @param {POINTER} p_picture_metadata
32302 * @returns PictureMetadata
32303 */
32304function _readPictureMetadata(p_picture_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_PICTURE (6)
32305
32306	// FLAC__StreamMetadata_Picture_Type 	type
32307	// char * 	mime_type
32308	// FLAC__byte * 	description
32309	// FLAC__uint32 	width
32310	// FLAC__uint32 	height
32311	// FLAC__uint32 	depth
32312	// FLAC__uint32 	colors
32313	// FLAC__uint32 	data_length
32314	// FLAC__byte * 	data
32315
32316	var type = Module.getValue(p_picture_metadata,'i32');
32317
32318	var mime = Module.getValue(p_picture_metadata + 4,'i32');
32319
32320	var sb = [];
32321	var mime_type = _readNullTerminatedChar(mime, sb);
32322
32323	var desc = Module.getValue(p_picture_metadata + 8,'i32');
32324	var description = _readNullTerminatedChar(desc, sb);
32325
32326	var width  = Module.getValue(p_picture_metadata + 12,'i32');
32327	var height = Module.getValue(p_picture_metadata + 16,'i32');
32328	var depth  = Module.getValue(p_picture_metadata + 20,'i32');
32329	var colors = Module.getValue(p_picture_metadata + 24,'i32');
32330	var data_length = Module.getValue(p_picture_metadata + 28,'i32');
32331
32332	var data = Module.getValue(p_picture_metadata + 32,'i32');
32333
32334	var buffer = Uint8Array.from(Module.HEAPU8.subarray(data, data + data_length));
32335
32336	return {
32337		type: type,
32338		mime_type: mime_type,
32339		description: description,
32340		width: width,
32341		height: height,
32342		depth: depth,
32343		colors: colors,
32344		data_length: data_length,
32345		data: buffer
32346	}
32347}
32348
32349/**
32350 * HELPER workaround / fix for returned write-buffer when decoding FLAC
32351 *
32352 * @param {number} heapOffset
32353 * 				the offset for the data on HEAPU8
32354 * @param {Uint8Array} newBuffer
32355 * 				the target buffer into which the data should be written -- with the correct (block) size
32356 * @param {boolean} applyFix
32357 * 				whether or not to apply the data repair heuristics
32358 * 				(handling duplicated/triplicated values in raw data)
32359 */
32360function __fix_write_buffer(heapOffset, newBuffer, applyFix){
32361
32362	var dv = new DataView(newBuffer.buffer);
32363	var targetSize = newBuffer.length;
32364
32365	var increase = !applyFix? 1 : 2;//<- for FIX/workaround, NOTE: e.g. if 24-bit padding occurres, there is no fix/increase needed (more details comment below)
32366	var buffer = HEAPU8.subarray(heapOffset, heapOffset + targetSize * increase);
32367
32368	// FIXME for some reason, the bytes values 0 (min) and 255 (max) get "triplicated",
32369	//		or inserted "doubled" which should be ignored, i.e.
32370	//		x x x	-> x
32371	//		x x		-> <ignored>
32372	//		where x is 0 or 255
32373	// -> HACK for now: remove/"over-read" 2 of the values, for each of these triplets/doublications
32374	var jump, isPrint;
32375	for(var i=0, j=0, size = buffer.length; i < size && j < targetSize; ++i, ++j){
32376
32377		if(i === size-1 && j < targetSize - 1){
32378			//increase heap-view, in order to read more (valid) data into the target buffer
32379			buffer = HEAPU8.subarray(heapOffset, size + targetSize);
32380			size = buffer.length;
32381		}
32382
32383		// NOTE if e.g. 24-bit padding occurres, there does not seem to be no duplication/triplication of 255 or 0, so must not try to fix!
32384		if(applyFix && (buffer[i] === 0 || buffer[i] === 255)){
32385
32386			jump = 0;
32387			isPrint = true;
32388
32389			if(i + 1 < size && buffer[i] === buffer[i+1]){
32390
32391				++jump;
32392
32393				if(i + 2 < size){
32394					if(buffer[i] === buffer[i+2]){
32395						++jump;
32396					} else {
32397						//if only 2 occurrences: ignore value
32398						isPrint = false;
32399					}
32400				}
32401			}//else: if single value: do print (an do not jump)
32402
32403
32404			if(isPrint){
32405				dv.setUint8(j, buffer[i]);
32406				if(jump === 2 && i + 3 < size && buffer[i] === buffer[i+3]){
32407					//special case for reducing triples in case the following value is also the same
32408					// (ie. something like: x x x |+ x)
32409					// -> then: do write the value one more time, and jump one further ahead
32410					// i.e. if value occurs 4 times in a row, write 2 values
32411					++jump;
32412					dv.setUint8(++j, buffer[i]);
32413				}
32414			} else {
32415				--j;
32416			}
32417
32418			i += jump;//<- apply jump, if there were value duplications
32419
32420		} else {
32421			dv.setUint8(j, buffer[i]);
32422		}
32423
32424	}
32425}
32426
32427
32428// FLAC__STREAM_DECODER_READ_STATUS_CONTINUE     	The read was OK and decoding can continue.
32429// FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM   The read was attempted while at the end of the stream. Note that the client must only return this value when the read callback was called when already at the end of the stream. Otherwise, if the read itself moves to the end of the stream, the client should still return the data and FLAC__STREAM_DECODER_READ_STATUS_CONTINUE, and then on the next read callback it should return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM with a byte count of 0.
32430// FLAC__STREAM_DECODER_READ_STATUS_ABORT       	An unrecoverable error occurred. The decoder will return from the process call.
32431var FLAC__STREAM_DECODER_READ_STATUS_CONTINUE = 0;
32432var FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM = 1;
32433var FLAC__STREAM_DECODER_READ_STATUS_ABORT = 2;
32434
32435// FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE   The write was OK and decoding can continue.
32436// FLAC__STREAM_DECODER_WRITE_STATUS_ABORT     	An unrecoverable error occurred. The decoder will return from the process call.
32437var FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE = 0;
32438var FLAC__STREAM_DECODER_WRITE_STATUS_ABORT = 1;
32439
32440/**
32441 * @interface FLAC__StreamDecoderInitStatus
32442 * @memberOf Flac
32443 *
32444 * @property {"FLAC__STREAM_DECODER_INIT_STATUS_OK"}						0 	Initialization was successful.
32445 * @property {"FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER"}		1 	The library was not compiled with support for the given container format.
32446 * @property {"FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS"}			2 	A required callback was not supplied.
32447 * @property {"FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR"}	3 	An error occurred allocating memory.
32448 * @property {"FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE"}		4 	fopen() failed in FLAC__stream_decoder_init_file() or FLAC__stream_decoder_init_ogg_file().
32449 * @property {"FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED"}		5 	FLAC__stream_decoder_init_*() was called when the decoder was already initialized, usually because FLAC__stream_decoder_finish() was not called.
32450 */
32451var FLAC__STREAM_DECODER_INIT_STATUS_OK	= 0;
32452var FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER	= 1;
32453var FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS	= 2;
32454var FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR = 3;
32455var FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE = 4;
32456var FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED = 5;
32457
32458/**
32459 * @interface FLAC__StreamEncoderInitStatus
32460 * @memberOf Flac
32461 *
32462 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_OK"}									0 	Initialization was successful.
32463 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR"}							1 	General failure to set up encoder; call FLAC__stream_encoder_get_state() for cause.
32464 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER"}					2 	The library was not compiled with support for the given container format.
32465 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS"}						3 	A required callback was not supplied.
32466 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS"}			4 	The encoder has an invalid setting for number of channels.
32467 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE"}				5 	The encoder has an invalid setting for bits-per-sample. FLAC supports 4-32 bps but the reference encoder currently supports only up to 24 bps.
32468 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE"}					6 	The encoder has an invalid setting for the input sample rate.
32469 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE"}					7 	The encoder has an invalid setting for the block size.
32470 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER"}					8 	The encoder has an invalid setting for the maximum LPC order.
32471 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION"}			9 	The encoder has an invalid setting for the precision of the quantized linear predictor coefficients.
32472 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER"}	10 	The specified block size is less than the maximum LPC order.
32473 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE"}						11 	The encoder is bound to the Subset but other settings violate it.
32474 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA"}						12 	The metadata input to the encoder is invalid, in one of the following ways:
32475 *																						      FLAC__stream_encoder_set_metadata() was called with a null pointer but a block count > 0
32476 *																						      One of the metadata blocks contains an undefined type
32477 *																						      It contains an illegal CUESHEET as checked by FLAC__format_cuesheet_is_legal()
32478 *																						      It contains an illegal SEEKTABLE as checked by FLAC__format_seektable_is_legal()
32479 *																						      It contains more than one SEEKTABLE block or more than one VORBIS_COMMENT block
32480 * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED"}					13 	FLAC__stream_encoder_init_*() was called when the encoder was already initialized, usually because FLAC__stream_encoder_finish() was not called.
32481 */
32482var FLAC__STREAM_ENCODER_INIT_STATUS_OK = 0;
32483var FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR = 1;
32484var FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER = 2;
32485var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS = 3;
32486var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS = 4;
32487var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE = 5;
32488var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE = 6;
32489var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE = 7;
32490var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER = 8;
32491var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION = 9;
32492var FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER = 10;
32493var FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE = 11;
32494var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA = 12;
32495var FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED = 13;
32496
32497//FLAC__STREAM_ENCODER_WRITE_STATUS_OK 				The write was OK and encoding can continue.
32498//FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR		An unrecoverable error occurred. The encoder will return from the process call
32499var FLAC__STREAM_ENCODER_WRITE_STATUS_OK = 0;
32500var FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR = 1;
32501
32502
32503/**
32504 * Map for encoder/decoder callback functions
32505 *
32506 * <pre>[ID] -> {function_type: FUNCTION}</pre>
32507 *
32508 * type: {[id: number]: {[callback_type: string]: function}}
32509 * @private
32510 */
32511var coders = {};
32512
32513/**
32514 * Get a registered callback for the encoder / decoder instance
32515 *
32516 * @param {Number} p_coder
32517 * 			the encoder/decoder pointer (ID)
32518 * @param {String} func_type
32519 * 			the callback type, one of
32520 * 				"write" | "read" | "error" | "metadata"
32521 * @returns {Function} the callback (or VOID if there is no callback registered)
32522 * @private
32523 */
32524function getCallback(p_coder, func_type){
32525	if(coders[p_coder]){
32526		return coders[p_coder][func_type];
32527	}
32528}
32529
32530/**
32531 * Register a callback for an encoder / decoder instance (will / should be deleted, when finish()/delete())
32532 *
32533 * @param {Number} p_coder
32534 * 			the encoder/decoder pointer (ID)
32535 * @param {String} func_type
32536 * 			the callback type, one of
32537 * 				"write" | "read" | "error" | "metadata"
32538 * @param {Function} callback
32539 * 			the callback function
32540 * @private
32541 */
32542function setCallback(p_coder, func_type, callback){
32543	if(!coders[p_coder]){
32544		coders[p_coder] = {};
32545	}
32546	coders[p_coder][func_type] = callback;
32547}
32548
32549/**
32550 * Get coding options for the encoder / decoder instance:
32551 * returns FALSY when not set.
32552 *
32553 * @param {Number} p_coder
32554 * 			the encoder/decoder pointer (ID)
32555 * @returns {CodingOptions} the coding options
32556 * @private
32557 * @memberOf Flac
32558 */
32559function _getOptions(p_coder){
32560	if(coders[p_coder]){
32561		return coders[p_coder]["options"];
32562	}
32563}
32564
32565/**
32566 * Set coding options for an encoder / decoder instance (will / should be deleted, when finish()/delete())
32567 *
32568 * @param {Number} p_coder
32569 * 			the encoder/decoder pointer (ID)
32570 * @param {CodingOptions} options
32571 * 			the coding options
32572 * @private
32573 * @memberOf Flac
32574 */
32575function _setOptions(p_coder, options){
32576	if(!coders[p_coder]){
32577		coders[p_coder] = {};
32578	}
32579	coders[p_coder]["options"] = options;
32580}
32581
32582//(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data)
32583// -> FLAC__StreamEncoderWriteStatus
32584var enc_write_fn_ptr = addFunction(function(p_encoder, buffer, bytes, samples, current_frame, p_client_data){
32585	var retdata = new Uint8Array(bytes);
32586	retdata.set(HEAPU8.subarray(buffer, buffer + bytes));
32587	var write_callback_fn = getCallback(p_encoder, 'write');
32588	try{
32589		write_callback_fn(retdata, bytes, samples, current_frame, p_client_data);
32590	} catch(err) {
32591		console.error(err);
32592		return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;
32593	}
32594	return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
32595}, 'iiiiiii');
32596
32597//(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
32598// -> FLAC__StreamDecoderReadStatus
32599var dec_read_fn_ptr = addFunction(function(p_decoder, buffer, bytes, p_client_data){
32600	//FLAC__StreamDecoderReadCallback, see https://xiph.org/flac/api/group__flac__stream__decoder.html#ga7a5f593b9bc2d163884348b48c4285fd
32601
32602	var len = Module.getValue(bytes, 'i32');
32603
32604	if(len === 0){
32605		return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
32606	}
32607
32608	var read_callback_fn = getCallback(p_decoder, 'read');
32609
32610	//callback must return object with: {buffer: TypedArray, readDataLength: number, error: boolean}
32611	var readResult = read_callback_fn(len, p_client_data);
32612	//in case of END_OF_STREAM or an error, readResult.readDataLength must be returned with 0
32613
32614	var readLen = readResult.readDataLength;
32615	Module.setValue(bytes, readLen, 'i32');
32616
32617	if(readResult.error){
32618		return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
32619	}
32620
32621	if(readLen === 0){
32622		return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
32623	}
32624
32625	var readBuf = readResult.buffer;
32626
32627	var dataHeap = new Uint8Array(Module.HEAPU8.buffer, buffer, readLen);
32628	dataHeap.set(new Uint8Array(readBuf));
32629
32630	return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
32631}, 'iiiii');
32632
32633//(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *client_data)
32634// -> FLAC__StreamDecoderWriteStatus
32635var dec_write_fn_ptr = addFunction(function(p_decoder, p_frame, p_buffer, p_client_data){
32636
32637	// var dec = Module.getValue(p_decoder,'i32');
32638	// var clientData = Module.getValue(p_client_data,'i32');
32639
32640	var dec_opts = _getOptions(p_decoder);
32641	var frameInfo = _readFrameHdr(p_frame, dec_opts);
32642
32643//	console.log(frameInfo);//DEBUG
32644
32645	var channels = frameInfo.channels;
32646	var block_size = frameInfo.blocksize * (frameInfo.bitsPerSample / 8);
32647
32648	//whether or not to apply data fixing heuristics (e.g. not needed for 24-bit samples)
32649	var isFix = frameInfo.bitsPerSample !== 24;
32650
32651	//take padding bits into account for calculating buffer size
32652	// -> seems to be done for uneven byte sizes, i.e. 1 (8 bits) and 3 (24 bits)
32653	var padding = (frameInfo.bitsPerSample / 8)%2;
32654	if(padding > 0){
32655		block_size += frameInfo.blocksize * padding;
32656	}
32657
32658	var data = [];//<- array for the data of each channel
32659	var bufferOffset, _buffer;
32660
32661	for(var i=0; i < channels; ++i){
32662
32663		bufferOffset = Module.getValue(p_buffer + (i*4),'i32');
32664
32665		_buffer = new Uint8Array(block_size);
32666		//FIXME HACK for "strange" data (see helper function __fix_write_buffer)
32667		__fix_write_buffer(bufferOffset, _buffer, isFix);
32668
32669		data.push(_buffer.subarray(0, block_size));
32670	}
32671
32672	var write_callback_fn = getCallback(p_decoder, 'write');
32673	var res = write_callback_fn(data, frameInfo);//, clientData);
32674
32675	// FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE	The write was OK and decoding can continue.
32676	// FLAC__STREAM_DECODER_WRITE_STATUS_ABORT     	An unrecoverable error occurred. The decoder will return from the process call.
32677
32678	return res !== false? FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE : FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
32679}, 'iiiii');
32680
32681/**
32682 * Decoding error codes.
32683 *
32684 * <br>
32685 * If the error code is not known, value <code>FLAC__STREAM_DECODER_ERROR__UNKNOWN__</code> is used.
32686 *
32687 * @property {"FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC"}			0   An error in the stream caused the decoder to lose synchronization.
32688 * @property {"FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER"}  			1   The decoder encountered a corrupted frame header.
32689 * @property {"FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH"}	2   The frame's data did not match the CRC in the footer.
32690 * @property {"FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM"}	3   The decoder encountered reserved fields in use in the stream.
32691 *
32692 *
32693 * @interface FLAC__StreamDecoderErrorStatus
32694 * @memberOf Flac
32695 */
32696var DecoderErrorCode = {
32697	0: 'FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC',
32698	1: 'FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER',
32699	2: 'FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH',
32700	3: 'FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM'
32701}
32702
32703//(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
32704// -> void
32705var dec_error_fn_ptr = addFunction(function(p_decoder, err, p_client_data){
32706
32707	//err:
32708	var msg = DecoderErrorCode[err] || 'FLAC__STREAM_DECODER_ERROR__UNKNOWN__';//<- this should never happen;
32709
32710	var error_callback_fn = getCallback(p_decoder, 'error');
32711	error_callback_fn(err, msg, p_client_data);
32712}, 'viii');
32713
32714//(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data) -> void
32715//(const FLAC__StreamEncoder *encoder, const FLAC__StreamMetadata *metadata, void *client_data) -> void
32716var metadata_fn_ptr = addFunction(function(p_coder, p_metadata, p_client_data){
32717	/*
32718	 typedef struct {
32719		FLAC__MetadataType type;
32720		FLAC__bool is_last;
32721		unsigned length;
32722		union {
32723			FLAC__StreamMetadata_StreamInfo stream_info;
32724			FLAC__StreamMetadata_Padding padding;
32725			FLAC__StreamMetadata_Application application;
32726			FLAC__StreamMetadata_SeekTable seek_table;
32727			FLAC__StreamMetadata_VorbisComment vorbis_comment;
32728			FLAC__StreamMetadata_CueSheet cue_sheet;
32729			FLAC__StreamMetadata_Picture picture;
32730			FLAC__StreamMetadata_Unknown unknown;
32731		} data;
32732	} FLAC__StreamMetadata;
32733	 */
32734
32735	/*
32736	FLAC__METADATA_TYPE_STREAMINFO 		STREAMINFO block
32737	FLAC__METADATA_TYPE_PADDING 		PADDING block
32738	FLAC__METADATA_TYPE_APPLICATION 	APPLICATION block
32739	FLAC__METADATA_TYPE_SEEKTABLE 		SEEKTABLE block
32740	FLAC__METADATA_TYPE_VORBIS_COMMENT 	VORBISCOMMENT block (a.k.a. FLAC tags)
32741	FLAC__METADATA_TYPE_CUESHEET 		CUESHEET block
32742	FLAC__METADATA_TYPE_PICTURE 		PICTURE block
32743	FLAC__METADATA_TYPE_UNDEFINED 		marker to denote beginning of undefined type range; this number will increase as new metadata types are added
32744	FLAC__MAX_METADATA_TYPE 			No type will ever be greater than this. There is not enough room in the protocol block.
32745	 */
32746
32747	var type = Module.getValue(p_metadata,'i32');//4 bytes
32748	var is_last = Module.getValue(p_metadata+4,'i32');//4 bytes
32749	var length = Module.getValue(p_metadata+8,'i64');//8 bytes
32750
32751	var meta_data = {
32752		type: type,
32753		isLast: is_last,
32754		length: length,
32755		data: void(0)
32756	};
32757
32758	var metadata_callback_fn = getCallback(p_coder, 'metadata');
32759	if(type === 0){// === FLAC__METADATA_TYPE_STREAMINFO
32760
32761		meta_data.data = _readStreamInfo(p_metadata+16);
32762		metadata_callback_fn(meta_data.data, meta_data);
32763
32764	} else {
32765
32766		var data;
32767		switch(type){
32768			case 1: //FLAC__METADATA_TYPE_PADDING
32769				data = _readPaddingMetadata(p_metadata+16);
32770				break;
32771			case 2: //FLAC__METADATA_TYPE_APPLICATION
32772				data =  readApplicationMetadata(p_metadata+16);
32773				break;
32774			case 3: //FLAC__METADATA_TYPE_SEEKTABLE
32775				data = _readSeekTableMetadata(p_metadata+16);
32776				break;
32777
32778			case 4: //FLAC__METADATA_TYPE_VORBIS_COMMENT
32779				data = _readVorbisComment(p_metadata+16);
32780				break;
32781
32782			case 5: //FLAC__METADATA_TYPE_CUESHEET
32783				data = _readCueSheetMetadata(p_metadata+16);
32784				break;
32785
32786			case 6: //FLAC__METADATA_TYPE_PICTURE
32787				data = _readPictureMetadata(p_metadata+16);
32788				break;
32789			default: { //NOTE this should not happen, and the raw data is very likely not correct!
32790				var cod_opts = _getOptions(p_coder);
32791				if(cod_opts && cod_opts.enableRawMetadata){
32792					var buffer = Uint8Array.from(HEAPU8.subarray(p_metadata+16, p_metadata+16+length));
32793					meta_data.raw = buffer;
32794				}
32795			}
32796
32797		}
32798
32799		meta_data.data = data;
32800		metadata_callback_fn(void(0), meta_data);
32801	}
32802
32803}, 'viii');
32804
32805
32806////////////// helper fields and functions for event handling
32807// see exported on()/off() functions
32808var listeners = {};
32809var persistedEvents = [];
32810var add_event_listener = function (eventName, listener){
32811	var list = listeners[eventName];
32812	if(!list){
32813		list = [listener];
32814		listeners[eventName] = list;
32815	} else {
32816		list.push(listener);
32817	}
32818	check_and_trigger_persisted_event(eventName, listener);
32819};
32820var check_and_trigger_persisted_event = function(eventName, listener){
32821	var activated;
32822	for(var i=persistedEvents.length-1; i >= 0; --i){
32823		activated = persistedEvents[i];
32824		if(activated && activated.event === eventName){
32825			listener.apply(null, activated.args);
32826			break;
32827		}
32828	}
32829};
32830var remove_event_listener = function (eventName, listener){
32831	var list = listeners[eventName];
32832	if(list){
32833		for(var i=list.length-1; i >= 0; --i){
32834			if(list[i] === listener){
32835				list.splice(i, 1);
32836			}
32837		}
32838	}
32839};
32840/**
32841 * HELPER: fire an event
32842 * @param  {string} eventName
32843 * 										the event name
32844 * @param  {any[]} [args] OPITIONAL
32845 * 										the arguments when triggering the listeners
32846 * @param  {boolean} [isPersist] OPTIONAL (positinal argument!)
32847 * 										if TRUE, handlers for this event that will be registered after this will get triggered immediately
32848 * 										(i.e. event is "persistent": once triggered it stays "active")
32849 *
32850 */
32851var do_fire_event = function (eventName, args, isPersist){
32852	if(_exported['on'+eventName]){
32853		_exported['on'+eventName].apply(null, args);
32854	}
32855	var list = listeners[eventName];
32856	if(list){
32857		for(var i=0, size=list.length; i < size; ++i){
32858			list[i].apply(null, args)
32859		}
32860	}
32861	if(isPersist){
32862		persistedEvents.push({event: eventName, args: args});
32863	}
32864}
32865
32866/////////////////////////////////////    export / public: /////////////////////////////////////////////
32867/**
32868 * The <code>Flac</code> module that provides functionality
32869 * for encoding WAV/PCM audio to Flac and decoding Flac to PCM.
32870 *
32871 * <br/><br/>
32872 * <p>
32873 * NOTE most functions are named analogous to the original C library functions,
32874 *      so that its documentation may be used for further reading.
32875 * </p>
32876 *
32877 * @see https://xiph.org/flac/api/group__flac__stream__encoder.html
32878 * @see https://xiph.org/flac/api/group__flac__stream__decoder.html
32879 *
32880 * @class Flac
32881 * @namespace Flac
32882 */
32883var _exported = {
32884	_module: Module,//internal: reference to Flac module
32885	_clear_enc_cb: function(enc_ptr){//internal function: remove reference to encoder instance and its callbacks
32886		delete coders[enc_ptr];
32887	},
32888	_clear_dec_cb: function(dec_ptr){//internal function: remove reference to decoder instance and its callbacks
32889		delete coders[dec_ptr];
32890	},
32891	/**
32892	 * Additional options for encoding or decoding
32893	 * @interface CodingOptions
32894	 * @memberOf Flac
32895	 * @property {boolean}  [analyseSubframes] for decoding: include subframes metadata in write-callback metadata, DEFAULT: false
32896	 * @property {boolean}  [analyseResiduals] for decoding: include residual data in subframes metadata in write-callback metadata, NOTE {@link #analyseSubframes} muste also be enabled, DEFAULT: false
32897	 * @property {boolean}  [enableRawMetadata] DEBUG option for decoding: enable receiving raw metadata for unknown metadata types in second argument in the metadata-callback, DEFAULT: false
32898	 *
32899	 * @see Flac#setOptions
32900	 * @see Flac~metadata_callback_fn
32901	 * @see Flac#FLAC__stream_decoder_set_metadata_respond_all
32902	 */
32903	/**
32904	 * FLAC raw metadata
32905	 *
32906	 * @interface MetadataBlock
32907	 * @memberOf Flac
32908	 * @property {Flac.FLAC__MetadataType}  type the type of the metadata
32909	 * @property {boolean}  isLast if it is the last block of metadata
32910	 * @property {number}  length the length of the metadata block (bytes)
32911	 * @property {Flac.StreamMetadata | Flac.PaddingMetadata | Flac.ApplicationMetadata | Flac.SeekTableMetadata | Flac.CueSheetMetadata | Flac.PictureMetadata}  [data] the metadata (omitted for unknown metadata types)
32912	 * @property {Uint8Array}  [raw] raw metadata (for debugging: enable via {@link Flac#setOptions})
32913	 */
32914	/**
32915	 * FLAC padding metadata block
32916	 *
32917	 * @interface PaddingMetadata
32918	 * @memberOf Flac
32919	 * @property {number}  dummy Conceptually this is an empty struct since we don't store the padding bytes. Empty structs are not allowed by some C compilers, hence the dummy.
32920	 *
32921	 * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_PADDING
32922	 */
32923	/**
32924	 * FLAC application metadata block
32925	 *
32926	 * NOTE the application meta data type is not really supported, i.e. the
32927	 *      (binary) data is only a pointer to the memory heap.
32928	 *
32929	 * @interface ApplicationMetadata
32930	 * @memberOf Flac
32931	 * @property {number}  id the application ID
32932	 * @property {number}  data (pointer)
32933	 *
32934	 * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_APPLICATION
32935	 * @see <a href="https://xiph.org/flac/format.html#metadata_block_application">application block format specification</a>
32936	 */
32937	/**
32938	 * FLAC seek table metadata block
32939	 *
32940	 * <p>
32941	 * From the format specification:
32942	 *
32943	 * The seek points must be sorted by ascending sample number.
32944	 *
32945	 * Each seek point's sample number must be the first sample of the target frame.
32946	 *
32947	 * Each seek point's sample number must be unique within the table
32948	 *
32949	 * Existence of a SEEKTABLE block implies a correct setting of total_samples in the stream_info block.
32950	 *
32951	 * Behavior is undefined when more than one SEEKTABLE block is present in a stream.
32952	 *
32953	 * @interface SeekTableMetadata
32954	 * @memberOf Flac
32955	 * @property {number}  num_points the number of seek points
32956	 * @property {Flac.SeekPoint[]}  points the seek points
32957	 *
32958	 * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_SEEKTABLE
32959	 */
32960	/**
32961	 * FLAC seek point data
32962	 *
32963	 * @interface SeekPoint
32964	 * @memberOf Flac
32965	 * @property {number}  sample_number The sample number of the target frame. NOTE <code>-1</code> for a placeholder point.
32966	 * @property {number}  stream_offset The offset, in bytes, of the target frame with respect to beginning of the first frame.
32967	 * @property {number}  frame_samples The number of samples in the target frame.
32968	 *
32969	 * @see Flac.SeekTableMetadata
32970	 */
32971	/**
32972	 * FLAC vorbis comment metadata block
32973	 *
32974	 * @interface VorbisCommentMetadata
32975	 * @memberOf Flac
32976	 * @property {string}  vendor_string the vendor string
32977	 * @property {number}  num_comments the number of comments
32978	 * @property {string[]}  comments the comments
32979	 *
32980	 * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_VORBIS_COMMENT
32981	 */
32982	 /**
32983	 * FLAC cue sheet metadata block
32984	 *
32985	 * @interface CueSheetMetadata
32986	 * @memberOf Flac
32987	 * @property {string}  media_catalog_number Media catalog number, in ASCII printable characters 0x20-0x7e. In general, the media catalog number may be 0 to 128 bytes long.
32988	 * @property {number}  lead_in The number of lead-in samples.
32989	 * @property {boolean}  is_cd true if CUESHEET corresponds to a Compact Disc, else false.
32990	 * @property {number}  num_tracks The number of tracks.
32991	 * @property {Flac.CueSheetTrack[]}  tracks the tracks
32992	 *
32993	 * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_CUESHEET
32994	 */
32995	 /**
32996	 * FLAC cue sheet track data
32997	 *
32998	 * @interface CueSheetTrack
32999	 * @memberOf Flac
33000	 * @property {number}  offset Track offset in samples, relative to the beginning of the FLAC audio stream.
33001	 * @property {number}  number The track number.
33002	 * @property {string}  isrc Track ISRC. This is a 12-digit alphanumeric code.
33003	 * @property {"AUDIO" | "NON_AUDIO"}  type The track type: audio or non-audio.
33004	 * @property {boolean}  pre_emphasis The pre-emphasis flag
33005	 * @property {number}  num_indices The number of track index points.
33006	 * @property {Flac.CueSheetTracIndex}  indices The track index points.
33007	 *
33008	 * @see Flac.CueSheetMetadata
33009	 */
33010	/**
33011	 * FLAC track index data for cue sheet metadata
33012	 *
33013	 * @interface CueSheetTracIndex
33014	 * @memberOf Flac
33015	 * @property {number}  offset Offset in samples, relative to the track offset, of the index point.
33016	 * @property {number}  number The index point number.
33017	 *
33018	 * @see Flac.CueSheetTrack
33019	 */
33020	/**
33021	 * FLAC picture metadata block
33022	 *
33023	 * @interface PictureMetadata
33024	 * @memberOf Flac
33025	 * @property {Flac.FLAC__StreamMetadata_Picture_Type}  type The kind of picture stored.
33026	 * @property {string}  mime_type Picture data's MIME type, in ASCII printable characters 0x20-0x7e, NUL terminated. For best compatibility with players, use picture data of MIME type image/jpeg or image/png. A MIME type of '–>' is also allowed, in which case the picture data should be a complete URL.
33027	 * @property {string}  description Picture's description.
33028	 * @property {number}  width Picture's width in pixels.
33029	 * @property {number}  height Picture's height in pixels.
33030	 * @property {number}  depth Picture's color depth in bits-per-pixel.
33031	 * @property {number}  colors For indexed palettes (like GIF), picture's number of colors (the number of palette entries), or 0 for non-indexed (i.e. 2^depth).
33032	 * @property {number}  data_length Length of binary picture data in bytes.
33033	 * @property {Uint8Array}  data Binary picture data.
33034	 */
33035	/**
33036	 * An enumeration of the PICTURE types (see FLAC__StreamMetadataPicture and id3 v2.4 APIC tag).
33037	 *
33038	 * @interface FLAC__StreamMetadata_Picture_Type
33039	 * @memberOf Flac
33040	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_OTHER"} 					0		Other
33041	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON_STANDARD"} 		1		32x32 pixels 'file icon' (PNG only)
33042	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON"} 				2		Other file icon
33043	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER"} 			3		Cover (front)
33044	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_BACK_COVER"} 				4		Cover (back)
33045	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_LEAFLET_PAGE"} 			5		Leaflet page
33046	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_MEDIA"} 					6		Media (e.g. label side of CD)
33047	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_LEAD_ARTIST"} 			7		Lead artist/lead performer/soloist
33048	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_ARTIST"} 					8		Artist/performer
33049	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_CONDUCTOR"} 				9		Conductor
33050	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_BAND"} 					10		Band/Orchestra
33051	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_COMPOSER"} 				11		Composer
33052	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_LYRICIST"} 				12		Lyricist/text writer
33053	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_RECORDING_LOCATION"} 		13		Recording Location
33054	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_RECORDING"} 		14		During recording
33055	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_PERFORMANCE"} 		15		During performance
33056	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_VIDEO_SCREEN_CAPTURE"} 	16		Movie/video screen capture
33057	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_FISH"} 					17		A bright coloured fish
33058	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_ILLUSTRATION"} 			18		Illustration
33059	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_BAND_LOGOTYPE"} 			19		Band/artist logotype
33060	 * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_PUBLISHER_LOGOTYPE"} 		20		Publisher/Studio logotype
33061	 *
33062	 * @see Flac.PictureMetadata
33063	 */
33064
33065	/**
33066	 * An enumeration of the available metadata block types.
33067	 *
33068	 * @interface FLAC__MetadataType
33069	 * @memberOf Flac
33070	 *
33071	 * @property {"FLAC__METADATA_TYPE_STREAMINFO"} 		0	STREAMINFO block
33072	 * @property {"FLAC__METADATA_TYPE_PADDING"} 			1	PADDING block
33073	 * @property {"FLAC__METADATA_TYPE_APPLICATION"} 		2	APPLICATION block
33074	 * @property {"FLAC__METADATA_TYPE_SEEKTABLE"} 			3	SEEKTABLE block
33075	 * @property {"FLAC__METADATA_TYPE_VORBIS_COMMENT"} 	4	VORBISCOMMENT block (a.k.a. FLAC tags)
33076	 * @property {"FLAC__METADATA_TYPE_CUESHEET"} 			5	CUESHEET block
33077	 * @property {"FLAC__METADATA_TYPE_PICTURE"} 			6	PICTURE block
33078	 * @property {"FLAC__METADATA_TYPE_UNDEFINED"} 			7	marker to denote beginning of undefined type range; this number will increase as new metadata types are added
33079	 * @property {"FLAC__MAX_METADATA_TYPE"} 				126	No type will ever be greater than this. There is not enough room in the protocol block.
33080	 *
33081	 * @see Flac.MetadataBlock
33082	 * @see <a href="https://xiph.org/flac/format.html">FLAC format documentation</a>
33083	 */
33084	/**
33085	 * @function
33086	 * @public
33087	 * @memberOf Flac#
33088	 * @copydoc Flac._setOptions
33089	 */
33090	setOptions: _setOptions,
33091	/**
33092	 * @function
33093	 * @public
33094	 * @memberOf Flac#
33095	 * @copydoc Flac._getOptions
33096	 */
33097	getOptions: _getOptions,
33098	/**
33099	 * Returns if Flac has been initialized / is ready to be used.
33100	 *
33101	 * @returns {boolean} <code>true</code>, if Flac is ready to be used
33102	 *
33103	 * @memberOf Flac#
33104	 * @function
33105	 * @see #onready
33106	 * @see #on
33107	 */
33108	isReady: function() { return _flac_ready; },
33109	/**
33110	 * Hook for handler function that gets called, when asynchronous initialization has finished.
33111	 *
33112	 * NOTE that if the execution environment does not support <code>Object#defineProperty</code>, then
33113	 *      this function is not called, after {@link #isReady} is <code>true</code>.
33114	 *      In this case, {@link #isReady} should be checked, before setting <code>onready</code>
33115	 *      and if it is <code>true</code>, handler should be executed immediately instead of setting <code>onready</code>.
33116	 *
33117	 * @memberOf Flac#
33118	 * @function
33119	 * @param {Flac.event:ReadyEvent} event the ready-event object
33120	 * @see #isReady
33121	 * @see #on
33122	 * @default undefined
33123	 * @example
33124	 *  // [1] if Object.defineProperty() IS supported:
33125	 *  Flac.onready = function(event){
33126	 *     //gets executed when library becomes ready, or immediately, if it already is ready...
33127	 *	   doSomethingWithFlac();
33128	 *  };
33129	 *
33130	 *  // [2] if Object.defineProperty() is NOT supported:
33131	 *	// do check Flac.isReady(), and only set handler, if not ready yet
33132	 *  // (otherwise immediately excute handler code)
33133	 *  if(!Flac.isReady()){
33134	 *    Flac.onready = function(event){
33135	 *       //gets executed when library becomes ready...
33136	 *		 doSomethingWithFlac();
33137	 *    };
33138	 *  } else {
33139	 * 		// Flac is already ready: immediately start processing
33140	 *		doSomethingWithFlac();
33141	 *	}
33142	 */
33143	onready: void(0),
33144	/**
33145	 * Ready event: is fired when the library has been initialized and is ready to be used
33146	 * (e.g. asynchronous loading of binary / WASM modules has been completed).
33147	 *
33148	 * Before this event is fired, use of functions related to encoding and decoding may
33149	 * cause errors.
33150	 *
33151	 * @event ReadyEvent
33152	 * @memberOf Flac
33153	 * @type {object}
33154	 * @property {"ready"} type 	the type of the event <code>"ready"</code>
33155	 * @property {Flac} target 	the initalized FLAC library instance
33156	 *
33157	 * @see #isReady
33158	 * @see #on
33159	 */
33160	/**
33161	 * Created event: is fired when an encoder or decoder was created.
33162	 *
33163	 * @event CreatedEvent
33164	 * @memberOf Flac
33165	 * @type {object}
33166	 * @property {"created"} type 	the type of the event <code>"created"</code>
33167	 * @property {Flac.CoderChangedEventData} target 	the information for the created encoder or decoder
33168	 *
33169	 * @see #on
33170	 */
33171	/**
33172	 * Destroyed event: is fired when an encoder or decoder was destroyed.
33173	 *
33174	 * @event DestroyedEvent
33175	 * @memberOf Flac
33176	 * @type {object}
33177	 * @property {"destroyed"} type 	the type of the event <code>"destroyed"</code>
33178	 * @property {Flac.CoderChangedEventData} target 	the information for the destroyed encoder or decoder
33179	 *
33180	 * @see #on
33181	 */
33182	/**
33183	 * Life cycle event data for signaling life cycle changes of encoder or decoder instances
33184	 * @interface CoderChangedEventData
33185	 * @memberOf Flac
33186	 * @property {number}  id  the ID for the encoder or decoder instance
33187	 * @property {"encoder" | "decoder"}  type  signifies whether the event is for an encoder or decoder instance
33188	 * @property {any}  [data]  specific data for the life cycle change
33189	 *
33190	 * @see Flac.event:CreatedEvent
33191	 * @see Flac.event:DestroyedEvent
33192	 */
33193	/**
33194	 * Add an event listener for module-events.
33195	 * Supported events:
33196	 * <ul>
33197	 *  <li> <code>"ready"</code> &rarr; {@link Flac.event:ReadyEvent}: emitted when module is ready for usage (i.e. {@link #isReady} is true)<br/>
33198	 *             <em>NOTE listener will get immediately triggered if module is already <code>"ready"</code></em>
33199	 *  </li>
33200	 *  <li> <code>"created"</code> &rarr; {@link Flac.event:CreatedEvent}: emitted when an encoder or decoder instance was created<br/>
33201	 *  </li>
33202	 *  <li> <code>"destroyed"</code> &rarr; {@link Flac.event:DestroyedEvent}: emitted when an encoder or decoder instance was destroyed<br/>
33203	 *  </li>
33204	 * </ul>
33205	 *
33206	 * @param {string} eventName
33207	 * @param {Function} listener
33208	 *
33209	 * @memberOf Flac#
33210	 * @function
33211	 * @see #off
33212	 * @see #onready
33213	 * @see Flac.event:ReadyEvent
33214	 * @see Flac.event:CreatedEvent
33215	 * @see Flac.event:DestroyedEvent
33216	 * @example
33217	 *  Flac.on('ready', function(event){
33218	 *     //gets executed when library is ready, or becomes ready...
33219	 *  });
33220	 */
33221	on: add_event_listener,
33222	/**
33223	 * Remove an event listener for module-events.
33224	 * @param {string} eventName
33225	 * @param {Function} listener
33226	 *
33227	 * @memberOf Flac#
33228	 * @function
33229	 * @see #on
33230	 */
33231	off: remove_event_listener,
33232
33233	/**
33234	 * Set the "verify" flag. If true, the encoder will verify it's own encoded output by feeding it through an internal decoder and comparing the original signal against the decoded signal. If a mismatch occurs, the process call will return false. Note that this will slow the encoding process by the extra time required for decoding and comparison.
33235	 *
33236	 * <p>
33237	 * NOTE: only use on un-initilized encoder instances!
33238	 *
33239	 * @param {number} encoder
33240	 * 				the ID of the encoder instance
33241	 *
33242	 * @param {boolean} is_verify enable/disable checksum verification during encoding
33243	 *
33244	 * @returns {boolean} <code>false</code> if the encoder is already initialized, else <code>true</code>
33245	 *
33246	 * @see #create_libflac_encoder
33247	 * @see #FLAC__stream_encoder_get_verify
33248	 *
33249	 * @memberOf Flac#
33250	 * @function
33251	 */
33252	FLAC__stream_encoder_set_verify: function(encoder, is_verify){
33253		is_verify = is_verify? 1 : 0;
33254		Module.ccall('FLAC__stream_encoder_set_verify', 'number', ['number', 'number'], [ encoder, is_verify ]);
33255	},
33256	/**
33257	 * Set the compression level
33258	 *
33259	 * The compression level is roughly proportional to the amount of effort the encoder expends to compress the file. A higher level usually means more computation but higher compression. The default level is suitable for most applications.
33260	 *
33261	 * Currently the levels range from 0 (fastest, least compression) to 8 (slowest, most compression). A value larger than 8 will be treated as 8.
33262	 *
33263	 *
33264	 * <p>
33265	 * NOTE: only use on un-initilized encoder instances!
33266	 *
33267	 * @param {number} encoder
33268	 * 				the ID of the encoder instance
33269	 *
33270	 * @param {Flac.CompressionLevel} compression_level the desired Flac compression level: [0, 8]
33271	 *
33272	 * @returns {boolean} <code>false</code> if the encoder is already initialized, else <code>true</code>
33273	 *
33274	 * @see #create_libflac_encoder
33275	 * @see Flac.CompressionLevel
33276	 * @see <a href="https://xiph.org/flac/api/group__flac__stream__encoder.html#gae49cf32f5256cb47eecd33779493ac85">FLAC API for FLAC__stream_encoder_set_compression_level()</a>
33277	 *
33278	 * @memberOf Flac#
33279	 * @function
33280	 */
33281	FLAC__stream_encoder_set_compression_level: Module.cwrap('FLAC__stream_encoder_set_compression_level', 'number', [ 'number', 'number' ]),
33282	/**
33283	 * Set the blocksize to use while encoding.
33284	 * The number of samples to use per frame. Use 0 to let the encoder estimate a blocksize; this is usually best.
33285	 *
33286	 * <p>
33287	 * NOTE: only use on un-initilized encoder instances!
33288	 *
33289	 * @param {number} encoder
33290	 * 				the ID of the encoder instance
33291	 *
33292	 * @param {number} block_size  the number of samples to use per frame
33293	 *
33294	 * @returns {boolean} <code>false</code> if the encoder is already initialized, else <code>true</code>
33295	 *
33296	 * @see #create_libflac_encoder
33297	 *
33298	 * @memberOf Flac#
33299	 * @function
33300	 */
33301	FLAC__stream_encoder_set_blocksize: Module.cwrap('FLAC__stream_encoder_set_blocksize', 'number', [ 'number', 'number']),
33302
33303
33304	/**
33305	 * Get the state of the verify stream decoder. Useful when the stream encoder state is FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR.
33306	 *
33307	 * @param {number} encoder
33308	 * 				the ID of the encoder instance
33309	 *
33310	 * @returns {Flac.FLAC__StreamDecoderState} the verify stream decoder state
33311	 *
33312	 * @memberOf Flac#
33313	 * @function
33314	 */
33315	FLAC__stream_encoder_get_verify_decoder_state: Module.cwrap('FLAC__stream_encoder_get_verify_decoder_state', 'number', ['number']),
33316
33317	/**
33318	 * Get the "verify" flag for the encoder.
33319	 *
33320	 * @param {number} encoder
33321	 * 				the ID of the encoder instance
33322	 *
33323	 * @returns {boolean} the verify flag for the encoder
33324	 *
33325	 *
33326	 * @memberOf Flac#
33327	 * @function
33328	 *
33329	 * @see #FLAC__stream_encoder_set_verify
33330	 */
33331	FLAC__stream_encoder_get_verify: Module.cwrap('FLAC__stream_encoder_get_verify', 'number', ['number']),
33332/*
33333
33334TODO export other encoder API functions?:
33335
33336FLAC__bool 	FLAC__stream_encoder_set_channels (FLAC__StreamEncoder *encoder, unsigned value)
33337
33338FLAC__bool 	FLAC__stream_encoder_set_bits_per_sample (FLAC__StreamEncoder *encoder, unsigned value)
33339
33340FLAC__bool 	FLAC__stream_encoder_set_sample_rate (FLAC__StreamEncoder *encoder, unsigned value)
33341
33342FLAC__bool 	FLAC__stream_encoder_set_do_mid_side_stereo (FLAC__StreamEncoder *encoder, FLAC__bool value)
33343
33344FLAC__bool 	FLAC__stream_encoder_set_loose_mid_side_stereo (FLAC__StreamEncoder *encoder, FLAC__bool value)
33345
33346FLAC__bool 	FLAC__stream_encoder_set_apodization (FLAC__StreamEncoder *encoder, const char *specification)
33347
33348FLAC__bool 	FLAC__stream_encoder_set_max_lpc_order (FLAC__StreamEncoder *encoder, unsigned value)
33349
33350FLAC__bool 	FLAC__stream_encoder_set_qlp_coeff_precision (FLAC__StreamEncoder *encoder, unsigned value)
33351
33352FLAC__bool 	FLAC__stream_encoder_set_do_qlp_coeff_prec_search (FLAC__StreamEncoder *encoder, FLAC__bool value)
33353
33354FLAC__bool 	FLAC__stream_encoder_set_do_escape_coding (FLAC__StreamEncoder *encoder, FLAC__bool value)
33355
33356FLAC__bool 	FLAC__stream_encoder_set_do_exhaustive_model_search (FLAC__StreamEncoder *encoder, FLAC__bool value)
33357
33358FLAC__bool 	FLAC__stream_encoder_set_min_residual_partition_order (FLAC__StreamEncoder *encoder, unsigned value)
33359
33360FLAC__bool 	FLAC__stream_encoder_set_max_residual_partition_order (FLAC__StreamEncoder *encoder, unsigned value)
33361
33362FLAC__bool 	FLAC__stream_encoder_set_rice_parameter_search_dist (FLAC__StreamEncoder *encoder, unsigned value)
33363
33364FLAC__bool 	FLAC__stream_encoder_get_streamable_subset (const FLAC__StreamEncoder *encoder)
33365
33366unsigned 	FLAC__stream_encoder_get_channels (const FLAC__StreamEncoder *encoder)
33367
33368unsigned 	FLAC__stream_encoder_get_bits_per_sample (const FLAC__StreamEncoder *encoder)
33369
33370unsigned 	FLAC__stream_encoder_get_sample_rate (const FLAC__StreamEncoder *encoder)
33371
33372unsigned 	FLAC__stream_encoder_get_blocksize (const FLAC__StreamEncoder *encoder)
33373
33374FLAC__bool 	FLAC__stream_encoder_get_do_mid_side_stereo (const FLAC__StreamEncoder *encoder)
33375
33376FLAC__bool 	FLAC__stream_encoder_get_loose_mid_side_stereo (const FLAC__StreamEncoder *encoder)
33377
33378unsigned 	FLAC__stream_encoder_get_max_lpc_order (const FLAC__StreamEncoder *encoder)
33379
33380unsigned 	FLAC__stream_encoder_get_qlp_coeff_precision (const FLAC__StreamEncoder *encoder)
33381
33382FLAC__bool 	FLAC__stream_encoder_get_do_qlp_coeff_prec_search (const FLAC__StreamEncoder *encoder)
33383
33384FLAC__bool 	FLAC__stream_encoder_get_do_escape_coding (const FLAC__StreamEncoder *encoder)
33385
33386FLAC__bool 	FLAC__stream_encoder_get_do_exhaustive_model_search (const FLAC__StreamEncoder *encoder)
33387
33388unsigned 	FLAC__stream_encoder_get_min_residual_partition_order (const FLAC__StreamEncoder *encoder)
33389
33390unsigned 	FLAC__stream_encoder_get_max_residual_partition_order (const FLAC__StreamEncoder *encoder)
33391
33392unsigned 	FLAC__stream_encoder_get_rice_parameter_search_dist (const FLAC__StreamEncoder *encoder)
33393
33394FLAC__uint64 	FLAC__stream_encoder_get_total_samples_estimate (const FLAC__StreamEncoder *encoder)
33395
33396
33397
33398TODO export other decoder API functions?:
33399
33400
33401const char * 	FLAC__stream_decoder_get_resolved_state_string (const FLAC__StreamDecoder *decoder)
33402
33403FLAC__uint64 	FLAC__stream_decoder_get_total_samples (const FLAC__StreamDecoder *decoder)
33404
33405unsigned 	FLAC__stream_decoder_get_channels (const FLAC__StreamDecoder *decoder)
33406
33407unsigned 	FLAC__stream_decoder_get_bits_per_sample (const FLAC__StreamDecoder *decoder)
33408
33409unsigned 	FLAC__stream_decoder_get_sample_rate (const FLAC__StreamDecoder *decoder)
33410
33411unsigned 	FLAC__stream_decoder_get_blocksize (const FLAC__StreamDecoder *decoder)
33412
33413
33414FLAC__bool 	FLAC__stream_decoder_flush (FLAC__StreamDecoder *decoder)
33415
33416FLAC__bool 	FLAC__stream_decoder_skip_single_frame (FLAC__StreamDecoder *decoder)
33417
33418 */
33419
33420	 /**
33421	 * Set the compression level
33422	 *
33423	 * The compression level is roughly proportional to the amount of effort the encoder expends to compress the file. A higher level usually means more computation but higher compression. The default level is suitable for most applications.
33424	 *
33425	 * Currently the levels range from 0 (fastest, least compression) to 8 (slowest, most compression). A value larger than 8 will be treated as 8.
33426	 *
33427	 * This function automatically calls the following other set functions with appropriate values, so the client does not need to unless it specifically wants to override them:
33428	 * <pre>
33429	 *     FLAC__stream_encoder_set_do_mid_side_stereo()
33430	 *     FLAC__stream_encoder_set_loose_mid_side_stereo()
33431	 *     FLAC__stream_encoder_set_apodization()
33432	 *     FLAC__stream_encoder_set_max_lpc_order()
33433	 *     FLAC__stream_encoder_set_qlp_coeff_precision()
33434	 *     FLAC__stream_encoder_set_do_qlp_coeff_prec_search()
33435	 *     FLAC__stream_encoder_set_do_escape_coding()
33436	 *     FLAC__stream_encoder_set_do_exhaustive_model_search()
33437	 *     FLAC__stream_encoder_set_min_residual_partition_order()
33438	 *     FLAC__stream_encoder_set_max_residual_partition_order()
33439	 *     FLAC__stream_encoder_set_rice_parameter_search_dist()
33440	 * </pre>
33441	 * The actual values set for each level are:
33442	 * | level  | do mid-side stereo  | loose mid-side stereo  | apodization                                    | max lpc order  | qlp coeff precision  | qlp coeff prec search  | escape coding  | exhaustive model search  | min residual partition order  | max residual partition order  | rice parameter search dist   |
33443	 * |--------|---------------------|------------------------|------------------------------------------------|----------------|----------------------|------------------------|----------------|--------------------------|-------------------------------|-------------------------------|------------------------------|
33444	 * | 0      | false               | false                  | tukey(0.5)                                     | 0              | 0                    | false                  | false          | false                    | 0                             | 3                             | 0                            |
33445	 * | 1      | true                | true                   | tukey(0.5)                                     | 0              | 0                    | false                  | false          | false                    | 0                             | 3                             | 0                            |
33446	 * | 2      | true                | false                  | tukey(0.5)                                     | 0              | 0                    | false                  | false          | false                    | 0                             | 3                             | 0                            |
33447	 * | 3      | false               | false                  | tukey(0.5)                                     | 6              | 0                    | false                  | false          | false                    | 0                             | 4                             | 0                            |
33448	 * | 4      | true                | true                   | tukey(0.5)                                     | 8              | 0                    | false                  | false          | false                    | 0                             | 4                             | 0                            |
33449	 * | 5      | true                | false                  | tukey(0.5)                                     | 8              | 0                    | false                  | false          | false                    | 0                             | 5                             | 0                            |
33450	 * | 6      | true                | false                  | tukey(0.5);partial_tukey(2)                    | 8              | 0                    | false                  | false          | false                    | 0                             | 6                             | 0                            |
33451	 * | 7      | true                | false                  | tukey(0.5);partial_tukey(2)                    | 12             | 0                    | false                  | false          | false                    | 0                             | 6                             | 0                            |
33452	 * | 8      | true                | false                  | tukey(0.5);partial_tukey(2);punchout_tukey(3)  | 12             | 0                    | false                  | false          | false                    | 0                             | 6                             | 0                            |
33453	 *
33454	 * @interface CompressionLevel
33455	 * @memberOf Flac
33456	 *
33457	 * @property {"FLAC__COMPRESSION_LEVEL_0"} 		0	compression level 0
33458	 * @property {"FLAC__COMPRESSION_LEVEL_1"} 		1	compression level 1
33459	 * @property {"FLAC__COMPRESSION_LEVEL_2"} 		2	compression level 2
33460	 * @property {"FLAC__COMPRESSION_LEVEL_3"} 		3	compression level 3
33461	 * @property {"FLAC__COMPRESSION_LEVEL_4"} 		4	compression level 4
33462	 * @property {"FLAC__COMPRESSION_LEVEL_5"} 		5	compression level 5
33463	 * @property {"FLAC__COMPRESSION_LEVEL_6"} 		6	compression level 6
33464	 * @property {"FLAC__COMPRESSION_LEVEL_7"} 		7	compression level 7
33465	 * @property {"FLAC__COMPRESSION_LEVEL_8"} 		8	compression level 8
33466	 */
33467	/**
33468	 * Create an encoder.
33469	 *
33470	 * @param {number} sample_rate
33471	 * 					the sample rate of the input PCM data
33472	 * @param {number} channels
33473	 * 					the number of channels of the input PCM data
33474	 * @param {number} bps
33475	 * 					bits per sample of the input PCM data
33476	 * @param {Flac.CompressionLevel} compression_level
33477	 * 					the desired Flac compression level: [0, 8]
33478	 * @param {number} [total_samples] OPTIONAL
33479	 * 					the number of total samples of the input PCM data:<br>
33480	 * 					 Sets an estimate of the total samples that will be encoded.
33481	 * 					 This is merely an estimate and may be set to 0 if unknown.
33482	 * 					 This value will be written to the STREAMINFO block before encoding,
33483	 * 					 and can remove the need for the caller to rewrite the value later if
33484	 * 					 the value is known before encoding.<br>
33485	 * 					If specified, the it will be written into metadata of the FLAC header.<br>
33486	 * 					DEFAULT: 0 (i.e. unknown number of samples)
33487	 * @param {boolean} [is_verify] OPTIONAL
33488	 * 					enable/disable checksum verification during encoding<br>
33489	 * 					DEFAULT: true<br>
33490	 * 					NOTE: this argument is positional (i.e. total_samples must also be given)
33491	 * @param {number} [block_size] OPTIONAL
33492	 * 					the number of samples to use per frame.<br>
33493	 * 					DEFAULT: 0 (i.e. encoder sets block size automatically)
33494	 * 					NOTE: this argument is positional (i.e. total_samples and is_verify must also be given)
33495	 *
33496	 *
33497	 * @returns {number} the ID of the created encoder instance (or 0, if there was an error)
33498	 *
33499	 * @memberOf Flac#
33500	 * @function
33501	 */
33502	create_libflac_encoder: function(sample_rate, channels, bps, compression_level, total_samples, is_verify, block_size){
33503		is_verify = typeof is_verify === 'undefined'? 1 : is_verify + 0;
33504		total_samples = typeof total_samples === 'number'? total_samples : 0;
33505		block_size = typeof block_size === 'number'? block_size : 0;
33506		var ok = true;
33507		var encoder = Module.ccall('FLAC__stream_encoder_new', 'number', [ ], [ ]);
33508		ok &= Module.ccall('FLAC__stream_encoder_set_verify', 'number', ['number', 'number'], [ encoder, is_verify ]);
33509		ok &= Module.ccall('FLAC__stream_encoder_set_compression_level', 'number', ['number', 'number'], [ encoder, compression_level ]);
33510		ok &= Module.ccall('FLAC__stream_encoder_set_channels', 'number', ['number', 'number'], [ encoder, channels ]);
33511		ok &= Module.ccall('FLAC__stream_encoder_set_bits_per_sample', 'number', ['number', 'number'], [ encoder, bps ]);
33512		ok &= Module.ccall('FLAC__stream_encoder_set_sample_rate', 'number', ['number', 'number'], [ encoder, sample_rate ]);
33513		ok &= Module.ccall('FLAC__stream_encoder_set_blocksize', 'number', [ 'number', 'number'], [ encoder, block_size ]);
33514		ok &= Module.ccall('FLAC__stream_encoder_set_total_samples_estimate', 'number', ['number', 'number'], [ encoder, total_samples ]);
33515		if (ok){
33516			do_fire_event('created', [{type: 'created', target: {id: encoder, type: 'encoder'}}], false);
33517			return encoder;
33518		}
33519		return 0;
33520	},
33521	/**
33522	 * @deprecated use {@link #create_libflac_encoder} instead
33523	 * @memberOf Flac#
33524	 * @function
33525	 */
33526	init_libflac_encoder: function(){
33527		console.warn('Flac.init_libflac_encoder() is deprecated, use Flac.create_libflac_encoder() instead!');
33528		return this.create_libflac_encoder.apply(this, arguments);
33529	},
33530
33531	/**
33532	 * Create a decoder.
33533	 *
33534	 * @param {boolean} [is_verify]
33535	 * 				enable/disable checksum verification during decoding<br>
33536	 * 				DEFAULT: true
33537	 *
33538	 * @returns {number} the ID of the created decoder instance (or 0, if there was an error)
33539	 *
33540	 * @memberOf Flac#
33541	 * @function
33542	 */
33543	create_libflac_decoder: function(is_verify){
33544		is_verify = typeof is_verify === 'undefined'? 1 : is_verify + 0;
33545		var ok = true;
33546		var decoder = Module.ccall('FLAC__stream_decoder_new', 'number', [ ], [ ]);
33547		ok &= Module.ccall('FLAC__stream_decoder_set_md5_checking', 'number', ['number', 'number'], [ decoder, is_verify ]);
33548		if (ok){
33549			do_fire_event('created', [{type: 'created', target: {id: decoder, type: 'decoder'}}], false);
33550			return decoder;
33551		}
33552		return 0;
33553	},
33554	/**
33555	 * @deprecated use {@link #create_libflac_decoder} instead
33556	 * @memberOf Flac#
33557	 * @function
33558	 */
33559	init_libflac_decoder: function(){
33560		console.warn('Flac.init_libflac_decoder() is deprecated, use Flac.create_libflac_decoder() instead!');
33561		return this.create_libflac_decoder.apply(this, arguments);
33562	},
33563	/**
33564	 * The callback for writing the encoded FLAC data.
33565	 *
33566	 * @callback Flac~encoder_write_callback_fn
33567	 * @param {Uint8Array} data the encoded FLAC data
33568	 * @param {number} numberOfBytes the number of bytes in data
33569	 * @param {number} samples the number of samples encoded in data
33570	 * @param {number} currentFrame the number of the (current) encoded frame in data
33571	 * @returns {void | false} returning <code>false</code> indicates that an
33572	 * 								unrecoverable error occurred and decoding should be aborted
33573	 */
33574	/**
33575	 * The callback for the metadata of the encoded/decoded Flac data.
33576	 *
33577	 * By default, only the STREAMINFO metadata is enabled.
33578	 *
33579	 * For other metadata types {@link Flac.FLAC__MetadataType} they need to be enabled,
33580	 * see e.g. {@link Flac#FLAC__stream_decoder_set_metadata_respond}
33581	 *
33582	 * @callback Flac~metadata_callback_fn
33583	 * @param {Flac.StreamMetadata | undefined} metadata the FLAC meta data, NOTE only STREAMINFO is returned in first argument, for other types use 2nd argument's <code>metadataBlock.data<code>
33584	 * @param {Flac.MetadataBlock} metadataBlock the detailed meta data block
33585	 *
33586	 * @see Flac#init_decoder_stream
33587	 * @see Flac#init_encoder_stream
33588	 * @see Flac.CodingOptions
33589	 * @see Flac#FLAC__stream_decoder_set_metadata_respond_all
33590	 */
33591	/**
33592	 * FLAC meta data
33593	 * @interface Metadata
33594	 * @memberOf Flac
33595	 * @property {number}  sampleRate the sample rate (Hz)
33596	 * @property {number}  channels the number of channels
33597	 * @property {number}  bitsPerSample bits per sample
33598	 */
33599	/**
33600	 * FLAC stream meta data
33601	 * @interface StreamMetadata
33602	 * @memberOf Flac
33603	 * @augments Flac.Metadata
33604	 * @property {number}  min_blocksize the minimal block size (bytes)
33605	 * @property {number}  max_blocksize the maximal block size (bytes)
33606	 * @property {number}  min_framesize the minimal frame size (bytes)
33607	 * @property {number}  max_framesize the maximal frame size (bytes)
33608	 * @property {number}  total_samples the total number of (encoded/decoded) samples
33609	 * @property {string}  md5sum  the MD5 checksum for the decoded data (if validation is active)
33610	 */
33611	/**
33612	 * Initialize the encoder.
33613	 *
33614	 * @param {number} encoder
33615	 * 				the ID of the encoder instance that has not been initialized (or has been reset)
33616	 *
33617	 * @param {Flac~encoder_write_callback_fn} write_callback_fn
33618	 * 				the callback for writing the encoded Flac data:
33619	 * 				<pre>write_callback_fn(data: Uint8Array, numberOfBytes: Number, samples: Number, currentFrame: Number)</pre>
33620	 *
33621	 * @param {Flac~metadata_callback_fn} [metadata_callback_fn] OPTIONAL
33622	 * 				the callback for the metadata of the encoded Flac data:
33623	 * 				<pre>metadata_callback_fn(metadata: StreamMetadata)</pre>
33624	 *
33625	 * @param {number|boolean} [ogg_serial_number] OPTIONAL
33626	 * 				if number or <code>true</code> is specified, the encoder will be initialized to
33627	 * 				write to an OGG container, see {@link Flac.init_encoder_ogg_stream}:
33628	 * 				<code>true</code> will set a default serial number (<code>1</code>),
33629	 * 				if specified as number, it will be used as the stream's serial number within the ogg container.
33630	 *
33631	 * @returns {Flac.FLAC__StreamEncoderInitStatus} the encoder status (<code>0</code> for <code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code>)
33632	 *
33633	 * @memberOf Flac#
33634	 * @function
33635	 */
33636	init_encoder_stream: function(encoder, write_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){
33637
33638		var is_ogg = (ogg_serial_number === true);
33639		client_data = client_data|0;
33640
33641		if(typeof write_callback_fn !== 'function'){
33642			return FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS;
33643		}
33644		setCallback(encoder, 'write', write_callback_fn);
33645
33646		var __metadata_callback_fn_ptr = 0;
33647		if(typeof metadata_callback_fn === 'function'){
33648			setCallback(encoder, 'metadata', metadata_callback_fn);
33649			__metadata_callback_fn_ptr = metadata_fn_ptr;
33650		}
33651
33652		//NOTE the following comments are used for auto-detecting exported functions (only change if ccall function name(s) change!):
33653		//	Module.ccall('FLAC__stream_encoder_init_stream'
33654		var func_name = 'FLAC__stream_encoder_init_stream';
33655		var args_types = ['number', 'number', 'number', 'number', 'number', 'number'];
33656		var args = [
33657			encoder,
33658			enc_write_fn_ptr,
33659			0,//	FLAC__StreamEncoderSeekCallback
33660			0,//	FLAC__StreamEncoderTellCallback
33661			__metadata_callback_fn_ptr,
33662			client_data
33663		];
33664
33665		if(typeof ogg_serial_number === 'number'){
33666
33667			is_ogg = true;
33668
33669		} else if(is_ogg){//else: set default serial number for stream in OGG container
33670
33671			//NOTE from FLAC docs: "It is recommended to set a serial number explicitly as the default of '0' may collide with other streams."
33672			ogg_serial_number = 1;
33673		}
33674
33675		if(is_ogg){
33676			//NOTE the following comments are used for auto-detecting exported functions (only change if ccall function name(s) change!):
33677			//	Module.ccall('FLAC__stream_encoder_init_ogg_stream'
33678			func_name = 'FLAC__stream_encoder_init_ogg_stream';
33679
33680			//2nd arg: FLAC__StreamEncoderReadCallback ptr -> duplicate first entry & insert at [1]
33681			args.unshift(args[0]);
33682			args[1] = 0;//	FLAC__StreamEncoderReadCallback
33683
33684			args_types.unshift(args_types[0]);
33685			args_types[1] = 'number';
33686
33687
33688			//NOTE ignore BOOL return value when setting serial number, since init-call's returned
33689			//     status will also indicate, if encoder already has been initialized
33690			Module.ccall(
33691				'FLAC__stream_encoder_set_ogg_serial_number', 'number',
33692				['number', 'number'],
33693				[ encoder, ogg_serial_number ]
33694			);
33695		}
33696
33697		var init_status = Module.ccall(func_name, 'number', args_types, args);
33698
33699		return init_status;
33700	},
33701	/**
33702	 * Initialize the encoder for writing to an OGG container.
33703	 *
33704	 * @param {number} [ogg_serial_number] OPTIONAL
33705	 * 				the serial number for the stream in the OGG container
33706	 * 				DEFAULT: <code>1</code>
33707	 *
33708	 * @memberOf Flac#
33709	 * @function
33710	 * @copydoc #init_encoder_stream
33711	 */
33712	init_encoder_ogg_stream: function(encoder, write_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){
33713
33714		if(typeof ogg_serial_number !== 'number'){
33715			ogg_serial_number = true;
33716		}
33717		return this.init_encoder_stream(encoder, write_callback_fn, metadata_callback_fn, ogg_serial_number, client_data);
33718	},
33719	/**
33720	 * Result / return value for {@link Flac~decoder_read_callback_fn} callback function
33721	 *
33722	 * @interface ReadResult
33723	 * @memberOf Flac
33724	 * @property {TypedArray}  buffer  a TypedArray (e.g. Uint8Array) with the read data
33725	 * @property {number}  readDataLength the number of read data bytes. A number of <code>0</code> (zero) indicates that the end-of-stream is reached.
33726	 * @property {boolean}  [error] OPTIONAL value of <code>true</code> indicates that an error occured (decoding will be aborted)
33727	 */
33728	/**
33729	 * Result / return value for {@link Flac~decoder_read_callback_fn} callback function for signifying that there is no more data to read
33730	 *
33731	 * @interface CompletedReadResult
33732	 * @memberOf Flac
33733	 * @augments Flac.ReadResult
33734	 * @property {TypedArray | undefined}  buffer  a TypedArray (e.g. Uint8Array) with the read data (will be ignored in case readDataLength is <code>0</code>)
33735	 * @property {0}  readDataLength the number of read data bytes: The number of <code>0</code> (zero) indicates that the end-of-stream is reached.
33736	 */
33737	/**
33738	 * The callback for reading the FLAC data that will be decoded.
33739	 *
33740	 * @callback Flac~decoder_read_callback_fn
33741	 * @param {number} numberOfBytes the maximal number of bytes that the read callback can return
33742	 * @returns {Flac.ReadResult | Flac.CompletedReadResult} the result of the reading action/request
33743	 */
33744	/**
33745	 * The callback for writing the decoded FLAC data.
33746	 *
33747	 * @callback Flac~decoder_write_callback_fn
33748	 * @param {Uint8Array[]} data array of the channels with the decoded PCM data as <code>Uint8Array</code>s
33749	 * @param {Flac.BlockMetadata} frameInfo the metadata information for the decoded data
33750	 */
33751	/**
33752	 * The callback for reporting decoding errors.
33753	 *
33754	 * @callback Flac~decoder_error_callback_fn
33755	 * @param {number} errorCode the error code
33756	 * @param {Flac.FLAC__StreamDecoderErrorStatus} errorDescription the string representation / description of the error
33757	 */
33758	/**
33759	 * FLAC block meta data
33760	 * @interface BlockMetadata
33761	 * @augments Flac.Metadata
33762	 * @memberOf Flac
33763	 *
33764	 * @property {number}  blocksize the block size (bytes)
33765	 * @property {number}  number the number of the decoded samples or frames
33766	 * @property {string}  numberType the type to which <code>number</code> refers to: either <code>"frames"</code> or <code>"samples"</code>
33767	 * @property {Flac.FLAC__ChannelAssignment} channelAssignment the channel assignment
33768	 * @property {string}  crc the MD5 checksum for the decoded data, if validation is enabled
33769	 * @property {Flac.SubFrameMetadata[]}  [subframes] the metadata of the subframes. The array length corresponds to the number of channels. NOTE will only be included if {@link Flac.CodingOptions CodingOptions.analyseSubframes} is enabled for the decoder.
33770	 *
33771	 * @see Flac.CodingOptions
33772	 * @see Flac#setOptions
33773	 */
33774	/**
33775	 * FLAC subframe metadata
33776	 * @interface SubFrameMetadata
33777	 * @memberOf Flac
33778	 *
33779	 * @property {Flac.FLAC__SubframeType}  type the type of the subframe
33780	 * @property {number|Flac.FixedSubFrameData|Flac.LPCSubFrameData}  data the type specific metadata for subframe
33781	 * @property {number}  wastedBits the wasted bits-per-sample
33782	 */
33783	/**
33784	 * metadata for FIXED subframe type
33785	 * @interface FixedSubFrameData
33786	 * @memberOf Flac
33787	 *
33788	 * @property {number}  order  The polynomial order.
33789	 * @property {number[]}  warmup  Warmup samples to prime the predictor, length == order.
33790	 * @property {Flac.SubFramePartition}  partition  The residual coding method.
33791	 * @property {number[]}  [residual]  The residual signal, length == (blocksize minus order) samples.
33792	 * 									NOTE will only be included if {@link Flac.CodingOptions CodingOptions.analyseSubframes} is enabled for the decoder.
33793	 */
33794	/**
33795	 * metadata for LPC subframe type
33796	 * @interface LPCSubFrameData
33797	 * @augments Flac.FixedSubFrameData
33798	 * @memberOf Flac
33799	 *
33800	 * @property {number}  order  The FIR order.
33801	 * @property {number[]}  qlp_coeff  FIR filter coefficients.
33802	 * @property {number}  qlp_coeff_precision  Quantized FIR filter coefficient precision in bits.
33803	 * @property {number}  quantization_level The qlp coeff shift needed.
33804	 */
33805	/**
33806	 * metadata for FIXED or LPC subframe partitions
33807	 * @interface SubFramePartition
33808	 * @memberOf Flac
33809	 *
33810	 * @property {Flac.FLAC__EntropyCodingMethodType}  type  the entropy coding method
33811	 * @property {Flac.SubFramePartitionData}  data  metadata for a Rice partitioned residual
33812	 */
33813	/**
33814	 * metadata for FIXED or LPC subframe partition data
33815	 * @interface SubFramePartitionData
33816	 * @memberOf Flac
33817	 *
33818	 * @property {number}  order  The partition order, i.e. # of contexts = 2 ^ order.
33819	 * @property {Flac.SubFramePartitionContent}  contents  The context's Rice parameters and/or raw bits.
33820	 */
33821	/**
33822	 * metadata for FIXED or LPC subframe partition data content
33823	 * @interface SubFramePartitionContent
33824	 * @memberOf Flac
33825	 *
33826	 * @property {number[]}  parameters  The Rice parameters for each context.
33827	 * @property {number[]}  rawBits  Widths for escape-coded partitions. Will be non-zero for escaped partitions and zero for unescaped partitions.
33828	 * @property {number}  capacityByOrder  The capacity of the parameters and raw_bits arrays specified as an order, i.e. the number of array elements allocated is 2 ^ capacity_by_order.
33829	 */
33830	/**
33831	 * The types for FLAC subframes
33832	 *
33833	 * @interface FLAC__SubframeType
33834	 * @memberOf Flac
33835	 *
33836	 * @property {"FLAC__SUBFRAME_TYPE_CONSTANT"} 	0	constant signal
33837	 * @property {"FLAC__SUBFRAME_TYPE_VERBATIM"} 	1	uncompressed signal
33838	 * @property {"FLAC__SUBFRAME_TYPE_FIXED"} 		2	fixed polynomial prediction
33839	 * @property {"FLAC__SUBFRAME_TYPE_LPC"} 		3	linear prediction
33840	 */
33841	/**
33842	 * The channel assignment for the (decoded) frame.
33843	 *
33844	 * @interface FLAC__ChannelAssignment
33845	 * @memberOf Flac
33846	 *
33847	 * @property {"FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT"} 		0	independent channels
33848	 * @property {"FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE"}  		1	left+side stereo
33849	 * @property {"FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE"} 		2	right+side stereo
33850	 * @property {"FLAC__CHANNEL_ASSIGNMENT_MID_SIDE"}			3	mid+side stereo
33851	 */
33852	/**
33853	 * entropy coding methods
33854	 *
33855	 * @interface FLAC__EntropyCodingMethodType
33856	 * @memberOf Flac
33857	 *
33858	 * @property {"FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE"} 	0	Residual is coded by partitioning into contexts, each with it's own 4-bit Rice parameter.
33859	 * @property {"FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2"} 	1	Residual is coded by partitioning into contexts, each with it's own 5-bit Rice parameter.
33860	 */
33861	/**
33862	 * Initialize the decoder.
33863	 *
33864	 * @param {number} decoder
33865	 * 				the ID of the decoder instance that has not been initialized (or has been reset)
33866	 *
33867	 * @param {Flac~decoder_read_callback_fn} read_callback_fn
33868	 * 				the callback for reading the Flac data that should get decoded:
33869	 * 				<pre>read_callback_fn(numberOfBytes: Number) : {buffer: ArrayBuffer, readDataLength: number, error: boolean}</pre>
33870	 *
33871	 * @param {Flac~decoder_write_callback_fn} write_callback_fn
33872	 * 				the callback for writing the decoded data:
33873	 * 				<pre>write_callback_fn(data: Uint8Array[], frameInfo: Metadata)</pre>
33874	 *
33875	 * @param {Flac~decoder_error_callback_fn} error_callback_fn
33876	 * 				the error callback:
33877	 * 				<pre>error_callback_fn(errorCode: Number, errorDescription: String)</pre>
33878	 *
33879	 * @param {Flac~metadata_callback_fn} [metadata_callback_fn] OPTIONAL
33880	 * 				callback for receiving the metadata of FLAC data that will be decoded:
33881	 * 				<pre>metadata_callback_fn(metadata: StreamMetadata)</pre>
33882	 *
33883	 * @param {number|boolean} [ogg_serial_number] OPTIONAL
33884	 * 				if number or <code>true</code> is specified, the decoder will be initilized to
33885	 * 				read from an OGG container, see {@link Flac.init_decoder_ogg_stream}:<br/>
33886	 * 				<code>true</code> will use the default serial number, if specified as number the
33887	 * 				corresponding stream with the serial number from the ogg container will be used.
33888	 *
33889	 * @returns {Flac.FLAC__StreamDecoderInitStatus} the decoder status(<code>0</code> for <code>FLAC__STREAM_DECODER_INIT_STATUS_OK</code>)
33890	 *
33891	 * @memberOf Flac#
33892	 * @function
33893	 */
33894	init_decoder_stream: function(decoder, read_callback_fn, write_callback_fn, error_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){
33895
33896		client_data = client_data|0;
33897
33898		if(typeof read_callback_fn !== 'function'){
33899			return FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS;
33900		}
33901		setCallback(decoder, 'read', read_callback_fn);
33902
33903		if(typeof write_callback_fn !== 'function'){
33904			return FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS;
33905		}
33906		setCallback(decoder, 'write', write_callback_fn);
33907
33908		var __error_callback_fn_ptr = 0;
33909		if(typeof error_callback_fn === 'function'){
33910			setCallback(decoder, 'error', error_callback_fn);
33911			__error_callback_fn_ptr = dec_error_fn_ptr;
33912		}
33913
33914		var __metadata_callback_fn_ptr = 0;
33915		if(typeof metadata_callback_fn === 'function'){
33916			setCallback(decoder, 'metadata', metadata_callback_fn);
33917			__metadata_callback_fn_ptr = metadata_fn_ptr;
33918		}
33919
33920		var is_ogg = (ogg_serial_number === true);
33921		if(typeof ogg_serial_number === 'number'){
33922
33923			is_ogg = true;
33924
33925			//NOTE ignore BOOL return value when setting serial number, since init-call's returned
33926			//     status will also indicate, if decoder already has been initialized
33927			Module.ccall(
33928				'FLAC__stream_decoder_set_ogg_serial_number', 'number',
33929				['number', 'number'],
33930				[ decoder, ogg_serial_number ]
33931			);
33932		}
33933
33934		//NOTE the following comments are used for auto-detecting exported functions (only change if ccall function name(s) change!):
33935		//	Module.ccall('FLAC__stream_decoder_init_stream'
33936		//	Module.ccall('FLAC__stream_decoder_init_ogg_stream'
33937		var init_func_name = !is_ogg? 'FLAC__stream_decoder_init_stream' : 'FLAC__stream_decoder_init_ogg_stream';
33938
33939		var init_status = Module.ccall(
33940				init_func_name, 'number',
33941				[ 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number'],
33942				[
33943					 decoder,
33944					 dec_read_fn_ptr,
33945					 0,// 	FLAC__StreamDecoderSeekCallback
33946					 0,// 	FLAC__StreamDecoderTellCallback
33947					 0,//	FLAC__StreamDecoderLengthCallback
33948					 0,//	FLAC__StreamDecoderEofCallback
33949					 dec_write_fn_ptr,
33950					 __metadata_callback_fn_ptr,
33951					 __error_callback_fn_ptr,
33952					 client_data
33953				]
33954		);
33955
33956		return init_status;
33957	},
33958	/**
33959	 * Initialize the decoder for writing to an OGG container.
33960	 *
33961	 * @param {number} [ogg_serial_number] OPTIONAL
33962	 * 				the serial number for the stream in the OGG container that should be decoded.<br/>
33963	 * 				The default behavior is to use the serial number of the first Ogg page. Setting a serial number here will explicitly specify which stream is to be decoded.
33964	 *
33965	 * @memberOf Flac#
33966	 * @function
33967	 * @copydoc #init_decoder_stream
33968	 */
33969	init_decoder_ogg_stream: function(decoder, read_callback_fn, write_callback_fn, error_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){
33970
33971		if(typeof ogg_serial_number !== 'number'){
33972			ogg_serial_number = true;
33973		}
33974		return this.init_decoder_stream(decoder, read_callback_fn, write_callback_fn, error_callback_fn, metadata_callback_fn, ogg_serial_number, client_data);
33975	},
33976	/**
33977	 * Encode / submit data for encoding.
33978	 *
33979	 * This version allows you to supply the input data where the channels are interleaved into a
33980	 * single array (i.e. channel0_sample0, channel1_sample0, ... , channelN_sample0, channel0_sample1, ...).
33981	 *
33982	 * The samples need not be block-aligned but they must be sample-aligned, i.e. the first value should be
33983	 * channel0_sample0 and the last value channelN_sampleM.
33984	 *
33985	 * Each sample should be a signed integer, right-justified to the resolution set by bits-per-sample.
33986	 *
33987	 * For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767].
33988	 *
33989	 *
33990	 * For applications where channel order is important, channels must follow the order as described in the frame header.
33991	 *
33992	 * @param {number} encoder
33993	 * 				the ID of the encoder instance
33994	 *
33995	 * @param {TypedArray} buffer
33996	 * 				the audio data in a typed array with signed integers (and size according to the set bits-per-sample setting)
33997	 *
33998	 * @param {number} num_of_samples
33999	 * 				the number of samples in buffer
34000	 *
34001	 * @returns {boolean} true if successful, else false; in this case, check the encoder state with FLAC__stream_encoder_get_state() to see what went wrong.
34002	 *
34003	 * @memberOf Flac#
34004	 * @function
34005	 */
34006	FLAC__stream_encoder_process_interleaved: function(encoder, buffer, num_of_samples){
34007		// get the length of the data in bytes
34008		var numBytes = buffer.length * buffer.BYTES_PER_ELEMENT;
34009		// malloc enough space for the data
34010		var ptr = Module._malloc(numBytes);
34011		// get a bytes-wise view on the newly allocated buffer
34012		var heapBytes= new Uint8Array(Module.HEAPU8.buffer, ptr, numBytes);
34013		// copy data into heapBytes
34014		heapBytes.set(new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength));// issue #11 (2): do use byteOffset and byteLength for copying the data in case the underlying buffer/ArrayBuffer of the TypedArray view is larger than the TypedArray
34015		var status = Module.ccall('FLAC__stream_encoder_process_interleaved', 'number',
34016				['number', 'number', 'number'],
34017				[encoder, heapBytes.byteOffset, num_of_samples]
34018		);
34019		Module._free(ptr);
34020		return status;
34021	},
34022
34023	/**
34024	 * Encode / submit data for encoding.
34025	 *
34026	 * Submit data for encoding. This version allows you to supply the input data via an array of pointers,
34027	 * each pointer pointing to an array of samples samples representing one channel.
34028	 * The samples need not be block-aligned, but each channel should have the same number of samples.
34029	 *
34030	 * Each sample should be a signed integer, right-justified to the resolution set by FLAC__stream_encoder_set_bits_per_sample().
34031	 * For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767].
34032	 *
34033	 *
34034	 * For applications where channel order is important, channels must follow the order as described in the frame header.
34035	 *
34036	 * @param {number} encoder
34037	 * 				the ID of the encoder instance
34038	 *
34039	 * @param {TypedArray[]} channelBuffers
34040	 * 				an array for the audio data channels as typed arrays with signed integers (and size according to the set bits-per-sample setting)
34041	 *
34042	 * @param {number} num_of_samples
34043	 * 				the number of samples in one channel (i.e. one of the buffers)
34044	 *
34045	 * @returns {boolean} true if successful, else false; in this case, check the encoder state with FLAC__stream_encoder_get_state() to see what went wrong.
34046	 *
34047	 * @memberOf Flac#
34048	 * @function
34049	 */
34050	FLAC__stream_encoder_process: function(encoder, channelBuffers, num_of_samples){
34051
34052		var ptrInfo = this._create_pointer_array(channelBuffers);
34053		var pointerPtr = ptrInfo.pointerPointer;
34054
34055		var status = Module.ccall('FLAC__stream_encoder_process', 'number',
34056				['number', 'number', 'number'],
34057				[encoder, pointerPtr, num_of_samples]
34058		);
34059
34060		this._destroy_pointer_array(ptrInfo);
34061		return status;
34062	},
34063	/**
34064	 * Decodes a single frame.
34065	 *
34066	 * To check decoding progress, use {@link #FLAC__stream_decoder_get_state}.
34067	 *
34068	 * @param {number} decoder
34069	 * 				the ID of the decoder instance
34070	 *
34071	 * @returns {boolean} FALSE if an error occurred
34072	 *
34073	 * @memberOf Flac#
34074	 * @function
34075	 */
34076	FLAC__stream_decoder_process_single: Module.cwrap('FLAC__stream_decoder_process_single', 'number', ['number']),
34077
34078	/**
34079	 * Decodes data until end of stream.
34080	 *
34081	 * @param {number} decoder
34082	 * 				the ID of the decoder instance
34083	 *
34084	 * @returns {boolean} FALSE if an error occurred
34085	 *
34086	 * @memberOf Flac#
34087	 * @function
34088	 */
34089	FLAC__stream_decoder_process_until_end_of_stream: Module.cwrap('FLAC__stream_decoder_process_until_end_of_stream', 'number', ['number']),
34090
34091	/**
34092	 * Decodes data until end of metadata.
34093	 *
34094	 * @param {number} decoder
34095	 * 				the ID of the decoder instance
34096	 *
34097	 * @returns {boolean} false if any fatal read, write, or memory allocation error occurred (meaning decoding must stop), else true.
34098	 *
34099	 * @memberOf Flac#
34100	 * @function
34101	 */
34102	FLAC__stream_decoder_process_until_end_of_metadata: Module.cwrap('FLAC__stream_decoder_process_until_end_of_metadata', 'number', ['number']),
34103
34104	/**
34105	 * Decoder state code.
34106	 *
34107	 * @interface FLAC__StreamDecoderState
34108	 * @memberOf Flac
34109	 *
34110	 * @property {"FLAC__STREAM_DECODER_SEARCH_FOR_METADATA"} 		0	The decoder is ready to search for metadata
34111	 * @property {"FLAC__STREAM_DECODER_READ_METADATA"}  			1	The decoder is ready to or is in the process of reading metadata
34112	 * @property {"FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC"} 	2	The decoder is ready to or is in the process of searching for the frame sync code
34113	 * @property {"FLAC__STREAM_DECODER_READ_FRAME"}				3	The decoder is ready to or is in the process of reading a frame
34114	 * @property {"FLAC__STREAM_DECODER_END_OF_STREAM"}				4	The decoder has reached the end of the stream
34115	 * @property {"FLAC__STREAM_DECODER_OGG_ERROR"}					5	An error occurred in the underlying Ogg layer
34116	 * @property {"FLAC__STREAM_DECODER_SEEK_ERROR"}				6	An error occurred while seeking. The decoder must be flushed with FLAC__stream_decoder_flush() or reset with FLAC__stream_decoder_reset() before decoding can continue
34117	 * @property {"FLAC__STREAM_DECODER_ABORTED"}					7	The decoder was aborted by the read callback
34118	 * @property {"FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR"}	8	An error occurred allocating memory. The decoder is in an invalid state and can no longer be used
34119	 * @property {"FLAC__STREAM_DECODER_UNINITIALIZED"}				9	The decoder is in the uninitialized state; one of the FLAC__stream_decoder_init_*() functions must be called before samples can be processed.
34120	 *
34121	 */
34122	/**
34123	 *
34124	 * @param {number} decoder
34125	 * 				the ID of the decoder instance
34126	 *
34127	 * @returns {Flac.FLAC__StreamDecoderState} the decoder state
34128	 *
34129	 * @memberOf Flac#
34130	 * @function
34131	 */
34132	FLAC__stream_decoder_get_state: Module.cwrap('FLAC__stream_decoder_get_state', 'number', ['number']),
34133
34134	/**
34135	 * Encoder state code.
34136	 *
34137	 * @interface FLAC__StreamEncoderState
34138	 * @memberOf Flac
34139	 *
34140	 * @property {"FLAC__STREAM_ENCODER_OK"}								0 	The encoder is in the normal OK state and samples can be processed.
34141	 * @property {"FLAC__STREAM_ENCODER_UNINITIALIZED"}						1 	The encoder is in the uninitialized state; one of the FLAC__stream_encoder_init_*() functions must be called before samples can be processed.
34142	 * @property {"FLAC__STREAM_ENCODER_OGG_ERROR"}							2 	An error occurred in the underlying Ogg layer.
34143	 * @property {"FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR"}				3 	An error occurred in the underlying verify stream decoder; check FLAC__stream_encoder_get_verify_decoder_state().
34144	 * @property {"FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"}		4 	The verify decoder detected a mismatch between the original audio signal and the decoded audio signal.
34145	 * @property {"FLAC__STREAM_ENCODER_CLIENT_ERROR"}						5 	One of the callbacks returned a fatal error.
34146	 * @property {"FLAC__STREAM_ENCODER_IO_ERROR"}							6 	An I/O error occurred while opening/reading/writing a file. Check errno.
34147	 * @property {"FLAC__STREAM_ENCODER_FRAMING_ERROR"}						7 	An error occurred while writing the stream; usually, the write_callback returned an error.
34148	 * @property {"FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR"}			8 	Memory allocation failed.
34149	 *
34150	 */
34151	/**
34152	 *
34153	 * @param {number} encoder
34154	 * 				the ID of the encoder instance
34155	 *
34156	 * @returns {Flac.FLAC__StreamEncoderState} the encoder state
34157	 *
34158	 * @memberOf Flac#
34159	 * @function
34160	 */
34161	FLAC__stream_encoder_get_state:  Module.cwrap('FLAC__stream_encoder_get_state', 'number', ['number']),
34162	/**
34163	 * Direct the decoder to pass on all metadata blocks of type type.
34164	 *
34165	 * By default, only the STREAMINFO block is returned via the metadata callback.
34166	 *
34167	 * <p>
34168	 * NOTE: only use on un-initilized decoder instances!
34169	 *
34170	 * @param {number} decoder
34171	 * 				the ID of the decoder instance
34172	 *
34173	 * @param {Flac.FLAC__MetadataType} type  the metadata type to be enabled
34174	 *
34175	 * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>
34176	 *
34177	 * @memberOf Flac#
34178	 * @function
34179	 *
34180	 * @see Flac#FLAC__stream_decoder_set_metadata_respond_all
34181	 */
34182	FLAC__stream_decoder_set_metadata_respond: Module.cwrap('FLAC__stream_decoder_set_metadata_respond', 'number', ['number', 'number']),
34183	/**
34184	 * Direct the decoder to pass on all APPLICATION metadata blocks of the given id.
34185	 *
34186	 * By default, only the STREAMINFO block is returned via the metadata callback.
34187	 *
34188	 * <p>
34189	 * NOTE: only use on un-initilized decoder instances!
34190	 *
34191	 * @param {number} decoder
34192	 * 				the ID of the decoder instance
34193	 *
34194	 * @param {number} id  the ID of application metadata
34195	 *
34196	 * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>
34197	 *
34198	 * @memberOf Flac#
34199	 * @function
34200	 *
34201	 * @see Flac#FLAC__stream_decoder_set_metadata_respond_all
34202	 */
34203	FLAC__stream_decoder_set_metadata_respond_application: Module.cwrap('FLAC__stream_decoder_set_metadata_respond_application', 'number', ['number', 'number']),// (FLAC__StreamDecoder *decoder, const FLAC__byte id[4])
34204	/**
34205	 * Direct the decoder to pass on all metadata blocks of any type.
34206	 *
34207	 * By default, only the STREAMINFO block is returned via the metadata callback.
34208	 *
34209	 * <p>
34210	 * NOTE: only use on un-initilized decoder instances!
34211	 *
34212	 * @param {number} decoder
34213	 * 				the ID of the decoder instance
34214	 *
34215	 * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>
34216	 *
34217	 * @memberOf Flac#
34218	 * @function
34219	 *
34220	 * @see Flac#FLAC__stream_decoder_set_metadata_ignore_all
34221	 * @see Flac#FLAC__stream_decoder_set_metadata_respond_application
34222	 * @see Flac#FLAC__stream_decoder_set_metadata_respond
34223	 */
34224	FLAC__stream_decoder_set_metadata_respond_all: Module.cwrap('FLAC__stream_decoder_set_metadata_respond_all', 'number', ['number']),// (FLAC__StreamDecoder *decoder)
34225	/**
34226	 * Direct the decoder to filter out all metadata blocks of type type.
34227	 *
34228	 * By default, only the STREAMINFO block is returned via the metadata callback.
34229	 *
34230	 * <p>
34231	 * NOTE: only use on un-initilized decoder instances!
34232	 *
34233	 * @param {number} decoder
34234	 * 				the ID of the decoder instance
34235	 *
34236	 * @param {Flac.FLAC__MetadataType} type  the metadata type to be ignored
34237	 *
34238	 * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>
34239	 *
34240	 * @memberOf Flac#
34241	 * @function
34242	 *
34243	 * @see Flac#FLAC__stream_decoder_set_metadata_ignore_all
34244	 */
34245	FLAC__stream_decoder_set_metadata_ignore: Module.cwrap('FLAC__stream_decoder_set_metadata_ignore', 'number', ['number', 'number']),// (FLAC__StreamDecoder *decoder, FLAC__MetadataType type)
34246	/**
34247	 * Direct the decoder to filter out all APPLICATION metadata blocks of the given id.
34248	 *
34249	 * By default, only the STREAMINFO block is returned via the metadata callback.
34250	 *
34251	 * <p>
34252	 * NOTE: only use on un-initilized decoder instances!
34253	 *
34254	 * @param {number} decoder
34255	 * 				the ID of the decoder instance
34256	 *
34257	 * @param {number} id  the ID of application metadata
34258	 *
34259	 * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>
34260	 *
34261	 * @memberOf Flac#
34262	 * @function
34263	 *
34264	 * @see Flac#FLAC__stream_decoder_set_metadata_ignore_all
34265	 */
34266	FLAC__stream_decoder_set_metadata_ignore_application: Module.cwrap('FLAC__stream_decoder_set_metadata_ignore_application', 'number', ['number', 'number']),// (FLAC__StreamDecoder *decoder, const FLAC__byte id[4])
34267	/**
34268	 * Direct the decoder to filter out all metadata blocks of any type.
34269	 *
34270	 * By default, only the STREAMINFO block is returned via the metadata callback.
34271	 *
34272	 * <p>
34273	 * NOTE: only use on un-initilized decoder instances!
34274	 *
34275	 * @param {number} decoder
34276	 * 				the ID of the decoder instance
34277	 *
34278	 * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>
34279	 *
34280	 * @memberOf Flac#
34281	 * @function
34282	 *
34283	 * @see Flac#FLAC__stream_decoder_set_metadata_respond_all
34284	 * @see Flac#FLAC__stream_decoder_set_metadata_ignore
34285	 * @see Flac#FLAC__stream_decoder_set_metadata_ignore_application
34286	 */
34287	FLAC__stream_decoder_set_metadata_ignore_all: Module.cwrap('FLAC__stream_decoder_set_metadata_ignore_all', 'number', ['number']),// (FLAC__StreamDecoder *decoder)
34288	/**
34289	 * Set the metadata blocks to be emitted to the stream before encoding. A value of NULL, 0 implies no metadata; otherwise, supply an array of pointers to metadata blocks.
34290	 * The array is non-const since the encoder may need to change the is_last flag inside them, and in some cases update seek point offsets. Otherwise, the encoder
34291	 * will not modify or free the blocks. It is up to the caller to free the metadata blocks after encoding finishes.
34292	 *
34293	 * <p>
34294	 *     The encoder stores only copies of the pointers in the metadata array; the metadata blocks themselves must survive at least until after FLAC__stream_encoder_finish() returns.
34295	 *     Do not free the blocks until then.
34296	 *
34297	 *     The STREAMINFO block is always written and no STREAMINFO block may occur in the supplied array.
34298	 *
34299	 *     By default the encoder does not create a SEEKTABLE. If one is supplied in the metadata array, but the client has specified that it does not support seeking,
34300	 *     then the SEEKTABLE will be written verbatim. However by itself this is not very useful as the client will not know the stream offsets for the seekpoints ahead of time.
34301	 *     In order to get a proper seektable the client must support seeking. See next note.
34302	 *
34303	 *     SEEKTABLE blocks are handled specially. Since you will not know the values for the seek point stream offsets, you should pass in a SEEKTABLE 'template', that is,
34304	 *     a SEEKTABLE object with the required sample numbers (or placeholder points), with 0 for the frame_samples and stream_offset fields for each point.
34305	 *     If the client has specified that it supports seeking by providing a seek callback to FLAC__stream_encoder_init_stream() or both seek AND read callback to
34306	 *      FLAC__stream_encoder_init_ogg_stream() (or by using FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE()), then while it is encoding the encoder will
34307	 *      fill the stream offsets in for you and when encoding is finished, it will seek back and write the real values into the SEEKTABLE block in the stream. There are helper
34308	 *      routines for manipulating seektable template blocks; see metadata.h: FLAC__metadata_object_seektable_template_*(). If the client does not support seeking,
34309	 *      the SEEKTABLE will have inaccurate offsets which will slow down or remove the ability to seek in the FLAC stream.
34310	 *
34311	 *     The encoder instance will modify the first SEEKTABLE block as it transforms the template to a valid seektable while encoding, but it is still up to the caller to free
34312	 *     all metadata blocks after encoding.
34313	 *
34314	 *     A VORBIS_COMMENT block may be supplied. The vendor string in it will be ignored. libFLAC will use it's own vendor string. libFLAC will not modify the passed-in
34315	 *     VORBIS_COMMENT's vendor string, it will simply write it's own into the stream. If no VORBIS_COMMENT block is present in the metadata array, libFLAC will write an
34316	 *     empty one, containing only the vendor string.
34317	 *
34318	 *     The Ogg FLAC mapping requires that the VORBIS_COMMENT block be the second metadata block of the stream. The encoder already supplies the STREAMINFO block automatically.
34319	 *
34320	 *     If metadata does not contain a VORBIS_COMMENT block, the encoder will supply that too. Otherwise, if metadata does contain a VORBIS_COMMENT block and it is not the first,
34321	 *     the init function will reorder metadata by moving the VORBIS_COMMENT block to the front; the relative ordering of the other blocks will remain as they were.
34322	 *
34323	 *     The Ogg FLAC mapping limits the number of metadata blocks per stream to 65535. If num_blocks exceeds this the function will return false.
34324	 *
34325	 * @param {number} encoder
34326	 * 				the ID of the encoder instance
34327	 *
34328	 * @param {Flac.PointerInfo} metadataBuffersPointer
34329	 *
34330	 * @param {number} num_blocks
34331	 *
34332	 * @returns {boolean} <code>false</code> if the encoder is already initialized, else <code>true</code>. <code>false</code> if the encoder is already initialized, or if num_blocks > 65535 if encoding to Ogg FLAC, else true.
34333	 *
34334	 * @memberOf Flac#
34335	 * @function
34336	 *
34337	 * @see Flac.FLAC__MetadataType
34338	 * @see Flac#_create_pointer_array
34339	 * @see Flac#_destroy_pointer_array
34340	 */
34341	FLAC__stream_encoder_set_metadata: function(encoder, metadataBuffersPointer, num_blocks){// ( FLAC__StreamEncoder *  encoder, FLAC__StreamMetadata **  metadata, unsigned  num_blocks)
34342		var status = Module.ccall('FLAC__stream_encoder_set_metadata', 'number',
34343				['number', 'number', 'number'],
34344				[encoder, metadataBuffersPointer.pointerPointer, num_blocks]
34345		);
34346		return status;
34347	},
34348	/**
34349	 * Helper object for allocating an array of buffers on the (memory) heap.
34350	 *
34351	 * @interface PointerInfo
34352	 * @memberOf Flac
34353	 * @property {number}  pointerPointer pointer to the array of (pointer) buffers
34354	 * @property {number[]}  dataPointer array of pointers to the allocated data arrays (i.e. buffers)
34355	 *
34356	 * @see Flac#_create_pointer_array
34357	 * @see Flac#_destroy_pointer_array
34358	 */
34359	/**
34360	 * Helper function for creating pointer (and allocating the data) to an array of buffers on the (memory) heap.
34361	 *
34362	 * Use the returned <code>PointerInfo.dataPointer</code> as argument, where the array-pointer is required.
34363	 *
34364	 * NOTE: afer use, the allocated buffers on the heap need be freed, see {@link #_destroy_pointer_array}.
34365	 *
34366	 * @param {Uint8Array[]} bufferArray
34367	 * 						the buffer for which to create
34368	 *
34369	 * @returns {Flac.PointerInfo} <code>false</code> if the decoder is already initialized, else <code>true</code>
34370	 *
34371	 * @memberOf Flac#
34372	 * @function
34373	 *
34374	 * @see Flac#_destroy_pointer_array
34375	 */
34376	_create_pointer_array: function(bufferArray){
34377		var size=bufferArray.length;
34378		var ptrs = [], ptrData = new Uint32Array(size);
34379		var ptrOffsets = new DataView(ptrData.buffer);
34380		var buffer, numBytes, heapBytes, ptr;
34381		for(var i=0, size; i < size; ++i){
34382			buffer = bufferArray[i];
34383			// get the length of the data in bytes
34384			numBytes = buffer.length * buffer.BYTES_PER_ELEMENT;
34385			// malloc enough space for the data
34386			ptr = Module._malloc(numBytes);
34387			ptrs.push(ptr);
34388			// get a bytes-wise view on the newly allocated buffer
34389			heapBytes = new Uint8Array(Module.HEAPU8.buffer, ptr, numBytes);
34390			// copy data into heapBytes
34391			heapBytes.set(new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength));// use FIX for issue #11 (2)
34392			ptrOffsets.setUint32(i*4, ptr, true);
34393		}
34394		var nPointerBytes = ptrData.length * ptrData.BYTES_PER_ELEMENT
34395		var pointerPtr = Module._malloc(nPointerBytes);
34396		var pointerHeap = new Uint8Array(Module.HEAPU8.buffer, pointerPtr, nPointerBytes);
34397		pointerHeap.set( new Uint8Array(ptrData.buffer) );
34398
34399		return {
34400			dataPointer: ptrs,
34401			pointerPointer: pointerPtr
34402		};
34403	},
34404	/**
34405	 * Helper function for destroying/freeing a previously created pointer (and allocating the data) of an array of buffers on the (memory) heap.
34406	 *
34407	 * @param {Flac.PointerInfo} pointerInfo
34408	 * 						the pointer / allocation information that should be destroyed/freed
34409	 *
34410	 *
34411	 * @memberOf Flac#
34412	 * @function
34413	 *
34414	 * @see Flac#_create_pointer_array
34415	 */
34416	_destroy_pointer_array: function(pointerInfo){
34417		var pointerArray = pointerInfo.dataPointer;
34418		for(var i=0, size=pointerArray.length; i < size; ++i){
34419			Module._free(pointerArray[i]);
34420		}
34421		Module._free(pointerInfo.pointerPointer);
34422	},
34423	/**
34424	 * Get if MD5 verification is enabled for the decoder
34425	 *
34426	 * @param {number} decoder
34427	 * 				the ID of the decoder instance
34428	 *
34429	 * @returns {boolean} <code>true</code> if MD5 verification is enabled
34430	 *
34431	 * @memberOf Flac#
34432	 * @function
34433	 *
34434	 * @see #FLAC__stream_decoder_set_md5_checking
34435	 */
34436	FLAC__stream_decoder_get_md5_checking: Module.cwrap('FLAC__stream_decoder_get_md5_checking', 'number', ['number']),
34437
34438	/**
34439	 * Set the "MD5 signature checking" flag. If true, the decoder will compute the MD5 signature of the unencoded audio data while decoding and compare it to the signature from the STREAMINFO block,
34440	 * if it exists, during {@link Flac.FLAC__stream_decoder_finish FLAC__stream_decoder_finish()}.
34441	 *
34442	 * MD5 signature checking will be turned off (until the next {@link Flac.FLAC__stream_decoder_reset FLAC__stream_decoder_reset()}) if there is no signature in the STREAMINFO block or when a seek is attempted.
34443	 *
34444	 * Clients that do not use the MD5 check should leave this off to speed up decoding.
34445	 *
34446	 * @param {number} decoder
34447	 * 				the ID of the decoder instance
34448	 * @param {boolean} is_verify
34449	 * 				enable/disable checksum verification during decoding
34450	 * @returns {boolean} FALSE if the decoder is already initialized, else TRUE.
34451	 *
34452	 * @memberOf Flac#
34453	 * @function
34454	 *
34455	 * @see #FLAC__stream_decoder_get_md5_checking
34456	 */
34457	FLAC__stream_decoder_set_md5_checking: function(decoder, is_verify){
34458		is_verify = is_verify? 1 : 0;
34459		return Module.ccall('FLAC__stream_decoder_set_md5_checking', 'number', ['number', 'number'], [ decoder, is_verify ]);
34460	},
34461
34462	/**
34463	 * Finish the encoding process.
34464	 *
34465	 * @param {number} encoder
34466	 * 				the ID of the encoder instance
34467	 *
34468	 * @returns {boolean} <code>false</code> if an error occurred processing the last frame;
34469	 * 					 or if verify mode is set, there was a verify mismatch; else <code>true</code>.
34470	 * 					 If <code>false</code>, caller should check the state with {@link Flac#FLAC__stream_encoder_get_state}
34471	 * 					 for more information about the error.
34472	 *
34473	 * @memberOf Flac#
34474	 * @function
34475	 */
34476	FLAC__stream_encoder_finish: Module.cwrap('FLAC__stream_encoder_finish', 'number', [ 'number' ]),
34477	/**
34478	 * Finish the decoding process.
34479	 *
34480	 * The decoder can be reused, after initializing it again.
34481	 *
34482	 * @param {number} decoder
34483	 * 				the ID of the decoder instance
34484	 *
34485	 * @returns {boolean} <code>false</code> if MD5 checking is on AND a STREAMINFO block was available AND the MD5 signature in
34486	 * 						 the STREAMINFO block was non-zero AND the signature does not match the one computed by the decoder;
34487	 * 						 else <code>true</code>.
34488	 *
34489	 * @memberOf Flac#
34490	 * @function
34491	 */
34492	FLAC__stream_decoder_finish: Module.cwrap('FLAC__stream_decoder_finish', 'number', [ 'number' ]),
34493	/**
34494	 * Reset the decoder for reuse.
34495	 *
34496	 * <p>
34497	 * NOTE: Needs to be re-initialized, before it can be used again
34498	 *
34499	 * @param {number} decoder
34500	 * 				the ID of the decoder instance
34501	 *
34502	 * @returns {boolean} true if successful
34503	 *
34504	 * @see #init_decoder_stream
34505	 * @see #init_decoder_ogg_stream
34506	 *
34507	 * @memberOf Flac#
34508	 * @function
34509	 */
34510	FLAC__stream_decoder_reset: Module.cwrap('FLAC__stream_decoder_reset', 'number', [ 'number' ]),
34511	/**
34512	 * Delete the encoder instance, and free up its resources.
34513	 *
34514	 * @param {number} encoder
34515	 * 				the ID of the encoder instance
34516	 *
34517	 * @memberOf Flac#
34518	 * @function
34519	 */
34520	FLAC__stream_encoder_delete: function(encoder){
34521		this._clear_enc_cb(encoder);//<- remove callback references
34522		Module.ccall('FLAC__stream_encoder_delete', 'number', [ 'number' ], [encoder]);
34523		do_fire_event('destroyed', [{type: 'destroyed', target: {id: encoder, type: 'encoder'}}], false);
34524	},
34525	/**
34526	 * Delete the decoder instance, and free up its resources.
34527	 *
34528	 * @param {number} decoder
34529	 * 				the ID of the decoder instance
34530	 *
34531	 * @memberOf Flac#
34532	 * @function
34533	 */
34534	FLAC__stream_decoder_delete: function(decoder){
34535		this._clear_dec_cb(decoder);//<- remove callback references
34536		Module.ccall('FLAC__stream_decoder_delete', 'number', [ 'number' ], [decoder]);
34537		do_fire_event('destroyed', [{type: 'destroyed', target: {id: decoder, type: 'decoder'}}], false);
34538	}
34539
34540};//END: var _exported = {
34541
34542//if Properties are supported by JS execution environment:
34543// support "immediate triggering" onready function, if library is already initialized when setting onready callback
34544if(typeof Object.defineProperty === 'function'){
34545	//add internal field for storing onready callback:
34546	_exported._onready = void(0);
34547	//define getter & define setter with "immediate trigger" functionality:
34548	Object.defineProperty(_exported, 'onready', {
34549		get() { return this._onready; },
34550		set(newValue) {
34551			this._onready = newValue;
34552			if(newValue && this.isReady()){
34553				check_and_trigger_persisted_event('ready', newValue);
34554			}
34555		}
34556	});
34557} else {
34558	//if Properties are NOTE supported by JS execution environment:
34559	// pring usage warning for onready hook instead
34560	console.warn('WARN: note that setting Flac.onready handler after Flac.isReady() is already true, will have no effect, that is, the handler function will not be triggered!');
34561}
34562
34563if(expLib && expLib.exports){
34564	expLib.exports = _exported;
34565}
34566return _exported;
34567
34568}));//END: UMD wrapper
34569